aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-15 14:33:32 -0700
committermaximius <none@none>2009-10-15 14:33:32 -0700
commit4c21715367480d2593ecbcf2e384e9810c1c9b95 (patch)
tree83ebf8609d5146e2d3652e9e3ce1c309c900959d /src
parentcee8fcb7e86ff8b6cba03d28185aa3749527f6ff (diff)
*Fix spellmods (Lava Burst Cooldown etc, spellmods with 31st bit set bugging other spells), by thenecromancer
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index f0136a5e088..56d8fda813e 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -17516,22 +17516,22 @@ bool Player::IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mo
void Player::AddSpellMod(SpellModifier* mod, bool apply)
{
- uint16 Opcode= (mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER;
+ uint16 Opcode = (mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER;
- uint8 i=0;
- flag96 _mask;
- for(int eff=0;eff<96;++eff)
+ int i = 0;
+ flag96 _mask = 0;
+ for (int eff = 0; eff < 96; ++eff)
{
- if ((eff!=0) && (eff%32==0))
- i++;
+ if (eff != 0 && eff%32 == 0)
+ _mask[i++] = 0;
_mask[i] = uint32(1) << (eff-(32*i));
- if ( mod->mask & _mask)
+ if (mod->mask & _mask)
{
int32 val = 0;
for (SpellModList::iterator itr = m_spellMods[mod->op].begin(); itr != m_spellMods[mod->op].end(); ++itr)
{
- if ((*itr)->type == mod->type && (*itr)->mask & _mask )
+ if ((*itr)->type == mod->type && (*itr)->mask & _mask)
val += (*itr)->value;
}
val += apply ? mod->value : -(mod->value);