aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.dev@gmail.com>2011-01-02 16:27:38 +0100
committerShauren <shauren.dev@gmail.com>2011-01-02 16:27:38 +0100
commiteec299e6051af807836809c3b90d788425d29844 (patch)
tree67b0737ac12e867e7b060cc6f4485127a0ee2230
parenta7dadcb51c6ddb727529d2580f6475f3413827b4 (diff)
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
-rw-r--r--sql/base/world_database.sql1
-rw-r--r--sql/updates/10925_world_spell_script_names.sql3
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp6
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp9
4 files changed, 9 insertions, 10 deletions
diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql
index cecff45b361..98c75052c89 100644
--- a/sql/base/world_database.sql
+++ b/sql/base/world_database.sql
@@ -26756,6 +26756,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 72752, 'spell_pvp_trinket_wotf_shared_cd'),
( 72757, 'spell_pvp_trinket_wotf_shared_cd'),
( 46221, 'spell_gen_animal_blood'),
+( 70769, 'spell_gen_divine_storm_cd_reset'),
-- instances
-- Black Temple
( 41475, 'spell_boss_lady_malande_shield'),
diff --git a/sql/updates/10925_world_spell_script_names.sql b/sql/updates/10925_world_spell_script_names.sql
new file mode 100644
index 00000000000..78f134d4b98
--- /dev/null
+++ b/sql/updates/10925_world_spell_script_names.sql
@@ -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');
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f6e2e6f83ea..58c21183982 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -8544,12 +8544,10 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
case 53817:
{
// Item - Shaman T10 Enhancement 4P Bonus
- if (AuraEffect * aurEff = ToPlayer()->GetAuraEffect(70832, 0))
- {
- if (Aura *maelstrom = GetAura(53817))
+ if (AuraEffect const* aurEff = GetAuraEffect(70832, 0))
+ if (Aura const* maelstrom = GetAura(53817))
if ((maelstrom->GetStackAmount() == maelstrom->GetSpellProto()->StackAmount) && roll_chance_i(aurEff->GetAmount()))
CastSpell(this, 70831, true, castItem, triggeredByAura);
- }
// have rank dependent proc chance, ignore too often cases
// PPM = 2.5 * (rank of talent),
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index c9b8f75b5fb..a7510b97ff3 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -618,12 +618,9 @@ public:
void HandleScript(SpellEffIndex /*effIndex*/)
{
- Player *caster = GetCaster()->ToPlayer();
- if (caster->GetTypeId() != TYPEID_PLAYER)
- return;
-
- if (caster->HasSpellCooldown(SPELL_DIVINE_STORM))
- caster->RemoveSpellCooldown(SPELL_DIVINE_STORM, true);
+ if (Player *caster = GetCaster()->ToPlayer())
+ if (caster->HasSpellCooldown(SPELL_DIVINE_STORM))
+ caster->RemoveSpellCooldown(SPELL_DIVINE_STORM, true);
}
void Register()