12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Warrior
- {
- /// 二技能: 2-1 ( 落地攻击力提升n%,持续T秒)
- public class Warrior_110210 : Warrior_110200
- {
- private static readonly int ID = 110210;
- //免伤比例
- protected XmdsSkillValue mValueSet2;
- private static readonly int Buff_ID_2_1 = (int)XmdsBuffBase.XmdsBuffList.ZS_ADD_ATTACK;
- public override int SkillID { get { return ID; } }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- base.OnInit(info, unit, ref template);
- // Buff修改
- var pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID_2_1);
- var buff = pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.PropChange) as XmdsBuff_PropChange;
- buff.CurentChangeType = XmdsVirtual.UnitAttributeType.Attack;
- buff.IsPercent = true;
- buff.CurrentValue = mValueSet2.GetValue(info.TalentSkillLevel1, 1);
- var bt = pack.mBuffTemplate;
- bt.LifeTimeMS = mValueSet2.GetValue(info.TalentSkillLevel1, 2);
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- unit.RegistLaunchSkillOver(OnLaunchSkillOver, info);
- }
- protected override void OnSkillDataChange(GameSkill gs, XmdsVirtual unit)
- {
- base.OnSkillDataChange(gs, unit);
- var buff = unit.GetRegisBuffVirtual(Buff_ID_2_1) as XmdsBuff_PropChange;
- buff.CurrentValue = mValueSet2.GetValue(gs.TalentSkillLevel1, 1);
- var bt = unit.GetRegistBuff(Buff_ID_2_1);
- bt.LifeTimeMS = mValueSet2.GetValue(gs.TalentSkillLevel1, 2);
- }
- private int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual launcher, CommonAI.Zone.Instance.InstanceUnit.SkillState skill)
- {
- launcher.mUnit.AddBuff(Buff_ID_2_1, launcher.mUnit);
- return 0;
- }
- protected override void OnInitConfig()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out mValueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out mValueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- // 扩展配置
- InitData(data, out mValueSet5, XmdsSkillData.XmdsSkillDataKey.ValueSet5);
- //释放过程中免伤
- InitData(data, out mValueSet8, XmdsSkillData.XmdsSkillDataKey.ValueSet8);
- }
- }
- }
|