Index: src/script/api/script_list.cpp =================================================================== --- src/script/api/script_list.cpp (revision 27096) +++ src/script/api/script_list.cpp (working copy) @@ -434,7 +434,7 @@ this->sorter->End(); } -void ScriptList::AddItem(int32 item, int32 value) +void ScriptList::AddItem(int32 item, int64 value) { this->modifications++; @@ -452,7 +452,7 @@ if (!this->HasItem(item)) return; - int32 value = this->GetValue(item); + int64 value = this->GetValue(item); this->sorter->Remove(item); this->buckets[value].erase(item); @@ -494,20 +494,20 @@ return (int32)this->items.size(); } -int32 ScriptList::GetValue(int32 item) +int64 ScriptList::GetValue(int64 item) { if (!this->HasItem(item)) return 0; return this->items[item]; } -bool ScriptList::SetValue(int32 item, int32 value) +bool ScriptList::SetValue(int32 item, int64 value) { this->modifications++; if (!this->HasItem(item)) return false; - int32 value_old = this->GetValue(item); + int64 value_old = this->GetValue(item); if (value_old == value) return true; this->sorter->Remove(item); @@ -573,7 +573,7 @@ list->sorter->Retarget(list); } -void ScriptList::RemoveAboveValue(int32 value) +void ScriptList::RemoveAboveValue(int64 value) { this->modifications++; @@ -583,7 +583,7 @@ } } -void ScriptList::RemoveBelowValue(int32 value) +void ScriptList::RemoveBelowValue(int64 value) { this->modifications++; @@ -593,7 +593,7 @@ } } -void ScriptList::RemoveBetweenValue(int32 start, int32 end) +void ScriptList::RemoveBetweenValue(int64 start, int64 end) { this->modifications++; @@ -603,7 +603,7 @@ } } -void ScriptList::RemoveValue(int32 value) +void ScriptList::RemoveValue(int64 value) { this->modifications++; @@ -697,7 +697,7 @@ } } -void ScriptList::KeepAboveValue(int32 value) +void ScriptList::KeepAboveValue(int64 value) { this->modifications++; @@ -707,7 +707,7 @@ } } -void ScriptList::KeepBelowValue(int32 value) +void ScriptList::KeepBelowValue(int64 value) { this->modifications++; @@ -717,7 +717,7 @@ } } -void ScriptList::KeepBetweenValue(int32 start, int32 end) +void ScriptList::KeepBetweenValue(int64 start, int64 end) { this->modifications++; @@ -727,7 +727,7 @@ } } -void ScriptList::KeepValue(int32 value) +void ScriptList::KeepValue(int64 value) { this->modifications++; Index: src/script/api/script_list.hpp =================================================================== --- src/script/api/script_list.hpp (revision 27096) +++ src/script/api/script_list.hpp (working copy) @@ -46,7 +46,7 @@ public: typedef std::set ScriptItemList; ///< The list of items inside the bucket typedef std::map ScriptListBucket; ///< The bucket list per value - typedef std::map ScriptListMap; ///< List per item + typedef std::map ScriptListMap; ///< List per item ScriptListMap items; ///< The items in the list ScriptListBucket buckets; ///< The items in the list, sorted by value @@ -60,9 +60,9 @@ * @param item the item to add. Should be unique, otherwise it is ignored. * @param value the value to assign. */ - void AddItem(int32 item, int32 value); + void AddItem(int32 item, int64 value); #else - void AddItem(int32 item, int32 value = 0); + void AddItem(int32 item, int64 value = 0); #endif /* DOXYGEN_API */ /** @@ -121,7 +121,7 @@ * @param item the item to get the value from * @return the value that belongs to this item. */ - int32 GetValue(int32 item); + int64 GetValue(int64 item); /** * Set a value of an item directly. @@ -131,7 +131,7 @@ * @note Changing values of items while looping through a list might cause * entries to be skipped. Be very careful with such operations. */ - bool SetValue(int32 item, int32 value); + bool SetValue(int32 item, int64 value); /** * Sort this list by the given sorter and direction. @@ -162,26 +162,26 @@ * Removes all items with a higher value than 'value'. * @param value the value above which all items are removed. */ - void RemoveAboveValue(int32 value); + void RemoveAboveValue(int64 value); /** * Removes all items with a lower value than 'value'. * @param value the value below which all items are removed. */ - void RemoveBelowValue(int32 value); + void RemoveBelowValue(int64 value); /** * Removes all items with a value above start and below end. * @param start the lower bound of the to be removed values (exclusive). * @param end the upper bound of the to be removed values (exclusive). */ - void RemoveBetweenValue(int32 start, int32 end); + void RemoveBetweenValue(int64 start, int64 end); /** * Remove all items with this value. * @param value the value to remove. */ - void RemoveValue(int32 value); + void RemoveValue(int64 value); /** * Remove the first count items. @@ -206,26 +206,26 @@ * Keep all items with a higher value than 'value'. * @param value the value above which all items are kept. */ - void KeepAboveValue(int32 value); + void KeepAboveValue(int64 value); /** * Keep all items with a lower value than 'value'. * @param value the value below which all items are kept. */ - void KeepBelowValue(int32 value); + void KeepBelowValue(int64 value); /** * Keep all items with a value above start and below end. * @param start the lower bound of the to be kept values (exclusive). * @param end the upper bound of the to be kept values (exclusive). */ - void KeepBetweenValue(int32 start, int32 end); + void KeepBetweenValue(int64 start, int64 end); /** * Keep all items with this value. * @param value the value to keep. */ - void KeepValue(int32 value); + void KeepValue(int64 value); /** * Keep the first count items, i.e. remove everything except the first count items.