--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-05 17:11:43 -05:00
5 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -15849,7 +15849,7 @@ void Player::_SaveAuras()
if (spellInfo->Effect[i] == SPELL_AURA_MOD_SHAPESHIFT || if (spellInfo->Effect[i] == SPELL_AURA_MOD_SHAPESHIFT ||
spellInfo->Effect[i] == SPELL_AURA_MOD_STEALTH ) spellInfo->Effect[i] == SPELL_AURA_MOD_STEALTH )
continue; continue;
uint32 amounts[MAX_SPELL_EFFECTS]; int32 amounts[MAX_SPELL_EFFECTS];
for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i) for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
{ {
if (AuraEffect * partAura = itr->second->GetPartAura(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) " 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')", "VALUES ('%u', '" I64FMTD "', '%u', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
GetGUIDLow(), itr->second->GetCasterGUID(),(uint32)itr->second->GetId(), (uint32)itr->second->GetEffectMask(), 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())); ,int(itr->second->GetAuraMaxDuration()),int(itr->second->GetAuraDuration()),int(itr->second->GetAuraCharges()));
} }
} }
+1 -1
View File
@@ -344,7 +344,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
Aura::Aura(SpellEntry const* spellproto, uint32 effMask, int32 *currentBasePoints, Unit *target, Unit *caster, Item* castItem) : 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_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) m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),m_auraStateMask(0), m_updated(false), m_duringUpdate(false)
{ {
assert(target); assert(target);
+1 -1
View File
@@ -92,7 +92,7 @@ class TRINITY_DLL_SPEC Aura
void SetNegative() { m_positive = false; } void SetNegative() { m_positive = false; }
void SetPositive() { m_positive = true; } void SetPositive() { m_positive = true; }
bool IsPermanent() const { return m_permanent; } 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 IsPassive() const { return m_isPassive; }
bool IsDeathPersistent() const { return m_isDeathPersist; } bool IsDeathPersistent() const { return m_isDeathPersist; }
+3 -2
View File
@@ -4104,8 +4104,9 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
m_ccAuras.remove(Aur); m_ccAuras.remove(Aur);
} }
// Set remove mode // Set remove mode if mode already not set
Aur->SetRemoveMode(mode); if (!Aur->GetRemoveMode())
Aur->SetRemoveMode(mode);
// Statue unsummoned at aura remove // Statue unsummoned at aura remove
Totem* statue = NULL; Totem* statue = NULL;
+1
View File
@@ -328,6 +328,7 @@ enum DamageTypeToSchool
enum AuraRemoveMode enum AuraRemoveMode
{ {
AURA_NO_REMOVE_MODE = 0,
AURA_REMOVE_BY_DEFAULT, AURA_REMOVE_BY_DEFAULT,
AURA_REMOVE_BY_STACK, // change stack, single aura remove, AURA_REMOVE_BY_STACK, // change stack, single aura remove,
AURA_REMOVE_BY_CANCEL, AURA_REMOVE_BY_CANCEL,