using FL.Network; using System; using System.Collections.Generic; using XGame.Database; using XGame.Framework; using XGame.Framework.Data; namespace FL.Data { /// /// 职业类型 /// public enum eCareerType { Novice = 0, // 初始职业 Soldier, // 战士 Shooter, // 弓箭手 Magician, // 魔法师 } /// /// 职业进阶类型 /// public enum eAdvanceType { Beginner = 1, // 基础职业 ShieldWarrior = 2, // 盾战士 Berserker = 5, // 狂战士 CriticalShooter =3,// 暴击射手 ComboShooter =6, // 连击射手 SpellMage = 4, // 咒术法师 ViolentMage =7, // 暴力法师 } public class PlayerData : DataSingleton, IDisposable { public int chapterId = 10010101; public int[] skillIds = new int[] { 10011 };//13521;200705 , public long UID { get; set; } public int ServerId { get; set; } // 所属分区 public string Name { get; set; } private List _runePlanNamesArray;// 方案名列表 public List RunePlanNamesArray => _runePlanNamesArray ??= new List(); private Attributes _attr; public Attributes Attr => _attr ??= ObjectPool.Acquire(); private List _jobHistoryList; //职业历史,记录转职的路径 public List JobHistoryList => _jobHistoryList ??= new List(); private Dictionary _runePlanMap; //符文槽位(1-6)镶嵌的符文id(空值表示该槽位还未解锁) public Dictionary RunePlanMap => _runePlanMap ??= new Dictionary(); public string MapAssetName { get { var chapter = ChapterTableRepo.Get(chapterId); var map = MapTableRepo.Get(chapter.Map); return map.AssetName; } } /// /// 角色等级 /// public int Level { get; set; } /// /// 当前经验值 /// public long Exp { get; set; } /// /// 角色称号 /// public string Title { get; set; } /// /// 角色头像 /// public string HeadIcon { get; set; } /// /// 微信头像 /// public string WXHeadIcon { get; set; } /// /// 累计充值金额 /// public int Recharge { get; set; } /// /// 玩家战力 /// public long Power { get; set; } /// /// 最好一次登陆时间(豪秒) /// public long LastLoginTime { get; set; } /// /// 当前职业id /// public int JobId { get; set; } /// /// 最近被重置过的职业id /// public int ResetJobId { get; set; } /// /// 当前的觉醒印记方案索引值 /// public int CurPlanIndex { set; get; } /// /// (方案)可升级的总点数 /// public int AllPoint { get; set; } void IDisposable.Dispose() { if (_attr != null) { ObjectPool.Recycle(_attr); _attr = null; } _runePlanMap?.Clear(); _jobHistoryList?.Clear(); _runePlanNamesArray?.Clear(); } } }