吾爱尚玩资源基地
标题:
单机版使用.list命令显示各级别GM
[打印本页]
作者:
admin
时间:
2016-4-23 00:00
标题:
单机版使用.list命令显示各级别GM
适用于MANGOS端,比较老的版本了。对于目前的最新Mangos代码版本,只能作为参考使用
Index: src/game/Level0.cpp
===================================================================
--- src/game/Level0.cpp (Revision 5724)
+++ src/game/Level0.cpp (Arbeitskopie)
@@ -211,7 +211,9 @@
bool ChatHandler::HandleGMListCommand(const char* /*args*/)
{
bool first = true;
-
+ std::string type;
+ std::string name;
+ std::string msg;
HashMapHolder<Player>::MapType &m = HashMapHolder<Player>::GetContainer();
HashMapHolder<Player>::MapType::iterator itr = m.begin();
for(; itr != m.end(); ++itr)
@@ -224,8 +226,24 @@
SendSysMessage(LANG_GMS_ON_SRV);
first = false;
}
-
- SendSysMessage(itr->second->GetName());
+ switch(itr->second->GetSession()->GetSecurity())
+ {
+ case 3:
+ type = "<Supporter>";
+ break;
+ case 4:
+ type = "<ProbeGM>";
+ break;
+ case 5:
+ type = "<GM>";
+ break;
+ case 6:
+ type = "<SysAdmin>";
+ break;
+ }
+ name = itr->second->GetName();
+ msg = type+name;
+ SendSysMessage(msg.c_str());
}
}
欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/)
Powered by Discuz! X3.4