Explorar el Código

【优化】MMO-20148:山海残卷没有目标的,统一找单位仇恨目标

meijun hace 3 años
padre
commit
21c622365d

+ 8 - 8
XmdsVSPlugins/XmdsCommonSkill/Plugin/base/JSGPlayerCardSkillBase.cs

@@ -111,10 +111,10 @@ namespace XmdsCommonSkill.Plugin.CardSkill
 				log.Error("JSGCardSkillBase unitLaunchSpell launch_null 1: " + spellID + ", CardSkillID: " + this.SkillID);
 				return;
 			}
-			else if(hitter == null && !fromBody)
+			else if(hitter == null)
 			{
 				//需要目标,但是没有,设定为最大仇恨目标
-				log.Info("card skill need target but null: " + spellID + ", CardSkillID: " + this.SkillID);
+				//log.Info("card skill need target but null: " + spellID + ", CardSkillID: " + this.SkillID);
 				InstanceUnit hateUnit = launcher.GetHateSystem().GetHated();
 				if(hateUnit == null)
 				{
@@ -122,12 +122,12 @@ namespace XmdsCommonSkill.Plugin.CardSkill
 					return;
 				}
 
-				hitter = hateUnit.Virtual as XmdsVirtual;
-				if(hitter == null)
-				{
-					log.Error("JSGCardSkillBase unitLaunchSpell launch_null 2: " + spellID + ", CardSkillID: " + this.SkillID);
-					return;
-				}
+				//hitter = hateUnit.Virtual as XmdsVirtual;
+				//if(hitter == null)
+				//{
+				//	log.Error("JSGCardSkillBase unitLaunchSpell launch_null 2: " + spellID + ", CardSkillID: " + this.SkillID);
+				//	return;
+				//}
 			}
 
 			LaunchSpell launchSpll = ComSpellTemplate.Instance().GetCardSpell(spellID);