();
+
+ private var tdNums:int;
+
+ private var trNums:int;
+
+ private var _width:int;
+
+ private var _height:int;
+
+ public function UITable()
+ {
+ super();
+ }
+
+ public function setLineColor(param1:uint) : void
+ {
+ this.borderColor1 = param1;
+ }
+
+ public function install(param1:int, param2:Array, param3:Array) : void
+ {
+ var _loc4_:Object = null;
+ var _loc5_:Sprite = null;
+ var _loc6_:int = 0;
+ var _loc7_:Sprite = null;
+ var _loc9_:TextField = null;
+ var _loc12_:Sprite = null;
+ var _loc13_:Sprite = null;
+ var _loc14_:TextField = null;
+ this.tdNums = param3.length;
+ this.trNums = param1;
+ this._width = 0;
+ for each(_loc4_ in param3)
+ {
+ this._width += int(_loc4_);
+ }
+ this._height = param1 * this.lineHeight + 24;
+ _loc5_ = new Scale9Grid(face.getSprite(UIConfig.thirdPanel_skin),this._width - 13,this._height - 8);
+ addChild(_loc5_);
+ if(!this.drawLine)
+ {
+ this.trNums = 1;
+ }
+ _loc6_ = 0;
+ while(_loc6_ < this.trNums)
+ {
+ _loc12_ = PublicMethod.getTrLine(this._width - 14,this.borderColor1,this.borderColor2);
+ _loc5_.addChild(_loc12_);
+ _loc12_.x = 5;
+ _loc12_.y = 25 + _loc6_ * this.lineHeight;
+ _loc6_++;
+ }
+ var _loc8_:int = 0;
+ while(_loc8_ < this.tdNums - 1)
+ {
+ _loc13_ = PublicMethod.getTdLine(this._height - 6);
+ _loc5_.addChild(_loc13_);
+ if(_loc8_ > 0)
+ {
+ _loc13_.x = _loc7_.x + param3[_loc8_];
+ }
+ else
+ {
+ _loc13_.x = param3[_loc8_];
+ }
+ _loc13_.y = 3;
+ _loc7_ = _loc13_;
+ _loc8_++;
+ }
+ _loc7_ = null;
+ var _loc10_:TextFormat = PublicMethod.getCenterTextFormat();
+ var _loc11_:int = 0;
+ while(_loc11_ < this.tdNums)
+ {
+ _loc14_ = PublicMethod.getTextFieldWithFillter(this.borderTextColor,param3[_loc11_] - 1);
+ _loc5_.addChild(_loc14_);
+ _loc14_.defaultTextFormat = _loc10_;
+ _loc14_.text = param2[_loc11_];
+ _loc14_.y = 5;
+ if(_loc11_ > 0)
+ {
+ _loc14_.x = _loc9_.x + _loc9_.width + 1;
+ }
+ else
+ {
+ _loc14_.x = 1;
+ }
+ _loc9_ = _loc14_;
+ this.titleVec.push(_loc9_);
+ _loc11_++;
+ }
+ }
+
+ public function setTitleList(param1:Array) : void
+ {
+ var _loc2_:int = 0;
+ while(_loc2_ < this.titleVec.length)
+ {
+ this.titleVec[_loc2_].text = param1[_loc2_];
+ _loc2_++;
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/newui/UITextBtn.as b/flash_decompiled/com/view/newui/UITextBtn.as
new file mode 100644
index 0000000..d2f8413
--- /dev/null
+++ b/flash_decompiled/com/view/newui/UITextBtn.as
@@ -0,0 +1,53 @@
+package com.view.newui
+{
+ import flash.events.MouseEvent;
+
+ public class UITextBtn extends UIBaseBtn
+ {
+
+ public function UITextBtn(param1:String, param2:Boolean = false)
+ {
+ super();
+ super.addButtonText(100);
+ if(param2)
+ {
+ setHtmlText("" + param1 + "");
+ }
+ else
+ {
+ setHtmlText(param1);
+ }
+ setTextWidth();
+ addEvent();
+ setTextPosiY(0);
+ setTextPosiX(0);
+ setButtonMode();
+ }
+
+ override public function mouseOver(param1:MouseEvent) : void
+ {
+ setTextPosiY(0);
+ setTextPosiX(0);
+ }
+
+ override public function mouseOut(param1:MouseEvent) : void
+ {
+ setTextPosiY(0);
+ setTextPosiX(0);
+ }
+
+ override public function mouseDown(param1:MouseEvent) : void
+ {
+ setTextPosiY(1);
+ setTextPosiX(1);
+ }
+
+ override public function mouseUp(param1:MouseEvent) : void
+ {
+ setTextPosiY(0);
+ setTextPosiX(0);
+ dispatchClickEvent(param1);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/newui/UITitleBg.as b/flash_decompiled/com/view/newui/UITitleBg.as
new file mode 100644
index 0000000..fb1a431
--- /dev/null
+++ b/flash_decompiled/com/view/newui/UITitleBg.as
@@ -0,0 +1,41 @@
+package com.view.newui
+{
+ import com.common.PublicGlow;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.Sprite;
+ import flash.text.TextField;
+
+ public class UITitleBg extends UIBase
+ {
+
+ private var titleText:TextField;
+
+ public function UITitleBg(param1:String, param2:int)
+ {
+ var _loc3_:Sprite = null;
+ super();
+ if(param2 < 230)
+ {
+ _loc3_ = new Scale9Grid(face.getSprite(UIConfig.titleBg_small),param2 - 81,11);
+ }
+ else
+ {
+ _loc3_ = new Scale9Grid(face.getSprite(UIConfig.titleBg),param2 - 162,11);
+ }
+ addChild(_loc3_);
+ this.titleText = PublicMethod.getTextFieldWithFillter(16245593,_loc3_.width);
+ this.titleText.defaultTextFormat = PublicMethod.getCenterTextFormat();
+ addChild(this.titleText);
+ this.titleText.htmlText = param1;
+ this.titleText.filters = [PublicGlow.getInstance().blackGlow];
+ this.titleText.y = 3;
+ }
+
+ public function setTitleName(param1:String) : void
+ {
+ this.titleText.htmlText = param1;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/newui/UITitleConfig.as b/flash_decompiled/com/view/newui/UITitleConfig.as
new file mode 100644
index 0000000..2f45436
--- /dev/null
+++ b/flash_decompiled/com/view/newui/UITitleConfig.as
@@ -0,0 +1,554 @@
+package com.view.newui
+{
+ public class UITitleConfig
+ {
+
+ public static var title_piliangqianghua:String = "piliangqianghua";
+
+ public static var title_dengluxinxi:String = "dengruxinxi";
+
+ public static var title_gengxingonggao:String = "gengxingonggao";
+
+ public static var title_guojia:String = "guojia";
+
+ public static var title_shangcheng:String = "shangcheng";
+
+ public static var title_beibao:String = "beibao";
+
+ public static var title_paihangbang:String = "paihangbang";
+
+ public static var title_youjian:String = "youjian";
+
+ public static var title_haoyou:String = "haoyou";
+
+ public static var title_haoyouyinxiang:String = "haoyouyinxiang";
+
+ public static var title_junqing:String = "junqing";
+
+ public static var title_bangzhu:String = "bangzhu";
+
+ public static var title_shenqingxiaoxi:String = "shenqingxiaoxi";
+
+ public static var title_kuaijiegoumai:String = "kuaijiegoumai";
+
+ public static var title_junzhu:String = "junzhu";
+
+ public static var title_lianmeng:String = "lianmeng";
+
+ public static var title_renwu:String = "renwu";
+
+ public static var title_wujiang:String = "wujiang";
+
+ public static var title_chuzheng:String = "chuzheng";
+
+ public static var title_tongbingpeizhi:String = "tongbingpeizhi";
+
+ public static var title_wodenongchang:String = "wodenongchang";
+
+ public static var title_zhuanhuanguojia:String = "zhuanhuanguojia";
+
+ public static var title_junzhucelue:String = "junzhucelue";
+
+ public static var title_shiyongdaoju:String = "shiyongdaoju";
+
+ public static var title_xuanzhehead:String = "xuanzhehead";
+
+ public static var title_piliangshiyong:String = "piliangshiyong";
+
+ public static var title_wujiangxiangqing:String = "wujiangxiangqing";
+
+ public static var title_junzhuxinxi:String = "junzhuxinxi";
+
+ public static var title_guojunshanrang:String = "guojunshanrang";
+
+ public static var title_xuanzhehero:String = "xuanzhehero";
+
+ public static var title_xitongxinxi:String = "xitongxinxi";
+
+ public static var title_xuanzhemubiao:String = "xuanzhemubiao";
+
+ public static var title_guojunlaba:String = "guojunlaba";
+
+ public static var title_renshirenmian:String = "renshirenmian";
+
+ public static var title_minju:String = "minju";
+
+ public static var title_waishiyuan:String = "waishiyuan";
+
+ public static var title_guanfu:String = "guanfu";
+
+ public static var title_chengqiang:String = "chengqiang";
+
+ public static var title_cangku:String = "cangku";
+
+ public static var title_shichang:String = "shichang";
+
+ public static var title_chengchixuanzhe:String = "chengchixuanzhe";
+
+ public static var title_jiuguan:String = "jiuguan";
+
+ public static var title_junying:String = "junying";
+
+ public static var title_xiulianguan:String = "xiulianguan";
+
+ public static var title_yiguan:String = "yiguan";
+
+ public static var title_shuyuan:String = "shuyuan";
+
+ public static var title_tiejiangpu:String = "tiejiangpu";
+
+ public static var title_yaoqingjiaru:String = "yaoqingjiaru";
+
+ public static var title_guojiajinyan:String = "guojiajinyan";
+
+ public static var title_wujiangxiulian:String = "wujiangxiulian";
+
+ public static var title_shibingcaozuo:String = "shibingcaozuo";
+
+ public static var title_chushoudaoju:String = "chushoudaoju";
+
+ public static var title_goumaidaoju:String = "goumaidaoju";
+
+ public static var title_pilianghecheng:String = "pilianghecheng";
+
+ public static var title_xuanzhebaoshi:String = "xuanzhebaoshi";
+
+ public static var title_lianmengshengji:String = "lianmengshengji";
+
+ public static var title_mengzhushanrang:String = "mengzhushanrang";
+
+ public static var title_lianmengchengyuan:String = "lianmengchengyuan";
+
+ public static var title_lianmengjuanxian:String = "lianmengjuanxian";
+
+ public static var title_lianmengjianjie:String = "lianmengjianjie";
+
+ public static var title_lianmenggonggao:String = "lianmenggonggao";
+
+ public static var title_jiesanlianmeng:String = "jiesanlianmeng";
+
+ public static var title_pizhuanshenqing:String = "pizhuanshenqing";
+
+ public static var title_lianmengshijian:String = "lianmengshijian";
+
+ public static var title_lianmenghebing:String = "lianmenghebing";
+
+ public static var title_lianmengliebiao:String = "lianmengliebiao";
+
+ public static var title_lianmengxinxi:String = "lianmengxinxi";
+
+ public static var title_chengyuanxinxi:String = "chengyuanxinxi";
+
+ public static var title_paimaidaoju:String = "paimaidaoju";
+
+ public static var title_tiaozhanxiongnu:String = "tiaozhanxiongnu";
+
+ public static var title_shejizongmiao:String = "shejizongmiao";
+
+ public static var title_qianggongying:String = "qianggongying";
+
+ public static var title_taixueyuan:String = "taixueyuan";
+
+ public static var title_zhongbulv:String = "zhongbulv";
+
+ public static var title_juchejun:String = "juchejun";
+
+ public static var title_baiqiaoge:String = "baiqiaoge";
+
+ public static var title_feihutuan:String = "feihutuan";
+
+ public static var title_chengchixinxi:String = "chengchixinxi";
+
+ public static var title_chengchixuanze:String = "chengchixuanzhe";
+
+ public static var title_xingying:String = "xingying";
+
+ public static var title_situshu:String = "situshu";
+
+ public static var title_liandanlu:String = "liandanlu";
+
+ public static var title_caolianchang:String = "caolianchang";
+
+ public static var title_shaota:String = "shaota";
+
+ public static var title_simashu:String = "simashu";
+
+ public static var title_jiaolou:String = "jiaolou";
+
+ public static var title_dijiao:String = "dijiao";
+
+ public static var title_gongfang:String = "gongfang";
+
+ public static var title_jitan:String = "jitan";
+
+ public static var title_junduixiangqing:String = "junduixiangqing";
+
+ public static var title_tianminghebi:String = "tianminghebi";
+
+ public static var title_baizhanqianjun:String = "baizhanqianjun";
+
+ public static var title_babel_1:String = "babel_1";
+
+ public static var title_zenjiajungong:String = "zenjiajungong";
+
+ public static var title_shiju:String = "shiju";
+
+ public static var title_babel_2:String = "babel_2";
+
+ public static var title_babel_3:String = "babel_3";
+
+ public static var title_babel_4:String = "babel_4";
+
+ public static var title_babel_5:String = "babel_5";
+
+ public static var title_babel_6:String = "babel_6";
+
+ public static var title_babel_7:String = "babel_7";
+
+ public static var title_babel_8:String = "babel_8";
+
+ public static var title_babel_9:String = "babel_9";
+
+ public static var title_babel_10:String = "babel_10";
+
+ public static var title_saodang:String = "saodang";
+
+ public static var title_tiaojianshezhi:String = "tiaojianshezhi";
+
+ public static var title_zenjiajingyan:String = "zenjiajingyan";
+
+ public static var title_bencijiangli:String = "bencijiangli";
+
+ public static var title_shuangbeidiaoluo:String = "shuangbeidiaoluo";
+
+ public static var title_zenjiahuifu:String = "zenjiahuifu";
+
+ public static var title_huangjintai:String = "huangjintai";
+
+ public static var title_lingtingchuandao:String = "lingtingchuandao";
+
+ public static var title_dianjiangtai:String = "dianjiangtai";
+
+ public static var title_guoguanzhanjiang:String = "guoguanzhanjiang";
+
+ public static var title_zhandoufuyin:String = "zhandoufuyin";
+
+ public static var title_junshi:String = "junshi";
+
+ public static var title_xunbaozhuanpan:String = "xunbaozhuanpan";
+
+ public static var title_tianchonghuoli:String = "tianchonghuoli";
+
+ public static var title_duihuanliebiao:String = "duihuanliebiao";
+
+ public static var title_xiugaiqianming:String = "xiugaiqianming";
+
+ public static var title_diaoyudao:String = "diaoyudao";
+
+ public static var title_wodeyulou:String = "wodeyulou";
+
+ public static var title_duihuanjieguo:String = "duihuanjieguo";
+
+ public static var title_xitongdaohang:String = "xitongdaohang";
+
+ public static var title_mingjiangxitong:String = "mingjiangxitong";
+
+ public static var title_meirenxitong:String = "meirenxitong";
+
+ public static var title_jingyanfenpei:String = "jingyanfenpei";
+
+ public static var title_cangbaoge:String = "cangbaoge";
+
+ public static var title_fenpeishuxing:String = "fenpeishuxing";
+
+ public static var title_xidian:String = "xidian";
+
+ public static var title_xieyueshandao:String = "xieyueshandao";
+
+ public static var title_liushuangshandao:String = "liushuangshandao";
+
+ public static var title_qingyunshandao:String = "qingyunshandao";
+
+ public static var title_suixiangxia:String = "suixiangxia";
+
+ public static var title_zhenlongxiaojing:String = "zhenlongxiaojing";
+
+ public static var title_wuyoushanzhuang:String = "wuyoushanzhuang";
+
+ public static var title_wolongshanzhuang:String = "wolongshanzhuang";
+
+ public static var title_zhenzhuquan:String = "zhenzhuquan";
+
+ public static var title_canzhan:String = "canzhan";
+
+ public static var title_shengongque:String = "shengongque";
+
+ public static var title_mogongque:String = "mogongque";
+
+ public static var title_chongzhilibao:String = "chongzhilibao";
+
+ public static var title_chengchichongjian:String = "chengchichongjian";
+
+ public static var title_goumailibao:String = "goumailibao";
+
+ public static var title_xinjiantequ:String = "xinjiantequ";
+
+ public static var title_chongzhi:String = "chongzhi";
+
+ public static var title_rongyuchenghao:String = "rongyuchenghao";
+
+ public static var title_shenjiang:String = "shenjiang";
+
+ public static var title_zhandoujieguo:String = "zhandoujieguo";
+
+ public static var title_jianzhaoliebiao:String = "jianzhaoliebiao";
+
+ public static var title_junchengbaoming:String = "junchengbaoming";
+
+ public static var title_wujianggaiming:String = "wujianggaiming";
+
+ public static var title_nongchangdongtai:String = "nongchangdongtai";
+
+ public static var title_nongchangguize:String = "nongchangguize";
+
+ public static var title_zhendianxiangqing:String = "zhendianxiangqing";
+
+ public static var title_fangshouzhe:String = "fangshouzhe";
+
+ public static var title_mibaochongzhu:String = "mibaochongzhu";
+
+ public static var title_goumaigaoyao:String = "goumaigaoyao";
+
+ public static var title_chengchizhuanhuan:String = "chengchizhuanhuan";
+
+ public static var title_quanfuguangbo:String = "quanfuguangbo";
+
+ public static var title_junzhugaiming:String = "junzhugaiming";
+
+ public static var title_zhanbao:String = "zhanbao";
+
+ public static var title_putongqiancheng:String = "putongqiancheng";
+
+ public static var title_gaojiqiancheng:String = "gaojiqiancheng";
+
+ public static var title_wujiangjinfeng:String = "wujiangjinfeng";
+
+ public static var title_libao:String = "libao";
+
+ public static var title_dantiao:String = "dantiao";
+
+ public static var title_yezhan:String = "yezhan";
+
+ public static var title_gongchengzhan:String = "gongchengzhan";
+
+ public static var title_dengjilibao:String = "dengjilibao";
+
+ public static var title_jiasu:String = "jiasu";
+
+ public static var title_lingyange:String = "lingyange";
+
+ public static var title_tianxia:String = "wendingtianxia";
+
+ public static var title_crossrank:String = "title_crossrank";
+
+ public static var title_match:String = "title_match";
+
+ public static var title_jingxiang:String = "jingxiangshezhi";
+
+ public static var title_zhanqi:String = "zhanqi";
+
+ public static var title_piliangfenpei:String = "piliangfenpei";
+
+ public static var title_yabiao:String = "yabiao";
+
+ public static var title_chongzhihuodong:String = "chongzhihuodong";
+
+ public static var title_worldboss:String = "worldboss";
+
+ public static var title_gerenzhanyi:String = "title_gerenzhanyi";
+
+ public static var title_home:String = "home";
+
+ public static var title_jierilibao:String = "jierilibao";
+
+ public static var title_xunlongtanbao:String = "xunlongtanbao";
+
+ public static var title_tianshipaiju:String = "tianshipaiju";
+
+ public static var title_ask:String = "title_ask";
+
+ public static var title_homecreate:String = "title_homecreate";
+
+ public static var title_xiangfang:String = "title_xiangfang";
+
+ public static var title_babel:String = "babel";
+
+ public static var title_fudi:String = "title_fudi";
+
+ public static var title_sishu:String = "title_sishu";
+
+ public static var title_shiji:String = "title_shiji";
+
+ public static var title_homeanme:String = "title_homeanme";
+
+ public static var title_shinv:String = "title_shinv";
+
+ public static var title_huwei:String = "title_huwei";
+
+ public static var title_shutong:String = "title_shutong";
+
+ public static var title_sir:String = "title_sir";
+
+ public static var title_guanjia:String = "title_guanjia";
+
+ public static var title_gun:String = "title_gun";
+
+ public static var title_babel_desc:String = "babel_desc";
+
+ public static var title_babel_desc_1:String = "babel_desc_1";
+
+ public static var title_babel_desc_2:String = "babel_desc_2";
+
+ public static var title_babel_desc_3:String = "babel_desc_3";
+
+ public static var title_babel_desc_4:String = "babel_desc_4";
+
+ public static var title_babel_desc_5:String = "babel_desc_5";
+
+ public static var title_babel_desc_6:String = "babel_desc_6";
+
+ public static var title_babel_desc_7:String = "babel_desc_7";
+
+ public static var title_babel_desc_8:String = "babel_desc_8";
+
+ public static var title_babel_desc_9:String = "babel_desc_9";
+
+ public static var title_babel_desc_10:String = "babel_desc_10";
+
+ public static var title_babel_desc_11:String = "babel_desc_11";
+
+ public static var title_babel_desc_12:String = "babel_desc_12";
+
+ public static var title_babel_desc_13:String = "babel_desc_13";
+
+ public static var title_babel_desc_14:String = "babel_desc_14";
+
+ public static var title_babel_desc_15:String = "babel_desc_15";
+
+ public static var title_babel_more:String = "babelmore";
+
+ public static var title_babel_more_1:String = "babelmore_1";
+
+ public static var title_babel_more_2:String = "babelmore_2";
+
+ public static var title_babel_more_3:String = "babelmore_3";
+
+ public static var title_babel_more_4:String = "babelmore_4";
+
+ public static var title_babel_more_5:String = "babelmore_5";
+
+ public static var title_babel_more_6:String = "babelmore_6";
+
+ public static var title_babel_more_7:String = "babelmore_7";
+
+ public static var title_babel_more_8:String = "babelmore_8";
+
+ public static var title_babel_gold:String = "babelgold";
+
+ public static var title_babel_gold_1:String = "babelgold1";
+
+ public static var title_babel_gold_2:String = "babelgold2";
+
+ public static var title_babel_gold_3:String = "babelgold3";
+
+ public static var title_babel_gold_4:String = "babelgold4";
+
+ public static var title_babel_gold_5:String = "babelgold5";
+
+ public static var title_babel_gold_6:String = "babelgold6";
+
+ public static var title_babel_gold_7:String = "babelgold7";
+
+ public static var title_babel_gold_8:String = "babelgold8";
+
+ public static var title_babel_gold_9:String = "babelgold9";
+
+ public static var title_babel_gold_10:String = "babelgold10";
+
+ public static var title_babel_gold_11:String = "babelgold11";
+
+ public static var title_babel_gold_12:String = "babelgold12";
+
+ public static var title_kuangchang:String = "kuangchang";
+
+ public static var title_mineinfo:String = "title_mineinfo";
+
+ public static var title_shenmibaoxiang:String = "title_shenmibaoxiang";
+
+ public static var title_danjianglou:String = "title_danjianglou";
+
+ public static var title_babeldrop:String = "title_babeldrop";
+
+ public static var title_coinshop:String = "title_coinshop";
+
+ public static var title_fenqu:String = "title_fenqu";
+
+ public static var title_babel_last:String = "babellast";
+
+ public static var title_babel_last_1:String = "babellast1";
+
+ public static var title_babel_last_2:String = "babellast2";
+
+ public static var title_babel_last_3:String = "babellast3";
+
+ public static var title_babel_last_4:String = "babellast4";
+
+ public static var title_babel_last_5:String = "babellast5";
+
+ public static var title_babel_last_6:String = "babellast6";
+
+ public static var title_babel_last_7:String = "babellast7";
+
+ public static var title_babel_last_8:String = "babellast8";
+
+ public static var title_babel_last_9:String = "babellast9";
+
+ public static var title_babel_last_10:String = "babellast10";
+
+ public static var title_babel_last_11:String = "babellast11";
+
+ public static var title_babel_last_12:String = "babellast12";
+
+ public static var title_babel6:String = "babel_7";
+
+ public static var title_babel_6_1:String = "babel_6_1";
+
+ public static var title_babel_6_2:String = "babel_6_2";
+
+ public static var title_babel_6_3:String = "babel_6_3";
+
+ public static var title_babel_6_4:String = "babel_6_4";
+
+ public static var title_babel_6_5:String = "babel_6_5";
+
+ public static var title_babel_6_6:String = "babel_6_6";
+
+ public static var title_babel_6_7:String = "babel_6_7";
+
+ public static var title_babel_6_8:String = "babel_6_8";
+
+ public static var title_babel_6_9:String = "babel_6_9";
+
+ public static var title_babel_6_10:String = "babel_6_10";
+
+ public static var title_babel_6_11:String = "babel_6_11";
+
+ public static var title_babel_6_12:String = "babel_6_12";
+
+ public function UITitleConfig()
+ {
+ super();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/newui/UIWindowBg.as b/flash_decompiled/com/view/newui/UIWindowBg.as
new file mode 100644
index 0000000..b3774fe
--- /dev/null
+++ b/flash_decompiled/com/view/newui/UIWindowBg.as
@@ -0,0 +1,119 @@
+package com.view.newui
+{
+ import com.common.LoadResource;
+ import com.common.Scale9Grid;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class UIWindowBg extends UIBase
+ {
+
+ public static var normal_window_w:int = 440;
+
+ public static var normal_window_h:int = 380;
+
+ private var firstPanel_skin:Sprite;
+
+ private var secondPanel_skin:Sprite;
+
+ private var thirdPanel_skin:Sprite;
+
+ private var bg:Sprite;
+
+ private var titleload:LoadResource;
+
+ private var pic:Bitmap;
+
+ public var closeBtn:UICloseBtn;
+
+ public var bg1:UIWindowBg;
+
+ public function UIWindowBg()
+ {
+ super();
+ }
+
+ public function initSize(param1:int, param2:int) : void
+ {
+ this.firstPanel_skin = face.getSprite(UIConfig.firstPanel_skin);
+ this.bg = new Scale9Grid(this.firstPanel_skin,param1,param2);
+ addChild(this.bg);
+ }
+
+ public function loadTitle(param1:String) : void
+ {
+ var _loc2_:String = "pic/title/" + param1;
+ this.titleload = new LoadResource(_loc2_ + ".png",this.loadTitleBack);
+ }
+
+ private function loadTitleBack(param1:Event) : void
+ {
+ if(Boolean(this.pic) && contains(this.pic))
+ {
+ removeChild(this.pic);
+ }
+ this.pic = Bitmap(param1.target.loader.content);
+ this.titleload.clear();
+ addChild(this.pic);
+ this.pic.x = int(this.bg.width / 2 - this.pic.width / 2);
+ this.pic.y = 4;
+ }
+
+ public function initSecondPanel(param1:int, param2:int) : void
+ {
+ this.secondPanel_skin = face.getSprite(UIConfig.secondPanel_skin);
+ this.bg = new Scale9Grid(this.secondPanel_skin,param1,param2);
+ addChild(this.bg);
+ }
+
+ public function initThirdPanel(param1:int, param2:int) : void
+ {
+ this.thirdPanel_skin = face.getSprite(UIConfig.thirdPanel_skin);
+ this.bg = new Scale9Grid(this.thirdPanel_skin,param1,param2);
+ addChild(this.bg);
+ }
+
+ public function addCloseBtn() : void
+ {
+ this.closeBtn = new UICloseBtn();
+ addChild(this.closeBtn);
+ this.closeBtn.onClick = this.closeSelf;
+ this.setCloseBtnPosi();
+ }
+
+ public function setCloseBtnPosi() : void
+ {
+ this.closeBtn.x = this.bg.width - 5 - this.closeBtn.width;
+ this.closeBtn.y = 10;
+ }
+
+ public function closeSelf(param1:MouseEvent) : void
+ {
+ if(Boolean(parent) && parent.contains(this))
+ {
+ parent.removeChild(this);
+ }
+ }
+
+ public function initBg() : void
+ {
+ this.bg1 = new UIWindowBg();
+ this.bg1.initThirdPanel(this.bg.width - 33,this.bg.height - 59);
+ this.bg.addChild(this.bg1);
+ this.bg1.x = 11;
+ this.bg1.y = 39;
+ }
+
+ public function initBg1() : void
+ {
+ this.bg1 = new UIWindowBg();
+ this.bg1.initSecondPanel(this.bg.width - 33,this.bg.height - 59);
+ this.bg.addChild(this.bg1);
+ this.bg1.x = 11;
+ this.bg1.y = 39;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/res/GameUIRes.as b/flash_decompiled/com/view/res/GameUIRes.as
new file mode 100644
index 0000000..e98eb94
--- /dev/null
+++ b/flash_decompiled/com/view/res/GameUIRes.as
@@ -0,0 +1,150 @@
+package com.view.res
+{
+ import com.common.App;
+ import flash.display.Bitmap;
+ import flash.display.BitmapData;
+ import flash.display.MovieClip;
+ import flash.display.SimpleButton;
+ import flash.display.Sprite;
+ import flash.system.ApplicationDomain;
+ import flash.utils.Dictionary;
+
+ public class GameUIRes
+ {
+
+ private static var instance:GameUIRes;
+
+ public static var swfUrl_1:String = "resource/gift.swf";
+
+ public static var swfUrl_2:String = "resource/risk.swf";
+
+ public static var swfUrl_3:String = "resource/match.swf";
+
+ public static var swfUrl_4:String = "resource/home.swf";
+
+ public static var swfUrl_5:String = "resource/mine.swf";
+
+ private var _guildInfo:ApplicationDomain;
+
+ private var _provinceInfo:ApplicationDomain;
+
+ private var _fishInfo:ApplicationDomain;
+
+ private var _1:ApplicationDomain;
+
+ private var appDic:Dictionary = new Dictionary();
+
+ public function GameUIRes()
+ {
+ super();
+ if(instance != null)
+ {
+ throw new Error("错误,单例,无法创建新的实例");
+ }
+ }
+
+ public static function getInstance() : GameUIRes
+ {
+ if(instance == null)
+ {
+ instance = new GameUIRes();
+ }
+ return instance;
+ }
+
+ public function setGuildInfo(param1:ApplicationDomain) : void
+ {
+ this._guildInfo = param1;
+ }
+
+ public function getGuildInfo() : ApplicationDomain
+ {
+ return this._guildInfo;
+ }
+
+ public function setApplication(param1:ApplicationDomain, param2:String) : void
+ {
+ this.appDic[param2] = param1;
+ }
+
+ public function getApplication(param1:String) : ApplicationDomain
+ {
+ return this.appDic[param1];
+ }
+
+ public function getSprite(param1:String, param2:ApplicationDomain) : Sprite
+ {
+ var _loc3_:Sprite = null;
+ _loc3_ = App.createSprite(param1,param2);
+ if(_loc3_ == null)
+ {
+ _loc3_ = null;
+ }
+ return _loc3_;
+ }
+
+ private function createClip(param1:String, param2:ApplicationDomain) : MovieClip
+ {
+ var _loc3_:MovieClip = null;
+ _loc3_ = App.createMc(param1,param2);
+ if(_loc3_ == null)
+ {
+ _loc3_ = null;
+ }
+ return _loc3_;
+ }
+
+ public function getMovieClip(param1:String, param2:ApplicationDomain) : MovieClip
+ {
+ return this.createClip(param1,param2);
+ }
+
+ public function getPng(param1:String, param2:ApplicationDomain) : BitmapData
+ {
+ var _loc3_:BitmapData = null;
+ _loc3_ = App.createPng(param1,param2);
+ if(_loc3_ == null)
+ {
+ _loc3_ = null;
+ }
+ return _loc3_;
+ }
+
+ public function getButton(param1:String, param2:ApplicationDomain) : SimpleButton
+ {
+ var _loc3_:SimpleButton = null;
+ _loc3_ = App.createButton(param1,param2);
+ if(_loc3_ == null)
+ {
+ _loc3_ = null;
+ }
+ return _loc3_;
+ }
+
+ public function getBitMap(param1:String, param2:ApplicationDomain) : Bitmap
+ {
+ return new Bitmap(this.getPng(param1,param2));
+ }
+
+ public function get provinceInfo() : ApplicationDomain
+ {
+ return this._provinceInfo;
+ }
+
+ public function set provinceInfo(param1:ApplicationDomain) : void
+ {
+ this._provinceInfo = param1;
+ }
+
+ public function get fishInfo() : ApplicationDomain
+ {
+ return this._fishInfo;
+ }
+
+ public function set fishInfo(param1:ApplicationDomain) : void
+ {
+ this._fishInfo = param1;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/BuildTipTitle.as b/flash_decompiled/com/view/tip/BuildTipTitle.as
new file mode 100644
index 0000000..16268d8
--- /dev/null
+++ b/flash_decompiled/com/view/tip/BuildTipTitle.as
@@ -0,0 +1,215 @@
+package com.view.tip
+{
+ import com.common.Scale9Grid;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BuildTipTitle
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var bg:Sprite;
+
+ private var title_txt:TextField;
+
+ private var contet_txt:TextField;
+
+ private var ias:Object;
+
+ private var _range:Stage;
+
+ private var _displayObject:DisplayObject;
+
+ private var _view:Boolean;
+
+ private var _bgSprite:Sprite;
+
+ private var _table_bg:Sprite;
+
+ private var css_title:TextFormat;
+
+ public function BuildTipTitle(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object)
+ {
+ super();
+ this._view = false;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.ias = param4;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ public function set infoObject(param1:Object) : void
+ {
+ if(this.contet_txt.visible == false)
+ {
+ this._Container.removeChild(this.contet_txt);
+ this._Container.removeChild(this.title_txt);
+ this.contet_txt = new TextField();
+ this.contet_txt.height = 18;
+ this.contet_txt.mouseEnabled = false;
+ this.contet_txt.textColor = 16777215;
+ this.contet_txt.autoSize = "center";
+ this.title_txt = new TextField();
+ this.title_txt.height = 18;
+ this.title_txt.width = this.contet_txt.width;
+ this.title_txt.mouseEnabled = false;
+ this.title_txt.textColor = 16776960;
+ this.title_txt.setTextFormat(this.css_title);
+ this._Container.addChild(this.title_txt);
+ this._Container.addChild(this.contet_txt);
+ this.title_txt.x = 10;
+ this.title_txt.y = 6;
+ this.contet_txt.x = this.title_txt.x;
+ this.contet_txt.y = this.title_txt.y + this.title_txt.height;
+ }
+ if(param1.content)
+ {
+ this.contet_txt.text = param1.content;
+ }
+ this.title_txt.text = param1.title;
+ this.title_txt.width = this.contet_txt.width;
+ this.title_txt.setTextFormat(this.css_title);
+ this.contet_txt.x = this.title_txt.x;
+ this.contet_txt.textColor = param1.contentColor;
+ if(this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this._table_bg = new Scale9Grid(this._bgSprite,this.contet_txt.width,38);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function init() : void
+ {
+ var _loc1_:uint = 0;
+ var _loc2_:String = null;
+ var _loc3_:uint = 0;
+ var _loc4_:String = null;
+ if(this.ias.titleColor == undefined)
+ {
+ _loc1_ = 16777215;
+ }
+ else
+ {
+ _loc1_ = uint(this.ias.titleColor);
+ }
+ if(this.ias.title == undefined)
+ {
+ _loc2_ = "";
+ }
+ else
+ {
+ _loc2_ = this.ias.title;
+ }
+ if(this.ias.contentColor == undefined)
+ {
+ _loc3_ = 16777215;
+ }
+ else
+ {
+ _loc3_ = uint(this.ias.contentColor);
+ }
+ if(this.ias.content == undefined)
+ {
+ _loc4_ = "";
+ }
+ else
+ {
+ _loc4_ = this.ias.content;
+ }
+ this.css_title = new TextFormat();
+ this.css_title.size = 12;
+ this.css_title.bold = true;
+ this.css_title.align = "center";
+ this.contet_txt = new TextField();
+ this.contet_txt.height = 18;
+ this.contet_txt.mouseEnabled = false;
+ this.contet_txt.textColor = _loc3_;
+ this.contet_txt.text = _loc4_;
+ this.contet_txt.autoSize = "center";
+ var _loc5_:int = this.contet_txt.width;
+ if(_loc4_.length == 0)
+ {
+ _loc5_ = 70;
+ }
+ this.title_txt = new TextField();
+ this.title_txt.height = 18;
+ this.title_txt.text = _loc2_;
+ this.title_txt.width = _loc5_;
+ this.title_txt.mouseEnabled = false;
+ this.title_txt.textColor = _loc1_;
+ this.title_txt.setTextFormat(this.css_title);
+ if(_loc4_.length == 0)
+ {
+ this._table_bg = new Scale9Grid(this._bgSprite,_loc5_,20);
+ }
+ else
+ {
+ this._table_bg = new Scale9Grid(this._bgSprite,_loc5_,38);
+ }
+ this._Container.addChild(this._table_bg);
+ this._Container.addChild(this.title_txt);
+ this._Container.addChild(this.contet_txt);
+ this.title_txt.x = 10;
+ this.title_txt.y = 6;
+ this.contet_txt.x = this.title_txt.x;
+ this.contet_txt.y = this.title_txt.y + this.title_txt.height;
+ if(_loc4_.length == 0)
+ {
+ this.contet_txt.visible = false;
+ this.contet_txt.y = this.title_txt.y;
+ }
+ }
+
+ private function createText() : void
+ {
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._view = true;
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._view)
+ {
+ this._range.removeChild(this._Container);
+ this._view = false;
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/BuildUpTip.as b/flash_decompiled/com/view/tip/BuildUpTip.as
new file mode 100644
index 0000000..2fcea46
--- /dev/null
+++ b/flash_decompiled/com/view/tip/BuildUpTip.as
@@ -0,0 +1,441 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.data.MemeberShip;
+ import com.data.data.city.Building;
+ import com.data.data.city.CastleBuilding;
+ import com.data.data.city.EntityConsume;
+ import com.data.data.city.EntityLimit;
+ import com.newdata.user.NewRes;
+ import com.newdata.user.NewUserData;
+ import com.view.cache.BuildCache;
+ import flash.display.DisplayObject;
+ import flash.display.Shape;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BuildUpTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _bgSprite:Sprite;
+
+ private var _displayObject:DisplayObject;
+
+ private var _range:Stage;
+
+ private var _status:Boolean;
+
+ private var redCss:TextFormat;
+
+ private var whiteCss:TextFormat;
+
+ private var text_title:TextFormat;
+
+ private var lin_1:Shape;
+
+ private var title_txt:TextField;
+
+ private var tip_txt:TextField;
+
+ private var t_1:TextField;
+
+ private var t_2:TextField;
+
+ private var t_3:TextField;
+
+ private var build_11:TextField;
+
+ private var build_12:TextField;
+
+ private var build_13:TextField;
+
+ private var build_21:TextField;
+
+ private var build_22:TextField;
+
+ private var build_23:TextField;
+
+ private var build_31:TextField;
+
+ private var build_32:TextField;
+
+ private var build_33:TextField;
+
+ private var build_41:TextField;
+
+ private var build_42:TextField;
+
+ private var build_43:TextField;
+
+ private var res_11:TextField;
+
+ private var res_12:TextField;
+
+ private var res_13:TextField;
+
+ private var res_21:TextField;
+
+ private var res_22:TextField;
+
+ private var res_23:TextField;
+
+ private var res_31:TextField;
+
+ private var res_32:TextField;
+
+ private var res_33:TextField;
+
+ private var res_41:TextField;
+
+ private var res_42:TextField;
+
+ private var res_43:TextField;
+
+ private var lin_2:Shape;
+
+ private var time_1:TextField;
+
+ private var time_1_value:TextField;
+
+ private var time_2:TextField;
+
+ private var time_2_value:TextField;
+
+ private var _table_bg:Sprite;
+
+ private var _buildObj:Building;
+
+ private var _height:int;
+
+ public function BuildUpTip(param1:DisplayObject, param2:Stage, param3:Sprite)
+ {
+ super();
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this._status = true;
+ this.init();
+ }
+
+ private function init() : void
+ {
+ this.redCss = new TextFormat();
+ this.redCss.color = 16711680;
+ this.redCss.font = "Arial";
+ this.redCss.size = 12;
+ this.redCss.bold = false;
+ this.whiteCss = new TextFormat();
+ this.whiteCss.color = 16777215;
+ this.whiteCss.font = "Arial";
+ this.whiteCss.size = 12;
+ this.whiteCss.bold = false;
+ this.text_title = new TextFormat();
+ this.text_title.color = 16776960;
+ this.text_title.size = 14;
+ this.text_title.bold = true;
+ this.title_txt = new TextField();
+ this.title_txt.width = 320;
+ this.title_txt.height = 20;
+ this.title_txt.x = 12;
+ this.title_txt.y = 12;
+ this._Container.addChild(this.title_txt);
+ this.tip_txt = new TextField();
+ this.tip_txt.width = 305;
+ this.tip_txt.mouseEnabled = false;
+ this.tip_txt.autoSize = "left";
+ this.tip_txt.multiline = true;
+ this.tip_txt.wordWrap = true;
+ this.tip_txt.x = this.title_txt.x;
+ this.tip_txt.y = this.title_txt.height + this.title_txt.y + 5;
+ this._Container.addChild(this.tip_txt);
+ this.t_1 = PublicMethod.getTextField(16777215,100);
+ this.t_1.text = "建造条件";
+ this.t_1.x = this.title_txt.x;
+ this.t_1.y = this.tip_txt.y + this.tip_txt.height + 5;
+ this.t_2 = PublicMethod.getTextField(16777215,100);
+ this.t_2.text = "需要前提";
+ this.t_2.x = this.t_1.x + this.t_1.width;
+ this.t_2.y = this.t_1.y;
+ this.t_3 = PublicMethod.getTextField(16777215,100);
+ this.t_3.x = this.t_2.x + this.t_2.width;
+ this.t_3.y = this.t_1.y;
+ this.t_3.text = "当前前提";
+ this._Container.addChild(this.t_1);
+ this._Container.addChild(this.t_2);
+ this._Container.addChild(this.t_3);
+ this.lin_1 = PublicMethod.drawLine(0,0,300,0,16777215);
+ this._Container.addChild(this.lin_1);
+ this.lin_1.x = this.title_txt.x;
+ this.lin_1.y = this.t_1.y + this.t_1.height + 4;
+ var _loc1_:int = 1;
+ while(_loc1_ < 5)
+ {
+ this["build_" + _loc1_ + "1"] = PublicMethod.getTextField(16777215,100);
+ this["build_" + _loc1_ + "2"] = PublicMethod.getTextField(16777215,100);
+ this["build_" + _loc1_ + "3"] = PublicMethod.getTextField(16777215,100);
+ this["res_" + _loc1_ + "1"] = PublicMethod.getTextField(16777215,100);
+ this["res_" + _loc1_ + "2"] = PublicMethod.getTextField(16777215,100);
+ this["res_" + _loc1_ + "3"] = PublicMethod.getTextField(16777215,100);
+ this._Container.addChild(this["build_" + _loc1_ + "1"]);
+ this._Container.addChild(this["build_" + _loc1_ + "2"]);
+ this._Container.addChild(this["build_" + _loc1_ + "3"]);
+ this._Container.addChild(this["res_" + _loc1_ + "1"]);
+ this._Container.addChild(this["res_" + _loc1_ + "2"]);
+ this._Container.addChild(this["res_" + _loc1_ + "3"]);
+ _loc1_++;
+ }
+ this.lin_2 = PublicMethod.drawLine(0,0,300,0,16777215);
+ this._Container.addChild(this.lin_2);
+ this.lin_2.x = this.title_txt.x;
+ this.time_1 = PublicMethod.getTextField(16777215,100);
+ this.time_1.x = this.title_txt.x;
+ this.time_1.text = "原始耗时";
+ this.time_1_value = PublicMethod.getTextField(16777215,100);
+ this.time_1_value.x = this.time_1.x + this.time_1.width;
+ this.time_1_value.y = this.time_1.y;
+ this._Container.addChild(this.time_1);
+ this._Container.addChild(this.time_1_value);
+ this.time_2 = PublicMethod.getTextField(16777215,100);
+ this.time_2.text = "实际耗时";
+ this.time_2.x = this.title_txt.x;
+ this.time_2_value = PublicMethod.getTextField(16777215,100);
+ this.time_2_value.x = this.time_2.x + this.time_2.width;
+ this.time_2_value.y = this.time_2.y;
+ this._Container.addChild(this.time_2);
+ this._Container.addChild(this.time_2_value);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ public function setData(param1:Building) : void
+ {
+ var _loc2_:int = 0;
+ var _loc5_:int = 0;
+ var _loc8_:EntityLimit = null;
+ var _loc9_:CastleBuilding = null;
+ var _loc10_:EntityConsume = null;
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this._height = 0;
+ this._buildObj = param1;
+ this.title_txt.text = "升级" + this._buildObj.buiName + "到" + (this._buildObj.level + 1) + "级";
+ this.title_txt.setTextFormat(this.text_title);
+ this._height = this.title_txt.y + this.title_txt.height;
+ this.tip_txt.text = this._buildObj.buiDesc;
+ this.tip_txt.setTextFormat(this.whiteCss);
+ this._height = this._height + this.tip_txt.textHeight + 8;
+ this.t_1.y = this._height;
+ this.t_2.y = this.t_1.y;
+ this.t_3.y = this.t_1.y;
+ this._height = this._height + this.t_1.height + 4;
+ this.lin_1.y = this._height;
+ this._height += 4;
+ var _loc3_:int = 1;
+ while(_loc3_ < 5)
+ {
+ _loc8_ = this._buildObj.entityLimitList[_loc3_ - 1] as EntityLimit;
+ if(_loc8_ != null)
+ {
+ this["build_" + _loc3_ + "1"].text = "前提建筑";
+ this["build_" + _loc3_ + "2"].text = _loc8_.needEntName + "(等级" + _loc8_.needLevel + ")";
+ if(_loc8_.needEntId == 90000004)
+ {
+ _loc2_ = MemeberShip.getMainCastle().casLv;
+ this["build_" + _loc3_ + "3"].text = MemeberShip.getMainCastle().casLv + "";
+ }
+ else
+ {
+ _loc9_ = BuildCache.getInstance().getCastleBuildingByEntid(InstallFace.getInstance().currCasId,_loc8_.needEntId);
+ if(_loc9_)
+ {
+ _loc2_ = _loc9_.level;
+ this["build_" + _loc3_ + "3"].text = _loc9_.level + "";
+ }
+ else
+ {
+ this["build_" + _loc3_ + "3"].text = "0";
+ }
+ }
+ this["build_" + _loc3_ + "1"].x = this.title_txt.x;
+ this["build_" + _loc3_ + "2"].x = this["build_" + _loc3_ + "1"].x + this["build_" + _loc3_ + "1"].width;
+ this["build_" + _loc3_ + "3"].x = this["build_" + _loc3_ + "2"].x + this["build_" + _loc3_ + "2"].width;
+ this["build_" + _loc3_ + "1"].y = this._height;
+ this["build_" + _loc3_ + "2"].y = this._height;
+ this["build_" + _loc3_ + "3"].y = this._height;
+ if(_loc2_ < _loc8_.needLevel)
+ {
+ this["build_" + _loc3_ + "3"].setTextFormat(this.redCss);
+ }
+ else
+ {
+ this["build_" + _loc3_ + "3"].setTextFormat(this.whiteCss);
+ }
+ this["build_" + _loc3_ + "1"].visible = true;
+ this["build_" + _loc3_ + "2"].visible = true;
+ this["build_" + _loc3_ + "3"].visible = true;
+ this._height += 22;
+ }
+ else
+ {
+ this["build_" + _loc3_ + "1"].visible = false;
+ this["build_" + _loc3_ + "2"].visible = false;
+ this["build_" + _loc3_ + "3"].visible = false;
+ }
+ _loc3_++;
+ }
+ var _loc4_:int = 0;
+ var _loc6_:NewRes = NewUserData.getRes();
+ var _loc7_:int = 1;
+ while(_loc7_ < 5)
+ {
+ _loc10_ = this._buildObj.entityConsumeList[_loc7_ - 1] as EntityConsume;
+ if(_loc10_ != null)
+ {
+ if(_loc10_.needEntId != 90000001)
+ {
+ this["res_" + _loc7_ + "1"].visible = true;
+ this["res_" + _loc7_ + "2"].visible = true;
+ this["res_" + _loc7_ + "3"].visible = true;
+ this["res_" + _loc7_ + "1"].text = "消耗" + _loc10_.needEntName;
+ this["res_" + _loc7_ + "2"].text = _loc10_.needEntNum + "";
+ if(_loc10_.needEntId == 20100001)
+ {
+ _loc5_ = int(_loc6_.moneyNum);
+ }
+ if(_loc10_.needEntId == 20100002)
+ {
+ _loc5_ = int(_loc6_.foodNum);
+ }
+ if(_loc10_.needEntId == 20100003)
+ {
+ _loc5_ = int(_loc6_.woodNum);
+ }
+ if(_loc10_.needEntId == 20100004)
+ {
+ _loc5_ = int(_loc6_.stoneNum);
+ }
+ if(_loc10_.needEntId == 20100005)
+ {
+ _loc5_ = int(_loc6_.bronzeNum);
+ }
+ this["res_" + _loc7_ + "3"].text = _loc5_;
+ this["res_" + _loc7_ + "1"].x = this.title_txt.x;
+ this["res_" + _loc7_ + "2"].x = this["res_" + _loc7_ + "1"].x + this["res_" + _loc7_ + "1"].width;
+ this["res_" + _loc7_ + "3"].x = this["res_" + _loc7_ + "2"].x + this["res_" + _loc7_ + "2"].width;
+ this["res_" + _loc7_ + "1"].y = this._height;
+ this["res_" + _loc7_ + "2"].y = this._height;
+ this["res_" + _loc7_ + "3"].y = this._height;
+ if(_loc5_ < _loc10_.needEntNum)
+ {
+ this["res_" + _loc7_ + "3"].setTextFormat(this.redCss);
+ }
+ else
+ {
+ this["res_" + _loc7_ + "3"].setTextFormat(this.whiteCss);
+ }
+ this._height += 22;
+ }
+ else
+ {
+ this["res_" + _loc7_ + "1"].visible = false;
+ this["res_" + _loc7_ + "2"].visible = false;
+ this["res_" + _loc7_ + "3"].visible = false;
+ _loc4_ = _loc10_.needEntNum;
+ }
+ }
+ else
+ {
+ this["res_" + _loc7_ + "1"].visible = false;
+ this["res_" + _loc7_ + "2"].visible = false;
+ this["res_" + _loc7_ + "3"].visible = false;
+ }
+ _loc7_++;
+ }
+ this.lin_2.y = this._height;
+ this._height += 4;
+ this.time_1.y = this._height;
+ this.time_1_value.y = this.time_1.y;
+ this.time_1_value.text = PublicMethod.getTimeStr(_loc4_);
+ this._height += this.time_1.height;
+ this.time_2.y = this._height;
+ this.time_2_value.y = this._height;
+ this.time_2_value.text = PublicMethod.getTimeStr(this._buildObj.buildTime);
+ this._height += this.time_2.height;
+ this._table_bg = new Scale9Grid(this._bgSprite,310,this._height);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(!this._status)
+ {
+ return;
+ }
+ this._status = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ public function addTip() : void
+ {
+ if(this._status)
+ {
+ return;
+ }
+ this._status = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/CastleTip.as b/flash_decompiled/com/view/tip/CastleTip.as
new file mode 100644
index 0000000..441e79f
--- /dev/null
+++ b/flash_decompiled/com/view/tip/CastleTip.as
@@ -0,0 +1,144 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class CastleTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _dataObject:Object;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var _table_bg:Sprite;
+
+ private var line1_txt:TextField;
+
+ private var line2_txt:TextField;
+
+ private var line3_txt:TextField;
+
+ public function CastleTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object)
+ {
+ super();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function init() : void
+ {
+ this.line1_txt = PublicMethod.getTextField(16777215,200);
+ this.line1_txt.x = 8;
+ this.line1_txt.y = 6;
+ this._Container.addChild(this.line1_txt);
+ this.line2_txt = PublicMethod.getTextField(16777215,200);
+ this.line2_txt.x = 8;
+ this.line2_txt.y = this.line1_txt.y + this.line1_txt.height + 2;
+ this._Container.addChild(this.line2_txt);
+ this.line3_txt = new TextField();
+ this.line3_txt.textColor = 16777215;
+ this.line3_txt.width = 200;
+ this.line3_txt.autoSize = "left";
+ this.line3_txt.multiline = true;
+ this.line3_txt.wordWrap = true;
+ this.line3_txt.x = this.line1_txt.x;
+ this.line3_txt.y = this.line2_txt.y + this.line2_txt.height + 2;
+ this._Container.addChild(this.line3_txt);
+ this._table_bg = new Scale9Grid(this._bgSprite,197,120);
+ this._Container.addChildAt(this._table_bg,0);
+ this.setData();
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ public function setValue(param1:Object) : void
+ {
+ this._dataObject = param1;
+ this.setData();
+ }
+
+ private function setData() : void
+ {
+ this.line1_txt.text = this._dataObject.line1;
+ this.line2_txt.text = this._dataObject.line2;
+ this.line3_txt.text = this._dataObject.line3;
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function createNewTextField(param1:String) : TextField
+ {
+ var _loc2_:TextField = new TextField();
+ _loc2_.width = 200;
+ _loc2_.height = 20;
+ _loc2_.mouseEnabled = false;
+ _loc2_.textColor = 16777215;
+ _loc2_.text = param1;
+ _loc2_.autoSize = "left";
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/ChaofuTip.as b/flash_decompiled/com/view/tip/ChaofuTip.as
new file mode 100644
index 0000000..97eddd1
--- /dev/null
+++ b/flash_decompiled/com/view/tip/ChaofuTip.as
@@ -0,0 +1,408 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.utils.Utils;
+ import com.view.cache.ImgCache;
+ import com.view.ui.hero.data.ChaoFuData;
+ import com.view.ui.pak.data.PackItem;
+ import flash.display.Bitmap;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class ChaofuTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var itemImg:Bitmap;
+
+ private var _dataObject:PackItem;
+
+ private var _bgSprite:Sprite;
+
+ private var _displayObject:DisplayObject;
+
+ private var _range:Stage;
+
+ private var loader:LoadResource;
+
+ private var oldUrl:String;
+
+ private var css:TextFormat;
+
+ private var itemContent:TextField;
+
+ private var itemName:TextField;
+
+ private var _table_bg:Sprite;
+
+ private var isAddEvent:Boolean;
+
+ public function ChaofuTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:PackItem)
+ {
+ super();
+ this.itemImg = new Bitmap();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.init();
+ }
+
+ private function loadImg() : void
+ {
+ if(this.oldUrl != this._dataObject.viewMap.iconPath)
+ {
+ this.oldUrl = this._dataObject.viewMap.iconPath;
+ if(ImgCache.getInstance().getImg(ServerConfig.IMAGE_ITEM_URL + this.oldUrl))
+ {
+ this.itemImg = new Bitmap();
+ this.itemImg.bitmapData = ImgCache.getInstance().getImg(ServerConfig.IMAGE_ITEM_URL + this.oldUrl).bitmapData.clone();
+ this.setImgValue();
+ }
+ else
+ {
+ this.loader = new LoadResource(ServerConfig.IMAGE_ITEM_URL + this.oldUrl,this.loadBack);
+ }
+ }
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ if(Boolean(this._Container) && this._Container.contains(this.itemImg))
+ {
+ this._Container.removeChild(this.itemImg);
+ }
+ this.itemImg = Bitmap(param1.target.loader.content);
+ this.loader.clear();
+ this.setImgValue();
+ }
+
+ private function setImgValue() : void
+ {
+ if(this._Container)
+ {
+ this._Container.addChild(this.itemImg);
+ this.itemImg.x = 10;
+ this.itemImg.y = 10;
+ this.itemImg.width = 30;
+ this.itemImg.height = 30;
+ }
+ }
+
+ private function init() : void
+ {
+ this.itemName = PublicMethod.getTextFieldWithFillter(16777215,200);
+ this._Container.addChild(this.itemName);
+ this.itemName.x = 50;
+ this.itemName.y = 15;
+ this.itemContent = new TextField();
+ this.itemContent.x = 10;
+ this.itemContent.y = 50;
+ this.itemContent.width = 240;
+ this.itemContent.mouseEnabled = false;
+ this.itemContent.multiline = true;
+ this.itemContent.wordWrap = true;
+ this.itemContent.textColor = 16777215;
+ this.itemContent.autoSize = "left";
+ this.css = new TextFormat();
+ this.css.leading = 2;
+ this.css.font = "SimSun";
+ this.css.align = "left";
+ this.itemContent.defaultTextFormat = this.css;
+ this._Container.addChild(this.itemContent);
+ this.setValue();
+ }
+
+ private function setValue() : void
+ {
+ var _loc8_:String = null;
+ var _loc10_:String = null;
+ var _loc12_:int = 0;
+ var _loc13_:int = 0;
+ var _loc14_:int = 0;
+ var _loc19_:Object = null;
+ var _loc20_:String = null;
+ var _loc21_:int = 0;
+ var _loc22_:String = null;
+ var _loc23_:String = null;
+ var _loc24_:String = null;
+ if(!this.isAddEvent)
+ {
+ this.isAddEvent = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ var _loc1_:int = 0;
+ if(this._dataObject.strongLevel > 100)
+ {
+ _loc1_ = this._dataObject.strongLevel - 100;
+ this.itemName.htmlText = this._dataObject.viewMap.showName + "(强化等级:" + _loc1_ + ")";
+ }
+ else
+ {
+ this.itemName.htmlText = this._dataObject.viewMap.showName;
+ }
+ this.loadImg();
+ var _loc2_:String = this._dataObject.viewMap.desc + "
";
+ _loc2_ += "主属性
";
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ var _loc5_:int = 0;
+ var _loc6_:int = 0;
+ var _loc7_:int = 0;
+ _loc8_ = this._dataObject.gemValue;
+ var _loc9_:Array = _loc8_.split(";");
+ for each(_loc10_ in _loc9_)
+ {
+ if(_loc10_.length > 0)
+ {
+ _loc20_ = _loc10_.split(",")[0];
+ _loc21_ = int(_loc10_.split(",")[1]);
+ if(_loc20_ == "HERO_ATTACK")
+ {
+ _loc3_ += _loc21_;
+ }
+ if(_loc20_ == "HERO_HP")
+ {
+ _loc5_ += _loc21_;
+ }
+ if(_loc20_ == "HERO_DEFENCE")
+ {
+ _loc4_ += _loc21_;
+ }
+ if(_loc20_ == "HERO_AGILE")
+ {
+ _loc6_ += _loc21_;
+ }
+ if(_loc20_ == "HERO_LEAD")
+ {
+ _loc7_ += _loc21_;
+ }
+ }
+ }
+ if(_loc3_ > 0)
+ {
+ if(_loc1_ > 0)
+ {
+ _loc2_ = _loc2_ + "武将攻击 +" + _loc3_ + "(+" + _loc3_ * _loc1_ + ")
";
+ }
+ else
+ {
+ _loc2_ = _loc2_ + "武将攻击 +" + _loc3_ + "
";
+ }
+ }
+ if(_loc4_ > 0)
+ {
+ if(_loc1_ > 0)
+ {
+ _loc2_ = _loc2_ + "武将防御 +" + _loc4_ + "(+" + _loc4_ * _loc1_ + ")
";
+ }
+ else
+ {
+ _loc2_ = _loc2_ + "武将防御 +" + _loc4_ + "
";
+ }
+ }
+ if(_loc5_ > 0)
+ {
+ if(_loc1_ > 0)
+ {
+ _loc2_ = _loc2_ + "武将体力 +" + _loc5_ + "(+" + _loc5_ * _loc1_ + ")
";
+ }
+ else
+ {
+ _loc2_ = _loc2_ + "武将体力 +" + _loc5_ + "
";
+ }
+ }
+ if(_loc6_ > 0)
+ {
+ if(_loc1_ > 0)
+ {
+ _loc2_ = _loc2_ + "武将敏捷 +" + _loc6_ + "(+" + _loc6_ * _loc1_ + ")
";
+ }
+ else
+ {
+ _loc2_ = _loc2_ + "武将敏捷 +" + _loc6_ + "
";
+ }
+ }
+ if(_loc7_ > 0)
+ {
+ if(_loc1_ > 0)
+ {
+ _loc2_ = _loc2_ + "武将统率 +" + _loc7_ + "(+" + _loc7_ * _loc1_ + ")
";
+ }
+ else
+ {
+ _loc2_ = _loc2_ + "武将统率 +" + _loc7_ + "
";
+ }
+ }
+ _loc2_ += "洗练属性
";
+ var _loc11_:Object = this._dataObject.chaofu;
+ if((Boolean(_loc11_)) && _loc11_.pro1 > 0)
+ {
+ _loc22_ = this.getXilianStr(_loc11_.pro1,_loc11_.level1);
+ _loc23_ = this.getXilianStr(_loc11_.pro2,_loc11_.level2);
+ _loc24_ = this.getXilianStr(_loc11_.pro3,_loc11_.level3);
+ _loc2_ = _loc2_ + _loc22_ + "
" + _loc23_ + "
" + _loc24_ + "
";
+ }
+ else
+ {
+ _loc2_ += "洗练属性未激活
";
+ }
+ _loc2_ += "隐藏属性
";
+ if(Boolean(_loc11_) && _loc11_.hpro > 0)
+ {
+ _loc2_ = _loc2_ + this.getXilianStr(_loc11_.pro3,_loc11_.level3) + "
";
+ }
+ else
+ {
+ _loc2_ += "隐藏的属性未激活
";
+ }
+ var _loc15_:String = "";
+ var _loc16_:String = "";
+ var _loc17_:String = "";
+ if(_loc11_)
+ {
+ _loc12_ = int(_loc11_.hole1);
+ _loc13_ = int(_loc11_.hole2);
+ _loc14_ = int(_loc11_.hole3);
+ }
+ var _loc18_:int = 0;
+ if(_loc12_ > 0)
+ {
+ _loc18_ += 1;
+ _loc19_ = ChaoFuData.getObjByEntid(_loc12_);
+ _loc15_ = _loc19_.showName + " " + Utils.getProperty(_loc19_.gemValue) + "
";
+ }
+ if(_loc13_ > 0)
+ {
+ _loc18_ += 1;
+ _loc19_ = ChaoFuData.getObjByEntid(_loc13_);
+ _loc15_ = _loc15_ + _loc19_.showName + " " + Utils.getProperty(_loc19_.gemValue) + "
";
+ }
+ if(_loc14_ > 0)
+ {
+ _loc18_ += 1;
+ _loc19_ = ChaoFuData.getObjByEntid(_loc14_);
+ _loc15_ = _loc15_ + _loc19_.showName + " " + Utils.getProperty(_loc19_.gemValue) + "
";
+ }
+ _loc2_ = _loc2_ + "已经镶嵌" + _loc18_ + "/3
";
+ _loc2_ = _loc2_ + _loc15_ + "
";
+ _loc8_ = "(按住Ctrl键或Shift键后单击鼠标发送到当前频道,国家频道消耗一个小喇叭)";
+ _loc2_ = _loc2_ + _loc8_ + "
";
+ this.itemContent.htmlText = _loc2_;
+ this.itemContent.height = this.itemContent.textHeight + 10;
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this._table_bg = new Scale9Grid(this._bgSprite,240,this.itemContent.height + 50);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function getXilianStr(param1:int, param2:int) : String
+ {
+ var _loc3_:String = "";
+ if(param1 == 1)
+ {
+ _loc3_ = "攻击";
+ }
+ if(param1 == 2)
+ {
+ _loc3_ = "防御";
+ }
+ if(param1 == 3)
+ {
+ _loc3_ = "体力";
+ }
+ if(param1 == 4)
+ {
+ _loc3_ = "敏捷";
+ }
+ if(param1 == 5)
+ {
+ _loc3_ = "统率";
+ }
+ var _loc4_:* = _loc3_ + "LV" + param2;
+ if(param2 == 20)
+ {
+ _loc4_ += " ";
+ }
+ else
+ {
+ _loc4_ += " ";
+ }
+ return _loc4_ + _loc3_ + "+" + ChaoFuData.getXilianProperty(param2) + "";
+ }
+
+ public function setTipData(param1:PackItem) : void
+ {
+ this._dataObject = param1;
+ this.setValue();
+ }
+
+ public function destroyTip() : void
+ {
+ if(!this.isAddEvent)
+ {
+ return;
+ }
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/EquipTips.as b/flash_decompiled/com/view/tip/EquipTips.as
new file mode 100644
index 0000000..7a84054
--- /dev/null
+++ b/flash_decompiled/com/view/tip/EquipTips.as
@@ -0,0 +1,219 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.control.ConnectService;
+ import com.control.pack.event.UserPackEvent;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.geom.Point;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class EquipTips extends Sprite
+ {
+
+ private static var instance:EquipTips;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _Container:Sprite = new Sprite();
+
+ private var itemImg:Bitmap;
+
+ private var itemContent:TextField;
+
+ private var itemName:TextField;
+
+ private var css:TextFormat;
+
+ private var _table_bg:Sprite;
+
+ private var _dataObject:Object;
+
+ private var currPoint:Point;
+
+ private var isShow:Boolean;
+
+ private var oldUrl:String;
+
+ private var loader:LoadResource;
+
+ public function EquipTips()
+ {
+ super();
+ if(instance != null)
+ {
+ throw Error("单例");
+ }
+ this.initTip();
+ this.face.stage.addEventListener(MouseEvent.CLICK,this.mouseClick);
+ ConnectService.getInstance().addEventListener(UserPackEvent.PACK_getElementTip,this.getEquipSucc);
+ }
+
+ public static function getInstance() : EquipTips
+ {
+ if(instance == null)
+ {
+ instance = new EquipTips();
+ }
+ return instance;
+ }
+
+ public function update(param1:String) : void
+ {
+ ConnectService.getInstance().packService.getElementTip(param1);
+ }
+
+ private function initTip() : void
+ {
+ addChild(this._Container);
+ this.itemName = PublicMethod.getTextField(16777215,200);
+ this._Container.addChild(this.itemName);
+ this.itemName.x = 50;
+ this.itemName.y = 15;
+ this.itemContent = new TextField();
+ this.itemContent.x = 10;
+ this.itemContent.y = 50;
+ this.itemContent.width = 240;
+ this.itemContent.mouseEnabled = false;
+ this.itemContent.multiline = true;
+ this.itemContent.wordWrap = true;
+ this.itemContent.textColor = 16777215;
+ this.itemContent.autoSize = "left";
+ this.css = new TextFormat();
+ this.css.leading = 5;
+ this.css.align = "left";
+ this.itemContent.defaultTextFormat = this.css;
+ this._Container.addChild(this.itemContent);
+ }
+
+ private function setValue() : void
+ {
+ var _loc5_:String = null;
+ var _loc6_:Object = null;
+ this.itemName.htmlText = this._dataObject.showName;
+ if(this._dataObject.JINGLIAN_LEVEL)
+ {
+ this.itemName.htmlText = this.itemName.htmlText + " " + this._dataObject.JINGLIAN_LEVEL;
+ }
+ this.loadImg();
+ var _loc1_:String = this._dataObject.desc + "
";
+ if(this._dataObject.band)
+ {
+ _loc1_ = _loc1_ + "绑定:" + this._dataObject.band + "
";
+ }
+ if(this._dataObject.heroLevel != null)
+ {
+ _loc1_ = _loc1_ + this._dataObject.heroLevel + "
";
+ }
+ var _loc2_:Array = this._dataObject.equipPropertyList as Array;
+ if(_loc2_ != null && _loc2_.length > 0)
+ {
+ for each(_loc5_ in _loc2_)
+ {
+ _loc1_ = _loc1_ + _loc5_ + "
";
+ }
+ }
+ if(this._dataObject.currHole >= 0)
+ {
+ _loc1_ = _loc1_ + "已镶嵌宝石 " + this._dataObject.currHole + "/3
";
+ }
+ var _loc3_:Array = this._dataObject.gemList as Array;
+ if(_loc3_)
+ {
+ for each(_loc6_ in _loc3_)
+ {
+ if(_loc6_ != null)
+ {
+ _loc1_ = _loc1_ + " " + _loc6_.name + " " + _loc6_.toolTip.explain + "
";
+ }
+ }
+ }
+ if(this._dataObject.sellPrice)
+ {
+ _loc1_ = _loc1_ + "卖价:" + this._dataObject.sellPrice + "
";
+ }
+ var _loc4_:String = "(按住Ctrl键或Shift键后单击鼠标发送到当前频道,国家频道消耗一个小喇叭)";
+ _loc1_ = _loc1_ + _loc4_ + "
";
+ this.itemContent.htmlText = _loc1_;
+ this.itemContent.height = this.itemContent.textHeight + 10;
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this._table_bg = new Scale9Grid(this.face.tip_bg,240,this.itemContent.height + 50);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function mouseClick(param1:MouseEvent) : void
+ {
+ if(this.isShow)
+ {
+ if(this.face.stage.contains(this))
+ {
+ this.face.stage.removeChild(this);
+ this.isShow = false;
+ }
+ }
+ }
+
+ private function getEquipSucc(param1:UserPackEvent) : void
+ {
+ this._dataObject = param1.packObject;
+ this.setValue();
+ this.show();
+ }
+
+ public function setPosi(param1:Point) : void
+ {
+ this.currPoint = param1;
+ }
+
+ private function show() : void
+ {
+ this.face.stage.addChild(this);
+ this.x = this.currPoint.x;
+ this.y = this.currPoint.y;
+ this.isShow = true;
+ }
+
+ private function loadImg() : void
+ {
+ if(this.oldUrl != this._dataObject.iconPath)
+ {
+ this.oldUrl = this._dataObject.iconPath;
+ this.loader = new LoadResource(ServerConfig.IMAGE_EQUIP_URL + this.oldUrl,this.loadBack);
+ }
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ if(!this.isShow)
+ {
+ this.loader.clear();
+ return;
+ }
+ if(Boolean(this.itemImg) && this._Container.contains(this.itemImg))
+ {
+ this._Container.removeChild(this.itemImg);
+ }
+ this.itemImg = Bitmap(param1.target.loader.content);
+ this.loader.clear();
+ if(this._Container)
+ {
+ this._Container.addChild(this.itemImg);
+ this.itemImg.x = 10;
+ this.itemImg.y = 10;
+ this.itemImg.width = 30;
+ this.itemImg.height = 30;
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/GuildBuiUpTip.as b/flash_decompiled/com/view/tip/GuildBuiUpTip.as
new file mode 100644
index 0000000..8861f52
--- /dev/null
+++ b/flash_decompiled/com/view/tip/GuildBuiUpTip.as
@@ -0,0 +1,230 @@
+package com.view.tip
+{
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.DisplayObject;
+ import flash.display.Shape;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class GuildBuiUpTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var bg:Sprite;
+
+ private var _bgSprite:Sprite;
+
+ private var _range:Stage;
+
+ private var _displayObject:DisplayObject;
+
+ private var titleCss:TextFormat;
+
+ private var redCss:TextFormat;
+
+ private var _table_bg:Sprite;
+
+ private var title_txt:TextField;
+
+ private var label_1:TextField;
+
+ private var label_2:TextField;
+
+ private var label_3:TextField;
+
+ private var label_4:TextField;
+
+ private var label_5:TextField;
+
+ private var label_6:TextField;
+
+ private var label_7:TextField;
+
+ private var label_8:TextField;
+
+ private var label_9:TextField;
+
+ private var label_10:TextField;
+
+ private var label_11:TextField;
+
+ public function GuildBuiUpTip(param1:DisplayObject, param2:Stage, param3:Sprite)
+ {
+ super();
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function init() : void
+ {
+ this.titleCss = new TextFormat();
+ this.titleCss.bold = true;
+ this.titleCss.size = 14;
+ this.titleCss.align = "center";
+ this.redCss = new TextFormat();
+ this.redCss.color = 16711680;
+ this.title_txt = PublicMethod.getTextField(65280,270);
+ this.title_txt.height = 20;
+ this.title_txt.text = "联盟建筑升级";
+ this.title_txt.setTextFormat(this.titleCss);
+ this._Container.addChild(this.title_txt);
+ this.title_txt.x = 8;
+ this.title_txt.y = 8;
+ this.label_1 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_1);
+ this.label_1.x = this.title_txt.x;
+ this.label_1.y = this.title_txt.y + 30;
+ this.label_1.text = "升级条件";
+ this.label_2 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_2);
+ this.label_2.x = this.label_1.x + this.label_1.width;
+ this.label_2.y = this.label_1.y;
+ this.label_2.text = "需要前提";
+ this.label_3 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_3);
+ this.label_3.x = this.label_2.x + this.label_2.width;
+ this.label_3.y = this.label_1.y;
+ this.label_3.text = "当前前提";
+ var _loc1_:Shape = PublicMethod.drawLine(0,0,270,0,16777215);
+ this._Container.addChild(_loc1_);
+ _loc1_.x = this.title_txt.x;
+ _loc1_.y = this.label_1.y + 25;
+ this.label_4 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_4);
+ this.label_4.x = this.title_txt.x;
+ this.label_4.y = _loc1_.y + 9;
+ this.label_4.text = "联盟等级";
+ this.label_5 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_5);
+ this.label_5.x = this.label_4.x + this.label_4.width;
+ this.label_5.y = this.label_4.y;
+ this.label_6 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_6);
+ this.label_6.x = this.label_5.x + this.label_5.width;
+ this.label_6.y = this.label_4.y;
+ this.label_7 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_7);
+ this.label_7.x = this.title_txt.x;
+ this.label_7.y = this.label_4.y + 30;
+ this.label_7.text = "联盟建设值";
+ this.label_8 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_8);
+ this.label_8.x = this.label_7.x + this.label_7.width;
+ this.label_8.y = this.label_7.y;
+ this.label_9 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_9);
+ this.label_9.x = this.label_8.x + this.label_8.width;
+ this.label_9.y = this.label_7.y;
+ var _loc2_:Shape = PublicMethod.drawLine(0,0,270,0,16777215);
+ this._Container.addChild(_loc2_);
+ _loc2_.x = this.title_txt.x;
+ _loc2_.y = this.label_7.y + 25;
+ this.label_10 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_10);
+ this.label_10.x = this.title_txt.x;
+ this.label_10.y = _loc2_.y + 9;
+ this.label_10.text = "消耗时间";
+ this.label_11 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_11);
+ this.label_11.x = this.label_10.x + this.label_10.width;
+ this.label_11.y = this.label_10.y;
+ this._table_bg = new Scale9Grid(this._bgSprite,270,150);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.guildLv);
+ var _loc3_:int = int(param1.relyGuildLv);
+ var _loc4_:int = int(param1.guildCon);
+ var _loc5_:int = int(param1.con);
+ var _loc6_:int = int(param1.upgradeTime);
+ this.label_6.text = _loc2_.toString();
+ this.label_5.text = _loc3_.toString();
+ if(_loc3_ > _loc2_)
+ {
+ this.label_6.setTextFormat(this.redCss);
+ }
+ this.label_8.text = _loc4_.toString();
+ this.label_9.text = _loc5_.toString();
+ if(_loc4_ > _loc5_)
+ {
+ this.label_9.setTextFormat(this.redCss);
+ }
+ this.label_11.text = PublicMethod.getTimeStr1(_loc6_);
+ }
+
+ public function isLevelMax(param1:String) : void
+ {
+ this.title_txt = PublicMethod.getTextField(65280,150);
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._Container = new Sprite();
+ this.title_txt.text = param1;
+ this._Container.addChild(this.title_txt);
+ this.title_txt.x = 8;
+ this.title_txt.y = 8;
+ this._table_bg = new Scale9Grid(this._bgSprite,this.title_txt.textWidth + 10,25);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/GuildTechUpTip.as b/flash_decompiled/com/view/tip/GuildTechUpTip.as
new file mode 100644
index 0000000..4186d60
--- /dev/null
+++ b/flash_decompiled/com/view/tip/GuildTechUpTip.as
@@ -0,0 +1,255 @@
+package com.view.tip
+{
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.DisplayObject;
+ import flash.display.Shape;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class GuildTechUpTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var bg:Sprite;
+
+ private var _bgSprite:Sprite;
+
+ private var _range:Stage;
+
+ private var _displayObject:DisplayObject;
+
+ private var titleCss:TextFormat;
+
+ private var redCss:TextFormat;
+
+ private var _table_bg:Sprite;
+
+ private var title_txt:TextField;
+
+ private var label_1:TextField;
+
+ private var label_2:TextField;
+
+ private var label_3:TextField;
+
+ private var label_4:TextField;
+
+ private var label_5:TextField;
+
+ private var label_6:TextField;
+
+ private var label_7:TextField;
+
+ private var label_8:TextField;
+
+ private var label_9:TextField;
+
+ private var label_10:TextField;
+
+ private var label_11:TextField;
+
+ private var label_12:TextField;
+
+ private var label_13:TextField;
+
+ private var label_14:TextField;
+
+ private var isAddEvent:Boolean;
+
+ public function GuildTechUpTip(param1:DisplayObject, param2:Stage, param3:Sprite)
+ {
+ super();
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.isAddEvent = true;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function init() : void
+ {
+ this.titleCss = new TextFormat();
+ this.titleCss.bold = true;
+ this.titleCss.size = 12;
+ this.titleCss.align = "center";
+ this.redCss = new TextFormat();
+ this.redCss.color = 16711680;
+ this.title_txt = PublicMethod.getTextField(65280,270);
+ this.title_txt.text = "联盟科技升级";
+ this.title_txt.setTextFormat(this.titleCss);
+ this._Container.addChild(this.title_txt);
+ this.title_txt.x = 8;
+ this.title_txt.y = 8;
+ this.label_1 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_1);
+ this.label_1.x = this.title_txt.x;
+ this.label_1.y = this.title_txt.y + 25;
+ this.label_1.text = "升级条件";
+ this.label_2 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_2);
+ this.label_2.x = this.label_1.x + this.label_1.width;
+ this.label_2.y = this.label_1.y;
+ this.label_2.text = "需要前提";
+ this.label_3 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_3);
+ this.label_3.x = this.label_2.x + this.label_2.width;
+ this.label_3.y = this.label_1.y;
+ this.label_3.text = "当前前提";
+ var _loc1_:Shape = PublicMethod.drawLine(0,0,270,0,16777215);
+ this._Container.addChild(_loc1_);
+ _loc1_.x = this.title_txt.x;
+ _loc1_.y = this.label_1.y + 25;
+ this.label_4 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_4);
+ this.label_4.x = this.title_txt.x;
+ this.label_4.y = _loc1_.y + 5;
+ this.label_4.text = "联盟等级";
+ this.label_5 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_5);
+ this.label_5.x = this.label_4.x + this.label_4.width;
+ this.label_5.y = this.label_4.y;
+ this.label_6 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_6);
+ this.label_6.x = this.label_5.x + this.label_5.width;
+ this.label_6.y = this.label_4.y;
+ this.label_7 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_7);
+ this.label_7.x = this.title_txt.x;
+ this.label_7.y = this.label_4.y + 20;
+ this.label_7.text = "联盟建设值";
+ this.label_8 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_8);
+ this.label_8.x = this.label_7.x + this.label_7.width;
+ this.label_8.y = this.label_7.y;
+ this.label_9 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_9);
+ this.label_9.x = this.label_8.x + this.label_8.width;
+ this.label_9.y = this.label_7.y;
+ this.label_10 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_10);
+ this.label_10.x = this.title_txt.x;
+ this.label_10.y = this.label_7.y + 20;
+ this.label_10.text = "";
+ this.label_11 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_11);
+ this.label_11.x = this.label_10.x + this.label_10.width;
+ this.label_11.y = this.label_10.y;
+ this.label_12 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_12);
+ this.label_12.x = this.label_11.x + this.label_11.width;
+ this.label_12.y = this.label_10.y;
+ var _loc2_:Shape = PublicMethod.drawLine(0,0,270,0,16777215);
+ this._Container.addChild(_loc2_);
+ _loc2_.x = this.title_txt.x;
+ _loc2_.y = this.label_10.y + 25;
+ this.label_13 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_13);
+ this.label_13.x = this.title_txt.x;
+ this.label_13.y = _loc2_.y + 5;
+ this.label_13.text = "消耗时间";
+ this.label_14 = PublicMethod.getTextField(16777215,90);
+ this._Container.addChild(this.label_14);
+ this.label_14.x = this.label_13.x + this.label_13.width;
+ this.label_14.y = this.label_13.y;
+ this._table_bg = new Scale9Grid(this._bgSprite,270,150);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.guildLv);
+ var _loc3_:int = int(param1.relyGuildLv);
+ var _loc4_:int = int(param1.guildCon);
+ var _loc5_:int = int(param1.con);
+ var _loc6_:int = int(param1.upgradeTime);
+ var _loc7_:int = int(param1.relybuiCurrLv);
+ var _loc8_:int = int(param1.relyBuiLv);
+ this.label_5.text = _loc3_.toString();
+ this.label_6.text = _loc2_.toString();
+ if(_loc2_ < _loc3_)
+ {
+ this.label_6.setTextFormat(this.redCss);
+ }
+ this.label_8.text = _loc4_.toString();
+ this.label_9.text = _loc5_.toString();
+ if(_loc4_ > _loc5_)
+ {
+ this.label_9.setTextFormat(this.redCss);
+ }
+ this.label_10.text = param1.relyBuiName;
+ this.label_11.text = _loc8_.toString();
+ this.label_12.text = _loc7_.toString();
+ if(_loc7_ < _loc8_)
+ {
+ this.label_12.setTextFormat(this.redCss);
+ }
+ this.label_14.text = PublicMethod.getTimeStr1(_loc6_);
+ if(!this.isAddEvent)
+ {
+ this.isAddEvent = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(!this.isAddEvent)
+ {
+ return;
+ }
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/HeroTip.as b/flash_decompiled/com/view/tip/HeroTip.as
new file mode 100644
index 0000000..f230871
--- /dev/null
+++ b/flash_decompiled/com/view/tip/HeroTip.as
@@ -0,0 +1,506 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.ui.hero.HeroConst;
+ import flash.display.DisplayObject;
+ import flash.display.Shape;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class HeroTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var blodCss:TextFormat;
+
+ private var label1_11:TextField;
+
+ private var label1_21:TextField;
+
+ private var label1_31:TextField;
+
+ private var label1_41:TextField;
+
+ private var label1_51:TextField;
+
+ private var label1_61:TextField;
+
+ private var label1_71:TextField;
+
+ private var label1_81:TextField;
+
+ private var label2_11:TextField;
+
+ private var label2_21:TextField;
+
+ private var label2_31:TextField;
+
+ private var label2_41:TextField;
+
+ private var label2_51:TextField;
+
+ private var label3_11:TextField;
+
+ private var label3_21:TextField;
+
+ private var label3_31:TextField;
+
+ private var label3_41:TextField;
+
+ private var label3_51:TextField;
+
+ private var label4_11:TextField;
+
+ private var label4_21:TextField;
+
+ private var label4_31:TextField;
+
+ public function HeroTip(param1:DisplayObject, param2:Stage, param3:Sprite)
+ {
+ super();
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.init();
+ }
+
+ private function init() : void
+ {
+ var _loc1_:int = 0;
+ var _loc4_:TextField = null;
+ var _loc5_:TextField = null;
+ var _loc6_:TextField = null;
+ var _loc10_:TextField = null;
+ var _loc11_:TextField = null;
+ var _loc21_:TextField = null;
+ this.blodCss = new TextFormat();
+ this.blodCss.bold = true;
+ this.blodCss.align = "center";
+ this.blodCss.size = 14;
+ var _loc2_:TextField = PublicMethod.getTextField(15592765,240);
+ this._Container.addChild(_loc2_);
+ _loc2_.text = "基本信息";
+ _loc2_.height = 20;
+ _loc2_.x = 10;
+ _loc2_.y = 6;
+ _loc2_.setTextFormat(this.blodCss);
+ _loc1_ = _loc2_.y + _loc2_.height + 2;
+ var _loc3_:Shape = PublicMethod.drawLine(0,0,240,0,16777215);
+ this._Container.addChild(_loc3_);
+ _loc3_.x = _loc2_.x;
+ _loc3_.y = _loc1_;
+ _loc1_ += 4;
+ _loc4_ = PublicMethod.getTextField(16777215,35);
+ _loc5_ = PublicMethod.getTextField(16777215,35);
+ _loc6_ = PublicMethod.getTextField(16777215,35);
+ var _loc7_:TextField = PublicMethod.getTextField(16777215,35);
+ this._Container.addChild(_loc4_);
+ this._Container.addChild(_loc5_);
+ this._Container.addChild(_loc6_);
+ this._Container.addChild(_loc7_);
+ _loc4_.x = _loc2_.x;
+ _loc4_.y = _loc1_;
+ _loc1_ += 20;
+ _loc5_.x = _loc2_.x;
+ _loc5_.y = _loc1_;
+ _loc1_ += 20;
+ _loc6_.x = _loc2_.x;
+ _loc6_.y = _loc1_;
+ _loc1_ += 20;
+ _loc7_.x = _loc2_.x;
+ _loc7_.y = _loc1_;
+ _loc1_ += 20;
+ _loc4_.text = "姓名:";
+ _loc5_.text = "等级:";
+ _loc6_.text = "成长:";
+ _loc7_.text = "称号:";
+ this.label1_11 = PublicMethod.getTextField(16777215,85);
+ this.label1_21 = PublicMethod.getTextField(16777215,85);
+ this.label1_31 = PublicMethod.getTextField(16777215,85);
+ this.label1_41 = PublicMethod.getTextField(16777215,85);
+ this._Container.addChild(this.label1_11);
+ this._Container.addChild(this.label1_21);
+ this._Container.addChild(this.label1_31);
+ this._Container.addChild(this.label1_41);
+ this.label1_11.x = _loc4_.x + _loc4_.width;
+ this.label1_11.y = _loc4_.y;
+ this.label1_21.x = _loc5_.x + _loc5_.width;
+ this.label1_21.y = _loc5_.y;
+ this.label1_31.x = _loc6_.x + _loc6_.width;
+ this.label1_31.y = _loc6_.y;
+ this.label1_41.x = _loc7_.x + _loc7_.width;
+ this.label1_41.y = _loc7_.y;
+ var _loc8_:TextField = PublicMethod.getTextField(16777215,35);
+ var _loc9_:TextField = PublicMethod.getTextField(16777215,35);
+ _loc10_ = PublicMethod.getTextField(16777215,40);
+ _loc11_ = PublicMethod.getTextField(16777215,35);
+ this._Container.addChild(_loc8_);
+ this._Container.addChild(_loc9_);
+ this._Container.addChild(_loc10_);
+ this._Container.addChild(_loc11_);
+ _loc8_.x = this.label1_11.x + this.label1_11.width;
+ _loc8_.y = _loc4_.y;
+ _loc9_.x = this.label1_21.x + this.label1_21.width;
+ _loc9_.y = _loc5_.y;
+ _loc10_.x = this.label1_31.x + this.label1_31.width;
+ _loc10_.y = _loc6_.y;
+ _loc11_.x = this.label1_41.x + this.label1_41.width;
+ _loc11_.y = _loc7_.y;
+ _loc8_.text = "职业:";
+ _loc9_.text = "官职:";
+ _loc10_.text = "单挑力:";
+ _loc11_.text = "所属:";
+ this.label1_51 = PublicMethod.getTextField(16777215,85);
+ this.label1_61 = PublicMethod.getTextField(16777215,85);
+ this.label1_71 = PublicMethod.getTextField(16777215,85);
+ this.label1_81 = PublicMethod.getTextField(16777215,85);
+ this._Container.addChild(this.label1_51);
+ this._Container.addChild(this.label1_61);
+ this._Container.addChild(this.label1_71);
+ this._Container.addChild(this.label1_81);
+ this.label1_51.x = _loc8_.x + _loc8_.width;
+ this.label1_51.y = _loc8_.y;
+ this.label1_61.x = _loc9_.x + _loc9_.width;
+ this.label1_61.y = _loc9_.y;
+ this.label1_71.x = _loc10_.x + _loc10_.width;
+ this.label1_71.y = _loc10_.y;
+ this.label1_81.x = _loc11_.x + _loc11_.width;
+ this.label1_81.y = _loc11_.y;
+ var _loc12_:TextField = PublicMethod.getTextField(15592765,240);
+ this._Container.addChild(_loc12_);
+ _loc12_.text = "属 性";
+ _loc12_.height = 20;
+ _loc12_.x = _loc2_.x;
+ _loc12_.y = _loc1_;
+ _loc12_.setTextFormat(this.blodCss);
+ _loc1_ += 22;
+ var _loc13_:Shape = PublicMethod.drawLine(0,0,240,0,16777215);
+ this._Container.addChild(_loc13_);
+ _loc13_.x = _loc2_.x;
+ _loc13_.y = _loc1_;
+ _loc1_ += 4;
+ var _loc14_:TextField = PublicMethod.getTextField(16777215,35);
+ var _loc15_:TextField = PublicMethod.getTextField(16777215,35);
+ var _loc16_:TextField = PublicMethod.getTextField(16777215,35);
+ var _loc17_:TextField = PublicMethod.getTextField(16777215,35);
+ var _loc18_:TextField = PublicMethod.getTextField(16777215,35);
+ this._Container.addChild(_loc14_);
+ this._Container.addChild(_loc15_);
+ this._Container.addChild(_loc16_);
+ this._Container.addChild(_loc17_);
+ this._Container.addChild(_loc18_);
+ _loc14_.x = _loc2_.x;
+ _loc14_.y = _loc1_;
+ _loc1_ += 20;
+ _loc15_.x = _loc2_.x;
+ _loc15_.y = _loc1_;
+ _loc1_ += 20;
+ _loc16_.x = _loc2_.x;
+ _loc16_.y = _loc1_;
+ _loc1_ += 20;
+ _loc17_.x = _loc2_.x;
+ _loc17_.y = _loc1_;
+ _loc1_ += 20;
+ _loc18_.x = _loc2_.x;
+ _loc18_.y = _loc1_;
+ _loc1_ += 20;
+ _loc14_.text = "统率:";
+ _loc15_.text = "攻击:";
+ _loc16_.text = "防御:";
+ _loc17_.text = "体力:";
+ _loc18_.text = "敏捷:";
+ this.label2_11 = PublicMethod.getTextField(16777215,140);
+ this.label2_21 = PublicMethod.getTextField(16777215,140);
+ this.label2_31 = PublicMethod.getTextField(16777215,140);
+ this.label2_41 = PublicMethod.getTextField(16777215,140);
+ this.label2_51 = PublicMethod.getTextField(16777215,140);
+ this._Container.addChild(this.label2_11);
+ this._Container.addChild(this.label2_21);
+ this._Container.addChild(this.label2_31);
+ this._Container.addChild(this.label2_41);
+ this._Container.addChild(this.label2_51);
+ this.label2_11.x = _loc14_.x + _loc14_.width;
+ this.label2_11.y = _loc14_.y;
+ this.label2_21.x = _loc15_.x + _loc15_.width;
+ this.label2_21.y = _loc15_.y;
+ this.label2_31.x = _loc16_.x + _loc16_.width;
+ this.label2_31.y = _loc16_.y;
+ this.label2_41.x = _loc17_.x + _loc17_.width;
+ this.label2_41.y = _loc17_.y;
+ this.label2_51.x = _loc18_.x + _loc18_.width;
+ this.label2_51.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextField(15592765,240);
+ this._Container.addChild(_loc19_);
+ _loc19_.text = "装 备";
+ _loc19_.height = 20;
+ _loc19_.x = _loc2_.x;
+ _loc19_.y = _loc1_;
+ _loc19_.setTextFormat(this.blodCss);
+ _loc1_ += 22;
+ var _loc20_:Shape = PublicMethod.drawLine(0,0,240,0,16777215);
+ this._Container.addChild(_loc20_);
+ _loc20_.x = _loc2_.x;
+ _loc20_.y = _loc1_;
+ _loc1_ += 4;
+ _loc21_ = PublicMethod.getTextField(16777215,35);
+ var _loc22_:TextField = PublicMethod.getTextField(16777215,35);
+ var _loc23_:TextField = PublicMethod.getTextField(16777215,35);
+ var _loc24_:TextField = PublicMethod.getTextField(16777215,35);
+ var _loc25_:TextField = PublicMethod.getTextField(16777215,35);
+ this._Container.addChild(_loc21_);
+ this._Container.addChild(_loc22_);
+ this._Container.addChild(_loc23_);
+ this._Container.addChild(_loc24_);
+ this._Container.addChild(_loc25_);
+ _loc21_.x = _loc2_.x;
+ _loc21_.y = _loc1_;
+ _loc1_ += 20;
+ _loc22_.x = _loc2_.x;
+ _loc22_.y = _loc1_;
+ _loc1_ += 20;
+ _loc23_.x = _loc2_.x;
+ _loc23_.y = _loc1_;
+ _loc1_ += 20;
+ _loc24_.x = _loc2_.x;
+ _loc24_.y = _loc1_;
+ _loc1_ += 20;
+ _loc25_.x = _loc2_.x;
+ _loc25_.y = _loc1_;
+ _loc1_ += 20;
+ _loc21_.text = "头盔:";
+ _loc22_.text = "武器:";
+ _loc23_.text = "铠甲:";
+ _loc24_.text = "饰品:";
+ _loc25_.text = "护腿:";
+ this.label3_11 = PublicMethod.getTextField(16777215,140);
+ this.label3_21 = PublicMethod.getTextField(16777215,140);
+ this.label3_31 = PublicMethod.getTextField(16777215,140);
+ this.label3_41 = PublicMethod.getTextField(16777215,140);
+ this.label3_51 = PublicMethod.getTextField(16777215,140);
+ this._Container.addChild(this.label3_11);
+ this._Container.addChild(this.label3_21);
+ this._Container.addChild(this.label3_31);
+ this._Container.addChild(this.label3_41);
+ this._Container.addChild(this.label3_51);
+ this.label3_11.x = _loc21_.x + _loc21_.width;
+ this.label3_11.y = _loc21_.y;
+ this.label3_21.x = _loc22_.x + _loc22_.width;
+ this.label3_21.y = _loc22_.y;
+ this.label3_31.x = _loc23_.x + _loc23_.width;
+ this.label3_31.y = _loc23_.y;
+ this.label3_41.x = _loc24_.x + _loc24_.width;
+ this.label3_41.y = _loc24_.y;
+ this.label3_51.x = _loc25_.x + _loc25_.width;
+ this.label3_51.y = _loc25_.y;
+ var _loc26_:TextField = PublicMethod.getTextField(15592765,240);
+ this._Container.addChild(_loc26_);
+ _loc26_.text = "技 能";
+ _loc26_.x = _loc2_.x;
+ _loc26_.y = _loc1_;
+ _loc26_.height = 20;
+ _loc26_.setTextFormat(this.blodCss);
+ _loc1_ += 22;
+ var _loc27_:Shape = PublicMethod.drawLine(0,0,240,0,16777215);
+ this._Container.addChild(_loc27_);
+ _loc27_.x = _loc2_.x;
+ _loc27_.y = _loc1_;
+ _loc1_ += 4;
+ var _loc28_:TextField = PublicMethod.getTextField(16777215,60);
+ var _loc29_:TextField = PublicMethod.getTextField(16777215,60);
+ var _loc30_:TextField = PublicMethod.getTextField(16777215,60);
+ this._Container.addChild(_loc28_);
+ this._Container.addChild(_loc29_);
+ this._Container.addChild(_loc30_);
+ _loc28_.x = _loc2_.x;
+ _loc28_.y = _loc1_;
+ _loc1_ += 36;
+ _loc29_.x = _loc2_.x;
+ _loc29_.y = _loc1_;
+ _loc1_ += 20;
+ _loc30_.x = _loc2_.x;
+ _loc30_.y = _loc1_;
+ _loc1_ += 20;
+ _loc28_.text = "战略技能:";
+ _loc29_.text = "单挑技能:";
+ _loc30_.text = "官职技能:";
+ this.label4_11 = PublicMethod.getTextField(16777215,180);
+ this.label4_21 = PublicMethod.getTextField(16777215,140);
+ this.label4_31 = PublicMethod.getTextField(16777215,140);
+ this.label4_11.height = 36;
+ this.label4_11.wordWrap = true;
+ this.label4_11.multiline = true;
+ this._Container.addChild(this.label4_11);
+ this._Container.addChild(this.label4_21);
+ this._Container.addChild(this.label4_31);
+ this.label4_11.x = _loc28_.x + _loc28_.width;
+ this.label4_11.y = _loc28_.y;
+ this.label4_21.x = _loc29_.x + _loc29_.width;
+ this.label4_21.y = _loc29_.y;
+ this.label4_31.x = _loc30_.x + _loc30_.width;
+ this.label4_31.y = _loc30_.y;
+ var _loc31_:String = "(按住Ctrl键或Shift键后单击鼠标发送到当前频道,国家频道消耗一个小喇叭)";
+ var _loc32_:TextField = this.createTextField(_loc31_);
+ this._Container.addChild(_loc32_);
+ _loc32_.x = 10;
+ _loc32_.y = _loc1_;
+ _loc1_ += _loc32_.height;
+ var _loc33_:Sprite = new Scale9Grid(this._bgSprite,240,_loc1_);
+ this._Container.addChildAt(_loc33_,0);
+ }
+
+ public function setTipData(param1:Object) : void
+ {
+ var _loc13_:Object = null;
+ var _loc14_:String = null;
+ this.label1_11.htmlText = param1.showName;
+ this.label1_21.text = HeroConst.changeName(param1.level,param1.changeCount);
+ this.label1_31.text = param1.upCount;
+ this.label1_51.text = param1.careerName;
+ this.label1_61.text = param1.govPotzName;
+ this.label1_71.htmlText = "" + param1.fightPower + "";
+ this.label1_81.htmlText = "" + param1.owner + "";
+ var _loc2_:String = "" + param1.lead + "";
+ var _loc3_:int = param1.finalLead - param1.lead;
+ if(_loc3_ > 0)
+ {
+ _loc2_ = _loc2_ + " (+" + _loc3_ + ")";
+ }
+ this.label2_11.htmlText = _loc2_;
+ var _loc4_:String = "" + param1.atk + "";
+ var _loc5_:int = param1.finalAtk - param1.atk;
+ if(_loc5_ > 0)
+ {
+ _loc4_ = _loc4_ + " (+" + _loc5_ + ")";
+ }
+ this.label2_21.htmlText = _loc4_;
+ var _loc6_:String = "" + param1.def + "";
+ var _loc7_:int = param1.finalDef - param1.def;
+ if(_loc7_ > 0)
+ {
+ _loc6_ = _loc6_ + " (+" + _loc7_ + ")";
+ }
+ this.label2_31.htmlText = _loc6_;
+ var _loc8_:String = "" + param1.hp + "";
+ var _loc9_:int = param1.finalHp - param1.hp;
+ if(_loc9_ > 0)
+ {
+ _loc8_ = _loc8_ + " (+" + _loc9_ + ")";
+ }
+ this.label2_41.htmlText = _loc8_;
+ var _loc10_:String = "" + param1.agl + "";
+ var _loc11_:int = param1.finalAgl - param1.agl;
+ if(_loc11_ > 0)
+ {
+ _loc10_ = _loc10_ + " (+" + _loc11_ + ")";
+ }
+ this.label2_51.htmlText = _loc10_;
+ this.label3_11.text = "无";
+ this.label3_21.text = "无";
+ this.label3_31.text = "无";
+ this.label3_41.text = "无";
+ this.label3_51.text = "无";
+ var _loc12_:Array = param1.equipList;
+ for each(_loc13_ in _loc12_)
+ {
+ _loc14_ = "" + _loc13_.name + "(" + _loc13_.level + ")";
+ if(_loc13_.type == "equ1")
+ {
+ this.label3_11.htmlText = _loc14_;
+ }
+ else if(_loc13_.type == "equ2")
+ {
+ this.label3_31.htmlText = _loc14_;
+ }
+ else if(_loc13_.type == "equ3")
+ {
+ this.label3_21.htmlText = _loc14_;
+ }
+ else if(_loc13_.type == "equ4")
+ {
+ this.label3_51.htmlText = _loc14_;
+ }
+ else
+ {
+ this.label3_41.htmlText = _loc14_;
+ }
+ }
+ this.label4_11.htmlText = "" + param1.combatSkillName + "";
+ this.label4_21.htmlText = "" + param1.fightSkillName + "";
+ this.label4_31.htmlText = "" + param1.potzSkillName + "";
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ public function destroyTip() : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ if(!this._range.contains(this._Container))
+ {
+ this._range.addChild(this._Container);
+ }
+ this._Container.x = this._range.mouseX + 10;
+ this._Container.y = 25;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.stageWidth - this._range.mouseX < this._Container.width + 10)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width - 10;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX + 10;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ private function createTextField(param1:String) : TextField
+ {
+ var _loc2_:TextField = new TextField();
+ _loc2_.width = 240;
+ _loc2_.height = 20;
+ _loc2_.mouseEnabled = false;
+ _loc2_.multiline = true;
+ _loc2_.wordWrap = true;
+ _loc2_.textColor = 16777215;
+ _loc2_.text = param1;
+ _loc2_.autoSize = "left";
+ _loc2_.height = _loc2_.textHeight + 10;
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/HorseItemTip.as b/flash_decompiled/com/view/tip/HorseItemTip.as
new file mode 100644
index 0000000..89c6401
--- /dev/null
+++ b/flash_decompiled/com/view/tip/HorseItemTip.as
@@ -0,0 +1,208 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.cache.ImgCache;
+ import flash.display.Bitmap;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class HorseItemTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _dataObject:Object;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var itemImg:Bitmap;
+
+ private var loader:LoadResource;
+
+ private var oldUrl:String;
+
+ private var css:TextFormat;
+
+ private var itemContent:TextField;
+
+ private var itemName:TextField;
+
+ private var _table_bg:Sprite;
+
+ private var isAddEvent:Boolean;
+
+ public function HorseItemTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object)
+ {
+ super();
+ this.itemImg = new Bitmap();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.init();
+ }
+
+ private function loadImg() : void
+ {
+ if(this.oldUrl != this._dataObject.iconPath)
+ {
+ this.oldUrl = this._dataObject.iconPath;
+ if(ImgCache.getInstance().getImg(ServerConfig.IMAGE_ITEM_URL + this.oldUrl))
+ {
+ this.itemImg = new Bitmap();
+ this.itemImg.bitmapData = ImgCache.getInstance().getImg(ServerConfig.IMAGE_ITEM_URL + this.oldUrl).bitmapData.clone();
+ this.setImgValue();
+ }
+ else
+ {
+ this.loader = new LoadResource(ServerConfig.IMAGE_ITEM_URL + this.oldUrl,this.loadBack);
+ }
+ }
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ if(Boolean(this._Container) && this._Container.contains(this.itemImg))
+ {
+ this._Container.removeChild(this.itemImg);
+ }
+ this.itemImg = Bitmap(param1.target.loader.content);
+ this.loader.clear();
+ this.setImgValue();
+ }
+
+ private function setImgValue() : void
+ {
+ if(this._Container)
+ {
+ this._Container.addChild(this.itemImg);
+ this.itemImg.x = 10;
+ this.itemImg.y = 10;
+ this.itemImg.width = 30;
+ this.itemImg.height = 30;
+ }
+ }
+
+ private function init() : void
+ {
+ this.itemName = PublicMethod.getTextField(16777215,200);
+ this._Container.addChild(this.itemName);
+ this.itemName.x = 50;
+ this.itemName.y = 15;
+ this.itemContent = new TextField();
+ this.itemContent.x = 10;
+ this.itemContent.y = 50;
+ this.itemContent.width = 240;
+ this.itemContent.mouseEnabled = false;
+ this.itemContent.multiline = true;
+ this.itemContent.wordWrap = true;
+ this.itemContent.textColor = 16777215;
+ this.itemContent.autoSize = "left";
+ this.css = new TextFormat();
+ this.css.leading = 7;
+ this.css.align = "left";
+ this.itemContent.defaultTextFormat = this.css;
+ this._Container.addChild(this.itemContent);
+ this.setValue();
+ }
+
+ private function setValue() : void
+ {
+ if(!this.isAddEvent)
+ {
+ this.isAddEvent = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ this.itemName.htmlText = this._dataObject.showName;
+ this.loadImg();
+ var _loc1_:String = this._dataObject.itemDesc + "
";
+ if(this._dataObject.itemDesc1)
+ {
+ _loc1_ += this._dataObject.itemDesc1;
+ }
+ this.itemContent.htmlText = _loc1_;
+ this.itemContent.height = this.itemContent.textHeight + 10;
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this._table_bg = new Scale9Grid(this._bgSprite,240,this.itemContent.height + 50);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ public function setTipData(param1:Object) : void
+ {
+ this._dataObject = param1;
+ this.setValue();
+ }
+
+ public function destroyTip() : void
+ {
+ if(!this.isAddEvent)
+ {
+ return;
+ }
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/ItemTip.as b/flash_decompiled/com/view/tip/ItemTip.as
new file mode 100644
index 0000000..96b69a1
--- /dev/null
+++ b/flash_decompiled/com/view/tip/ItemTip.as
@@ -0,0 +1,437 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.cache.ImgCache;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIItem;
+ import flash.display.Bitmap;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class ItemTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _dataObject:Object;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var itemImg:Bitmap;
+
+ private var pngBg:UIItem;
+
+ private var loader:LoadResource;
+
+ private var oldUrl:String;
+
+ private var css:TextFormat;
+
+ private var line1:Sprite;
+
+ private var label1:TextField;
+
+ private var line2:Sprite;
+
+ private var label2:TextField;
+
+ private var line3:Sprite;
+
+ private var label3:TextField;
+
+ private var line4:Sprite;
+
+ private var label4:TextField;
+
+ private var line5:Sprite;
+
+ private var label5:TextField;
+
+ private var line6:Sprite;
+
+ private var label6:TextField;
+
+ private var line7:Sprite;
+
+ private var label7:TextField;
+
+ private var itemContent:TextField;
+
+ private var itemName:TextField;
+
+ private var stongText:TextField;
+
+ private var _table_bg:Sprite;
+
+ private var isAddEvent:Boolean;
+
+ public function ItemTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object)
+ {
+ super();
+ this.itemImg = new Bitmap();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.init();
+ }
+
+ private function loadImg() : void
+ {
+ if(this.oldUrl != this._dataObject.iconPath)
+ {
+ this.oldUrl = this._dataObject.iconPath;
+ if(ImgCache.getInstance().getImg("pic/equip/" + this.oldUrl))
+ {
+ this.itemImg = new Bitmap();
+ this.itemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + this.oldUrl).bitmapData.clone();
+ this.setImgValue();
+ }
+ else
+ {
+ this.loader = new LoadResource("pic/equip/" + this.oldUrl,this.loadBack);
+ }
+ }
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ this.pngBg.clear();
+ this.itemImg = Bitmap(param1.target.loader.content);
+ ImgCache.getInstance().setImg(this.loader.url,this.itemImg);
+ this.loader.clear();
+ this.setImgValue();
+ }
+
+ private function setImgValue() : void
+ {
+ if(this._Container)
+ {
+ this.pngBg.addPng(this.itemImg);
+ this.itemImg.width = 55;
+ this.itemImg.height = 55;
+ }
+ }
+
+ private function init() : void
+ {
+ var _loc1_:TextFormat = null;
+ this.pngBg = new UIItem(42,42);
+ this._Container.addChild(this.pngBg);
+ this.pngBg.x = 10;
+ this.pngBg.y = 10;
+ _loc1_ = new TextFormat();
+ _loc1_.size = 14;
+ _loc1_.bold = true;
+ this.itemName = PublicMethod.getTextFieldWithFillter(16777215,180);
+ this._Container.addChild(this.itemName);
+ this.itemName.x = 74;
+ this.itemName.y = 10;
+ this.itemName.height = 26;
+ this.itemName.defaultTextFormat = _loc1_;
+ this.stongText = PublicMethod.getTextFieldWithFillter(16777215,180);
+ this._Container.addChild(this.stongText);
+ this.stongText.x = 74;
+ this.stongText.y = 55;
+ this.line1 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line1);
+ this.line1.x = 10;
+ this.line1.y = 80;
+ this.label1 = PublicMethod.getTextFieldWithFillter(16551717,70);
+ this._Container.addChild(this.label1);
+ this.label1.x = 10;
+ this.label1.y = this.line1.y + 5;
+ this.label1.text = "道具说明:";
+ this.itemContent = PublicMethod.getTextFieldWithFillter(16777215,240);
+ this.itemContent.x = 10;
+ this.itemContent.y = this.label1.y + 20;
+ this.itemContent.mouseEnabled = false;
+ this.itemContent.multiline = true;
+ this.itemContent.wordWrap = true;
+ this.itemContent.textColor = UIConfig.labelColor;
+ this.itemContent.autoSize = "left";
+ this.css = new TextFormat();
+ this.css.leading = 4;
+ this.css.align = "left";
+ this.itemContent.defaultTextFormat = this.css;
+ this._Container.addChild(this.itemContent);
+ this.line2 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line2);
+ this.line2.x = 10;
+ this.line2.y = this.itemContent.y + this.itemContent.height + 15;
+ this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ this._Container.addChild(this.label2);
+ this.label2.x = 10;
+ this.label2.y = this.line2.y + 5;
+ this.line3 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line3);
+ this.line3.x = 10;
+ this.line3.y = this.label2.y + this.label2.height;
+ this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ this._Container.addChild(this.label3);
+ this.label3.x = 10;
+ this.label3.y = this.line3.y + 5;
+ this.line4 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line4);
+ this.line4.x = 10;
+ this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ this._Container.addChild(this.label4);
+ this.label4.mouseEnabled = false;
+ this.label4.multiline = true;
+ this.label4.wordWrap = true;
+ this.label4.x = 10;
+ this.label4.defaultTextFormat = this.css;
+ this.line5 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line5);
+ this.line5.x = 10;
+ this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ this._Container.addChild(this.label5);
+ this.label5.mouseEnabled = false;
+ this.label5.multiline = true;
+ this.label5.wordWrap = true;
+ this.label5.x = 10;
+ this.label5.defaultTextFormat = this.css;
+ this.line6 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line6);
+ this.line6.x = 10;
+ this.label6 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ this._Container.addChild(this.label6);
+ this.label6.x = 10;
+ this.line7 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line7);
+ this.line7.x = 10;
+ this.label7 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ this._Container.addChild(this.label7);
+ this.label7.x = 10;
+ this.label7.mouseEnabled = false;
+ this.label7.multiline = true;
+ this.label7.wordWrap = true;
+ this.label7.defaultTextFormat = this.css;
+ this.setValue();
+ }
+
+ private function setValue() : void
+ {
+ var _loc6_:String = null;
+ var _loc7_:String = null;
+ var _loc8_:Object = null;
+ if(!this.isAddEvent)
+ {
+ this.isAddEvent = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ if(this._dataObject.showName)
+ {
+ this.itemName.htmlText = this._dataObject.showName;
+ }
+ else
+ {
+ this.itemName.htmlText = this._dataObject.name;
+ }
+ if(this._dataObject.JINGLIAN_LEVEL)
+ {
+ this.stongText.htmlText = this._dataObject.JINGLIAN_LEVEL;
+ }
+ else
+ {
+ this.stongText.htmlText = "";
+ }
+ this.loadImg();
+ var _loc1_:String = "";
+ if(this._dataObject.desc)
+ {
+ _loc1_ = this._dataObject.desc;
+ }
+ else
+ {
+ _loc1_ = this._dataObject.itemDesc;
+ }
+ this.itemContent.htmlText = _loc1_;
+ this.itemContent.height = this.itemContent.textHeight + 10;
+ var _loc2_:int = this.itemContent.y + this.itemContent.height + 10;
+ if(this._dataObject.band)
+ {
+ this.line2.visible = true;
+ this.label2.visible = true;
+ this.line2.y = _loc2_;
+ this.label2.htmlText = "绑定:" + this._dataObject.band + "";
+ this.label2.y = this.line2.y + 5;
+ _loc2_ += 25;
+ }
+ else
+ {
+ this.line2.visible = false;
+ this.label2.visible = false;
+ }
+ if(this._dataObject.heroLevel != null)
+ {
+ this.line3.visible = true;
+ this.label3.visible = true;
+ this.line3.y = _loc2_;
+ this.label3.htmlText = this._dataObject.heroLevel;
+ this.label3.y = this.line3.y + 5;
+ _loc2_ += 25;
+ }
+ else
+ {
+ this.line3.visible = false;
+ this.label3.visible = false;
+ }
+ var _loc3_:Array = this._dataObject.equipPropertyList as Array;
+ if(_loc3_ != null && _loc3_.length > 0)
+ {
+ _loc6_ = "";
+ for each(_loc7_ in _loc3_)
+ {
+ _loc6_ = _loc6_ + _loc7_ + "
";
+ }
+ this.line4.visible = true;
+ this.label4.visible = true;
+ this.line4.y = _loc2_;
+ this.label4.htmlText = _loc6_;
+ this.label4.y = this.line4.y + 5;
+ this.label4.height = this.label4.textHeight + 10;
+ _loc2_ += this.label4.height;
+ }
+ else
+ {
+ this.line4.visible = false;
+ this.label4.visible = false;
+ }
+ var _loc4_:String = "";
+ if(this._dataObject.currHole >= 0)
+ {
+ _loc4_ = "已镶嵌宝石 " + this._dataObject.currHole + "/3
";
+ }
+ var _loc5_:Array = this._dataObject.gemList as Array;
+ if(_loc5_)
+ {
+ for each(_loc8_ in _loc5_)
+ {
+ if(_loc8_ != null)
+ {
+ _loc4_ = _loc4_ + _loc8_.name + "
" + _loc8_.toolTip.explain + "
";
+ }
+ }
+ }
+ if(_loc4_ == "")
+ {
+ this.line5.visible = false;
+ this.label5.visible = false;
+ }
+ else
+ {
+ this.line5.visible = true;
+ this.label5.visible = true;
+ this.line5.y = _loc2_;
+ this.label5.htmlText = _loc4_;
+ this.label5.y = this.line5.y + 5;
+ this.label5.height = this.label5.textHeight + 10;
+ _loc2_ += this.label5.height;
+ }
+ if(this._dataObject.sellPrice)
+ {
+ this.line6.visible = true;
+ this.label6.visible = true;
+ this.line6.y = _loc2_;
+ this.label6.htmlText = "卖价:" + this._dataObject.sellPrice + "";
+ this.label6.y = this.line6.y + 5;
+ _loc2_ += 25;
+ }
+ else
+ {
+ this.line6.visible = false;
+ this.label6.visible = false;
+ }
+ this.line7.y = _loc2_;
+ this.label7.y = this.line7.y + 5;
+ this.label7.htmlText = "(按住Ctrl键或Shift键后单击鼠标发送到当前频道,国家频道消耗一个小喇叭)";
+ this.label7.height = this.label7.textHeight + 10;
+ _loc2_ += 40;
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this._table_bg = new Scale9Grid(this._bgSprite,240,_loc2_);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ public function setTipData(param1:Object) : void
+ {
+ this._dataObject = param1;
+ this.setValue();
+ }
+
+ public function destroyTip() : void
+ {
+ if(!this.isAddEvent)
+ {
+ return;
+ }
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = int(this._range.mouseY - this._Container.height - 10);
+ }
+ else
+ {
+ this._Container.y = int(this._range.mouseY + 20);
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = int(this._range.stageWidth - this._Container.width);
+ }
+ else
+ {
+ this._Container.x = int(this._range.mouseX);
+ }
+ if(this._Container.y < 0)
+ {
+ this._Container.y = 0;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/JewTip.as b/flash_decompiled/com/view/tip/JewTip.as
new file mode 100644
index 0000000..5e995d8
--- /dev/null
+++ b/flash_decompiled/com/view/tip/JewTip.as
@@ -0,0 +1,197 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.Bitmap;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class JewTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _dataObject:Object;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var itemImg:Bitmap;
+
+ private var loader:LoadResource;
+
+ private var itemName:TextField;
+
+ private var itemContent:TextField;
+
+ private var efficiencyText:TextField;
+
+ private var isAddEvent:Boolean;
+
+ public function JewTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object)
+ {
+ super();
+ this.itemImg = new Bitmap();
+ this._dataObject = param4;
+ this.loadImg();
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.isAddEvent = true;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function loadImg() : void
+ {
+ var _loc1_:String = "pic/equip/" + this._dataObject.iconPath;
+ this.loader = new LoadResource(_loc1_,this.loadBack);
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ if(Boolean(this.itemImg) && Boolean(this._Container) && this._Container.contains(this.itemImg))
+ {
+ this._Container.removeChild(this.itemImg);
+ }
+ this.itemImg = Bitmap(param1.target.loader.content);
+ this.loader.clear();
+ if(this._Container)
+ {
+ this._Container.addChild(this.itemImg);
+ this.itemImg.x = 10;
+ this.itemImg.y = 10;
+ this.itemImg.width = 30;
+ this.itemImg.height = 30;
+ }
+ }
+
+ private function init() : void
+ {
+ var _loc1_:int = 0;
+ this.itemName = PublicMethod.getTextFieldWithFillter(16777215,150);
+ this._Container.addChild(this.itemName);
+ this.itemName.x = 50;
+ this.itemName.y = 15;
+ this.itemName.htmlText = this._dataObject.name;
+ _loc1_ = 50;
+ this.itemContent = this.createTextField(this._dataObject.explain);
+ this._Container.addChild(this.itemContent);
+ this.itemContent.x = 10;
+ this.itemContent.y = _loc1_;
+ _loc1_ = _loc1_ + this.itemContent.height + 5;
+ var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(16777215,100);
+ _loc2_.text = "绑定:已绑定";
+ this._Container.addChild(_loc2_);
+ _loc2_.x = 10;
+ _loc2_.y = _loc1_;
+ _loc1_ += 25;
+ var _loc3_:String = "(按住Ctrl键或Shift键后单击鼠标发送到当前频道,国家频道消耗一个小喇叭)";
+ var _loc4_:TextField = this.createTextField(_loc3_);
+ this._Container.addChild(_loc4_);
+ _loc4_.x = 10;
+ _loc4_.y = _loc1_;
+ _loc1_ += _loc4_.height;
+ var _loc5_:Sprite = new Scale9Grid(this._bgSprite,240,_loc1_);
+ this._Container.addChildAt(_loc5_,0);
+ }
+
+ public function setTipData(param1:Object) : void
+ {
+ var _loc2_:String = this._dataObject.iconPath;
+ this._dataObject = param1;
+ if(this._dataObject.iconPath != _loc2_)
+ {
+ this.loadImg();
+ }
+ this.itemName.htmlText = this._dataObject.name;
+ this.itemContent.htmlText = this._dataObject.explain;
+ if(!this.isAddEvent)
+ {
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ private function createTextField(param1:String) : TextField
+ {
+ var _loc2_:TextField = new TextField();
+ _loc2_.width = 240;
+ _loc2_.height = 20;
+ _loc2_.mouseEnabled = false;
+ _loc2_.multiline = true;
+ _loc2_.wordWrap = true;
+ _loc2_.textColor = 16777215;
+ _loc2_.htmlText = param1;
+ _loc2_.autoSize = "left";
+ _loc2_.height = _loc2_.textHeight + 10;
+ var _loc3_:TextFormat = new TextFormat();
+ _loc3_.font = "SimSun";
+ _loc3_.leading = 4;
+ _loc2_.defaultTextFormat = _loc3_;
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/KingItemTip.as b/flash_decompiled/com/view/tip/KingItemTip.as
new file mode 100644
index 0000000..45c347a
--- /dev/null
+++ b/flash_decompiled/com/view/tip/KingItemTip.as
@@ -0,0 +1,300 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.data.GameData;
+ import com.view.cache.ImgCache;
+ import com.view.ui.pak.data.PackItem;
+ import flash.display.Bitmap;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class KingItemTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _dataObject:PackItem;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var itemImg:Bitmap;
+
+ private var loader:LoadResource;
+
+ private var oldUrl:String;
+
+ private var css:TextFormat;
+
+ private var tr:Sprite;
+
+ private var liuyuText:TextField;
+
+ private var itemContent:TextField;
+
+ private var itemName:TextField;
+
+ private var _table_bg:Sprite;
+
+ private var isAddEvent:Boolean;
+
+ public function KingItemTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:PackItem)
+ {
+ super();
+ this.itemImg = new Bitmap();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.init();
+ }
+
+ private function loadImg() : void
+ {
+ if(this.oldUrl != this._dataObject.viewMap.iconPath)
+ {
+ this.oldUrl = this._dataObject.viewMap.iconPath;
+ if(ImgCache.getInstance().getImg(ServerConfig.IMAGE_ITEM_URL + this.oldUrl))
+ {
+ this.itemImg = new Bitmap();
+ this.itemImg.bitmapData = ImgCache.getInstance().getImg(ServerConfig.IMAGE_ITEM_URL + this.oldUrl).bitmapData.clone();
+ this.setImgValue();
+ }
+ else
+ {
+ this.loader = new LoadResource(ServerConfig.IMAGE_ITEM_URL + this.oldUrl,this.loadBack);
+ }
+ }
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ if(Boolean(this._Container) && this._Container.contains(this.itemImg))
+ {
+ this._Container.removeChild(this.itemImg);
+ }
+ this.itemImg = Bitmap(param1.target.loader.content);
+ this.loader.clear();
+ this.setImgValue();
+ }
+
+ private function setImgValue() : void
+ {
+ if(this._Container)
+ {
+ this._Container.addChild(this.itemImg);
+ this.itemImg.x = 10;
+ this.itemImg.y = 10;
+ this.itemImg.width = 30;
+ this.itemImg.height = 30;
+ }
+ }
+
+ private function init() : void
+ {
+ this.itemName = PublicMethod.getTextField(16777215,200);
+ this._Container.addChild(this.itemName);
+ this.itemName.x = 50;
+ this.itemName.y = 15;
+ this.itemContent = new TextField();
+ this.itemContent.x = 10;
+ this.itemContent.y = 50;
+ this.itemContent.width = 240;
+ this.itemContent.mouseEnabled = false;
+ this.itemContent.multiline = true;
+ this.itemContent.wordWrap = true;
+ this.itemContent.textColor = 16777215;
+ this.itemContent.autoSize = "left";
+ this.css = new TextFormat();
+ this.css.leading = 7;
+ this.css.align = "left";
+ this.itemContent.defaultTextFormat = this.css;
+ this._Container.addChild(this.itemContent);
+ this.tr = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.tr);
+ this.tr.x = 10;
+ this.liuyuText = new TextField();
+ this.liuyuText.x = 10;
+ this.liuyuText.y = 50;
+ this.liuyuText.width = 240;
+ this.liuyuText.mouseEnabled = false;
+ this.liuyuText.multiline = true;
+ this.liuyuText.wordWrap = true;
+ this.liuyuText.textColor = 16776960;
+ this.liuyuText.autoSize = "left";
+ this.liuyuText.defaultTextFormat = this.css;
+ this._Container.addChild(this.liuyuText);
+ this.setValue();
+ }
+
+ private function setValue() : void
+ {
+ var _loc4_:int = 0;
+ var _loc5_:int = 0;
+ var _loc6_:int = 0;
+ var _loc7_:int = 0;
+ var _loc8_:int = 0;
+ var _loc9_:String = null;
+ var _loc10_:Object = null;
+ var _loc11_:Object = null;
+ var _loc12_:Object = null;
+ var _loc13_:Object = null;
+ if(!this.isAddEvent)
+ {
+ this.isAddEvent = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ this.itemName.htmlText = this._dataObject.viewMap.showName + " +" + this._dataObject.level;
+ this.loadImg();
+ var _loc1_:String = this._dataObject.viewMap.desc + "
";
+ if(this._dataObject.currDesc)
+ {
+ _loc1_ += this._dataObject.currDesc;
+ }
+ this.itemContent.htmlText = _loc1_;
+ this.itemContent.height = this.itemContent.textHeight + 10;
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this.tr.y = this.itemContent.y + this.itemContent.height + 5;
+ this.liuyuText.y = this.tr.y + 5;
+ var _loc2_:Object = this._dataObject.liuyu;
+ var _loc3_:String = "已镶嵌琉玉:";
+ if(_loc2_ == null)
+ {
+ _loc3_ += "0/4";
+ _loc3_ += "
孔1:无
孔2:无
孔3:无
孔4:无";
+ }
+ else
+ {
+ _loc4_ = int(_loc2_.roleId1);
+ _loc5_ = int(_loc2_.roleId2);
+ _loc6_ = int(_loc2_.roleId3);
+ _loc7_ = int(_loc2_.roleId4);
+ _loc8_ = 0;
+ _loc9_ = "";
+ if(_loc4_ > 0)
+ {
+ _loc10_ = GameData.getItemByEntId(_loc4_);
+ _loc8_ += 1;
+ _loc9_ = "孔1:" + _loc10_.name;
+ }
+ else
+ {
+ _loc9_ = "孔1:无";
+ }
+ if(_loc5_ > 0)
+ {
+ _loc11_ = GameData.getItemByEntId(_loc5_);
+ _loc8_ += 1;
+ _loc9_ = _loc9_ + "
孔2:" + _loc11_.name;
+ }
+ else
+ {
+ _loc9_ += "
孔2:无";
+ }
+ if(_loc6_ > 0)
+ {
+ _loc12_ = GameData.getItemByEntId(_loc6_);
+ _loc8_ += 1;
+ _loc9_ = _loc9_ + "
孔3:" + _loc12_.name;
+ }
+ else
+ {
+ _loc9_ += "
孔3:无";
+ }
+ if(_loc7_ > 0)
+ {
+ _loc13_ = GameData.getItemByEntId(_loc7_);
+ _loc8_ += 1;
+ _loc9_ = _loc9_ + "
孔4:" + _loc13_.name;
+ }
+ else
+ {
+ _loc9_ += "
孔4:无";
+ }
+ _loc3_ = _loc3_ + _loc8_ + "/4
";
+ _loc3_ += _loc9_;
+ }
+ this.liuyuText.htmlText = _loc3_;
+ this.liuyuText.height = this.liuyuText.textHeight + 10;
+ this._table_bg = new Scale9Grid(this._bgSprite,240,this.itemContent.height + this.liuyuText.height + 50);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ public function setTipData(param1:PackItem) : void
+ {
+ this._dataObject = param1;
+ this.setValue();
+ }
+
+ public function destroyTip() : void
+ {
+ if(!this.isAddEvent)
+ {
+ return;
+ }
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/MineTip.as b/flash_decompiled/com/view/tip/MineTip.as
new file mode 100644
index 0000000..4191cee
--- /dev/null
+++ b/flash_decompiled/com/view/tip/MineTip.as
@@ -0,0 +1,177 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class MineTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _dataObject:Object;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var label1:TextField;
+
+ private var label2:TextField;
+
+ private var label3:TextField;
+
+ private var isAddEvent:Boolean;
+
+ public function MineTip(param1:DisplayObject, param2:Stage, param3:Sprite)
+ {
+ super();
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.init();
+ }
+
+ private function init() : void
+ {
+ var _loc1_:Sprite = new Scale9Grid(this._bgSprite,200,75);
+ this._Container.addChild(_loc1_);
+ this.label1 = PublicMethod.getTextFieldWithFillter(16551717,160);
+ this._Container.addChild(this.label1);
+ this.label1.x = 10;
+ this.label1.y = 10;
+ this.label2 = PublicMethod.getTextFieldWithFillter(16551717,200);
+ this._Container.addChild(this.label2);
+ this.label2.x = this.label1.x;
+ this.label2.y = this.label1.y + 30;
+ this.label3 = PublicMethod.getTextFieldWithFillter(16551717,200);
+ this._Container.addChild(this.label3);
+ this.label3.x = this.label1.x;
+ this.label3.y = this.label2.y + 30;
+ }
+
+ private function setValue() : void
+ {
+ if(!this.isAddEvent)
+ {
+ this.isAddEvent = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ this.label1.htmlText = "矿场名称:" + this._dataObject.mineName + "";
+ if(this._dataObject.userId > 0)
+ {
+ this.label2.htmlText = "矿 场 主:" + this._dataObject.userName + "";
+ }
+ else
+ {
+ this.label2.htmlText = "矿 场 主:无";
+ }
+ this.label3.htmlText = "矿场说明:每小时产量 " + this._dataObject.product + " 个";
+ }
+
+ private function getMineName() : String
+ {
+ var _loc1_:String = null;
+ switch(this._dataObject.type)
+ {
+ case 1:
+ _loc1_ = "舒雪丹矿场";
+ break;
+ case 2:
+ _loc1_ = "战旗令矿场";
+ break;
+ case 3:
+ _loc1_ = "元宝矿";
+ break;
+ case 4:
+ _loc1_ = "16宝石矿";
+ break;
+ case 5:
+ _loc1_ = "宠物仙丹矿";
+ break;
+ case 6:
+ _loc1_ = "天赋丹矿";
+ break;
+ case 7:
+ _loc1_ = "仁义丹矿";
+ break;
+ case 8:
+ _loc1_ = "一级图纸矿";
+ }
+ return _loc1_;
+ }
+
+ public function setTipData(param1:Object) : void
+ {
+ this._dataObject = param1;
+ this.setValue();
+ }
+
+ public function destroyTip() : void
+ {
+ if(!this.isAddEvent)
+ {
+ return;
+ }
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = int(this._range.mouseY - this._Container.height - 10);
+ }
+ else
+ {
+ this._Container.y = int(this._range.mouseY + 20);
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = int(this._range.stageWidth - this._Container.width);
+ }
+ else
+ {
+ this._Container.x = int(this._range.mouseX);
+ }
+ if(this._Container.y < 0)
+ {
+ this._Container.y = 0;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/MulTipTitle.as b/flash_decompiled/com/view/tip/MulTipTitle.as
new file mode 100644
index 0000000..e1b7762
--- /dev/null
+++ b/flash_decompiled/com/view/tip/MulTipTitle.as
@@ -0,0 +1,137 @@
+package com.view.tip
+{
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.newui.UIConfig;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class MulTipTitle extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _content:String;
+
+ private var _displayObject:DisplayObject;
+
+ private var _bgSprite:Sprite;
+
+ private var _table_bg:Sprite;
+
+ private var isAddEvent:Boolean;
+
+ private var textWidth:int;
+
+ private var contentText:TextField;
+
+ private var css:TextFormat;
+
+ public function MulTipTitle(param1:DisplayObject, param2:Stage, param3:Sprite, param4:String, param5:int = 200)
+ {
+ super();
+ this.textWidth = param5;
+ this._content = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.isAddEvent = true;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function init() : void
+ {
+ this.contentText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,this.textWidth);
+ this.contentText.autoSize = "left";
+ this.contentText.multiline = true;
+ this.contentText.wordWrap = true;
+ this.contentText.x = 10;
+ this.contentText.y = 10;
+ this.css = new TextFormat();
+ this.css.leading = 4;
+ this._Container.addChild(this.contentText);
+ this.setValue(this._content);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ public function setValue(param1:String) : void
+ {
+ this._content = param1;
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this.contentText.htmlText = this._content;
+ this.contentText.setTextFormat(this.css);
+ this.contentText.height = this.contentText.textHeight + 4;
+ this._table_bg = new Scale9Grid(this._bgSprite,this.textWidth - 3,this.contentText.height);
+ this._Container.addChildAt(this._table_bg,0);
+ if(!this.isAddEvent)
+ {
+ this.isAddEvent = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(this.isAddEvent == false)
+ {
+ return;
+ }
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/NewBuildTip.as b/flash_decompiled/com/view/tip/NewBuildTip.as
new file mode 100644
index 0000000..dd513ab
--- /dev/null
+++ b/flash_decompiled/com/view/tip/NewBuildTip.as
@@ -0,0 +1,376 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.data.MemeberShip;
+ import com.data.data.city.Building;
+ import com.data.data.city.CastleBuilding;
+ import com.data.data.city.EntityConsume;
+ import com.data.data.city.EntityLimit;
+ import com.newdata.user.NewRes;
+ import com.newdata.user.NewUserData;
+ import com.view.cache.BuildCache;
+ import flash.display.DisplayObject;
+ import flash.display.Shape;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class NewBuildTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var bg:Sprite;
+
+ private var title_txt:TextField;
+
+ private var tip_txt:TextField;
+
+ private var ias:Object;
+
+ private var _range:Stage;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _buildObj:Building;
+
+ private var _bgSprite:Sprite;
+
+ private var buildTime:TextField;
+
+ private var lin_2:Shape;
+
+ private var buildTimeTitle:TextField;
+
+ private var _table_bg:Sprite;
+
+ private var redCss:TextFormat;
+
+ private var whiteCss:TextFormat;
+
+ private var food_2:TextField;
+
+ private var food_3:TextField;
+
+ private var wood_2:TextField;
+
+ private var wood_3:TextField;
+
+ private var tone_2:TextField;
+
+ private var tone_3:TextField;
+
+ private var iron_2:TextField;
+
+ private var iron_3:TextField;
+
+ private var bgHeight:int;
+
+ private var bgWidth:int = 300;
+
+ public function NewBuildTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Building)
+ {
+ super();
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this._buildObj = param4;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function init() : void
+ {
+ var _loc1_:TextFormat = null;
+ var _loc6_:Shape = null;
+ var _loc7_:int = 0;
+ var _loc8_:EntityLimit = null;
+ var _loc9_:int = 0;
+ var _loc10_:int = 0;
+ var _loc11_:NewRes = null;
+ var _loc12_:EntityConsume = null;
+ var _loc13_:Shape = null;
+ var _loc14_:TextField = null;
+ var _loc15_:TextField = null;
+ var _loc16_:TextField = null;
+ var _loc17_:TextField = null;
+ var _loc18_:TextField = null;
+ var _loc19_:TextField = null;
+ var _loc20_:TextField = null;
+ var _loc21_:CastleBuilding = null;
+ var _loc22_:TextField = null;
+ var _loc23_:TextField = null;
+ var _loc24_:TextField = null;
+ this.redCss = new TextFormat();
+ this.redCss.color = 16711680;
+ this.redCss.font = "Arial";
+ this.redCss.size = 12;
+ this.redCss.bold = false;
+ this.whiteCss = new TextFormat();
+ this.whiteCss.color = 16777215;
+ this.whiteCss.font = "Arial";
+ this.whiteCss.size = 12;
+ this.whiteCss.bold = false;
+ _loc1_ = new TextFormat();
+ _loc1_.color = 16777215;
+ _loc1_.size = 12;
+ _loc1_.bold = false;
+ var _loc2_:TextFormat = new TextFormat();
+ _loc2_.color = 16776960;
+ _loc2_.size = 14;
+ _loc2_.bold = true;
+ this.title_txt = new TextField();
+ this.title_txt.width = 100;
+ this.title_txt.height = 20;
+ this.title_txt.defaultTextFormat = _loc2_;
+ this.title_txt.mouseEnabled = false;
+ this.title_txt.text = "建造" + this._buildObj.buiName;
+ this.title_txt.autoSize = "left";
+ this.title_txt.x = 12;
+ this.title_txt.y = 12;
+ this._Container.addChild(this.title_txt);
+ this.tip_txt = new TextField();
+ this.tip_txt.width = 305;
+ this.tip_txt.defaultTextFormat = _loc1_;
+ this.tip_txt.mouseEnabled = false;
+ this.tip_txt.text = this._buildObj.buiDesc;
+ this.tip_txt.autoSize = "left";
+ this.tip_txt.multiline = true;
+ this.tip_txt.wordWrap = true;
+ this.tip_txt.x = this.title_txt.x;
+ this.tip_txt.y = this.title_txt.height + this.title_txt.y + 5;
+ this._Container.addChild(this.tip_txt);
+ var _loc3_:TextField = this.createNewTextField("建造条件");
+ _loc3_.x = this.title_txt.x;
+ _loc3_.y = this.tip_txt.y + this.tip_txt.height + 5;
+ var _loc4_:TextField = this.createNewTextField("需要前提");
+ _loc4_.x = _loc3_.x + _loc3_.width;
+ _loc4_.y = _loc3_.y;
+ var _loc5_:TextField = this.createNewTextField("当前前提");
+ _loc5_.x = _loc4_.x + _loc4_.width;
+ _loc5_.y = _loc3_.y;
+ this._Container.addChild(_loc3_);
+ this._Container.addChild(_loc4_);
+ this._Container.addChild(_loc5_);
+ _loc3_.setTextFormat(this.whiteCss);
+ _loc4_.setTextFormat(this.whiteCss);
+ _loc5_.setTextFormat(this.whiteCss);
+ this.bgHeight = this.title_txt.y + this.title_txt.height + this.tip_txt.height + _loc3_.height + 12;
+ _loc6_ = PublicMethod.drawLine(0,0,this.bgWidth,0,16777215);
+ this._Container.addChild(_loc6_);
+ _loc6_.x = this.title_txt.x;
+ _loc6_.y = this.bgHeight;
+ this.bgHeight += 2;
+ for each(_loc8_ in this._buildObj.entityLimitList)
+ {
+ _loc18_ = this.createNewTextField("前提建筑");
+ _loc19_ = this.createNewTextField(_loc8_.needEntName + "(等级" + _loc8_.needLevel + ")");
+ if(_loc8_.needEntId == 90000004)
+ {
+ _loc7_ = MemeberShip.getMainCastle().casLv;
+ _loc20_ = this.createNewTextField(_loc7_ + "");
+ }
+ else
+ {
+ _loc21_ = BuildCache.getInstance().getCastleBuildingByEntid(InstallFace.getInstance().currCasId,_loc8_.needEntId);
+ if(_loc21_)
+ {
+ _loc7_ = _loc21_.level;
+ }
+ else
+ {
+ _loc7_ = 0;
+ }
+ _loc20_ = this.createNewTextField(_loc7_ + "");
+ }
+ this._Container.addChild(_loc18_);
+ this._Container.addChild(_loc19_);
+ this._Container.addChild(_loc20_);
+ _loc18_.x = this.title_txt.x;
+ _loc18_.y = this.bgHeight;
+ _loc18_.setTextFormat(this.whiteCss);
+ _loc19_.x = _loc18_.x + _loc18_.width;
+ _loc19_.y = _loc18_.y;
+ _loc19_.setTextFormat(this.whiteCss);
+ _loc20_.x = _loc19_.x + _loc19_.width;
+ _loc20_.y = _loc18_.y;
+ if(_loc7_ < _loc8_.needLevel)
+ {
+ _loc20_.setTextFormat(this.redCss);
+ }
+ else
+ {
+ _loc20_.setTextFormat(this.whiteCss);
+ }
+ this.bgHeight += _loc18_.height;
+ }
+ _loc11_ = NewUserData.getRes();
+ for each(_loc12_ in this._buildObj.entityConsumeList)
+ {
+ if(_loc12_.needEntId != 90000001)
+ {
+ _loc22_ = this.createNewTextField(_loc12_.needEntName);
+ _loc23_ = this.createNewTextField(_loc12_.needEntNum + "");
+ if(_loc12_.needEntId == 20100001)
+ {
+ _loc10_ = int(_loc11_.moneyNum);
+ }
+ if(_loc12_.needEntId == 20100002)
+ {
+ _loc10_ = int(_loc11_.foodNum);
+ }
+ if(_loc12_.needEntId == 20100003)
+ {
+ _loc10_ = int(_loc11_.woodNum);
+ }
+ if(_loc12_.needEntId == 20100004)
+ {
+ _loc10_ = int(_loc11_.stoneNum);
+ }
+ if(_loc12_.needEntId == 20100005)
+ {
+ _loc10_ = int(_loc11_.bronzeNum);
+ }
+ _loc24_ = this.createNewTextField(_loc10_ + "");
+ this._Container.addChild(_loc22_);
+ this._Container.addChild(_loc23_);
+ this._Container.addChild(_loc24_);
+ _loc22_.x = this.title_txt.x;
+ _loc22_.y = this.bgHeight;
+ _loc22_.setTextFormat(this.whiteCss);
+ _loc23_.x = _loc22_.x + _loc22_.width;
+ _loc23_.y = _loc22_.y;
+ _loc23_.setTextFormat(this.whiteCss);
+ _loc24_.x = _loc23_.x + _loc23_.width;
+ _loc24_.y = _loc22_.y;
+ if(_loc10_ < _loc12_.needEntNum)
+ {
+ _loc24_.setTextFormat(this.redCss);
+ }
+ else
+ {
+ _loc24_.setTextFormat(this.whiteCss);
+ }
+ this.bgHeight += _loc22_.height;
+ }
+ else
+ {
+ _loc9_ = _loc12_.needEntNum;
+ }
+ }
+ this.bgHeight += 2;
+ _loc13_ = PublicMethod.drawLine(0,0,this.bgWidth,0,16777215);
+ this._Container.addChild(_loc13_);
+ _loc13_.x = this.title_txt.x;
+ _loc13_.y = this.bgHeight;
+ this.bgHeight += 4;
+ _loc14_ = this.createNewTextField("原始耗时");
+ _loc14_.x = this.title_txt.x;
+ _loc14_.y = this.bgHeight;
+ _loc15_ = this.createNewTextField(_loc9_ + "");
+ _loc15_.x = _loc14_.x + _loc14_.width;
+ _loc15_.y = _loc14_.y;
+ this.bgHeight += _loc14_.height;
+ this._Container.addChild(_loc14_);
+ this._Container.addChild(_loc15_);
+ _loc14_.setTextFormat(this.whiteCss);
+ _loc15_.setTextFormat(this.whiteCss);
+ _loc16_ = this.createNewTextField("实际耗时");
+ _loc16_.x = this.title_txt.x;
+ _loc16_.y = this.bgHeight;
+ _loc17_ = this.createNewTextField(this._buildObj.buildTime + "");
+ _loc17_.x = _loc16_.x + _loc16_.width;
+ _loc17_.y = _loc16_.y;
+ this.bgHeight += 2;
+ this._Container.addChild(_loc16_);
+ this._Container.addChild(_loc17_);
+ _loc16_.setTextFormat(this.whiteCss);
+ _loc17_.setTextFormat(this.whiteCss);
+ this._table_bg = new Scale9Grid(this._bgSprite,310,this.bgHeight + 20);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ public function setData(param1:Building) : void
+ {
+ this._buildObj = param1;
+ this.setValue();
+ }
+
+ private function setValue() : void
+ {
+ this.title_txt.text = "建造" + this._buildObj.buiName;
+ this.tip_txt.text = this._buildObj.buiDesc;
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ public function addTip() : void
+ {
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function createNewTextField(param1:String) : TextField
+ {
+ var _loc2_:TextField = new TextField();
+ _loc2_.width = 100;
+ _loc2_.height = 20;
+ _loc2_.mouseEnabled = false;
+ _loc2_.text = param1;
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/PetItemTip.as b/flash_decompiled/com/view/tip/PetItemTip.as
new file mode 100644
index 0000000..9e4fde6
--- /dev/null
+++ b/flash_decompiled/com/view/tip/PetItemTip.as
@@ -0,0 +1,333 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.utils.Utils;
+ import com.view.cache.ImgCache;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIItem;
+ import com.view.ui.pak.data.PackItem;
+ import com.view.ui.user.data.UserPetItem;
+ import flash.display.Bitmap;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class PetItemTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var itemImg:Bitmap;
+
+ private var _dataObject:PackItem;
+
+ private var _bgSprite:Sprite;
+
+ private var _displayObject:DisplayObject;
+
+ private var _range:Stage;
+
+ private var _petItem:UserPetItem;
+
+ private var pngBg:UIItem;
+
+ private var loader:LoadResource;
+
+ private var oldUrl:String;
+
+ private var css:TextFormat;
+
+ private var itemContent:TextField;
+
+ private var itemName:TextField;
+
+ private var roleText:TextField;
+
+ private var _table_bg:Sprite;
+
+ private var line1:Sprite;
+
+ private var line2:Sprite;
+
+ private var line3:Sprite;
+
+ private var label1:TextField;
+
+ private var label2:TextField;
+
+ private var label3:TextField;
+
+ private var label4:TextField;
+
+ private var isAddEvent:Boolean;
+
+ public function PetItemTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:PackItem, param5:UserPetItem)
+ {
+ super();
+ this.itemImg = new Bitmap();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this._petItem = param5;
+ this.init();
+ }
+
+ private function loadImg() : void
+ {
+ if(this.oldUrl != this._dataObject.viewMap.iconPath)
+ {
+ this.oldUrl = this._dataObject.viewMap.iconPath;
+ if(ImgCache.getInstance().getImg(ServerConfig.IMAGE_ITEM_URL + this.oldUrl))
+ {
+ this.itemImg = new Bitmap();
+ this.itemImg.bitmapData = ImgCache.getInstance().getImg(ServerConfig.IMAGE_ITEM_URL + this.oldUrl).bitmapData.clone();
+ this.setImgValue();
+ }
+ else
+ {
+ this.loader = new LoadResource(ServerConfig.IMAGE_ITEM_URL + this.oldUrl,this.loadBack);
+ }
+ }
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ if(Boolean(this._Container) && this._Container.contains(this.itemImg))
+ {
+ this._Container.removeChild(this.itemImg);
+ }
+ this.itemImg = Bitmap(param1.target.loader.content);
+ ImgCache.getInstance().setImg(this.loader.url,this.itemImg);
+ this.loader.clear();
+ this.setImgValue();
+ }
+
+ private function setImgValue() : void
+ {
+ if(this._Container)
+ {
+ this.pngBg.addPng(this.itemImg);
+ this.itemImg.width = 55;
+ this.itemImg.height = 55;
+ }
+ }
+
+ private function init() : void
+ {
+ var _loc1_:TextFormat = null;
+ this.pngBg = new UIItem(42,42);
+ this._Container.addChild(this.pngBg);
+ this.pngBg.x = 10;
+ this.pngBg.y = 10;
+ _loc1_ = new TextFormat();
+ _loc1_.size = 14;
+ _loc1_.bold = true;
+ this.itemName = PublicMethod.getTextFieldWithFillter(16777215,180);
+ this._Container.addChild(this.itemName);
+ this.itemName.x = 74;
+ this.itemName.y = 10;
+ this.itemName.height = 26;
+ this.itemName.defaultTextFormat = _loc1_;
+ this.roleText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100);
+ this._Container.addChild(this.roleText);
+ this.roleText.x = 74;
+ this.roleText.y = 55;
+ this.line1 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line1);
+ this.line1.x = 10;
+ this.line1.y = 80;
+ this.label1 = PublicMethod.getTextFieldWithFillter(16551717,70);
+ this._Container.addChild(this.label1);
+ this.label1.x = 10;
+ this.label1.y = this.line1.y + 5;
+ this.label1.text = "道具说明:";
+ this.itemContent = new TextField();
+ this.itemContent.x = 10;
+ this.itemContent.y = this.label1.y + 20;
+ this.itemContent.width = 240;
+ this.itemContent.mouseEnabled = false;
+ this.itemContent.multiline = true;
+ this.itemContent.wordWrap = true;
+ this.itemContent.textColor = UIConfig.labelColor;
+ this.itemContent.autoSize = "left";
+ this.css = new TextFormat();
+ this.css.leading = 4;
+ this.css.font = "SimSun";
+ this.css.align = "left";
+ this.line2 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line2);
+ this.line2.x = 10;
+ this.label2 = PublicMethod.getTextFieldWithFillter(16551717,70);
+ this._Container.addChild(this.label2);
+ this.label2.x = 10;
+ this.label2.y = this.line2.y + 5;
+ this.label2.text = "镶嵌说明:";
+ this.label3 = new TextField();
+ this.label3.x = 10;
+ this.label3.y = this.label2.y + 5;
+ this.label3.height = 70;
+ this.label3.width = 240;
+ this.label3.mouseEnabled = false;
+ this.label3.multiline = true;
+ this.label3.wordWrap = true;
+ this.label3.textColor = UIConfig.labelColor;
+ this.label3.defaultTextFormat = this.css;
+ this._Container.addChild(this.label3);
+ this.line3 = PublicMethod.getTrLine(230);
+ this._Container.addChild(this.line3);
+ this.line3.x = 10;
+ this.line3.y = this.label3.y + this.label3.height;
+ this._Container.addChild(this.line3);
+ this.itemContent.defaultTextFormat = this.css;
+ this._Container.addChild(this.itemContent);
+ this.label4 = new TextField();
+ this.label4.x = 10;
+ this.label4.y = this.line3.y + 5;
+ this.label4.height = 40;
+ this.label4.width = 240;
+ this.label4.mouseEnabled = false;
+ this.label4.multiline = true;
+ this.label4.wordWrap = true;
+ this.label4.textColor = 16777215;
+ this.label4.defaultTextFormat = this.css;
+ this._Container.addChild(this.label4);
+ var _loc2_:String = "(按住Ctrl键或Shift键后单击鼠标发送到当前频道,国家频道消耗一个小喇叭)";
+ this.label4.htmlText = _loc2_;
+ this.setValue();
+ }
+
+ private function setValue() : void
+ {
+ var _loc3_:String = null;
+ if(!this.isAddEvent)
+ {
+ this.isAddEvent = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ this.itemName.htmlText = this._dataObject.viewMap.showName;
+ this.loadImg();
+ if(this._petItem == null)
+ {
+ this.roleText.text = "";
+ }
+ else
+ {
+ this.roleText.htmlText = "孔数:" + this._petItem.roles + "";
+ }
+ var _loc1_:int = 130;
+ var _loc2_:String = this._dataObject.viewMap.desc + "";
+ this.itemContent.htmlText = _loc2_;
+ this.itemContent.height = this.itemContent.textHeight + 10;
+ this.itemContent.htmlText = _loc2_;
+ _loc1_ += this.itemContent.height;
+ this.line2.y = this.itemContent.y + this.itemContent.height;
+ if(this._petItem == null)
+ {
+ this.label2.y = 5;
+ this.label3.y = 0;
+ this.label3.visible = false;
+ this.line3.visible = false;
+ this.label2.visible = false;
+ this.label4.y = this.line2.y + 5;
+ }
+ else
+ {
+ this.label2.y = this.line2.y + 5;
+ this.label3.y = this.label2.y + 20;
+ this.label3.visible = true;
+ this.line3.visible = true;
+ this.label2.visible = true;
+ _loc3_ = "孔1:" + Utils.getPetBaoshiPro(this._petItem.role1Obj1,this._dataObject.childType) + "
";
+ _loc3_ = _loc3_ + "孔2:" + Utils.getPetBaoshiPro(this._petItem.role1Obj2,this._dataObject.childType) + "
";
+ _loc3_ = _loc3_ + "孔3:" + Utils.getPetBaoshiPro(this._petItem.role1Obj3,this._dataObject.childType) + "
";
+ _loc3_ = _loc3_ + "孔4:" + Utils.getPetBaoshiPro(this._petItem.role1Obj4,this._dataObject.childType) + "
";
+ this.label3.htmlText = _loc3_;
+ _loc1_ += 100;
+ this.line3.y = this.label3.y + this.label3.height;
+ this.label4.y = this.line3.y + 5;
+ }
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this._table_bg = new Scale9Grid(this._bgSprite,240,_loc1_);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ public function setTipData(param1:PackItem, param2:UserPetItem) : void
+ {
+ this._dataObject = param1;
+ this._petItem = param2;
+ this.setValue();
+ }
+
+ public function destroyTip() : void
+ {
+ if(!this.isAddEvent)
+ {
+ return;
+ }
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ if(this._Container.y < 0)
+ {
+ this._Container.y = 0;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/PopTip.as b/flash_decompiled/com/view/tip/PopTip.as
new file mode 100644
index 0000000..5e6b527
--- /dev/null
+++ b/flash_decompiled/com/view/tip/PopTip.as
@@ -0,0 +1,191 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.tip.data.PopTipData;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class PopTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var title_txt:TextField;
+
+ private var _range:Stage;
+
+ private var _dataObject:PopTipData;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var _table_bg:Sprite;
+
+ private var css_title:TextFormat;
+
+ private var text_a_1:TextField;
+
+ private var text_a_2:TextField;
+
+ private var text_a_3:TextField;
+
+ private var text_a_4:TextField;
+
+ private var text_a_5:TextField;
+
+ private var _height:int;
+
+ public function PopTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:PopTipData)
+ {
+ super();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function init() : void
+ {
+ var _loc1_:TextField = null;
+ var _loc2_:TextField = null;
+ var _loc4_:TextField = null;
+ this.css_title = new TextFormat();
+ this.css_title.size = 12;
+ this.css_title.color = 11992901;
+ this.css_title.bold = true;
+ this.css_title.align = "center";
+ this.css_title.font = "SimSun";
+ this.title_txt = new TextField();
+ this.title_txt.width = 200;
+ this.title_txt.height = 20;
+ this.title_txt.mouseEnabled = false;
+ this.title_txt.text = "人口";
+ this.title_txt.x = 8;
+ this.title_txt.y = 6;
+ this.title_txt.setTextFormat(this.css_title);
+ this._Container.addChild(this.title_txt);
+ _loc1_ = PublicMethod.getTextFieldWithFillter(16551717,100);
+ _loc1_.text = "空闲人口";
+ _loc1_.x = this.title_txt.x;
+ _loc1_.y = this.title_txt.y + this.title_txt.height + 2;
+ this._Container.addChild(_loc1_);
+ this.text_a_1 = PublicMethod.getTextFieldWithFillter(16551717,100);
+ this._Container.addChild(this.text_a_1);
+ this.text_a_1.x = _loc1_.x + _loc1_.width;
+ this.text_a_1.y = _loc1_.y;
+ _loc2_ = PublicMethod.getTextFieldWithFillter(16551717,100);
+ _loc2_.text = "劳动人口";
+ _loc2_.x = this.title_txt.x;
+ _loc2_.y = _loc1_.y + _loc1_.height + 2;
+ this._Container.addChild(_loc2_);
+ this.text_a_2 = PublicMethod.getTextFieldWithFillter(16551717,100);
+ this._Container.addChild(this.text_a_2);
+ this.text_a_2.x = _loc2_.x + _loc2_.width;
+ this.text_a_2.y = _loc2_.y;
+ var _loc3_:Sprite = PublicMethod.getTrLine(195);
+ this._Container.addChild(_loc3_);
+ _loc3_.x = 7;
+ _loc3_.y = _loc2_.y + _loc2_.height + 2;
+ _loc4_ = PublicMethod.getTextFieldWithFillter(16551717,100);
+ _loc4_.text = "当前人口";
+ _loc4_.x = this.title_txt.x;
+ _loc4_.y = _loc2_.y + _loc2_.height + 6;
+ this._Container.addChild(_loc4_);
+ this.text_a_3 = PublicMethod.getTextFieldWithFillter(16551717,100);
+ this._Container.addChild(this.text_a_3);
+ this.text_a_3.x = _loc4_.x + _loc4_.width;
+ this.text_a_3.y = _loc4_.y;
+ var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(16551717,100);
+ _loc5_.text = "人口上限";
+ _loc5_.x = this.title_txt.x;
+ _loc5_.y = _loc4_.y + _loc4_.height + 2;
+ this._Container.addChild(_loc5_);
+ this.text_a_4 = PublicMethod.getTextFieldWithFillter(16551717,100);
+ this._Container.addChild(this.text_a_4);
+ this.text_a_4.x = _loc5_.x + _loc5_.width;
+ this.text_a_4.y = _loc5_.y;
+ this.text_a_5 = PublicMethod.getTextFieldWithFillter(16551717,200);
+ this._Container.addChild(this.text_a_5);
+ this.text_a_5.x = this.title_txt.x;
+ this.text_a_5.y = _loc5_.y + _loc5_.height + 2;
+ this.setData();
+ this._table_bg = new Scale9Grid(this._bgSprite,197,130);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function setData() : void
+ {
+ this.text_a_1.text = this._dataObject.idlePop.toString();
+ this.text_a_2.text = this._dataObject.foodPop.toString();
+ this.text_a_3.text = this._dataObject.currentPop.toString();
+ this.text_a_4.text = this._dataObject.popMax.toString();
+ this.text_a_5.text = this._dataObject.popStr;
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ public function setValue(param1:PopTipData) : void
+ {
+ this._dataObject = param1;
+ this.setData();
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/RangeTip.as b/flash_decompiled/com/view/tip/RangeTip.as
new file mode 100644
index 0000000..d91ad5c
--- /dev/null
+++ b/flash_decompiled/com/view/tip/RangeTip.as
@@ -0,0 +1,212 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.newui.UIConfig;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class RangeTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var title_txt:TextField;
+
+ private var _range:Stage;
+
+ private var _dataObject:Object;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var _table_bg:Sprite;
+
+ private var css_title:TextFormat;
+
+ private var curRange:TextField;
+
+ private var rangeInjured:TextField;
+
+ private var text_4:TextField;
+
+ private var text_5:TextField;
+
+ private var text_6:TextField;
+
+ public function RangeTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object)
+ {
+ super();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function init() : void
+ {
+ var _loc1_:TextField = null;
+ var _loc2_:TextField = null;
+ var _loc5_:TextFormat = null;
+ var _loc6_:TextField = null;
+ this.css_title = new TextFormat();
+ this.css_title.size = 12;
+ this.css_title.color = 11992901;
+ this.css_title.bold = true;
+ this.css_title.align = "center";
+ this.css_title.font = "SimSun";
+ this.title_txt = new TextField();
+ this.title_txt.width = 200;
+ this.title_txt.height = 20;
+ this.title_txt.mouseEnabled = false;
+ this.title_txt.text = "繁荣度";
+ this.title_txt.x = 8;
+ this.title_txt.y = 6;
+ this.title_txt.setTextFormat(this.css_title);
+ this._Container.addChild(this.title_txt);
+ _loc1_ = PublicMethod.getTextFieldWithFillter(16551717,100);
+ _loc1_.text = "繁荣度";
+ _loc1_.x = this.title_txt.x;
+ _loc1_.y = this.title_txt.y + this.title_txt.height + 2;
+ this._Container.addChild(_loc1_);
+ this.curRange = PublicMethod.getTextFieldWithFillter(16551717,100);
+ this._Container.addChild(this.curRange);
+ this.curRange.x = _loc1_.x + _loc1_.width;
+ this.curRange.y = _loc1_.y;
+ _loc2_ = PublicMethod.getTextFieldWithFillter(16551717,100);
+ _loc2_.text = "受损的繁荣度";
+ _loc2_.x = this.title_txt.x;
+ _loc2_.y = _loc1_.y + _loc1_.height + 2;
+ this._Container.addChild(_loc2_);
+ this.rangeInjured = PublicMethod.getTextFieldWithFillter(16551717,100);
+ this._Container.addChild(this.rangeInjured);
+ this.rangeInjured.x = _loc2_.x + _loc2_.width;
+ this.rangeInjured.y = _loc2_.y;
+ this.text_4 = PublicMethod.getTextFieldWithFillter(16551717,200);
+ this.text_4.autoSize = "left";
+ this.text_4.multiline = true;
+ this.text_4.wordWrap = true;
+ this.text_4.height = 36;
+ this.text_4.x = this.title_txt.x;
+ this.text_4.y = _loc2_.y + _loc2_.height + 2;
+ this._Container.addChild(this.text_4);
+ var _loc3_:Sprite = PublicMethod.getTrLine(196);
+ this._Container.addChild(_loc3_);
+ _loc3_.x = this.title_txt.x;
+ _loc3_.y = this.text_4.y + 36;
+ this.text_5 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200);
+ this.text_5.text = "1级城池的势力范围为5格";
+ this._Container.addChild(this.text_5);
+ this.text_5.x = this.title_txt.x;
+ this.text_5.y = _loc3_.y + 4;
+ this.text_6 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200);
+ this.text_6.text = "城池升级需要繁荣度达到1200";
+ this._Container.addChild(this.text_6);
+ this.text_6.x = this.title_txt.x;
+ this.text_6.y = this.text_5.y + this.text_5.height + 2;
+ this.setData();
+ var _loc4_:Sprite = PublicMethod.getTrLine(196);
+ this._Container.addChild(_loc4_);
+ _loc4_.x = this.title_txt.x;
+ _loc4_.y = this.text_6.y + this.text_6.height + 5;
+ _loc5_ = new TextFormat();
+ _loc5_.leading = 3;
+ _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200);
+ _loc6_.autoSize = "left";
+ _loc6_.multiline = true;
+ _loc6_.wordWrap = true;
+ _loc6_.x = this.title_txt.x;
+ _loc6_.y = _loc4_.y + 5;
+ _loc6_.defaultTextFormat = _loc5_;
+ this._Container.addChild(_loc6_);
+ _loc6_.text = "升级建筑可以增加繁荣度,繁荣度达到需求后可以点击右下方按钮升级城池。被玩家攻破城池会使繁荣度受损,严重时会使城池降级甚至流亡。受损的繁荣度会慢慢恢复,使用迁城令、开荒令或垦荒策略都可以快速恢复。";
+ this._table_bg = new Scale9Grid(this._bgSprite,197,_loc6_.y + _loc6_.height);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function setData() : void
+ {
+ this.curRange.text = this._dataObject.rangeValue;
+ var _loc1_:int = int(this._dataObject.rangeInjured);
+ this.rangeInjured.text = _loc1_.toString();
+ this.text_4.htmlText = this._dataObject.rangeTree;
+ this.text_5.text = this._dataObject.rangeLv + " 级城池的势力范围为 " + this._dataObject.cells + " 格";
+ this.text_6.text = "城池升级需要繁荣度达到 " + this._dataObject.rangeMax;
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ public function setValue(param1:Object) : void
+ {
+ this._dataObject = param1;
+ this.setData();
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function createNewTextField(param1:String) : TextField
+ {
+ var _loc2_:TextField = new TextField();
+ _loc2_.width = 100;
+ _loc2_.height = 20;
+ _loc2_.mouseEnabled = false;
+ _loc2_.text = param1;
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/ResourceTip.as b/flash_decompiled/com/view/tip/ResourceTip.as
new file mode 100644
index 0000000..810f731
--- /dev/null
+++ b/flash_decompiled/com/view/tip/ResourceTip.as
@@ -0,0 +1,193 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.tip.data.ResTipData;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class ResourceTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var title_txt:TextField;
+
+ private var _range:Stage;
+
+ private var _dataObject:ResTipData;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var _table_bg:Sprite;
+
+ private var css_title:TextFormat;
+
+ private var text_a_1:TextField;
+
+ private var text_a_2:TextField;
+
+ private var text_a_3:TextField;
+
+ private var text_a_4:TextField;
+
+ private var _height:int;
+
+ public function ResourceTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:ResTipData)
+ {
+ super();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function init() : void
+ {
+ var _loc1_:TextField = null;
+ var _loc2_:TextField = null;
+ this.css_title = new TextFormat();
+ this.css_title.size = 12;
+ this.css_title.color = 11992901;
+ this.css_title.bold = true;
+ this.css_title.align = "center";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(11992901,100);
+ this.title_txt.width = 200;
+ this.title_txt.height = 20;
+ this.title_txt.mouseEnabled = false;
+ this.title_txt.text = this._dataObject.title;
+ this.title_txt.x = 8;
+ this.title_txt.y = 6;
+ this.title_txt.setTextFormat(this.css_title);
+ this._Container.addChild(this.title_txt);
+ _loc1_ = PublicMethod.getTextFieldWithFillter(16551717,100);
+ _loc1_.text = this._dataObject.resName;
+ _loc1_.x = this.title_txt.x;
+ _loc1_.y = this.title_txt.y + this.title_txt.height + 2;
+ this._Container.addChild(_loc1_);
+ this.text_a_1 = PublicMethod.getTextFieldWithFillter(16551717,100);
+ this._Container.addChild(this.text_a_1);
+ this.text_a_1.x = _loc1_.x + _loc1_.width;
+ this.text_a_1.y = _loc1_.y;
+ _loc2_ = PublicMethod.getTextFieldWithFillter(16551717,100);
+ _loc2_.text = "储存空间";
+ _loc2_.x = this.title_txt.x;
+ _loc2_.y = _loc1_.y + _loc1_.height + 2;
+ this._Container.addChild(_loc2_);
+ this.text_a_2 = PublicMethod.getTextFieldWithFillter(16551717,100);
+ this._Container.addChild(this.text_a_2);
+ this.text_a_2.x = _loc2_.x + _loc2_.width;
+ this.text_a_2.y = _loc2_.y;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(16551717,100);
+ _loc3_.text = "当前可征收数量";
+ _loc3_.x = this.title_txt.x;
+ _loc3_.y = _loc2_.y + _loc2_.height + 2;
+ this._Container.addChild(_loc3_);
+ this.text_a_3 = PublicMethod.getTextFieldWithFillter(16551717,100);
+ this._Container.addChild(this.text_a_3);
+ this.text_a_3.x = _loc3_.x + _loc3_.width;
+ this.text_a_3.y = _loc3_.y;
+ var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(16551717,200);
+ _loc4_.text = "您可以到农场去征收资源";
+ _loc4_.x = this.title_txt.x;
+ _loc4_.y = this.text_a_3.y + this.text_a_3.height + 2;
+ this._Container.addChild(_loc4_);
+ this.text_a_4 = PublicMethod.getTextFieldWithFillter(16551717,200);
+ this._Container.addChild(this.text_a_4);
+ this.text_a_4.x = this.title_txt.x;
+ this.text_a_4.y = _loc4_.y + _loc4_.height + 2;
+ this.text_a_4.text = "当前资源已达存储上限";
+ this.text_a_4.textColor = 16711680;
+ this.setData();
+ }
+
+ private function setData() : void
+ {
+ this.text_a_1.text = this._dataObject.value.toString();
+ this.text_a_2.text = this._dataObject.maxValue.toString();
+ this.text_a_3.text = this._dataObject.farmValue.toString();
+ if(this._dataObject.getIsMax())
+ {
+ this.text_a_4.visible = true;
+ this._height = 125;
+ }
+ else
+ {
+ this.text_a_4.visible = false;
+ this._height = 105;
+ }
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this._table_bg = new Scale9Grid(this._bgSprite,197,this._height);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ public function setValue(param1:ResTipData) : void
+ {
+ this._dataObject = param1;
+ this.setData();
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/ShopItemTip.as b/flash_decompiled/com/view/tip/ShopItemTip.as
new file mode 100644
index 0000000..98101e2
--- /dev/null
+++ b/flash_decompiled/com/view/tip/ShopItemTip.as
@@ -0,0 +1,165 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.Bitmap;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class ShopItemTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _dataObject:Object;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var itemImg:Bitmap;
+
+ public function ShopItemTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object, param5:Bitmap = null)
+ {
+ super();
+ this.itemImg = param5;
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function loadImg() : void
+ {
+ }
+
+ private function init() : void
+ {
+ var _loc1_:int = 0;
+ var _loc3_:TextField = null;
+ var _loc8_:TextField = null;
+ var _loc9_:String = null;
+ var _loc10_:TextField = null;
+ this._Container.addChild(this.itemImg);
+ this.itemImg.x = 10;
+ this.itemImg.y = 10;
+ this.itemImg.width = 30;
+ this.itemImg.height = 30;
+ var _loc2_:TextField = PublicMethod.getTextField(16777215,150);
+ this._Container.addChild(_loc2_);
+ _loc2_.x = 50;
+ _loc2_.y = 15;
+ _loc2_.htmlText = this._dataObject.showName;
+ _loc1_ = 50;
+ _loc3_ = this.createTextField(this._dataObject.desc);
+ this._Container.addChild(_loc3_);
+ _loc3_.x = 10;
+ _loc3_.y = _loc1_;
+ _loc1_ = _loc1_ + _loc3_.height + 5;
+ if(this._dataObject.heroLevel != null)
+ {
+ _loc8_ = PublicMethod.getTextField(16777215,150);
+ this._Container.addChild(_loc8_);
+ _loc8_.x = 10;
+ _loc8_.y = _loc1_;
+ _loc8_.htmlText = this._dataObject.heroLevel;
+ _loc1_ += 25;
+ }
+ var _loc4_:Array = this._dataObject.equipPropertyList as Array;
+ if(_loc4_ != null && _loc4_.length > 0)
+ {
+ for each(_loc9_ in _loc4_)
+ {
+ _loc10_ = PublicMethod.getTextField(16777215,150);
+ this._Container.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = _loc1_;
+ _loc10_.htmlText = _loc9_;
+ _loc1_ += 25;
+ }
+ }
+ var _loc5_:String = "(按住Ctrl键或Shift键后单击鼠标发送到当前频道,国家频道消耗一个小喇叭)";
+ var _loc6_:TextField = this.createTextField(_loc5_);
+ this._Container.addChild(_loc6_);
+ _loc6_.x = 10;
+ _loc6_.y = _loc1_;
+ _loc1_ += _loc6_.height;
+ var _loc7_:Sprite = new Scale9Grid(this._bgSprite,240,_loc1_);
+ this._Container.addChildAt(_loc7_,0);
+ }
+
+ public function destroyTip() : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ private function createTextField(param1:String) : TextField
+ {
+ var _loc2_:TextField = new TextField();
+ _loc2_.width = 240;
+ _loc2_.height = 20;
+ _loc2_.mouseEnabled = false;
+ _loc2_.multiline = true;
+ _loc2_.wordWrap = true;
+ _loc2_.textColor = 16777215;
+ _loc2_.htmlText = param1;
+ _loc2_.autoSize = "left";
+ _loc2_.height = _loc2_.textHeight + 10;
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/TipTitle.as b/flash_decompiled/com/view/tip/TipTitle.as
new file mode 100644
index 0000000..c4ac5bf
--- /dev/null
+++ b/flash_decompiled/com/view/tip/TipTitle.as
@@ -0,0 +1,160 @@
+package com.view.tip
+{
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class TipTitle extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var title_txt:TextField;
+
+ private var ias:Object;
+
+ private var _range:Stage;
+
+ private var _displayObject:DisplayObject;
+
+ private var _view:Boolean;
+
+ private var _bgSprite:Sprite;
+
+ private var _table_bg:Sprite;
+
+ private var isAddEvent:Boolean;
+
+ public function TipTitle(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object)
+ {
+ super();
+ this.isAddEvent = true;
+ this._view = false;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.ias = param4;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ public function set infoObject(param1:Object) : void
+ {
+ if(!this.isAddEvent)
+ {
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ this.title_txt.htmlText = param1.titletext;
+ this._Container.removeChild(this._table_bg);
+ var _loc2_:int = this.title_txt.width + 4;
+ this._table_bg = new Scale9Grid(this._bgSprite,_loc2_,10);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ private function init() : void
+ {
+ var _loc1_:uint = 0;
+ var _loc2_:uint = 0;
+ var _loc3_:String = null;
+ if(this.ias.txtColor == undefined)
+ {
+ _loc1_ = 16551717;
+ }
+ else
+ {
+ _loc1_ = uint(this.ias.txtColor);
+ }
+ if(this.ias.titleColor == undefined)
+ {
+ _loc2_ = 16551717;
+ }
+ else
+ {
+ _loc2_ = uint(this.ias.titleColor);
+ }
+ if(this.ias.titletext == undefined)
+ {
+ _loc3_ = "";
+ }
+ else
+ {
+ _loc3_ = this.ias.titletext;
+ }
+ var _loc4_:TextFormat = new TextFormat();
+ _loc4_.color = _loc2_;
+ _loc4_.size = 12;
+ _loc4_.bold = false;
+ _loc4_.font = "SimSun";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(_loc2_,48);
+ this.title_txt.height = 18;
+ this.title_txt.defaultTextFormat = _loc4_;
+ this.title_txt.mouseEnabled = false;
+ this.title_txt.htmlText = _loc3_;
+ this.title_txt.autoSize = "left";
+ var _loc5_:int = this.title_txt.width + 4;
+ this._table_bg = new Scale9Grid(this._bgSprite,_loc5_,10);
+ this._Container.addChild(this._table_bg);
+ this._Container.addChild(this.title_txt);
+ this.title_txt.x = 10;
+ this.title_txt.y = 8;
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._view = true;
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._view && this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ this._view = false;
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/UserItemTip.as b/flash_decompiled/com/view/tip/UserItemTip.as
new file mode 100644
index 0000000..ba149fe
--- /dev/null
+++ b/flash_decompiled/com/view/tip/UserItemTip.as
@@ -0,0 +1,170 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.Bitmap;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class UserItemTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var _range:Stage;
+
+ private var _dataObject:Object;
+
+ private var _displayObject:DisplayObject;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _bgSprite:Sprite;
+
+ private var itemImg:Bitmap;
+
+ public function UserItemTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object, param5:Bitmap)
+ {
+ super();
+ this.itemImg = param5;
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ param1.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ param1.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ this.init();
+ }
+
+ private function init() : void
+ {
+ var _loc1_:int = 0;
+ var _loc3_:TextField = null;
+ var _loc8_:TextField = null;
+ var _loc9_:TextField = null;
+ var _loc10_:String = null;
+ var _loc11_:TextField = null;
+ this._Container.addChild(this.itemImg);
+ this.itemImg.x = 10;
+ this.itemImg.y = 10;
+ this.itemImg.width = 30;
+ this.itemImg.height = 30;
+ var _loc2_:TextField = PublicMethod.getTextField(16777215,150);
+ this._Container.addChild(_loc2_);
+ _loc2_.x = 50;
+ _loc2_.y = 15;
+ _loc2_.htmlText = this._dataObject.showName;
+ _loc1_ = 50;
+ _loc3_ = this.createTextField(this._dataObject.desc);
+ this._Container.addChild(_loc3_);
+ _loc3_.x = 10;
+ _loc3_.y = _loc1_;
+ _loc1_ = _loc1_ + _loc3_.height + 5;
+ if(this._dataObject.band)
+ {
+ _loc8_ = PublicMethod.getTextFieldWithFillter(16777215,150);
+ this._Container.addChild(_loc8_);
+ _loc8_.text = "绑定:" + this._dataObject.band;
+ _loc8_.x = _loc3_.x;
+ _loc8_.y = _loc1_;
+ _loc1_ += 20;
+ }
+ if(this._dataObject.heroLevel != null)
+ {
+ _loc9_ = PublicMethod.getTextFieldWithFillter(16777215,150);
+ this._Container.addChild(_loc9_);
+ _loc9_.x = 10;
+ _loc9_.y = _loc1_;
+ _loc9_.htmlText = this._dataObject.heroLevel;
+ _loc1_ += 25;
+ }
+ var _loc4_:Array = this._dataObject.equipPropertyList as Array;
+ if(_loc4_ != null && _loc4_.length > 0)
+ {
+ for each(_loc10_ in _loc4_)
+ {
+ _loc11_ = PublicMethod.getTextField(16777215,150);
+ this._Container.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc1_;
+ _loc11_.htmlText = _loc10_;
+ _loc1_ += 25;
+ }
+ }
+ var _loc5_:String = "(按住Ctrl键或Shift键后单击鼠标发送到当前频道,国家频道消耗一个小喇叭)";
+ var _loc6_:TextField = this.createTextField(_loc5_);
+ this._Container.addChild(_loc6_);
+ _loc6_.x = 10;
+ _loc6_.y = _loc1_;
+ _loc1_ += _loc6_.height;
+ var _loc7_:Sprite = new Scale9Grid(this._bgSprite,240,_loc1_);
+ this._Container.addChildAt(_loc7_,0);
+ }
+
+ public function destroyTip() : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+
+ private function createTextField(param1:String) : TextField
+ {
+ var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(16777215,240);
+ _loc2_.height = 20;
+ _loc2_.mouseEnabled = false;
+ _loc2_.multiline = true;
+ _loc2_.wordWrap = true;
+ _loc2_.textColor = 16777215;
+ _loc2_.htmlText = param1;
+ _loc2_.autoSize = "left";
+ _loc2_.height = _loc2_.textHeight + 10;
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/YuboTip.as b/flash_decompiled/com/view/tip/YuboTip.as
new file mode 100644
index 0000000..b78c6a9
--- /dev/null
+++ b/flash_decompiled/com/view/tip/YuboTip.as
@@ -0,0 +1,166 @@
+package com.view.tip
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class YuboTip extends Sprite
+ {
+
+ private var _Container:Sprite = new Sprite();
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var _dataObject:Object;
+
+ private var _bgSprite:Sprite;
+
+ private var _displayObject:DisplayObject;
+
+ private var _range:Stage;
+
+ private var css:TextFormat;
+
+ private var itemContent:TextField;
+
+ private var itemName:TextField;
+
+ private var _table_bg:Sprite;
+
+ private var isAddEvent:Boolean;
+
+ public function YuboTip(param1:DisplayObject, param2:Stage, param3:Sprite, param4:Object)
+ {
+ super();
+ this._dataObject = param4;
+ this._bgSprite = param3;
+ this._displayObject = param1;
+ this._range = param2;
+ this.init();
+ }
+
+ private function init() : void
+ {
+ this.itemName = PublicMethod.getTextFieldWithFillter(16777215,205);
+ this._Container.addChild(this.itemName);
+ this.itemName.x = 5;
+ this.itemName.y = 5;
+ this.itemName.defaultTextFormat = PublicMethod.getCenterTextFormat();
+ this.itemContent = PublicMethod.getTextFieldWithFillter(16777215,205);
+ this._Container.addChild(this.itemContent);
+ this.itemContent.x = 5;
+ this.itemContent.y = 25;
+ this._Container.addChild(this.itemContent);
+ this.itemContent.defaultTextFormat = PublicMethod.getCenterTextFormat();
+ this.setValue();
+ }
+
+ private function setValue() : void
+ {
+ if(!this.isAddEvent)
+ {
+ this.isAddEvent = true;
+ this._displayObject.addEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.addEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+ this.itemName.htmlText = this._dataObject.showName;
+ var _loc1_:String = "镶嵌于朝服,可增加武将";
+ var _loc2_:String = this._dataObject.gemValue;
+ var _loc3_:Array = _loc2_.split(",");
+ var _loc4_:String = _loc3_[0];
+ var _loc5_:int = int(_loc3_[1]);
+ if(_loc4_ == "HERO_ATTACK")
+ {
+ _loc1_ = _loc1_ + "攻击" + _loc5_;
+ }
+ if(_loc4_ == "HERO_HP")
+ {
+ _loc1_ = _loc1_ + "体力" + _loc5_;
+ }
+ if(_loc4_ == "HERO_DEFENCE")
+ {
+ _loc1_ = _loc1_ + "防御" + _loc5_;
+ }
+ if(_loc4_ == "HERO_AGILE")
+ {
+ _loc1_ = _loc1_ + "敏捷" + _loc5_;
+ }
+ if(_loc4_ == "HERO_LEAD")
+ {
+ _loc1_ = _loc1_ + "统率" + _loc5_;
+ }
+ this.itemContent.htmlText = _loc1_;
+ if(Boolean(this._table_bg) && this._Container.contains(this._table_bg))
+ {
+ this._Container.removeChild(this._table_bg);
+ }
+ this._table_bg = new Scale9Grid(this._bgSprite,210,44);
+ this._Container.addChildAt(this._table_bg,0);
+ }
+
+ public function setTipData(param1:Object) : void
+ {
+ this._dataObject = param1;
+ this.setValue();
+ }
+
+ public function destroyTip() : void
+ {
+ if(!this.isAddEvent)
+ {
+ return;
+ }
+ this.isAddEvent = false;
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OVER,this.overHandler);
+ this._displayObject.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ this._displayObject.removeEventListener(MouseEvent.ROLL_OUT,this.outHandler);
+ }
+
+ private function overHandler(param1:MouseEvent) : void
+ {
+ this._range.addChild(this._Container);
+ this._Container.x = this._range.mouseX;
+ this._Container.y = this._range.mouseY + 5;
+ this._displayObject.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMoveHandler);
+ }
+
+ private function mouseMoveHandler(param1:MouseEvent) : void
+ {
+ if(this._range.mouseY > this._range.stageHeight - this._Container.height - 20)
+ {
+ this._Container.y = this._range.mouseY - this._Container.height - 10;
+ }
+ else
+ {
+ this._Container.y = this._range.mouseY + 20;
+ }
+ if(this._range.mouseX > this._range.stageWidth - this._Container.width)
+ {
+ this._Container.x = this._range.stageWidth - this._Container.width;
+ }
+ else
+ {
+ this._Container.x = this._range.mouseX;
+ }
+ }
+
+ private function outHandler(param1:MouseEvent) : void
+ {
+ if(this._range.contains(this._Container))
+ {
+ this._range.removeChild(this._Container);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/data/PopTipData.as b/flash_decompiled/com/view/tip/data/PopTipData.as
new file mode 100644
index 0000000..4d0baa1
--- /dev/null
+++ b/flash_decompiled/com/view/tip/data/PopTipData.as
@@ -0,0 +1,31 @@
+package com.view.tip.data
+{
+ public class PopTipData
+ {
+
+ public var currentPop:int;
+
+ public var idlePop:int;
+
+ public var foodPop:int;
+
+ public var popMax:int;
+
+ public var popStr:String;
+
+ public function PopTipData()
+ {
+ super();
+ }
+
+ public function getStr() : String
+ {
+ if(this.currentPop == this.popMax)
+ {
+ return "已达人口上限";
+ }
+ return "未达人口上限";
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/tip/data/ResTipData.as b/flash_decompiled/com/view/tip/data/ResTipData.as
new file mode 100644
index 0000000..eaf0af1
--- /dev/null
+++ b/flash_decompiled/com/view/tip/data/ResTipData.as
@@ -0,0 +1,31 @@
+package com.view.tip.data
+{
+ public class ResTipData
+ {
+
+ public var title:String;
+
+ public var resName:String;
+
+ public var value:int;
+
+ public var maxValue:int;
+
+ public var farmValue:int;
+
+ public function ResTipData()
+ {
+ super();
+ }
+
+ public function getIsMax() : Boolean
+ {
+ if(this.value >= this.maxValue)
+ {
+ return true;
+ }
+ return false;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/BarFactory.as b/flash_decompiled/com/view/ui/BarFactory.as
new file mode 100644
index 0000000..6a39069
--- /dev/null
+++ b/flash_decompiled/com/view/ui/BarFactory.as
@@ -0,0 +1,257 @@
+package com.view.ui
+{
+ import com.comfig.ServerConfig;
+ import com.events.DevEvent;
+ import com.loader.CLoader;
+ import com.utils.HashMap;
+ import com.utils.Utils;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.warreport.MilitaryView;
+ import com.view.world.ToolTipManager;
+ import com.view.world.TxtTooltip;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.net.URLRequest;
+
+ public class BarFactory extends Sprite
+ {
+
+ public static var instance:BarFactory;
+
+ private var m_bufArr:Array;
+
+ private var hash:HashMap;
+
+ public function BarFactory()
+ {
+ super();
+ this.m_bufArr = new Array();
+ this.hash = new HashMap();
+ Utils.g_events.addEventListener(DevEvent.NewPlayerEvent,this.addNewBar);
+ }
+
+ public static function getInstance() : BarFactory
+ {
+ if(instance == null)
+ {
+ instance = new BarFactory();
+ }
+ return instance;
+ }
+
+ private function addNewBar(param1:DevEvent) : void
+ {
+ var _loc2_:Object = param1.getParameter();
+ var _loc3_:Sprite = this.getBar(_loc2_.name);
+ if(_loc3_ == null)
+ {
+ return;
+ }
+ _loc3_.buttonMode = true;
+ if(_loc3_ != null)
+ {
+ _loc3_.x = 0;
+ if(this.m_bufArr.length > 0)
+ {
+ _loc3_.x = this.m_bufArr[this.m_bufArr.length - 1].x + (26 + 48);
+ }
+ _loc3_.name = _loc2_.name + "__" + _loc2_.cons;
+ if(_loc2_.name == "combat" || _loc2_.name == "fight" || _loc2_.name == "battleAlert")
+ {
+ }
+ _loc3_.addEventListener(MouseEvent.CLICK,this.eventClick,false,0,true);
+ addChild(_loc3_);
+ this.m_bufArr.push(_loc3_);
+ if(_loc2_.name == "combat" || _loc2_.name == "fight")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("战争动态"));
+ }
+ else if(_loc2_.name == "battleAlert")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("敌军入侵"));
+ }
+ else if(_loc2_.name == "area_start" || _loc2_.name == "area_end")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("金台斗将"));
+ }
+ else if(_loc2_.name == "provWarApply" || _loc2_.name == "provWarStart")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("郡城争夺"));
+ }
+ else if(_loc2_.name == "contestStart")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("七雄会武"));
+ }
+ else if(_loc2_.name == "leagueStart")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("百战千军"));
+ }
+ else if(_loc2_.name == "hexagram_start" || _loc2_.name == "hexagram_end")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("和氏璧"));
+ }
+ else if(_loc2_.name == "babel_start" || _loc2_.name == "babel_end")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("自动闯阵"));
+ }
+ else if(_loc2_.name == "babel_hero_start" || _loc2_.name == "babel_hero_end")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("过关斩将"));
+ }
+ else if(_loc2_.name == "castle_destroy_start" || _loc2_.name == "castle_destroy_end")
+ {
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("重建城池"));
+ }
+ }
+ }
+
+ private function eventClick(param1:MouseEvent) : void
+ {
+ var _loc4_:BattleViewUI = null;
+ var _loc5_:MilitaryView = null;
+ var _loc2_:* = param1.currentTarget.name.split("__")[0];
+ var _loc3_:* = param1.currentTarget.name.split("__")[1];
+ if(this.m_bufArr.length > 0)
+ {
+ this.m_bufArr.shift();
+ }
+ switch(_loc2_)
+ {
+ case "combat":
+ _loc4_ = BattleViewUI.getInstance();
+ _loc4_.showUI(_loc3_);
+ this.removeChild(param1.currentTarget as Sprite);
+ break;
+ case "fight":
+ this.removeChild(param1.currentTarget as Sprite);
+ break;
+ case "battleAlert":
+ _loc5_ = MilitaryView.getInstance();
+ _loc5_.setStartPage(0);
+ _loc5_.show();
+ this.removeChild(param1.currentTarget as Sprite);
+ break;
+ case "area_start":
+ case "area_end":
+ case "babel_start":
+ break;
+ case "provWarApply":
+ this.removeChild(param1.currentTarget as Sprite);
+ break;
+ case "provWarStart":
+ this.removeChild(param1.currentTarget as Sprite);
+ break;
+ case "contestStart":
+ this.removeChild(param1.currentTarget as Sprite);
+ break;
+ case "leagueStart":
+ this.removeChild(param1.currentTarget as Sprite);
+ break;
+ case "hexagram_start":
+ case "hexagram_end":
+ case "babel_hero_start":
+ case "castle_destroy_start":
+ }
+ }
+
+ private function removeBufInArr(param1:String) : void
+ {
+ var _loc2_:Object = null;
+ var _loc3_:int = 0;
+ while(_loc3_ < this.m_bufArr.length)
+ {
+ _loc2_ = new Object();
+ _loc2_ = this.m_bufArr[_loc3_];
+ if(_loc2_.cons == param1)
+ {
+ this.m_bufArr.splice(_loc3_,1);
+ }
+ _loc3_++;
+ }
+ }
+
+ public function getBar(param1:String) : Sprite
+ {
+ var _loc2_:Sprite = new Sprite();
+ var _loc3_:* = new CLoader();
+ switch(param1)
+ {
+ case "area_start":
+ if(this.hash.containsKey("area_start"))
+ {
+ this.removeChild(this.hash.getValue("area_start"));
+ this.hash.remove("area_start");
+ }
+ break;
+ case "area_end":
+ if(this.hash.containsKey("area_start"))
+ {
+ this.removeChild(this.hash.getValue("area_start"));
+ this.hash.remove("area_start");
+ }
+ return null;
+ case "babel_hero_start":
+ if(this.hash.containsKey("babel_hero_start"))
+ {
+ this.removeChild(this.hash.getValue("babel_hero_start"));
+ this.hash.remove("babel_hero_start");
+ }
+ break;
+ case "babel_hero_end":
+ if(this.hash.containsKey("babel_hero_start"))
+ {
+ this.removeChild(this.hash.getValue("babel_hero_start"));
+ this.hash.remove("babel_hero_start");
+ }
+ return null;
+ case "castle_destroy_start":
+ if(this.hash.containsKey("castle_destroy_start"))
+ {
+ this.removeChild(this.hash.getValue("castle_destroy_start"));
+ this.hash.remove("castle_destroy_start");
+ }
+ break;
+ case "castle_destroy_end":
+ if(this.hash.containsKey("castle_destroy_start"))
+ {
+ this.removeChild(this.hash.getValue("castle_destroy_start"));
+ this.hash.remove("castle_destroy_start");
+ }
+ return null;
+ case "babel_start":
+ if(this.hash.containsKey("babel_start"))
+ {
+ this.removeChild(this.hash.getValue("babel_start"));
+ this.hash.remove("babel_start");
+ }
+ break;
+ case "babel_end":
+ if(this.hash.containsKey("babel_start"))
+ {
+ this.removeChild(this.hash.getValue("babel_start"));
+ this.hash.remove("babel_start");
+ }
+ return null;
+ case "hexagram_start":
+ if(this.hash.containsKey("hexagram_start"))
+ {
+ this.removeChild(this.hash.getValue("hexagram_start"));
+ this.hash.remove("hexagram_start");
+ }
+ break;
+ case "hexagram_end":
+ if(this.hash.containsKey("hexagram_start"))
+ {
+ this.removeChild(this.hash.getValue("hexagram_start"));
+ this.hash.remove("hexagram_start");
+ }
+ return null;
+ }
+ _loc3_.name = param1;
+ _loc3_.load(new URLRequest(ServerConfig.IMAGE_IMG_URL + "play_" + param1 + ".swf"));
+ _loc2_.addChild(_loc3_);
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/BaseBuild.as b/flash_decompiled/com/view/ui/BaseBuild.as
new file mode 100644
index 0000000..399262e
--- /dev/null
+++ b/flash_decompiled/com/view/ui/BaseBuild.as
@@ -0,0 +1,420 @@
+package com.view.ui
+{
+ import com.InstallFace;
+ import com.comfig.ClassConfig;
+ import com.common.LoadResource;
+ import com.common.PublicGlow;
+ import com.common.PublicMethod;
+ import com.data.MemeberShip;
+ import com.data.data.city.CastleBuilding;
+ import com.utils.TimerManager;
+ import com.view.Control;
+ import com.view.tip.BuildTipTitle;
+ import com.view.tip.MulTipTitle;
+ import com.view.ui.buildlist.TimerInfo;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class BaseBuild extends Sprite
+ {
+
+ public static const _arr:Array = ["47.120.58.27","47.120.74.49","47.113.230.132","47.114.62.108","116.62.120.209","118.31.37.252","47.121.191.22","47.121.192.198"];
+
+ private var _buildData:BuildData;
+
+ private var load:LoadResource;
+
+ public var bgSwf:MovieClip;
+
+ public var face:InstallFace = InstallFace.getInstance();
+
+ public var tipTitle:BuildTipTitle;
+
+ private var _castleBuild:CastleBuilding;
+
+ private var _timeMc:MovieClip;
+
+ public var _nameMc:MovieClip;
+
+ private var _upingMc:MovieClip;
+
+ private var _leftTime:int;
+
+ public var buildUI:BaseUI;
+
+ public var canClick:Boolean;
+
+ public var markMc:Sprite;
+
+ public var npcBuildTip:MulTipTitle;
+
+ public var npcTipStr:String;
+
+ private var oldUrl:String;
+
+ public function BaseBuild()
+ {
+ super();
+ addEventListener(Event.REMOVED_FROM_STAGE,this.clear);
+ }
+
+ public function loadSwfBg() : void
+ {
+ this.oldUrl = this._buildData.swfUrl;
+ this.load = new LoadResource(this._buildData.swfUrl,this.loadBack);
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ if(Boolean(this.bgSwf) && contains(this.bgSwf))
+ {
+ removeChild(this.bgSwf);
+ }
+ this.bgSwf = MovieClip(param1.target.loader.content);
+ this.addSwfBg();
+ this.setSwfBgUnClick();
+ this.load.clear();
+ }
+
+ public function createNpcTip() : void
+ {
+ this.createNpcTipStr();
+ this.npcBuildTip = new MulTipTitle(this,this.face.stage,this.face.tip_bg,this.npcTipStr);
+ }
+
+ public function createNpcTipStr() : void
+ {
+ }
+
+ public function setSwfBgUnClick() : void
+ {
+ }
+
+ public function setBuildRes() : void
+ {
+ }
+
+ public function addSwfBg() : void
+ {
+ addChildAt(this.bgSwf,0);
+ }
+
+ public function getBuildTimeMc() : MovieClip
+ {
+ if(this._timeMc == null)
+ {
+ this._timeMc = this.face.getMovieClip(ClassConfig.build_time);
+ this.setTimeMcPosi();
+ }
+ return this._timeMc;
+ }
+
+ public function setTimeMcPosi() : void
+ {
+ this._timeMc.x = 26;
+ this._timeMc.y = 10;
+ }
+
+ public function getBuildNameMc() : MovieClip
+ {
+ if(this._nameMc == null)
+ {
+ this._nameMc = this.face.getMovieClip(ClassConfig.build_name);
+ this.setBuildNameMcInfo();
+ this._nameMc.mouseEnabled = false;
+ this._nameMc.mouseChildren = false;
+ this._nameMc.name_txt.text = this.castleBuild.building.buiName;
+ this.setNameMcPosi();
+ }
+ return this._nameMc;
+ }
+
+ private function setBuildNameMcInfo() : void
+ {
+ if(this.castleBuild)
+ {
+ this._nameMc.level_txt.text = this.castleBuild.level + "";
+ }
+ else
+ {
+ this._nameMc.level_txt.text = "";
+ }
+ }
+
+ public function setNameMcPosi() : void
+ {
+ this._nameMc.x = 50;
+ this._nameMc.y = -10;
+ }
+
+ private function setNameMcTop() : void
+ {
+ if(Boolean(this._nameMc) && contains(this._nameMc))
+ {
+ setChildIndex(this._nameMc,numChildren - 1);
+ }
+ }
+
+ public function getBuildUpMc() : MovieClip
+ {
+ if(this._upingMc == null)
+ {
+ this._upingMc = this.face.getMovieClip(ClassConfig.build_up_mc);
+ this._upingMc.mouseEnabled = false;
+ this._upingMc.mouseChildren = false;
+ this.setUpingMcPosi();
+ }
+ return this._upingMc;
+ }
+
+ public function setUpingMcPosi() : void
+ {
+ this._upingMc.x = 30;
+ this._upingMc.y = -188;
+ }
+
+ public function addEvent() : void
+ {
+ addEventListener(MouseEvent.ROLL_OVER,this.mouseOverBuild);
+ addEventListener(MouseEvent.ROLL_OUT,this.mouseOutBuild);
+ addEventListener(MouseEvent.CLICK,this.mouseClick);
+ }
+
+ public function mouseOverBuild(param1:MouseEvent) : void
+ {
+ this.filters = [PublicGlow.getInstance().lightFilter];
+ }
+
+ public function mouseOutBuild(param1:MouseEvent) : void
+ {
+ this.filters = null;
+ }
+
+ public function mouseClick(param1:MouseEvent) : void
+ {
+ }
+
+ private function mouseDown(param1:MouseEvent) : void
+ {
+ param1.stopImmediatePropagation();
+ startDrag();
+ }
+
+ private function mouseUp(param1:MouseEvent) : void
+ {
+ stopDrag();
+ }
+
+ public function get buildData() : BuildData
+ {
+ return this._buildData;
+ }
+
+ public function set buildData(param1:BuildData) : void
+ {
+ this._buildData = param1;
+ }
+
+ public function get castleBuild() : CastleBuilding
+ {
+ return this._castleBuild;
+ }
+
+ public function set castleBuild(param1:CastleBuilding) : void
+ {
+ this._castleBuild = param1;
+ }
+
+ public function setTipText() : void
+ {
+ var _loc1_:Object = new Object();
+ if(this.castleBuild == null)
+ {
+ _loc1_ = this.getEmptyTip();
+ }
+ else if(this._castleBuild.level == 0)
+ {
+ _loc1_.title = this.castleBuild.building.buiName + "0 级";
+ _loc1_.titleColor = 16776960;
+ _loc1_.contentColor = 16777215;
+ }
+ else
+ {
+ _loc1_.title = this.castleBuild.building.buiName + this.castleBuild.level + "级";
+ _loc1_.content = this.castleBuild.entCap.capDesc;
+ _loc1_.titleColor = 16776960;
+ _loc1_.contentColor = 16777215;
+ }
+ this.setTipInfo(_loc1_);
+ }
+
+ private function getEmptyTip() : Object
+ {
+ var _loc1_:Object = new Object();
+ var _loc2_:int = MemeberShip.getMainCastle().rangeLv;
+ var _loc3_:int = int(this._buildData.posNo.substring(1));
+ switch(_loc2_)
+ {
+ case 1:
+ if(_loc3_ <= 14)
+ {
+ _loc1_.title = "平地";
+ _loc1_.content = "可建造";
+ _loc1_.titleColor = 16776960;
+ _loc1_.contentColor = 16777215;
+ this.canClick = true;
+ }
+ if(_loc3_ > 14 && _loc3_ <= 21)
+ {
+ _loc1_.title = "平地";
+ _loc1_.content = "不可建造,2级城池可建造";
+ _loc1_.titleColor = 16776960;
+ _loc1_.contentColor = 16711680;
+ this.canClick = false;
+ }
+ if(_loc3_ > 21)
+ {
+ _loc1_.title = "平地";
+ _loc1_.content = "不可建造,3级城池可建造";
+ _loc1_.titleColor = 16776960;
+ _loc1_.contentColor = 16711680;
+ this.canClick = false;
+ }
+ break;
+ case 2:
+ if(_loc3_ <= 21)
+ {
+ _loc1_.title = "平地";
+ _loc1_.content = "可建造";
+ _loc1_.titleColor = 16776960;
+ _loc1_.contentColor = 16777215;
+ this.canClick = true;
+ }
+ if(_loc3_ > 21)
+ {
+ _loc1_.title = "平地";
+ _loc1_.content = "不可建造,3级城池可建造";
+ _loc1_.titleColor = 16776960;
+ _loc1_.contentColor = 16711680;
+ this.canClick = false;
+ }
+ break;
+ default:
+ _loc1_.title = "平地";
+ _loc1_.content = "可建造";
+ _loc1_.titleColor = 16776960;
+ _loc1_.contentColor = 16777215;
+ this.canClick = true;
+ }
+ return _loc1_;
+ }
+
+ public function setTipInfo(param1:Object) : void
+ {
+ if(this.tipTitle == null)
+ {
+ this.tipTitle = new BuildTipTitle(this,this.face.stage,this.face.tip_bg,param1);
+ }
+ else
+ {
+ this.tipTitle.infoObject = param1;
+ }
+ }
+
+ public function setUpStatus() : void
+ {
+ addChild(this.getBuildUpMc());
+ addChild(this.getBuildTimeMc());
+ this.setNameMcTop();
+ }
+
+ private function clear(param1:Event) : void
+ {
+ var _loc2_:TimerInfo = null;
+ if(Boolean(this._castleBuild) && this._castleBuild.isUp)
+ {
+ _loc2_ = TimerManager.getInstance().getBuildTimeMap()["build_" + this._buildData.posNo];
+ if(_loc2_ != null)
+ {
+ _loc2_.process1 = null;
+ if(contains(this.getBuildUpMc()))
+ {
+ removeChild(this.getBuildUpMc());
+ }
+ if(contains(this.getBuildTimeMc()))
+ {
+ removeChild(this.getBuildTimeMc());
+ }
+ }
+ }
+ }
+
+ public function processDo(param1:TimerInfo) : void
+ {
+ this._timeMc.time_txt.text = param1.timerStr;
+ }
+
+ public function setUpOkStatus() : void
+ {
+ if(contains(this.getBuildUpMc()))
+ {
+ removeChild(this.getBuildUpMc());
+ }
+ if(contains(this.getBuildTimeMc()))
+ {
+ removeChild(this.getBuildTimeMc());
+ }
+ this.setTipText();
+ this.setBuildNameMcInfo();
+ this.checkBuildRes();
+ }
+
+ public function checkBuildRes() : void
+ {
+ if(this.oldUrl != this._buildData.swfUrl)
+ {
+ this.loadSwfBg();
+ }
+ }
+
+ public function viewBuildInfo() : void
+ {
+ if(this.getBuildNameMc() == null)
+ {
+ return;
+ }
+ var _loc1_:Boolean = Control.getInstance().rightTopMenu.viewBuildName;
+ if(_loc1_)
+ {
+ if(contains(this.getBuildNameMc()) == false)
+ {
+ addChild(this.getBuildNameMc());
+ }
+ }
+ else if(contains(this.getBuildNameMc()))
+ {
+ removeChild(this.getBuildNameMc());
+ }
+ }
+
+ public function openBuildUI() : void
+ {
+ }
+
+ public function getBuildNameSp(param1:String) : MovieClip
+ {
+ var _loc2_:MovieClip = new MovieClip();
+ var _loc3_:Sprite = PublicMethod.createRectangle(6710886,0,60,18);
+ var _loc4_:TextField = PublicMethod.getTextField(16777215,60);
+ _loc4_.defaultTextFormat = PublicMethod.getCenterTextFormat();
+ _loc4_.text = param1;
+ _loc3_.addChild(_loc4_);
+ _loc2_.addChild(_loc3_);
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/BaseUI.as b/flash_decompiled/com/view/ui/BaseUI.as
new file mode 100644
index 0000000..e4a16e8
--- /dev/null
+++ b/flash_decompiled/com/view/ui/BaseUI.as
@@ -0,0 +1,576 @@
+package com.view.ui
+{
+ import com.InstallFace;
+ import com.common.App;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.castle.event.CastleBuildEvent;
+ import com.control.castle.event.CastleEvent;
+ import com.control.data.ReturnBean;
+ import com.data.data.city.CastleBuilding;
+ import com.data.data.items.AddSpeed;
+ import com.utils.TimerManager;
+ import com.view.Control;
+ import com.view.UIListManage;
+ import com.view.cache.BuildCache;
+ import com.view.newui.UIButton;
+ import com.view.newui.UICloseBtn;
+ import com.view.newui.UIWindowBg;
+ import com.view.tip.BuildUpTip;
+ import com.view.ui.addspeed.AddSpeedUI;
+ import flash.display.Bitmap;
+ import flash.display.BitmapData;
+ import flash.display.Loader;
+ import flash.display.MovieClip;
+ import flash.display.SimpleButton;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.ProgressEvent;
+ import flash.net.URLRequest;
+ import flash.system.ApplicationDomain;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BaseUI extends Sprite
+ {
+
+ public var face:InstallFace = InstallFace.getInstance();
+
+ private var canUp:Boolean;
+
+ public var ui_bg:UIWindowBg;
+
+ private var build:BaseBuild;
+
+ private var openStatus:Boolean;
+
+ private var centerCss:TextFormat;
+
+ public var realUIWidth:int = 664;
+
+ public var realUIheight:int = 460;
+
+ public var ui_closeBtn:UICloseBtn;
+
+ private var upTip:BuildUpTip;
+
+ private var upBtn:UIButton;
+
+ private var picBorder:Sprite;
+
+ private var destroyBtn:UIButton;
+
+ private var addSpeedBtn:UIButton;
+
+ private var cancelBtn:UIButton;
+
+ private var contentText:TextField;
+
+ private var picload:LoadResource;
+
+ private var picUrl:String;
+
+ public var bigBg:UIWindowBg;
+
+ public var window_width:int;
+
+ public var window_heihgt:int;
+
+ private var titleload:LoadResource;
+
+ private var titlePic:Bitmap;
+
+ public var loader:Loader;
+
+ public var _loaderInfo:ApplicationDomain;
+
+ private var bgload:LoadResource;
+
+ public function BaseUI()
+ {
+ super();
+ this.centerCss = new TextFormat();
+ this.centerCss.align = "center";
+ addEventListener(Event.ADDED_TO_STAGE,this.addToStage);
+ addEventListener(Event.REMOVED_FROM_STAGE,this.removeFromStage);
+ this.face.stage.addEventListener(Event.RESIZE,this.reSizeWindow);
+ }
+
+ public function reSizeWindow(param1:Event) : void
+ {
+ this.setPosition();
+ }
+
+ public function getOpenStatus() : Boolean
+ {
+ return this.openStatus;
+ }
+
+ public function removeFromStage(param1:Event) : void
+ {
+ this.openStatus = false;
+ }
+
+ public function addBuildEvent() : void
+ {
+ ConnectService.getInstance().addEventListener(CastleBuildEvent.BUILD_CANCEL,this.cancelBuildResult);
+ ConnectService.getInstance().addEventListener(CastleBuildEvent.BUILD_DESTROY,this.destroyBuildResult);
+ ConnectService.getInstance().addEventListener(CastleBuildEvent.BUILD_UP,this.upBuildResult);
+ ConnectService.getInstance().addEventListener(CastleBuildEvent.BUILD_UP_OK,this.upBuildOkResult);
+ ConnectService.getInstance().addEventListener(CastleBuildEvent.ADD_SPEED_OK,this.addSpeedResult);
+ ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_selectCasBui,this.getSelectSucc);
+ }
+
+ public function delBuildEvent() : void
+ {
+ ConnectService.getInstance().removeEventListener(CastleBuildEvent.BUILD_CANCEL,this.cancelBuildResult);
+ ConnectService.getInstance().removeEventListener(CastleBuildEvent.BUILD_DESTROY,this.destroyBuildResult);
+ ConnectService.getInstance().removeEventListener(CastleBuildEvent.BUILD_UP,this.upBuildResult);
+ ConnectService.getInstance().removeEventListener(CastleBuildEvent.BUILD_UP_OK,this.upBuildOkResult);
+ ConnectService.getInstance().removeEventListener(CastleBuildEvent.ADD_SPEED_OK,this.addSpeedResult);
+ ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_selectCasBui,this.getSelectSucc);
+ }
+
+ public function addToStage(param1:Event) : void
+ {
+ this.openStatus = true;
+ }
+
+ private function cancelBuildResult(param1:CastleBuildEvent) : void
+ {
+ var _loc2_:CastleBuilding = param1.castleBuild;
+ if(_loc2_.casBuiId != this.build.castleBuild.casBuiId)
+ {
+ return;
+ }
+ this.build.castleBuild.isUp = false;
+ this.changeBtn();
+ }
+
+ private function destroyBuildResult(param1:CastleBuildEvent) : void
+ {
+ var _loc2_:CastleBuilding = param1.castleBuild;
+ if(_loc2_.casBuiId != this.build.castleBuild.casBuiId)
+ {
+ return;
+ }
+ this.build.castleBuild.isUp = true;
+ this.changeBtn();
+ }
+
+ private function upBuildResult(param1:CastleBuildEvent) : void
+ {
+ this.upBtn.setEnable();
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ return;
+ }
+ var _loc2_:CastleBuilding = param1.castleBuild;
+ if(_loc2_.casBuiId != this.build.castleBuild.casBuiId)
+ {
+ return;
+ }
+ this.build.castleBuild.isUp = true;
+ this.changeBtn();
+ }
+
+ private function upBuildOkResult(param1:CastleBuildEvent) : void
+ {
+ var _loc2_:CastleBuilding = param1.castleBuild;
+ if(_loc2_ == null || _loc2_.casBuiId != this.build.castleBuild.casBuiId)
+ {
+ return;
+ }
+ this.build.castleBuild.isUp = false;
+ this.build.castleBuild = _loc2_;
+ this.loadUiData();
+ }
+
+ private function addSpeedResult(param1:CastleBuildEvent) : void
+ {
+ var _loc2_:CastleBuilding = param1.castleBuild;
+ if(_loc2_ == null || _loc2_.casBuiId != this.build.castleBuild.casBuiId)
+ {
+ return;
+ }
+ if(_loc2_.upTime <= 0)
+ {
+ _loc2_.isUp = false;
+ this.build.castleBuild = _loc2_;
+ this.loadUiData();
+ }
+ }
+
+ public function setBuild(param1:BaseBuild) : void
+ {
+ this.build = param1;
+ }
+
+ public function getBuild() : BaseBuild
+ {
+ return this.build;
+ }
+
+ private function addTip() : void
+ {
+ if(!this.canUp)
+ {
+ if(this.upTip)
+ {
+ this.upTip.destroyTip();
+ }
+ return;
+ }
+ this.loadTip();
+ }
+
+ private function loadTip() : void
+ {
+ var _loc1_:CastleBuilding = BuildCache.getInstance().getCastleBuilding(this.face.currCasId,this.build.castleBuild.posNo);
+ if(_loc1_)
+ {
+ if(this.upTip == null)
+ {
+ this.upTip = new BuildUpTip(this.upBtn,this.face.stage,this.face.tip_bg);
+ }
+ _loc1_.building.level = _loc1_.level;
+ this.upTip.setData(_loc1_.building);
+ this.upTip.addTip();
+ }
+ }
+
+ private function getSelectSucc(param1:CastleEvent) : void
+ {
+ var _loc2_:Object = param1.castleObj;
+ if(_loc2_ == null || _loc2_.posNo != this.build.castleBuild.posNo)
+ {
+ return;
+ }
+ if(this.upTip == null)
+ {
+ this.upTip = new BuildUpTip(this.upBtn,this.face.stage,this.face.tip_bg);
+ }
+ this.upTip.setData(_loc2_.building);
+ this.upTip.addTip();
+ }
+
+ public function getUIHeight() : int
+ {
+ return 400;
+ }
+
+ public function createUI() : void
+ {
+ this.bigBg = new UIWindowBg();
+ this.bigBg.initSecondPanel(this.window_width + 190,this.getUIHeight());
+ addChild(this.bigBg);
+ this.bigBg.x = 11;
+ this.bigBg.y = 39;
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initThirdPanel(this.window_width + 182,81);
+ this.bigBg.addChild(_loc1_);
+ _loc1_.x = 4;
+ _loc1_.y = 4;
+ this.picBorder = PublicMethod.createRectangle(16773052,1910058,102,60);
+ _loc1_.addChild(this.picBorder);
+ this.picBorder.x = 8;
+ this.picBorder.y = 15;
+ var _loc2_:Sprite = PublicMethod.createRectangle(4932907,3353894,this.window_width + 12,60);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = this.picBorder.x + this.picBorder.width + 5;
+ _loc2_.y = 15;
+ this.contentText = PublicMethod.getTextFieldWithFillter(11583207,this.window_width + 10);
+ this.contentText.height = 52;
+ this.contentText.wordWrap = true;
+ this.contentText.multiline = true;
+ _loc1_.addChild(this.contentText);
+ this.contentText.x = _loc2_.x + 2;
+ this.contentText.y = _loc2_.y + 4;
+ this.upBtn = new UIButton("升级");
+ this.destroyBtn = new UIButton("拆除");
+ this.addSpeedBtn = new UIButton("加速");
+ this.cancelBtn = new UIButton("取消");
+ _loc1_.addChild(this.upBtn);
+ this.upBtn.x = _loc2_.x + _loc2_.width + 4;
+ this.upBtn.y = _loc2_.y + 2;
+ this.upBtn.visible = false;
+ this.upBtn.onClick = this.upBuild;
+ _loc1_.addChild(this.destroyBtn);
+ this.destroyBtn.x = this.upBtn.x;
+ this.destroyBtn.y = this.upBtn.y + this.upBtn.height + 5;
+ this.destroyBtn.visible = false;
+ this.destroyBtn.onClick = this.desTroyBuild;
+ _loc1_.addChild(this.addSpeedBtn);
+ this.addSpeedBtn.x = _loc2_.x + _loc2_.width + 4;
+ this.addSpeedBtn.y = _loc2_.y + 2;
+ this.addSpeedBtn.visible = false;
+ this.addSpeedBtn.onClick = this.addSpeedBuild;
+ _loc1_.addChild(this.cancelBtn);
+ this.cancelBtn.x = this.addSpeedBtn.x;
+ this.cancelBtn.y = this.addSpeedBtn.y + this.addSpeedBtn.height + 5;
+ this.cancelBtn.visible = false;
+ this.cancelBtn.onClick = this.cancelBuild;
+ }
+
+ private function changeBtn() : void
+ {
+ this.upBtn.visible = !this.build.castleBuild.isUp;
+ this.destroyBtn.visible = !this.build.castleBuild.isUp;
+ this.addSpeedBtn.visible = this.build.castleBuild.isUp;
+ this.cancelBtn.visible = this.build.castleBuild.isUp;
+ }
+
+ public function loadUiData() : void
+ {
+ if(this.build.castleBuild.highEntCap == null)
+ {
+ this.canUp = false;
+ this.upBtn.setUnEnable();
+ }
+ else
+ {
+ this.canUp = true;
+ }
+ this.changeBtn();
+ if(this.picUrl != this.build.buildData.picUrl)
+ {
+ this.picUrl = this.build.buildData.picUrl;
+ this.picload = new LoadResource(this.build.buildData.picUrl,this.loadPicBack);
+ }
+ this.contentText.text = this.build.castleBuild.building.buiDesc + this.build.castleBuild.entCap.capDesc;
+ this.setTitle(this.build.castleBuild.building.buiName + "(等级" + this.build.castleBuild.level + ")");
+ if(!this.build.castleBuild.isUp)
+ {
+ this.addTip();
+ }
+ }
+
+ private function loadPicBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ _loc2_.width = 101;
+ _loc2_.height = 59;
+ this.picload.clear();
+ this.picBorder.addChild(_loc2_);
+ _loc2_.x = 1;
+ _loc2_.y = 1;
+ }
+
+ public function loadLocalData() : void
+ {
+ }
+
+ public function setWindowSize() : void
+ {
+ this.window_width = UIWindowBg.normal_window_w;
+ this.window_heihgt = UIWindowBg.normal_window_h;
+ }
+
+ public function addUIBg() : void
+ {
+ this.setWindowSize();
+ this.ui_bg = new UIWindowBg();
+ this.ui_bg.initSize(this.window_width,this.window_heihgt);
+ this.ui_closeBtn = new UICloseBtn();
+ addChild(this.ui_bg);
+ addChild(this.ui_closeBtn);
+ this.ui_closeBtn.onClick = this.closeUI;
+ this.setCloseBtnPosi();
+ }
+
+ public function setCloseBtnPosi() : void
+ {
+ this.ui_closeBtn.x = 640;
+ this.ui_closeBtn.y = 10;
+ }
+
+ public function setPosition() : void
+ {
+ this.x = int(this.face.realWidth / 2 - width / 2);
+ this.y = int(this.face.realHeight / 2 - height / 2);
+ }
+
+ public function setPosition2() : void
+ {
+ this.x = int(this.face.realWidth / 2 - 663 / 2);
+ this.y = int(this.face.realHeight / 2 - 459 / 2);
+ }
+
+ public function closeUI(param1:MouseEvent) : void
+ {
+ UIListManage.getInstance().delUI(this);
+ }
+
+ public function closeUI1() : void
+ {
+ UIListManage.getInstance().delUI(this);
+ }
+
+ public function closeUI2() : void
+ {
+ if(Boolean(parent) && parent.contains(this))
+ {
+ parent.removeChild(this);
+ }
+ }
+
+ public function getHelp(param1:MouseEvent) : void
+ {
+ }
+
+ public function setTitle(param1:String) : void
+ {
+ }
+
+ public function loadTitle(param1:String) : void
+ {
+ var _loc2_:String = "pic/title/" + param1;
+ this.titleload = new LoadResource(_loc2_ + ".png",this.loadTitleBack);
+ }
+
+ private function loadTitleBack(param1:Event) : void
+ {
+ if(Boolean(this.titlePic) && this.ui_bg.contains(this.titlePic))
+ {
+ this.ui_bg.removeChild(this.titlePic);
+ }
+ this.titlePic = Bitmap(param1.target.loader.content);
+ this.titleload.clear();
+ this.ui_bg.addChild(this.titlePic);
+ this.titlePic.x = int(this.ui_bg.width / 2 - this.titlePic.width / 2);
+ this.titlePic.y = 4;
+ }
+
+ public function loadUIResource(param1:URLRequest) : void
+ {
+ Control.getInstance().addLoadMc();
+ this.loader = new Loader();
+ this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadUiComplete);
+ this.loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,this.loadProgress);
+ this.loader.load(param1);
+ }
+
+ public function loadUiComplete(param1:Event) : void
+ {
+ Control.getInstance().removeLoadMc();
+ this._loaderInfo = this.loader.contentLoaderInfo.applicationDomain;
+ this.loader = null;
+ }
+
+ public function loadProgress(param1:ProgressEvent) : void
+ {
+ var _loc2_:int = int(param1.bytesLoaded / param1.bytesTotal * 100);
+ Control.getInstance().setLoadProess(_loc2_);
+ }
+
+ public function getSprite(param1:String) : Sprite
+ {
+ var _loc2_:Sprite = null;
+ _loc2_ = App.createSprite(param1,this._loaderInfo);
+ if(_loc2_ == null)
+ {
+ _loc2_ = null;
+ }
+ return _loc2_;
+ }
+
+ public function createClip(param1:String) : MovieClip
+ {
+ var _loc2_:MovieClip = null;
+ _loc2_ = App.createMc(param1,this._loaderInfo);
+ if(_loc2_ == null)
+ {
+ _loc2_ = null;
+ }
+ return _loc2_;
+ }
+
+ public function getMovieClip(param1:String) : MovieClip
+ {
+ return this.createClip(param1);
+ }
+
+ public function getPng(param1:String) : BitmapData
+ {
+ var _loc2_:BitmapData = null;
+ _loc2_ = App.createPng(param1,this._loaderInfo);
+ if(_loc2_ == null)
+ {
+ _loc2_ = null;
+ }
+ return _loc2_;
+ }
+
+ public function getButton(param1:String) : SimpleButton
+ {
+ var _loc2_:SimpleButton = null;
+ _loc2_ = App.createButton(param1,this._loaderInfo);
+ if(_loc2_ == null)
+ {
+ _loc2_ = null;
+ }
+ return _loc2_;
+ }
+
+ public function getCenterCss() : TextFormat
+ {
+ return this.centerCss;
+ }
+
+ private function upBuild(param1:MouseEvent) : void
+ {
+ if(!this.canUp)
+ {
+ return;
+ }
+ var _loc2_:int = this.build.castleBuild.casBuiId;
+ ConnectService.getInstance().castleService.upCastleBui(_loc2_);
+ }
+
+ private function desTroyBuild(param1:MouseEvent) : void
+ {
+ var _loc2_:int = this.build.castleBuild.casBuiId;
+ TimerManager.getInstance().destroyBuild(_loc2_);
+ }
+
+ private function addSpeedBuild(param1:MouseEvent) : void
+ {
+ var _loc2_:AddSpeed = new AddSpeed();
+ _loc2_.id = this.build.castleBuild.buildQueue.queId;
+ _loc2_.fastQueType = 1;
+ var _loc3_:AddSpeedUI = AddSpeedUI.getInstance();
+ _loc3_.getFastInfo(_loc2_);
+ _loc3_.addToStage();
+ }
+
+ private function cancelBuild(param1:MouseEvent) : void
+ {
+ var _loc2_:int = this.build.castleBuild.buildQueue.queId;
+ TimerManager.getInstance().cancelBuild(_loc2_);
+ }
+
+ public function show() : void
+ {
+ UIListManage.getInstance().addUI(this);
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ this.getBgImg(_loc2_);
+ }
+
+ public function getBgImg(param1:Bitmap) : void
+ {
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/BuildData.as b/flash_decompiled/com/view/ui/BuildData.as
new file mode 100644
index 0000000..7fdc9fb
--- /dev/null
+++ b/flash_decompiled/com/view/ui/BuildData.as
@@ -0,0 +1,60 @@
+package com.view.ui
+{
+ public class BuildData
+ {
+
+ private var _swfUrl:String;
+
+ private var _picUrl:String;
+
+ private var _x:int;
+
+ private var _y:int;
+
+ private var _posNo:String;
+
+ public function BuildData(param1:int, param2:int, param3:String)
+ {
+ super();
+ this._x = param1;
+ this._y = param2;
+ this._posNo = param3;
+ }
+
+ public function get x() : int
+ {
+ return this._x;
+ }
+
+ public function get y() : int
+ {
+ return this._y;
+ }
+
+ public function get posNo() : String
+ {
+ return this._posNo;
+ }
+
+ public function get swfUrl() : String
+ {
+ return this._swfUrl;
+ }
+
+ public function set swfUrl(param1:String) : void
+ {
+ this._swfUrl = param1;
+ }
+
+ public function get picUrl() : String
+ {
+ return this._picUrl;
+ }
+
+ public function set picUrl(param1:String) : void
+ {
+ this._picUrl = param1;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/BuildListUI.as b/flash_decompiled/com/view/ui/BuildListUI.as
new file mode 100644
index 0000000..9107f3f
--- /dev/null
+++ b/flash_decompiled/com/view/ui/BuildListUI.as
@@ -0,0 +1,644 @@
+package com.view.ui
+{
+ import com.comfig.ClassConfig;
+ import com.comfig.CommonData;
+ import com.control.ConnectService;
+ import com.control.castle.event.CastleBuildListEvent;
+ import com.data.data.city.Building;
+ import com.utils.HashMap;
+ import com.view.UIListManage;
+ import com.view.cache.BuildCache;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.build.BuildMc;
+ import com.view.ui.build.data.BuildMcInfo;
+ import flash.display.MovieClip;
+ import flash.events.Event;
+ import flash.utils.Dictionary;
+
+ public class BuildListUI extends BaseUI
+ {
+
+ private static var instance:BuildListUI;
+
+ private var buildList:Dictionary;
+
+ private var buildArr:Array;
+
+ private var mainMc:MovieClip;
+
+ private var economicMc:MovieClip;
+
+ private var militaryMc:MovieClip;
+
+ private var buildPosNo:String;
+
+ private var type:int;
+
+ private var listBg:UIWindowBg;
+
+ private var mainMap:HashMap;
+
+ private var economicMap:HashMap;
+
+ private var militaryMap:HashMap;
+
+ private var curBuildList:Array;
+
+ public function BuildListUI()
+ {
+ super();
+ this.buildList = new Dictionary();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_jianzhaoliebiao);
+ super.setPosition();
+ this.listBg = new UIWindowBg();
+ this.listBg.initSecondPanel(630,400);
+ addChild(this.listBg);
+ this.listBg.x = 11;
+ this.listBg.y = 39;
+ }
+
+ public static function getInstance() : BuildListUI
+ {
+ if(instance == null)
+ {
+ instance = new BuildListUI();
+ }
+ return instance;
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.addEvent();
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ this.delEvent();
+ }
+
+ private function addEvent() : void
+ {
+ ConnectService.getInstance().addEventListener(CastleBuildListEvent.MAIN_CASTLE_BUILDLIST,this.getCastleBuildListResult);
+ }
+
+ private function delEvent() : void
+ {
+ var _loc1_:Building = null;
+ for each(_loc1_ in this.curBuildList)
+ {
+ this.buildList[_loc1_.entId] = null;
+ delete this.buildList[_loc1_.entId];
+ }
+ this.curBuildList = new Array();
+ ConnectService.getInstance().removeEventListener(CastleBuildListEvent.MAIN_CASTLE_BUILDLIST,this.getCastleBuildListResult);
+ }
+
+ public function getBuildList() : void
+ {
+ ConnectService.getInstance().castleService.getNewBuildList(face.currCasId);
+ }
+
+ private function getMainList() : void
+ {
+ var _loc1_:BuildMcInfo = null;
+ var _loc2_:BuildMc = null;
+ if(this.mainMc == null)
+ {
+ this.mainMap = new HashMap();
+ this.getBuildPosiArr();
+ this.mainMc = face.getMovieClip(ClassConfig.ui_buildlist);
+ this.mainMc.line_1.gotoAndStop(1);
+ this.mainMc.line_2.gotoAndStop(1);
+ this.mainMc.line_3.gotoAndStop(1);
+ this.mainMc.line_4.gotoAndStop(1);
+ this.mainMc.line_5.gotoAndStop(1);
+ this.mainMc.line_6.gotoAndStop(1);
+ this.mainMc.line_7.gotoAndStop(1);
+ this.mainMc.line_8.gotoAndStop(1);
+ for each(_loc1_ in this.buildArr)
+ {
+ _loc2_ = new BuildMc(_loc1_);
+ this.mainMap.put(_loc1_.entId,_loc2_);
+ this.mainMc.addChild(_loc2_);
+ }
+ }
+ }
+
+ private function getMainData() : void
+ {
+ var _loc2_:int = 0;
+ var _loc5_:int = 0;
+ this.listBg.addChild(this.mainMc);
+ var _loc1_:Building = this.buildList[10110001];
+ if(_loc1_ != null)
+ {
+ _loc2_ = _loc1_.currentNums;
+ this.mainMap.get(10110001).setData(_loc1_);
+ }
+ else
+ {
+ _loc2_ = 1;
+ this.mainMap.get(10110001).hasBuild();
+ }
+ var _loc3_:BuildMc = this.mainMap.get(10110002);
+ var _loc4_:Building = this.buildList[10110002];
+ if(_loc4_ != null)
+ {
+ _loc5_ = _loc4_.currentNums;
+ _loc3_.setData(_loc4_);
+ }
+ else
+ {
+ _loc5_ = 1;
+ _loc3_.hasBuild();
+ }
+ if(_loc3_.buildStatus == BuildMc.BUILD_STATUS_1 || _loc3_.buildStatus == BuildMc.BUILD_STATUS_3)
+ {
+ this.mainMc.line_1.gotoAndStop(2);
+ }
+ else
+ {
+ this.mainMc.line_1.gotoAndStop(1);
+ }
+ var _loc6_:BuildMc = this.mainMap.get(10116001);
+ var _loc7_:Building = this.buildList[10116001];
+ if(_loc7_ != null)
+ {
+ _loc6_.setData(_loc7_);
+ }
+ else
+ {
+ _loc6_.hasBuild();
+ }
+ if(_loc6_.buildStatus == BuildMc.BUILD_STATUS_1 || _loc6_.buildStatus == BuildMc.BUILD_STATUS_3)
+ {
+ this.mainMc.line_3.gotoAndStop(2);
+ }
+ else
+ {
+ this.mainMc.line_3.gotoAndStop(1);
+ }
+ var _loc8_:BuildMc = this.mainMap.get(10114001);
+ var _loc9_:Building = this.buildList[10114001];
+ if(_loc9_ != null)
+ {
+ _loc8_.setData(_loc9_);
+ }
+ else
+ {
+ _loc8_.hasBuild();
+ }
+ if(_loc8_.buildStatus == BuildMc.BUILD_STATUS_1 || _loc8_.buildStatus == BuildMc.BUILD_STATUS_3)
+ {
+ this.mainMc.line_2.gotoAndStop(2);
+ }
+ else
+ {
+ this.mainMc.line_2.gotoAndStop(1);
+ }
+ var _loc10_:BuildMc = this.mainMap.get(10112001);
+ var _loc11_:Building = this.buildList[10112001];
+ if(_loc11_ != null)
+ {
+ _loc10_.setData(_loc11_);
+ }
+ else
+ {
+ _loc10_.hasBuild();
+ }
+ if(_loc10_.buildStatus != BuildMc.BUILD_STATUS_4)
+ {
+ this.mainMc.line_4.gotoAndStop(2);
+ }
+ else
+ {
+ this.mainMc.line_4.gotoAndStop(1);
+ }
+ var _loc12_:BuildMc = this.mainMap.get(10115002);
+ var _loc13_:Building = this.buildList[10115002];
+ if(_loc13_ != null)
+ {
+ _loc12_.setData(_loc13_);
+ }
+ else
+ {
+ _loc12_.hasBuild();
+ }
+ if(_loc12_.buildStatus == BuildMc.BUILD_STATUS_1 || _loc12_.buildStatus == BuildMc.BUILD_STATUS_3)
+ {
+ this.mainMc.line_5.gotoAndStop(2);
+ }
+ else
+ {
+ this.mainMc.line_5.gotoAndStop(1);
+ }
+ var _loc14_:BuildMc = this.mainMap.get(10114003);
+ var _loc15_:Building = this.buildList[10114003];
+ if(_loc15_ != null)
+ {
+ _loc14_.setData(_loc15_);
+ }
+ else
+ {
+ _loc14_.hasBuild();
+ }
+ if(_loc14_.buildStatus == BuildMc.BUILD_STATUS_1 || _loc14_.buildStatus == BuildMc.BUILD_STATUS_3)
+ {
+ this.mainMc.line_6.gotoAndStop(2);
+ }
+ else
+ {
+ this.mainMc.line_6.gotoAndStop(1);
+ }
+ var _loc16_:Building = this.buildList[10113001];
+ if(_loc16_ != null)
+ {
+ this.mainMap.get(10113001).setData(_loc16_);
+ }
+ else
+ {
+ this.mainMap.get(10113001).hasBuild();
+ }
+ var _loc17_:BuildMc = this.mainMap.get(10116002);
+ var _loc18_:Building = this.buildList[10116002];
+ if(_loc18_ != null)
+ {
+ _loc17_.setData(_loc18_);
+ }
+ else
+ {
+ _loc17_.hasBuild();
+ }
+ if(_loc17_.buildStatus == BuildMc.BUILD_STATUS_1 || _loc17_.buildStatus == BuildMc.BUILD_STATUS_3)
+ {
+ this.mainMc.line_7.gotoAndStop(2);
+ }
+ else
+ {
+ this.mainMc.line_7.gotoAndStop(1);
+ }
+ var _loc19_:Building = this.buildList[10117001];
+ var _loc20_:BuildMc = this.mainMap.get(10117001);
+ if(_loc19_ != null)
+ {
+ _loc20_.setData(_loc19_);
+ }
+ else
+ {
+ _loc20_.hasBuild();
+ }
+ if(_loc20_.buildStatus == BuildMc.BUILD_STATUS_1 || _loc20_.buildStatus == BuildMc.BUILD_STATUS_3)
+ {
+ this.mainMc.line_8.gotoAndStop(2);
+ }
+ else
+ {
+ this.mainMc.line_8.gotoAndStop(1);
+ }
+ }
+
+ private function getBuildPosiArr() : void
+ {
+ this.buildArr = new Array();
+ var _loc1_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_HOUSE,44,61);
+ var _loc2_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_WAREHOUSE,281,61);
+ var _loc3_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_MARKET,515,61);
+ var _loc4_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_PUB,44,176);
+ var _loc5_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_CAMP,203,176);
+ var _loc6_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_MEDICAL,361,176);
+ var _loc7_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_WORK,515,176);
+ var _loc8_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_BOOK,44,288);
+ var _loc9_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_SMITHY,282,288);
+ var _loc10_:BuildMcInfo = new BuildMcInfo(CommonData.BUILD_MISSION,516,288);
+ this.buildArr.push(_loc1_);
+ this.buildArr.push(_loc2_);
+ this.buildArr.push(_loc3_);
+ this.buildArr.push(_loc4_);
+ this.buildArr.push(_loc5_);
+ this.buildArr.push(_loc6_);
+ this.buildArr.push(_loc7_);
+ this.buildArr.push(_loc8_);
+ this.buildArr.push(_loc9_);
+ this.buildArr.push(_loc10_);
+ }
+
+ private function getEconomicList() : void
+ {
+ var _loc1_:BuildMcInfo = null;
+ var _loc2_:BuildMcInfo = null;
+ var _loc3_:BuildMcInfo = null;
+ var _loc4_:BuildMcInfo = null;
+ var _loc5_:BuildMcInfo = null;
+ var _loc6_:Array = null;
+ var _loc7_:BuildMcInfo = null;
+ var _loc8_:BuildMc = null;
+ if(this.economicMc == null)
+ {
+ this.economicMap = new HashMap();
+ this.economicMc = face.getMovieClip(ClassConfig.ui_economic_list);
+ this.economicMc.x = 100;
+ this.economicMc.y = 20;
+ this.economicMc.line_2.gotoAndStop(1);
+ this.economicMc.line_1.gotoAndStop(1);
+ _loc1_ = new BuildMcInfo(CommonData.ECONOMIC_2,163,3);
+ _loc2_ = new BuildMcInfo(CommonData.ECONOMIC_4,165,137);
+ _loc3_ = new BuildMcInfo(CommonData.ECONOMIC_3,6,270);
+ _loc4_ = new BuildMcInfo(CommonData.ECONOMIC_5,171,270);
+ _loc5_ = new BuildMcInfo(CommonData.ECONOMIC_6,333,270);
+ _loc6_ = new Array();
+ _loc6_.push(_loc1_);
+ _loc6_.push(_loc2_);
+ _loc6_.push(_loc3_);
+ _loc6_.push(_loc4_);
+ _loc6_.push(_loc5_);
+ for each(_loc7_ in _loc6_)
+ {
+ _loc8_ = new BuildMc(_loc7_);
+ this.economicMap.put(_loc7_.entId,_loc8_);
+ this.economicMc.addChild(_loc8_);
+ }
+ }
+ }
+
+ private function getEconomicData() : void
+ {
+ var _loc2_:int = 0;
+ var _loc4_:int = 0;
+ this.listBg.addChild(this.economicMc);
+ var _loc1_:Building = this.buildList[10130002];
+ if(_loc1_ != null)
+ {
+ _loc2_ = _loc1_.currentNums;
+ this.economicMap.get(10130002).setData(_loc1_);
+ }
+ else
+ {
+ _loc2_ = 1;
+ this.economicMap.get(10130002).hasBuild();
+ }
+ if(_loc2_ > 0)
+ {
+ this.economicMc.line_2.gotoAndStop(2);
+ }
+ else
+ {
+ this.economicMc.line_2.gotoAndStop(1);
+ }
+ var _loc3_:Building = this.buildList[10130004];
+ if(_loc3_ != null)
+ {
+ _loc4_ = _loc3_.currentNums;
+ this.economicMap.get(10130004).setData(_loc3_);
+ }
+ else
+ {
+ _loc4_ = 1;
+ this.economicMap.get(10130004).hasBuild();
+ }
+ if(_loc4_ > 0)
+ {
+ this.economicMc.line_1.gotoAndStop(2);
+ }
+ else
+ {
+ this.economicMc.line_1.gotoAndStop(1);
+ }
+ var _loc5_:Building = this.buildList[10130003];
+ if(_loc5_ != null)
+ {
+ this.economicMap.get(10130003).setData(_loc5_);
+ }
+ else
+ {
+ this.economicMap.get(10130003).hasBuild();
+ }
+ var _loc6_:Building = this.buildList[10130005];
+ if(_loc6_ != null)
+ {
+ this.economicMap.get(10130005).setData(_loc6_);
+ }
+ else
+ {
+ this.economicMap.get(10130005).hasBuild();
+ }
+ var _loc7_:Building = this.buildList[10130006];
+ if(_loc7_ != null)
+ {
+ this.economicMap.get(10130006).setData(_loc7_);
+ }
+ else
+ {
+ this.economicMap.get(10130006).hasBuild();
+ }
+ }
+
+ private function getMilitaryList() : void
+ {
+ var _loc1_:BuildMcInfo = null;
+ var _loc2_:BuildMcInfo = null;
+ var _loc3_:BuildMcInfo = null;
+ var _loc4_:BuildMcInfo = null;
+ var _loc5_:BuildMcInfo = null;
+ var _loc6_:Array = null;
+ var _loc7_:BuildMcInfo = null;
+ var _loc8_:BuildMc = null;
+ if(this.militaryMc == null)
+ {
+ this.militaryMap = new HashMap();
+ this.militaryMc = face.getMovieClip(ClassConfig.ui_military_list);
+ this.militaryMc.x = 100;
+ this.militaryMc.y = 20;
+ this.militaryMc.line_2.gotoAndStop(1);
+ this.militaryMc.line_1.gotoAndStop(1);
+ _loc1_ = new BuildMcInfo(CommonData.MILITARY_2,163,3);
+ _loc2_ = new BuildMcInfo(CommonData.MILITARY_3,165,137);
+ _loc3_ = new BuildMcInfo(CommonData.MILITARY_4,6,270);
+ _loc4_ = new BuildMcInfo(CommonData.MILITARY_6,171,270);
+ _loc5_ = new BuildMcInfo(CommonData.MILITARY_5,333,270);
+ _loc6_ = new Array();
+ _loc6_.push(_loc1_);
+ _loc6_.push(_loc2_);
+ _loc6_.push(_loc3_);
+ _loc6_.push(_loc4_);
+ _loc6_.push(_loc5_);
+ for each(_loc7_ in _loc6_)
+ {
+ _loc8_ = new BuildMc(_loc7_);
+ this.militaryMap.put(_loc7_.entId,_loc8_);
+ this.militaryMc.addChild(_loc8_);
+ }
+ }
+ }
+
+ private function getMilitaryData() : void
+ {
+ var _loc2_:int = 0;
+ var _loc4_:int = 0;
+ this.listBg.addChild(this.militaryMc);
+ var _loc1_:Building = this.buildList[10140002];
+ if(_loc1_ != null)
+ {
+ _loc2_ = _loc1_.currentNums;
+ this.militaryMap.get(10140002).setData(_loc1_);
+ }
+ else
+ {
+ _loc2_ = 1;
+ this.militaryMap.get(10140002).hasBuild();
+ }
+ if(_loc2_ > 0)
+ {
+ this.militaryMc.line_2.gotoAndStop(2);
+ }
+ else
+ {
+ this.militaryMc.line_2.gotoAndStop(1);
+ }
+ var _loc3_:Building = this.buildList[10140003];
+ if(_loc3_ != null)
+ {
+ _loc4_ = _loc3_.currentNums;
+ this.militaryMap.get(10140003).setData(_loc3_);
+ }
+ else
+ {
+ _loc4_ = 1;
+ this.militaryMap.get(10140003).hasBuild();
+ }
+ if(_loc4_ > 0)
+ {
+ this.militaryMc.line_1.gotoAndStop(2);
+ }
+ else
+ {
+ this.militaryMc.line_1.gotoAndStop(1);
+ }
+ var _loc5_:Building = this.buildList[10140004];
+ if(_loc5_ != null)
+ {
+ this.militaryMap.get(10140004).setData(_loc5_);
+ }
+ else
+ {
+ this.militaryMap.get(10140004).hasBuild();
+ }
+ var _loc6_:Building = this.buildList[10140005];
+ if(_loc6_ != null)
+ {
+ this.militaryMap.get(10140005).setData(_loc6_);
+ }
+ else
+ {
+ this.militaryMap.get(10140005).hasBuild();
+ }
+ var _loc7_:Building = this.buildList[10140006];
+ if(_loc7_ != null)
+ {
+ this.militaryMap.get(10140006).setData(_loc7_);
+ }
+ else
+ {
+ this.militaryMap.get(10140006).hasBuild();
+ }
+ }
+
+ private function getBuildMcInfo(param1:MovieClip, param2:Building) : void
+ {
+ if(param2.currentNums == 0)
+ {
+ param1._txt.gotoAndStop(2);
+ param1._txt.visible = false;
+ }
+ else
+ {
+ param1._txt.visible = true;
+ param1._txt._txt.text = param2.currentNums.toString();
+ }
+ }
+
+ public function setBuildTextStyle(param1:int, param2:Boolean) : void
+ {
+ }
+
+ public function setClickArea(param1:String, param2:int) : void
+ {
+ this.buildPosNo = param1;
+ this.type = param2;
+ }
+
+ public function getClickArea() : String
+ {
+ return this.buildPosNo;
+ }
+
+ public function addSelf() : void
+ {
+ if(!UIListManage.getInstance().containsUI(this))
+ {
+ UIListManage.getInstance().addUI(this);
+ }
+ this.delBuildList();
+ if(this.type == 1)
+ {
+ this.getMainList();
+ }
+ if(this.type == 2)
+ {
+ this.getMilitaryList();
+ }
+ if(this.type == 3)
+ {
+ this.getEconomicList();
+ }
+ }
+
+ private function delBuildList() : void
+ {
+ if(Boolean(this.mainMc) && this.listBg.contains(this.mainMc))
+ {
+ this.listBg.removeChild(this.mainMc);
+ }
+ if(Boolean(this.economicMc) && this.listBg.contains(this.economicMc))
+ {
+ this.listBg.removeChild(this.economicMc);
+ }
+ if(Boolean(this.militaryMc) && this.listBg.contains(this.militaryMc))
+ {
+ this.listBg.removeChild(this.militaryMc);
+ }
+ }
+
+ private function getCastleBuildListResult(param1:CastleBuildListEvent) : void
+ {
+ var _loc2_:Building = null;
+ var _loc3_:int = 0;
+ this.curBuildList = param1.buildListArray;
+ for each(_loc2_ in this.curBuildList)
+ {
+ _loc3_ = BuildCache.getInstance().getBuildNums(face.currCasId,_loc2_.entId);
+ _loc2_.currentNums = _loc3_;
+ if(_loc2_.currentNums < _loc2_.numLimit || _loc2_.numLimit > 1)
+ {
+ this.buildList[_loc2_.entId] = _loc2_;
+ }
+ }
+ if(this.type == 3)
+ {
+ this.getEconomicData();
+ }
+ if(this.type == 2)
+ {
+ this.getMilitaryData();
+ }
+ if(this.type == 1)
+ {
+ this.getMainData();
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/BuildUpListUI.as b/flash_decompiled/com/view/ui/BuildUpListUI.as
new file mode 100644
index 0000000..5d90a11
--- /dev/null
+++ b/flash_decompiled/com/view/ui/BuildUpListUI.as
@@ -0,0 +1,191 @@
+package com.view.ui
+{
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.greensock.TweenMax;
+ import com.utils.TimerManager;
+ import com.view.Control;
+ import com.view.newui.UIConfig;
+ import com.view.ui.buildlist.BuildTimeMc;
+ import com.view.ui.buildlist.TimerInfo;
+ import com.view.ui.menu.mc.MenuLeftBtn;
+ import com.view.ui.menu.mc.MenuRightBtn;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class BuildUpListUI extends BaseUI
+ {
+
+ private static var instance:BuildUpListUI;
+
+ private var buildListbg:Sprite;
+
+ private var btn:MenuRightBtn;
+
+ private var rightBtn:MenuLeftBtn;
+
+ private var _currType:int;
+
+ private var textField:TextField;
+
+ private var buildListArr:Array = new Array();
+
+ public function BuildUpListUI()
+ {
+ super();
+ this.btn = new MenuRightBtn();
+ addChild(this.btn);
+ this.btn.x = 232;
+ this.btn.addEventListener(MouseEvent.CLICK,this.showList);
+ this.buildListbg = new Scale9Grid(face.getSprite(UIConfig.chat_bg1),245,134);
+ addChild(this.buildListbg);
+ this.buildListbg.x = 250;
+ this.rightBtn = new MenuLeftBtn();
+ this.buildListbg.addChild(this.rightBtn);
+ this.rightBtn.x = 232;
+ this.rightBtn.addEventListener(MouseEvent.CLICK,this.hiddenList);
+ this.setPosition();
+ var _loc1_:Sprite = PublicMethod.createShape(0,254,150);
+ addChild(_loc1_);
+ this.buildListbg.mask = _loc1_;
+ }
+
+ public static function getInstance() : BuildUpListUI
+ {
+ if(instance == null)
+ {
+ return instance = new BuildUpListUI();
+ }
+ return instance;
+ }
+
+ private function showList(param1:MouseEvent) : void
+ {
+ this.btn.visible = false;
+ TweenMax.to(this.buildListbg,0.5,{"x":0});
+ this.openBuildList();
+ this._currType = 1;
+ }
+
+ private function hiddenList(param1:MouseEvent) : void
+ {
+ TweenMax.to(this.buildListbg,0.5,{
+ "x":252,
+ "onComplete":this.complete
+ });
+ this.closeBuildList();
+ this._currType = 2;
+ }
+
+ private function complete() : void
+ {
+ this.btn.visible = true;
+ }
+
+ override public function setPosition() : void
+ {
+ this.x = face.realWidth - 252;
+ this.y = 250;
+ }
+
+ public function setView() : void
+ {
+ if(Control.getInstance().contains(this))
+ {
+ Control.getInstance().removeChild(this);
+ }
+ else
+ {
+ Control.getInstance().addChild(this);
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ }
+
+ public function openBuildList() : void
+ {
+ var _loc4_:int = 0;
+ var _loc5_:TimerInfo = null;
+ var _loc6_:BuildTimeMc = null;
+ this.closeBuildList();
+ var _loc1_:int = TimerManager.getInstance().getBuildTimerLength();
+ var _loc2_:int = TimerManager.getInstance().getSkillTimerLength();
+ var _loc3_:int = TimerManager.getInstance().getWallTimerLength();
+ if(_loc1_ == 0 && _loc2_ == 0 && _loc3_ == 0)
+ {
+ this.noBuildList();
+ }
+ else
+ {
+ if(Boolean(this.textField) && this.buildListbg.contains(this.textField))
+ {
+ this.buildListbg.removeChild(this.textField);
+ }
+ _loc4_ = 0;
+ for each(_loc5_ in TimerManager.getInstance().getBuildTimeMap())
+ {
+ _loc6_ = new BuildTimeMc(_loc5_);
+ this.buildListbg.addChild(_loc6_);
+ _loc6_.x = 2;
+ _loc6_.y = 2 + _loc4_ * 20;
+ _loc5_.process2 = _loc6_.getTimer;
+ _loc5_.finish2 = this.openBuildList;
+ this.buildListArr.push(_loc6_);
+ _loc4_++;
+ }
+ for each(_loc5_ in TimerManager.getInstance().getTechTimeMap())
+ {
+ _loc6_ = new BuildTimeMc(_loc5_);
+ this.buildListbg.addChild(_loc6_);
+ _loc6_.x = 2;
+ _loc6_.y = 2 + _loc4_ * 20;
+ _loc5_.process2 = _loc6_.getTimer;
+ _loc5_.finish2 = this.openBuildList;
+ this.buildListArr.push(_loc6_);
+ _loc4_++;
+ }
+ for each(_loc5_ in TimerManager.getInstance().getWallTimeMap())
+ {
+ _loc6_ = new BuildTimeMc(_loc5_);
+ this.buildListbg.addChild(_loc6_);
+ _loc6_.x = 2;
+ _loc6_.y = 2 + _loc4_ * 20;
+ _loc5_.process2 = _loc6_.getTimer;
+ _loc5_.finish2 = this.openBuildList;
+ this.buildListArr.push(_loc6_);
+ _loc4_++;
+ }
+ }
+ }
+
+ private function noBuildList() : void
+ {
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ }
+
+ private function closeBuildList() : void
+ {
+ var _loc1_:BuildTimeMc = null;
+ for each(_loc1_ in this.buildListArr)
+ {
+ _loc1_.timeInfo.process2 = null;
+ _loc1_.timeInfo.finish2 = null;
+ this.buildListbg.removeChild(_loc1_);
+ }
+ this.buildListArr = new Array();
+ }
+
+ public function get currType() : int
+ {
+ return this._currType;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/PlayUI.as b/flash_decompiled/com/view/ui/PlayUI.as
new file mode 100644
index 0000000..b353025
--- /dev/null
+++ b/flash_decompiled/com/view/ui/PlayUI.as
@@ -0,0 +1,47 @@
+package com.view.ui
+{
+ import com.comfig.PathConfig;
+ import flash.display.MovieClip;
+ import flash.events.Event;
+ import flash.net.URLRequest;
+
+ public class PlayUI extends BaseUI
+ {
+
+ private var toweUrl:String = "Tower.swf";
+
+ public var playUIRes:PlayUIRes;
+
+ public var playMc:MovieClip;
+
+ public function PlayUI()
+ {
+ var _loc1_:URLRequest = null;
+ this.playUIRes = PlayUIRes.getInstance();
+ super();
+ if(this.playUIRes.getLoaderInfo() == null)
+ {
+ _loc1_ = new URLRequest(PathConfig.getInstance().getVerStr(this.toweUrl));
+ super.loadUIResource(_loc1_);
+ }
+ else
+ {
+ this.createUI();
+ }
+ }
+
+ override public function loadUiComplete(param1:Event) : void
+ {
+ super.loadUiComplete(param1);
+ this.playUIRes.setLoaderInfo(_loaderInfo);
+ this.createUI();
+ }
+
+ override public function createUI() : void
+ {
+ super.addUIBg();
+ super.setPosition();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/PlayUIRes.as b/flash_decompiled/com/view/ui/PlayUIRes.as
new file mode 100644
index 0000000..6d12fad
--- /dev/null
+++ b/flash_decompiled/com/view/ui/PlayUIRes.as
@@ -0,0 +1,95 @@
+package com.view.ui
+{
+ import com.common.App;
+ import flash.display.BitmapData;
+ import flash.display.MovieClip;
+ import flash.display.SimpleButton;
+ import flash.display.Sprite;
+ import flash.system.ApplicationDomain;
+
+ public class PlayUIRes
+ {
+
+ private static var instance:PlayUIRes;
+
+ private var _loaderInfo:ApplicationDomain;
+
+ public function PlayUIRes()
+ {
+ super();
+ if(instance != null)
+ {
+ throw new Error("错误,单例,无法创建新的实例");
+ }
+ }
+
+ public static function getInstance() : PlayUIRes
+ {
+ if(instance == null)
+ {
+ instance = new PlayUIRes();
+ }
+ return instance;
+ }
+
+ public function setLoaderInfo(param1:ApplicationDomain) : void
+ {
+ this._loaderInfo = param1;
+ }
+
+ public function getLoaderInfo() : ApplicationDomain
+ {
+ return this._loaderInfo;
+ }
+
+ public function getSprite(param1:String) : Sprite
+ {
+ var _loc2_:Sprite = null;
+ _loc2_ = App.createSprite(param1,this._loaderInfo);
+ if(_loc2_ == null)
+ {
+ _loc2_ = null;
+ }
+ return _loc2_;
+ }
+
+ private function createClip(param1:String) : MovieClip
+ {
+ var _loc2_:MovieClip = null;
+ _loc2_ = App.createMc(param1,this._loaderInfo);
+ if(_loc2_ == null)
+ {
+ _loc2_ = null;
+ }
+ return _loc2_;
+ }
+
+ public function getMovieClip(param1:String) : MovieClip
+ {
+ return this.createClip(param1);
+ }
+
+ public function getPng(param1:String) : BitmapData
+ {
+ var _loc2_:BitmapData = null;
+ _loc2_ = App.createPng(param1,this._loaderInfo);
+ if(_loc2_ == null)
+ {
+ _loc2_ = null;
+ }
+ return _loc2_;
+ }
+
+ public function getButton(param1:String) : SimpleButton
+ {
+ var _loc2_:SimpleButton = null;
+ _loc2_ = App.createButton(param1,this._loaderInfo);
+ if(_loc2_ == null)
+ {
+ _loc2_ = null;
+ }
+ return _loc2_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/RightControlUI.as b/flash_decompiled/com/view/ui/RightControlUI.as
new file mode 100644
index 0000000..fc99b27
--- /dev/null
+++ b/flash_decompiled/com/view/ui/RightControlUI.as
@@ -0,0 +1,191 @@
+package com.view.ui
+{
+ import com.view.mc.button.Button_30;
+ import com.view.mc.button.Button_4;
+ import com.view.ui.activity.UpdateUI;
+ import com.view.ui.countrygov.CountryGovUI;
+ import com.view.ui.friend.FriendMainUI;
+ import com.view.ui.gift.ShowGiftItem;
+ import com.view.ui.help.HelpUI;
+ import com.view.ui.mail.MailUI;
+ import com.view.ui.pak.UserPackUI;
+ import com.view.ui.ranking.RankingMainUI;
+ import com.view.ui.shop.ShopUI;
+ import com.view.ui.test.TestUI;
+ import com.view.ui.warreport.MilitaryView;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class RightControlUI extends BaseUI
+ {
+
+ private var btn_0:Button_4;
+
+ private var btn_1:Button_4;
+
+ private var btn_2:Button_4;
+
+ private var btn_3:Button_4;
+
+ private var btn_4:Button_4;
+
+ private var btn_5:Button_4;
+
+ private var btn_6:Button_4;
+
+ private var btn_7:Button_4;
+
+ private var btn_8:Button_4;
+
+ private var btn_update:Button_30;
+
+ private var userPack:UserPackUI;
+
+ private var test1:TestUI;
+
+ private var updateUI:UpdateUI;
+
+ private var helpUI:HelpUI;
+
+ private var countryGovUI:CountryGovUI;
+
+ public function RightControlUI()
+ {
+ super();
+ this.btn_0 = new Button_4("国家");
+ this.btn_1 = new Button_4("商城",true);
+ this.btn_2 = new Button_4("背包");
+ this.btn_3 = new Button_4("排行");
+ this.btn_4 = new Button_4("邮件");
+ this.btn_5 = new Button_4("好友");
+ this.btn_6 = new Button_4("军情");
+ this.btn_7 = new Button_4("G M");
+ this.btn_8 = new Button_4("帮助");
+ this.btn_update = new Button_30();
+ this.btn_update.buttonMode = true;
+ addChild(this.btn_0);
+ addChild(this.btn_1);
+ addChild(this.btn_2);
+ addChild(this.btn_3);
+ addChild(this.btn_4);
+ addChild(this.btn_5);
+ addChild(this.btn_6);
+ addChild(this.btn_7);
+ this.btn_0.x = -this.btn_1.width;
+ this.btn_0.y = 30;
+ this.btn_update.x = this.btn_0.x;
+ this.btn_update.y = this.btn_0.y - 80;
+ this.btn_1.x = this.btn_0.x;
+ this.btn_1.y = this.btn_0.y + this.btn_0.height;
+ this.btn_2.x = this.btn_1.x;
+ this.btn_2.y = this.btn_1.y + this.btn_1.height;
+ this.btn_3.x = this.btn_1.x;
+ this.btn_3.y = this.btn_2.y + this.btn_2.height;
+ this.btn_4.x = this.btn_1.x;
+ this.btn_4.y = this.btn_3.y + this.btn_3.height;
+ this.btn_5.x = this.btn_1.x;
+ this.btn_5.y = this.btn_4.y + this.btn_4.height;
+ this.btn_6.x = this.btn_1.x;
+ this.btn_6.y = this.btn_5.y + this.btn_5.height;
+ this.btn_7.x = this.btn_1.x;
+ this.btn_7.y = this.btn_6.y + this.btn_6.height;
+ this.btn_8.x = this.btn_1.x;
+ this.btn_8.y = this.btn_7.y + this.btn_7.height;
+ this.btn_0.addEventListener(MouseEvent.CLICK,this.openCountryUI);
+ this.btn_1.addEventListener(MouseEvent.CLICK,this.openShopUI);
+ this.btn_2.addEventListener(MouseEvent.CLICK,this.openUserPack);
+ this.btn_3.addEventListener(MouseEvent.CLICK,this.openRanking);
+ this.btn_4.addEventListener(MouseEvent.CLICK,this.openMailUI);
+ this.btn_5.addEventListener(MouseEvent.CLICK,this.openFriendUI);
+ this.btn_7.addEventListener(MouseEvent.CLICK,this.openManage);
+ this.btn_6.addEventListener(MouseEvent.CLICK,this.openMilitaryUI);
+ this.btn_8.addEventListener(MouseEvent.CLICK,this.openHelpUI);
+ this.btn_update.addEventListener(MouseEvent.CLICK,this.openUpdateUI);
+ this.setPosition();
+ }
+
+ override public function setPosition() : void
+ {
+ this.x = face.realWidth;
+ this.y = int(face.realHeight / 2 - height / 2);
+ }
+
+ override public function reSizeWindow(param1:Event) : void
+ {
+ this.setPosition();
+ }
+
+ private function openShopUI(param1:MouseEvent) : void
+ {
+ ShopUI.getInstance().open();
+ }
+
+ public function openUserPack(param1:MouseEvent) : void
+ {
+ if(this.userPack == null)
+ {
+ this.userPack = new UserPackUI();
+ }
+ this.userPack.show();
+ }
+
+ public function openRanking(param1:MouseEvent) : void
+ {
+ var _loc2_:RankingMainUI = RankingMainUI.getInstance();
+ _loc2_.setStartPage(0);
+ _loc2_.show();
+ }
+
+ public function openMailUI(param1:MouseEvent) : void
+ {
+ var _loc2_:MailUI = new MailUI();
+ _loc2_.show();
+ }
+
+ public function openFriendUI(param1:MouseEvent) : void
+ {
+ var _loc2_:FriendMainUI = FriendMainUI.getInstance();
+ _loc2_.show();
+ }
+
+ public function openMilitaryUI(param1:MouseEvent) : void
+ {
+ var _loc2_:MilitaryView = MilitaryView.getInstance();
+ _loc2_.show();
+ }
+
+ private function openManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ShowGiftItem = ShowGiftItem.getInstance();
+ _loc2_.show();
+ }
+
+ private function openUpdateUI(param1:MouseEvent) : void
+ {
+ if(this.updateUI == null)
+ {
+ this.updateUI = new UpdateUI();
+ }
+ this.updateUI.show();
+ }
+
+ private function openHelpUI(param1:MouseEvent) : void
+ {
+ if(this.helpUI == null)
+ {
+ this.helpUI = new HelpUI();
+ }
+ this.helpUI.show();
+ }
+
+ private function openCountryUI(param1:MouseEvent) : void
+ {
+ if(this.countryGovUI == null)
+ {
+ this.countryGovUI = new CountryGovUI();
+ }
+ this.countryGovUI.show();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/UserFaceUI.as b/flash_decompiled/com/view/ui/UserFaceUI.as
new file mode 100644
index 0000000..404d56b
--- /dev/null
+++ b/flash_decompiled/com/view/ui/UserFaceUI.as
@@ -0,0 +1,596 @@
+package com.view.ui
+{
+ import com.comfig.ClassConfig;
+ import com.common.LoadResource;
+ import com.common.PublicGlow;
+ import com.control.ConnectService;
+ import com.control.castle.event.CastleListEvent;
+ import com.data.DataModoule;
+ import com.data.MemeberShip;
+ import com.data.data.city.Castle;
+ import com.events.DevEvent;
+ import com.newdata.user.NewGuild;
+ import com.newdata.user.NewUser;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.Control;
+ import com.view.mc.sprite.UserExpMc;
+ import com.view.tip.CastleTip;
+ import com.view.tip.TipTitle;
+ import com.view.ui.buff.BuffManager;
+ import com.view.ui.castle.NewCastleUI;
+ import com.view.ui.castle.ViewTransCastle;
+ import com.view.ui.vip.VipUI;
+ import flash.display.Bitmap;
+ import flash.display.DisplayObject;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class UserFaceUI extends BaseUI
+ {
+
+ private var userFaceUI:MovieClip;
+
+ private var loadHead:LoadResource;
+
+ private var imgBitmap:Bitmap;
+
+ private var levelMc:Sprite;
+
+ private var casTip:CastleTip;
+
+ private var casTip1:CastleTip;
+
+ private var vipBtn:MovieClip;
+
+ private var vipUI:VipUI;
+
+ private var honorMc:UserExpMc;
+
+ private var lastHonor:int;
+
+ private var lastVipLevel:int = -1;
+
+ private var townTip1:TipTitle;
+
+ private var townTip2:TipTitle;
+
+ private var townTip3:TipTitle;
+
+ private var townTip4:TipTitle;
+
+ private var lastCastleLevel:int;
+
+ private var castleList:Array;
+
+ private var btnArr:Array = new Array();
+
+ private var currCaltBtn:MovieClip;
+
+ private var headUrl:String = "";
+
+ private var showSysMess:Boolean = true;
+
+ public function UserFaceUI()
+ {
+ super();
+ this.userFaceUI = face.getMovieClip(ClassConfig.ui_head);
+ this.userFaceUI.headImg.buttonMode = true;
+ this.userFaceUI.headImg.addEventListener(MouseEvent.CLICK,this.openUserUI,false,0,true);
+ this.userFaceUI.tooltip_mc.width = 184;
+ this.userFaceUI.jingyan_mc.width = 184;
+ this.userFaceUI.flg_mc.gotoAndStop(1);
+ this.userFaceUI.btn_my.addEventListener(MouseEvent.CLICK,this.showSysMessUI);
+ new TipTitle(this.userFaceUI.btn_my,face.stage,face.tip_bg,{
+ "titletext":"收缩/展开个人信息",
+ "titleColor":16777215,
+ "bgAlpha":1
+ });
+ this.userFaceUI.fen1_mc.gotoAndStop(1);
+ this.userFaceUI.fen1_mc.transmarkmc.visible = false;
+ this.userFaceUI.fen1_mc.x = int(this.userFaceUI.fen1_mc.x);
+ this.userFaceUI.fen1_mc.y = int(this.userFaceUI.fen1_mc.y);
+ this.userFaceUI.fen2_mc.gotoAndStop(1);
+ this.userFaceUI.fen2_mc.transmarkmc.visible = false;
+ this.userFaceUI.fen2_mc.x = int(this.userFaceUI.fen2_mc.x);
+ this.userFaceUI.fen2_mc.y = int(this.userFaceUI.fen2_mc.y);
+ this.userFaceUI.fen3_mc.gotoAndStop(1);
+ this.userFaceUI.fen3_mc.transmarkmc.visible = false;
+ this.userFaceUI.fen3_mc.x = int(this.userFaceUI.fen3_mc.x);
+ this.userFaceUI.fen3_mc.y = int(this.userFaceUI.fen3_mc.y);
+ this.userFaceUI.fen4_mc.gotoAndStop(1);
+ this.userFaceUI.fen4_mc.transmarkmc.visible = false;
+ this.userFaceUI.fen4_mc.x = int(this.userFaceUI.fen4_mc.x);
+ this.userFaceUI.fen4_mc.y = int(this.userFaceUI.fen4_mc.y);
+ this.userFaceUI.fen1_mc.addEventListener(MouseEvent.CLICK,this.toCastleCity);
+ this.userFaceUI.fen2_mc.addEventListener(MouseEvent.CLICK,this.toCastleCity);
+ this.userFaceUI.fen3_mc.addEventListener(MouseEvent.CLICK,this.toCastleCity);
+ this.userFaceUI.fen4_mc.addEventListener(MouseEvent.CLICK,this.toCastleCity);
+ this.userFaceUI.fen1_mc.addEventListener(MouseEvent.ROLL_OUT,this.mouseRollOut);
+ this.userFaceUI.fen1_mc.addEventListener(MouseEvent.ROLL_OVER,this.mouseRollOver);
+ this.userFaceUI.fen2_mc.addEventListener(MouseEvent.ROLL_OUT,this.mouseRollOut);
+ this.userFaceUI.fen2_mc.addEventListener(MouseEvent.ROLL_OVER,this.mouseRollOver);
+ this.userFaceUI.fen3_mc.addEventListener(MouseEvent.ROLL_OUT,this.mouseRollOut);
+ this.userFaceUI.fen3_mc.addEventListener(MouseEvent.ROLL_OVER,this.mouseRollOver);
+ this.userFaceUI.fen4_mc.addEventListener(MouseEvent.ROLL_OUT,this.mouseRollOut);
+ this.userFaceUI.fen4_mc.addEventListener(MouseEvent.ROLL_OVER,this.mouseRollOver);
+ this.userFaceUI.zhu0_mc.addEventListener(MouseEvent.ROLL_OUT,this.mouseRollOut);
+ this.userFaceUI.zhu0_mc.addEventListener(MouseEvent.ROLL_OVER,this.mouseRollOver);
+ addChild(this.userFaceUI);
+ this.setPosition();
+ this.honorMc = new UserExpMc();
+ this.userFaceUI.addChild(this.honorMc);
+ this.honorMc.x = 180;
+ this.honorMc.y = 90;
+ new TipTitle(this.userFaceUI.zhu0_mc,face.stage,face.tip_bg,{"titletext":"点击切换到主城"});
+ this.townTip1 = new TipTitle(this.userFaceUI.fen1_mc,face.stage,face.tip_bg,{"titletext":"东部特区(4级城池可建造)"});
+ this.townTip2 = new TipTitle(this.userFaceUI.fen2_mc,face.stage,face.tip_bg,{"titletext":"南部特区(6级城池可建造)"});
+ this.townTip3 = new TipTitle(this.userFaceUI.fen3_mc,face.stage,face.tip_bg,{"titletext":"西部特区(8级城池可建造)"});
+ this.townTip4 = new TipTitle(this.userFaceUI.fen4_mc,face.stage,face.tip_bg,{"titletext":"北部特区(11级城池可建造)"});
+ this.userFaceUI.zhu0_mc.buttonMode = true;
+ this.userFaceUI.zhu0_mc.addEventListener(MouseEvent.CLICK,this.toMainCity);
+ this.userFaceUI.zhu0_mc.filters = [PublicGlow.getInstance().qingGlow];
+ this.currCaltBtn = this.userFaceUI.zhu0_mc;
+ this.addEvent();
+ this.getCastleList();
+ this.vipBtn = face.getMovieClip(ClassConfig.lib_ui_vip);
+ this.vipBtn.gotoAndStop(1);
+ this.userFaceUI.addChild(this.vipBtn);
+ this.vipBtn.x = 30;
+ this.vipBtn.y = 90;
+ this.vipBtn.buttonMode = true;
+ this.setUserData();
+ this.setCastleData();
+ var _loc1_:BuffManager = BuffManager.getInstance();
+ _loc1_.refresh();
+ addChild(_loc1_);
+ _loc1_.x = 300;
+ _loc1_.y = 10;
+ new TipTitle(this.vipBtn,face.stage,face.tip_bg,{"titletext":"查看vip等级"});
+ this.vipBtn.addEventListener(MouseEvent.CLICK,this.openVip,false,0,true);
+ }
+
+ private function openVip(param1:MouseEvent) : void
+ {
+ if(this.vipUI == null)
+ {
+ this.vipUI = new VipUI();
+ }
+ this.vipUI.show();
+ }
+
+ private function addEvent() : void
+ {
+ Utils.g_events.addEventListener(DevEvent.USERCHANGE,this.setUserData);
+ Utils.g_events.addEventListener(DevEvent.CASTLECHANGE,this.setCastleData);
+ ConnectService.getInstance().addEventListener(CastleListEvent.CASTLE_LIST,this.getCastleList);
+ }
+
+ private function setUserData(param1:DevEvent = null) : void
+ {
+ var _loc2_:NewUser = NewUserData.getUser();
+ this.loadUserHead(_loc2_.icon);
+ this.userFaceUI.flg_mc.gotoAndStop(_loc2_.countryId);
+ this.userFaceUI.name_txt.text = _loc2_.userName;
+ var _loc3_:NewGuild = NewUserData.getNewGuild();
+ if(_loc3_)
+ {
+ this.userFaceUI.guild_txt.text = _loc3_.name;
+ }
+ else
+ {
+ this.userFaceUI.guild_txt.text = "无";
+ }
+ var _loc4_:int = 184 * _loc2_.honor / _loc2_.nextLvHonor;
+ if(_loc4_ > 184)
+ {
+ _loc4_ = 184;
+ }
+ this.userFaceUI.jingyan_mc.width = _loc4_;
+ if(this.lastHonor > 0)
+ {
+ this.honorMc.addExp(_loc2_.honor - this.lastHonor);
+ }
+ this.lastHonor = _loc2_.honor;
+ if(Boolean(this.levelMc) && this.userFaceUI.contains(this.levelMc))
+ {
+ this.userFaceUI.removeChild(this.levelMc);
+ }
+ this.levelMc = this.getPngNums(_loc2_.rankId);
+ this.userFaceUI.addChild(this.levelMc);
+ this.levelMc.x = 84;
+ this.levelMc.y = 10;
+ this.levelMc.mouseEnabled = false;
+ var _loc5_:Object = new Object();
+ _loc5_.line1 = "君主等级:" + _loc2_.rankId;
+ _loc5_.line2 = "君主经验:" + _loc2_.honor + "/" + _loc2_.nextLvHonor;
+ _loc5_.line3 = "升级建筑、日常任务和攻击野外营寨可获得君主经验;拆除建筑或处理城内随即出现的运势差的事件,可能使君主经验降低,甚至为负值,但您不会因此降级。";
+ if(this.casTip == null)
+ {
+ this.casTip = new CastleTip(this.userFaceUI.levelBg,face.stage,face.tip_bg,_loc5_);
+ this.casTip1 = new CastleTip(this.userFaceUI.tooltip_mc,face.stage,face.tip_bg,_loc5_);
+ }
+ else
+ {
+ this.casTip.setValue(_loc5_);
+ this.casTip1.setValue(_loc5_);
+ }
+ if(_loc2_.viplevel != this.lastVipLevel)
+ {
+ this.lastVipLevel = _loc2_.viplevel;
+ this.vipBtn.gotoAndStop(this.lastVipLevel + 1);
+ }
+ }
+
+ private function setCastleData(param1:DevEvent = null) : void
+ {
+ if(this.lastCastleLevel == 0)
+ {
+ this.lastCastleLevel = MemeberShip.getMainCastle().casLv;
+ }
+ if(this.lastCastleLevel < MemeberShip.getMainCastle().casLv)
+ {
+ this.lastCastleLevel = MemeberShip.getMainCastle().casLv;
+ switch(this.lastCastleLevel)
+ {
+ case 4:
+ this.userFaceUI.fen1_mc.gotoAndStop(2);
+ this.townTip1.infoObject = {"titletext":"点击营建特区"};
+ break;
+ case 6:
+ this.userFaceUI.fen2_mc.gotoAndStop(2);
+ this.townTip2.infoObject = {"titletext":"点击营建特区"};
+ break;
+ case 8:
+ this.userFaceUI.fen3_mc.gotoAndStop(2);
+ this.townTip3.infoObject = {"titletext":"点击营建特区"};
+ break;
+ case 11:
+ this.userFaceUI.fen4_mc.gotoAndStop(2);
+ this.townTip4.infoObject = {"titletext":"点击营建特区"};
+ }
+ }
+ }
+
+ private function getCastleList(param1:CastleListEvent = null) : void
+ {
+ var _loc3_:Castle = null;
+ var _loc4_:int = 0;
+ this.castleList = MemeberShip.getCastleArr();
+ var _loc2_:int = 1;
+ while(_loc2_ < 5)
+ {
+ _loc3_ = this.castleList[_loc2_ - 1] as Castle;
+ if(_loc3_ != null)
+ {
+ if(_loc3_.castleType == "economic")
+ {
+ if(_loc3_.status == 2)
+ {
+ this.castleBtnPlay(_loc2_,3,true);
+ }
+ else
+ {
+ this.castleBtnPlay(_loc2_,3);
+ }
+ }
+ if(_loc3_.castleType == "military")
+ {
+ if(_loc3_.status == 2)
+ {
+ this.castleBtnPlay(_loc2_,4,true);
+ }
+ else
+ {
+ this.castleBtnPlay(_loc2_,4);
+ }
+ }
+ }
+ else
+ {
+ _loc4_ = MemeberShip.getMainCastle().casLv;
+ if(_loc2_ == 1 && _loc4_ > 3)
+ {
+ this.castleBtnPlay(_loc2_,2);
+ }
+ if(_loc2_ == 2 && _loc4_ > 5)
+ {
+ this.castleBtnPlay(_loc2_,2);
+ }
+ if(_loc2_ == 3 && _loc4_ > 7)
+ {
+ this.castleBtnPlay(_loc2_,2);
+ }
+ if(_loc2_ == 4 && _loc4_ > 10)
+ {
+ this.castleBtnPlay(_loc2_,2);
+ }
+ }
+ _loc2_++;
+ }
+ }
+
+ private function castleBtnPlay(param1:int, param2:int, param3:Boolean = false) : void
+ {
+ var _loc4_:MovieClip = null;
+ var _loc5_:TipTitle = null;
+ var _loc6_:String = null;
+ var _loc7_:String = null;
+ var _loc8_:String = null;
+ switch(param1)
+ {
+ case 1:
+ _loc4_ = this.userFaceUI.fen1_mc;
+ _loc5_ = this.townTip1;
+ _loc6_ = "东部特区(4级城池可建造)";
+ _loc7_ = "点击切换到东部经济特区";
+ _loc8_ = "点击切换到东部军事特区";
+ break;
+ case 2:
+ _loc5_ = this.townTip2;
+ _loc4_ = this.userFaceUI.fen2_mc;
+ _loc6_ = "南部特区(6级城池可建造)";
+ _loc7_ = "点击切换到南部经济特区";
+ _loc8_ = "点击切换到南部军事特区";
+ break;
+ case 3:
+ _loc5_ = this.townTip3;
+ _loc4_ = this.userFaceUI.fen3_mc;
+ _loc6_ = "西部特区(8级城池可建造)";
+ _loc7_ = "点击切换到西部经济特区";
+ _loc8_ = "点击切换到西部军事特区";
+ break;
+ case 4:
+ _loc5_ = this.townTip4;
+ _loc4_ = this.userFaceUI.fen4_mc;
+ _loc6_ = "北部特区(11级城池可建造)";
+ _loc7_ = "点击切换到北部经济特区";
+ _loc8_ = "点击切换到北部军事特区";
+ }
+ _loc4_.gotoAndStop(param2);
+ _loc4_.transmarkmc.visible = param3;
+ if(param3)
+ {
+ _loc7_ = "点击查看转换剩余时间";
+ _loc8_ = "点击查看转换剩余时间";
+ }
+ switch(param2)
+ {
+ case 1:
+ _loc5_.infoObject = {"titletext":_loc6_};
+ break;
+ case 2:
+ _loc4_.buttonMode = true;
+ _loc5_.infoObject = {"titletext":"点击营建特区"};
+ break;
+ case 3:
+ _loc4_.buttonMode = true;
+ _loc5_.infoObject = {"titletext":_loc7_};
+ this.addToBtnArr(_loc4_);
+ break;
+ case 4:
+ _loc4_.buttonMode = true;
+ _loc5_.infoObject = {"titletext":_loc8_};
+ this.addToBtnArr(_loc4_);
+ }
+ }
+
+ private function addToBtnArr(param1:MovieClip) : void
+ {
+ var _loc2_:MovieClip = null;
+ for each(_loc2_ in this.btnArr)
+ {
+ if(_loc2_ == param1)
+ {
+ return;
+ }
+ }
+ this.btnArr.push(param1);
+ }
+
+ private function toMainCity(param1:MouseEvent) : void
+ {
+ var _loc4_:MovieClip = null;
+ var _loc2_:MovieClip = param1.currentTarget as MovieClip;
+ this.currCaltBtn = _loc2_;
+ var _loc3_:int = DataModoule.getInstance().userMgr.castle.casId;
+ face.enterCastle("main",_loc3_);
+ for each(_loc4_ in this.btnArr)
+ {
+ _loc4_.filters = null;
+ }
+ }
+
+ private function toCastleCity(param1:MouseEvent) : void
+ {
+ var _loc5_:Castle = null;
+ var _loc6_:ViewTransCastle = null;
+ var _loc7_:Object = null;
+ var _loc8_:MovieClip = null;
+ var _loc2_:MovieClip = param1.currentTarget as MovieClip;
+ var _loc3_:int = 0;
+ while(_loc3_ < this.btnArr.length)
+ {
+ if(_loc2_ == this.btnArr[_loc3_])
+ {
+ _loc5_ = this.castleList[_loc3_];
+ if(_loc5_.status == 2)
+ {
+ _loc6_ = ViewTransCastle.getInstance();
+ _loc7_ = new Object();
+ _loc7_.id = _loc5_.casId;
+ _loc7_.type = _loc5_.castleType;
+ _loc6_.update(_loc7_);
+ _loc6_.show();
+ return;
+ }
+ }
+ _loc3_++;
+ }
+ this.currCaltBtn = _loc2_;
+ var _loc4_:int = 0;
+ while(_loc4_ < this.btnArr.length)
+ {
+ _loc8_ = this.btnArr[_loc4_] as MovieClip;
+ if(_loc8_ == _loc2_)
+ {
+ face.enterCastle(this.castleList[_loc4_].castleType,this.castleList[_loc4_].casId);
+ this.userFaceUI.zhu0_mc.filters = null;
+ _loc8_.filters = [PublicGlow.getInstance().qingGlow];
+ }
+ else
+ {
+ _loc8_.filters = null;
+ }
+ _loc4_++;
+ }
+ if(_loc2_.currentFrame == 2)
+ {
+ NewCastleUI.getInstance().openUI();
+ }
+ }
+
+ private function mouseRollOver(param1:MouseEvent) : void
+ {
+ var _loc3_:MovieClip = null;
+ var _loc2_:MovieClip = param1.currentTarget as MovieClip;
+ if(this.currCaltBtn == _loc2_)
+ {
+ return;
+ }
+ if(this.userFaceUI.zhu0_mc == _loc2_)
+ {
+ this.userFaceUI.zhu0_mc.filters = [PublicGlow.getInstance().qingGlow];
+ return;
+ }
+ for each(_loc3_ in this.btnArr)
+ {
+ if(_loc3_ == _loc2_)
+ {
+ _loc3_.filters = [PublicGlow.getInstance().qingGlow];
+ return;
+ }
+ }
+ }
+
+ private function mouseRollOut(param1:MouseEvent) : void
+ {
+ var _loc2_:MovieClip = param1.currentTarget as MovieClip;
+ if(this.currCaltBtn != _loc2_)
+ {
+ _loc2_.filters = null;
+ }
+ }
+
+ override public function setPosition() : void
+ {
+ this.x = 0;
+ this.y = 0;
+ }
+
+ private function getPngNums(param1:int) : Sprite
+ {
+ var _loc3_:String = null;
+ var _loc4_:Bitmap = null;
+ var _loc5_:String = null;
+ var _loc6_:Bitmap = null;
+ var _loc7_:String = null;
+ var _loc8_:Bitmap = null;
+ var _loc9_:String = null;
+ var _loc10_:Bitmap = null;
+ var _loc2_:Sprite = new Sprite();
+ if(param1 > 999)
+ {
+ _loc3_ = param1.toString().substring(0,1);
+ _loc4_ = new Bitmap(face.getPng("lib_level_" + _loc3_));
+ _loc5_ = param1.toString().substring(1,2);
+ _loc6_ = new Bitmap(face.getPng("lib_level_" + _loc5_));
+ _loc7_ = param1.toString().substring(2,3);
+ _loc8_ = new Bitmap(face.getPng("lib_level_" + _loc7_));
+ _loc9_ = param1.toString().substring(3);
+ _loc10_ = new Bitmap(face.getPng("lib_level_" + _loc9_));
+ _loc2_.addChild(_loc4_);
+ _loc4_.x = -8;
+ _loc2_.addChild(_loc6_);
+ _loc6_.x = _loc4_.x + _loc4_.width;
+ _loc2_.addChild(_loc8_);
+ _loc8_.x = _loc6_.x + _loc6_.width;
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = _loc8_.x + _loc8_.width;
+ }
+ else if(param1 > 99)
+ {
+ _loc3_ = param1.toString().substring(0,1);
+ _loc4_ = new Bitmap(face.getPng("lib_level_" + _loc3_));
+ _loc5_ = param1.toString().substring(1,2);
+ _loc6_ = new Bitmap(face.getPng("lib_level_" + _loc5_));
+ _loc7_ = param1.toString().substring(2);
+ _loc8_ = new Bitmap(face.getPng("lib_level_" + _loc7_));
+ _loc2_.addChild(_loc4_);
+ _loc4_.x = -8;
+ _loc2_.addChild(_loc6_);
+ _loc6_.x = _loc4_.x + _loc4_.width;
+ _loc2_.addChild(_loc8_);
+ _loc8_.x = _loc6_.x + _loc6_.width;
+ }
+ else if(param1 > 9)
+ {
+ _loc3_ = param1.toString().substring(0,1);
+ _loc4_ = new Bitmap(face.getPng("lib_level_" + _loc3_));
+ _loc5_ = param1.toString().substring(1);
+ _loc6_ = new Bitmap(face.getPng("lib_level_" + _loc5_));
+ _loc2_.addChild(_loc4_);
+ _loc4_.x = -5;
+ _loc2_.addChild(_loc6_);
+ _loc6_.x = _loc4_.x + _loc4_.width;
+ }
+ else
+ {
+ _loc2_.addChild(new Bitmap(face.getPng("lib_level_" + param1)));
+ }
+ return _loc2_;
+ }
+
+ private function loadUserHead(param1:String) : void
+ {
+ if(this.headUrl == param1)
+ {
+ return;
+ }
+ if(Boolean(this.imgBitmap) && Boolean(this.userFaceUI.headImg.contains(this.imgBitmap)))
+ {
+ this.userFaceUI.headImg.removeChild(this.imgBitmap);
+ }
+ this.headUrl = param1;
+ this.loadHead = new LoadResource("pic/head/" + this.headUrl,this.loadHeadBack);
+ }
+
+ private function loadHeadBack(param1:Event) : void
+ {
+ this.imgBitmap = Bitmap(DisplayObject(param1.target.content));
+ this.userFaceUI.headImg.addChild(this.imgBitmap);
+ this.loadHead.clear();
+ }
+
+ private function openUserUI(param1:MouseEvent) : void
+ {
+ Control.getInstance().centerMenu.getUserInfo();
+ }
+
+ public function showSysMessUI(param1:MouseEvent) : void
+ {
+ if(this.showSysMess)
+ {
+ this.showSysMess = false;
+ }
+ else
+ {
+ this.showSysMess = true;
+ }
+ Control.getInstance().sysMessUI.visible = this.showSysMess;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/ActivityBase.as b/flash_decompiled/com/view/ui/activity/ActivityBase.as
new file mode 100644
index 0000000..a3fa037
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/ActivityBase.as
@@ -0,0 +1,55 @@
+package com.view.ui.activity
+{
+ import com.comfig.PathConfig;
+ import com.view.res.GameUIRes;
+ import com.view.ui.BaseUI;
+ import flash.events.Event;
+ import flash.net.URLRequest;
+
+ public class ActivityBase extends BaseUI
+ {
+
+ public var swfUrl:String;
+
+ public var gameRes:GameUIRes = GameUIRes.getInstance();
+
+ public function ActivityBase()
+ {
+ super();
+ }
+
+ public function loadRes(param1:String) : void
+ {
+ var _loc2_:URLRequest = null;
+ this.swfUrl = param1;
+ if(this.gameRes.getApplication(this.swfUrl) == null)
+ {
+ _loc2_ = new URLRequest(PathConfig.getInstance().getVerStr(this.swfUrl));
+ super.loadUIResource(_loc2_);
+ }
+ else
+ {
+ this.createUI();
+ }
+ }
+
+ override public function loadUiComplete(param1:Event) : void
+ {
+ super.loadUiComplete(param1);
+ this.gameRes.setApplication(_loaderInfo,this.swfUrl);
+ this.createUI();
+ }
+
+ override public function createUI() : void
+ {
+ super.addUIBg();
+ super.setPosition();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/ActivityMc.as b/flash_decompiled/com/view/ui/activity/ActivityMc.as
new file mode 100644
index 0000000..3af2860
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/ActivityMc.as
@@ -0,0 +1,140 @@
+package com.view.ui.activity
+{
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.newui.UIBase;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UIWindowBg;
+ import com.view.tip.ShopItemTip;
+ import flash.display.Bitmap;
+ import flash.display.BitmapData;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class ActivityMc extends UIBase
+ {
+
+ private var itemObj:Object;
+
+ private var itemMc:MovieClip;
+
+ private var item:Object;
+
+ private var loadItemPng:LoadResource;
+
+ private var itemsTip:ShopItemTip;
+
+ private var bg:UIWindowBg;
+
+ private var itemNameText:UITitleBg;
+
+ private var priceText:TextField;
+
+ private var buyBtn:UIButton;
+
+ private var itemSprite:Sprite;
+
+ private var itemImg:Bitmap;
+
+ private var buyItemImg:BitmapData;
+
+ public var func:Function;
+
+ public function ActivityMc()
+ {
+ var _loc3_:Sprite = null;
+ super();
+ this.bg = new UIWindowBg();
+ this.bg.initThirdPanel(192,100);
+ addChild(this.bg);
+ this.itemNameText = new UITitleBg("道具名称",202);
+ addChild(this.itemNameText);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,36);
+ addChild(_loc1_);
+ _loc1_.text = "价格:";
+ _loc1_.x = 65;
+ _loc1_.y = 33;
+ this.priceText = PublicMethod.getTextFieldWithFillter(16776960,120);
+ addChild(this.priceText);
+ this.priceText.x = _loc1_.x + _loc1_.width;
+ this.priceText.y = _loc1_.y;
+ this.priceText.text = "";
+ var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40);
+ addChild(_loc2_);
+ _loc2_.text = "积分";
+ _loc2_.x = this.priceText.x + 54;
+ _loc2_.y = this.priceText.y;
+ this.buyBtn = new UIButton("购 买",1,10);
+ addChild(this.buyBtn);
+ this.buyBtn.x = 135;
+ this.buyBtn.y = 78;
+ this.buyBtn.onClick = this.openBuyItemsUI;
+ _loc3_ = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49);
+ addChild(_loc3_);
+ _loc3_.x = 7;
+ _loc3_.y = 30;
+ this.itemSprite = new Sprite();
+ addChild(this.itemSprite);
+ this.itemSprite.x = 10;
+ this.itemSprite.y = 33;
+ this.visible = false;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ this.itemObj = param1;
+ if(this.itemObj == null)
+ {
+ this.visible = false;
+ return;
+ }
+ this.visible = true;
+ this.item = this.itemObj;
+ this.itemNameText.setTitleName(this.itemObj.showName);
+ this.priceText.text = PublicMethod.getStr2(this.itemObj.value.price);
+ this.loadItemPng = new LoadResource("pic/equip/" + this.item.iconPath,this.loadPngBack);
+ }
+
+ private function loadPngBack(param1:Event) : void
+ {
+ if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg))
+ {
+ this.itemSprite.removeChild(this.itemImg);
+ }
+ this.itemImg = param1.target.loader.content as Bitmap;
+ this.itemSprite.addChild(this.itemImg);
+ this.loadItemPng.clear();
+ this.itemImg.width = 53;
+ this.itemImg.height = 53;
+ var _loc2_:Bitmap = new Bitmap();
+ _loc2_.bitmapData = this.itemImg.bitmapData.clone();
+ this.buyItemImg = this.itemImg.bitmapData.clone();
+ this.itemsTip = new ShopItemTip(this.itemSprite,face.stage,face.tip_bg,this.item.viewMap,_loc2_);
+ }
+
+ private function mouseOver(param1:MouseEvent) : void
+ {
+ this.itemMc.img_mc.gotoAndStop(2);
+ }
+
+ private function mouseOut(param1:MouseEvent) : void
+ {
+ this.itemMc.img_mc.gotoAndStop(1);
+ }
+
+ private function openBuyItemsUI(param1:MouseEvent) : void
+ {
+ if(this.func != null)
+ {
+ this.func(this.itemObj,this.buyItemImg);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/ActivityUI.as b/flash_decompiled/com/view/ui/activity/ActivityUI.as
new file mode 100644
index 0000000..9ef9b49
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/ActivityUI.as
@@ -0,0 +1,183 @@
+package com.view.ui.activity
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.user.event.UserEvent;
+ import com.events.DevEvent;
+ import com.newdata.user.NewAccount;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.Control;
+ import com.view.newui.UIButton;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.BitmapData;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class ActivityUI extends BaseUI
+ {
+
+ private static var instance:ActivityUI;
+
+ private var bg:UIWindowBg;
+
+ private var shopListMc:Sprite;
+
+ private var shopScroll:ScrollPane;
+
+ private var shopList:Vector.;
+
+ private var pointCount:TextField;
+
+ private var list:Array;
+
+ private var currPoint:int;
+
+ private var buyPresItemUI:ExchangeGiftUI;
+
+ public function ActivityUI()
+ {
+ var _loc6_:ActivityMc = null;
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_chongzhilibao);
+ super.setPosition();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(65280,600);
+ _loc1_.addChild(_loc2_);
+ _loc2_.text = "累计充值达到一定数量即可领取礼包,礼包可领取多次,充值越多,优惠越多";
+ _loc2_.x = 15;
+ _loc2_.y = 10;
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(623,330);
+ _loc1_.addChild(this.bg);
+ this.bg.x = 4;
+ this.bg.y = 35;
+ this.pointCount = PublicMethod.getTextFieldWithFillter(16776960,600);
+ _loc1_.addChild(this.pointCount);
+ this.pointCount.text = "当前拥有充值点:190";
+ this.pointCount.x = 15;
+ this.pointCount.y = this.bg.y + this.bg.height + 10;
+ this.shopScroll = new ScrollPane();
+ this.shopScroll.setSize(630,336);
+ this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.bg.addChild(this.shopScroll);
+ this.shopScroll.x = 2;
+ this.shopScroll.y = 2;
+ this.shopListMc = new Sprite();
+ this.shopScroll.source = this.shopListMc;
+ this.shopList = new Vector.();
+ var _loc3_:int = 0;
+ while(_loc3_ < 9)
+ {
+ _loc6_ = new ActivityMc();
+ _loc6_.func = this.buyPresItems;
+ this.shopList.push(_loc6_);
+ this.shopListMc.addChild(_loc6_);
+ _loc6_.x = 208 * (_loc3_ % 3);
+ _loc6_.y = 113 * int(_loc3_ / 3);
+ _loc3_++;
+ }
+ var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(16711680,300);
+ _loc4_.text = "";
+ _loc4_.x = 330;
+ _loc4_.y = this.pointCount.y;
+ _loc1_.addChild(_loc4_);
+ var _loc5_:UIButton = new UIButton("充 值",2,10);
+ _loc1_.addChild(_loc5_);
+ _loc5_.x = 570;
+ _loc5_.y = _loc4_.y - 5;
+ _loc5_.onClick = this.chongzhi;
+ Utils.g_events.addEventListener(DevEvent.ACCOUNTCHANGE,this.accountChange);
+ ConnectService.getInstance().userService.getActivityView();
+ ConnectService.getInstance().addEventListener(UserEvent.USER_getActivityView,this.initSucc);
+ }
+
+ public static function getInstance() : ActivityUI
+ {
+ if(instance == null)
+ {
+ instance = new ActivityUI();
+ }
+ return instance;
+ }
+
+ private function accountChange(param1:DevEvent) : void
+ {
+ this.getAccount();
+ }
+
+ private function getAccount() : void
+ {
+ var _loc1_:NewAccount = NewUserData.getAccount();
+ this.pointCount.text = "当前拥有充值点:" + _loc1_.bakPoint;
+ this.currPoint = _loc1_.bakPoint;
+ }
+
+ private function initSucc(param1:UserEvent) : void
+ {
+ this.list = param1.list;
+ this.initList();
+ }
+
+ private function initList() : void
+ {
+ var _loc2_:* = undefined;
+ var _loc3_:ActivityMc = null;
+ var _loc1_:int = 0;
+ for(_loc2_ in this.list)
+ {
+ if(_loc1_ > 8)
+ {
+ _loc3_ = new ActivityMc();
+ _loc3_.func = this.buyPresItems;
+ this.shopList.push(_loc3_);
+ this.shopListMc.addChild(_loc3_);
+ _loc3_.x = 208 * (_loc1_ % 3);
+ _loc3_.y = 113 * int(_loc1_ / 3);
+ }
+ this.shopList[_loc1_].setData(this.list[_loc1_]);
+ _loc1_++;
+ }
+ this.shopScroll.update();
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ ConnectService.getInstance().userService.getAccount();
+ }
+
+ public function buyPresItems(param1:Object, param2:BitmapData) : void
+ {
+ if(this.buyPresItemUI == null)
+ {
+ this.buyPresItemUI = new ExchangeGiftUI();
+ this.buyPresItemUI.x = int(width / 2 - this.buyPresItemUI.width / 2);
+ this.buyPresItemUI.y = int(height / 2 - this.buyPresItemUI.height / 2);
+ }
+ if(!contains(this.buyPresItemUI))
+ {
+ addChild(this.buyPresItemUI);
+ }
+ this.buyPresItemUI.setData(param1,param2);
+ this.buyPresItemUI.setCurrPoint(this.currPoint);
+ }
+
+ private function chongzhi(param1:MouseEvent) : void
+ {
+ Control.getInstance().rightTopMenu.openPayHttp();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/ExchangeGiftUI.as b/flash_decompiled/com/view/ui/activity/ExchangeGiftUI.as
new file mode 100644
index 0000000..9cf4868
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/ExchangeGiftUI.as
@@ -0,0 +1,177 @@
+package com.view.ui.activity
+{
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.control.ConnectService;
+ import com.control.user.event.UserEvent;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UINumInputText;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.display.Bitmap;
+ import flash.display.BitmapData;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class ExchangeGiftUI extends UIWindowBg
+ {
+
+ private var itemsImg:Bitmap;
+
+ private var num_txt:UINumInputText;
+
+ private var itemImgSp:Sprite;
+
+ private var desc_txt:TextField;
+
+ private var sum_txt:UINumInputText;
+
+ private var currValue:TextField;
+
+ private var buyBtn:UIButton;
+
+ private var realPrice:int;
+
+ private var itemObj:Object;
+
+ private var currPoint:int;
+
+ public function ExchangeGiftUI()
+ {
+ var _loc3_:TextField = null;
+ var _loc4_:TextField = null;
+ super();
+ initSize(125,200);
+ loadTitle(UITitleConfig.title_goumailibao);
+ addCloseBtn();
+ initBg();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initThirdPanel(300,166);
+ bg1.addChild(_loc1_);
+ _loc1_.x = 10;
+ _loc1_.y = 10;
+ this.itemImgSp = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49);
+ _loc1_.addChild(this.itemImgSp);
+ this.itemImgSp.x = 20;
+ this.itemImgSp.y = 20;
+ this.itemsImg = new Bitmap();
+ this.itemImgSp.addChild(this.itemsImg);
+ this.itemsImg.x = 3;
+ this.itemsImg.y = 3;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(190,60);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = this.itemImgSp.x + this.itemImgSp.width + 10;
+ _loc2_.y = this.itemImgSp.y;
+ this.desc_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,_loc2_.width - 5);
+ this.desc_txt.wordWrap = true;
+ this.desc_txt.multiline = true;
+ this.desc_txt.height = 60;
+ _loc2_.addChild(this.desc_txt);
+ this.desc_txt.x = 3;
+ this.desc_txt.y = 3;
+ _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65);
+ _loc3_.text = "购买数量:";
+ _loc1_.addChild(_loc3_);
+ _loc3_.x = 60;
+ _loc3_.y = 100;
+ this.num_txt = new UINumInputText(90);
+ _loc1_.addChild(this.num_txt);
+ this.num_txt.x = _loc3_.x + _loc3_.width;
+ this.num_txt.y = _loc3_.y - 3;
+ this.num_txt.setInputEvent(this.changeNum);
+ this.num_txt.setMaxChars(5);
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65);
+ _loc4_.text = "所需积分:";
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc3_.x;
+ _loc4_.y = _loc3_.y + 25;
+ this.sum_txt = new UINumInputText(90);
+ _loc1_.addChild(this.sum_txt);
+ this.sum_txt.x = this.num_txt.x;
+ this.sum_txt.y = _loc4_.y - 3;
+ this.sum_txt.hiddenBtn();
+ this.sum_txt.readOnly();
+ this.sum_txt.setMaxChars(10);
+ var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65);
+ _loc5_.text = "当前拥有:";
+ _loc1_.addChild(_loc5_);
+ _loc5_.x = _loc3_.x;
+ _loc5_.y = _loc4_.y + 25;
+ this.currValue = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ _loc1_.addChild(this.currValue);
+ this.currValue.x = this.num_txt.x;
+ this.currValue.y = _loc5_.y;
+ this.buyBtn = new UIButton("确 定",2,10);
+ var _loc6_:UIButton = new UIButton("取 消",2,10);
+ bg1.addChild(this.buyBtn);
+ this.buyBtn.x = 180;
+ this.buyBtn.y = 198;
+ bg1.addChild(_loc6_);
+ _loc6_.x = this.buyBtn.x + this.buyBtn.width + 10;
+ _loc6_.y = this.buyBtn.y;
+ _loc6_.onClick = closeSelf;
+ this.buyBtn.onClick = this.buyItem;
+ ConnectService.getInstance().addEventListener(UserEvent.USER_exchangeGift,this.buyItemsResult);
+ }
+
+ public function setData(param1:Object, param2:BitmapData) : void
+ {
+ if(param1 == null)
+ {
+ return;
+ }
+ this.itemObj = param1;
+ if(param2)
+ {
+ this.itemsImg.bitmapData = param2;
+ this.itemsImg.width = 53;
+ this.itemsImg.height = 53;
+ }
+ this.num_txt.setTextNum(1);
+ this.realPrice = int(param1.value.price);
+ this.desc_txt.text = param1.itemDesc;
+ this.sum_txt.setTextNum(param1.value.price);
+ }
+
+ public function setCurrPoint(param1:int) : void
+ {
+ this.currPoint = param1;
+ this.currValue.text = this.currPoint.toString();
+ }
+
+ private function changeNum() : void
+ {
+ var _loc1_:int = this.num_txt.getTextNum();
+ this.sum_txt.setTextNum(this.realPrice * _loc1_);
+ }
+
+ private function buyItem(param1:MouseEvent) : void
+ {
+ if(this.itemObj == null)
+ {
+ return;
+ }
+ var _loc2_:int = this.num_txt.getTextNum();
+ if(_loc2_ < 1)
+ {
+ return;
+ }
+ if(_loc2_ * this.realPrice > this.currPoint)
+ {
+ MessageBoxUI.getInstance().addMessage("积分不够");
+ return;
+ }
+ ConnectService.getInstance().userService.exchangeGift(this.itemObj.value.entId,_loc2_);
+ }
+
+ private function buyItemsResult(param1:UserEvent) : void
+ {
+ closeSelf(null);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/FuyinBuild.as b/flash_decompiled/com/view/ui/activity/FuyinBuild.as
new file mode 100644
index 0000000..b750a68
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/FuyinBuild.as
@@ -0,0 +1,59 @@
+package com.view.ui.activity
+{
+ import com.comfig.PathConfig;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.ui.BaseBuild;
+ import com.view.ui.BuildData;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.display.MovieClip;
+ import flash.events.MouseEvent;
+
+ public class FuyinBuild extends BaseBuild
+ {
+
+ public function FuyinBuild(param1:BuildData)
+ {
+ super();
+ param1.swfUrl = "pic/build/UserArmy.swf";
+ super.buildData = param1;
+ super.loadSwfBg();
+ super.addEvent();
+ super.createNpcTip();
+ this.buttonMode = true;
+ }
+
+ override public function createNpcTipStr() : void
+ {
+ npcTipStr = "点击进入战斗符印
";
+ npcTipStr += "君主50级可参加";
+ }
+
+ override public function mouseClick(param1:MouseEvent) : void
+ {
+ super.mouseClick(param1);
+ var _loc2_:int = NewUserData.getUser().rankId;
+ if(_loc2_ < 50)
+ {
+ MessageBoxUI.getInstance().addMessage("君主等级须达到50级");
+ return;
+ }
+ if(!Utils.isCanSee(PathConfig.getInstance().getServerIp(),_arr))
+ {
+ MessageBoxUI.getInstance().addMessage("敬请期待");
+ return;
+ }
+ if(buildUI == null)
+ {
+ buildUI = new FuyinUI();
+ }
+ buildUI.show();
+ }
+
+ override public function getBuildNameMc() : MovieClip
+ {
+ return null;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/FuyinUI.as b/flash_decompiled/com/view/ui/activity/FuyinUI.as
new file mode 100644
index 0000000..0bf476b
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/FuyinUI.as
@@ -0,0 +1,286 @@
+package com.view.ui.activity
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicGlow;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_32;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UINumInputText;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import com.view.ui.activity.data.JunShiData;
+ import com.view.ui.message.MessageBoxUI;
+ import com.view.world.ToolTipManager;
+ import com.view.world.TxtTooltip;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class FuyinUI extends BaseUI
+ {
+
+ private var bg:Sprite;
+
+ private var input1:UINumInputText;
+
+ private var currPoint:TextField;
+
+ private var currEff:TextField;
+
+ private var nextEff:TextField;
+
+ private var currLevel1:TextField;
+
+ private var currLevel2:TextField;
+
+ private var expBar:MovieClip;
+
+ private var fuyin1:Sprite;
+
+ private var fuyin2:Sprite;
+
+ private var currType:int = 1;
+
+ private var userPoint:int;
+
+ public function FuyinUI()
+ {
+ var _loc1_:UIWindowBg = null;
+ var _loc2_:Button_9 = null;
+ var _loc3_:String = null;
+ var _loc4_:Button_9 = null;
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_zhandoufuyin);
+ super.setPosition();
+ _loc1_ = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ this.fuyin1 = face.getSprite(ClassConfig.lib_junshi_fuyin1);
+ _loc1_.addChild(this.fuyin1);
+ this.fuyin1.x = 100;
+ this.fuyin1.y = 50;
+ this.fuyin1.buttonMode = true;
+ this.currLevel1 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,130);
+ this.fuyin1.addChild(this.currLevel1);
+ this.currLevel1.x = 10;
+ this.currLevel1.y = 100;
+ this.currLevel1.defaultTextFormat = PublicMethod.getCenterTextFormat();
+ this.fuyin2 = face.getSprite(ClassConfig.lib_junshi_fuyin2);
+ _loc1_.addChild(this.fuyin2);
+ this.fuyin2.x = 390;
+ this.fuyin2.y = 50;
+ this.fuyin2.buttonMode = true;
+ this.currLevel2 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,130);
+ this.fuyin2.addChild(this.currLevel2);
+ this.currLevel2.x = 25;
+ this.currLevel2.y = 100;
+ this.currLevel2.defaultTextFormat = PublicMethod.getCenterTextFormat();
+ this.fuyin1.addEventListener(MouseEvent.CLICK,this.clickFuYin);
+ this.fuyin2.addEventListener(MouseEvent.CLICK,this.clickFuYin);
+ _loc2_ = new Button_9("规则说明");
+ _loc2_.buttonMode = true;
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 500;
+ _loc2_.y = 5;
+ _loc3_ = "1、战斗符印可提升兵种属性,竞技点可以用来训练战斗符印经验,训练比例为1:1";
+ _loc3_ += "
2、竞技点可以通过参与名将系统获得";
+ _loc3_ += "
3、使用舒血单可获得一定数量的竞技点";
+ _loc4_ = new Button_9("兵种分类说明");
+ _loc4_.buttonMode = true;
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = 560;
+ _loc4_.y = 5;
+ var _loc5_:String = "1、远程兵种工兵、器械";
+ _loc5_ = _loc5_ + "
2、近程兵种步兵、骑兵、战车";
+ ToolTipManager.getInstance().setToolTip(_loc2_,new TxtTooltip(_loc3_),false,-1,false);
+ ToolTipManager.getInstance().setToolTip(_loc4_,new TxtTooltip(_loc5_),false,-1,false);
+ this.currEff = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,350);
+ _loc1_.addChild(this.currEff);
+ this.currEff.x = 165;
+ this.currEff.y = 250;
+ this.nextEff = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,350);
+ _loc1_.addChild(this.nextEff);
+ this.nextEff.x = 165;
+ this.nextEff.y = 270;
+ this.expBar = face.getMovieClip(ClassConfig.lib_junshi_exp);
+ _loc1_.addChild(this.expBar);
+ this.expBar.x = 85;
+ this.expBar.y = 300;
+ this.currPoint = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,170);
+ _loc1_.addChild(this.currPoint);
+ this.currPoint.x = 40;
+ this.currPoint.y = 360;
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100);
+ _loc6_.htmlText = "要训练的竞技点:";
+ _loc1_.addChild(_loc6_);
+ _loc6_.x = 208;
+ _loc6_.y = 360;
+ this.input1 = new UINumInputText(50);
+ this.input1.hiddenBtn();
+ _loc1_.addChild(this.input1);
+ this.input1.x = _loc6_.x + _loc6_.width;
+ this.input1.y = _loc6_.y - 3;
+ this.input1.setMaxChars(5);
+ var _loc7_:Button_32 = new Button_32("训 练");
+ _loc1_.addChild(_loc7_);
+ _loc7_.x = 360;
+ _loc7_.y = 350;
+ _loc7_.onclick = this.levelUp;
+ this.fuyin1.filters = [PublicGlow.getInstance().yellowGlow];
+ this.fuyin2.filters = null;
+ this.currType = 1;
+ }
+
+ private function clickFuYin(param1:MouseEvent) : void
+ {
+ var _loc2_:Sprite = param1.target as Sprite;
+ if(this.fuyin1 == _loc2_)
+ {
+ this.fuyin1.filters = [PublicGlow.getInstance().yellowGlow];
+ this.fuyin2.filters = null;
+ this.currType = 1;
+ }
+ else
+ {
+ this.fuyin2.filters = [PublicGlow.getInstance().yellowGlow];
+ this.fuyin1.filters = null;
+ this.currType = 2;
+ }
+ this.getFuYinData();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition2();
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ Utils.g_events.addEventListener(DevEvent.JUNSHI_ENTER,this.enterResult);
+ this.getFuYinData();
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ Utils.g_events.removeEventListener(DevEvent.JUNSHI_ENTER,this.enterResult);
+ }
+
+ public function getFuYinData() : void
+ {
+ if(JunShiData.junshiObj == null)
+ {
+ ConnectService.getInstance().userService.enterUserJunShi(1);
+ }
+ else
+ {
+ ConnectService.getInstance().userService.enterUserJunShi(0);
+ }
+ }
+
+ private function enterResult(param1:DevEvent) : void
+ {
+ var _loc9_:int = 0;
+ var _loc10_:Number = NaN;
+ var _loc11_:int = 0;
+ var _loc2_:Object = JunShiData.junshiObj;
+ var _loc3_:int = int(_loc2_.userJunShi.fulevel1);
+ var _loc4_:int = int(_loc2_.userJunShi.fulevel2);
+ var _loc5_:int = int(_loc2_.userJunShi.fuexp1);
+ var _loc6_:int = int(_loc2_.userJunShi.maxfuexp1);
+ var _loc7_:int = int(_loc2_.userJunShi.fuexp2);
+ var _loc8_:int = int(_loc2_.userJunShi.maxfuexp2);
+ this.userPoint = _loc2_.userJunShi.point;
+ this.currLevel1.text = _loc3_ + "级近战符印";
+ this.currLevel2.text = _loc4_ + "级远战符印";
+ this.currPoint.htmlText = "当前拥有 " + this.userPoint + " 竞技点";
+ if(this.currType == 1)
+ {
+ _loc9_ = JunShiData.getFuYinProByLevel(_loc3_);
+ this.expBar.exp.text = _loc5_ + "/" + _loc6_;
+ _loc10_ = _loc5_ / _loc6_;
+ if(_loc10_ > 1)
+ {
+ _loc10_ = 1;
+ }
+ this.expBar.bar.width = int(474 * _loc10_);
+ this.currEff.htmlText = "当前效果:近程兵种防御+" + _loc9_ + "、近程兵种体力+" + _loc9_ + "";
+ if(_loc3_ >= JunShiData.getMaxFuYinLevel())
+ {
+ this.nextEff.htmlText = "已到最大等级";
+ }
+ else
+ {
+ _loc11_ = JunShiData.getFuYinProByLevel(_loc3_ + 1);
+ this.nextEff.htmlText = "升级效果:近程兵种防御+" + _loc11_ + "、近程兵种体力+" + _loc11_ + "";
+ }
+ }
+ else
+ {
+ _loc9_ = JunShiData.getFuYinProByLevel(_loc4_);
+ this.expBar.exp.text = _loc7_ + "/" + _loc8_;
+ _loc10_ = _loc7_ / _loc8_;
+ if(_loc10_ > 1)
+ {
+ _loc10_ = 1;
+ }
+ this.expBar.bar.width = int(474 * _loc10_);
+ this.currEff.htmlText = "当前效果:远程兵种攻击+" + _loc9_ + "、远程兵种敏捷+" + _loc9_ + "";
+ if(_loc4_ >= JunShiData.getMaxFuYinLevel())
+ {
+ this.nextEff.htmlText = "已到最大等级";
+ }
+ else
+ {
+ _loc11_ = JunShiData.getFuYinProByLevel(_loc4_ + 1);
+ this.nextEff.htmlText = "升级效果:远程兵种攻击+" + _loc11_ + "、远程兵种敏捷+" + _loc11_ + "";
+ }
+ }
+ }
+
+ private function levelUp() : void
+ {
+ var _loc2_:int = 0;
+ var _loc3_:Object = null;
+ var _loc1_:int = this.input1.getTextNum();
+ if(_loc1_ <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请输入要训练竞技点");
+ return;
+ }
+ if(_loc1_ > this.userPoint)
+ {
+ MessageBoxUI.getInstance().addMessage("竞技点数量不足");
+ return;
+ }
+ if(this.currType == 1)
+ {
+ _loc3_ = JunShiData.junshiObj;
+ _loc2_ = int(_loc3_.userJunShi.fulevel1);
+ }
+ else
+ {
+ _loc3_ = JunShiData.junshiObj;
+ _loc2_ = int(_loc3_.userJunShi.fulevel2);
+ }
+ if(_loc2_ >= JunShiData.getMaxFuYinLevel())
+ {
+ MessageBoxUI.getInstance().addMessage("等级已达到最大级");
+ return;
+ }
+ ConnectService.getInstance().userService.levelUpFuyin(_loc1_,this.currType);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/HolidayAwardMc.as b/flash_decompiled/com/view/ui/activity/HolidayAwardMc.as
new file mode 100644
index 0000000..bd5ab91
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/HolidayAwardMc.as
@@ -0,0 +1,77 @@
+package com.view.ui.activity
+{
+ import com.comfig.ClassConfig;
+ import com.data.GameData;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.ui.BaseUI;
+ import flash.display.MovieClip;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class HolidayAwardMc extends BaseUI
+ {
+
+ private var holidayMc:MovieClip;
+
+ private var holidayAwardUI:HolidayAwardUI;
+
+ public function HolidayAwardMc()
+ {
+ super();
+ this.holidayMc = face.getMovieClip(ClassConfig.libadd_holidaymc);
+ addChild(this.holidayMc);
+ this.holidayMc.addEventListener(MouseEvent.CLICK,this.showHolidayAward);
+ buttonMode = true;
+ setPosition();
+ this.initMcStatus();
+ Utils.g_events.addEventListener(DevEvent.EVENT_USERACTIVITY,this.getUserActivityResult);
+ }
+
+ override public function reSizeWindow(param1:Event) : void
+ {
+ }
+
+ private function showHolidayAward(param1:MouseEvent) : void
+ {
+ if(this.holidayAwardUI == null)
+ {
+ this.holidayAwardUI = new HolidayAwardUI();
+ }
+ this.holidayAwardUI.show();
+ }
+
+ private function getUserActivityResult(param1:DevEvent) : void
+ {
+ this.initMcStatus();
+ }
+
+ private function initMcStatus() : void
+ {
+ var _loc3_:int = 0;
+ if(GameData.getUserHoliday() == null)
+ {
+ return;
+ }
+ var _loc1_:int = int(GameData.getUserHoliday().holidayId);
+ var _loc2_:Object = GameData.getHolidayAward();
+ if(_loc2_ == null)
+ {
+ this.holidayMc.visible = false;
+ }
+ else
+ {
+ _loc3_ = int(_loc2_.id);
+ if(_loc1_ >= _loc3_)
+ {
+ this.holidayMc.visible = false;
+ }
+ else
+ {
+ this.holidayMc.visible = true;
+ }
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/HolidayAwardUI.as b/flash_decompiled/com/view/ui/activity/HolidayAwardUI.as
new file mode 100644
index 0000000..ead141b
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/HolidayAwardUI.as
@@ -0,0 +1,132 @@
+package com.view.ui.activity
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.data.GameData;
+ import com.view.newui.UIButton;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import com.view.ui.message.MessageBoxUI;
+ import com.view.ui.risk.mc.ItemShowMc;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class HolidayAwardUI extends BaseUI
+ {
+
+ private var _width2:int = -260;
+
+ private var _height2:int = -230;
+
+ private var getBtn:UIButton;
+
+ private var titleText:TextField;
+
+ private var bg2:UIWindowBg;
+
+ private var id:int;
+
+ private var itemListVec:Vector.;
+
+ public function HolidayAwardUI()
+ {
+ var _loc3_:ItemShowMc = null;
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_jierilibao);
+ super.setPosition();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630 + this._width2,400 + this._height2);
+ ui_bg.addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ this.titleText = PublicMethod.getTextFieldWithFillter(16053645,360);
+ _loc1_.addChild(this.titleText);
+ this.titleText.text = "通关星数达到10可领取";
+ this.titleText.x = 10;
+ this.titleText.y = 15;
+ this.bg2 = new UIWindowBg();
+ this.bg2.initThirdPanel(630 + this._width2 - 20,70);
+ _loc1_.addChild(this.bg2);
+ this.bg2.x = 10;
+ this.bg2.y = 40;
+ this.getBtn = new UIButton("领取奖励",3,12);
+ _loc1_.addChild(this.getBtn);
+ this.getBtn.x = 140;
+ this.getBtn.y = this.bg2.y + this.bg2.height + 15;
+ this.getBtn.onClick = this.getAward;
+ this.itemListVec = new Vector.();
+ var _loc2_:int = 0;
+ while(_loc2_ < 5)
+ {
+ _loc3_ = new ItemShowMc();
+ this.itemListVec.push(_loc3_);
+ this.bg2.addChild(_loc3_);
+ _loc3_.x = 10 + _loc2_ * 70;
+ _loc3_.y = 10;
+ _loc2_++;
+ }
+ this.initItemList();
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w + this._width2;
+ window_heihgt = UIWindowBg.normal_window_h + this._height2;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640 + this._width2;
+ ui_closeBtn.y = 10;
+ }
+
+ public function initItemList() : void
+ {
+ var _loc4_:ItemShowMc = null;
+ this.id = 0;
+ var _loc1_:Object = GameData.getHolidayAward();
+ if(_loc1_ == null)
+ {
+ return;
+ }
+ var _loc2_:Array = _loc1_.itemList;
+ if(_loc2_ == null || _loc2_.length == 0)
+ {
+ for each(_loc4_ in this.itemListVec)
+ {
+ _loc4_.setData(null);
+ }
+ return;
+ }
+ this.id = _loc1_.id;
+ var _loc3_:int = 0;
+ while(_loc3_ < 5)
+ {
+ if(_loc2_[_loc3_])
+ {
+ this.itemListVec[_loc3_].setData(_loc2_[_loc3_]);
+ }
+ else
+ {
+ this.itemListVec[_loc3_].setData(null);
+ }
+ _loc3_++;
+ }
+ this.titleText.htmlText = "领取时间:" + _loc1_.beginData + " 至 " + _loc1_.endData + "";
+ }
+
+ private function getAward(param1:MouseEvent) : void
+ {
+ if(this.id == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("无礼包可领取!");
+ return;
+ }
+ ConnectService.getInstance().activityService.getHolidayAward(this.id);
+ closeUI(param1);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/ItemUrl.as b/flash_decompiled/com/view/ui/activity/ItemUrl.as
new file mode 100644
index 0000000..7847283
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/ItemUrl.as
@@ -0,0 +1,77 @@
+package com.view.ui.activity
+{
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class ItemUrl extends Sprite
+ {
+
+ public var currNum:int;
+
+ private var load:LoadResource;
+
+ private var bg:Sprite;
+
+ private var itemImg:Bitmap;
+
+ public function ItemUrl(param1:int)
+ {
+ super();
+ this.currNum = param1;
+ var _loc2_:Sprite = PublicMethod.createRectangle(6250335,1645596,315,120);
+ addChild(_loc2_);
+ switch(this.currNum)
+ {
+ case 1:
+ this.load = new LoadResource("pic/sys/1.jpg",this.loadPngBack);
+ break;
+ case 2:
+ this.load = new LoadResource("pic/sys/2.jpg",this.loadPngBack);
+ break;
+ case 3:
+ this.load = new LoadResource("pic/sys/3.jpg",this.loadPngBack);
+ break;
+ case 4:
+ this.load = new LoadResource("pic/sys/4.jpg",this.loadPngBack);
+ }
+ this.buttonMode = true;
+ addEventListener(MouseEvent.ROLL_OUT,this.mouseOut);
+ addEventListener(MouseEvent.ROLL_OVER,this.mouseOver);
+ }
+
+ private function loadPngBack(param1:Event) : void
+ {
+ this.itemImg = param1.target.loader.content as Bitmap;
+ addChild(this.itemImg);
+ this.itemImg.x = 2;
+ this.itemImg.y = 2;
+ this.itemImg.width = 312;
+ this.itemImg.height = 117;
+ this.load.clear();
+ this.bg = PublicMethod.createShape(0,315,120);
+ addChild(this.bg);
+ this.bg.alpha = 0.3;
+ }
+
+ private function mouseOut(param1:Event) : void
+ {
+ if(this.bg)
+ {
+ this.bg.alpha = 0.3;
+ }
+ }
+
+ private function mouseOver(param1:Event) : void
+ {
+ if(this.bg)
+ {
+ this.bg.alpha = 0;
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/JunShiBuild.as b/flash_decompiled/com/view/ui/activity/JunShiBuild.as
new file mode 100644
index 0000000..74d88bb
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/JunShiBuild.as
@@ -0,0 +1,60 @@
+package com.view.ui.activity
+{
+ import com.comfig.PathConfig;
+ import com.newdata.user.NewUserData;
+ import com.utils.ToolUtil;
+ import com.utils.Utils;
+ import com.view.ui.BaseBuild;
+ import com.view.ui.BuildData;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.display.MovieClip;
+ import flash.events.MouseEvent;
+
+ public class JunShiBuild extends BaseBuild
+ {
+
+ public function JunShiBuild(param1:BuildData)
+ {
+ super();
+ param1.swfUrl = "pic/build/Counsellor.swf";
+ super.buildData = param1;
+ super.loadSwfBg();
+ super.addEvent();
+ super.createNpcTip();
+ this.buttonMode = true;
+ }
+
+ override public function createNpcTipStr() : void
+ {
+ npcTipStr = "点击进入军师技能
";
+ npcTipStr += "君主50级可参加";
+ }
+
+ override public function mouseClick(param1:MouseEvent) : void
+ {
+ super.mouseClick(param1);
+ var _loc2_:int = NewUserData.getUser().rankId;
+ if(_loc2_ < 50)
+ {
+ MessageBoxUI.getInstance().addMessage("君主等级达到50级才能参与该活动");
+ return;
+ }
+ if(buildUI == null)
+ {
+ buildUI = new JunShiUI();
+ }
+ if(!Utils.isCanSee(PathConfig.getInstance().getServerIp(),_arr))
+ {
+ MessageBoxUI.getInstance().addMessage(ToolUtil.decryptDES("4nEbegkNGx2f5b6F"));
+ return;
+ }
+ buildUI.show();
+ }
+
+ override public function getBuildNameMc() : MovieClip
+ {
+ return null;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/JunShiUI.as b/flash_decompiled/com/view/ui/activity/JunShiUI.as
new file mode 100644
index 0000000..c98b89e
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/JunShiUI.as
@@ -0,0 +1,369 @@
+package com.view.ui.activity
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.mc.sprite.ExpBar;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UINumInputText;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import com.view.ui.activity.data.JunShiData;
+ import com.view.ui.message.MessageBoxUI;
+ import com.view.world.ToolTipManager;
+ import com.view.world.TxtTooltip;
+ import fl.controls.ComboBox;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class JunShiUI extends BaseUI
+ {
+
+ private var bg2:UIWindowBg;
+
+ private var tft:TextFormat;
+
+ private var upleveltype:ComboBox;
+
+ private var expBar:ExpBar;
+
+ private var input1:UINumInputText;
+
+ private var levelText:TextField;
+
+ private var addAtk:TextField;
+
+ private var addDef:TextField;
+
+ private var addHp:TextField;
+
+ private var addAgl:TextField;
+
+ private var addNextAtk:TextField;
+
+ private var addNextDef:TextField;
+
+ private var addNextHp:TextField;
+
+ private var addNextAgl:TextField;
+
+ private var currPoint:TextField;
+
+ private var itemList:Vector.;
+
+ private var userPoint:int;
+
+ private var hasGetEff:Boolean;
+
+ private var bg:Sprite;
+
+ public function JunShiUI()
+ {
+ var _loc5_:TextField = null;
+ var _loc6_:TextField = null;
+ var _loc7_:TextField = null;
+ var _loc11_:TextField = null;
+ var _loc12_:TextField = null;
+ var _loc24_:int = 0;
+ var _loc25_:int = 0;
+ var _loc26_:JunshiItem = null;
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_junshi);
+ super.setPosition();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ this.bg2 = new UIWindowBg();
+ this.bg2.initSecondPanel(244,358);
+ _loc1_.addChild(this.bg2);
+ this.bg2.x = 20;
+ this.bg2.y = 20;
+ var _loc2_:String = "pic/bg/bg_junshi.jpg";
+ loadBg(_loc2_);
+ var _loc3_:Button_9 = new Button_9("规则说明");
+ _loc3_.buttonMode = true;
+ _loc1_.addChild(_loc3_);
+ _loc3_.x = 570;
+ _loc3_.y = 5;
+ var _loc4_:String = "1、提升军师等级可增强武将属性,达到指定等级还可激活相应的军师技能使战斗实力获得大幅提升";
+ _loc4_ = _loc4_ + "
2、参与名将系统可以获得竞技点,竞技点可用来训练军师技能,训练可将竞技点按1:1比例转化为军师经验";
+ _loc4_ = _loc4_ + "
3、使用舒血单可获得一定数量的竞技点";
+ ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip(_loc4_),false,-1,false);
+ _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70);
+ _loc5_.text = "军师等级:";
+ _loc1_.addChild(_loc5_);
+ _loc5_.x = 300;
+ _loc5_.y = 30;
+ this.levelText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc1_.addChild(this.levelText);
+ this.levelText.x = _loc5_.x + 60;
+ this.levelText.y = _loc5_.y;
+ _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70);
+ _loc6_.text = "当前属性:";
+ _loc1_.addChild(_loc6_);
+ _loc6_.x = _loc5_.x;
+ _loc6_.y = _loc5_.y + 22;
+ _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30);
+ _loc1_.addChild(_loc7_);
+ _loc7_.x = this.levelText.x;
+ _loc7_.y = _loc6_.y;
+ _loc7_.text = "攻击";
+ this.addAtk = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ this.addAtk.x = _loc7_.x + 30;
+ this.addAtk.y = _loc7_.y;
+ _loc1_.addChild(this.addAtk);
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = _loc7_.x + 150;
+ _loc8_.y = _loc7_.y;
+ _loc8_.text = "防御";
+ this.addDef = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ this.addDef.x = _loc8_.x + 30;
+ this.addDef.y = _loc7_.y;
+ _loc1_.addChild(this.addDef);
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30);
+ _loc1_.addChild(_loc9_);
+ _loc9_.x = _loc7_.x;
+ _loc9_.y = _loc7_.y + 24;
+ _loc9_.text = "体力";
+ this.addHp = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ this.addHp.x = this.addAtk.x;
+ this.addHp.y = _loc9_.y;
+ _loc1_.addChild(this.addHp);
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30);
+ _loc1_.addChild(_loc10_);
+ _loc10_.x = _loc8_.x;
+ _loc10_.y = _loc9_.y;
+ _loc10_.text = "敏捷";
+ this.addAgl = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ this.addAgl.x = this.addDef.x;
+ this.addAgl.y = _loc9_.y;
+ _loc1_.addChild(this.addAgl);
+ _loc11_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70);
+ _loc11_.text = "升级属性:";
+ _loc1_.addChild(_loc11_);
+ _loc11_.x = _loc5_.x;
+ _loc11_.y = _loc6_.y + 50;
+ _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30);
+ _loc1_.addChild(_loc12_);
+ _loc12_.x = this.levelText.x;
+ _loc12_.y = _loc11_.y;
+ _loc12_.text = "攻击";
+ this.addNextAtk = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ this.addNextAtk.x = _loc12_.x + 30;
+ this.addNextAtk.y = _loc12_.y;
+ _loc1_.addChild(this.addNextAtk);
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30);
+ _loc1_.addChild(_loc13_);
+ _loc13_.x = _loc12_.x + 150;
+ _loc13_.y = _loc12_.y;
+ _loc13_.text = "防御";
+ this.addNextDef = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ this.addNextDef.x = _loc13_.x + 30;
+ this.addNextDef.y = _loc13_.y;
+ _loc1_.addChild(this.addNextDef);
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30);
+ _loc1_.addChild(_loc14_);
+ _loc14_.x = _loc12_.x;
+ _loc14_.y = _loc12_.y + 24;
+ _loc14_.text = "体力";
+ this.addNextHp = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ this.addNextHp.x = this.addAtk.x;
+ this.addNextHp.y = _loc14_.y;
+ _loc1_.addChild(this.addNextHp);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30);
+ _loc1_.addChild(_loc15_);
+ _loc15_.x = _loc8_.x;
+ _loc15_.y = this.addNextHp.y;
+ _loc15_.text = "敏捷";
+ this.addNextAgl = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ this.addNextAgl.x = this.addDef.x;
+ this.addNextAgl.y = _loc15_.y;
+ _loc1_.addChild(this.addNextAgl);
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70);
+ _loc16_.text = "军师技能:";
+ _loc1_.addChild(_loc16_);
+ _loc16_.x = _loc5_.x;
+ _loc16_.y = _loc11_.y + 45;
+ this.itemList = new Vector.();
+ var _loc17_:int = 0;
+ while(_loc17_ < 10)
+ {
+ _loc24_ = _loc17_ % 5;
+ _loc25_ = _loc17_ / 5;
+ _loc26_ = new JunshiItem(_loc17_ + 1);
+ _loc1_.addChild(_loc26_);
+ _loc26_.x = _loc5_.x + _loc24_ * 65;
+ _loc26_.y = _loc16_.y + 26 + _loc25_ * 58;
+ this.itemList.push(_loc26_);
+ _loc17_++;
+ }
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70);
+ _loc18_.text = "经验槽:";
+ _loc1_.addChild(_loc18_);
+ _loc18_.x = _loc5_.x;
+ _loc18_.y = _loc16_.y + 140;
+ this.expBar = new ExpBar();
+ _loc1_.addChild(this.expBar);
+ this.expBar.setSize(290);
+ this.expBar.x = _loc18_.x + 30;
+ this.expBar.y = _loc18_.y + 22;
+ this.currPoint = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,170);
+ _loc1_.addChild(this.currPoint);
+ this.currPoint.x = _loc5_.x - 10;
+ this.currPoint.y = _loc18_.y + 40;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100);
+ _loc19_.htmlText = "要训练的竞技点:";
+ _loc1_.addChild(_loc19_);
+ _loc19_.x = this.currPoint.x;
+ _loc19_.y = this.currPoint.y + 25;
+ this.input1 = new UINumInputText(70);
+ this.input1.hiddenBtn();
+ _loc1_.addChild(this.input1);
+ this.input1.x = _loc19_.x + 97;
+ this.input1.y = _loc19_.y - 3;
+ this.input1.setMaxChars(10);
+ var _loc20_:UIButton = new UIButton("训练",1,10);
+ _loc1_.addChild(_loc20_);
+ _loc20_.x = this.input1.x + this.input1.width;
+ _loc20_.y = _loc19_.y - 3;
+ _loc20_.onClick = this.levelUpJunShi;
+ this.tft = new TextFormat();
+ this.tft.align = "center";
+ this.tft.size = 12;
+ this.tft.color = 16777215;
+ this.upleveltype = new ComboBox();
+ this.upleveltype.addItem({
+ "label":"100级",
+ "data":1
+ });
+ this.upleveltype.addItem({
+ "label":"1000级",
+ "data":2
+ });
+ this.upleveltype.addItem({
+ "label":"10000级",
+ "data":3
+ });
+ this.upleveltype.width = 66;
+ _loc1_.addChild(this.upleveltype);
+ this.upleveltype.textField.setStyle("textFormat",this.tft);
+ this.upleveltype.dropdown.setRendererStyle("textFormat",this.tft);
+ this.upleveltype.x = _loc20_.x + 55;
+ this.upleveltype.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("升级",1,10);
+ _loc1_.addChild(_loc21_);
+ _loc21_.x = this.upleveltype.x + 66;
+ _loc21_.y = _loc20_.y;
+ _loc21_.onClick = this.superLevelUp;
+ var _loc22_:String = "该功能直接从包裹中扣除相应数量的超级舒雪丹,请确保包裹中有足够的超级舒雪丹";
+ ToolTipManager.getInstance().setToolTip(_loc21_,new TxtTooltip(_loc22_),false,-1,false);
+ var _loc23_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,330);
+ _loc23_.htmlText = "训练可将竞技点转换为军师经验,转换比例1:1";
+ _loc1_.addChild(_loc23_);
+ _loc23_.x = this.currPoint.x;
+ _loc23_.y = _loc19_.y + 30;
+ }
+
+ override public function getBgImg(param1:Bitmap) : void
+ {
+ this.bg2.addChild(param1);
+ param1.x = 2;
+ param1.y = 2;
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition2();
+ }
+
+ private function enterResult(param1:DevEvent) : void
+ {
+ var _loc2_:Object = null;
+ _loc2_ = JunShiData.junshiObj;
+ var _loc3_:int = int(_loc2_.userJunShi.level);
+ var _loc4_:Number = JunShiData.getJunShiProByLevel(_loc3_);
+ this.levelText.text = _loc3_ + "级";
+ this.addAtk.text = "+ " + _loc4_;
+ this.addDef.text = "+ " + _loc4_;
+ this.addHp.text = "+ " + _loc4_;
+ this.addAgl.text = "+ " + _loc4_;
+ var _loc5_:Number = JunShiData.getJunShiProByLevel(_loc3_ + 1);
+ this.addNextAtk.text = "+ " + _loc5_;
+ this.addNextDef.text = "+ " + _loc5_;
+ this.addNextHp.text = "+ " + _loc5_;
+ this.addNextAgl.text = "+ " + _loc5_;
+ this.expBar.setLength(_loc2_.userJunShi.maxExp);
+ this.expBar.setCurValue(_loc2_.userJunShi.exp);
+ this.userPoint = _loc2_.userJunShi.point;
+ this.currPoint.htmlText = "当前拥有 " + this.userPoint + " 竞技点";
+ var _loc6_:Array = JunShiData.junshieff;
+ _loc6_.sortOn("level",Array.NUMERIC);
+ var _loc7_:int = 0;
+ for each(_loc2_ in _loc6_)
+ {
+ this.itemList[_loc7_].setData(_loc2_,_loc3_);
+ _loc7_++;
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ Utils.g_events.addEventListener(DevEvent.JUNSHI_ENTER,this.enterResult);
+ this.getJunShiData();
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ Utils.g_events.removeEventListener(DevEvent.JUNSHI_ENTER,this.enterResult);
+ }
+
+ public function getJunShiData() : void
+ {
+ if(JunShiData.junshiObj == null)
+ {
+ ConnectService.getInstance().userService.enterUserJunShi(1);
+ }
+ else
+ {
+ ConnectService.getInstance().userService.enterUserJunShi(0);
+ }
+ }
+
+ private function levelUpJunShi(param1:MouseEvent) : void
+ {
+ var _loc2_:int = this.input1.getTextNum();
+ if(_loc2_ <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请输入要训练竞技点");
+ return;
+ }
+ if(_loc2_ > this.userPoint)
+ {
+ MessageBoxUI.getInstance().addMessage("竞技点数量不足");
+ return;
+ }
+ ConnectService.getInstance().userService.levelUpJunShi(_loc2_);
+ }
+
+ private function superLevelUp(param1:MouseEvent) : void
+ {
+ var _loc2_:int = int(this.upleveltype.selectedItem.data);
+ ConnectService.getInstance().userService.superLevelUp(_loc2_);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/JunshiItem.as b/flash_decompiled/com/view/ui/activity/JunshiItem.as
new file mode 100644
index 0000000..a556bc6
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/JunshiItem.as
@@ -0,0 +1,73 @@
+package com.view.ui.activity
+{
+ import com.InstallFace;
+ import com.comfig.ClassConfig;
+ import com.common.LoadResource;
+ import com.utils.Utils;
+ import com.view.world.ToolTipManager;
+ import com.view.world.TxtTooltip;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+
+ public class JunshiItem extends Sprite
+ {
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var loadItemPng:LoadResource;
+
+ private var imgSp:Sprite;
+
+ private var num:int;
+
+ public function JunshiItem(param1:int)
+ {
+ super();
+ this.num = param1;
+ var _loc2_:Sprite = this.face.getSprite(ClassConfig.lib_junshi_skillbg);
+ addChild(_loc2_);
+ this.imgSp = new Sprite();
+ addChild(this.imgSp);
+ this.imgSp.x = 9;
+ this.imgSp.y = 8;
+ this.loadItemImg();
+ }
+
+ private function loadItemImg() : void
+ {
+ var _loc1_:String = "pic/skill/junshiskill_" + this.num + ".jpg";
+ this.loadItemPng = new LoadResource(_loc1_,this.loadPngBack);
+ }
+
+ private function loadPngBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = param1.target.loader.content as Bitmap;
+ this.imgSp.addChild(_loc2_);
+ this.loadItemPng.clear();
+ }
+
+ public function setData(param1:Object, param2:int) : void
+ {
+ if(param1 == null)
+ {
+ return;
+ }
+ var _loc3_:String = "技能效果:" + param1.content;
+ _loc3_ = _loc3_ + "
激活等级:军师" + param1.level + "级";
+ var _loc4_:int = int(param1.level);
+ if(param2 >= _loc4_)
+ {
+ _loc3_ += "
已激活";
+ Utils.applyDefault(this.imgSp);
+ }
+ else
+ {
+ _loc3_ += "
未激活";
+ Utils.applyGray(this.imgSp);
+ }
+ ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip(_loc3_),false,-1,false);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/SystemUI.as b/flash_decompiled/com/view/ui/activity/SystemUI.as
new file mode 100644
index 0000000..72b3b07
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/SystemUI.as
@@ -0,0 +1,159 @@
+package com.view.ui.activity
+{
+ import com.comfig.CommonData;
+ import com.comfig.PathConfig;
+ import com.newdata.user.NewUserData;
+ import com.utils.ToolUtil;
+ import com.utils.Utils;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseBuild;
+ import com.view.ui.BaseUI;
+ import com.view.ui.beauty.BeautyUI;
+ import com.view.ui.bigboss.BigBossMainUI;
+ import com.view.ui.message.MessageBoxUI;
+ import com.view.ui.risk.RiskMainUI;
+ import com.view.ui.shenbin.GunMainUI;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class SystemUI extends BaseUI
+ {
+
+ private var bg:Sprite;
+
+ private var bigBossMainUI:BigBossMainUI;
+
+ private var beautyUI:BeautyUI;
+
+ public function SystemUI()
+ {
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_xitongdaohang);
+ this.setPosition();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:ItemUrl = new ItemUrl(1);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 3;
+ _loc2_.y = 3;
+ var _loc3_:ItemUrl = new ItemUrl(2);
+ _loc1_.addChild(_loc3_);
+ _loc3_.x = _loc2_.x + _loc2_.width + 3;
+ _loc3_.y = _loc2_.y;
+ var _loc4_:ItemUrl = new ItemUrl(3);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x;
+ _loc4_.y = _loc2_.y + 124;
+ var _loc5_:ItemUrl = new ItemUrl(4);
+ _loc1_.addChild(_loc5_);
+ _loc5_.x = _loc3_.x;
+ _loc5_.y = _loc4_.y;
+ _loc2_.addEventListener(MouseEvent.CLICK,this.openSystem);
+ _loc3_.addEventListener(MouseEvent.CLICK,this.openSystem);
+ _loc4_.addEventListener(MouseEvent.CLICK,this.openSystem);
+ _loc5_.addEventListener(MouseEvent.CLICK,this.openSystem);
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition2();
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ }
+
+ private function openSystem(param1:Event) : void
+ {
+ var _loc4_:RiskMainUI = null;
+ var _loc5_:GunMainUI = null;
+ var _loc2_:ItemUrl = param1.currentTarget as ItemUrl;
+ var _loc3_:int = NewUserData.getUser().rankId;
+ switch(_loc2_.currNum)
+ {
+ case 1:
+ if(_loc3_ < 40)
+ {
+ MessageBoxUI.getInstance().addMessage("君主等级达到40级才能参与该活动");
+ return;
+ }
+ if(CommonData.openBigBoss == false)
+ {
+ MessageBoxUI.getInstance().addMessage(ToolUtil.decryptDES("4nEbegkNGx2f5b6F"));
+ return;
+ }
+ if(!Utils.isCanSee(PathConfig.getInstance().getServerIp(),BaseBuild._arr))
+ {
+ MessageBoxUI.getInstance().addMessage(ToolUtil.decryptDES("4nEbegkNGx2f5b6F"));
+ return;
+ }
+ if(this.bigBossMainUI == null)
+ {
+ this.bigBossMainUI = new BigBossMainUI();
+ }
+ this.bigBossMainUI.show();
+ break;
+ case 2:
+ if(_loc3_ < 50)
+ {
+ MessageBoxUI.getInstance().addMessage("君主等级达到50级才能参与该活动");
+ return;
+ }
+ if(CommonData.openBigBoss == false)
+ {
+ MessageBoxUI.getInstance().addMessage(ToolUtil.decryptDES("4nEbegkNGx2f5b6F"));
+ return;
+ }
+ if(!Utils.isCanSee(PathConfig.getInstance().getServerIp(),BaseBuild._arr))
+ {
+ MessageBoxUI.getInstance().addMessage(ToolUtil.decryptDES("4nEbegkNGx2f5b6F"));
+ return;
+ }
+ if(this.beautyUI == null)
+ {
+ this.beautyUI = new BeautyUI();
+ }
+ this.beautyUI.show();
+ break;
+ case 3:
+ if(_loc3_ < 10)
+ {
+ MessageBoxUI.getInstance().addMessage("君主等级达到10级才能参与该活动");
+ return;
+ }
+ if(CommonData.openBigBoss == false)
+ {
+ MessageBoxUI.getInstance().addMessage(ToolUtil.decryptDES("4nEbegkNGx2f5b6F"));
+ return;
+ }
+ if(!Utils.isCanSee(PathConfig.getInstance().getServerIp(),BaseBuild._arr))
+ {
+ MessageBoxUI.getInstance().addMessage(ToolUtil.decryptDES("4nEbegkNGx2f5b6F"));
+ return;
+ }
+ _loc4_ = RiskMainUI.getInstance();
+ _loc4_.show();
+ break;
+ case 4:
+ if(_loc3_ < 500)
+ {
+ }
+ _loc5_ = GunMainUI.getInstance();
+ _loc5_.show();
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/UpdateUI.as b/flash_decompiled/com/view/ui/activity/UpdateUI.as
new file mode 100644
index 0000000..72d8d4d
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/UpdateUI.as
@@ -0,0 +1,102 @@
+package com.view.ui.activity
+{
+ import com.common.PublicMethod;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.Sprite;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class UpdateUI extends BaseUI
+ {
+
+ private var bg:UIWindowBg;
+
+ private var content:String;
+
+ private var spScroll:ScrollPane;
+
+ private var spMc:Sprite;
+
+ public function UpdateUI()
+ {
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_gengxingonggao);
+ super.setPosition();
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(630,396);
+ addChild(this.bg);
+ this.bg.x = 11;
+ this.bg.y = 40;
+ this.spScroll = new ScrollPane();
+ this.spScroll.setSize(639,400);
+ this.spScroll.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.bg.addChild(this.spScroll);
+ this.spScroll.x = 0;
+ this.spScroll.y = 2;
+ this.spMc = new Sprite();
+ this.spScroll.source = this.spMc;
+ var _loc1_:TextFormat = new TextFormat();
+ _loc1_.bold = true;
+ _loc1_.color = 65280;
+ var _loc2_:TextField = PublicMethod.getTextField(16777215,90);
+ _loc2_.text = "版本更新说明";
+ _loc2_.setTextFormat(_loc1_);
+ this.spMc.addChild(_loc2_);
+ _loc2_.x = 270;
+ _loc2_.y = 5;
+ var _loc3_:TextFormat = new TextFormat();
+ _loc3_.leading = 6;
+ this.content = "1、修炼馆更新 [2012-12-12]
";
+ this.content += " 普通修炼每小时获得当前武将等级升级所需经验值总和的10%,每小时所需10万铜币,普通修炼不受武将等级限制。高级修炼每小时获得武将当前等级升级所需经验总和的25%,每小时所需15元宝。";
+ this.content += "
2、聆听传道 [2013-1-10]
";
+ this.content += " 消耗一定的元宝,武将可聆听传道,获取大量的经验。聆听传道获得的经验由武将等级决定,等级越高,传道获得的经验值越多。";
+ this.content += "
3、天外楼 [2013-1-10]
";
+ this.content += " 重楼新加天外楼,楼中藏有大量稀世装备和财宝。";
+ this.content += "
4、装备合成 [2013-1-30]
";
+ this.content += " 在包裹里面增加了兑换功能,在满足前提条件下可以兑换新的道具。";
+ this.content += "
5、藏宝阁 [2013-2-2]
";
+ this.content += " 新增藏宝阁副本,在这里可以获得更多道具和经验。";
+ this.content += "
6、武将技能 [2013-2-2]
";
+ this.content += " 新增武将技能系统,所有技能同步官方。";
+ this.content += "
7、武将转职 [2013-4-2]
";
+ this.content += " 通过转职卡,武将可以随意转职,每天只能转职一次。";
+ this.content += "
8、VIP系统 [2013-5-2]
";
+ this.content += " 新增VIP系统,不同的荣誉称号对应不同vip等级,同时享有不同的特权,具体请查看荣誉称号介绍。";
+ this.content += "
9、重楼扫荡 [2013-5-2]
";
+ this.content += " 过楼不再需要等待,扫荡具体规则查看扫荡说明,3级荣誉称号才有此特权。";
+ this.content += "
10、君主装备系统 [2013-5-22]
";
+ this.content += " 此功能同步官服版本,君主也能穿戴装备,装备可在重楼,过关斩将掉落。";
+ this.content += "
11、开启过关斩将第二章 [2013-6-10]
";
+ this.content += " 同步官服版本,更多的装备可在此掉落。";
+ this.content += "
12、曜甲神将系统 [2013-7-6]
";
+ this.content += " 此功能同步官服版本,玩家参赛后可在此领取每日工资。";
+ this.content += "
13、城堡道具 [2013-7-12]
";
+ this.content += " 增加各类城堡道具,附带各种不同属性。";
+ this.content += "
14、秘保系统 [2013-7-25]
";
+ this.content += " 增加武将秘宝系统,武将属性得到进一步提升。";
+ this.content += "
15、开通地宫系统 [2013-8-11]
";
+ this.content += " 增加地宫系统,挑战极限和证明自我的地方。";
+ this.content += "
16、武将超级强化 [2013-8-21]
";
+ this.content += " 武将成长达到150后可超级强化,进一步提升战力。";
+ var _loc4_:TextField = new TextField();
+ _loc4_.textColor = 16777215;
+ _loc4_.wordWrap = true;
+ _loc4_.multiline = true;
+ _loc4_.width = 600;
+ _loc4_.htmlText = this.content;
+ _loc4_.setTextFormat(_loc3_);
+ _loc4_.selectable = false;
+ _loc4_.height = _loc4_.textHeight + 20;
+ this.spMc.addChild(_loc4_);
+ _loc4_.x = 10;
+ _loc4_.y = 30;
+ this.spScroll.update();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/UserBoxUI.as b/flash_decompiled/com/view/ui/activity/UserBoxUI.as
new file mode 100644
index 0000000..646c0da
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/UserBoxUI.as
@@ -0,0 +1,266 @@
+package com.view.ui.activity
+{
+ import com.comfig.ServerConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.mc.sprite.TextBar;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import com.view.ui.activity.mc.UserBoxMc;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+ import flash.utils.setInterval;
+
+ public class UserBoxUI extends BaseUI
+ {
+
+ private var paneBg:UIWindowBg;
+
+ private var imgSp:Sprite;
+
+ private var contentText1:TextBar;
+
+ private var contentText2:TextBar;
+
+ private var bg1:UIWindowBg;
+
+ private var itemVec:Vector.;
+
+ private var luckData:Object;
+
+ private var opintArr:Array;
+
+ private var userTimeText:TextField;
+
+ private var packScrollPane:ScrollPane;
+
+ private var packMc:Sprite;
+
+ private var userLuckBoxData:Object;
+
+ public function UserBoxUI()
+ {
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_shenmibaoxiang);
+ setPosition();
+ this.paneBg = new UIWindowBg();
+ this.paneBg.initSecondPanel(630 + 32 + 232,400 - 49 + 93);
+ addChild(this.paneBg);
+ this.paneBg.x = 11;
+ this.paneBg.y = 39;
+ this.bg1 = new UIWindowBg();
+ this.bg1.initSecondPanel(680 + 32,400 - 49 + 85);
+ this.paneBg.addChild(this.bg1);
+ this.bg1.x = 4;
+ this.bg1.y = 4;
+ this.imgSp = new Sprite();
+ this.bg1.addChild(this.imgSp);
+ var _loc1_:String = "bg_lingyange.jpg";
+ loadBg(ServerConfig.IMG_BG_URL + _loc1_);
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initThirdPanel(161,400 - 49 + 85);
+ this.paneBg.addChild(_loc2_);
+ _loc2_.x = this.bg1.x + this.bg1.width + 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("活动说明",170);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ this.contentText1 = new TextBar();
+ this.contentText1.createTextField(150,250);
+ _loc2_.addChild(this.contentText1);
+ this.contentText1.x = 6;
+ this.contentText1.y = 28;
+ this.userTimeText = PublicMethod.getTextField(UIConfig.importColor,150);
+ _loc2_.addChild(this.userTimeText);
+ this.userTimeText.x = 6;
+ this.userTimeText.y = 276;
+ var _loc4_:UITitleBg = new UITitleBg("获奖信息",170);
+ _loc2_.addChild(_loc4_);
+ _loc4_.x = int(170 / 2 - _loc4_.width / 2);
+ _loc4_.y = 300;
+ this.contentText2 = new TextBar();
+ this.contentText2.createTextField(150,120);
+ _loc2_.addChild(this.contentText2);
+ this.contentText2.x = 6;
+ this.contentText2.y = 325;
+ var _loc5_:TextFormat = new TextFormat();
+ _loc5_.leading = 4;
+ Utils.g_events.addEventListener(DevEvent.EVENT_LUCKBOX_DATA,this.getDataResult);
+ Utils.g_events.addEventListener(DevEvent.EVENT_LUCKBOX_USERDATA,this.getUserDataResult);
+ Utils.g_events.addEventListener(DevEvent.EVENT_LUCKBOX_OPENBOX,this.openLuckBoxResult);
+ this.getData();
+ setInterval(this.getUserLuckBoxMap,60000);
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w + 32 + 232;
+ window_heihgt = UIWindowBg.normal_window_h - 49 + 93;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640 + 32 + 232;
+ ui_closeBtn.y = 10;
+ }
+
+ private function getData() : void
+ {
+ ConnectService.getInstance().playService.enterLuckBoxMain();
+ }
+
+ private function getUserLuckBoxMap() : void
+ {
+ if(getOpenStatus())
+ {
+ ConnectService.getInstance().playService.getUserLuckBoxMap();
+ }
+ }
+
+ private function getDataResult(param1:DevEvent) : void
+ {
+ var _loc4_:Object = null;
+ var _loc5_:String = null;
+ var _loc6_:Array = null;
+ var _loc7_:Object = null;
+ var _loc8_:String = null;
+ var _loc9_:Array = null;
+ var _loc10_:Object = null;
+ var _loc11_:String = null;
+ var _loc12_:Array = null;
+ var _loc13_:Object = null;
+ var _loc14_:String = null;
+ var _loc15_:String = null;
+ var _loc16_:Array = null;
+ var _loc17_:String = null;
+ var _loc18_:Object = null;
+ this.luckData = param1.obj;
+ var _loc2_:String = "";
+ var _loc3_:Array = this.luckData.itemList1;
+ for each(_loc4_ in _loc3_)
+ {
+ _loc2_ = _loc2_ + _loc4_.itemName + "x" + _loc4_.itemNums + "。";
+ }
+ _loc5_ = "";
+ _loc6_ = this.luckData.itemList2;
+ for each(_loc7_ in _loc6_)
+ {
+ _loc5_ = _loc5_ + _loc7_.itemName + "x" + _loc7_.itemNums + "。";
+ }
+ _loc8_ = "";
+ _loc9_ = this.luckData.itemList3;
+ for each(_loc10_ in _loc9_)
+ {
+ _loc8_ = _loc8_ + _loc10_.itemName + "x" + _loc10_.itemNums + "。";
+ }
+ _loc11_ = "";
+ _loc12_ = this.luckData.itemList4;
+ for each(_loc13_ in _loc12_)
+ {
+ _loc11_ = _loc11_ + _loc13_.itemName + "x" + _loc13_.itemNums + "。";
+ }
+ _loc14_ = "1、系统一共设置" + this.luckData.boxCounts + "个宝箱,内含" + this.luckData.LUCK_BOX_1_NUMS + "个一等奖宝箱," + this.luckData.LUCK_BOX_2_NUMS + "个二等奖宝箱," + this.luckData.LUCK_BOX_3_NUMS + "个三等奖宝箱,其余为参与奖宝箱。";
+ _loc14_ = _loc14_ + "
2、玩家每天有 " + this.luckData.luckTimes + " 次机会开启宝箱";
+ _loc14_ = _loc14_ + "
3、活动时间为每日9点-24点";
+ _loc14_ = _loc14_ + "
4、一等奖为:" + _loc2_;
+ _loc14_ = _loc14_ + "
5、二等奖为:" + _loc5_;
+ _loc14_ = _loc14_ + "
6、三等奖为:" + _loc8_;
+ _loc14_ = _loc14_ + "
7、参与奖为:" + _loc11_;
+ this.contentText1.traceMsg(_loc14_);
+ this.opintArr = new Array();
+ _loc15_ = this.luckData.boxPointStr;
+ _loc16_ = _loc15_.split(";");
+ for each(_loc17_ in _loc16_)
+ {
+ _loc18_ = new Object();
+ _loc18_.num = _loc17_.split(",")[0];
+ _loc18_.id = _loc17_.split(",")[1];
+ this.opintArr.push(_loc18_);
+ }
+ this.getBox();
+ }
+
+ private function getPointNum(param1:int) : int
+ {
+ var _loc2_:Object = null;
+ for each(_loc2_ in this.opintArr)
+ {
+ if(_loc2_.id == param1)
+ {
+ return _loc2_.num;
+ }
+ }
+ return 0;
+ }
+
+ override public function getBgImg(param1:Bitmap) : void
+ {
+ this.imgSp.addChild(param1);
+ param1.width = 550 + 173;
+ param1.height = 354 + 92;
+ }
+
+ private function getBox() : void
+ {
+ var _loc2_:int = 0;
+ var _loc3_:int = 0;
+ var _loc4_:UserBoxMc = null;
+ this.packScrollPane = new ScrollPane();
+ this.packScrollPane.setSize(720,438);
+ this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.bg1.addChild(this.packScrollPane);
+ this.packScrollPane.x = 2;
+ this.packScrollPane.y = 3;
+ this.packMc = new Sprite();
+ this.packScrollPane.source = this.packMc;
+ this.itemVec = new Vector.();
+ var _loc1_:int = 0;
+ while(_loc1_ < this.luckData.boxCounts)
+ {
+ _loc2_ = _loc1_ % 10;
+ _loc3_ = _loc1_ / 10;
+ _loc4_ = new UserBoxMc(_loc1_ + 1);
+ _loc4_.setPointNum(this.getPointNum(_loc1_ + 1));
+ this.packMc.addChild(_loc4_);
+ _loc4_.x = 10 + 70 * _loc2_;
+ _loc4_.y = 10 + 70 * _loc3_;
+ this.itemVec.push(_loc4_);
+ _loc1_++;
+ }
+ this.packScrollPane.update();
+ }
+
+ private function openLuckBoxResult(param1:DevEvent) : void
+ {
+ var _loc2_:String = param1.obj.mess;
+ MessageBoxUI.getInstance().addMessage(_loc2_);
+ }
+
+ private function getUserDataResult(param1:DevEvent) : void
+ {
+ var _loc5_:UserBoxMc = null;
+ this.userLuckBoxData = param1.obj;
+ var _loc2_:int = int(this.userLuckBoxData.times);
+ var _loc3_:Array = this.userLuckBoxData.openBoxList;
+ var _loc4_:String = this.userLuckBoxData.mess;
+ this.userTimeText.htmlText = "今日剩余次数:" + _loc2_;
+ this.contentText2.traceMsg(_loc4_);
+ for each(_loc5_ in this.itemVec)
+ {
+ _loc5_.setOpenBoxIds(_loc3_);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/ZoneChooseUI.as b/flash_decompiled/com/view/ui/activity/ZoneChooseUI.as
new file mode 100644
index 0000000..27d966d
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/ZoneChooseUI.as
@@ -0,0 +1,182 @@
+package com.view.ui.activity
+{
+ import com.control.ConnectService;
+ import com.data.GameData;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton1;
+ import com.view.newui.UILabel;
+ import com.view.newui.UIRadioBtn;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class ZoneChooseUI extends BaseUI
+ {
+
+ private static var instance:ZoneChooseUI;
+
+ private var bg2:UIWindowBg;
+
+ private var radio1:UIRadioBtn;
+
+ private var radio2:UIRadioBtn;
+
+ private var _type:int = 0;
+
+ private var preBtn:UIRadioBtn;
+
+ public function ZoneChooseUI()
+ {
+ super();
+ this.createUI();
+ }
+
+ public static function getInstance() : ZoneChooseUI
+ {
+ if(instance == null)
+ {
+ instance = new ZoneChooseUI();
+ }
+ return instance;
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w + 32 - 200;
+ window_heihgt = UIWindowBg.normal_window_h - 149 - 50;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640 + 32 - 200;
+ ui_closeBtn.y = 10;
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition2();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc4_:String = null;
+ var _loc5_:UILabel = null;
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_fenqu);
+ super.setPosition();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630 + 32 - 200,400 - 149 - 50);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ this.bg2 = new UIWindowBg();
+ this.bg2.initThirdPanel(620 + 32 - 200,200 - 9);
+ _loc1_.addChild(this.bg2);
+ this.bg2.x = 5;
+ this.bg2.y = 5;
+ var _loc2_:String = GameData.getConfigMap().CONFIG_CHOOSEZONE_TITLE;
+ var _loc3_:String = GameData.getConfigMap().CONFIG_CHOOSEZONE_1;
+ _loc4_ = GameData.getConfigMap().CONFIG_CHOOSEZONE_2;
+ _loc5_ = new UILabel(400);
+ _loc5_.setText(_loc2_);
+ this.bg2.addChild(_loc5_);
+ _loc5_.x = 20;
+ _loc5_.y = 20;
+ this.radio1 = new UIRadioBtn();
+ this.bg2.addChild(this.radio1);
+ this.radio1.x = _loc5_.y;
+ this.radio1.y = _loc5_.y + 35;
+ var _loc6_:UILabel = new UILabel(400);
+ _loc6_.setText(_loc3_);
+ this.bg2.addChild(_loc6_);
+ _loc6_.x = this.radio1.x + 25;
+ _loc6_.y = this.radio1.y + 2;
+ this.radio2 = new UIRadioBtn();
+ this.bg2.addChild(this.radio2);
+ this.radio2.x = _loc5_.y;
+ this.radio2.y = this.radio1.y + 35;
+ var _loc7_:UILabel = new UILabel(400);
+ _loc7_.setText(_loc4_);
+ this.bg2.addChild(_loc7_);
+ _loc7_.x = this.radio2.x + 25;
+ _loc7_.y = this.radio2.y + 2;
+ var _loc8_:UIButton1 = new UIButton1("暂不处理");
+ this.bg2.addChild(_loc8_);
+ _loc8_.x = 130;
+ _loc8_.y = _loc7_.y + 40;
+ _loc8_.onClick = this.oneKeyPlayBabel;
+ var _loc9_:UIButton1 = new UIButton1("确定选择");
+ this.bg2.addChild(_loc9_);
+ _loc9_.x = _loc8_.x + 120;
+ _loc9_.y = _loc8_.y;
+ _loc9_.onClick = this.enterBabel;
+ this.radio1.onClick = this.selectType;
+ this.radio2.onClick = this.selectType;
+ }
+
+ private function selectType(param1:MouseEvent) : void
+ {
+ var _loc2_:UIRadioBtn = param1.currentTarget as UIRadioBtn;
+ _loc2_.setSelect();
+ if(this.preBtn)
+ {
+ this.preBtn.setUnSelect();
+ }
+ this.preBtn = _loc2_;
+ if(this.preBtn == this.radio1)
+ {
+ this._type = 1;
+ }
+ if(this.preBtn == this.radio2)
+ {
+ this._type = 2;
+ }
+ }
+
+ private function oneKeyPlayBabel(param1:MouseEvent) : void
+ {
+ closeUI(param1);
+ }
+
+ private function enterBabel(param1:MouseEvent) : void
+ {
+ if(this._type == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择类型");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否确定该选择,一旦确定无法挽回?",this.enterStage3);
+ }
+
+ private function enterStage3() : void
+ {
+ ConnectService.getInstance().userService.chooseGameZone(this._type);
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ Utils.g_events.addEventListener(DevEvent.ACCOUNTCHANGE,this.accountChange);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ Utils.g_events.removeEventListener(DevEvent.ACCOUNTCHANGE,this.accountChange);
+ }
+
+ private function accountChange(param1:DevEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function getluckyinfo() : void
+ {
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/dailypay/DailyListItem1.as b/flash_decompiled/com/view/ui/activity/dailypay/DailyListItem1.as
new file mode 100644
index 0000000..6901a58
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/dailypay/DailyListItem1.as
@@ -0,0 +1,83 @@
+package com.view.ui.activity.dailypay
+{
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import com.view.world.ToolTipManager;
+ import com.view.world.TxtTooltip;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class DailyListItem1 extends Sprite
+ {
+
+ private var value1:TextField;
+
+ private var value2:TextField;
+
+ private var value3:TextField;
+
+ private var bg1:Sprite;
+
+ private var sp:Sprite;
+
+ public function DailyListItem1(param1:int)
+ {
+ super();
+ this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,282,25);
+ this.bg1.alpha = 0.2;
+ addChild(this.bg1);
+ this.bg1.visible = false;
+ this.value1 = PublicMethod.getTextFieldWithFillter(65535,50);
+ addChild(this.value1);
+ this.value1.x = 15;
+ this.value1.y = 2;
+ this.value1.text = "" + param1;
+ this.value2 = PublicMethod.getTextFieldWithFillter(65280,100);
+ addChild(this.value2);
+ this.value2.x = this.value1.x + this.value1.width + 10;
+ this.value2.y = this.value1.y;
+ this.value3 = PublicMethod.getTextFieldWithFillter(65535,60);
+ addChild(this.value3);
+ this.value3.x = this.value2.x + this.value2.width + 26;
+ this.value3.y = this.value1.y;
+ this.value3.htmlText = "查看奖励";
+ this.sp = PublicMethod.createShape(65535,55,20);
+ addChild(this.sp);
+ this.sp.x = this.value3.x;
+ this.sp.y = this.value3.y;
+ this.sp.alpha = 0;
+ this.sp.buttonMode = true;
+ addEventListener(MouseEvent.ROLL_OUT,this.mouseOut);
+ addEventListener(MouseEvent.ROLL_OVER,this.mouseOver);
+ }
+
+ private function mouseOut(param1:MouseEvent) : void
+ {
+ this.bg1.visible = false;
+ }
+
+ private function mouseOver(param1:MouseEvent) : void
+ {
+ this.bg1.visible = true;
+ }
+
+ public function setItemDesc(param1:String) : void
+ {
+ ToolTipManager.getInstance().setToolTip(this.sp,new TxtTooltip(param1),false,-1,false);
+ }
+
+ public function setObj(param1:Object) : void
+ {
+ if(param1 == null)
+ {
+ this.value2.text = "0";
+ }
+ else
+ {
+ this.value2.text = param1.point;
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/dailypay/DailyListItem2.as b/flash_decompiled/com/view/ui/activity/dailypay/DailyListItem2.as
new file mode 100644
index 0000000..3076fbf
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/dailypay/DailyListItem2.as
@@ -0,0 +1,61 @@
+package com.view.ui.activity.dailypay
+{
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class DailyListItem2 extends Sprite
+ {
+
+ private var value1:TextField;
+
+ private var value2:TextField;
+
+ private var bg1:Sprite;
+
+ public function DailyListItem2(param1:int)
+ {
+ super();
+ this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,184,25);
+ this.bg1.alpha = 0.2;
+ addChild(this.bg1);
+ this.bg1.visible = false;
+ this.value1 = PublicMethod.getTextFieldWithFillter(65535,36);
+ addChild(this.value1);
+ this.value1.x = 15;
+ this.value1.y = 2;
+ this.value1.text = "" + param1;
+ this.value2 = PublicMethod.getTextFieldWithFillter(65280,80);
+ addChild(this.value2);
+ this.value2.x = this.value1.x + this.value1.width + 30;
+ this.value2.y = this.value1.y;
+ addEventListener(MouseEvent.ROLL_OUT,this.mouseOut);
+ addEventListener(MouseEvent.ROLL_OVER,this.mouseOver);
+ }
+
+ private function mouseOut(param1:MouseEvent) : void
+ {
+ this.bg1.visible = false;
+ }
+
+ private function mouseOver(param1:MouseEvent) : void
+ {
+ this.bg1.visible = true;
+ }
+
+ public function setObj(param1:Object) : void
+ {
+ if(param1 == null)
+ {
+ this.value2.text = "0";
+ }
+ else
+ {
+ this.value2.text = param1.point;
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/dailypay/DailyPay.as b/flash_decompiled/com/view/ui/activity/dailypay/DailyPay.as
new file mode 100644
index 0000000..ced6d60
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/dailypay/DailyPay.as
@@ -0,0 +1,173 @@
+package com.view.ui.activity.dailypay
+{
+ import com.common.LoadResource;
+ import com.control.ConnectService;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIBigButton;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class DailyPay extends BaseUI
+ {
+
+ private var bg:UIWindowBg;
+
+ public var btnArr:Array;
+
+ private var paneBg:UIWindowBg;
+
+ private var rightBg:UIWindowBg;
+
+ private var loadRes:LoadResource;
+
+ private var prePage:Sprite;
+
+ private var preBtn:UIBigButton;
+
+ private var page1:PayPage_1;
+
+ private var page2:PayPage_2;
+
+ public function DailyPay()
+ {
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_chongzhihuodong);
+ super.setPosition();
+ this.createUI();
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w + 32;
+ window_heihgt = UIWindowBg.normal_window_h;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640 + 32;
+ ui_closeBtn.y = 10;
+ }
+
+ override public function createUI() : void
+ {
+ var _loc3_:UIBigButton = null;
+ this.paneBg = new UIWindowBg();
+ this.paneBg.initSecondPanel(630 + 32,400);
+ addChild(this.paneBg);
+ this.paneBg.x = 11;
+ this.paneBg.y = 39;
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initThirdPanel(140,391);
+ this.paneBg.addChild(_loc1_);
+ _loc1_.x = 4;
+ _loc1_.y = 4;
+ this.btnArr = new Array();
+ var _loc2_:UIBigButton = new UIBigButton(7,3);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ _loc2_.onClick = this.clickPage;
+ this.btnArr.push(_loc2_);
+ _loc3_ = new UIBigButton(8,3);
+ _loc3_.x = _loc2_.x;
+ _loc3_.y = _loc2_.y + 40;
+ _loc3_.onClick = this.clickPage;
+ this.btnArr.push(_loc3_);
+ this.rightBg = new UIWindowBg();
+ this.rightBg.initThirdPanel(500,391);
+ this.paneBg.addChild(this.rightBg);
+ this.rightBg.x = _loc1_.x + _loc1_.width + 4;
+ this.rightBg.y = _loc1_.y;
+ this.loadPng();
+ this.getInitData();
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ Utils.g_events.addEventListener(DevEvent.EVENT_CHONGZHI_MAIN,this.getInitDataResult);
+ if(this.prePage == this.page1 && this.page1 != null)
+ {
+ this.page1.getUserPayCount();
+ }
+ if(this.prePage == this.page2 && this.page2 != null)
+ {
+ this.page2.getList();
+ }
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ Utils.g_events.removeEventListener(DevEvent.EVENT_CHONGZHI_MAIN,this.getInitDataResult);
+ }
+
+ private function loadPng() : void
+ {
+ var _loc1_:String = "pic/bg/dailypay.png";
+ this.loadRes = new LoadResource(_loc1_,this.loadBack);
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.rightBg.addChild(_loc2_);
+ _loc2_.y = 4;
+ _loc2_.x = 4;
+ }
+
+ private function clickPage(param1:MouseEvent) : void
+ {
+ var _loc2_:UIBigButton = param1.currentTarget as UIBigButton;
+ if(this.preBtn == _loc2_)
+ {
+ return;
+ }
+ if(Boolean(this.prePage) && this.rightBg.contains(this.prePage))
+ {
+ this.rightBg.removeChild(this.prePage);
+ }
+ this.preBtn = _loc2_;
+ if(this.btnArr[0] == this.preBtn)
+ {
+ if(this.page1 == null)
+ {
+ this.page1 = new PayPage_1();
+ }
+ this.page1.getUserPayCount();
+ this.prePage = this.page1;
+ }
+ if(this.btnArr[1] == this.preBtn)
+ {
+ if(this.page2 == null)
+ {
+ this.page2 = new PayPage_2();
+ }
+ this.page2.getList();
+ this.prePage = this.page2;
+ }
+ this.rightBg.addChild(this.prePage);
+ this.prePage.x = 2;
+ this.prePage.y = 160;
+ }
+
+ private function getInitData() : void
+ {
+ ConnectService.getInstance().activityService.enterPayMain();
+ }
+
+ private function getInitDataResult(param1:DevEvent) : void
+ {
+ PayData.obj = param1.obj;
+ this.btnArr[0].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP));
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/dailypay/PayData.as b/flash_decompiled/com/view/ui/activity/dailypay/PayData.as
new file mode 100644
index 0000000..0506573
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/dailypay/PayData.as
@@ -0,0 +1,24 @@
+package com.view.ui.activity.dailypay
+{
+ public class PayData
+ {
+
+ private static var _obj:Object;
+
+ public function PayData()
+ {
+ super();
+ }
+
+ public static function get obj() : Object
+ {
+ return _obj;
+ }
+
+ public static function set obj(param1:Object) : void
+ {
+ _obj = param1;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/dailypay/PayPage_1.as b/flash_decompiled/com/view/ui/activity/dailypay/PayPage_1.as
new file mode 100644
index 0000000..e8f27e2
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/dailypay/PayPage_1.as
@@ -0,0 +1,593 @@
+package com.view.ui.activity.dailypay
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.ui.activity.gift.NewItemMc;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class PayPage_1 extends Sprite
+ {
+
+ private var label1:TextField;
+
+ private var getBtn1:UIButton;
+
+ private var getBtn2:UIButton;
+
+ private var getBtn3:UIButton;
+
+ private var getBtn4:UIButton;
+
+ private var getBtn5:UIButton;
+
+ private var getBtn6:UIButton;
+
+ private var getBtn7:UIButton;
+
+ private var getBtn8:UIButton;
+
+ private var packScrollPane:ScrollPane;
+
+ private var packMc:Sprite;
+
+ private var countPoint:int;
+
+ public function PayPage_1()
+ {
+ var _loc3_:Sprite = null;
+ var _loc4_:TextField = null;
+ var _loc12_:TextField = null;
+ var _loc16_:TextField = null;
+ super();
+ this.packScrollPane = new ScrollPane();
+ this.packScrollPane.setSize(505,235);
+ this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ addChild(this.packScrollPane);
+ this.packMc = new Sprite();
+ this.packScrollPane.source = this.packMc;
+ this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,400);
+ this.packMc.addChild(this.label1);
+ this.label1.x = 10;
+ this.label1.y = 2;
+ this.label1.htmlText = "每天充值达到一定数量即可领取以下奖励。 今日已充值:0";
+ var _loc1_:Sprite = PublicMethod.getTrLine(490);
+ this.packMc.addChild(_loc1_);
+ _loc1_.x = 10;
+ _loc1_.y = this.label1.y + 20;
+ var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250);
+ this.packMc.addChild(_loc2_);
+ _loc2_.x = 10;
+ _loc2_.y = _loc1_.y + 15;
+ _loc2_.htmlText = "当天累计充值达到 10,即可领取:";
+ this.getBtn7 = new UIButton("领 取",2,10);
+ this.packMc.addChild(this.getBtn7);
+ this.getBtn7.x = 410;
+ this.getBtn7.y = _loc2_.y + 30;
+ _loc3_ = PublicMethod.getTrLine(490);
+ this.packMc.addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + 80;
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250);
+ this.packMc.addChild(_loc4_);
+ _loc4_.x = 10;
+ _loc4_.y = _loc3_.y + 15;
+ _loc4_.htmlText = "当天累计充值达到 50,即可领取:";
+ this.getBtn8 = new UIButton("领 取",2,10);
+ this.packMc.addChild(this.getBtn8);
+ this.getBtn8.x = 410;
+ this.getBtn8.y = _loc4_.y + 30;
+ var _loc5_:Sprite = PublicMethod.getTrLine(490);
+ this.packMc.addChild(_loc5_);
+ _loc5_.x = _loc1_.x;
+ _loc5_.y = _loc3_.y + 80;
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250);
+ this.packMc.addChild(_loc6_);
+ _loc6_.x = 10;
+ _loc6_.y = _loc5_.y + 15;
+ _loc6_.htmlText = "当天累计充值达到 100,即可领取:";
+ this.getBtn1 = new UIButton("领 取",2,10);
+ this.packMc.addChild(this.getBtn1);
+ this.getBtn1.x = 410;
+ this.getBtn1.y = _loc6_.y + 30;
+ var _loc7_:Sprite = PublicMethod.getTrLine(490);
+ this.packMc.addChild(_loc7_);
+ _loc7_.x = _loc1_.x;
+ _loc7_.y = _loc5_.y + 80;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250);
+ this.packMc.addChild(_loc8_);
+ _loc8_.x = 10;
+ _loc8_.y = _loc7_.y + 15;
+ _loc8_.htmlText = "当天累计充值达到 200,即可领取:";
+ this.getBtn2 = new UIButton("领 取",2,10);
+ this.packMc.addChild(this.getBtn2);
+ this.getBtn2.x = 410;
+ this.getBtn2.y = _loc8_.y + 30;
+ var _loc9_:Sprite = PublicMethod.getTrLine(490);
+ this.packMc.addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc7_.y + 80;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250);
+ this.packMc.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = _loc9_.y + 15;
+ _loc10_.htmlText = "当天累计充值达到 300,即可领取:";
+ this.getBtn3 = new UIButton("领 取",2,10);
+ this.packMc.addChild(this.getBtn3);
+ this.getBtn3.x = 410;
+ this.getBtn3.y = _loc10_.y + 30;
+ var _loc11_:Sprite = PublicMethod.getTrLine(490);
+ this.packMc.addChild(_loc11_);
+ _loc11_.x = _loc1_.x;
+ _loc11_.y = _loc9_.y + 80;
+ _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250);
+ this.packMc.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 15;
+ _loc12_.htmlText = "当天累计充值达到 500,即可领取:";
+ this.getBtn4 = new UIButton("领 取",2,10);
+ this.packMc.addChild(this.getBtn4);
+ this.getBtn4.x = 410;
+ this.getBtn4.y = _loc12_.y + 30;
+ var _loc13_:Sprite = PublicMethod.getTrLine(490);
+ this.packMc.addChild(_loc13_);
+ _loc13_.x = _loc1_.x;
+ _loc13_.y = _loc11_.y + 80;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250);
+ this.packMc.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 15;
+ _loc14_.htmlText = "当天累计充值达到 1000,即可领取:";
+ this.getBtn5 = new UIButton("领 取",2,10);
+ this.packMc.addChild(this.getBtn5);
+ this.getBtn5.x = 410;
+ this.getBtn5.y = _loc14_.y + 30;
+ var _loc15_:Sprite = PublicMethod.getTrLine(490);
+ this.packMc.addChild(_loc15_);
+ _loc15_.x = _loc1_.x;
+ _loc15_.y = _loc13_.y + 80;
+ _loc16_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250);
+ this.packMc.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 15;
+ _loc16_.htmlText = "当天累计充值达到 2000,即可领取:";
+ this.getBtn6 = new UIButton("领 取",2,10);
+ this.packMc.addChild(this.getBtn6);
+ this.getBtn6.x = 410;
+ this.getBtn6.y = _loc16_.y + 30;
+ var _loc17_:Sprite = PublicMethod.getTrLine(490);
+ this.packMc.addChild(_loc17_);
+ _loc17_.x = _loc1_.x;
+ _loc17_.y = _loc15_.y + 80;
+ _loc16_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,280);
+ this.packMc.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc17_.y + 15;
+ _loc16_.htmlText = "当天累计充值超过 2000 时,请联系客服补发礼包。";
+ this.initItemView();
+ this.getBtn1.onClick = this.getGift1;
+ this.getBtn2.onClick = this.getGift2;
+ this.getBtn3.onClick = this.getGift3;
+ this.getBtn4.onClick = this.getGift5;
+ this.getBtn5.onClick = this.getGift6;
+ this.getBtn6.onClick = this.getGift7;
+ this.getBtn7.onClick = this.getGift8;
+ this.getBtn8.onClick = this.getGift9;
+ Utils.g_events.addEventListener(DevEvent.EVENT_CHONGZHI_PAYCOUNT,this.getUserPayCountResult);
+ Utils.g_events.addEventListener(DevEvent.EVENT_CHONGZHI_GETGIFT,this.getPayGiftResult);
+ }
+
+ private function initItemView() : void
+ {
+ var _loc10_:int = 0;
+ var _loc18_:NewItemMc = null;
+ var _loc1_:Array = PayData.obj.daily_pay_10;
+ var _loc2_:Array = PayData.obj.daily_pay_50;
+ var _loc3_:Array = PayData.obj.daily_pay_100;
+ var _loc4_:Array = PayData.obj.daily_pay_200;
+ var _loc5_:Array = PayData.obj.daily_pay_300;
+ var _loc6_:Array = PayData.obj.daily_pay_500;
+ var _loc7_:Array = PayData.obj.daily_pay_1000;
+ var _loc8_:Array = PayData.obj.daily_pay_2000;
+ var _loc9_:int = int(_loc1_.length);
+ if(_loc9_ > 8)
+ {
+ _loc9_ = 8;
+ }
+ _loc10_ = 0;
+ while(_loc10_ < _loc9_)
+ {
+ _loc18_ = new NewItemMc(1);
+ this.packMc.addChild(_loc18_);
+ _loc18_.x = 10 + 50 * _loc10_;
+ _loc18_.y = 60;
+ _loc18_.setObj(_loc1_[_loc10_]);
+ _loc18_.loadTip(_loc1_[_loc10_]);
+ _loc10_++;
+ }
+ var _loc11_:int = int(_loc2_.length);
+ if(_loc11_ > 8)
+ {
+ _loc11_ = 8;
+ }
+ _loc10_ = 0;
+ while(_loc10_ < _loc11_)
+ {
+ _loc18_ = new NewItemMc(1);
+ this.packMc.addChild(_loc18_);
+ _loc18_.x = 10 + 50 * _loc10_;
+ _loc18_.y = 140;
+ _loc18_.setObj(_loc2_[_loc10_]);
+ _loc18_.loadTip(_loc2_[_loc10_]);
+ _loc10_++;
+ }
+ var _loc12_:int = int(_loc3_.length);
+ if(_loc12_ > 8)
+ {
+ _loc12_ = 8;
+ }
+ _loc10_ = 0;
+ while(_loc10_ < _loc12_)
+ {
+ _loc18_ = new NewItemMc(1);
+ this.packMc.addChild(_loc18_);
+ _loc18_.x = 10 + 50 * _loc10_;
+ _loc18_.y = 220;
+ _loc18_.setObj(_loc3_[_loc10_]);
+ _loc18_.loadTip(_loc3_[_loc10_]);
+ _loc10_++;
+ }
+ var _loc13_:int = int(_loc4_.length);
+ if(_loc13_ > 8)
+ {
+ _loc13_ = 8;
+ }
+ _loc10_ = 0;
+ while(_loc10_ < _loc13_)
+ {
+ _loc18_ = new NewItemMc(1);
+ this.packMc.addChild(_loc18_);
+ _loc18_.x = 10 + 50 * _loc10_;
+ _loc18_.y = 300;
+ _loc18_.setObj(_loc4_[_loc10_]);
+ _loc18_.loadTip(_loc4_[_loc10_]);
+ _loc10_++;
+ }
+ var _loc14_:int = int(_loc5_.length);
+ if(_loc14_ > 8)
+ {
+ _loc14_ = 8;
+ }
+ _loc10_ = 0;
+ while(_loc10_ < _loc14_)
+ {
+ _loc18_ = new NewItemMc(1);
+ this.packMc.addChild(_loc18_);
+ _loc18_.x = 10 + 50 * _loc10_;
+ _loc18_.y = 380;
+ _loc18_.setObj(_loc5_[_loc10_]);
+ _loc18_.loadTip(_loc5_[_loc10_]);
+ _loc10_++;
+ }
+ var _loc15_:int = int(_loc6_.length);
+ if(_loc15_ > 8)
+ {
+ _loc15_ = 8;
+ }
+ _loc10_ = 0;
+ while(_loc10_ < _loc15_)
+ {
+ _loc18_ = new NewItemMc(1);
+ this.packMc.addChild(_loc18_);
+ _loc18_.x = 10 + 50 * _loc10_;
+ _loc18_.y = 460;
+ _loc18_.setObj(_loc6_[_loc10_]);
+ _loc18_.loadTip(_loc6_[_loc10_]);
+ _loc10_++;
+ }
+ var _loc16_:int = int(_loc7_.length);
+ if(_loc16_ > 8)
+ {
+ _loc16_ = 8;
+ }
+ _loc10_ = 0;
+ while(_loc10_ < _loc16_)
+ {
+ _loc18_ = new NewItemMc(1);
+ this.packMc.addChild(_loc18_);
+ _loc18_.x = 10 + 50 * _loc10_;
+ _loc18_.y = 540;
+ _loc18_.setObj(_loc7_[_loc10_]);
+ _loc18_.loadTip(_loc7_[_loc10_]);
+ _loc10_++;
+ }
+ var _loc17_:int = int(_loc8_.length);
+ if(_loc17_ > 8)
+ {
+ _loc17_ = 8;
+ }
+ _loc10_ = 0;
+ while(_loc10_ < _loc17_)
+ {
+ _loc18_ = new NewItemMc(1);
+ this.packMc.addChild(_loc18_);
+ _loc18_.x = 10 + 50 * _loc10_;
+ _loc18_.y = 620;
+ _loc18_.setObj(_loc8_[_loc10_]);
+ _loc18_.loadTip(_loc8_[_loc10_]);
+ _loc10_++;
+ }
+ this.packScrollPane.update();
+ }
+
+ public function getUserPayCount() : void
+ {
+ ConnectService.getInstance().activityService.getUserPayCount();
+ }
+
+ private function getUserPayCountResult(param1:DevEvent) : void
+ {
+ this.countPoint = param1.obj.countPoint;
+ this.label1.htmlText = "每天充值达到一定数量即可领取以下奖励。 今日已充值:" + this.countPoint + "";
+ if(param1.obj.pay_get_100 == 1)
+ {
+ this.getBtn1.setText("已领取");
+ this.getBtn1.setUnEnable();
+ }
+ else
+ {
+ this.getBtn1.setText("领 取");
+ this.getBtn1.setEnable();
+ }
+ if(param1.obj.pay_get_200 == 1)
+ {
+ this.getBtn2.setText("已领取");
+ this.getBtn2.setUnEnable();
+ }
+ else
+ {
+ this.getBtn2.setText("领 取");
+ this.getBtn2.setEnable();
+ }
+ if(param1.obj.pay_get_300 == 1)
+ {
+ this.getBtn3.setText("已领取");
+ this.getBtn3.setUnEnable();
+ }
+ else
+ {
+ this.getBtn3.setText("领 取");
+ this.getBtn3.setEnable();
+ }
+ if(param1.obj.pay_get_500 == 1)
+ {
+ this.getBtn4.setText("已领取");
+ this.getBtn4.setUnEnable();
+ }
+ else
+ {
+ this.getBtn4.setText("领 取");
+ this.getBtn4.setEnable();
+ }
+ if(param1.obj.pay_get_1000 == 1)
+ {
+ this.getBtn5.setText("已领取");
+ this.getBtn5.setUnEnable();
+ }
+ else
+ {
+ this.getBtn5.setText("领 取");
+ this.getBtn5.setEnable();
+ }
+ if(param1.obj.pay_get_2000 == 1)
+ {
+ this.getBtn6.setText("已领取");
+ this.getBtn6.setUnEnable();
+ }
+ else
+ {
+ this.getBtn6.setText("领 取");
+ this.getBtn6.setEnable();
+ }
+ if(param1.obj.pay_get_10 == 1)
+ {
+ this.getBtn7.setText("已领取");
+ this.getBtn7.setUnEnable();
+ }
+ else
+ {
+ this.getBtn7.setText("领 取");
+ this.getBtn7.setEnable();
+ }
+ if(param1.obj.pay_get_50 == 1)
+ {
+ this.getBtn8.setText("已领取");
+ this.getBtn8.setUnEnable();
+ }
+ else
+ {
+ this.getBtn8.setText("领 取");
+ this.getBtn8.setEnable();
+ }
+ }
+
+ private function getGift1(param1:MouseEvent) : void
+ {
+ if(this.countPoint < 100)
+ {
+ MessageBoxUI.getInstance().addMessage("当日充值未达到条件!");
+ return;
+ }
+ this.getGift(1);
+ }
+
+ private function getGift2(param1:MouseEvent) : void
+ {
+ if(this.countPoint < 200)
+ {
+ MessageBoxUI.getInstance().addMessage("当日充值未达到条件!");
+ return;
+ }
+ this.getGift(2);
+ }
+
+ private function getGift3(param1:MouseEvent) : void
+ {
+ if(this.countPoint < 300)
+ {
+ MessageBoxUI.getInstance().addMessage("当日充值未达到条件!");
+ return;
+ }
+ this.getGift(3);
+ }
+
+ private function getGift5(param1:MouseEvent) : void
+ {
+ if(this.countPoint < 500)
+ {
+ MessageBoxUI.getInstance().addMessage("当日充值未达到条件!");
+ return;
+ }
+ this.getGift(5);
+ }
+
+ private function getGift6(param1:MouseEvent) : void
+ {
+ if(this.countPoint < 1000)
+ {
+ MessageBoxUI.getInstance().addMessage("当日充值未达到条件!");
+ return;
+ }
+ this.getGift(6);
+ }
+
+ private function getGift7(param1:MouseEvent) : void
+ {
+ if(this.countPoint < 2000)
+ {
+ MessageBoxUI.getInstance().addMessage("当日充值未达到条件!");
+ return;
+ }
+ this.getGift(7);
+ }
+
+ private function getGift8(param1:MouseEvent) : void
+ {
+ if(this.countPoint < 10)
+ {
+ MessageBoxUI.getInstance().addMessage("当日充值未达到条件!");
+ return;
+ }
+ this.getGift(8);
+ }
+
+ private function getGift9(param1:MouseEvent) : void
+ {
+ if(this.countPoint < 50)
+ {
+ MessageBoxUI.getInstance().addMessage("当日充值未达到条件!");
+ return;
+ }
+ this.getGift(9);
+ }
+
+ private function getGift(param1:int) : void
+ {
+ ConnectService.getInstance().activityService.getDailyPay(param1);
+ }
+
+ private function getPayGiftResult(param1:DevEvent) : void
+ {
+ if(param1.obj.pay_get_100 == 1)
+ {
+ this.getBtn1.setText("已领取");
+ this.getBtn1.setUnEnable();
+ }
+ else
+ {
+ this.getBtn1.setText("领 取");
+ this.getBtn1.setEnable();
+ }
+ if(param1.obj.pay_get_200 == 1)
+ {
+ this.getBtn2.setText("已领取");
+ this.getBtn2.setUnEnable();
+ }
+ else
+ {
+ this.getBtn2.setText("领 取");
+ this.getBtn2.setEnable();
+ }
+ if(param1.obj.pay_get_300 == 1)
+ {
+ this.getBtn3.setText("已领取");
+ this.getBtn3.setUnEnable();
+ }
+ else
+ {
+ this.getBtn3.setText("领 取");
+ this.getBtn3.setEnable();
+ }
+ if(param1.obj.pay_get_500 == 1)
+ {
+ this.getBtn4.setText("已领取");
+ this.getBtn4.setUnEnable();
+ }
+ else
+ {
+ this.getBtn4.setText("领 取");
+ this.getBtn4.setEnable();
+ }
+ if(param1.obj.pay_get_1000 == 1)
+ {
+ this.getBtn5.setText("已领取");
+ this.getBtn5.setUnEnable();
+ }
+ else
+ {
+ this.getBtn5.setText("领 取");
+ this.getBtn5.setEnable();
+ }
+ if(param1.obj.pay_get_2000 == 1)
+ {
+ this.getBtn6.setText("已领取");
+ this.getBtn6.setUnEnable();
+ }
+ else
+ {
+ this.getBtn6.setText("领 取");
+ this.getBtn6.setEnable();
+ }
+ if(param1.obj.pay_get_10 == 1)
+ {
+ this.getBtn7.setText("已领取");
+ this.getBtn7.setUnEnable();
+ }
+ else
+ {
+ this.getBtn7.setText("领 取");
+ this.getBtn7.setEnable();
+ }
+ if(param1.obj.pay_get_50 == 1)
+ {
+ this.getBtn8.setText("已领取");
+ this.getBtn8.setUnEnable();
+ }
+ else
+ {
+ this.getBtn8.setText("领 取");
+ this.getBtn8.setEnable();
+ }
+ MessageBoxUI.getInstance().addMessage("领取成功!");
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/dailypay/PayPage_2.as b/flash_decompiled/com/view/ui/activity/dailypay/PayPage_2.as
new file mode 100644
index 0000000..e37482a
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/dailypay/PayPage_2.as
@@ -0,0 +1,300 @@
+package com.view.ui.activity.dailypay
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.newui.UIBigButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UIWindowBg;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class PayPage_2 extends Sprite
+ {
+
+ private var label3:TextField;
+
+ private var vec1:Vector.;
+
+ private var vec2:Vector.;
+
+ private var getBtn:UIBigButton;
+
+ private var hasGetBtn:UIBigButton;
+
+ private var tableMc1:UITable;
+
+ private var tableMc2:UITable;
+
+ public function PayPage_2()
+ {
+ var _loc1_:UIWindowBg = null;
+ var _loc12_:int = 0;
+ var _loc19_:Object = null;
+ var _loc20_:String = null;
+ var _loc21_:String = null;
+ var _loc22_:String = null;
+ var _loc23_:String = null;
+ var _loc24_:DailyListItem1 = null;
+ var _loc25_:DailyListItem2 = null;
+ super();
+ _loc1_ = new UIWindowBg();
+ _loc1_.initSecondPanel(289,166);
+ addChild(_loc1_);
+ var _loc2_:UITitleBg = new UITitleBg("昨日充值排名",_loc1_.width);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = int(_loc1_.width / 2 - _loc2_.width / 2);
+ _loc1_.x = 2;
+ _loc1_.y = -2;
+ var _loc3_:UIWindowBg = new UIWindowBg();
+ _loc3_.initSecondPanel(189,166);
+ addChild(_loc3_);
+ _loc3_.x = 4 + _loc1_.x + _loc1_.width;
+ _loc3_.y = _loc1_.y;
+ var _loc4_:UITitleBg = new UITitleBg("今日充值排名",_loc3_.width);
+ _loc3_.addChild(_loc4_);
+ _loc4_.x = int(_loc3_.width / 2 - _loc4_.width / 2);
+ var _loc5_:Array = ["排名","充值金额","奖励道具"];
+ var _loc6_:Array = [54,120,120];
+ this.tableMc1 = new UITable();
+ this.tableMc1.drawLine = true;
+ this.tableMc1.lineHeight = 24;
+ this.tableMc1.install(5,_loc5_,_loc6_);
+ _loc1_.addChild(this.tableMc1);
+ this.tableMc1.x = 4;
+ this.tableMc1.y = 26;
+ var _loc7_:Array = ["排名","充值金额"];
+ var _loc8_:Array = [54,140];
+ this.tableMc2 = new UITable();
+ this.tableMc2.drawLine = true;
+ this.tableMc2.lineHeight = 24;
+ this.tableMc2.install(5,_loc7_,_loc8_);
+ _loc3_.addChild(this.tableMc2);
+ this.tableMc2.x = 4;
+ this.tableMc2.y = 26;
+ var _loc9_:UIWindowBg = new UIWindowBg();
+ _loc9_.initSecondPanel(492,50);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc1_.y + _loc1_.height + 3;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,370);
+ _loc10_.text = "活动说明:每日充值排名前五即可获得额外的奖励(50以上才能上榜)。";
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,300);
+ _loc11_.text = "领奖说明:每日领取的是前一日排名奖励。";
+ this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,300);
+ this.label3.text = "昨日排名:0 今日排名:5。";
+ _loc9_.addChild(_loc10_);
+ _loc10_.x = 5;
+ _loc10_.y = 5;
+ _loc9_.addChild(_loc11_);
+ _loc11_.x = _loc10_.x;
+ _loc11_.y = _loc10_.y + 18;
+ _loc9_.addChild(this.label3);
+ this.label3.x = _loc10_.x;
+ this.label3.y = _loc11_.y + 18;
+ this.getBtn = new UIBigButton(3);
+ _loc9_.addChild(this.getBtn);
+ this.getBtn.x = 376;
+ this.getBtn.y = 14;
+ this.getBtn.onClick = this.getGiftItem;
+ this.hasGetBtn = new UIBigButton(4);
+ _loc9_.addChild(this.hasGetBtn);
+ this.hasGetBtn.x = this.getBtn.x;
+ this.hasGetBtn.y = this.getBtn.y;
+ this.hasGetBtn.setUnEnable();
+ this.vec1 = new Vector.();
+ _loc12_ = 1;
+ while(_loc12_ < 6)
+ {
+ _loc24_ = new DailyListItem1(_loc12_);
+ this.vec1.push(_loc24_);
+ this.tableMc1.addChild(_loc24_);
+ _loc24_.x = 5;
+ _loc24_.y = 25 + 24 * (_loc12_ - 1);
+ _loc12_++;
+ }
+ this.vec2 = new Vector.();
+ _loc12_ = 1;
+ while(_loc12_ < 6)
+ {
+ _loc25_ = new DailyListItem2(_loc12_);
+ this.vec2.push(_loc25_);
+ this.tableMc2.addChild(_loc25_);
+ _loc25_.x = 5;
+ _loc25_.y = 25 + 24 * (_loc12_ - 1);
+ _loc12_++;
+ }
+ Utils.g_events.addEventListener(DevEvent.EVENT_CHONGZHI_GETDAILYLISTRESULT,this.getGiftItemResult);
+ Utils.g_events.addEventListener(DevEvent.EVENT_CHONGZHI_GETDAILYLIST,this.getListResult);
+ var _loc13_:Array = PayData.obj.daily_pay_order_1;
+ var _loc14_:Array = PayData.obj.daily_pay_order_2;
+ var _loc15_:Array = PayData.obj.daily_pay_order_3;
+ var _loc16_:Array = PayData.obj.daily_pay_order_4;
+ var _loc17_:Array = PayData.obj.daily_pay_order_5;
+ var _loc18_:String = "";
+ for each(_loc19_ in _loc13_)
+ {
+ _loc18_ = _loc18_ + _loc19_.showName + "×" + _loc19_.itemNums + " ";
+ }
+ _loc20_ = "";
+ for each(_loc19_ in _loc14_)
+ {
+ _loc20_ = _loc20_ + _loc19_.showName + "×" + _loc19_.itemNums + " ";
+ }
+ _loc21_ = "";
+ for each(_loc19_ in _loc15_)
+ {
+ _loc21_ = _loc21_ + _loc19_.showName + "×" + _loc19_.itemNums + " ";
+ }
+ _loc22_ = "";
+ for each(_loc19_ in _loc16_)
+ {
+ _loc22_ = _loc22_ + _loc19_.showName + "×" + _loc19_.itemNums + " ";
+ }
+ _loc23_ = "";
+ for each(_loc19_ in _loc17_)
+ {
+ _loc23_ = _loc23_ + _loc19_.showName + "×" + _loc19_.itemNums + " ";
+ }
+ this.vec1[0].setItemDesc(_loc18_);
+ this.vec1[1].setItemDesc(_loc20_);
+ this.vec1[2].setItemDesc(_loc21_);
+ this.vec1[3].setItemDesc(_loc22_);
+ this.vec1[4].setItemDesc(_loc23_);
+ }
+
+ public function getList() : void
+ {
+ ConnectService.getInstance().activityService.getDailyPayList();
+ }
+
+ private function getListResult(param1:DevEvent) : void
+ {
+ var _loc5_:Object = null;
+ var _loc6_:Array = null;
+ var _loc7_:int = 0;
+ var _loc8_:Boolean = false;
+ var _loc9_:String = null;
+ var _loc10_:int = 0;
+ var _loc2_:Object = param1.obj;
+ var _loc3_:Array = _loc2_.list1;
+ var _loc4_:Array = new Array();
+ for each(_loc5_ in _loc3_)
+ {
+ if(_loc5_.point > 49)
+ {
+ _loc4_.push(_loc5_);
+ }
+ }
+ _loc6_ = _loc2_.list2;
+ _loc7_ = int(_loc2_.hasGet);
+ _loc8_ = false;
+ _loc9_ = NewUserData.getAccount().accName;
+ _loc10_ = 0;
+ while(_loc10_ < this.vec1.length)
+ {
+ if(_loc4_[_loc10_])
+ {
+ this.vec1[_loc10_].setObj(_loc4_[_loc10_]);
+ if(_loc4_[_loc10_].accname == _loc9_)
+ {
+ _loc8_ = true;
+ }
+ }
+ else
+ {
+ this.vec1[_loc10_].setObj(null);
+ }
+ _loc10_++;
+ }
+ _loc10_ = 0;
+ while(_loc10_ < this.vec2.length)
+ {
+ if(_loc6_[_loc10_])
+ {
+ this.vec2[_loc10_].setObj(_loc6_[_loc10_]);
+ }
+ else
+ {
+ this.vec2[_loc10_].setObj(null);
+ }
+ _loc10_++;
+ }
+ if(_loc7_ == 1)
+ {
+ this.getBtn.visible = false;
+ this.hasGetBtn.visible = true;
+ }
+ else
+ {
+ this.hasGetBtn.visible = false;
+ this.getBtn.visible = true;
+ if(_loc8_)
+ {
+ this.getBtn.setEnable();
+ }
+ else
+ {
+ this.getBtn.setUnEnable();
+ }
+ }
+ var _loc11_:int = 0;
+ _loc10_ = 0;
+ while(_loc10_ < _loc4_.length)
+ {
+ if(_loc4_[_loc10_].accname == _loc9_)
+ {
+ _loc11_ = _loc10_ + 1;
+ break;
+ }
+ _loc10_++;
+ }
+ var _loc12_:int = 0;
+ _loc10_ = 0;
+ while(_loc10_ < _loc6_.length)
+ {
+ if(_loc6_[_loc10_].accname == _loc9_)
+ {
+ _loc12_ = _loc10_ + 1;
+ break;
+ }
+ _loc10_++;
+ }
+ var _loc13_:* = "";
+ if(_loc11_ > 0)
+ {
+ _loc13_ = "昨日排名:" + _loc11_ + "";
+ }
+ else
+ {
+ _loc13_ = "昨日排名:未上榜";
+ }
+ if(_loc12_ > 0)
+ {
+ _loc13_ = _loc13_ + " 今日排名:" + _loc12_ + "";
+ }
+ else
+ {
+ _loc13_ += " 今日排名:未上榜";
+ }
+ this.label3.htmlText = _loc13_;
+ }
+
+ private function getGiftItem(param1:MouseEvent) : void
+ {
+ ConnectService.getInstance().activityService.getDailyOrderListGift();
+ }
+
+ private function getGiftItemResult(param1:DevEvent) : void
+ {
+ this.getBtn.visible = false;
+ this.hasGetBtn.visible = true;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/data/JunShiData.as b/flash_decompiled/com/view/ui/activity/data/JunShiData.as
new file mode 100644
index 0000000..33b3091
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/data/JunShiData.as
@@ -0,0 +1,81 @@
+package com.view.ui.activity.data
+{
+ import com.events.DevEvent;
+ import com.utils.Utils;
+
+ public class JunShiData
+ {
+
+ private static var _junshiObj:Object;
+
+ private static var JUNSHI_PRO_ADD:int;
+
+ private static var FUYIN_PRO_ADD:int;
+
+ private static var JUNSHI_MAXLEVEL:int;
+
+ private static var FUYIN_MAXLEVEL:int;
+
+ private static var _junshieff:Array;
+
+ public function JunShiData()
+ {
+ super();
+ }
+
+ public static function getMaxJunShiLevel() : int
+ {
+ return JUNSHI_MAXLEVEL;
+ }
+
+ public static function getMaxFuYinLevel() : int
+ {
+ return FUYIN_MAXLEVEL;
+ }
+
+ public static function get junshiObj() : Object
+ {
+ return _junshiObj;
+ }
+
+ public static function set junshiObj(param1:Object) : void
+ {
+ _junshiObj = param1;
+ if(param1.effMap)
+ {
+ _junshieff = param1.effMap;
+ JUNSHI_PRO_ADD = param1.JUNSHI_PRO_ADD;
+ FUYIN_PRO_ADD = param1.FUYIN_PRO_ADD;
+ JUNSHI_MAXLEVEL = param1.JUNSHI_MAXLEVEL;
+ FUYIN_MAXLEVEL = param1.FUYIN_MAXLEVEL;
+ }
+ Utils.g_events.dispatchEvent(new DevEvent(DevEvent.JUNSHI_ENTER));
+ }
+
+ public static function get junshieff() : Array
+ {
+ return _junshieff;
+ }
+
+ public static function set junshieff(param1:Array) : void
+ {
+ _junshieff = param1;
+ }
+
+ public static function get PRO_ADD() : int
+ {
+ return FUYIN_PRO_ADD;
+ }
+
+ public static function getJunShiProByLevel(param1:int) : Number
+ {
+ return JUNSHI_PRO_ADD * param1;
+ }
+
+ public static function getFuYinProByLevel(param1:int) : int
+ {
+ return FUYIN_PRO_ADD * param1;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/gift/LevelAwardDate.as b/flash_decompiled/com/view/ui/activity/gift/LevelAwardDate.as
new file mode 100644
index 0000000..1a419cf
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/gift/LevelAwardDate.as
@@ -0,0 +1,47 @@
+package com.view.ui.activity.gift
+{
+ import com.data.GameData;
+
+ public class LevelAwardDate
+ {
+
+ public static var levelconfig:Array = new Array();
+
+ public function LevelAwardDate()
+ {
+ super();
+ }
+
+ public static function setConfigData(param1:Array) : void
+ {
+ levelconfig = param1;
+ }
+
+ public static function getConfigData() : Array
+ {
+ return levelconfig;
+ }
+
+ public static function checkLevelGift(param1:int) : Boolean
+ {
+ var _loc4_:String = null;
+ var _loc5_:int = 0;
+ var _loc2_:String = GameData.getUserHoliday().levelgift;
+ var _loc3_:Array = _loc2_.split(",");
+ for each(_loc4_ in _loc3_)
+ {
+ if(_loc4_ == "")
+ {
+ continue;
+ }
+ _loc5_ = int(_loc4_);
+ if(_loc5_ == param1)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/gift/LevelAwardItem.as b/flash_decompiled/com/view/ui/activity/gift/LevelAwardItem.as
new file mode 100644
index 0000000..82a2cf4
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/gift/LevelAwardItem.as
@@ -0,0 +1,157 @@
+package com.view.ui.activity.gift
+{
+ import com.InstallFace;
+ import com.common.Scale9Grid;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UINums;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UIWindowBg;
+ import com.view.res.GameUIRes;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+
+ public class LevelAwardItem extends Sprite
+ {
+
+ public var gameRes:GameUIRes;
+
+ public var face:InstallFace;
+
+ private var nameText:UITitleBg;
+
+ private var i:int;
+
+ private var ji:Bitmap;
+
+ private var border:Sprite;
+
+ private var currObj:Object;
+
+ public var level:int;
+
+ private var selectStatus:Boolean;
+
+ private var yiling:Bitmap;
+
+ public function LevelAwardItem(param1:int)
+ {
+ var _loc5_:Bitmap = null;
+ this.gameRes = GameUIRes.getInstance();
+ this.face = InstallFace.getInstance();
+ super();
+ this.i = param1;
+ this.ji = new Bitmap(this.gameRes.getPng("ji",this.gameRes.getApplication(GameUIRes.swfUrl_1)));
+ addChild(this.ji);
+ this.ji.x = 67;
+ this.ji.y = 15;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initThirdPanel(80,100);
+ addChild(_loc2_);
+ _loc2_.x = 9;
+ _loc2_.y = 70;
+ var _loc3_:Sprite = new Scale9Grid(this.face.getSprite(UIConfig.boxItem),46,46);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = 13;
+ _loc3_.y = 13;
+ var _loc4_:int = this.i;
+ if(_loc4_ > 5)
+ {
+ _loc4_ = 5;
+ }
+ _loc5_ = new Bitmap(this.gameRes.getPng("" + _loc4_,this.gameRes.getApplication(GameUIRes.swfUrl_1)));
+ _loc3_.addChild(_loc5_);
+ _loc5_.x = 2;
+ _loc5_.y = 2;
+ this.yiling = new Bitmap(this.gameRes.getPng("yiling",this.gameRes.getApplication(GameUIRes.swfUrl_1)));
+ _loc3_.addChild(this.yiling);
+ this.yiling.x = -5;
+ this.yiling.y = 2;
+ this.yiling.visible = false;
+ this.border = new Scale9Grid(this.gameRes.getSprite("table_border",this.gameRes.getApplication(GameUIRes.swfUrl_1)),int(_loc2_.width - 48),int(_loc2_.height - 5));
+ addChild(this.border);
+ --_loc2_.x;
+ this.border.y = _loc2_.y - 9;
+ this.border.visible = false;
+ this.nameText = new UITitleBg("道具",_loc2_.width);
+ _loc2_.addChild(this.nameText);
+ this.nameText.x = int(_loc2_.width / 2 - this.nameText.width / 2);
+ this.nameText.y = 85;
+ addEventListener(MouseEvent.ROLL_OUT,this.rollOut);
+ addEventListener(MouseEvent.ROLL_OVER,this.rollOver);
+ }
+
+ public function getObj() : Object
+ {
+ return this.currObj;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ this.currObj = param1;
+ this.level = param1.level;
+ var _loc2_:UINums = new UINums(18);
+ _loc2_.showNum(this.level);
+ addChild(_loc2_);
+ _loc2_.x = 18;
+ _loc2_.y = 15;
+ if(this.level >= 1000)
+ {
+ this.ji.x = 80;
+ }
+ var _loc3_:String = "";
+ switch(this.i)
+ {
+ case 0:
+ _loc3_ = "ffffff";
+ break;
+ case 1:
+ _loc3_ = "12CC95";
+ break;
+ case 2:
+ _loc3_ = "0D79FF";
+ break;
+ case 3:
+ _loc3_ = "FE00E9";
+ break;
+ case 4:
+ _loc3_ = "FF7E00";
+ break;
+ case 5:
+ _loc3_ = "FFD700";
+ break;
+ default:
+ _loc3_ = "FFD700";
+ }
+ this.nameText.setTitleName("" + this.level + "级礼包");
+ }
+
+ private function rollOut(param1:MouseEvent) : void
+ {
+ if(!this.selectStatus)
+ {
+ this.border.visible = false;
+ }
+ }
+
+ private function rollOver(param1:MouseEvent) : void
+ {
+ if(!this.selectStatus)
+ {
+ this.border.visible = true;
+ }
+ }
+
+ public function setSelect(param1:Boolean) : void
+ {
+ this.selectStatus = param1;
+ this.border.visible = this.selectStatus;
+ }
+
+ public function setHasGet() : void
+ {
+ this.yiling.visible = true;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/gift/LevelAwardUI.as b/flash_decompiled/com/view/ui/activity/gift/LevelAwardUI.as
new file mode 100644
index 0000000..d7ebf76
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/gift/LevelAwardUI.as
@@ -0,0 +1,372 @@
+package com.view.ui.activity.gift
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.newui.UIBigButton;
+ import com.view.newui.UIBorderMc;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UINums;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.res.GameUIRes;
+ import com.view.ui.activity.ActivityBase;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.Bitmap;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class LevelAwardUI extends ActivityBase
+ {
+
+ private var scrollPane:ScrollPane;
+
+ private var scrollMc:Sprite;
+
+ private var maskMc:Sprite;
+
+ private var jilibao:Bitmap;
+
+ private var levelBar:MovieClip;
+
+ private var itemText:TextField;
+
+ private var giftVec:Vector.;
+
+ private var getBtn:UIBigButton;
+
+ private var hasGetBtn:UIBigButton;
+
+ private var bg2:UIWindowBg;
+
+ private var itemBoxVec:Vector. = new Vector.();
+
+ private var levelNum:UINums;
+
+ private var preItem:LevelAwardItem;
+
+ public function LevelAwardUI()
+ {
+ super();
+ loadRes(GameUIRes.swfUrl_1);
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w + 32;
+ window_heihgt = UIWindowBg.normal_window_h - 49;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640 + 32;
+ ui_closeBtn.y = 10;
+ }
+
+ override public function createUI() : void
+ {
+ var _loc3_:Sprite = null;
+ var _loc8_:NewItemMc = null;
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_dengjilibao);
+ super.setPosition();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630 + 32,400 - 49);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ this.bg2 = new UIWindowBg();
+ this.bg2.initThirdPanel(620 + 32,200);
+ _loc1_.addChild(this.bg2);
+ this.bg2.x = 5;
+ this.bg2.y = 5;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(660,208);
+ this.scrollPane.verticalScrollPolicy = ScrollPolicy.OFF;
+ this.bg2.addChild(this.scrollPane);
+ this.scrollMc = new Sprite();
+ this.scrollPane.source = this.scrollMc;
+ var _loc2_:Sprite = gameRes.getSprite("table_bg",gameRes.getApplication(swfUrl));
+ this.scrollMc.addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc3_ = gameRes.getMovieClip("mc_bar_bg",gameRes.getApplication(swfUrl));
+ this.scrollMc.addChild(_loc3_);
+ _loc3_.x = 13;
+ _loc3_.y = 40;
+ this.levelBar = gameRes.getMovieClip("mc_bar",gameRes.getApplication(swfUrl));
+ this.scrollMc.addChild(this.levelBar);
+ this.levelBar.x = 13;
+ this.levelBar.y = 40;
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initThirdPanel(652,126);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = 5;
+ _loc4_.y = this.bg2.y + this.bg2.height + 4;
+ var _loc5_:UIBorderMc = new UIBorderMc(652 - 71);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = 0;
+ _loc5_.y = 1;
+ this.jilibao = new Bitmap(gameRes.getPng("ji_li_bao",gameRes.getApplication(swfUrl)));
+ _loc5_.addChild(this.jilibao);
+ this.jilibao.x = 325;
+ this.jilibao.y = 6;
+ this.levelNum = new UINums(18);
+ _loc5_.addChild(this.levelNum);
+ this.levelNum.x = 275;
+ this.levelNum.y = 6;
+ this.getBtn = new UIBigButton(3);
+ _loc4_.addChild(this.getBtn);
+ this.getBtn.x = 533;
+ this.getBtn.y = 62;
+ this.hasGetBtn = new UIBigButton(4);
+ _loc4_.addChild(this.hasGetBtn);
+ this.hasGetBtn.x = 533;
+ this.hasGetBtn.y = 62;
+ this.hasGetBtn.setUnEnable();
+ this.hasGetBtn.visible = false;
+ this.giftVec = new Vector.();
+ var _loc6_:int = 0;
+ while(_loc6_ <= 9)
+ {
+ _loc8_ = new NewItemMc(1);
+ _loc4_.addChild(_loc8_);
+ _loc8_.x = 20 + 50 * _loc6_;
+ _loc8_.y = 60;
+ this.giftVec.push(_loc8_);
+ _loc6_++;
+ }
+ this.getBtn.onClick = this.getGiftByLevel;
+ this.getConfigDate();
+ Utils.g_events.addEventListener(DevEvent.EVENT_LEVELCONFIG,this.getConfigDateRes);
+ var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,450);
+ _loc4_.addChild(_loc7_);
+ _loc7_.x = 20;
+ _loc7_.y = 110;
+ _loc7_.text = "提示:君主等级达到一定级别即可领取对应奖励,等级越高,奖励越丰厚。";
+ Utils.g_events.addEventListener(DevEvent.EVENT_USERACTIVITY,this.checkHasGetGift);
+ }
+
+ private function setButtonStatus() : void
+ {
+ var _loc3_:int = 0;
+ if(this.preItem == null)
+ {
+ return;
+ }
+ var _loc1_:Object = this.preItem.getObj();
+ var _loc2_:int = int(_loc1_.level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.getBtn.visible = false;
+ this.hasGetBtn.visible = true;
+ this.preItem.setHasGet();
+ }
+ else
+ {
+ this.getBtn.visible = true;
+ this.hasGetBtn.visible = false;
+ _loc3_ = NewUserData.getUser().rankId;
+ if(_loc3_ >= _loc2_)
+ {
+ this.getBtn.setEnable();
+ }
+ else
+ {
+ this.getBtn.setUnEnable();
+ }
+ }
+ }
+
+ private function checkHasGetGift(param1:DevEvent) : void
+ {
+ this.setBarLength();
+ this.setButtonStatus();
+ this.setBoxStatus();
+ }
+
+ private function setBoxStatus() : void
+ {
+ var _loc1_:LevelAwardItem = null;
+ for each(_loc1_ in this.itemBoxVec)
+ {
+ if(LevelAwardDate.checkLevelGift(_loc1_.level))
+ {
+ _loc1_.setHasGet();
+ }
+ }
+ }
+
+ private function setBarLength() : void
+ {
+ var _loc1_:Array = LevelAwardDate.getConfigData();
+ _loc1_.sortOn("level",Array.NUMERIC);
+ var _loc2_:int = int(_loc1_[9].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -43;
+ return;
+ }
+ _loc2_ = int(_loc1_[8].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -155;
+ return;
+ }
+ _loc2_ = int(_loc1_[7].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -267;
+ return;
+ }
+ _loc2_ = int(_loc1_[6].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -379;
+ return;
+ }
+ _loc2_ = int(_loc1_[5].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -491;
+ return;
+ }
+ _loc2_ = int(_loc1_[4].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -603;
+ return;
+ }
+ _loc2_ = int(_loc1_[3].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -715;
+ return;
+ }
+ _loc2_ = int(_loc1_[2].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -827;
+ return;
+ }
+ _loc2_ = int(_loc1_[1].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -939;
+ return;
+ }
+ _loc2_ = int(_loc1_[0].level);
+ if(LevelAwardDate.checkLevelGift(_loc2_))
+ {
+ this.maskMc.x = -1051;
+ return;
+ }
+ }
+
+ private function getConfigDate() : void
+ {
+ ConnectService.getInstance().activityService.getLevelConfig();
+ }
+
+ private function getConfigDateRes(param1:DevEvent) : void
+ {
+ var _loc6_:LevelAwardItem = null;
+ var _loc2_:Array = LevelAwardDate.getConfigData();
+ _loc2_.sortOn("level",Array.NUMERIC);
+ var _loc3_:int = 0;
+ while(_loc3_ < _loc2_.length)
+ {
+ if(_loc3_ <= 9)
+ {
+ _loc6_ = new LevelAwardItem(_loc3_);
+ _loc6_.setData(_loc2_[_loc3_]);
+ this.scrollMc.addChild(_loc6_);
+ _loc6_.x = 111 * _loc3_;
+ this.itemBoxVec.push(_loc6_);
+ _loc6_.addEventListener(MouseEvent.CLICK,this.clickLevelItem);
+ if(_loc3_ == 0)
+ {
+ _loc6_.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
+ }
+ }
+ _loc3_++;
+ }
+ var _loc4_:int = this.scrollMc.width;
+ var _loc5_:Sprite = PublicMethod.createShape(16777215,20,10);
+ this.scrollMc.addChild(_loc5_);
+ _loc5_.x = _loc4_;
+ _loc5_.alpha = 0;
+ this.scrollPane.update();
+ this.maskMc = PublicMethod.createShape(16777215,1090,20);
+ this.levelBar.addChild(this.maskMc);
+ this.levelBar.mask = this.maskMc;
+ this.maskMc.x = -1051;
+ this.getLevelGift();
+ }
+
+ private function getLevelGift() : void
+ {
+ this.checkHasGetGift(null);
+ }
+
+ private function clickLevelItem(param1:MouseEvent) : void
+ {
+ var _loc3_:Object = null;
+ var _loc2_:LevelAwardItem = param1.currentTarget as LevelAwardItem;
+ if(_loc2_ == this.preItem)
+ {
+ return;
+ }
+ if(this.preItem)
+ {
+ this.preItem.setSelect(false);
+ }
+ this.preItem = _loc2_;
+ this.preItem.setSelect(true);
+ _loc3_ = this.preItem.getObj();
+ var _loc4_:int = int(_loc3_.level);
+ this.levelNum.showNum(_loc4_);
+ if(_loc4_ >= 1000)
+ {
+ this.jilibao.x = 345;
+ }
+ else
+ {
+ this.jilibao.x = 325;
+ }
+ var _loc5_:Array = _loc3_.list;
+ var _loc6_:String = "";
+ var _loc7_:int = 0;
+ var _loc8_:int = 0;
+ while(_loc8_ < 10)
+ {
+ _loc3_ = _loc5_[_loc8_];
+ if(_loc3_)
+ {
+ this.giftVec[_loc8_].setObj(_loc3_);
+ this.giftVec[_loc8_].loadTip(_loc3_);
+ this.giftVec[_loc8_].visible = true;
+ }
+ else
+ {
+ this.giftVec[_loc8_].visible = false;
+ }
+ _loc8_++;
+ }
+ this.setButtonStatus();
+ }
+
+ private function getGiftByLevel(param1:MouseEvent) : void
+ {
+ var _loc2_:Object = this.preItem.getObj();
+ var _loc3_:int = int(_loc2_.level);
+ ConnectService.getInstance().activityService.getGiftByLevel(_loc3_);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/gift/NewItemMc.as b/flash_decompiled/com/view/ui/activity/gift/NewItemMc.as
new file mode 100644
index 0000000..75c2dc7
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/gift/NewItemMc.as
@@ -0,0 +1,134 @@
+package com.view.ui.activity.gift
+{
+ import com.InstallFace;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.cache.ImgCache;
+ import com.view.newui.UIConfig;
+ import com.view.tip.ItemTip;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class NewItemMc extends Sprite
+ {
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var type:int;
+
+ private var itemNumsText:TextField;
+
+ private var level1Bg:Sprite;
+
+ private var itemsTip:ItemTip;
+
+ private var loader:LoadResource;
+
+ private var itemPng:Bitmap;
+
+ private var itemSp:Sprite;
+
+ public function NewItemMc(param1:int)
+ {
+ super();
+ this.type = param1;
+ var _loc2_:int = 30;
+ if(this.type == 1)
+ {
+ _loc2_ = 20;
+ }
+ else
+ {
+ _loc2_ = 30;
+ }
+ this.level1Bg = new Scale9Grid(this.face.getSprite(UIConfig.boxItem),_loc2_,_loc2_);
+ addChild(this.level1Bg);
+ this.itemPng = new Bitmap();
+ this.level1Bg.addChild(this.itemPng);
+ this.itemPng.x = 2;
+ this.itemPng.y = 2;
+ this.itemNumsText = PublicMethod.getTextFieldWithFillter(16777215,37);
+ addChild(this.itemNumsText);
+ this.itemNumsText.y = 21;
+ var _loc3_:TextFormat = PublicMethod.getRightTextFormat();
+ this.itemNumsText.defaultTextFormat = _loc3_;
+ }
+
+ public function setObj(param1:Object) : void
+ {
+ var _loc2_:String = ServerConfig.IMAGE_EQUIP_URL + "" + param1.iconPath;
+ this.loadImg(_loc2_);
+ if(param1.itemNums > 0)
+ {
+ if(param1.itemNums > 10000)
+ {
+ this.itemNumsText.text = PublicMethod.getStr2(param1.itemNums);
+ }
+ else
+ {
+ this.itemNumsText.text = "" + param1.itemNums;
+ }
+ }
+ else
+ {
+ this.itemNumsText.text = "";
+ }
+ }
+
+ public function loadTip(param1:Object) : void
+ {
+ if(this.itemsTip == null)
+ {
+ this.itemsTip = new ItemTip(this.level1Bg,this.face.stage,this.face.tip_bg,param1);
+ }
+ else
+ {
+ this.itemsTip.setTipData(param1);
+ }
+ }
+
+ private function loadImg(param1:String) : void
+ {
+ if(ImgCache.getInstance().getImg(param1))
+ {
+ this.itemPng.bitmapData = ImgCache.getInstance().getImg(param1).bitmapData.clone();
+ this.setImgValue();
+ }
+ else
+ {
+ this.loader = new LoadResource(param1,this.loadBack);
+ }
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ this.itemPng.bitmapData = Bitmap(param1.target.loader.content).bitmapData;
+ this.loader.clear();
+ this.setImgValue();
+ }
+
+ private function setImgValue() : void
+ {
+ if(this.type == 1)
+ {
+ this.itemPng.width = 34;
+ this.itemPng.height = 34;
+ }
+ }
+
+ public function destroyTip() : void
+ {
+ if(this.itemsTip)
+ {
+ this.itemsTip.destroyTip();
+ }
+ removeChild(this.level1Bg);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/mc/UserBoxMc.as b/flash_decompiled/com/view/ui/activity/mc/UserBoxMc.as
new file mode 100644
index 0000000..1a2bfd9
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/mc/UserBoxMc.as
@@ -0,0 +1,147 @@
+package com.view.ui.activity.mc
+{
+ import com.comfig.ClassConfig;
+ import com.control.ConnectService;
+ import com.view.newui.UIBase;
+ import flash.display.Bitmap;
+ import flash.events.MouseEvent;
+
+ public class UserBoxMc extends UIBase
+ {
+
+ private var bg1:Bitmap;
+
+ private var bg2:Bitmap;
+
+ private var num:int;
+
+ private var boxPng:Bitmap;
+
+ private var getPng:Bitmap;
+
+ private var numPng1:Bitmap;
+
+ private var numPng2:Bitmap;
+
+ private var numPng3:Bitmap;
+
+ private var point:int;
+
+ private var status:int;
+
+ public function UserBoxMc(param1:int)
+ {
+ super();
+ this.num = param1;
+ this.bg1 = new Bitmap(face.getPng(ClassConfig.item_bg),"auto",true);
+ addChild(this.bg1);
+ this.bg1.width = 60;
+ this.bg1.height = 60;
+ this.bg2 = new Bitmap(face.getPng(ClassConfig.item_hover),"auto",true);
+ addChild(this.bg2);
+ this.bg2.width = 66;
+ this.bg2.height = 66;
+ this.bg2.x = -3;
+ this.bg2.y = -3;
+ this.bg2.visible = false;
+ this.boxPng = new Bitmap(face.getPng(ClassConfig.lib_add_box),"auto",true);
+ addChild(this.boxPng);
+ this.boxPng.width = 50;
+ this.boxPng.height = 50;
+ this.boxPng.x = 5;
+ this.boxPng.y = 5;
+ this.numPng1 = new Bitmap(face.getPng(ClassConfig.libadd_num1),"auto",true);
+ addChild(this.numPng1);
+ this.numPng1.width = 60;
+ this.numPng1.height = 60;
+ this.numPng2 = new Bitmap(face.getPng(ClassConfig.libadd_num2),"auto",true);
+ addChild(this.numPng2);
+ this.numPng2.width = 60;
+ this.numPng2.height = 60;
+ this.numPng3 = new Bitmap(face.getPng(ClassConfig.libadd_num3),"auto",true);
+ addChild(this.numPng3);
+ this.numPng3.width = 60;
+ this.numPng3.height = 60;
+ this.numPng1.visible = false;
+ this.numPng2.visible = false;
+ this.numPng3.visible = false;
+ this.getPng = new Bitmap(face.getPng(ClassConfig.lib_add_get),"auto",true);
+ addChild(this.getPng);
+ this.getPng.width = 60;
+ this.getPng.height = 60;
+ addEventListener(MouseEvent.ROLL_OVER,this.mouseOver);
+ addEventListener(MouseEvent.ROLL_OUT,this.mouseOut);
+ addEventListener(MouseEvent.CLICK,this.mouseClick);
+ }
+
+ public function setPointNum(param1:int) : void
+ {
+ this.point = param1;
+ }
+
+ private function mouseOver(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.bg2.visible = true;
+ }
+ }
+
+ private function mouseOut(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.bg2.visible = false;
+ }
+ }
+
+ private function mouseClick(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().playService.openLuckBox(this.num);
+ }
+ }
+
+ public function setOpenBoxIds(param1:Array) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Boolean = false;
+ for each(_loc3_ in param1)
+ {
+ if(_loc3_ == this.num)
+ {
+ _loc2_ = true;
+ break;
+ }
+ }
+ if(_loc2_)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.numPng1.visible = false;
+ this.numPng2.visible = false;
+ this.numPng3.visible = false;
+ if(this.status == 1)
+ {
+ this.getPng.visible = false;
+ this.buttonMode = true;
+ }
+ else
+ {
+ this.getPng.visible = true;
+ this.bg2.visible = false;
+ this.buttonMode = false;
+ if(this.point > 0)
+ {
+ this["numPng" + this.point].visible = true;
+ }
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/warshop/BuyCoinUI.as b/flash_decompiled/com/view/ui/activity/warshop/BuyCoinUI.as
new file mode 100644
index 0000000..c2a7b94
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/warshop/BuyCoinUI.as
@@ -0,0 +1,177 @@
+package com.view.ui.activity.warshop
+{
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.control.ConnectService;
+ import com.control.user.event.UserEvent;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UINumInputText;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.display.Bitmap;
+ import flash.display.BitmapData;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class BuyCoinUI extends UIWindowBg
+ {
+
+ private var itemsImg:Bitmap;
+
+ private var num_txt:UINumInputText;
+
+ private var itemImgSp:Sprite;
+
+ private var desc_txt:TextField;
+
+ private var sum_txt:UINumInputText;
+
+ private var currValue:TextField;
+
+ private var buyBtn:UIButton;
+
+ private var realPrice:int;
+
+ private var itemObj:Object;
+
+ private var currPoint:int;
+
+ public function BuyCoinUI()
+ {
+ var _loc3_:TextField = null;
+ var _loc4_:TextField = null;
+ super();
+ initSize(125,200);
+ loadTitle(UITitleConfig.title_goumailibao);
+ addCloseBtn();
+ initBg();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initThirdPanel(300,166);
+ bg1.addChild(_loc1_);
+ _loc1_.x = 10;
+ _loc1_.y = 10;
+ this.itemImgSp = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49);
+ _loc1_.addChild(this.itemImgSp);
+ this.itemImgSp.x = 20;
+ this.itemImgSp.y = 20;
+ this.itemsImg = new Bitmap();
+ this.itemImgSp.addChild(this.itemsImg);
+ this.itemsImg.x = 3;
+ this.itemsImg.y = 3;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(190,60);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = this.itemImgSp.x + this.itemImgSp.width + 10;
+ _loc2_.y = this.itemImgSp.y;
+ this.desc_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,_loc2_.width - 5);
+ this.desc_txt.wordWrap = true;
+ this.desc_txt.multiline = true;
+ this.desc_txt.height = 60;
+ _loc2_.addChild(this.desc_txt);
+ this.desc_txt.x = 3;
+ this.desc_txt.y = 3;
+ _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65);
+ _loc3_.text = "购买数量:";
+ _loc1_.addChild(_loc3_);
+ _loc3_.x = 60;
+ _loc3_.y = 100;
+ this.num_txt = new UINumInputText(90);
+ _loc1_.addChild(this.num_txt);
+ this.num_txt.x = _loc3_.x + _loc3_.width;
+ this.num_txt.y = _loc3_.y - 3;
+ this.num_txt.setInputEvent(this.changeNum);
+ this.num_txt.setMaxChars(5);
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65);
+ _loc4_.text = "所需金币:";
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc3_.x;
+ _loc4_.y = _loc3_.y + 25;
+ this.sum_txt = new UINumInputText(90);
+ _loc1_.addChild(this.sum_txt);
+ this.sum_txt.x = this.num_txt.x;
+ this.sum_txt.y = _loc4_.y - 3;
+ this.sum_txt.hiddenBtn();
+ this.sum_txt.readOnly();
+ this.sum_txt.setMaxChars(10);
+ var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65);
+ _loc5_.text = "当前拥有:";
+ _loc1_.addChild(_loc5_);
+ _loc5_.x = _loc3_.x;
+ _loc5_.y = _loc4_.y + 25;
+ this.currValue = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100);
+ _loc1_.addChild(this.currValue);
+ this.currValue.x = this.num_txt.x;
+ this.currValue.y = _loc5_.y;
+ this.buyBtn = new UIButton("确 定",2,10);
+ var _loc6_:UIButton = new UIButton("取 消",2,10);
+ bg1.addChild(this.buyBtn);
+ this.buyBtn.x = 180;
+ this.buyBtn.y = 198;
+ bg1.addChild(_loc6_);
+ _loc6_.x = this.buyBtn.x + this.buyBtn.width + 10;
+ _loc6_.y = this.buyBtn.y;
+ _loc6_.onClick = closeSelf;
+ this.buyBtn.onClick = this.buyItem;
+ ConnectService.getInstance().addEventListener(UserEvent.USER_exchangeCoinShop,this.buyItemsResult);
+ }
+
+ public function setData(param1:Object, param2:BitmapData) : void
+ {
+ if(param1 == null)
+ {
+ return;
+ }
+ this.itemObj = param1;
+ if(param2)
+ {
+ this.itemsImg.bitmapData = param2;
+ this.itemsImg.width = 53;
+ this.itemsImg.height = 53;
+ }
+ this.num_txt.setTextNum(1);
+ this.realPrice = int(param1.value.price);
+ this.desc_txt.text = param1.itemDesc;
+ this.sum_txt.setTextNum(param1.value.price);
+ }
+
+ public function setCurrPoint(param1:int) : void
+ {
+ this.currPoint = param1;
+ this.currValue.text = this.currPoint.toString();
+ }
+
+ private function changeNum() : void
+ {
+ var _loc1_:int = this.num_txt.getTextNum();
+ this.sum_txt.setTextNum(this.realPrice * _loc1_);
+ }
+
+ private function buyItem(param1:MouseEvent) : void
+ {
+ if(this.itemObj == null)
+ {
+ return;
+ }
+ var _loc2_:int = this.num_txt.getTextNum();
+ if(_loc2_ < 1)
+ {
+ return;
+ }
+ if(_loc2_ * this.realPrice > this.currPoint)
+ {
+ MessageBoxUI.getInstance().addMessage("金币不够");
+ return;
+ }
+ ConnectService.getInstance().userService.exchangeCoinGift(this.itemObj.value.id,_loc2_);
+ }
+
+ private function buyItemsResult(param1:UserEvent) : void
+ {
+ closeSelf(null);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/warshop/CoinLogMc.as b/flash_decompiled/com/view/ui/activity/warshop/CoinLogMc.as
new file mode 100644
index 0000000..5224cd4
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/warshop/CoinLogMc.as
@@ -0,0 +1,99 @@
+package com.view.ui.activity.warshop
+{
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class CoinLogMc extends Sprite
+ {
+
+ private var bg1:Sprite;
+
+ private var bg2:Sprite;
+
+ private var value1:TextField;
+
+ private var value2:TextField;
+
+ private var value3:TextField;
+
+ private var value4:TextField;
+
+ private var value5:TextField;
+
+ private var obj:Object;
+
+ public function CoinLogMc()
+ {
+ super();
+ this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,630,25);
+ this.bg1.alpha = 0.2;
+ addChild(this.bg1);
+ this.bg1.visible = false;
+ this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,630,25);
+ this.bg2.alpha = 0.3;
+ addChild(this.bg2);
+ this.bg2.visible = false;
+ addEventListener(MouseEvent.ROLL_OUT,this.mouseOut);
+ addEventListener(MouseEvent.ROLL_OVER,this.mouseOver);
+ this.value1 = PublicMethod.getTextFieldWithFillter(16777215,40);
+ this.value2 = PublicMethod.getTextFieldWithFillter(16777215,60);
+ this.value3 = PublicMethod.getTextFieldWithFillter(16777215,330);
+ this.value4 = PublicMethod.getTextFieldWithFillter(16777215,46);
+ this.value5 = PublicMethod.getTextFieldWithFillter(16777215,116);
+ addChild(this.value1);
+ addChild(this.value2);
+ addChild(this.value3);
+ addChild(this.value4);
+ addChild(this.value5);
+ this.value1.x = 10;
+ this.value1.y = 2;
+ this.value2.x = this.value1.x + this.value1.width + 1;
+ this.value2.y = this.value1.y;
+ this.value3.x = this.value2.x + this.value2.width + 10;
+ this.value3.y = this.value1.y;
+ this.value4.x = this.value3.x + this.value3.width + 15;
+ this.value4.y = this.value1.y;
+ this.value5.x = this.value4.x + this.value4.width + 5;
+ this.value5.y = this.value1.y;
+ }
+
+ private function mouseOut(param1:MouseEvent) : void
+ {
+ if(this.obj)
+ {
+ this.bg1.visible = false;
+ }
+ }
+
+ private function mouseOver(param1:MouseEvent) : void
+ {
+ if(this.obj)
+ {
+ this.bg1.visible = true;
+ }
+ }
+
+ public function setDate(param1:Object) : void
+ {
+ if(param1 == null)
+ {
+ this.value1.text = "";
+ this.value2.text = "";
+ this.value3.text = "";
+ this.value4.text = "";
+ this.value5.text = "";
+ return;
+ }
+ this.obj = param1;
+ this.value1.text = param1.rankId.toString();
+ this.value2.text = param1.type;
+ this.value3.text = this.obj.mess;
+ this.value4.text = this.obj.coin.toString();
+ this.value5.text = this.obj.date;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/warshop/WarShopPage1.as b/flash_decompiled/com/view/ui/activity/warshop/WarShopPage1.as
new file mode 100644
index 0000000..198bbdc
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/warshop/WarShopPage1.as
@@ -0,0 +1,156 @@
+package com.view.ui.activity.warshop
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.user.event.UserEvent;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUser;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.newui.UIBase;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.activity.ActivityMc;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.BitmapData;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class WarShopPage1 extends UIBase
+ {
+
+ private var bg:UIWindowBg;
+
+ private var label1:TextField;
+
+ private var shopListMc:Sprite;
+
+ private var shopScroll:ScrollPane;
+
+ private var shopList:Vector.;
+
+ private var pointCount:TextField;
+
+ private var list:Array;
+
+ private var currPoint:int;
+
+ private var buyPresItemUI:BuyCoinUI;
+
+ public function WarShopPage1()
+ {
+ var _loc2_:int = 0;
+ var _loc4_:ActivityMc = null;
+ super();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,394);
+ addChild(_loc1_);
+ this.label1 = PublicMethod.getTextFieldWithFillter(65280,600);
+ _loc1_.addChild(this.label1);
+ this.label1.text = "金币获得途径:可通过流放等途径获得金币";
+ this.label1.x = 15;
+ this.label1.y = 8;
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(623,330);
+ _loc1_.addChild(this.bg);
+ this.bg.x = 4;
+ this.bg.y = 32;
+ this.pointCount = PublicMethod.getTextFieldWithFillter(16776960,600);
+ _loc1_.addChild(this.pointCount);
+ this.pointCount.text = "当前拥有金币:0";
+ this.pointCount.x = 15;
+ this.pointCount.y = this.bg.y + this.bg.height + 10;
+ this.shopScroll = new ScrollPane();
+ this.shopScroll.setSize(630,336);
+ this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.bg.addChild(this.shopScroll);
+ this.shopScroll.x = 2;
+ this.shopScroll.y = 2;
+ this.shopListMc = new Sprite();
+ this.shopScroll.source = this.shopListMc;
+ this.shopList = new Vector.();
+ _loc2_ = 0;
+ while(_loc2_ < 9)
+ {
+ _loc4_ = new ActivityMc();
+ _loc4_.func = this.buyPresItems;
+ this.shopList.push(_loc4_);
+ this.shopListMc.addChild(_loc4_);
+ _loc4_.x = 208 * (_loc2_ % 3);
+ _loc4_.y = 113 * int(_loc2_ / 3);
+ _loc2_++;
+ }
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(16711680,300);
+ _loc3_.text = "";
+ _loc3_.x = 330;
+ _loc3_.y = this.pointCount.y;
+ _loc1_.addChild(_loc3_);
+ Utils.g_events.addEventListener(DevEvent.USERCHANGE,this.userChange);
+ ConnectService.getInstance().userService.getCoinShopListView();
+ ConnectService.getInstance().addEventListener(UserEvent.USER_getCoinShopView,this.initSucc);
+ this.getUser();
+ }
+
+ private function userChange(param1:DevEvent) : void
+ {
+ this.getUser();
+ }
+
+ private function getUser() : void
+ {
+ var _loc1_:NewUser = NewUserData.getUser();
+ this.pointCount.text = "当前拥有金币:" + _loc1_.coinPoint;
+ this.currPoint = _loc1_.coinPoint;
+ }
+
+ private function initSucc(param1:UserEvent) : void
+ {
+ this.list = param1.list;
+ this.initList();
+ }
+
+ private function initList() : void
+ {
+ var _loc2_:* = undefined;
+ var _loc3_:ActivityMc = null;
+ var _loc1_:int = 0;
+ for(_loc2_ in this.list)
+ {
+ if(_loc1_ > 8)
+ {
+ _loc3_ = new ActivityMc();
+ _loc3_.func = this.buyPresItems;
+ this.shopList.push(_loc3_);
+ this.shopListMc.addChild(_loc3_);
+ _loc3_.x = 208 * (_loc1_ % 3);
+ _loc3_.y = 113 * int(_loc1_ / 3);
+ }
+ this.shopList[_loc1_].setData(this.list[_loc1_]);
+ _loc1_++;
+ }
+ this.shopScroll.update();
+ }
+
+ public function buyPresItems(param1:Object, param2:BitmapData) : void
+ {
+ if(this.buyPresItemUI == null)
+ {
+ this.buyPresItemUI = new BuyCoinUI();
+ this.buyPresItemUI.x = int(width / 2 - this.buyPresItemUI.width / 2);
+ this.buyPresItemUI.y = int(height / 2 - this.buyPresItemUI.height / 2);
+ }
+ if(!contains(this.buyPresItemUI))
+ {
+ addChild(this.buyPresItemUI);
+ }
+ this.buyPresItemUI.setData(param1,param2);
+ this.buyPresItemUI.setCurrPoint(this.currPoint);
+ }
+
+ private function chongzhi(param1:MouseEvent) : void
+ {
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/warshop/WarShopPage2.as b/flash_decompiled/com/view/ui/activity/warshop/WarShopPage2.as
new file mode 100644
index 0000000..9922136
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/warshop/WarShopPage2.as
@@ -0,0 +1,44 @@
+package com.view.ui.activity.warshop
+{
+ import com.control.ConnectService;
+ import com.control.user.event.UserEvent;
+ import com.utils.Utils;
+ import com.view.mc.sprite.TextBar;
+ import com.view.newui.UIBase;
+ import com.view.newui.UIWindowBg;
+
+ public class WarShopPage2 extends UIBase
+ {
+
+ private var bg:UIWindowBg;
+
+ private var textBar:TextBar;
+
+ public function WarShopPage2()
+ {
+ super();
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(630,394);
+ addChild(this.bg);
+ this.textBar = new TextBar();
+ this.textBar.createTextField(600,390);
+ this.bg.addChild(this.textBar);
+ this.textBar.x = 10;
+ this.textBar.y = 10;
+ Utils.g_events.addEventListener(UserEvent.USER_userCoinContent,this.getContentResult);
+ this.list();
+ }
+
+ private function list() : void
+ {
+ ConnectService.getInstance().userService.getCoinShopContent();
+ }
+
+ private function getContentResult(param1:UserEvent) : void
+ {
+ var _loc2_:String = String(param1.userObject);
+ this.textBar.traceMsg(_loc2_);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/warshop/WarShopPage3.as b/flash_decompiled/com/view/ui/activity/warshop/WarShopPage3.as
new file mode 100644
index 0000000..0cdb49b
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/warshop/WarShopPage3.as
@@ -0,0 +1,178 @@
+package com.view.ui.activity.warshop
+{
+ import com.control.ConnectService;
+ import com.control.user.event.UserEvent;
+ import com.utils.HashMap;
+ import com.utils.Utils;
+ import com.view.newui.UIBase;
+ import com.view.newui.UIPageMc;
+ import com.view.newui.UITable;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.message.MessageBoxUI;
+
+ public class WarShopPage3 extends UIBase
+ {
+
+ private var bg:UIWindowBg;
+
+ private var tableMc:UITable;
+
+ private var pageMc:UIPageMc;
+
+ private var userListVec:Vector.;
+
+ private var logList:HashMap;
+
+ private var index:int = 1;
+
+ private const listNum:int = 14;
+
+ public function WarShopPage3()
+ {
+ var _loc4_:CoinLogMc = null;
+ super();
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(630,394);
+ addChild(this.bg);
+ var _loc1_:Array = ["序号","类型","说明","获得金币","日期"];
+ var _loc2_:Array = [46,70,333,60,130];
+ this.tableMc = new UITable();
+ this.tableMc.drawLine = true;
+ this.tableMc.lineHeight = 25;
+ this.tableMc.install(14,_loc1_,_loc2_);
+ this.bg.addChild(this.tableMc);
+ this.tableMc.x = 2;
+ this.tableMc.y = 2;
+ this.userListVec = new Vector.();
+ var _loc3_:int = 0;
+ while(_loc3_ < 14)
+ {
+ _loc4_ = new CoinLogMc();
+ this.tableMc.addChild(_loc4_);
+ this.userListVec.push(_loc4_);
+ _loc4_.y = 26 + _loc3_ * 25;
+ _loc4_.x = 2;
+ _loc3_++;
+ }
+ this.pageMc = new UIPageMc();
+ this.bg.addChild(this.pageMc);
+ this.pageMc.x = 290;
+ this.pageMc.y = this.tableMc.y + this.tableMc.height + 4;
+ this.pageMc.preFunc = this.prePage;
+ this.pageMc.nextFunc = this.nextPage;
+ Utils.g_events.addEventListener(UserEvent.USER_userCoinLog,this.getLogListResult);
+ this.list();
+ }
+
+ private function list() : void
+ {
+ ConnectService.getInstance().userService.getUserCoinLogList();
+ }
+
+ public function nextPage() : void
+ {
+ this.updateList(2);
+ }
+
+ public function prePage() : void
+ {
+ this.updateList(1);
+ }
+
+ private function getLogListResult(param1:UserEvent) : void
+ {
+ this.logList = new HashMap();
+ var _loc2_:Object = null;
+ var _loc3_:int = 0;
+ while(_loc3_ < param1.list.length)
+ {
+ if(param1.list[_loc3_])
+ {
+ _loc2_ = new Object();
+ _loc2_.mess = param1.list[_loc3_].mess;
+ _loc2_.type = param1.list[_loc3_].type;
+ _loc2_.date = param1.list[_loc3_].date;
+ _loc2_.coin = param1.list[_loc3_].coin;
+ _loc2_.rankId = _loc3_ + 1;
+ this.logList.put(_loc3_ + 1,_loc2_);
+ }
+ _loc3_++;
+ }
+ if(this.logList.size() > 0)
+ {
+ this.showList();
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("没有符合要求的数据!");
+ this.index = 1;
+ this.pageMc.setPageCount(1);
+ this.pageMc.setPage(1);
+ }
+ }
+
+ public function getItem(param1:int) : Object
+ {
+ return this.logList.getValue(param1);
+ }
+
+ private function showList() : void
+ {
+ var _loc2_:* = undefined;
+ var _loc3_:Object = null;
+ if(this.logList.size() == 0)
+ {
+ this.pageMc.setPageCount(1);
+ this.pageMc.setPage(1);
+ }
+ else
+ {
+ this.pageMc.setPageCount(Math.ceil(this.logList.size() / this.listNum));
+ this.pageMc.setPage(this.index / this.listNum + 1 >> 0);
+ }
+ var _loc1_:int = this.pageMc.getCurrPage();
+ for(_loc2_ in this.userListVec)
+ {
+ _loc3_ = this.logList.getValue(this.index + _loc2_);
+ if(_loc3_)
+ {
+ this.userListVec[_loc2_].setDate(_loc3_);
+ }
+ else
+ {
+ this.userListVec[_loc2_].setDate(null);
+ }
+ }
+ }
+
+ private function updateList(param1:int) : void
+ {
+ switch(param1)
+ {
+ case 0:
+ this.index = 1;
+ break;
+ case 1:
+ this.index -= this.listNum;
+ if(this.index < 0)
+ {
+ this.index = 1;
+ return;
+ }
+ break;
+ case 2:
+ this.index += this.listNum;
+ if(this.index > this.logList.size())
+ {
+ this.index = this.logList.size() - this.listNum;
+ return;
+ }
+ break;
+ case 3:
+ this.index = (Math.ceil(this.logList.size() / this.listNum) - 1) * 10 + 1;
+ }
+ this.showList();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/warshop/WarShopUI.as b/flash_decompiled/com/view/ui/activity/warshop/WarShopUI.as
new file mode 100644
index 0000000..6c57f2b
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/warshop/WarShopUI.as
@@ -0,0 +1,143 @@
+package com.view.ui.activity.warshop
+{
+ import com.view.newui.UITabBtn;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class WarShopUI extends BaseUI
+ {
+
+ private static var instance:WarShopUI;
+
+ private var bg:UIWindowBg;
+
+ public var btnArr:Array;
+
+ private var paneBg:Sprite;
+
+ private var page1:WarShopPage1;
+
+ private var page2:WarShopPage2;
+
+ private var page3:WarShopPage3;
+
+ private var prePage:Sprite;
+
+ private var preBtn:UITabBtn;
+
+ public function WarShopUI()
+ {
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_coinshop);
+ super.setPosition();
+ this.createUI();
+ }
+
+ public static function getInstance() : WarShopUI
+ {
+ if(instance == null)
+ {
+ instance = new WarShopUI();
+ }
+ return instance;
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w;
+ window_heihgt = UIWindowBg.normal_window_h + 20;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640;
+ ui_closeBtn.y = 10;
+ }
+
+ override public function createUI() : void
+ {
+ var _loc4_:int = 0;
+ var _loc5_:UITabBtn = null;
+ this.btnArr = new Array();
+ var _loc1_:UITabBtn = new UITabBtn("金币商城",2);
+ var _loc2_:UITabBtn = new UITabBtn("金币说明",2);
+ var _loc3_:UITabBtn = new UITabBtn("金币日志",2);
+ this.btnArr.push(_loc1_);
+ this.btnArr.push(_loc2_);
+ this.btnArr.push(_loc3_);
+ for each(_loc5_ in this.btnArr)
+ {
+ addChild(_loc5_);
+ _loc5_.x = 25 + _loc4_ * 66;
+ _loc5_.y = 40;
+ _loc5_.onClick = this.clickPage;
+ _loc4_++;
+ }
+ this.paneBg = new Sprite();
+ addChild(this.paneBg);
+ this.paneBg.x = 11;
+ this.paneBg.y = 65;
+ _loc1_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP));
+ }
+
+ private function clickPage(param1:MouseEvent) : void
+ {
+ var _loc2_:UITabBtn = param1.currentTarget as UITabBtn;
+ if(this.preBtn == _loc2_)
+ {
+ return;
+ }
+ if(Boolean(this.prePage) && this.paneBg.contains(this.prePage))
+ {
+ this.paneBg.removeChild(this.prePage);
+ }
+ if(this.preBtn)
+ {
+ this.preBtn.select = false;
+ }
+ this.preBtn = _loc2_;
+ this.preBtn.select = true;
+ if(this.btnArr[0] == this.preBtn)
+ {
+ if(this.page1 == null)
+ {
+ this.page1 = new WarShopPage1();
+ }
+ this.prePage = this.page1;
+ }
+ if(this.btnArr[1] == this.preBtn)
+ {
+ if(this.page2 == null)
+ {
+ this.page2 = new WarShopPage2();
+ }
+ this.prePage = this.page2;
+ }
+ if(this.btnArr[2] == this.preBtn)
+ {
+ if(this.page3 == null)
+ {
+ this.page3 = new WarShopPage3();
+ }
+ this.prePage = this.page3;
+ }
+ this.paneBg.addChild(this.prePage);
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/yabiao/YaPage1.as b/flash_decompiled/com/view/ui/activity/yabiao/YaPage1.as
new file mode 100644
index 0000000..72ea17b
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/yabiao/YaPage1.as
@@ -0,0 +1,120 @@
+package com.view.ui.activity.yabiao
+{
+ import com.control.ConnectService;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UITable;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+
+ public class YaPage1 extends Sprite
+ {
+
+ private var itemVec:Vector.;
+
+ private var itemScroll:ScrollPane;
+
+ private var itemSp:Sprite;
+
+ public function YaPage1()
+ {
+ var _loc1_:Array = null;
+ var _loc2_:Array = null;
+ var _loc5_:UIButton = null;
+ var _loc6_:YabiaoItem = null;
+ super();
+ _loc1_ = ["护镖君主","护镖类型","楼层","护镖战力","剩余时间","完成度","被夺次数","镖重","操作"];
+ _loc2_ = [110,60,40,70,70,130,60,45,50];
+ var _loc3_:UITable = new UITable();
+ _loc3_.drawLine = false;
+ _loc3_.lineHeight = 30;
+ _loc3_.install(8,_loc1_,_loc2_);
+ addChild(_loc3_);
+ _loc3_.x = 4;
+ _loc3_.y = 4;
+ this.itemVec = new Vector.();
+ this.itemSp = new Sprite();
+ var _loc4_:int = 0;
+ while(_loc4_ < 8)
+ {
+ _loc6_ = new YabiaoItem();
+ this.itemSp.addChild(_loc6_);
+ this.itemVec.push(_loc6_);
+ _loc6_.x = 4;
+ _loc6_.y = 2 + _loc4_ * 30;
+ _loc4_++;
+ }
+ this.itemScroll = new ScrollPane();
+ this.itemScroll.setSize(630,241);
+ this.itemScroll.horizontalScrollPolicy = ScrollPolicy.OFF;
+ _loc3_.addChild(this.itemScroll);
+ this.itemScroll.x = 1;
+ this.itemScroll.y = 26;
+ this.itemScroll.source = this.itemSp;
+ this.itemScroll.update();
+ _loc5_ = new UIButton("刷 新",2,10);
+ addChild(_loc5_);
+ _loc5_.x = 575;
+ _loc5_.y = -25;
+ _loc5_.onClick = this.refreshData;
+ Utils.g_events.addEventListener(DevEvent.EVENT_YABIAO_YABIAOLIST,this.getListResult);
+ }
+
+ public function getYabiaoList() : void
+ {
+ ConnectService.getInstance().activityService.getAllYabiaoList();
+ }
+
+ private function refreshData(param1:MouseEvent) : void
+ {
+ this.getYabiaoList();
+ }
+
+ private function getListResult(param1:DevEvent) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:YabiaoItem = null;
+ var _loc2_:Array = param1.arr;
+ this.clearItemList();
+ if(_loc2_ != null && _loc2_.length > 0)
+ {
+ for(_loc3_ in _loc2_)
+ {
+ if(_loc3_ > 7)
+ {
+ _loc4_ = new YabiaoItem();
+ this.itemSp.addChild(_loc4_);
+ this.itemVec.push(_loc4_);
+ _loc4_.x = 4;
+ _loc4_.y = 2 + _loc3_ * 30;
+ }
+ this.itemVec[_loc3_].setData(_loc2_[_loc3_]);
+ }
+ }
+ this.itemScroll.verticalScrollPosition = 0;
+ this.itemScroll.update();
+ }
+
+ private function clearItemList() : void
+ {
+ var _loc1_:* = int(this.itemVec.length - 1);
+ while(_loc1_ >= 0)
+ {
+ if(_loc1_ > 7)
+ {
+ this.itemSp.removeChild(this.itemVec[_loc1_]);
+ this.itemVec.splice(_loc1_,1);
+ }
+ else
+ {
+ this.itemVec[_loc1_].setData(null);
+ }
+ _loc1_--;
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/yabiao/YaPage2.as b/flash_decompiled/com/view/ui/activity/yabiao/YaPage2.as
new file mode 100644
index 0000000..73630f3
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/yabiao/YaPage2.as
@@ -0,0 +1,334 @@
+package com.view.ui.activity.yabiao
+{
+ import com.InstallFace;
+ import com.comfig.ClassConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.events.DevEvent;
+ import com.newdata.activity.ActivityData;
+ import com.newdata.activity.YabiaoData;
+ import com.utils.Utils;
+ import com.view.newui.UIBigButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.activity.gift.NewItemMc;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class YaPage2 extends Sprite
+ {
+
+ private var leftPage:UIWindowBg;
+
+ private var face:InstallFace;
+
+ private var valueText0:TextField;
+
+ private var valueText1:TextField;
+
+ private var valueText2:TextField;
+
+ private var valueText3:TextField;
+
+ private var valueText4:TextField;
+
+ private var getBtn:UIBigButton;
+
+ private var curr_num:int = 1;
+
+ private var loadRes:LoadResource;
+
+ private var loadCurrRes:LoadResource;
+
+ private var currImg:Bitmap;
+
+ public function YaPage2()
+ {
+ var _loc14_:TextField = null;
+ var _loc16_:TextField = null;
+ this.face = InstallFace.getInstance();
+ super();
+ this.leftPage = new UIWindowBg();
+ this.leftPage.initThirdPanel(386,257);
+ addChild(this.leftPage);
+ this.leftPage.x = 4;
+ this.leftPage.y = 4;
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initThirdPanel(222,257);
+ addChild(_loc1_);
+ _loc1_.x = this.leftPage.x + this.leftPage.width + 3;
+ _loc1_.y = this.leftPage.y;
+ var _loc2_:UITitleBg = new UITitleBg("活动规则",_loc1_.width);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = int(_loc1_.width / 2 - _loc2_.width / 2);
+ var _loc3_:TextField = PublicMethod.getMulTextField(UIConfig.textColor,226,240);
+ _loc1_.addChild(_loc3_);
+ _loc3_.x = 4;
+ _loc3_.y = 28;
+ var _loc4_:TextFormat = new TextFormat();
+ _loc4_.leading = 4;
+ _loc3_.defaultTextFormat = _loc4_;
+ var _loc5_:String = "1、君主每天有3次护镖与劫镖机会。";
+ _loc5_ = _loc5_ + "
2、每个君主只可同时进行一次护镖,护镖同时无法进行劫镖。";
+ _loc5_ = _loc5_ + "
3、每趟镖最多可被劫持2次,每被劫一次损失1/3的奖励,劫镖者可获得1/3奖励。劫镖时,被劫玩家神霄殿所达到的楼层不能比自己当前楼层低100层。";
+ _loc5_ = _loc5_ + "
4、护镖时间为每日7:00-22:00。完成一次护镖所需时间为5小时。";
+ _loc5_ = _loc5_ + "
5、镖按类型可分为金镖、银镖、铜镖。玉霄殿、太霄殿的玩家,押送的为金镖,丹霄殿、景霄殿的玩家所押送的镖为银镖,未达到丹霄殿的玩家,押送的镖为铜镖,不同镖所获得的奖励也不同。";
+ _loc3_.htmlText = _loc5_;
+ var _loc6_:TextFormat = PublicMethod.getRightTextFormat();
+ var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,140);
+ this.leftPage.addChild(_loc7_);
+ _loc7_.x = 50;
+ _loc7_.y = 15;
+ _loc7_.defaultTextFormat = _loc6_;
+ _loc7_.text = "护镖分类:";
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,180);
+ this.leftPage.addChild(_loc8_);
+ _loc8_.x = _loc7_.x + _loc7_.width;
+ _loc8_.y = _loc7_.y;
+ _loc8_.text = " 金镖 银镖 铜镖";
+ var _loc9_:Bitmap = this.face.getBitMap(ClassConfig.lib_star_3);
+ addChild(_loc9_);
+ _loc9_.y = 18;
+ _loc9_.x = 136 + 58;
+ var _loc10_:Bitmap = this.face.getBitMap(ClassConfig.lib_star_1);
+ addChild(_loc10_);
+ _loc10_.y = 18;
+ _loc10_.x = 136 + 58 + 58;
+ var _loc11_:Bitmap = this.face.getBitMap(ClassConfig.lib_star_2);
+ addChild(_loc11_);
+ _loc11_.y = 18;
+ _loc11_.x = 136 + 58 * 3;
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,140);
+ this.leftPage.addChild(_loc12_);
+ _loc12_.x = 50;
+ _loc12_.y = _loc7_.y + 25;
+ _loc12_.defaultTextFormat = _loc6_;
+ _loc12_.text = "当前可护镖类型:";
+ this.valueText0 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,140);
+ this.leftPage.addChild(this.valueText0);
+ this.valueText0.x = _loc12_.x + _loc12_.width;
+ this.valueText0.y = _loc12_.y;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,140);
+ this.leftPage.addChild(_loc13_);
+ _loc13_.x = _loc12_.x;
+ _loc13_.y = _loc12_.y + 25;
+ _loc13_.defaultTextFormat = _loc6_;
+ _loc13_.text = "镖重:";
+ this.valueText1 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,140);
+ this.leftPage.addChild(this.valueText1);
+ this.valueText1.x = _loc13_.x + _loc13_.width;
+ this.valueText1.y = _loc13_.y;
+ _loc14_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,140);
+ this.leftPage.addChild(_loc14_);
+ _loc14_.x = _loc13_.x;
+ _loc14_.y = _loc13_.y + 25;
+ _loc14_.defaultTextFormat = _loc6_;
+ _loc14_.text = "今日剩余劫镖次数:";
+ this.valueText2 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,140);
+ this.leftPage.addChild(this.valueText2);
+ this.valueText2.x = this.valueText1.x;
+ this.valueText2.y = _loc14_.y;
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,140);
+ this.leftPage.addChild(_loc15_);
+ _loc15_.x = _loc13_.x;
+ _loc15_.y = _loc14_.y + 25;
+ _loc15_.defaultTextFormat = _loc6_;
+ _loc15_.text = "当前状态:";
+ this.valueText4 = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ this.leftPage.addChild(this.valueText4);
+ this.valueText4.x = this.valueText1.x;
+ this.valueText4.y = _loc15_.y;
+ _loc16_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,140);
+ this.leftPage.addChild(_loc16_);
+ _loc16_.x = _loc13_.x;
+ _loc16_.y = _loc15_.y + 25;
+ _loc16_.defaultTextFormat = _loc6_;
+ _loc16_.text = "护镖战力:";
+ this.valueText3 = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ this.leftPage.addChild(this.valueText3);
+ this.valueText3.x = this.valueText1.x;
+ this.valueText3.y = _loc16_.y;
+ this.getBtn = new UIBigButton(6);
+ this.leftPage.addChild(this.getBtn);
+ this.getBtn.x = 140;
+ this.getBtn.y = this.valueText3.y + 25;
+ this.getBtn.onClick = this.startYabiao;
+ Utils.g_events.addEventListener(DevEvent.EVENT_YABIAO_ENTER,this.getDataResult);
+ Utils.g_events.addEventListener(DevEvent.EVENT_YABIAO_ITEM,this.getYabiaoItemResult);
+ this.getYabiaoItem();
+ this.initData();
+ }
+
+ private function getDataResult(param1:DevEvent) : void
+ {
+ this.initData();
+ }
+
+ private function loadImg() : void
+ {
+ var _loc1_:String = "";
+ if(this.curr_num == 1)
+ {
+ _loc1_ = "pic/sys/image 6.png";
+ }
+ if(this.curr_num == 2)
+ {
+ _loc1_ = "pic/sys/image 4.png";
+ }
+ if(this.curr_num == 3)
+ {
+ _loc1_ = "pic/sys/image 5.png";
+ }
+ this.loadRes = new LoadResource(_loc1_,this.loadBack);
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ addChild(_loc2_);
+ _loc2_.y = 18;
+ _loc2_.x = 136 + 58 * this.curr_num;
+ ++this.curr_num;
+ if(this.curr_num > 3)
+ {
+ this.loadRes.clear();
+ }
+ else
+ {
+ this.loadImg();
+ }
+ }
+
+ private function initData() : void
+ {
+ var _loc1_:YabiaoData = ActivityData.getYabiaoData();
+ this.valueText1.text = _loc1_.leftTimes + "镖";
+ this.valueText2.text = _loc1_.robTimes + "";
+ this.valueText3.text = ActivityData.getYabiaoData().power + "";
+ if(_loc1_.type == 3)
+ {
+ this.valueText0.text = " 金镖";
+ }
+ else if(_loc1_.type == 2)
+ {
+ this.valueText0.text = " 银镖";
+ }
+ else
+ {
+ this.valueText0.text = " 铜镖";
+ }
+ this.loadCurrImg(_loc1_.type);
+ if(_loc1_.status == 1)
+ {
+ this.valueText4.htmlText = "护镖中";
+ }
+ else
+ {
+ this.valueText4.htmlText = "空闲";
+ }
+ }
+
+ private function loadCurrImg(param1:int) : void
+ {
+ var _loc2_:String = "";
+ if(param1 == 1)
+ {
+ _loc2_ = "pic/sys/image 5.png";
+ }
+ if(param1 == 2)
+ {
+ _loc2_ = "pic/sys/image 4.png";
+ }
+ if(param1 == 3)
+ {
+ _loc2_ = "pic/sys/image 6.png";
+ }
+ this.loadCurrRes = new LoadResource(_loc2_,this.loadCurrBack);
+ }
+
+ private function loadCurrBack(param1:Event) : void
+ {
+ if(Boolean(this.currImg) && contains(this.currImg))
+ {
+ removeChild(this.currImg);
+ }
+ this.currImg = Bitmap(param1.target.loader.content);
+ addChild(this.currImg);
+ this.currImg.y = 43;
+ this.currImg.x = 136 + 58;
+ this.loadCurrRes.clear();
+ }
+
+ public function setPower(param1:Number) : void
+ {
+ this.valueText3.text = param1 + "";
+ }
+
+ private function startYabiao(param1:MouseEvent) : void
+ {
+ var _loc2_:YabiaoData = ActivityData.getYabiaoData();
+ if(_loc2_.leftTimes == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今日护镖次数已用完");
+ return;
+ }
+ if(_loc2_.power == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择护镖武将");
+ return;
+ }
+ ConnectService.getInstance().activityService.startYabiao();
+ }
+
+ private function getYabiaoItem() : void
+ {
+ ConnectService.getInstance().activityService.getYabiaoItem();
+ }
+
+ private function getYabiaoItemResult(param1:DevEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ var _loc3_:Object = _loc2_.itemMap1;
+ _loc3_.itemNums = 3;
+ var _loc4_:NewItemMc = new NewItemMc(1);
+ addChild(_loc4_);
+ _loc4_.setObj(_loc3_);
+ _loc4_.loadTip(_loc3_);
+ _loc4_.x = 100;
+ _loc4_.y = 225;
+ var _loc5_:Object = _loc2_.itemMap2;
+ _loc5_.itemNums = 3;
+ var _loc6_:NewItemMc = new NewItemMc(1);
+ addChild(_loc6_);
+ _loc6_.setObj(_loc5_);
+ _loc6_.loadTip(_loc5_);
+ _loc6_.x = 210;
+ _loc6_.y = _loc4_.y;
+ var _loc7_:Object = _loc2_.itemMap3;
+ _loc7_.itemNums = 3;
+ var _loc8_:NewItemMc = new NewItemMc(1);
+ addChild(_loc8_);
+ _loc8_.setObj(_loc7_);
+ _loc8_.loadTip(_loc7_);
+ _loc8_.x = 320;
+ _loc8_.y = _loc4_.y;
+ var _loc9_:Sprite = PublicMethod.getTrLine(350);
+ this.leftPage.addChild(_loc9_);
+ _loc9_.x = 20;
+ _loc9_.y = 215;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,280);
+ this.leftPage.addChild(_loc10_);
+ _loc10_.x = 40;
+ _loc10_.y = 235;
+ _loc10_.text = "金镖奖励 银镖奖励 铜镖奖励";
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/yabiao/YabiaoItem.as b/flash_decompiled/com/view/ui/activity/yabiao/YabiaoItem.as
new file mode 100644
index 0000000..5d1193d
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/yabiao/YabiaoItem.as
@@ -0,0 +1,289 @@
+package com.view.ui.activity.yabiao
+{
+ import com.InstallFace;
+ import com.comfig.ClassConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIExpBar;
+ import com.view.newui.UISmallBtn;
+ import com.view.ui.message.MessageBoxUI;
+ import com.view.world.ui.CastleUserUI;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TextEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Timer;
+
+ public class YabiaoItem extends Sprite
+ {
+
+ private var userNameText:TextField;
+
+ private var powerText:TextField;
+
+ private var leftTimeText:TextField;
+
+ private var robTimesText:TextField;
+
+ private var stageIdText:TextField;
+
+ private var robBtn:UISmallBtn;
+
+ private var proBar:UIExpBar;
+
+ private var timesText:TextField;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var bg:Sprite;
+
+ private var itemObj:Object;
+
+ private var img:Bitmap;
+
+ private var loadRes:LoadResource;
+
+ private var maxTime:int;
+
+ private var timer:Timer;
+
+ private var currSeconds:int;
+
+ public function YabiaoItem()
+ {
+ super();
+ this.bg = PublicMethod.createShape(UIConfig.overBgColor,621,27);
+ addChild(this.bg);
+ var _loc1_:Sprite = PublicMethod.getTrLine(621);
+ addChild(_loc1_);
+ _loc1_.y = -3;
+ this.bg.alpha = 0;
+ this.userNameText = PublicMethod.getTextFieldWithFillter(16777215,100);
+ addChild(this.userNameText);
+ this.userNameText.mouseEnabled = true;
+ this.userNameText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true);
+ this.userNameText.x = 5;
+ this.userNameText.y = 5;
+ this.stageIdText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,40);
+ addChild(this.stageIdText);
+ this.stageIdText.x = 175;
+ this.stageIdText.y = this.userNameText.y;
+ this.powerText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,64);
+ addChild(this.powerText);
+ this.powerText.x = 210;
+ this.powerText.y = this.userNameText.y;
+ this.powerText.defaultTextFormat = PublicMethod.getCenterTextFormat();
+ this.leftTimeText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,70);
+ addChild(this.leftTimeText);
+ this.leftTimeText.x = 286;
+ this.leftTimeText.y = this.userNameText.y;
+ this.proBar = new UIExpBar();
+ this.proBar.setWidth(120);
+ this.proBar.init();
+ addChild(this.proBar);
+ this.proBar.x = 350;
+ this.proBar.y = this.userNameText.y;
+ this.proBar.setMaxValue(100);
+ this.proBar.setCurValue(0);
+ this.robTimesText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,40);
+ addChild(this.robTimesText);
+ this.robTimesText.x = 485;
+ this.robTimesText.y = this.userNameText.y;
+ this.robTimesText.defaultTextFormat = PublicMethod.getCenterTextFormat();
+ this.timesText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,54);
+ addChild(this.timesText);
+ this.timesText.x = 530;
+ this.timesText.y = this.userNameText.y;
+ this.timesText.defaultTextFormat = PublicMethod.getCenterTextFormat();
+ this.robBtn = new UISmallBtn("劫镖 ",1);
+ addChild(this.robBtn);
+ this.robBtn.x = 585;
+ this.robBtn.y = this.userNameText.y - 2;
+ this.robBtn.onClick = this.robYabiao;
+ this.setData(null);
+ addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true);
+ addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true);
+ }
+
+ private function mouseOut(param1:MouseEvent) : void
+ {
+ if(this.itemObj == null)
+ {
+ return;
+ }
+ this.bg.alpha = 0;
+ }
+
+ private function mouseOver(param1:MouseEvent) : void
+ {
+ if(this.itemObj == null)
+ {
+ return;
+ }
+ this.bg.alpha = 0.3;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = 0;
+ this.itemObj = param1;
+ if(param1 == null)
+ {
+ this.bg.alpha = 0;
+ this.userNameText.text = "";
+ this.powerText.text = "";
+ this.leftTimeText.text = "";
+ this.proBar.visible = false;
+ this.robTimesText.text = "";
+ this.robBtn.visible = false;
+ this.stageIdText.text = "";
+ this.timesText.text = "";
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.startFrame);
+ this.timer = null;
+ }
+ if(Boolean(this.img) && contains(this.img))
+ {
+ removeChild(this.img);
+ }
+ }
+ else
+ {
+ this.userNameText.htmlText = "" + param1.userName + "";
+ this.powerText.text = Utils.getNewPower(param1.power);
+ this.leftTimeText.text = param1.leftTime + "";
+ this.proBar.visible = true;
+ this.robTimesText.text = param1.robTimes + "";
+ this.robBtn.visible = true;
+ this.stageIdText.text = param1.topStageId + "";
+ this.currSeconds = param1.leftTime;
+ this.timesText.text = param1.times + "镖";
+ this.maxTime = param1.maxTime;
+ this.proBar.setMaxValue(this.maxTime);
+ _loc2_ = int(param1.type);
+ this.loadImgByType(_loc2_);
+ this.getTimerInfo();
+ }
+ }
+
+ private function loadImgByType(param1:int) : void
+ {
+ if(Boolean(this.img) && contains(this.img))
+ {
+ removeChild(this.img);
+ }
+ var _loc2_:String = "";
+ if(param1 == 1)
+ {
+ this.img = this.face.getBitMap(ClassConfig.lib_star_2);
+ }
+ if(param1 == 2)
+ {
+ this.img = this.face.getBitMap(ClassConfig.lib_star_1);
+ }
+ if(param1 == 3)
+ {
+ this.img = this.face.getBitMap(ClassConfig.lib_star_3);
+ }
+ addChild(this.img);
+ this.img.x = 124;
+ this.img.y = 4;
+ }
+
+ private function loadBack(param1:Event) : void
+ {
+ if(this.itemObj == null)
+ {
+ return;
+ }
+ this.img = Bitmap(param1.target.loader.content);
+ addChild(this.img);
+ this.img.x = 124;
+ this.img.y = 4;
+ this.loadRes.clear();
+ }
+
+ private function setTimeBar() : void
+ {
+ var _loc1_:int = this.maxTime - this.currSeconds;
+ var _loc2_:int = _loc1_ * 100 / this.maxTime;
+ this.proBar.setCurLen(_loc1_,_loc2_ + "%");
+ }
+
+ private function getTimerInfo() : void
+ {
+ if(this.currSeconds > 0)
+ {
+ this.getTimeText();
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.startFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.timer.start();
+ }
+ }
+ }
+
+ private function startFrame(param1:TimerEvent) : void
+ {
+ --this.currSeconds;
+ this.getTimeText();
+ if(this.currSeconds <= 0)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.startFrame);
+ this.timer = null;
+ ConnectService.getInstance().activityService.getAllYabiaoList();
+ }
+ }
+
+ private function getTimeText() : void
+ {
+ this.leftTimeText.text = PublicMethod.getTime(this.currSeconds);
+ this.setTimeBar();
+ }
+
+ private function linkeventhandler(param1:TextEvent) : void
+ {
+ var _loc2_:String = param1.text;
+ var _loc3_:CastleUserUI = CastleUserUI.getInstance();
+ _loc3_.show();
+ _loc3_.updateByUserName(_loc2_);
+ }
+
+ private function robYabiao(param1:MouseEvent) : void
+ {
+ var _loc2_:int = 0;
+ var _loc3_:int = 0;
+ if(this.itemObj != null)
+ {
+ _loc2_ = int(this.itemObj.userId);
+ _loc3_ = NewUserData.getUser().userId;
+ if(this.itemObj.robTimes == 2)
+ {
+ MessageBoxUI.getInstance().addMessage("该趟镖已被劫2次。");
+ return;
+ }
+ if(_loc2_ == _loc3_)
+ {
+ MessageBoxUI.getInstance().addMessage("无法劫取自己的镖");
+ return;
+ }
+ ConnectService.getInstance().activityService.startCombat(_loc2_);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/activity/yabiao/YabiaoUI.as b/flash_decompiled/com/view/ui/activity/yabiao/YabiaoUI.as
new file mode 100644
index 0000000..a46e79b
--- /dev/null
+++ b/flash_decompiled/com/view/ui/activity/yabiao/YabiaoUI.as
@@ -0,0 +1,268 @@
+package com.view.ui.activity.yabiao
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.play.event.PlayEvent;
+ import com.events.DevEvent;
+ import com.newdata.activity.ActivityData;
+ import com.newdata.activity.YabiaoData;
+ import com.newdata.hero.NewCopyHero;
+ import com.newdata.hero.NewHeroData;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UITabBtn;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import com.view.ui.battleview.CopyBattleViewUI;
+ import com.view.ui.tianxia.CopyHeroSetUI;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class YabiaoUI extends BaseUI
+ {
+
+ private var bg:UIWindowBg;
+
+ public var btnArr:Array;
+
+ private var paneBg:UIWindowBg;
+
+ private var heroMcVec:Vector.;
+
+ private var powerText:TextField;
+
+ private var page1:YaPage1;
+
+ private var page2:YaPage2;
+
+ private var prePage:Sprite;
+
+ private var preBtn:UITabBtn;
+
+ private var currCopyHeroVec:Vector. = new Vector.();
+
+ private var copyHeroSetUI:CopyHeroSetUI;
+
+ private var currHeroIds:Array = new Array();
+
+ public function YabiaoUI()
+ {
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_yabiao);
+ super.setPosition();
+ this.createUI();
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w;
+ window_heihgt = UIWindowBg.normal_window_h + 20;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640;
+ ui_closeBtn.y = 10;
+ }
+
+ override public function createUI() : void
+ {
+ var _loc3_:int = 0;
+ var _loc4_:UITabBtn = null;
+ var _loc5_:UIWindowBg = null;
+ var _loc8_:UIHeroItem = null;
+ this.btnArr = new Array();
+ var _loc1_:UITabBtn = new UITabBtn("护镖大厅",2);
+ var _loc2_:UITabBtn = new UITabBtn("我要护镖",2);
+ this.btnArr.push(_loc1_);
+ this.btnArr.push(_loc2_);
+ for each(_loc4_ in this.btnArr)
+ {
+ addChild(_loc4_);
+ _loc4_.x = 25 + _loc3_ * 66;
+ _loc4_.y = 40;
+ _loc4_.onClick = this.clickPage;
+ _loc3_++;
+ }
+ this.paneBg = new UIWindowBg();
+ this.paneBg.initSecondPanel(630,265);
+ addChild(this.paneBg);
+ this.paneBg.x = 11;
+ this.paneBg.y = 65;
+ _loc5_ = new UIWindowBg();
+ _loc5_.initThirdPanel(621,113);
+ addChild(_loc5_);
+ _loc5_.x = this.paneBg.x;
+ _loc5_.y = this.paneBg.y + this.paneBg.height + 4;
+ this.heroMcVec = new Vector.();
+ var _loc6_:int = 0;
+ while(_loc6_ < 5)
+ {
+ _loc8_ = new UIHeroItem();
+ _loc5_.addChild(_loc8_);
+ _loc8_.x = 5 + _loc6_ * 124;
+ _loc8_.y = 5;
+ this.heroMcVec.push(_loc8_);
+ _loc6_++;
+ }
+ var _loc7_:UIButton = new UIButton("镜像设置",2,10);
+ _loc5_.addChild(_loc7_);
+ _loc7_.x = 10;
+ _loc7_.y = 95;
+ _loc7_.onClick = this.openHeroSet;
+ this.powerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200);
+ _loc5_.addChild(this.powerText);
+ this.powerText.x = _loc7_.x + 100;
+ this.powerText.y = _loc7_.y + 3;
+ this.powerText.htmlText = "武将镜像战斗力:0";
+ _loc1_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP));
+ this.getInitData();
+ }
+
+ private function clickPage(param1:MouseEvent) : void
+ {
+ var _loc2_:UITabBtn = param1.currentTarget as UITabBtn;
+ if(this.preBtn == _loc2_)
+ {
+ return;
+ }
+ if(Boolean(this.prePage) && this.paneBg.contains(this.prePage))
+ {
+ this.paneBg.removeChild(this.prePage);
+ }
+ if(this.preBtn)
+ {
+ this.preBtn.select = false;
+ }
+ this.preBtn = _loc2_;
+ this.preBtn.select = true;
+ if(this.btnArr[0] == this.preBtn)
+ {
+ if(this.page1 == null)
+ {
+ this.page1 = new YaPage1();
+ this.page1.getYabiaoList();
+ }
+ this.prePage = this.page1;
+ }
+ if(this.btnArr[1] == this.preBtn)
+ {
+ if(this.page2 == null)
+ {
+ this.page2 = new YaPage2();
+ }
+ this.prePage = this.page2;
+ }
+ this.paneBg.addChild(this.prePage);
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ Utils.g_events.addEventListener(DevEvent.EVENT_YABIAO_ENTER,this.getDataResult);
+ Utils.g_events.addEventListener(DevEvent.DATA_COPYHERO_GETALL,this.getAllCopyHeroListResult);
+ ConnectService.getInstance().addEventListener(PlayEvent.HUIWU_COMBAT_RESULT,this.startCombatResult);
+ if(this.heroMcVec != null)
+ {
+ this.getHeroList();
+ }
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ Utils.g_events.removeEventListener(DevEvent.EVENT_YABIAO_ENTER,this.getDataResult);
+ Utils.g_events.removeEventListener(DevEvent.DATA_COPYHERO_GETALL,this.getAllCopyHeroListResult);
+ ConnectService.getInstance().removeEventListener(PlayEvent.HUIWU_COMBAT_RESULT,this.startCombatResult);
+ }
+
+ private function getInitData() : void
+ {
+ ConnectService.getInstance().activityService.enterYabiao();
+ }
+
+ private function getHeroList() : void
+ {
+ var _loc2_:Vector. = null;
+ var _loc3_:Number = NaN;
+ var _loc4_:int = 0;
+ var _loc5_:int = 0;
+ var _loc6_:NewCopyHero = null;
+ var _loc1_:Vector. = new Vector.();
+ if(this.currHeroIds.length > 0)
+ {
+ _loc2_ = NewHeroData.getAllCopyHeroList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ this.currCopyHeroVec.splice(0,this.currCopyHeroVec.length);
+ _loc3_ = 0;
+ _loc4_ = 0;
+ while(_loc4_ < 5)
+ {
+ _loc5_ = int(this.currHeroIds[_loc4_]);
+ if(_loc5_ > 0)
+ {
+ _loc6_ = NewHeroData.getCopyHeroById(_loc5_);
+ this.heroMcVec[_loc4_].setData(_loc6_);
+ _loc3_ += _loc6_.power;
+ this.currCopyHeroVec.push(_loc6_);
+ }
+ else
+ {
+ this.heroMcVec[_loc4_].setData(null);
+ }
+ _loc4_++;
+ }
+ this.powerText.htmlText = "武将镜像战斗力:" + _loc3_ + "";
+ ActivityData.getYabiaoData().power = _loc3_;
+ if(this.prePage == this.page2 && this.paneBg.contains(this.prePage))
+ {
+ this.page2.setPower(_loc3_);
+ }
+ }
+ }
+
+ private function openHeroSet(param1:MouseEvent) : void
+ {
+ if(this.copyHeroSetUI == null)
+ {
+ this.copyHeroSetUI = CopyHeroSetUI.getInstants();
+ }
+ if(!contains(this.copyHeroSetUI))
+ {
+ addChild(this.copyHeroSetUI);
+ this.copyHeroSetUI.y = 35;
+ this.copyHeroSetUI.x = 0;
+ }
+ this.copyHeroSetUI.init(this.currCopyHeroVec,2);
+ }
+
+ private function getDataResult(param1:DevEvent) : void
+ {
+ var _loc2_:YabiaoData = ActivityData.getYabiaoData();
+ this.currHeroIds = _loc2_.heroids;
+ this.getHeroList();
+ }
+
+ private function getAllCopyHeroListResult(param1:DevEvent) : void
+ {
+ this.getHeroList();
+ }
+
+ private function startCombatResult(param1:PlayEvent) : void
+ {
+ var _loc2_:CopyBattleViewUI = CopyBattleViewUI.getInstance();
+ _loc2_.initData(param1.obj);
+ _loc2_.showUI();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/addspeed/AddSpeedUI.as b/flash_decompiled/com/view/ui/addspeed/AddSpeedUI.as
new file mode 100644
index 0000000..26c5a80
--- /dev/null
+++ b/flash_decompiled/com/view/ui/addspeed/AddSpeedUI.as
@@ -0,0 +1,309 @@
+package com.view.ui.addspeed
+{
+ import com.comfig.ClassConfig;
+ import com.comfig.CommonData;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.item.event.FastInfoEvent;
+ import com.data.data.items.AddSpeed;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIRadioBtn;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.message.MessageBoxUI;
+ import com.view.usertool.MedicineItem;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class AddSpeedUI extends UIWindowBg
+ {
+
+ private static var instance:AddSpeedUI;
+
+ private var bigBg:Sprite;
+
+ private var tableMc:UITable;
+
+ private var title:TextField;
+
+ private var bg5:Sprite;
+
+ private var fastTypeArr:Vector.;
+
+ private var payTypeArr:Array;
+
+ private var type_1:UIRadioBtn;
+
+ private var type_2:UIRadioBtn;
+
+ private var point:TextField;
+
+ private var cash:TextField;
+
+ private var addSpeedBtn:UIButton;
+
+ private var fastType:int = -1;
+
+ private var payType:int = -1;
+
+ private var fastQueType:int;
+
+ private var addSpeed:AddSpeed;
+
+ private var currAddSpeed:AddSpeed;
+
+ public function AddSpeedUI()
+ {
+ var _loc3_:int = 0;
+ var _loc4_:Sprite = null;
+ var _loc6_:UIRadioBtn = null;
+ var _loc7_:MedicineItem = null;
+ super();
+ this.bigBg = new Sprite();
+ this.bg5 = PublicMethod.createShape(0,CommonData.MAX_WIDTH,CommonData.MAX_HEIGHT);
+ this.bg5.alpha = 0;
+ this.bigBg.addChild(this.bg5);
+ initSize(85,190);
+ loadTitle(UITitleConfig.title_jiasu);
+ addCloseBtn();
+ initBg();
+ var _loc1_:Array = [""];
+ var _loc2_:Array = [270];
+ this.tableMc = new UITable();
+ this.tableMc.drawLine = true;
+ this.tableMc.install(5,_loc1_,_loc2_);
+ bg1.addChild(this.tableMc);
+ this.tableMc.x = 10;
+ this.tableMc.y = 10;
+ this.title = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,140);
+ this.tableMc.addChild(this.title);
+ this.title.x = 50;
+ this.title.y = 4;
+ this.fastTypeArr = new Vector.();
+ _loc3_ = 0;
+ while(_loc3_ < 5)
+ {
+ _loc7_ = new MedicineItem();
+ this.fastTypeArr.push(_loc7_);
+ _loc7_.x = 4;
+ _loc7_.y = 25 + _loc3_ * 25;
+ this.tableMc.addChild(_loc7_);
+ _loc7_.addEventListener(MouseEvent.CLICK,this.selectFastType);
+ _loc3_++;
+ }
+ this.type_1 = new UIRadioBtn();
+ _loc4_ = face.getSprite(ClassConfig.lib_ui_point);
+ this.point = PublicMethod.getTextFieldWithFillter(16777215,90);
+ bg1.addChild(this.type_1);
+ bg1.addChild(_loc4_);
+ bg1.addChild(this.point);
+ this.type_1.x = this.tableMc.x;
+ this.type_1.y = this.tableMc.y + this.tableMc.height + 7;
+ _loc4_.x = this.type_1.x + this.type_1.width + 2;
+ _loc4_.y = this.type_1.y + 2;
+ this.point.x = _loc4_.x + _loc4_.width;
+ this.point.y = this.type_1.y + 2;
+ this.point.text = "";
+ this.type_2 = new UIRadioBtn();
+ var _loc5_:Sprite = face.getSprite(ClassConfig.lib_ui_cash);
+ this.cash = PublicMethod.getTextFieldWithFillter(16777215,90);
+ bg1.addChild(this.type_2);
+ bg1.addChild(_loc5_);
+ bg1.addChild(this.cash);
+ this.type_2.x = this.point.x + this.point.width;
+ this.type_2.y = this.type_1.y;
+ _loc5_.x = this.type_2.x + this.type_2.width + 2;
+ _loc5_.y = this.type_2.y + 2;
+ this.cash.x = _loc5_.x + _loc5_.width;
+ this.cash.y = this.type_2.y + 2;
+ this.cash.text = "";
+ this.payTypeArr = new Array();
+ this.payTypeArr.push(this.type_1);
+ this.payTypeArr.push(this.type_2);
+ this.addSpeedBtn = new UIButton("加 速",2,10);
+ bg1.addChild(this.addSpeedBtn);
+ this.addSpeedBtn.x = 105;
+ this.addSpeedBtn.y = 190;
+ this.addSpeedBtn.onClick = this.addSpeedSubmit;
+ for each(_loc6_ in this.payTypeArr)
+ {
+ _loc6_.onClick = this.selectPayType;
+ }
+ this.bigBg.addChild(this);
+ this.x = int(this.bigBg.width / 2 - this.width / 2);
+ this.y = int(this.bigBg.height / 2 - this.height / 2);
+ face.stage.addEventListener(Event.RESIZE,this.resize);
+ ConnectService.getInstance().addEventListener(FastInfoEvent.GET_FASTINFO,this.getFastInfoResult);
+ }
+
+ public static function getInstance() : AddSpeedUI
+ {
+ if(instance == null)
+ {
+ instance = new AddSpeedUI();
+ }
+ return instance;
+ }
+
+ public function getFastInfo(param1:AddSpeed) : void
+ {
+ this.currAddSpeed = param1;
+ this.cash.text = "";
+ this.point.text = "";
+ this.title.text = "";
+ ConnectService.getInstance().itemsService.getFastInfo(this.currAddSpeed);
+ }
+
+ private function getFastInfoResult(param1:FastInfoEvent) : void
+ {
+ var _loc3_:Object = null;
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.closeSelf(null);
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ this.addSpeed = param1.fastInfo;
+ this.cash.text = this.addSpeed.cash.toString();
+ this.point.text = this.addSpeed.payPoint.toString();
+ this.title.text = "剩余时间:" + PublicMethod.getTime(this.addSpeed.remainTime);
+ var _loc2_:int = 0;
+ while(_loc2_ < 5)
+ {
+ _loc3_ = new Object();
+ _loc3_.time = "" + this.addSpeed["money" + _loc2_] + " 点券或元宝";
+ if(_loc2_ > 0)
+ {
+ _loc3_.money = "" + PublicMethod.getTimeStr(this.addSpeed["time" + _loc2_]) + " ";
+ }
+ else
+ {
+ _loc3_.money = "立即完成";
+ }
+ this.fastTypeArr[_loc2_].setObj(_loc3_);
+ _loc2_++;
+ }
+ }
+
+ private function selectFastType(param1:MouseEvent) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc2_:MedicineItem = param1.currentTarget as MedicineItem;
+ _loc2_.setSelect();
+ for(_loc3_ in this.fastTypeArr)
+ {
+ if(this.fastTypeArr[_loc3_] != _loc2_)
+ {
+ this.fastTypeArr[_loc3_].setUnSelect();
+ }
+ else
+ {
+ this.fastType = _loc3_;
+ }
+ }
+ }
+
+ private function selectPayType(param1:MouseEvent) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc2_:UIRadioBtn = param1.currentTarget as UIRadioBtn;
+ _loc2_.setSelect();
+ for(_loc3_ in this.payTypeArr)
+ {
+ if(this.payTypeArr[_loc3_] != _loc2_)
+ {
+ this.payTypeArr[_loc3_].setUnSelect();
+ }
+ else
+ {
+ this.payType = _loc3_;
+ }
+ }
+ }
+
+ public function addToStage() : void
+ {
+ face.stage.addChild(this.bigBg);
+ this.resize(null);
+ }
+
+ private function addSpeedSubmit(param1:MouseEvent) : void
+ {
+ if(this.fastType < 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择加速类型");
+ return;
+ }
+ if(this.payType < 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择付费类型");
+ return;
+ }
+ switch(this.fastType)
+ {
+ case 0:
+ this.currAddSpeed.payMoney = this.addSpeed.money0;
+ this.currAddSpeed.fastType = this.addSpeed.type0;
+ break;
+ case 1:
+ this.currAddSpeed.payMoney = this.addSpeed.money1;
+ this.currAddSpeed.fastType = this.addSpeed.type1;
+ break;
+ case 2:
+ this.currAddSpeed.payMoney = this.addSpeed.money2;
+ this.currAddSpeed.fastType = this.addSpeed.type2;
+ break;
+ case 3:
+ this.currAddSpeed.payMoney = this.addSpeed.money3;
+ this.currAddSpeed.fastType = this.addSpeed.type3;
+ break;
+ case 4:
+ this.currAddSpeed.payMoney = this.addSpeed.money4;
+ this.currAddSpeed.fastType = this.addSpeed.type4;
+ }
+ switch(this.payType)
+ {
+ case 0:
+ this.currAddSpeed.payType = 2;
+ break;
+ case 1:
+ this.currAddSpeed.payType = 1;
+ }
+ if(this.currAddSpeed.payType == 1)
+ {
+ if(this.currAddSpeed.payMoney > this.addSpeed.cash)
+ {
+ MessageBoxUI.getInstance().addMessage("元宝不足" + this.currAddSpeed.payMoney + "个,加速失败。");
+ return;
+ }
+ }
+ else if(this.currAddSpeed.payType == 2)
+ {
+ if(this.currAddSpeed.payMoney > this.addSpeed.payPoint)
+ {
+ MessageBoxUI.getInstance().addMessage("点券不足" + this.currAddSpeed.payMoney + "个,加速失败。");
+ return;
+ }
+ }
+ this.closeSelf(null);
+ ConnectService.getInstance().itemsService.addSpeed(this.currAddSpeed);
+ }
+
+ private function resize(param1:Event) : void
+ {
+ this.bigBg.x = int(face.realWidth / 2 - this.bigBg.width / 2);
+ this.bigBg.y = int(face.realHeight / 2 - this.bigBg.height / 2);
+ }
+
+ override public function closeSelf(param1:MouseEvent) : void
+ {
+ face.stage.removeChild(this.bigBg);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/army/ArmySetLine1.as b/flash_decompiled/com/view/ui/army/ArmySetLine1.as
new file mode 100644
index 0000000..20f0a79
--- /dev/null
+++ b/flash_decompiled/com/view/ui/army/ArmySetLine1.as
@@ -0,0 +1,276 @@
+package com.view.ui.army
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.utils.HashMap;
+ import com.view.mc.sprite.PageInputMc2;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UISmallBtn;
+ import fl.controls.ComboBox;
+ import fl.data.DataProvider;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class ArmySetLine1 extends Sprite
+ {
+
+ private var css:TextFormat;
+
+ private var heroName:TextField;
+
+ private var heroLevel:TextField;
+
+ private var heroCareer:TextField;
+
+ private var armyType:ComboBox;
+
+ private var input:PageInputMc2;
+
+ private var nums:TextField;
+
+ private var centerCss:TextFormat;
+
+ private var okBtn:UISmallBtn;
+
+ private var bg:Sprite;
+
+ private var heroObj:Object;
+
+ private var selectArmyIndex:int;
+
+ private var armyList:Array;
+
+ public function ArmySetLine1()
+ {
+ super();
+ this.css = new TextFormat();
+ this.css.align = "center";
+ this.css.size = 12;
+ this.css.color = 16777215;
+ this.centerCss = new TextFormat();
+ this.centerCss.align = "center";
+ this.heroName = PublicMethod.getTextFieldWithFillter(16777215,64);
+ this.heroLevel = PublicMethod.getTextFieldWithFillter(16777215,44);
+ this.heroCareer = PublicMethod.getTextFieldWithFillter(16777215,67);
+ this.armyType = new ComboBox();
+ this.armyType.setSize(86,22);
+ this.armyType.addEventListener(Event.CHANGE,this.selectArmy);
+ this.input = new PageInputMc2();
+ this.input.setMinNum(0);
+ this.input.setMaxLen(7);
+ this.nums = PublicMethod.getTextFieldWithFillter(16777215,58);
+ this.okBtn = new UISmallBtn("确 定",2);
+ this.okBtn.onClick = this.saveArmy;
+ this.heroName.y = 5;
+ this.heroLevel.x = this.heroName.x + this.heroName.width;
+ this.heroLevel.y = this.heroName.y;
+ this.heroCareer.x = this.heroLevel.x + this.heroLevel.width;
+ this.heroCareer.y = this.heroLevel.y;
+ this.armyType.x = this.heroCareer.x + this.heroCareer.width + 3;
+ this.armyType.y = 2;
+ this.input.x = this.armyType.x + this.armyType.width + 10;
+ this.input.y = 6;
+ this.nums.x = this.input.x + this.input.width - 5;
+ this.nums.y = 4;
+ this.okBtn.x = this.nums.x + this.nums.width + 8;
+ this.okBtn.y = 3;
+ var _loc1_:Sprite = PublicMethod.getTrLine(480);
+ addChild(_loc1_);
+ this.armyType.textField.setStyle("textFormat",this.css);
+ this.armyType.dropdown.setRendererStyle("textFormat",this.css);
+ this.bg = PublicMethod.createShape(UIConfig.overBgColor,480,23);
+ addChild(this.bg);
+ this.bg.y = 1;
+ this.bg.alpha = 0;
+ addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true);
+ addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true);
+ }
+
+ private function rollOut(param1:MouseEvent) : void
+ {
+ if(this.heroObj)
+ {
+ this.bg.alpha = 0;
+ }
+ }
+
+ private function rollOver(param1:MouseEvent) : void
+ {
+ if(this.heroObj)
+ {
+ this.bg.alpha = 0.2;
+ }
+ }
+
+ public function setData(param1:Object) : void
+ {
+ this.heroObj = param1;
+ if(this.heroObj)
+ {
+ this.show(true);
+ this.heroName.htmlText = param1.name;
+ this.heroName.setTextFormat(this.centerCss);
+ this.heroLevel.text = param1.level;
+ this.heroLevel.setTextFormat(this.centerCss);
+ this.heroCareer.text = param1.career;
+ this.heroCareer.setTextFormat(this.centerCss);
+ this.input.setText(param1.armyNum);
+ this.nums.text = param1.finalLead;
+ this.input.setMaxNum(param1.finalLead);
+ }
+ else
+ {
+ this.show(false);
+ }
+ }
+
+ private function show(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ if(!contains(this.heroName))
+ {
+ addChild(this.heroName);
+ addChild(this.heroLevel);
+ addChild(this.heroCareer);
+ addChild(this.input);
+ addChild(this.nums);
+ addChild(this.okBtn);
+ this.armyType.visible = true;
+ }
+ }
+ else if(contains(this.heroName))
+ {
+ removeChild(this.heroName);
+ removeChild(this.heroLevel);
+ removeChild(this.heroCareer);
+ removeChild(this.input);
+ removeChild(this.nums);
+ removeChild(this.okBtn);
+ this.armyType.visible = false;
+ }
+ }
+
+ public function getHeroObj() : Object
+ {
+ return this.heroObj;
+ }
+
+ private function selectArmy(param1:Event) : void
+ {
+ var _loc2_:int = int(this.armyType.selectedItem.data);
+ this.setSelectArmy(_loc2_);
+ }
+
+ private function setSelectArmy(param1:int) : void
+ {
+ var _loc2_:Object = null;
+ if(param1 == 0)
+ {
+ this.input.setMaxNum(0);
+ }
+ else
+ {
+ for each(_loc2_ in this.armyList)
+ {
+ if(param1 == _loc2_.armyEntId)
+ {
+ if(_loc2_.armyNum < this.heroObj.finalLead)
+ {
+ this.input.setMaxNum(_loc2_.armyNum);
+ break;
+ }
+ this.input.setMaxNum(this.heroObj.finalLead);
+ break;
+ }
+ }
+ }
+ this.input.setText(0);
+ this.css.color = 16777215;
+ this.armyType.textField.setStyle("textFormat",this.css);
+ }
+
+ public function addCombox(param1:HashMap) : void
+ {
+ var _loc2_:Object = null;
+ var _loc5_:Object = null;
+ var _loc6_:Object = null;
+ this.armyList = param1.values();
+ if(!contains(this.armyType))
+ {
+ addChild(this.armyType);
+ }
+ var _loc3_:DataProvider = new DataProvider();
+ var _loc4_:Object = {
+ "label":"无",
+ "data":0
+ };
+ _loc3_.addItem(_loc4_);
+ if(this.heroObj.armyEntId == 0)
+ {
+ this.armyType.selectedItem = _loc4_;
+ _loc2_ = _loc4_;
+ this.input.setMaxNum(0);
+ }
+ if(this.armyList.length > 0)
+ {
+ for each(_loc5_ in this.armyList)
+ {
+ _loc6_ = {
+ "label":_loc5_.armyName,
+ "data":_loc5_.armyEntId
+ };
+ _loc3_.addItem(_loc6_);
+ if(this.heroObj.armyEntId == _loc5_.armyEntId)
+ {
+ _loc2_ = _loc6_;
+ if(_loc5_.armyNum < this.heroObj.finalLead)
+ {
+ this.input.setMaxNum(_loc5_.armyNum + this.input.getText());
+ }
+ }
+ }
+ }
+ this.armyType.dataProvider = _loc3_;
+ this.armyType.selectedItem = _loc2_;
+ this.armyType.textField.setStyle("textFormat",this.css);
+ }
+
+ public function getSaveObj() : Object
+ {
+ var _loc1_:int = int(this.armyType.selectedItem.data);
+ var _loc2_:Object = new Object();
+ _loc2_.heroId = this.heroObj.heroId + "";
+ _loc2_.armyEntId = _loc1_.toString();
+ _loc2_.armyNum = this.input.getText().toString();
+ _loc2_.armyName = this.getArmyName();
+ return _loc2_;
+ }
+
+ private function saveArmy(param1:MouseEvent) : void
+ {
+ var _loc2_:Array = new Array();
+ _loc2_.push(this.getSaveObj());
+ ConnectService.getInstance().battleService.saveChangeArmy(_loc2_);
+ }
+
+ public function getInput() : PageInputMc2
+ {
+ return this.input;
+ }
+
+ public function getComboxSelect() : int
+ {
+ return this.armyType.selectedItem.data;
+ }
+
+ public function getArmyName() : String
+ {
+ return this.armyType.selectedItem.label;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/army/ArmySetLine2.as b/flash_decompiled/com/view/ui/army/ArmySetLine2.as
new file mode 100644
index 0000000..784cf5e
--- /dev/null
+++ b/flash_decompiled/com/view/ui/army/ArmySetLine2.as
@@ -0,0 +1,55 @@
+package com.view.ui.army
+{
+ import com.common.PublicMethod;
+ import flash.display.Sprite;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class ArmySetLine2 extends Sprite
+ {
+
+ private var centerCss:TextFormat;
+
+ private var armyName:TextField;
+
+ private var armyNums:TextField;
+
+ public function ArmySetLine2()
+ {
+ super();
+ this.centerCss = new TextFormat();
+ this.centerCss.align = "center";
+ this.armyName = PublicMethod.getTextFieldWithFillter(16777215,69);
+ this.armyNums = PublicMethod.getTextFieldWithFillter(16777215,65);
+ addChild(this.armyName);
+ addChild(this.armyNums);
+ this.armyNums.x = this.armyName.width;
+ this.armyName.y = 3;
+ this.armyNums.y = this.armyName.y;
+ var _loc1_:Sprite = PublicMethod.getTrLine(144);
+ addChild(_loc1_);
+ }
+
+ public function setData(param1:Object) : void
+ {
+ if(param1)
+ {
+ if(!contains(this.armyName))
+ {
+ addChild(this.armyName);
+ addChild(this.armyNums);
+ }
+ this.armyName.text = param1.armyName;
+ this.armyNums.text = param1.armyNum;
+ this.armyName.setTextFormat(this.centerCss);
+ this.armyNums.setTextFormat(this.centerCss);
+ }
+ else if(contains(this.armyName))
+ {
+ removeChild(this.armyName);
+ removeChild(this.armyNums);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/army/ArmySetUI.as b/flash_decompiled/com/view/ui/army/ArmySetUI.as
new file mode 100644
index 0000000..44db7eb
--- /dev/null
+++ b/flash_decompiled/com/view/ui/army/ArmySetUI.as
@@ -0,0 +1,477 @@
+package com.view.ui.army
+{
+ import com.control.ConnectService;
+ import com.control.battle.event.BattleEvent;
+ import com.utils.HashMap;
+ import com.view.newui.UIButton;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class ArmySetUI extends BaseUI
+ {
+
+ public static var instance:ArmySetUI;
+
+ private var bg1:UIWindowBg;
+
+ private var table1:UITable;
+
+ private var table2:UITable;
+
+ private var heroScrollPane:ScrollPane;
+
+ private var heroListMc:Sprite;
+
+ private var heroListVec:Vector.;
+
+ private var armyScrollPane:ScrollPane;
+
+ private var armyListMc:Sprite;
+
+ private var armyListVec:Vector.;
+
+ private var armyList:Array;
+
+ public function ArmySetUI()
+ {
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_tongbingpeizhi);
+ super.setPosition();
+ this.createUI();
+ }
+
+ public static function getInstance() : ArmySetUI
+ {
+ if(instance == null)
+ {
+ instance = new ArmySetUI();
+ }
+ return instance;
+ }
+
+ override public function createUI() : void
+ {
+ var _loc5_:UIButton = null;
+ var _loc6_:UIButton = null;
+ this.bg1 = new UIWindowBg();
+ this.bg1.initSecondPanel(630,400);
+ addChild(this.bg1);
+ this.bg1.x = 11;
+ this.bg1.y = 39;
+ var _loc1_:Array = ["武将名","等级","职业","统兵","统兵数量","操作"];
+ var _loc2_:Array = [63,45,70,90,153,70];
+ this.table1 = new UITable();
+ this.table1.drawLine = false;
+ this.table1.install(14,_loc1_,_loc2_);
+ this.bg1.addChild(this.table1);
+ this.table1.x = 4;
+ this.table1.y = 4;
+ var _loc3_:Array = ["兵种","空闲"];
+ var _loc4_:Array = [72,72];
+ this.table2 = new UITable();
+ this.table2.drawLine = false;
+ this.table2.install(14,_loc3_,_loc4_);
+ this.bg1.addChild(this.table2);
+ this.table2.x = 495;
+ this.table2.y = this.table1.y;
+ this.initData();
+ _loc5_ = new UIButton("全部清空",2,10);
+ this.bg1.addChild(_loc5_);
+ _loc5_.x = 5;
+ _loc5_.y = 381;
+ _loc6_ = new UIButton("全部补满",2,10);
+ this.bg1.addChild(_loc6_);
+ _loc6_.x = _loc5_.x + _loc5_.width + 10;
+ _loc6_.y = _loc5_.y;
+ var _loc7_:UIButton = new UIButton("全部确定",2,10);
+ this.bg1.addChild(_loc7_);
+ _loc7_.x = 500;
+ _loc7_.y = _loc5_.y;
+ _loc7_.onClick = this.saveAll;
+ _loc5_.onClick = this.clearAll;
+ _loc6_.onClick = this.fullAll;
+ var _loc8_:UIButton = new UIButton("返 回",2,10);
+ this.bg1.addChild(_loc8_);
+ _loc8_.x = _loc7_.x + _loc7_.width + 10;
+ _loc8_.y = _loc7_.y;
+ _loc8_.onClick = this.closeUI;
+ }
+
+ override public function setPosition() : void
+ {
+ if(parent == face.stage)
+ {
+ super.setPosition();
+ }
+ }
+
+ override public function closeUI(param1:MouseEvent) : void
+ {
+ if(parent == face.stage)
+ {
+ super.closeUI(param1);
+ }
+ else
+ {
+ super.closeUI2();
+ }
+ }
+
+ public function open(param1:*) : void
+ {
+ if(param1 == face.stage)
+ {
+ super.show();
+ }
+ else
+ {
+ param1.addChild(this);
+ }
+ }
+
+ private function initData() : void
+ {
+ var _loc3_:ArmySetLine1 = null;
+ var _loc4_:ArmySetLine2 = null;
+ this.heroScrollPane = new ScrollPane();
+ this.heroScrollPane.setSize(485,350);
+ this.heroScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.table1.addChild(this.heroScrollPane);
+ this.heroScrollPane.x = 1;
+ this.heroScrollPane.y = 25;
+ this.heroListMc = new Sprite();
+ this.heroScrollPane.source = this.heroListMc;
+ this.heroListVec = new Vector.();
+ var _loc1_:int = 0;
+ while(_loc1_ < 14)
+ {
+ _loc3_ = new ArmySetLine1();
+ this.heroListMc.addChild(_loc3_);
+ this.heroListVec.push(_loc3_);
+ _loc3_.y = _loc1_ * 25;
+ _loc3_.x = 4;
+ _loc1_++;
+ }
+ this.heroScrollPane.update();
+ this.armyScrollPane = new ScrollPane();
+ this.armyScrollPane.setSize(140,350);
+ this.armyScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.table2.addChild(this.armyScrollPane);
+ this.armyScrollPane.y = 25;
+ this.heroScrollPane.x = 1;
+ this.armyListMc = new Sprite();
+ this.armyScrollPane.source = this.armyListMc;
+ this.armyListVec = new Vector.();
+ var _loc2_:int = 0;
+ while(_loc2_ < 14)
+ {
+ _loc4_ = new ArmySetLine2();
+ this.armyListMc.addChild(_loc4_);
+ this.armyListVec.push(_loc4_);
+ _loc4_.y = _loc2_ * 25;
+ _loc4_.x = 4;
+ _loc2_++;
+ }
+ this.armyScrollPane.update();
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getArmyList();
+ ConnectService.getInstance().addEventListener(BattleEvent.ARMY_SET_LIST,this.getArmySetList);
+ ConnectService.getInstance().addEventListener(BattleEvent.ARMY_SET_CHANGE,this.changeArmySetResult);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ this.clear();
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BattleEvent.ARMY_SET_LIST,this.getArmySetList);
+ ConnectService.getInstance().removeEventListener(BattleEvent.ARMY_SET_CHANGE,this.changeArmySetResult);
+ }
+
+ private function clear() : void
+ {
+ var _loc1_:int = int(this.heroListVec.length);
+ var _loc2_:* = int(_loc1_ - 1);
+ while(_loc2_ >= 0)
+ {
+ if(_loc2_ < 14)
+ {
+ this.heroListVec[_loc2_].setData(null);
+ }
+ else
+ {
+ this.heroListMc.removeChild(this.heroListVec[_loc2_]);
+ this.heroListVec.splice(_loc2_,1);
+ }
+ _loc2_--;
+ }
+ this.heroScrollPane.update();
+ this.clearArmyList();
+ }
+
+ private function clearArmyList() : void
+ {
+ var _loc1_:int = int(this.armyListVec.length);
+ var _loc2_:* = int(_loc1_ - 1);
+ while(_loc2_ >= 0)
+ {
+ if(_loc2_ < 14)
+ {
+ this.armyListVec[_loc2_].setData(null);
+ }
+ else
+ {
+ this.armyListMc.removeChild(this.armyListVec[_loc2_]);
+ this.armyListVec.splice(_loc2_,1);
+ }
+ _loc2_--;
+ }
+ this.armyScrollPane.update();
+ }
+
+ private function getArmyList() : void
+ {
+ ConnectService.getInstance().battleService.getChangeArmyView();
+ }
+
+ private function getArmySetList(param1:BattleEvent) : void
+ {
+ var _loc6_:ComboxArmy = null;
+ var _loc9_:int = 0;
+ var _loc11_:ArmySetLine1 = null;
+ var _loc12_:Object = null;
+ var _loc13_:Object = null;
+ var _loc14_:ArmySetLine2 = null;
+ var _loc2_:Object = param1.armyObj;
+ var _loc3_:Array = _loc2_.heroList;
+ var _loc4_:int = int(_loc3_.length);
+ this.clear();
+ var _loc5_:HashMap = new HashMap();
+ var _loc7_:int = 0;
+ while(_loc7_ < _loc4_)
+ {
+ _loc12_ = _loc3_[_loc7_] as Object;
+ if(_loc7_ > 13)
+ {
+ _loc11_ = new ArmySetLine1();
+ this.heroListMc.addChild(_loc11_);
+ this.heroListVec.push(_loc11_);
+ _loc11_.y = _loc7_ * 25;
+ _loc11_.x = 4;
+ }
+ this.heroListVec[_loc7_].setData(_loc12_);
+ if(_loc12_.armyEntId != 0)
+ {
+ if(!_loc5_.containsKey(_loc12_.armyEntId))
+ {
+ _loc6_ = new ComboxArmy();
+ _loc6_.armyEntId = _loc12_.armyEntId;
+ _loc6_.armyName = _loc12_.armyName;
+ _loc6_.armyNum = 0;
+ _loc5_.put(_loc12_.armyEntId,_loc6_);
+ }
+ }
+ _loc7_++;
+ }
+ this.heroScrollPane.update();
+ this.armyList = _loc2_.castleArmyList;
+ var _loc8_:int = int(this.armyList.length);
+ var _loc10_:int = 0;
+ while(_loc10_ < _loc8_)
+ {
+ _loc13_ = this.armyList[_loc10_] as Object;
+ if(_loc13_.armyNum != 0)
+ {
+ if(_loc9_ > 11)
+ {
+ _loc14_ = new ArmySetLine2();
+ this.armyListMc.addChild(_loc14_);
+ this.armyListVec.push(_loc14_);
+ _loc14_.y = _loc9_ * 24;
+ }
+ if(_loc13_.armyEntId != 0)
+ {
+ if(!_loc5_.containsKey(_loc13_.armyEntId))
+ {
+ _loc6_ = new ComboxArmy();
+ _loc6_.armyEntId = _loc13_.armyEntId;
+ _loc6_.armyName = _loc13_.armyName;
+ _loc6_.armyNum = _loc13_.armyNum;
+ _loc5_.put(_loc13_.armyEntId,_loc6_);
+ }
+ else
+ {
+ _loc6_ = _loc5_.get(_loc13_.armyEntId);
+ _loc6_.armyNum += _loc13_.armyNum;
+ }
+ this.armyListVec[_loc9_].setData(_loc13_);
+ _loc9_++;
+ }
+ }
+ _loc10_++;
+ }
+ this.armyScrollPane.update();
+ for each(_loc11_ in this.heroListVec)
+ {
+ if(_loc11_.getHeroObj())
+ {
+ _loc11_.addCombox(_loc5_);
+ }
+ }
+ }
+
+ private function saveAll(param1:MouseEvent) : void
+ {
+ var _loc3_:ArmySetLine1 = null;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroListVec)
+ {
+ if(_loc3_.getHeroObj() != null)
+ {
+ _loc2_.push(_loc3_.getSaveObj());
+ }
+ }
+ ConnectService.getInstance().battleService.saveChangeArmy(_loc2_);
+ }
+
+ private function changeArmySetResult(param1:BattleEvent) : void
+ {
+ this.getArmyList();
+ }
+
+ private function clearAll(param1:MouseEvent) : void
+ {
+ var _loc3_:ArmySetLine1 = null;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroListVec)
+ {
+ if(_loc3_.getHeroObj() != null && _loc3_.getComboxSelect() > 0)
+ {
+ _loc3_.getInput().setText(0);
+ _loc2_.push(_loc3_.getSaveObj());
+ }
+ }
+ if(_loc2_.length > 0)
+ {
+ ConnectService.getInstance().battleService.saveChangeArmy(_loc2_);
+ }
+ }
+
+ private function getArmyNumsByid(param1:int) : int
+ {
+ var _loc2_:Object = null;
+ if(this.armyList == null || this.armyList.length == 0)
+ {
+ return 0;
+ }
+ for each(_loc2_ in this.armyList)
+ {
+ if(_loc2_.armyEntId == param1)
+ {
+ return _loc2_.armyNum;
+ }
+ }
+ return 0;
+ }
+
+ private function updateArmyNums(param1:int, param2:int) : void
+ {
+ var _loc3_:Object = null;
+ for each(_loc3_ in this.armyList)
+ {
+ if(_loc3_.armyEntId == param1)
+ {
+ _loc3_.armyNum -= param2;
+ break;
+ }
+ }
+ }
+
+ private function fullAll(param1:MouseEvent) : void
+ {
+ var _loc3_:Object = null;
+ var _loc4_:ArmySetLine1 = null;
+ var _loc5_:Object = null;
+ var _loc6_:int = 0;
+ var _loc7_:int = 0;
+ var _loc8_:int = 0;
+ var _loc9_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc4_ in this.heroListVec)
+ {
+ _loc5_ = _loc4_.getHeroObj();
+ if(_loc5_ == null)
+ {
+ continue;
+ }
+ _loc6_ = _loc4_.getComboxSelect();
+ if(_loc6_ <= 0)
+ {
+ _loc3_ = _loc4_.getSaveObj();
+ _loc3_.armyNum = "0";
+ _loc2_.push(_loc3_);
+ }
+ else
+ {
+ _loc7_ = this.getArmyNumsByid(_loc6_);
+ if(_loc7_ == 0)
+ {
+ if(_loc6_ != _loc5_.armyEntId)
+ {
+ _loc3_ = _loc4_.getSaveObj();
+ _loc3_.armyNum = "0";
+ }
+ else
+ {
+ _loc3_ = _loc4_.getSaveObj();
+ _loc3_.armyNum = _loc5_.armyNum.toString();
+ }
+ _loc2_.push(_loc3_);
+ }
+ else
+ {
+ if(_loc6_ != _loc5_.armyEntId)
+ {
+ _loc8_ = int(_loc4_.getHeroObj().finalLead);
+ _loc9_ = 0;
+ }
+ else
+ {
+ _loc9_ = int(_loc4_.getHeroObj().armyNum);
+ _loc8_ = _loc4_.getHeroObj().finalLead - _loc4_.getHeroObj().armyNum;
+ }
+ if(_loc7_ > _loc8_)
+ {
+ _loc3_ = _loc4_.getSaveObj();
+ _loc3_.armyNum = String(_loc9_ + _loc8_);
+ this.updateArmyNums(_loc6_,_loc8_);
+ }
+ else
+ {
+ _loc3_ = _loc4_.getSaveObj();
+ _loc3_.armyNum = String(_loc5_.armyNum + _loc7_);
+ this.updateArmyNums(_loc6_,0);
+ }
+ _loc2_.push(_loc3_);
+ }
+ }
+ }
+ if(_loc2_.length > 0)
+ {
+ ConnectService.getInstance().battleService.saveChangeArmy(_loc2_);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/army/ComboxArmy.as b/flash_decompiled/com/view/ui/army/ComboxArmy.as
new file mode 100644
index 0000000..3ab9497
--- /dev/null
+++ b/flash_decompiled/com/view/ui/army/ComboxArmy.as
@@ -0,0 +1,18 @@
+package com.view.ui.army
+{
+ public class ComboxArmy
+ {
+
+ public var armyEntId:int;
+
+ public var armyName:String;
+
+ public var armyNum:int;
+
+ public function ComboxArmy()
+ {
+ super();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/armyboss/ArmyBoss.as b/flash_decompiled/com/view/ui/armyboss/ArmyBoss.as
new file mode 100644
index 0000000..dd14b34
--- /dev/null
+++ b/flash_decompiled/com/view/ui/armyboss/ArmyBoss.as
@@ -0,0 +1,44 @@
+package com.view.ui.armyboss
+{
+ import com.view.ui.BaseBuild;
+ import com.view.ui.BuildData;
+ import com.view.ui.activity.SystemUI;
+ import flash.display.MovieClip;
+ import flash.events.MouseEvent;
+
+ public class ArmyBoss extends BaseBuild
+ {
+
+ private var tipStr:String;
+
+ public function ArmyBoss(param1:BuildData)
+ {
+ super();
+ param1.swfUrl = "pic/build/system.swf";
+ super.buildData = param1;
+ super.loadSwfBg();
+ super.addEvent();
+ this.buttonMode = true;
+ }
+
+ override public function createNpcTipStr() : void
+ {
+ }
+
+ override public function mouseClick(param1:MouseEvent) : void
+ {
+ super.mouseClick(param1);
+ if(buildUI == null)
+ {
+ buildUI = new SystemUI();
+ }
+ buildUI.show();
+ }
+
+ override public function getBuildNameMc() : MovieClip
+ {
+ return null;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/AddBabelExpUI.as b/flash_decompiled/com/view/ui/babel/AddBabelExpUI.as
new file mode 100644
index 0000000..090d455
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/AddBabelExpUI.as
@@ -0,0 +1,78 @@
+package com.view.ui.babel
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class AddBabelExpUI extends UIWindowBg
+ {
+
+ private var type:int;
+
+ private var bg:UIWindowBg;
+
+ private var inputBar:TextField;
+
+ public function AddBabelExpUI(param1:int = 1)
+ {
+ var _loc4_:UIButton = null;
+ super();
+ this.type = param1;
+ initSize(75,140);
+ loadTitle(UITitleConfig.title_zenjiajingyan);
+ addCloseBtn();
+ initBg();
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(226,120);
+ bg1.addChild(this.bg);
+ this.bg.x = 20;
+ this.bg.y = 20;
+ this.inputBar = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ this.inputBar.height = 58;
+ this.inputBar.multiline = true;
+ this.inputBar.wordWrap = true;
+ this.bg.addChild(this.inputBar);
+ this.inputBar.x = 10;
+ this.inputBar.y = 10;
+ var _loc2_:TextFormat = new TextFormat();
+ _loc2_.leading = 4;
+ this.inputBar.defaultTextFormat = _loc2_;
+ var _loc3_:UIButton = new UIButton("提 交",2,10);
+ addChild(_loc3_);
+ _loc3_.x = 70;
+ _loc3_.y = 152;
+ _loc4_ = new UIButton("取 消",2,10);
+ addChild(_loc4_);
+ _loc4_.x = 172;
+ _loc4_.y = _loc3_.y;
+ _loc4_.onClick = this.closeThis;
+ _loc3_.onClick = this.submit;
+ }
+
+ private function closeThis(param1:MouseEvent) : void
+ {
+ closeSelf(null);
+ }
+
+ public function setData(param1:String) : void
+ {
+ this.inputBar.htmlText = param1;
+ }
+
+ private function submit(param1:MouseEvent) : void
+ {
+ if(this.type == 1)
+ {
+ ConnectService.getInstance().babelService.useAddExp();
+ }
+ closeSelf(param1);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/AddBabelRevocerUI.as b/flash_decompiled/com/view/ui/babel/AddBabelRevocerUI.as
new file mode 100644
index 0000000..b5ee05c
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/AddBabelRevocerUI.as
@@ -0,0 +1,67 @@
+package com.view.ui.babel
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class AddBabelRevocerUI extends UIWindowBg
+ {
+
+ private var bg:UIWindowBg;
+
+ private var inputBar:TextField;
+
+ public function AddBabelRevocerUI()
+ {
+ var _loc3_:UIButton = null;
+ super();
+ initSize(75,140);
+ loadTitle(UITitleConfig.title_shuangbeidiaoluo);
+ addCloseBtn();
+ initBg();
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(226,120);
+ bg1.addChild(this.bg);
+ this.bg.x = 20;
+ this.bg.y = 20;
+ this.inputBar = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ this.inputBar.height = 58;
+ this.inputBar.multiline = true;
+ this.inputBar.wordWrap = true;
+ this.bg.addChild(this.inputBar);
+ this.inputBar.x = 10;
+ this.inputBar.y = 10;
+ var _loc1_:TextFormat = new TextFormat();
+ _loc1_.leading = 4;
+ this.inputBar.defaultTextFormat = _loc1_;
+ var _loc2_:UIButton = new UIButton("提 交",2,10);
+ addChild(_loc2_);
+ _loc2_.x = 70;
+ _loc2_.y = 152;
+ _loc3_ = new UIButton("取 消",2,10);
+ addChild(_loc3_);
+ _loc3_.x = 172;
+ _loc3_.y = _loc2_.y;
+ _loc3_.onClick = closeSelf;
+ _loc2_.onClick = this.submit;
+ }
+
+ public function setData(param1:String) : void
+ {
+ this.inputBar.htmlText = param1;
+ }
+
+ private function submit(param1:MouseEvent) : void
+ {
+ ConnectService.getInstance().babelService.useBabelRecover();
+ closeSelf(param1);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/AddDoubleDropUI.as b/flash_decompiled/com/view/ui/babel/AddDoubleDropUI.as
new file mode 100644
index 0000000..955432d
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/AddDoubleDropUI.as
@@ -0,0 +1,77 @@
+package com.view.ui.babel
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class AddDoubleDropUI extends UIWindowBg
+ {
+
+ private var bg:UIWindowBg;
+
+ private var currType:int;
+
+ private var inputBar:TextField;
+
+ public function AddDoubleDropUI(param1:int = 1)
+ {
+ var _loc4_:UIButton = null;
+ super();
+ this.currType = param1;
+ initSize(75,140);
+ loadTitle(UITitleConfig.title_zenjiahuifu);
+ addCloseBtn();
+ initBg();
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(226,120);
+ bg1.addChild(this.bg);
+ this.bg.x = 20;
+ this.bg.y = 20;
+ this.inputBar = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ this.inputBar.height = 58;
+ this.inputBar.multiline = true;
+ this.inputBar.wordWrap = true;
+ this.bg.addChild(this.inputBar);
+ this.inputBar.x = 10;
+ this.inputBar.y = 10;
+ var _loc2_:TextFormat = new TextFormat();
+ _loc2_.leading = 4;
+ this.inputBar.defaultTextFormat = _loc2_;
+ var _loc3_:UIButton = new UIButton("提 交",2,10);
+ addChild(_loc3_);
+ _loc3_.x = 70;
+ _loc3_.y = 152;
+ _loc4_ = new UIButton("取 消",2,10);
+ addChild(_loc4_);
+ _loc4_.x = 172;
+ _loc4_.y = _loc3_.y;
+ _loc4_.onClick = closeSelf;
+ _loc3_.onClick = this.submit;
+ }
+
+ public function setData(param1:String) : void
+ {
+ this.inputBar.htmlText = param1;
+ }
+
+ private function submit(param1:MouseEvent) : void
+ {
+ if(this.currType == 1)
+ {
+ ConnectService.getInstance().babelService.useDoubleDrop();
+ }
+ else if(this.currType == 2)
+ {
+ ConnectService.getInstance().babelService.useDoubleDrop1();
+ }
+ closeSelf(param1);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelBuild.as b/flash_decompiled/com/view/ui/babel/BabelBuild.as
new file mode 100644
index 0000000..c2598b7
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelBuild.as
@@ -0,0 +1,51 @@
+package com.view.ui.babel
+{
+ import com.view.ui.BaseBuild;
+ import com.view.ui.BuildData;
+ import flash.display.MovieClip;
+ import flash.events.MouseEvent;
+
+ public class BabelBuild extends BaseBuild
+ {
+
+ public function BabelBuild(param1:BuildData)
+ {
+ super();
+ param1.swfUrl = "pic/build/chuangzhen.swf";
+ super.buildData = param1;
+ super.loadSwfBg();
+ super.addEvent();
+ super.createNpcTip();
+ this.buttonMode = true;
+ }
+
+ override public function createNpcTipStr() : void
+ {
+ npcTipStr = "勇闯重楼
";
+ npcTipStr += "木工祖师鲁班穷毕生所学制成的机关塔楼,探索此塔可得到大量经验和神秘道具
";
+ npcTipStr += "君主10级可参加";
+ }
+
+ override public function mouseClick(param1:MouseEvent) : void
+ {
+ if(buildUI == null)
+ {
+ buildUI = new BabelMainUI();
+ }
+ buildUI.show();
+ }
+
+ override public function getBuildNameMc() : MovieClip
+ {
+ if(_nameMc == null)
+ {
+ _nameMc = getBuildNameSp("勇闯重楼");
+ _nameMc.mouseEnabled = false;
+ _nameMc.mouseChildren = false;
+ setNameMcPosi();
+ }
+ return _nameMc;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelBuildUI.as b/flash_decompiled/com/view/ui/babel/BabelBuildUI.as
new file mode 100644
index 0000000..1269057
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelBuildUI.as
@@ -0,0 +1,872 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.newdata.user.NewUserData;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UISmallBtn;
+ import com.view.newui.UITabBtn;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.message.MessageBoxUI;
+ import com.view.ui.tools.ToolView;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class BabelBuildUI extends PlayUI
+ {
+
+ private var bg1:Sprite;
+
+ private var page1:BabelPage1;
+
+ private var page2:BabelPage2;
+
+ private var page3:BabelPage3;
+
+ private var page4:BabelPage4;
+
+ private var page5:BabelPage5;
+
+ private var page6:BabelPage6;
+
+ private var page7:BabelPage7;
+
+ private var page8:BabelPage8;
+
+ private var page9:BabelPage9;
+
+ private var page10:BabelPage10;
+
+ private var bg2:UIWindowBg;
+
+ private var bgSp:Sprite;
+
+ private var btnArr:Array;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var useExp:TextField;
+
+ private var useRecover:TextField;
+
+ private var btn_1:UITabBtn;
+
+ private var btn_2:UITabBtn;
+
+ private var btn_3:UITabBtn;
+
+ private var btn_4:UITabBtn;
+
+ private var btn_5:UITabBtn;
+
+ private var btn_6:UITabBtn;
+
+ private var btn_7:UITabBtn;
+
+ private var btn_8:UITabBtn;
+
+ private var btn_9:UITabBtn;
+
+ private var btn_10:UITabBtn;
+
+ private var lastTab:UITabBtn;
+
+ private var prePage:Sprite;
+
+ private var enterBtn:UIButton;
+
+ private var towerObj:Object;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var topStageId:int;
+
+ private var babelEnterUI:BabelEnterUI;
+
+ private var babelEnterUI1:BabelEnterUI1;
+
+ private var babelEnterUI2:BabelEnterUI2;
+
+ private var babelEnterUI3:BabelEnterUI3;
+
+ private var babelEnterUI4:BabelEnterUI4;
+
+ private var babelEnterUI5:BabelEnterUI5;
+
+ private var babelEnterUI6:BabelEnterUI6;
+
+ private var babelEnterUI7:BabelEnterUI7;
+
+ private var babelEnterUI8:BabelEnterUI8;
+
+ private var babelEnterUI9:BabelEnterUI9;
+
+ public function BabelBuildUI()
+ {
+ super();
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w + 32;
+ window_heihgt = UIWindowBg.normal_window_h;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640 + 32;
+ ui_closeBtn.y = 10;
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition2();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc1_:int = 0;
+ var _loc2_:UITabBtn = null;
+ var _loc3_:UIWindowBg = null;
+ var _loc4_:UIWindowBg = null;
+ var _loc5_:UITitleBg = null;
+ var _loc6_:UITitleBg = null;
+ var _loc7_:UISmallBtn = null;
+ super.createUI();
+ super.loadTitle(UITitleConfig.title_babel_1);
+ this.btnArr = new Array();
+ this.btn_1 = new UITabBtn(CommonData.babelNameArr[0],2);
+ this.btn_2 = new UITabBtn(CommonData.babelNameArr[1],2);
+ this.btn_3 = new UITabBtn(CommonData.babelNameArr[2],2);
+ this.btn_4 = new UITabBtn(CommonData.babelNameArr[3],2);
+ this.btn_5 = new UITabBtn(CommonData.babelNameArr[4],2);
+ this.btn_6 = new UITabBtn(CommonData.babelNameArr[5],2);
+ this.btn_7 = new UITabBtn(CommonData.babelNameArr[6],2);
+ this.btn_8 = new UITabBtn(CommonData.babelNameArr[7],2);
+ this.btn_9 = new UITabBtn(CommonData.babelNameArr[8],2);
+ this.btn_10 = new UITabBtn(CommonData.babelNameArr[9],2);
+ this.btn_10.visible = false;
+ this.btnArr.push(this.btn_1);
+ this.btnArr.push(this.btn_2);
+ this.btnArr.push(this.btn_3);
+ this.btnArr.push(this.btn_4);
+ this.btnArr.push(this.btn_5);
+ this.btnArr.push(this.btn_6);
+ this.btnArr.push(this.btn_7);
+ this.btnArr.push(this.btn_8);
+ this.btnArr.push(this.btn_9);
+ this.btnArr.push(this.btn_10);
+ for each(_loc2_ in this.btnArr)
+ {
+ addChild(_loc2_);
+ _loc2_.x = 15 + _loc1_ * 66;
+ _loc2_.y = 40;
+ _loc2_.onClick = this.changeType;
+ _loc1_++;
+ }
+ _loc3_ = new UIWindowBg();
+ _loc3_.initSecondPanel(630 + 32,375);
+ addChild(_loc3_);
+ _loc3_.x = 11;
+ _loc3_.y = 65;
+ this.bg2 = new UIWindowBg();
+ this.bg2.initSecondPanel(385,366);
+ _loc3_.addChild(this.bg2);
+ this.bg2.x = 4;
+ this.bg2.y = 4;
+ _loc4_ = new UIWindowBg();
+ _loc4_.initThirdPanel(222 + 32,366);
+ _loc3_.addChild(_loc4_);
+ _loc4_.x = this.bg2.x + this.bg2.width + 4;
+ _loc4_.y = this.bg2.y;
+ _loc5_ = new UITitleBg("活动介绍",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ _loc6_ = new UITitleBg("参加活动",_loc4_.width);
+ _loc4_.addChild(_loc6_);
+ _loc6_.x = int(_loc4_.width / 2 - _loc6_.width / 2);
+ _loc6_.y = 230;
+ this.page1 = new BabelPage1();
+ _loc3_.addChild(this.page1);
+ this.page1.x = 4;
+ this.page1.y = 4;
+ this.page2 = new BabelPage2();
+ _loc3_.addChild(this.page2);
+ this.page2.visible = false;
+ this.page2.x = 4;
+ this.page2.y = 4;
+ this.page3 = new BabelPage3();
+ _loc3_.addChild(this.page3);
+ this.page3.visible = false;
+ this.page3.x = 4;
+ this.page3.y = 4;
+ this.page4 = new BabelPage4();
+ _loc3_.addChild(this.page4);
+ this.page4.visible = false;
+ this.page4.x = 4;
+ this.page4.y = 4;
+ this.page5 = new BabelPage5();
+ _loc3_.addChild(this.page5);
+ this.page5.visible = false;
+ this.page5.x = 4;
+ this.page5.y = 4;
+ this.page6 = new BabelPage6();
+ _loc3_.addChild(this.page6);
+ this.page6.visible = false;
+ this.page6.x = 4;
+ this.page6.y = 4;
+ this.page7 = new BabelPage7();
+ _loc3_.addChild(this.page7);
+ this.page7.visible = false;
+ this.page7.x = 4;
+ this.page7.y = 4;
+ this.page8 = new BabelPage8();
+ _loc3_.addChild(this.page8);
+ this.page8.visible = false;
+ this.page8.x = 4;
+ this.page8.y = 4;
+ this.page9 = new BabelPage9();
+ _loc3_.addChild(this.page9);
+ this.page9.visible = false;
+ this.page9.x = 4;
+ this.page9.y = 4;
+ this.page10 = new BabelPage10();
+ _loc3_.addChild(this.page10);
+ this.page10.visible = false;
+ this.page10.x = 4;
+ this.page10.y = 4;
+ this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP));
+ this.enterBtn = new UIButton("进 入",2,10);
+ _loc3_.addChild(this.enterBtn);
+ this.enterBtn.x = 488;
+ this.enterBtn.y = 348;
+ this.addExpBtn = new Button_9("增加经验");
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ this.useExp = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,40);
+ this.useRecover = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,40);
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = 4;
+ this.addExpBtn.y = 212;
+ _loc4_.addChild(this.useExp);
+ this.useExp.x = this.addExpBtn.x + 55;
+ this.useExp.y = this.addExpBtn.y;
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.useExp.x + 40;
+ this.addRecoverBtn.y = this.addExpBtn.y;
+ _loc4_.addChild(this.useRecover);
+ this.useRecover.x = this.addRecoverBtn.x + 65;
+ this.useRecover.y = this.addExpBtn.y;
+ this.addExpBtn.buttonMode = true;
+ this.addRecoverBtn.buttonMode = true;
+ this.enterBtn.onClick = this.selectRound;
+ _loc7_ = new UISmallBtn("购 买",2);
+ _loc3_.addChild(_loc7_);
+ _loc7_.x = 565;
+ _loc7_.y = 283;
+ _loc7_.onClick = this.buyItem;
+ this.entryBabel();
+ this.getAwardList();
+ }
+
+ private function changeType(param1:MouseEvent) : void
+ {
+ var _loc2_:UITabBtn = param1.currentTarget as UITabBtn;
+ if(this.lastTab == _loc2_)
+ {
+ return;
+ }
+ if(this.prePage)
+ {
+ this.prePage.visible = false;
+ }
+ if(this.lastTab)
+ {
+ this.lastTab.select = false;
+ }
+ this.lastTab = _loc2_;
+ this.lastTab.select = true;
+ if(this.lastTab == this.btn_1)
+ {
+ this.page1.visible = true;
+ this.prePage = this.page1;
+ }
+ else if(this.lastTab == this.btn_2)
+ {
+ this.page2.visible = true;
+ this.prePage = this.page2;
+ }
+ else if(this.lastTab == this.btn_3)
+ {
+ this.page3.visible = true;
+ this.prePage = this.page3;
+ }
+ else if(this.lastTab == this.btn_4)
+ {
+ this.page4.visible = true;
+ this.prePage = this.page4;
+ }
+ else if(this.lastTab == this.btn_5)
+ {
+ this.page5.visible = true;
+ this.prePage = this.page5;
+ }
+ else if(this.lastTab == this.btn_6)
+ {
+ this.page6.visible = true;
+ this.prePage = this.page6;
+ }
+ else if(this.lastTab == this.btn_7)
+ {
+ this.page7.visible = true;
+ this.prePage = this.page7;
+ }
+ else if(this.lastTab == this.btn_8)
+ {
+ this.page8.visible = true;
+ this.prePage = this.page8;
+ }
+ else if(this.lastTab == this.btn_9)
+ {
+ this.page9.visible = true;
+ this.prePage = this.page9;
+ }
+ else
+ {
+ this.page10.visible = true;
+ this.prePage = this.page10;
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL,this.getEnterBabelView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_SelectRound,this.enterBabel);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ if(this.page1)
+ {
+ this.entryBabel();
+ }
+ }
+
+ public function getAwardList() : void
+ {
+ ConnectService.getInstance().babelService.getStageAward();
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL,this.getEnterBabelView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_SelectRound,this.enterBabel);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ }
+
+ private function entryBabel() : void
+ {
+ ConnectService.getInstance().babelService.entryBabel();
+ }
+
+ private function getEnterBabelView(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ closeUI(null);
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ this.towerObj = param1.obj;
+ var _loc2_:int = int(this.towerObj.needSelectRound);
+ if(_loc2_ == 1)
+ {
+ this.page1.setData(this.towerObj);
+ this.page2.setData(this.towerObj);
+ this.page3.setData(this.towerObj);
+ this.page4.setData(this.towerObj);
+ this.page5.setData(this.towerObj);
+ this.page6.setData(this.towerObj);
+ this.page7.setData(this.towerObj);
+ this.page8.setData(this.towerObj);
+ this.page9.setData(this.towerObj);
+ this.page10.setData(this.towerObj);
+ if(this.towerObj.addExp > 0)
+ {
+ this.useExp.text = "+" + this.towerObj.addExp + "%";
+ this.addExpBtn.func = null;
+ }
+ else
+ {
+ this.useExp.text = "未使用";
+ this.addExpBtn.func = this.useAddExp;
+ }
+ if(this.towerObj.recover > 0)
+ {
+ this.useRecover.text = "已使用";
+ this.addRecoverBtn.func = null;
+ }
+ else
+ {
+ this.useRecover.text = "未使用";
+ this.addRecoverBtn.func = this.useAddRecover;
+ }
+ this.addExpCash = this.towerObj.addExpCash;
+ this.addExpNum = this.towerObj.addExpNum;
+ this.recoverCash = this.towerObj.recoverCash;
+ }
+ else
+ {
+ this.enterBabelRoom(this.towerObj.stageId);
+ }
+ this.topStageId = this.towerObj.topStageId;
+ if(this.topStageId >= 900)
+ {
+ this.btn_10.visible = true;
+ }
+ else
+ {
+ this.btn_10.visible = false;
+ }
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = 150;
+ this.addBabelExpUI.y = 150;
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的经验
最终获得经验=基础经验*(1+" + this.addExpNum + "%),退出后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.useExp.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = 150;
+ this.addBabelRevocerUI.y = 150;
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.useRecover.text = "已使用";
+ this.addRecoverBtn.func = null;
+ }
+
+ private function selectRound(param1:MouseEvent) : void
+ {
+ if(this.towerObj == null)
+ {
+ return;
+ }
+ if(this.page1.visible)
+ {
+ if(this.towerObj.freeTimes >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.onSubmit);
+ return;
+ }
+ this.onSubmit();
+ return;
+ }
+ if(this.page2.visible)
+ {
+ if(this.topStageId < 100)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[0] + "最高层,没有资格挑战" + CommonData.babelNameArr[1]);
+ return;
+ }
+ if(this.towerObj.freeTimes1 >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes1 >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.enterStage1);
+ return;
+ }
+ this.enterStage1();
+ return;
+ }
+ if(this.page3.visible)
+ {
+ if(this.topStageId < 200)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[1] + "最高层,没有资格挑战" + CommonData.babelNameArr[2]);
+ return;
+ }
+ if(this.towerObj.freeTimes2 >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes2 >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.enterStage2);
+ return;
+ }
+ this.enterStage2();
+ return;
+ }
+ if(this.page4.visible)
+ {
+ if(this.topStageId < 300)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[2] + "最高层,没有资格挑战" + CommonData.babelNameArr[3]);
+ return;
+ }
+ if(this.towerObj.freeTimes3 >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes3 >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.enterStage3);
+ return;
+ }
+ this.enterStage3();
+ return;
+ }
+ if(this.page5.visible)
+ {
+ if(this.topStageId < 400)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[3] + "最高层,没有资格挑战" + CommonData.babelNameArr[4]);
+ return;
+ }
+ if(this.towerObj.freeTimes4 >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes4 >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.enterStage4);
+ return;
+ }
+ this.enterStage4();
+ return;
+ }
+ if(this.page6.visible)
+ {
+ if(this.topStageId < 500)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[4] + "最高层,没有资格挑战" + CommonData.babelNameArr[5]);
+ return;
+ }
+ if(this.towerObj.freeTimes5 >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes5 >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.enterStage5);
+ return;
+ }
+ this.enterStage5();
+ return;
+ }
+ if(this.page7.visible)
+ {
+ if(this.topStageId < 600)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[5] + "最高层,没有资格挑战" + CommonData.babelNameArr[6]);
+ return;
+ }
+ if(this.towerObj.freeTimes6 >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes6 >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.enterStage6);
+ return;
+ }
+ this.enterStage6();
+ return;
+ }
+ if(this.page8.visible)
+ {
+ if(this.topStageId < 700)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[6] + "最高层,没有资格挑战" + CommonData.babelNameArr[7]);
+ return;
+ }
+ if(this.towerObj.freeTimes7 >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes7 >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.enterStage7);
+ return;
+ }
+ this.enterStage7();
+ return;
+ }
+ if(this.page9.visible)
+ {
+ if(this.topStageId < 800)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[7] + "最高层,没有资格挑战" + CommonData.babelNameArr[7]);
+ return;
+ }
+ if(this.towerObj.freeTimes8 >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes8 >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.enterStage8);
+ return;
+ }
+ this.enterStage8();
+ return;
+ }
+ if(this.page10.visible)
+ {
+ if(this.topStageId < 900)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[8] + "最高层,没有资格挑战" + CommonData.babelNameArr[8]);
+ return;
+ }
+ if(this.towerObj.freeTimes9 >= this.towerObj.totalFreeTimes)
+ {
+ if(this.towerObj.itemTimes9 >= this.towerObj.totalItemTimes)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.enterStage9);
+ return;
+ }
+ this.enterStage9();
+ return;
+ }
+ }
+
+ private function enterStage9() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(901);
+ }
+
+ private function enterStage8() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(801);
+ }
+
+ private function enterStage7() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(701);
+ }
+
+ private function enterStage6() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(601);
+ }
+
+ private function enterStage5() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(501);
+ }
+
+ private function enterStage4() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(401);
+ }
+
+ private function enterStage3() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(301);
+ }
+
+ private function enterStage2() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(201);
+ }
+
+ private function enterStage1() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(101);
+ }
+
+ private function onSubmit() : void
+ {
+ var _loc1_:int = this.page1.getStageId();
+ ConnectService.getInstance().babelService.selectRound(_loc1_);
+ }
+
+ private function enterBabel(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.obj as int;
+ this.enterBabelRoom(_loc2_);
+ }
+
+ private function enterBabelRoom(param1:int) : void
+ {
+ if(param1 > 1000)
+ {
+ MessageBoxUI.getInstance().addMessage("请先退出其他楼再进入千重楼");
+ closeUI(null);
+ return;
+ }
+ if(param1 > 900)
+ {
+ if(this.babelEnterUI9 == null)
+ {
+ this.babelEnterUI9 = new BabelEnterUI9();
+ }
+ this.babelEnterUI9.show();
+ }
+ else if(param1 > 800)
+ {
+ if(this.babelEnterUI8 == null)
+ {
+ this.babelEnterUI8 = new BabelEnterUI8();
+ }
+ this.babelEnterUI8.show();
+ }
+ else if(param1 > 700)
+ {
+ if(this.babelEnterUI7 == null)
+ {
+ this.babelEnterUI7 = new BabelEnterUI7();
+ }
+ this.babelEnterUI7.show();
+ }
+ else if(param1 > 600)
+ {
+ if(this.babelEnterUI6 == null)
+ {
+ this.babelEnterUI6 = new BabelEnterUI6();
+ }
+ this.babelEnterUI6.show();
+ }
+ else if(param1 > 500)
+ {
+ if(this.babelEnterUI5 == null)
+ {
+ this.babelEnterUI5 = new BabelEnterUI5();
+ }
+ this.babelEnterUI5.show();
+ }
+ else if(param1 > 400)
+ {
+ if(this.babelEnterUI4 == null)
+ {
+ this.babelEnterUI4 = new BabelEnterUI4();
+ }
+ this.babelEnterUI4.show();
+ }
+ else if(param1 > 300)
+ {
+ if(this.babelEnterUI3 == null)
+ {
+ this.babelEnterUI3 = new BabelEnterUI3();
+ }
+ this.babelEnterUI3.show();
+ }
+ else if(param1 > 200)
+ {
+ if(this.babelEnterUI2 == null)
+ {
+ this.babelEnterUI2 = new BabelEnterUI2();
+ }
+ this.babelEnterUI2.show();
+ }
+ else if(param1 > 100)
+ {
+ if(this.babelEnterUI1 == null)
+ {
+ this.babelEnterUI1 = new BabelEnterUI1();
+ }
+ this.babelEnterUI1.show();
+ }
+ else
+ {
+ if(this.babelEnterUI == null)
+ {
+ this.babelEnterUI = new BabelEnterUI();
+ }
+ this.babelEnterUI.show();
+ }
+ }
+
+ private function buyItem(param1:MouseEvent) : void
+ {
+ var _loc2_:ToolView = ToolView.getInstance();
+ _loc2_.listBuyTools("QUICK_STORE_LUBAN");
+ _loc2_.onRefresh = null;
+ _loc2_.show();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI.as
new file mode 100644
index 0000000..2e1e182
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI.as
@@ -0,0 +1,1115 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_1);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 100)
+ {
+ this.topStageId = 100;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ var _loc2_:int = param1;
+ if(_loc2_ > 100)
+ {
+ _loc2_ = 100;
+ }
+ this.stageMc.showNum(param1);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(_loc5_ <= 100)
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.topStageId < 9)
+ {
+ MessageBoxUI.getInstance().addMessage("通过10层后才能使用该功能");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.stageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI1.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI1.as
new file mode 100644
index 0000000..55945ab
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI1.as
@@ -0,0 +1,1120 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI1 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI1()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_2);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,120);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 200)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 100;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 200)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 100;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 200 || _loc5_ < 101))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI2.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI2.as
new file mode 100644
index 0000000..fc7560d
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI2.as
@@ -0,0 +1,1120 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI2 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI2()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_3);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 300)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 200;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 300)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 200;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 300 || _loc5_ < 201))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI3.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI3.as
new file mode 100644
index 0000000..059c7f7
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI3.as
@@ -0,0 +1,1120 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI3 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI3()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_4);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 400)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 300;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 400)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 300;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 400 || _loc5_ < 301))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI4.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI4.as
new file mode 100644
index 0000000..54133b5
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI4.as
@@ -0,0 +1,1120 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI4 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI4()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_5);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 500)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 400;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 500)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 400;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 500 || _loc5_ < 401))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI5.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI5.as
new file mode 100644
index 0000000..554ef97
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI5.as
@@ -0,0 +1,1120 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI5 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI5()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_6);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 600)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 500;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 600)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 500;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 600 || _loc5_ < 501))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI6.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI6.as
new file mode 100644
index 0000000..65350dc
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI6.as
@@ -0,0 +1,1120 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI6 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI6()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_7);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 700)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 600;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 700)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 600;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 700 || _loc5_ < 601))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI7.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI7.as
new file mode 100644
index 0000000..8545173
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI7.as
@@ -0,0 +1,1120 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI7 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI7()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_8);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 800)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 700;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 800)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 700;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 800 || _loc5_ < 701))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI8.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI8.as
new file mode 100644
index 0000000..8b32311
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI8.as
@@ -0,0 +1,1120 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI8 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI8()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_9);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 900)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 800;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 900)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 800;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 900 || _loc5_ < 801))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelEnterUI9.as b/flash_decompiled/com/view/ui/babel/BabelEnterUI9.as
new file mode 100644
index 0000000..829d04f
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelEnterUI9.as
@@ -0,0 +1,1120 @@
+package com.view.ui.babel
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.newdata.user.NewUserData;
+ import com.utils.Utils;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelEnterUI9 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var addExpBtn:Button_9;
+
+ private var addRecoverBtn:Button_9;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var recoverCash:int;
+
+ private var addExpCash:int;
+
+ private var addExpNum:int;
+
+ private var doubleDropCash:int;
+
+ private var addDoubleDrop:Button_9;
+
+ private var addDoubleDropUI:AddDoubleDropUI;
+
+ private var addBabelExpUI:AddBabelExpUI;
+
+ private var addBabelRevocerUI:AddBabelRevocerUI;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelEnterUI9()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc19_:TextField = null;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_10);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ this.addDoubleDrop = new Button_9("增加双倍掉落");
+ _loc4_.addChild(this.addDoubleDrop);
+ this.addDoubleDrop.x = this.addDropText.x + 60;
+ this.addDoubleDrop.y = _loc18_.y;
+ this.addDoubleDrop.func = this.useDoubleDropF;
+ _loc19_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ this.addExpBtn = new Button_9("增加经验");
+ _loc4_.addChild(this.addExpBtn);
+ this.addExpBtn.x = this.addExpText.x + 60;
+ this.addExpBtn.y = _loc19_.y;
+ this.addExpBtn.func = this.useAddExp;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ this.addRecoverBtn = new Button_9("增加恢复率");
+ _loc4_.addChild(this.addRecoverBtn);
+ this.addRecoverBtn.x = this.addRecoverText.x + 60;
+ this.addRecoverBtn.y = _loc20_.y;
+ this.addRecoverBtn.func = this.useAddRecover;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function useAddExp() : void
+ {
+ if(this.addExpCash == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级为0,无法使用该功能");
+ }
+ else
+ {
+ if(this.addBabelExpUI == null)
+ {
+ this.addBabelExpUI = new AddBabelExpUI();
+ this.addBabelExpUI.x = int(this.width / 2 - this.addBabelExpUI.width / 2);
+ this.addBabelExpUI.y = int(this.height / 2 - this.addBabelExpUI.height / 2);
+ }
+ addChild(this.addBabelExpUI);
+ this.addBabelExpUI.setData("是否花费" + this.addExpCash + "元宝增加" + this.addExpNum + "%的重楼经验
最终获得经验=重楼基础经验*(1+" + this.addExpNum + "%),退出重楼后该效果消失");
+ }
+ }
+
+ private function addExpView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addExpText.text = "+" + _loc2_ + "%";
+ this.addExpBtn.func = null;
+ }
+
+ private function useAddRecover() : void
+ {
+ if(NewUserData.getUser().viplevel < 3)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到3级才可使用该功能");
+ }
+ else
+ {
+ if(this.addBabelRevocerUI == null)
+ {
+ this.addBabelRevocerUI = new AddBabelRevocerUI();
+ this.addBabelRevocerUI.x = int(this.width / 2 - this.addBabelRevocerUI.width / 2);
+ this.addBabelRevocerUI.y = int(this.height / 2 - this.addBabelRevocerUI.height / 2);
+ }
+ addChild(this.addBabelRevocerUI);
+ this.addBabelRevocerUI.setData("是否花费" + this.recoverCash + "元宝增加100%的重楼恢复率
提示:使用后重楼将不会损失兵力,退出重楼后该效果消失");
+ }
+ }
+
+ private function addRecoverView(param1:BabelEvent) : void
+ {
+ var _loc2_:int = int(param1.obj);
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+
+ private function addDoubleView(param1:BabelEvent) : void
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+
+ private function useDoubleDropF() : void
+ {
+ var _loc1_:int = 0;
+ if(NewUserData.getUser().viplevel < 4)
+ {
+ MessageBoxUI.getInstance().addMessage("荣誉称号等级达到4级才可使用该功能");
+ }
+ else
+ {
+ if(this.addDoubleDropUI == null)
+ {
+ this.addDoubleDropUI = new AddDoubleDropUI();
+ this.addDoubleDropUI.x = int(this.width / 2 - this.addDoubleDropUI.width / 2);
+ this.addDoubleDropUI.y = int(this.height / 2 - this.addDoubleDropUI.height / 2);
+ }
+ addChild(this.addDoubleDropUI);
+ _loc1_ = this.doubleDropCash;
+ if(this.stageId > 300)
+ {
+ _loc1_ = 4 * _loc1_;
+ }
+ else if(this.stageId > 200)
+ {
+ _loc1_ = 3 * _loc1_;
+ }
+ else if(this.stageId > 100)
+ {
+ _loc1_ = 2 * _loc1_;
+ }
+ this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加重楼双倍掉落
提示:使用后重楼掉落将会翻倍,退出重楼后该效果消失");
+ }
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ this.addExpBtn.visible = false;
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ this.addExpBtn.visible = true;
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ this.addRecoverBtn.visible = false;
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ this.addRecoverBtn.visible = true;
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ this.addDoubleDrop.visible = false;
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ this.addDoubleDrop.visible = true;
+ }
+ this.addExpCash = _loc2_.addExpCash;
+ this.addExpNum = _loc2_.addExpNum;
+ this.recoverCash = _loc2_.recoverCash;
+ this.doubleDropCash = _loc2_.doubleNeedCash;
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 1000)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 900;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 1000)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 900;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 1000 || _loc5_ < 901))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDEXP,this.addExpView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_ADDRECOVER,this.addRecoverView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_DOUBLEDROP,this.addDoubleView);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(this.addBabelExpUI) && contains(this.addBabelExpUI))
+ {
+ removeChild(this.addBabelExpUI);
+ }
+ if(Boolean(this.addBabelRevocerUI) && contains(this.addBabelRevocerUI))
+ {
+ removeChild(this.addBabelRevocerUI);
+ }
+ if(Boolean(this.addDoubleDropUI) && contains(this.addDoubleDropUI))
+ {
+ removeChild(this.addDoubleDropUI);
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelMainUI.as b/flash_decompiled/com/view/ui/babel/BabelMainUI.as
new file mode 100644
index 0000000..5a1f075
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelMainUI.as
@@ -0,0 +1,189 @@
+package com.view.ui.babel
+{
+ import com.data.GameData;
+ import com.newdata.user.NewUserData;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.BaseUI;
+ import com.view.ui.babel.mc.BabelImgMc;
+ import com.view.ui.babel6.Babel6BuildUI;
+ import com.view.ui.babeldesc.BabelDescBuildUI;
+ import com.view.ui.babelgold.BabelGoldBuildUI;
+ import com.view.ui.babellast.BabelLastBuildUI;
+ import com.view.ui.babelmore.BabelMoreBuildUI;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class BabelMainUI extends BaseUI
+ {
+
+ private var buildUI:BabelBuildUI;
+
+ private var descBuildUI:BabelDescBuildUI;
+
+ private var moreBuildUI:BabelMoreBuildUI;
+
+ private var goldBuildUI1:BabelGoldBuildUI;
+
+ private var lastBuildUI:BabelLastBuildUI;
+
+ private var buildUI6:Babel6BuildUI;
+
+ public function BabelMainUI()
+ {
+ var _loc5_:BabelImgMc = null;
+ var _loc6_:BabelImgMc = null;
+ super();
+ super.addUIBg();
+ super.loadTitle(UITitleConfig.title_babel);
+ super.setPosition();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(625 + 218,314 - 145);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:BabelImgMc = new BabelImgMc(1);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 10;
+ _loc2_.y = 10;
+ _loc2_.addEventListener(MouseEvent.CLICK,this.openUserBabel1);
+ var _loc3_:BabelImgMc = new BabelImgMc(2);
+ _loc1_.addChild(_loc3_);
+ _loc3_.x = _loc2_.x + 140;
+ _loc3_.y = _loc2_.y;
+ _loc3_.addEventListener(MouseEvent.CLICK,this.openUserBabel2);
+ var _loc4_:BabelImgMc = new BabelImgMc(3);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc3_.x + 140;
+ _loc4_.y = _loc2_.y;
+ _loc4_.addEventListener(MouseEvent.CLICK,this.openUserBabel3);
+ _loc5_ = new BabelImgMc(4);
+ _loc1_.addChild(_loc5_);
+ _loc5_.x = _loc4_.x + 140;
+ _loc5_.y = _loc2_.y;
+ _loc5_.addEventListener(MouseEvent.CLICK,this.openUserBabel4);
+ _loc6_ = new BabelImgMc(5);
+ _loc1_.addChild(_loc6_);
+ _loc6_.x = _loc5_.x + 140;
+ _loc6_.y = _loc2_.y;
+ _loc6_.addEventListener(MouseEvent.CLICK,this.openUserBabel5);
+ var _loc7_:BabelImgMc = new BabelImgMc(6);
+ _loc1_.addChild(_loc7_);
+ _loc7_.x = _loc6_.x + 140;
+ _loc7_.y = _loc2_.y;
+ _loc7_.addEventListener(MouseEvent.CLICK,this.openUserBabel6);
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w - 5 + 216;
+ window_heihgt = UIWindowBg.normal_window_h - 86 - 140;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640 - 5 + 213;
+ ui_closeBtn.y = 10;
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ }
+
+ private function openUserBabel1(param1:MouseEvent) : void
+ {
+ if(this.buildUI == null)
+ {
+ this.buildUI = new BabelBuildUI();
+ }
+ this.buildUI.show();
+ }
+
+ private function openUserBabel2(param1:MouseEvent) : void
+ {
+ var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE1);
+ if(_loc2_ != 1)
+ {
+ MessageBoxUI.getInstance().addMessage("该功能暂未开放");
+ return;
+ }
+ var _loc3_:int = NewUserData.getUser().rankId;
+ if(_loc3_ < 2000)
+ {
+ }
+ if(this.descBuildUI == null)
+ {
+ this.descBuildUI = new BabelDescBuildUI();
+ }
+ this.descBuildUI.show();
+ }
+
+ private function openUserBabel3(param1:MouseEvent) : void
+ {
+ var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE21);
+ if(_loc2_ != 1)
+ {
+ MessageBoxUI.getInstance().addMessage("该功能暂未开放");
+ return;
+ }
+ if(this.moreBuildUI == null)
+ {
+ this.moreBuildUI = new BabelMoreBuildUI();
+ }
+ this.moreBuildUI.show();
+ }
+
+ private function openUserBabel4(param1:MouseEvent) : void
+ {
+ var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE31);
+ if(_loc2_ != 1)
+ {
+ MessageBoxUI.getInstance().addMessage("该功能暂未开放");
+ return;
+ }
+ if(this.goldBuildUI1 == null)
+ {
+ this.goldBuildUI1 = new BabelGoldBuildUI();
+ }
+ this.goldBuildUI1.show();
+ }
+
+ private function openUserBabel5(param1:MouseEvent) : void
+ {
+ var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE51);
+ if(_loc2_ != 1)
+ {
+ MessageBoxUI.getInstance().addMessage("该功能暂未开放");
+ return;
+ }
+ if(this.lastBuildUI == null)
+ {
+ this.lastBuildUI = new BabelLastBuildUI();
+ }
+ this.lastBuildUI.show();
+ }
+
+ private function openUserBabel6(param1:MouseEvent) : void
+ {
+ var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE71);
+ if(_loc2_ != 1)
+ {
+ MessageBoxUI.getInstance().addMessage("该功能暂未开放");
+ return;
+ }
+ if(this.buildUI6 == null)
+ {
+ this.buildUI6 = new Babel6BuildUI();
+ }
+ this.buildUI6.show();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage1.as b/flash_decompiled/com/view/ui/babel/BabelPage1.as
new file mode 100644
index 0000000..48df4fc
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage1.as
@@ -0,0 +1,276 @@
+package com.view.ui.babel
+{
+ import com.InstallFace;
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.common.Scale9Grid;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIRadioBtn;
+ import com.view.ui.babel.mc.BabelRankMc;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage1 extends Sprite
+ {
+
+ private var url:String = "bg_babel1.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var itemTimesa:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var face:InstallFace;
+
+ private var listBg:Sprite;
+
+ private var rankVec:Vector.;
+
+ private var typeArr:Array;
+
+ private var stageId:int;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage1()
+ {
+ var _loc4_:TextField = null;
+ var _loc5_:TextField = null;
+ var _loc8_:TextField = null;
+ var _loc11_:TextField = null;
+ var _loc19_:UIRadioBtn = null;
+ var _loc20_:int = 0;
+ var _loc21_:BabelRankMc = null;
+ this.face = InstallFace.getInstance();
+ super();
+ this.listBg = new Scale9Grid(this.face.getSprite(UIConfig.titleBg),130,75);
+ addChild(this.listBg);
+ this.listBg.x = 50;
+ this.listBg.y = 10;
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc5_);
+ _loc5_.x = _loc1_.x;
+ _loc5_.y = _loc4_.y + _loc2_;
+ _loc5_.htmlText = "奖励:丰富武将经验,大量神秘套装";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc5_.y + _loc2_;
+ _loc6_.text = "规则:";
+ var _loc7_:String = "1、最多统领5名将领挑战
2、战胜后挑战层数+1
3、层数越高,难度越大,奖励越好
4、每天可使用道具最多挑战 次
5、通过100层可以开启新的挑战
6、" + CommonData.babelNameArr[0] + "挑战每层后可回复80%兵力损失";
+ _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc8_.wordWrap = true;
+ _loc8_.multiline = true;
+ _loc8_.height = 100;
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = _loc6_.y + _loc2_;
+ var _loc9_:TextFormat = new TextFormat();
+ _loc9_.leading = 4;
+ _loc8_.defaultTextFormat = _loc9_;
+ _loc8_.htmlText = _loc7_;
+ this.itemTimesa = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesa);
+ this.itemTimesa.x = _loc4_.x + 160;
+ this.itemTimesa.y = _loc8_.y + 48;
+ this.itemTimesa.text = "3";
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = 260;
+ _loc10_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc10_.x + 88;
+ this.free_txt.y = _loc10_.y;
+ _loc11_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc11_);
+ _loc11_.x = _loc1_.x;
+ _loc11_.y = _loc10_.y + 20;
+ _loc11_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc11_.x + 88;
+ this.item_txt.y = _loc11_.y;
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc12_);
+ _loc12_.x = _loc1_.x;
+ _loc12_.y = _loc11_.y + 20;
+ _loc12_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc12_.x + 68;
+ this.title_txt.y = _loc12_.y;
+ var _loc13_:UIRadioBtn = new UIRadioBtn();
+ var _loc14_:UIRadioBtn = new UIRadioBtn();
+ var _loc15_:UIRadioBtn = new UIRadioBtn();
+ addChild(_loc13_);
+ addChild(_loc14_);
+ addChild(_loc15_);
+ _loc13_.x = _loc1_.x;
+ _loc13_.y = _loc12_.y + 20;
+ _loc14_.x = _loc13_.x + 75;
+ _loc14_.y = _loc13_.y;
+ _loc15_.x = _loc14_.x + 75;
+ _loc15_.y = _loc13_.y;
+ this.typeArr = new Array();
+ this.typeArr.push(_loc13_);
+ this.typeArr.push(_loc14_);
+ this.typeArr.push(_loc15_);
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40);
+ addChild(_loc16_);
+ _loc16_.x = _loc13_.x + 22;
+ _loc16_.y = _loc13_.y + 3;
+ _loc16_.text = "第1层";
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40);
+ addChild(_loc17_);
+ _loc17_.x = _loc14_.x + 22;
+ _loc17_.y = _loc13_.y + 3;
+ _loc17_.text = "第41层";
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40);
+ addChild(_loc18_);
+ _loc18_.x = _loc15_.x + 22;
+ _loc18_.y = _loc13_.y + 3;
+ _loc18_.text = "第81层";
+ for each(_loc19_ in this.typeArr)
+ {
+ _loc19_.onClick = this.selectType;
+ }
+ _loc13_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP));
+ this.rankVec = new Vector.();
+ _loc20_ = 0;
+ while(_loc20_ < 5)
+ {
+ _loc21_ = new BabelRankMc();
+ addChild(_loc21_);
+ this.rankVec.push(_loc21_);
+ _loc21_.x = 73;
+ _loc21_.y = 15 + _loc20_ * 15;
+ _loc20_++;
+ }
+ }
+
+ public function getStageId() : int
+ {
+ return this.stageId;
+ }
+
+ private function selectType(param1:MouseEvent) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc2_:UIRadioBtn = param1.currentTarget as UIRadioBtn;
+ _loc2_.setSelect();
+ for(_loc3_ in this.typeArr)
+ {
+ if(this.typeArr[_loc3_] != _loc2_)
+ {
+ this.typeArr[_loc3_].setUnSelect();
+ continue;
+ }
+ switch(_loc3_)
+ {
+ case 0:
+ this.stageId = 1;
+ break;
+ case 1:
+ this.stageId = 41;
+ break;
+ case 2:
+ this.stageId = 81;
+ }
+ }
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc8_:* = undefined;
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ if(_loc7_ != null || _loc7_.length > 0)
+ {
+ for(_loc8_ in this.rankVec)
+ {
+ if(_loc7_[_loc8_])
+ {
+ this.rankVec[_loc8_].setData(_loc7_[_loc8_],_loc8_);
+ }
+ else
+ {
+ this.rankVec[_loc8_].setData(null,_loc8_);
+ }
+ }
+ }
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ > 100)
+ {
+ _loc6_ = 100;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ this.itemTimesa.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChildAt(_loc2_,getChildIndex(this.listBg));
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage10.as b/flash_decompiled/com/view/ui/babel/BabelPage10.as
new file mode 100644
index 0000000..73c6c0b
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage10.as
@@ -0,0 +1,147 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage10 extends Sprite
+ {
+
+ private var url:String = "bg_babel10.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage10()
+ {
+ var _loc4_:TextField = null;
+ super();
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelNameArr[8] + "!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[9] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = 260;
+ _loc8_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc8_.y + 20;
+ _loc9_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = _loc9_.y + 20;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes9);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes9);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ <= 900)
+ {
+ _loc6_ = 0;
+ }
+ if(_loc6_ > 1000)
+ {
+ _loc6_ = 100;
+ }
+ if(_loc6_ > 900 && _loc6_ <= 1000)
+ {
+ _loc6_ -= 900;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage2.as b/flash_decompiled/com/view/ui/babel/BabelPage2.as
new file mode 100644
index 0000000..fbe8ef8
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage2.as
@@ -0,0 +1,147 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage2 extends Sprite
+ {
+
+ private var url:String = "bg_babel2.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage2()
+ {
+ var _loc4_:TextField = null;
+ super();
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelNameArr[0] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[1] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = 260;
+ _loc8_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc8_.y + 20;
+ _loc9_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = _loc9_.y + 20;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes1);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes1);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ <= 100)
+ {
+ _loc6_ = 0;
+ }
+ if(_loc6_ > 200)
+ {
+ _loc6_ = 100;
+ }
+ if(_loc6_ > 100 && _loc6_ <= 200)
+ {
+ _loc6_ -= 100;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage3.as b/flash_decompiled/com/view/ui/babel/BabelPage3.as
new file mode 100644
index 0000000..62e3f5f
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage3.as
@@ -0,0 +1,147 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage3 extends Sprite
+ {
+
+ private var url:String = "bg_babel3.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage3()
+ {
+ var _loc4_:TextField = null;
+ super();
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelNameArr[1] + "!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[2] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = 260;
+ _loc8_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc8_.y + 20;
+ _loc9_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = _loc9_.y + 20;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes2);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes2);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ <= 200)
+ {
+ _loc6_ = 0;
+ }
+ if(_loc6_ > 300)
+ {
+ _loc6_ = 100;
+ }
+ if(_loc6_ > 200 && _loc6_ <= 300)
+ {
+ _loc6_ -= 200;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage4.as b/flash_decompiled/com/view/ui/babel/BabelPage4.as
new file mode 100644
index 0000000..0ce7602
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage4.as
@@ -0,0 +1,147 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage4 extends Sprite
+ {
+
+ private var url:String = "bg_babel4.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage4()
+ {
+ var _loc4_:TextField = null;
+ super();
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelNameArr[2] + "!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[3] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = 260;
+ _loc8_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc8_.y + 20;
+ _loc9_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = _loc9_.y + 20;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes3);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes3);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ <= 300)
+ {
+ _loc6_ = 0;
+ }
+ if(_loc6_ > 400)
+ {
+ _loc6_ = 100;
+ }
+ if(_loc6_ > 300 && _loc6_ <= 400)
+ {
+ _loc6_ -= 300;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage5.as b/flash_decompiled/com/view/ui/babel/BabelPage5.as
new file mode 100644
index 0000000..380a9d2
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage5.as
@@ -0,0 +1,147 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage5 extends Sprite
+ {
+
+ private var url:String = "bg_babel5.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage5()
+ {
+ var _loc4_:TextField = null;
+ super();
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelNameArr[3] + "!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[4] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = 260;
+ _loc8_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc8_.y + 20;
+ _loc9_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = _loc9_.y + 20;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes4);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes4);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ <= 400)
+ {
+ _loc6_ = 0;
+ }
+ if(_loc6_ > 500)
+ {
+ _loc6_ = 100;
+ }
+ if(_loc6_ > 400 && _loc6_ <= 500)
+ {
+ _loc6_ -= 400;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage6.as b/flash_decompiled/com/view/ui/babel/BabelPage6.as
new file mode 100644
index 0000000..4f98975
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage6.as
@@ -0,0 +1,147 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage6 extends Sprite
+ {
+
+ private var url:String = "bg_babel6.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage6()
+ {
+ var _loc4_:TextField = null;
+ super();
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelNameArr[4] + "!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[5] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = 260;
+ _loc8_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc8_.y + 20;
+ _loc9_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = _loc9_.y + 20;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes5);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes5);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ <= 500)
+ {
+ _loc6_ = 0;
+ }
+ if(_loc6_ > 600)
+ {
+ _loc6_ = 100;
+ }
+ if(_loc6_ > 500 && _loc6_ <= 600)
+ {
+ _loc6_ -= 500;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage7.as b/flash_decompiled/com/view/ui/babel/BabelPage7.as
new file mode 100644
index 0000000..6aeaac0
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage7.as
@@ -0,0 +1,147 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage7 extends Sprite
+ {
+
+ private var url:String = "bg_babel7.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage7()
+ {
+ var _loc4_:TextField = null;
+ super();
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelNameArr[5] + "!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[6] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = 260;
+ _loc8_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc8_.y + 20;
+ _loc9_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = _loc9_.y + 20;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes6);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes6);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ <= 600)
+ {
+ _loc6_ = 0;
+ }
+ if(_loc6_ > 700)
+ {
+ _loc6_ = 100;
+ }
+ if(_loc6_ > 600 && _loc6_ <= 700)
+ {
+ _loc6_ -= 600;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage8.as b/flash_decompiled/com/view/ui/babel/BabelPage8.as
new file mode 100644
index 0000000..05979e2
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage8.as
@@ -0,0 +1,147 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage8 extends Sprite
+ {
+
+ private var url:String = "bg_babel8.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage8()
+ {
+ var _loc4_:TextField = null;
+ super();
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelNameArr[6] + "!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[6] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = 260;
+ _loc8_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc8_.y + 20;
+ _loc9_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = _loc9_.y + 20;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes7);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes7);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ <= 700)
+ {
+ _loc6_ = 0;
+ }
+ if(_loc6_ > 800)
+ {
+ _loc6_ = 100;
+ }
+ if(_loc6_ > 700 && _loc6_ <= 800)
+ {
+ _loc6_ -= 700;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/BabelPage9.as b/flash_decompiled/com/view/ui/babel/BabelPage9.as
new file mode 100644
index 0000000..bd4f3c1
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/BabelPage9.as
@@ -0,0 +1,147 @@
+package com.view.ui.babel
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelPage9 extends Sprite
+ {
+
+ private var url:String = "bg_babel9.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var bgload:LoadResource;
+
+ public function BabelPage9()
+ {
+ var _loc4_:TextField = null;
+ super();
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelNameArr[7] + "!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[7] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = _loc1_.x;
+ _loc8_.y = 260;
+ _loc8_.htmlText = "今日免费参加:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc1_.x;
+ _loc9_.y = _loc8_.y + 20;
+ _loc9_.htmlText = "今日道具参加:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc1_.x;
+ _loc10_.y = _loc9_.y + 20;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1.freeTimes8);
+ var _loc4_:int = int(param1.totalItemTimes);
+ var _loc5_:int = int(param1.itemTimes8);
+ var _loc6_:int = int(param1.topStageId);
+ var _loc7_:Array = param1.topList as Array;
+ this.free_txt.text = _loc3_ + "/" + _loc2_ + "次";
+ this.item_txt.text = _loc5_ + "/" + _loc4_ + "次";
+ if(_loc6_ <= 800)
+ {
+ _loc6_ = 0;
+ }
+ if(_loc6_ > 900)
+ {
+ _loc6_ = 100;
+ }
+ if(_loc6_ > 800 && _loc6_ <= 900)
+ {
+ _loc6_ -= 800;
+ }
+ this.title_txt.text = _loc6_.toString();
+ this.freeTimesT.text = _loc2_ + "";
+ this.itemTimesT.text = _loc4_ + "";
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/FastFightUI.as b/flash_decompiled/com/view/ui/babel/FastFightUI.as
new file mode 100644
index 0000000..27f96ac
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/FastFightUI.as
@@ -0,0 +1,179 @@
+package com.view.ui.babel
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.newdata.user.NewUserData;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class FastFightUI extends UIWindowBg
+ {
+
+ public static var instance:FastFightUI;
+
+ private var bg:UIWindowBg;
+
+ private var inputBar:TextField;
+
+ private var _heroIdArr:Array;
+
+ private var currStageId:int;
+
+ public var needCash:int;
+
+ public function FastFightUI()
+ {
+ var _loc3_:UIButton = null;
+ super();
+ initSize(125,200);
+ loadTitle(UITitleConfig.title_saodang);
+ addCloseBtn();
+ initBg();
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(276,150);
+ bg1.addChild(this.bg);
+ this.bg.x = 20;
+ this.bg.y = 20;
+ this.inputBar = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270);
+ this.inputBar.height = 200;
+ this.inputBar.multiline = true;
+ this.inputBar.wordWrap = true;
+ this.bg.addChild(this.inputBar);
+ this.inputBar.x = 5;
+ this.inputBar.y = 5;
+ var _loc1_:TextFormat = new TextFormat();
+ _loc1_.leading = 4;
+ this.inputBar.defaultTextFormat = _loc1_;
+ var _loc2_:String = "起始层数:1层";
+ _loc2_ += "
扫荡目标层:100层";
+ _loc2_ += "
消耗时间:即刻";
+ _loc2_ += "
扫荡规则:";
+ _loc2_ += "
1、只能从第一层开始扫荡,扫荡不消耗兵力,不消耗武将健康度。";
+ _loc2_ += "
2、扫荡结束后发放楼层奖励。
";
+ this.inputBar.htmlText = _loc2_;
+ _loc3_ = new UIButton("扫荡一次",2);
+ this.bg.addChild(_loc3_);
+ _loc3_.x = 5;
+ _loc3_.y = 170;
+ _loc3_.onClick = this.submit;
+ var _loc4_:UIButton = new UIButton("扫荡十次",2);
+ this.bg.addChild(_loc4_);
+ _loc4_.x = _loc3_.x + 70;
+ _loc4_.y = _loc3_.y;
+ _loc4_.onClick = this.tenplay;
+ var _loc5_:UIButton = new UIButton("扫荡50次",2);
+ this.bg.addChild(_loc5_);
+ _loc5_.x = _loc4_.x + 70;
+ _loc5_.y = _loc3_.y;
+ _loc5_.onClick = this.fiveplay;
+ var _loc6_:UIButton = new UIButton("扫荡所有",2);
+ this.bg.addChild(_loc6_);
+ _loc6_.x = _loc5_.x + 70;
+ _loc6_.y = _loc3_.y;
+ _loc6_.onClick = this.onkeyplay;
+ }
+
+ public static function getInstance() : FastFightUI
+ {
+ if(instance == null)
+ {
+ instance = new FastFightUI();
+ }
+ return instance;
+ }
+
+ private function closeThis() : void
+ {
+ closeSelf(null);
+ }
+
+ public function setData(param1:String) : void
+ {
+ this.inputBar.htmlText = param1;
+ }
+
+ private function submit(param1:MouseEvent) : void
+ {
+ var _loc3_:String = null;
+ var _loc2_:int = int(NewUserData.getUser().viplevel);
+ if(_loc2_ < 3)
+ {
+ _loc3_ = "当前vip等级没有达到3级,愿花" + this.needCash + "元宝完成扫荡吗?";
+ MessageBoxUI.getInstance().confirmMsg(_loc3_,this.confirmSubmit);
+ return;
+ }
+ ConnectService.getInstance().babelService.startFastCombat(this.heroIdArr);
+ this.closeThis();
+ }
+
+ private function onkeyplay(param1:MouseEvent) : void
+ {
+ var _loc3_:String = null;
+ var _loc2_:int = int(NewUserData.getUser().viplevel);
+ if(_loc2_ < 6)
+ {
+ _loc3_ = "当前vip等级没有达到6级。";
+ MessageBoxUI.getInstance().addMessage(_loc3_);
+ return;
+ }
+ ConnectService.getInstance().babelService.onekeyplay(this.heroIdArr);
+ this.closeThis();
+ }
+
+ private function tenplay(param1:MouseEvent) : void
+ {
+ var _loc3_:String = null;
+ var _loc2_:int = int(NewUserData.getUser().viplevel);
+ if(_loc2_ < 6)
+ {
+ _loc3_ = "当前vip等级没有达到6级。";
+ MessageBoxUI.getInstance().addMessage(_loc3_);
+ return;
+ }
+ ConnectService.getInstance().babelService.tenkeyplay(this.heroIdArr);
+ this.closeThis();
+ }
+
+ private function fiveplay(param1:MouseEvent) : void
+ {
+ var _loc3_:String = null;
+ var _loc2_:int = int(NewUserData.getUser().viplevel);
+ if(_loc2_ < 6)
+ {
+ _loc3_ = "当前vip等级没有达到6级。";
+ MessageBoxUI.getInstance().addMessage(_loc3_);
+ return;
+ }
+ ConnectService.getInstance().babelService.fivekeyplay(this.heroIdArr);
+ this.closeThis();
+ }
+
+ private function confirmSubmit() : void
+ {
+ ConnectService.getInstance().babelService.startFastCombat(this.heroIdArr);
+ this.closeThis();
+ }
+
+ public function get heroIdArr() : Array
+ {
+ return this._heroIdArr;
+ }
+
+ public function set heroIdArr(param1:Array) : void
+ {
+ this._heroIdArr = param1;
+ }
+
+ public function setCurrStageId(param1:int) : void
+ {
+ this.currStageId = param1;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/StageItemData.as b/flash_decompiled/com/view/ui/babel/StageItemData.as
new file mode 100644
index 0000000..4696c40
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/StageItemData.as
@@ -0,0 +1,57 @@
+package com.view.ui.babel
+{
+ import com.control.play.event.BabelEvent;
+ import com.control.play.event.HellEvent;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import flash.utils.Dictionary;
+
+ public class StageItemData
+ {
+
+ public static var itemAwardList:Array = new Array();
+
+ private static var awardDic:Dictionary = new Dictionary();
+
+ private static var mogongAwardList:Array = new Array();
+
+ public function StageItemData()
+ {
+ super();
+ }
+
+ public static function setAwardList(param1:Array) : void
+ {
+ if(itemAwardList.length == 0)
+ {
+ itemAwardList = param1;
+ }
+ Utils.g_events.dispatchEvent(new DevEvent(BabelEvent.BABEL_AWARDLIST));
+ }
+
+ public static function getItemDic() : Dictionary
+ {
+ return awardDic;
+ }
+
+ public static function getAwardList() : Array
+ {
+ return itemAwardList;
+ }
+
+ public static function setMogongAwardList(param1:Array) : void
+ {
+ if(mogongAwardList.length == 0)
+ {
+ mogongAwardList = param1;
+ }
+ Utils.g_events.dispatchEvent(new DevEvent(HellEvent.BABEL_AWARDLIST));
+ }
+
+ public static function getMogongAwardList() : Array
+ {
+ return mogongAwardList;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/mc/AwardMc.as b/flash_decompiled/com/view/ui/babel/mc/AwardMc.as
new file mode 100644
index 0000000..a4caf5f
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/mc/AwardMc.as
@@ -0,0 +1,97 @@
+package com.view.ui.babel.mc
+{
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+
+ public class AwardMc extends Sprite
+ {
+
+ private var stageText:TextField;
+
+ private var awardText:TextField;
+
+ private var numsText:TextField;
+
+ private var bg:Sprite;
+
+ private var itemObj:Object;
+
+ public function AwardMc()
+ {
+ super();
+ this.bg = PublicMethod.createShape(UIConfig.overBgColor,264,24);
+ addChild(this.bg);
+ this.bg.y = 1;
+ this.bg.alpha = 0;
+ this.stageText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50);
+ this.awardText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110);
+ this.numsText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.stageText);
+ addChild(this.awardText);
+ addChild(this.numsText);
+ this.stageText.y = 4;
+ this.stageText.x = 10;
+ this.awardText.y = this.stageText.y;
+ this.numsText.y = this.stageText.y;
+ this.awardText.x = 85;
+ this.numsText.x = 220;
+ var _loc1_:Sprite = PublicMethod.getTrLine(264);
+ addChild(_loc1_);
+ addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true);
+ addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true);
+ }
+
+ private function rollOut(param1:MouseEvent) : void
+ {
+ if(this.itemObj)
+ {
+ this.bg.alpha = 0;
+ }
+ }
+
+ private function rollOver(param1:MouseEvent) : void
+ {
+ if(this.itemObj)
+ {
+ this.bg.alpha = 0.2;
+ }
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = 0;
+ var _loc3_:int = 0;
+ this.itemObj = param1;
+ if(this.itemObj == null)
+ {
+ this.stageText.text = "";
+ this.awardText.text = "";
+ this.numsText.text = "";
+ this.bg.alpha = 0;
+ }
+ else
+ {
+ _loc2_ = int(this.itemObj.stageId);
+ if(_loc2_ % 100 != 0)
+ {
+ _loc2_ %= 100;
+ }
+ this.stageText.text = "第" + _loc2_ + "层";
+ this.awardText.htmlText = this.itemObj.itemName;
+ if(this.itemObj.nums)
+ {
+ _loc3_ = int(this.itemObj.nums);
+ }
+ else
+ {
+ _loc3_ = 1;
+ }
+ this.numsText.text = _loc3_ + "";
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/mc/BabelAutoSet.as b/flash_decompiled/com/view/ui/babel/mc/BabelAutoSet.as
new file mode 100644
index 0000000..e56263f
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/mc/BabelAutoSet.as
@@ -0,0 +1,212 @@
+package com.view.ui.babel.mc
+{
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.play.event.BabelEvent;
+ import com.control.play.event.HellEvent;
+ import com.view.newui.UIButton;
+ import com.view.newui.UICheckBtn;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UINumInputText;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class BabelAutoSet extends UIWindowBg
+ {
+
+ private var bg:UIWindowBg;
+
+ private var checkBox1:UICheckBtn;
+
+ private var checkBox2:UICheckBtn;
+
+ private var input:UINumInputText;
+
+ private var currStageId:int;
+
+ private var type:int;
+
+ private var isAutoTrea:Boolean;
+
+ private var isAutoArmy:Boolean;
+
+ public function BabelAutoSet(param1:int = 1)
+ {
+ var _loc3_:TextField = null;
+ super();
+ this.type = param1;
+ initSize(115,190);
+ loadTitle(UITitleConfig.title_tiaojianshezhi);
+ addCloseBtn();
+ initBg();
+ this.bg = new UIWindowBg();
+ this.bg.initSecondPanel(266,150);
+ bg1.addChild(this.bg);
+ this.bg.x = 20;
+ this.bg.y = 20;
+ var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230);
+ _loc2_.text = "自动补充(补充顺序按出征顺序补充)";
+ this.bg.addChild(_loc2_);
+ _loc2_.x = 10;
+ _loc2_.y = 10;
+ this.checkBox1 = new UICheckBtn();
+ this.bg.addChild(this.checkBox1);
+ this.checkBox1.x = _loc2_.x;
+ this.checkBox1.y = _loc2_.y + 25;
+ this.checkBox1.onClick = this.clickCheckBox;
+ _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc3_.text = "自动医疗受伤武将(健康幅度低于80时)";
+ this.bg.addChild(_loc3_);
+ _loc3_.x = this.checkBox1.x + 30;
+ _loc3_.y = _loc2_.y + 25;
+ this.checkBox2 = new UICheckBtn();
+ this.bg.addChild(this.checkBox2);
+ this.checkBox2.x = this.checkBox1.x;
+ this.checkBox2.y = _loc3_.y + 25;
+ this.checkBox2.onClick = this.clickCheckArmy;
+ var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc4_.text = "自动补充兵力(补充到初始兵力)";
+ this.bg.addChild(_loc4_);
+ _loc4_.x = _loc3_.x;
+ _loc4_.y = _loc3_.y + 25;
+ var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250);
+ _loc5_.text = "打过第 层时自动停止";
+ this.bg.addChild(_loc5_);
+ _loc5_.x = _loc2_.x;
+ _loc5_.y = _loc4_.y + 30;
+ this.input = new UINumInputText(50);
+ this.bg.addChild(this.input);
+ this.input.x = 50;
+ this.input.y = _loc5_.y - 3;
+ this.input.hiddenBtn();
+ this.input.setMaxNum(100);
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,225);
+ _loc6_.height = 40;
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ this.bg.addChild(_loc6_);
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.x = 30;
+ _loc6_.y = 120;
+ _loc6_.text = "注:失败时会自动停止,若某个武将兵力补充后 仍为0,则该武将不能继续前进";
+ var _loc8_:UIButton = new UIButton("开 始",2,10);
+ var _loc9_:UIButton = new UIButton("退 出",2,10);
+ this.bg.addChild(_loc8_);
+ this.bg.addChild(_loc9_);
+ _loc8_.x = 70;
+ _loc8_.y = 170;
+ _loc9_.x = _loc8_.x + _loc8_.width + 30;
+ _loc9_.y = _loc8_.y;
+ _loc9_.onClick = this.closeUI;
+ _loc8_.onClick = this.editEvent;
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.autoSaveBack);
+ ConnectService.getInstance().addEventListener(HellEvent.HELL_AUTO_SAVE,this.autoHellSaveBack);
+ }
+
+ public function setCurrBattle(param1:int) : void
+ {
+ this.currStageId = param1;
+ }
+
+ public function init(param1:String) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:String = null;
+ var _loc4_:int = 0;
+ this.isAutoTrea = false;
+ this.checkBox1.setUnSelect();
+ this.isAutoArmy = false;
+ this.checkBox2.setUnSelect();
+ if(param1 != null)
+ {
+ _loc2_ = param1.split(",");
+ for each(_loc3_ in _loc2_)
+ {
+ if(_loc3_ == "TREAT_HERO")
+ {
+ this.isAutoTrea = true;
+ this.checkBox1.setSelect();
+ }
+ if(_loc3_ == "SUPPLY_ARMY")
+ {
+ this.isAutoArmy = true;
+ this.checkBox2.setSelect();
+ }
+ if(_loc3_.indexOf("STOP_STAGE") >= 0)
+ {
+ _loc4_ = int(_loc3_.substring(10));
+ this.input.setTextNum(_loc4_);
+ }
+ }
+ }
+ }
+
+ private function closeUI(param1:MouseEvent) : void
+ {
+ closeSelf(param1);
+ }
+
+ private function editEvent(param1:MouseEvent) : void
+ {
+ var _loc2_:int = this.input.getTextNum();
+ if(_loc2_ < this.currStageId)
+ {
+ MessageBoxUI.getInstance().addMessage("您已挑战过该楼层.");
+ return;
+ }
+ var _loc3_:Object = new Object();
+ _loc3_.treatHero = this.isAutoTrea;
+ _loc3_.supplyArmy = this.isAutoArmy;
+ _loc3_.stopStage = _loc2_.toString();
+ if(this.type == 1)
+ {
+ ConnectService.getInstance().babelService.saveAutoConfig(_loc3_);
+ }
+ }
+
+ private function clickCheckBox(param1:MouseEvent) : void
+ {
+ if(this.isAutoTrea)
+ {
+ this.isAutoTrea = false;
+ this.checkBox1.setUnSelect();
+ }
+ else
+ {
+ this.isAutoTrea = true;
+ this.checkBox1.setSelect();
+ }
+ }
+
+ private function clickCheckArmy(param1:MouseEvent) : void
+ {
+ if(this.isAutoArmy)
+ {
+ this.isAutoArmy = false;
+ this.checkBox2.setUnSelect();
+ }
+ else
+ {
+ this.isAutoArmy = true;
+ this.checkBox2.setSelect();
+ }
+ }
+
+ private function autoSaveBack(param1:BabelEvent) : void
+ {
+ this.closeUI(null);
+ }
+
+ private function autoHellSaveBack(param1:HellEvent) : void
+ {
+ this.closeUI(null);
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/mc/BabelAwardList.as b/flash_decompiled/com/view/ui/babel/mc/BabelAwardList.as
new file mode 100644
index 0000000..57478dd
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/mc/BabelAwardList.as
@@ -0,0 +1,112 @@
+package com.view.ui.babel.mc
+{
+ import com.view.newui.UIButton;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.Sprite;
+
+ public class BabelAwardList extends UIWindowBg
+ {
+
+ private var tableMc:UITable;
+
+ private var listVec:Vector.;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ public function BabelAwardList()
+ {
+ var _loc1_:Array = null;
+ var _loc2_:Array = null;
+ var _loc5_:AwardMc = null;
+ super();
+ initSize(105,298);
+ loadTitle(UITitleConfig.title_bencijiangli);
+ addCloseBtn();
+ initBg();
+ _loc1_ = ["楼层","掉落道具","掉落数量"];
+ _loc2_ = [70,130,75];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc1_,_loc2_);
+ bg1.addChild(this.tableMc);
+ this.tableMc.x = 15;
+ this.tableMc.y = 15;
+ var _loc3_:UIButton = new UIButton("关 闭",2,10);
+ bg1.addChild(_loc3_);
+ _loc3_.x = 120;
+ _loc3_.y = 295;
+ _loc3_.onClick = closeSelf;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(271,251);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.listVec = new Vector.();
+ var _loc4_:int = 0;
+ while(_loc4_ < 10)
+ {
+ _loc5_ = new AwardMc();
+ this.listVec.push(_loc5_);
+ this.awardMc.addChild(_loc5_);
+ _loc5_.x = 4;
+ _loc5_.y = 25 * _loc4_;
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ public function setAwardList(param1:Array) : void
+ {
+ var _loc4_:AwardMc = null;
+ this.clear();
+ if(param1 == null || param1.length == 0)
+ {
+ return;
+ }
+ var _loc2_:int = int(param1.length);
+ var _loc3_:int = 0;
+ while(_loc3_ < _loc2_)
+ {
+ if(_loc3_ > 9)
+ {
+ _loc4_ = new AwardMc();
+ this.listVec.push(_loc4_);
+ this.awardMc.addChild(_loc4_);
+ _loc4_.y = 25 * _loc3_;
+ }
+ this.listVec[_loc3_].setData(param1[_loc3_]);
+ _loc3_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function clear() : void
+ {
+ var _loc1_:int = int(this.listVec.length);
+ var _loc2_:* = int(_loc1_ - 1);
+ while(_loc2_ >= 0)
+ {
+ if(_loc2_ > 9)
+ {
+ this.awardMc.removeChild(this.listVec[_loc2_]);
+ this.listVec.splice(_loc2_,1);
+ }
+ else
+ {
+ this.listVec[_loc2_].setData(null);
+ }
+ _loc2_--;
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/mc/BabelImgMc.as b/flash_decompiled/com/view/ui/babel/mc/BabelImgMc.as
new file mode 100644
index 0000000..90fe5e4
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/mc/BabelImgMc.as
@@ -0,0 +1,112 @@
+package com.view.ui.babel.mc
+{
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.view.newui.UIBase;
+ import com.view.newui.UISmallBtn;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.filters.GlowFilter;
+
+ public class BabelImgMc extends UIBase
+ {
+
+ private var bg1:Sprite;
+
+ private var load:LoadResource;
+
+ private var stageId:int;
+
+ private var itemImg:Bitmap;
+
+ private var fillers:GlowFilter;
+
+ public function BabelImgMc(param1:int)
+ {
+ super();
+ this.bg1 = PublicMethod.createRectangle(6250335,1645596,133,133);
+ addChild(this.bg1);
+ this.stageId = param1;
+ this.getFillers();
+ switch(param1)
+ {
+ case 1:
+ this.load = new LoadResource("pic/bg/bg_babel11.jpg",this.loadPngBack);
+ break;
+ case 2:
+ this.load = new LoadResource("pic/bg/bg_babel0.jpg",this.loadPngBack);
+ break;
+ case 3:
+ this.load = new LoadResource("pic/bg/bg_babel21.jpg",this.loadPngBack);
+ break;
+ case 4:
+ this.load = new LoadResource("pic/bg/bg_babel31.jpg",this.loadPngBack);
+ break;
+ case 5:
+ this.load = new LoadResource("pic/bg/bg_babel50.jpg",this.loadPngBack);
+ break;
+ case 6:
+ this.load = new LoadResource("pic/bg/bg_babel70.jpg",this.loadPngBack);
+ }
+ this.buttonMode = true;
+ var _loc2_:UISmallBtn = new UISmallBtn("全部清缴",3);
+ addChild(_loc2_);
+ _loc2_.x = 42;
+ _loc2_.y = 140;
+ _loc2_.onClick = this.oneKeyPlayBabelConfig;
+ if(this.stageId > 4)
+ {
+ }
+ addEventListener(MouseEvent.ROLL_OVER,this.mouseOver);
+ addEventListener(MouseEvent.ROLL_OUT,this.mouseOut);
+ }
+
+ private function oneKeyPlayBabelConfig(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确定要全部清缴吗?",this.oneKeyPlayBabel);
+ }
+
+ private function oneKeyPlayBabel() : void
+ {
+ ConnectService.getInstance().babelService.oneKeyPlayBabel(this.stageId);
+ }
+
+ private function loadPngBack(param1:Event) : void
+ {
+ this.itemImg = param1.target.loader.content as Bitmap;
+ this.bg1.addChild(this.itemImg);
+ this.itemImg.x = 2;
+ this.itemImg.y = 2;
+ this.itemImg.width = 130;
+ this.itemImg.height = 130;
+ this.load.clear();
+ }
+
+ private function getFillers() : void
+ {
+ this.fillers = new GlowFilter();
+ this.fillers.color = 2686760;
+ this.fillers.blurX = 15;
+ this.fillers.alpha = 1;
+ this.fillers.blurY = 15;
+ this.fillers.inner = true;
+ this.fillers.quality = 1;
+ this.fillers.strength = 3;
+ }
+
+ private function mouseOver(param1:MouseEvent) : void
+ {
+ this.bg1.filters = [this.fillers];
+ }
+
+ private function mouseOut(param1:MouseEvent) : void
+ {
+ this.bg1.filters = null;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/mc/BabelRankMc.as b/flash_decompiled/com/view/ui/babel/mc/BabelRankMc.as
new file mode 100644
index 0000000..3f33137
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/mc/BabelRankMc.as
@@ -0,0 +1,51 @@
+package com.view.ui.babel.mc
+{
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Sprite;
+ import flash.text.TextField;
+
+ public class BabelRankMc extends Sprite
+ {
+
+ private var text1:TextField;
+
+ private var text2:TextField;
+
+ private var text3:TextField;
+
+ private var text4:TextField;
+
+ public function BabelRankMc()
+ {
+ super();
+ this.text1 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,42);
+ this.text2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,150);
+ this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40);
+ this.text4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ addChild(this.text1);
+ addChild(this.text2);
+ addChild(this.text4);
+ this.text2.x = this.text1.x + this.text1.width;
+ this.text4.x = this.text2.x + this.text2.width;
+ }
+
+ public function setData(param1:Object, param2:int) : void
+ {
+ param2++;
+ if(param1 == null)
+ {
+ this.text1.text = "";
+ this.text2.text = "";
+ this.text4.text = "";
+ }
+ else
+ {
+ this.text1.text = "第" + param2 + "名:";
+ this.text2.htmlText = param1.userName + " (Lv." + param1.level + ")";
+ this.text4.text = param1.topStageId;
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel/mc/StageAwardMc.as b/flash_decompiled/com/view/ui/babel/mc/StageAwardMc.as
new file mode 100644
index 0000000..61a29cb
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel/mc/StageAwardMc.as
@@ -0,0 +1,136 @@
+package com.view.ui.babel.mc
+{
+ import com.InstallFace;
+ import com.common.PublicMethod;
+ import com.view.mc.button.Button_9;
+ import com.view.newui.UIConfig;
+ import com.view.tip.MulTipTitle;
+ import flash.display.Sprite;
+ import flash.events.MouseEvent;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class StageAwardMc extends Sprite
+ {
+
+ private var bg:Sprite;
+
+ private var stageText:TextField;
+
+ private var face:InstallFace = InstallFace.getInstance();
+
+ private var viewBtn:Button_9;
+
+ private var currType:int;
+
+ private var stageStr:String = "";
+
+ private var currObj:Object;
+
+ private var tip:MulTipTitle;
+
+ public function StageAwardMc(param1:int = 1)
+ {
+ super();
+ this.currType = param1;
+ this.bg = PublicMethod.createShape(UIConfig.overBgColor,122,23);
+ addChild(this.bg);
+ this.bg.y = 1;
+ this.bg.alpha = 0;
+ var _loc2_:TextFormat = PublicMethod.getCenterTextFormat();
+ addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true);
+ addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true);
+ this.stageText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70);
+ addChild(this.stageText);
+ this.stageText.y = 4;
+ this.stageText.defaultTextFormat = _loc2_;
+ this.viewBtn = new Button_9("查看掉落");
+ addChild(this.viewBtn);
+ this.viewBtn.y = 4;
+ this.viewBtn.x = 90;
+ this.viewBtn.buttonMode = true;
+ this.viewBtn.visible = false;
+ var _loc3_:Sprite = PublicMethod.getTrLine(160);
+ addChild(_loc3_);
+ if(this.currType == 1)
+ {
+ this.stageStr = "层";
+ }
+ if(this.currType == 2)
+ {
+ this.stageStr = "关";
+ }
+ }
+
+ private function rollOut(param1:MouseEvent) : void
+ {
+ if(this.currObj)
+ {
+ this.bg.alpha = 0;
+ }
+ }
+
+ private function rollOver(param1:MouseEvent) : void
+ {
+ if(this.currObj)
+ {
+ this.bg.alpha = 0.2;
+ }
+ }
+
+ public function setData(param1:Object, param2:int = 0) : void
+ {
+ this.currObj = param1;
+ if(param1 == null)
+ {
+ this.bg.alpha = 0;
+ this.stageText.text = "";
+ this.viewBtn.visible = false;
+ if(this.tip)
+ {
+ this.tip.destroyTip();
+ this.tip = null;
+ }
+ return;
+ }
+ this.viewBtn.visible = true;
+ var _loc3_:int = int(param1.stageId);
+ if(this.currType == 1)
+ {
+ if(_loc3_ % 100 != 0)
+ {
+ _loc3_ %= 100;
+ }
+ else
+ {
+ _loc3_ = 100;
+ }
+ }
+ else
+ {
+ _loc3_ -= param2;
+ }
+ this.stageText.text = "第" + _loc3_ + this.stageStr;
+ if(this.tip)
+ {
+ this.tip.setValue(this.getAwardStr(_loc3_,param1.awardList));
+ }
+ else
+ {
+ this.tip = new MulTipTitle(this.viewBtn,this.face.stage,this.face.tip_bg,this.getAwardStr(_loc3_,param1.awardList),90);
+ }
+ }
+
+ private function getAwardStr(param1:int, param2:Array) : String
+ {
+ var _loc4_:Object = null;
+ var _loc3_:String = param1 + this.stageStr + "可能获得";
+ for each(_loc4_ in param2)
+ {
+ _loc3_ = _loc3_ + "
" + _loc4_.itemName;
+ }
+ return _loc3_;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel6/Babel6BuildUI.as b/flash_decompiled/com/view/ui/babel6/Babel6BuildUI.as
new file mode 100644
index 0000000..7245f85
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel6/Babel6BuildUI.as
@@ -0,0 +1,840 @@
+package com.view.ui.babel6
+{
+ import com.comfig.CommonData;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.GameData;
+ import com.view.newui.UIButton;
+ import com.view.newui.UITabBtn;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class Babel6BuildUI extends PlayUI
+ {
+
+ private var bg1:Sprite;
+
+ private var page1:Babel6Page1;
+
+ private var page2:Babel6Page1;
+
+ private var page3:Babel6Page1;
+
+ private var page4:Babel6Page1;
+
+ private var page5:Babel6Page1;
+
+ private var page6:Babel6Page1;
+
+ private var page7:Babel6Page1;
+
+ private var page8:Babel6Page1;
+
+ private var page9:Babel6Page1;
+
+ private var page10:Babel6Page1;
+
+ private var page11:Babel6Page1;
+
+ private var page12:Babel6Page1;
+
+ private var bg2:UIWindowBg;
+
+ private var bgSp:Sprite;
+
+ private var btnArr:Array;
+
+ private var btn_1:UITabBtn;
+
+ private var btn_2:UITabBtn;
+
+ private var btn_3:UITabBtn;
+
+ private var btn_4:UITabBtn;
+
+ private var btn_5:UITabBtn;
+
+ private var btn_6:UITabBtn;
+
+ private var btn_7:UITabBtn;
+
+ private var btn_8:UITabBtn;
+
+ private var btn_9:UITabBtn;
+
+ private var btn_10:UITabBtn;
+
+ private var btn_11:UITabBtn;
+
+ private var btn_12:UITabBtn;
+
+ private var lastTab:UITabBtn;
+
+ private var prePage:Sprite;
+
+ private var enterBtn:UIButton;
+
+ private var towerObj:Object;
+
+ private var topStageId:int;
+
+ private var babelEnterUI1:Babel6EnterUI1;
+
+ private var babelEnterUI2:Babel6EnterUI1;
+
+ private var babelEnterUI3:Babel6EnterUI1;
+
+ private var babelEnterUI4:Babel6EnterUI1;
+
+ private var babelEnterUI5:Babel6EnterUI1;
+
+ private var babelEnterUI6:Babel6EnterUI1;
+
+ private var babelEnterUI7:Babel6EnterUI1;
+
+ private var babelEnterUI8:Babel6EnterUI1;
+
+ private var babelEnterUI9:Babel6EnterUI1;
+
+ private var babelEnterUI10:Babel6EnterUI1;
+
+ private var babelEnterUI11:Babel6EnterUI1;
+
+ private var babelEnterUI12:Babel6EnterUI1;
+
+ public function Babel6BuildUI()
+ {
+ super();
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w + 32;
+ window_heihgt = UIWindowBg.normal_window_h;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640 + 32;
+ ui_closeBtn.y = 10;
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition2();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc13_:int = 0;
+ var _loc14_:UITabBtn = null;
+ var _loc15_:UIWindowBg = null;
+ var _loc16_:UIWindowBg = null;
+ var _loc17_:UITitleBg = null;
+ var _loc18_:UITitleBg = null;
+ super.createUI();
+ super.loadTitle(UITitleConfig.title_babel6);
+ this.btnArr = new Array();
+ this.btn_1 = new UITabBtn(CommonData.babelMoreNameArr3[0] + "楼",6);
+ this.btn_2 = new UITabBtn(CommonData.babelMoreNameArr3[1] + "楼",6);
+ this.btn_3 = new UITabBtn(CommonData.babelMoreNameArr3[2] + "楼",6);
+ this.btn_4 = new UITabBtn(CommonData.babelMoreNameArr3[3] + "楼",6);
+ this.btn_5 = new UITabBtn(CommonData.babelMoreNameArr3[4] + "楼",6);
+ this.btn_6 = new UITabBtn(CommonData.babelMoreNameArr3[5] + "楼",6);
+ this.btn_7 = new UITabBtn(CommonData.babelMoreNameArr3[6] + "楼",6);
+ this.btn_8 = new UITabBtn(CommonData.babelMoreNameArr3[7] + "楼",6);
+ this.btn_9 = new UITabBtn(CommonData.babelMoreNameArr3[8] + "楼",6);
+ this.btn_10 = new UITabBtn(CommonData.babelMoreNameArr3[9] + "楼",6);
+ this.btn_11 = new UITabBtn(CommonData.babelMoreNameArr3[10] + "楼",6);
+ this.btn_12 = new UITabBtn(CommonData.babelMoreNameArr3[11] + "楼",6);
+ var _loc1_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE71);
+ var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE72);
+ var _loc3_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE73);
+ var _loc4_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE74);
+ var _loc5_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE75);
+ var _loc6_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE76);
+ var _loc7_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE77);
+ var _loc8_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE78);
+ var _loc9_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE79);
+ var _loc10_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE80);
+ var _loc11_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE81);
+ var _loc12_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE82);
+ if(_loc1_ == 1)
+ {
+ this.btnArr.push(this.btn_1);
+ }
+ if(_loc2_ == 1)
+ {
+ this.btnArr.push(this.btn_2);
+ }
+ if(_loc3_ == 1)
+ {
+ this.btnArr.push(this.btn_3);
+ }
+ if(_loc4_ == 1)
+ {
+ this.btnArr.push(this.btn_4);
+ }
+ if(_loc5_ == 1)
+ {
+ this.btnArr.push(this.btn_5);
+ }
+ if(_loc6_ == 1)
+ {
+ this.btnArr.push(this.btn_6);
+ }
+ if(_loc7_ == 1)
+ {
+ this.btnArr.push(this.btn_7);
+ }
+ if(_loc8_ == 1)
+ {
+ this.btnArr.push(this.btn_8);
+ }
+ if(_loc9_ == 1)
+ {
+ this.btnArr.push(this.btn_9);
+ }
+ if(_loc10_ == 1)
+ {
+ this.btnArr.push(this.btn_10);
+ }
+ if(_loc11_ == 1)
+ {
+ this.btnArr.push(this.btn_11);
+ }
+ if(_loc12_ == 1)
+ {
+ this.btnArr.push(this.btn_12);
+ }
+ for each(_loc14_ in this.btnArr)
+ {
+ addChild(_loc14_);
+ _loc14_.x = 15 + _loc13_ * 55;
+ _loc14_.y = 40;
+ _loc14_.onClick = this.changeType;
+ _loc13_++;
+ }
+ _loc15_ = new UIWindowBg();
+ _loc15_.initSecondPanel(630 + 32,375);
+ addChild(_loc15_);
+ _loc15_.x = 11;
+ _loc15_.y = 65;
+ this.bg2 = new UIWindowBg();
+ this.bg2.initSecondPanel(385,366);
+ _loc15_.addChild(this.bg2);
+ this.bg2.x = 4;
+ this.bg2.y = 4;
+ _loc16_ = new UIWindowBg();
+ _loc16_.initThirdPanel(222 + 32,366);
+ _loc15_.addChild(_loc16_);
+ _loc16_.x = this.bg2.x + this.bg2.width + 4;
+ _loc16_.y = this.bg2.y;
+ _loc17_ = new UITitleBg("活动介绍",_loc16_.width);
+ _loc16_.addChild(_loc17_);
+ _loc17_.x = int(_loc16_.width / 2 - _loc17_.width / 2);
+ _loc18_ = new UITitleBg("参加活动",_loc16_.width);
+ _loc16_.addChild(_loc18_);
+ _loc18_.x = int(_loc16_.width / 2 - _loc18_.width / 2);
+ _loc18_.y = 230;
+ this.page1 = new Babel6Page1();
+ _loc15_.addChild(this.page1);
+ this.page1.x = 4;
+ this.page1.y = 4;
+ this.page1.init(71);
+ this.page2 = new Babel6Page1();
+ _loc15_.addChild(this.page2);
+ this.page2.visible = false;
+ this.page2.x = 4;
+ this.page2.y = 4;
+ this.page2.init(72);
+ this.page3 = new Babel6Page1();
+ _loc15_.addChild(this.page3);
+ this.page3.visible = false;
+ this.page3.x = 4;
+ this.page3.y = 4;
+ this.page3.init(73);
+ this.page4 = new Babel6Page1();
+ _loc15_.addChild(this.page4);
+ this.page4.visible = false;
+ this.page4.x = 4;
+ this.page4.y = 4;
+ this.page4.init(74);
+ this.page5 = new Babel6Page1();
+ _loc15_.addChild(this.page5);
+ this.page5.visible = false;
+ this.page5.x = 4;
+ this.page5.y = 4;
+ this.page5.init(75);
+ this.page6 = new Babel6Page1();
+ _loc15_.addChild(this.page6);
+ this.page6.visible = false;
+ this.page6.x = 4;
+ this.page6.y = 4;
+ this.page6.init(76);
+ this.page7 = new Babel6Page1();
+ _loc15_.addChild(this.page7);
+ this.page7.visible = false;
+ this.page7.x = 4;
+ this.page7.y = 4;
+ this.page7.init(77);
+ this.page8 = new Babel6Page1();
+ _loc15_.addChild(this.page8);
+ this.page8.visible = false;
+ this.page8.x = 4;
+ this.page8.y = 4;
+ this.page8.init(78);
+ this.page9 = new Babel6Page1();
+ _loc15_.addChild(this.page9);
+ this.page9.visible = false;
+ this.page9.x = 4;
+ this.page9.y = 4;
+ this.page9.init(79);
+ this.page10 = new Babel6Page1();
+ _loc15_.addChild(this.page10);
+ this.page10.visible = false;
+ this.page10.x = 4;
+ this.page10.y = 4;
+ this.page10.init(80);
+ this.page11 = new Babel6Page1();
+ _loc15_.addChild(this.page11);
+ this.page11.visible = false;
+ this.page11.x = 4;
+ this.page11.y = 4;
+ this.page11.init(81);
+ this.page12 = new Babel6Page1();
+ _loc15_.addChild(this.page12);
+ this.page12.visible = false;
+ this.page12.x = 4;
+ this.page12.y = 4;
+ this.page12.init(82);
+ this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP));
+ this.enterBtn = new UIButton("进 入",2,10);
+ _loc15_.addChild(this.enterBtn);
+ this.enterBtn.x = 492;
+ this.enterBtn.y = 342;
+ this.enterBtn.onClick = this.selectRound;
+ this.entryBabel();
+ this.getAwardList();
+ }
+
+ private function changeType(param1:MouseEvent) : void
+ {
+ var _loc2_:UITabBtn = param1.currentTarget as UITabBtn;
+ if(this.lastTab == _loc2_)
+ {
+ return;
+ }
+ if(this.prePage)
+ {
+ this.prePage.visible = false;
+ }
+ if(this.lastTab)
+ {
+ this.lastTab.select = false;
+ }
+ this.lastTab = _loc2_;
+ this.lastTab.select = true;
+ if(this.lastTab == this.btn_1)
+ {
+ this.page1.visible = true;
+ this.prePage = this.page1;
+ }
+ else if(this.lastTab == this.btn_2)
+ {
+ this.page2.visible = true;
+ this.prePage = this.page2;
+ }
+ else if(this.lastTab == this.btn_3)
+ {
+ this.page3.visible = true;
+ this.prePage = this.page3;
+ }
+ else if(this.lastTab == this.btn_4)
+ {
+ this.page4.visible = true;
+ this.prePage = this.page4;
+ }
+ else if(this.lastTab == this.btn_5)
+ {
+ this.page5.visible = true;
+ this.prePage = this.page5;
+ }
+ else if(this.lastTab == this.btn_6)
+ {
+ this.page6.visible = true;
+ this.prePage = this.page6;
+ }
+ else if(this.lastTab == this.btn_7)
+ {
+ this.page7.visible = true;
+ this.prePage = this.page7;
+ }
+ else if(this.lastTab == this.btn_8)
+ {
+ this.page8.visible = true;
+ this.prePage = this.page8;
+ }
+ else if(this.lastTab == this.btn_9)
+ {
+ this.page9.visible = true;
+ this.prePage = this.page9;
+ }
+ else if(this.lastTab == this.btn_10)
+ {
+ this.page10.visible = true;
+ this.prePage = this.page10;
+ }
+ else if(this.lastTab == this.btn_11)
+ {
+ this.page11.visible = true;
+ this.prePage = this.page11;
+ }
+ else if(this.lastTab == this.btn_12)
+ {
+ this.page12.visible = true;
+ this.prePage = this.page12;
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL,this.getEnterBabelView);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_SelectRound,this.enterBabel);
+ if(this.page1)
+ {
+ this.entryBabel();
+ }
+ }
+
+ public function getAwardList() : void
+ {
+ ConnectService.getInstance().babelService.getStageAward();
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL,this.getEnterBabelView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_SelectRound,this.enterBabel);
+ }
+
+ private function entryBabel() : void
+ {
+ ConnectService.getInstance().babelService.entryBabel();
+ }
+
+ private function getEnterBabelView(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ closeUI(null);
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ this.towerObj = param1.obj;
+ var _loc2_:int = int(this.towerObj.needSelectRound);
+ if(_loc2_ == 1)
+ {
+ this.page1.setData(this.towerObj);
+ this.page2.setData(this.towerObj);
+ this.page3.setData(this.towerObj);
+ this.page4.setData(this.towerObj);
+ this.page5.setData(this.towerObj);
+ this.page6.setData(this.towerObj);
+ this.page7.setData(this.towerObj);
+ this.page8.setData(this.towerObj);
+ this.page9.setData(this.towerObj);
+ this.page10.setData(this.towerObj);
+ this.page11.setData(this.towerObj);
+ this.page12.setData(this.towerObj);
+ }
+ else
+ {
+ this.enterBabelRoom(this.towerObj.stageId);
+ }
+ this.topStageId = this.towerObj.topStageId;
+ }
+
+ private function selectRound(param1:MouseEvent) : void
+ {
+ if(this.towerObj == null)
+ {
+ return;
+ }
+ if(this.page1.visible)
+ {
+ if(this.towerObj.dfreeTimes71 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 5700)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr2[11] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr3[0] + "楼");
+ return;
+ }
+ this.enterStage1();
+ return;
+ }
+ if(this.page2.visible)
+ {
+ if(this.towerObj.dfreeTimes72 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 5800)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[0] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr3[1] + "楼");
+ return;
+ }
+ this.enterStage2();
+ return;
+ }
+ if(this.page3.visible)
+ {
+ if(this.towerObj.dfreeTimes73 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 5900)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[1] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[2] + "楼");
+ return;
+ }
+ this.enterStage3();
+ return;
+ }
+ if(this.page4.visible)
+ {
+ if(this.towerObj.dfreeTimes74 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 6000)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[2] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[3] + "楼");
+ return;
+ }
+ this.enterStage4();
+ return;
+ }
+ if(this.page5.visible)
+ {
+ if(this.towerObj.dfreeTimes75 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 6100)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[3] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[4] + "楼");
+ return;
+ }
+ this.enterStage5();
+ return;
+ }
+ if(this.page6.visible)
+ {
+ if(this.towerObj.dfreeTimes76 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 6200)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[4] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[5] + "楼");
+ return;
+ }
+ this.enterStage6();
+ return;
+ }
+ if(this.page7.visible)
+ {
+ if(this.towerObj.dfreeTimes77 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 6300)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[5] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[6] + "楼");
+ return;
+ }
+ this.enterStage7();
+ return;
+ }
+ if(this.page8.visible)
+ {
+ if(this.towerObj.dfreeTimes78 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 6400)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[6] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[7] + "楼");
+ return;
+ }
+ this.enterStage8();
+ return;
+ }
+ if(this.page9.visible)
+ {
+ if(this.towerObj.dfreeTimes79 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 6500)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[7] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[8] + "楼");
+ return;
+ }
+ this.enterStage9();
+ return;
+ }
+ if(this.page10.visible)
+ {
+ if(this.towerObj.dfreeTimes80 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 6600)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[8] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[9] + "楼");
+ return;
+ }
+ this.enterStage10();
+ return;
+ }
+ if(this.page11.visible)
+ {
+ if(this.towerObj.dfreeTimes81 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 6700)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[9] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[10] + "楼");
+ return;
+ }
+ this.enterStage11();
+ return;
+ }
+ if(this.page12.visible)
+ {
+ if(this.towerObj.dfreeTimes82 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 6800)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr3[10] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr3[11] + "楼");
+ return;
+ }
+ this.enterStage12();
+ return;
+ }
+ }
+
+ private function enterStage1() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(5701);
+ }
+
+ private function enterStage2() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(5801);
+ }
+
+ private function enterStage3() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(5901);
+ }
+
+ private function enterStage4() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(6001);
+ }
+
+ private function enterStage5() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(6101);
+ }
+
+ private function enterStage6() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(6201);
+ }
+
+ private function enterStage7() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(6301);
+ }
+
+ private function enterStage8() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(6401);
+ }
+
+ private function enterStage9() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(6501);
+ }
+
+ private function enterStage10() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(6601);
+ }
+
+ private function enterStage11() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(6701);
+ }
+
+ private function enterStage12() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(6801);
+ }
+
+ private function enterBabel(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.obj as int;
+ this.enterBabelRoom(_loc2_);
+ }
+
+ private function enterBabelRoom(param1:int) : void
+ {
+ if(param1 < 5700)
+ {
+ MessageBoxUI.getInstance().addMessage("请先退出其他楼");
+ closeUI(null);
+ return;
+ }
+ if(param1 > 6800)
+ {
+ if(this.babelEnterUI12 == null)
+ {
+ this.babelEnterUI12 = new Babel6EnterUI1();
+ this.babelEnterUI12.init(62);
+ }
+ this.babelEnterUI12.show();
+ }
+ else if(param1 > 6700)
+ {
+ if(this.babelEnterUI11 == null)
+ {
+ this.babelEnterUI11 = new Babel6EnterUI1();
+ this.babelEnterUI11.init(61);
+ }
+ this.babelEnterUI11.show();
+ }
+ else if(param1 > 6600)
+ {
+ if(this.babelEnterUI10 == null)
+ {
+ this.babelEnterUI10 = new Babel6EnterUI1();
+ this.babelEnterUI10.init(60);
+ }
+ this.babelEnterUI10.show();
+ }
+ else if(param1 > 6500)
+ {
+ if(this.babelEnterUI9 == null)
+ {
+ this.babelEnterUI9 = new Babel6EnterUI1();
+ this.babelEnterUI9.init(59);
+ }
+ this.babelEnterUI9.show();
+ }
+ else if(param1 > 6400)
+ {
+ if(this.babelEnterUI8 == null)
+ {
+ this.babelEnterUI8 = new Babel6EnterUI1();
+ this.babelEnterUI8.init(58);
+ }
+ this.babelEnterUI8.show();
+ }
+ else if(param1 > 6300)
+ {
+ if(this.babelEnterUI7 == null)
+ {
+ this.babelEnterUI7 = new Babel6EnterUI1();
+ this.babelEnterUI7.init(57);
+ }
+ this.babelEnterUI7.show();
+ }
+ else if(param1 > 6200)
+ {
+ if(this.babelEnterUI6 == null)
+ {
+ this.babelEnterUI6 = new Babel6EnterUI1();
+ this.babelEnterUI6.init(56);
+ }
+ this.babelEnterUI6.show();
+ }
+ else if(param1 > 6100)
+ {
+ if(this.babelEnterUI5 == null)
+ {
+ this.babelEnterUI5 = new Babel6EnterUI1();
+ this.babelEnterUI5.init(55);
+ }
+ this.babelEnterUI5.show();
+ }
+ else if(param1 > 6000)
+ {
+ if(this.babelEnterUI4 == null)
+ {
+ this.babelEnterUI4 = new Babel6EnterUI1();
+ this.babelEnterUI4.init(54);
+ }
+ this.babelEnterUI4.show();
+ }
+ else if(param1 > 5900)
+ {
+ if(this.babelEnterUI3 == null)
+ {
+ this.babelEnterUI3 = new Babel6EnterUI1();
+ this.babelEnterUI3.init(53);
+ }
+ this.babelEnterUI3.show();
+ }
+ else if(param1 > 5800)
+ {
+ if(this.babelEnterUI2 == null)
+ {
+ this.babelEnterUI2 = new Babel6EnterUI1();
+ this.babelEnterUI2.init(52);
+ }
+ this.babelEnterUI2.show();
+ }
+ else if(param1 > 5700)
+ {
+ if(this.babelEnterUI1 == null)
+ {
+ this.babelEnterUI1 = new Babel6EnterUI1();
+ this.babelEnterUI1.init(51);
+ }
+ this.babelEnterUI1.show();
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel6/Babel6EnterUI1.as b/flash_decompiled/com/view/ui/babel6/Babel6EnterUI1.as
new file mode 100644
index 0000000..f4a463e
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel6/Babel6EnterUI1.as
@@ -0,0 +1,1013 @@
+package com.view.ui.babel6
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class Babel6EnterUI1 extends PlayUI
+ {
+
+ private var stage_1:int = 3400;
+
+ private var stage_2:int = 3300;
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function Babel6EnterUI1()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,120);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,140);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = Utils.getNewPower1(_loc6_);
+ this.aktPowerText.text = Utils.getNewPower1(_loc7_);
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+
+ public function init(param1:int) : void
+ {
+ this.stage_2 = param1 * 100 - 600;
+ this.stage_1 = this.stage_2 + 100;
+ switch(param1)
+ {
+ case 51:
+ super.loadTitle(UITitleConfig.title_babel_6_1);
+ break;
+ case 52:
+ super.loadTitle(UITitleConfig.title_babel_6_2);
+ break;
+ case 53:
+ super.loadTitle(UITitleConfig.title_babel_6_3);
+ break;
+ case 54:
+ super.loadTitle(UITitleConfig.title_babel_6_4);
+ break;
+ case 55:
+ super.loadTitle(UITitleConfig.title_babel_6_5);
+ break;
+ case 56:
+ super.loadTitle(UITitleConfig.title_babel_6_6);
+ break;
+ case 57:
+ super.loadTitle(UITitleConfig.title_babel_6_7);
+ break;
+ case 58:
+ super.loadTitle(UITitleConfig.title_babel_6_8);
+ break;
+ case 59:
+ super.loadTitle(UITitleConfig.title_babel_6_9);
+ break;
+ case 60:
+ super.loadTitle(UITitleConfig.title_babel_6_10);
+ break;
+ case 61:
+ super.loadTitle(UITitleConfig.title_babel_6_11);
+ break;
+ case 62:
+ super.loadTitle(UITitleConfig.title_babel_6_12);
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babel6/Babel6Page1.as b/flash_decompiled/com/view/ui/babel6/Babel6Page1.as
new file mode 100644
index 0000000..ce11b71
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babel6/Babel6Page1.as
@@ -0,0 +1,156 @@
+package com.view.ui.babel6
+{
+ import com.comfig.CommonData;
+ import com.comfig.ServerConfig;
+ import com.common.LoadResource;
+ import com.common.PublicMethod;
+ import com.view.newui.UIConfig;
+ import flash.display.Bitmap;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFormat;
+
+ public class Babel6Page1 extends Sprite
+ {
+
+ private var url:String = "bg_babel51.jpg";
+
+ private var freeTimesT:TextField;
+
+ private var itemTimesT:TextField;
+
+ private var free_txt:TextField;
+
+ private var item_txt:TextField;
+
+ private var title_txt:TextField;
+
+ private var type:int;
+
+ private var bgload:LoadResource;
+
+ public function Babel6Page1()
+ {
+ var _loc4_:TextField = null;
+ super();
+ var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc1_);
+ _loc1_.x = 405;
+ _loc1_.y = 30;
+ _loc1_.htmlText = "模式:战略战";
+ var _loc2_:int = 17;
+ var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc3_);
+ _loc3_.x = _loc1_.x;
+ _loc3_.y = _loc1_.y + _loc2_;
+ _loc3_.text = "免费次数: 次/天(免费进入)";
+ this.freeTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.freeTimesT);
+ this.freeTimesT.x = _loc3_.x + 60;
+ this.freeTimesT.y = _loc3_.y;
+ this.freeTimesT.text = "3";
+ _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc4_);
+ _loc4_.x = _loc1_.x;
+ _loc4_.y = _loc3_.y + _loc2_;
+ _loc4_.htmlText = "道具次数: 次/天(消耗【鲁班令】)";
+ this.itemTimesT = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40);
+ addChild(this.itemTimesT);
+ this.itemTimesT.x = _loc4_.x + 60;
+ this.itemTimesT.y = _loc4_.y;
+ this.itemTimesT.text = "3";
+ var _loc5_:String = "“你突破了" + CommonData.babelMoreNameArr1[11] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--四象楼。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复80%兵力损失";
+ var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ _loc6_.wordWrap = true;
+ _loc6_.multiline = true;
+ _loc6_.height = 100;
+ addChild(_loc6_);
+ _loc6_.x = _loc1_.x;
+ _loc6_.y = _loc4_.y + 35;
+ var _loc7_:TextFormat = new TextFormat();
+ _loc7_.leading = 4;
+ _loc6_.defaultTextFormat = _loc7_;
+ _loc6_.htmlText = _loc5_;
+ var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc8_);
+ _loc8_.x = 415;
+ _loc8_.y = 270;
+ _loc8_.htmlText = "今日参加次数:";
+ this.free_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.free_txt);
+ this.free_txt.x = _loc8_.x + 88;
+ this.free_txt.y = _loc8_.y;
+ var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc9_);
+ _loc9_.x = _loc8_.x;
+ _loc9_.y = _loc8_.y + 23;
+ _loc9_.htmlText = "今日剩余次数:";
+ this.item_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.item_txt);
+ this.item_txt.x = _loc9_.x + 88;
+ this.item_txt.y = _loc9_.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220);
+ addChild(_loc10_);
+ _loc10_.x = _loc8_.x;
+ _loc10_.y = _loc9_.y + 23;
+ _loc10_.htmlText = "最高记录:";
+ this.title_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ addChild(this.title_txt);
+ this.title_txt.x = _loc10_.x + 68;
+ this.title_txt.y = _loc10_.y;
+ }
+
+ public function init(param1:int) : void
+ {
+ this.type = param1;
+ this.url = "bg_babel" + this.type + ".jpg";
+ this.loadBg(ServerConfig.IMG_BG_URL + this.url);
+ }
+
+ public function setData(param1:Object) : void
+ {
+ var _loc2_:int = int(param1.totalFreeTimes);
+ var _loc3_:int = int(param1["dfreeTimes" + this.type]);
+ var _loc4_:int = _loc2_ + 2 - _loc3_;
+ var _loc5_:int = int(param1.topStageId);
+ var _loc6_:Array = param1.topList as Array;
+ this.freeTimesT.text = "0";
+ this.itemTimesT.text = "0";
+ var _loc7_:int = this.type * 100 - 1400;
+ var _loc8_:int = _loc7_ + 100;
+ if(_loc5_ <= _loc7_)
+ {
+ _loc5_ = 0;
+ }
+ if(_loc5_ > _loc8_)
+ {
+ _loc5_ = 100;
+ }
+ if(_loc5_ > _loc7_ && _loc5_ <= _loc8_)
+ {
+ _loc5_ -= _loc7_;
+ }
+ this.free_txt.text = _loc4_ + " 次";
+ this.item_txt.text = _loc3_ + " 次";
+ this.title_txt.text = _loc5_.toString();
+ }
+
+ public function loadBg(param1:String) : void
+ {
+ this.bgload = new LoadResource(param1,this.loadBgBack);
+ }
+
+ private function loadBgBack(param1:Event) : void
+ {
+ var _loc2_:Bitmap = Bitmap(param1.target.loader.content);
+ this.bgload.clear();
+ addChild(_loc2_);
+ _loc2_.x = 2;
+ _loc2_.y = 2;
+ _loc2_.width = 391;
+ _loc2_.height = 372;
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescBuildUI.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescBuildUI.as
new file mode 100644
index 0000000..57138a6
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescBuildUI.as
@@ -0,0 +1,969 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.CommonData;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.GameData;
+ import com.view.newui.UIButton;
+ import com.view.newui.UITabBtn;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.message.MessageBoxUI;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+
+ public class BabelDescBuildUI extends PlayUI
+ {
+
+ private var bg1:Sprite;
+
+ private var page1:BabelDescPage1;
+
+ private var page2:BabelDescPage2;
+
+ private var page3:BabelDescPage3;
+
+ private var page4:BabelDescPage4;
+
+ private var page5:BabelDescPage5;
+
+ private var page6:BabelDescPage6;
+
+ private var page7:BabelDescPage7;
+
+ private var page8:BabelDescPage8;
+
+ private var page9:BabelDescPage9;
+
+ private var page10:BabelDescPage10;
+
+ private var page11:BabelDescPage11;
+
+ private var page12:BabelDescPage12;
+
+ private var page13:BabelDescPage13;
+
+ private var page14:BabelDescPage14;
+
+ private var page15:BabelDescPage15;
+
+ private var bg2:UIWindowBg;
+
+ private var bgSp:Sprite;
+
+ private var btnArr:Array;
+
+ private var btn_1:UITabBtn;
+
+ private var btn_2:UITabBtn;
+
+ private var btn_3:UITabBtn;
+
+ private var btn_4:UITabBtn;
+
+ private var btn_5:UITabBtn;
+
+ private var btn_6:UITabBtn;
+
+ private var btn_7:UITabBtn;
+
+ private var btn_8:UITabBtn;
+
+ private var btn_9:UITabBtn;
+
+ private var btn_10:UITabBtn;
+
+ private var btn_11:UITabBtn;
+
+ private var btn_12:UITabBtn;
+
+ private var btn_13:UITabBtn;
+
+ private var btn_14:UITabBtn;
+
+ private var btn_15:UITabBtn;
+
+ private var lastTab:UITabBtn;
+
+ private var prePage:Sprite;
+
+ private var enterBtn:UIButton;
+
+ private var towerObj:Object;
+
+ private var topStageId:int;
+
+ private var babelEnterUI1:BabelDescEnterUI1;
+
+ private var babelEnterUI2:BabelDescEnterUI2;
+
+ private var babelEnterUI3:BabelDescEnterUI3;
+
+ private var babelEnterUI4:BabelDescEnterUI4;
+
+ private var babelEnterUI5:BabelDescEnterUI5;
+
+ private var babelEnterUI6:BabelDescEnterUI6;
+
+ private var babelEnterUI7:BabelDescEnterUI7;
+
+ private var babelEnterUI8:BabelDescEnterUI8;
+
+ private var babelEnterUI9:BabelDescEnterUI9;
+
+ private var babelEnterUI10:BabelDescEnterUI10;
+
+ private var babelEnterUI11:BabelDescEnterUI11;
+
+ private var babelEnterUI12:BabelDescEnterUI12;
+
+ private var babelEnterUI13:BabelDescEnterUI13;
+
+ private var babelEnterUI14:BabelDescEnterUI14;
+
+ private var babelEnterUI15:BabelDescEnterUI15;
+
+ public function BabelDescBuildUI()
+ {
+ super();
+ }
+
+ override public function setWindowSize() : void
+ {
+ window_width = UIWindowBg.normal_window_w + 32;
+ window_heihgt = UIWindowBg.normal_window_h;
+ }
+
+ override public function setCloseBtnPosi() : void
+ {
+ ui_closeBtn.x = 640 + 32;
+ ui_closeBtn.y = 10;
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition2();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc16_:int = 0;
+ var _loc17_:UITabBtn = null;
+ var _loc18_:UIWindowBg = null;
+ var _loc19_:UIWindowBg = null;
+ var _loc20_:UITitleBg = null;
+ var _loc21_:UITitleBg = null;
+ super.createUI();
+ super.loadTitle(UITitleConfig.title_babel_desc);
+ this.btnArr = new Array();
+ this.btn_1 = new UITabBtn(CommonData.babelNameArr[10],5);
+ this.btn_2 = new UITabBtn(CommonData.babelNameArr[11],5);
+ this.btn_3 = new UITabBtn(CommonData.babelNameArr[12],5);
+ this.btn_4 = new UITabBtn(CommonData.babelNameArr[13],5);
+ this.btn_5 = new UITabBtn(CommonData.babelNameArr[14],5);
+ this.btn_6 = new UITabBtn(CommonData.babelNameArr[15],5);
+ this.btn_7 = new UITabBtn(CommonData.babelNameArr[16],5);
+ this.btn_8 = new UITabBtn(CommonData.babelNameArr[17],5);
+ this.btn_9 = new UITabBtn(CommonData.babelNameArr[18],5);
+ this.btn_10 = new UITabBtn(CommonData.babelNameArr[19],5);
+ this.btn_11 = new UITabBtn(CommonData.babelNameArr[20],5);
+ this.btn_12 = new UITabBtn(CommonData.babelNameArr[21],5);
+ this.btn_13 = new UITabBtn(CommonData.babelNameArr[22],5);
+ this.btn_14 = new UITabBtn(CommonData.babelNameArr[23],5);
+ this.btn_15 = new UITabBtn(CommonData.babelNameArr[24],5);
+ var _loc1_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE1);
+ var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE2);
+ var _loc3_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE3);
+ var _loc4_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE4);
+ var _loc5_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE5);
+ var _loc6_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE6);
+ var _loc7_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE7);
+ var _loc8_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE8);
+ var _loc9_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE9);
+ var _loc10_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE10);
+ var _loc11_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE11);
+ var _loc12_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE12);
+ var _loc13_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE13);
+ var _loc14_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE14);
+ var _loc15_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE15);
+ if(_loc1_ == 1)
+ {
+ this.btnArr.push(this.btn_1);
+ }
+ if(_loc2_ == 1)
+ {
+ this.btnArr.push(this.btn_2);
+ }
+ if(_loc3_ == 1)
+ {
+ this.btnArr.push(this.btn_3);
+ }
+ if(_loc4_ == 1)
+ {
+ this.btnArr.push(this.btn_4);
+ }
+ if(_loc5_ == 1)
+ {
+ this.btnArr.push(this.btn_5);
+ }
+ if(_loc6_ == 1)
+ {
+ this.btnArr.push(this.btn_6);
+ }
+ if(_loc7_ == 1)
+ {
+ this.btnArr.push(this.btn_7);
+ }
+ if(_loc8_ == 1)
+ {
+ this.btnArr.push(this.btn_8);
+ }
+ if(_loc9_ == 1)
+ {
+ this.btnArr.push(this.btn_9);
+ }
+ if(_loc10_ == 1)
+ {
+ this.btnArr.push(this.btn_10);
+ }
+ if(_loc11_ == 1)
+ {
+ this.btnArr.push(this.btn_11);
+ }
+ if(_loc12_ == 1)
+ {
+ this.btnArr.push(this.btn_12);
+ }
+ if(_loc13_ == 1)
+ {
+ this.btnArr.push(this.btn_13);
+ }
+ if(_loc14_ == 1)
+ {
+ this.btnArr.push(this.btn_14);
+ }
+ if(_loc15_ == 1)
+ {
+ this.btnArr.push(this.btn_15);
+ }
+ for each(_loc17_ in this.btnArr)
+ {
+ addChild(_loc17_);
+ _loc17_.x = 15 + _loc16_ * 44;
+ _loc17_.y = 40;
+ _loc17_.onClick = this.changeType;
+ _loc16_++;
+ }
+ _loc18_ = new UIWindowBg();
+ _loc18_.initSecondPanel(630 + 32,375);
+ addChild(_loc18_);
+ _loc18_.x = 11;
+ _loc18_.y = 65;
+ this.bg2 = new UIWindowBg();
+ this.bg2.initSecondPanel(385,366);
+ _loc18_.addChild(this.bg2);
+ this.bg2.x = 4;
+ this.bg2.y = 4;
+ _loc19_ = new UIWindowBg();
+ _loc19_.initThirdPanel(222 + 32,366);
+ _loc18_.addChild(_loc19_);
+ _loc19_.x = this.bg2.x + this.bg2.width + 4;
+ _loc19_.y = this.bg2.y;
+ _loc20_ = new UITitleBg("活动介绍",_loc19_.width);
+ _loc19_.addChild(_loc20_);
+ _loc20_.x = int(_loc19_.width / 2 - _loc20_.width / 2);
+ _loc21_ = new UITitleBg("参加活动",_loc19_.width);
+ _loc19_.addChild(_loc21_);
+ _loc21_.x = int(_loc19_.width / 2 - _loc21_.width / 2);
+ _loc21_.y = 230;
+ this.page1 = new BabelDescPage1();
+ _loc18_.addChild(this.page1);
+ this.page1.x = 4;
+ this.page1.y = 4;
+ this.page2 = new BabelDescPage2();
+ _loc18_.addChild(this.page2);
+ this.page2.visible = false;
+ this.page2.x = 4;
+ this.page2.y = 4;
+ this.page3 = new BabelDescPage3();
+ _loc18_.addChild(this.page3);
+ this.page3.visible = false;
+ this.page3.x = 4;
+ this.page3.y = 4;
+ this.page4 = new BabelDescPage4();
+ _loc18_.addChild(this.page4);
+ this.page4.visible = false;
+ this.page4.x = 4;
+ this.page4.y = 4;
+ this.page5 = new BabelDescPage5();
+ _loc18_.addChild(this.page5);
+ this.page5.visible = false;
+ this.page5.x = 4;
+ this.page5.y = 4;
+ this.page6 = new BabelDescPage6();
+ _loc18_.addChild(this.page6);
+ this.page6.visible = false;
+ this.page6.x = 4;
+ this.page6.y = 4;
+ this.page7 = new BabelDescPage7();
+ _loc18_.addChild(this.page7);
+ this.page7.visible = false;
+ this.page7.x = 4;
+ this.page7.y = 4;
+ this.page8 = new BabelDescPage8();
+ _loc18_.addChild(this.page8);
+ this.page8.visible = false;
+ this.page8.x = 4;
+ this.page8.y = 4;
+ this.page9 = new BabelDescPage9();
+ _loc18_.addChild(this.page9);
+ this.page9.visible = false;
+ this.page9.x = 4;
+ this.page9.y = 4;
+ this.page10 = new BabelDescPage10();
+ _loc18_.addChild(this.page10);
+ this.page10.visible = false;
+ this.page10.x = 4;
+ this.page10.y = 4;
+ this.page11 = new BabelDescPage11();
+ _loc18_.addChild(this.page11);
+ this.page11.visible = false;
+ this.page11.x = 4;
+ this.page11.y = 4;
+ this.page12 = new BabelDescPage12();
+ _loc18_.addChild(this.page12);
+ this.page12.visible = false;
+ this.page12.x = 4;
+ this.page12.y = 4;
+ this.page13 = new BabelDescPage13();
+ _loc18_.addChild(this.page13);
+ this.page13.visible = false;
+ this.page13.x = 4;
+ this.page13.y = 4;
+ this.page14 = new BabelDescPage14();
+ _loc18_.addChild(this.page14);
+ this.page14.visible = false;
+ this.page14.x = 4;
+ this.page14.y = 4;
+ this.page15 = new BabelDescPage15();
+ _loc18_.addChild(this.page15);
+ this.page15.visible = false;
+ this.page15.x = 4;
+ this.page15.y = 4;
+ this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP));
+ this.enterBtn = new UIButton("进 入",2,10);
+ _loc18_.addChild(this.enterBtn);
+ this.enterBtn.x = 492;
+ this.enterBtn.y = 342;
+ this.enterBtn.onClick = this.selectRound;
+ this.entryBabel();
+ this.getAwardList();
+ }
+
+ private function changeType(param1:MouseEvent) : void
+ {
+ var _loc2_:UITabBtn = param1.currentTarget as UITabBtn;
+ if(this.lastTab == _loc2_)
+ {
+ return;
+ }
+ if(this.prePage)
+ {
+ this.prePage.visible = false;
+ }
+ if(this.lastTab)
+ {
+ this.lastTab.select = false;
+ }
+ this.lastTab = _loc2_;
+ this.lastTab.select = true;
+ if(this.lastTab == this.btn_1)
+ {
+ this.page1.visible = true;
+ this.prePage = this.page1;
+ }
+ else if(this.lastTab == this.btn_2)
+ {
+ this.page2.visible = true;
+ this.prePage = this.page2;
+ }
+ else if(this.lastTab == this.btn_3)
+ {
+ this.page3.visible = true;
+ this.prePage = this.page3;
+ }
+ else if(this.lastTab == this.btn_4)
+ {
+ this.page4.visible = true;
+ this.prePage = this.page4;
+ }
+ else if(this.lastTab == this.btn_5)
+ {
+ this.page5.visible = true;
+ this.prePage = this.page5;
+ }
+ else if(this.lastTab == this.btn_6)
+ {
+ this.page6.visible = true;
+ this.prePage = this.page6;
+ }
+ else if(this.lastTab == this.btn_7)
+ {
+ this.page7.visible = true;
+ this.prePage = this.page7;
+ }
+ else if(this.lastTab == this.btn_8)
+ {
+ this.page8.visible = true;
+ this.prePage = this.page8;
+ }
+ else if(this.lastTab == this.btn_9)
+ {
+ this.page9.visible = true;
+ this.prePage = this.page9;
+ }
+ else if(this.lastTab == this.btn_10)
+ {
+ this.page10.visible = true;
+ this.prePage = this.page10;
+ }
+ else if(this.lastTab == this.btn_11)
+ {
+ this.page11.visible = true;
+ this.prePage = this.page11;
+ }
+ else if(this.lastTab == this.btn_12)
+ {
+ this.page12.visible = true;
+ this.prePage = this.page12;
+ }
+ else if(this.lastTab == this.btn_13)
+ {
+ this.page13.visible = true;
+ this.prePage = this.page13;
+ }
+ else if(this.lastTab == this.btn_14)
+ {
+ this.page14.visible = true;
+ this.prePage = this.page14;
+ }
+ else
+ {
+ this.page15.visible = true;
+ this.prePage = this.page15;
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL,this.getEnterBabelView);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_SelectRound,this.enterBabel);
+ if(this.page1)
+ {
+ this.entryBabel();
+ }
+ }
+
+ public function getAwardList() : void
+ {
+ ConnectService.getInstance().babelService.getStageAward();
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL,this.getEnterBabelView);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_SelectRound,this.enterBabel);
+ }
+
+ private function entryBabel() : void
+ {
+ ConnectService.getInstance().babelService.entryBabel();
+ }
+
+ private function getEnterBabelView(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ closeUI(null);
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ this.towerObj = param1.obj;
+ var _loc2_:int = int(this.towerObj.needSelectRound);
+ if(_loc2_ == 1)
+ {
+ this.page1.setData(this.towerObj);
+ this.page2.setData(this.towerObj);
+ this.page3.setData(this.towerObj);
+ this.page4.setData(this.towerObj);
+ this.page5.setData(this.towerObj);
+ this.page6.setData(this.towerObj);
+ this.page7.setData(this.towerObj);
+ this.page8.setData(this.towerObj);
+ this.page9.setData(this.towerObj);
+ this.page10.setData(this.towerObj);
+ this.page11.setData(this.towerObj);
+ this.page12.setData(this.towerObj);
+ this.page13.setData(this.towerObj);
+ this.page14.setData(this.towerObj);
+ this.page15.setData(this.towerObj);
+ }
+ else
+ {
+ this.enterBabelRoom(this.towerObj.stageId);
+ }
+ this.topStageId = this.towerObj.topStageId;
+ }
+
+ private function selectRound(param1:MouseEvent) : void
+ {
+ if(this.towerObj == null)
+ {
+ return;
+ }
+ if(this.page1.visible)
+ {
+ if(this.towerObj.dfreeTimes1 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1000)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[9] + "最高层,没有资格挑战" + CommonData.babelNameArr[10]);
+ return;
+ }
+ this.enterStage1();
+ return;
+ }
+ if(this.page2.visible)
+ {
+ if(this.towerObj.dfreeTimes2 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1100)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[10] + "最高层,没有资格挑战" + CommonData.babelNameArr[11]);
+ return;
+ }
+ this.enterStage2();
+ return;
+ }
+ if(this.page3.visible)
+ {
+ if(this.towerObj.dfreeTimes3 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1200)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[11] + "最高层,没有资格挑战" + CommonData.babelNameArr[12]);
+ return;
+ }
+ this.enterStage3();
+ return;
+ }
+ if(this.page4.visible)
+ {
+ if(this.towerObj.dfreeTimes4 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1300)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[12] + "最高层,没有资格挑战" + CommonData.babelNameArr[13]);
+ return;
+ }
+ this.enterStage4();
+ return;
+ }
+ if(this.page5.visible)
+ {
+ if(this.towerObj.dfreeTimes5 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1400)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[13] + "最高层,没有资格挑战" + CommonData.babelNameArr[14]);
+ return;
+ }
+ this.enterStage5();
+ return;
+ }
+ if(this.page6.visible)
+ {
+ if(this.towerObj.dfreeTimes6 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1500)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[14] + "最高层,没有资格挑战" + CommonData.babelNameArr[15]);
+ return;
+ }
+ this.enterStage6();
+ return;
+ }
+ if(this.page7.visible)
+ {
+ if(this.towerObj.dfreeTimes7 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1600)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[15] + "最高层,没有资格挑战" + CommonData.babelNameArr[16]);
+ return;
+ }
+ this.enterStage7();
+ return;
+ }
+ if(this.page8.visible)
+ {
+ if(this.towerObj.dfreeTimes8 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1700)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[16] + "最高层,没有资格挑战" + CommonData.babelNameArr[17]);
+ return;
+ }
+ this.enterStage8();
+ return;
+ }
+ if(this.page9.visible)
+ {
+ if(this.towerObj.dfreeTimes9 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1800)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[17] + "最高层,没有资格挑战" + CommonData.babelNameArr[18]);
+ return;
+ }
+ this.enterStage9();
+ return;
+ }
+ if(this.page10.visible)
+ {
+ if(this.towerObj.dfreeTimes10 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 1900)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[18] + "最高层,没有资格挑战" + CommonData.babelNameArr[19]);
+ return;
+ }
+ this.enterStage10();
+ return;
+ }
+ if(this.page11.visible)
+ {
+ if(this.towerObj.dfreeTimes11 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 2000)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[19] + "最高层,没有资格挑战" + CommonData.babelNameArr[20]);
+ return;
+ }
+ this.enterStage11();
+ return;
+ }
+ if(this.page12.visible)
+ {
+ if(this.towerObj.dfreeTimes12 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 2100)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[20] + "最高层,没有资格挑战" + CommonData.babelNameArr[21]);
+ return;
+ }
+ this.enterStage12();
+ return;
+ }
+ if(this.page13.visible)
+ {
+ if(this.towerObj.dfreeTimes13 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 2200)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[21] + "最高层,没有资格挑战" + CommonData.babelNameArr[22]);
+ return;
+ }
+ this.enterStage13();
+ return;
+ }
+ if(this.page14.visible)
+ {
+ if(this.towerObj.dfreeTimes14 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 2300)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[22] + "最高层,没有资格挑战" + CommonData.babelNameArr[23]);
+ return;
+ }
+ this.enterStage14();
+ return;
+ }
+ if(this.page15.visible)
+ {
+ if(this.towerObj.dfreeTimes15 <= 0)
+ {
+ MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来");
+ return;
+ }
+ if(this.topStageId < 2400)
+ {
+ MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[23] + "最高层,没有资格挑战" + CommonData.babelNameArr[24]);
+ return;
+ }
+ this.enterStage15();
+ return;
+ }
+ }
+
+ private function enterStage1() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1001);
+ }
+
+ private function enterStage2() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1101);
+ }
+
+ private function enterStage3() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1201);
+ }
+
+ private function enterStage4() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1301);
+ }
+
+ private function enterStage5() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1401);
+ }
+
+ private function enterStage6() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1501);
+ }
+
+ private function enterStage7() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1601);
+ }
+
+ private function enterStage8() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1701);
+ }
+
+ private function enterStage9() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1801);
+ }
+
+ private function enterStage10() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(1901);
+ }
+
+ private function enterStage11() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(2001);
+ }
+
+ private function enterStage12() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(2101);
+ }
+
+ private function enterStage13() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(2201);
+ }
+
+ private function enterStage14() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(2301);
+ }
+
+ private function enterStage15() : void
+ {
+ ConnectService.getInstance().babelService.selectRound(2401);
+ }
+
+ private function enterBabel(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.obj as int;
+ this.enterBabelRoom(_loc2_);
+ }
+
+ private function enterBabelRoom(param1:int) : void
+ {
+ if(param1 > 2500 || param1 < 1000)
+ {
+ MessageBoxUI.getInstance().addMessage("请先退出其他楼");
+ closeUI(null);
+ return;
+ }
+ if(param1 > 2400)
+ {
+ if(this.babelEnterUI15 == null)
+ {
+ this.babelEnterUI15 = new BabelDescEnterUI15();
+ }
+ this.babelEnterUI15.show();
+ }
+ else if(param1 > 2300)
+ {
+ if(this.babelEnterUI14 == null)
+ {
+ this.babelEnterUI14 = new BabelDescEnterUI14();
+ }
+ this.babelEnterUI14.show();
+ }
+ else if(param1 > 2200)
+ {
+ if(this.babelEnterUI13 == null)
+ {
+ this.babelEnterUI13 = new BabelDescEnterUI13();
+ }
+ this.babelEnterUI13.show();
+ }
+ else if(param1 > 2100)
+ {
+ if(this.babelEnterUI12 == null)
+ {
+ this.babelEnterUI12 = new BabelDescEnterUI12();
+ }
+ this.babelEnterUI12.show();
+ }
+ else if(param1 > 2000)
+ {
+ if(this.babelEnterUI11 == null)
+ {
+ this.babelEnterUI11 = new BabelDescEnterUI11();
+ }
+ this.babelEnterUI11.show();
+ }
+ else if(param1 > 1900)
+ {
+ if(this.babelEnterUI10 == null)
+ {
+ this.babelEnterUI10 = new BabelDescEnterUI10();
+ }
+ this.babelEnterUI10.show();
+ }
+ else if(param1 > 1800)
+ {
+ if(this.babelEnterUI9 == null)
+ {
+ this.babelEnterUI9 = new BabelDescEnterUI9();
+ }
+ this.babelEnterUI9.show();
+ }
+ else if(param1 > 1700)
+ {
+ if(this.babelEnterUI8 == null)
+ {
+ this.babelEnterUI8 = new BabelDescEnterUI8();
+ }
+ this.babelEnterUI8.show();
+ }
+ else if(param1 > 1600)
+ {
+ if(this.babelEnterUI7 == null)
+ {
+ this.babelEnterUI7 = new BabelDescEnterUI7();
+ }
+ this.babelEnterUI7.show();
+ }
+ else if(param1 > 1500)
+ {
+ if(this.babelEnterUI6 == null)
+ {
+ this.babelEnterUI6 = new BabelDescEnterUI6();
+ }
+ this.babelEnterUI6.show();
+ }
+ else if(param1 > 1400)
+ {
+ if(this.babelEnterUI5 == null)
+ {
+ this.babelEnterUI5 = new BabelDescEnterUI5();
+ }
+ this.babelEnterUI5.show();
+ }
+ else if(param1 > 1300)
+ {
+ if(this.babelEnterUI4 == null)
+ {
+ this.babelEnterUI4 = new BabelDescEnterUI4();
+ }
+ this.babelEnterUI4.show();
+ }
+ else if(param1 > 1200)
+ {
+ if(this.babelEnterUI3 == null)
+ {
+ this.babelEnterUI3 = new BabelDescEnterUI3();
+ }
+ this.babelEnterUI3.show();
+ }
+ else if(param1 > 1100)
+ {
+ if(this.babelEnterUI2 == null)
+ {
+ this.babelEnterUI2 = new BabelDescEnterUI2();
+ }
+ this.babelEnterUI2.show();
+ }
+ else if(param1 > 1000)
+ {
+ if(this.babelEnterUI1 == null)
+ {
+ this.babelEnterUI1 = new BabelDescEnterUI1();
+ }
+ this.babelEnterUI1.show();
+ }
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI1.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI1.as
new file mode 100644
index 0000000..bc52704
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI1.as
@@ -0,0 +1,965 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI1 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI1()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_1);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 1100)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 1000;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 1100)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 1000;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 1100 || _loc5_ < 1001))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI10.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI10.as
new file mode 100644
index 0000000..9d90d12
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI10.as
@@ -0,0 +1,970 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI10 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var stage_1:int = 2000;
+
+ private var stage_2:int = 1900;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI10()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_10);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI11.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI11.as
new file mode 100644
index 0000000..1d351ba
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI11.as
@@ -0,0 +1,970 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI11 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var stage_1:int = 2100;
+
+ private var stage_2:int = 2000;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI11()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_11);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI12.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI12.as
new file mode 100644
index 0000000..ca93a17
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI12.as
@@ -0,0 +1,970 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI12 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var stage_1:int = 2200;
+
+ private var stage_2:int = 2100;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI12()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_12);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI13.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI13.as
new file mode 100644
index 0000000..96547ae
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI13.as
@@ -0,0 +1,970 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI13 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var stage_1:int = 2300;
+
+ private var stage_2:int = 2200;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI13()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_13);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI14.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI14.as
new file mode 100644
index 0000000..23a386c
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI14.as
@@ -0,0 +1,970 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI14 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var stage_1:int = 2400;
+
+ private var stage_2:int = 2300;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI14()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_14);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI15.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI15.as
new file mode 100644
index 0000000..92d8a8f
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI15.as
@@ -0,0 +1,970 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI15 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var stage_1:int = 2500;
+
+ private var stage_2:int = 2400;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI15()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_15);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI2.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI2.as
new file mode 100644
index 0000000..1549f84
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI2.as
@@ -0,0 +1,965 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI2 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI2()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_2);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 1200)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 1100;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 1200)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 1100;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 1200 || _loc5_ < 1101))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI3.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI3.as
new file mode 100644
index 0000000..806b94b
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI3.as
@@ -0,0 +1,965 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI3 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI3()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_3);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ var _loc9_:int = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > 1300)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= 1200;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > 1300)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= 1200;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > 1300 || _loc5_ < 1201))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI4.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI4.as
new file mode 100644
index 0000000..845e244
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI4.as
@@ -0,0 +1,970 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI4 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var stage_1:int = 1400;
+
+ private var stage_2:int = 1300;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI4()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_4);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI5.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI5.as
new file mode 100644
index 0000000..5849e3d
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI5.as
@@ -0,0 +1,970 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI5 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var stage_1:int = 1500;
+
+ private var stage_2:int = 1400;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI5()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_5);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.();
+ }
+ }
+
+ override public function addToStage(param1:Event) : void
+ {
+ super.addToStage(param1);
+ this.getEnterView();
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().addEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.addEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ }
+
+ override public function removeFromStage(param1:Event) : void
+ {
+ super.removeFromStage(param1);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_VIEW,this.getEnterViewResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_STARTCOMBAT,this.getStartBattleResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_TREAT_HERO,this.treatHeroResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_SAVE,this.saveAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_AUTO_START,this.startAutoResult);
+ ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_EXIT,this.exitBabelUI);
+ Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc);
+ Utils.g_events.removeEventListener(BabelEvent.BABEL_AWARDLIST,this.initAwardDic);
+ if(Boolean(this.timer) && this.timer.running)
+ {
+ this.timer.stop();
+ this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame);
+ this.timer = null;
+ this.battleTime.text = "";
+ this.status = 1;
+ }
+ if(Boolean(this.autoBattleSet) && contains(this.autoBattleSet))
+ {
+ removeChild(this.autoBattleSet);
+ }
+ if(Boolean(this.awardList) && contains(this.awardList))
+ {
+ removeChild(this.awardList);
+ }
+ if(contains(ArmySetUI.getInstance()))
+ {
+ removeChild(ArmySetUI.getInstance());
+ }
+ if(Boolean(FastFightUI.instance) && contains(FastFightUI.instance))
+ {
+ removeChild(FastFightUI.instance);
+ }
+ }
+
+ private function changeArmySucc(param1:DevEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function exitBabelUI(param1:BabelEvent) : void
+ {
+ closeUI(null);
+ }
+
+ private function armyManage(param1:MouseEvent) : void
+ {
+ var _loc2_:ArmySetUI = ArmySetUI.getInstance();
+ _loc2_.open(this);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ }
+
+ private function startCombat(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length > 0)
+ {
+ this.status = 2;
+ this.setInBattle(true);
+ ConnectService.getInstance().babelService.startCombat(_loc2_);
+ }
+ else
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ }
+ }
+
+ private function getStartBattleResult(param1:BabelEvent) : void
+ {
+ var _loc2_:int = param1.result;
+ if(_loc2_ == ReturnBean.STATUS_4)
+ {
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ this.status = 1;
+ this.setInBattle(false);
+ return;
+ }
+ var _loc3_:Object = param1.obj;
+ this.combatId = _loc3_.combatId;
+ this.combatFinishSeconds = _loc3_.combatFinishSeconds;
+ this.status = 2;
+ this.startBattleTime();
+ var _loc4_:BattleViewUI = BattleViewUI.getInstance();
+ _loc4_.showUI(this.combatId);
+ }
+
+ private function startBattleTime() : void
+ {
+ if(this.combatFinishSeconds < 0)
+ {
+ this.combatFinishSeconds = 0;
+ }
+ if(this.combatFinishSeconds <= 0)
+ {
+ this.setInBattle(false);
+ this.status = 1;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ return;
+ }
+ if(this.timer == null)
+ {
+ this.timer = new Timer(1000);
+ this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame);
+ }
+ if(!this.timer.running)
+ {
+ this.setInBattle(true);
+ if(this.status == 2)
+ {
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn.visible = false;
+ this.autoSetBtn.visible = true;
+ }
+ if(this.status == 3)
+ {
+ this.combatFinishSeconds += 3;
+ this.stopAutoBtn.visible = true;
+ this.viewAutoBtn.visible = true;
+ this.autoSetBtn.visible = false;
+ }
+ this.timer.start();
+ }
+ }
+
+ private function timerFrame(param1:TimerEvent) : void
+ {
+ this.battleTime.text = "战斗结束剩余时间:" + this.combatFinishSeconds;
+ --this.combatFinishSeconds;
+ if(this.combatFinishSeconds < 0)
+ {
+ this.timer.stop();
+ this.timeOver();
+ }
+ }
+
+ private function timeOver() : void
+ {
+ this.battleTime.text = "";
+ this.setInBattle(false);
+ this.status = 1;
+ if(getOpenStatus())
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function setInBattle(param1:Boolean) : void
+ {
+ if(param1)
+ {
+ this.btn_yiliao.setUnEnable();
+ this.changeHero_btn.setUnEnable();
+ this.tongbing_btn.setUnEnable();
+ this.fight_btn.setUnEnable();
+ this.fastBtn.setUnEnable();
+ this.autoSetBtn.setUnEnable();
+ this.backBtn.setUnEnable();
+ }
+ else
+ {
+ this.btn_yiliao.setEnable();
+ this.changeHero_btn.setEnable();
+ this.tongbing_btn.setEnable();
+ this.fight_btn.setEnable();
+ this.fastBtn.setEnable();
+ this.autoSetBtn.setEnable();
+ this.backBtn.setEnable();
+ }
+ }
+
+ public function viewBattle() : void
+ {
+ if(this.battleView == null)
+ {
+ this.battleView = new BattleViewUI();
+ }
+ face.stage.addChild(this.battleView);
+ this.battleView.x = face.realWidth / 2;
+ this.battleView.y = face.realHeight / 2;
+ }
+
+ private function selectHero(param1:MouseEvent) : void
+ {
+ var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance();
+ _loc2_.setSelectheroArr(this.heroIdList);
+ addChild(_loc2_);
+ _loc2_.x = 0;
+ _loc2_.y = 0;
+ _loc2_.backFunc = this.selectHeroList;
+ }
+
+ public function selectHeroList(param1:Vector.) : void
+ {
+ var _loc3_:Hero = null;
+ if(param1.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in param1)
+ {
+ _loc2_.push(_loc3_.heroId);
+ }
+ ConnectService.getInstance().babelService.changeHero(_loc2_);
+ }
+
+ private function changeHeroResult(param1:BabelEvent) : void
+ {
+ this.getEnterView();
+ }
+
+ private function fastFight(param1:MouseEvent) : void
+ {
+ var _loc3_:int = 0;
+ var _loc2_:Array = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ if(_loc2_.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("请选择武将");
+ return;
+ }
+ var _loc4_:FastFightUI = FastFightUI.getInstance();
+ addChild(_loc4_);
+ _loc4_.heroIdArr = _loc2_;
+ _loc4_.setCurrStageId(this.stageId);
+ _loc4_.needCash = this.fastCash;
+ _loc4_.x = int(this.width / 2 - _loc4_.width / 2);
+ _loc4_.y = int(this.height / 2 - _loc4_.height / 2);
+ }
+
+ private function exitBabel(param1:MouseEvent) : void
+ {
+ MessageBoxUI.getInstance().confirmMsg("确认停止挑战吗",this.configExit);
+ }
+
+ private function openAutoBattleSet(param1:MouseEvent) : void
+ {
+ if(this.status != 1)
+ {
+ return;
+ }
+ if(this.heroIdList.length == 0)
+ {
+ MessageBoxUI.getInstance().addMessage("未选择武将");
+ return;
+ }
+ if(this.autoBattleSet == null)
+ {
+ this.autoBattleSet = new BabelAutoSet();
+ this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2);
+ this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2);
+ }
+ this.autoBattleSet.setCurrBattle(this.realStageId);
+ this.autoBattleSet.init(this.autoConfig);
+ addChild(this.autoBattleSet);
+ }
+
+ private function treatHero(param1:MouseEvent) : void
+ {
+ if(this.status == 1)
+ {
+ ConnectService.getInstance().babelService.treatAllHero();
+ }
+ }
+
+ private function treatHeroResult(param1:BabelEvent) : void
+ {
+ if(this.status == 1)
+ {
+ this.getEnterView();
+ }
+ }
+
+ private function viewItemList(param1:MouseEvent) : void
+ {
+ if(this.awardList == null)
+ {
+ this.awardList = new BabelAwardList();
+ this.awardList.x = int(width / 2 - this.awardList.width / 2);
+ this.awardList.y = int(height / 2 - this.awardList.height / 2);
+ }
+ this.awardList.setAwardList(this.awardRecordList);
+ addChild(this.awardList);
+ }
+
+ private function saveAutoResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Array = null;
+ var _loc3_:int = 0;
+ if(this.status == 1)
+ {
+ this.status = 3;
+ _loc2_ = new Array();
+ for each(_loc3_ in this.heroIdList)
+ {
+ _loc2_.push(_loc3_);
+ }
+ this.setInBattle(true);
+ this.autoSetBtn.visible = false;
+ ConnectService.getInstance().babelService.startCombatAuto(_loc2_);
+ }
+ }
+
+ private function startAutoResult(param1:BabelEvent) : void
+ {
+ if(param1.result == ReturnBean.STATUS_0)
+ {
+ this.status = 3;
+ this.combatId = param1.obj.combatId;
+ this.combatFinishSeconds = param1.obj.combatFinishSeconds;
+ this.startBattleTime();
+ return;
+ }
+ if(param1.result == ReturnBean.STATUS_4)
+ {
+ this.status = 1;
+ this.setInBattle(false);
+ this.combatFinishSeconds = 0;
+ this.startBattleTime();
+ MessageBoxUI.getInstance().addMessage(param1.msg);
+ return;
+ }
+ }
+
+ private function stopAutoBattle(param1:MouseEvent) : void
+ {
+ this.stopAutoBtn.setUnEnable();
+ ConnectService.getInstance().babelService.stopAutoCombat();
+ }
+
+ private function viewAutoBattle(param1:MouseEvent) : void
+ {
+ var _loc2_:BattleViewUI = null;
+ if(this.combatId != "")
+ {
+ _loc2_ = BattleViewUI.getInstance();
+ _loc2_.showUI(this.combatId);
+ }
+ }
+
+ private function configExit() : void
+ {
+ ConnectService.getInstance().babelService.stopChallenge();
+ }
+ }
+}
+
diff --git a/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI6.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI6.as
new file mode 100644
index 0000000..5a7e12e
--- /dev/null
+++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI6.as
@@ -0,0 +1,970 @@
+package com.view.ui.babeldesc
+{
+ import com.comfig.ClassConfig;
+ import com.common.PublicMethod;
+ import com.control.ConnectService;
+ import com.control.data.ReturnBean;
+ import com.control.play.event.BabelEvent;
+ import com.data.data.hero.Hero;
+ import com.events.DevEvent;
+ import com.utils.Utils;
+ import com.view.newui.UIButton;
+ import com.view.newui.UIConfig;
+ import com.view.newui.UIHeroItem;
+ import com.view.newui.UINums;
+ import com.view.newui.UITable;
+ import com.view.newui.UITitleBg;
+ import com.view.newui.UITitleConfig;
+ import com.view.newui.UIWindowBg;
+ import com.view.ui.PlayUI;
+ import com.view.ui.army.ArmySetUI;
+ import com.view.ui.babel.FastFightUI;
+ import com.view.ui.babel.StageItemData;
+ import com.view.ui.babel.mc.BabelAutoSet;
+ import com.view.ui.babel.mc.BabelAwardList;
+ import com.view.ui.babel.mc.StageAwardMc;
+ import com.view.ui.battle.BattleViewUI;
+ import com.view.ui.hero.HeroConst;
+ import com.view.ui.hero.HeroListSelectUI;
+ import com.view.ui.message.MessageBoxUI;
+ import fl.containers.ScrollPane;
+ import fl.controls.ScrollPolicy;
+ import flash.display.MovieClip;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import flash.events.TimerEvent;
+ import flash.text.TextField;
+ import flash.utils.Dictionary;
+ import flash.utils.Timer;
+
+ public class BabelDescEnterUI6 extends PlayUI
+ {
+
+ private var btn_yiliao:UIButton;
+
+ private var changeHero_btn:UIButton;
+
+ private var tongbing_btn:UIButton;
+
+ private var fight_btn:UIButton;
+
+ private var fastBtn:UIButton;
+
+ private var backBtn:UIButton;
+
+ private var autoSetBtn:UIButton;
+
+ private var tableMc:UITable;
+
+ private var topStageMc:UINums;
+
+ private var stageMc:UINums;
+
+ private var armyTypeText:TextField;
+
+ private var battleTime:TextField;
+
+ private var aktPowerText:TextField;
+
+ private var myArmyPower:TextField;
+
+ private var myArmyType:TextField;
+
+ private var myWarTimes:TextField;
+
+ private var addDropText:TextField;
+
+ private var addExpText:TextField;
+
+ private var addRecoverText:TextField;
+
+ private var stopAutoBtn:UIButton;
+
+ private var viewAutoBtn:UIButton;
+
+ private var stage_1:int = 1600;
+
+ private var stage_2:int = 1500;
+
+ private var resultMc:MovieClip;
+
+ private var awardMc:Sprite;
+
+ private var scrollPane:ScrollPane;
+
+ private var awardListVec:Vector.;
+
+ private var heroMcVec:Vector.;
+
+ private var stageId:int;
+
+ private var itemAwardList:Array;
+
+ private var autoConfig:String;
+
+ private var awardDic:Dictionary;
+
+ private var topStageId:int;
+
+ private var reliveTimes:int;
+
+ private var awardRecordList:Array;
+
+ private var realStageId:int;
+
+ private var heroIdList:Vector. = new Vector.();
+
+ private var combatFinishSeconds:int;
+
+ private var combatId:String;
+
+ private var timer:Timer;
+
+ private var status:int = 1;
+
+ private var battleView:BattleViewUI;
+
+ private var fastCash:int;
+
+ private var autoBattleSet:BabelAutoSet;
+
+ private var awardList:BabelAwardList;
+
+ public function BabelDescEnterUI6()
+ {
+ super();
+ }
+
+ override public function setPosition() : void
+ {
+ super.setPosition();
+ }
+
+ override public function createUI() : void
+ {
+ var _loc9_:int = 0;
+ var _loc22_:UIHeroItem = null;
+ var _loc23_:StageAwardMc = null;
+ super.addUIBg();
+ super.setPosition();
+ super.loadTitle(UITitleConfig.title_babel_desc_6);
+ var _loc1_:UIWindowBg = new UIWindowBg();
+ _loc1_.initSecondPanel(630,400);
+ addChild(_loc1_);
+ _loc1_.x = 11;
+ _loc1_.y = 39;
+ var _loc2_:UIWindowBg = new UIWindowBg();
+ _loc2_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc2_);
+ _loc2_.x = 4;
+ _loc2_.y = 4;
+ var _loc3_:UITitleBg = new UITitleBg("敌方信息",_loc2_.width);
+ _loc2_.addChild(_loc3_);
+ _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2);
+ var _loc4_:UIWindowBg = new UIWindowBg();
+ _loc4_.initSecondPanel(220,266);
+ _loc1_.addChild(_loc4_);
+ _loc4_.x = _loc2_.x + _loc2_.width + 3;
+ _loc4_.y = 4;
+ var _loc5_:UITitleBg = new UITitleBg("我方信息",_loc4_.width);
+ _loc4_.addChild(_loc5_);
+ _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2);
+ var _loc6_:Array = ["楼层","可能掉落"];
+ var _loc7_:Array = [73,95];
+ this.tableMc = new UITable();
+ this.tableMc.lineHeight = 25;
+ this.tableMc.drawLine = false;
+ this.tableMc.install(10,_loc6_,_loc7_);
+ _loc1_.addChild(this.tableMc);
+ this.tableMc.x = _loc4_.x + _loc4_.width + 3;
+ this.tableMc.y = 4;
+ var _loc8_:UIWindowBg = new UIWindowBg();
+ _loc8_.initThirdPanel(621,113);
+ _loc1_.addChild(_loc8_);
+ _loc8_.x = 4;
+ _loc8_.y = 283;
+ this.heroMcVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 5)
+ {
+ _loc22_ = new UIHeroItem();
+ _loc8_.addChild(_loc22_);
+ _loc22_.x = 5 + _loc9_ * 124;
+ _loc22_.y = 5;
+ this.heroMcVec.push(_loc22_);
+ _loc9_++;
+ }
+ this.btn_yiliao = new UIButton("医 疗",2,10);
+ _loc8_.addChild(this.btn_yiliao);
+ this.btn_yiliao.x = 10;
+ this.btn_yiliao.y = 95;
+ this.btn_yiliao.onClick = this.treatHero;
+ this.changeHero_btn = new UIButton("更 换",2,10);
+ _loc8_.addChild(this.changeHero_btn);
+ this.changeHero_btn.x = this.btn_yiliao.x + this.btn_yiliao.width + 5;
+ this.changeHero_btn.y = this.btn_yiliao.y;
+ this.changeHero_btn.onClick = this.selectHero;
+ this.tongbing_btn = new UIButton("配 兵",2,10);
+ _loc8_.addChild(this.tongbing_btn);
+ this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5;
+ this.tongbing_btn.y = this.btn_yiliao.y;
+ this.tongbing_btn.onClick = this.armyManage;
+ this.fight_btn = new UIButton("挑 战",2,10);
+ _loc8_.addChild(this.fight_btn);
+ this.fight_btn.x = 250;
+ this.fight_btn.y = this.btn_yiliao.y;
+ this.fight_btn.onClick = this.startCombat;
+ this.fastBtn = new UIButton("扫 荡",2,10);
+ _loc8_.addChild(this.fastBtn);
+ this.fastBtn.x = this.fight_btn.x + this.fight_btn.width + 30;
+ this.fastBtn.y = this.btn_yiliao.y;
+ this.fastBtn.onClick = this.fastFight;
+ this.autoSetBtn = new UIButton("自动挑战",2,10);
+ _loc8_.addChild(this.autoSetBtn);
+ this.autoSetBtn.onClick = this.openAutoBattleSet;
+ this.autoSetBtn.x = this.fastBtn.x + this.fastBtn.width + 5;
+ this.autoSetBtn.y = this.btn_yiliao.y;
+ this.stopAutoBtn = new UIButton("终 止",2,10);
+ _loc8_.addChild(this.stopAutoBtn);
+ this.stopAutoBtn.onClick = this.stopAutoBattle;
+ this.stopAutoBtn.x = this.autoSetBtn.x;
+ this.stopAutoBtn.y = this.autoSetBtn.y;
+ this.stopAutoBtn.visible = false;
+ this.viewAutoBtn = new UIButton("观 战",2,10);
+ _loc8_.addChild(this.viewAutoBtn);
+ this.viewAutoBtn.onClick = this.viewAutoBattle;
+ this.viewAutoBtn.x = this.stopAutoBtn.x + this.stopAutoBtn.width + 5;
+ this.viewAutoBtn.y = this.stopAutoBtn.y;
+ this.viewAutoBtn.visible = false;
+ this.backBtn = new UIButton("退 出",2,10);
+ _loc8_.addChild(this.backBtn);
+ this.backBtn.onClick = this.exitBabel;
+ this.backBtn.x = this.autoSetBtn.x + this.autoSetBtn.width + 80;
+ this.backBtn.y = this.btn_yiliao.y;
+ var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc10_.text = "当前楼层:";
+ _loc2_.addChild(_loc10_);
+ _loc10_.x = 10;
+ _loc10_.y = 40;
+ this.stageMc = new UINums(18);
+ _loc2_.addChild(this.stageMc);
+ this.stageMc.x = 70;
+ this.stageMc.y = 40;
+ this.stageMc.showNum(6);
+ var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc11_.text = "最高记录:";
+ _loc2_.addChild(_loc11_);
+ _loc11_.x = 10;
+ _loc11_.y = _loc10_.y + 30;
+ this.topStageMc = new UINums(18);
+ _loc2_.addChild(this.topStageMc);
+ this.topStageMc.x = 70;
+ this.topStageMc.y = _loc11_.y;
+ this.topStageMc.showNum(6);
+ var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc12_.text = "兵种信息:";
+ _loc2_.addChild(_loc12_);
+ _loc12_.x = 10;
+ _loc12_.y = _loc11_.y + 30;
+ this.armyTypeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70);
+ _loc2_.addChild(this.armyTypeText);
+ this.armyTypeText.x = _loc12_.x + 60;
+ this.armyTypeText.y = _loc12_.y;
+ this.battleTime = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140);
+ _loc2_.addChild(this.battleTime);
+ this.battleTime.x = 10;
+ this.battleTime.y = 245;
+ var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc13_.text = "战 斗 力:";
+ _loc2_.addChild(_loc13_);
+ _loc13_.x = 10;
+ _loc13_.y = _loc12_.y + 30;
+ this.aktPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc2_.addChild(this.aktPowerText);
+ this.aktPowerText.x = this.armyTypeText.x;
+ this.aktPowerText.y = _loc13_.y;
+ var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc14_.text = "上场结果:";
+ _loc2_.addChild(_loc14_);
+ _loc14_.x = 10;
+ _loc14_.y = _loc13_.y + 30;
+ this.resultMc = playUIRes.getMovieClip(ClassConfig.babel_result);
+ _loc2_.addChild(this.resultMc);
+ this.resultMc.x = this.armyTypeText.x + 3;
+ this.resultMc.y = _loc14_.y - 2;
+ this.resultMc.stage_mc.gotoAndStop(1);
+ var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc15_.text = "兵种信息:";
+ _loc4_.addChild(_loc15_);
+ _loc15_.x = 10;
+ _loc15_.y = 40;
+ this.myArmyType = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myArmyType);
+ this.myArmyType.x = _loc15_.x + 60;
+ this.myArmyType.y = _loc15_.y;
+ var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc16_.text = "战 斗 力:";
+ _loc4_.addChild(_loc16_);
+ _loc16_.x = 10;
+ _loc16_.y = _loc15_.y + 30;
+ this.myArmyPower = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120);
+ _loc4_.addChild(this.myArmyPower);
+ this.myArmyPower.x = this.myArmyType.x;
+ this.myArmyPower.y = _loc16_.y;
+ var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc17_.text = "挑战机会:";
+ _loc4_.addChild(_loc17_);
+ _loc17_.x = 10;
+ _loc17_.y = _loc16_.y + 30;
+ this.myWarTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.myWarTimes);
+ this.myWarTimes.x = this.myArmyType.x;
+ this.myWarTimes.y = _loc17_.y;
+ var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc18_.text = "增加掉落:";
+ _loc4_.addChild(_loc18_);
+ _loc18_.x = 10;
+ _loc18_.y = _loc17_.y + 30;
+ this.addDropText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addDropText);
+ this.addDropText.x = this.myArmyType.x;
+ this.addDropText.y = _loc18_.y;
+ var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc19_.text = "增加经验:";
+ _loc4_.addChild(_loc19_);
+ _loc19_.x = 10;
+ _loc19_.y = _loc18_.y + 30;
+ this.addExpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addExpText);
+ this.addExpText.x = this.myArmyType.x;
+ this.addExpText.y = _loc19_.y;
+ var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60);
+ _loc20_.text = "增加恢复:";
+ _loc4_.addChild(_loc20_);
+ _loc20_.x = 10;
+ _loc20_.y = _loc19_.y + 30;
+ this.addRecoverText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80);
+ _loc4_.addChild(this.addRecoverText);
+ this.addRecoverText.x = this.myArmyType.x;
+ this.addRecoverText.y = _loc20_.y;
+ var _loc21_:UIButton = new UIButton("查看奖励",2,10);
+ _loc4_.addChild(_loc21_);
+ _loc21_.x = 10;
+ _loc21_.y = _loc20_.y + 30;
+ _loc21_.onClick = this.viewItemList;
+ this.scrollPane = new ScrollPane();
+ this.scrollPane.setSize(164,250);
+ this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
+ this.tableMc.addChild(this.scrollPane);
+ this.scrollPane.y = 25;
+ this.awardMc = new Sprite();
+ this.scrollPane.source = this.awardMc;
+ this.awardListVec = new Vector.();
+ _loc9_ = 0;
+ while(_loc9_ < 10)
+ {
+ _loc23_ = new StageAwardMc();
+ this.awardMc.addChild(_loc23_);
+ this.awardListVec.push(_loc23_);
+ _loc23_.y = _loc9_ * 25;
+ _loc23_.x = 4;
+ _loc9_++;
+ }
+ this.scrollPane.update();
+ this.initAwardDic(null);
+ }
+
+ private function getEnterView() : void
+ {
+ ConnectService.getInstance().babelService.getPreCombatDetail();
+ }
+
+ private function getEnterViewResult(param1:BabelEvent) : void
+ {
+ var _loc2_:Object = param1.obj;
+ this.stageId = _loc2_.stageId;
+ this.fastCash = _loc2_.fastCash;
+ this.autoConfig = _loc2_.autoConfig;
+ var _loc3_:String = _loc2_.defArmyType;
+ var _loc4_:int = int(_loc2_.freeTimes);
+ var _loc5_:int = int(_loc2_.itemTimes);
+ this.reliveTimes = _loc2_.reliveTimes;
+ this.myWarTimes.text = this.reliveTimes + "次";
+ if(this.reliveTimes <= 0)
+ {
+ MessageBoxUI.getInstance().confirmMsg("已没有复活次数,勇闯重楼失败,请重新挑战",this.configExit);
+ return;
+ }
+ if(_loc2_.addExp > 0)
+ {
+ this.addExpText.text = "+" + _loc2_.addExp + "%";
+ }
+ else
+ {
+ this.addExpText.text = "未使用";
+ }
+ if(_loc2_.recover > 0)
+ {
+ this.addRecoverText.text = "已使用";
+ }
+ else
+ {
+ this.addRecoverText.text = "未使用";
+ }
+ if(_loc2_.doubleDrop > 0)
+ {
+ this.addDropText.text = "已使用";
+ }
+ else
+ {
+ this.addDropText.text = "未使用";
+ }
+ var _loc6_:Number = Math.round(_loc2_.monsterPower);
+ var _loc7_:Number = Math.round(_loc2_.atkPower);
+ var _loc8_:int = int(_loc2_.state);
+ var _loc9_:Array = _loc2_.atkHeroList as Array;
+ this.initHeroView(_loc9_);
+ this.awardRecordList = _loc2_.awardRecordList as Array;
+ this.combatId = _loc2_.combatId;
+ var _loc10_:int = int(_loc2_.exp);
+ var _loc11_:int = int(_loc2_.isPass);
+ var _loc12_:int = int(_loc2_.stopStage);
+ var _loc13_:Boolean = _loc2_.supplyArmy as Boolean;
+ this.topStageId = _loc2_.topStageId;
+ var _loc14_:int = int(_loc2_.totalFreeTimes);
+ var _loc15_:int = int(_loc2_.totalItemTimes);
+ var _loc16_:Boolean = _loc2_.treatHero as Boolean;
+ var _loc17_:int = int(_loc2_.winTimes);
+ var _loc18_:int = int(_loc2_.lastWinScore);
+ this.initStageMc(this.stageId);
+ this.armyTypeText.text = _loc3_ + "";
+ this.myArmyPower.text = _loc6_ + "";
+ this.aktPowerText.text = _loc7_ + "";
+ if(this.topStageId > this.stage_1)
+ {
+ this.topStageId = 100;
+ }
+ else
+ {
+ this.topStageId -= this.stage_2;
+ }
+ if(this.topStageId == 0)
+ {
+ this.topStageId = 1;
+ }
+ this.topStageMc.showNum(this.topStageId);
+ this.initWinResult(_loc18_);
+ this.combatFinishSeconds = _loc2_.combatFinishSeconds;
+ if(_loc8_ == 2)
+ {
+ this.status = 3;
+ }
+ else if(this.combatFinishSeconds > 0)
+ {
+ this.status = 2;
+ }
+ else
+ {
+ this.status = 1;
+ }
+ this.startBattleTime();
+ }
+
+ private function initWinResult(param1:int) : void
+ {
+ var _loc2_:int = 0;
+ switch(param1)
+ {
+ case 5:
+ _loc2_ = 7;
+ break;
+ case 4:
+ _loc2_ = 3;
+ break;
+ case 3:
+ _loc2_ = 4;
+ break;
+ case 2:
+ _loc2_ = 11;
+ break;
+ case 1:
+ _loc2_ = 9;
+ break;
+ case -1:
+ _loc2_ = 8;
+ break;
+ case -2:
+ _loc2_ = 10;
+ break;
+ case -3:
+ _loc2_ = 5;
+ break;
+ case -4:
+ _loc2_ = 2;
+ break;
+ case -5:
+ _loc2_ = 6;
+ break;
+ case 0:
+ _loc2_ = 1;
+ }
+ this.resultMc.stage_mc.gotoAndStop(_loc2_);
+ }
+
+ private function initStageMc(param1:int) : void
+ {
+ this.realStageId = param1;
+ if(this.realStageId > this.stage_1)
+ {
+ this.realStageId = 100;
+ }
+ else
+ {
+ this.realStageId -= this.stage_2;
+ }
+ this.stageMc.showNum(this.realStageId);
+ }
+
+ private function initAwardDic(param1:DevEvent) : void
+ {
+ var _loc5_:int = 0;
+ var _loc6_:StageAwardMc = null;
+ var _loc2_:Array = StageItemData.getAwardList();
+ if(_loc2_.length == 0)
+ {
+ return;
+ }
+ var _loc3_:int = 0;
+ var _loc4_:int = 0;
+ while(_loc4_ < _loc2_.length)
+ {
+ _loc5_ = int(_loc2_[_loc4_].stageId);
+ if(!(_loc5_ > this.stage_1 || _loc5_ <= this.stage_2))
+ {
+ if(_loc3_ > 9)
+ {
+ _loc6_ = new StageAwardMc();
+ this.awardMc.addChild(_loc6_);
+ this.awardListVec.push(_loc6_);
+ _loc6_.y = _loc3_ * 25;
+ _loc6_.x = 4;
+ }
+ this.awardListVec[_loc3_].setData(_loc2_[_loc4_]);
+ _loc3_++;
+ }
+ _loc4_++;
+ }
+ this.scrollPane.update();
+ }
+
+ private function initHeroView(param1:Array) : void
+ {
+ var _loc3_:* = undefined;
+ var _loc4_:int = 0;
+ var _loc5_:String = null;
+ this.clearHeroIdList();
+ var _loc2_:String = "";
+ for(_loc3_ in this.heroMcVec)
+ {
+ if(param1[_loc3_])
+ {
+ _loc4_ = int(param1[_loc3_].careerId);
+ _loc5_ = HeroConst.careerName(_loc4_);
+ _loc2_ += _loc5_.charAt(0);
+ this.heroIdList.push(param1[_loc3_].heroId);
+ this.heroMcVec[_loc3_].setData(param1[_loc3_]);
+ }
+ else
+ {
+ this.heroMcVec[_loc3_].setData(null);
+ }
+ }
+ this.myArmyType.text = _loc2_;
+ }
+
+ private function clearHeroIdList() : void
+ {
+ if(this.heroIdList.length > 0)
+ {
+ this.heroIdList = new Vector.