1、你需要知道如何把脚本加到你的Trinity-core的代码库里面---这个代码是支持TRINITY的
2、这个GM命令主要是实现2V2竞技场排队的作用,直接用命令就可以排队了
3、命令用法: .queue
#include "ScriptPch.h"
class queuecommand : public CommandScript
{
public:
queuecommand() : CommandScript("queuecommand") {}
ChatCommand* GetCommands() const
{
static ChatCommand CommandTable[] =
{
{ "queue", SEC_PLAYER, true, &HandleQueueCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
return CommandTable;
}
static bool HandleQueueCommand(ChatHandler* handler, const char* args)
{
Player* me = handler->GetSession()->GetPlayer();
if(me->GetArenaTeamId(1) != 0)
{
me->AddBattlegroundQueueId(BATTLEGROUND_QUEUE_2v2);
}
else
{
handler->PSendSysMessage("You are not in an Arena Team!");
}
return true;
}
};
void AddSC_queuecommand()
{
new queuecommand();
}
|