Core/Spells: Cleaned up Shaman 4P Enhancement and Paladin 2P Retribution set bonus code

SQL: Added missing sql for that revision, thx cyberbrest

Closes #12
This commit is contained in:
Shauren
2011-01-02 16:27:38 +01:00
parent a7dadcb51c
commit eec299e605
4 changed files with 9 additions and 10 deletions
+1
View File
@@ -26756,6 +26756,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 72752, 'spell_pvp_trinket_wotf_shared_cd'), ( 72752, 'spell_pvp_trinket_wotf_shared_cd'),
( 72757, 'spell_pvp_trinket_wotf_shared_cd'), ( 72757, 'spell_pvp_trinket_wotf_shared_cd'),
( 46221, 'spell_gen_animal_blood'), ( 46221, 'spell_gen_animal_blood'),
( 70769, 'spell_gen_divine_storm_cd_reset'),
-- instances -- instances
-- Black Temple -- Black Temple
( 41475, 'spell_boss_lady_malande_shield'), ( 41475, 'spell_boss_lady_malande_shield'),
@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=70769 AND `ScriptName`='spell_gen_divine_storm_cd_reset';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(70769, 'spell_gen_divine_storm_cd_reset');
+2 -4
View File
@@ -8544,12 +8544,10 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
case 53817: case 53817:
{ {
// Item - Shaman T10 Enhancement 4P Bonus // Item - Shaman T10 Enhancement 4P Bonus
if (AuraEffect * aurEff = ToPlayer()->GetAuraEffect(70832, 0)) if (AuraEffect const* aurEff = GetAuraEffect(70832, 0))
{ if (Aura const* maelstrom = GetAura(53817))
if (Aura *maelstrom = GetAura(53817))
if ((maelstrom->GetStackAmount() == maelstrom->GetSpellProto()->StackAmount) && roll_chance_i(aurEff->GetAmount())) if ((maelstrom->GetStackAmount() == maelstrom->GetSpellProto()->StackAmount) && roll_chance_i(aurEff->GetAmount()))
CastSpell(this, 70831, true, castItem, triggeredByAura); CastSpell(this, 70831, true, castItem, triggeredByAura);
}
// have rank dependent proc chance, ignore too often cases // have rank dependent proc chance, ignore too often cases
// PPM = 2.5 * (rank of talent), // PPM = 2.5 * (rank of talent),
+3 -6
View File
@@ -618,12 +618,9 @@ public:
void HandleScript(SpellEffIndex /*effIndex*/) void HandleScript(SpellEffIndex /*effIndex*/)
{ {
Player *caster = GetCaster()->ToPlayer(); if (Player *caster = GetCaster()->ToPlayer())
if (caster->GetTypeId() != TYPEID_PLAYER) if (caster->HasSpellCooldown(SPELL_DIVINE_STORM))
return; caster->RemoveSpellCooldown(SPELL_DIVINE_STORM, true);
if (caster->HasSpellCooldown(SPELL_DIVINE_STORM))
caster->RemoveSpellCooldown(SPELL_DIVINE_STORM, true);
} }
void Register() void Register()