[11278] Fixed auras stack size check at loading.

For non stacking auras preserve stack size 1 as auras created instead reset it to 0 at mnext load.
For client no difference in show and most non stacking auras not dependent from stack size value
at server side code, but any way set stack size to 0 can generate unexpected wrong caluclation results
in spell code.
This commit is contained in:
VladimirMangos 2011-03-23 05:33:15 +03:00
parent 96183f8e3f
commit 0751a35342
3 changed files with 18 additions and 9 deletions

View file

@ -1240,8 +1240,13 @@ void Pet::_LoadAuras(uint32 timediff)
else
remaincharges = 0;
if (spellproto->StackAmount < stackcount)
if (!spellproto->StackAmount)
stackcount = 1;
else if (spellproto->StackAmount < stackcount)
stackcount = spellproto->StackAmount;
else if (!stackcount)
stackcount = 1;
SpellAuraHolder *holder = CreateSpellAuraHolder(spellproto, this, NULL);
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)

View file

@ -15972,8 +15972,12 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
else
remaincharges = 0;
if (spellproto->StackAmount < stackcount)
if (!spellproto->StackAmount)
stackcount = 1;
else if (spellproto->StackAmount < stackcount)
stackcount = spellproto->StackAmount;
else if (!stackcount)
stackcount = 1;
SpellAuraHolder *holder = CreateSpellAuraHolder(spellproto, this, NULL);
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11277"
#define REVISION_NR "11278"
#endif // __REVISION_NR_H__