aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-03-15 16:20:10 +0100
committerQAston <none@none>2009-03-15 16:20:10 +0100
commitd910fc951e0ccc74f904700d28e7dc5faed5462e (patch)
tree6a879bf0067a611f6afba098ba3b1a77ddb70c84 /src/game/SpellAuras.cpp
parent8b246d66d31b8f99544a4e7b74ccfa16b9c0f3c4 (diff)
*Auras by caster are now shown correctly (doublesized).
*First rank of Psychic Horror now procs correctly. *Mana drain effects amount of damage is now correct. *Raczman is now satisfied. --HG-- branch : trunk rename : sql/updates/1910_world.sql => sql/updates/1912_world.sql
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index b4bedebbfe9..c0cf9d17b0e 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -846,7 +846,7 @@ void Aura::_AddAura()
assert(slot < MAX_AURAS); // assert that we find a slot and it is valid
AuraSlotEntry t_entry;
- t_entry.m_Flags=(IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE);
+ t_entry.m_Flags=(IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE) | ((GetCasterGUID() == m_target->GetGUID()) ? AFLAG_CASTER : AFLAG_NONE) | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE);
t_entry.m_Level=(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
t_entry.m_spellId = GetId();
//init pointers-prevent unexpected behaviour
@@ -5816,17 +5816,6 @@ void Aura::PeriodicTick()
int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power);
- //Viper sting and Drain Life take mana % amount from target, but not bigger than amount*2 of caster mana
- if ((m_spellProto->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags[0]&0x10)
- || (m_spellProto->SpellFamilyName==SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags[1]&0x80))
- {
- uint32 drain = m_target->GetMaxPower(power) * drain_amount /100;
- if(drain > pCaster->GetMaxPower(power) * drain_amount / 50)
- drain_amount = pCaster->GetMaxPower(power) * drain_amount / 50;
- else
- drain_amount = drain;
- }
-
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
if (power == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER)
drain_amount -= ((Player*)m_target)->GetSpellCritDamageReduction(drain_amount);