mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[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:
parent
96183f8e3f
commit
0751a35342
3 changed files with 18 additions and 9 deletions
|
|
@ -15957,23 +15957,27 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
|
|||
uint32 effIndexMask = (int32)fields[14].GetUInt32();
|
||||
|
||||
SpellEntry const* spellproto = sSpellStore.LookupEntry(spellid);
|
||||
if(!spellproto)
|
||||
if (!spellproto)
|
||||
{
|
||||
sLog.outError("Unknown spell (spellid %u), ignore.",spellid);
|
||||
continue;
|
||||
}
|
||||
|
||||
// prevent wrong values of remaincharges
|
||||
if(spellproto->procCharges)
|
||||
if (spellproto->procCharges)
|
||||
{
|
||||
if(remaincharges <= 0 || remaincharges > (int32)spellproto->procCharges)
|
||||
if (remaincharges <= 0 || remaincharges > (int32)spellproto->procCharges)
|
||||
remaincharges = spellproto->procCharges;
|
||||
}
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue