Warlocks, more broken...
This is the last post to the topic. The full topic can be found here:
QuoteOkay so lets try to figure out how the system calculates "pdamage"
Inside of SpellAuras.cpp, there's "void Aura::PeriodicTick(){}" @ line 4487(is this a function btw ?).
Within lies a big switch sentence, with the following head: "switch (m_modifier.m_auraname)".
In "case SPELL_AURA_PERIODIC_DAMAGE_PERCENT: ", we can amongst many "if"-s fall into the code snippet
I've posted in my previous reply. Now help me understand how pdamage comes to play. At the very beginning of
"case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:" we can quickly locate this interesting lines of code:
I have no idea what so ever what m_modifier is nor whence it came from. All I know that m_modifier.m_amount
is an int32 type variable, since here(SpellAuras.cpp starting @ line 759)
an object of SpellModifier type is created?(I don't know what structs are,and SpellModifier appears to be just that. Since it has something that looks like a series of overloading constructors one of them being:
and thus resembles a structure of a regular class, I have concluded that "m_modifier.m_amount" is a 32 bit integer).
So 1. - it would be nice to have somebody explaining how to modify "pdamage", since it is clearly calculated incorrectly.
2. - pdamage for Curse of Agony should represent 1/12 of the total damage done by this DoT. And it does with reference to my previous replies.
But since I have no idea how Mangos gets the pdamage value that piece of information is I think crucial in order to fix this spell. It is also quite clear that IF(and that is a big if at this time) mangos treats pdamage as 1 / 12 of total CoA DoT damage, it doesn't apply bonus damage from Improved Curse of Agony to total Curse of Agony damage, the way we think it should.
I've once again written a whole book and solved absolutely nothing... Aw well.
uint32 amount = m_modifier.m_amount > 0 ? m_modifier.m_amount : 0; uint32 pdamage; if (m_modifier.m_auraname == SPELL_AURA_PERIODIC_DAMAGE) pdamage = amount; else pdamage = uint32(target->GetMaxHealth() * amount / 100);m_spellmod = new SpellModifier( SpellModOp(m_modifier.m_miscvalue), SpellModType(m_modifier.m_auraname), // SpellModType value == spell aura types m_modifier.m_amount, this, // prevent expire spell mods with (charges > 0 && m_stackAmount > 1) // all this spell expected expire not at use but at spell proc event check GetSpellProto()->StackAmount > 1 ? 0 : GetHolder()->GetAuraCharges());SpellModifier(SpellModOp _op, SpellModType _type, int32 _value, Aura const* aura, int16 _charges = 0);
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now