Table of Contents

Class LobbyClient

Namespace
TaleWorlds.MountAndBlade.Diamond
Assembly
TaleWorlds.MountAndBlade.Diamond.dll
public class LobbyClient : Client<LobbyClient>, IClient, IChatClientHandler
Inheritance
LobbyClient
Implements
Inherited Members

Constructors

LobbyClient(DiamondClientApplication, IClientSessionProvider<LobbyClient>)

public LobbyClient(DiamondClientApplication diamondClientApplication, IClientSessionProvider<LobbyClient> sessionProvider)

Parameters

diamondClientApplication DiamondClientApplication
sessionProvider IClientSessionProvider<LobbyClient>

Fields

TestRegionCode

public const string TestRegionCode = "Test"

Field Value

string

Properties

AliveCheckTimeInMiliSeconds

public override long AliveCheckTimeInMiliSeconds { get; }

Property Value

long

AtLobby

public bool AtLobby { get; }

Property Value

bool

AvailableCustomGames

public AvailableCustomGames AvailableCustomGames { get; }

Property Value

AvailableCustomGames

AvailablePremadeGames

public PremadeGameList AvailablePremadeGames { get; }

Property Value

PremadeGameList

AvailableScenes

public AvailableScenes AvailableScenes { get; }

Property Value

AvailableScenes

CanInvitePlayers

public bool CanInvitePlayers { get; }

Property Value

bool

CanPerformLobbyActions

public bool CanPerformLobbyActions { get; }

Property Value

bool

CanSuggestPlayers

public bool CanSuggestPlayers { get; }

Property Value

bool

ChatManager

public ChatManager ChatManager { get; }

Property Value

ChatManager

ClanHomeInfo

public ClanHomeInfo ClanHomeInfo { get; }

Property Value

ClanHomeInfo

ClanID

public Guid ClanID { get; }

Property Value

Guid

ClanInfo

public ClanInfo ClanInfo { get; }

Property Value

ClanInfo

Connected

public bool Connected { get; }

Property Value

bool

CurrentMatchId

public string CurrentMatchId { get; }

Property Value

string

CurrentState

public LobbyClient.State CurrentState { get; }

Property Value

LobbyClient.State

CustomBattleId

public CustomBattleId CustomBattleId { get; }

Property Value

CustomBattleId

CustomGameScene

public string CustomGameScene { get; }

Property Value

string

CustomGameType

public string CustomGameType { get; }

Property Value

string

FriendIDs

public List<PlayerId> FriendIDs { get; }

Property Value

List<PlayerId>

FriendInfos

public FriendInfo[] FriendInfos { get; }

Property Value

FriendInfo[]

HasUnofficialModulesLoaded

public bool HasUnofficialModulesLoaded { get; }

Property Value

bool

HasUserGeneratedContentPrivilege

public bool HasUserGeneratedContentPrivilege { get; }

Property Value

bool

IsAbleToSearchForGame

public bool IsAbleToSearchForGame { get; }

Property Value

bool

IsClanLeader

public bool IsClanLeader { get; }

Property Value

bool

IsClanOfficer

public bool IsClanOfficer { get; }

Property Value

bool

IsCustomBattleAvailable

public bool IsCustomBattleAvailable { get; }

Property Value

bool

IsEligibleToCreatePremadeGame

public bool IsEligibleToCreatePremadeGame { get; }

Property Value

bool

IsHostingCustomGame

public bool IsHostingCustomGame { get; }

Property Value

bool

IsIdle

public bool IsIdle { get; }

Property Value

bool

IsInClan

public bool IsInClan { get; }

Property Value

bool

IsInGame

public bool IsInGame { get; }

Property Value

bool

IsInParty

public bool IsInParty { get; }

Property Value

bool

IsMatchmakingAvailable

public bool IsMatchmakingAvailable { get; }

Property Value

bool

IsPartyFull

public bool IsPartyFull { get; }

Property Value

bool

IsPartyInvitationPopupActive

