public GDEAchievementData ShallowClone() { string newKey = Guid.NewGuid().ToString(); GDEAchievementData newClone = new GDEAchievementData(newKey); newClone.login = login; newClone.killFodder = killFodder; newClone.killNormalEnemy = killNormalEnemy; newClone.killBoss = killBoss; newClone.forgeEquip = forgeEquip; newClone.forgeProp = forgeProp; newClone.useProp = useProp; newClone.ownHero = ownHero; newClone.ownHeroFightForce = ownHeroFightForce; newClone.ownEquip = ownEquip; newClone.finishTarget = finishTarget; newClone.earnCoin = earnCoin; newClone.consumeCoin = consumeCoin; newClone.earnHonor = earnHonor; newClone.killElite = killElite; newClone.killGod = killGod; newClone.passedNum_level = passedNum_level; newClone.heroDie = heroDie; newClone.EnemiesGet = new List <GDEItemData>(EnemiesGet); newClone.Set_EnemiesGet(); return(newClone); }
public override void LoadFromDict(string dataKey, Dictionary <string, object> dict) { _key = dataKey; if (dict == null) { LoadFromSavedData(dataKey); } else { dict.TryGetInt(maxPassSectionKey, out _maxPassSection); dict.TryGetInt(lastPassSectionKey, out _lastPassSection); dict.TryGetInt(maxDurgeonPassLevelKey, out _maxDurgeonPassLevel); dict.TryGetInt(coinKey, out _coin); dict.TryGetInt(addGoldPercKey, out _addGoldPerc); dict.TryGetInt(allBufPercKey, out _allBufPerc); dict.TryGetInt(newBestLevelKey, out _newBestLevel); dict.TryGetInt(dimensionKey, out _dimension); dict.TryGetInt(damondKey, out _damond); dict.TryGetInt(sickBedNumKey, out _sickBedNum); dict.TryGetInt(honorPointKey, out _honorPoint); dict.TryGetInt(JianCaiKey, out _JianCai); string customDataKey; dict.TryGetString(achievementDataKey, out customDataKey); _achievementData = new GDEAchievementData(customDataKey); dict.TryGetIntList(temple_fighterKey, out temple_fighter); dict.TryGetIntList(temple_rangerKey, out temple_ranger); dict.TryGetIntList(temple_priestKey, out temple_priest); dict.TryGetIntList(temple_casterKey, out temple_caster); dict.TryGetIntList(bossKeysKey, out bossKeys); dict.TryGetIntList(bossKeyUsedKey, out bossKeyUsed); dict.TryGetCustomList(herosOwnedKey, out herosOwned); dict.TryGetCustomList(heroesTeamKey, out heroesTeam); dict.TryGetCustomList(consumablesKey, out consumables); dict.TryGetCustomList(equipsOwnedKey, out equipsOwned); dict.TryGetCustomList(propsTeamKey, out propsTeam); dict.TryGetCustomList(TimeTaskListKey, out TimeTaskList); dict.TryGetCustomList(goddessOwnedKey, out goddessOwned); dict.TryGetCustomList(buildingsOwnedKey, out buildingsOwned); dict.TryGetCustomList(ItemsOwnedKey, out ItemsOwned); dict.TryGetCustomList(NPCListKey, out NPCList); dict.TryGetCustomList(RunesOwnedKey, out RunesOwned); dict.TryGetCustomList(AltarPoolListKey, out AltarPoolList); dict.TryGetCustomList(finishSectionsListKey, out finishSectionsList); LoadFromSavedData(dataKey); } }
public GDEAchievementData DeepClone() { GDEAchievementData newClone = ShallowClone(); newClone.EnemiesGet = new List <GDEItemData>(); if (EnemiesGet != null) { foreach (var val in EnemiesGet) { newClone.EnemiesGet.Add(val.DeepClone()); } } newClone.Set_EnemiesGet(); return(newClone); }
public void Reset_achievementData() { GDEDataManager.ResetToDefault(_key, achievementDataKey); Dictionary <string, object> dict; GDEDataManager.Get(_key, out dict); string customDataKey; dict.TryGetString(achievementDataKey, out customDataKey); _achievementData = new GDEAchievementData(customDataKey); achievementData.ResetAll(); }
public override void LoadFromSavedData(string dataKey) { _key = dataKey; _maxPassSection = GDEDataManager.GetInt(_key, maxPassSectionKey, _maxPassSection); _lastPassSection = GDEDataManager.GetInt(_key, lastPassSectionKey, _lastPassSection); _maxDurgeonPassLevel = GDEDataManager.GetInt(_key, maxDurgeonPassLevelKey, _maxDurgeonPassLevel); _coin = GDEDataManager.GetInt(_key, coinKey, _coin); _addGoldPerc = GDEDataManager.GetInt(_key, addGoldPercKey, _addGoldPerc); _allBufPerc = GDEDataManager.GetInt(_key, allBufPercKey, _allBufPerc); _newBestLevel = GDEDataManager.GetInt(_key, newBestLevelKey, _newBestLevel); _dimension = GDEDataManager.GetInt(_key, dimensionKey, _dimension); _damond = GDEDataManager.GetInt(_key, damondKey, _damond); _sickBedNum = GDEDataManager.GetInt(_key, sickBedNumKey, _sickBedNum); _honorPoint = GDEDataManager.GetInt(_key, honorPointKey, _honorPoint); _JianCai = GDEDataManager.GetInt(_key, JianCaiKey, _JianCai); _achievementData = GDEDataManager.GetCustom(_key, achievementDataKey, _achievementData); temple_fighter = GDEDataManager.GetIntList(_key, temple_fighterKey, temple_fighter); temple_ranger = GDEDataManager.GetIntList(_key, temple_rangerKey, temple_ranger); temple_priest = GDEDataManager.GetIntList(_key, temple_priestKey, temple_priest); temple_caster = GDEDataManager.GetIntList(_key, temple_casterKey, temple_caster); bossKeys = GDEDataManager.GetIntList(_key, bossKeysKey, bossKeys); bossKeyUsed = GDEDataManager.GetIntList(_key, bossKeyUsedKey, bossKeyUsed); herosOwned = GDEDataManager.GetCustomList(_key, herosOwnedKey, herosOwned); heroesTeam = GDEDataManager.GetCustomList(_key, heroesTeamKey, heroesTeam); consumables = GDEDataManager.GetCustomList(_key, consumablesKey, consumables); equipsOwned = GDEDataManager.GetCustomList(_key, equipsOwnedKey, equipsOwned); propsTeam = GDEDataManager.GetCustomList(_key, propsTeamKey, propsTeam); TimeTaskList = GDEDataManager.GetCustomList(_key, TimeTaskListKey, TimeTaskList); goddessOwned = GDEDataManager.GetCustomList(_key, goddessOwnedKey, goddessOwned); buildingsOwned = GDEDataManager.GetCustomList(_key, buildingsOwnedKey, buildingsOwned); ItemsOwned = GDEDataManager.GetCustomList(_key, ItemsOwnedKey, ItemsOwned); NPCList = GDEDataManager.GetCustomList(_key, NPCListKey, NPCList); RunesOwned = GDEDataManager.GetCustomList(_key, RunesOwnedKey, RunesOwned); AltarPoolList = GDEDataManager.GetCustomList(_key, AltarPoolListKey, AltarPoolList); finishSectionsList = GDEDataManager.GetCustomList(_key, finishSectionsListKey, finishSectionsList); }