Jump to content

[One] Mana Feed (for Drain Mana)


Le Froid

Recommended Posts

Unfortunately I'm not experienced with the spell system so I could not create a fix for this bug. But anyhoo here's the report:

Mangos Version: 0.12.1 (rev 1514)

Custom Patches: None, or if any it wouldn't affect the spell system in any way.

SD2 Version: s2438

Database Name and Version : TBC-DB 1.2.1 'Winter Veil Fun' for MaNGOS One s1434

How it SHOULD work: When you use this Demonology spec your pet should get a certain percentage of the mana you are draining from a NPC. It is something like 33%, 66%, and probably 99 or 100% (I cannot be certain about the last number)

How it DOES work: The pet receives none of your mana even after using a talent point on this spec. This can be a pretty big hindrance to warlocks (like myself) as their pets will constantly be low on mana.

Link to comment
Share on other sites

The disadvantage on using them is that they are not implented in the correct ways, which means you do not learn anything on doing it. They might also take more resources. But in spells that should be no problem, since they are not called that often. They also look bad and might be harder for you to edit later. Else then that it is probably nothing. A real dev could probably answer this question better!

Link to comment
Share on other sites

Well like you said lillecarl it seems to be fixed in R2. I went through both the MaNGOS One code and R2's and it looks like One does have a (broken) implementation. But if anyone else is looking for the working (perhaps hacky?) code this is what R2 has in their SpellEffects.cpp:

// Mana Feed

int32 manaFeedVal = 0;

Unit::AuraList const& mod = m_caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);

for(Unit::AuraList::const_iterator itr = mod.begin(); itr != mod.end(); ++itr)

{

if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (*itr)->GetSpellProto()->SpellIconID == 1982)

manaFeedVal+= (*itr)->GetModifier()->m_amount;

}

if (manaFeedVal > 0)

{

manaFeedVal = manaFeedVal * mana / 100;

m_caster->CastCustomSpell(m_caster, 32553, &manaFeedVal, NULL, NULL, true, NULL);

}

This replaces what mangos has under "// Mana Feed" in their SpellEffects.cpp

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