Fix crash from loading playerchoice_response

Port From (https://github.com/TrinityCore/TrinityCore/commit/)
This commit is contained in:
hondacrx
2020-12-17 09:59:54 -05:00
parent ae6fca8fc3
commit 1154bb4bd2
+2 -2
View File
@@ -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<int>(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");