mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
*Fix auras display when unit dies.
*Fix Freezing trap diminishing return. --HG-- branch : trunk
This commit is contained in:
@@ -459,12 +459,6 @@ m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false)
|
||||
|
||||
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,
|
||||
|
||||
@@ -2884,7 +2884,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||
if (mechanic & (1<<MECHANIC_FEAR)) return DIMINISHING_FEAR;
|
||||
if (mechanic & (1<<MECHANIC_CHARM)) return DIMINISHING_CHARM;
|
||||
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_KNOCKOUT) | (1<<MECHANIC_SAPPED))) return DIMINISHING_KNOCKOUT;
|
||||
if (mechanic & (1<<MECHANIC_BANISH)) return DIMINISHING_BANISH;
|
||||
|
||||
@@ -208,18 +208,7 @@ void Unit::Update( uint32 p_time )
|
||||
_UpdateAura();
|
||||
}else
|
||||
m_AurasCheck -= p_time;*/
|
||||
const uint64& auramask = GetAuraUpdateMask();
|
||||
if (auramask)
|
||||
{
|
||||
for(uint32 i = 0; i < MAX_AURAS; ++i)
|
||||
{
|
||||
if(auramask & (uint64(1) << i))
|
||||
{
|
||||
SendAuraUpdate(i);
|
||||
}
|
||||
}
|
||||
ResetAuraUpdateMask();
|
||||
}
|
||||
UpdateAuras();
|
||||
|
||||
// WARNING! Order of execution here is important, do not change.
|
||||
// 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);
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -9855,6 +9860,8 @@ void Unit::setDeathState(DeathState s)
|
||||
{
|
||||
RemoveAllAurasOnDeath();
|
||||
UnsummonAllTotems();
|
||||
//This is needed to clear visible auras after unit dies
|
||||
UpdateAuras();
|
||||
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
|
||||
|
||||
@@ -865,6 +865,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
uint32 GetSpellRadiusForTarget(Unit* target,const SpellRadiusEntry * radiusEntry);
|
||||
|
||||
virtual void Update( uint32 time );
|
||||
void UpdateAuras();
|
||||
|
||||
void setAttackTimer(WeaponAttackType type, uint32 time) { m_attackTimer[type] = time; }
|
||||
void resetAttackTimer(WeaponAttackType type = BASE_ATTACK);
|
||||
|
||||
Reference in New Issue
Block a user