using CommonAI.Data; using CommonAI.Zone; using CommonAI.Zone.Instance; using System; using System.Collections.Generic; using System.Linq; using System.Text; using XmdsCommon.Plugin; using XmdsCommonServer.Plugin; using XmdsCommonServer.XLS.Data; using XmdsCommonSkill.Plugin.Skills; namespace XmdsCommonSkill.Plugin.PassiveSkills.Pet20200515 { public abstract class PetPassiveBase : XmdsPassiveSkillBase { protected bool IsTrigger(XmdsVirtual player, XmdsSkillValue triggerRate, XmdsSkillValue triggerRateExt, GameSkill skillInfo, UnitFateType fateType) { return player.RandomPercent(triggerRate.GetValue(skillInfo.SkillLevel) + triggerRateExt.GetValue(skillInfo.SkillLevel, (int)fateType)); } protected bool IsTrigger(XmdsVirtual player, XmdsSkillValue triggerRate, GameSkill skillInfo) { return player.RandomPercent(triggerRate.GetValue(skillInfo.SkillLevel)); } protected void NotifyTriggerAblity(InstanceUnit unit, int id) { unit.queueEvent(new UnitTriggerAblity(unit.ID, id)); } } }