mirror of
https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient.git
synced 2025-10-26 09:59:07 -07:00
120 lines
4.0 KiB
ActionScript
120 lines
4.0 KiB
ActionScript
package package_35
|
|
{
|
|
import package_32.name_148;
|
|
import package_33.name_155;
|
|
import package_34.name_150;
|
|
import package_36.name_152;
|
|
import package_36.name_163;
|
|
import package_36.name_442;
|
|
import package_38.name_443;
|
|
|
|
public class VectorCodeclongLevel3 implements name_152
|
|
{
|
|
private var elementCodec:name_152;
|
|
|
|
private var optionalElement:Boolean;
|
|
|
|
public function VectorCodeclongLevel3(optionalElement:Boolean)
|
|
{
|
|
super();
|
|
this.optionalElement = optionalElement;
|
|
}
|
|
|
|
public function init(protocol:name_163) : void
|
|
{
|
|
this.elementCodec = protocol.name_448(new name_148(name_155,false));
|
|
if(this.optionalElement)
|
|
{
|
|
this.elementCodec = new name_150(this.elementCodec);
|
|
}
|
|
}
|
|
|
|
public function method_296(protocolBuffer:name_442) : Object
|
|
{
|
|
var length2:int = 0;
|
|
var items2:Vector.<Vector.<name_155>> = null;
|
|
var i2:int = 0;
|
|
var length3:int = 0;
|
|
var items3:Vector.<name_155> = null;
|
|
var i3:int = 0;
|
|
var length1:int = name_443.name_445(protocolBuffer);
|
|
var result:Vector.<Vector.<Vector.<name_155>>> = new Vector.<Vector.<Vector.<name_155>>>(length1,true);
|
|
for(var i1:int = 0; i1 < length1; )
|
|
{
|
|
if(!protocolBuffer.optionalMap.name_447())
|
|
{
|
|
length2 = name_443.name_445(protocolBuffer);
|
|
items2 = new Vector.<Vector.<name_155>>(length2,true);
|
|
result[i1] = items2;
|
|
for(i2 = 0; i2 < length2; )
|
|
{
|
|
if(!protocolBuffer.optionalMap.name_447())
|
|
{
|
|
length3 = name_443.name_445(protocolBuffer);
|
|
items3 = new Vector.<name_155>(length3,true);
|
|
items2[i2] = items3;
|
|
for(i3 = 0; i3 < length3; i3++)
|
|
{
|
|
items3[i3] = name_155(this.elementCodec.method_296(protocolBuffer));
|
|
}
|
|
}
|
|
i2++;
|
|
}
|
|
}
|
|
i1++;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
public function method_295(protocolBuffer:name_442, object:Object) : void
|
|
{
|
|
var items2:Vector.<Vector.<name_155>> = null;
|
|
var length2:int = 0;
|
|
var i2:int = 0;
|
|
var items3:Vector.<name_155> = null;
|
|
var length3:int = 0;
|
|
var i3:int = 0;
|
|
if(object == null)
|
|
{
|
|
throw new Error("Object is null. Use @ProtocolOptional annotation.");
|
|
}
|
|
var data:Vector.<Vector.<Vector.<name_155>>> = Vector.<Vector.<Vector.<name_155>>>(object);
|
|
var length1:int = int(data.length);
|
|
name_443.name_446(protocolBuffer,length1);
|
|
for(var i1:int = 0; i1 < length1; i1++)
|
|
{
|
|
items2 = data[i1];
|
|
if(items2 != null)
|
|
{
|
|
protocolBuffer.optionalMap.name_444(false);
|
|
length2 = int(items2.length);
|
|
name_443.name_446(protocolBuffer,length2);
|
|
for(i2 = 0; i2 < length2; i2++)
|
|
{
|
|
items3 = items2[i1];
|
|
if(items3 != null)
|
|
{
|
|
protocolBuffer.optionalMap.name_444(false);
|
|
length3 = int(items3.length);
|
|
name_443.name_446(protocolBuffer,length3);
|
|
for(i3 = 0; i3 < length3; i3++)
|
|
{
|
|
this.elementCodec.method_295(protocolBuffer,items3[i3]);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
protocolBuffer.optionalMap.name_444(true);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
protocolBuffer.optionalMap.name_444(true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|