diff options
| author | tobmaps <spambot42@yandex.ru> | 2011-05-28 18:49:21 +0700 | 
|---|---|---|
| committer | tobmaps <spambot42@yandex.ru> | 2011-05-28 18:49:21 +0700 | 
| commit | 0faeb459325b7d9c80f834a69e0294fd2d666175 (patch) | |
| tree | bf74b59a7903ae683284942f4839180d90b3e438 | |
| parent | 2de87eaaabf26daa5394fbbc2f95e6cf47b416fc (diff) | |
Core/Spells: Cleanup code for  Summon Gargoyle
| -rw-r--r-- | sql/updates/world/2011_05_28_00_world_sai.sql | 2 | ||||
| -rw-r--r-- | sql/updates/world/2011_05_28_01_world_spell_script_names.sql | 1 | ||||
| -rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 43 | 
4 files changed, 5 insertions, 47 deletions
diff --git a/sql/updates/world/2011_05_28_00_world_sai.sql b/sql/updates/world/2011_05_28_00_world_sai.sql index 041743d235e..c238e18ea48 100644 --- a/sql/updates/world/2011_05_28_00_world_sai.sql +++ b/sql/updates/world/2011_05_28_00_world_sai.sql @@ -4,4 +4,4 @@ SET @SPELL := 29232;  UPDATE `creature_template` SET `ScriptName`='',`AIName`='SmartAI' WHERE `entry`=@ENTRY;  DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;  INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES -(@ENTRY,0,0,0,6,0,100,1,0,0,0,0,11,@SPELL,3,0,0,0,0,0,0,0,0,0,0,0,0,'Spore - On Death - Cast Fungal Creep on Envoker'); +(@ENTRY,0,0,0,6,0,100,1,0,0,0,0,11,@SPELL,3,0,0,0,0,0,0,0,0,0,0,0,0,'Spore - On Death - Cast Fungal Creep'); diff --git a/sql/updates/world/2011_05_28_01_world_spell_script_names.sql b/sql/updates/world/2011_05_28_01_world_spell_script_names.sql new file mode 100644 index 00000000000..fe605b623e9 --- /dev/null +++ b/sql/updates/world/2011_05_28_01_world_spell_script_names.sql @@ -0,0 +1 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` = 50524; diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 90a5c3b5636..e402a335985 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1900,7 +1900,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const          case SPELL_AURA_DUMMY:              // Haunting Spirits              if (GetId() == 7057) -                target->CastSpell((Unit*)NULL , GetAmount() , true); +                target->CastSpell((Unit*)NULL , GetAmount(), true);              break;          case SPELL_AURA_PERIODIC_DUMMY:              PeriodicDummyTick(target, caster); @@ -6077,9 +6077,9 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo                          target->SetReducedThreatPercent(0, 0);                      break;                  case SPELLFAMILY_DEATHKNIGHT: -                    // Summon Gargoyle (will start feeding gargoyle) +                    // Summon Gargoyle (Dismiss Gargoyle at remove)                      if (GetId() == 61777) -                        target->CastSpell(target, m_spellProto->EffectTriggerSpell[m_effIndex], true); +                        target->CastSpell(target, GetAmount(), true);                      break;                  default:                      break; diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 410d05cd5a5..80ee96a7578 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -28,7 +28,6 @@ enum DeathKnightSpells  {      DK_SPELL_RUNIC_POWER_ENERGIZE               = 49088,      DK_SPELL_ANTI_MAGIC_SHELL_TALENT            = 51052, -    DK_SPELL_SUMMON_GARGOYLE                    = 50514,      DK_SPELL_CORPSE_EXPLOSION_TRIGGERED         = 43999,      DK_SPELL_GHOUL_EXPLODE                      = 47496,      DISPLAY_GHOUL_CORPSE                        = 25537, @@ -361,47 +360,6 @@ class spell_dk_death_pact : public SpellScriptLoader          }  }; -// 50524 Runic Power Feed (keeping Gargoyle alive) -class spell_dk_runic_power_feed : public SpellScriptLoader -{ -    public: -        spell_dk_runic_power_feed() : SpellScriptLoader("spell_dk_runic_power_feed") { } - -        class spell_dk_runic_power_feed_SpellScript : public SpellScript -        { -            PrepareSpellScript(spell_dk_runic_power_feed_SpellScript); - -            bool Validate(SpellEntry const * /*spellEntry*/) -            { -                if (!sSpellStore.LookupEntry(DK_SPELL_SUMMON_GARGOYLE)) -                    return false; -                return true; -            } - -            void HandleDummy(SpellEffIndex /*effIndex*/) -            { -                if (Unit* caster = GetCaster()) -                { -                    // No power, dismiss Gargoyle -                    if (caster->GetPower(POWER_RUNIC_POWER) < 30) -                        caster->RemoveAurasDueToSpell(DK_SPELL_SUMMON_GARGOYLE, caster->GetGUID()); -                    else -                        caster->ModifyPower(POWER_RUNIC_POWER, -30); -                } -            } - -            void Register() -            { -                OnEffect += SpellEffectFn(spell_dk_runic_power_feed_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); -            } -        }; - -        SpellScript* GetSpellScript() const -        { -            return new spell_dk_runic_power_feed_SpellScript(); -        } -}; -  // 55090 Scourge Strike (55265, 55270, 55271)  class spell_dk_scourge_strike : public SpellScriptLoader  { @@ -604,7 +562,6 @@ void AddSC_deathknight_spell_scripts()      new spell_dk_gnoul_explode();      new spell_dk_death_gate();      new spell_dk_death_pact(); -    new spell_dk_runic_power_feed();      new spell_dk_scourge_strike();      new spell_dk_spell_deflection();      new spell_dk_blood_boil();  | 
