From 1154bb4bd27f5b9e808c9e7a81dc2511e67a72b0 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 17 Dec 2020 09:59:54 -0500 Subject: [PATCH] Fix crash from loading playerchoice_response Port From (https://github.com/TrinityCore/TrinityCore/commit/) --- Source/Game/Globals/ObjectManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/Globals/ObjectManager.cs b/Source/Game/Globals/ObjectManager.cs index 8fd60f571..731af6154 100644 --- a/Source/Game/Globals/ObjectManager.cs +++ b/Source/Game/Globals/ObjectManager.cs @@ -9247,7 +9247,7 @@ namespace Game ++responseCount; - choice.Responses[responseId] = response; + choice.Responses.Insert(responseId, response); } while (responses.NextRow()); } @@ -9325,7 +9325,7 @@ namespace Game int quantity = rewardItem.Read(4); - PlayerChoice choice = _playerChoices.LookupByKey(choiceId); + PlayerChoice choice = _playerChoices[choiceId]; if (choice == null) { Log.outError(LogFilter.Sql, $"Table `playerchoice_response_reward_item` references non-existing ChoiceId: {choiceId} (ResponseId: {responseId}), skipped");