*Take charges for Finger of Frost and Sudden Death correctly.

*Clearcasting for Arcane Potency - From KAPATEJIb's cumulative patch package

--HG--
branch : trunk
This commit is contained in:
QAston
2009-04-09 23:15:56 +02:00
parent 102e37daca
commit e0e39f26b4
4 changed files with 35 additions and 11 deletions
-5
View File
@@ -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);
+9
View File
@@ -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);
+10 -1
View File
@@ -1361,7 +1361,16 @@ void Spell::EffectDummy(uint32 i)
spell_id = 20647; spell_id = 20647;
bp = damage+int32(rage * m_spellInfo->DmgMultiplier[i] + bp = damage+int32(rage * m_spellInfo->DmgMultiplier[i] +
m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f); 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; break;
} }
// Slam // Slam
+16 -5
View File
@@ -6607,7 +6607,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
Item* castItem = triggeredByAura->GetParentAura()->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER Item* castItem = triggeredByAura->GetParentAura()->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetParentAura()->GetCastItemGUID()) : NULL; ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetParentAura()->GetCastItemGUID()) : NULL;
// Try handle uncnown trigger spells // Try handle unknown trigger spells
if (sSpellStore.LookupEntry(trigger_spell_id)==NULL) if (sSpellStore.LookupEntry(trigger_spell_id)==NULL)
{ {
switch (auraSpellInfo->SpellFamilyName) switch (auraSpellInfo->SpellFamilyName)
@@ -8682,18 +8682,28 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
if (pVictim->GetTypeId() == TYPEID_PLAYER) if (pVictim->GetTypeId() == TYPEID_PLAYER)
crit_chance -= ((Player*)pVictim)->GetRatingBonusValue(CR_CRIT_TAKEN_SPELL); crit_chance -= ((Player*)pVictim)->GetRatingBonusValue(CR_CRIT_TAKEN_SPELL);
} }
// scripted (increase crit chance ... against ... target by x% // scripted (increase crit chance ... against ... target by x%
AuraEffectList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); AuraEffectList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for(AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i) for(AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
{ {
if (!((*i)->isAffectedOnSpell(spellProto))) if (!((*i)->isAffectedOnSpell(spellProto)))
continue; continue;
int32 modChance=0;
switch((*i)->GetMiscValue()) switch((*i)->GetMiscValue())
{ {
case 849: if (pVictim->HasAuraState(AURA_STATE_FROZEN, spellProto, this)) crit_chance+= 17.0f; break; //Shatter Rank 1 // Shatter
case 910: if (pVictim->HasAuraState(AURA_STATE_FROZEN, spellProto, this)) crit_chance+= 34.0f; break; //Shatter Rank 2 case 911: modChance+= 16.0f;
case 911: if (pVictim->HasAuraState(AURA_STATE_FROZEN, spellProto, this)) crit_chance+= 50.0f; break; //Shatter Rank 3 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 case 7917: // Glyph of Shadowburn
if (pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this)) if (pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this))
crit_chance+=(*i)->GetAmount(); crit_chance+=(*i)->GetAmount();
@@ -11338,6 +11348,7 @@ bool InitTriggerAuraData()
isTriggerAura[SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE] = true; isTriggerAura[SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE] = true;
isTriggerAura[SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE] = true; isTriggerAura[SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE] = true;
isTriggerAura[SPELL_AURA_MOD_DAMAGE_FROM_CASTER] = 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_MOD_POWER_REGEN]=true;
isNonTriggerAura[SPELL_AURA_REDUCE_PUSHBACK]=true; isNonTriggerAura[SPELL_AURA_REDUCE_PUSHBACK]=true;