mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-19 22:39:39 -04:00
*Set aura remove by expire only for expired auras
--HG-- branch : trunk
This commit is contained in:
+2
-2
@@ -15835,7 +15835,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))
|
||||
@@ -15847,7 +15847,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()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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; }
|
||||
|
||||
+3
-2
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user