本文整理汇总了C++中GuildMember::classVal方法的典型用法代码示例。如果您正苦于以下问题:C++ GuildMember::classVal方法的具体用法?C++ GuildMember::classVal怎么用?C++ GuildMember::classVal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuildMember
的用法示例。
在下文中一共展示了GuildMember::classVal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: guildMemberList
void GuildShell::guildMemberList(const uint8_t* data, size_t len)
{
// clear out any existing member data
emit cleared();
m_members.clear();
m_maxNameLength = 0;
// construct a netstream object on the data
NetStream gml(data, len);
// read the player name from the front of the stream
QString player = gml.readText();
// read the player count from the stream
uint32_t count;
count = gml.readUInt32();
#ifdef GUILDSHELL_DIAG
seqDebug("Guild has %d members:", count);
#endif
GuildMember* member;
#ifdef GUILDSHELL_DIAG
QDateTime dt;
#endif // GUILDSHELL_DIAG
// iterate over the data until we reach the end of it
while (!gml.end())
{
// create a new guildmember initializing it from the NetStream
member = new GuildMember(gml);
// insert the new member into the dictionary
m_members.insert(member->name(), member);
// check for new longest member name
if (member->name().length() > m_maxNameLength)
m_maxNameLength = member->name().length();
emit added(member);
#ifdef GUILDSHELL_DIAG
dt.setTime_t(member->lastOn());
seqDebug("%-64s\t%d\t%s\t%d\t%s\t'%s'\t%s:%d",
(const char*)member->name(),
member->level(),
(const char*)classString(member->classVal()),
member->guildRank(),
(const char*)dt.toString(),
(const char*)member->publicNote(),
(const char*)m_zoneMgr->zoneNameFromID(member->zoneId()),
member->zoneInstance());
#endif
}
emit loaded();
#ifdef GUILDSHELL_DIAG
seqDebug("Finished processing %d guildmates. %d chars in longest name.",
m_members.count(), m_maxNameLength);
#endif //
}