aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/2521_world.sql5
-rw-r--r--sql/updates/2559_world.sql9
-rw-r--r--src/game/SpellEffects.cpp11
-rw-r--r--src/game/Unit.cpp21
4 files changed, 35 insertions, 11 deletions
diff --git a/sql/updates/2521_world.sql b/sql/updates/2521_world.sql
deleted file mode 100644
index 310996b88a4..00000000000
--- a/sql/updates/2521_world.sql
+++ /dev/null
@@ -1,5 +0,0 @@
--- Sudden Death
-DELETE FROM `spell_proc_event` WHERE `entry` IN (29723, 29725, 29724);
-INSERT INTO `spell_proc_event` VALUES (29723, 0x00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0.000000, 0.000000, 0);
-INSERT INTO `spell_proc_event` VALUES (29725, 0x00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0.000000, 0.000000, 0);
-INSERT INTO `spell_proc_event` VALUES (29724, 0x00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0.000000, 0.000000, 0); \ No newline at end of file
diff --git a/sql/updates/2559_world.sql b/sql/updates/2559_world.sql
new file mode 100644
index 00000000000..50ebcb09e96
--- /dev/null
+++ b/sql/updates/2559_world.sql
@@ -0,0 +1,9 @@
+DELETE FROM `spell_proc_event` WHERE `entry` IN (44544);
+-- Fingers of frost triggered spell
+INSERT INTO `spell_proc_event` VALUES (44544, 0x00, 0x00000003, 0x00000000, 0x00100000, 0x00000000, 0x00010000, 0x00000000, 0.000000, 0.000000, 0);
+
+-- Sudden Death
+DELETE FROM `spell_proc_event` WHERE `entry` IN (29723, 29725, 29724);
+INSERT INTO `spell_proc_event` VALUES (29723, 0x00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
+INSERT INTO `spell_proc_event` VALUES (29725, 0x00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
+INSERT INTO `spell_proc_event` VALUES (29724, 0x00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0); \ No newline at end of file
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index ffab7bdc83a..83d52aa31cc 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1361,7 +1361,16 @@ void Spell::EffectDummy(uint32 i)
spell_id = 20647;
bp = damage+int32(rage * m_spellInfo->DmgMultiplier[i] +
m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
- m_caster->SetPower(POWER_RAGE,0);
+ // Sudden death cost modifier
+ if (Aura * aur = m_caster->GetAura(52437))
+ {
+ m_caster->ModifyPower(POWER_RAGE,- m_powerCost);
+ if (m_caster->GetPower(POWER_RAGE)<100)
+ m_caster->SetPower(POWER_RAGE,100);
+ m_caster->RemoveAura(aur);
+ }
+ else
+ m_caster->SetPower(POWER_RAGE,0);
break;
}
// Slam
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 270f4c1a505..d9f4ca101fa 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6607,7 +6607,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
Item* castItem = triggeredByAura->GetParentAura()->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetParentAura()->GetCastItemGUID()) : NULL;
- // Try handle uncnown trigger spells
+ // Try handle unknown trigger spells
if (sSpellStore.LookupEntry(trigger_spell_id)==NULL)
{
switch (auraSpellInfo->SpellFamilyName)
@@ -8682,18 +8682,28 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
if (pVictim->GetTypeId() == TYPEID_PLAYER)
crit_chance -= ((Player*)pVictim)->GetRatingBonusValue(CR_CRIT_TAKEN_SPELL);
}
-
// scripted (increase crit chance ... against ... target by x%
AuraEffectList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for(AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
{
if (!((*i)->isAffectedOnSpell(spellProto)))
continue;
+ int32 modChance=0;
switch((*i)->GetMiscValue())
{
- case 849: if (pVictim->HasAuraState(AURA_STATE_FROZEN, spellProto, this)) crit_chance+= 17.0f; break; //Shatter Rank 1
- case 910: if (pVictim->HasAuraState(AURA_STATE_FROZEN, spellProto, this)) crit_chance+= 34.0f; break; //Shatter Rank 2
- case 911: if (pVictim->HasAuraState(AURA_STATE_FROZEN, spellProto, this)) crit_chance+= 50.0f; break; //Shatter Rank 3
+ // Shatter
+ case 911: modChance+= 16.0f;
+ case 910: modChance+= 17.0f;
+ case 849: modChance+= 17.0f;
+ if (!pVictim->HasAuraState(AURA_STATE_FROZEN, spellProto, this))
+ break;
+ crit_chance+=modChance;
+ // Fingers of Frost
+ // TODO: Change this code to less hacky
+ if (Aura * aur = GetAura(44544))
+ if (aur->DropAuraCharge())
+ RemoveAura(aur);
+ break;
case 7917: // Glyph of Shadowburn
if (pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this))
crit_chance+=(*i)->GetAmount();
@@ -11338,6 +11348,7 @@ bool InitTriggerAuraData()
isTriggerAura[SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE] = true;
isTriggerAura[SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE] = true;
isTriggerAura[SPELL_AURA_MOD_DAMAGE_FROM_CASTER] = true;
+ isTriggerAura[SPELL_AURA_ABILITY_IGNORE_AURASTATE] = true;
isNonTriggerAura[SPELL_AURA_MOD_POWER_REGEN]=true;
isNonTriggerAura[SPELL_AURA_REDUCE_PUSHBACK]=true;