本文整理汇总了C++中ObjectGuid::IsGuild方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectGuid::IsGuild方法的具体用法?C++ ObjectGuid::IsGuild怎么用?C++ ObjectGuid::IsGuild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectGuid
的用法示例。
在下文中一共展示了ObjectGuid::IsGuild方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RemoveGuild
void GuildMgr::RemoveGuild(ObjectGuid guildGuid)
{
if (!guildGuid.IsGuild())
return;
RemoveGuild(guildGuid.GetCounter());
}
示例2: HandleGuildFinderRemoveRecruit
void WorldSession::HandleGuildFinderRemoveRecruit(WorldPacket& recvPacket)
{
TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_REMOVE_RECRUIT");
ObjectGuid guildGuid;
guildGuid[0] = recvPacket.ReadBit();
guildGuid[4] = recvPacket.ReadBit();
guildGuid[3] = recvPacket.ReadBit();
guildGuid[5] = recvPacket.ReadBit();
guildGuid[7] = recvPacket.ReadBit();
guildGuid[6] = recvPacket.ReadBit();
guildGuid[2] = recvPacket.ReadBit();
guildGuid[1] = recvPacket.ReadBit();
recvPacket.ReadByteSeq(guildGuid[4]);
recvPacket.ReadByteSeq(guildGuid[0]);
recvPacket.ReadByteSeq(guildGuid[3]);
recvPacket.ReadByteSeq(guildGuid[6]);
recvPacket.ReadByteSeq(guildGuid[5]);
recvPacket.ReadByteSeq(guildGuid[1]);
recvPacket.ReadByteSeq(guildGuid[2]);
recvPacket.ReadByteSeq(guildGuid[7]);
if (!guildGuid.IsGuild())
return;
sGuildFinderMgr->RemoveMembershipRequest(GetPlayer()->GetGUIDLow(), guildGuid.GetCounter());
}
示例3: GetGuildNameByGuid
std::string GuildMgr::GetGuildNameByGuid(ObjectGuid guildGuid) const
{
if (!guildGuid.IsGuild())
return "";
return GetGuildNameById(guildGuid.GetCounter());
}
示例4: HandleGuildFinderAddRecruit
void WorldSession::HandleGuildFinderAddRecruit(WorldPacket& recvPacket)
{
TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_ADD_RECRUIT");
if (sGuildFinderMgr->GetAllMembershipRequestsForPlayer(GetPlayer()->GetGUIDLow()).size() == 10)
return;
uint32 classRoles = 0;
uint32 availability = 0;
uint32 guildInterests = 0;
recvPacket >> classRoles >> guildInterests >> availability;
ObjectGuid guid;
guid[3] = recvPacket.ReadBit();
guid[0] = recvPacket.ReadBit();
guid[6] = recvPacket.ReadBit();
guid[1] = recvPacket.ReadBit();
uint16 commentLength = recvPacket.ReadBits(11);
guid[5] = recvPacket.ReadBit();
guid[4] = recvPacket.ReadBit();
guid[7] = recvPacket.ReadBit();
uint8 nameLength = recvPacket.ReadBits(7);
guid[2] = recvPacket.ReadBit();
recvPacket.ReadByteSeq(guid[4]);
recvPacket.ReadByteSeq(guid[5]);
std::string comment = recvPacket.ReadString(commentLength);
std::string playerName = recvPacket.ReadString(nameLength);
recvPacket.ReadByteSeq(guid[7]);
recvPacket.ReadByteSeq(guid[2]);
recvPacket.ReadByteSeq(guid[0]);
recvPacket.ReadByteSeq(guid[6]);
recvPacket.ReadByteSeq(guid[1]);
recvPacket.ReadByteSeq(guid[3]);
uint32 guildLowGuid = guid.GetCounter();
if (!guid.IsGuild())
return;
if (!(classRoles & GUILDFINDER_ALL_ROLES) || classRoles > GUILDFINDER_ALL_ROLES)
return;
if (!(availability & AVAILABILITY_ALWAYS) || availability > AVAILABILITY_ALWAYS)
return;
if (!(guildInterests & ALL_INTERESTS) || guildInterests > ALL_INTERESTS)
return;
MembershipRequest request = MembershipRequest(GetPlayer()->GetGUID(), guildLowGuid, availability, classRoles, guildInterests, comment, time(NULL));
sGuildFinderMgr->AddMembershipRequest(guildLowGuid, request);
}