public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { int damageType = self.GetBuffIntParam(buffConfig, Key_Int_DamageType_SkillConfig); double damageValue = self.GetBuffDoubleParam(buffConfig, Key_Double_DamageValue_SkillConfig); switch (damageType) { case 1: if (damageValue > 0) { Damage damage = BattleModule.CreateDamage((int)damageValue, self.GetSrcID(buffInfo), eReason: BattleReason.Buff); BattleModule.DamageTarget(tarObj, self, damage); } break; case 2: if (damageValue > 0) { Damage damage = BattleModule.CreateDamage((int)damageValue * tarObj.GetMaxHP() / 10000, self.GetSrcID(buffInfo), eReason: BattleReason.Buff); BattleModule.DamageTarget(tarObj, self, damage); } break; } // Damage damage = BattleModule.CreateDamage((int)damageType, self.GetSrcID(buffInfo), eReason: BattleReason.Buff); // BattleModule.DamageTarget(tarObj, self, damage); }
/// <summary> /// 使用技能,这个需要手动调用 /// </summary> /// <param name="self"></param> /// <param name="skillId"></param> /// <returns></returns> public static UseSkillRet UseSkill(SkillObj self, int skillId) { UseSkillRet ret = UseSkillRet.Success; if (BattleModule.IsActionLimited(self, ActionLimitType.UseSkill)) { return(UseSkillRet.ActionLimit); } if (self.IsDead()) { return(UseSkillRet.Dead); } //检查特殊状态 if (!self.CanUseSkill(skillId)) { return(UseSkillRet.None); } SkillConfig_New skillConfig = self.GetSkillConfig(skillId); if (skillConfig == null) { return(UseSkillRet.None); } //检查技能消耗 if (!UseSkillCheckDeplete(self, skillConfig)) { return(UseSkillRet.Deplete); } string skillLogicId = self.GetSkillLogicId(skillConfig); if (!SkillLogics.ContainsKey(skillLogicId)) { return(UseSkillRet.None); } SkillLogic skillLogic = SkillLogics[skillLogicId]; if (skillLogic != null) { //检查CD if (!skillLogic.CheckCD(self, skillConfig)) { string key = self.GetSkillCDKey(skillConfig); self.LogInfo("skill:[{0}] CD ing [{1}]:[{2}]".F(self.GetSkillID(skillConfig), key, self.GetCD(key))); return(UseSkillRet.CD); } SkillInfo_New skillInfo = skillLogic.Begin(self, skillConfig); if (skillInfo != null) { skillLogic.BeginCD(self, skillInfo, skillConfig); self.AddSkillList(skillInfo); self.LogInfo("Skill Begin Successed [{0}]".F(skillId)); } else { self.LogInfo("Skill Begin Failed [{0}]".F(skillId)); } } return(ret); }
public override void OnDie(SkillObj self, SkillObj attacker, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { return; if (self.GetBuffIntParam(buffInfo, Key_Int_Bombed_BuffInfo) != Key_Int_Bombed_Value) { var targetSelectName = self.GetTargetSelect(buffConfig); var targetSelect = BattleModule.GetTargetSelect(targetSelectName); if (targetSelect == null) { self.LogInfo("targetSelect == null buffId:[{0}] targetSelectName:[{1}]".F(self.GetBuffID(buffInfo), targetSelectName)); return; } var targetTypeName = self.GetTargetType(buffConfig); var targetType = BattleModule.GetTargetType(targetTypeName); if (targetType == null) { self.LogInfo("targetSelect == null buffId:[{0}] targetType:[{1}]".F(self.GetBuffID(buffInfo), targetTypeName)); return; } var targets = BattleModule.GetTargets(self, targetSelect, targetType, buffInfo, buffConfig); foreach (var tar in targets.Where(t => !t.IsDead())) { OnEffect(self, tar, buffInfo, buffConfig); } } }
public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { int iDamamge = self.GetSkillIntParam(skillConfig, DamegeKey); Damage damage = BattleModule.CreateDamage(iDamamge); BattleModule.DamageTarget(target, self, damage); return(true); }
public override bool InitSkillInfo(SkillObj self, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { bool ret = base.InitSkillInfo(self, skillInfo, skillConfig); var targetSelectName = "Range"; var targetSelect = BattleModule.GetTargetSelect(targetSelectName); if (targetSelect == null) { self.LogInfo("targetSelect == null skillId:[{0}] targetSelectName:[{1}]".F(self.GetSkillID(skillInfo), targetSelectName)); Debug.Assert(false, "targetSelect == null skillId:[{0}] targetSelectName:[{1}]".F(self.GetSkillID(skillInfo), targetSelectName)); return(false); } var targetTypeName = "Harm"; var targetType = BattleModule.GetTargetType(targetTypeName); if (targetType == null) { self.LogInfo("targetSelect == null skillId:[{0}] targetType:[{1}]".F(self.GetSkillID(skillInfo), targetTypeName)); Debug.Assert(false, "targetSelect == null skillId:[{0}] targetType:[{1}]".F(self.GetSkillID(skillInfo), targetTypeName)); return(false); } var targets = BattleModule.GetTargets(self, targetSelect, targetType, skillInfo, skillConfig).ToList(); if (targets == null || targets.Count <= 0) { return(true); } int count = self.GetSkillIntParam(skillConfig, key_SummonCount_SkillConfig); int realCount = 0; int index = 0; foreach (var tar in targets) { if (index < count) { self.SetSkillIntParam(skillInfo, key_SummonTraceTarget_SkillInfo + index++, tar.GetID()); realCount++; } else { break; } } if (index < count) { var tank = targets.OrderBy(t => t.GetHP()).FirstOrDefault(); for (int i = index; i < count; i++) { self.SetSkillIntParam(skillInfo, key_SummonTraceTarget_SkillInfo + i, tank.GetID()); realCount++; } } self.SetSkillIntParam(skillInfo, key_SummonIdx_SkillInfo, 0); ret = true; return(ret); }
public override void OnDamageTarget(SkillObj self, SkillObj target, Damage damage, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { var buffIds = self.GetBuffIntParams(buffConfig).Skip(Key_Int_SummonObjBuffId_BuffConfig + 1); foreach (var buffId in buffIds.Where(b => b > 0)) { BattleModule.AddBuff(target, self, buffId, BattleReason.Buff); } return; }
// private const int key_BuffId1_SkillConfig = 0; // private const int key_BuffId2_SkillConfig = 1; // private const int key_BuffId3_SkillConfig = 2; public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { var buffIds = self.GetSkillIntParams(skillConfig); foreach (var buffId in buffIds) { BattleModule.AddBuff(target, self, buffId, BattleReason.Skill); } return(true); }
// private const int key_BuffId1_SkillConfig = 0; // private const int key_BuffId2_SkillConfig = 1; // private const int key_BuffId3_SkillConfig = 2; public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { var buffIds = self.GetBuffIntParams(buffConfig); foreach (var buffId in buffIds) { BattleModule.AddBuff(tarObj, self, buffId, BattleReason.Skill); } return; }
public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { int healValue = self.GetBuffIntParam(buffConfig, HealValueKey); if (healValue > 0) { Damage heal = BattleModule.CreateDamage(-healValue); BattleModule.DamageTarget(tarObj, self, heal); } }
public override void OnSummon(int id, SkillObj self, SkillObj summonObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { if (summonObj != null) { var summonId = self.GetBuffIntParam(buffConfig, Key_Int_AddBuffSummonObjId_BuffConfig); var buffId = self.GetBuffIntParam(buffConfig, Key_Int_SummonObjBuffId_BuffConfig); if (summonId == id) { BattleModule.AddBuff(summonObj, self, buffId, BattleReason.Buff); } } }
public virtual bool InitBuffInfo(SkillObj self, SkillObj srcObj, BattleReason reason, BuffInfo_New buffInfo, BuffConfig_New buffConfig, bool RefreshGUID = true) { var buffId = self.GetBuffID(buffConfig); self.SetBuffId(buffInfo, buffId); if (RefreshGUID) { var guid = BattleModule.BattleID; self.SetBuffGuid(buffInfo, guid); } self.SetBuffStateIndex(buffInfo, 0); if (srcObj != null) { if (srcObj.GetParentID() > 0) { self.SetSrcID(buffInfo, srcObj.GetParentID()); } else { self.SetSrcID(buffInfo, srcObj.GetID()); } } var startLogicStateName = self.GetLogicState(buffConfig, 0); var startLogicState = BattleModule.GetBuffLogicState(startLogicStateName); if (startLogicState == null) { self.LogInfo("startLogicState == null BuffId:[{0}] startLogicStateName:[{1}]".F(buffId, startLogicStateName)); return(false); } //init startLogicState.InitBuff(self, buffInfo, buffConfig, 0); startLogicState.InitState(self, buffInfo, buffConfig, 0); var targetSelectName = self.GetTargetSelect(buffConfig); if (targetSelectName != null) { var targetSelect = BattleModule.GetTargetSelect(targetSelectName); if (targetSelect == null) { self.LogInfo("targetSelect == null buffId:[{0}] targetSelectName:[{1}]".F(buffId, targetSelectName)); return(false); } targetSelect.Init(self, buffInfo, buffConfig); } return(true); }
public virtual bool IsActionLimited(SkillObj self, ActionLimitType limit, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { if (!CommonCheck(self, buffInfo, buffConfig)) { return(false); } var logicState = BattleModule.GetBuffLogicState(buffInfo, self); if (logicState == null) { return(false); } var ret = logicState.IsActionLimited(self, limit, buffInfo, buffConfig); return(ret); }
public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { int damageValue = 999999999; int damageByMyHP = self.GetBuffIntParam(buffInfo, Key_Int_DamageByMyHP_BuffInfo); int damageTarPerByMyHP = self.GetBuffIntParam(buffConfig, Key_Int_DamageTarPerByMyHP_BuffConfig); if (self == tarObj) { if (damageByMyHP <= 0) { damageByMyHP = self.GetHP() * damageTarPerByMyHP / 10000; self.SetBuffIntParam(buffInfo, Key_Int_DamageByMyHP_BuffInfo, damageByMyHP); } if (damageValue > 0) { Damage damage = BattleModule.CreateDamage(damageValue, bNeedCalc: false); BattleModule.DamageTarget(tarObj, self, damage); } int summonId = self.GetBuffIntParam(buffConfig, Key_Int_SummonId_BuffConfig); if (summonId > 0) { var summonTar = BattleModule.Summon(summonId, self, self, null, null); } } else { if (damageByMyHP <= 0) { damageByMyHP = self.GetHP() * damageTarPerByMyHP / 10000; self.SetBuffIntParam(buffInfo, Key_Int_DamageByMyHP_BuffInfo, damageByMyHP); if (damageByMyHP < 0) { damageByMyHP = 0; } } damageValue = self.GetBuffIntParam(buffConfig, Key_Int_DamageTarPer_BuffConfig) * tarObj.GetMaxHP() / 10000 + damageByMyHP; if (damageValue > 0) { Damage damage = BattleModule.CreateDamage(damageValue, bNeedCalc: false); BattleModule.DamageTarget(tarObj, self, damage); } } self.SetBuffIntParam(buffInfo, Key_Int_Bombed_BuffInfo, Key_Int_Bombed_Value); }
public virtual double DataFix(SkillObj self, PropertyType pType, double pValue, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { if (!CommonCheck(self, buffInfo, buffConfig)) { return(pValue); } var logicState = BattleModule.GetBuffLogicState(buffInfo, self); if (logicState == null) { return(pValue); } if (logicState.NeedDataFix(self, pType, pValue, buffInfo, buffConfig)) { pValue = OnDataFix(self, pType, pValue, buffInfo, buffConfig); } return(pValue); }
public override void OnEffect(SkillObj self, SkillObj tarObj, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { int damageValue = self.GetBuffIntParam(buffConfig, Key_DamageValue_SkillConfig); if (damageValue > 0 && self.GetSrcCamp(buffInfo) >= 0) { if (tarObj.GetCamp() == self.GetSrcCamp(buffInfo)) { Damage heal = BattleModule.CreateDamage(-damageValue, self.GetSrcID(buffInfo)); BattleModule.DamageTarget(tarObj, self, heal); } else { Damage damage = BattleModule.CreateDamage(damageValue, self.GetSrcID(buffInfo)); BattleModule.DamageTarget(tarObj, self, damage); } } }
public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { int id = self.GetSkillIntParam(skillConfig, key_SummonId_SkillConfig); int count = self.GetSkillIntParam(skillConfig, key_SummonCount_SkillConfig); int idx = self.GetSkillIntParam(skillInfo, key_SummonIdx_SkillInfo); if (idx < count) { int tarId = self.GetSkillIntParam(skillInfo, key_SummonTraceTarget_SkillInfo + idx); var tar = self.GetTargetById(tarId); if (tar != null) { var summonTar = BattleModule.Summon(id, self, tar, skillInfo, skillConfig); } self.SetSkillIntParam(skillInfo, key_SummonIdx_SkillInfo, idx + 1); } return(true); }
// private const int key_BuffId3_SkillConfig = 2; public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { var buffId1 = self.GetSkillIntParam(skillConfig, key_BuffId1_SkillConfig); var buffId2 = self.GetSkillIntParam(skillConfig, key_BuffId2_SkillConfig); var tarBuff = target.GetBuffList().Where(b => target.GetBuffID(b) == buffId1); if (tarBuff != null && tarBuff.FirstOrDefault() != null) { BattleModule.AddBuff(target, self, buffId2, BattleReason.Skill); BattleModule.RemoveBuff(target, self, buffId1, BattleReason.Skill); } else { BattleModule.AddBuff(target, self, buffId1, BattleReason.Skill); BattleModule.RemoveBuff(target, self, buffId2, BattleReason.Skill); } return(true); }
public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { int id = self.GetSkillIntParam(skillConfig, key_SummonId); var summonTar = BattleModule.Summon(id, self, target, skillInfo, skillConfig); if (summonTar != null) { var buffIds = self.GetSkillIntParams(skillConfig); foreach (var buffId in buffIds.Skip(key_SummonId + 1)) { BattleModule.AddBuff(summonTar, self, buffId, BattleReason.Skill); } } { //int iBuffId = self.GetSkillIntParam(skillConfig, key_BuffId); //if (iBuffId > 0) //{ // BattleModule.AddBuff(summonTar, self, iBuffId, BattleReason.Skill); //} } return(true); }
override public BuffSuperpositionRet OnBuffSuperposition(SkillObj tarObj, SkillObj srcObj, BattleReason reason, BuffConfig_New buffConfig) { BuffSuperpositionRet ret; ret.bType = BuffSuperpositionType.None; ret.buff = null; var buffKey = tarObj.GetBuffKey(buffConfig); foreach (var tarBuff in tarObj.GetBuffList()) { var tarBuffConfig = tarObj.GetBuffConfig(tarObj.GetBuffID(tarBuff)); if (tarBuffConfig != null && tarObj.GetBuffKey(tarBuffConfig).Equals(buffKey)) { BattleModule.RemoveBuff(tarObj, srcObj, tarObj.GetBuffID(tarBuff), BattleReason.Replace); //BattleModule.DetachBuff(tarObj, srcObj, tarBuff, tarBuffConfig); } } ret.bType = BuffSuperpositionType.Add; ret.buff = new BuffInfo_New(); return(ret); }
//private const int Key_Double_BuffBegin_SkillConfig = 0; public override bool OnEffect(SkillObj self, SkillObj target, SkillInfo_New skillInfo, SkillConfig_New skillConfig) { if (self.GetCamp() != target.GetCamp()) { int iDamamge = self.GetSkillIntParam(skillConfig, Key_Damege_SkillConfig); Damage damage = BattleModule.CreateDamage(iDamamge); BattleModule.DamageTarget(target, self, damage); var buffIds = self.GetSkillIntParams(skillConfig).Skip(Key_Damege_SkillConfig + 1); foreach (var buffId in buffIds) { BattleModule.AddBuff(target, self, buffId, BattleReason.Skill); } } else { var buffIds = self.GetSkillDoubleParams(skillConfig).Select(d => (int)d); foreach (var buffId in buffIds) { BattleModule.AddBuff(target, self, buffId, BattleReason.Skill); } } return(true); }
/// <summary> /// 技能的late tick,这是处理一些技能时间到,buff时间到之后的后续处理,需要手动调用 /// </summary> /// <param name="self"></param> public static void Tick_Battle_Late(SkillObj self) { self.Tick_Battle_Late(); //这个时候已经不再使用buff的迭代器,可以改变集合了,因为这里边的buff已经认为是被加在角色身上了,所以需要有后续处理得先加进去 foreach (var b in self.GetTempBuffList()) { self.AddBuffList(b); } self.ClearTempBuffList(); IEnumerable <BuffInfo_New> detachBuffs = null; if (self.IsDead()) { detachBuffs = self.RemoveAllBuffs((b) => true); self.RemoveAllSkills((s) => true); self.RemoveAllCDKey((c) => true); } else { detachBuffs = self.RemoveAllBuffs(b => self.GetBuffTime(b) <= 0); self.RemoveAllSkills(s => self.GetSkillTime(s) <= 0); self.RemoveAllCDKey(s => self.GetCD(s) <= 0); } foreach (var delBuf in detachBuffs) { var buffConfig = self.GetBuffConfig(self.GetBuffID(delBuf)); if (buffConfig == null) { continue; } //foreach (var buff in GetTankData().BuffInfos) { BattleModule.DetachBuff(self, null, delBuf, buffConfig); } } }
public virtual void Tick(SkillObj self, BuffInfo_New buffInfo, BuffConfig_New buffConfig) { if (!CommonCheck(self, buffInfo, buffConfig)) { return; } var logicState = BattleModule.GetBuffLogicState(buffInfo, self); if (logicState == null) { return; } var ret = logicState.Tick(self, buffInfo, buffConfig); switch (ret) { case LogicStateTickRet.TimeFinish: BuffOnEnd(self, buffInfo, buffConfig); break; case LogicStateTickRet.NextState: int index = self.GetBuffStateIndex(buffInfo); string nextStateName = self.GetLogicState(buffConfig, ++index); if (nextStateName == null || nextStateName.Equals("")) { BuffOnEnd(self, buffInfo, buffConfig); return; } var nextLogicState = BattleModule.GetBuffLogicState(nextStateName); if (nextLogicState == null) { self.LogInfo("startLogicState {0} not found".F(nextStateName)); return; } double fixTime = logicState.OnStateChanged(nextStateName, self, buffInfo, buffConfig); self.SetBuffStateIndex(buffInfo, index); nextLogicState.InitState(self, buffInfo, buffConfig, fixTime); self.NotifyBuffInfo(buffInfo, BattleInfoNotifyType.ChangeState_Buff, BattleNotifyTime.TickEnd); break; case LogicStateTickRet.OnEffect: //var srcObj = self.GetBuffSrcObj(buffInfo); { var targetSelectName = self.GetTargetSelect(buffConfig); var targetSelect = BattleModule.GetTargetSelect(targetSelectName); if (targetSelect == null) { self.LogInfo("targetSelect == null buffId:[{0}] targetSelectName:[{1}]".F(self.GetBuffID(buffInfo), targetSelectName)); return; } var targetTypeName = self.GetTargetType(buffConfig); var targetType = BattleModule.GetTargetType(targetTypeName); if (targetType == null) { self.LogInfo("targetSelect == null buffId:[{0}] targetType:[{1}]".F(self.GetBuffID(buffInfo), targetTypeName)); return; } var targets = BattleModule.GetTargets(self, targetSelect, targetType, buffInfo, buffConfig); foreach (var tar in targets) { OnEffect(self, tar, buffInfo, buffConfig); } } break; } }
/// <summary> /// 造成伤害或治疗 /// </summary> /// <param name="tarObj"></param> /// <param name="srcObj"></param> /// <param name="damage">大于0是伤害,小于0是治疗</param> public static void DamageTarget(SkillObj tarObj, SkillObj srcObj, Damage damage) { SkillObj realSrcObj = srcObj; if (tarObj == null || tarObj.IsDead()) { return; } if (realSrcObj != null && damage.srcId > 0 && realSrcObj.GetID() != damage.srcId) { realSrcObj = tarObj.GetSkillObj(damage.srcId); } BattleModule.CalcDamage(tarObj, realSrcObj, damage); //先修正伤害 BattleModule.DamageFix(tarObj, realSrcObj, damage); //质量和造成伤害都是这个 //造成伤害 if (damage.value >= 0) { tarObj.OnDamage(damage, realSrcObj); } else { tarObj.OnDamage(damage, realSrcObj); } //检查技能与BUFF的相应触发 if (realSrcObj != null && !realSrcObj.IsDead()) { var srcSkillList = realSrcObj.GetSkillList(); var srcBuffList = realSrcObj.GetBuffList(); //Source skill fix if (srcSkillList != null) { foreach (var skillInfo in srcSkillList) { SkillLogic skillLogic = GetSkillLogic(skillInfo, realSrcObj); int skillId = realSrcObj.GetSkillID(skillInfo); if (skillLogic != null) { SkillConfig_New skillConfig = realSrcObj.GetSkillConfig(skillId); if (damage.value >= 0) { skillLogic.OnDamageTarget(realSrcObj, tarObj, damage, skillInfo, skillConfig); } else { skillLogic.OnHealTarget(realSrcObj, tarObj, damage, skillInfo, skillConfig); } } else { realSrcObj.LogInfo("something error in BattleModule.DamageTarget src skill:[{0}]".F(skillId)); } } } //Source buff fix if (srcBuffList != null) { foreach (var buffInfo in srcBuffList) { BuffLogic buffLogic = GetBuffLogic(buffInfo, realSrcObj); int buffId = realSrcObj.GetBuffID(buffInfo); if (buffLogic != null) { BuffConfig_New buffConfig = realSrcObj.GetBuffConfig(buffId); if (damage.value >= 0) { buffLogic.OnDamageTarget(realSrcObj, tarObj, damage, buffInfo, buffConfig); } else { buffLogic.OnHealTarget(realSrcObj, tarObj, damage, buffInfo, buffConfig); } } else { realSrcObj.LogInfo("something error in BattleModule.DamageTarget src buff:[{0}]".F(buffId)); } } } } var tarSkillList = tarObj.GetSkillList(); var tarBuffList = tarObj.GetBuffList(); //Target skill fix if (!tarObj.IsDead()) { if (tarSkillList != null) { foreach (var skillInfo in tarSkillList) { SkillLogic skillLogic = GetSkillLogic(skillInfo, tarObj); int skillId = tarObj.GetSkillID(skillInfo); if (skillLogic != null) { SkillConfig_New skillConfig = tarObj.GetSkillConfig(skillId); if (damage.value >= 0) { skillLogic.OnBeHurt(tarObj, realSrcObj, damage, skillInfo, skillConfig); } else { skillLogic.OnBeHeal(tarObj, realSrcObj, damage, skillInfo, skillConfig); } } else { tarObj.LogInfo("something error in BattleModule.DamageTarget tar skill:[{0}]".F(skillId)); } } } //Target buff fix if (tarBuffList != null) { foreach (var buffInfo in tarBuffList) { BuffLogic buffLogic = GetBuffLogic(buffInfo, tarObj); int buffId = tarObj.GetBuffID(buffInfo); if (buffLogic != null) { BuffConfig_New buffConfig = tarObj.GetBuffConfig(buffId); if (damage.value >= 0) { buffLogic.OnBeHurt(tarObj, realSrcObj, damage, buffInfo, buffConfig); } else { buffLogic.OnBeHeal(tarObj, realSrcObj, damage, buffInfo, buffConfig); } } else { tarObj.LogInfo("something error in BattleModule.DamageTarget tar buff:[{0}]".F(buffId)); } } } } if (tarObj.IsDead()) { if (tarSkillList != null) { foreach (var skillInfo in tarSkillList) { SkillLogic skillLogic = GetSkillLogic(skillInfo, tarObj); int skillId = tarObj.GetSkillID(skillInfo); if (skillLogic != null) { SkillConfig_New skillConfig = tarObj.GetSkillConfig(skillId); skillLogic.OnDie(tarObj, realSrcObj, skillInfo, skillConfig); } else { tarObj.LogInfo("something error in BattleModule.DamageTarget tar skill:[{0}]".F(skillId)); } } } //Target buff fix if (tarBuffList != null) { foreach (var buffInfo in tarBuffList) { BuffLogic buffLogic = GetBuffLogic(buffInfo, tarObj); int buffId = tarObj.GetBuffID(buffInfo); if (buffLogic != null) { BuffConfig_New buffConfig = tarObj.GetBuffConfig(buffId); buffLogic.OnDie(tarObj, realSrcObj, buffInfo, buffConfig); } else { tarObj.LogInfo("something error in BattleModule.DamageTarget tar buff:[{0}]".F(buffId)); } } } bool ret = tarObj.OnDie(realSrcObj); } }