*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
This commit is contained in:
QAston
2009-08-13 00:52:05 +02:00
parent 348116f6f8
commit ba91c78ceb
10 changed files with 346 additions and 650 deletions

View File

@@ -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();
}