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); } }
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); } } }
void Creature::removeCondition(const Creature* attacker, ConditionType_t type) { std::vector<Condition*> removeConditions; for (Condition* condition : conditions) { if (condition->getType() == type) { removeConditions.push_back(condition); } } for (Condition* condition : removeConditions) { onCombatRemoveCondition(attacker, condition); } }