diff options
Diffstat (limited to 'src/server/scripts')
3 files changed, 35 insertions, 10 deletions
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index fb04d9ce7a4..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() @@ -1344,6 +1367,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 +1382,10 @@ class spell_frostwarden_handler_order_whelp : public SpellScriptLoader std::list<Creature*> 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); } 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(); 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)); } } |