public bool IsPartyInvitationPopupActive { get; }

Property Value

bool

IsPartyJoinRequestPopupActive

public bool IsPartyJoinRequestPopupActive { get; }

Property Value

bool

IsPartyLeader

public bool IsPartyLeader { get; }

Property Value

bool

IsRefreshingPlayerData

public bool IsRefreshingPlayerData { get; set; }

Property Value

bool

LastBattleIsOfficial

public bool LastBattleIsOfficial { get; }

Property Value

bool

LastBattleServerAddressForClient

public string LastBattleServerAddressForClient { get; }

Property Value

string

LastBattleServerPortForClient

public ushort LastBattleServerPortForClient { get; }

Property Value

ushort

LoadedUnofficialModules

public IReadOnlyList<ModuleInfoModel> LoadedUnofficialModules { get; }

Property Value

IReadOnlyList<ModuleInfoModel>

LoggedIn

public bool LoggedIn { get; }

Property Value

bool

Name

public string Name { get; }

Property Value

string

OwnedCosmetics

public IReadOnlyList<string> OwnedCosmetics { get; }

Property Value

IReadOnlyList<string>

PartySystemAvailable

public bool PartySystemAvailable { get; }

Property Value

bool

PlayerData

public PlayerData PlayerData { get; }

Property Value

PlayerData

PlayerID

public PlayerId PlayerID { get; }

Property Value

PlayerId

PlayerInfosInClan

public List<ClanPlayerInfo> PlayerInfosInClan { get; }

Property Value

List<ClanPlayerInfo>

PlayersInClan

public List<ClanPlayer> PlayersInClan { get; }

Property Value

List<ClanPlayer>

PlayersInParty

public List<PartyPlayerInLobbyClient> PlayersInParty { get; }

Property Value

List<PartyPlayerInLobbyClient>

SupportedFeatures

public SupportedFeatures SupportedFeatures { get; }

Property Value

SupportedFeatures

UsedCosmetics

public IReadOnlyDictionary<string, List<string>> UsedCosmetics { get; }

Property Value

IReadOnlyDictionary<string, List<string>>

Methods

AcceptClanCreationRequest()

public void AcceptClanCreationRequest()

AcceptClanInvitation()

public void AcceptClanInvitation()

AcceptJoinPremadeGameRequest(Guid)

public void AcceptJoinPremadeGameRequest(Guid partyId)

Parameters

partyId Guid

AcceptPartyInvitation()

public void AcceptPartyInvitation()

AcceptPartyJoinRequest(PlayerId)

public void AcceptPartyJoinRequest(PlayerId playerId)

Parameters

playerId PlayerId

AddClanAnnouncement(string)

public void AddClanAnnouncement(string announcement)

Parameters

announcement string

AddFriend(PlayerId, bool)

public void AddFriend(PlayerId friendId, bool dontUseNameForUnknownPlayer)

Parameters

friendId PlayerId
dontUseNameForUnknownPlayer bool

AddFriendByUsernameAndId(string, int, bool)

public void AddFriendByUsernameAndId(string username, int userId, bool dontUseNameForUnknownPlayer)

Parameters

username string
userId int
dontUseNameForUnknownPlayer bool

AssignAsClanOfficer(PlayerId, bool)

public void AssignAsClanOfficer(PlayerId playerId, bool dontUseNameForUnknownPlayer)

Parameters

playerId PlayerId
dontUseNameForUnknownPlayer bool

BuyCosmetic(string)

public Task<(bool isSuccessful, int finalGold)> BuyCosmetic(string cosmeticId)

Parameters

cosmeticId string

Returns

Task<(bool isSuccessful, int finalGold)>

CanLogin()

public Task<bool> CanLogin()

Returns

Task<bool>

CancelCreatingPremadeGame()

public void CancelCreatingPremadeGame()

CancelFindGame()

public void CancelFindGame()

ChangeClanFaction(string)

public void ChangeClanFaction(string faction)

