コード例 #1
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is RoleSocialData))
        {
            return;
        }

        RoleSocialData mData = (RoleSocialData)data;

        if (mData.showData != null)
        {
            this.showData = (RoleShowData)mData.showData.clone();
        }
        else
        {
            this.showData = null;
            nullObjError("showData");
        }

        this.isOnline = mData.isOnline;

        this.lastOnlineTime = mData.lastOnlineTime;

        if (mData.location != null)
        {
            this.location = (SceneLocationData)mData.location.clone();
        }
        else
        {
            this.location = null;
        }
    }
コード例 #2
0
    /// <summary>
    /// 初始化初值
    /// </summary>
    public override void initDefault()
    {
        base.initDefault();

        this.roleShowData = new RoleShowData();
        this.roleShowData.initDefault();
    }
コード例 #3
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
 /// <summary>
 /// 回池
 /// </summary>
 protected override void toRelease(DataPool pool)
 {
     this.showData       = null;
     this.isOnline       = false;
     this.lastOnlineTime = 0L;
     this.location       = null;
 }
コード例 #4
0
ファイル: RoleShowData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is RoleShowData))
        {
            return;
        }

        RoleShowData mData = (RoleShowData)data;

        this.playerID = mData.playerID;

        this.createAreaID = mData.createAreaID;

        this.name = mData.name;

        this.sex = mData.sex;

        this.vocation = mData.vocation;

        this.level = mData.level;

        this.fightForce = mData.fightForce;

        this.unionID = mData.unionID;

        this.unionName = mData.unionName;
    }
コード例 #5
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is InviteRoleGroupReceiveData))
        {
            return;
        }

        InviteRoleGroupReceiveData mData = (InviteRoleGroupReceiveData)data;

        if (mData.inviter != null)
        {
            this.inviter = (RoleShowData)mData.inviter.clone();
        }
        else
        {
            this.inviter = null;
            nullObjError("inviter");
        }

        if (mData.simpleData != null)
        {
            this.simpleData = (RoleGroupSimpleData)mData.simpleData.clone();
        }
        else
        {
            this.simpleData = null;
        }

        this.time = mData.time;
    }
コード例 #6
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        stream.startReadObj();

        BaseData inviterT = stream.readDataFullNotNull();

        if (inviterT != null)
        {
            if (inviterT is RoleShowData)
            {
                this.inviter = (RoleShowData)inviterT;
            }
            else
            {
                this.inviter = new RoleShowData();
                if (!(inviterT.GetType().IsAssignableFrom(typeof(RoleShowData))))
                {
                    stream.throwTypeReadError(typeof(RoleShowData), inviterT.GetType());
                }
                this.inviter.shadowCopy(inviterT);
            }
        }
        else
        {
            this.inviter = null;
        }

        if (stream.readBoolean())
        {
            BaseData simpleDataT = stream.readDataFullNotNull();
            if (simpleDataT != null)
            {
                if (simpleDataT is RoleGroupSimpleData)
                {
                    this.simpleData = (RoleGroupSimpleData)simpleDataT;
                }
                else
                {
                    this.simpleData = new RoleGroupSimpleData();
                    if (!(simpleDataT.GetType().IsAssignableFrom(typeof(RoleGroupSimpleData))))
                    {
                        stream.throwTypeReadError(typeof(RoleGroupSimpleData), simpleDataT.GetType());
                    }
                    this.simpleData.shadowCopy(simpleDataT);
                }
            }
            else
            {
                this.simpleData = null;
            }
        }
        else
        {
            this.simpleData = null;
        }

        this.time = stream.readLong();

        stream.endReadObj();
    }
コード例 #7
0
    /** 邀请结果 */
    public void onInviteResult(RoleShowData data, int result)
    {
        evt.roleShowData = data;
        evt.result       = result;

        me.dispatch(GameEventType.RoleGroupInviteResult, evt);
    }
コード例 #8
0
    /// <summary>
    /// 回池
    /// </summary>
    protected override void toRelease(DataPool pool)
    {
        base.toRelease(pool);

        this.syncIndex    = 0;
        this.roleShowData = null;
    }
コード例 #9
0
 /// <summary>
 /// 回池
 /// </summary>
 protected override void toRelease(DataPool pool)
 {
     this.playerID  = 0L;
     this.showData  = null;
     this.attribute = null;
     this.force     = null;
 }
コード例 #10
0
 /// <summary>
 /// 写入字节流(简版)
 /// </summary>
 protected override void toWriteBytesSimple(BytesWriteStream stream)
 {
     if (this.signedPlayers != null)
     {
         stream.writeBoolean(true);
         RoleShowData[] signedPlayersT = this.signedPlayers;
         stream.writeLen(signedPlayersT.Length);
         for (int signedPlayersVI = 0, signedPlayersVLen = signedPlayersT.Length; signedPlayersVI < signedPlayersVLen; ++signedPlayersVI)
         {
             RoleShowData signedPlayersV = signedPlayersT[signedPlayersVI];
             if (signedPlayersV != null)
             {
                 stream.writeBoolean(true);
                 stream.writeDataSimpleNotNull(signedPlayersV);
             }
             else
             {
                 stream.writeBoolean(false);
             }
         }
     }
     else
     {
         stream.writeBoolean(false);
     }
 }
