Class BattleServer
- Namespace
- TaleWorlds.MountAndBlade.Diamond
- Assembly
- TaleWorlds.MountAndBlade.Diamond.dll
public class BattleServer : Client<BattleServer>, IClient
- Inheritance
-
BattleServer
- Implements
- Inherited Members
Constructors
BattleServer(DiamondClientApplication, IClientSessionProvider<BattleServer>)
public BattleServer(DiamondClientApplication diamondClientApplication, IClientSessionProvider<BattleServer> provider)
Parameters
diamondClientApplication
DiamondClientApplicationprovider
IClientSessionProvider<BattleServer>
Properties
AnalyticsServiceAddress
public string AnalyticsServiceAddress { get; }
Property Value
AssignedPlayers
public PlayerId[] AssignedPlayers { get; }
Property Value
- PlayerId[]
BattleId
public Guid BattleId { get; }
Property Value
BattleSize
public int BattleSize { get; }
Property Value
CaptureMovementData
public bool CaptureMovementData { get; }
Property Value
Faction1
public string Faction1 { get; }
Property Value
Faction2
public string Faction2 { get; }
Property Value
GameType
public string GameType { get; }
Property Value
IsActive
public bool IsActive { get; }
Property Value
IsFinished
public bool IsFinished { get; }
Property Value
IsPremadeGame
public bool IsPremadeGame { get; }
Property Value
MinRequiredPlayerCountToStartBattle
public int MinRequiredPlayerCountToStartBattle { get; }
Property Value
MoraleThreshold
public float MoraleThreshold { get; }
Property Value
PremadeGameType
public PremadeGameType PremadeGameType { get; }
Property Value
RoundThreshold
public int RoundThreshold { get; }
Property Value
SceneName
public string SceneName { get; }
Property Value
UseAnalytics
public bool UseAnalytics { get; }
Property Value
Methods
AllPlayersConnected()
public bool AllPlayersConnected()
Returns
BattleCancelledForPlayerLeaving(PlayerId)
public void BattleCancelledForPlayerLeaving(PlayerId leaverID)
Parameters
leaverID
PlayerId
BattleStarted(BattleResult)
public void BattleStarted(BattleResult battleResult)
Parameters
battleResult
BattleResult
BeginEndMission()
public void BeginEndMission()
DoNotAcceptNewPlayers()
public void DoNotAcceptNewPlayers()
EndMission(BattleResult, GameLog[], int, Dictionary<int, int>, Dictionary<PlayerId, int>)
public void EndMission(BattleResult battleResult, GameLog[] gameLogs, int gameTime, Dictionary<int, int> teamScores, Dictionary<PlayerId, int> playerScores)
Parameters
battleResult
BattleResultgameLogs
GameLog[]gameTime
intteamScores
Dictionary<int, int>playerScores
Dictionary<PlayerId, int>
GetPeer(string)
public BattlePeer GetPeer(string name)
Parameters
name
string
Returns
GetPeer(PlayerId)
public BattlePeer GetPeer(PlayerId playerId)
Parameters
playerId
PlayerId
Returns
GetPlayerParty(PlayerId)
public Guid GetPlayerParty(PlayerId playerId)
Parameters
playerId
PlayerId
Returns
HandlePlayerDisconnect(PlayerId, DisconnectType, BattleResult)
public void HandlePlayerDisconnect(PlayerId playerId, DisconnectType disconnectType, BattleResult battleResult)
Parameters
playerId
PlayerIddisconnectType
DisconnectTypebattleResult
BattleResult
InformGameServerReady()
public void InformGameServerReady()
Initialize(IBattleServerSessionHandler)
public void Initialize(IBattleServerSessionHandler handler)
Parameters
handler
IBattleServerSessionHandler
OnCantConnect()
public override void OnCantConnect()
OnConnected()
public override void OnConnected()
OnDisconnected()
public override void OnDisconnected()
OnFriendlyHit(int, PlayerId, PlayerId, float)
public void OnFriendlyHit(int round, PlayerId hitter, PlayerId victim, float damage)
Parameters
OnFriendlyKill(int, PlayerId, PlayerId)
public void OnFriendlyKill(int round, PlayerId killer, PlayerId victim)
Parameters
OnPlayerSpawned(PlayerId)
public void OnPlayerSpawned(PlayerId playerId)
Parameters
playerId
PlayerId
OnTick()
protected override void OnTick()
OnWarmupEnded()
public void OnWarmupEnded()
SetBadgeComponent(IBadgeComponent)
public void SetBadgeComponent(IBadgeComponent badgeComponent)
Parameters
badgeComponent
IBadgeComponent
StartServer()
public void StartServer()
UpdateBattleStats(BattleResult, Dictionary<int, int>)
public void UpdateBattleStats(BattleResult battleResult, Dictionary<int, int> teamScores)
Parameters
battleResult
BattleResultteamScores
Dictionary<int, int>
This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).