public override void Decode(ByteStream stream)
        {
            this.StateType = (GameStateType)stream.ReadVInt();

            switch (this.StateType)
            {
            case GameStateType.HOME:
                this.LayoutId = stream.ReadVInt();
                this.MapId    = stream.ReadVInt();
                break;

            case GameStateType.NPC_ATTACK:
            case GameStateType.NPC_DUEL:
                this.NpcData = (LogicNpcData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.NPC);
                break;

            case GameStateType.VISIT:
                this.HomeId    = stream.ReadLong();
                this.VisitType = stream.ReadVInt();
                break;

            case GameStateType.CHALLENGE_ATTACK:
                this.ChallengeHomeId     = stream.ReadLong();
                this.ChallengeStreamId   = stream.ReadLong();
                this.ChallengeAllianceId = stream.ReadLong();
                this.ChallengeHomeJSON   = stream.ReadBytes(stream.ReadBytesLength(), 900000);
                this.ChallengeMapId      = stream.ReadVInt();
                break;
            }
        }
        public override void Decode(ByteStream stream)
        {
            this.m_buyResourceData  = (LogicResourceData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.RESOURCE);
            this.m_buyResourceCount = stream.ReadVInt();

            base.Decode(stream);
        }
예제 #3
0
 public override void Decode(ByteStream stream)
 {
     this.m_x            = stream.ReadInt();
     this.m_y            = stream.ReadInt();
     this.m_buildingData = (LogicBuildingData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.BUILDING);
     base.Decode(stream);
 }
예제 #4
0
        public override void Decode(ByteStream stream)
        {
            this.m_newUnitData = (LogicCharacterData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.CHARACTER);
            this.m_oldUnitData = (LogicCharacterData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.CHARACTER);

            base.Decode(stream);
        }
예제 #5
0
        public override void Decode(ByteStream stream)
        {
            this.m_x    = stream.ReadInt();
            this.m_y    = stream.ReadInt();
            this.m_data = (LogicCharacterData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.CHARACTER);

            base.Decode(stream);
        }
예제 #6
0
        public override void Decode(ByteStream stream)
        {
            this.m_x    = stream.ReadInt();
            this.m_y    = stream.ReadInt();
            this.m_data = (LogicAlliancePortalData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.ALLIANCE_PORTAL);

            base.Decode(stream);
        }
예제 #7
0
        public override void Decode(ByteStream stream)
        {
            this.m_senderName = stream.ReadString(900000);
            this.m_unitData   = (LogicCombatItemData)ByteStreamHelper.ReadDataReference(stream, stream.ReadInt() != 0 ? LogicDataType.SPELL : LogicDataType.CHARACTER);
            this.m_upgLevel   = stream.ReadInt();

            base.Decode(stream);
        }
예제 #8
0
        public override void Decode(ByteStream stream)
        {
            this.m_gameObjectId = stream.ReadInt();
            this.m_unitType     = stream.ReadInt();
            this.m_unitData     = (LogicCombatItemData)ByteStreamHelper.ReadDataReference(stream, this.m_unitType != 0 ? LogicDataType.SPELL : LogicDataType.CHARACTER);

            base.Decode(stream);
        }
예제 #9
0
        public override void Decode(ByteStream stream)
        {
            this.m_streamId    = stream.ReadLong();
            this.m_unitData    = ByteStreamHelper.ReadDataReference(stream) as LogicCombatItemData;
            this.m_quickDonate = stream.ReadBoolean();

            base.Decode(stream);
        }
        public override void Decode(ByteStream stream)
        {
            this.m_x    = stream.ReadInt();
            this.m_y    = stream.ReadInt();
            this.m_data = (LogicHeroData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.HERO);

            base.Decode(stream);
        }
        public override void Decode(ByteStream stream)
        {
            this.m_streamId    = stream.ReadLong();
            this.m_unitData    = (LogicCombatItemData)ByteStreamHelper.ReadDataReference(stream, stream.ReadInt() != 0 ? LogicDataType.SPELL : LogicDataType.CHARACTER);
            this.m_quickDonate = stream.ReadBoolean();

            base.Decode(stream);
        }
        public override void Decode(ByteStream stream)
        {
            this.ScoreGain = stream.ReadVInt();
            this.Attacker  = stream.ReadBoolean();

            this.PrevLeagueData = (LogicLeagueData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.LEAGUE);
            this.LeagueData     = (LogicLeagueData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.LEAGUE);
        }
        public override void Decode(ByteStream stream)
        {
            this.m_x        = stream.ReadInt();
            this.m_y        = stream.ReadInt();
            this.m_trapData = (LogicTrapData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.TRAP);

            base.Decode(stream);
        }
예제 #14
0
        public override void Decode(ByteStream stream)
        {
            if (stream.ReadBoolean())
            {
                this.AccountId = stream.ReadLong();
            }

            this.ArgData = ByteStreamHelper.ReadDataReference(stream);
        }
        public override void Decode(ByteStream stream)
        {
            base.Decode(stream);

            this.m_badgeId     = stream.ReadInt();
            this.m_memberCount = stream.ReadInt();
            this.m_originData  = ByteStreamHelper.ReadDataReference(stream);
            this.m_expLevel    = stream.ReadInt();
        }
        public override void Decode(ByteStream stream)
        {
            this.m_x = stream.ReadInt();
            this.m_y = stream.ReadInt();
            this.m_gameObjectData = (LogicGameObjectData)ByteStreamHelper.ReadDataReference(stream);
            this.m_upgradeLevel   = stream.ReadInt();

            base.Decode(stream);
        }
예제 #17
0
        public override void Decode(ByteStream stream)
        {
            this.m_x             = stream.ReadInt();
            this.m_y             = stream.ReadInt();
            this.m_data          = (LogicSpellData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.SPELL);
            this.m_allianceSpell = stream.ReadBoolean();
            this.m_upgLevel      = stream.ReadInt();

            base.Decode(stream);
        }
예제 #18
0
 public override void Decode(ByteStream stream)
 {
     this.MemberId     = stream.ReadLong();
     this.StreamId     = stream.ReadLong();
     this.Data         = (LogicCombatItemData)ByteStreamHelper.ReadDataReference(stream);
     this.UpgradeLevel = stream.ReadVInt();
     this.QuickDonate  = stream.ReadBoolean();
     this.Success      = stream.ReadBoolean();
     this.MemberName   = stream.ReadString(900000);
 }
예제 #19
0
        public override void Decode(ByteStream stream)
        {
            int count = LogicMath.Min(stream.ReadInt(), 10);

            for (int i = 0; i < count; i++)
            {
                this.m_position.Add(new LogicVector2(stream.ReadInt(), stream.ReadInt()));
            }

            this.m_buildingData = (LogicBuildingData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.BUILDING);

            base.Decode(stream);
        }
예제 #20
0
 public override void Decode(ByteStream stream)
 {
     this.AllianceName        = stream.ReadString(900000);
     this.AllianceDescription = stream.ReadString(900000);
     this.AllianceType        = (AllianceType)stream.ReadVInt();
     this.AllianceBadgeId     = stream.ReadVInt();
     this.RequiredScore       = stream.ReadVInt();
     this.RequiredDuelScore   = stream.ReadVInt();
     this.WarFrequency        = stream.ReadVInt();
     this.PublicWarLog        = stream.ReadBoolean();
     this.ArrangedWarEnabled  = stream.ReadBoolean();
     this.OriginData          = ByteStreamHelper.ReadDataReference(stream);
 }
예제 #21
0
        public override void Decode(ByteStream stream)
        {
            for (int i = 0, size = stream.ReadInt(); i < size; i++)
            {
                this.m_removeType.Add(stream.ReadInt());
                this.m_unitsData.Add((LogicCombatItemData)ByteStreamHelper.ReadDataReference(stream,
                                                                                             stream.ReadInt() != 0 ? LogicDataType.SPELL : LogicDataType.CHARACTER));
                this.m_unitsCount.Add(stream.ReadInt());
                this.m_unitsUpgLevel.Add(stream.ReadInt());
            }

            base.Decode(stream);
        }
        public override void Decode()
        {
            base.Decode();

            this.m_allianceName        = this.m_stream.ReadString(900000);
            this.m_allianceDescription = this.m_stream.ReadString(900000);
            this.m_allianceBadgeId     = this.m_stream.ReadInt();
            this.m_allianceType        = this.m_stream.ReadInt();
            this.m_requiredScore       = this.m_stream.ReadInt();
            this.m_requiredDuelScore   = this.m_stream.ReadInt();
            this.m_warFrequency        = this.m_stream.ReadInt();
            this.m_originData          = ByteStreamHelper.ReadDataReference(this.m_stream);
            this.m_publicWarLog        = this.m_stream.ReadBoolean();
            this.m_amicalWarEnabled    = this.m_stream.ReadBoolean();
        }
        public override void Decode(ByteStream stream)
        {
            base.Decode(stream);

            this.m_offerId       = stream.ReadVInt();
            this.m_transactionId = stream.ReadString(900000);

            if (this.m_deliverableBundle != null)
            {
                this.m_deliverableBundle.Destruct();
                this.m_deliverableBundle = null;
            }

            this.m_deliverableBundle = new LogicDeliverableBundle();
            this.m_deliverableBundle.Decode(stream);
            this.m_billingPackageData = (LogicBillingPackageData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.BILLING_PACKAGE);
        }
        public override void Decode(ByteStream stream)
        {
            this.m_gameObjectId = stream.ReadInt();
            this.m_unitType     = stream.ReadInt();
            this.m_unitData     = (LogicCombatItemData)ByteStreamHelper.ReadDataReference(stream, this.m_unitType != 0 ? LogicDataType.SPELL : LogicDataType.CHARACTER);
            this.m_trainCount   = stream.ReadInt();
            this.m_slotId       = stream.ReadInt();

            LogicGlobals globals = LogicDataTables.GetGlobals();

            if (!globals.UseDragInTraining() && !globals.UseDragInTrainingFix() && !globals.UseDragInTrainingFix2())
            {
                this.m_slotId = -1;
            }

            base.Decode(stream);
        }
