Core/Quests: Fixes response selection to use correct referenced identifier
Port From (https://github.com/TrinityCore/TrinityCore/commit/8de5053a655a59cc1d38b1e1de59950ab32629cf)
This commit is contained in:
@@ -787,14 +787,14 @@ namespace Game
|
||||
if (playerChoice == null)
|
||||
return;
|
||||
|
||||
PlayerChoiceResponse playerChoiceResponse = playerChoice.GetResponse(choiceResponse.ResponseID);
|
||||
PlayerChoiceResponse playerChoiceResponse = playerChoice.GetResponseByIdentifier(choiceResponse.ResponseIdentifier);
|
||||
if (playerChoiceResponse == null)
|
||||
{
|
||||
Log.outError(LogFilter.Player, $"Error in CMSG_CHOICE_RESPONSE: {GetPlayerInfo()} tried to select invalid player choice response {choiceResponse.ResponseID} (possible packet-hacking detected)");
|
||||
Log.outError(LogFilter.Player, $"Error in CMSG_CHOICE_RESPONSE: {GetPlayerInfo()} tried to select invalid player choice response {choiceResponse.ResponseIdentifier} (possible packet-hacking detected)");
|
||||
return;
|
||||
}
|
||||
|
||||
Global.ScriptMgr.OnPlayerChoiceResponse(GetPlayer(), (uint)choiceResponse.ChoiceID, (uint)choiceResponse.ResponseID);
|
||||
Global.ScriptMgr.OnPlayerChoiceResponse(GetPlayer(), (uint)choiceResponse.ChoiceID, (uint)choiceResponse.ResponseIdentifier);
|
||||
|
||||
if (playerChoiceResponse.Reward != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user