示例#1
0
 public UnitSetting(JSON_MapPartyUnit json)
 {
     this.uniqname          = (OString)json.name;
     this.ai                = (OString)json.ai;
     this.pos.x             = (OInt)json.x;
     this.pos.y             = (OInt)json.y;
     this.dir               = (OInt)json.dir;
     this.waitEntryClock    = (OInt)json.wait_e;
     this.waitMoveTurn      = (OInt)json.wait_m;
     this.waitExitTurn      = (OInt)json.wait_exit;
     this.startCtCalc       = (eMapUnitCtCalcType)json.ct_calc;
     this.startCtVal        = (OInt)json.ct_val;
     this.DisableFirceVoice = json.fvoff != 0;
     this.side              = (OInt)0;
     this.ai_type           = (AIActionType)json.ai_type;
     this.ai_pos.x          = (OInt)json.ai_x;
     this.ai_pos.y          = (OInt)json.ai_y;
     this.ai_len            = (OInt)json.ai_len;
     this.parent            = (OString)json.parent;
     if (json.trg != null)
     {
         this.trigger = new EventTrigger();
         this.trigger.Deserialize(json.trg);
     }
     if (json.entries == null || json.entries.Length <= 0)
     {
         return;
     }
     this.entries     = new List <UnitEntryTrigger>((IEnumerable <UnitEntryTrigger>)json.entries);
     this.entries_and = (OInt)json.entries_and;
 }
示例#2
0
        public bool Deserialize(JSON_ConceptCardMaterial json)
        {
            this.mUniqueID = (OLong)json.id;
            this.mIName    = (OString)json.iname;
            this.mNum      = (OInt)json.num;
            this.mParam    = MonoSingleton <GameManager> .Instance.MasterParam.GetConceptCardParam(json.iname);

            return(true);
        }
示例#3
0
 public OString[] ConvertOStringArray(string[] strs)
 {
     OString[] ostringArray = (OString[])null;
     if (strs != null)
     {
         ostringArray = new OString[strs.Length];
         for (int index = 0; index < ostringArray.Length; ++index)
         {
             ostringArray[index] = (OString)strs[index];
         }
     }
     return(ostringArray);
 }
示例#4
0
 public bool Deserialize(JSON_ItemParam json)
 {
     if (json == null)
     {
         return(false);
     }
     this.iname        = json.iname;
     this.name         = json.name;
     this.expr         = json.expr;
     this.flavor       = json.flavor;
     this.type         = (EItemType)json.type;
     this.rare         = (OInt)json.rare;
     this.cap          = (OInt)json.cap;
     this.invcap       = (OInt)json.invcap;
     this.equipLv      = (OInt)Math.Max(json.eqlv, 1);
     this.coin         = (OInt)json.coin;
     this.tour_coin    = (OInt)json.tc;
     this.arena_coin   = (OInt)json.ac;
     this.multi_coin   = (OInt)json.mc;
     this.piece_point  = (OInt)json.pp;
     this.buy          = (OInt)json.buy;
     this.sell         = (OInt)json.sell;
     this.enhace_cost  = (OInt)json.encost;
     this.enhace_point = (OInt)json.enpt;
     this.value        = (OInt)json.val;
     this.icon         = (OString)json.icon;
     this.skill        = (OString)json.skill;
     this.recipe       = json.recipe;
     this.quests       = (string[])null;
     this.is_valuables = json.is_valuables > 0;
     this.cmn_type     = json.cmn_type;
     if (json.quests != null)
     {
         this.quests = new string[json.quests.Length];
         for (int index = 0; index < json.quests.Length; ++index)
         {
             this.quests[index] = json.quests[index];
         }
     }
     return(true);
 }
