public void ClearNewEquipmentMarks() { // _newEquipmentMarksDictionary.Clear(); // if (onNewEquipmentMarksChangedDelegate != null) // { // onNewEquipmentMarksChangedDelegate(); // } EquipModelLuaTable.GetLuaFunction("ClearNewEquipmentMarks").Call(); }
public void SetEquipmentAsChecked(int equipmentInstanceID) { // if (_newEquipmentMarksDictionary.ContainsKey(equipmentInstanceID)) // { // _newEquipmentMarksDictionary.Remove(equipmentInstanceID); // if (onNewEquipmentMarksChangedDelegate != null) // { // onNewEquipmentMarksChangedDelegate(); // } // } EquipModelLuaTable.GetLuaFunction("SetEquipmentAsChecked").Call(equipmentInstanceID); }
public Dictionary <int, EquipmentInfo> GetAllEquipmentInfoDictioary() { // return _equipmentsDictionary; Dictionary <int, EquipmentInfo> allEquipmentInfoDictionary = null; LuaFunction getAllEquipmentInfoDictionaryLuaFunction = EquipModelLuaTable.GetLuaFunction("GetAllEquipmentInfoDictionary"); LuaTable allEquipmentInfoLuaTable = (LuaTable)getAllEquipmentInfoDictionaryLuaFunction.Call(null)[0]; if (allEquipmentInfoLuaTable != null) { allEquipmentInfoDictionary = new Dictionary <int, EquipmentInfo>(); foreach (DictionaryEntry kvp in allEquipmentInfoLuaTable.ToDictTable()) { int equipmentInstanceID = kvp.Key.ToString().ToInt32(); LuaTable equipmentInfoLuaTable = (LuaTable)kvp.Value; EquipmentInfo equipmentInfo = new EquipmentInfo(equipmentInfoLuaTable); allEquipmentInfoDictionary.Add(equipmentInstanceID, equipmentInfo); } } return(allEquipmentInfoDictionary); }
public bool IsNewEquipment(int instanceID) { // return _newEquipmentMarksDictionary.ContainsKey(instanceID); return(EquipModelLuaTable.GetLuaFunction("IsNewEquipment").Call(instanceID)[0].ToString().ToBoolean()); }
// public bool AddEquipmentInfo (EquipmentInfo equipmentInfo, bool isNew) // { // if (_equipmentsDictionary.ContainsKey(equipmentInfo.instanceID)) // { // return false; // } // _equipmentsDictionary.Add(equipmentInfo.instanceID, equipmentInfo); // if (isNew) // { // _newEquipmentMarksDictionary.Add(equipmentInfo.instanceID, equipmentInfo); // } // return true; // } // public bool RemoveEquipmentInfo (int instanceID) // { // return _equipmentsDictionary.Remove(instanceID); // } // public void UpdateEquipmentInfo (Equip equip) // { // GetEquipmentInfoByInstanceID(equip.id).Update(equip); // if (onEquipmentInfoUpdateDelegate != null) // { // onEquipmentInfoUpdateDelegate(equip.id); // } // } public bool HasNewEquipment() { // return _newEquipmentMarksDictionary.Count > 0; return(EquipModelLuaTable.GetLuaFunction("HasNewEquipment").Call(null)[0].ToString().ToBoolean()); }
public int GetAllEquipmentCount() { // return _equipmentsDictionary.Count; return(EquipModelLuaTable.GetLuaFunction("GetAllEquipmentCount").Call(null)[0].ToString().ToInt32()); }