Ejemplo n.º 1
0
            public Param(SkillData groupSkill, ConceptCardData currentCardData, int levelCap, int awakeCountCap, int prevLevel, int prevAwakeCount, bool includeMaxPowerUp)
            {
                this.skilName             = groupSkill.Name;
                this.prevParam            = new BaseStatus();
                this.prevParamMul         = new BaseStatus();
                this.currentParam         = new BaseStatus();
                this.currentParamMul      = new BaseStatus();
                this.prevParamBonus       = new BaseStatus();
                this.prevParamBonusMul    = new BaseStatus();
                this.currentParamBonus    = new BaseStatus();
                this.currentParamBonusMul = new BaseStatus();
                ConceptCardParam.GetSkillAllStatus(groupSkill.SkillID, levelCap, (int)currentCardData.Lv, ref this.currentParam, ref this.currentParamMul);
                ConceptCardParam.GetSkillAllStatus(groupSkill.SkillID, levelCap, prevLevel, ref this.prevParam, ref this.currentParamMul);
                SkillPowerUpResultContent.Param.GetBonusStatus(groupSkill, currentCardData, levelCap, awakeCountCap, (int)currentCardData.Lv, (int)currentCardData.AwakeCount, ref this.currentParamBonus, ref this.currentParamBonusMul, includeMaxPowerUp);
                SkillPowerUpResultContent.Param.GetBonusStatus(groupSkill, currentCardData, levelCap, awakeCountCap, prevLevel, prevAwakeCount, ref this.prevParamBonus, ref this.currentParamBonusMul, false);
                int length = Enum.GetValues(typeof(ParamTypes)).Length;

                for (int index1 = 0; index1 < length; ++index1)
                {
                    if (index1 != 2)
                    {
                        ParamTypes index2 = (ParamTypes)index1;
                        if ((int)this.prevParamBonus[index2] != (int)this.currentParamBonus[index2])
                        {
                            this.typeList.Add(index2);
                        }
                        if ((int)this.prevParamBonusMul[index2] != (int)this.currentParamBonusMul[index2])
                        {
                            this.typeListMul.Add(index2);
                        }
                    }
                }
            }
Ejemplo n.º 2
0
 public void SetDirectValues(BaseStatus old_status, BaseStatus new_status)
 {
     if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ListItem, (UnityEngine.Object)null))
     {
         DebugUtility.LogWarning(((Component)this).get_gameObject().GetPath((GameObject)null) + ": ListItem not set");
     }
     else
     {
         int      index1 = 0;
         string[] names  = Enum.GetNames(typeof(ParamTypes));
         Array    values = Enum.GetValues(typeof(ParamTypes));
         for (int index2 = 0; index2 < values.Length; ++index2)
         {
             int oldStatu = (int)old_status[(ParamTypes)values.GetValue(index2)];
             int newStatu = (int)new_status[(ParamTypes)values.GetValue(index2)];
             if (oldStatu != newStatu && index2 != 2)
             {
                 this.AddValue(index1, names[index2], oldStatu, newStatu, false);
                 ++index1;
             }
         }
         for (; index1 < this.mItems.Count; ++index1)
         {
             ((Component)this.mItems[index1]).get_gameObject().SetActive(false);
         }
     }
 }
Ejemplo n.º 3
0
 public void Setup(TobiraData tobiraData)
 {
     if (tobiraData == null)
     {
         DebugUtility.LogError("tobiraDataがnullの時はSetup(TobiraParam param)を使用してください");
     }
     else
     {
         this.m_Category = tobiraData.Param.TobiraCategory;
         this.m_TextTobiraName.set_text(TobiraParam.GetCategoryName(this.m_Category));
         this.m_IconTobira.ImageIndex = (int)this.m_Category;
         if (tobiraData.IsLearnedLeaderSkill)
         {
             TobiraLearnSkill listItem = this.CreateListItem();
             SkillData        skill    = new SkillData();
             skill.Setup(tobiraData.LearnedLeaderSkillIname, 1, 1, (MasterParam)null);
             listItem.Setup(skill);
         }
         List <AbilityData> newAbilitys = new List <AbilityData>();
         List <AbilityData> oldAbilitys = new List <AbilityData>();
         TobiraUtility.TryCraeteAbilityData(tobiraData.Param, tobiraData.Lv, newAbilitys, oldAbilitys, false);
         for (int index = 0; index < newAbilitys.Count; ++index)
         {
             this.CreateListItem().Setup(newAbilitys[index]);
         }
         BaseStatus add   = new BaseStatus();
         BaseStatus scale = new BaseStatus();
         TobiraUtility.CalcTobiraParameter(tobiraData.Param.UnitIname, this.m_Category, tobiraData.Lv, ref add, ref scale);
         this.m_StatusList.SetValues(add, scale, false);
         GameUtility.SetGameObjectActive(this.m_ObjectDetail, true);
         GameUtility.SetGameObjectActive(this.m_ObjectLock, false);
         GameUtility.SetGameObjectActive(this.m_ObjectCommingSoon, false);
     }
 }