示例#5
0
 public NPCSetting(JSON_MapEnemyUnit json)
 {
     this.uniqname          = (OString)json.name;
     this.iname             = (OString)json.iname;
     this.side              = (OInt)json.side;
     this.lv                = (OInt)Math.Max(json.lv, 1);
     this.rare              = (OInt)json.rare;
     this.awake             = (OInt)json.awake;
     this.elem              = (OInt)json.elem;
     this.exp               = (OInt)json.exp;
     this.gems              = (OInt)json.gems;
     this.gold              = (OInt)json.gold;
     this.ai                = (OString)json.ai;
     this.pos.x             = (OInt)json.x;
     this.pos.y             = (OInt)json.y;
     this.dir               = (OInt)json.dir;
     this.search            = (OInt)json.search;
     this.control           = (OBool)(json.ctrl != 0);
     this.trigger           = (EventTrigger)null;
     this.abilities         = (EquipAbilitySetting[])null;
     this.waitEntryClock    = (OInt)json.wait_e;
     this.waitMoveTurn      = (OInt)json.wait_m;
     this.waitExitTurn      = (OInt)json.wait_exit;
     this.startCtCalc       = (eMapUnitCtCalcType)json.ct_calc;
     this.startCtVal        = (OInt)json.ct_val;
     this.DisableFirceVoice = json.fvoff != 0;
     this.ai_type           = (AIActionType)json.ai_type;
     this.ai_pos.x          = (OInt)json.ai_x;
     this.ai_pos.y          = (OInt)json.ai_y;
     this.ai_len            = (OInt)json.ai_len;
     this.parent            = (OString)json.parent;
     this.fskl              = (OString)json.fskl;
     this.notice_damage     = (OInt)json.notice_damage;
     if (json.notice_members != null)
     {
         this.notice_members = new List <OString>(json.notice_members.Length);
         for (int index = 0; index < json.notice_members.Length; ++index)
         {
             if (!string.IsNullOrEmpty(json.notice_members[index]))
             {
                 this.notice_members.Add((OString)json.notice_members[index]);
             }
         }
     }
     if (json.trg != null)
     {
         this.trigger = new EventTrigger();
         this.trigger.Deserialize(json.trg);
     }
     if (json.entries != null && json.entries.Length > 0)
     {
         this.entries     = new List <UnitEntryTrigger>((IEnumerable <UnitEntryTrigger>)json.entries);
         this.entries_and = (OInt)json.entries_and;
     }
     if (json.abils != null && json.abils.Length > 0)
     {
         this.abilities = new EquipAbilitySetting[json.abils.Length];
         for (int index1 = 0; index1 < json.abils.Length; ++index1)
         {
             this.abilities[index1]       = new EquipAbilitySetting();
             this.abilities[index1].iname = (OString)json.abils[index1].iname;
             this.abilities[index1].rank  = (OInt)json.abils[index1].rank;
             if (json.abils[index1].skills != null)
             {
                 this.abilities[index1].skills = new EquipSkillSetting[json.abils[index1].skills.Length];
                 for (int index2 = 0; index2 < json.abils[index1].skills.Length; ++index2)
                 {
                     this.abilities[index1].skills[index2]       = new EquipSkillSetting();
                     this.abilities[index1].skills[index2].iname = (OString)json.abils[index1].skills[index2].iname;
                     this.abilities[index1].skills[index2].rate  = (OInt)json.abils[index1].skills[index2].rate;
                     if (json.abils[index1].skills[index2].cond != null && json.abils[index1].skills[index2].cond.type != 0)
                     {
                         SkillLockCondition dsc = new SkillLockCondition();
                         json.abils[index1].skills[index2].cond.CopyTo(dsc);
                         this.abilities[index1].skills[index2].cond = dsc;
                     }
                 }
             }
         }
     }
     if (json.acttbl != null && json.acttbl.actions != null && json.acttbl.actions.Length > 0)
     {
         this.acttbl.actions.Clear();
         for (int index = 0; index < json.acttbl.actions.Length; ++index)
         {
             AIAction aiAction = new AIAction();
             aiAction.skill    = (OString)json.acttbl.actions[index].skill;
             aiAction.type     = (OInt)json.acttbl.actions[index].type;
             aiAction.turn     = (OInt)json.acttbl.actions[index].turn;
             aiAction.notBlock = (OBool)(json.acttbl.actions[index].notBlock != 0);
             if (json.acttbl.actions[index].cond != null && json.acttbl.actions[index].cond.type != 0)
             {
                 SkillLockCondition dsc = new SkillLockCondition();
                 json.acttbl.actions[index].cond.CopyTo(dsc);
                 aiAction.cond = dsc;
             }
             this.acttbl.actions.Add(aiAction);
         }
         this.acttbl.looped = json.acttbl.looped;
     }
     if (json.patrol != null && json.patrol.routes != null && json.patrol.routes.Length > 0)
     {
         json.patrol.CopyTo(this.patrol);
     }
     if (json.break_obj == null)
     {
         return;
     }
     this.break_obj = new MapBreakObj();
     json.break_obj.CopyTo(this.break_obj);
 }
