From 999a6501e0f5837669f2c0cc875e6bba511553eb Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Fri, 9 Jan 2015 22:33:41 -0500 Subject: [PATCH] Fix for spell projectiles (target type 1) being applied as melee damage. Resolves those random 1 million damage hits that have been reported --- zone/special_attacks.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 94da26e45..5255ff1f6 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -1101,8 +1101,14 @@ void Mob::ProjectileAttack() if (target){ - if (IsNPC()) - CastToNPC()->DoRangedAttackDmg(target, false, ProjectileAtk[i].wpn_dmg,0, static_cast(ProjectileAtk[i].skill)); + if (IsNPC()){ + if (ProjectileAtk[i].skill == SkillConjuration){ + if (IsValidSpell(ProjectileAtk[i].wpn_dmg)) + SpellOnTarget(ProjectileAtk[i].wpn_dmg, target, false, true, spells[ProjectileAtk[i].wpn_dmg].ResistDiff, true); + } + else + CastToNPC()->DoRangedAttackDmg(target, false, ProjectileAtk[i].wpn_dmg,0, static_cast(ProjectileAtk[i].skill)); + } else {