From b4d2796e3322d5f08c32d0f64b478aa5869f343a Mon Sep 17 00:00:00 2001 From: joschiwald Date: Sat, 27 Jul 2013 02:37:48 +0200 Subject: [PATCH 1/6] Core/Spells: moved Improved Paladin Auras and Aura Mastery into SpellScripts Closes #205 Closes #5163 Closes #6809 Closes #7408 Closes #9587 --- ...2013_07_27_00_world_spell_script_names.sql | 11 + src/server/game/Spells/Auras/SpellAuras.cpp | 53 ---- src/server/game/Spells/SpellScript.cpp | 2 +- src/server/scripts/Spells/spell_dk.cpp | 20 +- src/server/scripts/Spells/spell_paladin.cpp | 276 +++++++++++++++--- 5 files changed, 254 insertions(+), 108 deletions(-) create mode 100644 sql/updates/world/2013_07_27_00_world_spell_script_names.sql diff --git a/sql/updates/world/2013_07_27_00_world_spell_script_names.sql b/sql/updates/world/2013_07_27_00_world_spell_script_names.sql new file mode 100644 index 0000000000..a3f49d9e4f --- /dev/null +++ b/sql/updates/world/2013_07_27_00_world_spell_script_names.sql @@ -0,0 +1,11 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` IN (31821,64364,-20254,-20138,31869,-53379,63510,63514,63531); +INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES +(31821, 'spell_pal_aura_mastery'), +(64364, 'spell_pal_aura_mastery_immune'), +(-20254,'spell_pal_improved_concentraction_aura'), +(-20138,'spell_pal_improved_devotion_aura'), +(31869, 'spell_pal_sanctified_retribution'), +(-53379,'spell_pal_swift_retribution'), +(63510, 'spell_pal_improved_concentraction_aura_effect'), +(63514, 'spell_pal_improved_devotion_aura_effect'), +(63531, 'spell_pal_sanctified_retribution_effect'); diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 0f59bd200b..2846137ad9 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1632,36 +1632,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b case SPELLFAMILY_PALADIN: switch (GetId()) { - case 19746: - if (!caster) - break; - - // Improved concentration aura - linked aura - if (caster->HasAura(20254) || caster->HasAura(20255) || caster->HasAura(20256)) - { - if (apply) - target->CastSpell(target, 63510, true); - else - target->RemoveAura(63510); - } - break; - case 31821: - // Aura Mastery Triggered Spell Handler - // If apply Concentration Aura -> trigger -> apply Aura Mastery Immunity - // If remove Concentration Aura -> trigger -> remove Aura Mastery Immunity - // If remove Aura Mastery -> trigger -> remove Aura Mastery Immunity - // Do effects only on aura owner - if (GetCasterGUID() != target->GetGUID()) - break; - - if (apply) - { - if ((GetSpellInfo()->Id == 31821 && target->HasAura(19746, GetCasterGUID())) || (GetSpellInfo()->Id == 19746 && target->HasAura(31821))) - target->CastSpell(target, 64364, true); - } - else - target->RemoveAurasDueToSpell(64364, GetCasterGUID()); - break; case 31842: // Divine Illumination // Item - Paladin T10 Holy 2P Bonus if (target->HasAura(70755)) @@ -1673,29 +1643,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b } break; } - if (GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_AURA) - { - if (!caster) - break; - - // Improved devotion aura - if (caster->HasAura(20140) || caster->HasAura(20138) || caster->HasAura(20139)) - { - if (apply) - caster->CastSpell(target, 63514, true); - else - target->RemoveAura(63514); - } - // 63531 - linked aura for both Sanctified Retribution and Swift Retribution talents - // Not allow for Retribution Aura (prevent stacking) - if ((GetSpellInfo()->SpellIconID != 555) && (caster->HasAura(53648) || caster->HasAura(53484) || caster->HasAura(53379) || caster->HasAura(31869))) - { - if (apply) - caster->CastSpell(target, 63531, true); - else - target->RemoveAura(63531); - } - } break; case SPELLFAMILY_WARLOCK: // Drain Soul - If the target is at or below 25% health, Drain Soul causes four times the normal damage diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 404c62efb5..5fb4d69cd0 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -136,7 +136,7 @@ bool _SpellScript::EffectAuraNameCheck::Check(SpellInfo const* spellEntry, uint8 return true; if (!spellEntry->Effects[effIndex].ApplyAuraName) return false; - return (effAurName == SPELL_EFFECT_ANY) || (spellEntry->Effects[effIndex].ApplyAuraName == effAurName); + return (effAurName == SPELL_AURA_ANY) || (spellEntry->Effects[effIndex].ApplyAuraName == effAurName); } std::string _SpellScript::EffectAuraNameCheck::ToString() diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index bcbe944332..1c23259baf 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -948,24 +948,8 @@ class spell_dk_presence : public SpellScriptLoader void Register() OVERRIDE { - uint32 auraType = 0; - - switch (m_scriptSpellId) - { - case SPELL_DK_BLOOD_PRESENCE: - auraType = SPELL_AURA_MOD_DAMAGE_PERCENT_DONE; - break; - case SPELL_DK_FROST_PRESENCE: - auraType = SPELL_AURA_MOD_BASE_RESISTANCE_PCT; - break; - case SPELL_DK_UNHOLY_PRESENCE: - auraType = SPELL_AURA_MOD_MELEE_HASTE; - break; - default: - return; - } - AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleEffectApply, EFFECT_0, auraType, AURA_EFFECT_HANDLE_REAL); - AfterEffectRemove += AuraEffectRemoveFn(spell_dk_presence_AuraScript::HandleEffectRemove, EFFECT_0, auraType, AURA_EFFECT_HANDLE_REAL); + AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_dk_presence_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); } }; diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 9f50fc3abd..18d3e07d43 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -63,10 +63,24 @@ enum PaladinSpells SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS = 25742, + SPELL_PALADIN_CONCENTRACTION_AURA = 19746, + SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1 = 31869, + SPELL_PALADIN_SWIFT_RETRIBUTION_R1 = 53379, + + SPELL_PALADIN_IMPROVED_CONCENTRACTION_AURA = 63510, + SPELL_PALADIN_IMPROVED_DEVOTION_AURA = 63514, + SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA = 63531, + SPELL_PALADIN_AURA_MASTERY_IMMUNE = 64364, + SPELL_GENERIC_ARENA_DAMPENING = 74410, SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411 }; +enum PaladinSpellIcons +{ + PALADIN_ICON_ID_RETRIBUTION_AURA = 555 +}; + // 31850 - Ardent Defender class spell_pal_ardent_defender : public SpellScriptLoader { @@ -143,6 +157,80 @@ class spell_pal_ardent_defender : public SpellScriptLoader } }; +// 31821 - Aura Mastery +class spell_pal_aura_mastery : public SpellScriptLoader +{ + public: + spell_pal_aura_mastery() : SpellScriptLoader("spell_pal_aura_mastery") { } + + class spell_pal_aura_mastery_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_aura_mastery_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_AURA_MASTERY_IMMUNE)) + return false; + return true; + } + + void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_AURA_MASTERY_IMMUNE, true); + } + + void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveOwnedAura(SPELL_PALADIN_AURA_MASTERY_IMMUNE, GetCasterGUID()); + } + + void Register() OVERRIDE + { + AfterEffectApply += AuraEffectApplyFn(spell_pal_aura_mastery_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_pal_aura_mastery_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_pal_aura_mastery_AuraScript(); + } +}; + +// 64364 - Aura Mastery Immune +class spell_pal_aura_mastery_immune : public SpellScriptLoader +{ + public: + spell_pal_aura_mastery_immune() : SpellScriptLoader("spell_pal_aura_mastery_immune") { } + + class spell_pal_aura_mastery_immune_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_aura_mastery_immune_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_CONCENTRACTION_AURA)) + return false; + return true; + } + + bool CheckAreaTarget(Unit* target) + { + return target->HasAura(SPELL_PALADIN_CONCENTRACTION_AURA, GetCasterGUID()); + } + + void Register() OVERRIDE + { + DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_pal_aura_mastery_immune_AuraScript::CheckAreaTarget); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_pal_aura_mastery_immune_AuraScript(); + } +}; + // 37877 - Blessing of Faith class spell_pal_blessing_of_faith : public SpellScriptLoader { @@ -589,41 +677,6 @@ class spell_pal_hand_of_salvation : public SpellScriptLoader } }; -// 37705 - Healing Discount -class spell_pal_item_healing_discount : public SpellScriptLoader -{ - public: - spell_pal_item_healing_discount() : SpellScriptLoader("spell_pal_item_healing_discount") { } - - class spell_pal_item_healing_discount_AuraScript : public AuraScript - { - PrepareAuraScript(spell_pal_item_healing_discount_AuraScript); - - bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE - { - if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_ITEM_HEALING_TRANCE)) - return false; - return true; - } - - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) - { - PreventDefaultAction(); - GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_ITEM_HEALING_TRANCE, true, NULL, aurEff); - } - - void Register() OVERRIDE - { - OnEffectProc += AuraEffectProcFn(spell_pal_item_healing_discount_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); - } - }; - - AuraScript* GetAuraScript() const OVERRIDE - { - return new spell_pal_item_healing_discount_AuraScript(); - } -}; - // -20473 - Holy Shock class spell_pal_holy_shock : public SpellScriptLoader { @@ -696,6 +749,148 @@ class spell_pal_holy_shock : public SpellScriptLoader } }; +// Maybe this is incorrect +// These spells should always be cast on login, regardless of whether the player has the talent or not + +// -20254 - Improved Concentration Aura +// -20138 - Improved Devotion Aura +// 31869 - Sanctified Retribution +// -53379 - Swift Retribution +class spell_pal_improved_aura : public SpellScriptLoader +{ + public: + spell_pal_improved_aura(char const* name, uint32 spellId) : SpellScriptLoader(name), _spellId(spellId) { } + + class spell_pal_improved_aura_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_improved_aura_AuraScript); + + public: + spell_pal_improved_aura_AuraScript(uint32 spellId) : AuraScript(), _spellId(spellId) { } + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(_spellId) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_SWIFT_RETRIBUTION_R1)) + return false; + return true; + } + + void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* target = GetTarget(); + if (!target->GetOwnedAura(_spellId)) + target->CastSpell(target, _spellId, true); + } + + void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + uint32 spellId = GetSpellInfo()->GetFirstRankSpell()->Id; + + if ((spellId == SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1 && GetTarget()->GetAuraOfRankedSpell(SPELL_PALADIN_SWIFT_RETRIBUTION_R1)) + || (spellId == SPELL_PALADIN_SWIFT_RETRIBUTION_R1 && GetTarget()->GetAuraOfRankedSpell(SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1))) + return; + + GetTarget()->RemoveOwnedAura(_spellId, GetCasterGUID()); + } + + void Register() OVERRIDE + { + AfterEffectApply += AuraEffectApplyFn(spell_pal_improved_aura_AuraScript::HandleEffectApply, EFFECT_FIRST_FOUND, SPELL_AURA_ADD_FLAT_MODIFIER, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_pal_improved_aura_AuraScript::HandleEffectRemove, EFFECT_FIRST_FOUND, SPELL_AURA_ADD_FLAT_MODIFIER, AURA_EFFECT_HANDLE_REAL); + } + + private: + uint32 _spellId; + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_pal_improved_aura_AuraScript(_spellId); + } + + private: + uint32 _spellId; +}; + +// 63510 - Improved Concentraction Aura (Area Aura) +// 63514 - Improved Devotion Aura (Area Aura) +// 63531 - Sanctified Retribution (Area Aura) +class spell_pal_improved_aura_effect : public SpellScriptLoader +{ + public: + spell_pal_improved_aura_effect(char const* name) : SpellScriptLoader(name) { } + + class spell_pal_improved_aura_effect_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_improved_aura_effect_AuraScript); + + bool CheckAreaTarget(Unit* target) + { + Unit::AuraApplicationMap& appliedAuras = target->GetAppliedAuras(); + for (Unit::AuraApplicationMap::iterator itr = appliedAuras.begin(); itr != appliedAuras.end(); ++itr) + { + Aura const* aura = itr->second->GetBase(); + if (aura->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_AURA && aura->GetCasterGUID() == GetCasterGUID()) + { + // Not allow for Retribution Aura (prevent stacking) - Retribution Aura Overflow and Retribution Aura has same spell effects + if (GetSpellInfo()->Id == SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA && aura->GetSpellInfo()->SpellIconID == PALADIN_ICON_ID_RETRIBUTION_AURA) + return false; + return true; + } + } + + return false; + } + + void Register() OVERRIDE + { + DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_pal_improved_aura_effect_AuraScript::CheckAreaTarget); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_pal_improved_aura_effect_AuraScript(); + } +}; + +// 37705 - Healing Discount +class spell_pal_item_healing_discount : public SpellScriptLoader +{ + public: + spell_pal_item_healing_discount() : SpellScriptLoader("spell_pal_item_healing_discount") { } + + class spell_pal_item_healing_discount_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_item_healing_discount_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_ITEM_HEALING_TRANCE)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_ITEM_HEALING_TRANCE, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_pal_item_healing_discount_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_pal_item_healing_discount_AuraScript(); + } +}; + // 20425 - Judgement of Command class spell_pal_judgement_of_command : public SpellScriptLoader { @@ -938,6 +1133,8 @@ class spell_pal_seal_of_righteousness : public SpellScriptLoader void AddSC_paladin_spell_scripts() { new spell_pal_ardent_defender(); + new spell_pal_aura_mastery(); + new spell_pal_aura_mastery_immune(); new spell_pal_blessing_of_faith(); new spell_pal_blessing_of_sanctuary(); new spell_pal_divine_sacrifice(); @@ -948,8 +1145,15 @@ void AddSC_paladin_spell_scripts() new spell_pal_guarded_by_the_light(); new spell_pal_hand_of_sacrifice(); new spell_pal_hand_of_salvation(); - new spell_pal_item_healing_discount(); new spell_pal_holy_shock(); + new spell_pal_improved_aura("spell_pal_improved_concentraction_aura", SPELL_PALADIN_IMPROVED_CONCENTRACTION_AURA); + new spell_pal_improved_aura("spell_pal_improved_devotion_aura", SPELL_PALADIN_IMPROVED_DEVOTION_AURA); + new spell_pal_improved_aura("spell_pal_sanctified_retribution", SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA); + new spell_pal_improved_aura("spell_pal_swift_retribution", SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA); + new spell_pal_improved_aura_effect("spell_pal_improved_concentraction_aura_effect"); + new spell_pal_improved_aura_effect("spell_pal_improved_devotion_aura_effect"); + new spell_pal_improved_aura_effect("spell_pal_sanctified_retribution_effect"); + new spell_pal_item_healing_discount(); new spell_pal_judgement_of_command(); new spell_pal_lay_on_hands(); new spell_pal_righteous_defense(); From 7678800a9372f9234f0bf29459b46a8514dc59f2 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Sat, 27 Jul 2013 17:53:00 +0200 Subject: [PATCH 2/6] Scripts/Spells: simplified "spell_dk_presence" --- src/server/scripts/Spells/spell_dk.cpp | 65 ++++++++++---------------- 1 file changed, 25 insertions(+), 40 deletions(-) diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 1c23259baf..9b19cc8080 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -878,62 +878,45 @@ class spell_dk_presence : public SpellScriptLoader return true; } - void CheckImprovedBloodPresence() + void HandleImprovedBloodPresence(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); - if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1, EFFECT_0)) + + if (GetSpellInfo()->Id == SPELL_DK_BLOOD_PRESENCE) + target->CastSpell(target, SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, true); + else if (AuraEffect const* impAurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1, EFFECT_0)) if (!target->HasAura(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED)) - target->CastCustomSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT1, aurEff->GetAmount(), target, true, NULL, aurEff); + target->CastCustomSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT1, impAurEff->GetAmount(), target, true, NULL, aurEff); } - void CheckImprovedFrostPresence() + void HandleImprovedFrostPresence(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); - if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_FROST_PRESENCE_R1, EFFECT_0)) + + if (GetSpellInfo()->Id == SPELL_DK_FROST_PRESENCE) + target->CastSpell(target, SPELL_DK_FROST_PRESENCE_TRIGGERED, true); + else if (AuraEffect const* impAurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_FROST_PRESENCE_R1, EFFECT_0)) if (!target->HasAura(SPELL_DK_FROST_PRESENCE_TRIGGERED)) - target->CastCustomSpell(SPELL_DK_FROST_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), target, true, NULL, aurEff); + target->CastCustomSpell(SPELL_DK_FROST_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT0, impAurEff->GetAmount(), target, true, NULL, aurEff); } - void CheckImprovedUnholyPresence(bool inUnholy = false) + void HandleImprovedUnholyPresence(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); - if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1, EFFECT_0)) + + if (GetSpellInfo()->Id == SPELL_DK_UNHOLY_PRESENCE) + target->CastSpell(target, SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, true); + + if (AuraEffect const* impAurEff = target->GetAuraEffectOfRankedSpell(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1, EFFECT_0)) { - if (inUnholy) + if (GetSpellInfo()->Id == SPELL_DK_UNHOLY_PRESENCE) { // Not listed as any effect, only base points set - int32 bp = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); - target->CastCustomSpell(target, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &bp, &bp, &bp, true, 0, aurEff); + int32 bp = GetSpellInfo()->Effects[EFFECT_1].CalcValue(); + target->CastCustomSpell(target, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &bp, &bp, &bp, true, NULL, aurEff); } else if (!target->HasAura(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED)) - target->CastCustomSpell(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), target, true, NULL, aurEff); - } - } - - void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - Unit* target = GetTarget(); - - switch (GetSpellInfo()->Id) - { - case SPELL_DK_BLOOD_PRESENCE: - target->CastSpell(target, SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, true); - CheckImprovedFrostPresence(); - CheckImprovedUnholyPresence(); - break; - case SPELL_DK_FROST_PRESENCE: - target->CastSpell(target, SPELL_DK_FROST_PRESENCE_TRIGGERED, true); - CheckImprovedBloodPresence(); - CheckImprovedUnholyPresence(); - break; - case SPELL_DK_UNHOLY_PRESENCE: - target->CastSpell(target, SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, true); - CheckImprovedBloodPresence(); - CheckImprovedFrostPresence(); - CheckImprovedUnholyPresence(true); - break; - default: - return; + target->CastCustomSpell(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT0, impAurEff->GetAmount(), target, true, NULL, aurEff); } } @@ -948,7 +931,9 @@ class spell_dk_presence : public SpellScriptLoader void Register() OVERRIDE { - AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); + AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedBloodPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); + AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedFrostPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); + AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedUnholyPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_dk_presence_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); } }; From cf7e783274750fbed0286e4a2cbddab04cf1eea7 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Sat, 27 Jul 2013 21:25:56 +0200 Subject: [PATCH 3/6] Scripts/Spells: Fixed typo in 7678800a9372f9234f0bf29459b46a8514dc59f2 --- src/server/game/Globals/ObjectMgr.cpp | 2 +- src/server/scripts/Spells/spell_dk.cpp | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 140fb6afea..306ccc0849 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -4898,7 +4898,7 @@ void ObjectMgr::LoadSpellScriptNames() else { if (spellInfo->IsRanked()) - TC_LOG_ERROR(LOG_FILTER_SQL, "Scriptname: `%s` spell (Id: %d) is ranked spell. Properly not all ranks are assigned to this script.", scriptName, spellId); + TC_LOG_ERROR(LOG_FILTER_SQL, "Scriptname: `%s` spell (Id: %d) is ranked spell. Perhaps not all ranks are assigned to this script.", scriptName, spellId); _spellScriptsStore.insert(SpellScriptsContainer::value_type(spellInfo->Id, GetScriptId(scriptName))); } diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 9b19cc8080..eb7ccc54c3 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -718,10 +718,7 @@ class spell_dk_improved_blood_presence : public SpellScriptLoader { Unit* target = GetTarget(); if ((target->HasAura(SPELL_DK_FROST_PRESENCE) || target->HasAura(SPELL_DK_UNHOLY_PRESENCE)) && !target->HasAura(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED)) - { - int32 basePoints1 = aurEff->GetAmount(); - target->CastCustomSpell(target, SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, NULL, &basePoints1, NULL, true, NULL, aurEff); - } + target->CastCustomSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED, SPELLVALUE_BASE_POINT1, aurEff->GetAmount(), target, true, NULL, aurEff); } void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) @@ -818,8 +815,8 @@ class spell_dk_improved_unholy_presence : public SpellScriptLoader if (target->HasAura(SPELL_DK_UNHOLY_PRESENCE) && !target->HasAura(SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED)) { // Not listed as any effect, only base points set in dbc - int32 basePoints0 = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); - target->CastCustomSpell(target, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &basePoints0, &basePoints0, &basePoints0, true, NULL, aurEff); + int32 basePoints = GetSpellInfo()->Effects[EFFECT_1].CalcValue(); + target->CastCustomSpell(target, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &basePoints, &basePoints, &basePoints, true, NULL, aurEff); } if ((target->HasAura(SPELL_DK_BLOOD_PRESENCE) || target->HasAura(SPELL_DK_FROST_PRESENCE)) && !target->HasAura(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED)) @@ -912,7 +909,7 @@ class spell_dk_presence : public SpellScriptLoader if (GetSpellInfo()->Id == SPELL_DK_UNHOLY_PRESENCE) { // Not listed as any effect, only base points set - int32 bp = GetSpellInfo()->Effects[EFFECT_1].CalcValue(); + int32 bp = impAurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); target->CastCustomSpell(target, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED, &bp, &bp, &bp, true, NULL, aurEff); } else if (!target->HasAura(SPELL_DK_UNHOLY_PRESENCE_TRIGGERED)) From a5a696fdda48f907210b4f13bda59d4c4171ae1f Mon Sep 17 00:00:00 2001 From: Kirkhammett Date: Sun, 28 Jul 2013 16:17:51 +0100 Subject: [PATCH 4/6] DB/GOs: Spawns of Discarded Soul Crystal for "The Fate Of The Fallen" Closes # Signed-off-by: Nay --- .../world/2013_07_28_00_world_gameobjects.sql | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sql/updates/world/2013_07_28_00_world_gameobjects.sql diff --git a/sql/updates/world/2013_07_28_00_world_gameobjects.sql b/sql/updates/world/2013_07_28_00_world_gameobjects.sql new file mode 100644 index 0000000000..cb352339bd --- /dev/null +++ b/sql/updates/world/2013_07_28_00_world_gameobjects.sql @@ -0,0 +1,75 @@ +SET @OGUID := 76732; -- Discarded Soul Crystal & Aura Trap Blue Short (cosmetic) + +DELETE FROM `gameobject` WHERE `id` IN (195344, 195346, 193984); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID, 195344, 571, 1, 1, 7830.25, 2497.806, 402.5372, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: 0) +(@OGUID+1, 195346, 571, 1, 1, 7830.25, 2497.806, 402.5372, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: 0) +(@OGUID+2, 195344, 571, 1, 1, 7796.588, 2463.793, 393.2891, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: 0) +(@OGUID+3, 195346, 571, 1, 1, 7796.588, 2463.793, 393.2891, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: 0) +(@OGUID+4, 195344, 571, 1, 1, 7845.074, 2444.608, 400.5993, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: 0) +(@OGUID+5, 195346, 571, 1, 1, 7845.074, 2444.608, 400.5993, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: 0) +(@OGUID+6, 195344, 571, 1, 1, 7888.031, 2486.691, 412.1846, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: 0) +(@OGUID+7, 195346, 571, 1, 1, 7888.031, 2486.691, 412.1846, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: 0) +(@OGUID+8, 195344, 571, 1, 1, 7890.981, 2435.66, 407.6983, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: 0) +(@OGUID+9, 195346, 571, 1, 1, 7890.981, 2435.66, 407.6983, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: 0) +(@OGUID+10, 195344, 571, 1, 1, 7879.325, 2381.498, 395.9927, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+11, 195346, 571, 1, 1, 7879.325, 2381.498, 395.9927, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+12, 195344, 571, 1, 1, 7772.191, 2523.408, 397.5526, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+13, 195346, 571, 1, 1, 7772.191, 2523.408, 397.5526, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+14, 195344, 571, 1, 1, 7792.491, 2552.295, 404.7368, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+15, 195346, 571, 1, 1, 7792.491, 2552.295, 404.7368, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+16, 195344, 571, 1, 1, 7813.522, 2376.698, 383.7577, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+17, 195346, 571, 1, 1, 7813.522, 2376.698, 383.7577, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+18, 195344, 571, 1, 1, 7912.719, 2361.585, 403.3483, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+19, 195346, 571, 1, 1, 7912.719, 2361.585, 403.3483, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+20, 195344, 571, 1, 1, 7887.583, 2323.535, 389.2969, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+21, 195346, 571, 1, 1, 7887.583, 2323.535, 389.2969, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+22, 195344, 571, 1, 1, 7779.922, 2417.377, 384.4348, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+23, 195346, 571, 1, 1, 7779.922, 2417.377, 384.4348, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+24, 195344, 571, 1, 1, 7912.483, 2277.05, 387.8716, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+25, 195346, 571, 1, 1, 7912.483, 2277.05, 387.8716, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+26, 195344, 571, 1, 1, 7843.852, 2334.658, 382.3897, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+27, 195346, 571, 1, 1, 7843.852, 2334.658, 382.3897, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+28, 195344, 571, 1, 1, 7863.498, 2231.648, 375.1721, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+29, 195346, 571, 1, 1, 7863.498, 2231.648, 375.1721, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+30, 195344, 571, 1, 1, 7829.741, 2296.035, 378.0592, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+31, 195346, 571, 1, 1, 7829.741, 2296.035, 378.0592, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+32, 195344, 571, 1, 1, 7746.049, 2372.997, 376.3941, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+33, 195346, 571, 1, 1, 7746.049, 2372.997, 376.3941, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+34, 195344, 571, 1, 1, 7760.765, 2331.149, 374.8048, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+35, 195346, 571, 1, 1, 7760.765, 2331.149, 374.8048, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+36, 195344, 571, 1, 1, 7788.99, 2255.302, 371.7061, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+37, 195346, 571, 1, 1, 7788.99, 2255.302, 371.7061, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+38, 195344, 571, 1, 1, 7820.729, 2238.01, 372.7758, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+39, 195346, 571, 1, 1, 7820.729, 2238.01, 372.7758, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+40, 193984, 571, 1, 1, 7647.473, 2055.554, 599.3989, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- Alliance Banner (Area: The Valley of Fallen Heroes) +(@OGUID+41, 195344, 571, 1, 1, 7745.684, 2289.906, 371.991, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+42, 195346, 571, 1, 1, 7745.684, 2289.906, 371.991, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+43, 195344, 571, 1, 1, 7696.855, 2372.087, 374.5795, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+44, 195346, 571, 1, 1, 7696.855, 2372.087, 374.5795, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+45, 195344, 571, 1, 1, 7710.979, 2338.505, 373.0223, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+46, 195346, 571, 1, 1, 7710.979, 2338.505, 373.0223, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+47, 195344, 571, 1, 1, 7750.775, 2420.458, 380.734, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+48, 195346, 571, 1, 1, 7750.775, 2420.458, 380.734, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+49, 195344, 571, 1, 1, 7651.209, 2394.108, 374.7194, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+50, 195346, 571, 1, 1, 7651.209, 2394.108, 374.7194, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+51, 195344, 571, 1, 1, 7694.101, 2306.049, 370.4156, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+52, 195346, 571, 1, 1, 7694.101, 2306.049, 370.4156, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+53, 195344, 571, 1, 1, 7603.735, 2402.665, 377.1989, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+54, 195346, 571, 1, 1, 7603.735, 2402.665, 377.1989, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+55, 195344, 571, 1, 1, 7632.563, 2369.054, 376.1918, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+56, 195346, 571, 1, 1, 7632.563, 2369.054, 376.1918, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+57, 195346, 571, 1, 1, 7568.995, 2373.521, 377.0721, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+58, 195344, 571, 1, 1, 7568.995, 2373.521, 377.0721, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+59, 195344, 571, 1, 1, 7628.762, 2434.55, 377.8682, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+60, 195346, 571, 1, 1, 7628.762, 2434.55, 377.8682, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+61, 195346, 571, 1, 1, 7569.211, 2434.028, 382.9506, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+62, 195344, 571, 1, 1, 7569.211, 2434.028, 382.9506, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+63, 195344, 571, 1, 1, 7590.309, 2308.01, 376.7488, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+64, 195346, 571, 1, 1, 7590.309, 2308.01, 376.7488, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+65, 195344, 571, 1, 1, 7542.194, 2323.882, 378.2228, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+66, 195346, 571, 1, 1, 7542.194, 2323.882, 378.2228, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+67, 195344, 571, 1, 1, 7505.332, 2363.399, 378.0511, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+68, 195346, 571, 1, 1, 7505.332, 2363.399, 378.0511, 0, 0, 0, 0, 1, 120, 255, 1), -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) +(@OGUID+69, 195344, 571, 1, 1, 7453.913, 2355.877, 380.0355, 0, 0, 0, 0, 1, 120, 255, 1), -- Discarded Soul Crystal (Area: The Valley of Fallen Heroes) +(@OGUID+70, 195346, 571, 1, 1, 7453.913, 2355.877, 380.0355, 0, 0, 0, 0, 1, 120, 255, 1); -- Aura Trap Blue Short (Area: The Valley of Fallen Heroes) From 009317d2a0c1bdea7a7a1e40a7ecbe7a31c4dcc3 Mon Sep 17 00:00:00 2001 From: Nay Date: Sun, 28 Jul 2013 16:54:13 +0100 Subject: [PATCH 5/6] SQLS/Old: Move some misplaced files --- .../2012_12_18_00_characters_worldstates.sql | 0 .../{world => auth}/2013_01_27_00_auth_realmlist.sql | 0 .../{world => auth}/2013_02_04_00_auth_misc.sql | 0 .../{world => auth}/2013_02_04_01_auth_account.sql | 0 .../{world => auth}/2013_02_05_00_auth_account.sql | 0 .../{world => auth}/2013_02_07_00_auth_account.sql | 0 .../{world => auth}/2013_02_08_00_auth_account.sql | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename sql/old/3.3.5a/TDB49_to_TDB50_updates/{world => characters}/2012_12_18_00_characters_worldstates.sql (100%) rename sql/old/3.3.5a/TDB50_to_TDB51_updates/{world => auth}/2013_01_27_00_auth_realmlist.sql (100%) rename sql/old/3.3.5a/TDB50_to_TDB51_updates/{world => auth}/2013_02_04_00_auth_misc.sql (100%) rename sql/old/3.3.5a/TDB50_to_TDB51_updates/{world => auth}/2013_02_04_01_auth_account.sql (100%) rename sql/old/3.3.5a/TDB50_to_TDB51_updates/{world => auth}/2013_02_05_00_auth_account.sql (100%) rename sql/old/3.3.5a/TDB50_to_TDB51_updates/{world => auth}/2013_02_07_00_auth_account.sql (100%) rename sql/old/3.3.5a/TDB50_to_TDB51_updates/{world => auth}/2013_02_08_00_auth_account.sql (100%) diff --git a/sql/old/3.3.5a/TDB49_to_TDB50_updates/world/2012_12_18_00_characters_worldstates.sql b/sql/old/3.3.5a/TDB49_to_TDB50_updates/characters/2012_12_18_00_characters_worldstates.sql similarity index 100% rename from sql/old/3.3.5a/TDB49_to_TDB50_updates/world/2012_12_18_00_characters_worldstates.sql rename to sql/old/3.3.5a/TDB49_to_TDB50_updates/characters/2012_12_18_00_characters_worldstates.sql diff --git a/sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_01_27_00_auth_realmlist.sql b/sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_01_27_00_auth_realmlist.sql similarity index 100% rename from sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_01_27_00_auth_realmlist.sql rename to sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_01_27_00_auth_realmlist.sql diff --git a/sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_04_00_auth_misc.sql b/sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_04_00_auth_misc.sql similarity index 100% rename from sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_04_00_auth_misc.sql rename to sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_04_00_auth_misc.sql diff --git a/sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_04_01_auth_account.sql b/sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_04_01_auth_account.sql similarity index 100% rename from sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_04_01_auth_account.sql rename to sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_04_01_auth_account.sql diff --git a/sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_05_00_auth_account.sql b/sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_05_00_auth_account.sql similarity index 100% rename from sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_05_00_auth_account.sql rename to sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_05_00_auth_account.sql diff --git a/sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_07_00_auth_account.sql b/sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_07_00_auth_account.sql similarity index 100% rename from sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_07_00_auth_account.sql rename to sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_07_00_auth_account.sql diff --git a/sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_08_00_auth_account.sql b/sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_08_00_auth_account.sql similarity index 100% rename from sql/old/3.3.5a/TDB50_to_TDB51_updates/world/2013_02_08_00_auth_account.sql rename to sql/old/3.3.5a/TDB50_to_TDB51_updates/auth/2013_02_08_00_auth_account.sql From 62918e92d0493978e16f5fb1365818e9efa8461b Mon Sep 17 00:00:00 2001 From: Malcrom Date: Sun, 28 Jul 2013 16:57:09 +0100 Subject: [PATCH 6/6] DB/SAI: Fix quest The Fate Of The Fallen Closes #9363 Thanks to @gaut for the initial script Signed-off-by: Nay --- sql/updates/world/2013_07_28_01_world_sai.sql | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sql/updates/world/2013_07_28_01_world_sai.sql diff --git a/sql/updates/world/2013_07_28_01_world_sai.sql b/sql/updates/world/2013_07_28_01_world_sai.sql new file mode 100644 index 0000000000..067200e9c5 --- /dev/null +++ b/sql/updates/world/2013_07_28_01_world_sai.sql @@ -0,0 +1,24 @@ +-- Fix quest 14107: The Fate Of The Fallen +-- Add SmartAI for Fallen Hero's Spirit + +SET @ENTRY := 32149; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE creature_id = @ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9; +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, 8, 0, 100, 1, 66719, 0, 0, 0, 80, @ENTRY*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Fallen Hero''s Spirit - On Spellhit Blessing of Peace - Run script'), +(@ENTRY*100, 9, 0, 0, 0, 0, 100, 0, 100, 100, 0, 0, 66, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Fallen Hero''s Spirit - Script - Turn to Invoker'), +(@ENTRY*100, 9, 1, 0, 0, 0, 100, 0, 100, 100, 0, 0, 33, 35055, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 'Fallen Hero''s Spirit - Script - Give Quest Credit'), +(@ENTRY*100, 9, 2, 0, 0, 0, 100, 0, 100, 100, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Fallen Hero''s Spirit - Script - Set Faction'), +(@ENTRY*100, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Fallen Hero''s Spirit - Script - Say 0'), +(@ENTRY*100, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Fallen Hero''s Spirit - Script - Despawn'); + +-- Creature text for Fallen Hero's Spirit +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY, 0, 0, 'It was awful... I dreamt I was fighting against my friends.', 12, 0, 100, 1, 0, 0, 'Fallen Hero''s Spirit'), +(@ENTRY, 0, 1, 'I''m so tired. Just let me rest for a moment.', 12, 0, 100, 1, 0, 0, 'Fallen Hero''s Spirit'), +(@ENTRY, 0, 2, 'I can''t hear the screams anymore. Is this the end?', 12, 0, 100, 1, 0, 0, 'Fallen Hero''s Spirit'), +(@ENTRY, 0, 3, 'At last... now I can rest.', 12, 0, 100, 1, 0, 0, 'Fallen Hero''s Spirit'), +(@ENTRY, 0, 4, 'My nightmare, is it finally over?', 12, 0, 100, 1, 0, 0, 'Fallen Hero''s Spirit');