コード例 #11
0
    /// <summary>
    /// 创建角色展示数据
    /// </summary>
    public RoleShowData createRoleShowData()
    {
        RoleShowData data = GameC.factory.createRoleShowData();

        makeRoleShowData(data);
        return(data);
    }
コード例 #12
0
    /// <summary>
    /// 回池
    /// </summary>
    protected override void toRelease(DataPool pool)
    {
        base.toRelease(pool);

        this.showData = null;
        this.result   = 0;
    }
コード例 #13
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        base.toReadBytesFull(stream);

        stream.startReadObj();

        this.syncIndex = stream.readInt();

        BaseData roleShowDataT = stream.readDataFullNotNull();

        if (roleShowDataT != null)
        {
            if (roleShowDataT is RoleShowData)
            {
                this.roleShowData = (RoleShowData)roleShowDataT;
            }
            else
            {
                this.roleShowData = new RoleShowData();
                if (!(roleShowDataT.GetType().IsAssignableFrom(typeof(RoleShowData))))
                {
                    stream.throwTypeReadError(typeof(RoleShowData), roleShowDataT.GetType());
                }
                this.roleShowData.shadowCopy(roleShowDataT);
            }
        }
        else
        {
            this.roleShowData = null;
        }

        stream.endReadObj();
    }
コード例 #14
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.syncIndex = stream.readInt();

        this.roleShowData = (RoleShowData)stream.readDataSimpleNotNull();
    }
コード例 #15
0
    /// <summary>
    /// 构造角色展示数据
    /// </summary>
    public virtual void makeRoleShowData(RoleShowData data)
    {
        data.playerID     = playerID;
        data.createAreaID = _d.createAreaID;
        data.name         = _d.name;

        data.sex      = _d.sex;
        data.level    = _d.level;
        data.vocation = _d.vocation;
    }
コード例 #16
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        stream.startReadObj();

        if (stream.readBoolean())
        {
            int signedPlayersLen = stream.readLen();
            if (this.signedPlayers == null || this.signedPlayers.Length != signedPlayersLen)
            {
                this.signedPlayers = new RoleShowData[signedPlayersLen];
            }
            RoleShowData[] signedPlayersT = this.signedPlayers;
            for (int signedPlayersI = 0; signedPlayersI < signedPlayersLen; ++signedPlayersI)
            {
                RoleShowData signedPlayersV;
                if (stream.readBoolean())
                {
                    BaseData signedPlayersVT = stream.readDataFullNotNull();
                    if (signedPlayersVT != null)
                    {
                        if (signedPlayersVT is RoleShowData)
                        {
                            signedPlayersV = (RoleShowData)signedPlayersVT;
                        }
                        else
                        {
                            signedPlayersV = new RoleShowData();
                            if (!(signedPlayersVT.GetType().IsAssignableFrom(typeof(RoleShowData))))
                            {
                                stream.throwTypeReadError(typeof(RoleShowData), signedPlayersVT.GetType());
                            }
                            signedPlayersV.shadowCopy(signedPlayersVT);
                        }
                    }
                    else
                    {
                        signedPlayersV = null;
                    }
                }
                else
                {
                    signedPlayersV = null;
                }

                signedPlayersT[signedPlayersI] = signedPlayersV;
            }
        }
        else
        {
            this.signedPlayers = null;
        }

        stream.endReadObj();
    }
コード例 #17
0
 /** 不清funcID */
 public override void clear()
 {
     groupID      = -1;
     targetID     = -1;
     type         = 0;
     result       = 0;
     oldTitle     = 0;
     newTitle     = 0;
     applyData    = null;
     changeData   = null;
     roleShowData = null;
 }
コード例 #18
0
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is PlayerMatchData))
        {
            return;
        }

        PlayerMatchData mData = (PlayerMatchData)data;

        this.showData = mData.showData;
        this.value    = mData.value;
    }
コード例 #19
0
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is InviteRoleGroupReceiveData))
        {
            return;
        }

        InviteRoleGroupReceiveData mData = (InviteRoleGroupReceiveData)data;

        this.inviter    = mData.inviter;
        this.simpleData = mData.simpleData;
        this.time       = mData.time;
    }
コード例 #20
0
ファイル: PlayerMailData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        base.toShadowCopy(data);

        if (!(data is PlayerMailData))
        {
            return;
        }

        PlayerMailData mData = (PlayerMailData)data;

        this.roleData = mData.roleData;
    }
