Exemple #1
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.system = (SystemPartData)stream.readDataSimpleNotNull();

        this.gfunc = (GFuncPartData)stream.readDataSimpleNotNull();

        this.activity = (ActivityPartData)stream.readDataSimpleNotNull();

        this.grole = (GRolePartData)stream.readDataSimpleNotNull();

        this.gscene = (GScenePartData)stream.readDataSimpleNotNull();

        this.gcharacter = (GCharacterPartData)stream.readDataSimpleNotNull();

        this.social = (SocialPartData)stream.readDataSimpleNotNull();

        this.gbag = (GBagPartData)stream.readDataSimpleNotNull();

        this.mail = (MailPartData)stream.readDataSimpleNotNull();

        this.quest = (QuestPartData)stream.readDataSimpleNotNull();

        this.guide = (GuidePartData)stream.readDataSimpleNotNull();

        this.gfriend = (GFriendPartData)stream.readDataSimpleNotNull();

        this.gunion = (GUnionPartData)stream.readDataSimpleNotNull();

        this.gteam = (GTeamPartData)stream.readDataSimpleNotNull();
    }
Exemple #2
0
 /// <summary>
 /// 初始化列表数据
 /// </summary>
 public override void initListData()
 {
     system     = new SystemPartData();
     gfunc      = new GFuncPartData();
     func       = gfunc;
     activity   = new ActivityPartData();
     grole      = new GRolePartData();
     role       = grole;
     gscene     = new GScenePartData();
     scene      = gscene;
     gcharacter = new GCharacterPartData();
     character  = gcharacter;
     social     = new SocialPartData();
     gbag       = new GBagPartData();
     bag        = gbag;
     mail       = new MailPartData();
     quest      = new QuestPartData();
     guide      = new GuidePartData();
     gfriend    = new GFriendPartData();
     friend     = gfriend;
     gunion     = new GUnionPartData();
     union      = gunion;
     gteam      = new GTeamPartData();
     team       = gteam;
 }
Exemple #3
0
 /// <summary>
 /// 回池
 /// </summary>
 protected override void toRelease(DataPool pool)
 {
     this.system     = null;
     this.gfunc      = null;
     this.activity   = null;
     this.grole      = null;
     this.gscene     = null;
     this.gcharacter = null;
     this.social     = null;
     this.gbag       = null;
     this.mail       = null;
     this.quest      = null;
     this.guide      = null;
     this.gfriend    = null;
     this.gunion     = null;
     this.gteam      = null;
 }
Exemple #4
0
    /// <summary>
    /// 复制(潜拷贝)
    /// </summary>
    protected override void toShadowCopy(BaseData data)
    {
        if (!(data is GPlayerListData))
        {
            return;
        }

        GPlayerListData mData = (GPlayerListData)data;

        this.system     = mData.system;
        this.gfunc      = mData.gfunc;
        this.activity   = mData.activity;
        this.grole      = mData.grole;
        this.gscene     = mData.gscene;
        this.gcharacter = mData.gcharacter;
        this.social     = mData.social;
        this.gbag       = mData.gbag;
        this.mail       = mData.mail;
        this.quest      = mData.quest;
        this.guide      = mData.guide;
        this.gfriend    = mData.gfriend;
        this.gunion     = mData.gunion;
        this.gteam      = mData.gteam;
    }
Exemple #5
0
    public override void setData(BaseData data)
    {
        base.setData(data);

        _d = (GFriendPartData)data;
    }
Exemple #6
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is GPlayerListData))
        {
            return;
        }

        GPlayerListData mData = (GPlayerListData)data;

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

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

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

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

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

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

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

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

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

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

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

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

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

        if (mData.gteam != null)
        {
            this.gteam = (GTeamPartData)mData.gteam.clone();
        }
        else
        {
            this.gteam = null;
            nullObjError("gteam");
        }
    }
Exemple #7
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        stream.startReadObj();

        BaseData systemT = stream.readDataFullNotNull();

        if (systemT != null)
        {
            if (systemT is SystemPartData)
            {
                this.system = (SystemPartData)systemT;
            }
            else
            {
                this.system = new SystemPartData();
                if (!(systemT.GetType().IsAssignableFrom(typeof(SystemPartData))))
                {
                    stream.throwTypeReadError(typeof(SystemPartData), systemT.GetType());
                }
                this.system.shadowCopy(systemT);
            }
        }
        else
        {
            this.system = null;
        }

        BaseData gfuncT = stream.readDataFullNotNull();

        if (gfuncT != null)
        {
            if (gfuncT is GFuncPartData)
            {
                this.gfunc = (GFuncPartData)gfuncT;
            }
            else
            {
                this.gfunc = new GFuncPartData();
                if (!(gfuncT.GetType().IsAssignableFrom(typeof(GFuncPartData))))
                {
                    stream.throwTypeReadError(typeof(GFuncPartData), gfuncT.GetType());
                }
                this.gfunc.shadowCopy(gfuncT);
            }
        }
        else
        {
            this.gfunc = null;
        }

        BaseData activityT = stream.readDataFullNotNull();

        if (activityT != null)
        {
            if (activityT is ActivityPartData)
            {
                this.activity = (ActivityPartData)activityT;
            }
            else
            {
                this.activity = new ActivityPartData();
                if (!(activityT.GetType().IsAssignableFrom(typeof(ActivityPartData))))
                {
                    stream.throwTypeReadError(typeof(ActivityPartData), activityT.GetType());
                }
                this.activity.shadowCopy(activityT);
            }
        }
        else
        {
            this.activity = null;
        }

        BaseData groleT = stream.readDataFullNotNull();

        if (groleT != null)
        {
            if (groleT is GRolePartData)
            {
                this.grole = (GRolePartData)groleT;
            }
            else
            {
                this.grole = new GRolePartData();
                if (!(groleT.GetType().IsAssignableFrom(typeof(GRolePartData))))
                {
                    stream.throwTypeReadError(typeof(GRolePartData), groleT.GetType());
                }
                this.grole.shadowCopy(groleT);
            }
        }
        else
        {
            this.grole = null;
        }

        BaseData gsceneT = stream.readDataFullNotNull();

        if (gsceneT != null)
        {
            if (gsceneT is GScenePartData)
            {
                this.gscene = (GScenePartData)gsceneT;
            }
            else
            {
                this.gscene = new GScenePartData();
                if (!(gsceneT.GetType().IsAssignableFrom(typeof(GScenePartData))))
                {
                    stream.throwTypeReadError(typeof(GScenePartData), gsceneT.GetType());
                }
                this.gscene.shadowCopy(gsceneT);
            }
        }
        else
        {
            this.gscene = null;
        }

        BaseData gcharacterT = stream.readDataFullNotNull();

        if (gcharacterT != null)
        {
            if (gcharacterT is GCharacterPartData)
            {
                this.gcharacter = (GCharacterPartData)gcharacterT;
            }
            else
            {
                this.gcharacter = new GCharacterPartData();
                if (!(gcharacterT.GetType().IsAssignableFrom(typeof(GCharacterPartData))))
                {
                    stream.throwTypeReadError(typeof(GCharacterPartData), gcharacterT.GetType());
                }
                this.gcharacter.shadowCopy(gcharacterT);
            }
        }
        else
        {
            this.gcharacter = null;
        }

        BaseData socialT = stream.readDataFullNotNull();

        if (socialT != null)
        {
            if (socialT is SocialPartData)
            {
                this.social = (SocialPartData)socialT;
            }
            else
            {
                this.social = new SocialPartData();
                if (!(socialT.GetType().IsAssignableFrom(typeof(SocialPartData))))
                {
                    stream.throwTypeReadError(typeof(SocialPartData), socialT.GetType());
                }
                this.social.shadowCopy(socialT);
            }
        }
        else
        {
            this.social = null;
        }

        BaseData gbagT = stream.readDataFullNotNull();

        if (gbagT != null)
        {
            if (gbagT is GBagPartData)
            {
                this.gbag = (GBagPartData)gbagT;
            }
            else
            {
                this.gbag = new GBagPartData();
                if (!(gbagT.GetType().IsAssignableFrom(typeof(GBagPartData))))
                {
                    stream.throwTypeReadError(typeof(GBagPartData), gbagT.GetType());
                }
                this.gbag.shadowCopy(gbagT);
            }
        }
        else
        {
            this.gbag = null;
        }

        BaseData mailT = stream.readDataFullNotNull();

        if (mailT != null)
        {
            if (mailT is MailPartData)
            {
                this.mail = (MailPartData)mailT;
            }
            else
            {
                this.mail = new MailPartData();
                if (!(mailT.GetType().IsAssignableFrom(typeof(MailPartData))))
                {
                    stream.throwTypeReadError(typeof(MailPartData), mailT.GetType());
                }
                this.mail.shadowCopy(mailT);
            }
        }
        else
        {
            this.mail = null;
        }

        BaseData questT = stream.readDataFullNotNull();

        if (questT != null)
        {
            if (questT is QuestPartData)
            {
                this.quest = (QuestPartData)questT;
            }
            else
            {
                this.quest = new QuestPartData();
                if (!(questT.GetType().IsAssignableFrom(typeof(QuestPartData))))
                {
                    stream.throwTypeReadError(typeof(QuestPartData), questT.GetType());
                }
                this.quest.shadowCopy(questT);
            }
        }
        else
        {
            this.quest = null;
        }

        BaseData guideT = stream.readDataFullNotNull();

        if (guideT != null)
        {
            if (guideT is GuidePartData)
            {
                this.guide = (GuidePartData)guideT;
            }
            else
            {
                this.guide = new GuidePartData();
                if (!(guideT.GetType().IsAssignableFrom(typeof(GuidePartData))))
                {
                    stream.throwTypeReadError(typeof(GuidePartData), guideT.GetType());
                }
                this.guide.shadowCopy(guideT);
            }
        }
        else
        {
            this.guide = null;
        }

        BaseData gfriendT = stream.readDataFullNotNull();

        if (gfriendT != null)
        {
            if (gfriendT is GFriendPartData)
            {
                this.gfriend = (GFriendPartData)gfriendT;
            }
            else
            {
                this.gfriend = new GFriendPartData();
                if (!(gfriendT.GetType().IsAssignableFrom(typeof(GFriendPartData))))
                {
                    stream.throwTypeReadError(typeof(GFriendPartData), gfriendT.GetType());
                }
                this.gfriend.shadowCopy(gfriendT);
            }
        }
        else
        {
            this.gfriend = null;
        }

        BaseData gunionT = stream.readDataFullNotNull();

        if (gunionT != null)
        {
            if (gunionT is GUnionPartData)
            {
                this.gunion = (GUnionPartData)gunionT;
            }
            else
            {
                this.gunion = new GUnionPartData();
                if (!(gunionT.GetType().IsAssignableFrom(typeof(GUnionPartData))))
                {
                    stream.throwTypeReadError(typeof(GUnionPartData), gunionT.GetType());
                }
                this.gunion.shadowCopy(gunionT);
            }
        }
        else
        {
            this.gunion = null;
        }

        BaseData gteamT = stream.readDataFullNotNull();

        if (gteamT != null)
        {
            if (gteamT is GTeamPartData)
            {
                this.gteam = (GTeamPartData)gteamT;
            }
            else
            {
                this.gteam = new GTeamPartData();
                if (!(gteamT.GetType().IsAssignableFrom(typeof(GTeamPartData))))
                {
                    stream.throwTypeReadError(typeof(GTeamPartData), gteamT.GetType());
                }
                this.gteam.shadowCopy(gteamT);
            }
        }
        else
        {
            this.gteam = null;
        }

        stream.endReadObj();
    }