mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-20 09:37:50 -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,103 @@
|
||||
package createAccountFlow
|
||||
{
|
||||
import com.sbi.client.SFEvent;
|
||||
import com.sbi.debug.DebugUtility;
|
||||
|
||||
public class CreateAccountXtCommManager
|
||||
{
|
||||
|
||||
public static var logIn:CreateAccount;
|
||||
|
||||
private static var _laReturnType:int;
|
||||
|
||||
public static const LOGINAVAILABLE_TYPE_USERNAME:int = 0;
|
||||
|
||||
public static const LOGINAVAILABLE_TYPE_AVATARNAME:int = 1;
|
||||
|
||||
public function CreateAccountXtCommManager()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function init(param1:CreateAccount) : void
|
||||
{
|
||||
logIn = param1;
|
||||
_laReturnType = -1;
|
||||
XtReplyDemuxer.addModule(handleXtReply,"l");
|
||||
}
|
||||
|
||||
public static function destroy() : void
|
||||
{
|
||||
XtReplyDemuxer.removeModule(handleXtReply);
|
||||
}
|
||||
|
||||
public static function sendLoginAvailableRequest(param1:int, param2:String) : void
|
||||
{
|
||||
_laReturnType = param1;
|
||||
gMainFrame.server.setXtObject_Str("la",[param1,param2],false);
|
||||
}
|
||||
|
||||
public static function sendLoginCreateRequest(param1:Array, param2:Array) : void
|
||||
{
|
||||
var _loc3_:* = 0;
|
||||
var _loc4_:* = 2;
|
||||
var _loc5_:Array = [param1[_loc3_++],param1[_loc3_++],param1[_loc3_++],param1[_loc3_++],param1[_loc3_++],param1[_loc3_++],param1[_loc3_++],param2[_loc4_++],param2[_loc4_++],param2[_loc4_++],param2[_loc4_++]];
|
||||
_loc4_ += 4;
|
||||
if(_loc3_ != param1.length)
|
||||
{
|
||||
throw new Error("Expected end of loginCreate data array lcdi:" + _loc3_ + " did not match length:" + param1.length + "!");
|
||||
}
|
||||
if(_loc4_ != param2.length)
|
||||
{
|
||||
throw new Error("Expected end of loginNew data array lndi:" + _loc4_ + " did not match length:" + param2.length + "!");
|
||||
}
|
||||
gMainFrame.server.setXtObject_Str("lc",_loc5_,gMainFrame.server.isWorldZone);
|
||||
}
|
||||
|
||||
public static function sendLoginNewRequest(param1:Array) : void
|
||||
{
|
||||
var _loc2_:* = 0;
|
||||
var _loc3_:Array = [param1[_loc2_++],param1[_loc2_++],param1[_loc2_++],param1[_loc2_++],param1[_loc2_++],param1[_loc2_++]];
|
||||
var _loc4_:Array = param1[_loc2_++];
|
||||
if(_loc2_ != param1.length)
|
||||
{
|
||||
throw new Error("Expected end of loginNew data array lndi:" + _loc2_ + " did not match length:" + param1.length + "!");
|
||||
}
|
||||
loginNewAvatarHelper(_loc4_,_loc3_);
|
||||
gMainFrame.server.setXtObject_Str("ln",_loc3_,gMainFrame.server.isWorldZone);
|
||||
}
|
||||
|
||||
private static function loginNewAvatarHelper(param1:Array, param2:Array) : void
|
||||
{
|
||||
var _loc3_:int = int(param1.length);
|
||||
param2.push(_loc3_);
|
||||
var _loc4_:int = 0;
|
||||
while(_loc4_ < _loc3_)
|
||||
{
|
||||
param2.push(param1[_loc4_].defId);
|
||||
_loc4_++;
|
||||
}
|
||||
}
|
||||
|
||||
public static function handleXtReply(param1:SFEvent) : void
|
||||
{
|
||||
var _loc2_:Array = param1.obj;
|
||||
DebugUtility.debugTrace("data:" + _loc2_);
|
||||
switch(_loc2_[0])
|
||||
{
|
||||
case "la":
|
||||
logIn.handleLoginAvailable(_loc2_,_laReturnType);
|
||||
break;
|
||||
case "lc":
|
||||
logIn.handleLoginCreate(_loc2_);
|
||||
break;
|
||||
case "ln":
|
||||
logIn.handleNewAvatarData(_loc2_);
|
||||
break;
|
||||
default:
|
||||
throw new Error("LogIn illegal data:" + _loc2_[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user