internal static void AddSCID(this List<byte> _Packet, SCID Scid) { _Packet.AddVInt(Scid.High); if (Scid.High > 0) _Packet.AddVInt(Scid.Low); }
public override void Decode() { Tick_Start = Reader.ReadVInt(); Tick_End = Reader.ReadVInt(); AccountID = Reader.ReadVLong(); SCID = Reader.ReadSCID(); ShowValues(); }
public Card_Item(int _Type, int _ID, int _Count, int _Level, byte _isNew) { Type = _Type; Index = _ID; Scid = new SCID(_Type, _ID); Count = _Count; Level = _Level; Status = _isNew; }
public void Add(int ID, SCID scid) { var _Card = new Deck_Card { Index = ID, Scid = scid }; if (!Cards.Contains(_Card)) { Cards.Add(_Card); } }
public void AnalyzeMessage(SCID messageId, byte[] bodyData) { switch (messageId) { case SCID.TCP_RESPONSE_LOGIN: { TcpResponseLogin pb_ReceiveMes = CSData.DeserializeData <TcpResponseLogin>(bodyData); NetGlobal.Instance().AddAction(() => { mes_login_result(pb_ReceiveMes); }); } break; case SCID.TCP_RESPONSE_REQUEST_MATCH: { TcpResponseRequestMatch pb_ReceiveMes = CSData.DeserializeData <TcpResponseRequestMatch>(bodyData); NetGlobal.Instance().AddAction(() => { mes_request_match_result(pb_ReceiveMes); }); } break; case SCID.TCP_RESPONSE_CANCEL_MATCH: { TcpResponseCancelMatch pb_ReceiveMes = CSData.DeserializeData <TcpResponseCancelMatch>(bodyData); NetGlobal.Instance().AddAction(() => { mes_cancel_match_result(pb_ReceiveMes); }); } break; case SCID.TCP_ENTER_BATTLE: { TcpEnterBattle pb_ReceiveMes = CSData.DeserializeData <TcpEnterBattle>(bodyData); NetGlobal.Instance().AddAction(() => { mes_enter_battle(pb_ReceiveMes); }); } break; default: break; } }
public void AnalyzeMessage(SCID messageId, byte[] bodyData) { switch (messageId) { case SCID.UDP_BATTLE_START: { UdpBattleStart pb_ReceiveMes = CSData.DeserializeData <UdpBattleStart>(bodyData); NetGlobal.Instance().AddAction(() => { mes_battle_start(pb_ReceiveMes); }); } break; case SCID.UDP_DOWN_FRAME_OPERATIONS: { UdpDownFrameOperations pb_ReceiveMes = CSData.DeserializeData <UdpDownFrameOperations>(bodyData); NetGlobal.Instance().AddAction(() => { mes_frame_operation(pb_ReceiveMes); }); } break; case SCID.UDP_DOWN_DELTA_FRAMES: { UdpDownDeltaFrames pb_ReceiveMes = CSData.DeserializeData <UdpDownDeltaFrames>(bodyData); NetGlobal.Instance().AddAction(() => { mes_delta_frame_data(pb_ReceiveMes); }); } break; case SCID.UDP_DOWN_GAME_OVER: { UdpDownGameOver pb_ReceiveMes = CSData.DeserializeData <UdpDownGameOver>(bodyData); NetGlobal.Instance().AddAction(() => { mes_down_game_over(pb_ReceiveMes); }); } break; default: break; } }
public static Card Get(SCID scid) { return(Card_List.FirstOrDefault(card => card.Scid.Value == scid.Value)); }