change CRLF files to LF This needs to be done in the main TC2 repo too

--HG--
branch : trunk
This commit is contained in:
2009-02-26 11:15:27 -05:00
4 changed files with 21 additions and 19 deletions
-6
View File
@@ -459,12 +459,6 @@ m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false)
Aura::~Aura() Aura::~Aura()
{ {
//Delete references to aura
if(GetAuraSlot() < MAX_AURAS && m_target && m_target->GetVisibleAura(GetAuraSlot()))
{
AuraSlotEntry * entry = m_target->GetVisibleAura(GetAuraSlot());
entry->m_slotAuras[GetEffIndex()]=NULL;
}
} }
AreaAura::AreaAura(SpellEntry const* spellproto, uint32 eff, int32 *currentBasePoints, Unit *target, AreaAura::AreaAura(SpellEntry const* spellproto, uint32 eff, int32 *currentBasePoints, Unit *target,
+1 -1
View File
@@ -2884,7 +2884,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
if (mechanic & (1<<MECHANIC_FEAR)) return DIMINISHING_FEAR; if (mechanic & (1<<MECHANIC_FEAR)) return DIMINISHING_FEAR;
if (mechanic & (1<<MECHANIC_CHARM)) return DIMINISHING_CHARM; if (mechanic & (1<<MECHANIC_CHARM)) return DIMINISHING_CHARM;
if (mechanic & (1<<MECHANIC_SILENCE)) return DIMINISHING_SILENCE; if (mechanic & (1<<MECHANIC_SILENCE)) return DIMINISHING_SILENCE;
if (mechanic & (1<<DIMINISHING_DISARM)) return DIMINISHING_DISARM; if (mechanic & (1<<MECHANIC_DISARM)) return DIMINISHING_DISARM;
if (mechanic & (1<<MECHANIC_FREEZE)) return DIMINISHING_FREEZE; if (mechanic & (1<<MECHANIC_FREEZE)) return DIMINISHING_FREEZE;
if (mechanic & ((1<<MECHANIC_KNOCKOUT) | (1<<MECHANIC_SAPPED))) return DIMINISHING_KNOCKOUT; if (mechanic & ((1<<MECHANIC_KNOCKOUT) | (1<<MECHANIC_SAPPED))) return DIMINISHING_KNOCKOUT;
if (mechanic & (1<<MECHANIC_BANISH)) return DIMINISHING_BANISH; if (mechanic & (1<<MECHANIC_BANISH)) return DIMINISHING_BANISH;
+19 -12
View File
@@ -208,18 +208,7 @@ void Unit::Update( uint32 p_time )
_UpdateAura(); _UpdateAura();
}else }else
m_AurasCheck -= p_time;*/ m_AurasCheck -= p_time;*/
const uint64& auramask = GetAuraUpdateMask(); UpdateAuras();
if (auramask)
{
for(uint32 i = 0; i < MAX_AURAS; ++i)
{
if(auramask & (uint64(1) << i))
{
SendAuraUpdate(i);
}
}
ResetAuraUpdateMask();
}
// WARNING! Order of execution here is important, do not change. // WARNING! Order of execution here is important, do not change.
// Spells must be processed with event system BEFORE they go to _UpdateSpells. // Spells must be processed with event system BEFORE they go to _UpdateSpells.
@@ -264,6 +253,22 @@ void Unit::Update( uint32 p_time )
i_motionMaster.UpdateMotion(p_time); i_motionMaster.UpdateMotion(p_time);
} }
void UpdateAuras()
{
const uint64& auramask = GetAuraUpdateMask();
if (auramask)
{
for(uint32 i = 0; i < MAX_AURAS; ++i)
{
if(auramask & (uint64(1) << i))
{
SendAuraUpdate(i);
}
}
ResetAuraUpdateMask();
}
}
bool Unit::haveOffhandWeapon() const bool Unit::haveOffhandWeapon() const
{ {
if(GetTypeId() == TYPEID_PLAYER) if(GetTypeId() == TYPEID_PLAYER)
@@ -9855,6 +9860,8 @@ void Unit::setDeathState(DeathState s)
{ {
RemoveAllAurasOnDeath(); RemoveAllAurasOnDeath();
UnsummonAllTotems(); UnsummonAllTotems();
//This is needed to clear visible auras after unit dies
UpdateAuras();
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
+1
View File
@@ -865,6 +865,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
uint32 GetSpellRadiusForTarget(Unit* target,const SpellRadiusEntry * radiusEntry); uint32 GetSpellRadiusForTarget(Unit* target,const SpellRadiusEntry * radiusEntry);
virtual void Update( uint32 time ); virtual void Update( uint32 time );
void UpdateAuras();
void setAttackTimer(WeaponAttackType type, uint32 time) { m_attackTimer[type] = time; } void setAttackTimer(WeaponAttackType type, uint32 time) { m_attackTimer[type] = time; }
void resetAttackTimer(WeaponAttackType type = BASE_ATTACK); void resetAttackTimer(WeaponAttackType type = BASE_ATTACK);