[11631] Fix wrong overriding aura stack amount and proc charges at loading

Need to consider spell mods, partial dispels and etc...
This commit is contained in:
zergtmn 2011-06-17 16:14:38 +06:00
parent 6945d86e67
commit 10865b633f
3 changed files with 5 additions and 24 deletions

View file

@ -16041,19 +16041,10 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
}
// prevent wrong values of remaincharges
if (spellproto->procCharges)
{
if (remaincharges <= 0 || remaincharges > spellproto->procCharges)
remaincharges = spellproto->procCharges;
}
else
if (spellproto->procCharges == 0)
remaincharges = 0;
if (!spellproto->StackAmount)
stackcount = 1;
else if (spellproto->StackAmount < stackcount)
stackcount = spellproto->StackAmount;
else if (!stackcount)
if (stackcount == 0)
stackcount = 1;
SpellAuraHolder *holder = CreateSpellAuraHolder(spellproto, this, NULL);