Core/Auras:

* Fixed loading aura charges when they would exceed count set in SpellEntry while still remaining a valid value due to spell modifiers (that might not yet be active)
* Fixed refreshing aura charges when recasting the spell

Closes #1803
Closes #1786
Closes #1805
This commit is contained in:
Shauren
2011-06-03 21:30:50 +02:00
parent 87ce4988f4
commit 97a5db68c2
6 changed files with 33 additions and 25 deletions
+5 -2
View File
@@ -17130,19 +17130,22 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
// prevent wrong values of remaincharges
if (spellproto->procCharges)
{
if (remaincharges <= 0 || remaincharges > spellproto->procCharges)
// we have no control over the order of applying auras and modifiers allow auras
// to have more charges than value in SpellEntry
if (remaincharges <= 0/* || remaincharges > spellproto->procCharges*/)
remaincharges = spellproto->procCharges;
}
else
remaincharges = 0;
if (Aura * aura = Aura::TryCreate(spellproto, effmask, this, NULL, &baseDamage[0], NULL, caster_guid))
if (Aura* aura = Aura::TryCreate(spellproto, effmask, this, NULL, &baseDamage[0], NULL, caster_guid))
{
if (!aura->CanBeSaved())
{
aura->Remove();
continue;
}
aura->SetLoadedState(maxduration, remaintime, remaincharges, stackcount, recalculatemask, &damage[0]);
aura->ApplyForTargets();
sLog->outDetail("Added aura spellid %u, effectmask %u", spellproto->Id, effmask);