本文整理汇总了C++中Being::updateColors方法的典型用法代码示例。如果您正苦于以下问题:C++ Being::updateColors方法的具体用法?C++ Being::updateColors怎么用?C++ Being::updateColors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Being
的用法示例。
在下文中一共展示了Being::updateColors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process
//.........这里部分代码省略.........
splitToStringVector(mTempList, msg, '#');
if (msg.size() < 1 || msg[msg.size() - 1] != '#')
updateList();
mRequest = false;
return true;
}
else if (findCutFirst(msg, "oL#"))
{
// logger->log("oL");
splitToStringVector(mTempList, msg, '#');
if (msg.size() < 1 || msg[msg.size() - 1] != '#')
updateList();
mRequest = false;
return true;
}
else if (msg == "You are currently not in a guild. For more information "
"or to discuss the possibility of adding you own guild "
"please contact Jero.")
{
mRequest = true;
return true;
}
else if (findCutFirst(msg, "You have been invited to the ")
&& findCutLast(msg, " guild chat. If you would like to accept "
"this invitation please reply \"yes\" and if not then \"no\" ."))
{
if (socialWindow)
socialWindow->showGuildInvite(msg, 1, "");
return true;
}
else if (!haveNick && (findCutLast(msg, " has been removed "
"from the Guild.") || findCutLast(msg, " has left the Guild.")))
{
Guild *guild = createGuild();
if (!guild)
return false;
if (msg.size() < 4)
return false;
if (msg[0] == '#' && msg[1] == '#')
msg = msg.substr(3);
if (actorSpriteManager)
{
Being *b = actorSpriteManager->findBeingByName(
msg, Being::PLAYER);
if (b)
{
b->clearGuilds();
b->setGuildName("");
b->updateColors();
}
}
guild->removeMember(msg);
return true;
}
else if (msg == "You have been removed from the Guild"
|| msg == "You have left the Guild")
{
return afterRemove();
}
else
{
Guild *guild = createGuild();
if (!guild)
return false;
if (!mTab)
{
createTab(guild);
}
if (mTab)
{
size_t pos = msg.find(": ", 0);
if (pos != std::string::npos)
{
std::string sender_name = ((pos == std::string::npos)
? "" : msg.substr(0, pos));
if (!guild->getMember(sender_name))
{
mTab->chatLog(msg);
return true;
}
msg.erase(0, pos + 2);
if (msg.size() > 3 && msg[0] == '#' && msg[1] == '#')
msg.erase(0, 3);
trim(msg);
mTab->chatLog(sender_name, msg);
}
else
{
mTab->chatLog(msg);
}
return true;
}
}
return false;
}