*Fix beacon of light.

*Fix energize spells which are not self target.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-06-25 20:03:20 +02:00
parent 70379983c3
commit 1b12e2def7
+8 -16
View File
@@ -6140,31 +6140,23 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// Light's Beacon - Beacon of Light // Light's Beacon - Beacon of Light
if ( dummySpell->Id == 53651 ) if ( dummySpell->Id == 53651 )
{ {
if (Unit * caster = triggeredByAura->GetCaster()) if (Unit * source = triggeredByAura->GetSource())
{ {
// do not proc when target of beacon of light is healed // do not proc when target of beacon of light is healed
if (caster == pVictim) if (source == this)
return false; return false;
if (Aura const* aur = caster->GetAura(53563)) if (Unit * caster = triggeredByAura->GetCaster())
{ {
if (Unit * paladin = aur->GetCaster()) if (caster != pVictim)
{
if (paladin != this)
return false; return false;
basepoints0 = damage; basepoints0 = damage;
triggered_spell_id = 53654; triggered_spell_id = 53654;
target = caster; target = source;
break; break;
} }
else }
{
pVictim->RemoveAura(triggeredByAura->GetParentAura());
return false; return false;
} }
}
}
else return false;
}
// Judgements of the Wise // Judgements of the Wise
if (dummySpell->SpellIconID == 3017) if (dummySpell->SpellIconID == 3017)
{ {
@@ -7833,7 +7825,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
if (AuraEffect * aurEff = owner->GetDummyAura(SPELLFAMILY_WARLOCK, 3220)) if (AuraEffect * aurEff = owner->GetDummyAura(SPELLFAMILY_WARLOCK, 3220))
{ {
if (owner->GetTypeId() == TYPEID_PLAYER) if (owner->GetTypeId() == TYPEID_PLAYER)
basepoints0 = (aurEff->GetAmount() * ((Player*)owner)->GetBaseSpellDamageBonus() + 100.0f) / 100; basepoints0 = int32((aurEff->GetAmount() * ((Player*)owner)->GetBaseSpellDamageBonus() + 100.0f) / 100.0f);
CastCustomSpell(this,trigger_spell_id,&basepoints0,&basepoints0,NULL,true,castItem,triggeredByAura); CastCustomSpell(this,trigger_spell_id,&basepoints0,&basepoints0,NULL,true,castItem,triggeredByAura);
return true; return true;
} }
@@ -9108,7 +9100,7 @@ void Unit::EnergizeBySpell(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers
{ {
SendEnergizeSpellLog(pVictim, SpellID, Damage, powertype); SendEnergizeSpellLog(pVictim, SpellID, Damage, powertype);
// needs to be called after sending spell log // needs to be called after sending spell log
ModifyPower(powertype, Damage); pVictim->ModifyPower(powertype, Damage);
} }
uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack) uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack)