mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 01:27:51 -05:00
568 lines
22 KiB
ActionScript
568 lines
22 KiB
ActionScript
package
|
|
{
|
|
import avatar.UserInfoCache;
|
|
import com.sbi.analytics.SBTracker;
|
|
import com.sbi.client.SFClient;
|
|
import com.sbi.debug.DebugUtility;
|
|
import com.sbi.graphics.LayerAnim;
|
|
import com.sbi.loader.ImageServerURL;
|
|
import com.sbi.loader.LoaderCache;
|
|
import flash.display.DisplayObjectContainer;
|
|
import flash.display.MovieClip;
|
|
import flash.display.Shape;
|
|
import flash.display.Sprite;
|
|
import flash.display.Stage;
|
|
import flash.events.Event;
|
|
import flash.events.IOErrorEvent;
|
|
import flash.events.KeyboardEvent;
|
|
import flash.events.MouseEvent;
|
|
import flash.external.ExternalInterface;
|
|
import flash.net.URLLoader;
|
|
import flash.net.URLRequest;
|
|
import gamePlayFlow.GamePlay;
|
|
import room.LayerManager;
|
|
|
|
public class MainFrame extends Sprite
|
|
{
|
|
|
|
public static const VIEW_WIDTH:int = 900;
|
|
|
|
public static const VIEW_HEIGHT:int = 550;
|
|
|
|
public static const ROOMS_FOLDER:String = "roomDefs/";
|
|
|
|
public static const CDN_SALT:String = "J@mnim4L";
|
|
|
|
public static const MSG_ID_LOGIN_IN_USE:int = -11;
|
|
|
|
public static const MSG_ID_LOGIN_ACCT_MAINT:int = -12;
|
|
|
|
public static const MSG_ID_LOGIN_CONNECTION:int = -14;
|
|
|
|
public static const MSG_ID_LOGIN_BANNED:int = -15;
|
|
|
|
public static const MSG_ID_LOGIN_SERVER_MAINT:int = -16;
|
|
|
|
public static const MSG_ID_LOGIN_CLIENT_MISMATCH:int = -24;
|
|
|
|
public static var avatarCreationLogin:MovieClip;
|
|
|
|
public static var avatarCreationVO:MovieClip;
|
|
|
|
public static var handleLocalExternalCall:Function;
|
|
|
|
private static const _configDebugFile:String = "clientdevtest.xml";
|
|
|
|
private static const _configDebugTemplateFile:String = "clientdevtest.template.xml";
|
|
|
|
private static var _configLoadedCallback:Function;
|
|
|
|
private static var m:MainFrame;
|
|
|
|
private static var _flashVarUserName:String;
|
|
|
|
private static var _client:SFClient = null;
|
|
|
|
private static var _path:String = null;
|
|
|
|
private static var _stage:Stage;
|
|
|
|
private static var _gamePlay:DisplayObjectContainer;
|
|
|
|
private static var _waitingRoom:DisplayObjectContainer;
|
|
|
|
private static var _createAccount:DisplayObjectContainer;
|
|
|
|
private static var _loaderCache:LoaderCache;
|
|
|
|
public var userInfo:UserInfoCache;
|
|
|
|
public var clientInfo:Object;
|
|
|
|
public var classNames:Array;
|
|
|
|
private var _layerInfo:Object;
|
|
|
|
public function MainFrame()
|
|
{
|
|
super();
|
|
}
|
|
|
|
public static function getInstance(param1:Object = null, param2:Function = null, param3:String = "", param4:DisplayObjectContainer = null) : MainFrame
|
|
{
|
|
var _loc6_:Stage = null;
|
|
var _loc5_:Boolean = false;
|
|
var _loc8_:Shape = null;
|
|
var _loc7_:Boolean = false;
|
|
var _loc9_:URLLoader = null;
|
|
if(m == null)
|
|
{
|
|
if(param3 == null || param4 == null || param4.stage == null)
|
|
{
|
|
throw new Error("ERROR: Attempted to call initial getInstance on MainFrame without correct parameters!");
|
|
}
|
|
_loc6_ = param4.stage;
|
|
LoadProgress.init(_loc6_);
|
|
LoadProgress.show(true,1);
|
|
LoaderCache.cdnSalt = "J@mnim4L";
|
|
_loc5_ = ExternalInterface.available;
|
|
if(_loc5_)
|
|
{
|
|
DebugUtility.debugTrace("extIntAvail is true");
|
|
DebugUtility.debugTrace("mrc dm init starting up call returned:" + ExternalInterface.call("mrc",["dm","init:starting up"]));
|
|
}
|
|
else
|
|
{
|
|
DebugUtility.debugTrace("extIntAvail is false");
|
|
}
|
|
_loc8_ = new Shape();
|
|
_loc8_.graphics.clear();
|
|
_loc8_.graphics.lineStyle(1,16777215);
|
|
_loc8_.graphics.beginFill(16777215);
|
|
_loc8_.graphics.drawRect(0,0,900,550);
|
|
_loc8_.graphics.endFill();
|
|
param4.addChild(_loc8_);
|
|
param4.mask = _loc8_;
|
|
_loc6_.showDefaultContextMenu = false;
|
|
_loc6_.scaleMode = "noScale";
|
|
m = new MainFrame();
|
|
m.init(new Singleton(),param3,_loc6_);
|
|
gMainFrame = m;
|
|
_loc6_.addEventListener("keyDown",keyDownListener,false,0,true);
|
|
_loc6_.addEventListener("rightMouseDown",onRightMouseDown,false,0,true);
|
|
if(_loc5_)
|
|
{
|
|
try
|
|
{
|
|
DebugUtility.debugTrace("init:adding mec callback");
|
|
ExternalInterface.addCallback("mec",handleLocalExternalCall);
|
|
DebugUtility.debugTrace("init:mec added, calling lc...");
|
|
ExternalInterface.call("mrc",["lc"]);
|
|
DebugUtility.debugTrace("init:... lc called, waiting for ixm...");
|
|
}
|
|
catch(e:Error)
|
|
{
|
|
DebugUtility.debugTrace("init:ERROR hit during AJC ext mod setup! msg:" + e.message + " stack:" + e.getStackTrace());
|
|
}
|
|
}
|
|
DebugUtility.debugTrace("init: setting extCallsActive to false");
|
|
gMainFrame.clientInfo.extCallsActive = false;
|
|
DebugUtility.debugTrace("init: set extCallsActive to false");
|
|
_configLoadedCallback = param2;
|
|
_loc7_ = param1 && param1.smartfoxServer;
|
|
DebugUtility.debugTrace("MainFrame.getInstance - haveFlashVars:" + _loc7_);
|
|
gMainFrame.clientInfo.devMode = !_loc7_;
|
|
if(_loc7_)
|
|
{
|
|
if("username" in param1 && param1.username != undefined)
|
|
{
|
|
_flashVarUserName = param1.username;
|
|
}
|
|
else
|
|
{
|
|
_flashVarUserName = "";
|
|
}
|
|
DebugUtility.debugTrace("MainFrame.getInstance - flashVars.smartfoxServer:" + param1.smartfoxServer + " flashVars.smartfoxPort:" + param1.smartfoxPort + " flashVars.blueboxServer:" + param1.blueboxServer + " flashVars.blueboxPort:" + param1.blueboxPort + " flashVars.content:" + param1.content + " flashVars.website:" + param1.website);
|
|
if(!(param1.smartfoxServer && param1.smartfoxPort && param1.blueboxServer && param1.blueboxPort && param1.content && param1.website))
|
|
{
|
|
DebugUtility.debugTrace("MainFrame.getInstance - Invalid FlashVars! Throwing error...");
|
|
throw new Error("Invalid FlashVars!");
|
|
}
|
|
if(!param1.hasOwnProperty("startupRoom"))
|
|
{
|
|
param1.startupRoom = "jamaa_township.room_main";
|
|
}
|
|
if(!param1.hasOwnProperty("worldmapRoom"))
|
|
{
|
|
param1.worldmapRoom = "world_map/room_main.xroom";
|
|
}
|
|
if(!param1.hasOwnProperty("dangermapRoom"))
|
|
{
|
|
param1.dangermapRoom = "danger_map/room_main.xroom";
|
|
}
|
|
if(!param1.hasOwnProperty("clientDebug"))
|
|
{
|
|
param1.clientDebug = "false";
|
|
}
|
|
if(!param1.hasOwnProperty("forceHttpProxy"))
|
|
{
|
|
param1.forceHttpProxy = "false";
|
|
}
|
|
if(!param1.hasOwnProperty("build_version"))
|
|
{
|
|
param1.build_version = "0";
|
|
}
|
|
if(!param1.hasOwnProperty("deploy_version"))
|
|
{
|
|
param1.deploy_version = "0";
|
|
}
|
|
if(!param1.hasOwnProperty("locale"))
|
|
{
|
|
param1.locale = "en-US";
|
|
}
|
|
if(!param1.hasOwnProperty("sg_params"))
|
|
{
|
|
param1.sg_params = "";
|
|
}
|
|
if(!param1.hasOwnProperty("buddyRoomTimerInterval"))
|
|
{
|
|
param1.buddyRoomTimerInterval = "30000";
|
|
}
|
|
if(!param1.hasOwnProperty("countryCode"))
|
|
{
|
|
param1.countryCode = "";
|
|
}
|
|
if(String(param1.sg_params).indexOf("%") >= 0)
|
|
{
|
|
throw new Error("Invalid sg_params!");
|
|
}
|
|
gMainFrame.clientInfo.localMode = false;
|
|
LoaderCache.localMode = false;
|
|
applyConfigVars(param1);
|
|
}
|
|
else
|
|
{
|
|
_loc9_ = new URLLoader();
|
|
_loc9_.dataFormat = "text";
|
|
_loc9_.addEventListener("complete",configDebugLoadCompleteHandler);
|
|
_loc9_.addEventListener("ioError",configDebugLoadIOErrorHandler);
|
|
_loc9_.load(new URLRequest("clientdevtest.xml"));
|
|
}
|
|
}
|
|
SBTracker.create();
|
|
return m;
|
|
}
|
|
|
|
public static function isInitialized() : Boolean
|
|
{
|
|
return m != null;
|
|
}
|
|
|
|
private static function keyDownListener(param1:KeyboardEvent) : void
|
|
{
|
|
if(gMainFrame.clientInfo.accountType == 4 || gMainFrame.clientInfo.accountType == 5)
|
|
{
|
|
if(!param1.ctrlKey && param1.shiftKey && !param1.altKey && param1.keyCode == 123)
|
|
{
|
|
if(!_client.isConnected)
|
|
{
|
|
return;
|
|
}
|
|
if(_gamePlay)
|
|
{
|
|
_gamePlay["reconnecting"] = true;
|
|
_gamePlay["showLoadProgress"](true,7);
|
|
}
|
|
gMainFrame.clientInfo.forceHttpProxy = true;
|
|
_client.disconnect();
|
|
}
|
|
}
|
|
}
|
|
|
|
private static function onRightMouseDown(param1:MouseEvent) : void
|
|
{
|
|
param1.stopPropagation();
|
|
param1.preventDefault();
|
|
}
|
|
|
|
private static function applyConfigVars(param1:Object) : void
|
|
{
|
|
for(var _loc10_:String in param1)
|
|
{
|
|
gMainFrame.clientInfo[_loc10_] = param1[_loc10_];
|
|
}
|
|
var _loc4_:Array = [param1.smartfoxServer];
|
|
var _loc5_:int = 1;
|
|
while(param1.hasOwnProperty("smartfoxServer" + _loc5_))
|
|
{
|
|
_loc4_.push(param1["smartfoxServer" + _loc5_]);
|
|
_loc5_++;
|
|
}
|
|
var _loc7_:Array = [param1.blueboxServer];
|
|
var _loc13_:int = 1;
|
|
while(param1.hasOwnProperty("blueboxServer" + _loc13_))
|
|
{
|
|
_loc7_.push(param1["blueboxServer" + _loc13_]);
|
|
_loc13_++;
|
|
}
|
|
gMainFrame.server.setServerConfig(_loc4_,param1.smartfoxPort,_loc7_,param1.blueboxPort,param1.clientDebug);
|
|
var _loc3_:String = param1.forceHttpProxy;
|
|
gMainFrame.clientInfo.forceHttpProxy = _loc3_ == "true";
|
|
var _loc12_:String = param1.build_version;
|
|
gMainFrame.clientInfo.buildVersion = _loc12_;
|
|
LoaderCache.buildVersion = _loc12_;
|
|
var _loc14_:String = param1.deploy_version;
|
|
gMainFrame.clientInfo.deployVersion = _loc14_;
|
|
LoaderCache.deployVersion = _loc14_;
|
|
var _loc6_:String = param1.locale;
|
|
gMainFrame.clientInfo.locale = _loc6_;
|
|
var _loc2_:String = param1.myExternalIp;
|
|
gMainFrame.clientInfo.clientIp = _loc2_;
|
|
gMainFrame.clientInfo.websiteURL = param1.website;
|
|
var _loc9_:String = param1.content;
|
|
gMainFrame.clientInfo.contentURL = _loc9_;
|
|
LoaderCache.contentURL = _loc9_;
|
|
var _loc8_:Boolean = param1.webRefPath == "create_account";
|
|
gMainFrame.clientInfo.isCreateAccount = _loc8_;
|
|
var _loc15_:Boolean = param1.waitingMode == "true";
|
|
gMainFrame.clientInfo.waitingMode = _loc15_;
|
|
var _loc11_:int = int(param1.buddyRoomTimerInterval);
|
|
gMainFrame.clientInfo.buddyRoomTimerInterval = _loc11_;
|
|
gMainFrame.clientInfo.startUpRoom = String(param1.startupRoom);
|
|
gMainFrame.clientInfo.worldMapRoom = "roomDefs/" + param1.worldmapRoom;
|
|
gMainFrame.clientInfo.dangerMapRoom = "roomDefs/" + param1.dangermapRoom;
|
|
gMainFrame.clientInfo.clientDebug = param1.clientDebug;
|
|
gMainFrame.clientInfo.sgParams = String(param1.sg_params);
|
|
gMainFrame.clientInfo.mdUrl = String(param1.mdUrl);
|
|
gMainFrame.clientInfo.currentTimestamp = Number(param1.currentTimestamp);
|
|
gMainFrame.clientInfo.sbTrackerIp = String(param1.sbStatTrackerIp);
|
|
gMainFrame.clientInfo.sbTrackerModulator = param1.sbStatModulator;
|
|
gMainFrame.clientInfo.landingPage = String(param1.landingPage);
|
|
gMainFrame.clientInfo.authToken = param1.auth_token;
|
|
gMainFrame.clientInfo.countryCode = param1.countryCode;
|
|
gMainFrame.clientInfo.playerWallHost = String(param1.playerWallHost);
|
|
if(gMainFrame.clientInfo.countryCode == undefined)
|
|
{
|
|
gMainFrame.clientInfo.countryCode = "";
|
|
}
|
|
DebugUtility.debugTrace("-configXml/flashVars info-");
|
|
DebugUtility.debugTrace("smartfoxAddress:" + param1.smartfoxServer);
|
|
DebugUtility.debugTrace("smartfoxPort:" + param1.smartfoxPort);
|
|
DebugUtility.debugTrace("blueboxAddress:" + param1.blueboxServer);
|
|
DebugUtility.debugTrace("blueboxPort:" + param1.blueboxPort);
|
|
DebugUtility.debugTrace("buildVersionStr:" + _loc12_);
|
|
DebugUtility.debugTrace("deployVersionStr:" + _loc14_);
|
|
DebugUtility.debugTrace("localeStr:" + _loc6_);
|
|
DebugUtility.debugTrace("clientIpStr:" + _loc2_);
|
|
DebugUtility.debugTrace("contentURL:" + gMainFrame.clientInfo.contentURL);
|
|
DebugUtility.debugTrace("websiteURL:" + gMainFrame.clientInfo.websiteURL);
|
|
DebugUtility.debugTrace("isCreateAccount:" + _loc8_ + " webRefPath:" + param1.webRefPath);
|
|
DebugUtility.debugTrace("isWaitingMode:" + _loc15_ + " cfgVars.waitingMode:" + param1.waitingMode);
|
|
DebugUtility.debugTrace("startUpRoom:" + gMainFrame.clientInfo.startUpRoom);
|
|
DebugUtility.debugTrace("worldMapRoom:" + gMainFrame.clientInfo.worldMapRoom);
|
|
DebugUtility.debugTrace("dangerMapRoom:" + gMainFrame.clientInfo.dangerMapRoom);
|
|
DebugUtility.debugTrace("clientDebug:" + param1.clientDebug);
|
|
DebugUtility.debugTrace("forceHttpProxy:" + param1.forceHttpProxy);
|
|
DebugUtility.debugTrace("sgParams:" + gMainFrame.clientInfo.sgParams);
|
|
DebugUtility.debugTrace("buddyRoomTimerInterval:" + gMainFrame.clientInfo.buddyRoomTimerInterval);
|
|
_loaderCache = new LoaderCache();
|
|
if(!gMainFrame.clientInfo.devMode && !gMainFrame.clientInfo.isCreateAccount && (_flashVarUserName == "" || !("auth_token" in param1) || param1.auth_token == null || param1.auth_token == undefined || param1.auth_token == ""))
|
|
{
|
|
gMainFrame.clientInfo.failedToInitiate = true;
|
|
}
|
|
_configLoadedCallback();
|
|
}
|
|
|
|
private static function configDebugLoadIOErrorHandler(param1:IOErrorEvent) : void
|
|
{
|
|
var _loc2_:URLLoader = new URLLoader();
|
|
_loc2_.dataFormat = "text";
|
|
_loc2_.addEventListener("complete",configDebugLoadCompleteHandler);
|
|
_loc2_.addEventListener("ioError",configDebugTemplateLoadIOErrorHandler);
|
|
_loc2_.load(new URLRequest("clientdevtest.template.xml"));
|
|
}
|
|
|
|
private static function configDebugTemplateLoadIOErrorHandler(param1:IOErrorEvent) : void
|
|
{
|
|
throw new Error("IOError reading clientdevtest.xml or clientdevtest.template.xml! ioe:" + param1);
|
|
}
|
|
|
|
private static function configDebugLoadCompleteHandler(param1:Event) : void
|
|
{
|
|
var _loc2_:XML = new XML(param1.target.data);
|
|
var _loc4_:XMLList = _loc2_.autoLogins.children();
|
|
var _loc7_:int = 0;
|
|
for each(var _loc3_:XML in _loc4_)
|
|
{
|
|
gMainFrame.clientInfo["autoLogin" + ++_loc7_] = [String(_loc3_.name.text()),String(_loc3_.token.text())];
|
|
}
|
|
var _loc10_:String = _loc2_.local.text();
|
|
if(_loc10_ == "false")
|
|
{
|
|
gMainFrame.clientInfo.localMode = false;
|
|
LoaderCache.localMode = false;
|
|
}
|
|
else
|
|
{
|
|
gMainFrame.clientInfo.localMode = true;
|
|
}
|
|
var _loc6_:String = _loc2_.clientDebug.text();
|
|
if(_loc6_ != "true")
|
|
{
|
|
_loc6_ = "false";
|
|
}
|
|
var _loc11_:String = "false";
|
|
if(_loc2_.hasOwnProperty("forceHttpProxy"))
|
|
{
|
|
_loc11_ = _loc2_.forceHttpProxy.text();
|
|
}
|
|
var _loc12_:String = "false";
|
|
if(_loc2_.hasOwnProperty("waitingMode"))
|
|
{
|
|
_loc12_ = _loc2_.waitingMode.text();
|
|
}
|
|
var _loc9_:Object = {
|
|
"smartfoxServer":_loc2_.smartfoxServer.text(),
|
|
"smartfoxPort":_loc2_.smartfoxPort.text(),
|
|
"blueboxServer":_loc2_.blueboxServer.text(),
|
|
"blueboxPort":_loc2_.blueboxPort.text(),
|
|
"content":_loc2_.content.text(),
|
|
"website":_loc2_.website.text(),
|
|
"startupRoom":_loc2_.startupRoom.text(),
|
|
"worldmapRoom":_loc2_.worldmapRoom.text(),
|
|
"dangermapRoom":_loc2_.dangermapRoom.text(),
|
|
"clientDebug":_loc6_,
|
|
"forceHttpProxy":_loc11_,
|
|
"waitingMode":_loc12_,
|
|
"sg_params":"",
|
|
"mdUrl":_loc2_.mdUrl,
|
|
"playerWallHost":_loc2_.playerWallHost.text()
|
|
};
|
|
var _loc13_:int = 1;
|
|
while(_loc2_.hasOwnProperty("smartfoxServer" + _loc13_))
|
|
{
|
|
_loc9_["smartfoxServer" + _loc13_] = _loc2_["smartfoxServer" + _loc13_].text();
|
|
_loc13_++;
|
|
}
|
|
var _loc5_:int = 1;
|
|
while(_loc2_.hasOwnProperty("blueboxServer" + _loc5_))
|
|
{
|
|
_loc9_["blueboxServer" + _loc5_] = _loc2_["blueboxServer" + _loc5_].text();
|
|
_loc5_++;
|
|
}
|
|
_loc9_["build_version"] = _loc2_.hasOwnProperty("build_version") ? _loc2_.build_version.text() : "0";
|
|
_loc9_["deploy_version"] = _loc2_.hasOwnProperty("deploy_version") ? _loc2_.deploy_version.text() : "0";
|
|
_loc9_["locale"] = _loc2_.hasOwnProperty("locale") ? _loc2_.locale.text() : "en";
|
|
_loc9_["myExternalIp"] = _loc2_.hasOwnProperty("myExternalIp") ? _loc2_.myExternalIp.text() : "";
|
|
_loc9_["webRefPath"] = _loc2_.hasOwnProperty("webRefPath") ? _loc2_.webRefPath.text() : "";
|
|
_loc9_["buddyRoomTimerInterval"] = _loc2_.hasOwnProperty("buddyRoomTimerInterval") ? _loc2_.buddyRoomTimerInterval.text() : "30000";
|
|
for(var _loc8_:String in _loc9_)
|
|
{
|
|
if(_loc9_[_loc8_] is XMLList && XMLList(_loc9_[_loc8_]).length() > 1)
|
|
{
|
|
throw new Error("Invalid clientdevtest xml config! Found multiple tags of same name:" + _loc8_);
|
|
}
|
|
}
|
|
applyConfigVars(_loc9_);
|
|
}
|
|
|
|
public function init(param1:Singleton, param2:String, param3:Stage) : void
|
|
{
|
|
_path = param2;
|
|
_stage = param3;
|
|
_client = new SFClient();
|
|
userInfo = new UserInfoCache();
|
|
userInfo.init();
|
|
clientInfo = {};
|
|
clientInfo.invisMode = false;
|
|
classNames = null;
|
|
}
|
|
|
|
public function get server() : SFClient
|
|
{
|
|
return _client;
|
|
}
|
|
|
|
public function get path() : String
|
|
{
|
|
return _path;
|
|
}
|
|
|
|
override public function get stage() : Stage
|
|
{
|
|
return _stage;
|
|
}
|
|
|
|
public function set createAccount(param1:DisplayObjectContainer) : void
|
|
{
|
|
_createAccount = param1;
|
|
}
|
|
|
|
public function get createAccount() : DisplayObjectContainer
|
|
{
|
|
return _createAccount;
|
|
}
|
|
|
|
public function set waitingRoom(param1:DisplayObjectContainer) : void
|
|
{
|
|
_waitingRoom = param1;
|
|
}
|
|
|
|
public function get waitingRoom() : DisplayObjectContainer
|
|
{
|
|
return _waitingRoom;
|
|
}
|
|
|
|
public function set gamePlay(param1:DisplayObjectContainer) : void
|
|
{
|
|
_gamePlay = param1;
|
|
}
|
|
|
|
public function get gamePlay() : DisplayObjectContainer
|
|
{
|
|
return _gamePlay;
|
|
}
|
|
|
|
public function get layerManager() : LayerManager
|
|
{
|
|
return (_gamePlay as GamePlay).layerManager;
|
|
}
|
|
|
|
public function get loaderCache() : LoaderCache
|
|
{
|
|
return _loaderCache;
|
|
}
|
|
|
|
public function set layerInfo(param1:Object) : void
|
|
{
|
|
_layerInfo = param1;
|
|
ImageServerURL.instance.layerInfo = param1;
|
|
}
|
|
|
|
public function get myFlashVarUserName() : String
|
|
{
|
|
return _flashVarUserName;
|
|
}
|
|
|
|
public function set myFlashVarUserName(param1:String) : void
|
|
{
|
|
_flashVarUserName = param1;
|
|
}
|
|
|
|
public function isInMinigame() : Boolean
|
|
{
|
|
return _gamePlay != null && _gamePlay["isInMinigame"]();
|
|
}
|
|
|
|
public function setAvatarOffsets(param1:Array) : void
|
|
{
|
|
LayerAnim.avOffsets = param1;
|
|
}
|
|
|
|
public function switchServersIfNeeded(param1:String) : Boolean
|
|
{
|
|
DebugUtility.debugTrace("switchServersIfNeeded called with newNode:" + param1);
|
|
var _loc2_:String = param1;
|
|
DebugUtility.debugTrace("checking new node:" + _loc2_ + " vs old node:" + _client.serverIp);
|
|
if(_client.serverIp == _loc2_)
|
|
{
|
|
return false;
|
|
}
|
|
_gamePlay["reconnecting"] = true;
|
|
_gamePlay["showLoadProgress"](true,7);
|
|
_client.switchServerNode(_loc2_);
|
|
_client.disconnect();
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|
|
class Singleton
|
|
{
|
|
|
|
public function Singleton()
|
|
{
|
|
super();
|
|
}
|
|
}
|