示例#6
0
 public bool Deserialize(JSON_FixParam json)
 {
     if (json == null)
     {
         return(false);
     }
     this.ShopUpdateTime                = (OInt[])null;
     this.CriticalRate_Cri_Multiply     = (OInt)json.mulcri;
     this.CriticalRate_Cri_Division     = (OInt)json.divcri;
     this.CriticalRate_Luk_Multiply     = (OInt)json.mulluk;
     this.CriticalRate_Luk_Division     = (OInt)json.divluk;
     this.MinCriticalDamageRate         = (OInt)json.mincri;
     this.MaxCriticalDamageRate         = (OInt)json.maxcri;
     this.HighGridAtkRate               = (OInt)json.hatk;
     this.HighGridDefRate               = (OInt)json.hdef;
     this.HighGridCriRate               = (OInt)json.hcri;
     this.DownGridAtkRate               = (OInt)json.datk;
     this.DownGridDefRate               = (OInt)json.ddef;
     this.DownGridCriRate               = (OInt)json.dcri;
     this.ParalysedRate                 = (OInt)json.paralyse;
     this.PoisonDamageRate              = (OInt)json.poi_rate;
     this.BlindnessHitRate              = (OInt)json.bli_hit;
     this.BlindnessAvoidRate            = (OInt)json.bli_avo;
     this.BerserkAtkRate                = (OInt)json.ber_atk;
     this.BerserkDefRate                = (OInt)json.ber_def;
     this.TokkouDamageRate              = (OInt)json.tk_rate;
     this.AbilityRankUpCountCoin        = (OInt)json.abilupcoin;
     this.AbilityRankUpCountMax         = (OInt)json.abilupmax;
     this.AbilityRankUpCountRecoveryVal = (OInt)json.abiluprec;
     this.AbilityRankUpCountRecoverySec = (OLong)((long)json.abilupsec);
     this.StaminaRecoveryCoin           = (OInt)json.stmncoin;
     this.StaminaRecoveryVal            = (OInt)json.stmnrec;
     this.StaminaRecoverySec            = (OLong)((long)json.stmnsec);
     this.StaminaStockCap               = (OInt)json.stmncap;
     this.StaminaAdd     = (OInt)json.stmnadd;
     this.StaminaAdd2    = (OInt)json.stmnadd2;
     this.StaminaAddCost = (OInt[])null;
     if (json.stmncost != null)
     {
         this.StaminaAddCost = new OInt[json.stmncost.Length];
         for (int index = 0; index < json.stmncost.Length; ++index)
         {
             this.StaminaAddCost[index] = (OInt)json.stmncost[index];
         }
     }
     this.CaveStaminaMax         = (OInt)json.cavemax;
     this.CaveStaminaRecoveryVal = (OInt)json.caverec;
     this.CaveStaminaRecoverySec = (OLong)((long)json.cavesec);
     this.CaveStaminaStockCap    = (OInt)json.cavecap;
     this.CaveStaminaAdd         = (OInt)json.caveadd;
     this.CaveStaminaAddCost     = (OInt[])null;
     if (json.cavecost != null)
     {
         this.CaveStaminaAddCost = new OInt[json.cavecost.Length];
         for (int index = 0; index < json.cavecost.Length; ++index)
         {
             this.CaveStaminaAddCost[index] = (OInt)json.cavecost[index];
         }
     }
     this.ChallengeArenaMax         = (OInt)json.arenamax;
     this.ChallengeArenaCoolDownSec = (OLong)((long)json.arenasec);
     this.ArenaMedalMultipler       = (OInt)json.arenamedal;
     this.ArenaCoinRewardMultipler  = (OInt)json.arenacoin;
     this.ArenaResetCooldownCost    = (OInt)json.arenaccost;
     this.ArenaResetTicketCost      = (OInt[])null;
     if (json.arenatcost != null)
     {
         this.ArenaResetTicketCost = new OInt[json.arenatcost.Length];
         for (int index = 0; index < json.arenatcost.Length; ++index)
         {
             this.ArenaResetTicketCost[index] = (OInt)json.arenatcost[index];
         }
     }
     this.ChallengeTourMax           = (OInt)json.tourmax;
     this.ChallengeMultiMax          = (OInt)json.multimax;
     this.AwakeRate                  = (OInt)json.awakerate;
     this.GemsGainNormalAttack       = (OInt)json.na_gems;
     this.GemsGainSideAttack         = (OInt)json.sa_gems;
     this.GemsGainBackAttack         = (OInt)json.ba_gems;
     this.GemsGainWeakAttack         = (OInt)json.wa_gems;
     this.GemsGainCriticalAttack     = (OInt)json.ca_gems;
     this.GemsGainKillBonus          = (OInt)json.ki_gems;
     this.GemsGainDiffFloorCount     = (OInt)json.di_gems_floor;
     this.GemsGainDiffFloorMax       = (OInt)json.di_gems_max;
     this.ElementResistUpRate        = (OInt)json.elem_up;
     this.ElementResistDownRate      = (OInt)json.elem_down;
     this.GemsGainValue              = (OInt)json.gems_gain;
     this.GemsBuffValue              = (OInt)json.gems_buff;
     this.GemsBuffTurn               = (OInt)json.gems_buff_turn;
     this.ContinueCoinCost           = (OInt)json.continue_cost;
     this.ContinueCoinCostMulti      = (OInt)json.continue_cost_multi;
     this.ContinueCoinCostMultiTower = (OInt)json.continue_cost_multitower;
     this.AvoidBaseRate              = (OInt)json.avoid_rate;
     this.AvoidParamScale            = (OInt)json.avoid_scale;
     this.MaxAvoidRate               = (OInt)json.avoid_rate_max;
     if (json.shop_update_time != null && json.shop_update_time.Length > 0)
     {
         this.ShopUpdateTime = new OInt[json.shop_update_time.Length];
         for (int index = 0; index < this.ShopUpdateTime.Length; ++index)
         {
             this.ShopUpdateTime[index] = (OInt)json.shop_update_time[index];
         }
     }
     if (json.products != null && json.products.Length > 0)
     {
         this.Products = new OString[json.products.Length];
         for (int index = 0; index < this.Products.Length; ++index)
         {
             this.Products[index] = (OString)json.products[index];
         }
     }
     this.VipCardProduct           = (OString)json.vip_product;
     this.VipCardDate              = (OInt)json.vip_date;
     this.FreeGachaGoldMax         = (OInt)json.ggmax;
     this.FreeGachaGoldCoolDownSec = (OLong)((long)json.ggsec);
     this.FreeGachaCoinCoolDownSec = (OLong)((long)json.cgsec);
     this.BuyGoldCost              = (OInt)json.buygoldcost;
     this.BuyGoldAmount            = (OInt)json.buygold;
     this.SupportCost              = (OInt)json.sp_cost;
     this.ChallengeEliteMax        = (OInt)json.elitemax;
     this.EliteResetMax            = (OInt)json.elite_reset_max;
     if (json.elite_reset_cost != null && json.elite_reset_cost.Length > 0)
     {
         this.EliteResetCosts = new OInt[json.elite_reset_cost.Length];
         for (int index = 0; index < this.EliteResetCosts.Length; ++index)
         {
             this.EliteResetCosts[index] = (OInt)json.elite_reset_cost[index];
         }
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Poison))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Poison, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Paralysed))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Paralysed, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Stun))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Stun, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Sleep))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Sleep, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Charm))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Charm, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Stone))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Stone, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Blindness))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Blindness, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableSkill))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableSkill, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableMove))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableMove, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableAttack))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableAttack, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Zombie))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Zombie, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DeathSentence))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DeathSentence, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Berserk))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Berserk, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableKnockback))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableKnockback, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableBuff))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableBuff, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableDebuff))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableDebuff, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Stop))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Stop, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Fast))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Fast, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Slow))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Slow, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.AutoHeal))
     {
         this.DefaultCondTurns.Add(EUnitCondition.AutoHeal, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Donsoku))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Donsoku, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.Rage))
     {
         this.DefaultCondTurns.Add(EUnitCondition.Rage, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.GoodSleep))
     {
         this.DefaultCondTurns.Add(EUnitCondition.GoodSleep, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.AutoJewel))
     {
         this.DefaultCondTurns.Add(EUnitCondition.AutoJewel, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableHeal))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableHeal, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableSingleAttack))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableSingleAttack, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableAreaAttack))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableAreaAttack, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableDecCT))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableDecCT, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableIncCT))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableIncCT, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableEsaFire))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableEsaFire, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableEsaWater))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableEsaWater, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableEsaWind))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableEsaWind, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableEsaThunder))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableEsaThunder, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableEsaShine))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableEsaShine, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableEsaDark))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableEsaDark, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableMaxDamageHp))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableMaxDamageHp, (OInt)0);
     }
     if (!this.DefaultCondTurns.ContainsKey(EUnitCondition.DisableMaxDamageMp))
     {
         this.DefaultCondTurns.Add(EUnitCondition.DisableMaxDamageMp, (OInt)0);
     }
     this.DefaultCondTurns[EUnitCondition.Poison]              = (OInt)json.ct_poi;
     this.DefaultCondTurns[EUnitCondition.Paralysed]           = (OInt)json.ct_par;
     this.DefaultCondTurns[EUnitCondition.Stun]                = (OInt)json.ct_stu;
     this.DefaultCondTurns[EUnitCondition.Sleep]               = (OInt)json.ct_sle;
     this.DefaultCondTurns[EUnitCondition.Charm]               = (OInt)json.st_cha;
     this.DefaultCondTurns[EUnitCondition.Stone]               = (OInt)json.ct_sto;
     this.DefaultCondTurns[EUnitCondition.Blindness]           = (OInt)json.ct_bli;
     this.DefaultCondTurns[EUnitCondition.DisableSkill]        = (OInt)json.ct_dsk;
     this.DefaultCondTurns[EUnitCondition.DisableMove]         = (OInt)json.ct_dmo;
     this.DefaultCondTurns[EUnitCondition.DisableAttack]       = (OInt)json.ct_dat;
     this.DefaultCondTurns[EUnitCondition.Zombie]              = (OInt)json.ct_zom;
     this.DefaultCondTurns[EUnitCondition.DeathSentence]       = (OInt)json.ct_dea;
     this.DefaultCondTurns[EUnitCondition.Berserk]             = (OInt)json.ct_ber;
     this.DefaultCondTurns[EUnitCondition.DisableKnockback]    = (OInt)json.ct_dkn;
     this.DefaultCondTurns[EUnitCondition.DisableBuff]         = (OInt)json.ct_dbu;
     this.DefaultCondTurns[EUnitCondition.DisableDebuff]       = (OInt)json.ct_ddb;
     this.DefaultCondTurns[EUnitCondition.Stop]                = (OInt)json.ct_stop;
     this.DefaultCondTurns[EUnitCondition.Fast]                = (OInt)json.ct_fast;
     this.DefaultCondTurns[EUnitCondition.Slow]                = (OInt)json.ct_slow;
     this.DefaultCondTurns[EUnitCondition.AutoHeal]            = (OInt)json.ct_ahe;
     this.DefaultCondTurns[EUnitCondition.Donsoku]             = (OInt)json.ct_don;
     this.DefaultCondTurns[EUnitCondition.Rage]                = (OInt)json.ct_rag;
     this.DefaultCondTurns[EUnitCondition.GoodSleep]           = (OInt)json.ct_gsl;
     this.DefaultCondTurns[EUnitCondition.AutoJewel]           = (OInt)json.ct_aje;
     this.DefaultCondTurns[EUnitCondition.DisableHeal]         = (OInt)json.ct_dhe;
     this.DefaultCondTurns[EUnitCondition.DisableSingleAttack] = (OInt)json.ct_dsa;
     this.DefaultCondTurns[EUnitCondition.DisableAreaAttack]   = (OInt)json.ct_daa;
     this.DefaultCondTurns[EUnitCondition.DisableDecCT]        = (OInt)json.ct_ddc;
     this.DefaultCondTurns[EUnitCondition.DisableIncCT]        = (OInt)json.ct_dic;
     this.DefaultCondTurns[EUnitCondition.DisableEsaFire]      = (OInt)json.ct_esa;
     this.DefaultCondTurns[EUnitCondition.DisableEsaWater]     = (OInt)json.ct_esa;
     this.DefaultCondTurns[EUnitCondition.DisableEsaWind]      = (OInt)json.ct_esa;
     this.DefaultCondTurns[EUnitCondition.DisableEsaThunder]   = (OInt)json.ct_esa;
     this.DefaultCondTurns[EUnitCondition.DisableEsaShine]     = (OInt)json.ct_esa;
     this.DefaultCondTurns[EUnitCondition.DisableEsaDark]      = (OInt)json.ct_esa;
     this.DefaultCondTurns[EUnitCondition.DisableMaxDamageHp]  = (OInt)json.ct_mdh;
     this.DefaultCondTurns[EUnitCondition.DisableMaxDamageMp]  = (OInt)json.ct_mdm;
     this.RandomEffectMax       = (OInt)json.yuragi;
     this.ChargeTimeMax         = (OInt)json.ct_max;
     this.ChargeTimeDecWait     = (OInt)json.ct_wait;
     this.ChargeTimeDecMove     = (OInt)json.ct_mov;
     this.ChargeTimeDecAction   = (OInt)json.ct_act;
     this.AddHitRateSide        = (OInt)json.hit_side;
     this.AddHitRateBack        = (OInt)json.hit_back;
     this.HpAutoHealRate        = (OInt)json.ahhp_rate;
     this.MpAutoHealRate        = (OInt)json.ahmp_rate;
     this.GoodSleepHpHealRate   = (OInt)json.gshp_rate;
     this.GoodSleepMpHealRate   = (OInt)json.gsmp_rate;
     this.HpDyingRate           = (OInt)json.dy_rate;
     this.ZeneiSupportSkillRate = (OInt)json.zsup_rate;
     this.BeginnerDays          = (OInt)json.beginner_days;
     this.ArtifactBoxCap        = (OInt)json.afcap;
     this.CommonPieceFire       = (OString)json.cmn_pi_fire;
     this.CommonPieceWater      = (OString)json.cmn_pi_water;
     this.CommonPieceThunder    = (OString)json.cmn_pi_thunder;
     this.CommonPieceWind       = (OString)json.cmn_pi_wind;
     this.CommonPieceShine      = (OString)json.cmn_pi_shine;
     this.CommonPieceDark       = (OString)json.cmn_pi_dark;
     this.CommonPieceAll        = (OString)json.cmn_pi_all;
     this.PartyNumNormal        = json.ptnum_nml;
     this.PartyNumEvent         = json.ptnum_evnt;
     this.PartyNumMulti         = json.ptnum_mlt;
     this.PartyNumArenaAttack   = json.ptnum_aatk;
     this.PartyNumArenaDefense  = json.ptnum_adef;
     this.PartyNumChQuest       = json.ptnum_chq;
     this.PartyNumTower         = json.ptnum_tow;
     this.PartyNumVersus        = json.ptnum_vs;
     this.PartyNumMultiTower    = json.ptnum_mt;
     this.PartyNumOrdeal        = json.ptnum_ordeal;
     this.IsDisableSuspend      = (OBool)(json.notsus != 0);
     this.SuspendSaveInterval   = (OInt)json.sus_int;
     this.IsJobMaster           = json.jobms != 0;
     this.DefaultDeathCount     = (OInt)json.death_count;
     this.DefaultClockUpValue   = (OInt)json.fast_val;
     this.DefaultClockDownValue = (OInt)json.slow_val;
     if (json.equip_artifact_slot_unlock != null && json.equip_artifact_slot_unlock.Length > 0)
     {
         this.EquipArtifactSlotUnlock = new OInt[json.equip_artifact_slot_unlock.Length];
         for (int index = 0; index < json.equip_artifact_slot_unlock.Length; ++index)
         {
             this.EquipArtifactSlotUnlock[index] = (OInt)json.equip_artifact_slot_unlock[index];
         }
     }
     this.KnockBackHeight = (OInt)json.kb_gh;
     this.ThrowHeight     = (OInt)json.th_gh;
     if (json.art_rare_pi != null)
     {
         this.ArtifactRarePiece = new OString[json.art_rare_pi.Length];
         for (int index = 0; index < this.ArtifactRarePiece.Length; ++index)
         {
             this.ArtifactRarePiece[index] = (OString)json.art_rare_pi[index];
         }
     }
     this.ArtifactCommonPiece        = (OString)json.art_cmn_pi;
     this.SoulCommonPiece            = this.ConvertOStringArray(json.soul_rare);
     this.EquipCommonPiece           = this.ConvertOStringArray(json.equ_rare_pi);
     this.EquipCommonPieceNum        = this.ConvertOIntArray(json.equ_rare_pi_use);
     this.EquipCommonPieceCost       = this.ConvertOIntArray(json.equ_rare_cost);
     this.EquipCmn                   = this.ConvertOStringArray(json.equip_cmn);
     this.AudienceMax                = (OInt)json.aud_max;
     this.AbilityRankUpPointMax      = (OInt)json.ab_rankup_max;
     this.AbilityRankUpPointAddMax   = (OInt)json.ab_rankup_addmax;
     this.AbilityRankupPointCoinRate = (OInt)json.ab_coin_convert;
     this.FirstFriendMax             = (OInt)json.firstfriend_max;
     this.FirstFriendCoin            = (OInt)json.firstfriend_coin;
     this.CombinationRate            = (OInt)json.cmb_rate;
     this.WeakUpRate                 = (OInt)json.weak_up;
     this.ResistDownRate             = (OInt)json.resist_dw;
     this.OrdealCT                   = (OInt)json.ordeal_ct;
     this.EsaAssist                  = (OInt)json.esa_assist;
     this.EsaResist                  = (OInt)json.esa_resist;
     this.CardSellMul                = json.card_sell_mul;
     this.CardExpMul                 = json.card_exp_mul;
     this.CardMax                 = (OInt)json.card_max;
     this.CardTrustMax            = (OInt)json.card_trust_max;
     this.CardTrustPileUp         = (OInt)json.card_trust_en_bonus;
     this.CardAwakeUnlockLevelCap = (OInt)json.card_awake_unlock_lvcap;
     this.TobiraLvCap             = (OInt)json.tobira_lv_cap;
     this.TobiraUnitLvCapBonus    = (OInt)json.tobira_unit_lv_cap;
     this.TobiraUnlockElem        = new OString[json.tobira_unlock_elem.Length];
     for (int index = 0; index < this.TobiraUnlockElem.Length; ++index)
     {
         this.TobiraUnlockElem[index] = (OString)json.tobira_unlock_elem[index];
     }
     this.TobiraUnlockBirth = new OString[json.tobira_unlock_birth.Length];
     for (int index = 0; index < this.TobiraUnlockBirth.Length; ++index)
     {
         this.TobiraUnlockBirth[index] = (OString)json.tobira_unlock_birth[index];
     }
     this.IniValRec            = (OInt)json.ini_rec;
     this.GuerrillaVal         = (OInt)json.guerrilla_val;
     this.DraftSelectSeconds   = (OInt)json.draft_select_sec;
     this.DraftOrganizeSeconds = (OInt)json.draft_organize_sec;
     this.DraftPlaceSeconds    = (OInt)json.draft_place_sec;
     return(true);
 }
示例#7
0
 public bool Deserialize(JSON_UnitParam json)
 {
     if (json == null)
     {
         return(false);
     }
     this.no       = json.no;
     this.iname    = json.iname;
     this.name     = json.name;
     this.ai       = (OString)json.ai;
     this.model    = json.mdl;
     this.grow     = (OString)json.grow;
     this.piece    = (OString)json.piece;
     this.birth    = (OString)json.birth;
     this.skill    = (OString)json.skill;
     this.ability  = (OString)json.ability;
     this.ma_quest = (OString)json.ma_quest;
     this.sw       = (OInt)Math.Max(json.sw, 1);
     this.sh       = (OInt)Math.Max(json.sh, 1);
     this.sex      = (ESex)json.sex;
     this.rare     = (OInt)json.rare;
     this.raremax  = (OInt)json.raremax;
     this.type     = (EUnitType)json.type;
     this.element  = (EElement)json.elem;
     this.hero     = (OInt)json.hero;
     this.search   = (OInt)json.search;
     this.stopped  = (OBool)(json.stop != 0);
     this.summon   = json.notsmn == 0;
     if (!string.IsNullOrEmpty(json.available_at))
     {
         try
         {
             this.available_at = DateTime.Parse(json.available_at);
         }
         catch
         {
             this.available_at = DateTime.MaxValue;
         }
     }
     this.height       = (OInt)json.height;
     this.weight       = (OInt)json.weight;
     this.jobsets      = (OString[])null;
     this.mJobSetCache = (JobSetParam[])null;
     this.tags         = (string[])null;
     this.jobtype      = (JobTypes)json.jt;
     this.role         = (RoleTypes)json.role;
     this.mov          = (OInt)json.mov;
     this.jmp          = (OInt)json.jmp;
     this.inimp        = (OInt)json.inimp;
     this.ma_rarity    = (OInt)json.ma_rarity;
     this.ma_lv        = (OInt)json.ma_lv;
     if (json.skins != null && json.skins.Length >= 1)
     {
         this.skins = new OString[json.skins.Length];
         for (int index = 0; index < json.skins.Length; ++index)
         {
             this.skins[index] = (OString)json.skins[index];
         }
     }
     this.djob              = (OString)json.djob;
     this.dbuki             = (OString)json.dbuki;
     this.default_skill     = (OString)json.dskl;
     this.default_abilities = (OString[])null;
     if (json.dabi != null && json.dabi.Length > 0)
     {
         this.default_abilities = new OString[json.dabi.Length];
         for (int index = 0; index < json.dabi.Length; ++index)
         {
             this.default_abilities[index] = (OString)json.dabi[index];
         }
     }
     if (this.type == EUnitType.EventUnit)
     {
         return(true);
     }
     if (json.jobsets != null)
     {
         this.jobsets = new OString[json.jobsets.Length];
         for (int index = 0; index < this.jobsets.Length; ++index)
         {
             this.jobsets[index] = (OString)json.jobsets[index];
         }
     }
     if (json.tag != null)
     {
         this.tags = json.tag.Split(',');
     }
     if (this.ini_status == null)
     {
         this.ini_status = new BaseStatus();
     }
     this.ini_status.param.hp                     = (OInt)json.hp;
     this.ini_status.param.mp                     = (OShort)json.mp;
     this.ini_status.param.atk                    = (OShort)json.atk;
     this.ini_status.param.def                    = (OShort)json.def;
     this.ini_status.param.mag                    = (OShort)json.mag;
     this.ini_status.param.mnd                    = (OShort)json.mnd;
     this.ini_status.param.dex                    = (OShort)json.dex;
     this.ini_status.param.spd                    = (OShort)json.spd;
     this.ini_status.param.cri                    = (OShort)json.cri;
     this.ini_status.param.luk                    = (OShort)json.luk;
     this.ini_status.enchant_resist.poison        = (OInt)json.rpo;
     this.ini_status.enchant_resist.paralyse      = (OInt)json.rpa;
     this.ini_status.enchant_resist.stun          = (OInt)json.rst;
     this.ini_status.enchant_resist.sleep         = (OInt)json.rsl;
     this.ini_status.enchant_resist.charm         = (OInt)json.rch;
     this.ini_status.enchant_resist.stone         = (OInt)json.rsn;
     this.ini_status.enchant_resist.blind         = (OInt)json.rbl;
     this.ini_status.enchant_resist.notskl        = (OInt)json.rns;
     this.ini_status.enchant_resist.notmov        = (OInt)json.rnm;
     this.ini_status.enchant_resist.notatk        = (OInt)json.rna;
     this.ini_status.enchant_resist.zombie        = (OInt)json.rzo;
     this.ini_status.enchant_resist.death         = (OInt)json.rde;
     this.ini_status.enchant_resist.knockback     = (OInt)json.rkn;
     this.ini_status.enchant_resist.resist_buff   = (OInt)0;
     this.ini_status.enchant_resist.resist_debuff = (OInt)json.rdf;
     this.ini_status.enchant_resist.berserk       = (OInt)json.rbe;
     this.ini_status.enchant_resist.stop          = (OInt)json.rcs;
     this.ini_status.enchant_resist.fast          = (OInt)json.rcu;
     this.ini_status.enchant_resist.slow          = (OInt)json.rcd;
     this.ini_status.enchant_resist.donsoku       = (OInt)json.rdo;
     this.ini_status.enchant_resist.rage          = (OInt)json.rra;
     if (this.max_status == null)
     {
         this.max_status = new BaseStatus();
     }
     this.max_status.param.hp                     = (OInt)json.mhp;
     this.max_status.param.mp                     = (OShort)json.mmp;
     this.max_status.param.atk                    = (OShort)json.matk;
     this.max_status.param.def                    = (OShort)json.mdef;
     this.max_status.param.mag                    = (OShort)json.mmag;
     this.max_status.param.mnd                    = (OShort)json.mmnd;
     this.max_status.param.dex                    = (OShort)json.mdex;
     this.max_status.param.spd                    = (OShort)json.mspd;
     this.max_status.param.cri                    = (OShort)json.mcri;
     this.max_status.param.luk                    = (OShort)json.mluk;
     this.max_status.enchant_resist.poison        = (OInt)json.mrpo;
     this.max_status.enchant_resist.paralyse      = (OInt)json.mrpa;
     this.max_status.enchant_resist.stun          = (OInt)json.mrst;
     this.max_status.enchant_resist.sleep         = (OInt)json.mrsl;
     this.max_status.enchant_resist.charm         = (OInt)json.mrch;
     this.max_status.enchant_resist.stone         = (OInt)json.mrsn;
     this.max_status.enchant_resist.blind         = (OInt)json.mrbl;
     this.max_status.enchant_resist.notskl        = (OInt)json.mrns;
     this.max_status.enchant_resist.notmov        = (OInt)json.mrnm;
     this.max_status.enchant_resist.notatk        = (OInt)json.mrna;
     this.max_status.enchant_resist.zombie        = (OInt)json.mrzo;
     this.max_status.enchant_resist.death         = (OInt)json.mrde;
     this.max_status.enchant_resist.knockback     = (OInt)json.mrkn;
     this.max_status.enchant_resist.resist_buff   = (OInt)0;
     this.max_status.enchant_resist.resist_debuff = (OInt)json.mrdf;
     this.max_status.enchant_resist.berserk       = (OInt)json.mrbe;
     this.max_status.enchant_resist.stop          = (OInt)json.mrcs;
     this.max_status.enchant_resist.fast          = (OInt)json.mrcu;
     this.max_status.enchant_resist.slow          = (OInt)json.mrcd;
     this.max_status.enchant_resist.donsoku       = (OInt)json.mrdo;
     this.max_status.enchant_resist.rage          = (OInt)json.mrra;
     this.leader_skills[0] = json.ls1;
     this.leader_skills[1] = json.ls2;
     this.leader_skills[2] = json.ls3;
     this.leader_skills[3] = json.ls4;
     this.leader_skills[4] = json.ls5;
     this.leader_skills[5] = json.ls6;
     this.recipes[0]       = json.recipe1;
     this.recipes[1]       = json.recipe2;
     this.recipes[2]       = json.recipe3;
     this.recipes[3]       = json.recipe4;
     this.recipes[4]       = json.recipe5;
     this.recipes[5]       = json.recipe6;
     this.image            = json.img;
     this.voice            = json.vce;
     if (json.jidx != null)
     {
         this.job_option_index = new OString[json.jidx.Length];
         for (int index = 0; index < json.jidx.Length; ++index)
         {
             this.job_option_index[index] = (OString)json.jidx[index];
         }
     }
     if (json.jimgs != null)
     {
         this.job_images = new OString[json.jimgs.Length];
         for (int index = 0; index < json.jimgs.Length; ++index)
         {
             this.job_images[index] = (OString)json.jimgs[index];
         }
     }
     if (json.jvcs != null)
     {
         this.job_voices = new OString[json.jvcs.Length];
         for (int index = 0; index < json.jvcs.Length; ++index)
         {
             this.job_voices[index] = (OString)json.jvcs[index];
         }
     }
     this.is_throw = (OBool)(json.no_trw == 0);
     return(true);
 }