Parameters

faction string

ChangeClanSigil(string)

public void ChangeClanSigil(string sigil)

Parameters

sigil string

ChangeGameTypes(string[])

public void ChangeGameTypes(string[] gameTypes)

Parameters

gameTypes string[]

ChangeRegion(string)

public void ChangeRegion(string region)

Parameters

region string

ChangeSigil(string)

public void ChangeSigil(string sigilId)

Parameters

sigilId string

ChangeUsername(string)

public void ChangeUsername(string username)

Parameters

username string

ClanNameExists(string)

public Task<CheckClanParameterValidResult> ClanNameExists(string clanName)

Parameters

clanName string

Returns

Task<CheckClanParameterValidResult>

ClanTagExists(string)

public Task<CheckClanParameterValidResult> ClanTagExists(string clanTag)

Parameters

clanTag string

Returns

Task<CheckClanParameterValidResult>

Connect(ILobbyClientSessionHandler, ILoginAccessProvider, string, bool, PlatformInitParams)

public Task<LobbyClientConnectResult> Connect(ILobbyClientSessionHandler lobbyClientSessionHandler, ILoginAccessProvider lobbyClientLoginAccessProvider, string overridenUserName, bool hasUserGeneratedContentPrivilege, PlatformInitParams initParams)

Parameters

lobbyClientSessionHandler ILobbyClientSessionHandler
lobbyClientLoginAccessProvider ILoginAccessProvider
overridenUserName string
hasUserGeneratedContentPrivilege bool
initParams PlatformInitParams

Returns

Task<LobbyClientConnectResult>

CreatePremadeGame(string, string, string, string, string, string, PremadeGameType)

public void CreatePremadeGame(string name, string gameType, string mapName, string factionA, string factionB, string password, PremadeGameType premadeGameType)

Parameters

name string
gameType string
mapName string
factionA string
factionB string
password string
premadeGameType PremadeGameType

DeclineClanCreationRequest()

public void DeclineClanCreationRequest()

DeclineClanInvitation()

public void DeclineClanInvitation()

DeclineJoinPremadeGameRequest(Guid)

public void DeclineJoinPremadeGameRequest(Guid partyId)

Parameters

partyId Guid

DeclinePartyInvitation()

public void DeclinePartyInvitation()

DeclinePartyJoinRequest(PlayerId, PartyJoinDeclineReason)

public void DeclinePartyJoinRequest(PlayerId playerId, PartyJoinDeclineReason reason)

Parameters

playerId PlayerId
reason PartyJoinDeclineReason

DestroyClan()

public void DestroyClan()

DisbandParty()

public void DisbandParty()

DoesPlayerWithUsernameAndIdExist(string, int)

public Task<bool> DoesPlayerWithUsernameAndIdExist(string username, int userId)

Parameters

username string
userId int

Returns

Task<bool>

EditClanAnnouncement(int, string)

public void EditClanAnnouncement(int announcementId, string text)

Parameters

announcementId int
text string

EndCustomGame()

public void EndCustomGame()

FindCustomGame(string[], bool?, string)

public Task<bool> FindCustomGame(string[] selectedCustomGameTypes, bool? hasCrossplayPrivilege, string region)

Parameters

selectedCustomGameTypes string[]
hasCrossplayPrivilege bool?
region string

Returns

Task<bool>

FindGame()

public void FindGame()

FleeBattle()

public void FleeBattle()

GetAnotherPlayerData(PlayerId)

public Task<PlayerData> GetAnotherPlayerData(PlayerId playerID)

Parameters

playerID PlayerId

Returns

Task<PlayerData>

GetAnotherPlayerState(PlayerId)

public Task<AnotherPlayerData> GetAnotherPlayerState(PlayerId playerId)

Parameters

playerId PlayerId

Returns

Task<AnotherPlayerData>

GetAvailableScenes()

public Task<AvailableScenes> GetAvailableScenes()

Returns

Task<AvailableScenes>

GetClanHomeInfo()

public Task<ClanHomeInfo> GetClanHomeInfo()

Returns

Task<ClanHomeInfo>

GetClanLeaderboardInfo()

public Task<ClanLeaderboardInfo> GetClanLeaderboardInfo()

Returns

Task<ClanLeaderboardInfo>

GetCosmeticsInfo()

public Task<(bool isSuccessful, List<string> ownedCosmetics, Dictionary<string, List<string>> usedCosmetics)> GetCosmeticsInfo()

Returns

Task<(bool isSuccessful, List<string> ownedCosmetics, Dictionary<string, List<string>> usedCosmetics)>

GetCustomGameServerList()

public Task<AvailableCustomGames> GetCustomGameServerList()

Returns

Task<AvailableCustomGames>

GetDedicatedCustomServerAuthToken()

public Task<string> GetDedicatedCustomServerAuthToken()

Returns

Task<string>

GetFriendList()

public void GetFriendList()

GetGameTypeRankInfo(PlayerId)

public Task<GameTypeRankInfo[]> GetGameTypeRankInfo(PlayerId playerID)

Parameters

playerID PlayerId

Returns

Task<GameTypeRankInfo[]>

GetLobbyNews()

public Task<PublishedLobbyNewsArticle[]> GetLobbyNews()

Returns

Task<PublishedLobbyNewsArticle[]>

GetMatchmakingWaitTimes()

public Task<MatchmakingWaitTimeStats> GetMatchmakingWaitTimes()

Returns

Task<MatchmakingWaitTimeStats>

GetOfficialServerProviderName()

public Task<string> GetOfficialServerProviderName()

Returns

Task<string>

GetOtherPlayersState(List<PlayerId>)

public Task<List<(PlayerId, AnotherPlayerData)>> GetOtherPlayersState(List<PlayerId> players)

Parameters

players List<PlayerId>

Returns

Task<List<(PlayerId, AnotherPlayerData)>>

GetPingToServer(string)

public Task<long> GetPingToServer(string IpAddress)

Parameters

IpAddress string

Returns

Task<long>

GetPlayerBadges()

public Task<Badge[]> GetPlayerBadges()

Returns

Task<Badge[]>

GetPlayerBannerlordID(PlayerId)

public Task<string> GetPlayerBannerlordID(PlayerId playerId)

Parameters

playerId PlayerId

Returns

Task<string>

GetPlayerClanInfo(PlayerId)

public Task<ClanInfo> GetPlayerClanInfo(PlayerId playerId)

Parameters

playerId PlayerId

Returns

Task<ClanInfo>

GetPlayerCountInQueue()

public Task<MatchmakingQueueStats> GetPlayerCountInQueue()

Returns

Task<MatchmakingQueueStats>

GetPlayerStats(PlayerId)

public Task<PlayerStatsBase[]> GetPlayerStats(PlayerId playerID)

Parameters

playerID PlayerId

Returns

Task<PlayerStatsBase[]>

GetPremadeGameList()

public Task<PremadeGameList> GetPremadeGameList()

Returns

Task<PremadeGameList>

GetRankedLeaderboard(string, int, int)

public Task<PlayerLeaderboardData[]> GetRankedLeaderboard(string gameType, int startIndex, int count)

Parameters

gameType string
startIndex int
count int

Returns

Task<PlayerLeaderboardData[]>

GetRankedLeaderboardCount(string)

public Task<int> GetRankedLeaderboardCount(string gameType)

Parameters

gameType string

Returns

Task<int>

InviteToClan(PlayerId, bool)

public void InviteToClan(PlayerId invitedPlayerId, bool dontUseNameForUnknownPlayer)

Parameters

invitedPlayerId PlayerId
dontUseNameForUnknownPlayer bool

InviteToParty(PlayerId, bool)

public void InviteToParty(PlayerId playerId, bool dontUseNameForUnknownPlayer)

Parameters

playerId PlayerId
dontUseNameForUnknownPlayer bool

InviteToPlatformSession(PlayerId)

public Task<bool> InviteToPlatformSession(PlayerId playerId)

Parameters

playerId PlayerId

Returns

Task<bool>

IsKnownPlayer(PlayerId)

public bool IsKnownPlayer(PlayerId playerID)

Parameters

playerID PlayerId

Returns

bool

IsPlayerClanLeader(PlayerId)

public bool IsPlayerClanLeader(PlayerId playerID)

Parameters

playerID PlayerId

Returns

bool

IsPlayerClanOfficer(PlayerId)

public bool IsPlayerClanOfficer(PlayerId playerID)

Parameters

playerID PlayerId

Returns

bool

JoinChannel(ChatChannelType)

public void JoinChannel(ChatChannelType channel)

Parameters

channel ChatChannelType

KickFromClan(PlayerId)

public void KickFromClan(PlayerId playerId)

Parameters

playerId PlayerId

KickPlayer(PlayerId, bool)

public void KickPlayer(PlayerId id, bool banPlayer)

Parameters

id PlayerId
banPlayer bool

KickPlayerFromParty(PlayerId)

public void KickPlayerFromParty(PlayerId playerId)

Parameters

playerId PlayerId

LeaveChannel(ChatChannelType)

public void LeaveChannel(ChatChannelType channel)

Parameters

channel ChatChannelType

Logout(TextObject)

public void Logout(TextObject logOutReason)

Parameters

logOutReason TextObject

MarkNotificationAsRead(int)

public void MarkNotificationAsRead(int notificationID)

Parameters

notificationID int

OnBattleResultsSeen()

public void OnBattleResultsSeen()

OnCantConnect()

public override void OnCantConnect()

OnConnected()

public override void OnConnected()

OnDisconnected()

public override void OnDisconnected()

OnPlayerNameUpdated(string)

public void OnPlayerNameUpdated(string name)

Parameters

name string

OnTick()

protected override void OnTick()

PromotePlayerToPartyLeader(PlayerId)

public void PromotePlayerToPartyLeader(PlayerId playerId)

Parameters

playerId PlayerId

PromoteToClanLeader(PlayerId, bool)

public void PromoteToClanLeader(PlayerId playerId, bool dontUseNameForUnknownPlayer)

Parameters

playerId PlayerId
dontUseNameForUnknownPlayer bool

QuitFromCustomGame()

public void QuitFromCustomGame()

QuitFromMatchmakerGame()

public void QuitFromMatchmakerGame()

RegisterCustomGame(string, string, string, int, string, string, string, string, int)

public void RegisterCustomGame(string gameModule, string gameType, string serverName, int maxPlayerCount, string map, string uniqueMapId, string gamePassword, string adminPassword, int port)

Parameters

gameModule string
gameType string
serverName string
maxPlayerCount int
map string
uniqueMapId string
gamePassword string
adminPassword string
port int

RejoinBattle()

public void RejoinBattle()

RemoveClanAnnouncement(int)

public void RemoveClanAnnouncement(int announcementId)

Parameters

announcementId int

RemoveClanOfficerRoleForPlayer(PlayerId)

public void RemoveClanOfficerRoleForPlayer(PlayerId playerId)

Parameters

playerId PlayerId

RemoveFriend(PlayerId)

public void RemoveFriend(PlayerId friendId)

Parameters

friendId PlayerId

ReportPlayer(string, PlayerId, string, PlayerReportType, string)

public void ReportPlayer(string gameId, PlayerId player, string playerName, PlayerReportType type, string message)

Parameters

gameId string
player PlayerId
playerName string
type PlayerReportType
message string

RequestJoinCustomGame(CustomBattleId, string, bool)

public Task<bool> RequestJoinCustomGame(CustomBattleId serverId, string password, bool isJoinAsAdmin = false)

Parameters

serverId CustomBattleId
password string
isJoinAsAdmin bool

Returns

Task<bool>

