From ba91c78ceb428129c366d69b0057e68dcfa86fd5 Mon Sep 17 00:00:00 2001 From: QAston Date: Thu, 13 Aug 2009 00:52:05 +0200 Subject: *Update Mana Shield Spell Power Coefficient - by fukifat. *Add function void AuraEffect::HandleAuraEffectSpecificMods(bool apply, bool Real, bool changeAmount), and aura effect specific stuff to it. *More correct aura scaling with lvl for area auras. *Prevent exploits with relog while having auras with modified amount. --HG-- branch : trunk --- src/game/Unit.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 01bfe2bf812..21474dfb94a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5013,10 +5013,10 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger if (AuraEffect * Aur = pVictim->GetAuraEffect(procSpell->Id, effIndex+1, triggeredByAura->GetCasterGUID())) { // Remove aura mods - Aur->ApplyModifier(false); + Aur->ApplyModifier(false, false, true); Aur->SetAmount(Aur->GetAmount() + spelldmg/* * triggerAmount / 100*/); // Apply extended aura mods - Aur->ApplyModifier(true); + Aur->ApplyModifier(true, false, true); return true; } return false; @@ -8785,10 +8785,14 @@ bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit * Cas return HasFlag(UNIT_FIELD_AURASTATE, 1<<(flag-1)); } -Unit *Unit::GetOwner() const +Unit *Unit::GetOwner(bool inWorld) const { if(uint64 ownerid = GetOwnerGUID()) - return ObjectAccessor::GetUnit(*this, ownerid); + { + if (inWorld) + return ObjectAccessor::GetUnit(*this, ownerid); + return ObjectAccessor::GetUnitInOrOutOfWorld(*this, ownerid); + } return NULL; } @@ -15278,3 +15282,4 @@ void Unit::OutDebugInfo() sLog.outStringInLine("%u, ", itr->first); sLog.outString(); } + -- cgit v1.2.3