aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-07 22:38:09 +0200
committerQAston <none@none>2009-05-07 22:38:09 +0200
commitf06e8608cbf84fd7113a032e0ef54f493d7311e0 (patch)
tree03b7ad23640049a5d20692b28667950a6d38a02c /src/game/Unit.cpp
parent1b460da5cb48593808f3e2756c2c77961ec20e61 (diff)
*Fix demonic knowledge
*Fix applying of some cast mods *Set correct dr for shattered barrier. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 0062283b0df..28713ae59d9 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5212,7 +5212,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// only on dispel/remove aura by destroy
target = NULL;
triggered_spell_id = 55080;
- CastSpell(target, triggered_spell_id, true);
+ CastSpell(target, triggered_spell_id, true, 0, triggeredByAura);
return true;
}
// Hot Streak
@@ -13581,7 +13581,7 @@ void Unit::AddAura(uint32 spellId, Unit* target)
target->AddAura(Aur);
}
-Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster)
+Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster, int32 * basePoints)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if(!spellInfo || !caster)
@@ -13594,7 +13594,7 @@ Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster)
if (aur)
{
- AuraEffect *aurEffect = CreateAuraEffect(aur, effIndex, NULL, caster);
+ AuraEffect *aurEffect = CreateAuraEffect(aur, effIndex, basePoints, caster);
if (!aurEffect)
return aur;
if (!aur->SetPartAura(aurEffect, effIndex))
@@ -13602,7 +13602,16 @@ Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster)
}
else
{
- aur = new Aura(spellInfo, 1<<effIndex, NULL, this ,caster);
+ if (basePoints)
+ {
+ int32 amount [3];
+ amount[effIndex] = *basePoints;
+ aur = new Aura(spellInfo, 1<<effIndex, &amount[0], this ,caster);
+ }
+ else
+ {
+ aur = new Aura(spellInfo, 1<<effIndex, NULL, this ,caster);
+ }
AddAura(aur);
}
return aur;