Ejemplo n.º 4
0
 private static void GetBonusStatus(SkillData groupSkill, ConceptCardData currentCardData, int levelCap, int awakeCountCap, int level, int awakeCount, ref BaseStatus bonusAdd, ref BaseStatus bonusScale, bool includeMaxPowerUp)
 {
     if (currentCardData.EquipEffects == null)
     {
         return;
     }
     using (List <ConceptCardEquipEffect> .Enumerator enumerator = currentCardData.EquipEffects.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             ConceptCardEquipEffect current = enumerator.Current;
             if (current.CardSkill != null && current.CardSkill.Name == groupSkill.Name)
             {
                 current.GetAddCardSkillBuffStatusAwake(awakeCount, awakeCountCap, ref bonusAdd, ref bonusScale);
                 if (!includeMaxPowerUp || level != levelCap || awakeCount != awakeCountCap)
                 {
                     break;
                 }
                 BaseStatus total_add   = new BaseStatus();
                 BaseStatus total_scale = new BaseStatus();
                 current.GetAddCardSkillBuffStatusLvMax(level, levelCap, awakeCount, ref total_add, ref total_scale);
                 bonusAdd.Add(total_add);
                 bonusScale.Add(total_scale);
                 break;
             }
         }
     }
 }
Ejemplo n.º 5
0
 public void GetHomePassiveBuffStatus(ref BaseStatus fixed_status, ref BaseStatus scale_status, UnitData user = null, int job_index = 0, bool bCheckCondition = true)
 {
     fixed_status.Clear();
     scale_status.Clear();
     ArtifactData.WorkScaleStatus.Clear();
     SkillData.GetHomePassiveBuffStatus(this.EquipSkill, ref fixed_status, ref ArtifactData.WorkScaleStatus);
     scale_status.Add(ArtifactData.WorkScaleStatus);
     if (this.mLearningAbilities == null)
     {
         return;
     }
     for (int index1 = 0; index1 < this.mLearningAbilities.Count; ++index1)
     {
         AbilityData mLearningAbility = this.mLearningAbilities[index1];
         if ((user == null || mLearningAbility.CheckEnableUseAbility(user, job_index) || bCheckCondition) && mLearningAbility.Skills != null)
         {
             for (int index2 = 0; index2 < mLearningAbility.Skills.Count; ++index2)
             {
                 SkillData skill = mLearningAbility.Skills[index2];
                 ArtifactData.WorkScaleStatus.Clear();
                 SkillData.GetHomePassiveBuffStatus(skill, ref fixed_status, ref ArtifactData.WorkScaleStatus);
                 scale_status.Add(ArtifactData.WorkScaleStatus);
             }
         }
     }
 }
