本文整理汇总了C++中Condition::getId方法的典型用法代码示例。如果您正苦于以下问题:C++ Condition::getId方法的具体用法?C++ Condition::getId怎么用?C++ Condition::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Condition
的用法示例。
在下文中一共展示了Condition::getId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeCondition
void Creature::removeCondition(ConditionType_t type, ConditionId_t id, bool force/* = false*/)
{
ConditionList::iterator it = conditions.begin();
while (it != conditions.end()) {
Condition* condition = *it;
if (condition->getType() != type || condition->getId() != id) {
++it;
continue;
}
if (!force && condition->getType() == CONDITION_PARALYZE) {
int64_t walkDelay = getWalkDelay();
if (walkDelay > 0) {
g_scheduler.addEvent(createSchedulerTask(walkDelay, boost::bind(&Game::forceRemoveCondition, &g_game, getID(), type)));
return;
}
}
it = conditions.erase(it);
condition->endCondition(this, CONDITIONEND_ABORT);
delete condition;
onEndCondition(type);
}
}
示例2:
/**
* Checks if the given condition (right hand side) is greater than this condition (left hand side).
*
* @param _condition The condition to compare with (rhs).
*
* @return true ,if the given substitution is greater than this substitution;
* false ,otherwise.
*/
bool Condition::operator<( const Condition& _condition ) const
{
return mId < _condition.getId();
}