diff options
3 files changed, 28 insertions, 87 deletions
diff --git a/sql/updates/world/2011_08_29_00_world_instance_misc.sql b/sql/updates/world/2011_08_29_00_world_instance_misc.sql new file mode 100644 index 00000000000..51a5e651d74 --- /dev/null +++ b/sql/updates/world/2011_08_29_00_world_instance_misc.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_putricide_expunged_gas'; +DELETE FROM `spell_proc_event` WHERE `entry` IN (70215,72858,72859,72860,70672,72455,72832,72833); +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES +(70672,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0,0,0), +(72455,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0,0,0), +(72832,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0,0,0), +(72833,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0,0,0); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 6086d5f9e2d..2e04e6d3bbf 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5596,16 +5596,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere triggered_spell_id = 71203; break; } - // Gaseous Bloat (Professor Putricide add) - case 70215: - case 72858: - case 72859: - case 72860: - { - target = getVictim(); - triggered_spell_id = 70701; - break; - } // Essence of the Blood Queen case 70871: { @@ -7906,6 +7896,27 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp RemoveAuraFromStack(71564); *handled = true; break; + // Gaseous Bloat + case 70672: + case 72455: + case 72832: + case 72833: + { + *handled = true; + uint32 stack = triggeredByAura->GetStackAmount(); + int32 const mod = (GetMap()->GetSpawnMode() & 1) ? 1500 : 1250; + int32 dmg = 0; + for (uint8 i = 1; i < stack; ++i) + dmg += mod * stack; + if (Unit* caster = triggeredByAura->GetCaster()) + { + caster->CastCustomSpell(70701, SPELLVALUE_BASE_POINT0, dmg); + if (Creature* creature = caster->ToCreature()) + creature->DespawnOrUnsummon(1); + } + break; + } + // Ball of Flames Proc case 71756: case 72782: case 72783: diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index ef2639ed6b8..b5bcd93d257 100755 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -740,20 +740,6 @@ class spell_putricide_gaseous_bloat : public SpellScriptLoader } }; -class BeamProtectionCheck -{ - public: - explicit BeamProtectionCheck(uint32 excludeAura) : _excludeAura(excludeAura) { } - - bool operator()(Unit* unit) - { - return unit->HasAura(_excludeAura); - } - - private: - uint32 _excludeAura; -}; - class spell_putricide_ooze_channel : public SpellScriptLoader { public: @@ -782,7 +768,6 @@ class spell_putricide_ooze_channel : public SpellScriptLoader void SelectTarget(std::list<Unit*>& targetList) { - targetList.remove_if(BeamProtectionCheck(GetSpellInfo()->ExcludeTargetAuraSpell)); if (targetList.empty()) { FinishCast(SPELL_FAILED_NO_VALID_TARGETS); @@ -828,67 +813,6 @@ class spell_putricide_ooze_channel : public SpellScriptLoader } }; -class spell_putricide_expunged_gas : public SpellScriptLoader -{ - public: - spell_putricide_expunged_gas() : SpellScriptLoader("spell_putricide_expunged_gas") { } - - class spell_putricide_expunged_gas_SpellScript : public SpellScript - { - PrepareSpellScript(spell_putricide_expunged_gas_SpellScript); - - bool Load() - { - return GetCaster()->GetTypeId() == TYPEID_UNIT && GetCaster()->GetInstanceScript(); - } - - SpellCastResult CheckCast() - { - if (!GetCaster()->getVictim()) - return SPELL_FAILED_NO_VALID_TARGETS; - return SPELL_CAST_OK; - } - - void CalcDamage(SpellEffIndex /*effIndex*/) - { - // checked in script loading, cant be NULL here - InstanceScript* instance = GetCaster()->GetInstanceScript(); - Creature* professor = Unit::GetCreature(*GetCaster(), instance->GetData64(DATA_PROFESSOR_PUTRICIDE)); - if (!professor) - return; - - int32 dmg = 0; - uint32 bloatId = sSpellMgr->GetSpellIdForDifficulty(SPELL_GASEOUS_BLOAT, GetCaster()); - if (Aura* gasBloat = GetCaster()->getVictim()->GetAura(bloatId)) - { - uint32 stack = gasBloat->GetStackAmount(); - int32 const mod = (GetCaster()->GetMap()->GetSpawnMode() & 1) ? 1500 : 1250; - for (uint8 i = 1; i < stack; ++i) - dmg += mod * stack; - } - - SetHitDamage(dmg); - } - - void DespawnAfterCast() - { - GetCaster()->ToCreature()->DespawnOrUnsummon(100); - } - - void Register() - { - OnCheckCast += SpellCheckCastFn(spell_putricide_expunged_gas_SpellScript::CheckCast); - OnEffect += SpellEffectFn(spell_putricide_expunged_gas_SpellScript::CalcDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); - AfterHit += SpellHitFn(spell_putricide_expunged_gas_SpellScript::DespawnAfterCast); - } - }; - - SpellScript* GetSpellScript() const - { - return new spell_putricide_expunged_gas_SpellScript(); - } -}; - class spell_putricide_slime_puddle : public SpellScriptLoader { public: @@ -1532,7 +1456,6 @@ void AddSC_boss_professor_putricide() new npc_volatile_ooze(); new spell_putricide_gaseous_bloat(); new spell_putricide_ooze_channel(); - new spell_putricide_expunged_gas(); new spell_putricide_slime_puddle(); new spell_putricide_slime_puddle_aura(); new spell_putricide_unstable_experiment(); |