Ejemplo n.º 6
0
        public void UpdateJobRankTransfarStatus(MasterParam master)
        {
            BaseStatus baseStatus = new BaseStatus();

            for (int index1 = 0; index1 < this.ranks.Length; ++index1)
            {
                if (this.ranks[index1] != null)
                {
                    this.ranks[index1].TransfarStatus.Clear();
                    baseStatus.CopyTo(this.ranks[index1].TransfarStatus);
                    if (this.ranks[index1].equips != null || index1 != this.ranks.Length)
                    {
                        for (int index2 = 0; index2 < this.ranks[index1].equips.Length; ++index2)
                        {
                            if (!string.IsNullOrEmpty(this.ranks[index1].equips[index2]))
                            {
                                ItemParam itemParam = master.GetItemParam(this.ranks[index1].equips[index2]);
                                if (itemParam != null && !string.IsNullOrEmpty((string)itemParam.skill))
                                {
                                    SkillData skillData = new SkillData();
                                    skillData.Setup((string)itemParam.skill, 1, 1, master);
                                    skillData.BuffSkill(ESkillTiming.Passive, baseStatus, (BaseStatus)null, baseStatus, (BaseStatus)null, (RandXorshift)null, SkillEffectTargets.Target);
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 7
0
        public static void CalcUnitLevelStatus(UnitParam unit, int unitLv, ref BaseStatus status)
        {
            GrowParam growParam = MonoSingleton <GameManager> .GetInstanceDirect().GetGrowParam((string)unit.grow);

            if (growParam != null && growParam.curve != null)
            {
                growParam.CalcLevelCurveStatus(unitLv, ref status, unit.ini_status, unit.max_status);
            }
            else
            {
                unit.ini_status.param.CopyTo(status.param);
                if (unit.ini_status.enchant_resist != null)
                {
                    unit.ini_status.enchant_resist.CopyTo(status.enchant_resist);
                }
            }
            FixParam fixParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.FixParam;

            status.enchant_assist.esa_fire    = (OShort)fixParam.EsaAssist;
            status.enchant_assist.esa_water   = (OShort)fixParam.EsaAssist;
            status.enchant_assist.esa_wind    = (OShort)fixParam.EsaAssist;
            status.enchant_assist.esa_thunder = (OShort)fixParam.EsaAssist;
            status.enchant_assist.esa_shine   = (OShort)fixParam.EsaAssist;
            status.enchant_assist.esa_dark    = (OShort)fixParam.EsaAssist;
            status.enchant_resist.esa_fire    = (OShort)fixParam.EsaResist;
            status.enchant_resist.esa_water   = (OShort)fixParam.EsaResist;
            status.enchant_resist.esa_wind    = (OShort)fixParam.EsaResist;
            status.enchant_resist.esa_thunder = (OShort)fixParam.EsaResist;
            status.enchant_resist.esa_shine   = (OShort)fixParam.EsaResist;
            status.enchant_resist.esa_dark    = (OShort)fixParam.EsaResist;
            status.param.rec = (OShort)fixParam.IniValRec;
        }
Ejemplo n.º 8
0
        public bool BuffSkill(ESkillTiming timing, EElement element, BaseStatus buff, BaseStatus buff_negative, BaseStatus buff_scale, BaseStatus debuff, BaseStatus debuff_negative, BaseStatus debuff_scale, RandXorshift rand = null, SkillEffectTargets buff_target = SkillEffectTargets.Target, bool is_resume = false, List <BuffEffect.BuffValues> list = null)
        {
            if (this.Timing != timing)
            {
                return(false);
            }
            BuffEffect buffEffect = this.GetBuffEffect(buff_target);

            if (buffEffect == null)
            {
                return(false);
            }
            if (!is_resume)
            {
                int rate = (int)buffEffect.param.rate;
                if (rate > 0 && rate < 100)
                {
                    DebugUtility.Assert(rand != null, "発動確率が設定されているスキルを正規タイミングで発動させたにも関わらず乱数生成器の設定がされていない");
                    if ((int)(rand.Get() % 100U) > rate)
                    {
                        return(false);
                    }
                }
            }
            if (list == null)
            {
                if (buff != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, true, false, SkillParamCalcTypes.Add, buff, (List <BuffEffect.BuffValues>)null);
                }
                if (buff_negative != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, true, true, SkillParamCalcTypes.Add, buff_negative, (List <BuffEffect.BuffValues>)null);
                }
                if (buff_scale != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, false, false, SkillParamCalcTypes.Scale, buff_scale, (List <BuffEffect.BuffValues>)null);
                }
                if (debuff != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, true, false, SkillParamCalcTypes.Add, debuff, (List <BuffEffect.BuffValues>)null);
                }
                if (debuff_negative != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, true, true, SkillParamCalcTypes.Add, debuff_negative, (List <BuffEffect.BuffValues>)null);
                }
                if (debuff_scale != null)
                {
                    this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, false, false, SkillParamCalcTypes.Scale, debuff_scale, (List <BuffEffect.BuffValues>)null);
                }
            }
            else
            {
                this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, false, false, SkillParamCalcTypes.Add, (BaseStatus)null, list);
                this.InternalBuffSkill(buffEffect, element, BuffTypes.Buff, false, false, SkillParamCalcTypes.Scale, (BaseStatus)null, list);
                this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, false, false, SkillParamCalcTypes.Add, (BaseStatus)null, list);
                this.InternalBuffSkill(buffEffect, element, BuffTypes.Debuff, false, false, SkillParamCalcTypes.Scale, (BaseStatus)null, list);
            }
            return(true);
        }
Ejemplo n.º 9
0
        public void GetBaseStatus(ref BaseStatus total_add, ref BaseStatus total_scale)
        {
            if (total_add == null || total_scale == null)
            {
                return;
            }
            total_add.Clear();
            total_scale.Clear();
            BaseStatus status1 = new BaseStatus();
            BaseStatus status2 = new BaseStatus();
            BaseStatus status3 = new BaseStatus();
            BaseStatus status4 = new BaseStatus();
            BaseStatus status5 = new BaseStatus();
            BaseStatus status6 = new BaseStatus();

            this.CalcBuffStatus(ref status1, EElement.None, BuffTypes.Buff, true, false, SkillParamCalcTypes.Add, 0);
            this.CalcBuffStatus(ref status2, EElement.None, BuffTypes.Buff, true, true, SkillParamCalcTypes.Add, 0);
            this.CalcBuffStatus(ref status3, EElement.None, BuffTypes.Buff, false, false, SkillParamCalcTypes.Scale, 0);
            this.CalcBuffStatus(ref status4, EElement.None, BuffTypes.Debuff, true, false, SkillParamCalcTypes.Add, 0);
            this.CalcBuffStatus(ref status5, EElement.None, BuffTypes.Debuff, true, true, SkillParamCalcTypes.Add, 0);
            this.CalcBuffStatus(ref status6, EElement.None, BuffTypes.Debuff, false, false, SkillParamCalcTypes.Scale, 0);
            total_add.Add(status1);
            total_add.Add(status2);
            total_add.Add(status4);
            total_add.Add(status5);
            total_scale.Add(status3);
            total_scale.Add(status6);
        }