RequestJoinPlayerParty(PlayerId, bool)

public Task<bool> RequestJoinPlayerParty(PlayerId targetPlayer, bool inviteRequest)

Parameters

targetPlayer PlayerId
inviteRequest bool

Returns

Task<bool>

RequestToJoinPremadeGame(Guid, string)

public void RequestToJoinPremadeGame(Guid gameId, string password)

Parameters

gameId Guid
password string

RespondToFriendRequest(PlayerId, bool, bool, bool)

public void RespondToFriendRequest(PlayerId playerId, bool dontUseNameForUnknownPlayer, bool isAccepted, bool isBlocked = false)

Parameters

playerId PlayerId
dontUseNameForUnknownPlayer bool
isAccepted bool
isBlocked bool

ResponseCustomGameClientConnection(PlayerJoinGameResponseDataFromHost[])

public void ResponseCustomGameClientConnection(PlayerJoinGameResponseDataFromHost[] playerJoinData)

Parameters

playerJoinData PlayerJoinGameResponseDataFromHost[]

SendChannelMessage(Guid, string)

public void SendChannelMessage(Guid roomId, string message)

Parameters

roomId Guid
message string

SendChatMessage(Guid, string)

public void SendChatMessage(Guid roomId, string message)

Parameters

roomId Guid
message string

SendClanMessage(string)

public void SendClanMessage(string message)

Parameters

message string

SendCreateClanMessage(string, string, string, string)

public void SendCreateClanMessage(string clanName, string clanTag, string clanFaction, string clanSigil)

Parameters

clanName string
clanTag string
clanFaction string
clanSigil string

SendPSPlayerJoinedToPlayerSessionMessage(ulong)

public Task<bool> SendPSPlayerJoinedToPlayerSessionMessage(ulong inviterAccountId)

Parameters

inviterAccountId ulong

Returns

Task<bool>

SendPartyMessage(string)

public void SendPartyMessage(string message)

Parameters

message string

SendWhisper(string, string)

public void SendWhisper(string playerName, string message)

Parameters

playerName string
message string

SetClanInformationText(string)

public void SetClanInformationText(string informationText)

Parameters

informationText string

SetLoadedModules(string[])

public void SetLoadedModules(string[] moduleIDs)

Parameters

moduleIDs string[]

Test_AddChatRoomUser(string)

public void Test_AddChatRoomUser(string name)

Parameters

name string

Test_CreateChatRoom(string)

public void Test_CreateChatRoom(string name)

Parameters

name string

Test_DeleteChatRoom(Guid)

public void Test_DeleteChatRoom(Guid id)

Parameters

id Guid

Test_ListChatRoomIds()

public IEnumerable<string> Test_ListChatRoomIds()

Returns

IEnumerable<string>

Test_RemoveChatRoomUser(string)

public void Test_RemoveChatRoomUser(string name)

Parameters

name string

ToggleUseClanSigil(bool)

public void ToggleUseClanSigil(bool isUsed)

Parameters

isUsed bool

UpdateCharacter(BodyProperties, bool)

public void UpdateCharacter(BodyProperties bodyProperties, bool isFemale)

Parameters

bodyProperties BodyProperties
isFemale bool

UpdateCustomGameData(string, string, int)

public void UpdateCustomGameData(string newGameType, string newMap, int newCount)

Parameters

newGameType string
newMap string
newCount int

UpdateShownBadgeId(string)

public Task<bool> UpdateShownBadgeId(string shownBadgeId)

Parameters

shownBadgeId string

Returns

Task<bool>

UpdateUsedCosmeticItems(Dictionary<string, List<(string cosmeticId, bool isEquipped)>>)

public Task<bool> UpdateUsedCosmeticItems(Dictionary<string, List<(string cosmeticId, bool isEquipped)>> usedCosmetics)

Parameters

usedCosmetics Dictionary<string, List<(string cosmeticId, bool isEquipped)>>

Returns

Task<bool>

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).