aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-12-14 16:12:10 +0100
committerShauren <shauren.trinity@gmail.com>2014-12-14 16:12:10 +0100
commitdc5a73da574573924690fbb1d1323a714ae9dc9d (patch)
tree4ea87ffe0bbac0dc29096ab9d05c6fa50c98de7b /src
parent25ff9daab1f0e96db128ef85fe2dbbc8ca34468b (diff)
Core/Auras: Fixed a possible crash in proc triggering
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index b26f3b13042..1bff31e56ee 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -3034,7 +3034,7 @@ Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint3
bp = *(baseAmount + effect->EffectIndex);
else
bp = effect->BasePoints;
-
+
int32* oldBP = const_cast<int32*>(&(foundAura->GetEffect(effect->EffectIndex)->m_baseAmount)); // todo 6.x review GetBaseAmount and GetCastItemGUID in this case
*oldBP = bp;
}
@@ -12199,11 +12199,10 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
bool triggered = !(spellProto->AttributesEx3 & SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED) ?
(procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) : false;
- for (SpellEffectInfo const* effect : itr->second->GetBase()->GetSpellEffectInfos())
+ for (AuraEffect const* aurEff : itr->second->GetBase()->GetAuraEffects())
{
- if (effect && effect->IsEffect())
+ if (aurEff)
{
- AuraEffect* aurEff = itr->second->GetBase()->GetEffect(effect->EffectIndex);
// Skip this auras
if (isNonTriggerAura[aurEff->GetAuraType()])
continue;
@@ -12212,7 +12211,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
continue;
// Some spells must always trigger
if (!triggered || isAlwaysTriggeredAura[aurEff->GetAuraType()])
- triggerData.effMask |= 1<<effect->EffectIndex;
+ triggerData.effMask |= 1 << aurEff->GetEffIndex();
}
}
if (triggerData.effMask)