Browse Source

Fixed some spells not setting their direct target in PVP

Image 4 years ago
parent
commit
58a94e862f
1 changed files with 7 additions and 0 deletions
  1. 7 0
      EQ2/source/WorldServer/SpellProcess.cpp

+ 7 - 0
EQ2/source/WorldServer/SpellProcess.cpp

@@ -1684,6 +1684,13 @@ void SpellProcess::GetSpellTargets(LuaSpell* luaspell)
 						}
 					}
 				}
+				else
+				{
+					if (target->IsPlayer() && ((Entity*)caster)->AttackAllowed((Entity*)target)) {
+						luaspell->initial_target = target->GetID();
+						luaspell->targets.push_back(target->GetID());
+					}
+				}
 			}
 		}
 		else if (target_type == SPELL_TARGET_GROUP_AE || target_type == SPELL_TARGET_RAID_AE) {