private long PartyListUpdateDelegate(long a1, long a2, long a3)
        {
            if ((IntPtr)a1 != l1)
            {
                l1          = (IntPtr)a1;
                l2          = (IntPtr)(*(long *)(*(long *)(a2 + 0x20) + 0x20));
                l3          = (IntPtr)(*(long *)(*(long *)(a3 + 0x18) + 0x20) + 0x30); //+Index*0x68
                party       = (PartyUi *)l1;
                data        = (DataArray *)l2;
                stringarray = (PartyStrings *)l3;

                if (Config.ShieldShift)
                {
                    ShiftShield();
                }

                //SimpleLog.Information("NewAddress:");
                //SimpleLog.Information("L1:" + l1.ToString("X") + " L2:" + l2.ToString("X"));
                //SimpleLog.Information("L3:" + l3.ToString("X"));
            }
#if DEBUG
            PerformanceMonitor.Begin("PartyListLayout.Update");
#endif
            UpdatePartyUi(false);
            var ret = partyUiUpdateHook.Original(a1, a2, a3);
            UpdatePartyUi(true);
#if DEBUG
            PerformanceMonitor.End("PartyListLayout.Update");
#endif
            return(ret);
        }
Esempio n. 2
0
        private void Update(bool reset = false)
        {
            var stage           = AtkStage.GetSingleton();
            var loadedUnitsList = &stage->RaptureAtkUnitManager->AtkUnitManager.AllLoadedUnitsList;
            var addonList       = &loadedUnitsList->AtkUnitEntries;

            #if DEBUG
            PerformanceMonitor.Begin();
            #endif
            for (var i = 0; i < loadedUnitsList->Count; i++)
            {
                var addon = addonList[i];
                var name  = Marshal.PtrToStringAnsi(new IntPtr(addon->Name));

                if (name != null && name.StartsWith("JobHud"))
                {
                    if (reset || Config.ShowInDuty && Service.Condition[ConditionFlag.BoundByDuty])
                    {
                        if (addon->UldManager.NodeListCount == 0)
                        {
                            addon->UldManager.UpdateDrawNodeList();
                        }
                    }
                    else if (Config.ShowInCombat && Service.Condition[ConditionFlag.InCombat])
                    {
                        outOfCombatTimer.Restart();
                        if (addon->UldManager.NodeListCount == 0)
                        {
                            addon->UldManager.UpdateDrawNodeList();
                        }
                    }
                    else if (Config.ShowInCombat && outOfCombatTimer.ElapsedMilliseconds < Config.CombatBuffer * 1000)
                    {
                        if (addon->UldManager.NodeListCount == 0)
                        {
                            addon->UldManager.UpdateDrawNodeList();
                        }
                    }
                    else if (Config.ShowWhileWeaponDrawn && Service.ClientState.LocalPlayer != null && Service.ClientState.LocalPlayer.StatusFlags.HasFlag(StatusFlags.WeaponOut))
                    {
                        if (addon->UldManager.NodeListCount == 0)
                        {
                            addon->UldManager.UpdateDrawNodeList();
                        }
                    }
                    else
                    {
                        addon->UldManager.NodeListCount = 0;
                    }
                }
            }
            #if DEBUG
            PerformanceMonitor.End();
            #endif
        }
        private void Update(bool reset = false)
        {
            var stage           = AtkStage.GetSingleton();
            var loadedUnitsList = &stage->RaptureAtkUnitManager->AtkUnitManager.AllLoadedUnitsList;
            var addonList       = &loadedUnitsList->AtkUnitEntries;

            #if DEBUG
            PerformanceMonitor.Begin();
            #endif
            for (var i = 0; i < loadedUnitsList->Count; i++)
            {
                var addon = addonList[i];
                var name  = Marshal.PtrToStringAnsi(new IntPtr(addon->Name));

                if (name != null && name.StartsWith("JobHud"))
                {
                    if (reset || Config.ShowInDuty && Service.Condition[ConditionFlag.BoundByDuty])
                    {
                        if (addon->UldManager.NodeListCount == 0)
                        {
                            addon->UldManager.UpdateDrawNodeList();
                        }
                    }
                    else if (Config.ShowInCombat && Service.Condition[ConditionFlag.InCombat])
                    {
                        if (addon->UldManager.NodeListCount == 0)
                        {
                            addon->UldManager.UpdateDrawNodeList();
                        }
                    }
                    else
                    {
                        addon->UldManager.NodeListCount = 0;
                    }
                }
            }
            #if DEBUG
            PerformanceMonitor.End();
            #endif
        }