コード例 #1
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                VfxID       = decoder.Decode4();
                Resource    = decoder.DecodeString();
                Pivot       = decoder.DecodeString();
                OffsetX     = decoder.Decode4AsSingle();
                OffsetY     = decoder.Decode4AsSingle();
                OffsetZ     = decoder.Decode4AsSingle();
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #2
0
ファイル: ItemManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;
            m_itemGoods.Clear();
            m_goodsLimitMission.Clear();

            try
            {
                GoodsCode     = decoder.Decode4();
                GoodsTypeCode = decoder.Decode1();
                GoodsName     = decoder.DecodeString();
                Descriptions  = decoder.DecodeString();
                CurrencyType  = (CurrencyType)decoder.Decode1();
                Price         = decoder.Decode4AsSingle();
                ContentsID1   = decoder.DecodeString();
                ContentsID2   = decoder.DecodeString();
                ContentsID3   = decoder.DecodeString();
                ContentsID4   = decoder.DecodeString();
                ContentsID5   = decoder.DecodeString();
                SortNum       = decoder.Decode2();

                ushort size = decoder.Decode2();
                for (ushort i = 0; i < size; ++i)
                {
                    ItemGoods itemGoods = new ItemGoods();
                    if (!itemGoods.DeSerialize(stream))
                        throw new Exception();

                    m_itemGoods.Add(itemGoods.ItemCode, itemGoods);
                }

                size = decoder.Decode2();
                for (ushort i = 0; i < size; ++i)
                {
                    GoodsLimitMission mission = new GoodsLimitMission();
                    if (mission.DeSerialize(stream))
                        throw new Exception();

                    m_goodsLimitMission.Add(mission.MissionCode, mission);
                }
            }
            catch (Exception)
            {
                m_itemGoods.Clear();
                m_goodsLimitMission.Clear();

                ret = false;
            }

            return ret;
        }
コード例 #3
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;
            m_heroLevelSkillValues.Clear();

            try
            {
                SkillCode         = decoder.Decode4();
                SkillName         = decoder.DecodeString();
                IsActive          = decoder.Decode1() > 0;
                ManaConsume       = decoder.Decode4();
                CastTime          = decoder.Decode4();
                CoolTime          = decoder.Decode4();
                GlobalCoolTime    = decoder.Decode4();
                Priority          = decoder.Decode1();
                Motion            = decoder.DecodeString();
                Icon              = decoder.DecodeString();

                byte cnt = decoder.Decode1();
                for (byte i = 0; i < cnt; ++i)
                {
                    SkillValue s = new SkillValue();

                    byte heroLevel      = decoder.Decode1();
                    s.Descriptions      = decoder.DecodeString();
                    s.ActionPattern     = decoder.DecodeString();
                    s.EffectValue       = decoder.Decode4AsSingle();

                    m_heroLevelSkillValues.Add(heroLevel, s);
                }
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #4
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;
            m_blockCmds.Clear();

            try
            {
                BlockID                 = decoder.Decode1();
                IsApplyLifeRate         = decoder.Decode1() > 0;
                ChanceSpawnTutorial     = decoder.Decode4AsSingle();
                ChanceSpawnAdventure    = decoder.Decode4AsSingle();
                ChanceSpawnRaid         = decoder.Decode4AsSingle();
                ChanceSpawnArena        = decoder.Decode4AsSingle();
                Resource                = decoder.DecodeString();
                ChargeStartVfxID        = decoder.Decode4();
                ChargeStartSfxID        = decoder.Decode4();
                TransformVfxID          = decoder.Decode4();
                DestroyVfxID            = decoder.Decode4();
                Destroy1SfxID           = decoder.Decode4();
                Destroy2SfxID           = decoder.Decode4();
                Destroy3SfxID           = decoder.Decode4();
                ChargedDestroyVfxID     = decoder.Decode4();
                ChargedDestroySfxID     = decoder.Decode4();

                byte cnt = decoder.Decode1();
                for (byte i = 0; i < cnt; ++i)
                {
                    BlockCommand b = new BlockCommand();

                    byte blockCnt               = decoder.Decode1();
                    b.Priority                  = decoder.Decode1();
                    b.ActionPattern             = decoder.DecodeString();
                    b.ExtraEffectValue          = decoder.Decode4AsSingle();
                    b.CriticalStatusEffectCode  = decoder.Decode4();
                    b.Motion                    = decoder.DecodeString();

                    m_blockCmds.Add(blockCnt, b);
                }
            }
            catch (Exception)
            {
                m_blockCmds.Clear();
                ret = false;
            }

            return ret;
        }
