Procházet zdrojové kódy

Additional spell PVP fixes

if secondary target is available, we check if target is an enemy player first, if not then we attempt to see if secondary target is an 'enemy'
Image před 4 roky
rodič
revize
79af63b919
1 změnil soubory, kde provedl 13 přidání a 0 odebrání
  1. 13 0
      EQ2/source/WorldServer/SpellProcess.cpp

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

@@ -1671,6 +1671,19 @@ void SpellProcess::GetSpellTargets(LuaSpell* luaspell)
 									implied = true;
 								}
 							}
+							else if (target->IsPlayer() && ((Entity*)caster)->AttackAllowed((Entity*)target))
+							{
+								secondary_target = target;
+								implied = true;
+								luaspell->initial_target = target->GetID();
+								luaspell->targets.push_back(target->GetID());
+							}
+							else if (target->IsPlayer() && ((Entity*)caster)->AttackAllowed((Entity*)secondary_target))
+							{
+								implied = true;
+								luaspell->initial_target = secondary_target->GetID();
+								luaspell->targets.push_back(secondary_target->GetID());
+							}
 						}
 					} // end friendly spell check
 				}