5398 子 【开发】【1.4】跨服竞技场 / 【前端】【1.4】跨服竞技场开发
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HC103_tagMCExitCrossRealmRefresh), typeof(DTCC103_tagMCExitCrossRealmRefresh));
|
| | | Register(typeof(HAA1D_tagMCActTotalRechargeInfo), typeof(DTCAA1D_tagMCActTotalRechargeInfo));
|
| | | Register(typeof(HAA1C_tagMCTotalRechargePlayerInfo), typeof(DTCAA1C_tagMCTotalRechargePlayerInfo));
|
| | | Register(typeof(HA717_tagMCChatBubbleBoxState), typeof(DTCA717_tagMCChatBubbleBoxState));
|
| | |
| | | public int BasicsDefense;//基础防御
|
| | | public int BasicsScoreAHit;//基础命中
|
| | | public int BasicsDodge;//基础闪避
|
| | | public long treasurePotentialSp
|
| | | {
|
| | | get
|
| | | {
|
| | | public long treasurePotentialSp {
|
| | | get {
|
| | | return ExAttr8 * (long)100000000 + ExAttr7;
|
| | | }
|
| | | }
|
| | |
| | | godWeaponLV_4 = (int)_serverInfo.ExAttr18;
|
| | | }
|
| | |
|
| | | public void UpdateData(HC103_tagMCExitCrossRealmRefresh serverInfo)
|
| | | {
|
| | | PlayerName = serverInfo.PlayerName;
|
| | | MapID = serverInfo.MapID;
|
| | | FBID = serverInfo.FBID;
|
| | | dungeonLineId = serverInfo.FuncLineID;
|
| | | PosX = serverInfo.PosX;
|
| | | PosY = serverInfo.PosY;
|
| | | HP = serverInfo.HP;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void UpdatePlayerData(HC103_tagMCExitCrossRealmRefresh data)
|
| | | {
|
| | | baseData.UpdateData(data);
|
| | | if (RefreshPlayerInfoEvent != null)
|
| | | {
|
| | | RefreshPlayerInfoEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | public void FightRefreshPlayerHp(uint hp)
|
| | | {
|
| | | RefreshProperty(PlayerDataRefresh.HP, hp);
|
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // C1 04 主动退出跨服 #tagCMExitCrossRealm |
| | | |
| | | public class CC104_tagCMExitCrossRealm : GameNetPackBasic |
| | | { |
| | | |
| | | public CC104_tagCMExitCrossRealm() |
| | | { |
| | | combineCmd = (ushort)0x03FE; |
| | | _cmd = (ushort)0xC104; |
| | | } |
| | | |
| | | public override void WriteToBytes() |
| | | { |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 162213b07a435ba4fba1bfc0c20e3dea |
| | | timeCreated: 1545308621 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, December 20, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | |
| | | public class DTCC103_tagMCExitCrossRealmRefresh : DtcBasic |
| | | { |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HC103_tagMCExitCrossRealmRefresh; |
| | | |
| | | GameNetSystem.Instance.crossServerConnected_Loigc = false; |
| | | PlayerDatas.Instance.UpdatePlayerData(package); |
| | | |
| | | LoadingWin.targetMapResId = 1; |
| | | WindowCenter.Instance.Open<LoadingWin>(); |
| | | StageManager.Instance.Load<DungeonStage>(PlayerDatas.Instance.baseData.MapID, true); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 14f7dd7102df83747afb909b5c649715 |
| | | timeCreated: 1545309199 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | get { return mainSocket == null ? 0f : (float)(DateTime.Now - mainSocket.lastPackageTime).TotalSeconds; }
|
| | | }
|
| | |
|
| | | public bool crossServerConnected_Loigc { get; set; }
|
| | | private ClientSocket crossServerSocket;
|
| | | public bool crossServerSocketConnected { get { return crossServerSocket == null ? false : crossServerSocket.connected; } }
|
| | | public bool crossServerSocketConnected { get { return crossServerConnected_Loigc && crossServerSocket == null ? false : crossServerSocket.connected; } }
|
| | |
|
| | | public float timeSinceCrossServerSocketLastProtocol {
|
| | | get { return crossServerSocket == null ? 0f : (float)(DateTime.Now - crossServerSocket.lastPackageTime).TotalSeconds; }
|
| | |
| | | {
|
| | | try
|
| | | {
|
| | | crossServerConnected_Loigc = false;
|
| | | if (crossServerSocketConnected)
|
| | | {
|
| | | crossServerSocket.CloseConnect();
|
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // C1 03 退出跨服刷新 #tagMCExitCrossRealmRefresh |
| | | |
| | | public class HC103_tagMCExitCrossRealmRefresh : GameNetPackBasic |
| | | { |
| | | public string PlayerName; |
| | | public ushort MapID; |
| | | public byte FBID; |
| | | public byte FuncLineID; |
| | | public ushort PosX; |
| | | public ushort PosY; |
| | | public uint HP; |
| | | |
| | | public HC103_tagMCExitCrossRealmRefresh() |
| | | { |
| | | _cmd = (ushort)0xC103; |
| | | } |
| | | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | TransBytes(out PlayerName, vBytes, NetDataType.Chars, 33); |
| | | TransBytes(out MapID, vBytes, NetDataType.WORD); |
| | | TransBytes(out FBID, vBytes, NetDataType.BYTE); |
| | | TransBytes(out FuncLineID, vBytes, NetDataType.BYTE); |
| | | TransBytes(out PosX, vBytes, NetDataType.WORD); |
| | | TransBytes(out PosY, vBytes, NetDataType.WORD); |
| | | TransBytes(out HP, vBytes, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 594f22856ab123f4ca4b9f80b5031090 |
| | | timeCreated: 1545308834 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | return; |
| | | } |
| | | |
| | | GameNetSystem.Instance.crossServerConnected_Loigc = true; |
| | | |
| | | var tagCRoleLoginAsk = new C0108_tagCRoleLoginAsk(); |
| | | tagCRoleLoginAsk.Type = (byte)_type;//进入游戏 |
| | | tagCRoleLoginAsk.ClientID = SDKUtility.Instance.RegistrationID; |