aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_07_21_03_world_spell_script_misc_434.sql13
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp10
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp41
3 files changed, 51 insertions, 13 deletions
diff --git a/sql/updates/world/2013_07_21_03_world_spell_script_misc_434.sql b/sql/updates/world/2013_07_21_03_world_spell_script_misc_434.sql
new file mode 100644
index 00000000000..2b4933fd433
--- /dev/null
+++ b/sql/updates/world/2013_07_21_03_world_spell_script_misc_434.sql
@@ -0,0 +1,13 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=-47569;
+INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
+(-47569,'spell_pri_phantasm');
+
+DELETE FROM `spell_ranks` WHERE `first_spell_id`=47569;
+INSERT INTO `spell_ranks` (`first_spell_id`, `spell_id`, `rank`) VALUES
+(47569, 47569, 1),
+(47569, 47570, 2);
+
+DELETE FROM `spell_proc_event` WHERE `entry` IN (47569,47570);
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+(47569, 0, 6, 16384, 0, 0, 16384, 0, 0, 100, 0),
+(47570, 0, 6, 16384, 0, 0, 16384, 0, 0, 100, 0);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index ce799ab158f..96e41155764 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5582,16 +5582,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
target = this;
break;
}
- // Phantasm
- case 47569:
- case 47570:
- {
- if (!roll_chance_i(triggerAmount))
- return false;
-
- RemoveMovementImpairingAuras();
- break;
- }
// Oracle Healing Bonus ("Garments of the Oracle" set)
case 26169:
{
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index c83643af29e..af97959f692 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -55,7 +55,7 @@ enum PriestSpells
SPELL_PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH = 107904,
SPELL_PRIEST_SHADOW_WORD_DEATH = 32409,
SPELL_PRIEST_T9_HEALING_2P = 67201,
- SPELL_PRIEST_VAMPRIC_EMBRACE = 15290,
+ SPELL_PRIEST_VAMPRIC_EMBRACE_HEAL = 15290,
SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL = 64085,
};
@@ -584,6 +584,40 @@ class spell_pri_penance : public SpellScriptLoader
}
};
+// -47569 - Phantasm
+class spell_pri_phantasm : public SpellScriptLoader
+{
+ public:
+ spell_pri_phantasm() : SpellScriptLoader("spell_pri_phantasm") { }
+
+ class spell_pri_phantasm_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_pri_phantasm_AuraScript);
+
+ bool CheckProc(ProcEventInfo& /*eventInfo*/)
+ {
+ return roll_chance_i(GetEffect(EFFECT_0)->GetAmount());
+ }
+
+ void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
+ {
+ PreventDefaultAction();
+ GetTarget()->RemoveMovementImpairingAuras();
+ }
+
+ void Register() OVERRIDE
+ {
+ DoCheckProc += AuraCheckProcFn(spell_pri_phantasm_AuraScript::CheckProc);
+ OnEffectProc += AuraEffectProcFn(spell_pri_phantasm_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_pri_phantasm_AuraScript();
+ }
+};
+
// -17 - Power Word: Shield
class spell_pri_power_word_shield : public SpellScriptLoader
{
@@ -873,7 +907,7 @@ class spell_pri_vampiric_embrace : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
- if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPRIC_EMBRACE))
+ if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPRIC_EMBRACE_HEAL))
return false;
return true;
}
@@ -890,7 +924,7 @@ class spell_pri_vampiric_embrace : public SpellScriptLoader
int32 self = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
int32 team = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount() / 2));
- GetTarget()->CastCustomSpell((Unit*)NULL, SPELL_PRIEST_VAMPRIC_EMBRACE, &team, &self, NULL, true, NULL, aurEff);
+ GetTarget()->CastCustomSpell((Unit*)NULL, SPELL_PRIEST_VAMPRIC_EMBRACE_HEAL, &team, &self, NULL, true, NULL, aurEff);
}
void Register() OVERRIDE
@@ -988,6 +1022,7 @@ void AddSC_priest_spell_scripts()
new spell_pri_mind_sear();
new spell_pri_pain_and_suffering_proc();
new spell_pri_penance();
+ new spell_pri_phantasm();
new spell_pri_power_word_shield();
new spell_pri_prayer_of_mending_heal();
new spell_pri_reflective_shield_trigger();