From 5365bd25fae59a6ae225534b779bd6c14779599a Mon Sep 17 00:00:00 2001 From: QAston Date: Thu, 9 Feb 2012 23:27:22 +0100 Subject: Core/Spells: remove some workarounds about transform spells in corpse explosion script. --- src/server/scripts/Spells/spell_dk.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index f62d62c671a..5c0f6bcce59 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -29,8 +29,8 @@ enum DeathKnightSpells DK_SPELL_RUNIC_POWER_ENERGIZE = 49088, DK_SPELL_ANTI_MAGIC_SHELL_TALENT = 51052, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED = 43999, + DK_SPELL_CORPSE_EXPLOSION_VISUAL = 51270, DK_SPELL_GHOUL_EXPLODE = 47496, - DISPLAY_GHOUL_CORPSE = 25537, DK_SPELL_SCOURGE_STRIKE_TRIGGERED = 70890, DK_SPELL_BLOOD_BOIL_TRIGGERED = 65658, DK_SPELL_WILL_OF_THE_NECROPOLIS_TALENT_R1 = 49189, @@ -208,6 +208,8 @@ class spell_dk_corpse_explosion : public SpellScriptLoader return false; if (!sSpellMgr->GetSpellInfo(DK_SPELL_GHOUL_EXPLODE)) return false; + if (!sSpellMgr->GetSpellInfo(DK_SPELL_CORPSE_EXPLOSION_VISUAL)) + return false; return true; } @@ -227,9 +229,9 @@ class spell_dk_corpse_explosion : public SpellScriptLoader GetCaster()->CastCustomSpell(unitTarget, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), &bp, NULL, NULL, true); // Corpse Explosion (Suicide) unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true); - // Set corpse look - unitTarget->SetDisplayId(DISPLAY_GHOUL_CORPSE + urand(0, 3)); } + // Set corpse look + GetCaster()->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_VISUAL, true); } } @@ -261,8 +263,6 @@ class spell_dk_ghoul_explode : public SpellScriptLoader { // Corpse Explosion (Suicide) unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true); - // Set corpse look - unitTarget->SetDisplayId(DISPLAY_GHOUL_CORPSE + urand(0, 3)); } } -- cgit v1.2.3 From 9155d21b649589df729b1a5a0f4828678059f7dd Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 10 Feb 2012 16:40:02 +0100 Subject: Scripts/Icecrown Citadel: Fixed crash in spell_frostwarden_handler_order_whelp Closes #5129 --- src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index fb04d9ce7a4..6bbc028e90c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -1344,6 +1344,9 @@ class spell_frostwarden_handler_order_whelp : public SpellScriptLoader ++itr; } + if (unitList.empty()) + return; + Unit* target = SelectRandomContainerElement(unitList); unitList.clear(); unitList.push_back(target); @@ -1356,7 +1359,10 @@ class spell_frostwarden_handler_order_whelp : public SpellScriptLoader std::list unitList; GetCreatureListWithEntryInGrid(unitList, GetCaster(), NPC_FROSTWING_WHELP, 150.0f); if (Creature* creature = GetCaster()->ToCreature()) - unitList.remove_if (OrderWhelpTargetSelector(creature)); + unitList.remove_if(OrderWhelpTargetSelector(creature)); + + if (unitList.empty()) + return; SelectRandomContainerElement(unitList)->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true); } -- cgit v1.2.3 From 05b18ca9ba81c9a6a656e4476e132807489894bf Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 10 Feb 2012 16:44:02 +0100 Subject: Scripts/Icecrown Citadel: Attempt to fix Sindragosa spawning --- .../Northrend/IcecrownCitadel/boss_sindragosa.cpp | 23 ++++++++++++++++++++++ .../IcecrownCitadel/instance_icecrown_citadel.cpp | 4 ---- 2 files changed, 23 insertions(+), 4 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 6bbc028e90c..1d9c3c14897 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -597,6 +597,16 @@ class npc_spinestalker : public CreatureScript { } + void InitializeAI() + { + // Increase add count + if (!me->isDead()) + { + _instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, 1); // this cannot be in Reset because reset also happens on evade + Reset(); + } + } + void Reset() { _events.Reset(); @@ -712,6 +722,16 @@ class npc_rimefang : public CreatureScript { } + void InitializeAI() + { + // Increase add count + if (!me->isDead()) + { + _instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, 1); // this cannot be in Reset because reset also happens on evade + Reset(); + } + } + void Reset() { _events.Reset(); @@ -860,7 +880,10 @@ class npc_sindragosa_trash : public CreatureScript _frostwyrmId = (me->GetHomePosition().GetPositionY() < 2484.35f) ? DATA_RIMEFANG : DATA_SPINESTALKER; // Increase add count if (!me->isDead()) + { _instance->SetData(_frostwyrmId, 1); // this cannot be in Reset because reset also happens on evade + Reset(); + } } void Reset() diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 2a61d00d119..98f5c04ba42 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -279,13 +279,9 @@ class instance_icecrown_citadel : public InstanceMapScript break; case NPC_SPINESTALKER: SpinestalkerGUID = creature->GetGUID(); - if (!creature->isDead()) - ++FrostwyrmCount; break; case NPC_RIMEFANG: RimefangGUID = creature->GetGUID(); - if (!creature->isDead()) - ++FrostwyrmCount; break; case NPC_THE_LICH_KING: TheLichKingGUID = creature->GetGUID(); -- cgit v1.2.3