diff options
| author | QAston <none@none> | 2009-04-14 19:09:08 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2009-04-14 19:09:08 +0200 |
| commit | 6c44316d8e7d94bb28beafe32c649d46cf9240f4 (patch) | |
| tree | b0242b7793698e20c90ff3ef9346dfd6072e3525 /src/game/SpellMgr.cpp | |
| parent | ecbaf6483d453e0d80ab0b24f27232fbda1a3c4c (diff) | |
*Correct positivity of some spells
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellMgr.cpp')
| -rw-r--r-- | src/game/SpellMgr.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index c5c70b0d92f..af8a04740f8 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -676,7 +676,23 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) { case SPELLMOD_COST: // dependent from bas point sign (negative -> positive) if(spellproto->CalculateSimpleValue(effIndex) > 0) - return false; + { + if (!deep) + { + bool negative = true; + for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i) + { + if (i != effIndex) + if (IsPositiveEffect(spellId, i, true)) + { + negative = false; + break; + } + } + if (negative) + return false; + } + } break; default: break; |
