mangosArchives / Mangos-One-server-old

This repo has been moved to https://githubs.com/mangosone/server
http://getmangos.eu/
GNU General Public License v2.0
95 stars 54 forks source link

[Spell][Mage] Arcane Power #46

Closed NoReturn closed 11 years ago

NoReturn commented 12 years ago

Mage's spell Arcane Power is incorrectly handled as a debuff, means the player gets the benefit from it but the icon is shown in the debuff section of the GUI and also makes the buff immune to enemy dispells/spell steals/etc.

Hacky fix:

diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index c2abfd6..86107c4 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -846,6 +846,8 @@ bool IsPositiveEffect(SpellEntry const *spellproto, SpellEffectIndex effIndex)
                     switch(spellproto->EffectMiscValue[effIndex])
                     {
                         case SPELLMOD_COST:                 // dependent from bas point sign (negative -> positive)
+                            if(spellproto->Id == 12042)     // Arcane Power
+                                break;
                             if(spellproto->CalculateSimpleValue(effIndex) > 0)
                                 return false;
                             break;

Tho I'm sure this needs to be handled in a different way/place since a couple of other spells suffer from wrong handling. Waiting for suggestions.