Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region 2090 Watchers
- case 2090:
- {
- byte Typ = packet[6];
- Game.Entity MyChar = client.Entity;
- switch (Typ)
- {
- case 0:
- {
- if (MyChar.PokerTable > 0)
- {
- if (Kernel.PokerTables.ContainsKey(MyChar.PokerTable))
- {
- byte Seat = packet[7];
- Game.PokerTable T = MyChar.MyPokerTable;
- if (T.Players.ContainsKey(client.Entity.UID)) return;
- if (T.FreeSeat(Seat))
- {
- T.AddNewPlayer(MyChar, Seat, true);
- byte CurrentState = 1;
- if (!T.Players.ContainsKey(MyChar.UID))
- if (T.Watchers.ContainsKey(MyChar.UID))
- {
- CurrentState = T.Watchers[MyChar.UID].CurrentState;
- T.Watchers.Remove(MyChar.UID);
- }
- client.Send(Game.PokerPackets.PokerPlayerInfo(Seat, MyChar.UID, CurrentState, T.Nomber));
- foreach (Game.PokerPlayer P in T.Players.Values)
- {
- if (P.PlayerId == MyChar.UID) continue;
- client.Send(Game.PokerPackets.PokerPlayerInfo(P.Seat, P.PlayerId, P.CurrentState, T.Nomber));
- P.Send(Game.PokerPackets.PokerPlayerInfo(Seat, MyChar.UID, CurrentState, T.Nomber));
- }
- foreach (Game.PokerPlayer P in T.Watchers.Values)
- {
- if (P.PlayerId == MyChar.UID) continue;
- client.Send(Game.PokerPackets.PokerPlayerInfo(P.Seat, P.PlayerId, P.CurrentState, T.Nomber));
- P.Send(Game.PokerPackets.PokerPlayerInfo(Seat, MyChar.UID, CurrentState, T.Nomber));
- }
- if (T.Players.Count == 2 && T.Pot == 0) T.SetNewRound(10);
- }
- }
- }
- break;
- }
- case 1:
- {
- if (MyChar.PokerTable > 0)
- {
- if (Kernel.PokerTables.ContainsKey(MyChar.PokerTable))
- {
- byte Seat = packet[8];
- Game.PokerTable T = MyChar.MyPokerTable;
- if (T.Players.ContainsKey(client.Entity.UID)) return;
- if (T.FreeSeat(Seat))
- {
- T.AddNewPlayer(MyChar, Seat, true);
- byte CurrentState = 1;
- if (!T.Players.ContainsKey(MyChar.UID))
- if (T.Watchers.ContainsKey(MyChar.UID))
- {
- CurrentState = T.Watchers[MyChar.UID].CurrentState;
- T.Watchers.Remove(MyChar.UID);
- }
- client.Send(Game.PokerPackets.PokerPlayerInfo(Seat, MyChar.UID, CurrentState, T.Nomber));
- foreach (Game.PokerPlayer P in T.Players.Values)
- {
- if (P.PlayerId == MyChar.UID) continue;
- client.Send(Game.PokerPackets.PokerPlayerInfo(P.Seat, P.PlayerId, P.CurrentState, T.Nomber));
- P.Send(Game.PokerPackets.PokerPlayerInfo(Seat, MyChar.UID, CurrentState, T.Nomber));
- }
- foreach (Game.PokerPlayer P in T.Watchers.Values)
- {
- if (P.PlayerId == MyChar.UID) continue;
- client.Send(Game.PokerPackets.PokerPlayerInfo(P.Seat, P.PlayerId, P.CurrentState, T.Nomber));
- P.Send(Game.PokerPackets.PokerPlayerInfo(Seat, MyChar.UID, CurrentState, T.Nomber));
- }
- if (T.Players.Count == 2 && T.Pot == 0) T.SetNewRound(10);
- }
- }
- }
- break;
- }
- default:
- {
- string D = "";
- for (int x = 0; x < packet.Length; x++)
- D += packet[x].ToString("X") + " ";
- client.Send(new Message("Unknown type: " + ID + " with length " + packet.Length + " :- " + D, System.Drawing.Color.CadetBlue, Message.Talk));
- break;
- }
- }
- break;
- }
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement