本文整理汇总了C++中CreatureObject::getGuildId方法的典型用法代码示例。如果您正苦于以下问题:C++ CreatureObject::getGuildId方法的具体用法?C++ CreatureObject::getGuildId怎么用?C++ CreatureObject::getGuildId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CreatureObject
的用法示例。
在下文中一共展示了CreatureObject::getGuildId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isOnList
bool CellPermissions::isOnList(PermissionList const &permList, CreatureObject const &who) // static
{
const int guildId = who.getGuildId();
// if either their name or their guild is on the list, consider them on the list
for (PermissionList::const_iterator i = permList.begin(); i != permList.end(); ++i)
{
const std::string& name = (*i).getName();
// objectId
if (name == who.getNetworkId().getValueString())
return true;
// first name
if (!_stricmp(name.c_str(), Unicode::wideToNarrow(who.getAssignedObjectFirstName()).c_str()))
return true;
// guilds
if (guildId && !_strnicmp(name.c_str(), "Guild:", 6))
{
std::string checkStr(Unicode::getTrim((name).substr(6)));
if ( !_stricmp(checkStr.c_str(), GuildInterface::getGuildAbbrev(guildId).c_str())
|| !_stricmp(checkStr.c_str(), GuildInterface::getGuildName(guildId).c_str()))
return true;
}
}
return false;
}
示例2: getGuildId
jint JNICALL ScriptMethodsGuildNamespace::getGuildId(JNIEnv *env, jobject self, jlong target)
{
CreatureObject *targetObj = 0;
if (!JavaLibrary::getObject(target, targetObj))
{
DEBUG_WARNING(true, ("JavaLibrary::getGuildId: called with invalid target"));
return 0;
}
return targetObj->getGuildId();
}