From 10865b633f65b9c4e374918c856decbc2f34c8be Mon Sep 17 00:00:00 2001 From: zergtmn Date: Fri, 17 Jun 2011 16:14:38 +0600 Subject: [PATCH] [11631] Fix wrong overriding aura stack amount and proc charges at loading Need to consider spell mods, partial dispels and etc... --- src/game/Pet.cpp | 14 ++------------ src/game/Player.cpp | 13 ++----------- src/shared/revision_nr.h | 2 +- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 3cbc49623..24fae25fe 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -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); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e81f1a0e2..6dcda0353 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -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); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c0d99ce6b..4a0704ebd 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11630" + #define REVISION_NR "11631" #endif // __REVISION_NR_H__