public GDEItemData ShallowClone() { string newKey = Guid.NewGuid().ToString(); GDEItemData newClone = new GDEItemData(newKey); newClone.num = num; newClone.index = index; newClone.id = id; return(newClone); }
public void Reset_ItemInfo() { GDEDataManager.ResetToDefault(_key, ItemInfoKey); Dictionary <string, object> dict; GDEDataManager.Get(_key, out dict); string customDataKey; dict.TryGetString(ItemInfoKey, out customDataKey); _ItemInfo = new GDEItemData(customDataKey); ItemInfo.ResetAll(); }
public override void LoadFromSavedData(string dataKey) { _key = dataKey; _locked = GDEDataManager.GetBool(_key, lockedKey, _locked); _lv = GDEDataManager.GetInt(_key, lvKey, _lv); _status = GDEDataManager.GetInt(_key, statusKey, _status); _hashCode = GDEDataManager.GetInt(_key, hashCodeKey, _hashCode); _battleForce = GDEDataManager.GetInt(_key, battleForceKey, _battleForce); _hpPropAdd = GDEDataManager.GetInt(_key, hpPropAddKey, _hpPropAdd); _exp = GDEDataManager.GetInt(_key, expKey, _exp); _mpPropAdd = GDEDataManager.GetInt(_key, mpPropAddKey, _mpPropAdd); _tpPropAdd = GDEDataManager.GetInt(_key, tpPropAddKey, _tpPropAdd); _starNumUpgradeTimes = GDEDataManager.GetInt(_key, starNumUpgradeTimesKey, _starNumUpgradeTimes); _index = GDEDataManager.GetInt(_key, indexKey, _index); _wakeNum = GDEDataManager.GetInt(_key, wakeNumKey, _wakeNum); _nameBeforeId = GDEDataManager.GetInt(_key, nameBeforeIdKey, _nameBeforeId); _Likability = GDEDataManager.GetInt(_key, LikabilityKey, _Likability); _teamPos = GDEDataManager.GetInt(_key, teamPosKey, _teamPos); _likability = GDEDataManager.GetInt(_key, likabilityKey, _likability); _Fatigue = GDEDataManager.GetInt(_key, FatigueKey, _Fatigue); _TeamOrder = GDEDataManager.GetInt(_key, TeamOrderKey, _TeamOrder); _sex = GDEDataManager.GetInt(_key, sexKey, _sex); _skillLevel = GDEDataManager.GetInt(_key, skillLevelKey, _skillLevel); _teamIdBelongTo = GDEDataManager.GetString(_key, teamIdBelongToKey, _teamIdBelongTo); _id = GDEDataManager.GetString(_key, idKey, _id); _equipHelmet = GDEDataManager.GetCustom(_key, equipHelmetKey, _equipHelmet); _equipBreastplate = GDEDataManager.GetCustom(_key, equipBreastplateKey, _equipBreastplate); _equipGardebras = GDEDataManager.GetCustom(_key, equipGardebrasKey, _equipGardebras); _equipLegging = GDEDataManager.GetCustom(_key, equipLeggingKey, _equipLegging); _jewelry0 = GDEDataManager.GetCustom(_key, jewelry0Key, _jewelry0); _jewelry1 = GDEDataManager.GetCustom(_key, jewelry1Key, _jewelry1); _RoleAttritubeList = GDEDataManager.GetCustom(_key, RoleAttritubeListKey, _RoleAttritubeList); _equipWeapon = GDEDataManager.GetCustom(_key, equipWeaponKey, _equipWeapon); _a_skillOmega = GDEDataManager.GetCustom(_key, a_skillOmegaKey, _a_skillOmega); _a_skill0 = GDEDataManager.GetCustom(_key, a_skill0Key, _a_skill0); _a_skill1 = GDEDataManager.GetCustom(_key, a_skill1Key, _a_skill1); _ItemInfo = GDEDataManager.GetCustom(_key, ItemInfoKey, _ItemInfo); _AnimData = GDEDataManager.GetCustom(_key, AnimDataKey, _AnimData); }
public override void LoadFromDict(string dataKey, Dictionary <string, object> dict) { _key = dataKey; if (dict == null) { LoadFromSavedData(dataKey); } else { dict.TryGetBool(lockedKey, out _locked); dict.TryGetInt(lvKey, out _lv); dict.TryGetInt(statusKey, out _status); dict.TryGetInt(hashCodeKey, out _hashCode); dict.TryGetInt(battleForceKey, out _battleForce); dict.TryGetInt(hpPropAddKey, out _hpPropAdd); dict.TryGetInt(expKey, out _exp); dict.TryGetInt(mpPropAddKey, out _mpPropAdd); dict.TryGetInt(tpPropAddKey, out _tpPropAdd); dict.TryGetInt(starNumUpgradeTimesKey, out _starNumUpgradeTimes); dict.TryGetInt(indexKey, out _index); dict.TryGetInt(wakeNumKey, out _wakeNum); dict.TryGetInt(nameBeforeIdKey, out _nameBeforeId); dict.TryGetInt(LikabilityKey, out _Likability); dict.TryGetInt(teamPosKey, out _teamPos); dict.TryGetInt(likabilityKey, out _likability); dict.TryGetInt(FatigueKey, out _Fatigue); dict.TryGetInt(TeamOrderKey, out _TeamOrder); dict.TryGetInt(sexKey, out _sex); dict.TryGetInt(skillLevelKey, out _skillLevel); dict.TryGetString(teamIdBelongToKey, out _teamIdBelongTo); dict.TryGetString(idKey, out _id); string customDataKey; dict.TryGetString(equipHelmetKey, out customDataKey); _equipHelmet = new GDEEquipmentData(customDataKey); dict.TryGetString(equipBreastplateKey, out customDataKey); _equipBreastplate = new GDEEquipmentData(customDataKey); dict.TryGetString(equipGardebrasKey, out customDataKey); _equipGardebras = new GDEEquipmentData(customDataKey); dict.TryGetString(equipLeggingKey, out customDataKey); _equipLegging = new GDEEquipmentData(customDataKey); dict.TryGetString(jewelry0Key, out customDataKey); _jewelry0 = new GDEEquipmentData(customDataKey); dict.TryGetString(jewelry1Key, out customDataKey); _jewelry1 = new GDEEquipmentData(customDataKey); dict.TryGetString(RoleAttritubeListKey, out customDataKey); _RoleAttritubeList = new GDERoleAttritubeData(customDataKey); dict.TryGetString(equipWeaponKey, out customDataKey); _equipWeapon = new GDEEquipmentData(customDataKey); dict.TryGetString(a_skillOmegaKey, out customDataKey); _a_skillOmega = new GDEASkillData(customDataKey); dict.TryGetString(a_skill0Key, out customDataKey); _a_skill0 = new GDEASkillData(customDataKey); dict.TryGetString(a_skill1Key, out customDataKey); _a_skill1 = new GDEASkillData(customDataKey); dict.TryGetString(ItemInfoKey, out customDataKey); _ItemInfo = new GDEItemData(customDataKey); dict.TryGetString(AnimDataKey, out customDataKey); _AnimData = new GDEAnimData(customDataKey); LoadFromSavedData(dataKey); } }
public GDEItemData DeepClone() { GDEItemData newClone = ShallowClone(); return(newClone); }