private void FrameworkUpdate(Framework framework)
 {
     try {
         if (Service.Condition == null)
         {
             return;
         }
         if (Service.Condition.Any())
         {
             return;
         }
         AgentLobby.Instance()->IdleTime = 0;
     } catch {
         // Ignored
     }
 }
示例#2
0
    private void FrameworkOnUpdate(Framework framework)
    {
        if (Service.Condition.Any())
        {
            return;
        }
        var addon = Common.GetUnitBase("_TitleMenu");

        if (addon == null)
        {
            return;
        }
        var dc = Service.Data.Excel.GetSheet <WorldDCGroupType>()?.GetRow(AgentLobby.Instance()->DataCenter);

        if (dc == null || dc.RowId == 0)
        {
            var world = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework.Instance()->SystemConfig.GetLastWorldID();
            dc = Service.Data.Excel.GetSheet <World>()?.GetRow(world)?.DataCenter?.Value;
        }
        if (dc == null)
        {
            return;
        }
        var button = (AtkComponentNode *)addon->GetNodeById(5);

        if (button == null || (ushort)button->AtkResNode.Type < 1000)
        {
            return;
        }
        var text = (AtkTextNode *)button->Component->UldManager.SearchNodeById(3);

        if (text == null || text->AtkResNode.Type != NodeType.Text)
        {
            return;
        }
        text->SetText(dc.Name.RawData.ToArray());
    }