mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 01:27:51 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,63 @@
|
||||
package collection
|
||||
{
|
||||
import inventory.Iitem;
|
||||
|
||||
public class BaseItemCollection
|
||||
{
|
||||
|
||||
protected var items:Array;
|
||||
|
||||
public function BaseItemCollection(param1:Array = null)
|
||||
{
|
||||
super();
|
||||
if(param1)
|
||||
{
|
||||
items = param1;
|
||||
}
|
||||
else
|
||||
{
|
||||
items = [];
|
||||
}
|
||||
}
|
||||
|
||||
public function get length() : uint
|
||||
{
|
||||
return items.length;
|
||||
}
|
||||
|
||||
protected function setItemCommon(param1:uint, param2:Iitem) : void
|
||||
{
|
||||
items[param1] = param2;
|
||||
}
|
||||
|
||||
protected function pushItemCommon(param1:Iitem) : uint
|
||||
{
|
||||
return items.push(param1);
|
||||
}
|
||||
|
||||
public function concatCollection(param1:BaseItemCollection) : Array
|
||||
{
|
||||
if(param1 != null)
|
||||
{
|
||||
return items.concat(param1.getCoreArray());
|
||||
}
|
||||
return items.concat();
|
||||
}
|
||||
|
||||
public function getCoreArray() : Array
|
||||
{
|
||||
return items;
|
||||
}
|
||||
|
||||
public function setCoreArray(param1:Array) : void
|
||||
{
|
||||
items = param1;
|
||||
}
|
||||
|
||||
public function toString() : String
|
||||
{
|
||||
return "{items:" + items + "}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user