#include "ScriptMgr.h"
#include "Chat.h"
#include "Player.h"
uint32 auras[] = { 48162, 48074, 48170, 43223, 36880, 467, 48469 };
class buffcommand : public CommandScript
{
public:
buffcommand() : CommandScript("buffcommand") { }
std::vector<ChatCommand> GetCommands() const override
{
static std::vector<ChatCommand> commandTable =
{
{ "buff", SEC_PLAYER, false, &HandlePremiumBuffCommand, "" },
};
return commandTable;
}
static bool HandleBuffCommand(ChatHandler * handler, const char * /*args*/)
{
Player * pl = handler->GetSession()->GetPlayer();
bool return_type;
if(pl->InArena())
{
pl->GetSession()->SendNotification("You can't use that item in an arena match!");
return_type = false;
}
else
{
pl->RemoveAurasByType(SPELL_AURA_MOUNTED);
for(int i = 0; i < 7; i++)
pl->AddAura(auras[i], pl);
handler->PSendSysMessage("|cffB400B4You have been buffed, enjoy!");
return_type = true;
}
}
};
void AddSC_buffcommand()
{
new buffcommand();
}