Ejemplo n.º 10
0
 public void SetValues(BaseStatus paramAdd, BaseStatus paramMul, BaseStatus modAdd, BaseStatus modMul)
 {
     if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ListItem, (UnityEngine.Object)null))
     {
         DebugUtility.LogWarning(((Component)this).get_gameObject().GetPath((GameObject)null) + ": ListItem not set");
     }
     else
     {
         int      index1 = 0;
         string[] names  = Enum.GetNames(typeof(ParamTypes));
         Array    values = Enum.GetValues(typeof(ParamTypes));
         for (int index2 = 0; index2 < values.Length; ++index2)
         {
             int num1   = (int)paramAdd[(ParamTypes)values.GetValue(index2)];
             int bonus1 = (int)modAdd[(ParamTypes)values.GetValue(index2)] - num1;
             if (num1 != 0 && index2 != 2)
             {
                 this.AddValue(index1, names[index2], num1, bonus1, false);
                 ++index1;
             }
             int num2   = (int)paramMul[(ParamTypes)values.GetValue(index2)];
             int bonus2 = (int)modMul[(ParamTypes)values.GetValue(index2)] - num2;
             if (num2 != 0 && index2 != 2)
             {
                 this.AddValue(index1, names[index2], num2, bonus2, true);
                 ++index1;
             }
         }
         for (; index1 < this.mItems.Count; ++index1)
         {
             ((Component)this.mItems[index1]).get_gameObject().SetActive(false);
         }
     }
 }
Ejemplo n.º 11
0
        private bool RefreshEquipParam(ConceptCardData conceptCardData, ConceptCardEffectsParam equipParam)
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mStatusList, (UnityEngine.Object)null))
            {
                return(false);
            }
            if (equipParam == null)
            {
                this.mStatusList.SetValues(new BaseStatus(), new BaseStatus(), false);
                return(false);
            }
            BaseStatus add1   = new BaseStatus();
            BaseStatus add2   = new BaseStatus();
            BaseStatus scale1 = new BaseStatus();
            BaseStatus scale2 = new BaseStatus();

            ConceptCardParam.GetSkillStatus(equipParam.statusup_skill, (int)conceptCardData.LvCap, (int)conceptCardData.Lv, ref add1, ref scale1);
            if (this.mIsEnhance)
            {
                int levelCap = Mathf.Min((int)conceptCardData.LvCap, (int)conceptCardData.CurrentLvCap + this.mAddAwakeLv);
                int totalExp = (int)conceptCardData.Exp + this.mAddExp;
                int lv       = MonoSingleton <GameManager> .Instance.MasterParam.CalcConceptCardLevel((int)conceptCardData.Rarity, totalExp, levelCap);

                ConceptCardParam.GetSkillStatus(equipParam.statusup_skill, (int)conceptCardData.LvCap, lv, ref add2, ref scale2);
                this.mStatusList.SetValuesAfterOnly(add1, scale1, add2, scale2, false, true);
            }
            else
            {
                this.mStatusList.SetValues(add1, scale1, false);
            }
            return(this.IsValueEmpty(add1, scale1));
        }
