本文整理汇总了C++中Guild::GetEmblemColor方法的典型用法代码示例。如果您正苦于以下问题:C++ Guild::GetEmblemColor方法的具体用法?C++ Guild::GetEmblemColor怎么用?C++ Guild::GetEmblemColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Guild
的用法示例。
在下文中一共展示了Guild::GetEmblemColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleGuildInviteOpcode
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
{
DEBUG_LOG("WORLD: Received opcode CMSG_GUILD_INVITE");
std::string Invitedname, plname;
Player* player = NULL;
Invitedname = recvPacket.ReadString(recvPacket.ReadBits(7));
if (normalizePlayerName(Invitedname))
player = ObjectAccessor::FindPlayerByName(Invitedname.c_str());
if (!player)
{
SendGuildCommandResult(GUILD_INVITE_S, Invitedname, ERR_GUILD_PLAYER_NOT_FOUND_S);
return;
}
Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId());
if (!guild)
{
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
return;
}
// OK result but not send invite
if (player->GetSocial()->HasIgnore(GetPlayer()->GetObjectGuid()))
return;
// not let enemies sign guild charter
if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GUILD) && player->GetTeam() != GetPlayer()->GetTeam())
{
SendGuildCommandResult(GUILD_INVITE_S, Invitedname, ERR_GUILD_NOT_ALLIED);
return;
}
if (player->GetGuildId())
{
plname = player->GetName();
SendGuildCommandResult(GUILD_INVITE_S, plname, ERR_ALREADY_IN_GUILD_S);
return;
}
if (player->GetGuildIdInvited())
{
plname = player->GetName();
SendGuildCommandResult(GUILD_INVITE_S, plname, ERR_ALREADY_INVITED_TO_GUILD_S);
return;
}
if (!guild->HasRankRight(GetPlayer()->GetRank(), GR_RIGHT_INVITE))
{
SendGuildCommandResult(GUILD_INVITE_S, "", ERR_GUILD_PERMISSIONS);
return;
}
DEBUG_LOG("Player %s Invited %s to Join his Guild", GetPlayer()->GetName(), Invitedname.c_str());
player->SetGuildIdInvited(GetPlayer()->GetGuildId());
// Put record into guildlog
guild->LogGuildEvent(GUILD_EVENT_LOG_INVITE_PLAYER, GetPlayer()->GetObjectGuid(), player->GetObjectGuid());
ObjectGuid oldGuild = player->GetGuildGuid();
ObjectGuid newGuild = guild->GetObjectGuid();
std::string oldGuildName = player->GetGuildName();
std::string newGuildName = guild->GetName();
WorldPacket data(SMSG_GUILD_INVITE, 4 * 6 + 10); // guess size
data << uint32(guild->GetLevel());
data << uint32(guild->GetBorderStyle());
data << uint32(guild->GetBorderColor());
data << uint32(guild->GetEmblemStyle());
data << uint32(guild->GetBackgroundColor());
data << uint32(guild->GetEmblemColor());
data.WriteGuidMask<3, 2>(newGuild);
data.WriteBits(oldGuildName.length(), 8);
data.WriteGuidMask<1>(newGuild);
data.WriteGuidMask<6, 4, 1, 5, 7, 2>(oldGuild);
data.WriteGuidMask<7, 0, 6>(newGuild);
data.WriteBits(newGuildName.length(), 8);
data.WriteGuidMask<3, 0>(oldGuild);
data.WriteGuidMask<5>(newGuild);
data.WriteBits(strlen(_player->GetName()), 7);
data.WriteGuidMask<4>(newGuild);
data.WriteGuidBytes<1>(newGuild);
data.WriteGuidBytes<3>(oldGuild);
data.WriteGuidBytes<6>(newGuild);
data.WriteGuidBytes<2, 1>(oldGuild);
data.WriteGuidBytes<0>(newGuild);
data.WriteStringData(oldGuildName);
data.WriteGuidBytes<7, 2>(newGuild);
data.WriteStringData(_player->GetName());
data.WriteGuidBytes<7, 6, 5, 0>(oldGuild);
data.WriteGuidBytes<4>(newGuild);
//.........这里部分代码省略.........