CreatureEventList Creature::getCreatureEvents(CreatureEventType_t type) { CreatureEventList list; for(CreatureEventList::iterator it = eventsList.begin(); it != eventsList.end(); ++it) { if((*it)->getEventType() == type && (*it)->isLoaded()) list.push_back(*it); } return list; }
CreatureEventList Creature::getCreatureEvents(CreatureEventType_t type) { CreatureEventList retList; if(!hasEventRegistered(type)) return retList; for(CreatureEventList::iterator it = eventsList.begin(); it != eventsList.end(); ++it) { if((*it)->getEventType() == type) retList.push_back(*it); } return retList; }
CreatureEventList Creature::getCreatureEvents(CreatureEventType_t type) { CreatureEventList tmpEventList; if (!hasEventRegistered(type)) { return tmpEventList; } for (CreatureEvent* creatureEvent : eventsList) { if (creatureEvent->getEventType() == type) { tmpEventList.push_back(creatureEvent); } } return tmpEventList; }
CreatureEventList Creature::getCreatureEvents(CreatureEventType_t type) { CreatureEventList tmpEventList; if (!hasEventRegistered(type)) { return tmpEventList; } for (CreatureEventList::const_iterator it = eventsList.begin(), end = eventsList.end(); it != end; ++it) { if ((*it)->getEventType() == type) { tmpEventList.push_back(*it); } } return tmpEventList; }