*Fix healing amount for Haunt
--HG-- branch : trunk
This commit is contained in:
@@ -571,7 +571,6 @@ void Pet::Update(uint32 diff)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
uint32 guidlow = GetGUIDLow();
|
||||
Creature::Update(diff);
|
||||
}
|
||||
|
||||
|
||||
+11
-1
@@ -380,6 +380,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
|
||||
m_glyphIndex = 0;
|
||||
m_preCastSpell = 0;
|
||||
m_triggeredByAuraSpell = NULL;
|
||||
m_spellAura = NULL;
|
||||
|
||||
//Auto Shot & Shoot (wand)
|
||||
m_autoRepeat = IsAutoRepeatRangedSpell(m_spellInfo);
|
||||
@@ -938,6 +939,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
uint32 procAttacker = m_procAttacker;
|
||||
uint32 procVictim = m_procVictim;
|
||||
uint32 procEx = PROC_EX_NONE;
|
||||
m_spellAura = NULL; // Set aura to null for every target-make sure that pointer is not used for unit without aura applied
|
||||
|
||||
if (missInfo==SPELL_MISS_NONE) // In case spell hit target, do all effect on that target
|
||||
DoSpellHitOnUnit(unit, mask);
|
||||
@@ -981,6 +983,9 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
if (m_canTrigger && missInfo != SPELL_MISS_REFLECT)
|
||||
caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, addhealth, m_attackType, m_spellInfo);
|
||||
|
||||
if (m_spellAura)
|
||||
m_spellAura->SetProcDamage(addhealth);
|
||||
|
||||
int32 gain = unitTarget->ModifyHealth( int32(addhealth) );
|
||||
|
||||
unitTarget->getHostilRefManager().threatAssist(caster, float(gain) * 0.5f, m_spellInfo);
|
||||
@@ -1007,6 +1012,9 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
if (m_canTrigger && missInfo != SPELL_MISS_REFLECT)
|
||||
caster->ProcDamageAndSpell(unitTarget, procAttacker, procVictim, procEx, damageInfo.damage, m_attackType, m_spellInfo);
|
||||
|
||||
if (m_spellAura)
|
||||
m_spellAura->SetProcDamage(damageInfo.damage);
|
||||
|
||||
caster->DealSpellDamage(&damageInfo, true);
|
||||
|
||||
// Judgement of Blood
|
||||
@@ -1186,7 +1194,9 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
||||
if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && (m_spellInfo->SpellFamilyFlags[1] & 0x000020))
|
||||
m_caster->CastSpell(unit, 41637, true, NULL, NULL, m_originalCasterGUID);
|
||||
}
|
||||
unit->AddAura(Aur);
|
||||
// Set aura only when successfully applied
|
||||
if (unit->AddAura(Aur))
|
||||
m_spellAura = Aur;
|
||||
}
|
||||
t_effmask = effectMask& ~t_effmask;
|
||||
for(uint32 effectNumber=0;effectNumber<3;effectNumber++)
|
||||
|
||||
@@ -517,6 +517,7 @@ class Spell
|
||||
Item* itemTarget;
|
||||
GameObject* gameObjTarget;
|
||||
int32 damage;
|
||||
Aura * m_spellAura; // only used in DoAllEffectOnTarget
|
||||
|
||||
// this is set in Spell Hit, but used in Apply Aura handler
|
||||
DiminishingLevels m_diminishLevel;
|
||||
|
||||
@@ -2434,8 +2434,9 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real)
|
||||
// Haunt
|
||||
if(m_spellProto->SpellFamilyFlags[1] & 0x40000)
|
||||
{
|
||||
int32 bp0 = GetParentAura()->GetProcDamage() * m_amount / 100;
|
||||
if(caster)
|
||||
caster->CastCustomSpell(caster, 48210, &m_currentBasePoints, 0, 0, true);
|
||||
caster->CastCustomSpell(caster, 48210, &bp0, 0, 0, true, NULL, this);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -74,6 +74,8 @@ class TRINITY_DLL_SPEC Aura
|
||||
uint8 GetAuraCharges() const { return m_procCharges; }
|
||||
void SetAuraCharges(uint8 charges);
|
||||
bool DropAuraCharge();
|
||||
void SetProcDamage(uint32 val) { m_procDamage = val; }
|
||||
uint32 GetProcDamage() const { return m_procDamage; }
|
||||
|
||||
int8 GetStackAmount() const {return m_stackAmount;}
|
||||
void SetStackAmount(uint8 num);
|
||||
|
||||
@@ -448,12 +448,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE, m_spellInfo, m_caster))
|
||||
damage += int32(damage*0.25f);
|
||||
}
|
||||
// Haunt
|
||||
else if (m_spellInfo->SpellFamilyFlags[1] & 0x40000)
|
||||
{
|
||||
m_currentBasePoints[1] = int32(damage * m_currentBasePoints[1] / 100);
|
||||
}
|
||||
|
||||
// Conflagrate - consumes immolate
|
||||
if (m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user