public AppearCharacterGenerator(PlayerAppearCharacterReserveModel playerAppearCharacterReserveModel) { this.appearCharacterModel = playerAppearCharacterReserveModel.AppearCharacterModel; this.conversationModel = playerAppearCharacterReserveModel.ConversationModel; this.rewardModel = playerAppearCharacterReserveModel.RewardModel; this.playerAppearCharacterReserveModel = playerAppearCharacterReserveModel; }
public void RegistReserve(AppearCharacterModel appearCharacterModel, ConversationModel conversationModel, RewardModel rewardModel, IDailyAppearCharacterRegistCondition dailyAppearCharacterRegistCondition) { var playerAppearCharacterReserveModel = this.dailyAppearCharacterRegistReserveCreateService.Execute( appearCharacterModel, conversationModel, rewardModel, dailyAppearCharacterRegistCondition ); this.RegistReserve(playerAppearCharacterReserveModel); }
public PlayerAppearCharacterReserveModel Execute( AppearCharacterModel appearCharacterModel, ConversationModel conversationModel, RewardModel rewardModel, IDailyAppearCharacterRegistCondition dailyAppearCharacterRegistCondition ) { return(playerAppearCharacterReserveRepository.Create( appearCharacterModel, conversationModel, rewardModel, dailyAppearCharacterRegistCondition )); }
public PlayerAppearCharacterReserveModel( uint id, AppearCharacterModel appearCharacterModel, ConversationModel conversationModel, RewardModel rewardModel, IDailyAppearCharacterRegistCondition dailyAppearCharacterRegistCondition, bool isNextRemove) { this.Id = id; this.AppearCharacterModel = appearCharacterModel; this.ConversationModel = conversationModel; this.RewardModel = rewardModel; this.DailyAppearCharacterRegistCondition = dailyAppearCharacterRegistCondition; this.IsNextRemove = isNextRemove; }
public PlayerAppearCharacterReserveModel Create( AppearCharacterModel appearCharacterModel, ConversationModel conversationModel, RewardModel rewardModel, IDailyAppearCharacterRegistCondition dailyAppearCharacterRegistCondition ) { var id = this.MaximuId() + 1; var condition = Condition.None; var rate = 0.0f; if (dailyAppearCharacterRegistCondition is DailyAppearCharacterRegistConditionForce) { condition = Condition.Force; } else if (dailyAppearCharacterRegistCondition is DailyAppearCharacterRegistConditionByChance) { condition = Condition.ByChance; rate = (dailyAppearCharacterRegistCondition as DailyAppearCharacterRegistConditionByChance).Rate; } else { Debug.Assert(false, "条件が見つかりません"); } var entry = new PlayerAppearCharacterReserveEntry() { Id = id, AppearCharacterId = appearCharacterModel.Id, ConversationId = conversationModel.Id, RewardId = rewardModel.Id, State = condition.ToString(), Rate = rate, IsNextRemove = false }; this.entrys.Add(entry); PlayerContextMap.WriteEntry(this.entrys); return(CreateByEntry(entry)); }