*Remove hack for Divine Storm from Unit::DealDamage

*"Zip" some data in SpellMgr::LoadSpellCustomAttr
*Add MaxAffectedTargets for Divine storm heal effect
*Move Divine Storm to correct spellfamily switch-case block in Spell::EffectDummy
*Some ordering fixes of case blocks in Spell::EffectDummy

--HG--
branch : trunk
This commit is contained in:
QAston committed 2010-07-16 14:42:24 +02:00
1 parent b406321c01
commit 7e8c61c95a
3 files changed
+54 -90

No files matched your search

-17
View File
@@ -562,23 +562,6 @@ void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb)
uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellEntry const *spellProto, bool durabilityLoss)
{
// if attacker is a player and spell is not empty/fail
if (GetTypeId() == TYPEID_PLAYER && spellProto)
{
// on divine storm dealed damage - heal
if (spellProto->SpellFamilyName == SPELLFAMILY_PALADIN && spellProto->SpellFamilyFlags[1] & 0x20000)
{
Unit *pRaidGrpMember = GetNextRandomRaidMemberOrPet(30.0f);
int32 divineDmg = damage * (25 + (HasAura(63220) ? 15 : 0)) / 100; //25%, if has Glyph of Divine Storm -> 40%
if (!pRaidGrpMember)
pRaidGrpMember = this;
CastCustomSpell(pRaidGrpMember, 54172, &divineDmg, 0, 0, true);
}
}
if (pVictim->GetTypeId() == TYPEID_UNIT && pVictim->ToCreature()->IsAIEnabled)
pVictim->ToCreature()->AI()->DamageTaken(this, damage);