Created
February 17, 2012 19:26
-
-
Save neo-mat/1855013 to your computer and use it in GitHub Desktop.
BladedArmor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/scripts/src/SpellHandlers/DeathKnightSpells.cpp b/src/scripts/src/SpellHandlers/DeathKnightSpells.cpp | |
index eb692bf..0206b51 100644 | |
--- a/src/scripts/src/SpellHandlers/DeathKnightSpells.cpp | |
+++ b/src/scripts/src/SpellHandlers/DeathKnightSpells.cpp | |
@@ -273,25 +273,20 @@ bool DeathCoil(uint32 i, Spell* s) | |
return true; | |
} | |
-bool BladedArmor(uint32 i, Aura* pAura, bool apply) | |
+bool BladedArmor(uint32 i, Spell* s) | |
{ | |
- Unit* m_target = pAura->GetTarget(); | |
- | |
- int32 realamount = 0; | |
- | |
- uint32 mod1 = m_target->GetResistance(SCHOOL_NORMAL); | |
- uint32 mod2 = pAura->m_spellProto->EffectBasePoints[0] + 1; //Thanks Andy for pointing out that BasePoints | |
- uint32 mod3 = pAura->m_spellProto->EffectBasePoints[1] + 1; //Should always be used instead of static modifiers. | |
- realamount = (pAura->GetModAmount(i) + (mod1 / mod3) * mod2); | |
- | |
- if(apply) | |
- m_target->ModAttackPowerMods(realamount); | |
- else | |
- m_target->ModAttackPowerMods(-realamount); | |
- | |
- m_target->CalcDamage(); | |
- | |
- return true; | |
+ /******************************************************************************************************** | |
+ /* SPELL_EFFECT_DUMMY is used in this spell, in DBC, only to store data for in-game tooltip output. | |
+ /* Description: Increases your attack power by $s2 for every ${$m1*$m2} armor value you have. | |
+ /* Where $s2 is base points of Effect 0 and $m1*$m2 I guess it's a mod. | |
+ /* So for example spell id 49393: Increases your attack power by 5 for every 180 armor value you have. | |
+ /* Effect 0: Base Points/mod->m_amount = 36; Effect 1: Base Points = 5; | |
+ /* $s2 = 5 and ${$m1*$m2} = 36*5 = 180. | |
+ /* Calculations are already done by Blizzard and set into BasePoints field, | |
+ /* and passed to SpellAuraModAttackPowerOfArmor, so there is no need to do handle this here. | |
+ /* Either way Blizzard has some weird Chinese developers or they are smoking some really good stuff. | |
+ ********************************************************************************************************/ | |
+ return false; | |
} | |
bool DeathAndDecay(uint32 i, Aura* pAura, bool apply) | |
@@ -433,7 +428,7 @@ void SetupDeathKnightSpells(ScriptMgr* mgr) | |
49393, | |
0 | |
}; | |
- mgr->register_dummy_aura(bladedarmorids, &BladedArmor); | |
+ mgr->register_dummy_spell(bladedarmorids, &BladedArmor); | |
mgr->register_dummy_aura(43265, &DeathAndDecay); | |
mgr->register_dummy_aura(49936, &DeathAndDecay); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment