diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 4 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.h | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 5 | ||||
-rw-r--r-- | src/game/Unit.h | 1 |
5 files changed, 8 insertions, 6 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index a56403cc97f..9227cb7414c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -15849,7 +15849,7 @@ void Player::_SaveAuras() if (spellInfo->Effect[i] == SPELL_AURA_MOD_SHAPESHIFT || spellInfo->Effect[i] == SPELL_AURA_MOD_STEALTH ) continue; - uint32 amounts[MAX_SPELL_EFFECTS]; + int32 amounts[MAX_SPELL_EFFECTS]; for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i) { if (AuraEffect * partAura = itr->second->GetPartAura(i)) @@ -15861,7 +15861,7 @@ void Player::_SaveAuras() CharacterDatabase.PExecute("INSERT INTO character_aura (guid,caster_guid,spell,effect_mask,stackcount,amount0, amount1, amount2,maxduration,remaintime,remaincharges) " "VALUES ('%u', '" I64FMTD "', '%u', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%d')", GetGUIDLow(), itr->second->GetCasterGUID(),(uint32)itr->second->GetId(), (uint32)itr->second->GetEffectMask(), - (uint32)itr->second->GetStackAmount(), amounts[0], amounts[1], amounts[2] + (uint32)itr->second->GetStackAmount(), (int32)amounts[0], (int32)amounts[1], (int32)amounts[2] ,int(itr->second->GetAuraMaxDuration()),int(itr->second->GetAuraDuration()),int(itr->second->GetAuraCharges())); } } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 97f48ee298a..036209c86f7 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -344,7 +344,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= Aura::Aura(SpellEntry const* spellproto, uint32 effMask, int32 *currentBasePoints, Unit *target, Unit *caster, Item* castItem) : m_caster_guid(0), m_castItemGuid(castItem?castItem->GetGUID():0), m_target(target), -m_timeCla(1000), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE), +m_timeCla(1000), m_removeMode(AURA_NO_REMOVE_MODE), m_AuraDRGroup(DIMINISHING_NONE), m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),m_auraStateMask(0), m_updated(false), m_duringUpdate(false) { assert(target); diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 39d537bbd5b..ef2a92c6a9b 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -92,7 +92,7 @@ class TRINITY_DLL_SPEC Aura void SetNegative() { m_positive = false; } void SetPositive() { m_positive = true; } bool IsPermanent() const { return m_permanent; } - void RemoveAura() { m_permanent = false; m_duration=0; } + void RemoveAura() { m_permanent = false; m_duration=0; m_removeMode = AURA_REMOVE_BY_DEFAULT; } bool IsPassive() const { return m_isPassive; } bool IsDeathPersistent() const { return m_isDeathPersist; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 7f0e2636d7a..c9f7adc6a81 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4104,8 +4104,9 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) m_ccAuras.remove(Aur); } - // Set remove mode - Aur->SetRemoveMode(mode); + // Set remove mode if mode already not set + if (!Aur->GetRemoveMode()) + Aur->SetRemoveMode(mode); // Statue unsummoned at aura remove Totem* statue = NULL; diff --git a/src/game/Unit.h b/src/game/Unit.h index b218bf54afe..79ed215110d 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -328,6 +328,7 @@ enum DamageTypeToSchool enum AuraRemoveMode { + AURA_NO_REMOVE_MODE = 0, AURA_REMOVE_BY_DEFAULT, AURA_REMOVE_BY_STACK, // change stack, single aura remove, AURA_REMOVE_BY_CANCEL, |