예제 #25
0
        public override void Decode()
        {
            base.Decode();

            this.m_searchString      = this.m_stream.ReadString(900000);
            this.m_warFrequency      = this.m_stream.ReadInt();
            this.m_originData        = ByteStreamHelper.ReadDataReference(this.m_stream, LogicDataType.REGION);
            this.m_minMemberCount    = this.m_stream.ReadInt();
            this.m_maxMemberCount    = this.m_stream.ReadInt();
            this.m_requiredScore     = this.m_stream.ReadInt();
            this.m_requiredDuelScore = this.m_stream.ReadInt();
            this.m_openOnly          = this.m_stream.ReadBoolean();

            this.m_stream.ReadInt();
            this.m_stream.ReadInt();

            this.m_minExpLevel = this.m_stream.ReadInt();
        }
        public override void Decode(ByteStream stream)
        {
            this.m_resourceCount  = stream.ReadInt();
            this.m_resourceData   = (LogicResourceData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.RESOURCE);
            this.m_resource2Count = stream.ReadInt();

            if (this.m_resource2Count > 0)
            {
                this.m_resource2Data = (LogicResourceData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.RESOURCE);
            }

            if (stream.ReadBoolean())
            {
                this.m_command = LogicCommandManager.DecodeCommand(stream);
            }

            base.Decode(stream);
        }
        public void Decode(ByteStream stream)
        {
            this.m_avatarId = stream.ReadLong();

            for (int i = 0, size = stream.ReadInt(); i < size; i++)
            {
                LogicCombatItemData data = ByteStreamHelper.ReadDataReference(stream) as LogicCombatItemData;
                int level = stream.ReadInt();

                if (data != null)
                {
                    this.m_donationData.Add(data);
                    this.m_donationLevel.Add(level);
                }
                else
                {
                    Debugger.Error("DonationContainer::decode() character data is NULL");
                }
            }
        }
예제 #28
0
 public void Decode(ByteStream stream)
 {
     this.m_allianceId             = stream.ReadLong();
     this.m_allianceName           = stream.ReadString(900000);
     this.m_allianceBadgeId        = stream.ReadInt();
     this.m_allianceType           = (AllianceType)stream.ReadInt();
     this.m_memberCount            = stream.ReadInt();
     this.m_score                  = stream.ReadInt();
     this.m_duelScore              = stream.ReadInt();
     this.m_requiredScore          = stream.ReadInt();
     this.m_requiredDuelScore      = stream.ReadInt();
     this.m_winWarCount            = stream.ReadInt();
     this.m_lostWarCount           = stream.ReadInt();
     this.m_drawWarCount           = stream.ReadInt();
     this.m_localeData             = ByteStreamHelper.ReadDataReference(stream);
     this.m_warFrequency           = stream.ReadInt();
     this.m_originData             = ByteStreamHelper.ReadDataReference(stream);
     this.m_expPoints              = stream.ReadInt();
     this.m_expLevel               = stream.ReadInt();
     this.m_consecutiveWinWarCount = stream.ReadInt();
     this.m_publicWarLog           = stream.ReadBoolean();
     stream.ReadInt();
     this.m_amicalWarEnabled = stream.ReadBoolean();
 }
 public override void Decode(ByteStream stream)
 {
     this.Data         = (LogicCombatItemData)ByteStreamHelper.ReadDataReference(stream);
     this.UpgradeLevel = stream.ReadVInt();
 }
 public void Decode(ByteStream stream)
 {
     this.SetNpcData((LogicNpcData)ByteStreamHelper.ReadDataReference(stream, LogicDataType.NPC));
 }