Jump to content

Recommended Posts

Posted

Can anyone tell me if it is possible to change the way the User interface calculates the mana cost of spells and abilities. I changed the actual way spell costs are calculated in Spell.cpp, but when i login the cost of the spells is miss calculated when viewing the spell info.

Posted

Ok perhaps this will help in the Spell.cpp file I edited the int32 Spell::CalculatePowerCost() function. Specifically the powerType switch. Below is the current code. Now when i edit the POWER_MANA case to something like say

case POWER_MANA:

powerCost +=( m_spellInfo->ManaCostPercentage * m_caster->GetCreateMana() / 100) /2;

break;

The actuall amount of mana spent when the spell is cast is reduced in half, but when mousing over the spell in the game the mana cost has not change and when you have less mana then what is stated when you mouse over the spell you can not cast the spell. Can anyone help me out with this please?

switch (m_spellInfo->powerType)

{

// health as power used

case POWER_HEALTH:

powerCost += m_spellInfo->ManaCostPercentage * m_caster->GetCreateHealth() / 100;

break;

case POWER_MANA:

powerCost += m_spellInfo->ManaCostPercentage * m_caster->GetCreateMana() / 100;

break;

×
×
  • 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