using CommonAI.Data; using CommonAI.Zone; using CommonLang.Geometry; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using XmdsCommonServer.Plugin; using XmdsCommonServer.Plugin.Units; using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills; using XmdsCommonServer.XLS.Data; using static XmdsCommonServer.XLS.Data.XmdsSkillData; using static XmdsCommonSkill.Plugin.Skills.XmdsSummonBase; namespace XmdsCommonSkill.Plugin.Skills { /** * 召唤类boss机制:按照数量,时间,半径召唤小怪 */ public abstract class XmdsSummonBase_ActiveSkill : XmdsSkillBase { protected XmdsSummonBase summonModule = new XmdsSummonBase(); //召唤物ID protected int mSummonID; protected override void OnRegistEvent() { this.RegistEvent(EventType.UseFormluaType, OnUseFormluaTypeEvent); base.OnRegistEvent(); } private void OnUseFormluaTypeEvent(BattleParams param) { param.UseDamageType = CommonAI.Data.DamageType.None; } protected override void OnSkillLogicEvent(BattleParams param) { summonModule.SummonUnit(param.Attacker); } protected XmdsSkillData InitSummonConfig(SummonType sumType) { XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(this.SkillID); XmdsSkillValue value1, value2, value3; InitData(data, out value1, XmdsSkillData.XmdsSkillDataKey.ValueSet); InitData(data, out value2, XmdsSkillData.XmdsSkillDataKey.ValueSet2); InitData(data, out value3, XmdsSkillData.XmdsSkillDataKey.ValueSet3); this.summonModule.InitConfig(sumType, value1, value2, value3); this.mSummonID = this.summonModule.GetSummonID(); return data; } } }