コード例 #5
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                LifeRate      = decoder.Decode4AsSingle();
                ScreenPosRate = decoder.Decode4AsSingle();
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #6
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                m_reelID        = decoder.Decode1();
                m_betAmplify    = decoder.Decode4AsSingle();
                m_chanceSpin    = decoder.Decode4AsSingle();
                m_resource      = decoder.DecodeString();
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #7
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                ConsumableType  = (ConsumableType)decoder.Decode1();
                ChanceTutorial  = decoder.Decode4AsSingle();
                ChanceAdventure = decoder.Decode4AsSingle();
                ChanceRaid      = decoder.Decode4AsSingle();
                ChanceArena     = decoder.Decode4AsSingle();
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #8
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                FieldObjectCode   = decoder.Decode4();
                Name              = decoder.DecodeString();
                Resource          = decoder.DecodeString();
                DrawScale         = decoder.Decode4AsSingle();
                CollisionWidth    = decoder.Decode4AsSingle();
                CollisionHeight   = decoder.Decode4AsSingle();
                SpawnVfxID        = decoder.Decode4();
                SpawnSfxID        = decoder.Decode4();
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #9
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;
            m_stageObjectTypeChances.Clear();
            m_stageObjectChances.Clear();

            try
            {
                StageCode         = decoder.Decode4();
                StageGroupID      = decoder.Decode1();
                StageName         = decoder.DecodeString();
                GameMode          = (GameModeType)decoder.Decode1();
                DifficultyType    = decoder.Decode1();
                Tier              = decoder.Decode1();
                LimitExp          = decoder.Decode4();
                LimitGold         = decoder.Decode4();
                Star1Point        = decoder.Decode4();
                Star2Point        = decoder.Decode4();
                Star3Point        = decoder.Decode4();
                ClearPoint        = decoder.Decode4();
                TimePoint         = decoder.Decode4();
                MinClearTime      = decoder.Decode4();
                TotalDist         = decoder.Decode4();
                ChanceShortDist   = decoder.Decode4AsSingle();
                ChanceMediumDist  = decoder.Decode4AsSingle();
                ChanceLongDist    = decoder.Decode4AsSingle();
                MinShortDist      = decoder.Decode4();
                MaxShortDist      = decoder.Decode4();
                MinMediumDist     = decoder.Decode4();
                MaxMediumDist     = decoder.Decode4();
                MinLongDist       = decoder.Decode4();
                MaxLongDist       = decoder.Decode4();
                LastFoCode        = decoder.Decode4();
                Resource          = decoder.DecodeString();
                Bgm               = decoder.DecodeString();

                byte cnt = decoder.Decode1();
                for (byte i = 0; i < cnt; ++i)
                {
                    StageObjectType soType  = (StageObjectType)decoder.Decode1();
                    float chance            = decoder.Decode4AsSingle();

                    m_stageObjectTypeChances.Add(soType, chance);
                }

                cnt = decoder.Decode1();
                for (byte i = 0; i < cnt; ++i)
                {
                    uint foCode     = decoder.Decode4();
                    float chance    = decoder.Decode4AsSingle();

                    m_stageObjectChances.Add(foCode, chance);
                }
            }
            catch (Exception)
            {
                m_stageObjectTypeChances.Clear();
                m_stageObjectChances.Clear();
                ret = false;
            }

            return ret;
        }
