diff options
| author | QAston <none@none> | 2009-02-11 15:04:27 +0100 |
|---|---|---|
| committer | QAston <none@none> | 2009-02-11 15:04:27 +0100 |
| commit | 8012f78d00ef29025397d2fe8a18dc1eb8876292 (patch) | |
| tree | 43e00ff70f3d14bc8a31a031c0ead055122eb4d6 /src/game/Unit.cpp | |
| parent | 8a8e39a571f81e9f4d723a5b452ecfbde06645a1 (diff) | |
*Small code cleanup, try to fix crash.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index d1914623dc4..be764eaee3e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4222,11 +4222,8 @@ void Unit::DelayAura(uint32 spellId, uint32 effindex, int32 delaytime) iter->second->SetAuraDuration(0); else iter->second->SetAuraDuration(iter->second->GetAuraDuration() - delaytime); - if(iter->second->GetAuraSlot() < MAX_AURAS) // slot found send data to client - { - // update for out of range group members (on 1 slot use) - UpdateAuraForGroup(iter->second->GetAuraSlot()); - } + // update for out of range group members (on 1 slot use) + UpdateAuraForGroup(iter->second->GetAuraSlot()); sLog.outDebug("Aura %u partially interrupted on unit %u, new duration: %u ms",iter->second->GetModifier()->m_auraname, GetGUIDLow(), iter->second->GetAuraDuration()); } } @@ -11647,6 +11644,8 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT void Unit::UpdateAuraForGroup(uint8 slot) { + if(slot >= MAX_AURAS) // slot not found, return + return; if(GetTypeId() == TYPEID_PLAYER) { Player* player = (Player*)this; |
