aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-07-21 17:46:08 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-07-21 17:46:08 +0200
commitb6a5d667e2844a41d8c23fadbe5268ddde254db0 (patch)
tree3ab9bb34b1766af4ad612ca327debff0525fafdf
parent2d53863396af51de67dfad5a3508d48a69a93224 (diff)
Core/Spells: Update/Convert priest "Body and Soul" for 4.3.4
-rw-r--r--sql/updates/world/2013_07_21_06_world_spell_script_names_434.sql13
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp10
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp53
3 files changed, 66 insertions, 10 deletions
diff --git a/sql/updates/world/2013_07_21_06_world_spell_script_names_434.sql b/sql/updates/world/2013_07_21_06_world_spell_script_names_434.sql
new file mode 100644
index 00000000000..46219538973
--- /dev/null
+++ b/sql/updates/world/2013_07_21_06_world_spell_script_names_434.sql
@@ -0,0 +1,13 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=-64127;
+INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
+(-64127,'spell_pri_body_and_soul');
+
+DELETE FROM `spell_ranks` WHERE `first_spell_id`=64127;
+INSERT INTO `spell_ranks` (`first_spell_id`, `spell_id`, `rank`) VALUES
+(64127, 64127, 1),
+(64127, 64129, 2);
+
+DELETE FROM `spell_proc_event` WHERE `entry` IN (64127,64129);
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+(64127, 0, 6, 0x1, 0x1, 0x80000, 0, 0, 0, 100, 0),
+(64129, 0, 6, 0x1, 0x1, 0x80000, 0, 0, 0, 100, 0);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index af16f9bdb64..90aaac251c2 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5538,16 +5538,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
case SPELLFAMILY_PRIEST:
{
- // Body and Soul
- if (dummySpell->SpellIconID == 2218)
- {
- // Proc only from Cure Disease on self cast
- if (procSpell->Id != 528 || victim != this || !roll_chance_i(triggerAmount))
- return false;
- triggered_spell_id = 64136;
- target = this;
- break;
- }
switch (dummySpell->Id)
{
// Priest Tier 6 Trinket (Ashtongue Talisman of Acumen)
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index f1b5630c096..9578c246c94 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -30,6 +30,9 @@
enum PriestSpells
{
SPELL_PRIEST_ABSOLUTION = 33167,
+ SPELL_PRIEST_BODY_AND_SOUL_DISPEL = 64136,
+ SPELL_PRIEST_BODY_AND_SOUL_SPEED = 65081,
+ SPELL_PRIEST_CURE_DISEASE = 528,
SPELL_PRIEST_DISPEL_MAGIC_FRIENDLY = 97690,
SPELL_PRIEST_DISPEL_MAGIC_HOSTILE = 97691,
SPELL_PRIEST_DIVINE_AEGIS = 47753,
@@ -71,6 +74,55 @@ enum MiscSpells
SPELL_GEN_REPLENISHMENT = 57669
};
+class spell_pri_body_and_soul : public SpellScriptLoader
+{
+ public:
+ spell_pri_body_and_soul() : SpellScriptLoader("spell_pri_body_and_soul") { }
+
+ class spell_pri_body_and_soul_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_pri_body_and_soul_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_CURE_DISEASE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_PRIEST_BODY_AND_SOUL_DISPEL))
+ return false;
+ return true;
+ }
+
+ void HandleEffectSpeedProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
+ {
+ PreventDefaultAction();
+ if (!(eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[0] & 0x1 || eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[2] & 0x80000))
+ return;
+
+ GetTarget()->CastCustomSpell(SPELL_PRIEST_BODY_AND_SOUL_SPEED, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), eventInfo.GetProcTarget(), true, NULL, aurEff);
+ }
+
+ void HandleEffectDispelProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
+ {
+ PreventDefaultAction();
+ if (eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_PRIEST_CURE_DISEASE || eventInfo.GetProcTarget() != GetTarget())
+ return;
+
+ if (roll_chance_i(aurEff->GetAmount()))
+ GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_BODY_AND_SOUL_DISPEL, true, NULL, aurEff);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectProc += AuraEffectProcFn(spell_pri_body_and_soul_AuraScript::HandleEffectSpeedProc, EFFECT_0, SPELL_AURA_DUMMY);
+ OnEffectProc += AuraEffectProcFn(spell_pri_body_and_soul_AuraScript::HandleEffectDispelProc, EFFECT_1, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_pri_body_and_soul_AuraScript();
+ }
+};
+
// 527 - Dispel magic
class spell_pri_dispel_magic : public SpellScriptLoader
{
@@ -1028,6 +1080,7 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
void AddSC_priest_spell_scripts()
{
+ new spell_pri_body_and_soul();
new spell_pri_dispel_magic();
new spell_pri_divine_aegis();
new spell_pri_glyph_of_prayer_of_healing();