bool ChatHandler::HandleWorldCast(const char* args) //世界聊天命令{
Player* player = m_session->GetPlayer();
uint32 price=player->GetMyintConfig("WorldOfChatPrice");
if(!*args||m_session->GetPlayer()->GetMoney()<price)
return false;
std::ostringstream str;
str<<WORLD_CHAT_CHANNEL<<m_session->GetPlayerName()<<"|r]:"<<args;//"|cfff0ff00[世界][|r"
//str +=m_session->GetPlayerName();
//str +="|r]:";
//str += args;
sWorld.SendWorldTextCn(str.str().c_str(), NULL);
SendSysMessage(LANG_PLAYER_NOT_FOUND);
m_session->GetPlayer()->ModifyMoney(-int32(price));
//m_session->GetPlayer()->GetSession()->SendNotification(WORLD_OF_CHAT_SYSTEM);//世界频道广播已经发送,扣取费用一金币!
return true;
}//世界聊天命令
然后到language.h里面加定义!
WORLD_CHAT_CHANNEL = 15000, //|cfff0ff00[世界][|r
但是~~~目前显示的是 language.h 里面的 15000编号。并不是显示的是 [世界]这个汉字
|