Пример #1
0
        private unsafe void HideHUDLayoutDetour(void *agentHudLayout)
        {
            _p.ui.IsVisible = false;

            hookHideHUDLayout.Original(agentHudLayout);

            hudLayoutScreen     = null;
            hudLayoutWindow     = null;
            this.agentHudLayout = null;
        }
Пример #2
0
        public unsafe AtkUnitBase *GetCurrentAddon()
        {
            if (hudLayoutScreen == null)
            {
                var addon = _p.pluginInterface.Framework.Gui.GetAddonByName("_HudLayoutScreen", 1);
                if (addon != null)
                {
                    hudLayoutScreen = (AddonHudLayoutScreen *)addon.Address.ToPointer();
                }
                else
                {
                    return(null);
                }
            }

            if (hudLayoutWindow == null)
            {
                var addon = _p.pluginInterface.Framework.Gui.GetAddonByName("_HudLayoutWindow", 1);
                if (addon != null)
                {
                    hudLayoutWindow = (AddonHudLayoutWindow *)addon.Address.ToPointer();
                }
                else
                {
                    return(null);
                }
            }

            if (hudLayoutScreen->SelectedAddon == null)
            {
                return(null);
            }

            if (hudLayoutScreen->SelectedAddon->SelectedAtkUnit == null)
            {
                return(null);
            }

            if (hudLayoutWindow->SaveButton == null)
            {
                return(null);
            }

            return(hudLayoutScreen->SelectedAddon->SelectedAtkUnit);
        }
Пример #3
0
        private unsafe void ShowHUDLayoutDetour(void *agentHudLayout)
        {
            hookShowHUDLayout.Original(agentHudLayout);

            this.agentHudLayout = (AgentHudLayout *)agentHudLayout;

            _p.ui.IsVisible = true;

            var addon = _p.pluginInterface.Framework.Gui.GetAddonByName("_HudLayoutScreen", 1);

            if (addon != null)
            {
                hudLayoutScreen = (AddonHudLayoutScreen *)addon.Address.ToPointer();
            }

            addon = _p.pluginInterface.Framework.Gui.GetAddonByName("_HudLayoutWindow", 1);
            if (addon != null)
            {
                hudLayoutWindow = (AddonHudLayoutWindow *)addon.Address.ToPointer();
            }
        }