Jump to content

First change in mangos


Guest ilija

Recommended Posts

Im really want to learn how te debug in mangos , i know already some C++.

This is my first change in the script manualy

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index e5014f4..542961d 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -403,9 +403,9 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
                    damage = uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
                    m_caster->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, false);
                }
-                // Revenge ${$m1+$AP*0.207} to ${$M1+$AP*0.207}
+                // Revenge ${$m1+$AP*0.310} to ${$M1+$AP*0.310}
                else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000000400))
-                    damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.207f);
+                    damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.310f);
                // Heroic Throw ${$m1+$AP*.50}
                else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000100000000))
                    damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f);

According WoWhead it should be 0.310 and not 0.207.

But i have some questions: why you write 0.310f and not just 0.310.

2nd according wowhead it also should add some normal damage like highest rank should have this formula : [1636 + AP * 0.310] to [1998 + AP * 0.310]

1636 - 1998 is already calculated in damage? and why you need to write "uint" before ?

Link to comment
Share on other sites

base damage should be already there, that why you use '+=' (add to current value)

the 0.310f makes explicit float constant (not double as default), is just to make Visual Studio happy (useless warning imho, doesnt exist in gcc)

uint32( ... ) is a explicit type cast (result of the operation inside is float)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use