diff options
author | QAston <none@none> | 2009-08-13 00:52:05 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-08-13 00:52:05 +0200 |
commit | ba91c78ceb428129c366d69b0057e68dcfa86fd5 (patch) | |
tree | 734311d85101ee29e52193f02ba59d2770e640dd /src/game/Unit.cpp | |
parent | 348116f6f8c115c1505dc6521551618f9c5cbbcf (diff) |
*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
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
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(); } + |