mirror of
https://github.com/MrOkiDoki/BattleBit-Community-Server-API.git
synced 2025-01-09 11:17:30 -03:00
commit
4af88e78df
4 changed files with 33 additions and 5 deletions
|
@ -43,5 +43,7 @@
|
|||
NotifyNewRoundID = 73,
|
||||
Log = 74,
|
||||
OnSquadLeaderChanged = 75,
|
||||
UpdateNewGameData = 76,
|
||||
UpdateConnectedPlayers = 77,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1357,6 +1357,8 @@ namespace BattleBitAPI.Server
|
|||
this.RoundIndex = roundIndex;
|
||||
this.SessionID = sessionID;
|
||||
|
||||
this.Players.Clear();
|
||||
|
||||
this.ServerSettings.Reset();
|
||||
this._RoomSettings.Reset();
|
||||
this.IsDirtyRoomSettings = false;
|
||||
|
|
|
@ -486,10 +486,6 @@ namespace BattleBitAPI.Server
|
|||
sessionID = readStream.ReadInt64();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
server = this.mInstanceDatabase.GetServerInstance(hash, out resources, this.OnCreatingGameServerInstance, ip, (ushort)gamePort);
|
||||
resources.Set(
|
||||
this.mExecutePackage,
|
||||
|
@ -859,6 +855,34 @@ namespace BattleBitAPI.Server
|
|||
var communcation = (NetworkCommuncation)stream.ReadInt8();
|
||||
switch (communcation)
|
||||
{
|
||||
case NetworkCommuncation.UpdateNewGameData:
|
||||
{
|
||||
if (stream.CanRead(10))
|
||||
{
|
||||
resources.CurrentPlayerCount = stream.ReadInt8();
|
||||
resources.InQueuePlayerCount = stream.ReadInt8();
|
||||
resources.MaxPlayerCount = stream.ReadInt8();
|
||||
resources.MaxPlayerCount = stream.ReadInt8();
|
||||
stream.TryReadString(out resources.Gamemode);
|
||||
resources.MapSize = (MapSize)stream.ReadInt8();
|
||||
stream.TryReadString(out resources.Map);
|
||||
byte gameType = stream.ReadInt8();
|
||||
resources.DayNight = (MapDayNight)stream.ReadInt8();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NetworkCommuncation.UpdateConnectedPlayers:
|
||||
{
|
||||
if (stream.CanRead(4))
|
||||
{
|
||||
resources.CurrentPlayerCount = stream.ReadInt8();
|
||||
resources.InQueuePlayerCount = stream.ReadInt8();
|
||||
resources.MaxPlayerCount = stream.ReadInt8();
|
||||
resources.MaxPlayerCount = stream.ReadInt8();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case NetworkCommuncation.PlayerConnected:
|
||||
{
|
||||
if (stream.CanRead(8 + 2 + 4 + (1 + 1 + 1)))
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<PackageProjectUrl>https://github.com/MrOkiDoki/BattleBit-Community-Server-API</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/MrOkiDoki/BattleBit-Community-Server-API</RepositoryUrl>
|
||||
<PackageTags>BattleBit</PackageTags>
|
||||
<Version>1.0.4</Version>
|
||||
<Version>1.0.4.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue