本文整理汇总了C++中Guild::BroadcastToOfficers方法的典型用法代码示例。如果您正苦于以下问题:C++ Guild::BroadcastToOfficers方法的具体用法?C++ Guild::BroadcastToOfficers怎么用?C++ Guild::BroadcastToOfficers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Guild
的用法示例。
在下文中一共展示了Guild::BroadcastToOfficers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleMessagechatOpcode
//.........这里部分代码省略.........
case CHAT_MSG_GUILD:
{
std::string msg = "";
recv_data >> msg;
if (sChatHandler.ParseCommands(msg.c_str(), this) > 0)
break;
if (GetPlayer()->GetGuildId())
{
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
if (guild)
{
guild->BroadcastToGuild(this, msg);
GetPlayer()->UpdateSpeakTime();
}
}
break;
}
case CHAT_MSG_OFFICER:
{
std::string msg = "";
recv_data >> msg;
if (sChatHandler.ParseCommands(msg.c_str(), this) > 0)
break;
if (GetPlayer()->GetGuildId())
{
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
if (guild)
{
guild->BroadcastToOfficers(this, msg);
GetPlayer()->UpdateSpeakTime();
}
}
break;
}
case CHAT_MSG_RAID:
{
std::string msg="";
recv_data >> msg;
if (sChatHandler.ParseCommands(msg.c_str(), this) > 0)
break;
Group *group = GetPlayer()->groupInfo.group;
if(!group || !group->isRaidGroup())
return;
WorldPacket data;
sChatHandler.FillMessageData(&data, this, CHAT_MSG_RAID, lang, "", 0, msg.c_str());
group->BroadcastPacket(&data);
GetPlayer()->UpdateSpeakTime();
} break;
case CHAT_MSG_RAID_LEADER:
{
std::string msg="";
recv_data >> msg;
if (sChatHandler.ParseCommands(msg.c_str(), this) > 0)
break;
Group *group = GetPlayer()->groupInfo.group;
if(!group || !group->isRaidGroup() || !group->IsLeader(GetPlayer()->GetGUID()))
示例2: HandleMessagechatOpcode
//.........这里部分代码省略.........
break;
if (GetPlayer()->GetGuildId())
{
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
if (guild)
guild->BroadcastToGuild(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
}
break;
}
case CHAT_MSG_OFFICER:
{
std::string msg = "";
recv_data >> msg;
if(msg.empty())
break;
if (ChatHandler(this).ParseCommands(msg.c_str()) > 0)
break;
// strip invisible characters for non-addon messages
if (lang != LANG_ADDON && sWorld.getConfig(CONFIG_CHAT_FAKE_MESSAGE_PREVENTING))
stripLineInvisibleChars(msg);
if(msg.empty())
break;
if (GetPlayer()->GetGuildId())
{
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
if (guild)
guild->BroadcastToOfficers(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
}
break;
}
case CHAT_MSG_RAID:
{
std::string msg="";
recv_data >> msg;
if(msg.empty())
break;
if (ChatHandler(this).ParseCommands(msg.c_str()) > 0)
break;
// strip invisible characters for non-addon messages
if (lang != LANG_ADDON && sWorld.getConfig(CONFIG_CHAT_FAKE_MESSAGE_PREVENTING))
stripLineInvisibleChars(msg);
if(msg.empty())
break;
Group *group = GetPlayer()->GetGroup();
if(!group || !group->isRaidGroup())
return;
WorldPacket data;
ChatHandler::FillMessageData(&data, this, CHAT_MSG_RAID, lang, "", 0, msg.c_str(),NULL);
group->BroadcastPacket(&data);
} break;
case CHAT_MSG_RAID_LEADER:
{
std::string msg="";
示例3: HandleMessagechatOpcode
//.........这里部分代码省略.........
sChatLog.GuildMsg(GetPlayer(), msg, false);
if (GetPlayer()->GetGuildId())
{
Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId());
if (guild)
guild->BroadcastToGuild(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
}
break;
}
case CHAT_MSG_OFFICER:
{
std::string msg;
recv_data >> msg;
if (msg.empty())
break;
if (ChatHandler(this).ParseCommands(msg.c_str()))
break;
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
return;
if (msg.empty())
break;
sChatLog.GuildMsg(GetPlayer(), msg, true);
if (GetPlayer()->GetGuildId())
{
Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId());
if (guild)
guild->BroadcastToOfficers(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
}
break;
}
case CHAT_MSG_RAID:
{
std::string msg;
recv_data >> msg;
if (msg.empty())
break;
if (ChatHandler(this).ParseCommands(msg.c_str()))
break;
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
return;
if (msg.empty())
break;
sChatLog.RaidMsg(GetPlayer(), msg, type);
// if player is in battleground, he cannot say to battleground members by /ra
Group* group = GetPlayer()->GetOriginalGroup();
if (!group)
{
group = GetPlayer()->GetGroup();
if (!group || group->isBGGroup() || !group->isRaidGroup())
return;
}