using CommonLang; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using XmdsCommonServer.XLS.Data; using XmdsCommonSkill.Plugin.CardSkill; namespace XmdsCommonServer.Plugin.Base { //技能相关全局信息 public class XmdsGlobalData { public static readonly XmdsSkillValue DefaultValue = new XmdsSkillValue("", false); /// /// 技能天赋信息 /// private static HashMap mTalentInfo = new HashMap(); /** 技能破定值 */ private static HashMap mSkillBreakShieldValue = new HashMap(); //玩家天赋数据,重进游戏保存 // private static HashMap mPlayerCardModuleMaps = new HashMap(); public static void PutTalentData(int skillID, XmdsSkillValue data) { if(data.GetValue(1) > 0 || data.GetValue(2) > 0) { mTalentInfo.Put(skillID, data); } } public static XmdsSkillValue GetTalentData(int skillID) { XmdsSkillValue outData; mTalentInfo.TryGetValue(skillID, out outData); return (outData == null) ? DefaultValue : outData; } /** 记录技能破定信息 */ public static void PutSkillBreakShieldValue(int skillId, int value) { mSkillBreakShieldValue.Put(skillId, value); } public static int GetSkillBreakShieldValue(int skillId) { return mSkillBreakShieldValue.Get(skillId); } // public static JSGPlayerCardModule GetPlayerCardModule(XmdsVirtual player) // { // if(player == null || string.IsNullOrEmpty(player.mUnit.PlayerUUID)) // { // return null; // } // // JSGPlayerCardModule module = mPlayerCardModuleMaps.Get(player.mUnit.PlayerUUID); // if(module == null) // { // module = new JSGPlayerCardModule(player); // mPlayerCardModuleMaps.Put(player.mUnit.PlayerUUID, module); // } // // return module; // } } }