当前位置: 首页>>代码示例>>C++>>正文


C++ ConditionList::begin方法代码示例

本文整理汇总了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);
	}
}
开发者ID:Azuen,项目名称:RealOTX-7.72,代码行数:9,代码来源:creature.cpp

示例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);
		}
	}
}
开发者ID:Ablankzin,项目名称:server,代码行数:10,代码来源:creature.cpp

示例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;
}
开发者ID:Tithand,项目名称:TER-Server,代码行数:15,代码来源:PhaseMgr.cpp

示例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;
}
开发者ID:,项目名称:,代码行数:17,代码来源:


注:本文中的ConditionList::begin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。