1288 lines
46 KiB
ActionScript
1288 lines
46 KiB
ActionScript
package com.control.castle
|
|
{
|
|
import com.InstallFace;
|
|
import com.control.castle.event.AlartEvent;
|
|
import com.control.castle.event.AllQueueEvent;
|
|
import com.control.castle.event.BarrackEvent;
|
|
import com.control.castle.event.CastleBuildEvent;
|
|
import com.control.castle.event.CastleBuildListEvent;
|
|
import com.control.castle.event.CastleEvent;
|
|
import com.control.castle.event.CastleLevelUpEvent;
|
|
import com.control.castle.event.CastleListEvent;
|
|
import com.control.castle.event.CastleWallEvent;
|
|
import com.control.castle.event.HospitalEvent;
|
|
import com.control.castle.event.NewCastleEvent;
|
|
import com.control.castle.event.StrategyEvent;
|
|
import com.control.connect.Connect;
|
|
import com.control.data.ReturnBean;
|
|
import com.data.DataModoule;
|
|
import com.data.MemeberShip;
|
|
import com.data.data.army.Army;
|
|
import com.data.data.army.TowerArmy;
|
|
import com.data.data.city.Building;
|
|
import com.data.data.city.BuildingQueue;
|
|
import com.data.data.city.Castle;
|
|
import com.data.data.city.CastleBuilding;
|
|
import com.data.data.city.CastlePop;
|
|
import com.data.data.city.CastleResource;
|
|
import com.data.data.city.EntityCapacity;
|
|
import com.data.data.city.EntityConsume;
|
|
import com.data.data.city.EntityLimit;
|
|
import com.events.DevEvent;
|
|
import com.newdata.user.NewPop;
|
|
import com.newdata.user.NewRes;
|
|
import com.newdata.user.NewUser;
|
|
import com.newdata.user.NewUserData;
|
|
import com.utils.Utils;
|
|
import com.view.cache.BuildCache;
|
|
import com.view.mc.sprite.LoadingMc;
|
|
import com.view.ui.pak.data.PakState;
|
|
import flash.net.registerClassAlias;
|
|
|
|
public class CastleService extends Connect
|
|
{
|
|
|
|
registerClassAlias("CastleResource",CastleResource);
|
|
registerClassAlias("CastleBuilding",CastleBuilding);
|
|
registerClassAlias("Building",Building);
|
|
registerClassAlias("BuildingQueue",BuildingQueue);
|
|
registerClassAlias("EntityCapacity",EntityCapacity);
|
|
registerClassAlias("EntityConsume",EntityConsume);
|
|
registerClassAlias("EntityLimit",EntityLimit);
|
|
registerClassAlias("CastlePop",CastlePop);
|
|
registerClassAlias("Army",Army);
|
|
registerClassAlias("TowerArmy",TowerArmy);
|
|
|
|
public function CastleService()
|
|
{
|
|
super();
|
|
}
|
|
|
|
public function calcuDevData() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.calcuDevData";
|
|
super.connect(_loc1_,this.calcuDevDataResult);
|
|
}
|
|
|
|
private function calcuDevDataResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
var _loc3_:Castle = _loc2_.returnMap1["castle"] as Castle;
|
|
DataModoule.getInstance().userMgr.castle = _loc3_;
|
|
Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLECHANGE));
|
|
var _loc4_:NewUser = new NewUser(_loc2_.returnMap1["user"]);
|
|
NewUserData.setUser(_loc4_);
|
|
var _loc5_:NewRes = new NewRes(_loc2_.returnMap1["castleRes"]);
|
|
NewUserData.setRes(_loc5_);
|
|
var _loc6_:NewPop = new NewPop(_loc2_.returnMap1["castlePop"]);
|
|
NewUserData.setNewPop(_loc6_);
|
|
DataModoule.getInstance().userMgr.farmObj = _loc2_.returnMap1.product;
|
|
Utils.g_events.dispatchEvent(new DevEvent(DevEvent.FARM_RES_UPDATE,_loc2_.returnMap1.product));
|
|
}
|
|
|
|
public function getCastleResource() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getCastleRes";
|
|
super.connect(_loc1_,this.getCastleResourceResult);
|
|
}
|
|
|
|
private function getCastleResourceResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:NewRes = new NewRes(_loc2_.returnObj1);
|
|
NewUserData.setRes(_loc3_);
|
|
}
|
|
|
|
public function getUserData() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getUser";
|
|
super.connect(_loc1_,this.getUserDataResult);
|
|
}
|
|
|
|
private function getUserDataResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:NewUser = new NewUser(_loc2_.returnObj1);
|
|
NewUserData.setUser(_loc3_);
|
|
}
|
|
|
|
public function getPop() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getPop";
|
|
super.connect(_loc1_,this.getPopResult);
|
|
}
|
|
|
|
private function getPopResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:NewPop = new NewPop(_loc2_.returnObj1);
|
|
NewUserData.setNewPop(_loc3_);
|
|
}
|
|
|
|
public function getFarmProductInfo() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getFarmInfo";
|
|
super.connect(_loc1_,this.getFarmProductInfoResult);
|
|
}
|
|
|
|
private function getFarmProductInfoResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
DataModoule.getInstance().userMgr.farmObj = _loc2_.returnObj1;
|
|
Utils.g_events.dispatchEvent(new DevEvent(DevEvent.FARM_RES_UPDATE,_loc2_.returnObj1));
|
|
}
|
|
|
|
public function getMainCastle() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getMainCastle";
|
|
super.connect(_loc1_,this.getMainCastleResult);
|
|
}
|
|
|
|
private function getMainCastleResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:Castle = _loc2_.returnObj1 as Castle;
|
|
DataModoule.getInstance().userMgr.castle = _loc3_;
|
|
Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLECHANGE));
|
|
}
|
|
|
|
public function createBuilding(param1:int, param2:int, param3:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc4_:String = "com.huzi.develop.action.CastleAction.createBuilding";
|
|
super.connect(_loc4_,this.createBuildResult,param1,param2,param3);
|
|
}
|
|
|
|
private function createBuildResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleBuilding = _loc2_.returnObj1 as CastleBuilding;
|
|
_loc3_.isUp = true;
|
|
var _loc4_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_NEW);
|
|
_loc4_.castleBuild = _loc3_;
|
|
super.dispatchEvent(_loc4_);
|
|
this.getCastleResource();
|
|
}
|
|
|
|
public function getBuildList(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.getCastleBuildList";
|
|
super.connect(_loc2_,this.getBuildListResult,param1);
|
|
}
|
|
|
|
private function getBuildListResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
DataModoule.getInstance().castleMgr.setMainCastleBuildList(_loc2_.returnList1);
|
|
var _loc3_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_LOADALL);
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function upCastleBui(param1:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.levelUpCastleBui";
|
|
var _loc3_:int = MemeberShip.getCurrCasId();
|
|
super.connect(_loc2_,this.upCastleBuiResult,_loc3_,param1);
|
|
}
|
|
|
|
private function upCastleBuiResult(param1:Object) : void
|
|
{
|
|
var _loc4_:CastleBuilding = null;
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_UP);
|
|
if(_loc2_.result == ReturnBean.STATUS_0)
|
|
{
|
|
_loc4_ = _loc2_.returnObj1 as CastleBuilding;
|
|
_loc4_.isUp = true;
|
|
_loc3_.castleBuild = _loc4_;
|
|
DataModoule.getInstance().castleMgr.setCastleBuild(_loc4_);
|
|
this.getCastleResource();
|
|
}
|
|
_loc3_.result = _loc2_.result;
|
|
_loc3_.msg = _loc2_.msg;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function upBuildTimeOver(param1:int, param2:String, param3:int) : void
|
|
{
|
|
var _loc4_:String = "com.huzi.develop.action.CastleAction.buildTimeOver";
|
|
super.connect(_loc4_,this.upBuildTimeOverResult,param1,param2,param3);
|
|
}
|
|
|
|
private function upBuildTimeOverResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleBuilding = _loc2_.returnObj1 as CastleBuilding;
|
|
var _loc4_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_UP_OK);
|
|
_loc4_.castleBuild = _loc3_;
|
|
_loc4_.obj = _loc2_.returnObj2;
|
|
super.dispatchEvent(_loc4_);
|
|
this.getPop();
|
|
this.getUserData();
|
|
this.getMainCastle();
|
|
}
|
|
|
|
public function destroyBuild(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.destroyCastleBui";
|
|
super.connect(_loc2_,this.destroyBuildResult,param1);
|
|
}
|
|
|
|
private function destroyBuildResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleBuilding = _loc2_.returnObj1 as CastleBuilding;
|
|
_loc3_.isUp = true;
|
|
var _loc4_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_DESTROY);
|
|
_loc4_.castleBuild = _loc3_;
|
|
super.dispatchEvent(_loc4_);
|
|
}
|
|
|
|
public function cancelBuild(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.cancelBuilding";
|
|
super.connect(_loc2_,this.cancelBuildResult,param1);
|
|
}
|
|
|
|
private function cancelBuildResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_CANCEL);
|
|
_loc3_.castleBuild = _loc2_.returnObj1 as CastleBuilding;
|
|
super.dispatchEvent(_loc3_);
|
|
this.getCastleResource();
|
|
}
|
|
|
|
public function getNewBuildList(param1:int) : void
|
|
{
|
|
var _loc3_:CastleBuildListEvent = null;
|
|
var _loc4_:String = null;
|
|
var _loc2_:Array = BuildCache.getInstance().getNewBuiList(InstallFace.getInstance()._castleType);
|
|
if(_loc2_)
|
|
{
|
|
_loc3_ = new CastleBuildListEvent(CastleBuildListEvent.MAIN_CASTLE_BUILDLIST);
|
|
_loc3_.buildListArray = _loc2_;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
else
|
|
{
|
|
_loc4_ = "com.huzi.develop.action.CastleAction.listTodoBuilding";
|
|
super.connect(_loc4_,this.getNewBuildListResult,param1);
|
|
}
|
|
}
|
|
|
|
private function getNewBuildListResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:Array = _loc2_.returnList1;
|
|
BuildCache.getInstance().setNewBuiList(InstallFace.getInstance()._castleType,_loc3_);
|
|
var _loc4_:CastleBuildListEvent = new CastleBuildListEvent(CastleBuildListEvent.MAIN_CASTLE_BUILDLIST);
|
|
_loc4_.buildListArray = _loc3_;
|
|
super.dispatchEvent(_loc4_);
|
|
}
|
|
|
|
public function selectCasBui(param1:int, param2:String) : void
|
|
{
|
|
var _loc3_:String = "com.huzi.develop.action.CastleAction.selectCasBui";
|
|
super.connect(_loc3_,this.selectCasBuiResult,param1,param2);
|
|
}
|
|
|
|
private function selectCasBuiResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_selectCasBui);
|
|
_loc3_.castleObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function preLevelUpCastle() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.preLevelUpCastle";
|
|
var _loc2_:int = DataModoule.getInstance().userMgr.castle.casId;
|
|
super.connect(_loc1_,this.preLevelUpCastleResult,_loc2_);
|
|
}
|
|
|
|
private function preLevelUpCastleResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:String = _loc2_.returnObj1 as String;
|
|
var _loc4_:CastleLevelUpEvent = new CastleLevelUpEvent();
|
|
_loc4_.cityUrl = _loc3_;
|
|
super.dispatchEvent(_loc4_);
|
|
this.calcuDevData();
|
|
}
|
|
|
|
public function getNewCastleConsume() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getBuildNewCastleConsume";
|
|
super.connect(_loc1_,this.getNewCastleConsumeResult);
|
|
}
|
|
|
|
private function getNewCastleConsumeResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:NewCastleEvent = new NewCastleEvent(NewCastleEvent.GET_NEW_CASTLE);
|
|
_loc3_.res = _loc2_.returnObj1 as String;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function buildNewCastle(param1:String) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.buildNewCastle";
|
|
super.connect(_loc2_,this.buildNewCastleResult,param1);
|
|
}
|
|
|
|
private function buildNewCastleResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:NewCastleEvent = new NewCastleEvent(NewCastleEvent.BUILD_NEW_CASTLE_OK);
|
|
super.dispatchEvent(_loc3_);
|
|
var _loc4_:Array = _loc2_.returnList1;
|
|
_loc4_.shift();
|
|
DataModoule.getInstance().userMgr.castleArr = _loc4_;
|
|
var _loc5_:CastleListEvent = new CastleListEvent();
|
|
super.dispatchEvent(_loc5_);
|
|
var _loc6_:Castle = _loc2_.returnObj1 as Castle;
|
|
DataModoule.getInstance().userMgr.castle = _loc6_;
|
|
Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLECHANGE));
|
|
var _loc7_:NewPop = new NewPop(_loc2_.returnObj2);
|
|
NewUserData.setNewPop(_loc7_);
|
|
var _loc8_:NewUser = new NewUser(_loc2_.returnObj3);
|
|
NewUserData.setUser(_loc8_);
|
|
}
|
|
|
|
public function getAllUserCastle() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getAllUserCastle";
|
|
super.connect(_loc1_,this.getAllUserCastleResult);
|
|
}
|
|
|
|
private function getAllUserCastleResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:Array = _loc2_.returnList1;
|
|
_loc3_.shift();
|
|
DataModoule.getInstance().userMgr.castleArr = _loc3_;
|
|
var _loc4_:CastleListEvent = new CastleListEvent();
|
|
super.dispatchEvent(_loc4_);
|
|
}
|
|
|
|
public function getCastleBuildList(param1:int) : void
|
|
{
|
|
var _loc3_:CastleBuildListEvent = null;
|
|
if(BuildCache.getInstance().getBuiList(param1) != null)
|
|
{
|
|
_loc3_ = new CastleBuildListEvent(CastleBuildListEvent.CASTLE_BUILDLIST);
|
|
_loc3_.buildListArray = BuildCache.getInstance().getBuiList(param1);
|
|
_loc3_.casId = param1;
|
|
super.dispatchEvent(_loc3_);
|
|
return;
|
|
}
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.getCastleBuildList";
|
|
super.connect(_loc2_,this.getCastleBuildListResult,param1);
|
|
}
|
|
|
|
private function getCastleBuildListResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:Castle = _loc2_.returnObj1 as Castle;
|
|
var _loc4_:Array = _loc2_.returnList1;
|
|
BuildCache.getInstance().setBuiList(_loc3_.casId,_loc4_);
|
|
var _loc5_:CastleBuildListEvent = new CastleBuildListEvent(CastleBuildListEvent.CASTLE_BUILDLIST);
|
|
_loc5_.buildListArray = _loc2_.returnList1;
|
|
_loc5_.currentCastle = _loc3_;
|
|
_loc5_.casId = _loc3_.casId;
|
|
super.dispatchEvent(_loc5_);
|
|
}
|
|
|
|
public function getTransInfo(param1:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.showChangeBranchCastleView";
|
|
super.connect(_loc2_,this.getTransInfoResult,param1);
|
|
}
|
|
|
|
private function getTransInfoResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getTransInfo);
|
|
_loc3_.castleObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function changeBranchCastleType(param1:int, param2:String) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc3_:String = "com.huzi.develop.action.CastleAction.changeBranchCastleType";
|
|
super.connect(_loc3_,this.changeBranchCastleTypeResult,param1,param2);
|
|
}
|
|
|
|
private function changeBranchCastleTypeResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_changeBranchCastleType);
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function getChangeCastleInfo(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.getChangeBranchCastleRemainTime";
|
|
super.connect(_loc2_,this.getChangeCastleInfoResult,param1);
|
|
}
|
|
|
|
private function getChangeCastleInfoResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getChangeCastleInfo);
|
|
_loc3_.castleObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function listAllQueue() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.listAllQueue";
|
|
super.connect(_loc1_,this.listAllQueueResult);
|
|
}
|
|
|
|
private function listAllQueueResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:AllQueueEvent = new AllQueueEvent();
|
|
_loc3_.allQueueArr = _loc2_.returnList1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function getChangeExpPoolView() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getChangeExpPoolView";
|
|
super.connect(_loc1_,this.getChangeExpPoolResult);
|
|
}
|
|
|
|
private function getChangeExpPoolResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:AlartEvent = new AlartEvent(AlartEvent.GET_ALART_INFO);
|
|
_loc3_.alartObject = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function changeExp(param1:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.changeExp";
|
|
super.connect(_loc2_,this.changeExpResult,param1);
|
|
}
|
|
|
|
private function changeExpResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:AlartEvent = new AlartEvent(AlartEvent.GET_ALART_CHANGE);
|
|
_loc3_.msg = _loc2_.msg;
|
|
super.dispatchEvent(_loc3_);
|
|
this.getCastleResource();
|
|
}
|
|
|
|
public function showBarracks() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.showBarracks";
|
|
super.connect(_loc1_,this.showBarracksResult);
|
|
}
|
|
|
|
private function showBarracksResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.ShowBarracks);
|
|
_loc3_.barrackView = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function recruitNewArmy(param1:String, param2:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc3_:String = "com.huzi.develop.action.CastleAction.recruitArmy";
|
|
super.connect(_loc3_,this.recruitNewArmyResult,param1,param2);
|
|
}
|
|
|
|
private function recruitNewArmyResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.RecruitNewArmy);
|
|
_loc3_.result = _loc2_.result;
|
|
_loc3_.msg = _loc2_.msg;
|
|
super.dispatchEvent(_loc3_);
|
|
if(_loc2_.result == ReturnBean.STATUS_0)
|
|
{
|
|
this.calcuDevData();
|
|
}
|
|
}
|
|
|
|
public function showArmyOperView(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.showArmyOperView";
|
|
super.connect(_loc2_,this.showArmyOperViewResult,param1);
|
|
}
|
|
|
|
private function showArmyOperViewResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.Army_ShowArmyOperView);
|
|
_loc3_.barrackView = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function dismissCasArmy(param1:int, param2:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc3_:String = "com.huzi.develop.action.CastleAction.dismissCasArmy";
|
|
super.connect(_loc3_,this.dismissCasArmyResult,param1,param2);
|
|
}
|
|
|
|
private function dismissCasArmyResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.Army_dismissCasArmyResult);
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function levelUpArmy(param1:int, param2:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc3_:String = "com.huzi.develop.action.CastleAction.levelUpArmy";
|
|
super.connect(_loc3_,this.levelUpArmyResult,param1,param2);
|
|
}
|
|
|
|
private function levelUpArmyResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.Army_levelUpArmy);
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function showCastleView() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleWallAction.showCastleView";
|
|
super.connect(_loc1_,this.showCastleViewResult);
|
|
}
|
|
|
|
private function showCastleViewResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_VIEW);
|
|
_loc3_.wallObject = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function productTowerArmy(param1:int, param2:int) : void
|
|
{
|
|
var _loc3_:String = "com.huzi.develop.action.CastleWallAction.productTowerArmy";
|
|
super.connect(_loc3_,this.productTowerArmyResult,param1,param2);
|
|
}
|
|
|
|
private function productTowerArmyResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_PRODUCTARMY);
|
|
_loc3_.wallObject = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
this.getCastleResource();
|
|
}
|
|
|
|
public function wallTimeOver() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleWallAction.userWallTimeOver";
|
|
super.connect(_loc1_,this.wallTimeOverResult);
|
|
}
|
|
|
|
private function wallTimeOverResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_PRODUCTOVER);
|
|
_loc3_.wallObject = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function cancelTowerArmy(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleWallAction.cancelTowerArmy";
|
|
super.connect(_loc2_,this.cancelTowerArmyResult,param1);
|
|
}
|
|
|
|
private function cancelTowerArmyResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_CANCEL);
|
|
_loc3_.wallObject = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function disMissTowerArmy(param1:int, param2:int) : void
|
|
{
|
|
var _loc3_:String = "com.huzi.develop.action.CastleWallAction.disMissTowerArmy";
|
|
super.connect(_loc3_,this.disMissTowerArmyResult,param1,param2);
|
|
}
|
|
|
|
private function disMissTowerArmyResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_DISMISS);
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function getHospital() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.hero.action.HospitalAction.getHospital";
|
|
super.connect(_loc1_,this.getHospitalResult);
|
|
}
|
|
|
|
private function getHospitalResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.GET_HOSPITAL_VIEW);
|
|
_loc3_.hospitalObject = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function treatHero(param1:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc2_:String = "com.huzi.hero.action.HospitalAction.treatHero";
|
|
super.connect(_loc2_,this.treatHeroResult,param1);
|
|
}
|
|
|
|
private function treatHeroResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.TREAT_HERO);
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function treatHeroList() : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc1_:String = "com.huzi.hero.action.HospitalAction.treatHeroList";
|
|
super.connect(_loc1_,this.treatHeroListResult);
|
|
}
|
|
|
|
private function treatHeroListResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.TREAT_HERO_ALL);
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function getMedicPointInfo() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.hero.action.HospitalAction.getMedicPointInfo";
|
|
super.connect(_loc1_,this.getMedicPointInfoResult);
|
|
}
|
|
|
|
private function getMedicPointInfoResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.TREAT_getMedicPointInfo);
|
|
_loc3_.hospitalObject = _loc2_.returnObj1;
|
|
_loc3_.result = _loc2_.result;
|
|
_loc3_.msg = _loc2_.msg;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function addSelectMedicPoint(param1:Object) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.hero.action.HospitalAction.addSelectMedicPoint";
|
|
super.connect(_loc2_,this.addSelectMedicPointResult,param1);
|
|
}
|
|
|
|
private function addSelectMedicPointResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.TREAT_addSelectMedicPoint);
|
|
_loc3_.msg = String(_loc2_.msg);
|
|
super.dispatchEvent(_loc3_);
|
|
this.getUserData();
|
|
}
|
|
|
|
public function getAllCastle() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getUserCastle";
|
|
super.connect(_loc1_,this.getAllCastleResult);
|
|
}
|
|
|
|
private function getAllCastleResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_LIST_ALL);
|
|
_loc3_.castleList = _loc2_.returnList1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function getCastleView(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.getCastleView";
|
|
super.connect(_loc2_,this.getCastleViewResult,param1);
|
|
}
|
|
|
|
private function getCastleViewResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_VIEW);
|
|
_loc3_.castleObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function showOfficeOper4People() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.strategy.action.StrategyAction.getUserStrategiesByUserId";
|
|
super.connect(_loc1_,this.showOfficeOper4PeopleResult);
|
|
}
|
|
|
|
private function showOfficeOper4PeopleResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_ALL);
|
|
_loc3_.strategyObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function showUseStrategyLimit(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.strategy.action.StrategyAction.showUseStrategyLimit";
|
|
super.connect(_loc2_,this.showUseStrategyLimitResult,param1);
|
|
}
|
|
|
|
private function showUseStrategyLimitResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_By_Id);
|
|
_loc3_.strategyObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function useStrategyById(param1:int, param2:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc3_:String = "com.huzi.strategy.action.StrategyAction.useStrategy";
|
|
super.connect(_loc3_,this.useStrategyByIdResult,param1,param2,0);
|
|
}
|
|
|
|
public function useStrategyByIdResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_Up);
|
|
_loc3_.strategyObj = _loc2_.returnObj1;
|
|
_loc3_.result = _loc2_.result;
|
|
_loc3_.msg = _loc2_.msg;
|
|
super.dispatchEvent(_loc3_);
|
|
if(_loc2_.result == ReturnBean.STATUS_0)
|
|
{
|
|
this.calcuDevData();
|
|
}
|
|
}
|
|
|
|
public function useJunshiStrategy(param1:int, param2:int, param3:int) : void
|
|
{
|
|
var _loc4_:String = "com.huzi.strategy.action.StrategyAction.useJunshiStrategy";
|
|
super.connect(_loc4_,this.useJunshiStrategyResult,param1,param2,param3);
|
|
}
|
|
|
|
public function useJunshiStrategyResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_UseJunShi);
|
|
_loc3_.strategyObj = _loc2_.returnObj1;
|
|
_loc3_.result = _loc2_.result;
|
|
_loc3_.msg = _loc2_.msg;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function speedJunshiStrategy(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.strategy.action.StrategyAction.speedJunshiStrategy";
|
|
super.connect(_loc2_,this.speedJunshiStrategyResult,param1);
|
|
}
|
|
|
|
public function speedJunshiStrategyResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_addSpeedJunShi);
|
|
_loc3_.result = _loc2_.result;
|
|
_loc3_.msg = _loc2_.msg;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function upTemplateStrategy(param1:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc2_:String = "com.huzi.strategy.action.StrategyAction.upTemplateStrategy";
|
|
super.connect(_loc2_,this.upTemplateStrategyResult,param1);
|
|
}
|
|
|
|
public function upTemplateStrategyResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_Ups);
|
|
super.dispatchEvent(_loc3_);
|
|
this.getUserData();
|
|
}
|
|
|
|
public function moveCastleSe(param1:int, param2:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc3_:String = "com.huzi.develop.action.CastleAction.moveCastleSe";
|
|
super.connect(_loc3_,this.moveCastleSeResult,param1,param2);
|
|
}
|
|
|
|
private function moveCastleSeResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLEMOVE));
|
|
}
|
|
|
|
public function updateUserName(param1:String) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc2_:String = "com.huzi.base.action.UserAction.changeUserName";
|
|
super.connect(_loc2_,this.updateUserNameResult,param1);
|
|
}
|
|
|
|
private function updateUserNameResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
this.getUserData();
|
|
Utils.g_events.dispatchEvent(new DevEvent(DevEvent.UPDATEUSERNAME));
|
|
}
|
|
|
|
public function moveCastle() : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.moveCastleNol";
|
|
super.connect(_loc1_,this.moveCastleResult);
|
|
}
|
|
|
|
private function moveCastleResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLEMOVE));
|
|
}
|
|
|
|
public function recoveryBattleInfo() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.removeNoBattle";
|
|
super.connect(_loc1_,this.recoveryBattleInfoResult);
|
|
}
|
|
|
|
private function recoveryBattleInfoResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_recoveryBattleInfo);
|
|
_loc3_.castleObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function getBuffTipListById() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getBuffTipListById";
|
|
super.connect(_loc1_,this.getBuffTipListByIdResult);
|
|
}
|
|
|
|
private function getBuffTipListByIdResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getBuffTipListById);
|
|
_loc3_.castleList = _loc2_.returnList1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function getOnlineTimeAward() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getOnlineTimeAward";
|
|
super.connect(_loc1_,this.getOnlineTimeAwardResult);
|
|
}
|
|
|
|
private function getOnlineTimeAwardResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getOnlineTimeAward);
|
|
_loc3_.castleObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function fetchOnlineTimeAward(param1:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.fetchOnlineTimeAward";
|
|
super.connect(_loc2_,this.fetchOnlineTimeAwardResult,param1);
|
|
}
|
|
|
|
private function fetchOnlineTimeAwardResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_fetchOnlineTimeAward);
|
|
_loc3_.castleObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
PakState.setGetPackListStatus();
|
|
}
|
|
|
|
public function changeCountryView() : void
|
|
{
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.changeCountryView";
|
|
super.connect(_loc1_,this.changeCountryViewResult);
|
|
}
|
|
|
|
private function changeCountryViewResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_changeCountryView);
|
|
_loc3_.castleObj = _loc2_.returnObj1;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function changeCountry(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.changeCountry";
|
|
super.connect(_loc2_,this.changeCountryResult,param1);
|
|
}
|
|
|
|
private function changeCountryResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_changeCountry);
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function fullAll(param1:String) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.flushAllp";
|
|
super.connect(_loc2_,this.fullAllResult,param1);
|
|
}
|
|
|
|
private function fullAllResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
public function changeCurrCity(param1:int) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.develop.action.CastleAction.changeCurrCity";
|
|
super.connect(_loc2_,this.changeCurrCityResult,param1);
|
|
}
|
|
|
|
private function changeCurrCityResult(param1:Object) : void
|
|
{
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
public function getSuggestPos() : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc1_:String = "com.huzi.develop.action.CastleAction.getSuggestPos";
|
|
super.connect(_loc1_,this.getSuggestPosResult);
|
|
}
|
|
|
|
private function getSuggestPosResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getSuggestPos);
|
|
_loc3_.msg = _loc2_.msg;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function reBuildCastle(param1:int, param2:int) : void
|
|
{
|
|
LoadingMc.getInstance().show();
|
|
var _loc3_:String = "com.huzi.develop.action.CastleAction.reBuildCastle";
|
|
super.connect(_loc3_,this.reBuildCastleResult,param1,param2);
|
|
}
|
|
|
|
private function reBuildCastleResult(param1:Object) : void
|
|
{
|
|
LoadingMc.getInstance().unShow();
|
|
var _loc2_:ReturnBean = param1 as ReturnBean;
|
|
if(checkResult(_loc2_))
|
|
{
|
|
return;
|
|
}
|
|
var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_reBuildCastle);
|
|
_loc3_.msg = _loc2_.msg;
|
|
_loc3_.result = _loc2_.result;
|
|
super.dispatchEvent(_loc3_);
|
|
}
|
|
|
|
public function testSkill(param1:Array) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.hero.action.HeroAction.insertNewSkillList";
|
|
super.connect(_loc2_,this.testSkillResult,param1);
|
|
}
|
|
|
|
private function testSkillResult(param1:Object) : void
|
|
{
|
|
}
|
|
|
|
public function testEquip(param1:Array) : void
|
|
{
|
|
var _loc2_:String = "com.huzi.item.action.ItemAction.insertNewItems";
|
|
super.connect(_loc2_,this.testEquipResult,param1);
|
|
}
|
|
|
|
private function testEquipResult(param1:Object) : void
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|