public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x1b: case 0x1c: this.SetupView(); break; case 0x67: this.SetupFragmentTab(); if (this._tabManager.GetShowingTabKey() == "FragmentTab") { GameObject showingTabContent = this._tabManager.GetShowingTabContent(); if (this._fadeManagerDict.ContainsKey(showingTabContent)) { this._fadeManagerDict[showingTabContent].Init(this._scrollerDict[showingTabContent].GetItemDict(), null, new Func <RectTransform, RectTransform, bool>(this.IsStorageItemDataEqual)); this._fadeManagerDict[showingTabContent].Play(); this._itemBeforeDict[showingTabContent] = null; } } break; case 40: case 0x88: return(this.SetupView()); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { if (this._isSimpleWaitCmd && (pkt.getCmdId() == this._waitCmdID)) { this.Finish(); } return(false); }
private bool DispatchPacket(NetPacketV1 pkt) { if (pkt.getTime() > 0) { this.lastServerPacketId = pkt.getTime(); } return(Singleton <NotifyManager> .Instance.FireNotify(new Notify(NotifyTypes.NetwrokPacket, pkt))); }
public override bool OnPacket(NetPacketV1 pkt) { if (pkt.getCmdId() == 0xd8) { this.OnBuyGachaTicketRsp(pkt.getData <BuyGachaTicketRsp>()); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { if (pkt.getCmdId() == 0xd6) { this.OnExchangeRedeemCodeRsp(pkt.getData <ExchangeRedeemCodeRsp>()); } return(false); }
private List <NetPacketV1> recvPacketList() { if (!this.isConnected()) { return(null); } List <NetPacketV1> list = new List <NetPacketV1>(); try { NetPacketV1 tv; byte[] buffer = new byte[0x40000]; SocketError success = SocketError.Success; int length = this.socket_.Receive(buffer, 0, buffer.Length, SocketFlags.None, out success); switch (success) { case SocketError.TimedOut: case SocketError.WouldBlock: case SocketError.IOPending: return(list); } if ((success != SocketError.Success) || (length == 0)) { this.socket_.Close(); this.socket_ = null; return(list); } byte[] destinationArray = new byte[0x40000]; Array.Copy(this.left_buf_, 0, destinationArray, 0, this.left_buf_len_); Array.Copy(buffer, 0, destinationArray, this.left_buf_len_, length); int num2 = length + this.left_buf_len_; this.left_buf_len_ = 0; for (int i = num2; i > 0; i -= tv.getPacketLen()) { byte[] buffer3 = new byte[i]; Array.Copy(destinationArray, num2 - i, buffer3, 0, i); tv = new NetPacketV1(); PacketStatus status = tv.deserialize(ref buffer3); if (status != PacketStatus.PACKET_CORRECT) { if (status == PacketStatus.PACKET_NOT_COMPLETE) { this.left_buf_len_ = i; Array.Copy(buffer3, 0, this.left_buf_, 0, this.left_buf_len_); } return(list); } list.Add(tv); } } catch (SystemException) { if (this.isConnected()) { } } return(list); }
public override bool OnPacket(NetPacketV1 pkt) { if (pkt.getCmdId() == 0x49) { GetPlayerDetailDataRsp rsp = pkt.getData <GetPlayerDetailDataRsp>(); this.OnSearchFriendDetailInfoRsp(rsp); } return(false); }
private bool HandlePacketForModules(NetPacketV1 pkt) { bool flag = false; for (int i = 0; i < this._moduleList.Count; i++) { flag |= this._moduleList[i].OnPacket(pkt); } return(flag); }
public bool setKeepalive(int time_ms, NetPacketV1 packet) { if ((time_ms <= 0) || (packet == null)) { return(false); } this.keepalive_time_ms_ = time_ms; this.keepalive_packet_ = packet; return(true); }
private void clientConsumerThreadHandler() { while (this.isConnected() || (0 < this.recv_queue_.Count)) { NetPacketV1 tv = this.recv(-1); if (tv != null) { this.doCmd_callback_(tv); } } }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x19: return(this.SetupView()); case 30: return(this.OnAvatarStarUpRsp(pkt.getData <AvatarStarUpRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0xc6: return(this.OnGetVipRewardDataRsp(pkt.getData <GetVipRewardDataRsp>())); case 200: return(this.OnGetVipRewardRsp(pkt.getData <GetVipRewardRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x80: return(this.OnGetFinishGuideDataRsp(pkt.getData <GetFinishGuideDataRsp>())); case 130: return(this.OnFinishGuideReportRsp(pkt.getData <FinishGuideReportRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x90: return(this.OnStageEndRsp(pkt.getData <EndlessStageEndRsp>())); case 0x8e: return(this.OnStageBeginRsp(pkt.getData <EndlessStageBeginRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x43: return(this.OnAddFriendRsp(pkt.getData <AddFriendRsp>())); case 0x45: return(this.OnDelFriendRsp(pkt.getData <DelFriendRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 40: return(this.OnDressEquipmentRsp(pkt.getData <DressEquipmentRsp>())); case 0x88: return(this.OnExchangeAvatarWeaponRsp(pkt.getData <ExchangeAvatarWeaponRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0xca: return(this.OnGetShopListRsp(pkt.getData <GetShopListRsp>())); case 0xcc: return(this.OnBuyGoodsRsp(pkt.getData <BuyGoodsRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x1b: return(this.OnGetEquipmentDataRsp(pkt.getData <GetEquipmentDataRsp>())); case 0x24: return(this.OnAddAvatarExpByMaterialRsp(pkt.getData <AddAvatarExpByMaterialRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x7a: return(this.OnGetSignInRewardStatusRsp(pkt.getData <GetSignInRewardStatusRsp>())); case 0x7c: return(this.OnGetSignInRewardRsp(pkt.getData <GetSignInRewardRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x3f: return(this.OnGetGachaDisplayRsp(pkt.getData <GetGachaDisplayRsp>())); case 0x3b: return(this.OnGachaRsp(pkt.getData <GachaRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x20: return(this.OnEquipmentPowerUpRsp(pkt.getData <EquipmentPowerUpRsp>())); case 0x4b: this.SetupItemProtectedStatus(); break; } return(false); }
public override bool OnPacket(NetPacketV1 packet) { switch (packet.getCmdId()) { case 0x19: return(this.OnGetAvatarDataRsp(packet.getData <GetAvatarDataRsp>())); case 0x6f: return(this.OnGetConfigDataRsp(packet.getData <GetConfigRsp>())); case 0x9b: return(this.OnAddGoodfeelRsp(packet.getData <AddGoodfeelRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x63: return(this.OnGetProductsListRsp(pkt.getData <GetProductListRsp>())); case 0x53: return(this.OnRechargeSuccNotify(pkt.getData <RechargeFinishNotify>())); case 0xd0: return(this.OnCreateWeiXinOrderRsp(pkt.getData <CreateWeiXinOrderRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x4b: this.SetupItemProtectedStatus(); break; case 0xc0: return(this.OnIdentifyStigmataAffixRsp(pkt.getData <IdentifyStigmataAffixRsp>())); case 40: case 0x88: return(this.SetupView()); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0x41: case 80: this.SetupFriendListTab(); break; case 0x4d: this.OnGetRecommandListRsp(pkt.getData <GetRecommendFriendListRsp>()); this.PlayCurrentTabAnim(); break; case 0x47: this.SetupRequestListTab(); this.PlayCurrentTabAnim(); break; case 0x49: this.OnPlayerDetailRsp(pkt.getData <GetPlayerDetailDataRsp>()); break; case 0x43: this.OnAddFriendRsp(pkt.getData <AddFriendRsp>()); break; case 0x45: this.OnDelFriendRsp(pkt.getData <DelFriendRsp>()); break; case 0xe2: this.OnGetInviteeFriendRsp(pkt.getData <GetInviteeFriendRsp>()); break; case 0xe0: this.OnGetInviteFriendRsp(pkt.getData <GetInviteFriendRsp>()); break; case 0xe4: this.OnGetAcceptFriendInviteRsp(pkt.getData <AcceptFriendInviteRsp>()); break; } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 5: return(this.OnGetPlayerTokenRsp(pkt.getData <GetPlayerTokenRsp>())); case 7: return(this.OnPlayerLoginRsp(pkt.getData <PlayerLoginRsp>())); case 11: return(this.OnGetMainDataRsp(pkt.getData <GetMainDataRsp>())); case 0x6f: return(this.OnGetConfigDataRsp(pkt.getData <GetConfigRsp>())); case 13: return(this.OnGetScoinExchangeInfoRsp(pkt.getData <GetScoinExchangeInfoRsp>())); case 0x11: return(this.OnGetStaminaExchangeInfoRsp(pkt.getData <GetStaminaExchangeInfoRsp>())); case 0x30: return(this.OnGetAvatarTeamDataRsp(pkt.getData <GetAvatarTeamDataRsp>())); case 0x35: return(this.OnGetSkillPointExchangeInfoRsp(pkt.getData <GetSkillPointExchangeInfoRsp>())); case 0x51: return(this.OnGetOfflineFriendsPointNotify(pkt.getData <GetOfflineFriendsPointNotify>())); case 120: return(this.OnBindAccountRsp(pkt.getData <BindAccountRsp>())); case 0x7a: return(this.OnGetSignInRewardStatusRsp(pkt.getData <GetSignInRewardStatusRsp>())); case 0x92: return(this.OnGetLastEndlessRewardDataRsp(pkt.getData <GetLastEndlessRewardDataRsp>())); case 0xda: return(this.OnAntiCheatSDKReportRsp(pkt.getData <AntiCheatSDKReportRsp>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 140: case 220: return(this.SetupView()); case 0x97: return(this.OnEndlessPlayerDataUpdateNotify(pkt.getData <EndlessPlayerDataUpdateNotify>())); case 0x92: return(this.OnGetLastEndlessRewardDataRsp(pkt.getData <GetLastEndlessRewardDataRsp>())); case 0x99: return(this.OnEndlessWarInfoNotify(pkt.getData <EndlessWarInfoNotify>())); } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0xc6: this.SetupWelfareHint(); return(this.OnGetVipRewardDataRsp(pkt.getData <GetVipRewardDataRsp>())); case 200: this.SetupWelfareHint(); return(this.OnGetVipRewardRsp(pkt.getData <GetVipRewardRsp>())); case 0xce: return(this.OnManualRefreshShopRsp(pkt.getData <ManualRefreshShopRsp>())); case 0x53: return(this.OnRechargeSuccNotify(pkt.getData <RechargeFinishNotify>())); } return(false); }
public bool FireNotify(Notify cmd) { bool flag = false; if (cmd.type == NotifyTypes.NetwrokPacket) { NetPacketV1 body = cmd.body as NetPacketV1; flag |= this.HandlePacketForModules(body); } BaseContext[] contextArray = new BaseContext[this._contextList.Count]; this._contextList.CopyTo(contextArray); foreach (BaseContext context in contextArray) { if (context != null) { flag |= context.HandleNotify(cmd); } } return(false); }
public override bool OnPacket(NetPacketV1 pkt) { switch (pkt.getCmdId()) { case 0xca: return(this.OnGetShopListRsp(pkt.getData <GetShopListRsp>())); case 0xcc: return(this.OnBuyGoodsRsp(pkt.getData <BuyGoodsRsp>())); case 0xce: return(this.OnManualRefreshShopRsp(pkt.getData <ManualRefreshShopRsp>())); case 11: return(this.OnGetMainDataRsp(pkt.getData <GetMainDataRsp>())); case 0xd8: return(this.OnBuyGachaTicket(pkt.getData <BuyGachaTicketRsp>())); } return(false); }