Ejemplo n.º 12
0
        private bool actionBuff(Unit target, EffectCheckTimings chk_timing, RandXorshift rand = null)
        {
            if (this.mBuffEffect == null || target == null || !this.mBuffEffect.CheckEnableBuffTarget(target))
            {
                return(false);
            }
            if (rand != null)
            {
                int rate = (int)this.mBuffEffect.param.rate;
                if (0 < rate && rate < 100 && (int)(rand.Get() % 100U) > rate)
                {
                    return(true);
                }
            }
            BaseStatus status1 = new BaseStatus();
            BaseStatus status2 = new BaseStatus();
            BaseStatus status3 = new BaseStatus();
            BaseStatus status4 = new BaseStatus();
            BaseStatus status5 = new BaseStatus();
            BaseStatus status6 = new BaseStatus();

            this.mBuffEffect.CalcBuffStatus(ref status1, target.Element, BuffTypes.Buff, true, false, SkillParamCalcTypes.Add, 0);
            this.mBuffEffect.CalcBuffStatus(ref status2, target.Element, BuffTypes.Buff, true, true, SkillParamCalcTypes.Add, 0);
            this.mBuffEffect.CalcBuffStatus(ref status3, target.Element, BuffTypes.Buff, false, false, SkillParamCalcTypes.Scale, 0);
            this.mBuffEffect.CalcBuffStatus(ref status4, target.Element, BuffTypes.Debuff, true, false, SkillParamCalcTypes.Add, 0);
            this.mBuffEffect.CalcBuffStatus(ref status5, target.Element, BuffTypes.Debuff, true, true, SkillParamCalcTypes.Add, 0);
            this.mBuffEffect.CalcBuffStatus(ref status6, target.Element, BuffTypes.Debuff, false, false, SkillParamCalcTypes.Scale, 0);
            if (this.mBuffEffect.CheckBuffCalcType(BuffTypes.Buff, SkillParamCalcTypes.Add, false))
            {
                BuffAttachment buffAttachment = this.createBuffAttachment(target, BuffTypes.Buff, false, SkillParamCalcTypes.Add, status1, chk_timing);
                target.SetBuffAttachment(buffAttachment, false);
            }
            if (this.mBuffEffect.CheckBuffCalcType(BuffTypes.Buff, SkillParamCalcTypes.Add, true))
            {
                BuffAttachment buffAttachment = this.createBuffAttachment(target, BuffTypes.Buff, true, SkillParamCalcTypes.Add, status2, chk_timing);
                target.SetBuffAttachment(buffAttachment, false);
            }
            if (this.mBuffEffect.CheckBuffCalcType(BuffTypes.Buff, SkillParamCalcTypes.Scale))
            {
                BuffAttachment buffAttachment = this.createBuffAttachment(target, BuffTypes.Buff, false, SkillParamCalcTypes.Scale, status3, chk_timing);
                target.SetBuffAttachment(buffAttachment, false);
            }
            if (this.mBuffEffect.CheckBuffCalcType(BuffTypes.Debuff, SkillParamCalcTypes.Add, false))
            {
                BuffAttachment buffAttachment = this.createBuffAttachment(target, BuffTypes.Debuff, false, SkillParamCalcTypes.Add, status4, chk_timing);
                target.SetBuffAttachment(buffAttachment, false);
            }
            if (this.mBuffEffect.CheckBuffCalcType(BuffTypes.Debuff, SkillParamCalcTypes.Add, true))
            {
                BuffAttachment buffAttachment = this.createBuffAttachment(target, BuffTypes.Debuff, true, SkillParamCalcTypes.Add, status5, chk_timing);
                target.SetBuffAttachment(buffAttachment, false);
            }
            if (this.mBuffEffect.CheckBuffCalcType(BuffTypes.Debuff, SkillParamCalcTypes.Scale))
            {
                BuffAttachment buffAttachment = this.createBuffAttachment(target, BuffTypes.Debuff, false, SkillParamCalcTypes.Scale, status6, chk_timing);
                target.SetBuffAttachment(buffAttachment, false);
            }
            return(true);
        }
        private void CreateCardSkillBonus(ConceptCardEffectsParam[] effect_params, int lv, int lv_cap, int awake_count_cap, bool is_enable)
        {
            if (Object.op_Equality((Object)this.mParamTemplate, (Object)null))
            {
                return;
            }
            Transform     parent     = this.mParamTemplate.get_transform().get_parent();
            List <string> stringList = new List <string>();

            for (int index1 = 0; index1 < effect_params.Length; ++index1)
            {
                if (!string.IsNullOrEmpty(effect_params[index1].card_skill))
                {
                    SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(effect_params[index1].card_skill);

                    if (skillParam != null && !string.IsNullOrEmpty(effect_params[index1].add_card_skill_buff_lvmax) && !stringList.Contains(skillParam.iname))
                    {
                        BaseStatus status       = new BaseStatus();
                        BaseStatus scale_status = new BaseStatus();
                        SkillData  skill        = new SkillData();
                        skill.Setup(skillParam.iname, lv, lv_cap, (MasterParam)null);
                        SkillData.GetPassiveBuffStatus(skill, (BuffEffect[])null, EElement.None, ref status, ref scale_status);
                        BaseStatus total_add   = new BaseStatus();
                        BaseStatus total_scale = new BaseStatus();
                        effect_params[index1].GetAddCardSkillBuffStatusLvMax(lv, lv_cap, awake_count_cap, ref total_add, ref total_scale);
                        string     str1 = !Object.op_Inequality((Object)this.mParamStatusList, (Object)null) ? string.Empty : ((Object)this.mParamStatusList).get_name();
                        string     str2 = !Object.op_Inequality((Object)this.mBonusStatusList, (Object)null) ? string.Empty : ((Object)this.mBonusStatusList).get_name();
                        GameObject root = (GameObject)Object.Instantiate <GameObject>((M0)this.mParamTemplate);
                        root.get_transform().SetParent(parent, false);
                        StatusList[] componentsInChildren = (StatusList[])root.GetComponentsInChildren <StatusList>();
                        for (int index2 = 0; index2 < componentsInChildren.Length; ++index2)
                        {
                            if (((Object)componentsInChildren[index2]).get_name().StartsWith(str1))
                            {
                                componentsInChildren[index2].SetValues_Restrict(status, scale_status, total_add, total_scale, false);
                            }
                            else if (((Object)componentsInChildren[index2]).get_name().StartsWith(str2))
                            {
                                componentsInChildren[index2].SetValues_Restrict(status, scale_status, total_add, total_scale, true);
                            }
                        }
                        if (Object.op_Inequality((Object)this.mAwakeIconImageArray, (Object)null))
                        {
                            this.mAwakeIconImageArray.ImageIndex = this.mAwakeIconImageArray.Images.Length - 1;
                        }
                        DataSource.Bind <SkillParam>(root, skillParam);
                        DataSource.Bind <bool>(((Component)this).get_gameObject(), is_enable);
                        GameParameter.UpdateAll(root);
                        stringList.Add(skillParam.iname);
                        ++this.mCreatedCount;
                    }
                }
            }
            if (Object.op_Inequality((Object)this.mAwakeIconBgArray, (Object)null))
            {
                this.mAwakeIconBgArray.ImageIndex = !is_enable ? 1 : 0;
            }
            this.mParamTemplate.SetActive(false);
        }
Ejemplo n.º 14
0
 public void CopyTo(BaseStatus dsc)
 {
     this.param.CopyTo(dsc.param);
     this.element_assist.CopyTo(dsc.element_assist);
     this.element_resist.CopyTo(dsc.element_resist);
     this.enchant_assist.CopyTo(dsc.enchant_assist);
     this.enchant_resist.CopyTo(dsc.enchant_resist);
     this.bonus.CopyTo(dsc.bonus);
 }
Ejemplo n.º 15
0
 public void Swap(BaseStatus src, bool is_rev = false)
 {
     this.param.Swap(src.param, is_rev);
     this.element_assist.Swap(src.element_assist, is_rev);
     this.element_resist.Swap(src.element_resist, is_rev);
     this.enchant_assist.Swap(src.enchant_assist, is_rev);
     this.enchant_resist.Swap(src.enchant_resist, is_rev);
     this.bonus.Swap(src.bonus, is_rev);
 }
Ejemplo n.º 16
0
 public void ChoiceLowest(BaseStatus scale, BaseStatus base_status)
 {
     this.param.ChoiceLowest(scale.param, base_status.param);
     this.element_assist.ChoiceLowest(scale.element_assist, base_status.element_assist);
     this.element_resist.ChoiceLowest(scale.element_resist, base_status.element_resist);
     this.enchant_assist.ChoiceLowest(scale.enchant_assist, base_status.enchant_assist);
     this.enchant_resist.ChoiceLowest(scale.enchant_resist, base_status.enchant_resist);
     this.bonus.ChoiceLowest(scale.bonus, base_status.bonus);
 }
Ejemplo n.º 17
0
 public void SubConvRate(BaseStatus scale, BaseStatus base_status)
 {
     this.param.SubConvRate(scale.param, base_status.param);
     this.element_assist.SubConvRate(scale.element_assist, base_status.element_assist);
     this.element_resist.SubConvRate(scale.element_resist, base_status.element_resist);
     this.enchant_assist.SubConvRate(scale.enchant_assist, base_status.enchant_assist);
     this.enchant_resist.SubConvRate(scale.enchant_resist, base_status.enchant_resist);
     this.bonus.SubConvRate(scale.bonus, base_status.bonus);
 }
Ejemplo n.º 18
0
 public void AddRate(BaseStatus src)
 {
     this.param.AddRate(src.param);
     this.element_assist.AddRate(src.element_assist);
     this.element_resist.AddRate(src.element_resist);
     this.enchant_assist.AddRate(src.enchant_assist);
     this.enchant_resist.AddRate(src.enchant_resist);
     this.bonus.AddRate(src.bonus);
 }
Ejemplo n.º 19
0
 public void ReplaceLowest(BaseStatus comp)
 {
     this.param.ReplceLowest(comp.param);
     this.element_assist.ReplceLowest(comp.element_assist);
     this.element_resist.ReplceLowest(comp.element_resist);
     this.enchant_assist.ReplceLowest(comp.enchant_assist);
     this.enchant_resist.ReplceLowest(comp.enchant_resist);
     this.bonus.ReplceLowest(comp.bonus);
 }
Ejemplo n.º 20
0
 public void Sub(BaseStatus src)
 {
     this.param.Sub(src.param);
     this.element_assist.Sub(src.element_assist);
     this.element_resist.Sub(src.element_resist);
     this.enchant_assist.Sub(src.enchant_assist);
     this.enchant_resist.Sub(src.enchant_resist);
     this.bonus.Sub(src.bonus);
 }
Ejemplo n.º 21
0
        public void CalcLevelCurveStatus(int rank, ref BaseStatus result, BaseStatus ini_status, BaseStatus max_status)
        {
            int num1 = this.GetLevelCap() - 1;
            int num2 = rank - 1;

            ini_status.CopyTo(result);
            if (num2 < 1 || num1 < 1)
            {
                return;
            }
            if (num2 >= num1)
            {
                max_status.CopyTo(result);
            }
            else
            {
                BaseStatus baseStatus1 = new BaseStatus();
                BaseStatus baseStatus2 = new BaseStatus();
                for (int index1 = 0; index1 < this.curve.Count; ++index1)
                {
                    long num3 = (long)((int)this.curve[index1].lv - 1);
                    for (int index2 = index1; index2 > 0; --index2)
                    {
                        num3 -= (long)(int)this.curve[index2 - 1].lv;
                    }
                    long        num4         = (long)num2 >= num3 ? num3 : (long)num2;
                    StatusParam statusParam1 = ini_status.param;
                    StatusParam statusParam2 = max_status.param;
                    StatusParam src          = this.curve[index1].status.param;
                    src.CopyTo(baseStatus1.param);
                    baseStatus1.param.Sub(baseStatus2.param);
                    baseStatus2.param.Add(src);
                    for (int index2 = 0; index2 < baseStatus1.param.Length; ++index2)
                    {
                        long num5 = (long)(((int)statusParam2[(StatusTypes)index2] - (int)statusParam1[(StatusTypes)index2]) * (int)baseStatus1.param[(StatusTypes)index2] / 100);
                        if (num5 != 0L)
                        {
                            StatusParam statusParam3;
                            StatusTypes index3;
                            (statusParam3 = result.param)[index3 = (StatusTypes)index2] = (OInt)((int)statusParam3[index3] + (int)(100000L * num5 / num3 * num4 / 100000L));
                        }
                    }
                    ElementParam elementAssist1 = ini_status.element_assist;
                    ElementParam elementAssist2 = max_status.element_assist;
                    ElementParam elementAssist3 = this.curve[index1].status.element_assist;
                    elementAssist3.CopyTo(baseStatus1.element_assist);
                    baseStatus1.element_assist.Sub(baseStatus2.element_assist);
                    baseStatus2.element_assist.Add(elementAssist3);
                    for (int index2 = 0; index2 < baseStatus1.element_assist.values.Length; ++index2)
                    {
                        long num5 = (long)(((int)elementAssist2.values[index2] - (int)elementAssist1.values[index2]) * (int)baseStatus1.element_assist.values[index2] / 100);
                        if (num5 != 0L)
                        {
                            // ISSUE: explicit reference operation
                            // ISSUE: variable of a reference type
                            OShort& local = @result.element_assist.values[index2];
Ejemplo n.º 22
0
        public void Refresh(UnitData unitData, TobiraData tobiraData, TobiraParam tobiraParam)
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.TobiraTitleText, (UnityEngine.Object)null))
            {
                return;
            }
            this.TobiraTitleText.set_text(TobiraParam.GetCategoryName(tobiraParam.TobiraCategory));
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AdditionalLevelCap, (UnityEngine.Object)null))
            {
                this.AdditionalLevelCap.set_text(MonoSingleton <GameManager> .Instance.MasterParam.FixParam.TobiraUnitLvCapBonus.ToString());
            }
            if (tobiraData == null)
            {
                this.TobiraParamIconEnable.SetActive(false);
                this.TobiraParamIconDisable.SetActive(true);
                Array.ForEach <UnitTobiraParamLevel>(this.TobiraParamIconLevels, (Action <UnitTobiraParamLevel>)(paramLevel => paramLevel.Refresh(0)));
                this.LockView(unitData, tobiraParam);
                this.mTobiraParameters.ForEach((Action <GameObject>)(paramGO => UnityEngine.Object.Destroy((UnityEngine.Object)paramGO)));
                this.mTobiraParameters.Clear();
                BaseStatus add   = new BaseStatus();
                BaseStatus scale = new BaseStatus();
                TobiraUtility.CalcTobiraParameter(unitData.UnitID, tobiraParam.TobiraCategory, 1, ref add, ref scale);
                this.Status.SetValues(add, scale, true);
                TobiraConditionParam[] conditionsForUnit = MonoSingleton <GameManager> .Instance.MasterParam.GetTobiraConditionsForUnit(unitData.UnitID, tobiraParam.TobiraCategory);

                this.CreateConditionsItems(unitData, conditionsForUnit);
            }
            else
            {
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TobiraIcons, (UnityEngine.Object)null))
                {
                    this.TobiraIcons.ImageIndex = (int)tobiraData.Param.TobiraCategory;
                }
                this.TobiraParamIconEnable.SetActive(tobiraData.IsUnlocked);
                this.TobiraParamIconDisable.SetActive(!tobiraData.IsUnlocked);
                int level = tobiraData.ViewLv;
                Array.ForEach <UnitTobiraParamLevel>(this.TobiraParamIconLevels, (Action <UnitTobiraParamLevel>)(paramLevel => paramLevel.Refresh(level)));
                if (tobiraData.IsUnlocked)
                {
                    this.UnlockView(unitData, tobiraData);
                }
                else
                {
                    this.LockView(unitData, tobiraParam);
                }
                this.mTobiraParameters.ForEach((Action <GameObject>)(paramGO => UnityEngine.Object.Destroy((UnityEngine.Object)paramGO)));
                this.mTobiraParameters.Clear();
                BaseStatus add   = new BaseStatus();
                BaseStatus scale = new BaseStatus();
                TobiraUtility.CalcTobiraParameter(unitData.UnitID, tobiraData.Param.TobiraCategory, tobiraData.Lv, ref add, ref scale);
                this.Status.SetValues(add, scale, false);
                this.SetActiveConditionsItems(false);
            }
            this.SetMasterBonusText(tobiraParam);
        }
Ejemplo n.º 23
0
        public long GetSortData(ConceptCardListSortWindow.Type type)
        {
            BaseStatus equipEffectStatus = this.GetNoConditionsEquipEffectStatus();

            ConceptCardListSortWindow.Type type1 = type;
            switch (type1)
            {
            case ConceptCardListSortWindow.Type.LEVEL:
                return((long)(int)this.Lv);

            case ConceptCardListSortWindow.Type.RARITY:
                return((long)(int)this.Rarity);

            case ConceptCardListSortWindow.Type.ATK:
                return((long)(int)equipEffectStatus.param.atk);

            case ConceptCardListSortWindow.Type.DEF:
                return((long)(int)equipEffectStatus.param.def);

            default:
                if (type1 == ConceptCardListSortWindow.Type.MAG)
                {
                    return((long)(int)equipEffectStatus.param.mag);
                }
                if (type1 == ConceptCardListSortWindow.Type.MND)
                {
                    return((long)(int)equipEffectStatus.param.mnd);
                }
                if (type1 == ConceptCardListSortWindow.Type.SPD)
                {
                    return((long)(int)equipEffectStatus.param.spd);
                }
                if (type1 == ConceptCardListSortWindow.Type.LUCK)
                {
                    return((long)(int)equipEffectStatus.param.luk);
                }
                if (type1 == ConceptCardListSortWindow.Type.HP)
                {
                    return((long)(int)equipEffectStatus.param.hp);
                }
                if (type1 == ConceptCardListSortWindow.Type.TIME)
                {
                    return((long)this.UniqueID);
                }
                if (type1 == ConceptCardListSortWindow.Type.TRUST)
                {
                    return((long)(int)this.Trust);
                }
                if (type1 == ConceptCardListSortWindow.Type.AWAKE)
                {
                    return((long)(int)this.AwakeCount);
                }
                return(0);
            }
        }
