当前位置:首页>>魔兽单机>>正文
单机[TrinityCore C++]竞技场排队命令
2013-06-01 22:05:06 作者:网络 来源: 浏览次数:0
 这里是三个GM命令,这些命令的作用就是。让玩家可以在世界任何一个地方进行竞技场排队、、

作为私服。作为单机。都是不错的选择,方便了玩家。也方便了自己、、玩家可以在任何地图加入竞技场,不需要来回传送了!

当然,目前来说还没用上这些功能。如果喜欢的话,可以试试
三个命令
  • .arena 2v2
  • .arena 3v3
  • .arena 5v5

分别对应进入竞技场的方式,这个不用说,都懂的


 
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "MapManager.h"
#include "Chat.h"
#include "Common.h"
#include "Language.h"
 
class arenaqueue : public CommandScript
{
public:
  arenaqueue() : CommandScript("arenaqueue") { }
 
  ChatCommand* GetCommands() const
    {
        static ChatCommand arenaCommandTable[] =
 
        {
            { "2v2",    SEC_PLAYER,        false,    &Handle2v2Command,        "Queue's for 2v2", NULL },
            { "3v3",    SEC_PLAYER,        false,    &Handle3v3Command,        "Queue's for 3v3", NULL },
            { "5v5",    SEC_PLAYER,        false,    &Handle5v5Command,        "Queue's for 5v5", NULL },
            {  NULL,             0,        false,                 NULL,                       "", NULL }
        };
 
        static ChatCommand commandTable[] =
        {
            { "arena",    SEC_PLAYER,        true,                 NULL,                       "", arenaCommandTable},
            {    NULL,             0,       false,                 NULL,                       "",               NULL }
        };
        return commandTable;
 
    }
 
    static bool Handle2v2Command(ChatHandler* handler, const char* args)
        {
        Player* me = handler->GetSession()->GetPlayer();
            if(me->GetArenaTeamId(1) != 0)
                    {
                    me->AddBattlegroundQueueId(BATTLEGROUND_QUEUE_2v2);
                    }
            else
                    {
                    handler->PSendSysMessage("You aren't in an arena team.");
                    }
            return true;
        }
 
    static bool Handle3v3Command(ChatHandler* handler, const char* args)
        {
        Player* me = handler->GetSession()->GetPlayer();
            if(me->GetArenaTeamId(1) != 1)
                    {
                    me->AddBattlegroundQueueId(BATTLEGROUND_QUEUE_3v3);
                    }
            else
                    {
                    handler->PSendSysMessage("You aren't in an arena team.");
                    }
            return true;
        }
 
    static bool Handle5v5Command(ChatHandler* handler, const char* args)
        {
        Player* me = handler->GetSession()->GetPlayer();
            if(me->GetArenaTeamId(1) != 2)
                    {
                        me->AddBattlegroundQueueId(BATTLEGROUND_QUEUE_5v5);
                    }
            else
                    {
                    handler->PSendSysMessage("You aren't in an arena team.");
                    }
            return true;
        }
 
    };
 
void AddSC_arenaqueue()
{
    new arenaqueue();
}

Arena Queue Commands 竞技场命令代码完整下载



相关报道:

[关闭] [返回顶部]


  返回首页 | 最新资讯 | 资源下载 | 魔兽图片 | 单机文档 | 技术攻略 | 玩家视频
备案号:蜀ICP备2024062380号-1
免责声明:本网站为热爱怀旧WOW的玩家们建立的魔兽世界资料网站,仅供交流和学习使用,非盈利和商用.如有侵权之处,请联系我们,我们会在24小时内确认删除侵权内容,谢谢合作。
Copyright © 2024 - 2024 WOWAII.COM Corporation, All Rights Reserved

机器人国度