mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Core/Quests: Implemented player choices
* Implemented SPELL_EFFECT_LAUNCH_QUEST_CHOICE * Script hook for player choices
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user