예제 #1
0
        public Cooldown GetActionCooldown(Action action)
        {
            if (cooldownList.ContainsKey(action.RowId))
            {
                return(cooldownList[action.RowId]);
            }
            var cooldown = new Cooldown(this, action);

            cooldownList.Add(action.RowId, cooldown);
            return(cooldown);
        }
예제 #2
0
        internal TextureWrap GetActionIcon(Action action)
        {
            var iconTex = plugin.PluginInterface.Data.GetIcon(action.Icon);
            var tex     = plugin.PluginInterface.UiBuilder.LoadImageRaw(iconTex.GetRgbaImageData(), iconTex.Header.Width, iconTex.Header.Height, 4);

            if (tex != null && tex.ImGuiHandle != IntPtr.Zero)
            {
                return(tex);
            }
            return(null);
        }
예제 #3
0
        public Cooldown(ActionManager actionManager, Action action)
        {
            this.actionManager = actionManager;
            this.action        = action;

            cooldownStruct = new CooldownStruct()
            {
                ActionID = this.ActionID, CooldownElapsed = 0, CooldownTotal = 0, IsCooldown = false
            };
            readyStopwatch.Start();
            Update();

            Task.Run(() => {
                if (action.Icon > 0 && action.IsPlayerAction)
                {
                    ActionIconTexture = actionManager.GetActionIcon(action);
                }
            });
        }
예제 #4
0
 public bool IsActionCooldown(Action action)
 {
     return(action.IsPlayerAction && isActionCooldown(actionManagerPtr, 1, action.RowId));
 }
예제 #5
0
 public ushort GetActionIconId(Action action)
 {
     return(actionCustomIcons.ContainsKey(action.RowId) ? actionCustomIcons[action.RowId] : action.Icon);
 }
예제 #6
0
 public TextureWrap GetActionIcon(Action action)
 {
     return(GetIconTexture(actionCustomIcons.ContainsKey(action.RowId) ? actionCustomIcons[action.RowId] : action.Icon));
 }