示例#8
0
 public void Deserialize(JSON_VersusTowerParam json)
 {
     if (json == null)
     {
         return;
     }
     this.VersusTowerID = (OString)json.vstower_id;
     this.FloorName     = (OString)json.iname;
     this.Floor         = (OInt)json.floor;
     this.RankupNum     = (OInt)json.rankup_num;
     this.WinNum        = (OInt)json.win_num;
     this.LoseNum       = (OInt)json.lose_num;
     this.BonusNum      = (OInt)json.bonus_num;
     this.DownFloor     = (OInt)json.downfloor;
     this.ResetFloor    = (OInt)json.resetfloor;
     if (json.winitem != null && json.win_itemnum != null)
     {
         if (json.winitem.Length != json.win_itemnum.Length)
         {
             Debug.LogError((object)"VersusTower Param [ WinItem ] is Invalid");
         }
         this.WinIteminame = new OString[json.winitem.Length];
         this.WinItemNum   = new OInt[json.win_itemnum.Length];
         for (int index = 0; index < json.winitem.Length; ++index)
         {
             this.WinIteminame[index] = (OString)json.winitem[index];
         }
         for (int index = 0; index < json.win_itemnum.Length; ++index)
         {
             this.WinItemNum[index] = (OInt)json.win_itemnum[index];
         }
     }
     if (json.joinitem != null && json.join_itemnum != null)
     {
         if (json.joinitem.Length != json.join_itemnum.Length)
         {
             Debug.LogError((object)"VersusTower Param [ LoseItem ] is Invalid");
         }
         this.JoinIteminame = new OString[json.joinitem.Length];
         this.JoinItemNum   = new OInt[json.join_itemnum.Length];
         for (int index = 0; index < json.joinitem.Length; ++index)
         {
             this.JoinIteminame[index] = (OString)json.joinitem[index];
         }
         for (int index = 0; index < json.join_itemnum.Length; ++index)
         {
             this.JoinItemNum[index] = (OInt)json.join_itemnum[index];
         }
     }
     if (json.spbtl_item != null && json.spbtl_itemnum != null)
     {
         if (json.spbtl_item.Length != json.spbtl_itemnum.Length)
         {
             Debug.LogError((object)"VersusTower Param [ SpecialItem ] is Invalid");
         }
         this.SpIteminame = new OString[json.spbtl_item.Length];
         this.SpItemnum   = new OInt[json.spbtl_itemnum.Length];
         for (int index = 0; index < json.spbtl_item.Length; ++index)
         {
             this.SpIteminame[index] = (OString)json.spbtl_item[index];
         }
         for (int index = 0; index < json.spbtl_itemnum.Length; ++index)
         {
             this.SpItemnum[index] = (OInt)json.spbtl_itemnum[index];
         }
     }
     if (json.season_item != null && json.season_itemnum != null && json.season_itype != null)
     {
         if (json.season_item.Length != json.season_itemnum.Length)
         {
             Debug.LogError((object)"VersusTower Param [ SeasonItem ] is Invalid");
         }
         this.SeasonIteminame = new OString[json.season_item.Length];
         this.SeasonItemType  = new VERSUS_ITEM_TYPE[json.season_itype.Length];
         this.SeasonItemnum   = new OInt[json.season_itemnum.Length];
         for (int index = 0; index < json.season_item.Length; ++index)
         {
             this.SeasonIteminame[index] = (OString)json.season_item[index];
         }
         for (int index = 0; index < json.season_itype.Length; ++index)
         {
             this.SeasonItemType[index] = (VERSUS_ITEM_TYPE)Enum.Parse(typeof(VERSUS_ITEM_TYPE), json.season_itype[index], true);
         }
         for (int index = 0; index < json.season_itemnum.Length; ++index)
         {
             this.SeasonItemnum[index] = (OInt)json.season_itemnum[index];
         }
     }
     if (string.IsNullOrEmpty(json.arrival_item))
     {
         return;
     }
     this.ArrivalIteminame = (OString)json.arrival_item;
     this.ArrivalItemType  = (VERSUS_ITEM_TYPE)Enum.Parse(typeof(VERSUS_ITEM_TYPE), json.arrival_type, true);
     this.ArrivalItemNum   = (OInt)json.arrival_num;
 }
