src/ai/api/ai_abstractlist.cpp
branchnoai
changeset 9796 83d54622190c
parent 9775 4a30f9e841ca
child 9802 1095a6d029ed
equal deleted inserted replaced
9795:679ba7cd8426 9796:83d54622190c
   321 			this->Sort(SORT_BY_ITEM, false);
   321 			this->Sort(SORT_BY_ITEM, false);
   322 			return;
   322 			return;
   323 	}
   323 	}
   324 	this->sorter_type    = sorter;
   324 	this->sorter_type    = sorter;
   325 	this->sort_ascending = ascending;
   325 	this->sort_ascending = ascending;
       
   326 }
       
   327 
       
   328 void AIAbstractList::AddList(AIAbstractList *list)
       
   329 {
       
   330 	AIAbstractListMap *list_items = &list->items;
       
   331 	for (AIAbstractListMap::iterator iter = list_items->begin(); iter != list_items->end(); iter++) {
       
   332 		this->AddItem((*iter).first);
       
   333 		this->SetValue((*iter).first, (*iter).second);
       
   334 	}
   326 }
   335 }
   327 
   336 
   328 void AIAbstractList::RemoveAboveValue(int32 value)
   337 void AIAbstractList::RemoveAboveValue(int32 value)
   329 {
   338 {
   330 	for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {
   339 	for (AIAbstractListMap::iterator next_iter, iter = this->items.begin(); iter != this->items.end(); iter = next_iter) {