本文整理汇总了C++中Being::setPartyName方法的典型用法代码示例。如果您正苦于以下问题:C++ Being::setPartyName方法的具体用法?C++ Being::setPartyName怎么用?C++ Being::setPartyName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Being
的用法示例。
在下文中一共展示了Being::setPartyName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processPartyLeave
void PartyHandler::processPartyLeave(Net::MessageIn &msg)
{
int id = msg.readInt32();
std::string nick = msg.readString(24);
msg.readInt8(); // fail
if (!player_node)
return;
if (id == player_node->getId())
{
if (Ea::taParty)
{
Ea::taParty->removeFromMembers();
Ea::taParty->clearMembers();
}
SERVER_NOTICE(_("You have left the party."))
delete Ea::partyTab;
Ea::partyTab = nullptr;
if (socialWindow && Ea::taParty)
socialWindow->removeTab(Ea::taParty);
player_node->setPartyName("");
}
else
{
if (Ea::partyTab)
{
Ea::partyTab->chatLog(strprintf(
_("%s has left your party."),
nick.c_str()), BY_SERVER);
}
if (actorSpriteManager)
{
Being *b = actorSpriteManager->findBeing(id);
if (b && b->getType() == Being::PLAYER)
{
b->setParty(nullptr);
b->setPartyName("");
}
}
if (Ea::taParty)
Ea::taParty->removeMember(id);
}
}