コード例 #21
0
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        base.toShadowCopy(data);

        if (!(data is RoleShowInfoLogData))
        {
            return;
        }

        RoleShowInfoLogData mData = (RoleShowInfoLogData)data;

        this.showData = mData.showData;
    }
コード例 #22
0
ファイル: PlayerRankData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        base.toShadowCopy(data);

        if (!(data is PlayerRankData))
        {
            return;
        }

        PlayerRankData mData = (PlayerRankData)data;

        this.showData = mData.showData;
    }
コード例 #23
0
ファイル: RoleShowData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        RoleShowData mData = (RoleShowData)data;

        if (this.playerID != mData.playerID)
        {
            return(false);
        }

        if (this.createAreaID != mData.createAreaID)
        {
            return(false);
        }

        if (this.name != mData.name)
        {
            return(false);
        }

        if (this.sex != mData.sex)
        {
            return(false);
        }

        if (this.vocation != mData.vocation)
        {
            return(false);
        }

        if (this.level != mData.level)
        {
            return(false);
        }

        if (this.fightForce != mData.fightForce)
        {
            return(false);
        }

        if (this.unionID != mData.unionID)
        {
            return(false);
        }

        if (this.unionName != mData.unionName)
        {
            return(false);
        }

        return(true);
    }
コード例 #24
0
    /// <summary>
    /// 是否数据一致
    /// </summary>
    protected override bool toDataEquals(BaseData data)
    {
        ScenePreInfoData mData = (ScenePreInfoData)data;

        if (mData.signedPlayers != null)
        {
            if (this.signedPlayers == null)
            {
                return(false);
            }
            if (this.signedPlayers.Length != mData.signedPlayers.Length)
            {
                return(false);
            }
            RoleShowData[] signedPlayersT   = this.signedPlayers;
            RoleShowData[] signedPlayersR   = mData.signedPlayers;
            int            signedPlayersLen = signedPlayersT.Length;
            for (int signedPlayersI = 0; signedPlayersI < signedPlayersLen; ++signedPlayersI)
            {
                RoleShowData signedPlayersU = signedPlayersT[signedPlayersI];
                RoleShowData signedPlayersV = signedPlayersR[signedPlayersI];
                if (signedPlayersV != null)
                {
                    if (signedPlayersU == null)
                    {
                        return(false);
                    }
                    if (!signedPlayersU.dataEquals(signedPlayersV))
                    {
                        return(false);
                    }
                }
                else
                {
                    if (signedPlayersU != null)
                    {
                        return(false);
                    }
                }
            }
        }
        else
        {
            if (this.signedPlayers != null)
            {
                return(false);
            }
        }

        return(true);
    }
コード例 #25
0
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is SceneRoleData))
        {
            return;
        }

        SceneRoleData mData = (SceneRoleData)data;

        this.playerID  = mData.playerID;
        this.showData  = mData.showData;
        this.attribute = mData.attribute;
        this.force     = mData.force;
    }
コード例 #26
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is RoleSocialData))
        {
            return;
        }

        RoleSocialData mData = (RoleSocialData)data;

        this.showData       = mData.showData;
        this.isOnline       = mData.isOnline;
        this.lastOnlineTime = mData.lastOnlineTime;
        this.location       = mData.location;
    }
コード例 #27
0
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        base.toShadowCopy(data);

        if (!(data is CharacterIdentityData))
        {
            return;
        }

        CharacterIdentityData mData = (CharacterIdentityData)data;

        this.syncIndex    = mData.syncIndex;
        this.roleShowData = mData.roleShowData;
    }
コード例 #28
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.inviter = (RoleShowData)stream.readDataSimpleNotNull();

        if (stream.readBoolean())
        {
            this.simpleData = (RoleGroupSimpleData)stream.readDataSimpleNotNull();
        }
        else
        {
            this.simpleData = null;
        }

        this.time = stream.readLong();
    }
コード例 #29
0
ファイル: RoleSocialData.cs プロジェクト: shineTeam7/home3
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.showData = (RoleShowData)stream.readDataSimpleNotNull();

        this.isOnline = stream.readBoolean();

        this.lastOnlineTime = stream.readLong();

        if (stream.readBoolean())
        {
            this.location = (SceneLocationData)stream.readDataSimpleNotNull();
        }
        else
        {
            this.location = null;
        }
    }
コード例 #30
0
ファイル: SceneInOutLogic.cs プロジェクト: shineTeam7/home3
    /** 设置绑定角色逻辑组 */
    public void setSignedLogics(CharacterUseLogic[] logics)
    {
        _logicDic = new LongObjectMap <CharacterUseLogic>();

        int i = 0;

        RoleShowData[] signedUnits = new RoleShowData[logics.Length];

        foreach (CharacterUseLogic v in logics)
        {
            _logicDic.put(v.getPlayerID(), v);
            signedUnits[i++] = v.createRoleShowData();
        }

        //设置指定角色组
        setSignedPlayers(signedUnits);
    }