public static void GetAttribute(LopetInfo lInfo, LopetData lData, ref int maxHP, ref int attack, ref int physicDefense, ref int magicDefense) { if (lInfo == null) { global::Debug.LogError(new object[] { "lInfo == null" }); return; } maxHP = lInfo.MaxHP + lInfo.MaxHPInc * (int)lData.Level; attack = lInfo.Attack + lInfo.AttackInc * (int)lData.Level; physicDefense = lInfo.PhysicDefense + lInfo.PhysicDefenseInc * (int)lData.Level; magicDefense = lInfo.MagicDefense + lInfo.MagicDefenseInc * (int)lData.Level; int num = (int)(lData.Awake - 1u); if (num >= 0 && num < GameConst.GetInt32(251)) { if (num < lInfo.AwakeAttack.Count) { attack += lInfo.AwakeAttack[num]; } if (num < lInfo.AwakePhysicDefense.Count) { physicDefense += lInfo.AwakePhysicDefense[num]; } if (num < lInfo.AwakeMagicDefense.Count) { magicDefense += lInfo.AwakeMagicDefense[num]; } if (num < lInfo.AwakeMaxHP.Count) { maxHP += lInfo.AwakeMaxHP[num]; } } }
public LopetDataEx(LopetData data, LopetInfo info) { this.Data = data; this.Info = info; }
private void AddLopet(LopetData data) { LopetInfo info = Globals.Instance.AttDB.LopetDict.GetInfo(data.InfoID); if (info == null) { Debug.LogError(new object[] { string.Format("LopetDict.GetInfo error, id = {0}", data.InfoID) }); return; } LopetDataEx lopetDataEx = new LopetDataEx(data, info); this.lopets.Add(lopetDataEx.Data.ID, lopetDataEx); }