当前位置:首页>>魔兽单机>>正文
3.3.5Trinity中最新的将官员喊话/o修改为世界汉化的方法
2013-07-05 17:17:06 作者:网络 来源: 浏览次数:0
 很多朋友喜欢一种修改魔兽世界,世界喊话的方式,就是修改官员喊话频道

以前最老的Mangos端的方式也是这种,就直接修改/o 官员喊话频道

这个也是魔兽世界中常用到的方式之一


1、首先找到ChatHandler.cpp 这个TrinityCore中的文件。然后找到case CHAT_MSG_OFFICER: (官员喊话部分


2、修改代码


case CHAT_MSG_OFFICER:
        {
            if (GetPlayer()->GetGuildId())
            {
                if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
                {
                    sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, guild);

                    guild->BroadcastToGuild(this, true, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
                }
            }
        } break;
 
 
修改为下面的代码:
 
case CHAT_MSG_OFFICER: 
        {
            char message[1024];
            switch(GetPlayer()->GetSession()->GetSecurity())
            {
                case SEC_PLAYER: // normal player, non-vip
                    if (GetPlayer()->GetTeam()==ALLIANCE) {
                        snprintf(message, 1024, "|cff33CC00World |cffFF0000[Horde]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                    if (GetPlayer()->GetTeam()==HORDE) {
                        snprintf(message, 1024, "|cff33CC00World |cffDC143C[Alliance]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                    break;
                case 1: // VIP
                    snprintf(message, 1024, "|cff33CC00World |cff87CEEB[World VIP]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    break;

                case 2: // regular GM
                    if (GetPlayer()->isGameMaster()==TRUE)
                    {
                    snprintf(message, 1024, "|cff33CC00World |TInterface\\ChatFrame\\UI-ChatIcon-Blizz.blp:0:2:0:-3|t |cff6600AA[GM]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                    {
                    if (GetPlayer()->isGameMaster()==FALSE)
                    if (GetPlayer()->GetTeam()==HORDE)
                    snprintf(message, 1024, "|cff33CC00World |cffFF0000[Horde]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                                        {
                    if (GetPlayer()->isGameMaster()==FALSE)
                    if (GetPlayer()->GetTeam()==ALLIANCE)
                    snprintf(message, 1024, "|cff33CC00World |cff0000FF[Alliance]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                    break;
                    
                case 3: // Head GM/SGM
                    if (GetPlayer()->isGameMaster()==TRUE)
                    {
                    snprintf(message, 1024, "|cff33CC00World |TInterface\\ChatFrame\\UI-ChatIcon-Blizz.blp:0:2:0:-3|t |cff6600AA[GM]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                    {
                    if (GetPlayer()->isGameMaster()==FALSE)
                    if (GetPlayer()->GetTeam()==HORDE)
                    snprintf(message, 1024, "|cff33CC00World |cffFF0000[Horde]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                    {
                    if (GetPlayer()->isGameMaster()==FALSE)
                    if (GetPlayer()->GetTeam()==ALLIANCE)
                    snprintf(message, 1024, "|cff33CC00World |cff0000FF[Alliance]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str());
                    }
                    break;
                    
                case 4: // ADMIN
                    if (GetPlayer()->isGameMaster()==TRUE)
                    {
                    snprintf(message, 1024,  "|cff33CC00World |TInterface\\ChatFrame\\UI-ChatIcon-Blizz.blp:0:2:0:-3|t |cff6600AA[GM]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                    {
                    if (GetPlayer()->isGameMaster()==FALSE)
                    if (GetPlayer()->GetTeam()==HORDE)
                    snprintf(message, 1024, "|cff33CC00World |cffFF0000[Horde]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                    {
                    if (GetPlayer()->isGameMaster()==FALSE)
                    if (GetPlayer()->GetTeam()==ALLIANCE)
                    snprintf(message, 1024, "|cff33CC00World |cff0000FF[Alliance]|cff00CCEE[%s]:|cffFFFF00 %s", GetPlayer()->GetName().c_str(), msg.c_str());
                    }
                    break;
                                        
            }
            sWorld->SendGlobalText(message, NULL);
        } break;


OK,就这样就完毕了!去编译一下,然后试试~~~ GOOD LUCK





相关报道:

[关闭] [返回顶部]


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

机器人国度