*Correct Divine Storm heal, thanks lobuz
--HG-- branch : trunk
This commit is contained in:
@@ -3719,6 +3719,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
spellInfo->MaxAffectedTargets = 3;
|
||||
break;
|
||||
case 38310: // Multi-Shot
|
||||
case 53385: // Divine Storm (Damage)
|
||||
spellInfo->MaxAffectedTargets = 4;
|
||||
break;
|
||||
case 42005: // Bloodboil
|
||||
|
||||
@@ -650,6 +650,22 @@ 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 / 4;
|
||||
|
||||
if (!pRaidGrpMember)
|
||||
pRaidGrpMember = this;
|
||||
|
||||
CastCustomSpell(pRaidGrpMember, 54172, &divineDmg, 0, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
if(pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsAIEnabled)
|
||||
((Creature*)pVictim)->AI()->DamageTaken(this, damage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user