Ejemplo n.º 24
0
            public BaseStatus CreateBaseStatus()
            {
                BaseStatus baseStatus = new BaseStatus();

                this.param.CopyTo(baseStatus.param);
                if (this.enchant_resist != null)
                {
                    this.enchant_resist.CopyTo(baseStatus.enchant_resist);
                }
                return(baseStatus);
            }
Ejemplo n.º 25
0
 public void UpdateStatus(ref BaseStatus fix, ref BaseStatus scale)
 {
     if (this.EquipEffects == null)
     {
         return;
     }
     for (int index = 0; index < this.EquipEffects.Count; ++index)
     {
         this.EquipEffects[index].GetStatus(ref fix, ref scale);
     }
 }
Ejemplo n.º 26
0
 public void SetValues_Restrict(BaseStatus paramBaseAdd, BaseStatus paramBaseMul, BaseStatus paramBonusAdd, BaseStatus paramBonusMul, bool new_param_only)
 {
     if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ListItem, (UnityEngine.Object)null))
     {
         DebugUtility.LogWarning(((Component)this).get_gameObject().GetPath((GameObject)null) + ": ListItem not set");
     }
     else
     {
         int      index1 = 0;
         string[] names  = Enum.GetNames(typeof(ParamTypes));
         Array    values = Enum.GetValues(typeof(ParamTypes));
         for (int index2 = 0; index2 < values.Length; ++index2)
         {
             ParamTypes index3 = (ParamTypes)values.GetValue(index2);
             if (index3 != ParamTypes.HpMax)
             {
                 int num1   = (int)paramBaseAdd[index3];
                 int bonus1 = (int)paramBonusAdd[index3];
                 if (bonus1 != 0)
                 {
                     if (num1 == 0 && new_param_only)
                     {
                         this.AddValue(index1, names[index2], bonus1, bonus1, false, false, false);
                         ++index1;
                     }
                     if (num1 != 0 && !new_param_only)
                     {
                         this.AddValue(index1, names[index2], bonus1, bonus1, false, false, false);
                         ++index1;
                     }
                 }
                 int num2   = (int)paramBaseMul[index3];
                 int bonus2 = (int)paramBonusMul[index3];
                 if (bonus2 != 0)
                 {
                     if (num2 == 0 && new_param_only)
                     {
                         this.AddValue(index1, names[index2], bonus2, bonus2, true, false, false);
                         ++index1;
                     }
                     if (num2 != 0 && !new_param_only)
                     {
                         this.AddValue(index1, names[index2], bonus2, bonus2, true, false, false);
                         ++index1;
                     }
                 }
             }
         }
         for (; index1 < this.mItems.Count; ++index1)
         {
             ((Component)this.mItems[index1]).get_gameObject().SetActive(false);
         }
     }
 }
Ejemplo n.º 27
0
 public void GetAddCardSkillBuffStatusLvMax(int lv, int lv_cap, int awake, ref BaseStatus total_add, ref BaseStatus total_scale)
 {
     if (this.mEffectParam == null)
     {
         total_add.Clear();
         total_scale.Clear();
     }
     else
     {
         this.mEffectParam.GetAddCardSkillBuffStatusLvMax(lv, lv_cap, awake, ref total_add, ref total_scale);
     }
 }
Ejemplo n.º 28
0
        public void GetAddCardSkillBuffStatusAwake(int awake, int awake_cap, ref BaseStatus total_add, ref BaseStatus total_scale)
        {
            total_add.Clear();
            total_scale.Clear();
            BuffEffect skillBuffEffectAwake = this.CreateAddCardSkillBuffEffectAwake(awake, awake_cap);

            if (skillBuffEffectAwake == null)
            {
                return;
            }
            skillBuffEffectAwake.GetBaseStatus(ref total_add, ref total_scale);
        }
Ejemplo n.º 29
0
        public void GetAddCardSkillBuffStatusLvMax(int lv, int lv_cap, int awake, ref BaseStatus total_add, ref BaseStatus total_scale)
        {
            total_add.Clear();
            total_scale.Clear();
            BuffEffect skillBuffEffectLvMax = this.CreateAddCardSkillBuffEffectLvMax(lv, lv_cap, awake);

            if (skillBuffEffectLvMax == null)
            {
                return;
            }
            skillBuffEffectLvMax.GetBaseStatus(ref total_add, ref total_scale);
        }
Ejemplo n.º 30
0
        public bool IsValueEmpty(BaseStatus paramAdd, BaseStatus paramMul)
        {
            Array values = Enum.GetValues(typeof(ParamTypes));

            for (int index = 0; index < values.Length; ++index)
            {
                if ((int)paramAdd[(ParamTypes)values.GetValue(index)] != 0 && index != 2 || (int)paramMul[(ParamTypes)values.GetValue(index)] != 0 && index != 2)
                {
                    return(false);
                }
            }
            return(true);
        }