Exemplo n.º 1
0
    public void InitItemData(SSActorInfo?sSActorInfo)
    {
        if (sSActorInfo != null)
        {
            ItemDataInfo = sSActorInfo.Value;
            //this.RoleLevel.SetText(GetItemData(ItemDataType.Level));
            this.RoleLevelNumber.SetText(ItemDataInfo.lLevel.ToString());
            this.RoleName.SetText(GetItemData(ItemDataType.Name));

            if (ItemDataInfo.byKind == 1)
            {
                Jiangke_vocation.enabled = true;
                Cike_vocation.enabled    = false;
            }
            else if (ItemDataInfo.byKind == 4)
            {
                Jiangke_vocation.enabled = false;
                Cike_vocation.enabled    = true;
            }
        }
        else
        {
            RoleLevel.text = "";
            RoleLevel.text = "";
        }
    }
Exemplo n.º 2
0
    public byte   lKillFlag;            // 封号标志,0:正常,1:封号

    public static SSActorInfo ParsePackage(byte[] dataBuffer, ref int offset)
    {
        SSActorInfo sSActorInfo = new SSActorInfo();

        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.szName, 19);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.lActorID);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.byKind);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.lLevel);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.byServerID);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.lMapID);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.byBackServerID);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.lBackMapID);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.AppearRes, 8);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.szServerIP, 16);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.wPort);
        offset += PackageHelper.ReadData(dataBuffer.Skip(offset).ToArray(), out sSActorInfo.lKillFlag);

        return(sSActorInfo);
    }
Exemplo n.º 3
0
    public static NewSSUserLoginRes ParsePackage(byte[] dataBuffer)
    {
        Package package = PackageHelper.ParseReceiveData(dataBuffer);

        NewSSUserLoginRes sSUserLoginRes = new NewSSUserLoginRes();
        int offset = 0;

        offset += PackageHelper.ReadData(package.Data.Skip(offset).ToArray(), out sSUserLoginRes.lUserID);
        offset += PackageHelper.ReadData(package.Data.Skip(offset).ToArray(), out sSUserLoginRes.lActorNum);
        offset += PackageHelper.ReadData(package.Data.Skip(offset).ToArray(), out sSUserLoginRes.lPromptFlag);
        offset += PackageHelper.ReadData(package.Data.Skip(offset).ToArray(), out sSUserLoginRes.lPromptMsg, 256);

        sSUserLoginRes.SSActorInfos = new SSActorInfo[sSUserLoginRes.lActorNum];
        for (int i = 0; i < sSUserLoginRes.lActorNum; i++)
        {
            sSUserLoginRes.SSActorInfos[i] = SSActorInfo.ParsePackage(package.Data, ref offset);
        }
        return(sSUserLoginRes);
    }
Exemplo n.º 4
0
 public void Show(SSActorInfo ssActorInfo)
 {
     this.m_ssActorInfo      = ssActorInfo;
     this.InputLabel.text    = "";
     transform.localPosition = new Vector3(0, 0, -80);
 }