Core/Quests: Implemented player choices

* Implemented SPELL_EFFECT_LAUNCH_QUEST_CHOICE
* Script hook for player choices
This commit is contained in:
Traesh
2017-12-17 14:40:04 +01:00
committed by Shauren
parent 5dd686c080
commit 89c91c271b
18 changed files with 573 additions and 24 deletions

View File

@@ -71,6 +71,7 @@ public:
{ "sellerror", rbac::RBAC_PERM_COMMAND_DEBUG_SEND_SELLERROR, false, &HandleDebugSendSellErrorCommand, "" },
{ "setphaseshift", rbac::RBAC_PERM_COMMAND_DEBUG_SEND_SETPHASESHIFT, false, &HandleDebugSendSetPhaseShiftCommand, "" },
{ "spellfail", rbac::RBAC_PERM_COMMAND_DEBUG_SEND_SPELLFAIL, false, &HandleDebugSendSpellFailCommand, "" },
{ "playerchoice", rbac::RBAC_PERM_COMMAND_DEBUG_SEND_PLAYER_CHOICE, false, &HandleDebugSendPlayerChoiceCommand, "" },
};
static std::vector<ChatCommand> debugCommandTable =
{
@@ -245,6 +246,18 @@ public:
return true;
}
static bool HandleDebugSendPlayerChoiceCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
int32 choiceId = atoi(args);
Player* player = handler->GetSession()->GetPlayer();
player->SendPlayerChoice(player->GetGUID(), choiceId);
return true;
}
static bool HandleDebugSendEquipErrorCommand(ChatHandler* handler, char const* args)
{
if (!*args)