[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

@ -1321,20 +1321,10 @@ void Pet::_LoadAuras(uint32 timediff)
}
// prevent wrong values of remaincharges
uint32 procCharges = spellproto->procCharges;
if (procCharges)
{
if (remaincharges <= 0 || remaincharges > procCharges)
remaincharges = 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);

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);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11630"
#define REVISION_NR "11631"
#endif // __REVISION_NR_H__