Table of Contents

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 DiamondClientApplication
provider IClientSessionProvider<BattleServer>

Properties

AnalyticsServiceAddress

public string AnalyticsServiceAddress { get; }

Property Value

string

AssignedPlayers

public PlayerId[] AssignedPlayers { get; }

Property Value

PlayerId[]

BattleId

public Guid BattleId { get; }

Property Value

Guid

BattleSize

public int BattleSize { get; }

Property Value

int

CaptureMovementData

public bool CaptureMovementData { get; }

Property Value

bool

Faction1

public string Faction1 { get; }

Property Value

string

Faction2

public string Faction2 { get; }

Property Value

string

GameType

public string GameType { get; }

Property Value

string

IsActive

public bool IsActive { get; }

Property Value

bool

IsFinished

public bool IsFinished { get; }

Property Value

bool

IsPremadeGame

public bool IsPremadeGame { get; }

Property Value

bool

MinRequiredPlayerCountToStartBattle

public int MinRequiredPlayerCountToStartBattle { get; }

Property Value

int

MoraleThreshold

public float MoraleThreshold { get; }

Property Value

float

PremadeGameType

public PremadeGameType PremadeGameType { get; }

Property Value

PremadeGameType

RoundThreshold

public int RoundThreshold { get; }

Property Value

int

SceneName

public string SceneName { get; }

Property Value

string

UseAnalytics

public bool UseAnalytics { get; }

Property Value

bool

Methods

AllPlayersConnected()

public bool AllPlayersConnected()

Returns

bool

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 BattleResult
gameLogs GameLog[]
gameTime int
teamScores Dictionary<int, int>
playerScores Dictionary<PlayerId, int>

GetPeer(string)

public BattlePeer GetPeer(string name)

Parameters

name string

Returns

BattlePeer

GetPeer(PlayerId)

public BattlePeer GetPeer(PlayerId playerId)

Parameters

playerId PlayerId

Returns

BattlePeer

GetPlayerParty(PlayerId)

public Guid GetPlayerParty(PlayerId playerId)

Parameters

playerId PlayerId

Returns

Guid

HandlePlayerDisconnect(PlayerId, DisconnectType, BattleResult)

public void HandlePlayerDisconnect(PlayerId playerId, DisconnectType disconnectType, BattleResult battleResult)

Parameters

playerId PlayerId
disconnectType DisconnectType
battleResult 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

round int
hitter PlayerId
victim PlayerId
damage float

OnFriendlyKill(int, PlayerId, PlayerId)

public void OnFriendlyKill(int round, PlayerId killer, PlayerId victim)

Parameters

round int
killer PlayerId
victim PlayerId

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 BattleResult
teamScores Dictionary<int, int>

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