示例#9
0
 public bool Deserialize(JSON_UnitParam json)
 {
     if (json == null)
     {
         return(false);
     }
     this.iname    = json.iname;
     this.name     = json.name;
     this.model    = json.mdl;
     this.grow     = (OString)json.grow;
     this.piece    = json.piece;
     this.birth    = (OString)json.birth;
     this.birthID  = json.birth_id;
     this.ability  = json.ability;
     this.ma_quest = json.ma_quest;
     this.sex      = (ESex)json.sex;
     this.rare     = (byte)json.rare;
     this.raremax  = (byte)json.raremax;
     this.type     = (EUnitType)json.type;
     this.element  = (EElement)json.elem;
     this.flag.Set(0, json.hero != 0);
     this.search = (byte)json.search;
     this.flag.Set(1, json.notsmn == 0);
     if (!string.IsNullOrEmpty(json.available_at))
     {
         try
         {
             this.available_at = DateTime.Parse(json.available_at);
         }
         catch
         {
             this.available_at = DateTime.MaxValue;
         }
     }
     this.height       = (short)json.height;
     this.weight       = (short)json.weight;
     this.jobsets      = (string[])null;
     this.mJobSetCache = (JobSetParam[])null;
     this.tags         = (string[])null;
     if (json.skins != null && json.skins.Length >= 1)
     {
         this.skins = new string[json.skins.Length];
         for (int index = 0; index < json.skins.Length; ++index)
         {
             this.skins[index] = json.skins[index];
         }
     }
     if (UnitParam.NoJobStatus.IsExistParam(json))
     {
         this.no_job_status = new UnitParam.NoJobStatus();
         this.no_job_status.SetParam(json);
     }
     if (this.type == EUnitType.EventUnit)
     {
         return(true);
     }
     if (json.jobsets != null)
     {
         this.jobsets = new string[json.jobsets.Length];
         for (int index = 0; index < this.jobsets.Length; ++index)
         {
             this.jobsets[index] = json.jobsets[index];
         }
     }
     if (json.tag != null)
     {
         this.tags = json.tag.Split(',');
     }
     if (this.ini_status == null)
     {
         this.ini_status = new UnitParam.Status();
     }
     this.ini_status.SetParamIni(json);
     this.ini_status.SetEnchentParamIni(json);
     if (this.max_status == null)
     {
         this.max_status = new UnitParam.Status();
     }
     this.max_status.SetParamMax(json);
     this.max_status.SetEnchentParamMax(json);
     this.leader_skills[0] = json.ls1;
     this.leader_skills[1] = json.ls2;
     this.leader_skills[2] = json.ls3;
     this.leader_skills[3] = json.ls4;
     this.leader_skills[4] = json.ls5;
     this.leader_skills[5] = json.ls6;
     this.recipes[0]       = json.recipe1;
     this.recipes[1]       = json.recipe2;
     this.recipes[2]       = json.recipe3;
     this.recipes[3]       = json.recipe4;
     this.recipes[4]       = json.recipe5;
     this.recipes[5]       = json.recipe6;
     this.image            = json.img;
     this.voice            = json.vce;
     this.flag.Set(2, json.no_trw == 0);
     this.flag.Set(3, json.no_kb == 0);
     this.unlock_time = json.unlck_t;
     return(true);
 }