public override void ClientInitialize() { Client.Characters.CurrentPlayerCharacterChanged += Refresh; Refresh(); void Refresh() { ClientSetCurrentParty(null); ClientCurrentInvitationsFromCharacters.Clear(); if (Api.Client.Characters.CurrentPlayerCharacter != null) { Instance.CallServer(_ => _.ServerRemote_RequestCurrentPartyAndInvitations()); Instance.CallServer(_ => _.ServerRemote_RequestPartyMaxSize()) .ContinueWith(t => { ClientPartyMembersMax = t.Result; Logger.Info("Party member max size received from server: " + ClientPartyMembersMax); Api.SafeInvoke(ClientPartyMembersMaxChanged); }, TaskContinuationOptions.ExecuteSynchronously); } } }
public override void ClientInitialize() { Client.Characters.CurrentPlayerCharacterChanged += Refresh; Refresh(); void Refresh() { ClientSetCurrentParty(null); ClientCurrentInvitationsFromCharacters.Clear(); if (Api.Client.Characters.CurrentPlayerCharacter != null) { Instance.CallServer(_ => _.ServerRemote_RequestCurrentPartyAndInvitations()); } } }
static void Refresh() { ClientSetCurrentParty(null); ClientCurrentInvitationsFromCharacters.Clear(); }