コード例 #10
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                StatusEffectCode    = decoder.Decode4();
                IsBuff              = decoder.Decode1() > 0;
                ExpireType          = decoder.Decode1();
                ExpireTime          = decoder.Decode4AsSingle();
                IsScript            = decoder.Decode1() > 0;
                StatMod             = decoder.DecodeString();
                EffectValue         = decoder.Decode4AsSingle();
                SpawnVfxID          = decoder.Decode4();
                SpawnSfxID          = decoder.Decode4();
                Icon                = decoder.DecodeString();
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #11
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;
            m_skillValues.Clear();
            m_stats.Clear();

            try
            {
                ret = base.OnDeSerialize(decoder, stream);
                if (ret)
                {
                    Type                = (MonsterType)decoder.Decode1();
                    Grade               = (MonsterGradeType)decoder.Decode1();
                    BaseLevel           = decoder.Decode1();
                    IsHostile           = decoder.Decode1() > 0;
                    IsRange             = decoder.Decode1() > 0;
                    AttactRange         = decoder.Decode4AsSingle();
                    ProjectileFoCode    = decoder.Decode4();

                    byte cnt = decoder.Decode1();
                    for (byte i = 0; i < cnt; ++i)
                    {
                        MonsterSkillValue v = new MonsterSkillValue();

                        uint skillCode  = decoder.Decode4();
                        v.ActionPattern = decoder.DecodeString();
                        v.EffectValue   = decoder.Decode4AsSingle();

                        m_skillValues.Add(skillCode, v);
                    }

                    cnt = decoder.Decode1();
                    for (byte i = 0; i < cnt; ++i)
                    {
                        uint statCode   = decoder.Decode4();
                        float value     = decoder.Decode4AsSingle();

                        m_stats.Add(statCode, value);
                    }
                }
            }
            catch (Exception)
            {
                m_skillValues.Clear();
                m_stats.Clear();
                ret = false;
            }

            return ret;
        }
コード例 #12
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                ret = base.OnDeSerialize(decoder, stream);
                if (ret)
                {
                    Speed               = decoder.Decode4AsSingle();
                    SpeedY              = decoder.Decode4AsSingle();
                    Gravity             = decoder.Decode4AsSingle();
                    LifeTime            = decoder.Decode4AsSingle();
                    IsReflex            = decoder.Decode1() > 0;
                    ExplosionVfxID      = decoder.Decode4();
                    ImpactSfxID         = decoder.Decode4();
                    SpeedReductionMin   = decoder.Decode4AsSingle();
                    SpeedReductionMax   = decoder.Decode4AsSingle();
                    FallingGravity      = decoder.Decode4AsSingle();
                    ExtraTime           = decoder.Decode4AsSingle();
                }
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #13
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                ret = base.OnDeSerialize(decoder, stream);
                if (ret)
                {
                    OverlapEvent          = (OverlapEventType)decoder.Decode1();
                    RewardExp             = decoder.Decode4();
                    RewardGold            = decoder.Decode4();
                    ChanceConsumableDrop  = decoder.Decode4AsSingle();
                }
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #14
0
ファイル: ItemManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;
            m_stats.Clear();

            try
            {
                ret = base.OnDeSerialize(decoder, stream);
                if (ret)
                {
                    EquipmentType           = (EquipmentType)decoder.Decode1();
                    EquipmentRarityId       = (EquipmentRarityId)decoder.Decode1();
                    HeroItemCode            = decoder.Decode4();
                    BattlePower             = decoder.Decode4();
                    PriceSelling            = decoder.Decode4();
                    ItemChanceAmplifier     = decoder.Decode4AsSingle();
                    AtlasResource           = decoder.DecodeString();
                    TextureName             = decoder.DecodeString();

                    byte cnt = decoder.Decode1();
                    for (byte i = 0; i < cnt; ++i)
                    {
                        uint statCode   = decoder.Decode4();
                        float statValue = decoder.Decode4AsSingle();

                        m_stats.Add(statCode, statValue);
                    }
                }
            }
            catch (Exception)
            {
                m_stats.Clear();
                ret = false;
            }

            return ret;
        }
