本文整理汇总了C++中ConditionList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ ConditionList::begin方法的具体用法?C++ ConditionList::begin怎么用?C++ ConditionList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConditionList
的用法示例。
在下文中一共展示了ConditionList::begin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeCondition
void Creature::removeCondition(const Creature* attacker, ConditionType_t type)
{
ConditionList tmpList = conditions;
for(ConditionList::iterator it = tmpList.begin(); it != tmpList.end(); ++it)
{
if((*it)->getType() == type)
onCombatRemoveCondition(attacker, *it);
}
}
示例2: removeCondition
void Creature::removeCondition(const std::string& name, const CombatSource& combatSource)
{
ConditionList tmpList = conditions;
for(ConditionList::iterator it = tmpList.begin(); it != tmpList.end(); ++it){
if((*it)->getName() == name){
onCombatRemoveCondition(combatSource, *it);
}
}
}
示例3: NeedsPhaseUpdateWithData
bool PhaseMgr::NeedsPhaseUpdateWithData(PhaseUpdateData const updateData) const
{
PhaseDefinitionStore::const_iterator itr = _PhaseDefinitionStore->find(player->GetZoneId());
if (itr != _PhaseDefinitionStore->end())
{
for (PhaseDefinitionContainer::const_iterator phase = itr->second.begin(); phase != itr->second.end(); ++phase)
{
ConditionList conditionList = sConditionMgr->GetConditionsForPhaseDefinition(phase->zoneId, phase->entry);
for (ConditionList::const_iterator condition = conditionList.begin(); condition != conditionList.end(); ++condition)
if (updateData.IsConditionRelated(*condition))
return true;
}
}
return false;
}
示例4: IsTargetValidForItemUse
bool Item::IsTargetValidForItemUse(Unit* pUnitTarget)
{
ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET, GetProto()->ItemId);
if (conditions.empty())
return true;
if (!pUnitTarget)
return false;
for (ConditionList::const_iterator itr = conditions.begin(); itr != conditions.end(); ++itr)
{
ACE_Auto_Ptr<ItemRequiredTarget> irt(new ItemRequiredTarget((ItemRequiredTargetType)(*itr)->mConditionValue1, (*itr)->mConditionValue2));
if (irt->IsFitToRequirements(pUnitTarget))
return true;
}
return false;
}