private static void UpdatePlayerGameId(BattleGame game) { foreach (Player p in game.GetAllFightPlayers()) { if (p.PlayerDetail is ProxyPlayer) { (p.PlayerDetail as ProxyPlayer).GameId = game.Id; } } }
private static void SendBufferList(BattleGame game) { foreach (Player p in game.GetAllFightPlayers()) { List <BufferInfo> infos = (p.PlayerDetail as ProxyPlayer).Buffers; GSPacketIn pkg = new GSPacketIn(186, p.PlayerDetail.PlayerCharacter.ID); pkg.Parameter1 = p.Id; pkg.WriteInt(infos.Count); foreach (BufferInfo info in infos) { pkg.WriteInt(info.Type); pkg.WriteBoolean(info.IsExist); pkg.WriteDateTime(info.BeginDate); pkg.WriteInt(info.ValidDate); pkg.WriteInt(info.Value); } game.SendToAll(pkg); } }