コード例 #15
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                ConsumableID        = decoder.Decode4();
                ConsumableType      = (ConsumableType)decoder.Decode1();
                ConsumableName      = decoder.DecodeString();
                Tier                = decoder.Decode1();
                IsDropTutorial      = decoder.Decode1() > 0;
                IsDropAdventure     = decoder.Decode1() > 0;
                IsDropRaid          = decoder.Decode1() > 0;
                IsDropArena         = decoder.Decode1() > 0;
                IsPuzzleActive      = decoder.Decode1() > 0;
                CastTime            = decoder.Decode4();
                GlobalCoolTime      = decoder.Decode4();
                Priority            = decoder.Decode1();
                ActionPattern       = decoder.DecodeString();
                EffectValue         = decoder.Decode4AsSingle();
                ProjectileFoCode    = decoder.Decode4();
                UseSfxID            = decoder.Decode4();
                Icon                = decoder.DecodeString();
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }
コード例 #16
0
ファイル: ItemManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;
            m_heroLevelDetails.Clear();
            m_heroSkills.Clear();

            try
            {
                ret = base.OnDeSerialize(decoder, stream);
                if (ret)
                {
                    Grade                   = (HeroGrade)decoder.Decode1();
                    DefaultArmorItemCode    = decoder.Decode4();
                    DefaultWeaponItemCode   = decoder.Decode4();
                    GoodsCodeForGold        = decoder.Decode4();
                    GoodsCodeForGem         = decoder.Decode4();
                    HeroFieldObjectCode     = decoder.Decode4();

                    byte cnt = decoder.Decode1();
                    for (byte i = 0; i < cnt; ++i)
                    {
                        byte heroLevel  = decoder.Decode1();
                        HeroLevelDetail hld = new HeroLevelDetail();

                        hld.BattlePower     = decoder.Decode4();
                        hld.ExpNeeded       = decoder.Decode4();
                        hld.RewardItemCode  = decoder.Decode4();

                        Dictionary<uint, float> dic = new Dictionary<uint,float>();
                        byte cnt2 = decoder.Decode1();
                        for (byte j = 0; j < cnt2; ++j)
                        {
                            uint statCode   = decoder.Decode4();
                            float statValue = decoder.Decode4AsSingle();

                            dic.Add(statCode, statValue);
                        }

                        hld.Stats = dic;
                        m_heroLevelDetails.Add(heroLevel, hld);
                    }

                    cnt = decoder.Decode1();
                    for (byte i = 0; i < cnt; ++i)
                    {
                        uint skillCode = decoder.Decode4();
                        HeroSkill hs = new HeroSkill();

                        hs.ActivatingLevel  = decoder.Decode1();
                        hs.IsPuzzleActive   = decoder.Decode1() > 0;
                        hs.IsChallengerUse  = decoder.Decode1() > 0;
                        hs.IsVisible        = decoder.Decode1() > 0;

                        m_heroSkills.Add(skillCode, hs);
                    }
                }
            }
            catch (Exception)
            {
                m_heroLevelDetails.Clear();
                m_heroSkills.Clear();

                ret = false;
            }

            return ret;
        }
コード例 #17
0
ファイル: StageManager.cs プロジェクト: pb0/ID0_Test
        protected override bool OnDeSerialize(SimpleStream.SerializableDecoder decoder, SimpleStream stream)
        {
            bool ret = true;

            try
            {
                Mode            = (GameModeType)decoder.Decode1();
                DefaultLDR      = decoder.Decode4AsSingle();
                IncreaseLDR     = decoder.Decode4AsSingle();
                CurrencyType    = (CurrencyType)decoder.Decode1();
                CurrencyValue   = decoder.Decode4();
            }
            catch (Exception)
            {
                ret = false;
            }

            return ret;
        }