|
发表于 2019-12-13 13:42:01
|
显示全部楼层
修改\TurboHUD\plugins\LightningMod\SkillHandlers\Barbarian\BarbarianBandofMightPlugin.cs
- namespace Turbo.Plugins.LightningMod
- {
- using System;
- using Turbo.Plugins.Default;
- using Turbo.Plugins.glq;
- public class BarbarianBandofMightPlugin : BasePlugin, IAfterCollectHandler
- {
- private long tick = 0;
- public BarbarianBandofMightPlugin()
- {
- Enabled = false;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- }
- public void AfterCollect()
- {
- if (!Hud.Game.IsInGame
- ||Hud.Game.IsLoading
- || Hud.Game.Me.IsInTown
- || !Hud.Window.IsForeground
- || (!Hud.Render.MinimapUiElement.Visible)
- || Hud.Render.IsAnyBlockingUiElementVisible
- || Hud.Render.ActMapUiElement.LastVisibleSystemTick > DateTime.Now.Ticks - (500 * 10000)
- || Hud.Render.WorldMapUiElement.LastVisibleSystemTick > DateTime.Now.Ticks - (500 * 10000)
- || Hud.Game.Me.AnimationState == AcdAnimationState.Transform
- || PublicClassPlugin.isCasting(Hud)
- || Hud.Game.Me.IsDead
- || Hud.Game.Me.Powers.BuffIsActive(Hud.Sno.SnoPowers.Generic_ActorGhostedBuff.Sno)
- || !Hud.Game.Me.Powers.BuffIsActive(Hud.Sno.SnoPowers.BandOfMight.Sno)//力量戒指
- || Hud.Game.Me.Density.GetDensity(100) == 0//100码内至少有1个怪
- || (Hud.Game.Me.Powers.BuffIsActive(Hud.Sno.SnoPowers.ChilaniksChain.Sno) && Hud.Game.Me.Powers.BuffIsActive(Hud.Sno.SnoPowers.PrideOfCassius.Sno))//齐腰+卡腰的辅助蛮子
- )
- {
- return;
- }
- IPlayerSkill skill = null;
- var skillFuriousCharge = Hud.Game.Me.Powers.GetUsedSkill(Hud.Sno.SnoPowers.Barbarian_FuriousCharge);//狂暴冲锋
- var skillGroundStomp = Hud.Game.Me.Powers.GetUsedSkill(Hud.Sno.SnoPowers.Barbarian_GroundStomp);//大地践踏
- var skillLeap = Hud.Game.Me.Powers.GetUsedSkill(Hud.Sno.SnoPowers.Barbarian_Leap);//跃击
- if (skillFuriousCharge == null && skillGroundStomp == null && skillLeap == null) return;
- if (skillGroundStomp != null)
- skill = skillGroundStomp;
- if (skillLeap != null)
- skill = skillLeap;
- if (skillFuriousCharge != null)
- skill = skillFuriousCharge;
- if (skill.IsOnCooldown) return;
- var buff = Hud.Game.Me.Powers.GetBuff(Hud.Sno.SnoPowers.BandOfMight.Sno);
- if(buff.TimeLeftSeconds[1] < 1 && DateTime.Now.Ticks - (200 * 10000) > tick)
- {
- Hud.Interaction.DoAction(skill.Key,skill.Key == ActionKey.LeftSkill ? true : false);
- if (skill.Key == ActionKey.LeftSkill)
- Hud.Interaction.ShiftUp();
- tick = Hud.Time.Now.Ticks;
- }
- }
- }
- }
复制代码
|
|