public static void UpdateRaiseItemInfo(RaiseInfo raiseItemInfo, MainWindowViewModel viewModel) { viewModel.AbilityBookGoldStock = 0; viewModel.AbilityBookGoldAvailable = 0; viewModel.AbilityBookSilverStock = 0; viewModel.AbilityBookSilverAvailable = 0; viewModel.AbilityBookBronzeStock = 0; viewModel.AbilityBookBronzeAvailable = 0; viewModel.StrengthStatueGoldStock = 0; viewModel.StrengthStatueGoldAvailable = 0; viewModel.StrengthStatueSilverStock = 0; viewModel.StrengthStatueSilverAvailable = 0; viewModel.StrengthStatueBronzeStock = 0; viewModel.StrengthStatueBronzeAvailable = 0; if (raiseItemInfo.items != null) { if (raiseItemInfo.items.ability != null) { foreach (var item in raiseItemInfo.items.ability) { switch (item._id) { case AstrumClient.INSTANT_ABILITY_BOOK_GOLD: viewModel.AbilityBookGoldStock = item.stock; viewModel.AbilityBookGoldAvailable = item.available; break; case AstrumClient.INSTANT_ABILITY_BOOK_SILVER: viewModel.AbilityBookSilverStock = item.stock; viewModel.AbilityBookSilverAvailable = item.available; break; case AstrumClient.INSTANT_ABILITY_BOOK_BRONZE: viewModel.AbilityBookBronzeStock = item.stock; viewModel.AbilityBookBronzeAvailable = item.available; break; } } } if (raiseItemInfo.items.exp != null) { foreach (var item in raiseItemInfo.items.exp) { switch (item._id) { case AstrumClient.INSTANT_STRENGTH_STATUE_GOLD: viewModel.StrengthStatueGoldStock = item.stock; viewModel.StrengthStatueGoldAvailable = item.available; break; case AstrumClient.INSTANT_STRENGTH_STATUE_SILVER: viewModel.StrengthStatueSilverStock = item.stock; viewModel.StrengthStatueSilverAvailable = item.available; break; case AstrumClient.INSTANT_STRENGTH_STATUE_BRONZE: viewModel.StrengthStatueBronzeStock = item.stock; viewModel.StrengthStatueBronzeAvailable = item.available; break; } } } } }
public static void UpdateRaiseInfo(RaiseInfo raiseInfo,MainWindowViewModel viewModel) { viewModel.CardQuantity = raiseInfo.card.value; viewModel.CardMax = raiseInfo.card.max; viewModel.TrainingBase = raiseInfo.@base; viewModel.TrainingBaseId = raiseInfo.@base._id; viewModel.TrainingBaseRare = [email protected]; viewModel.TrainingBaseName = [email protected]; viewModel.TrainingBaseLevel = [email protected]; viewModel.TrainingBaseMaxLevel = [email protected]; viewModel.TrainingBaseAbilityLevel = [email protected]; viewModel.TrainingBaseMaxAbilityLevel = [email protected]; viewModel.TrainingBaseExpGrowth = [email protected]; viewModel.TrainingBaseAbilityGrowth = [email protected]; }