diff --git a/auto_login.sh b/auto_login.sh new file mode 100755 index 0000000..24eb25f --- /dev/null +++ b/auto_login.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "$(dirname "$0")" +python3 ./script/auto_login.py "$@" diff --git a/decrypt_swf.sh b/decrypt_swf.sh new file mode 100755 index 0000000..158d7fc --- /dev/null +++ b/decrypt_swf.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "$(dirname "$0")" +python3 ./script/decrypt_swf.py "$@" diff --git a/extract_cookie.sh b/extract_cookie.sh new file mode 100755 index 0000000..49012a2 --- /dev/null +++ b/extract_cookie.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "$(dirname "$0")" +python3 ./script/extract_cookie.py "$@" diff --git a/flash_decompiled/Button_disabledSkin.as b/flash_decompiled/Button_disabledSkin.as new file mode 100644 index 0000000..ea5a869 --- /dev/null +++ b/flash_decompiled/Button_disabledSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol80")] + public dynamic class Button_disabledSkin extends MovieClip + { + + public function Button_disabledSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/Button_downSkin.as b/flash_decompiled/Button_downSkin.as new file mode 100644 index 0000000..478d762 --- /dev/null +++ b/flash_decompiled/Button_downSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol82")] + public dynamic class Button_downSkin extends MovieClip + { + + public function Button_downSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/Button_emphasizedSkin.as b/flash_decompiled/Button_emphasizedSkin.as new file mode 100644 index 0000000..302d436 --- /dev/null +++ b/flash_decompiled/Button_emphasizedSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol84")] + public dynamic class Button_emphasizedSkin extends MovieClip + { + + public function Button_emphasizedSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/Button_overSkin.as b/flash_decompiled/Button_overSkin.as new file mode 100644 index 0000000..385fb28 --- /dev/null +++ b/flash_decompiled/Button_overSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol86")] + public dynamic class Button_overSkin extends MovieClip + { + + public function Button_overSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/Button_selectedDisabledSkin.as b/flash_decompiled/Button_selectedDisabledSkin.as new file mode 100644 index 0000000..0b18b08 --- /dev/null +++ b/flash_decompiled/Button_selectedDisabledSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol88")] + public dynamic class Button_selectedDisabledSkin extends MovieClip + { + + public function Button_selectedDisabledSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/Button_selectedDownSkin.as b/flash_decompiled/Button_selectedDownSkin.as new file mode 100644 index 0000000..3428418 --- /dev/null +++ b/flash_decompiled/Button_selectedDownSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol90")] + public dynamic class Button_selectedDownSkin extends MovieClip + { + + public function Button_selectedDownSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/Button_selectedOverSkin.as b/flash_decompiled/Button_selectedOverSkin.as new file mode 100644 index 0000000..505fa83 --- /dev/null +++ b/flash_decompiled/Button_selectedOverSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol92")] + public dynamic class Button_selectedOverSkin extends MovieClip + { + + public function Button_selectedOverSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/Button_selectedUpSkin.as b/flash_decompiled/Button_selectedUpSkin.as new file mode 100644 index 0000000..e108f0f --- /dev/null +++ b/flash_decompiled/Button_selectedUpSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol94")] + public dynamic class Button_selectedUpSkin extends MovieClip + { + + public function Button_selectedUpSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/Button_upSkin.as b/flash_decompiled/Button_upSkin.as new file mode 100644 index 0000000..f90e836 --- /dev/null +++ b/flash_decompiled/Button_upSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol96")] + public dynamic class Button_upSkin extends MovieClip + { + + public function Button_upSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/CellRenderer_disabledSkin.as b/flash_decompiled/CellRenderer_disabledSkin.as new file mode 100644 index 0000000..f7bb40d --- /dev/null +++ b/flash_decompiled/CellRenderer_disabledSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol65")] + public dynamic class CellRenderer_disabledSkin extends MovieClip + { + + public function CellRenderer_disabledSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/CellRenderer_downSkin.as b/flash_decompiled/CellRenderer_downSkin.as new file mode 100644 index 0000000..9197d68 --- /dev/null +++ b/flash_decompiled/CellRenderer_downSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol69")] + public dynamic class CellRenderer_downSkin extends MovieClip + { + + public function CellRenderer_downSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/CellRenderer_overSkin.as b/flash_decompiled/CellRenderer_overSkin.as new file mode 100644 index 0000000..9090656 --- /dev/null +++ b/flash_decompiled/CellRenderer_overSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol70")] + public dynamic class CellRenderer_overSkin extends MovieClip + { + + public function CellRenderer_overSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/CellRenderer_selectedDisabledSkin.as b/flash_decompiled/CellRenderer_selectedDisabledSkin.as new file mode 100644 index 0000000..d79245b --- /dev/null +++ b/flash_decompiled/CellRenderer_selectedDisabledSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol72")] + public dynamic class CellRenderer_selectedDisabledSkin extends MovieClip + { + + public function CellRenderer_selectedDisabledSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/CellRenderer_selectedDownSkin.as b/flash_decompiled/CellRenderer_selectedDownSkin.as new file mode 100644 index 0000000..d3157a6 --- /dev/null +++ b/flash_decompiled/CellRenderer_selectedDownSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol73")] + public dynamic class CellRenderer_selectedDownSkin extends MovieClip + { + + public function CellRenderer_selectedDownSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/CellRenderer_selectedOverSkin.as b/flash_decompiled/CellRenderer_selectedOverSkin.as new file mode 100644 index 0000000..51a04ef --- /dev/null +++ b/flash_decompiled/CellRenderer_selectedOverSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol74")] + public dynamic class CellRenderer_selectedOverSkin extends MovieClip + { + + public function CellRenderer_selectedOverSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/CellRenderer_selectedUpSkin.as b/flash_decompiled/CellRenderer_selectedUpSkin.as new file mode 100644 index 0000000..0fa5163 --- /dev/null +++ b/flash_decompiled/CellRenderer_selectedUpSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol75")] + public dynamic class CellRenderer_selectedUpSkin extends MovieClip + { + + public function CellRenderer_selectedUpSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/CellRenderer_upSkin.as b/flash_decompiled/CellRenderer_upSkin.as new file mode 100644 index 0000000..463b83c --- /dev/null +++ b/flash_decompiled/CellRenderer_upSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol63")] + public dynamic class CellRenderer_upSkin extends MovieClip + { + + public function CellRenderer_upSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ComboBox_disabledSkin.as b/flash_decompiled/ComboBox_disabledSkin.as new file mode 100644 index 0000000..01bc692 --- /dev/null +++ b/flash_decompiled/ComboBox_disabledSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol49")] + public dynamic class ComboBox_disabledSkin extends MovieClip + { + + public function ComboBox_disabledSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ComboBox_downSkin.as b/flash_decompiled/ComboBox_downSkin.as new file mode 100644 index 0000000..8d33680 --- /dev/null +++ b/flash_decompiled/ComboBox_downSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol55")] + public dynamic class ComboBox_downSkin extends MovieClip + { + + public function ComboBox_downSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ComboBox_overSkin.as b/flash_decompiled/ComboBox_overSkin.as new file mode 100644 index 0000000..3e5bcac --- /dev/null +++ b/flash_decompiled/ComboBox_overSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol52")] + public dynamic class ComboBox_overSkin extends MovieClip + { + + public function ComboBox_overSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ComboBox_upSkin.as b/flash_decompiled/ComboBox_upSkin.as new file mode 100644 index 0000000..bbe03e9 --- /dev/null +++ b/flash_decompiled/ComboBox_upSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol47")] + public dynamic class ComboBox_upSkin extends MovieClip + { + + public function ComboBox_upSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/List_skin.as b/flash_decompiled/List_skin.as new file mode 100644 index 0000000..92dd7a2 --- /dev/null +++ b/flash_decompiled/List_skin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol62")] + public dynamic class List_skin extends MovieClip + { + + public function List_skin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollArrowDown_disabledSkin.as b/flash_decompiled/ScrollArrowDown_disabledSkin.as new file mode 100644 index 0000000..00b359d --- /dev/null +++ b/flash_decompiled/ScrollArrowDown_disabledSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol29")] + public dynamic class ScrollArrowDown_disabledSkin extends MovieClip + { + + public function ScrollArrowDown_disabledSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollArrowDown_downSkin.as b/flash_decompiled/ScrollArrowDown_downSkin.as new file mode 100644 index 0000000..4e2dd63 --- /dev/null +++ b/flash_decompiled/ScrollArrowDown_downSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol11")] + public dynamic class ScrollArrowDown_downSkin extends MovieClip + { + + public function ScrollArrowDown_downSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollArrowDown_overSkin.as b/flash_decompiled/ScrollArrowDown_overSkin.as new file mode 100644 index 0000000..a078ef8 --- /dev/null +++ b/flash_decompiled/ScrollArrowDown_overSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol16")] + public dynamic class ScrollArrowDown_overSkin extends MovieClip + { + + public function ScrollArrowDown_overSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollArrowDown_upSkin.as b/flash_decompiled/ScrollArrowDown_upSkin.as new file mode 100644 index 0000000..d022c7b --- /dev/null +++ b/flash_decompiled/ScrollArrowDown_upSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol27")] + public dynamic class ScrollArrowDown_upSkin extends MovieClip + { + + public function ScrollArrowDown_upSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollArrowUp_disabledSkin.as b/flash_decompiled/ScrollArrowUp_disabledSkin.as new file mode 100644 index 0000000..a3c28ee --- /dev/null +++ b/flash_decompiled/ScrollArrowUp_disabledSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol30")] + public dynamic class ScrollArrowUp_disabledSkin extends MovieClip + { + + public function ScrollArrowUp_disabledSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollArrowUp_downSkin.as b/flash_decompiled/ScrollArrowUp_downSkin.as new file mode 100644 index 0000000..0d86a21 --- /dev/null +++ b/flash_decompiled/ScrollArrowUp_downSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol8")] + public dynamic class ScrollArrowUp_downSkin extends MovieClip + { + + public function ScrollArrowUp_downSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollArrowUp_overSkin.as b/flash_decompiled/ScrollArrowUp_overSkin.as new file mode 100644 index 0000000..295b995 --- /dev/null +++ b/flash_decompiled/ScrollArrowUp_overSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol20")] + public dynamic class ScrollArrowUp_overSkin extends MovieClip + { + + public function ScrollArrowUp_overSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollArrowUp_upSkin.as b/flash_decompiled/ScrollArrowUp_upSkin.as new file mode 100644 index 0000000..ac70a0c --- /dev/null +++ b/flash_decompiled/ScrollArrowUp_upSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol23")] + public dynamic class ScrollArrowUp_upSkin extends MovieClip + { + + public function ScrollArrowUp_upSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollBar_thumbIcon.as b/flash_decompiled/ScrollBar_thumbIcon.as new file mode 100644 index 0000000..507d362 --- /dev/null +++ b/flash_decompiled/ScrollBar_thumbIcon.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol32")] + public dynamic class ScrollBar_thumbIcon extends MovieClip + { + + public function ScrollBar_thumbIcon() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollPane_disabledSkin.as b/flash_decompiled/ScrollPane_disabledSkin.as new file mode 100644 index 0000000..be6badd --- /dev/null +++ b/flash_decompiled/ScrollPane_disabledSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol41")] + public dynamic class ScrollPane_disabledSkin extends MovieClip + { + + public function ScrollPane_disabledSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollPane_upSkin.as b/flash_decompiled/ScrollPane_upSkin.as new file mode 100644 index 0000000..9681df5 --- /dev/null +++ b/flash_decompiled/ScrollPane_upSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol42")] + public dynamic class ScrollPane_upSkin extends MovieClip + { + + public function ScrollPane_upSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollThumb_downSkin.as b/flash_decompiled/ScrollThumb_downSkin.as new file mode 100644 index 0000000..b559794 --- /dev/null +++ b/flash_decompiled/ScrollThumb_downSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol13")] + public dynamic class ScrollThumb_downSkin extends MovieClip + { + + public function ScrollThumb_downSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollThumb_overSkin.as b/flash_decompiled/ScrollThumb_overSkin.as new file mode 100644 index 0000000..0410913 --- /dev/null +++ b/flash_decompiled/ScrollThumb_overSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol18")] + public dynamic class ScrollThumb_overSkin extends MovieClip + { + + public function ScrollThumb_overSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollThumb_upSkin.as b/flash_decompiled/ScrollThumb_upSkin.as new file mode 100644 index 0000000..f0621d4 --- /dev/null +++ b/flash_decompiled/ScrollThumb_upSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol25")] + public dynamic class ScrollThumb_upSkin extends MovieClip + { + + public function ScrollThumb_upSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/ScrollTrack_skin.as b/flash_decompiled/ScrollTrack_skin.as new file mode 100644 index 0000000..523d747 --- /dev/null +++ b/flash_decompiled/ScrollTrack_skin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol2")] + public dynamic class ScrollTrack_skin extends MovieClip + { + + public function ScrollTrack_skin() + { + super(); + } + } +} + diff --git a/flash_decompiled/TextInput_disabledSkin.as b/flash_decompiled/TextInput_disabledSkin.as new file mode 100644 index 0000000..b341f86 --- /dev/null +++ b/flash_decompiled/TextInput_disabledSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol57")] + public dynamic class TextInput_disabledSkin extends MovieClip + { + + public function TextInput_disabledSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/TextInput_upSkin.as b/flash_decompiled/TextInput_upSkin.as new file mode 100644 index 0000000..b3fd7a8 --- /dev/null +++ b/flash_decompiled/TextInput_upSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol59")] + public dynamic class TextInput_upSkin extends MovieClip + { + + public function TextInput_upSkin() + { + super(); + } + } +} + diff --git a/flash_decompiled/_assets/assets.swf b/flash_decompiled/_assets/assets.swf new file mode 100644 index 0000000..8d1b83e Binary files /dev/null and b/flash_decompiled/_assets/assets.swf differ diff --git a/flash_decompiled/com/InstallFace.as b/flash_decompiled/com/InstallFace.as new file mode 100644 index 0000000..829442b --- /dev/null +++ b/flash_decompiled/com/InstallFace.as @@ -0,0 +1,957 @@ +package com +{ + import com.comfig.CommonData; + import com.comfig.DataConfig; + import com.comfig.PathConfig; + import com.common.App; + import com.control.ConnectService; + import com.control.castle.event.AllQueueEvent; + import com.control.castle.event.CastleBuildEvent; + import com.control.castle.event.CastleEvent; + import com.control.castle.event.CastleLevelUpEvent; + import com.control.castle.event.CastleWallEvent; + import com.control.data.ReturnBean; + import com.control.login.event.GetGameInfoEvent; + import com.control.tech.event.TechUpEvent; + import com.data.DataModoule; + import com.data.GameData; + import com.data.MemeberShip; + import com.data.data.city.CastleBuilding; + import com.data.data.items.AddSpeed; + import com.events.BroadEvent; + import com.events.BroadEventManage; + import com.events.DevEvent; + import com.events.EventUtils; + import com.net.ChatConnect1; + import com.net.ChatType; + import com.net.event.ChatEvent; + import com.newdata.user.NewUserData; + import com.utils.TimerManager; + import com.utils.Utils; + import com.view.Control; + import com.view.EconomicInside; + import com.view.EffectManager; + import com.view.MilitaryInside; + import com.view.TownInside; + import com.view.UIListManage; + import com.view.cache.BuildCache; + import com.view.mc.button.BuildControlBar; + import com.view.newui.UIConfig; + import com.view.ui.BarFactory; + import com.view.ui.BaseBuild; + import com.view.ui.buff.BuffManager; + import com.view.ui.buildlist.TimerInfo; + import com.view.ui.chat.UserControl; + import com.view.ui.countybattle.CountryFightView; + import com.view.ui.login.NewRoleUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.teach.TechBuildUI; + import com.view.ui.wall.CityWallUI; + import com.view.world.World; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.DisplayObject; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.display.Stage; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.system.ApplicationDomain; + import flash.utils.setTimeout; + + public class InstallFace + { + + private static var instance:InstallFace; + + private var _stage:Stage; + + private var _loaderInfo:ApplicationDomain; + + public var tip_bg:Sprite; + + private var townStatus:int; + + private var mapSprite:Sprite; + + private var worldSprite:Sprite; + + private var controlSprite:Sprite; + + private var _currCasId:int; + + public var _castleType:String; + + public var isValid:Boolean; + + private var _realWidth:int; + + private var _realHeight:int; + + private var _isConnect:Boolean = true; + + public var currStatus:int = 2; + + private var countryFightView:CountryFightView; + + private var chatConnect:ChatConnect1; + + public function InstallFace() + { + super(); + this.isValid = Utils.isValid(); + this.addEvent(); + } + + public static function getInstance() : InstallFace + { + if(instance == null) + { + return instance = new InstallFace(); + } + return instance; + } + + public function set loaderInfo(param1:ApplicationDomain) : void + { + this._loaderInfo = param1; + } + + public function get loaderInfo() : ApplicationDomain + { + return this._loaderInfo; + } + + public function get stage() : Stage + { + return this._stage; + } + + public function set stage(param1:Stage) : void + { + this._stage = param1; + this._stage.stageFocusRect = false; + this.stage.addEventListener(Event.RESIZE,this.reSizeWindow); + } + + public function get currCasId() : int + { + return this._currCasId; + } + + public function set currCasId(param1:int) : void + { + this._currCasId = param1; + } + + public function get isConnect() : Boolean + { + return this._isConnect; + } + + public function set isConnect(param1:Boolean) : void + { + this._isConnect = param1; + } + + public function get realWidth() : int + { + if(this._realWidth == 0) + { + this.reSizeWindow(null); + } + return this._realWidth; + } + + public function get realHeight() : int + { + return this._realHeight; + } + + public function addMc(param1:DisplayObject) : void + { + this._stage.addChild(param1); + } + + public function removeMc(param1:DisplayObject) : void + { + if(Boolean(param1) && this._stage.contains(param1)) + { + this._stage.removeChild(param1); + } + } + + private function init() : void + { + this.tip_bg = this.getSprite(UIConfig.tip_bg); + this.stage.addEventListener(MouseEvent.CLICK,this.stageClickEvent); + EventUtils.getInstance(); + } + + private function reSizeWindow(param1:Event) : void + { + this._realWidth = this.stage.stageWidth; + this._realHeight = this.stage.stageHeight; + if(this._realWidth > CommonData.STAGE_MAX_WIDTH) + { + this._realWidth = CommonData.STAGE_MAX_WIDTH; + } + if(this._realHeight > CommonData.STAGE_MAX_HEIGHT) + { + this._realHeight = CommonData.STAGE_MAX_HEIGHT; + } + } + + public function enterGameCheck() : void + { + this.init(); + if(NewUserData.getAccount().userId > 0) + { + ConnectService.getInstance().loginService.getGameData(); + this.sendNotice(); + } + else + { + this.createRole(); + } + } + + private function addControl() : void + { + this.controlSprite = new Sprite(); + this.mapSprite = new Sprite(); + this.worldSprite = new Sprite(); + this.addMc(this.worldSprite); + this.addMc(this.mapSprite); + this.addMc(this.controlSprite); + this.controlSprite.addChild(Control.getInstance()); + } + + private function createRole() : void + { + var _loc1_:NewRoleUI = new NewRoleUI(); + this._stage.addChild(_loc1_); + } + + private function getGameDataResult(param1:GetGameInfoEvent) : void + { + this.enterGame(); + } + + private function enterGame() : void + { + this.addControl(); + this.enterCity(); + } + + public function enterCity() : void + { + this._currCasId = DataModoule.getInstance().userMgr.castle.casId; + this._castleType = "main"; + this.townStatus = DataConfig.STATUS_IN; + var _loc1_:TownInside = TownInside.getInstance(); + this.mapSprite.addChild(_loc1_); + this.getAllQueue(); + } + + private function getAllQueue() : void + { + ConnectService.getInstance().castleService.listAllQueue(); + } + + private function stageClickEvent(param1:MouseEvent) : void + { + BuildControlBar.getInstance().clear(); + var _loc2_:UserControl = UserControl.getInstance(); + if(this.stage.contains(_loc2_)) + { + this.stage.removeChild(_loc2_); + } + } + + public function enterCastle(param1:String, param2:int) : void + { + var _loc3_:MilitaryInside = null; + var _loc4_:EconomicInside = null; + var _loc5_:TownInside = null; + this._currCasId = param2; + this._castleType = param1; + if(this.mapSprite.contains(TownInside.getInstance())) + { + this.mapSprite.removeChild(TownInside.getInstance()); + } + if(this.mapSprite.contains(MilitaryInside.getInstance())) + { + this.mapSprite.removeChild(MilitaryInside.getInstance()); + } + if(this.mapSprite.contains(EconomicInside.getInstance())) + { + this.mapSprite.removeChild(EconomicInside.getInstance()); + } + if(param1 == "military") + { + _loc3_ = MilitaryInside.getInstance(); + if(!this.mapSprite.contains(_loc3_)) + { + this.mapSprite.addChild(_loc3_); + } + _loc3_.setCastleId(param2); + } + if(param1 == "economic") + { + _loc4_ = EconomicInside.getInstance(); + if(!this.mapSprite.contains(_loc4_)) + { + this.mapSprite.addChild(_loc4_); + } + _loc4_.setCastleId(param2); + } + if(param1 == "main") + { + _loc5_ = TownInside.getInstance(); + if(!this.mapSprite.contains(_loc5_)) + { + this.mapSprite.addChild(_loc5_); + } + _loc5_.getCastleBuildList(); + } + ConnectService.getInstance().castleService.changeCurrCity(param2); + } + + private function addEvent() : void + { + ConnectService.getInstance().addEventListener(CastleBuildEvent.ADD_SPEED_OK,this.addSpeedResult); + ConnectService.getInstance().addEventListener(TechUpEvent.ADDSPEED_OK,this.addSpeedTechResult); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_ADDSPEED,this.addSpeedWallResult); + ConnectService.getInstance().addEventListener(CastleBuildEvent.BUILD_UP_OK,this.upBuildOkResult); + ConnectService.getInstance().addEventListener(CastleBuildEvent.BUILD_NEW,this.createNewBuildResult); + ConnectService.getInstance().addEventListener(CastleBuildEvent.BUILD_UP,this.upBuildResult); + ConnectService.getInstance().addEventListener(CastleBuildEvent.BUILD_DESTROY,this.destroyBuildResult); + ConnectService.getInstance().addEventListener(CastleBuildEvent.BUILD_CANCEL,this.cancelBuildResult); + ConnectService.getInstance().addEventListener(AllQueueEvent.AllQueue,this.getAllQueueResult); + ConnectService.getInstance().addEventListener(CastleLevelUpEvent.CASTLE_LEVELUP,this.castleLevelUpResult); + ConnectService.getInstance().addEventListener(TechUpEvent.UP_BEGIN,this.techLevelUpResult); + ConnectService.getInstance().addEventListener(TechUpEvent.UP_OVER,this.techUpOverResult); + ConnectService.getInstance().addEventListener(TechUpEvent.CANCEL_OVER,this.techCancelResult); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_PRODUCTARMY,this.productArmyResult); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_PRODUCTOVER,this.productArmyOverResult); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_CANCEL,this.cancelWallResult); + ConnectService.getInstance().addEventListener(GetGameInfoEvent.getData,this.getGameDataResult); + Utils.g_events.addEventListener(DevEvent.CASTLEMOVE,this.moveCastleSucc); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_changeBranchCastleType,this.changesucc); + } + + private function changesucc(param1:CastleEvent) : void + { + MessageBoxUI.getInstance().reLogin("转换成功,现在请重新登陆游戏"); + } + + private function moveCastleSucc(param1:DevEvent) : void + { + MessageBoxUI.getInstance().reLogin("迁城成功,请重新登录游戏"); + } + + private function moveCastleSuccF(param1:DevEvent) : void + { + Utils.g_events.removeEventListener(DevEvent.CASTLECHANGE,this.moveCastleSuccF); + if(this.currStatus == 1) + { + World.getInstance().moveCastleSuccF(MemeberShip.getMainCastle().posX,MemeberShip.getMainCastle().posY); + } + } + + private function addSpeedResult(param1:CastleBuildEvent) : void + { + var _loc2_:CastleBuilding = param1.castleBuild; + BuildCache.getInstance().updateCastleBuild(_loc2_); + var _loc3_:BaseBuild = this.getBaseBuild(_loc2_.casId,_loc2_.posNo); + if(_loc2_.upTime <= 0) + { + _loc2_.isUp = false; + TimerManager.getInstance().deleteBuildTime(_loc2_.posNo + "_" + _loc2_.casBuiId); + TimerManager.getInstance().refresh(); + if(_loc3_) + { + _loc3_.castleBuild = _loc2_; + _loc3_.setUpOkStatus(); + } + } + else + { + _loc2_.isUp = true; + TimerManager.getInstance().updateBuildTime(_loc2_.posNo + "_" + _loc2_.casBuiId,_loc2_.upTime); + } + } + + private function addSpeedTechResult(param1:TechUpEvent) : void + { + var _loc2_:AddSpeed = param1.addSpeed; + var _loc3_:Object = param1.obj; + if(_loc3_ == null) + { + TimerManager.getInstance().deleteSkillTime("tech_" + _loc2_.id); + TimerManager.getInstance().refresh(); + } + else + { + TimerManager.getInstance().updateTechTime("tech_" + _loc2_.id,_loc3_.remainTime); + } + } + + private function addSpeedWallResult(param1:CastleWallEvent) : void + { + var _loc2_:AddSpeed = param1.addSpeed; + var _loc3_:Object = param1.wallObject; + if(_loc3_ == null) + { + TimerManager.getInstance().deleteWallTime("wall_" + _loc2_.id); + TimerManager.getInstance().refresh(); + } + else + { + TimerManager.getInstance().updateWallTime("wall_" + _loc2_.id,_loc3_.time); + } + } + + private function upBuildOkResult(param1:CastleBuildEvent) : void + { + var _loc2_:int = int(param1.obj.casId); + var _loc3_:String = param1.obj.posNo; + var _loc4_:int = int(param1.obj.casBuiId); + var _loc5_:CastleBuilding = param1.castleBuild; + if(_loc5_ != null) + { + _loc5_.isUp = false; + } + if(_loc5_ != null) + { + BuildCache.getInstance().updateCastleBuild(_loc5_); + } + else + { + BuildCache.getInstance().delCastleBuild(_loc2_,_loc3_); + } + var _loc6_:BaseBuild = this.getBaseBuild(_loc2_,_loc3_); + if(_loc6_) + { + if(_loc5_) + { + _loc6_.castleBuild = _loc5_; + } + _loc6_.setUpOkStatus(); + if(_loc5_ == null) + { + this.delBuild(_loc2_,_loc3_); + } + } + TimerManager.getInstance().deleteBuildTime(_loc3_ + "_" + _loc4_); + TimerManager.getInstance().refresh(); + } + + private function createNewBuildResult(param1:CastleBuildEvent) : void + { + var _loc4_:BaseBuild = null; + var _loc2_:CastleBuilding = param1.castleBuild; + BuildCache.getInstance().updateCastleBuild(_loc2_); + var _loc3_:TimerInfo = this.getBuildTime(_loc2_); + if(_loc2_.casId == this.currCasId) + { + if(this._castleType == "military") + { + _loc4_ = MilitaryInside.getInstance().createNewBuild(_loc2_); + _loc4_.setUpStatus(); + _loc3_.process1 = _loc4_.processDo; + } + if(this._castleType == "economic") + { + _loc4_ = EconomicInside.getInstance().createNewBuild(_loc2_); + _loc4_.setUpStatus(); + _loc3_.process1 = _loc4_.processDo; + } + if(this._castleType == "main") + { + _loc4_ = TownInside.getInstance().createNewBuild(_loc2_); + _loc4_.setUpStatus(); + _loc3_.process1 = _loc4_.processDo; + } + } + TimerManager.getInstance().setBuildTimerEvent(_loc3_); + } + + private function upBuildResult(param1:CastleBuildEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + var _loc2_:CastleBuilding = param1.castleBuild; + BuildCache.getInstance().updateCastleBuild(_loc2_); + var _loc3_:BaseBuild = this.getBaseBuild(_loc2_.casId,_loc2_.posNo); + var _loc4_:TimerInfo = this.getBuildTime(_loc2_); + if(_loc3_) + { + _loc3_.castleBuild = _loc2_; + _loc3_.setUpStatus(); + _loc4_.process1 = _loc3_.processDo; + } + TimerManager.getInstance().setBuildTimerEvent(_loc4_); + } + + private function destroyBuildResult(param1:CastleBuildEvent) : void + { + var _loc2_:CastleBuilding = param1.castleBuild; + BuildCache.getInstance().updateCastleBuild(_loc2_); + var _loc3_:BaseBuild = this.getBaseBuild(_loc2_.casId,_loc2_.posNo); + var _loc4_:TimerInfo = this.getBuildTime(_loc2_,false); + if(_loc3_) + { + _loc3_.castleBuild = _loc2_; + _loc3_.setUpStatus(); + _loc4_.process1 = _loc3_.processDo; + } + TimerManager.getInstance().setBuildTimerEvent(_loc4_); + } + + private function cancelBuildResult(param1:CastleBuildEvent) : void + { + var _loc2_:CastleBuilding = param1.castleBuild; + BuildCache.getInstance().updateCastleBuild(_loc2_); + var _loc3_:BaseBuild = this.getBaseBuild(_loc2_.casId,_loc2_.posNo); + _loc2_.isUp = false; + if(_loc3_) + { + if(_loc2_.level > 0) + { + _loc3_.castleBuild = _loc2_; + } + _loc3_.setUpOkStatus(); + if(_loc2_.level == 0) + { + this.delBuild(_loc2_.casId,_loc2_.posNo); + } + } + TimerManager.getInstance().deleteBuildTime(_loc2_.posNo + "_" + _loc2_.casBuiId); + TimerManager.getInstance().refresh(); + } + + private function getAllQueueResult(param1:AllQueueEvent) : void + { + var _loc2_:Array = param1.allQueueArr; + TimerManager.getInstance().setAllQueue(_loc2_); + } + + private function castleLevelUpResult(param1:CastleLevelUpEvent) : void + { + var _loc2_:String = param1.cityUrl; + if(this._castleType == "main") + { + TownInside.getInstance().casLvUp(_loc2_); + } + BuffManager.getInstance().update(); + } + + private function techLevelUpResult(param1:TechUpEvent) : void + { + var _loc2_:TechBuildUI = UIListManage.getInstance().getClass(TechBuildUI) as TechBuildUI; + var _loc3_:TimerInfo = this.getTechTime(param1.obj); + if(_loc2_) + { + _loc2_.techLevelUp(param1.obj); + _loc3_.process1 = _loc2_.processDo; + } + TimerManager.getInstance().setBuildTimerEvent(_loc3_,2); + } + + private function techUpOverResult(param1:TechUpEvent) : void + { + } + + private function techCancelResult(param1:TechUpEvent) : void + { + TimerManager.getInstance().deleteSkillTime("tech_" + param1.obj); + TimerManager.getInstance().refresh(); + } + + private function productArmyResult(param1:CastleWallEvent) : void + { + var _loc5_:Boolean = false; + var _loc2_:Object = param1.wallObject; + var _loc3_:TimerInfo = this.getWallTime(_loc2_); + var _loc4_:CityWallUI = UIListManage.getInstance().getClass(CityWallUI) as CityWallUI; + if(_loc4_) + { + _loc5_ = _loc4_.contains(_loc4_.page1); + if(_loc5_) + { + _loc4_.page1.addProductArmy(_loc2_); + _loc3_.process1 = _loc4_.page1.buildWallMc.setTime; + } + } + TimerManager.getInstance().setBuildTimerEvent(_loc3_,3); + } + + private function productArmyOverResult(param1:CastleWallEvent) : void + { + } + + private function cancelWallResult(param1:CastleWallEvent) : void + { + TimerManager.getInstance().deleteWallTime("wall_" + param1.wallObject.id); + TimerManager.getInstance().refresh(); + } + + private function getWallTime(param1:Object) : TimerInfo + { + var _loc2_:TimerInfo = new TimerInfo(); + _loc2_.timerId = "wall_" + param1.id; + _loc2_.timerName = param1.army.armyName; + _loc2_.upStr = "建造中"; + _loc2_.queId = param1.id; + _loc2_.timeType = 3; + _loc2_.timerLevel = 0; + _loc2_.nextLevel = 0; + _loc2_.timerNeed = param1.time; + return _loc2_; + } + + private function getTechTime(param1:Object) : TimerInfo + { + var _loc2_:TimerInfo = new TimerInfo(); + _loc2_.timerId = "tech_" + param1.queId; + _loc2_.timerName = param1.techName; + _loc2_.upStr = "研究中"; + _loc2_.queId = param1.queId; + _loc2_.timeType = 2; + _loc2_.type = param1.entName; + _loc2_.timerLevel = param1.currLv; + _loc2_.nextLevel = param1.toLevel; + _loc2_.timerNeed = param1.remainTime; + return _loc2_; + } + + private function getBuildTime(param1:CastleBuilding, param2:Boolean = true) : TimerInfo + { + var _loc3_:TimerInfo = new TimerInfo(); + _loc3_.timerId = param1.posNo + "_" + param1.casBuiId; + _loc3_.timerName = param1.building.buiName; + _loc3_.queId = param1.buildQueue.queId; + _loc3_.timeType = 1; + _loc3_.timerLevel = param1.level; + _loc3_.casId = param1.casId; + if(param2) + { + _loc3_.upStr = "建造中"; + _loc3_.nextLevel = param1.level + 1; + } + else + { + _loc3_.upStr = "拆除中"; + _loc3_.nextLevel = param1.level - 1; + } + _loc3_.timerNeed = param1.upTime + 1; + return _loc3_; + } + + private function getBaseBuild(param1:int, param2:String) : BaseBuild + { + var _loc3_:BaseBuild = null; + if(this.currCasId == param1) + { + if(this._castleType == "military") + { + _loc3_ = MilitaryInside.getInstance().getBuildByPosNo(param2) as BaseBuild; + } + if(this._castleType == "economic") + { + _loc3_ = EconomicInside.getInstance().getBuildByPosNo(param2) as BaseBuild; + } + if(this._castleType == "main") + { + _loc3_ = TownInside.getInstance().getBuildByPosNo(param2) as BaseBuild; + } + } + return _loc3_; + } + + private function delBuild(param1:int, param2:String) : void + { + if(this.currCasId == param1) + { + if(this._castleType == "military") + { + MilitaryInside.getInstance().delBuildyPosNo(param2); + } + if(this._castleType == "economic") + { + EconomicInside.getInstance().delBuildyPosNo(param2); + } + if(this._castleType == "main") + { + TownInside.getInstance().delBuildyPosNo(param2); + } + } + } + + public function setBuildNameView() : void + { + if(this._castleType == "military") + { + MilitaryInside.getInstance().setBuildNameView(); + } + if(this._castleType == "economic") + { + EconomicInside.getInstance().setBuildNameView(); + } + if(this._castleType == "main") + { + TownInside.getInstance().setBuildNameView(); + } + } + + public function toWorld() : void + { + this.currStatus = 1; + if(Boolean(this.countryFightView) && this.worldSprite.contains(this.countryFightView)) + { + this.worldSprite.removeChild(this.countryFightView); + } + Control.getInstance().toWorld(true); + this.mapSprite.visible = false; + var _loc1_:World = World.getInstance(); + this.worldSprite.addChild(_loc1_); + } + + public function toTown() : void + { + this.currStatus = 2; + if(Boolean(this.countryFightView) && this.worldSprite.contains(this.countryFightView)) + { + this.worldSprite.removeChild(this.countryFightView); + } + var _loc1_:World = World.getInstance(); + if(this.worldSprite.contains(_loc1_)) + { + this.worldSprite.removeChild(_loc1_); + } + Control.getInstance().toWorld(false); + this.mapSprite.visible = true; + } + + public function toCountryFight() : void + { + this.currStatus = 3; + var _loc1_:World = World.getInstance(); + if(Boolean(_loc1_) && this.worldSprite.contains(_loc1_)) + { + this.worldSprite.removeChild(_loc1_); + } + if(this.countryFightView == null) + { + this.countryFightView = new CountryFightView(); + } + this.worldSprite.addChild(this.countryFightView); + } + + public function connectToserver() : void + { + this.chatConnect = new ChatConnect1(); + this.chatConnect.connect(PathConfig.getInstance().getServerIp(),PathConfig.getInstance().getServerPort()); + this.chatConnect.addEventListener(ChatEvent.MESSAGE,this.getMessFromSer); + } + + public function getChatConnect() : ChatConnect1 + { + return this.chatConnect; + } + + public function loginByUserId() : void + { + if(NewUserData.getAccount().userId > 0) + { + this.chatConnect.login(); + } + } + + private function getMessFromSer(param1:ChatEvent) : void + { + var _loc2_:BroadEvent = null; + var _loc3_:Array = null; + var _loc4_:Object = null; + switch(param1.messId) + { + case ChatType.type_1: + if(Control.instance != null) + { + Control.getInstance().chatMainUI.printWorldMess(param1.mess); + } + break; + case ChatType.type_2: + if(Control.instance != null) + { + Control.getInstance().chatMainUI.printCountryMess(param1.mess); + } + break; + case ChatType.type_3: + if(Control.instance != null) + { + Control.getInstance().chatMainUI.printUnionMess(param1.mess); + } + break; + case ChatType.type_4: + if(Control.instance != null) + { + Control.getInstance().chatMainUI.printUserMess(param1.mess); + } + break; + case ChatType.type_5: + if(Control.instance != null) + { + Control.getInstance().sysMessUI.printMess(param1.mess); + } + break; + case ChatType.type_8: + this.chatConnect.close(); + MessageBoxUI.getInstance().reLogin(); + break; + case ChatType.type_9: + _loc2_ = new BroadEvent(BroadEvent.HEXAGRAM_EVENT); + _loc2_.msg = param1.mess; + BroadEventManage.getInstance().dispatchEvent(_loc2_); + break; + case ChatType.type_10: + Control.getInstance().sysMessUI.titleMsg(param1.mess); + break; + case ChatType.type_11: + EffectManager.getInstance().dispatchEvent(new Event(param1.mess)); + break; + case ChatType.type_12: + _loc3_ = param1.mess.split("[-]"); + _loc4_ = new Object(); + _loc4_.name = _loc3_[0]; + _loc4_.cons = _loc3_[1]; + if(BarFactory.instance == null) + { + BarFactory.getInstance(); + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.NewPlayerEvent,_loc4_)); + if(NewUserData.getUser() != null && MemeberShip.getCurrCasId() > 0) + { + ConnectService.getInstance().castleService.calcuDevData(); + } + break; + case ChatType.type_13: + this.chatConnect.close(); + MessageBoxUI.getInstance().reLogin(param1.mess); + break; + case ChatType.type_14: + if(Control.instance != null) + { + Control.getInstance().sysMessUI.titleMsg(param1.mess); + } + break; + case ChatType.type_15: + GameData.onLineUser.setOnlineUser(param1.mess); + break; + case ChatType.type_16: + if(Control.instance != null) + { + Control.getInstance().sysMessUI.userTitleMsg(param1.mess); + } + break; + case ChatType.type_17: + if(Control.instance != null) + { + Control.getInstance().sysMessUI.kingLoginMsg(param1.mess); + } + break; + case ChatType.type_20: + if(Control.instance != null) + { + } + break; + case ChatType.type_21: + if(Control.instance != null) + { + Control.getInstance().sysMessUI.broadcastMsg(param1.mess); + } + break; + case ChatType.type_22: + if(Control.instance != null) + { + this.chatConnect.sendHeartConnect(); + } + } + } + + private function sendNotice() : void + { + setTimeout(function():void + { + var _loc1_:String = "【系统公告】本游戏一切充值请联系QQ:" + GameData.getConfigMap().QQ + "。欢迎加入讨论群:" + GameData.getConfigMap().QQUN + ""; + Control.getInstance().chatMainUI.printWorldMess(_loc1_); + },60000); + } + + 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 getBitMap(param1:String) : Bitmap + { + return new Bitmap(this.getPng(param1)); + } + + 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 getClass(param1:String) : Class + { + return App.getClass(param1,this._loaderInfo); + } + } +} + diff --git a/flash_decompiled/com/Main.as b/flash_decompiled/com/Main.as new file mode 100644 index 0000000..f2381a4 --- /dev/null +++ b/flash_decompiled/com/Main.as @@ -0,0 +1,73 @@ +package com +{ + import com.comfig.PathConfig; + import com.control.ConnectService; + import com.view.ui.login.LoginUI; + import flash.display.Sprite; + import flash.display.StageAlign; + import flash.display.StageScaleMode; + import flash.events.Event; + import flash.net.URLLoader; + import flash.net.URLRequest; + + public class Main extends Sprite + { + + private var xml:String = "xml/resource.xml"; + + private var urlloader:URLLoader; + + private var verson:String; + + public function Main() + { + super(); + if(stage) + { + this.init(); + } + else + { + addEventListener(Event.ADDED_TO_STAGE,this.init); + } + } + + private function init(param1:Event = null) : void + { + removeEventListener(Event.ADDED_TO_STAGE,this.init); + stage.scaleMode = StageScaleMode.NO_SCALE; + stage.align = StageAlign.TOP_LEFT; + var _loc2_:Object = root.loaderInfo.parameters; + if(_loc2_["verson"] != null) + { + this.verson = _loc2_["verson"]; + } + else + { + this.verson = ""; + } + PathConfig.getInstance().setVerson(this.verson); + this.loadXML(); + } + + private function loadXML() : void + { + this.urlloader = new URLLoader(new URLRequest(this.xml)); + this.urlloader.addEventListener(Event.COMPLETE,this.loadedXmlComplete); + } + + private function loadedXmlComplete(param1:Event) : void + { + this.urlloader.removeEventListener(Event.COMPLETE,this.loadedXmlComplete); + this.urlloader = null; + PathConfig.getInstance().Init(XML(param1.target.data)); + InstallFace.getInstance().stage = stage; + var _loc2_:LoginUI = new LoginUI(); + ConnectService.getInstance(); + InstallFace.getInstance().addMc(_loc2_); + _loc2_.x = int(InstallFace.getInstance().stage.stageWidth / 2); + _loc2_.y = int(InstallFace.getInstance().stage.stageHeight / 2); + } + } +} + diff --git a/flash_decompiled/com/comfig/ClassConfig.as b/flash_decompiled/com/comfig/ClassConfig.as new file mode 100644 index 0000000..344c37b --- /dev/null +++ b/flash_decompiled/com/comfig/ClassConfig.as @@ -0,0 +1,1010 @@ +package com.comfig +{ + public class ClassConfig + { + + public static const lib_star_1:String = "lib_star_1"; + + public static const lib_star_2:String = "lib_star_2"; + + public static const lib_star_3:String = "lib_star_3"; + + public static const lib_star_4:String = "lib_star_4"; + + public static const lib_star_5:String = "lib_star_5"; + + public static const lib_star_6:String = "lib_star_6"; + + public static const lib_country:String = "lib_country"; + + public static const lib_emptyarea:String = "lib_emptyarea"; + + public static const lib_exp:String = "lib_exp"; + + public static const lib_load_progress:String = "lib_load_progress"; + + public static const lib_message_bg:String = "lib_message_bg"; + + public static const lib_tech_bg:String = "lib_tech_bg"; + + public static const lib_tech_left:String = "lib_tech_left"; + + public static const lib_tip_bg:String = "lib_tip_bg"; + + public static const lib_ui_bg_3:String = "lib_ui_bg_3"; + + public static const lib_ui_bg_4:String = "lib_ui_bg_4"; + + public static const lib_ui_bg_5:String = "lib_ui_bg_5"; + + public static const lib_ui_bg_6:String = "lib_ui_bg_6"; + + public static const lib_ui_lock:String = "lib_ui_lock"; + + public static const lib_ui_title_1:String = "lib_ui_title_1"; + + public static const lib_herobg:String = "lib_herobg"; + + public static const lib_hero_careerName:String = "lib_hero_careerName"; + + public static const lib_ui_career1:String = "lib_ui_career1"; + + public static const lib_ui_career2:String = "lib_ui_career2"; + + public static const lib_ui_career3:String = "lib_ui_career3"; + + public static const lib_ui_career4:String = "lib_ui_career4"; + + public static const lib_ui_career5:String = "lib_ui_career5"; + + public static const lib_ui_town_1:String = "lib_ui_town_1"; + + public static const lib_ui_town_2:String = "lib_ui_town_2"; + + public static const lib_ui_bg_9:String = "lib_ui_bg_9"; + + public static const lib_ui_bg_10:String = "lib_ui_bg_10"; + + public static const lib_ui_bg_11:String = "lib_ui_bg_11"; + + public static const lib_page:String = "lib_page"; + + public static const lib_ui_vip:String = "lib_ui_vip"; + + public static const lib_ui_vipmc:String = "lib_ui_vipmc"; + + public static const lib_level_0:String = "lib_level_0"; + + public static const lib_level_1:String = "lib_level_1"; + + public static const lib_level_2:String = "lib_level_2"; + + public static const lib_level_3:String = "lib_level_3"; + + public static const lib_level_4:String = "lib_level_4"; + + public static const lib_level_5:String = "lib_level_5"; + + public static const lib_level_6:String = "lib_level_6"; + + public static const lib_level_7:String = "lib_level_7"; + + public static const lib_level_8:String = "lib_level_8"; + + public static const lib_level_9:String = "lib_level_9"; + + public static const lib_num_0:String = "lib_num_0"; + + public static const lib_num_1:String = "lib_num_1"; + + public static const lib_num_2:String = "lib_num_2"; + + public static const lib_num_3:String = "lib_num_3"; + + public static const lib_num_4:String = "lib_num_4"; + + public static const lib_num_5:String = "lib_num_5"; + + public static const lib_num_6:String = "lib_num_6"; + + public static const lib_num_7:String = "lib_num_7"; + + public static const lib_num_8:String = "lib_num_8"; + + public static const lib_num_9:String = "lib_num_9"; + + public static const lib_num_10:String = "lib_num_10"; + + public static const lib_num_11:String = "lib_num_11"; + + public static const lib_txt_exp:String = "lib_txt_exp"; + + public static const lib_txt_range:String = "lib_txt_range"; + + public static const lib_ui_cash:String = "lib_ui_cash"; + + public static const lib_ui_point:String = "lib_ui_point"; + + public static const lib_ui_loading:String = "lib_ui_loading"; + + public static const lib_ui_input:String = "lib_ui_input"; + + public static const lib_ui_jihuo:String = "lib_ui_jihuo"; + + public static const lib_ui_last:String = "lib_ui_last"; + + public static const lib_ui_next:String = "lib_ui_next"; + + public static const lib_ui_pre:String = "lib_ui_pre"; + + public static const lib_ui_first:String = "lib_ui_first"; + + public static const lib_ui_view:String = "lib_ui_view"; + + public static const lib_battle:String = "lib_battle"; + + public static const lib_border_bg:String = "lib_border_bg"; + + public static const lib_ui_farm:String = "lib_ui_farm"; + + public static const lib_ui_close:String = "lib_ui_close"; + + public static const lib_ui_friendapply:String = "lib_ui_friendapply"; + + public static const lib_ui_mail:String = "lib_ui_mail"; + + public static const lib_ui_talk:String = "lib_ui_talk"; + + public static const lib_ui_noreadmail:String = "lib_ui_noreadmail"; + + public static const bg_1:String = "bg_1"; + + public static const lib_fujian:String = "lib_fujian"; + + public static const lib_biezhen:String = "lib_biezhen"; + + public static const IMG_LOCK:String = "IMG_LOCK"; + + public static const IMG_DIRECT:String = "IMG_DIRECT"; + + public static const lib_skillcontrol:String = "lib_skillcontrol"; + + public static const lib_horse_bg:String = "lib_horse_bg"; + + public static const lib_horse_1:String = "lib_horse_1"; + + public static const lib_horse_2:String = "lib_horse_2"; + + public static const lib_horse_3:String = "lib_horse_3"; + + public static const lib_exchange_1:String = "lib_exchange_1"; + + public static const lib_exchange_2:String = "lib_exchange_2"; + + public static const lib_exchange_3:String = "lib_exchange_3"; + + public static const lib_exchange_4:String = "lib_exchange_4"; + + public static const lib_exchange_5:String = "lib_exchange_5"; + + public static const lib_img_border:String = "lib_img_border"; + + public static const lib_img_usereqbg:String = "lib_img_usereqbg"; + + public static const lib_boxBg:String = "lib_boxbg"; + + public static const lib_junshi_bg:String = "lib_junshi_bg"; + + public static const lib_junshi_exp:String = "lib_junshi_exp"; + + public static const lib_junshi_fuyin1:String = "lib_junshi_fuyin1"; + + public static const lib_junshi_fuyin2:String = "lib_junshi_fuyin2"; + + public static const lib_junshi_skillbg:String = "lib_junshi_skillbg"; + + public static const item_lock:String = "item_lock"; + + public static const item_hover:String = "item_hover"; + + public static const item_bg:String = "item_bg"; + + public static const mibao_text_1:String = "mibao_text_1"; + + public static const mibao_text_2:String = "mibao_text_2"; + + public static const mibao_text_3:String = "mibao_text_3"; + + public static const mibao_text_4:String = "mibao_text_4"; + + public static const mibao_text_5:String = "mibao_text_5"; + + public static const mibao_text_6:String = "mibao_text_6"; + + public static const mibao_text_7:String = "mibao_text_7"; + + public static const mibao_text_8:String = "mibao_text_8"; + + public static const ui_head:String = "ui_head"; + + public static const ui_right_1:String = "ui_right_1"; + + public static const ui_buildlist:String = "ui_buildlist"; + + public static const ui_build:String = "ui_build"; + + public static const ui_house:String = "ui_house"; + + public static const ui_warehouse:String = "ui_warehouse"; + + public static const ui_wall_bg:String = "ui_wall_bg"; + + public static const ui_wall:String = "ui_wall"; + + public static const ui_userhead_bg:String = "ui_userhead_bg"; + + public static const ui_bg_1:String = "ui_bg_1"; + + public static const ui_bg_2:String = "ui_bg_2"; + + public static const ui_country:String = "ui_country"; + + public static const ui_user_page2:String = "ui_user_page2"; + + public static const ui_heropage2:String = "ui_heropage2"; + + public static const ui_newcastle:String = "ui_newcastle"; + + public static const ui_economic_bg:String = "ui_economic_bg"; + + public static const ui_military_bg:String = "ui_military_bg"; + + public static const ui_resource_1:String = "ui_resource_1"; + + public static const ui_resource_2:String = "ui_resource_2"; + + public static const ui_resource_3:String = "ui_resource_3"; + + public static const ui_resource_4:String = "ui_resource_4"; + + public static const ui_toright:String = "ui_toright"; + + public static const ui_cellar:String = "ui_cellar"; + + public static const ui_economic_list:String = "ui_economic_list"; + + public static const ui_military_list:String = "ui_military_list"; + + public static const ui_barracks:String = "ui_barracks"; + + public static const ui_btn_add:String = "ui_btn_add"; + + public static const ui_economic:String = "ui_economic"; + + public static const ui_military:String = "ui_military"; + + public static const ui_strategy:String = "ui_strategy"; + + public static const ui_heroqianghua:String = "ui_heroqianghua"; + + public static const ui_herojinjie:String = "ui_herojinjie"; + + public static const ui_movecastle:String = "ui_movecastle"; + + public static const ui_skill:String = "ui_skill"; + + public static const ui_rebuildcastle:String = "ui_rebuildcastle"; + + public static const ui_strongbg:String = "ui_strongbg"; + + public static const ui_jiantou:String = "ui_jiantou"; + + public static const button_1:String = "button_1"; + + public static const button_2:String = "button_2"; + + public static const button_3:String = "button_3"; + + public static const button_4:String = "button_4"; + + public static const button_5:String = "button_5"; + + public static const button_6:String = "button_6"; + + public static const button_7:String = "button_7"; + + public static const button_8:String = "button_8"; + + public static const button_9:String = "button_9"; + + public static const button_10:String = "button_10"; + + public static const button_11:String = "button_11"; + + public static const button_12:String = "button_12"; + + public static const button_13:String = "button_13"; + + public static const button_14:String = "button_14"; + + public static const button_15:String = "button_15"; + + public static const button_16:String = "button_16"; + + public static const button_17:String = "button_17"; + + public static const button_18:String = "button_18"; + + public static const button_19:String = "button_19"; + + public static const button_head_next:String = "button_head_next"; + + public static const button_head_pre:String = "button_head_pre"; + + public static const button_right:String = "button_right"; + + public static const button_left:String = "button_left"; + + public static const sprite_bg_1:String = "sprite_bg_1"; + + public static const sprite_btn_1:String = "sprite_btn_1"; + + public static const sprite_btn_2:String = "sprite_btn_2"; + + public static const sprite_btn_3:String = "sprite_btn_3"; + + public static const sprite_btn_4:String = "sprite_btn_4"; + + public static const sprite_btn_5:String = "sprite_btn_5"; + + public static const sprite_btn_6:String = "sprite_btn_6"; + + public static const sprite_btn_7:String = "sprite_btn_7"; + + public static const sprite_btn_8:String = "sprite_btn_8"; + + public static const sprite_btn_9:String = "sprite_btn_9"; + + public static const sprite_btn_10:String = "sprite_btn_10"; + + public static const sprite_btn_11:String = "sprite_btn_11"; + + public static const sprite_btn_12:String = "sprite_btn_12"; + + public static const sprite_btn_13:String = "sprite_btn_13"; + + public static const sprite_btn_14:String = "sprite_btn_14"; + + public static const sprite_btn_15:String = "sprite_btn_15"; + + public static const sprite_btn_16:String = "sprite_btn_16"; + + public static const sprite_btn_17:String = "sprite_btn_17"; + + public static const sprite_btn_18:String = "sprite_btn_18"; + + public static const sprite_btn_update:String = "sprite_btn_update"; + + public static const control_btn_1:String = "control_btn_1"; + + public static const control_btn_2:String = "control_btn_2"; + + public static const control_btn_3:String = "control_btn_3"; + + public static const control_btn_4:String = "control_btn_4"; + + public static const control_btn_5:String = "control_btn_5"; + + public static const control_btn_6:String = "control_btn_6"; + + public static const control_btn_7:String = "control_btn_7"; + + public static const control_btn_8:String = "control_btn_8"; + + public static const sprite_input:String = "sprite_input"; + + public static const sprite_btn_checkBox:String = "sprite_btn_checkBox"; + + public static const LIB_UI_BT_FANGXING:String = "LIB_UI_BT_FANGXING"; + + public static const button_close:String = "button_close"; + + public static const button_help:String = "button_help"; + + public static const button_20:String = "button_20"; + + public static const build_name:String = "build_name"; + + public static const build_time:String = "build_time"; + + public static const build_up_mc:String = "build_up_mc"; + + public static const build_packItems:String = "build_packItems"; + + public static const build_ironItem:String = "build_ironItem"; + + public static const build_Itemover:String = "build_Itemover"; + + public static const build_castle_main:String = "build_castle_main"; + + public static const build_castle_eco:String = "build_castle_eco"; + + public static const build_castle_mil:String = "build_castle_mil"; + + public static const build_herostar:String = "build_herostar"; + + public static const ui_soldierview:String = "ui_soldierview"; + + public static const ui_areabg:String = "ui_areabg"; + + public static const build_MenuButton:String = "build_MenuButton"; + + public static const build_userToolsMenu:String = "build_userToolsMenu"; + + public static const ui_whitemc:String = "ui_whitemc"; + + public static const ui_dismissArmy:String = "ui_dismissArmy"; + + public static const ui_gift:String = "ui_gift"; + + public static const ui_welcome:String = "ui_welcome"; + + public static const ui_taskItem:String = "ui_taskItem"; + + public static const ui_box:String = "ui_box"; + + public static const ui_changeCountry:String = "ui_changeCountry"; + + public static const ui_welcome_1:String = "ui_welcome_1"; + + public static const ui_welcome_2:String = "ui_welcome_2"; + + public static const ui_welcome_3:String = "ui_welcome_3"; + + public static const ui_welcome_4:String = "ui_welcome_4"; + + public static const ui_welcome_5:String = "ui_welcome_5"; + + public static const ui_logo:String = "ui_logo"; + + public static const farm_bg:String = "farm_bg"; + + public static const farm_control:String = "farm_control"; + + public static const farm_topControl:String = "farm_topControl"; + + public static const farm_info:String = "farm_info"; + + public static const farm_touqu:String = "farm_touqu"; + + public static const farm_zhengshou:String = "farm_zhengshou"; + + public static const farm_qiangshou:String = "farm_qiangshou"; + + public static const farm_lidi:String = "farm_lidi"; + + public static const farm_warn:String = "farm_warn"; + + public static const farm_FriendListItem:String = "farm_FriendListItem"; + + public static const farm_rule:String = "farm_rule"; + + public static const farm_tree:String = "farm_tree"; + + public static const farm_jiaoshui:String = "farm_jiaoshui"; + + public static const farm_friend:String = "farm_friend"; + + public static const farm_friendmask:String = "farm_friendmask"; + + public static const farm_seed:String = "farm_seed"; + + public static const farm_fieldbg:String = "farm_fieldbg"; + + public static const farm_zhengshoupre:String = "farm_zhengshoupre"; + + public static const farm_steal:String = "farm_steal"; + + public static const farm_msg:String = "farm_msg"; + + public static const StoneSeed:String = "StoneSeed"; + + public static const QingTongSeed:String = "QingTongSeed"; + + public static const WoodSeed:String = "WoodSeed"; + + public static const FoodSeed:String = "FoodSeed"; + + public static const shiliaoZi:String = "shiliaoZi"; + + public static const QingTong:String = "QingTong"; + + public static const qingtongZi:String = "qingtongZi"; + + public static const mucaiZi:String = "mucaiZi"; + + public static const liangshiZi:String = "liangshiZi"; + + public static const dianjuanZi:String = "dianjuanZi"; + + public static const MuCai:String = "MuCai"; + + public static const ShiTouShu:String = "ShiTouShu"; + + public static const QingTongShu:String = "QingTongShu"; + + public static const MuCaiShu:String = "MuCaiShu"; + + public static const MaiZi:String = "MaiZi"; + + public static const MaiZiShu:String = "MaiZiShu"; + + public static const ShiTou:String = "ShiTou"; + + public static const NullPlace:String = "NullPlace"; + + public static const WarPlace:String = "WarPlace"; + + public static const NextPlace:String = "NextPlace"; + + public static const Shop_BuyMark:String = "Shop_BuyMark"; + + public static const Shop_ShopItem:String = "Shop_ShopItem"; + + public static const Shop_PrestigeShopItem:String = "Shop_PrestigeShopItem"; + + public static const Shop_BuyResourceView:String = "Shop_BuyResourceView"; + + public static const Shop_BuyView:String = "Shop_BuyView"; + + public static const Shop_PrestigeBuyView:String = "Shop_PrestigeBuyView"; + + public static const new_cashorpoint:String = "new_cashorpoint"; + + public static const Iron_page_1:String = "Iron_page_1"; + + public static const Iron_page_2:String = "Iron_page_2"; + + public static const Iron_page_3:String = "Iron_page_3"; + + public static const Iron_page_4:String = "Iron_page_4"; + + public static const Iron_page_5:String = "Iron_page_5"; + + public static const Iron_buy:String = "Iron_buy"; + + public static const jingyan_career_1:String = "jingyan_career_1"; + + public static const jingyan_career_2:String = "jingyan_career_2"; + + public static const jingyan_career_3:String = "jingyan_career_3"; + + public static const jingyan_career_4:String = "jingyan_career_4"; + + public static const herobabel_label_1:String = "herobabel_label_1"; + + public static const herobabel_label_2:String = "herobabel_label_2"; + + public static const herobabel_3:String = "herobabel_3"; + + public static const herobabel_4:String = "herobabel_4"; + + public static const herobabel_5:String = "herobabel_5"; + + public static const herobabel_1:String = "herobabel_1"; + + public static const herobabel_2:String = "herobabel_2"; + + public static const herobabel_mc_1:String = "herobabel_mc_1"; + + public static const herobabel_mc_2:String = "herobabel_mc_2"; + + public static const herobabel_mc_3:String = "herobabel_mc_3"; + + public static const babel_1:String = "babel_1"; + + public static const babel_2:String = "babel_2"; + + public static const babel_3:String = "babel_3"; + + public static const babel_4:String = "babel_4"; + + public static const babel_5:String = "babel_5"; + + public static const babel_6:String = "babel_6"; + + public static const babel_result:String = "babel_result"; + + public static const title_battleresult:String = "title_battleresult"; + + public static const selecthero_bg:String = "selecthero_bg"; + + public static const league_2:String = "league_2"; + + public static const league_sp1:String = "league_sp1"; + + public static const league_sp2:String = "league_sp2"; + + public static const league_sp3:String = "league_sp3"; + + public static const league_sp4:String = "league_sp4"; + + public static const league_sp5:String = "league_sp5"; + + public static const league_sp6:String = "league_sp6"; + + public static const league_sp7:String = "league_sp7"; + + public static const league_sp8:String = "league_sp8"; + + public static const babel_mc_hero:String = "babel_mc_hero"; + + public static const babel_mc_hero2:String = "babel_mc_hero2"; + + public static const babel_mc_item:String = "babel_mc_item"; + + public static const province_mc:String = "province_mc"; + + public static const hebi_1:String = "hebi_1"; + + public static const hebi_2:String = "hebi_2"; + + public static const province_3:String = "province_3"; + + public static const hero_up_1:String = "hero_up_1"; + + public static const reg1:String = "reg1"; + + public static const reg2:String = "reg2"; + + public static const reg3:String = "reg3"; + + public static const reg4:String = "reg4"; + + public static const jingyan_bg:String = "jingyan_bg"; + + public static const babel_tab_1:String = "babel_tab_1"; + + public static const babel_tab_2:String = "babel_tab_2"; + + public static const babel_tab_3:String = "babel_tab_3"; + + public static const babel_text_1:String = "babel_text_1"; + + public static const babel_text_2:String = "babel_text_2"; + + public static const babel_text_3:String = "babel_text_3"; + + public static const babel_text_4:String = "babel_text_4"; + + public static const riches_1:String = "riches_1"; + + public static const riches_bg:String = "riches_bg"; + + public static const heroboss_1:String = "heroboss_1"; + + public static const heroboss_2:String = "heroboss_2"; + + public static const heroboss_3:String = "heroboss_3"; + + public static const heroboss_4:String = "heroboss_4"; + + public static const battle_hero_ui:String = "battle_hero_ui"; + + public static const battle_talk:String = "battle_talk"; + + public static const battle_begin:String = "battle_begin"; + + public static const battle_win:String = "battle_win"; + + public static const battle_lose:String = "battle_lose"; + + public static const battle_result:String = "battle_result"; + + public static const battle_wallhead:String = "battle_wallhead"; + + public static const battle_wall1:String = "battle_wall1"; + + public static const battle_blood:String = "battle_blood"; + + public static const battle_headbg:String = "battle_headbg"; + + public static const battle_headmask:String = "battle_headmask"; + + public static const battle_endmc:String = "battle_endmc"; + + public static const battle_gun:String = "battle_gun"; + + public static const fightskill_11:String = "fightskill_11"; + + public static const fightskill_12:String = "fightskill_12"; + + public static const fightskill_13:String = "fightskill_13"; + + public static const fightskill_14:String = "fightskill_14"; + + public static const fightskill_15:String = "fightskill_15"; + + public static const fightskill_16:String = "fightskill_16"; + + public static const fightskill_17:String = "fightskill_17"; + + public static const fightskill_18:String = "fightskill_18"; + + public static const fightskill_19:String = "fightskill_19"; + + public static const fightskill_20:String = "fightskill_20"; + + public static const fightskill_21:String = "fightskill_21"; + + public static const man1:String = "man1"; + + public static const female1:String = "female1"; + + public static const lan_shanbi:String = "lan_shanbi"; + + public static const lan_gedang:String = "lan_gedang"; + + public static const hong_shanbi:String = "hong_shanbi"; + + public static const hong_gedang:String = "hong_gedang"; + + public static const man_gongji_1:String = "man_gongji_1"; + + public static const man_gongji_2:String = "man_gongji_2"; + + public static const man_gongji_3:String = "man_gongji_3"; + + public static const female_gongji_1:String = "female_gongji_1"; + + public static const female_gongji_2:String = "female_gongji_2"; + + public static const female_gongji_3:String = "female_gongji_3"; + + public static const man_gedang_1:String = "man_gedang_1"; + + public static const man_gedang_2:String = "man_gedang_2"; + + public static const man_gedang_3:String = "man_gedang_3"; + + public static const chat_bigspeak:String = "chat_bigspeak"; + + public static const chat_control:String = "chat_control"; + + public static const chat_main:String = "chat_main"; + + public static const chat_brodcast:String = "chat_brodcast"; + + public static const chat_speak:String = "chat_speak"; + + public static const chat_channelbtn:String = "chat_channelbtn"; + + public static const chat_Speaker:String = "chat_Speaker"; + + public static const faceBtn:String = "faceBtn"; + + public static const guild_page_1:String = "guild_page_1"; + + public static const guild_offer:String = "guild_offer"; + + public static const guild_page_2:String = "guild_page_2"; + + public static const guild_page_3:String = "guild_page_3"; + + public static const guild_page_4:String = "guild_page_4"; + + public static const guild_page_5:String = "guild_page_5"; + + public static const guild_trade_buy:String = "guild_trade_buy"; + + public static const guild_trade:String = "guild_trade"; + + public static const guild_trade_item:String = "guild_trade_item"; + + public static const guild_trade_issellitem:String = "guild_trade_issellitem"; + + public static const guild_box_view:String = "guild_box_view"; + + public static const guild_tech:String = "guild_tech"; + + public static const guild_selectcity:String = "guild_selectcity"; + + public static const LIB_UI_IMG_xiongnu5:String = "LIB_UI_IMG_xiongnu5"; + + public static const LIB_UI_IMG_xiongnu4:String = "LIB_UI_IMG_xiongnu4"; + + public static const LIB_UI_IMG_xiongnu3:String = "LIB_UI_IMG_xiongnu3"; + + public static const LIB_UI_IMG_xiongnu2:String = "LIB_UI_IMG_xiongnu2"; + + public static const LIB_UI_IMG_xiongnu1:String = "LIB_UI_IMG_xiongnu1"; + + public static const LIB_UI_IMG_xiongnu_guard:String = "LIB_UI_IMG_xiongnu_guard"; + + public static const LIB_UI_IMG_kulou2:String = "LIB_UI_IMG_kulou2"; + + public static const LIB_UI_IMG_kulou1:String = "LIB_UI_IMG_kulou1"; + + public static const LIB_UI_IMG_lock2:String = "LIB_UI_IMG_lock2"; + + public static const guild_casList:String = "guild_casList"; + + public static const pro_warbg:String = "pro_warbg"; + + public static const pro_warmembg:String = "pro_warmembg"; + + public static const pro_Spate2View:String = "pro_Spate2View"; + + public static const pro_FightInfo:String = "pro_FightInfo"; + + public static const guild_timeline:String = "guild_timeline"; + + public static const guild_armymc:String = "guild_armymc"; + + public static const guild_armyicon:String = "guild_armyicon"; + + public static const guild_armyIconGlow:String = "guild_armyIconGlow"; + + public static const guild_armyIconBGBright:String = "guild_armyIconBGBright"; + + public static const map_small:String = "map_small"; + + public static const map_cube:String = "map_cube"; + + public static const map_control:String = "map_control"; + + public static const map_gharry:String = "map_gharry"; + + public static const Empty_Castle:String = "Empty_Castle"; + + public static const Own_Castle:String = "Own_Castle"; + + public static const Others_Castle:String = "Others_Castle"; + + public static const Ant_Castle:String = "Ant_Castle"; + + public static const Blue:String = "Blue"; + + public static const Red:String = "Red"; + + public static const Flag_Blue:String = "Flag_Blue"; + + public static const Flag_Red:String = "Flag_Red"; + + public static const Flag_White:String = "Flag_White"; + + public static const map_InfoPanel:String = "map_InfoPanel"; + + public static const OpenPanel_pve:String = "OpenPanel_PVE"; + + public static const OpenPanel_pos:String = "OpenPanel_Pos"; + + public static const FightView:String = "FightView"; + + public static const Pro_provinceView:String = "ProvinceView"; + + public static const Pro_KingInfoView:String = "KingInfoView"; + + public static const Pro_FightInfoViewProvince:String = "FightInfoViewProvince"; + + public static const Pro_HeroItem:String = "HeroItem"; + + public static const Pro_HeroInfoView:String = "HeroInfoView"; + + public static const Pro_MapView:String = "MapView"; + + public static const Pro_TurningPoint:String = "TurningPoint"; + + public static const pro_dashang:String = "pro_dashang"; + + public static const pro_meminfo:String = "pro_meminfo"; + + public static const pro_bubing:String = "pro_bubing"; + + public static const pro_close:String = "pro_close"; + + public static const pro_CityInfo:String = "pro_CityInfo"; + + public static const pro_WatchView:String = "pro_WatchView"; + + public static const btn_activity:String = "btn_activity"; + + public static const ui_line:String = "ui_line"; + + public static const playBar:String = "PlayingBar"; + + public static const ui_star:String = "ui_star"; + + public static const ui_misscountry:String = "ui_misscountry"; + + public static const LIB_UI_BT_dating:String = "LIB_UI_BT_dating"; + + public static const LIB_CUNTRY_1:String = "LIB_CUNTRY_1"; + + public static const LIB_CUNTRY_2:String = "LIB_CUNTRY_2"; + + public static const LIB_CUNTRY_3:String = "LIB_CUNTRY_3"; + + public static const LIB_CUNTRY_4:String = "LIB_CUNTRY_4"; + + public static const LIB_CUNTRY_5:String = "LIB_CUNTRY_5"; + + public static const LIB_CUNTRY_6:String = "LIB_CUNTRY_6"; + + public static const menu_toolbar:String = "menu_toolbar"; + + public static const menu_shop:String = "menu_shop"; + + public static const menu_top:String = "menu_top"; + + public static const menu_user:String = "menu_user"; + + public static const menu_mask:String = "menu_mask"; + + public static const menu_btnbg:String = "menu_btnbg"; + + public static const menu_sp7:String = "menu_sp7"; + + public static const menu_leftBtn:String = "menu_leftBtn"; + + public static const menu_hipeBtn:String = "menu_hipeBtn"; + + public static const shrink_left:String = "shrink_left"; + + public static const shrink_right:String = "shrink_right"; + + public static const menu_btn6:String = "menu_btn6"; + + public static const menu_sp8:String = "menu_sp8"; + + public static const menu_btn7:String = "menu_btn7"; + + public static const menu_btn8:String = "menu_btn8"; + + public static const menu_sp9:String = "menu_sp9"; + + public static const menu_sp10:String = "menu_sp10"; + + public static const menu_sp12:String = "menu_sp12"; + + public static const menu_sp13:String = "menu_sp13"; + + public static const menu_sp11:String = "menu_sp11"; + + public static const lib_ui_bg_7:String = "lib_ui_bg_7"; + + public static const lib_ui_title_2:String = "lib_ui_title_2"; + + public static const lib_ui_bg_12:String = "lib_ui_bg_12"; + + public static const liuyu_mc:String = "liuyu_mc"; + + public static const libadd_holidaymc:String = "libadd_holidaymc"; + + public static const lib_add_1:String = "lib_add_1"; + + public static const lib_add_2:String = "lib_add_2"; + + public static const lib_add_box:String = "libadd_box"; + + public static const lib_add_get:String = "libadd_get"; + + public static const libadd_num1:String = "libadd_num1"; + + public static const libadd_num2:String = "libadd_num2"; + + public static const libadd_num3:String = "libadd_num3"; + + public static const window_btn_up:String = "window_btn_up"; + + public static const window_btn_down:String = "window_btn_down"; + + public static const window_border_bg:String = "window_border_bg"; + + public function ClassConfig() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/comfig/CommonData.as b/flash_decompiled/com/comfig/CommonData.as new file mode 100644 index 0000000..542f29c --- /dev/null +++ b/flash_decompiled/com/comfig/CommonData.as @@ -0,0 +1,212 @@ +package com.comfig +{ + public class CommonData + { + + public static const STAGE_WIDTH:uint = 1400; + + public static const STAGE_HEIGHT:uint = 700; + + public static const STAGE_MAX_WIDTH:uint = 1440; + + public static const STAGE_MAX_HEIGHT:uint = 900; + + public static const MAX_WIDTH:uint = 2000; + + public static const MAX_HEIGHT:uint = 1400; + + public static const EQUIP_WIDTH:uint = 53; + + public static const EQUIP_HEIGHT:uint = 53; + + public static const BUFF_WIDTH:uint = 25; + + public static const BUFF_HEIGHT:uint = 25; + + public static const open_junshi:int = 1; + + public static var countryArr:Array = [1,6,7]; + + public static const build_level_1:int = 3; + + public static const build_level_2:int = 5; + + public static const viewBabel3:Boolean = true; + + private static const serverIpArr: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"]; + + public static const openRiches:Boolean = true; + + public static const openHeroboss:Boolean = true; + + public static const canRebuild:Boolean = true; + + public static var isOpenLaterAward:Boolean = false; + + public static var babelNameArr:Array = ["千重楼","云中楼","天外楼","地宫楼","神宫楼","魔宫楼","天宫楼","仙宫楼","镜门楼","楼外楼","倒千重","倒云中","倒天外","倒地宫","倒神宫","倒魔宫","倒天宫","倒仙宫","倒镜门","倒楼外","倒楼上","倒楼中","倒楼下","倒噩梦","倒地狱"]; + + public static var babelMoreNameArr:Array = ["天界楼","仙界楼","神界楼","魔界楼","佛界楼","灵界楼","妖界楼","冥界楼"]; + + public static var babelMoreNameArr1:Array = ["一宫","二宫","三宫","四宫","五宫","六宫","七宫","八宫","九宫","十宫","十一宫","十二宫"]; + + public static var babelMoreNameArr2:Array = ["玄武","玄武","玄武","朱雀","朱雀","朱雀","白虎","白虎","白虎","青龙","青龙","青龙"]; + + public static var babelMoreNameArr3:Array = ["倒玄武","倒玄武","倒玄武","倒朱雀","倒朱雀","倒朱雀","倒白虎","倒白虎","倒白虎","倒青龙","倒青龙","倒青龙"]; + + public static const army:String = "army.xml"; + + public static const baseUI:String = "baseUI.xml"; + + public static const battle:String = "battle.xml"; + + public static const exam:String = "exam.xml"; + + public static const farm:String = "farm.xml"; + + public static const govPotz:String = "govPotz.xml"; + + public static const hero:String = "hero.xml"; + + public static const item:String = "item.xml"; + + public static const map:String = "map.xml"; + + public static const mission:String = "mission.xml"; + + public static const shop:String = "shop.xml"; + + public static const tower:String = "tower.xml"; + + public static const BUILD_100:String = "N100"; + + public static const BUILD_101:String = "N101"; + + public static const BUILD_102:String = "N102"; + + public static const BUILD_103:String = "N103"; + + public static const BUILD_104:String = "N104"; + + public static const BUILD_105:String = "N105"; + + public static const BUILD_106:String = "N106"; + + public static const BUILD_107:String = "N107"; + + public static const BUILD_108:String = "N108"; + + public static const BUILD_109:String = "N109"; + + public static const BUILD_110:String = "N110"; + + public static const BUILD_111:String = "N111"; + + public static const BUILD_112:String = "N112"; + + public static const BUILD_113:String = "N113"; + + public static const BUILD_114:String = "N114"; + + public static const BUILD_116:String = "N116"; + + public static const BUILD_117:String = "N117"; + + public static const BUILD_HOUSE:int = 10110001; + + public static const BUILD_WAREHOUSE:int = 10110002; + + public static const BUILD_MARKET:int = 10116001; + + public static const BUILD_PUB:int = 10114001; + + public static const BUILD_CAMP:int = 10112001; + + public static const BUILD_MEDICAL:int = 10115002; + + public static const BUILD_WORK:int = 10114003; + + public static const BUILD_BOOK:int = 10113001; + + public static const BUILD_SMITHY:int = 10116002; + + public static const BUILD_MISSION:int = 10117001; + + public static const BUILD_WALL:int = 10112006; + + public static const BUILD_CITY:int = 10111001; + + public static const ECONOMIC_1:int = 10130001; + + public static const ECONOMIC_2:int = 10130002; + + public static const ECONOMIC_3:int = 10130003; + + public static const ECONOMIC_4:int = 10130004; + + public static const ECONOMIC_5:int = 10130005; + + public static const ECONOMIC_6:int = 10130006; + + public static const MILITARY_1:int = 10140001; + + public static const MILITARY_2:int = 10140002; + + public static const MILITARY_3:int = 10140003; + + public static const MILITARY_4:int = 10140004; + + public static const MILITARY_5:int = 10140005; + + public static const MILITARY_6:int = 10140006; + + public static const openRadomBox:Boolean = true; + + public static const openArmyBoss:Boolean = true; + + public static const openShengongBoss:Boolean = true; + + public static const openBigBoss:Boolean = true; + + public static const openJunShiSkill:Boolean = true; + + public function CommonData() + { + super(); + } + + public static function setCountryArr(param1:Array) : void + { + if(param1.length > 0) + { + countryArr = param1; + } + } + + public static function checkServerIp(param1:String) : Boolean + { + var _loc2_:String = null; + for each(_loc2_ in serverIpArr) + { + if(_loc2_ == param1) + { + return true; + } + } + return false; + } + + public static function isCountryOpen(param1:int) : Boolean + { + var _loc2_:int = 0; + for each(_loc2_ in countryArr) + { + if(_loc2_ == param1) + { + return true; + } + } + return false; + } + } +} + diff --git a/flash_decompiled/com/comfig/DataConfig.as b/flash_decompiled/com/comfig/DataConfig.as new file mode 100644 index 0000000..93605a4 --- /dev/null +++ b/flash_decompiled/com/comfig/DataConfig.as @@ -0,0 +1,18 @@ +package com.comfig +{ + public class DataConfig + { + + public static const STATUS_OUT:int = 1; + + public static const STATUS_IN:int = 2; + + public static const m_dutyArr:Array = ["","盟主","副盟主","长老","成员"]; + + public function DataConfig() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/comfig/PathConfig.as b/flash_decompiled/com/comfig/PathConfig.as new file mode 100644 index 0000000..5d7809a --- /dev/null +++ b/flash_decompiled/com/comfig/PathConfig.as @@ -0,0 +1,145 @@ +package com.comfig +{ + import com.view.ui.load.LoadUIData; + + public class PathConfig + { + + private static var instance:PathConfig; + + private var serverPath:String; + + private var serverIp:String; + + private var serverPort:int; + + private var uiPathArr:Array; + + private var loadCountSize:Number; + + private var webPath:String; + + private var viewGift:int; + + private var viewReg:int; + + private var currVer:String = "0.2013070614431"; + + public function PathConfig() + { + super(); + } + + public static function getInstance() : PathConfig + { + if(instance == null) + { + instance = new PathConfig(); + } + return instance; + } + + public function Init(param1:XML) : void + { + var _loc3_:* = undefined; + var _loc4_:String = null; + var _loc5_:LoadUIData = null; + var _loc6_:Array = null; + var _loc7_:Array = null; + var _loc8_:* = undefined; + var _loc9_:int = 0; + this.serverPath = param1.server[0].@url; + this.serverIp = param1.serverIp[0].@url; + this.serverPort = int(param1.serverIp[0].@port); + this.webPath = param1.server[0].@web; + this.viewGift = param1.server[0].@viewGift; + this.viewReg = param1.server[0].@viewReg; + var _loc2_:int = int(param1.server[0].@viewLater); + if(_loc2_ == 1) + { + CommonData.isOpenLaterAward = true; + } + this.uiPathArr = new Array(); + for(_loc3_ in param1.property) + { + _loc5_ = new LoadUIData(); + _loc5_.path = param1.property[_loc3_].@path; + _loc5_.name = param1.property[_loc3_].@name; + _loc5_.ver = param1.property[_loc3_].@ver; + _loc5_.type = param1.property[_loc3_].@type; + this.uiPathArr.push(_loc5_); + } + _loc4_ = param1.server[0].@countryId; + if(_loc4_) + { + _loc6_ = _loc4_.split(","); + _loc7_ = new Array(); + for each(_loc8_ in _loc6_) + { + _loc9_ = int(_loc8_); + if(_loc9_ > 0) + { + _loc7_.push(_loc9_); + } + } + CommonData.setCountryArr(_loc7_); + } + } + + public function getViewReg() : int + { + return this.viewReg; + } + + public function getViewGift() : int + { + return this.viewGift; + } + + public function getUiPathArr() : Array + { + return this.uiPathArr; + } + + public function setSize(param1:int, param2:Number) : void + { + this.uiPathArr[param1].size = param2; + } + + public function getSize(param1:int) : Number + { + return this.uiPathArr[param1].size; + } + + public function getServerPath() : String + { + return this.serverPath; + } + + public function getWebPath() : String + { + return this.webPath; + } + + public function getServerIp() : String + { + return this.serverIp; + } + + public function getServerPort() : int + { + return this.serverPort; + } + + public function getVerStr(param1:String) : String + { + return param1; + } + + public function setVerson(param1:String) : void + { + this.currVer = param1; + } + } +} + diff --git a/flash_decompiled/com/comfig/ServerConfig.as b/flash_decompiled/com/comfig/ServerConfig.as new file mode 100644 index 0000000..0d89dfe --- /dev/null +++ b/flash_decompiled/com/comfig/ServerConfig.as @@ -0,0 +1,79 @@ +package com.comfig +{ + public class ServerConfig + { + + public static var IMAGE_URL:String = "pic/"; + + public static var IMAGE_USERITEM:String = IMAGE_URL + "king/"; + + public static var IMAGE_BATTLE_URL:String = IMAGE_URL + "battle/"; + + public static var IMAGE_ITEM_URL:String = IMAGE_URL + "equip/"; + + public static var IMAGE_MAP_URL:String = IMAGE_URL + "map/"; + + public static var IMAGE_BUILD_URL:String = IMAGE_URL + "build/"; + + public static var IMAGE_HEAD_URL:String = IMAGE_URL + "head/"; + + public static var IMG_SEED_URL:String = IMAGE_URL + "farm/"; + + public static var IMG_GEM_URL:String = IMAGE_URL + "gem/"; + + public static var IMAGE_JUEWEI_URL:String = IMAGE_URL + "juewei/"; + + public static var IMAGE_TECH_URL:String = IMAGE_URL + "tech/"; + + public static var IMAGE_POLITIC_URL:String = IMAGE_URL + "politic/"; + + public static var IMAGE_ARMY_URL:String = IMAGE_URL + "army/"; + + public static var IMAGE_LUCK_URL:String = IMAGE_URL + "luck/"; + + public static var IMAGE_IMG_URL:String = IMAGE_URL + "img/"; + + public static var IMAGE_DEVELOP_URL:String = IMAGE_URL + "develop/"; + + public static var IMAGE_NPC_URL:String = IMAGE_URL + "develop/"; + + public static var IMAGE_EMOTE_URL:String = IMAGE_URL + "emote/"; + + public static var IMG_PLAY_URL:String = IMAGE_URL + "play/"; + + public static var IMAGE_SWF_URL:String = IMAGE_URL + "swf/"; + + public static var IMAGE_MISSION_URL:String = IMAGE_URL + "mission/"; + + public static var RANK_OUT:String = "未在榜上"; + + public static var IMAGE_EQUIP_URL:String = IMAGE_URL + "equip/"; + + public static var IMAGE_CAREER_URL:String = IMAGE_URL + "career/"; + + public static var IMG_BG_URL:String = IMAGE_URL + "bg/"; + + public static var IMG_HOME_URL:String = IMAGE_URL + "home/"; + + public static var IMG_ACTIVITY_URL:String = IMAGE_URL + "activity/"; + + public static var FLASH_HEIGHT:int = 578; + + public static var FLASH_WIDTH:int = 997; + + public static var FLASH_MAX_WIDTH:int = 1440; + + public static var FLASH_MAX_HEIGHT:int = 900; + + public function ServerConfig() + { + super(); + } + + public static function getFarmSwf() : String + { + return "NewFarm.swf"; + } + } +} + diff --git a/flash_decompiled/com/comfig/deng/fzip/FZipFile.as b/flash_decompiled/com/comfig/deng/fzip/FZipFile.as new file mode 100644 index 0000000..65e7ed0 --- /dev/null +++ b/flash_decompiled/com/comfig/deng/fzip/FZipFile.as @@ -0,0 +1,552 @@ +package com.comfig.deng.fzip +{ + import com.comfig.deng.utils.ChecksumUtil; + import flash.utils.*; + + public class FZipFile + { + + public static const COMPRESSION_NONE:int = 0; + + public static const COMPRESSION_SHRUNK:int = 1; + + public static const COMPRESSION_REDUCED_1:int = 2; + + public static const COMPRESSION_REDUCED_2:int = 3; + + public static const COMPRESSION_REDUCED_3:int = 4; + + public static const COMPRESSION_REDUCED_4:int = 5; + + public static const COMPRESSION_IMPLODED:int = 6; + + public static const COMPRESSION_TOKENIZED:int = 7; + + public static const COMPRESSION_DEFLATED:int = 8; + + public static const COMPRESSION_DEFLATED_EXT:int = 9; + + public static const COMPRESSION_IMPLODED_PKWARE:int = 10; + + private static var HAS_INFLATE:Boolean = describeType(ByteArray).factory.method.(@name == "uncompress").hasComplexContent(); + + private var _versionHost:int = 0; + + private var _versionNumber:String = "2.0"; + + private var _compressionMethod:int = 8; + + private var _encrypted:Boolean = false; + + private var _implodeDictSize:int = -1; + + private var _implodeShannonFanoTrees:int = -1; + + private var _deflateSpeedOption:int = -1; + + private var _hasDataDescriptor:Boolean = false; + + private var _hasCompressedPatchedData:Boolean = false; + + private var _date:Date; + + private var _crc32:uint; + + private var _adler32:uint; + + private var _hasAdler32:Boolean = false; + + private var _sizeCompressed:uint = 0; + + private var _sizeUncompressed:uint = 0; + + private var _sizeFilename:uint = 0; + + private var _sizeExtra:uint = 0; + + private var _filename:String = ""; + + private var _filenameEncoding:String; + + private var _extraFields:Dictionary; + + private var _comment:String = ""; + + private var _content:ByteArray; + + private var isCompressed:Boolean = false; + + private var parseFunc:Function; + + public function FZipFile(param1:String = "utf-8") + { + this.parseFunc = this.parseFileHead; + super(); + this._filenameEncoding = param1; + this._extraFields = new Dictionary(); + this._content = new ByteArray(); + this._content.endian = Endian.BIG_ENDIAN; + } + + public function get date() : Date + { + return this._date; + } + + public function set date(param1:Date) : void + { + this._date = param1 != null ? param1 : new Date(); + } + + public function get filename() : String + { + return this._filename; + } + + public function set filename(param1:String) : void + { + this._filename = param1; + } + + public function get content() : ByteArray + { + if(this.isCompressed) + { + this.uncompress(); + } + return this._content; + } + + public function set content(param1:ByteArray) : void + { + if(param1 != null && param1.length > 0) + { + param1.position = 0; + param1.readBytes(this._content,0,param1.length); + this._crc32 = ChecksumUtil.CRC32(this._content); + this._hasAdler32 = false; + } + else + { + this._content.length = 0; + this._content.position = 0; + this.isCompressed = false; + } + this.compress(); + } + + public function get versionNumber() : String + { + return this._versionNumber; + } + + public function get sizeCompressed() : uint + { + return this._sizeCompressed; + } + + public function get sizeUncompressed() : uint + { + return this._sizeUncompressed; + } + + public function getContentAsString(param1:Boolean = true, param2:String = "utf-8") : String + { + var _loc3_:String = null; + if(this.isCompressed) + { + this.uncompress(); + } + this._content.position = 0; + if(param2 == "utf-8") + { + _loc3_ = this._content.readUTFBytes(this._content.bytesAvailable); + } + else + { + _loc3_ = this._content.readMultiByte(this._content.bytesAvailable,param2); + } + this._content.position = 0; + if(param1) + { + this.compress(); + } + return _loc3_; + } + + public function setContentAsString(param1:String, param2:String = "utf-8") : void + { + this._content.length = 0; + this._content.position = 0; + this.isCompressed = false; + if(param1 != null && param1.length > 0) + { + if(param2 == "utf-8") + { + this._content.writeUTFBytes(param1); + } + else + { + this._content.writeMultiByte(param1,param2); + } + this._crc32 = ChecksumUtil.CRC32(this._content); + this._hasAdler32 = false; + } + this.compress(); + } + + public function serialize(param1:IDataOutput, param2:Boolean, param3:Boolean = false, param4:uint = 0) : uint + { + var _loc10_:Object = null; + var _loc15_:ByteArray = null; + var _loc16_:Boolean = false; + if(param1 == null) + { + return 0; + } + if(param3) + { + param1.writeUnsignedInt(33639248); + param1.writeShort(this._versionHost << 8 | 0x14); + } + else + { + param1.writeUnsignedInt(67324752); + } + param1.writeShort(this._versionHost << 8 | 0x14); + param1.writeShort(this._filenameEncoding == "utf-8" ? 2048 : 0); + param1.writeShort(COMPRESSION_DEFLATED); + var _loc5_:Date = this._date != null ? this._date : new Date(); + var _loc6_:uint = uint(uint(_loc5_.getSeconds()) | uint(_loc5_.getMinutes()) << 5 | uint(_loc5_.getHours()) << 11); + var _loc7_:uint = uint(uint(_loc5_.getDate()) | uint(_loc5_.getMonth() + 1) << 5 | uint(_loc5_.getFullYear() - 1980) << 9); + param1.writeShort(_loc6_); + param1.writeShort(_loc7_); + param1.writeUnsignedInt(this._crc32); + param1.writeUnsignedInt(this._sizeCompressed); + param1.writeUnsignedInt(this._sizeUncompressed); + var _loc8_:ByteArray = new ByteArray(); + _loc8_.endian = Endian.LITTLE_ENDIAN; + if(this._filenameEncoding == "utf-8") + { + _loc8_.writeUTFBytes(this._filename); + } + else + { + _loc8_.writeMultiByte(this._filename,this._filenameEncoding); + } + var _loc9_:uint = _loc8_.position; + for(_loc10_ in this._extraFields) + { + _loc15_ = this._extraFields[_loc10_] as ByteArray; + if(_loc15_ != null) + { + _loc8_.writeShort(uint(_loc10_)); + _loc8_.writeShort(uint(_loc15_.length)); + _loc8_.writeBytes(_loc15_); + } + } + if(param2) + { + if(!this._hasAdler32) + { + _loc16_ = this.isCompressed; + if(_loc16_) + { + this.uncompress(); + } + this._adler32 = ChecksumUtil.Adler32(this._content,0,this._content.length); + this._hasAdler32 = true; + if(_loc16_) + { + this.compress(); + } + } + _loc8_.writeShort(56026); + _loc8_.writeShort(4); + _loc8_.writeUnsignedInt(this._adler32); + } + var _loc11_:uint = _loc8_.position - _loc9_; + if(param3 && this._comment.length > 0) + { + if(this._filenameEncoding == "utf-8") + { + _loc8_.writeUTFBytes(this._comment); + } + else + { + _loc8_.writeMultiByte(this._comment,this._filenameEncoding); + } + } + var _loc12_:uint = _loc8_.position - _loc9_ - _loc11_; + param1.writeShort(_loc9_); + param1.writeShort(_loc11_); + if(param3) + { + param1.writeShort(_loc12_); + param1.writeShort(0); + param1.writeShort(0); + param1.writeUnsignedInt(0); + param1.writeUnsignedInt(param4); + } + if(_loc9_ + _loc11_ + _loc12_ > 0) + { + param1.writeBytes(_loc8_); + } + var _loc13_:uint = 0; + if(!param3 && this._sizeCompressed > 0) + { + if(HAS_INFLATE) + { + _loc13_ = this._content.length; + param1.writeBytes(this._content,0,_loc13_); + } + else + { + _loc13_ = this._content.length - 6; + param1.writeBytes(this._content,2,_loc13_); + } + } + var _loc14_:uint = 30 + _loc9_ + _loc11_ + _loc12_ + _loc13_; + if(param3) + { + _loc14_ += 16; + } + return _loc14_; + } + + internal function parse(param1:IDataInput) : Boolean + { + while(Boolean(param1.bytesAvailable) && Boolean(this.parseFunc(param1))) + { + } + return this.parseFunc === this.parseFileIdle; + } + + private function parseFileIdle(param1:IDataInput) : Boolean + { + return false; + } + + private function parseFileHead(param1:IDataInput) : Boolean + { + if(param1.bytesAvailable >= 30) + { + this.parseHead(param1); + if(this._sizeFilename + this._sizeExtra > 0) + { + this.parseFunc = this.parseFileHeadExt; + } + else + { + this.parseFunc = this.parseFileContent; + } + return true; + } + return false; + } + + private function parseFileHeadExt(param1:IDataInput) : Boolean + { + if(param1.bytesAvailable >= this._sizeFilename + this._sizeExtra) + { + this.parseHeadExt(param1); + this.parseFunc = this.parseFileContent; + return true; + } + return false; + } + + private function parseFileContent(param1:IDataInput) : Boolean + { + if(this._hasDataDescriptor) + { + this.parseFunc = this.parseFileIdle; + throw new Error("Data descriptors are not supported."); + } + if(this._sizeCompressed == 0) + { + this.parseFunc = this.parseFileIdle; + } + else + { + if(param1.bytesAvailable < this._sizeCompressed) + { + return false; + } + this.parseContent(param1); + this.parseFunc = this.parseFileIdle; + } + return true; + } + + protected function parseHead(param1:IDataInput) : void + { + var _loc2_:uint = param1.readUnsignedShort(); + this._versionHost = _loc2_ >> 8; + this._versionNumber = Math.floor((_loc2_ & 0xFF) / 10) + "." + (_loc2_ & 0xFF) % 10; + var _loc3_:uint = param1.readUnsignedShort(); + this._compressionMethod = param1.readUnsignedShort(); + this._encrypted = (_loc3_ & 1) !== 0; + this._hasDataDescriptor = (_loc3_ & 8) !== 0; + this._hasCompressedPatchedData = (_loc3_ & 0x20) !== 0; + if((_loc3_ & 0x0320) !== 0) + { + this._filenameEncoding = "utf-8"; + } + if(this._compressionMethod === COMPRESSION_IMPLODED) + { + this._implodeDictSize = (_loc3_ & 2) !== 0 ? 8192 : 4096; + this._implodeShannonFanoTrees = (_loc3_ & 4) !== 0 ? 3 : 2; + } + else if(this._compressionMethod === COMPRESSION_DEFLATED) + { + this._deflateSpeedOption = (_loc3_ & 6) >> 1; + } + var _loc4_:uint = param1.readUnsignedShort(); + var _loc5_:uint = param1.readUnsignedShort(); + var _loc6_:int = _loc4_ & 0x1F; + var _loc7_:int = (_loc4_ & 0x07E0) >> 5; + var _loc8_:int = (_loc4_ & 0xF800) >> 11; + var _loc9_:int = _loc5_ & 0x1F; + var _loc10_:int = (_loc5_ & 0x01E0) >> 5; + var _loc11_:int = ((_loc5_ & 0xFE00) >> 9) + 1980; + this._date = new Date(_loc11_,_loc10_ - 1,_loc9_,_loc8_,_loc7_,_loc6_,0); + this._crc32 = param1.readUnsignedInt(); + this._sizeCompressed = param1.readUnsignedInt(); + this._sizeUncompressed = param1.readUnsignedInt(); + this._sizeFilename = param1.readUnsignedShort(); + this._sizeExtra = param1.readUnsignedShort(); + } + + protected function parseHeadExt(param1:IDataInput) : void + { + var _loc3_:uint = 0; + var _loc4_:uint = 0; + var _loc5_:ByteArray = null; + if(this._filenameEncoding == "utf-8") + { + this._filename = param1.readUTFBytes(this._sizeFilename); + } + else + { + this._filename = param1.readMultiByte(this._sizeFilename,this._filenameEncoding); + } + var _loc2_:uint = this._sizeExtra; + while(_loc2_ > 4) + { + _loc3_ = param1.readUnsignedShort(); + _loc4_ = param1.readUnsignedShort(); + if(_loc4_ > _loc2_) + { + throw new Error("Parse error in file " + this._filename + ": Extra field data size too big."); + } + if(_loc3_ === 56026 && _loc4_ === 4) + { + this._adler32 = param1.readUnsignedInt(); + this._hasAdler32 = true; + } + else if(_loc4_ > 0) + { + _loc5_ = new ByteArray(); + param1.readBytes(_loc5_,0,_loc4_); + this._extraFields[_loc3_] = _loc5_; + } + _loc2_ -= _loc4_ + 4; + } + if(_loc2_ > 0) + { + param1.readBytes(new ByteArray(),0,_loc2_); + } + } + + protected function parseContent(param1:IDataInput) : void + { + var _loc2_:uint = 0; + if(this._compressionMethod === COMPRESSION_DEFLATED && !this._encrypted) + { + if(HAS_INFLATE) + { + param1.readBytes(this._content,0,this._sizeCompressed); + } + else + { + if(!this._hasAdler32) + { + throw new Error("Adler32 checksum not found."); + } + this._content.writeByte(120); + _loc2_ = uint(~this._deflateSpeedOption << 6 & 0xC0); + _loc2_ += 31 - (120 << 8 | _loc2_) % 31; + this._content.writeByte(_loc2_); + param1.readBytes(this._content,2,this._sizeCompressed); + this._content.position = this._content.length; + this._content.writeUnsignedInt(this._adler32); + } + this.isCompressed = true; + } + else + { + if(this._compressionMethod != COMPRESSION_NONE) + { + throw new Error("Compression method " + this._compressionMethod + " is not supported."); + } + param1.readBytes(this._content,0,this._sizeCompressed); + this.isCompressed = false; + } + this._content.position = 0; + } + + protected function compress() : void + { + if(!this.isCompressed) + { + if(this._content.length > 0) + { + this._content.position = 0; + this._sizeUncompressed = this._content.length; + if(HAS_INFLATE) + { + this._content.compress.apply(this._content,["deflate"]); + this._sizeCompressed = this._content.length; + } + else + { + this._content.compress(); + this._sizeCompressed = this._content.length - 6; + } + this._content.position = 0; + this.isCompressed = true; + } + else + { + this._sizeCompressed = 0; + this._sizeUncompressed = 0; + } + } + } + + protected function uncompress() : void + { + if(this.isCompressed && this._content.length > 0) + { + this._content.position = 0; + if(HAS_INFLATE) + { + this._content.uncompress.apply(this._content,["deflate"]); + } + else + { + this._content.uncompress(); + } + this._content.position = 0; + this.isCompressed = false; + } + } + + public function toString() : String + { + return "[FZipFile]" + "\n name:" + this._filename + "\n date:" + this._date + "\n sizeCompressed:" + this._sizeCompressed + "\n sizeUncompressed:" + this._sizeUncompressed + "\n versionHost:" + this._versionHost + "\n versionNumber:" + this._versionNumber + "\n compressionMethod:" + this._compressionMethod + "\n encrypted:" + this._encrypted + "\n hasDataDescriptor:" + this._hasDataDescriptor + "\n hasCompressedPatchedData:" + this._hasCompressedPatchedData + "\n filenameEncoding:" + this._filenameEncoding + "\n crc32:" + this._crc32.toString(16) + "\n adler32:" + this._adler32.toString(16); + } + } +} + diff --git a/flash_decompiled/com/comfig/deng/utils/ChecksumUtil.as b/flash_decompiled/com/comfig/deng/utils/ChecksumUtil.as new file mode 100644 index 0000000..d67557e --- /dev/null +++ b/flash_decompiled/com/comfig/deng/utils/ChecksumUtil.as @@ -0,0 +1,113 @@ +package com.comfig.deng.utils +{ + import flash.utils.ByteArray; + + public class ChecksumUtil + { + + private static var crcTable:Array = makeCRCTable(); + + public function ChecksumUtil() + { + super(); + } + + private static function makeCRCTable() : Array + { + var _loc2_:uint = 0; + var _loc3_:uint = 0; + var _loc4_:uint = 0; + var _loc1_:Array = []; + _loc2_ = 0; + while(_loc2_ < 256) + { + _loc4_ = _loc2_; + _loc3_ = 0; + while(_loc3_ < 8) + { + if(_loc4_ & 1) + { + _loc4_ = uint(0xEDB88320 ^ _loc4_ >>> 1); + } + else + { + _loc4_ >>>= 1; + } + _loc3_++; + } + _loc1_.push(_loc4_); + _loc2_++; + } + return _loc1_; + } + + public static function CRC32(param1:ByteArray, param2:uint = 0, param3:uint = 0) : uint + { + var _loc4_:uint = 0; + if(param2 >= param1.length) + { + param2 = param1.length; + } + if(param3 == 0) + { + param3 = param1.length - param2; + } + if(param3 + param2 > param1.length) + { + param3 = param1.length - param2; + } + var _loc5_:uint = 4294967295; + _loc4_ = param2; + while(_loc4_ < param3) + { + _loc5_ = uint(uint(crcTable[(_loc5_ ^ param1[_loc4_]) & 0xFF]) ^ _loc5_ >>> 8); + _loc4_++; + } + return _loc5_ ^ 0xFFFFFFFF; + } + + public static function Adler32(param1:ByteArray, param2:uint = 0, param3:uint = 0) : uint + { + var _loc7_:uint = 0; + if(param2 >= param1.length) + { + param2 = param1.length; + } + if(param3 == 0) + { + param3 = param1.length - param2; + } + if(param3 + param2 > param1.length) + { + param3 = param1.length - param2; + } + var _loc4_:uint = param2; + var _loc5_:uint = 1; + var _loc6_:uint = 0; + while(param3) + { + _loc7_ = param3 > 5550 ? 5550 : param3; + param3 -= _loc7_; + do + { + _loc5_ += param1[_loc4_++]; + _loc6_ += _loc5_; + } + while(--_loc7_); + _loc5_ = (_loc5_ & 0xFFFF) + (_loc5_ >> 16) * 15; + _loc6_ = (_loc6_ & 0xFFFF) + (_loc6_ >> 16) * 15; + } + if(_loc5_ >= 65521) + { + _loc5_ -= 65521; + } + _loc6_ = (_loc6_ & 0xFFFF) + (_loc6_ >> 16) * 15; + if(_loc6_ >= 65521) + { + _loc6_ -= 65521; + } + return _loc6_ << 16 | _loc5_; + } + } +} + diff --git a/flash_decompiled/com/common/App.as b/flash_decompiled/com/common/App.as new file mode 100644 index 0000000..66e8680 --- /dev/null +++ b/flash_decompiled/com/common/App.as @@ -0,0 +1,121 @@ +package com.common +{ + import flash.display.BitmapData; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.system.ApplicationDomain; + + public class App + { + + public function App() + { + super(); + } + + public static function createMc(param1:String, param2:ApplicationDomain) : MovieClip + { + var newSpr:*; + var theDomain:ApplicationDomain = null; + var classMc:* = undefined; + var linkName:String = param1; + var loadinfo:ApplicationDomain = param2; + try + { + theDomain = loadinfo; + classMc = theDomain.getDefinition(linkName); + } + catch(e:ReferenceError) + { + return null; + } + newSpr = new classMc() as MovieClip; + return newSpr; + } + + public static function createButton(param1:String, param2:ApplicationDomain) : SimpleButton + { + var newSpr:*; + var theDomain:ApplicationDomain = null; + var classMc:* = undefined; + var linkName:String = param1; + var loadinfo:ApplicationDomain = param2; + try + { + theDomain = loadinfo; + classMc = theDomain.getDefinition(linkName); + } + catch(e:ReferenceError) + { + return null; + } + newSpr = new classMc() as SimpleButton; + return newSpr; + } + + public static function createSprite(param1:String, param2:ApplicationDomain) : Sprite + { + var newSpr:*; + var theDomain:ApplicationDomain = null; + var classMc:* = undefined; + var linkName:String = param1; + var loadinfo:ApplicationDomain = param2; + try + { + theDomain = loadinfo; + if(theDomain) + { + classMc = theDomain.getDefinition(linkName); + } + } + catch(e:ReferenceError) + { + return null; + } + newSpr = new classMc() as Sprite; + return newSpr; + } + + public static function createPng(param1:String, param2:ApplicationDomain) : BitmapData + { + var newSpr:*; + var theDomain:ApplicationDomain = null; + var classMc:* = undefined; + var linkName:String = param1; + var loadinfo:ApplicationDomain = param2; + try + { + theDomain = loadinfo; + classMc = theDomain.getDefinition(linkName); + } + catch(e:ReferenceError) + { + return null; + } + newSpr = new classMc(0,0) as BitmapData; + return newSpr; + } + + public static function getClass(param1:String, param2:ApplicationDomain) : Class + { + var newSpr:*; + var theDomain:ApplicationDomain = null; + var classMc:* = undefined; + var linkName:String = param1; + var loadinfo:ApplicationDomain = param2; + try + { + theDomain = loadinfo; + classMc = theDomain.getDefinition(linkName); + } + catch(e:ReferenceError) + { + return null; + } + newSpr = new classMc() as Class; + return newSpr; + } + } +} + diff --git a/flash_decompiled/com/common/CommonAPI.as b/flash_decompiled/com/common/CommonAPI.as new file mode 100644 index 0000000..2d572f8 --- /dev/null +++ b/flash_decompiled/com/common/CommonAPI.as @@ -0,0 +1,21 @@ +package com.common +{ + import flash.text.StyleSheet; + + public class CommonAPI + { + + public function CommonAPI() + { + super(); + } + + public static function getLinkStyle() : StyleSheet + { + var _loc1_:* = new StyleSheet(); + _loc1_.parseCSS("a {color: #FFFFFF;text-decoration: underline;} a:hover {color: #0080FF;text-decoration: underline;} a:active {text-decoration: underline; color: #FFFF00; }"); + return _loc1_; + } + } +} + diff --git a/flash_decompiled/com/common/DateUtil.as b/flash_decompiled/com/common/DateUtil.as new file mode 100644 index 0000000..c7550b7 --- /dev/null +++ b/flash_decompiled/com/common/DateUtil.as @@ -0,0 +1,41 @@ +package com.common +{ + public class DateUtil + { + + public function DateUtil() + { + super(); + } + + public static function getEndTime(param1:int) : Number + { + var _loc2_:* = new Date(); + return _loc2_.getTime() + param1 * 1000; + } + + public static function toString(param1:Date) : * + { + return param1.toString(); + } + + public static function distanceSeconds(param1:Number) : int + { + var _loc2_:* = new Date(); + return int((param1 - _loc2_.getTime()) / 1000); + } + + public static function distance(param1:Date, param2:Date) : Number + { + return (param1.getTime() - param2.getTime()) / 1000; + } + + public static function moveSeconds(param1:Date, param2:Number) : Date + { + var _loc3_:* = new Date(); + _loc3_.setTime(param1.getTime() + param2 * 1000); + return _loc3_; + } + } +} + diff --git a/flash_decompiled/com/common/DragTools.as b/flash_decompiled/com/common/DragTools.as new file mode 100644 index 0000000..33cbe0b --- /dev/null +++ b/flash_decompiled/com/common/DragTools.as @@ -0,0 +1,100 @@ +package com.common +{ + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.geom.Rectangle; + + public class DragTools + { + + private var target:Sprite; + + private var object:Object; + + private var bm:Bitmap; + + private var ra:Bitmap; + + private var container:Sprite = new Sprite(); + + private var bd:BitmapData; + + public function DragTools(param1:Sprite, param2:Object) + { + super(); + this.target = param1; + this.object = param2; + } + + public function beginDrag(param1:Boolean = false, param2:Rectangle = null) : void + { + var _loc3_:Rectangle = null; + if(this.object.methods == "bitmap") + { + if(this.bm != null) + { + return; + } + _loc3_ = this.target.getBounds(this.target.parent); + this.bd = new BitmapData(_loc3_.width,_loc3_.height); + this.bd.draw(this.target); + this.bm = new Bitmap(this.bd); + this.container.addChild(this.bm); + this.container.x = this.target.x; + this.container.y = this.target.y; + this.target.visible = false; + this.target.parent.addChildAt(this.container,this.target.parent.getChildIndex(this.target)); + this.container.startDrag(param1,param2); + } + else if(this.object.methods == "rectangle") + { + this.container.graphics.lineStyle(4,10053171); + this.container.graphics.beginFill(0,0); + this.container.graphics.drawRect(0,0,this.target.width,this.target.height); + this.container.graphics.endFill(); + this.container.x = this.target.x; + this.container.y = this.target.y; + this.target.parent.addChildAt(this.container,this.target.parent.getChildIndex(this.target) + 1); + this.container.startDrag(param1,param2); + } + else + { + this.target.startDrag(param1,param2); + } + } + + public function endDrag() : void + { + if(this.object.methods == "bitmap") + { + if(this.bm == null) + { + return; + } + this.target.x = this.container.x; + this.target.y = this.container.y; + this.container.removeChild(this.bm); + this.target.parent.removeChild(this.container); + this.bm = null; + this.target.visible = true; + this.bd.dispose(); + this.bd = null; + } + else if(this.object.methods == "rectangle") + { + this.target.x = this.container.x; + this.target.y = this.container.y; + this.container.graphics.clear(); + this.container.x = 0; + this.container.y = 0; + this.target.parent.removeChild(this.container); + } + else + { + this.target.stopDrag(); + } + } + } +} + diff --git a/flash_decompiled/com/common/LoadManage.as b/flash_decompiled/com/common/LoadManage.as new file mode 100644 index 0000000..48a871e --- /dev/null +++ b/flash_decompiled/com/common/LoadManage.as @@ -0,0 +1,56 @@ +package com.common +{ + public class LoadManage + { + + private static var instance:LoadManage; + + private var loadArr:Vector.; + + private var loadCount:int; + + public function LoadManage() + { + super(); + this.loadArr = new Vector.(); + this.loadCount = 0; + } + + public static function getInstance() : LoadManage + { + if(instance == null) + { + instance = new LoadManage(); + } + return instance; + } + + public function addNewLoad(param1:LoadResource) : void + { + this.loadArr.push(param1); + this.loadRes(); + } + + private function loadRes() : void + { + if(this.loadArr.length == 0) + { + return; + } + if(this.loadCount > 2) + { + return; + } + var _loc1_:LoadResource = this.loadArr.shift(); + _loc1_.beginLoad(); + ++this.loadCount; + } + + public function reduceLoadCount() : void + { + --this.loadCount; + this.loadRes(); + } + } +} + diff --git a/flash_decompiled/com/common/LoadResource.as b/flash_decompiled/com/common/LoadResource.as new file mode 100644 index 0000000..695da78 --- /dev/null +++ b/flash_decompiled/com/common/LoadResource.as @@ -0,0 +1,71 @@ +package com.common +{ + import flash.display.Loader; + import flash.display.MovieClip; + import flash.events.Event; + import flash.events.IOErrorEvent; + import flash.events.ProgressEvent; + import flash.net.URLRequest; + + public class LoadResource + { + + public var loader:Loader; + + public var backFunc:Function; + + public var progressMc:MovieClip; + + public var viewLoad:Boolean; + + public var url:String; + + public function LoadResource(param1:String, param2:Function, param3:Boolean = false) + { + super(); + this.url = param1; + this.viewLoad = this.viewLoad; + this.backFunc = param2; + LoadManage.getInstance().addNewLoad(this); + } + + public function beginLoad() : void + { + this.loader = new Loader(); + this.loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,this.loadError); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadComplete); + this.loader.load(new URLRequest(this.url)); + } + + private function loadError(param1:IOErrorEvent) : void + { + LoadManage.getInstance().reduceLoadCount(); + } + + private function loadProgress(param1:ProgressEvent) : void + { + } + + private function loadComplete(param1:Event) : void + { + this.backFunc(param1); + LoadManage.getInstance().reduceLoadCount(); + } + + public function clear() : void + { + if(this.loader != null) + { + try + { + this.loader.unloadAndStop(true); + } + catch(error:Error) + { + } + this.loader = null; + } + } + } +} + diff --git a/flash_decompiled/com/common/PublicGlow.as b/flash_decompiled/com/common/PublicGlow.as new file mode 100644 index 0000000..05ea3fc --- /dev/null +++ b/flash_decompiled/com/common/PublicGlow.as @@ -0,0 +1,151 @@ +package com.common +{ + import flash.filters.ColorMatrixFilter; + import flash.filters.GlowFilter; + + public class PublicGlow + { + + private static var instance:PublicGlow; + + public var blackGlow:GlowFilter; + + public var yellowGlow:GlowFilter; + + public var yellowGlow1:GlowFilter; + + public var yellowGlow2:GlowFilter; + + public var greenGlow:GlowFilter; + + public var huiGlow:GlowFilter; + + public var qingGlow:GlowFilter; + + public var lightFilter:ColorMatrixFilter; + + public var menuFillter:GlowFilter; + + public var greenGlow1:GlowFilter; + + public var blackGlow1:GlowFilter; + + public var textGlow:GlowFilter; + + public function PublicGlow() + { + super(); + this.blackGlow = new GlowFilter(); + this.blackGlow.color = 0; + this.blackGlow.blurX = 2; + this.blackGlow.alpha = 1; + this.blackGlow.blurY = 2; + this.blackGlow.quality = 1; + this.blackGlow.inner = false; + this.blackGlow.knockout = false; + this.blackGlow.quality = 1; + this.blackGlow.strength = 4; + this.textGlow = new GlowFilter(); + this.textGlow.color = 3350799; + this.textGlow.blurX = 2; + this.textGlow.alpha = 1; + this.textGlow.blurY = 2; + this.textGlow.quality = 1; + this.textGlow.inner = false; + this.textGlow.knockout = false; + this.textGlow.quality = 1; + this.textGlow.strength = 4; + this.blackGlow1 = new GlowFilter(); + this.blackGlow1.color = 0; + this.blackGlow1.blurX = 2; + this.blackGlow1.alpha = 1; + this.blackGlow1.blurY = 2; + this.blackGlow1.inner = false; + this.blackGlow1.knockout = false; + this.blackGlow1.quality = 1; + this.blackGlow1.strength = 16; + this.huiGlow = new GlowFilter(); + this.huiGlow.color = 1118481; + this.huiGlow.blurX = 2; + this.huiGlow.alpha = 1; + this.huiGlow.blurY = 2; + this.huiGlow.quality = 1; + this.huiGlow.inner = false; + this.huiGlow.knockout = false; + this.huiGlow.quality = 1; + this.huiGlow.strength = 6; + this.yellowGlow = new GlowFilter(); + this.yellowGlow.color = 16776960; + this.yellowGlow.blurX = 10; + this.yellowGlow.alpha = 1; + this.yellowGlow.blurY = 10; + this.yellowGlow.inner = false; + this.yellowGlow.quality = 12; + this.yellowGlow.strength = 3; + this.yellowGlow1 = new GlowFilter(); + this.yellowGlow1.color = 16776960; + this.yellowGlow1.blurX = 4; + this.yellowGlow1.alpha = 1; + this.yellowGlow1.blurY = 4; + this.yellowGlow1.inner = false; + this.yellowGlow1.quality = 6; + this.yellowGlow1.strength = 3; + this.menuFillter = new GlowFilter(); + this.menuFillter.color = 16749361; + this.menuFillter.blurX = 4; + this.menuFillter.alpha = 1; + this.menuFillter.blurY = 4; + this.menuFillter.inner = false; + this.menuFillter.quality = 6; + this.menuFillter.strength = 3; + this.greenGlow = new GlowFilter(); + this.greenGlow.color = 65280; + this.greenGlow.blurX = 15; + this.greenGlow.alpha = 1; + this.greenGlow.blurY = 15; + this.greenGlow.inner = true; + this.greenGlow.quality = 1; + this.greenGlow.strength = 1; + this.greenGlow1 = new GlowFilter(); + this.greenGlow1.color = 65280; + this.greenGlow1.blurX = 4; + this.greenGlow1.alpha = 1; + this.greenGlow1.blurY = 4; + this.greenGlow1.inner = false; + this.greenGlow1.quality = 1; + this.greenGlow1.strength = 4; + this.qingGlow = new GlowFilter(); + this.qingGlow.color = 57087; + this.qingGlow.blurX = 8; + this.qingGlow.alpha = 1; + this.qingGlow.blurY = 8; + this.qingGlow.inner = false; + this.qingGlow.quality = 1; + this.qingGlow.strength = 3; + this.yellowGlow2 = new GlowFilter(); + this.yellowGlow2.color = 16776960; + this.yellowGlow2.blurX = 15; + this.yellowGlow2.alpha = 1; + this.yellowGlow2.blurY = 15; + this.yellowGlow2.inner = true; + this.yellowGlow2.quality = 2; + this.yellowGlow2.strength = 2; + this.lightFilter = this.createBrightnessFilter(65); + } + + public static function getInstance() : PublicGlow + { + if(instance == null) + { + return instance = new PublicGlow(); + } + return instance; + } + + public function createBrightnessFilter(param1:Number) : ColorMatrixFilter + { + return new ColorMatrixFilter([1,0,0,0,param1,0,1,0,0,param1,0,0,1,0,param1,0,0,0,1,0]); + } + } +} + diff --git a/flash_decompiled/com/common/PublicMethod.as b/flash_decompiled/com/common/PublicMethod.as new file mode 100644 index 0000000..77c5b72 --- /dev/null +++ b/flash_decompiled/com/common/PublicMethod.as @@ -0,0 +1,544 @@ +package com.common +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.greensock.TweenMax; + import com.utils.ExtMath; + import com.utils.TextUtils; + import com.view.world.MapVars; + import flash.display.Bitmap; + import flash.display.DisplayObject; + import flash.display.DisplayObjectContainer; + import flash.display.Shape; + import flash.display.Sprite; + import flash.filters.ColorMatrixFilter; + import flash.text.TextField; + import flash.text.TextFormat; + + public class PublicMethod + { + + public function PublicMethod() + { + super(); + } + + public static function createShape(param1:uint, param2:Number, param3:Number) : Sprite + { + var _loc4_:Sprite = new Sprite(); + _loc4_.graphics.beginFill(param1,1); + _loc4_.graphics.drawRect(0,0,param2,param3); + _loc4_.graphics.endFill(); + return _loc4_; + } + + public static function createRectangle(param1:uint, param2:uint, param3:Number, param4:Number) : Sprite + { + var _loc5_:Sprite = new Sprite(); + _loc5_.graphics.beginFill(param2,1); + _loc5_.graphics.drawRect(0,0,param3,param4); + _loc5_.graphics.endFill(); + _loc5_.graphics.lineStyle(1,param1); + _loc5_.graphics.moveTo(0,0); + _loc5_.graphics.lineTo(param3,0); + _loc5_.graphics.lineTo(param3,param4); + _loc5_.graphics.lineTo(0,param4); + _loc5_.graphics.lineTo(0,0); + _loc5_.graphics.endFill(); + return _loc5_; + } + + public static function getTextField(param1:uint, param2:int) : TextField + { + var _loc3_:TextField = new TextField(); + _loc3_.border = false; + _loc3_.mouseEnabled = false; + _loc3_.textColor = param1; + _loc3_.width = param2; + _loc3_.height = 18; + var _loc4_:TextFormat = new TextFormat(); + _loc4_.font = "SimSun"; + _loc3_.defaultTextFormat = _loc4_; + return _loc3_; + } + + public static function getTextFieldWithFillter(param1:uint, param2:int) : TextField + { + var _loc3_:TextField = getTextField(param1,param2); + _loc3_.filters = [PublicGlow.getInstance().textGlow]; + return _loc3_; + } + + public static function getMulTextField(param1:uint, param2:int, param3:int) : TextField + { + var _loc4_:TextField = new TextField(); + _loc4_.border = false; + _loc4_.multiline = true; + _loc4_.wordWrap = true; + _loc4_.textColor = param1; + _loc4_.width = param2; + _loc4_.height = param3; + var _loc5_:TextFormat = new TextFormat(); + _loc5_.font = "SimSun"; + _loc4_.defaultTextFormat = _loc5_; + return _loc4_; + } + + public static function drawLine(param1:int, param2:int, param3:int, param4:int, param5:uint) : Shape + { + var _loc6_:Shape = new Shape(); + _loc6_.graphics.moveTo(param1,param2); + _loc6_.graphics.lineStyle(1,param5,1,true,""); + _loc6_.graphics.lineTo(param3,param4); + return _loc6_; + } + + public static function drawLine1(param1:int, param2:int, param3:int, param4:int, param5:uint) : Shape + { + var _loc6_:Shape = new Shape(); + _loc6_.graphics.moveTo(param1,param2); + _loc6_.graphics.lineStyle(2,param5,1,true,""); + _loc6_.graphics.lineTo(param3,param4); + return _loc6_; + } + + public static function getTrLine1(param1:int, param2:uint = 3047552) : Sprite + { + var _loc3_:Shape = drawLine1(0,0,param1,0,param2); + var _loc4_:Sprite = new Sprite(); + _loc4_.addChild(_loc3_); + return _loc4_; + } + + public static function getTdLine1(param1:int, param2:uint = 3047552) : Sprite + { + var _loc3_:Shape = drawLine1(0,0,0,param1,param2); + var _loc4_:Sprite = new Sprite(); + _loc4_.addChild(_loc3_); + return _loc4_; + } + + public static function Random(param1:int) : int + { + return int(Math.random() * param1); + } + + public static function getRadomPosi(param1:int, param2:int) : uint + { + return uint(Random(param2 - param1) + param1); + } + + public static function getTextFormat(param1:uint, param2:int = 12, param3:Boolean = false, param4:String = "center") : TextFormat + { + var _loc5_:TextFormat = new TextFormat(); + _loc5_.color = param1; + _loc5_.size = param2; + _loc5_.bold = param3; + _loc5_.align = param4; + _loc5_.font = "SimSun"; + return _loc5_; + } + + public static function getCenterTextFormat() : TextFormat + { + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.font = "SimSun"; + return _loc1_; + } + + public static function getRightTextFormat() : TextFormat + { + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "right"; + _loc1_.font = "SimSun"; + return _loc1_; + } + + public static function getResNumMc(param1:int) : Sprite + { + var _loc7_:Bitmap = null; + var _loc2_:InstallFace = InstallFace.getInstance(); + var _loc3_:Sprite = new Sprite(); + var _loc4_:String = param1.toString(); + var _loc5_:int = _loc4_.length; + var _loc6_:int = 0; + while(_loc6_ < _loc5_) + { + _loc7_ = new Bitmap(_loc2_.getPng("lib_num_" + _loc4_.substring(_loc6_,_loc6_ + 1))); + _loc3_.addChild(_loc7_); + _loc7_.x = _loc6_ * 22; + _loc6_++; + } + return _loc3_; + } + + public static function getTimeStr(param1:int) : String + { + var _loc2_:String = ""; + if(param1 == 0) + { + return "0"; + } + var _loc3_:int = param1 / 3600; + var _loc4_:int = (param1 - 3600 * _loc3_) / 60; + var _loc5_:int = param1 - 3600 * _loc3_ - _loc4_ * 60; + if(_loc3_ > 0) + { + _loc2_ = _loc3_ + "小时"; + } + if(_loc4_ > 0) + { + _loc2_ = _loc2_ + getStr(_loc4_) + "分"; + } + if(_loc5_ > 0) + { + _loc2_ = _loc2_ + getStr(_loc5_) + "秒"; + } + return _loc2_; + } + + public static function getTimeStr1(param1:int) : String + { + var _loc2_:String = null; + var _loc3_:int = param1 / 3600; + var _loc4_:int = (param1 - 3600 * _loc3_) / 60; + var _loc5_:int = param1 - 3600 * _loc3_ - _loc4_ * 60; + _loc2_ = _loc3_ + "时"; + _loc2_ = _loc2_ + _loc4_ + "分"; + return _loc2_ + _loc5_ + "秒"; + } + + public static function getStr(param1:int) : String + { + var _loc2_:String = param1.toString(); + if(param1 < 10) + { + _loc2_ = "0" + _loc2_; + } + return _loc2_; + } + + public static function getStr2(param1:int) : String + { + if(param1 > 10000) + { + return int(param1 / 10000) + "万"; + } + return param1.toString(); + } + + public static function getRes(param1:int) : String + { + if(param1 > 10000) + { + return int(param1 / 10000) + "万"; + } + return param1.toString(); + } + + public static function getTime(param1:int) : String + { + var _loc2_:String = null; + var _loc3_:int = param1 / 3600; + var _loc4_:int = (param1 - 3600 * _loc3_) / 60; + var _loc5_:int = param1 - 3600 * _loc3_ - _loc4_ * 60; + return getStr(_loc3_) + ":" + getStr(_loc4_) + ":" + getStr(_loc5_); + } + + public static function getCoinStr(param1:int) : String + { + if(param1 < 100000) + { + return param1.toString(); + } + return int(param1 / 10000).toString() + "万"; + } + + public static function setBlack(param1:DisplayObject) : void + { + TweenMax.to(param1,0.1,{"colorMatrixFilter":{"saturation":0}}); + } + + public static function setColor(param1:DisplayObject) : void + { + TweenMax.to(param1,0.1,{"colorMatrixFilter":{"saturation":1}}); + } + + public static function getHeroName(param1:String) : String + { + var _loc2_:String = param1; + var _loc3_:int = _loc2_.indexOf("") + 1); + } + + public static function getHeroColor(param1:String) : String + { + var _loc2_:String = param1; + var _loc3_:int = _loc2_.indexOf("\'"); + if(_loc3_ <= 0) + { + return _loc2_; + } + _loc2_ = _loc2_.substring(_loc3_ + 1); + return _loc2_.substring(0,_loc2_.indexOf("\'")); + } + + public static function trim(param1:String) : String + { + if(param1 == null) + { + return null; + } + return rtrim(ltrim(param1)); + } + + public static function rtrim(param1:String) : String + { + if(param1 == null) + { + return null; + } + var _loc2_:* = /\s*$/; + return param1.replace(_loc2_,""); + } + + public static function ltrim(param1:String) : String + { + if(param1 == null) + { + return null; + } + var _loc2_:* = /^\s*/; + return param1.replace(_loc2_,""); + } + + public static function getSysMess(param1:String, param2:Boolean) : String + { + return TextUtils.getInstance().addParagraphElement(param1,param2); + } + + public static function formatSecond(param1:uint) : String + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:String = ""; + if(param1 < 60) + { + _loc5_ = String(param1 + "秒"); + } + else if(param1 >= 60 && param1 < 60 * 60) + { + _loc5_ = String(int(param1 / 60) + "分") + param1 % 60 + "秒"; + if(param1 % 60 == 0) + { + _loc5_ = String(int(param1 / 60) + "分"); + } + } + else if(param1 >= 60 * 60) + { + _loc2_ = int(param1 / 3600); + _loc3_ = int(param1 % 3600 / 60); + _loc4_ = int(param1 % 3600 % 60); + _loc5_ = _loc2_ + "小时" + _loc3_ + "分" + _loc4_ + "秒"; + } + return _loc5_; + } + + public static function applyDefault(param1:DisplayObject) : void + { + applyFilter(param1,null); + } + + private static function applyFilter(param1:DisplayObject, param2:Array) : void + { + var _loc3_:* = new ColorMatrixFilter(param2); + var _loc4_:* = new Array(); + _loc4_.push(_loc3_); + param1.filters = _loc4_; + } + + public static function applyHighlight(param1:DisplayObject) : void + { + var _loc2_:* = new Array(); + _loc2_ = _loc2_.concat([1.5,0,0,0,0]); + _loc2_ = _loc2_.concat([0,1.5,0,0,0]); + _loc2_ = _loc2_.concat([0,0,1.5,0,0]); + _loc2_ = _loc2_.concat([0,0,0,1,0]); + applyFilter(param1,_loc2_); + } + + public static function removeAll(param1:DisplayObjectContainer) : void + { + var _loc2_:* = undefined; + var _loc3_:* = param1; + while(_loc3_.numChildren > 0) + { + try + { + if(_loc3_.getChildAt(0).name.indexOf("instance") < 0) + { + _loc3_[_loc3_.getChildAt(0).name] = null; + } + } + catch(e:*) + { + } + _loc2_ = _loc3_.getChildAt(0); + _loc3_.removeChildAt(0); + } + } + + public static function getGlobalXY(param1:Number, param2:Number) : Object + { + var _loc3_:* = 0; + var _loc4_:* = 0; + var _loc5_:* = 0; + var _loc6_:* = 0; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:* = MapVars.CELL_WIDTH; + var _loc10_:* = MapVars.CELL_HEIGHT; + var _loc11_:* = MapVars.CELL_LONG; + var _loc12_:* = 0; + var _loc13_:* = 0; + var _loc14_:* = param2 - 1 / 2 * param1; + var _loc15_:* = param2 + 1 / 2 * param1; + var _loc16_:* = -(param2 - 1 / 2 * param1); + var _loc17_:* = -1 / 2 * _loc16_; + var _loc18_:* = ExtMath.distance(0,0,_loc16_,_loc17_); + var _loc19_:* = ExtMath.distance(_loc16_,_loc17_,param1,param2); + if(ExtMath.distance(_loc16_,_loc17_,param1,param2) < _loc11_ / 2) + { + _loc19_ = _loc11_ / 2; + } + if(_loc18_ < _loc11_ / 2) + { + _loc18_ = _loc11_ / 2; + } + _loc5_ = Math.ceil((_loc19_ - _loc11_ / 2) / _loc11_); + _loc6_ = Math.ceil((_loc18_ - _loc11_ / 2) / _loc11_); + if(_loc14_ < 0) + { + _loc6_ *= -1; + } + if(_loc15_ < 0) + { + _loc5_ *= -1; + } + _loc7_ = _loc5_; + _loc8_ = _loc6_; + var _loc20_:* = new Object(); + _loc20_.relX = _loc7_; + _loc20_.relY = _loc8_; + return _loc20_; + } + + public static function getAssetUrl(param1:int, param2:int, param3:int) : String + { + if(param2 > 5) + { + param2 = 5; + } + return ServerConfig.IMAGE_USERITEM + param1 + "_" + param2 + "_" + param3 + ".png"; + } + + public static function getTrLine(param1:int, param2:uint = 1643790, param3:uint = 3749425) : Sprite + { + var _loc4_:Shape = PublicMethod.drawLine(0,0,param1,0,param2); + var _loc5_:Shape = PublicMethod.drawLine(0,0,param1,0,param3); + var _loc6_:Sprite = new Sprite(); + _loc6_.addChild(_loc4_); + _loc6_.addChild(_loc5_); + _loc5_.y = 1; + return _loc6_; + } + + public static function getTdLine(param1:int, param2:uint = 1643790, param3:uint = 3749425) : Sprite + { + var _loc4_:Shape = PublicMethod.drawLine(0,0,0,param1,param2); + var _loc5_:Shape = PublicMethod.drawLine(0,0,0,param1,param3); + var _loc6_:Sprite = new Sprite(); + _loc6_.addChild(_loc4_); + _loc6_.addChild(_loc5_); + _loc5_.x = 1; + return _loc6_; + } + + public static function getColorByType(param1:int) : String + { + switch(param1) + { + case 1: + return "#FFFFFF"; + case 2: + return "#66FF00"; + case 3: + return "#00FFFF"; + case 4: + return "#CC00FF"; + case 5: + return "#FF9865"; + case 6: + return "#CC0000"; + default: + return "#FFFFFF"; + } + } + + public static function getStrByType(param1:int) : String + { + switch(param1) + { + case 1: + return "长衫"; + case 2: + return "古筝"; + case 3: + return "长笛"; + case 4: + return "妆镜"; + case 5: + return "发梳"; + case 6: + return "茶具"; + default: + return "#FFFFFF"; + } + } + + public static function getHomePro(param1:int, param2:int) : int + { + var _loc3_:int = 10000; + var _loc4_:int = 0; + switch(param1) + { + case 1: + _loc4_ = param2 * _loc3_; + break; + case 2: + _loc4_ = _loc3_ * 100 + param2 * _loc3_ * 11 / 10; + break; + case 3: + _loc4_ = _loc3_ * 210 + param2 * _loc3_ * 12 / 10; + break; + case 4: + _loc4_ = _loc3_ * 330 + param2 * _loc3_ * 13 / 10; + break; + case 5: + _loc4_ = _loc3_ * 460 + param2 * _loc3_ * 14 / 10; + break; + case 6: + _loc4_ = _loc3_ * 600 + param2 * _loc3_ * 15 / 10; + } + return _loc4_; + } + } +} + diff --git a/flash_decompiled/com/common/Scale9Grid.as b/flash_decompiled/com/common/Scale9Grid.as new file mode 100644 index 0000000..36f2ac3 --- /dev/null +++ b/flash_decompiled/com/common/Scale9Grid.as @@ -0,0 +1,174 @@ +package com.common +{ + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.DisplayObject; + import flash.display.Sprite; + import flash.geom.Point; + import flash.geom.Rectangle; + + public class Scale9Grid extends Sprite + { + + private var _bgMc:Sprite; + + private var _mcRect:Rectangle; + + private var _bgBitmap:Bitmap; + + private var _graphics:BitmapData; + + private var _slicingGrapincs:Array; + + private var _width:Number; + + private var _height:Number; + + private var _cornerWidth:Number; + + private var _cornerHeight:Number; + + private const UP_LEFT:uint = 0; + + private const UP:uint = 1; + + private const UP_RIGHT:uint = 2; + + private const LEFT:uint = 3; + + private const CENTER:uint = 4; + + private const RIGHT:uint = 5; + + private const DOWN_LEFT:uint = 6; + + private const DOWN:uint = 7; + + private const DOWN_RIGHT:uint = 8; + + public function Scale9Grid(param1:Sprite, param2:Number, param3:Number) + { + super(); + this._bgMc = param1; + this._mcRect = param1.scale9Grid; + this._bgBitmap = this.drawBitmap(param1); + this._graphics = this._bgBitmap.bitmapData; + this._height = param3; + this._width = param2; + this._cornerWidth = this._mcRect.x; + this._cornerHeight = this._mcRect.y; + this._slicingGrapincs = new Array(); + this.splicegraphic(); + this.setSize(this._width,this._height); + } + + private function splicegraphic() : void + { + var _loc1_:BitmapData = null; + var _loc2_:Rectangle = null; + var _loc4_:Number = NaN; + var _loc5_:Number = NaN; + var _loc3_:Point = new Point(); + _loc2_ = new Rectangle(0,0,this._cornerWidth,this._cornerHeight); + _loc1_ = new BitmapData(this._cornerWidth,this._cornerHeight); + _loc1_.copyPixels(this._graphics,_loc2_,_loc3_); + this._slicingGrapincs.push(new Bitmap(_loc1_)); + _loc2_ = new Rectangle(this._cornerWidth,0,this._mcRect.width,this._cornerHeight); + _loc1_ = new BitmapData(this._mcRect.width,this._cornerHeight); + _loc1_.copyPixels(this._graphics,_loc2_,_loc3_); + this._slicingGrapincs.push(new Bitmap(_loc1_)); + _loc2_ = new Rectangle(this._cornerWidth + this._mcRect.width,0,this._bgMc.width - this._cornerWidth - this._mcRect.width,this._cornerHeight); + _loc1_ = new BitmapData(this._bgMc.width - this._cornerWidth - this._mcRect.width,this._cornerHeight); + _loc1_.copyPixels(this._graphics,_loc2_,_loc3_); + this._slicingGrapincs.push(new Bitmap(_loc1_)); + _loc2_ = new Rectangle(0,this._cornerHeight,this._cornerWidth,this._mcRect.height); + _loc1_ = new BitmapData(this._cornerWidth,this._mcRect.height); + _loc1_.copyPixels(this._graphics,_loc2_,_loc3_); + this._slicingGrapincs.push(new Bitmap(_loc1_)); + _loc2_ = new Rectangle(this._cornerWidth,this._cornerHeight,this._mcRect.width,this._mcRect.height); + _loc1_ = new BitmapData(this._mcRect.width,this._mcRect.height); + _loc1_.copyPixels(this._graphics,_loc2_,_loc3_); + this._slicingGrapincs.push(new Bitmap(_loc1_)); + _loc2_ = new Rectangle(this._cornerWidth + this._mcRect.width,this._cornerHeight,this._bgMc.width - this._cornerWidth - this._mcRect.width,this._mcRect.height); + _loc1_ = new BitmapData(this._bgMc.width - this._cornerWidth - this._mcRect.width,this._mcRect.height); + _loc1_.copyPixels(this._graphics,_loc2_,_loc3_); + this._slicingGrapincs.push(new Bitmap(_loc1_)); + _loc2_ = new Rectangle(0,this._cornerHeight + this._mcRect.height,this._cornerWidth,this._bgMc.height - this._cornerHeight - this._mcRect.height); + _loc1_ = new BitmapData(this._cornerWidth,this._bgMc.height - this._cornerHeight - this._mcRect.height); + _loc1_.copyPixels(this._graphics,_loc2_,_loc3_); + this._slicingGrapincs.push(new Bitmap(_loc1_)); + _loc2_ = new Rectangle(this._cornerWidth,this._cornerHeight + this._mcRect.height,this._mcRect.width,this._bgMc.height - this._cornerHeight - this._mcRect.height); + _loc1_ = new BitmapData(this._mcRect.width,this._bgMc.height - this._cornerHeight - this._mcRect.height); + _loc1_.copyPixels(this._graphics,_loc2_,_loc3_); + this._slicingGrapincs.push(new Bitmap(_loc1_)); + _loc2_ = new Rectangle(this._cornerWidth + this._mcRect.width,this._cornerHeight + this._mcRect.height,this._bgMc.width - this._cornerWidth - this._mcRect.width,this._bgMc.height - this._cornerHeight - this._mcRect.height); + _loc1_ = new BitmapData(this._bgMc.width - this._cornerWidth - this._mcRect.width,this._bgMc.height - this._cornerHeight - this._mcRect.height); + _loc1_.copyPixels(this._graphics,_loc2_,_loc3_); + this._slicingGrapincs.push(new Bitmap(_loc1_)); + var _loc6_:int = 0; + while(_loc6_ < this._slicingGrapincs.length) + { + addChild(this._slicingGrapincs[_loc6_]); + _loc6_++; + } + } + + public function setSize(param1:Number, param2:Number) : void + { + var _loc3_:Bitmap = null; + _loc3_ = this.getSlice(this.UP_LEFT); + _loc3_.x = 0; + _loc3_.y = 0; + _loc3_ = this.getSlice(this.UP); + _loc3_.x = this._cornerWidth; + _loc3_.y = 0; + _loc3_.width = param1; + _loc3_ = this.getSlice(this.UP_RIGHT); + _loc3_.x = this._cornerWidth + param1; + _loc3_.y = 0; + _loc3_ = this.getSlice(this.LEFT); + _loc3_.x = 0; + _loc3_.y = this._cornerHeight; + _loc3_.height = param2; + _loc3_ = this.getSlice(this.CENTER); + _loc3_.x = this._cornerWidth; + _loc3_.y = this._cornerHeight; + _loc3_.width = param1; + _loc3_.height = param2; + _loc3_ = this.getSlice(this.RIGHT); + _loc3_.x = this._cornerWidth + param1; + _loc3_.y = this._cornerHeight; + _loc3_.height = param2; + _loc3_ = this.getSlice(this.DOWN_LEFT); + _loc3_.x = 0; + _loc3_.y = param2 + this._cornerHeight; + _loc3_ = this.getSlice(this.DOWN); + _loc3_.x = this._cornerWidth; + _loc3_.y = param2 + this._cornerHeight; + _loc3_.width = param1; + _loc3_ = this.getSlice(this.DOWN_RIGHT); + _loc3_.x = param1 + this._cornerWidth; + _loc3_.y = param2 + this._cornerHeight; + } + + private function getSlice(param1:uint) : Bitmap + { + return this._slicingGrapincs[param1]; + } + + private function drawScale9Grid() : void + { + addChild(this._bgMc); + this._bgMc.width = this._width; + this._bgMc.height = this._height; + } + + private function drawBitmap(param1:DisplayObject) : Bitmap + { + var _loc2_:BitmapData = new BitmapData(param1.width,param1.height,true,16777215); + _loc2_.draw(param1); + return new Bitmap(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/control/ConnectService.as b/flash_decompiled/com/control/ConnectService.as new file mode 100644 index 0000000..719c607 --- /dev/null +++ b/flash_decompiled/com/control/ConnectService.as @@ -0,0 +1,414 @@ +package com.control +{ + import com.control.activity.ActivityService; + import com.control.assistant.AssistantService; + import com.control.battle.BattleService; + import com.control.castle.CastleService; + import com.control.chat.ChatService; + import com.control.combat.CombatService; + import com.control.farm.UserFarmService; + import com.control.fish.FishService; + import com.control.friend.FriendService; + import com.control.guild.GuildService; + import com.control.guild.GuildTransService; + import com.control.help.HelpService; + import com.control.hero.HeroService; + import com.control.home.HomeService; + import com.control.iron.IronService; + import com.control.item.ItemsService; + import com.control.login.LoginService; + import com.control.map.MapService; + import com.control.message.MessageService; + import com.control.mission.MissionService; + import com.control.pack.PackService; + import com.control.play.BabelService; + import com.control.play.HexagramService; + import com.control.play.LeagueService; + import com.control.play.PlayService; + import com.control.province.ProvinceService; + import com.control.risk.RiskService; + import com.control.shop.ShopService; + import com.control.tech.TechService; + import com.control.tower.SingleBabelService; + import com.control.user.UserService; + import flash.display.Sprite; + + public class ConnectService extends Sprite + { + + private static var instance:ConnectService; + + private var _loginService:LoginService; + + private var _castleService:CastleService; + + private var _farmService:UserFarmService; + + private var _heroService:HeroService; + + private var _techService:TechService; + + private var _itemsService:ItemsService; + + private var _shopService:ShopService; + + private var _packService:PackService; + + private var _ironService:IronService; + + private var _userService:UserService; + + private var _battleService:BattleService; + + private var _mapService:MapService; + + private var _playService:PlayService; + + private var _chatService:ChatService; + + private var _guildService:GuildService; + + private var _guildTransService:GuildTransService; + + private var _babelService:BabelService; + + private var _leagueService:LeagueService; + + private var _hexagramService:HexagramService; + + private var _combatService:CombatService; + + private var _friendService:FriendService; + + private var _messageService:MessageService; + + private var _provinceService:ProvinceService; + + private var _missionService:MissionService; + + private var _assistantService:AssistantService; + + private var _fishService:FishService; + + private var _helpService:HelpService; + + private var _activityService:ActivityService; + + private var _riskService:RiskService; + + private var _homeService:HomeService; + + private var _singleBabelService:SingleBabelService; + + public function ConnectService() + { + super(); + this._loginService = new LoginService(); + this._castleService = new CastleService(); + this._farmService = new UserFarmService(); + this._heroService = new HeroService(); + this._techService = new TechService(); + this._itemsService = new ItemsService(); + this._shopService = new ShopService(); + this._packService = new PackService(); + this._ironService = new IronService(); + this._userService = new UserService(); + this._battleService = new BattleService(); + this._mapService = new MapService(); + this._playService = new PlayService(); + this._chatService = new ChatService(); + this._guildService = new GuildService(); + this._guildTransService = new GuildTransService(); + this._babelService = new BabelService(); + this._leagueService = new LeagueService(); + this._hexagramService = new HexagramService(); + this._combatService = new CombatService(); + this._friendService = new FriendService(); + this._messageService = new MessageService(); + this._provinceService = new ProvinceService(); + this._missionService = new MissionService(); + this._assistantService = new AssistantService(); + this._fishService = new FishService(); + this._helpService = new HelpService(); + this._activityService = new ActivityService(); + this._riskService = new RiskService(); + this._homeService = new HomeService(); + this._singleBabelService = new SingleBabelService(); + } + + public static function getInstance() : ConnectService + { + if(instance == null) + { + return instance = new ConnectService(); + } + return instance; + } + + public function get loginService() : LoginService + { + return this._loginService; + } + + public function get castleService() : CastleService + { + return this._castleService; + } + + public function get farmService() : UserFarmService + { + return this._farmService; + } + + public function get heroService() : HeroService + { + return this._heroService; + } + + public function get techService() : TechService + { + return this._techService; + } + + public function set techService(param1:TechService) : void + { + this._techService = param1; + } + + public function get itemsService() : ItemsService + { + return this._itemsService; + } + + public function set itemsService(param1:ItemsService) : void + { + this._itemsService = param1; + } + + public function get shopService() : ShopService + { + return this._shopService; + } + + public function set shopService(param1:ShopService) : void + { + this._shopService = param1; + } + + public function get packService() : PackService + { + return this._packService; + } + + public function set packService(param1:PackService) : void + { + this._packService = param1; + } + + public function get ironService() : IronService + { + return this._ironService; + } + + public function set ironService(param1:IronService) : void + { + this._ironService = param1; + } + + public function get userService() : UserService + { + return this._userService; + } + + public function set userService(param1:UserService) : void + { + this._userService = param1; + } + + public function get battleService() : BattleService + { + return this._battleService; + } + + public function set battleService(param1:BattleService) : void + { + this._battleService = param1; + } + + public function get mapService() : MapService + { + return this._mapService; + } + + public function set mapService(param1:MapService) : void + { + this._mapService = param1; + } + + public function get playService() : PlayService + { + return this._playService; + } + + public function set playService(param1:PlayService) : void + { + this._playService = param1; + } + + public function get chatService() : ChatService + { + return this._chatService; + } + + public function set chatService(param1:ChatService) : void + { + this._chatService = param1; + } + + public function get guildService() : GuildService + { + return this._guildService; + } + + public function set guildService(param1:GuildService) : void + { + this._guildService = param1; + } + + public function get guildTransService() : GuildTransService + { + return this._guildTransService; + } + + public function set guildTransService(param1:GuildTransService) : void + { + this._guildTransService = param1; + } + + public function get babelService() : BabelService + { + return this._babelService; + } + + public function set babelService(param1:BabelService) : void + { + this._babelService = param1; + } + + public function get leagueService() : LeagueService + { + return this._leagueService; + } + + public function set leagueService(param1:LeagueService) : void + { + this._leagueService = param1; + } + + public function get hexagramService() : HexagramService + { + return this._hexagramService; + } + + public function set hexagramService(param1:HexagramService) : void + { + this._hexagramService = param1; + } + + public function get combatService() : CombatService + { + return this._combatService; + } + + public function set combatService(param1:CombatService) : void + { + this._combatService = param1; + } + + public function get friendService() : FriendService + { + return this._friendService; + } + + public function set friendService(param1:FriendService) : void + { + this._friendService = param1; + } + + public function get messageService() : MessageService + { + return this._messageService; + } + + public function set messageService(param1:MessageService) : void + { + this._messageService = param1; + } + + public function get provinceService() : ProvinceService + { + return this._provinceService; + } + + public function set provinceService(param1:ProvinceService) : void + { + this._provinceService = param1; + } + + public function get missionService() : MissionService + { + return this._missionService; + } + + public function set missionService(param1:MissionService) : void + { + this._missionService = param1; + } + + public function get assistantService() : AssistantService + { + return this._assistantService; + } + + public function set assistantService(param1:AssistantService) : void + { + this._assistantService = param1; + } + + public function get fishService() : FishService + { + return this._fishService; + } + + public function set fishService(param1:FishService) : void + { + this._fishService = param1; + } + + public function get helpService() : HelpService + { + return this._helpService; + } + + public function get activityService() : ActivityService + { + return this._activityService; + } + + public function get riskService() : RiskService + { + return this._riskService; + } + + public function get homeService() : HomeService + { + return this._homeService; + } + + public function get singleBabelService() : SingleBabelService + { + return this._singleBabelService; + } + } +} + diff --git a/flash_decompiled/com/control/activity/ActivityService.as b/flash_decompiled/com/control/activity/ActivityService.as new file mode 100644 index 0000000..83f41a6 --- /dev/null +++ b/flash_decompiled/com/control/activity/ActivityService.as @@ -0,0 +1,831 @@ +package com.control.activity +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.play.event.PlayEvent; + import com.data.GameData; + import com.events.DevEvent; + import com.newdata.activity.ActivityData; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.activity.gift.LevelAwardDate; + import com.view.ui.help.data.GameInfoData; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PakState; + + public class ActivityService extends Connect + { + + public function ActivityService() + { + super(); + } + + public function getLevelConfig() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ActivityAction.getLevelConfig"; + super.connect(_loc1_,this.getLevelConfigResult); + } + + private function getLevelConfigResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + LevelAwardDate.setConfigData(_loc3_); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_LEVELCONFIG)); + } + + public function getGiftByLevel(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ActivityAction.getGiftByLevel"; + super.connect(_loc2_,this.getGiftByLevelResult,param1); + } + + private function getGiftByLevelResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + GameData.setUserHoliday(_loc3_); + PakState.setGetPackListStatus(); + } + + public function enterYabiao() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.YabiaoAction.enterMain"; + super.connect(_loc1_,this.enterYabiaoResult); + } + + private function enterYabiaoResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + ActivityData.setYabiaoData(_loc3_); + } + + public function saveYabiaoHeros(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.YabiaoAction.saveCopyHeros"; + super.connect(_loc2_,this.saveYabiaoHerosResult,param1); + } + + private function saveYabiaoHerosResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + NewHeroData.setAllCopyHeroList(_loc3_); + var _loc4_:Object = _loc2_.returnObj1; + ActivityData.setYabiaoData(_loc4_); + var _loc5_:PlayEvent = new PlayEvent(PlayEvent.COPYHERO_SAVE_OK); + super.dispatchEvent(_loc5_); + } + + public function startYabiao() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.YabiaoAction.startYabiao"; + super.connect(_loc1_,this.startYabiaoResult); + } + + private function startYabiaoResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + ActivityData.setYabiaoData(_loc3_); + MessageBoxUI.getInstance().addMessage("护镖成功!"); + this.getAllYabiaoList(); + } + + public function getAllYabiaoList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.YabiaoAction.getYabiaoList"; + super.connect(_loc1_,this.getAllYabiaoListResult); + } + + private function getAllYabiaoListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_YABIAO_YABIAOLIST); + _loc4_.arr = _loc3_; + Utils.g_events.dispatchEvent(_loc4_); + } + + public function startCombat(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.YabiaoAction.startCombat"; + super.connect(_loc2_,this.startCombatResult,param1); + } + + private function startCombatResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_YABIAO_YABIAOLIST); + _loc4_.arr = _loc3_; + Utils.g_events.dispatchEvent(_loc4_); + var _loc5_:Object = _loc2_.returnObj2; + ActivityData.setYabiaoData(_loc5_); + var _loc6_:PlayEvent = new PlayEvent(PlayEvent.HUIWU_COMBAT_RESULT); + _loc6_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc6_); + } + + public function getYabiaoItem() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.YabiaoAction.getYabiaoItem"; + super.connect(_loc1_,this.getYabiaoItemResult); + } + + private function getYabiaoItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_YABIAO_ITEM); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function enterPayMain() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ActivityAction.enterPayMain"; + super.connect(_loc1_,this.enterPayMainResult); + } + + private function enterPayMainResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_CHONGZHI_MAIN); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getUserPayCount() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ActivityAction.getUserPayCount"; + super.connect(_loc1_,this.getUserPayCountResult); + } + + private function getUserPayCountResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_CHONGZHI_PAYCOUNT); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getDailyPay(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ActivityAction.getDailyPay"; + super.connect(_loc2_,this.getDailyPayResult,param1); + } + + private function getDailyPayResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_CHONGZHI_GETGIFT); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getDailyPayList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ActivityAction.getDailyPayList"; + super.connect(_loc1_,this.getDailyPayListResult); + } + + private function getDailyPayListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_CHONGZHI_GETDAILYLIST); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getDailyOrderListGift() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ActivityAction.getDailyOrderListGift"; + super.connect(_loc1_,this.getDailyOrderListGiftResult); + } + + private function getDailyOrderListGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_CHONGZHI_GETDAILYLISTRESULT); + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getGameInfo() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ActivityAction.getGameInfo"; + super.connect(_loc1_,this.getGameInfoResult); + } + + private function getGameInfoResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + GameInfoData.setInfoList(_loc3_); + } + + public function enterWorldBoss() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.UserBossAction.enterMain"; + super.connect(_loc1_,this.enterWorldBossResult); + } + + private function enterWorldBossResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + ActivityData.setWorldBossData(_loc3_); + } + + public function saveWorldBossHeros(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.UserBossAction.saveCopyHeros"; + super.connect(_loc2_,this.saveWorldBossHerosResult,param1); + } + + private function saveWorldBossHerosResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + NewHeroData.setAllCopyHeroList(_loc3_); + var _loc4_:Object = _loc2_.returnObj1; + ActivityData.setWorldBossData(_loc4_); + var _loc5_:PlayEvent = new PlayEvent(PlayEvent.COPYHERO_SAVE_OK); + super.dispatchEvent(_loc5_); + } + + public function startBossCombat() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.UserBossAction.startCombat"; + super.connect(_loc1_,this.startBossCombatResult); + } + + private function startBossCombatResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + ActivityData.setWorldBossData(_loc3_); + var _loc4_:PlayEvent = new PlayEvent(PlayEvent.WORLDBOSS_COMBAT_RESULT); + _loc4_.obj = _loc2_.returnObj2; + super.dispatchEvent(_loc4_); + } + + public function getRankMap() : void + { + var _loc1_:String = "com.huzi.play.action.UserBossAction.getRankMap"; + super.connect(_loc1_,this.getRankMapResult); + } + + private function getRankMapResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.WORLDBOSS_RANK_DATA); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getDailyGift() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.UserBossAction.getDailyGift"; + super.connect(_loc1_,this.getDailyGiftResult); + } + + private function getDailyGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ActivityData.hasGetDailyItem(); + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.WORLDBOSS_GET_DAILYITEM); + super.dispatchEvent(_loc3_); + } + + public function getRankGift() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.UserBossAction.getRankGift"; + super.connect(_loc1_,this.getRankGiftResult); + } + + private function getRankGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ActivityData.hasGetRankItem(); + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.WORLDBOSS_GET_RANKITEM); + super.dispatchEvent(_loc3_); + } + + public function getFinalGift() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.UserBossAction.getFinalGift"; + super.connect(_loc1_,this.getFinalGiftResult); + } + + private function getFinalGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ActivityData.hasGetFinalItem(); + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.WORLDBOSS_GET_FINALITEM); + super.dispatchEvent(_loc3_); + } + + public function guwu(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.UserBossAction.guwu"; + super.connect(_loc2_,this.guwuResult,param1); + } + + private function guwuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:int = int(_loc2_.returnObj1); + ActivityData.setFightLevel(_loc3_); + var _loc4_:PlayEvent = new PlayEvent(PlayEvent.WORLDBOSS_GUWU); + super.dispatchEvent(_loc4_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function xunbao() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.UserBossAction.xunbao"; + super.connect(_loc1_,this.xunbaoResult); + } + + private function xunbaoResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ActivityData.setXunbao(); + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.WORLDBOSS_XUNBAO); + super.dispatchEvent(_loc3_); + } + + public function clearTime() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.UserBossAction.clearColdTime"; + super.connect(_loc1_,this.clearTimeResult); + } + + private function clearTimeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + MessageBoxUI.getInstance().addMessage("清除成功"); + } + + public function getHolidayAward(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ActivityAction.getHolidayAward"; + super.connect(_loc2_,this.getHolidayAwardResult,param1); + } + + private function getHolidayAwardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + GameData.setUserHoliday(_loc3_); + } + + public function saveGamePlayer(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.game.action.GamePlayAction.saveCopyHeros"; + super.connect(_loc2_,this.saveCopyHerosResult,param1); + } + + private function saveCopyHerosResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.GAMEPLAY_SAVEHEROS); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getDailyCombatItem() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.GamePlayAction.getDailyCombatItem"; + super.connect(_loc1_,this.getDailyCombatItemResult); + } + + private function getDailyCombatItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.MATCH_getItemResult); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + MessageBoxUI.getInstance().addMessage("领取成功"); + } + + public function getRankItem() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.GamePlayAction.getRankItem"; + super.connect(_loc1_,this.getRankItemResult); + } + + private function getRankItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.MATCH_getItemResult); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + MessageBoxUI.getInstance().addMessage("领取成功"); + } + + public function enterCrossRankMain() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.GamePlayAction.enterMain"; + super.connect(_loc1_,this.enterCrossRankMainResult); + } + + private function enterCrossRankMainResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:Array = _loc2_.returnMap1; + var _loc5_:PlayEvent = new PlayEvent(PlayEvent.GAMEPLAY_TOPLIST); + _loc5_.list = _loc4_; + Utils.g_events.dispatchEvent(_loc5_); + var _loc6_:PlayEvent = new PlayEvent(PlayEvent.GAMEPLAY_enterMain); + _loc6_.obj = _loc3_; + Utils.g_events.dispatchEvent(_loc6_); + } + + public function getMessList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.GamePlayAction.getMessList"; + super.connect(_loc1_,this.getMessListResult); + } + + private function getMessListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + var _loc4_:PlayEvent = new PlayEvent(PlayEvent.GAMEPLAY_MESSLIST); + _loc4_.list = _loc3_; + Utils.g_events.dispatchEvent(_loc4_); + } + + public function getGameRankReward() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.GamePlayAction.getGameRankReward"; + super.connect(_loc1_,this.getGameRankRewardResult); + } + + private function getGameRankRewardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.GAMEPLAY_ITEMLIST); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function startGamePlayerBattle(param1:Array, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.game.action.GamePlayAction.startBattle"; + super.connect(_loc3_,this.startBattleResult,param1,param2); + } + + private function startBattleResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.GAMEPLAY_StartCombat); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + var _loc4_:PlayEvent = new PlayEvent(PlayEvent.GAMEPLAY_enterMain); + _loc4_.obj = _loc2_.returnObj2; + Utils.g_events.dispatchEvent(_loc4_); + } + + public function saveMatch(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.game.action.MatchAction.saveCopyHeros"; + super.connect(_loc2_,this.saveMatchResult,param1); + } + + private function saveMatchResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.MATCH_enterMain); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + MessageBoxUI.getInstance().addMessage("报名成功"); + } + + public function enterMain() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.MatchAction.enterMain"; + super.connect(_loc1_,this.enterMainResult); + } + + private function enterMainResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.MATCH_enterMain); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.list = _loc2_.returnList1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getMatchMap() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.MatchAction.getMatchMap"; + super.connect(_loc1_,this.getMatchMapResult); + } + + private function getMatchMapResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.MATCH_getMatchMap); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getMatchReward() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.MatchAction.getMatchReward"; + super.connect(_loc1_,this.getMatchRewardResult); + } + + private function getMatchRewardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.MATCH_getMatchReward); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getUserMatch() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.MatchAction.getUserMatch"; + super.connect(_loc1_,this.getUserMatchResult); + } + + private function getUserMatchResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.MATCH_getUserMatchReward); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getMatchJoinReward() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.MatchAction.getMatchJoinReward"; + super.connect(_loc1_,this.getMatchJoinRewardResult); + } + + private function getMatchJoinRewardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.MATCH_getUserMatchReward); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + MessageBoxUI.getInstance().addMessage(_loc2_.msg); + } + + public function getMatchRankReward() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.game.action.MatchAction.getMatchRankReward"; + super.connect(_loc1_,this.getMatchRankRewardResult); + } + + private function getMatchRankRewardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.MATCH_getUserMatchReward); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + MessageBoxUI.getInstance().addMessage(_loc2_.msg); + } + } +} + diff --git a/flash_decompiled/com/control/assistant/AssistantService.as b/flash_decompiled/com/control/assistant/AssistantService.as new file mode 100644 index 0000000..d6bf1b2 --- /dev/null +++ b/flash_decompiled/com/control/assistant/AssistantService.as @@ -0,0 +1,54 @@ +package com.control.assistant +{ + import com.control.assistant.event.AssisEvent; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.view.ui.pak.data.PakState; + + public class AssistantService extends Connect + { + + public function AssistantService() + { + super(); + } + + public function getLoginFirstPageView() : void + { + var _loc1_:String = "com.huzi.assistant.action.AssistantAction.getLoginFirstPageView"; + super.connect(_loc1_,this.getLoginFirstPageViewResult); + } + + private function getLoginFirstPageViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:AssisEvent = new AssisEvent(AssisEvent.A_getLoginFirstPageView); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function gainActivityGift(param1:int) : void + { + var _loc2_:String = "com.huzi.assistant.action.AssistantAction.gainActivityGift"; + super.connect(_loc2_,this.gainActivityGiftResult,param1); + } + + private function gainActivityGiftResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:AssisEvent = new AssisEvent(AssisEvent.A_gainActivityGift); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + } +} + diff --git a/flash_decompiled/com/control/assistant/event/AssisEvent.as b/flash_decompiled/com/control/assistant/event/AssisEvent.as new file mode 100644 index 0000000..f486a22 --- /dev/null +++ b/flash_decompiled/com/control/assistant/event/AssisEvent.as @@ -0,0 +1,22 @@ +package com.control.assistant.event +{ + import flash.events.Event; + + public class AssisEvent extends Event + { + + public static const A_getLoginFirstPageView:String = "A_getLoginFirstPageView"; + + public static const A_gainActivityGift:String = "A_gainActivityGift"; + + public var obj:Object; + + public var list:Array; + + public function AssisEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/battle/BattleService.as b/flash_decompiled/com/control/battle/BattleService.as new file mode 100644 index 0000000..d1a551f --- /dev/null +++ b/flash_decompiled/com/control/battle/BattleService.as @@ -0,0 +1,439 @@ +package com.control.battle +{ + import com.control.battle.event.BattleEvent; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.data.DataModoule; + import com.events.DevEvent; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + + public class BattleService extends Connect + { + + public function BattleService() + { + super(); + } + + public function getSiegeDefView() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.develop.action.CastleBattleAction.getWallDefHero"; + super.connect(_loc1_,this.getSiegeDefViewResult); + } + + private function getSiegeDefViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.WALL_DEF_HEROLIST); + _loc3_.wallHero = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function saveSiegeDef(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.develop.action.CastleBattleAction.saveSiegeDef"; + super.connect(_loc2_,this.saveSiegeDefResult,param1); + } + + private function saveSiegeDefResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.WALL_DEF_HEROLIST_SAVE); + super.dispatchEvent(_loc3_); + } + + public function getChangeArmyView() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleBattleAction.getChangeArmyView"; + super.connect(_loc1_,this.getChangeArmyViewResult); + } + + private function getChangeArmyViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.ARMY_SET_LIST); + _loc3_.armyObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function saveChangeArmy(param1:Array, param2:String = "") : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.develop.action.CastleBattleAction.saveChangeArmy"; + super.connect(_loc3_,this.saveChangeArmyResult,param1,param2); + } + + private function saveChangeArmyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + NewHeroData.setGetHeroListStatus(); + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.ARMY_SET_CHANGE); + super.dispatchEvent(_loc3_); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CHANGEARMY,_loc2_.returnList1)); + } + + public function saveBattleDex(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.develop.action.CastleBattleAction.saveBattleDex"; + super.connect(_loc3_,this.saveBattleDexResult,param1,param2); + } + + private function saveBattleDexResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.SaveBattleDex); + super.dispatchEvent(_loc3_); + } + + public function deleteBattleDex(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleBattleAction.deleteBattleDex"; + super.connect(_loc2_,this.deleteBattleDexResult,param1); + } + + private function deleteBattleDexResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.DeleteBattleDex); + super.dispatchEvent(_loc3_); + } + + public function getPveCastleList() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleBattleAction.listAllPveCastle"; + super.connect(_loc1_,this.getPveCastleListResult); + } + + private function getPveCastleListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_getPveCastleList); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getBattleDexList() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleBattleAction.getBattleDexList"; + super.connect(_loc1_,this.getBattleDexListResult); + } + + private function getBattleDexListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_getBattleDexList); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getChouRen() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleBattleAction.getChouRen"; + super.connect(_loc1_,this.getChouRenListResult); + } + + private function getChouRenListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_getChouRen); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getChongToUser() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleBattleAction.getChongToUser"; + super.connect(_loc1_,this.getChongToUserListResult); + } + + private function getChongToUserListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_getChongToUser); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getBattleFlagUser() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleBattleAction.getBattleFlagUser"; + super.connect(_loc1_,this.getBattleFlagUserResult); + } + + private function getBattleFlagUserResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_getBattleFlagUser); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getBattlePlan() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleBattleAction.getBattlePlan1"; + super.connect(_loc1_,this.getBattlePlanResult); + } + + private function getBattlePlanResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_getBattlePlanResult); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getPveDrop(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.develop.action.CastleBattleAction.getPveDrop"; + super.connect(_loc3_,this.getPveDropResult,param1,param2); + } + + private function getPveDropResult(param1:Object) : void + { + var _loc2_:BattleEvent = new BattleEvent(BattleEvent.B_getPveDrop); + _loc2_.armyObj = param1; + super.dispatchEvent(_loc2_); + } + + public function remainPvpNum() : void + { + var _loc1_:String = "com.huzi.combat.action.CombatAction.remainPvpNum"; + super.connect(_loc1_,this.remainPvpNumResult); + } + + private function remainPvpNumResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + DataModoule.getInstance().userMgr.remainPvpNum = int(_loc2_.returnObj1); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.RemainPvpNum_UPDATE)); + } + + public function armyOutBattle(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.combat.action.CombatAction.armyOutBattle"; + super.connect(_loc2_,this.armyOutBattleResult,param1); + } + + private function armyOutBattleResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_armyOutBattle); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function listArmyOut() : void + { + var _loc1_:String = "com.huzi.combat.action.CombatAction.listArmyOut"; + super.connect(_loc1_,this.listArmyOutResult); + } + + private function listArmyOutResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_listArmyOut); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getArmyOutList(param1:int) : void + { + var _loc2_:String = "com.huzi.combat.action.CombatAction.getArmyOutList"; + super.connect(_loc2_,this.getArmyOutListResult,param1); + } + + private function getArmyOutListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_getArmyOutList); + _loc3_.armyObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function callBackOutArmy(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.combat.action.CombatAction.callBackOutArmy"; + super.connect(_loc2_,this.callBackOutArmyResult,param1); + } + + private function callBackOutArmyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_callBackOutArmy); + super.dispatchEvent(_loc3_); + } + + public function callBackLeagueDefArmy(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.combat.action.CombatAction.callBackLeagueDefArmy"; + super.connect(_loc2_,this.callBackLeagueDefArmyResult,param1); + } + + private function callBackLeagueDefArmyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_callBackLeagueDefArmy); + super.dispatchEvent(_loc3_); + } + + public function getChangeArmyView4YS() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleBattleAction.getChangeArmyView4YS"; + super.connect(_loc1_,this.getChangeArmyView4YSResult); + } + + private function getChangeArmyView4YSResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_getChangeArmyView4YS); + _loc3_.armyObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function saveYsChangeArmy(param1:Object) : * + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.develop.action.CastleBattleAction.saveYsChangeArmy"; + super.connect(_loc2_,this.saveYsChangeArmyResult,param1); + } + + private function saveYsChangeArmyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_saveYsChangeArmy); + super.dispatchEvent(_loc3_); + } + + public function getGuildMilitaryMessage() : void + { + var _loc1_:String = "com.huzi.combat.action.CombatAction.getGuildMilitaryMessage"; + super.connect(_loc1_,this.getGuildMilitaryMessageResult); + } + + private function getGuildMilitaryMessageResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_listUnionArmyOut); + _loc3_.list = _loc2_.returnList1; + dispatchEvent(_loc3_); + } + + public function getPvpTime(param1:int, param2:int, param3:int) : void + { + var _loc4_:String = "com.huzi.combat.action.CombatAction.getPvpTime"; + super.connect(_loc4_,this.getPvpTimeResult,param1,param2,param3); + } + + private function getPvpTimeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BattleEvent = new BattleEvent(BattleEvent.B_getPvpTime); + _loc3_.armyObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/battle/event/BattleEvent.as b/flash_decompiled/com/control/battle/event/BattleEvent.as new file mode 100644 index 0000000..413f242 --- /dev/null +++ b/flash_decompiled/com/control/battle/event/BattleEvent.as @@ -0,0 +1,68 @@ +package com.control.battle.event +{ + import flash.events.Event; + + public class BattleEvent extends Event + { + + public static const WALL_DEF_HEROLIST:String = "WALL_DEF_HEROLIST"; + + public static const WALL_DEF_HEROLIST_SAVE:String = "WALL_DEF_HEROLIST_SAVE"; + + public static const ARMY_SET_LIST:String = "ARMY_SET_LIST"; + + public static const ARMY_SET_CHANGE:String = "ARMY_SET_CHANGE"; + + public static const SaveBattleDex:String = "SaveBattleDex"; + + public static const DeleteBattleDex:String = "deleteBattleDex"; + + public static const B_getPveCastleList:String = "B_getPveCastleList"; + + public static const B_getBattleDexList:String = "B_getBattleDexList"; + + public static const B_getChouRen:String = "B_getChouRen"; + + public static const B_getChongToUser:String = "B_getChongToUser"; + + public static const B_getBattleFlagUser:String = "B_getBattleFlagUser"; + + public static const B_getBattlePlanResult:String = "B_getBattlePlanResult"; + + public static const B_getPveDrop:String = "B_getPveDrop"; + + public static const B_armyOutBattle:String = "B_armyOutBattle"; + + public static const B_listArmyOut:String = "B_listArmyOut"; + + public static const B_getArmyOutList:String = "B_getArmyOutList"; + + public static const B_callBackOutArmy:String = "B_callBackOutArmy"; + + public static const B_callBackLeagueDefArmy:String = "B_callBackLeagueDefArmy"; + + public static const B_getChangeArmyView4YS:String = "B_getChangeArmyView4YS"; + + public static const B_saveYsChangeArmy:String = "B_saveYsChangeArmy"; + + public static const B_listUnionArmyOut:String = "B_listUnionArmyOut"; + + public static const B_getPvpTime:String = "B_getPvpTime"; + + public var wallHero:Object; + + public var armyObj:Object; + + public var list:Array; + + public var result:int; + + public var msg:String; + + public function BattleEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/battle/event/BattleViewEvent.as b/flash_decompiled/com/control/battle/event/BattleViewEvent.as new file mode 100644 index 0000000..de50378 --- /dev/null +++ b/flash_decompiled/com/control/battle/event/BattleViewEvent.as @@ -0,0 +1,23 @@ +package com.control.battle.event +{ + import com.data.data.battleview.Fight; + import flash.events.Event; + + public class BattleViewEvent extends Event + { + + public static const BATTLE_VIEW_BYFIGHTID:String = "BATTLE_VIEW_BYFIGHTID"; + + public var fight:Fight; + + public var result:int; + + public var msg:String; + + public function BattleViewEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/castle/CastleService.as b/flash_decompiled/com/control/castle/CastleService.as new file mode 100644 index 0000000..52939e5 --- /dev/null +++ b/flash_decompiled/com/control/castle/CastleService.as @@ -0,0 +1,1287 @@ +package com.control.castle +{ + import com.InstallFace; + import com.control.castle.event.AlartEvent; + import com.control.castle.event.AllQueueEvent; + import com.control.castle.event.BarrackEvent; + import com.control.castle.event.CastleBuildEvent; + import com.control.castle.event.CastleBuildListEvent; + import com.control.castle.event.CastleEvent; + import com.control.castle.event.CastleLevelUpEvent; + import com.control.castle.event.CastleListEvent; + import com.control.castle.event.CastleWallEvent; + import com.control.castle.event.HospitalEvent; + import com.control.castle.event.NewCastleEvent; + import com.control.castle.event.StrategyEvent; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.data.DataModoule; + import com.data.MemeberShip; + import com.data.data.army.Army; + import com.data.data.army.TowerArmy; + import com.data.data.city.Building; + import com.data.data.city.BuildingQueue; + import com.data.data.city.Castle; + import com.data.data.city.CastleBuilding; + import com.data.data.city.CastlePop; + import com.data.data.city.CastleResource; + import com.data.data.city.EntityCapacity; + import com.data.data.city.EntityConsume; + import com.data.data.city.EntityLimit; + import com.events.DevEvent; + import com.newdata.user.NewPop; + import com.newdata.user.NewRes; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.cache.BuildCache; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.pak.data.PakState; + import flash.net.registerClassAlias; + + public class CastleService extends Connect + { + + registerClassAlias("CastleResource",CastleResource); + registerClassAlias("CastleBuilding",CastleBuilding); + registerClassAlias("Building",Building); + registerClassAlias("BuildingQueue",BuildingQueue); + registerClassAlias("EntityCapacity",EntityCapacity); + registerClassAlias("EntityConsume",EntityConsume); + registerClassAlias("EntityLimit",EntityLimit); + registerClassAlias("CastlePop",CastlePop); + registerClassAlias("Army",Army); + registerClassAlias("TowerArmy",TowerArmy); + + public function CastleService() + { + super(); + } + + public function calcuDevData() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.calcuDevData"; + super.connect(_loc1_,this.calcuDevDataResult); + } + + private function calcuDevDataResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + var _loc3_:Castle = _loc2_.returnMap1["castle"] as Castle; + DataModoule.getInstance().userMgr.castle = _loc3_; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLECHANGE)); + var _loc4_:NewUser = new NewUser(_loc2_.returnMap1["user"]); + NewUserData.setUser(_loc4_); + var _loc5_:NewRes = new NewRes(_loc2_.returnMap1["castleRes"]); + NewUserData.setRes(_loc5_); + var _loc6_:NewPop = new NewPop(_loc2_.returnMap1["castlePop"]); + NewUserData.setNewPop(_loc6_); + DataModoule.getInstance().userMgr.farmObj = _loc2_.returnMap1.product; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.FARM_RES_UPDATE,_loc2_.returnMap1.product)); + } + + public function getCastleResource() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getCastleRes"; + super.connect(_loc1_,this.getCastleResourceResult); + } + + private function getCastleResourceResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewRes = new NewRes(_loc2_.returnObj1); + NewUserData.setRes(_loc3_); + } + + public function getUserData() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getUser"; + super.connect(_loc1_,this.getUserDataResult); + } + + private function getUserDataResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewUser = new NewUser(_loc2_.returnObj1); + NewUserData.setUser(_loc3_); + } + + public function getPop() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getPop"; + super.connect(_loc1_,this.getPopResult); + } + + private function getPopResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewPop = new NewPop(_loc2_.returnObj1); + NewUserData.setNewPop(_loc3_); + } + + public function getFarmProductInfo() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getFarmInfo"; + super.connect(_loc1_,this.getFarmProductInfoResult); + } + + private function getFarmProductInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + DataModoule.getInstance().userMgr.farmObj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.FARM_RES_UPDATE,_loc2_.returnObj1)); + } + + public function getMainCastle() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getMainCastle"; + super.connect(_loc1_,this.getMainCastleResult); + } + + private function getMainCastleResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Castle = _loc2_.returnObj1 as Castle; + DataModoule.getInstance().userMgr.castle = _loc3_; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLECHANGE)); + } + + public function createBuilding(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.develop.action.CastleAction.createBuilding"; + super.connect(_loc4_,this.createBuildResult,param1,param2,param3); + } + + private function createBuildResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleBuilding = _loc2_.returnObj1 as CastleBuilding; + _loc3_.isUp = true; + var _loc4_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_NEW); + _loc4_.castleBuild = _loc3_; + super.dispatchEvent(_loc4_); + this.getCastleResource(); + } + + public function getBuildList(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleAction.getCastleBuildList"; + super.connect(_loc2_,this.getBuildListResult,param1); + } + + private function getBuildListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + DataModoule.getInstance().castleMgr.setMainCastleBuildList(_loc2_.returnList1); + var _loc3_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_LOADALL); + super.dispatchEvent(_loc3_); + } + + public function upCastleBui(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.develop.action.CastleAction.levelUpCastleBui"; + var _loc3_:int = MemeberShip.getCurrCasId(); + super.connect(_loc2_,this.upCastleBuiResult,_loc3_,param1); + } + + private function upCastleBuiResult(param1:Object) : void + { + var _loc4_:CastleBuilding = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_UP); + if(_loc2_.result == ReturnBean.STATUS_0) + { + _loc4_ = _loc2_.returnObj1 as CastleBuilding; + _loc4_.isUp = true; + _loc3_.castleBuild = _loc4_; + DataModoule.getInstance().castleMgr.setCastleBuild(_loc4_); + this.getCastleResource(); + } + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function upBuildTimeOver(param1:int, param2:String, param3:int) : void + { + var _loc4_:String = "com.huzi.develop.action.CastleAction.buildTimeOver"; + super.connect(_loc4_,this.upBuildTimeOverResult,param1,param2,param3); + } + + private function upBuildTimeOverResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleBuilding = _loc2_.returnObj1 as CastleBuilding; + var _loc4_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_UP_OK); + _loc4_.castleBuild = _loc3_; + _loc4_.obj = _loc2_.returnObj2; + super.dispatchEvent(_loc4_); + this.getPop(); + this.getUserData(); + this.getMainCastle(); + } + + public function destroyBuild(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleAction.destroyCastleBui"; + super.connect(_loc2_,this.destroyBuildResult,param1); + } + + private function destroyBuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleBuilding = _loc2_.returnObj1 as CastleBuilding; + _loc3_.isUp = true; + var _loc4_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_DESTROY); + _loc4_.castleBuild = _loc3_; + super.dispatchEvent(_loc4_); + } + + public function cancelBuild(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleAction.cancelBuilding"; + super.connect(_loc2_,this.cancelBuildResult,param1); + } + + private function cancelBuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleBuildEvent = new CastleBuildEvent(CastleBuildEvent.BUILD_CANCEL); + _loc3_.castleBuild = _loc2_.returnObj1 as CastleBuilding; + super.dispatchEvent(_loc3_); + this.getCastleResource(); + } + + public function getNewBuildList(param1:int) : void + { + var _loc3_:CastleBuildListEvent = null; + var _loc4_:String = null; + var _loc2_:Array = BuildCache.getInstance().getNewBuiList(InstallFace.getInstance()._castleType); + if(_loc2_) + { + _loc3_ = new CastleBuildListEvent(CastleBuildListEvent.MAIN_CASTLE_BUILDLIST); + _loc3_.buildListArray = _loc2_; + super.dispatchEvent(_loc3_); + } + else + { + _loc4_ = "com.huzi.develop.action.CastleAction.listTodoBuilding"; + super.connect(_loc4_,this.getNewBuildListResult,param1); + } + } + + private function getNewBuildListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + BuildCache.getInstance().setNewBuiList(InstallFace.getInstance()._castleType,_loc3_); + var _loc4_:CastleBuildListEvent = new CastleBuildListEvent(CastleBuildListEvent.MAIN_CASTLE_BUILDLIST); + _loc4_.buildListArray = _loc3_; + super.dispatchEvent(_loc4_); + } + + public function selectCasBui(param1:int, param2:String) : void + { + var _loc3_:String = "com.huzi.develop.action.CastleAction.selectCasBui"; + super.connect(_loc3_,this.selectCasBuiResult,param1,param2); + } + + private function selectCasBuiResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_selectCasBui); + _loc3_.castleObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function preLevelUpCastle() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.preLevelUpCastle"; + var _loc2_:int = DataModoule.getInstance().userMgr.castle.casId; + super.connect(_loc1_,this.preLevelUpCastleResult,_loc2_); + } + + private function preLevelUpCastleResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:String = _loc2_.returnObj1 as String; + var _loc4_:CastleLevelUpEvent = new CastleLevelUpEvent(); + _loc4_.cityUrl = _loc3_; + super.dispatchEvent(_loc4_); + this.calcuDevData(); + } + + public function getNewCastleConsume() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getBuildNewCastleConsume"; + super.connect(_loc1_,this.getNewCastleConsumeResult); + } + + private function getNewCastleConsumeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewCastleEvent = new NewCastleEvent(NewCastleEvent.GET_NEW_CASTLE); + _loc3_.res = _loc2_.returnObj1 as String; + super.dispatchEvent(_loc3_); + } + + public function buildNewCastle(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.develop.action.CastleAction.buildNewCastle"; + super.connect(_loc2_,this.buildNewCastleResult,param1); + } + + private function buildNewCastleResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewCastleEvent = new NewCastleEvent(NewCastleEvent.BUILD_NEW_CASTLE_OK); + super.dispatchEvent(_loc3_); + var _loc4_:Array = _loc2_.returnList1; + _loc4_.shift(); + DataModoule.getInstance().userMgr.castleArr = _loc4_; + var _loc5_:CastleListEvent = new CastleListEvent(); + super.dispatchEvent(_loc5_); + var _loc6_:Castle = _loc2_.returnObj1 as Castle; + DataModoule.getInstance().userMgr.castle = _loc6_; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLECHANGE)); + var _loc7_:NewPop = new NewPop(_loc2_.returnObj2); + NewUserData.setNewPop(_loc7_); + var _loc8_:NewUser = new NewUser(_loc2_.returnObj3); + NewUserData.setUser(_loc8_); + } + + public function getAllUserCastle() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getAllUserCastle"; + super.connect(_loc1_,this.getAllUserCastleResult); + } + + private function getAllUserCastleResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + _loc3_.shift(); + DataModoule.getInstance().userMgr.castleArr = _loc3_; + var _loc4_:CastleListEvent = new CastleListEvent(); + super.dispatchEvent(_loc4_); + } + + public function getCastleBuildList(param1:int) : void + { + var _loc3_:CastleBuildListEvent = null; + if(BuildCache.getInstance().getBuiList(param1) != null) + { + _loc3_ = new CastleBuildListEvent(CastleBuildListEvent.CASTLE_BUILDLIST); + _loc3_.buildListArray = BuildCache.getInstance().getBuiList(param1); + _loc3_.casId = param1; + super.dispatchEvent(_loc3_); + return; + } + var _loc2_:String = "com.huzi.develop.action.CastleAction.getCastleBuildList"; + super.connect(_loc2_,this.getCastleBuildListResult,param1); + } + + private function getCastleBuildListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Castle = _loc2_.returnObj1 as Castle; + var _loc4_:Array = _loc2_.returnList1; + BuildCache.getInstance().setBuiList(_loc3_.casId,_loc4_); + var _loc5_:CastleBuildListEvent = new CastleBuildListEvent(CastleBuildListEvent.CASTLE_BUILDLIST); + _loc5_.buildListArray = _loc2_.returnList1; + _loc5_.currentCastle = _loc3_; + _loc5_.casId = _loc3_.casId; + super.dispatchEvent(_loc5_); + } + + public function getTransInfo(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.develop.action.CastleAction.showChangeBranchCastleView"; + super.connect(_loc2_,this.getTransInfoResult,param1); + } + + private function getTransInfoResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getTransInfo); + _loc3_.castleObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function changeBranchCastleType(param1:int, param2:String) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.develop.action.CastleAction.changeBranchCastleType"; + super.connect(_loc3_,this.changeBranchCastleTypeResult,param1,param2); + } + + private function changeBranchCastleTypeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_changeBranchCastleType); + super.dispatchEvent(_loc3_); + } + + public function getChangeCastleInfo(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleAction.getChangeBranchCastleRemainTime"; + super.connect(_loc2_,this.getChangeCastleInfoResult,param1); + } + + private function getChangeCastleInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getChangeCastleInfo); + _loc3_.castleObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function listAllQueue() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.listAllQueue"; + super.connect(_loc1_,this.listAllQueueResult); + } + + private function listAllQueueResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:AllQueueEvent = new AllQueueEvent(); + _loc3_.allQueueArr = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getChangeExpPoolView() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getChangeExpPoolView"; + super.connect(_loc1_,this.getChangeExpPoolResult); + } + + private function getChangeExpPoolResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:AlartEvent = new AlartEvent(AlartEvent.GET_ALART_INFO); + _loc3_.alartObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function changeExp(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.develop.action.CastleAction.changeExp"; + super.connect(_loc2_,this.changeExpResult,param1); + } + + private function changeExpResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:AlartEvent = new AlartEvent(AlartEvent.GET_ALART_CHANGE); + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + this.getCastleResource(); + } + + public function showBarracks() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.showBarracks"; + super.connect(_loc1_,this.showBarracksResult); + } + + private function showBarracksResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.ShowBarracks); + _loc3_.barrackView = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function recruitNewArmy(param1:String, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.develop.action.CastleAction.recruitArmy"; + super.connect(_loc3_,this.recruitNewArmyResult,param1,param2); + } + + private function recruitNewArmyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.RecruitNewArmy); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + this.calcuDevData(); + } + } + + public function showArmyOperView(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleAction.showArmyOperView"; + super.connect(_loc2_,this.showArmyOperViewResult,param1); + } + + private function showArmyOperViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.Army_ShowArmyOperView); + _loc3_.barrackView = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function dismissCasArmy(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.develop.action.CastleAction.dismissCasArmy"; + super.connect(_loc3_,this.dismissCasArmyResult,param1,param2); + } + + private function dismissCasArmyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.Army_dismissCasArmyResult); + super.dispatchEvent(_loc3_); + } + + public function levelUpArmy(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.develop.action.CastleAction.levelUpArmy"; + super.connect(_loc3_,this.levelUpArmyResult,param1,param2); + } + + private function levelUpArmyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BarrackEvent = new BarrackEvent(BarrackEvent.Army_levelUpArmy); + super.dispatchEvent(_loc3_); + } + + public function showCastleView() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleWallAction.showCastleView"; + super.connect(_loc1_,this.showCastleViewResult); + } + + private function showCastleViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_VIEW); + _loc3_.wallObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function productTowerArmy(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.develop.action.CastleWallAction.productTowerArmy"; + super.connect(_loc3_,this.productTowerArmyResult,param1,param2); + } + + private function productTowerArmyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_PRODUCTARMY); + _loc3_.wallObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + this.getCastleResource(); + } + + public function wallTimeOver() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleWallAction.userWallTimeOver"; + super.connect(_loc1_,this.wallTimeOverResult); + } + + private function wallTimeOverResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_PRODUCTOVER); + _loc3_.wallObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function cancelTowerArmy(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleWallAction.cancelTowerArmy"; + super.connect(_loc2_,this.cancelTowerArmyResult,param1); + } + + private function cancelTowerArmyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_CANCEL); + _loc3_.wallObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function disMissTowerArmy(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.develop.action.CastleWallAction.disMissTowerArmy"; + super.connect(_loc3_,this.disMissTowerArmyResult,param1,param2); + } + + private function disMissTowerArmyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleWallEvent = new CastleWallEvent(CastleWallEvent.WALL_DISMISS); + super.dispatchEvent(_loc3_); + } + + public function getHospital() : void + { + var _loc1_:String = "com.huzi.hero.action.HospitalAction.getHospital"; + super.connect(_loc1_,this.getHospitalResult); + } + + private function getHospitalResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.GET_HOSPITAL_VIEW); + _loc3_.hospitalObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function treatHero(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.hero.action.HospitalAction.treatHero"; + super.connect(_loc2_,this.treatHeroResult,param1); + } + + private function treatHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.TREAT_HERO); + super.dispatchEvent(_loc3_); + } + + public function treatHeroList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.hero.action.HospitalAction.treatHeroList"; + super.connect(_loc1_,this.treatHeroListResult); + } + + private function treatHeroListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.TREAT_HERO_ALL); + super.dispatchEvent(_loc3_); + } + + public function getMedicPointInfo() : void + { + var _loc1_:String = "com.huzi.hero.action.HospitalAction.getMedicPointInfo"; + super.connect(_loc1_,this.getMedicPointInfoResult); + } + + private function getMedicPointInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.TREAT_getMedicPointInfo); + _loc3_.hospitalObject = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function addSelectMedicPoint(param1:Object) : void + { + var _loc2_:String = "com.huzi.hero.action.HospitalAction.addSelectMedicPoint"; + super.connect(_loc2_,this.addSelectMedicPointResult,param1); + } + + private function addSelectMedicPointResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HospitalEvent = new HospitalEvent(HospitalEvent.TREAT_addSelectMedicPoint); + _loc3_.msg = String(_loc2_.msg); + super.dispatchEvent(_loc3_); + this.getUserData(); + } + + public function getAllCastle() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getUserCastle"; + super.connect(_loc1_,this.getAllCastleResult); + } + + private function getAllCastleResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_LIST_ALL); + _loc3_.castleList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getCastleView(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleAction.getCastleView"; + super.connect(_loc2_,this.getCastleViewResult,param1); + } + + private function getCastleViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_VIEW); + _loc3_.castleObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function showOfficeOper4People() : void + { + var _loc1_:String = "com.huzi.strategy.action.StrategyAction.getUserStrategiesByUserId"; + super.connect(_loc1_,this.showOfficeOper4PeopleResult); + } + + private function showOfficeOper4PeopleResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_ALL); + _loc3_.strategyObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function showUseStrategyLimit(param1:int) : void + { + var _loc2_:String = "com.huzi.strategy.action.StrategyAction.showUseStrategyLimit"; + super.connect(_loc2_,this.showUseStrategyLimitResult,param1); + } + + private function showUseStrategyLimitResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_By_Id); + _loc3_.strategyObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function useStrategyById(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.strategy.action.StrategyAction.useStrategy"; + super.connect(_loc3_,this.useStrategyByIdResult,param1,param2,0); + } + + public function useStrategyByIdResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_Up); + _loc3_.strategyObj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + this.calcuDevData(); + } + } + + public function useJunshiStrategy(param1:int, param2:int, param3:int) : void + { + var _loc4_:String = "com.huzi.strategy.action.StrategyAction.useJunshiStrategy"; + super.connect(_loc4_,this.useJunshiStrategyResult,param1,param2,param3); + } + + public function useJunshiStrategyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_UseJunShi); + _loc3_.strategyObj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function speedJunshiStrategy(param1:int) : void + { + var _loc2_:String = "com.huzi.strategy.action.StrategyAction.speedJunshiStrategy"; + super.connect(_loc2_,this.speedJunshiStrategyResult,param1); + } + + public function speedJunshiStrategyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_addSpeedJunShi); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function upTemplateStrategy(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.strategy.action.StrategyAction.upTemplateStrategy"; + super.connect(_loc2_,this.upTemplateStrategyResult,param1); + } + + public function upTemplateStrategyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:StrategyEvent = new StrategyEvent(StrategyEvent.Strategy_Ups); + super.dispatchEvent(_loc3_); + this.getUserData(); + } + + public function moveCastleSe(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.develop.action.CastleAction.moveCastleSe"; + super.connect(_loc3_,this.moveCastleSeResult,param1,param2); + } + + private function moveCastleSeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLEMOVE)); + } + + public function updateUserName(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.changeUserName"; + super.connect(_loc2_,this.updateUserNameResult,param1); + } + + private function updateUserNameResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + this.getUserData(); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.UPDATEUSERNAME)); + } + + public function moveCastle() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.develop.action.CastleAction.moveCastleNol"; + super.connect(_loc1_,this.moveCastleResult); + } + + private function moveCastleResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLEMOVE)); + } + + public function recoveryBattleInfo() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.removeNoBattle"; + super.connect(_loc1_,this.recoveryBattleInfoResult); + } + + private function recoveryBattleInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_recoveryBattleInfo); + _loc3_.castleObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getBuffTipListById() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getBuffTipListById"; + super.connect(_loc1_,this.getBuffTipListByIdResult); + } + + private function getBuffTipListByIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getBuffTipListById); + _loc3_.castleList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getOnlineTimeAward() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.getOnlineTimeAward"; + super.connect(_loc1_,this.getOnlineTimeAwardResult); + } + + private function getOnlineTimeAwardResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getOnlineTimeAward); + _loc3_.castleObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function fetchOnlineTimeAward(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.develop.action.CastleAction.fetchOnlineTimeAward"; + super.connect(_loc2_,this.fetchOnlineTimeAwardResult,param1); + } + + private function fetchOnlineTimeAwardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_fetchOnlineTimeAward); + _loc3_.castleObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + + public function changeCountryView() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.changeCountryView"; + super.connect(_loc1_,this.changeCountryViewResult); + } + + private function changeCountryViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_changeCountryView); + _loc3_.castleObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function changeCountry(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleAction.changeCountry"; + super.connect(_loc2_,this.changeCountryResult,param1); + } + + private function changeCountryResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_changeCountry); + super.dispatchEvent(_loc3_); + } + + public function fullAll(param1:String) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleAction.flushAllp"; + super.connect(_loc2_,this.fullAllResult,param1); + } + + private function fullAllResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function changeCurrCity(param1:int) : void + { + var _loc2_:String = "com.huzi.develop.action.CastleAction.changeCurrCity"; + super.connect(_loc2_,this.changeCurrCityResult,param1); + } + + private function changeCurrCityResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function getSuggestPos() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.develop.action.CastleAction.getSuggestPos"; + super.connect(_loc1_,this.getSuggestPosResult); + } + + private function getSuggestPosResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_getSuggestPos); + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function reBuildCastle(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.develop.action.CastleAction.reBuildCastle"; + super.connect(_loc3_,this.reBuildCastleResult,param1,param2); + } + + private function reBuildCastleResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CastleEvent = new CastleEvent(CastleEvent.CASTLE_reBuildCastle); + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + super.dispatchEvent(_loc3_); + } + + public function testSkill(param1:Array) : void + { + var _loc2_:String = "com.huzi.hero.action.HeroAction.insertNewSkillList"; + super.connect(_loc2_,this.testSkillResult,param1); + } + + private function testSkillResult(param1:Object) : void + { + } + + public function testEquip(param1:Array) : void + { + var _loc2_:String = "com.huzi.item.action.ItemAction.insertNewItems"; + super.connect(_loc2_,this.testEquipResult,param1); + } + + private function testEquipResult(param1:Object) : void + { + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/AlartEvent.as b/flash_decompiled/com/control/castle/event/AlartEvent.as new file mode 100644 index 0000000..834f1ff --- /dev/null +++ b/flash_decompiled/com/control/castle/event/AlartEvent.as @@ -0,0 +1,22 @@ +package com.control.castle.event +{ + import flash.events.Event; + + public class AlartEvent extends Event + { + + public static const GET_ALART_INFO:String = "GET_ALART_INFO"; + + public static const GET_ALART_CHANGE:String = "GET_ALART_CHANGE"; + + public var alartObject:Object; + + public var msg:String; + + public function AlartEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/AllQueueEvent.as b/flash_decompiled/com/control/castle/event/AllQueueEvent.as new file mode 100644 index 0000000..f49f631 --- /dev/null +++ b/flash_decompiled/com/control/castle/event/AllQueueEvent.as @@ -0,0 +1,18 @@ +package com.control.castle.event +{ + import flash.events.Event; + + public class AllQueueEvent extends Event + { + + public static var AllQueue:String = "AllQueue"; + + public var allQueueArr:Array; + + public function AllQueueEvent() + { + super(AllQueue,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/BarrackEvent.as b/flash_decompiled/com/control/castle/event/BarrackEvent.as new file mode 100644 index 0000000..b19b5f6 --- /dev/null +++ b/flash_decompiled/com/control/castle/event/BarrackEvent.as @@ -0,0 +1,30 @@ +package com.control.castle.event +{ + import flash.events.Event; + + public class BarrackEvent extends Event + { + + public static const ShowBarracks:String = "ShowBarracks"; + + public static const RecruitNewArmy:String = "RecruitNewArmy"; + + public static const Army_ShowArmyOperView:String = "Army_ShowArmyOperView"; + + public static const Army_dismissCasArmyResult:String = "Army_dismissCasArmyResult"; + + public static const Army_levelUpArmy:String = "Army_levelUpArmy"; + + public var barrackView:Object; + + public var result:int; + + public var msg:String; + + public function BarrackEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/CastleBuildEvent.as b/flash_decompiled/com/control/castle/event/CastleBuildEvent.as new file mode 100644 index 0000000..ab86731 --- /dev/null +++ b/flash_decompiled/com/control/castle/event/CastleBuildEvent.as @@ -0,0 +1,41 @@ +package com.control.castle.event +{ + import com.data.data.city.CastleBuilding; + import flash.events.Event; + + public class CastleBuildEvent extends Event + { + + public static var BUILD_NEW:String = "BUILD_NEW"; + + public static var BUILD_NEW_OK:String = "BUILD_NEW_OK"; + + public static var BUILD_UP:String = "BUILD_UP"; + + public static var BUILD_DESTROY:String = "BUILD_DESTROY"; + + public static var BUILD_CANCEL:String = "BUILD_CANCEL"; + + public static var BUILD_UP_OK:String = "BUILD_UP_OK"; + + public static var ADD_SPEED_OK:String = "ADD_SPEED"; + + public static var BUILD_COMPELETE:String = "BUILD_COMPELETE"; + + public static var BUILD_LOADALL:String = "BUILD_LOADALL"; + + public var castleBuild:CastleBuilding; + + public var obj:Object; + + public var result:int; + + public var msg:String; + + public function CastleBuildEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/CastleBuildListEvent.as b/flash_decompiled/com/control/castle/event/CastleBuildListEvent.as new file mode 100644 index 0000000..e657764 --- /dev/null +++ b/flash_decompiled/com/control/castle/event/CastleBuildListEvent.as @@ -0,0 +1,25 @@ +package com.control.castle.event +{ + import com.data.data.city.Castle; + import flash.events.Event; + + public class CastleBuildListEvent extends Event + { + + public static const MAIN_CASTLE_BUILDLIST:String = "MAIN_CASTLE_BUILDLIST"; + + public static const CASTLE_BUILDLIST:String = "CASTLE_BUILDLIST"; + + public var buildListArray:Array; + + public var currentCastle:Castle; + + public var casId:int; + + public function CastleBuildListEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/CastleEvent.as b/flash_decompiled/com/control/castle/event/CastleEvent.as new file mode 100644 index 0000000..56ad9da --- /dev/null +++ b/flash_decompiled/com/control/castle/event/CastleEvent.as @@ -0,0 +1,61 @@ +package com.control.castle.event +{ + import com.data.data.city.Castle; + import flash.events.Event; + + public class CastleEvent extends Event + { + + public static const CASTLE_MAIN:String = "CASTLE_MAIN"; + + public static const CASTLE_LIST_ALL:String = "CASTLE_LIST_ALL"; + + public static const CASTLE_VIEW:String = "CASTLE_VIEW"; + + public static const CASTLE_MOVE:String = "CASTLE_MOVE"; + + public static const CASTLE_moveCastleNol:String = "CASTLE_moveCastleNol"; + + public static const CASTLE_recoveryBattleInfo:String = "CASTLE_recoveryBattleInfo"; + + public static const CASTLE_getBuffTipListById:String = "CASTLE_getBuffTipListById"; + + public static const CASTLE_selectCasBui:String = "CASTLE_selectCasBui"; + + public static const CASTLE_getTransInfo:String = "CASTLE_getTransInfo"; + + public static const CASTLE_changeBranchCastleType:String = "CASTLE_changeBranchCastleType"; + + public static const CASTLE_getChangeCastleInfo:String = "CASTLE_getChangeCastleInfo"; + + public static const CASTLE_addSpeedChangeCastle:String = "CASTLE_addSpeedChangeCastle"; + + public static const CASTLE_getOnlineTimeAward:String = "CASTLE_getOnlineTimeAward"; + + public static const CASTLE_fetchOnlineTimeAward:String = "CASTLE_fetchOnlineTimeAward"; + + public static const CASTLE_changeCountryView:String = "CASTLE_changeCountryView"; + + public static const CASTLE_changeCountry:String = "CASTLE_changeCountry"; + + public static const CASTLE_getSuggestPos:String = "CASTLE_getSuggestPos"; + + public static const CASTLE_reBuildCastle:String = "CASTLE_reBuildCastle"; + + public var mainCastle:Castle; + + public var castleObj:Object; + + public var castleList:Array; + + public var msg:String; + + public var result:int; + + public function CastleEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/CastleLevelUpEvent.as b/flash_decompiled/com/control/castle/event/CastleLevelUpEvent.as new file mode 100644 index 0000000..de3d922 --- /dev/null +++ b/flash_decompiled/com/control/castle/event/CastleLevelUpEvent.as @@ -0,0 +1,18 @@ +package com.control.castle.event +{ + import flash.events.Event; + + public class CastleLevelUpEvent extends Event + { + + public static const CASTLE_LEVELUP:String = "CASTLE_LEVELUP"; + + public var cityUrl:String; + + public function CastleLevelUpEvent() + { + super(CASTLE_LEVELUP,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/CastleListEvent.as b/flash_decompiled/com/control/castle/event/CastleListEvent.as new file mode 100644 index 0000000..347bef1 --- /dev/null +++ b/flash_decompiled/com/control/castle/event/CastleListEvent.as @@ -0,0 +1,18 @@ +package com.control.castle.event +{ + import flash.events.Event; + + public class CastleListEvent extends Event + { + + public static const CASTLE_LIST:String = "CASTLE_LIST"; + + public var castleList:Array; + + public function CastleListEvent() + { + super(CASTLE_LIST,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/CastleWallEvent.as b/flash_decompiled/com/control/castle/event/CastleWallEvent.as new file mode 100644 index 0000000..965448d --- /dev/null +++ b/flash_decompiled/com/control/castle/event/CastleWallEvent.as @@ -0,0 +1,31 @@ +package com.control.castle.event +{ + import com.data.data.items.AddSpeed; + import flash.events.Event; + + public class CastleWallEvent extends Event + { + + public static const WALL_VIEW:String = "WALL_VIEW"; + + public static const WALL_PRODUCTARMY:String = "WALL_PRODUCTARMY"; + + public static const WALL_PRODUCTOVER:String = "WALL_PRODUCTOVER"; + + public static const WALL_ADDSPEED:String = "WALL_ADDSPEED"; + + public static const WALL_CANCEL:String = "WALL_CANCEL"; + + public static const WALL_DISMISS:String = "WALL_DISMISS"; + + public var wallObject:Object; + + public var addSpeed:AddSpeed; + + public function CastleWallEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/HospitalEvent.as b/flash_decompiled/com/control/castle/event/HospitalEvent.as new file mode 100644 index 0000000..8ceb0d5 --- /dev/null +++ b/flash_decompiled/com/control/castle/event/HospitalEvent.as @@ -0,0 +1,30 @@ +package com.control.castle.event +{ + import flash.events.Event; + + public class HospitalEvent extends Event + { + + public static const GET_HOSPITAL_VIEW:String = "GET_HOSPITAL_VIEW"; + + public static const TREAT_HERO:String = "TREAT_HERO"; + + public static const TREAT_HERO_ALL:String = "TREAT_HERO_ALL"; + + public static const TREAT_getMedicPointInfo:String = "TREAT_getMedicPointInfo"; + + public static const TREAT_addSelectMedicPoint:String = "TREAT_addSelectMedicPoint"; + + public var hospitalObject:Object; + + public var result:int; + + public var msg:String; + + public function HospitalEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/NewCastleEvent.as b/flash_decompiled/com/control/castle/event/NewCastleEvent.as new file mode 100644 index 0000000..66d1e2f --- /dev/null +++ b/flash_decompiled/com/control/castle/event/NewCastleEvent.as @@ -0,0 +1,20 @@ +package com.control.castle.event +{ + import flash.events.Event; + + public class NewCastleEvent extends Event + { + + public static const GET_NEW_CASTLE:String = "GET_NEW_CASTLE"; + + public static const BUILD_NEW_CASTLE_OK:String = "BUILD_NEW_CASTLE_OK"; + + public var res:String; + + public function NewCastleEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/castle/event/StrategyEvent.as b/flash_decompiled/com/control/castle/event/StrategyEvent.as new file mode 100644 index 0000000..fba2634 --- /dev/null +++ b/flash_decompiled/com/control/castle/event/StrategyEvent.as @@ -0,0 +1,36 @@ +package com.control.castle.event +{ + import flash.events.Event; + + public class StrategyEvent extends Event + { + + public static const Strategy_ALL:String = "Strategy_ALL"; + + public static const Strategy_By_Id:String = "Strategy_By_Id"; + + public static const Strategy_Up:String = "Strategy_Up"; + + public static const Strategy_UseJunShi:String = "Strategy_UseJunShi"; + + public static const Strategy_addSpeedJunShi:String = "Strategy_addSpeedJunShi"; + + public static const Strategy_AddSpeed:String = "Strategy_AddSpeed"; + + public static const Strategy_Ups:String = "Strategy_Ups"; + + public var strategyArr:Array; + + public var strategyObj:Object; + + public var result:int; + + public var msg:String; + + public function StrategyEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/chat/ChatService.as b/flash_decompiled/com/control/chat/ChatService.as new file mode 100644 index 0000000..f603a51 --- /dev/null +++ b/flash_decompiled/com/control/chat/ChatService.as @@ -0,0 +1,93 @@ +package com.control.chat +{ + import com.control.chat.event.ChatMainEvent; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.view.mc.sprite.LoadingMc; + + public class ChatService extends Connect + { + + public function ChatService() + { + super(); + } + + public function userSendMessage(param1:int, param2:String) : void + { + var _loc3_:String = "com.huzi.chat.action.ChatAction.userSendMessage"; + super.connect(_loc3_,this.sendMessageResult,param1,param2); + } + + private function sendMessageResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ChatMainEvent = new ChatMainEvent(ChatMainEvent.Chat_userSendMessage); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function userSendPrivateMessage(param1:String, param2:String) : void + { + var _loc3_:String = "com.huzi.chat.action.ChatAction.userSendPrivateMessage"; + super.connect(_loc3_,this.userSendPrivateMessageResult,param1,param2); + } + + private function userSendPrivateMessageResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ChatMainEvent = new ChatMainEvent(ChatMainEvent.Chat_userSendPrivateMessage); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function userSendTitleMessage(param1:String, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.chat.action.ChatAction.userTitleMessage"; + super.connect(_loc3_,this.userSendTitleMessageResult,param1,param2); + } + + private function userSendTitleMessageResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ChatMainEvent = new ChatMainEvent(ChatMainEvent.Chat_userSendTitleMessage); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function showItem() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.chat.action.ChatAction.viewMyEqu"; + super.connect(_loc1_,this.showItemResult); + } + + private function showItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + } +} + diff --git a/flash_decompiled/com/control/chat/event/ChatMainEvent.as b/flash_decompiled/com/control/chat/event/ChatMainEvent.as new file mode 100644 index 0000000..777435d --- /dev/null +++ b/flash_decompiled/com/control/chat/event/ChatMainEvent.as @@ -0,0 +1,24 @@ +package com.control.chat.event +{ + import flash.events.Event; + + public class ChatMainEvent extends Event + { + + public static const Chat_userSendMessage:String = "Chat_userSendMessage"; + + public static const Chat_userSendPrivateMessage:String = "Chat_userSendPrivateMessage"; + + public static const Chat_userSendTitleMessage:String = "Chat_userSendTitleMessage"; + + public var msg:String; + + public var result:int; + + public function ChatMainEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/combat/CombatService.as b/flash_decompiled/com/control/combat/CombatService.as new file mode 100644 index 0000000..d9522f5 --- /dev/null +++ b/flash_decompiled/com/control/combat/CombatService.as @@ -0,0 +1,56 @@ +package com.control.combat +{ + import com.control.combat.event.CombatEvent; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.view.mc.sprite.LoadingMc; + + public class CombatService extends Connect + { + + public function CombatService() + { + super(); + } + + public function declareWar(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.combat.action.CombatAction.declareWar"; + super.connect(_loc2_,this.declareWarResult,param1); + } + + private function declareWarResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CombatEvent = new CombatEvent(CombatEvent.Combat_declareWar); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function getLeagueDefList(param1:int) : void + { + var _loc2_:String = "com.huzi.combat.action.CombatAction.getLeagueDefList"; + super.connect(_loc2_,this.getLeagueDefListResult,param1); + } + + private function getLeagueDefListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CombatEvent = new CombatEvent(CombatEvent.Combat_getLeagueDefList); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/combat/event/CombatEvent.as b/flash_decompiled/com/control/combat/event/CombatEvent.as new file mode 100644 index 0000000..bb536be --- /dev/null +++ b/flash_decompiled/com/control/combat/event/CombatEvent.as @@ -0,0 +1,24 @@ +package com.control.combat.event +{ + import flash.events.Event; + + public class CombatEvent extends Event + { + + public static const Combat_declareWar:String = "Combat_declareWar"; + + public static const Combat_getLeagueDefList:String = "Combat_getLeagueDefList"; + + public var list:Array; + + public var result:int; + + public var msg:String; + + public function CombatEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/connect/Connect.as b/flash_decompiled/com/control/connect/Connect.as new file mode 100644 index 0000000..2899d1a --- /dev/null +++ b/flash_decompiled/com/control/connect/Connect.as @@ -0,0 +1,190 @@ +package com.control.connect +{ + import com.InstallFace; + import com.comfig.PathConfig; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.ui.message.MessageBoxUI; + import flash.events.AsyncErrorEvent; + import flash.events.Event; + import flash.events.IOErrorEvent; + import flash.events.NetStatusEvent; + import flash.events.SecurityErrorEvent; + import flash.net.*; + import flash.utils.setTimeout; + + public class Connect + { + + registerClassAlias("ReturnBean",ReturnBean); + + private var str:String; + + private var nc:NetConnection; + + public var actUrl:String; + + private var lastMethod:String; + + public function Connect() + { + super(); + this.nc = new NetConnection(); + this.nc.client = this.nc; + this.nc.objectEncoding = ObjectEncoding.AMF0; + this.nc.addEventListener(NetStatusEvent.NET_STATUS,this.onConStatus); + this.nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR,this.onAsyncError); + this.nc.addEventListener(IOErrorEvent.IO_ERROR,this.onIoerror); + this.nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onSecurityError); + this.str = PathConfig.getInstance().getWebPath() + "gateway"; + this.nc.connect(this.str); + } + + public function connect(param1:String, param2:Function, ... rest) : void + { + if(InstallFace.getInstance().isValid) + { + return; + } + if(!InstallFace.getInstance().isConnect) + { + MessageBoxUI.getInstance().reLogin("你已断开连接,请重新登录游戏"); + return; + } + if(param1 == this.lastMethod) + { + switch(rest.length) + { + case 0: + setTimeout(this.connect1,200,param1,param2); + break; + case 1: + setTimeout(this.connect2,200,param1,param2,rest[0]); + break; + case 2: + setTimeout(this.connect3,200,param1,param2,rest[0],rest[1]); + break; + case 3: + setTimeout(this.connect4,200,param1,param2,rest[0],rest[1],rest[2]); + break; + case 4: + setTimeout(this.connect5,200,param1,param2,rest[0],rest[1],rest[2],rest[3]); + } + return; + } + this.lastMethod = param1; + switch(rest.length) + { + case 0: + this.nc.call(param1,new Responder(param2,this.ErrStatus)); + break; + case 1: + this.nc.call(param1,new Responder(param2,this.ErrStatus),rest[0]); + break; + case 2: + this.nc.call(param1,new Responder(param2,this.ErrStatus),rest[0],rest[1]); + break; + case 3: + this.nc.call(param1,new Responder(param2,this.ErrStatus),rest[0],rest[1],rest[2]); + break; + case 4: + this.nc.call(param1,new Responder(param2,this.ErrStatus),rest[0],rest[1],rest[2],rest[3]); + } + setTimeout(this.clearMethod,100); + } + + private function clearMethod() : void + { + this.lastMethod = ""; + } + + private function connect1(param1:String, param2:Function) : void + { + this.connect(param1,param2); + } + + private function connect2(param1:String, param2:Function, param3:*) : void + { + this.connect(param1,param2,param3); + } + + private function connect3(param1:String, param2:Function, param3:*, param4:*) : void + { + this.connect(param1,param2,param3,param4); + } + + private function connect4(param1:String, param2:Function, param3:*, param4:*, param5:*) : void + { + this.connect(param1,param2,param3,param4,param5); + } + + private function connect5(param1:String, param2:Function, param3:*, param4:*, param5:*, param6:*) : void + { + this.connect(param1,param2,param3,param4,param5,param6); + } + + public function checkResult(param1:ReturnBean) : Boolean + { + if(param1.result == ReturnBean.STATUS_2) + { + MessageBoxUI.getInstance().reLogin(); + return true; + } + if(param1.result == ReturnBean.STATUS_1) + { + if(param1.msg == null) + { + param1.msg = "系统错误"; + } + MessageBoxUI.getInstance().addMessage(param1.msg); + return true; + } + if(param1.result == ReturnBean.STATUS_3) + { + if(param1.msg == null) + { + param1.msg = "系统错误"; + } + MessageBoxUI.getInstance().addMessage(param1.msg); + } + return false; + } + + public function ErrStatus(param1:Object) : void + { + MessageBoxUI.getInstance().addMessage("服务器连接出错"); + } + + private function onConStatus(param1:NetStatusEvent) : void + { + if(param1.info.code == "NetConnection.Connect.Success") + { + } + if(param1.info.code == "NetConnection.Call.Failed") + { + MessageBoxUI.getInstance().addMessage("服务器连接失败"); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.UNCONNSERVER)); + } + } + + private function onIoerror(param1:IOErrorEvent) : void + { + } + + private function onSecurityError(param1:SecurityErrorEvent) : void + { + } + + private function onAsyncError(param1:AsyncErrorEvent) : void + { + } + + public function dispatchEvent(param1:Event) : void + { + ConnectService.getInstance().dispatchEvent(param1); + } + } +} + diff --git a/flash_decompiled/com/control/data/ReturnBean.as b/flash_decompiled/com/control/data/ReturnBean.as new file mode 100644 index 0000000..4614534 --- /dev/null +++ b/flash_decompiled/com/control/data/ReturnBean.as @@ -0,0 +1,50 @@ +package com.control.data +{ + public class ReturnBean + { + + public static const STATUS_0:int = 0; + + public static const STATUS_1:int = 1; + + public static const STATUS_2:int = 2; + + public static const STATUS_3:int = 3; + + public static const STATUS_4:int = 4; + + public var result:int; + + public var msg:String; + + public var returnObj1:Object; + + public var returnObj2:Object; + + public var returnObj3:Object; + + public var returnObj4:Object; + + public var returnList1:Array; + + public var returnList2:Array; + + public var returnMap1:Array; + + public var returnMap2:Array; + + public function ReturnBean() + { + super(); + this.returnObj1 = new Object(); + this.returnObj2 = new Object(); + this.returnObj3 = new Object(); + this.returnObj4 = new Object(); + this.returnList1 = new Array(); + this.returnList2 = new Array(); + this.returnMap1 = new Array(); + this.returnMap2 = new Array(); + } + } +} + diff --git a/flash_decompiled/com/control/farm/UserFarmService.as b/flash_decompiled/com/control/farm/UserFarmService.as new file mode 100644 index 0000000..a88825d --- /dev/null +++ b/flash_decompiled/com/control/farm/UserFarmService.as @@ -0,0 +1,346 @@ +package com.control.farm +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.farm.event.FarmSeedEvent; + import com.control.farm.event.UserFarmEvent; + import com.data.data.city.CastlePop; + import com.data.data.farm.UserFarm; + import com.data.data.farm.UserFarmArea; + import com.data.data.farm.UserFarmInfo; + import com.data.data.farm.UserFarmPlant; + import com.data.data.farm.UserFarmTree; + import com.data.data.farm.UserFarmType; + import com.newdata.user.NewUserData; + import com.view.mc.sprite.LoadingMc; + import flash.net.registerClassAlias; + + public class UserFarmService extends Connect + { + + registerClassAlias("UserFarm",UserFarm); + registerClassAlias("UserFarmArea",UserFarmArea); + registerClassAlias("UserFarmPlant",UserFarmPlant); + registerClassAlias("UserFarmTree",UserFarmTree); + registerClassAlias("UserFarmType",UserFarmType); + registerClassAlias("CastlePop",CastlePop); + + public function UserFarmService() + { + super(); + } + + public function getSelfFarmDate() : void + { + var _loc1_:int = NewUserData.getUser().userId; + var _loc2_:String = "com.huzi.play.action.UserFarmAction.getSelfFarmInfo"; + super.connect(_loc2_,this.getSelfFarmDateResult,_loc1_); + } + + private function getSelfFarmDateResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.SELFFARM); + _loc3_.userFarmInfo = new UserFarmInfo(_loc2_.returnMap1); + super.dispatchEvent(_loc3_); + } + + public function enterFarm(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.UserFarmAction.enterFarmExt"; + super.connect(_loc2_,this.enterFarmResault,param1); + } + + private function enterFarmResault(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_enterFarm); + _loc3_.farmData = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getSeedData() : void + { + var _loc1_:String = "com.huzi.play.action.UserFarmAction.getSeedData"; + super.connect(_loc1_,this.getSeedDataResult); + } + + private function getSeedDataResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FarmSeedEvent = new FarmSeedEvent(); + _loc3_.seedArr = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function startPlantOnFarmArea(param1:int, param2:int, param3:int) : void + { + var _loc4_:String = "com.huzi.play.action.UserFarmAction.startPlantOnFarmArea"; + super.connect(_loc4_,this.startPlantOnFarmAreaResault,param1.toString(),param2.toString(),param3); + } + + private function startPlantOnFarmAreaResault(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_startPlant); + _loc3_.farmData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getPop(); + } + + public function harvestPlantOnFarmAreaAll() : void + { + var _loc1_:String = "com.huzi.play.action.UserFarmAction.harvestAllPlantOnFarmArea"; + super.connect(_loc1_,this.harvestPlantOnFarmAreaAllResault); + } + + private function harvestPlantOnFarmAreaAllResault(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_quanzheng); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + ConnectService.getInstance().castleService.calcuDevData(); + } + } + + public function enterOtherFarm(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.UserFarmAction.enterFarm"; + super.connect(_loc2_,this.enterOtherFarmResault,param1); + } + + private function enterOtherFarmResault(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + LoadingMc.getInstance().unShow(); + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_enterOtherFarm); + _loc3_.farmData = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function clearFarmArea(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.play.action.UserFarmAction.clearFarmArea"; + super.connect(_loc3_,this.clearFarmAreaResult,param1.toString(),param2.toString()); + } + + private function clearFarmAreaResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_lidi); + _loc3_.farmData = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.calcuDevData(); + } + + public function harvestPlantOnFarmArea(param1:String, param2:String) : void + { + var _loc3_:String = "com.huzi.play.action.UserFarmAction.harvestPlantOnFarmArea"; + super.connect(_loc3_,this.harvestPlantOnFarmResult,param1,param2); + } + + private function harvestPlantOnFarmResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_zhengshou); + _loc3_.farmData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.posX = int(_loc2_.returnObj2.posX); + _loc3_.posY = int(_loc2_.returnObj2.posY); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.calcuDevData(); + } + + public function harvestCompulsory(param1:String, param2:String) : void + { + var _loc3_:String = "com.huzi.play.action.UserFarmAction.harvestCompulsory"; + super.connect(_loc3_,this.harvestCompulsoryResult,param1,param2); + } + + private function harvestCompulsoryResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_qiangzheng); + _loc3_.farmData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.posX = int(_loc2_.returnObj2.posX); + _loc3_.posY = int(_loc2_.returnObj2.posY); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.calcuDevData(); + } + + public function stealAreaOfOtherFarm(param1:int, param2:int, param3:int) : void + { + var _loc4_:String = "com.huzi.play.action.UserFarmAction.stealAreaOfOtherFarm"; + super.connect(_loc4_,this.stealAreaOfOtherFarmResult,param1,param2,param3); + } + + private function stealAreaOfOtherFarmResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_steal); + _loc3_.farmData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.posX = int(_loc2_.returnObj2.posX); + _loc3_.posY = int(_loc2_.returnObj2.posY); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + ConnectService.getInstance().castleService.getUserData(); + } + + public function harvestPlantOthers(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.UserFarmAction.stealAllAreaOfOtherFarm"; + super.connect(_loc2_,this.harvestPlantOthersResult,param1); + } + + private function harvestPlantOthersResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_stealAll); + _loc3_.list = _loc2_.returnList1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + ConnectService.getInstance().castleService.getCastleResource(); + ConnectService.getInstance().castleService.getUserData(); + } + } + + public function getFriendInfo(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.play.action.UserFarmAction.getFriendInfo"; + super.connect(_loc3_,this.getFriendInfoResult,param1,param2); + } + + private function getFriendInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_getFriendInfo); + _loc3_.farmData = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getFarmMesOfUser() : void + { + var _loc1_:String = "com.huzi.play.action.UserFarmAction.getFarmMesOfUser"; + super.connect(_loc1_,this.getFarmMesOfUserResult); + } + + private function getFarmMesOfUserResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_getMessList); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function harvestUserFarmTree() : void + { + var _loc1_:String = "com.huzi.play.action.UserFarmAction.harvestUserFarmTree"; + super.connect(_loc1_,this.harvestUserFarmTreeResult); + } + + private function harvestUserFarmTreeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_harvestFarmTree); + _loc3_.farmData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function waterFarmTree(param1:int) : * + { + var _loc2_:String = "com.huzi.play.action.UserFarmAction.waterFarmTree"; + super.connect(_loc2_,this.waterFarmTreeResult,param1); + } + + private function waterFarmTreeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserFarmEvent = new UserFarmEvent(UserFarmEvent.FARM_waterFarmTree); + _loc3_.farmData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/farm/event/FarmSeedEvent.as b/flash_decompiled/com/control/farm/event/FarmSeedEvent.as new file mode 100644 index 0000000..12ac3ee --- /dev/null +++ b/flash_decompiled/com/control/farm/event/FarmSeedEvent.as @@ -0,0 +1,18 @@ +package com.control.farm.event +{ + import flash.events.Event; + + public class FarmSeedEvent extends Event + { + + public static var SEED_LIST:String = "SEED_LIST"; + + public var seedArr:Array; + + public function FarmSeedEvent() + { + super(SEED_LIST,true); + } + } +} + diff --git a/flash_decompiled/com/control/farm/event/UserFarmEvent.as b/flash_decompiled/com/control/farm/event/UserFarmEvent.as new file mode 100644 index 0000000..740d361 --- /dev/null +++ b/flash_decompiled/com/control/farm/event/UserFarmEvent.as @@ -0,0 +1,59 @@ +package com.control.farm.event +{ + import com.data.data.farm.UserFarmInfo; + import flash.events.Event; + + public class UserFarmEvent extends Event + { + + public static const SELFFARM:String = "farm_self"; + + public static const PLAYERFARM:String = "farm_player"; + + public static const FARM_enterOtherFarm:String = "FARM_enterOtherFarm"; + + public static const FARM_enterFarm:String = "FARM_enterFarm"; + + public static const FARM_startPlant:String = "FARM_startPlant"; + + public static const FARM_quanzheng:String = "FARM_quanzheng"; + + public static const FARM_lidi:String = "FARM_lidi"; + + public static const FARM_zhengshou:String = "FARM_zhengshou"; + + public static const FARM_qiangzheng:String = "FARM_qiangzheng"; + + public static const FARM_steal:String = "FARM_steal"; + + public static const FARM_stealAll:String = "FARM_stealAll"; + + public static const FARM_getFriendInfo:String = "FARM_getFriendInfo"; + + public static const FARM_getMessList:String = "FARM_getMessList"; + + public static const FARM_harvestFarmTree:String = "FARM_harvestFarmTree"; + + public static const FARM_waterFarmTree:String = "FARM_waterFarmTree"; + + public var userFarmInfo:UserFarmInfo; + + public var farmData:Object; + + public var list:Array; + + public var result:int; + + public var msg:String; + + public var posX:int; + + public var posY:int; + + public function UserFarmEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/fish/Fish/FishsEvent.as b/flash_decompiled/com/control/fish/Fish/FishsEvent.as new file mode 100644 index 0000000..e176405 --- /dev/null +++ b/flash_decompiled/com/control/fish/Fish/FishsEvent.as @@ -0,0 +1,36 @@ +package com.control.fish.Fish +{ + import flash.events.Event; + + public class FishsEvent extends Event + { + + public static var Fish_enterFishing:String = "Fish_enterFishing"; + + public static var Fish_userFishing:String = "Fish_userFishing"; + + public static var Fish_replaceItem:String = "Fish_replaceItem"; + + public static var Fish_userFishingHalf:String = "Fish_userFishingHalf"; + + public static var Fish_userFishing8:String = "Fish_userFishing8"; + + public static var Fish_exchangePoint:String = "Fish_exchangePoint"; + + public var obj:Object; + + public var obj1:Object; + + public var msg:String; + + public var result:int; + + public var list:Array; + + public function FishsEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/fish/FishService.as b/flash_decompiled/com/control/fish/FishService.as new file mode 100644 index 0000000..05266af --- /dev/null +++ b/flash_decompiled/com/control/fish/FishService.as @@ -0,0 +1,260 @@ +package com.control.fish +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.fish.Fish.FishsEvent; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.horse.data.BoxData; + import com.view.ui.pak.data.PakState; + + public class FishService extends Connect + { + + public function FishService() + { + super(); + } + + public function enterFishing() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.FishAction.firstEntryBabel"; + super.connect(_loc1_,this.enterFishingResult); + } + + private function enterFishingResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FishsEvent = new FishsEvent(FishsEvent.Fish_enterFishing); + _loc3_.obj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function userFishing(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.FishAction.startFishing"; + super.connect(_loc3_,this.userFishingResult,param2,param1); + } + + private function userFishingResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FishsEvent = new FishsEvent(FishsEvent.Fish_userFishing); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.list = _loc2_.returnList1; + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + + public function replaceItem() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.FishAction.replaceItem"; + super.connect(_loc1_,this.replaceItemResult); + } + + private function replaceItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FishsEvent = new FishsEvent(FishsEvent.Fish_replaceItem); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.list = _loc2_.returnList1; + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + + public function userFishingHalf() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.FishAction.halfFishing"; + super.connect(_loc1_,this.userFishingHalfResult); + } + + private function userFishingHalfResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FishsEvent = new FishsEvent(FishsEvent.Fish_userFishingHalf); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.list = _loc2_.returnList1; + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + + public function userFishing8() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.FishAction.eightFishing"; + super.connect(_loc1_,this.userFishing8Result); + } + + private function userFishing8Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FishsEvent = new FishsEvent(FishsEvent.Fish_userFishing8); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.list = _loc2_.returnList1; + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + + public function exchangePoint(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.FishAction.exchangeCash"; + super.connect(_loc2_,this.exchangePointResult,param1); + } + + private function exchangePointResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FishsEvent = new FishsEvent(FishsEvent.Fish_exchangePoint); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.obj1 = _loc2_.returnObj2; + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + dispatchEvent(_loc3_); + } + + public function getUserBox(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.FishAction.getUserBoxMap"; + super.connect(_loc2_,this.getUserBoxResult,param1); + } + + private function getUserBoxResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + BoxData.setUserData(_loc2_.returnObj1); + } + + public function startBox(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.FishAction.startBox"; + super.connect(_loc2_,this.startBoxResult,param1); + } + + private function startBoxResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + BoxData.setUserData(_loc2_.returnObj1); + if(BoxData.times > 4) + { + ConnectService.getInstance().castleService.getUserData(); + } + PakState.setGetPackListStatus(); + } + + public function resetBox() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.FishAction.resetBox"; + super.connect(_loc1_,this.resetBoxResult); + } + + private function resetBoxResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + BoxData.setUserData(_loc2_.returnObj1); + var _loc3_:Boolean = Boolean(_loc2_.returnObj2); + if(_loc3_) + { + PakState.setGetPackListStatus(); + } + } + + public function getExcangeMap() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.FishAction.getExcangeMap"; + super.connect(_loc1_,this.getExcangeMapResult); + } + + private function getExcangeMapResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + BoxData.setExchangeList(_loc2_.returnList1); + } + + public function exPoint(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.FishAction.exchangePoint"; + super.connect(_loc2_,this.exPointResult,param1); + } + + private function exPointResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + BoxData.setUserData(_loc2_.returnObj1); + PakState.setGetPackListStatus(); + } + } +} + diff --git a/flash_decompiled/com/control/friend/FriendService.as b/flash_decompiled/com/control/friend/FriendService.as new file mode 100644 index 0000000..34c242d --- /dev/null +++ b/flash_decompiled/com/control/friend/FriendService.as @@ -0,0 +1,317 @@ +package com.control.friend +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.friend.event.FriendEvent; + import com.control.friend.event.RankEvent; + import com.view.mc.sprite.LoadingMc; + + public class FriendService extends Connect + { + + private var failFunc:Function; + + private var srvname:Object = "friendAct."; + + private var getFriendList_srv:Object = "getFriendList"; + + private var deleteUser_srv:Object = "deleteUser"; + + private var addFriend_srv:Object = "addFriend"; + + private var op:Object = ""; + + private var succFunc:Function; + + private var data:Object; + + private var addEnemy_srv:Object = "addEnemy"; + + public function FriendService() + { + super(); + } + + public function sendInvitation(param1:String) : void + { + } + + public function clearMe() : void + { + } + + public function getUser(param1:int, param2:int) : * + { + } + + public function applyJoinGuildName(param1:String) : * + { + } + + private function delFail(param1:*) : * + { + } + + public function getFriendList(param1:int, param2:int = 2) : * + { + var _loc3_:String = "com.huzi.function.action.FriendAction.getFriendList"; + super.connect(_loc3_,this.getFriendListResult,param2,param1); + } + + private function getFriendListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FriendEvent = new FriendEvent(FriendEvent.Friend_getFriendList); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getOnline() : * + { + var _loc1_:String = "com.huzi.function.action.FriendAction.getOnlineUser"; + super.connect(_loc1_,this.getOnlineResult); + } + + private function getOnlineResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function addImpress(param1:int, param2:String) : void + { + } + + private function addFail(param1:*) : * + { + } + + public function refuseFriend(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.FriendAction.refuseFriend"; + super.connect(_loc2_,this.refuseFriendResult,param1); + } + + private function refuseFriendResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FriendEvent = new FriendEvent(FriendEvent.Friend_refuseFriend); + super.dispatchEvent(_loc3_); + } + + private function updSucc(param1:*) : * + { + } + + public function deleteUser(param1:String, param2:int) : * + { + var _loc3_:String = "com.huzi.function.action.FriendAction.deleteUser"; + super.connect(_loc3_,this.deleteUserResult,param1,param2); + } + + private function deleteUserResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FriendEvent = new FriendEvent(FriendEvent.Friend_deleteFriend); + super.dispatchEvent(_loc3_); + } + + public function addFriend(param1:String) : void + { + var _loc2_:String = "com.huzi.function.action.FriendAction.addFriend"; + super.connect(_loc2_,this.addFriendResult,param1); + } + + private function addFriendResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FriendEvent = new FriendEvent(FriendEvent.Friend_addFriend); + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function getRewardList(param1:int) : * + { + } + + public function set onSucc(param1:*) : * + { + } + + public function getFriendListForInfo() : * + { + } + + public function addEnemy(param1:String) : void + { + var _loc2_:String = "com.huzi.function.action.FriendAction.addEnemy"; + super.connect(_loc2_,this.addEnemyResult,param1); + } + + private function addEnemyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FriendEvent = new FriendEvent(FriendEvent.Friend_addEnemy); + super.dispatchEvent(_loc3_); + } + + public function getApplyFriendCount() : void + { + var _loc1_:String = "com.huzi.function.action.FriendAction.getApplyFriendCount"; + super.connect(_loc1_,this.getApplyFriendCountResult); + } + + private function getApplyFriendCountResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FriendEvent = new FriendEvent(FriendEvent.Friend_getApplyFriendCount); + _loc3_.count = _loc2_.returnObj1 as int; + super.dispatchEvent(_loc3_); + } + + public function accFriend(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.FriendAction.accFriend"; + super.connect(_loc2_,this.accFriendResult,param1); + } + + private function accFriendResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FriendEvent = new FriendEvent(FriendEvent.Friend_accFriend); + super.dispatchEvent(_loc3_); + } + + public function getFriendListAll(param1:int = 2) : void + { + var _loc2_:String = "com.huzi.function.action.FriendAction.getAllFriendList"; + super.connect(_loc2_,this.getFriendListAllResult,param1); + } + + private function getFriendListAllResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FriendEvent = new FriendEvent(FriendEvent.Friend_getAllFriend); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getInvalidTime() : void + { + var _loc1_:String = "com.huzi.function.action.RankAction.getNextRefreshDuring"; + super.connect(_loc1_,this.getInvalidTimeResult); + } + + private function getInvalidTimeResult(param1:Object) : void + { + var _loc2_:RankEvent = new RankEvent(RankEvent.Rank_getInvalidTime); + _loc2_.obj = param1; + super.dispatchEvent(_loc2_); + } + + public function myUnionRankAction() : void + { + var _loc1_:String = "com.huzi.function.action.RankAction.getMyGuildRank"; + super.connect(_loc1_,this.myUnionRankActionResult); + } + + private function myUnionRankActionResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RankEvent = new RankEvent(RankEvent.Rank_unionRankAction); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function unionRankAction(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.RankAction.getGuildListFromCache"; + super.connect(_loc2_,this.unionRankActionResult,param1); + } + + private function unionRankActionResult(param1:Object) : void + { + var _loc2_:RankEvent = new RankEvent(RankEvent.Rank_unionRankAction); + _loc2_.obj = param1; + super.dispatchEvent(_loc2_); + } + + public function nameUnionRankAction(param1:String) : void + { + var _loc2_:String = "com.huzi.function.action.RankAction.getGuildLikeNameView"; + super.connect(_loc2_,this.nameUnionRankActionResult,param1); + } + + private function nameUnionRankActionResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RankEvent = new RankEvent(RankEvent.Rank_unionRankAction); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function useDestory(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.function.action.FriendAction.useDestory"; + super.connect(_loc2_,this.useDestoryResult,param1); + } + + private function useDestoryResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FriendEvent = new FriendEvent(FriendEvent.Friend_useDestory); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/friend/event/FriendEvent.as b/flash_decompiled/com/control/friend/event/FriendEvent.as new file mode 100644 index 0000000..fc42865 --- /dev/null +++ b/flash_decompiled/com/control/friend/event/FriendEvent.as @@ -0,0 +1,40 @@ +package com.control.friend.event +{ + import flash.events.Event; + + public class FriendEvent extends Event + { + + public static const Friend_addFriend:String = "Friend_addFriend"; + + public static const Friend_delFriend:String = "Friend_delFriend"; + + public static const Friend_getFriendList:String = "Friend_getFriendList"; + + public static const Friend_getApplyFriendCount:String = "Friend_getApplyFriendCount"; + + public static const Friend_getAllFriend:String = "Friend_getAllFriend"; + + public static const Friend_accFriend:String = "Friend_accFriend"; + + public static const Friend_refuseFriend:String = "Friend_refuseFriend"; + + public static const Friend_deleteFriend:String = "Friend_deleteFriend"; + + public static const Friend_addEnemy:String = "Friend_addEnemy"; + + public static const Friend_useDestory:String = "Friend_useDestory"; + + public var obj:Object; + + public var msg:String; + + public var count:int; + + public function FriendEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/friend/event/RankEvent.as b/flash_decompiled/com/control/friend/event/RankEvent.as new file mode 100644 index 0000000..0cd309b --- /dev/null +++ b/flash_decompiled/com/control/friend/event/RankEvent.as @@ -0,0 +1,26 @@ +package com.control.friend.event +{ + import flash.events.Event; + + public class RankEvent extends Event + { + + public static const Rank_getInvalidTime:String = "Rank_getInvalidTime"; + + public static const Rank_myUnionRankAction:String = "Rank_myUnionRankAction"; + + public static const Rank_unionRankAction:String = "Rank_unionRankAction"; + + public var obj:Object; + + public var msg:String; + + public var count:int; + + public function RankEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/guild/GuildService.as b/flash_decompiled/com/control/guild/GuildService.as new file mode 100644 index 0000000..4b6a2e1 --- /dev/null +++ b/flash_decompiled/com/control/guild/GuildService.as @@ -0,0 +1,1286 @@ +package com.control.guild +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.guild.event.GuildEvent; + import com.control.guild.event.GuildTradeEvent; + import com.control.guild.event.LeagueDefEvent; + import com.data.data.guild.Guild; + import com.data.data.guild.GuildRight; + import com.newdata.user.NewGuild; + import com.newdata.user.NewUserData; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.pak.data.PakState; + import flash.net.registerClassAlias; + + public class GuildService extends Connect + { + + registerClassAlias("GuildRight",GuildRight); + + public function GuildService() + { + super(); + } + + public function getGuild() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getUserGuild"; + super.connect(_loc1_,this.getGuildResult); + } + + private function getGuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewGuild = new NewGuild(_loc2_.returnObj1); + NewUserData.setNewGuild(_loc3_); + } + + public function enterLegationView() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.guildGeneralInfo"; + super.connect(_loc1_,this.enterLegationViewResult); + } + + private function enterLegationViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.LegationView); + _loc3_.legationObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function refuseInvitation(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.refuseInvitation"; + super.connect(_loc2_,this.refuseInvitationResult,param1); + } + + private function refuseInvitationResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Jion_refuse); + dispatchEvent(_loc3_); + } + + public function permitInvitation(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.permitInvitation"; + super.connect(_loc2_,this.permitInvitationResult,param1); + } + + private function permitInvitationResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Jion_permit); + dispatchEvent(_loc3_); + } + + public function getGuildListFromCache(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.getGuildListFromCache"; + super.connect(_loc2_,this.getGuildListFromCacheResult,param1,1); + } + + private function getGuildListFromCacheResult(param1:Object) : void + { + var _loc2_:GuildEvent = new GuildEvent(GuildEvent.Guild_List_Ranking); + _loc2_.rankingArr = param1.rankList; + _loc2_.rankCount = param1.totalNum; + _loc2_.rankPage = param1.startOrder; + dispatchEvent(_loc2_); + } + + public function getGuildLikeNameView(param1:String, param2:int) : void + { + var _loc3_:String = "com.huzi.guild.action.GuildAction.getGuildLikeNameView"; + super.connect(_loc3_,this.getGuildLikeNameViewResult,param1,param2,1); + } + + private function getGuildLikeNameViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_GetByName); + _loc3_.rankingArr = _loc2_.returnObj1.rankList; + dispatchEvent(_loc3_); + } + + public function getGuildById(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.getGuildById"; + super.connect(_loc2_,this.getGuildByIdResult,param1); + } + + private function getGuildByIdResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:GuildEvent = new GuildEvent(GuildEvent.Guild_GetByGuildId); + _loc2_.guild = new Guild(param1.guild); + dispatchEvent(_loc2_); + } + + public function applyJoinGuildById(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.applyJoinGuildByGuildId"; + super.connect(_loc2_,this.applyJoinGuildByIdResult,param1); + } + + private function applyJoinGuildByIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_JoinGuild); + dispatchEvent(_loc3_); + } + + public function applyJoinGuildByName(param1:String) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.applyJoinGuildByGuildName"; + super.connect(_loc2_,this.applyJoinGuildByNameResult,param1); + } + + private function applyJoinGuildByNameResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + if(_loc2_.result == ReturnBean.STATUS_3) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_JoinGuild); + dispatchEvent(_loc3_); + } + + public function deleteApplyById(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.deleteApplyById"; + super.connect(_loc2_,this.deleteApplyByIdResult,param1); + } + + private function deleteApplyByIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Apply_delete); + dispatchEvent(_loc3_); + } + + public function getMembersByGuildId(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.guild.action.GuildAction.getMembersByGuildId"; + super.connect(_loc3_,this.getMembersByGuildIdResult,param1,param2); + } + + private function getMembersByGuildIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_MemList_myGuild); + _loc3_.memList = _loc2_.returnObj1.memberList; + _loc3_.totalNum = _loc2_.returnObj1.totalNum; + _loc3_.startNum = _loc2_.returnObj1.start; + _loc3_.canViewStatus = _loc2_.returnObj1.canViewStatus; + dispatchEvent(_loc3_); + } + + public function getMembersByOthers(param1:int, param2:int, param3:int) : void + { + var _loc4_:String = "com.huzi.guild.action.GuildAction.getMembersByOthers"; + super.connect(_loc4_,this.getMembersByOthersResult,param1,param2,param3); + } + + private function getMembersByOthersResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_GetMemListByGuildId); + _loc3_.memList = _loc2_.returnObj1.memberList; + _loc3_.totalNum = _loc2_.returnObj1.totalNum; + _loc3_.startNum = _loc2_.returnObj1.start; + _loc3_.guildId = _loc2_.returnObj1.guildId; + dispatchEvent(_loc3_); + } + + public function viewMemberInfo(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.viewMemberInfo"; + super.connect(_loc2_,this.viewMemberInfoResult,param1); + } + + private function viewMemberInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_GetMemInfoById); + _loc3_.memberObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function viewGuildInfo() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.viewGuildInfo"; + super.connect(_loc1_,this.viewGuildInfoResult); + } + + private function viewGuildInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_GetGuildInfo); + _loc3_.guildObj = _loc2_.returnObj1; + _loc3_.rankPage = _loc2_.result; + dispatchEvent(_loc3_); + } + + public function getInvitedUsersOfGuild() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getInvitedUsersOfGuild"; + super.connect(_loc1_,this.getInvitedUsersOfGuildResult); + } + + private function getInvitedUsersOfGuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_GetInviteList); + _loc3_.memList = _loc2_.returnObj1.userInfoList; + _loc3_.totalNum = _loc2_.returnObj1.canInviteMember; + dispatchEvent(_loc3_); + } + + public function sendInvitation(param1:String) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.sendInvitation"; + super.connect(_loc2_,this.sendInvitationResult,param1); + } + + private function sendInvitationResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_SendInvitation); + dispatchEvent(_loc3_); + } + + public function deleteInvitationById(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.deleteInvitationById"; + super.connect(_loc2_,this.deleteInvitationByIdResult,param1); + } + + private function deleteInvitationByIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Invitation_Delete); + dispatchEvent(_loc3_); + } + + public function getApplyUsersOfGuild() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getApplyUsersOfGuild"; + super.connect(_loc1_,this.getApplyUsersOfGuildResult); + } + + private function getApplyUsersOfGuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_GetInviteList); + _loc3_.memList = _loc2_.returnObj1.userInfoList; + dispatchEvent(_loc3_); + } + + public function permitApply(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.permitApply"; + super.connect(_loc2_,this.permitApplyResult,param1); + } + + private function permitApplyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Apply_Permit); + dispatchEvent(_loc3_); + } + + public function refuseApply(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.refuseApply"; + super.connect(_loc2_,this.refuseApplyResult,param1); + } + + private function refuseApplyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Apply_Refuse); + dispatchEvent(_loc3_); + } + + public function getGuildEventList() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getGuildEventList"; + super.connect(_loc1_,this.getGuildEventListResult); + } + + private function getGuildEventListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Event_List); + _loc3_.eventList = _loc2_.returnList1; + dispatchEvent(_loc3_); + } + + public function changeGuildDesc(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.changeGuildDesc"; + super.connect(_loc2_,this.changeGuildDescResult,param1); + } + + private function changeGuildDescResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Desc_Update); + _loc3_.str = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function changeGuildNotice(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.changeGuildNotice"; + super.connect(_loc2_,this.changeGuildNoticeResult,param1); + } + + private function changeGuildNoticeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Notice_Update); + _loc3_.str = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function changeQQGroup(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.changeQQGroup"; + super.connect(_loc2_,this.changeQQGroupResult,param1); + } + + private function changeQQGroupResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_ChangeQQGroup); + _loc3_.str = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function getUpgradeView() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.guild.action.GuildAction.getUpgradeView"; + super.connect(_loc1_,this.getUpgradeViewResult); + } + + private function getUpgradeViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Upgrade_View); + _loc3_.guildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function upgradeGuild(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.guild.action.GuildAction.upgradeGuild"; + super.connect(_loc3_,this.upgradeGuildResult,param1,param2); + } + + private function upgradeGuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Upgrade_Result); + dispatchEvent(_loc3_); + } + + public function getGuildOfferView() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getGuildOfferView"; + super.connect(_loc1_,this.getGuildOfferViewResult); + } + + private function getGuildOfferViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Offer_View); + _loc3_.guildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function offerResAndItem(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.offerResAndItem"; + super.connect(_loc2_,this.offerResAndItemResult,param1); + } + + private function offerResAndItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Offer_donate); + dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + + public function getTodayDonateRankList(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.guild.action.GuildAction.getTodayDonateRankList"; + super.connect(_loc3_,this.getTodayDonateRankListResult,param1,param2); + } + + private function getTodayDonateRankListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Offer_List_Today); + _loc3_.guildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function getDonateRankList(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.guild.action.GuildAction.getDonateRankList"; + super.connect(_loc3_,this.getDonateRankListResult,param1,param2); + } + + private function getDonateRankListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Offer_List_All); + _loc3_.guildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function getGuildEffect(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.getGuildEffect"; + super.connect(_loc2_,this.getGuildEffectResult,param1); + } + + private function getGuildEffectResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Effect_View); + _loc3_.guildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function giveGuildItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.giveGuildItem"; + super.connect(_loc2_,this.giveGuildItemResult,param1); + } + + private function giveGuildItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Effect_GetItem); + dispatchEvent(_loc3_); + } + + public function giveGuildAward() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.guild.action.GuildAction.giveGuildAward"; + super.connect(_loc1_,this.giveGuildAwardResult); + } + + private function giveGuildAwardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Effect_Give); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + ConnectService.getInstance().castleService.getCastleResource(); + } + } + + public function getGuildBuiInfo() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getGuildBuiInfo"; + super.connect(_loc1_,this.getGuildBuiInfoResult); + } + + private function getGuildBuiInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Build_View); + _loc3_.buildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function getGuildBox() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getGuildBox"; + super.connect(_loc1_,this.getGuildBoxResult); + } + + private function getGuildBoxResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Build_BoxView); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.buildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function openBox() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.guild.action.GuildAction.openBox"; + super.connect(_loc1_,this.openBoxResult); + } + + private function openBoxResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Build_BoxPlay); + _loc3_.buildObj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + ConnectService.getInstance().castleService.calcuDevData(); + } + } + + public function onekeyOpenBox() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.guild.action.GuildAction.onekeyOpenBox"; + super.connect(_loc1_,this.onekeyOpenBoxResult); + } + + private function onekeyOpenBoxResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Build_BoxPlay_oneKey); + dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + ConnectService.getInstance().castleService.calcuDevData(); + } + } + + public function getGuildTechInfo() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getGuildTechInfo"; + super.connect(_loc1_,this.getGuildTechInfoResult); + } + + private function getGuildTechInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Tech_View); + _loc3_.buildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function upgradeGuildTech(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.upgradeGuildTech"; + super.connect(_loc2_,this.upgradeGuildTechResult,param1); + } + + private function upgradeGuildTechResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Tech_Upgrade); + dispatchEvent(_loc3_); + } + + public function upgradeGuildBui(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.upgradeGuildBui"; + super.connect(_loc2_,this.upgradeGuildBuiResult,param1); + } + + private function upgradeGuildBuiResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_Bui_Upgrade); + dispatchEvent(_loc3_); + } + + public function fireMember(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.fireMember"; + super.connect(_loc2_,this.fireMemberResult,param1); + } + + private function fireMemberResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_fireMember); + dispatchEvent(_loc3_); + } + + public function changeDuty(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.guild.action.GuildAction.changeDuty"; + super.connect(_loc3_,this.changeDutyResult,param1,param2); + } + + private function changeDutyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_changeDuty); + dispatchEvent(_loc3_); + } + + public function dismissGuild() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.dismissGuild"; + super.connect(_loc1_,this.dismissGuildResult); + } + + private function dismissGuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_dismiss); + dispatchEvent(_loc3_); + } + + public function resumeGuild() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.guild.action.GuildAction.resumeGuild"; + super.connect(_loc1_,this.resumeGuildResult); + } + + private function resumeGuildResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_cancelDismiss); + dispatchEvent(_loc3_); + } + + public function changeLeaderByName(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.changeLeaderByUserName"; + super.connect(_loc2_,this.changeLeaderResult,param1); + } + + private function changeLeaderResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_changeLeader); + dispatchEvent(_loc3_); + } + + public function cancelChangeLeader() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.guild.action.GuildAction.cancelChangeLeader"; + super.connect(_loc1_,this.cancelChangeLeaderResult); + } + + private function cancelChangeLeaderResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_cancelChangeLeader); + dispatchEvent(_loc3_); + } + + public function showDefView() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.LeagueDefAction.showDefView"; + super.connect(_loc1_,this.showDefViewResult); + } + + private function showDefViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueDefEvent = new LeagueDefEvent(LeagueDefEvent.LeagueDef_showDefView); + _loc3_.obj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function gainAward() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.LeagueDefAction.gainAward"; + super.connect(_loc1_,this.gainAwardResult); + } + + private function gainAwardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueDefEvent = new LeagueDefEvent(LeagueDefEvent.LeagueDef_gainAward); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function showLeagueDefCastleArmy(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.LeagueDefAction.showLeagueDefCastleArmy"; + super.connect(_loc2_,this.showLeagueDefCastleArmyResult,param1); + } + + private function showLeagueDefCastleArmyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueDefEvent = new LeagueDefEvent(LeagueDefEvent.LeagueDef_showLeagueDefCastleArmy); + _loc3_.listData = _loc2_.returnList1; + dispatchEvent(_loc3_); + } + + public function showLeagueDefCastle() : void + { + var _loc1_:String = "com.huzi.play.action.LeagueDefAction.showLeagueMemberCastle"; + super.connect(_loc1_,this.showLeagueDefCastleResult); + } + + private function showLeagueDefCastleResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueDefEvent = new LeagueDefEvent(LeagueDefEvent.LeagueDef_showLeagueDefCastle); + _loc3_.listData = _loc2_.returnList1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function selectDefCastle(param1:int, param2:Array) : void + { + var _loc3_:String = "com.huzi.play.action.LeagueDefAction.selectDefCastle"; + super.connect(_loc3_,this.selectDefCastleResult,param1,param2); + } + + private function selectDefCastleResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueDefEvent = new LeagueDefEvent(LeagueDefEvent.LeagueDef_selectDefCastle); + dispatchEvent(_loc3_); + } + + public function startAction() : void + { + var _loc1_:String = "com.huzi.play.action.LeagueDefAction.startAction"; + super.connect(_loc1_,this.startActionResult); + } + + private function startActionResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueDefEvent = new LeagueDefEvent(LeagueDefEvent.LeagueDef_startAction); + dispatchEvent(_loc3_); + } + + public function getTradeData() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildTradeAction.getTradeView"; + super.connect(_loc1_,this.getTradeDataResult); + } + + private function getTradeDataResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildTradeEvent = new GuildTradeEvent(GuildTradeEvent.Trade_getTradeData); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function getTradeSettingData() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.guild.action.GuildTradeAction.getAllCanSelectCas"; + super.connect(_loc1_,this.getTradeSettingDataResult); + } + + private function getTradeSettingDataResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildTradeEvent = new GuildTradeEvent(GuildTradeEvent.Trade_getTradeSettingData); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function sendTradeSave(param1:Array) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildTradeAction.saveGuildTradeScope"; + super.connect(_loc2_,this.sendTradeSaveResult,param1); + } + + private function sendTradeSaveResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildTradeEvent = new GuildTradeEvent(GuildTradeEvent.Trade_sendTradeSave); + _loc3_.obj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function sendTradeStart() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildTradeAction.startTrade"; + super.connect(_loc1_,this.sendTradeStartResult); + } + + private function sendTradeStartResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildTradeEvent = new GuildTradeEvent(GuildTradeEvent.Trade_sendTradeStart); + _loc3_.obj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function getBuildArmy(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.getBuiYingDiView"; + super.connect(_loc2_,this.getBuildArmyResult,param1); + } + + private function getBuildArmyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_getBuildArmy); + _loc3_.buildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function trainArmy(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.guild.action.GuildAction.trainLowerArmy"; + super.connect(_loc4_,this.trainArmyResult,param1,param2,param3); + } + + private function trainArmyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_trainArmy); + dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + + public function initUnionWar() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getGuildWarHishtory"; + super.connect(_loc1_,this.initUnionWarResult); + } + + private function initUnionWarResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_initUnionWar); + _loc3_.guildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function startWarToGuild(param1:String) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.startWarToGuild"; + super.connect(_loc2_,this.startWarToGuildResult,param1); + } + + private function startWarToGuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_startWarToGuild); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function createGuild(param1:String, param2:String) : * + { + var _loc3_:String = "com.huzi.guild.action.GuildAction.createGuild"; + super.connect(_loc3_,this.createGuildResult,param1,param2); + } + + private function createGuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_createGuild); + dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.calcuDevData(); + } + + public function getCombineView() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.getCombineView"; + super.connect(_loc1_,this.getCombineViewResult); + } + + private function getCombineViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_getCombineView); + _loc3_.guildObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function cancelCombine(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.cancelCombine"; + super.connect(_loc2_,this.cancelCombineResult,param1); + } + + private function cancelCombineResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_cancelCombine); + dispatchEvent(_loc3_); + } + + public function inviteCombineByName(param1:String) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.inviteCombine"; + super.connect(_loc2_,this.inviteCombineResult,param1); + } + + private function inviteCombineResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_inviteCombine); + dispatchEvent(_loc3_); + } + + public function refuseCombine(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildAction.refuseCombine"; + super.connect(_loc2_,this.refuseCombineResult,param1); + } + + private function refuseCombineResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_refuseCombine); + dispatchEvent(_loc3_); + } + + public function acceptCombine(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildAction.acceptCombine"; + super.connect(_loc2_,this.acceptCombineResult,param1); + } + + private function acceptCombineResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_acceptCombine); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function quitGuild() : void + { + var _loc1_:String = "com.huzi.guild.action.GuildAction.quitGuild"; + super.connect(_loc1_,this.quitGuildResult); + } + + private function quitGuildResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildEvent = new GuildEvent(GuildEvent.Guild_quitGuild); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/guild/GuildTransService.as b/flash_decompiled/com/control/guild/GuildTransService.as new file mode 100644 index 0000000..21b6325 --- /dev/null +++ b/flash_decompiled/com/control/guild/GuildTransService.as @@ -0,0 +1,175 @@ +package com.control.guild +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.guild.event.GuildTransEvent; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.pak.data.PakState; + + public class GuildTransService extends Connect + { + + public function GuildTransService() + { + super(); + } + + public function getPaginationGuildTrans(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildTransAction.getPaginationGuildTrans"; + super.connect(_loc2_,this.getPaginationGuildTransResult,param1); + } + + private function getPaginationGuildTransResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildTransEvent = new GuildTransEvent(GuildTransEvent.Trans_Items_list); + _loc3_.itemObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function getTreasuryCanTransByUserId(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildTransAction.getUserTrans"; + super.connect(_loc2_,this.getTreasuryCanTransByUserIdResult,param1); + } + + private function getTreasuryCanTransByUserIdResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildTransEvent = new GuildTransEvent(GuildTransEvent.Trans_Items_mylist); + _loc3_.itemObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function buyItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.guild.action.GuildTransAction.buyItem"; + super.connect(_loc2_,this.buyItemResult,param1); + } + + private function buyItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:GuildTransEvent = new GuildTransEvent(GuildTransEvent.Trans_buyItem); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function cacelTrade(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.guild.action.GuildTransAction.cacelTrade"; + super.connect(_loc3_,this.cacelTradeResult,param1,param2); + } + + private function cacelTradeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:GuildTransEvent = new GuildTransEvent(GuildTransEvent.Trans_Items_cacelTrade); + _loc3_.itemObj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function tradeItem(param1:int, param2:int, param3:int, param4:int) : void + { + LoadingMc.getInstance().show(); + var _loc5_:String = "com.huzi.guild.action.GuildTransAction.tradeItem"; + super.connect(_loc5_,this.tradeItemResult,param1,param2,param3,param4); + } + + private function tradeItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:GuildTransEvent = new GuildTransEvent(GuildTransEvent.Trans_Items_Trade); + _loc3_.itemObj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + } + + public function getEvalutions(param1:int) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildTransAction.getEvalutions"; + super.connect(_loc2_,this.getEvalutionsResult,param1); + } + + private function getEvalutionsResult(param1:Object) : void + { + var _loc2_:GuildTransEvent = new GuildTransEvent(GuildTransEvent.Trans_getEvalutions); + _loc2_.itemObj = param1; + dispatchEvent(_loc2_); + } + + public function addImpress(param1:int, param2:String) : void + { + var _loc3_:String = "com.huzi.guild.action.GuildTransAction.createEvalution"; + super.connect(_loc3_,this.addImpressResult,param1,param2); + } + + private function addImpressResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildTransEvent = new GuildTransEvent(GuildTransEvent.Trans_addImpress); + _loc3_.itemObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function removeImpress(param1:Array) : void + { + var _loc2_:String = "com.huzi.guild.action.GuildTransAction.deleteEvalution"; + super.connect(_loc2_,this.removeImpressResult,param1); + } + + private function removeImpressResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:GuildTransEvent = new GuildTransEvent(GuildTransEvent.Trans_removeImpress); + _loc3_.itemObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/guild/event/GuildEvent.as b/flash_decompiled/com/control/guild/event/GuildEvent.as new file mode 100644 index 0000000..223afb1 --- /dev/null +++ b/flash_decompiled/com/control/guild/event/GuildEvent.as @@ -0,0 +1,159 @@ +package com.control.guild.event +{ + import com.data.data.guild.Guild; + import flash.events.Event; + + public class GuildEvent extends Event + { + + public static const Guild_getGuild:String = "Guild_getGuild"; + + public static const LegationView:String = "LegationView"; + + public static const Guild_Jion_refuse:String = "Guild_Jion_refuse"; + + public static const Guild_Jion_permit:String = "Guild_Jion_permit"; + + public static const Guild_List_Ranking:String = "Guild_List_Ranking"; + + public static const Guild_GetByName:String = "Guild_GetByName"; + + public static const Guild_GetByGuildId:String = "Guild_GetByGuildId"; + + public static const Guild_JoinGuild:String = "Guild_JoinGuild"; + + public static const Guild_Apply_delete:String = "Guild_Apply_delete"; + + public static const Guild_GetMemListByGuildId:String = "Guild_GetMemListByGuildId"; + + public static const Guild_GetMemInfoById:String = "Guild_GetMemInfoById"; + + public static const Guild_GetGuildInfo:String = "Guild_GetGuildInfo"; + + public static const Guild_GetInviteList:String = "Guild_GetInviteList"; + + public static const Guild_SendInvitation:String = "Guild_SendInvitation"; + + public static const Guild_Apply_Refuse:String = "Guild_Apply_Refuse"; + + public static const Guild_Apply_Permit:String = "Guild_Apply_Permit"; + + public static const Guild_Invitation_Delete:String = "Guild_Invitation_Delete"; + + public static const Guild_Event_List:String = "Guild_Event_List"; + + public static const Guild_Desc_Update:String = "Guild_Desc_Update"; + + public static const Guild_Notice_Update:String = "Guild_Notice_Update"; + + public static const Guild_MemList_myGuild:String = "Guild_MemList_myGuild"; + + public static const Guild_ChangeQQGroup:String = "Guild_ChangeQQGroup"; + + public static const Guild_Upgrade_View:String = "Guild_Upgrade_View"; + + public static const Guild_Upgrade_Result:String = "Guild_Upgrade_Result"; + + public static const Guild_Offer_View:String = "Guild_Offer_View"; + + public static const Guild_Offer_donate:String = "Guild_Offer_donate"; + + public static const Guild_Offer_List_Today:String = "Guild_Offer_List_Today"; + + public static const Guild_Offer_List_All:String = "Guild_Offer_List_All"; + + public static const Guild_Effect_View:String = "Guild_Effect_View"; + + public static const Guild_Effect_Give:String = "Guild_Effect_Give"; + + public static const Guild_Effect_GetItem:String = "Guild_Effect_GetItem"; + + public static const Guild_Build_View:String = "Guild_Build_View"; + + public static const Guild_Build_BoxView:String = "Guild_Build_BoxView"; + + public static const Guild_Build_BoxPlay:String = "Guild_Build_BoxPlay"; + + public static const Guild_Build_BoxPlay_oneKey:String = "Guild_Build_BoxPlay_oneKey"; + + public static const Guild_Tech_View:String = "Guild_Tech_View"; + + public static const Guild_Tech_Upgrade:String = "Guild_Tech_Upgrade"; + + public static const Guild_Bui_Upgrade:String = "Guild_Bui_Upgrade"; + + public static const Guild_fireMember:String = "Guild_fireMember"; + + public static const Guild_changeDuty:String = "Guild_changeDuty"; + + public static const Guild_dismiss:String = "Guild_dismiss"; + + public static const Guild_cancelDismiss:String = "Guild_cancelDismiss"; + + public static const Guild_changeLeader:String = "Guild_changeLeader"; + + public static const Guild_cancelChangeLeader:String = "Guild_cancelChangeLeader"; + + public static const Guild_getBuildArmy:String = "Guild_getBuildArmy"; + + public static const Guild_trainArmy:String = "Guild_trainArmy"; + + public static const Guild_startWarToGuild:String = "Guild_startWarToGuild"; + + public static const Guild_initUnionWar:String = "Guild_initUnionWar"; + + public static const Guild_createGuild:String = "Guild_createGuild"; + + public static const Guild_getCombineView:String = "Guild_getCombineView"; + + public static const Guild_cancelCombine:String = "Guild_cancelCombine"; + + public static const Guild_inviteCombine:String = "Guild_inviteCombine"; + + public static const Guild_refuseCombine:String = "Guild_refuseCombine"; + + public static const Guild_acceptCombine:String = "Guild_acceptCombine"; + + public static const Guild_quitGuild:String = "Guild_quitGuild"; + + public var legationObj:Object; + + public var rankingArr:Array; + + public var rankCount:int; + + public var rankPage:int; + + public var guild:Guild; + + public var memList:Array; + + public var totalNum:int; + + public var guildId:int; + + public var startNum:int; + + public var memberObj:Object; + + public var guildObj:Object; + + public var eventList:Array; + + public var str:String; + + public var canViewStatus:int; + + public var buildObj:Object; + + public var result:int; + + public var msg:String; + + public function GuildEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/guild/event/GuildTradeEvent.as b/flash_decompiled/com/control/guild/event/GuildTradeEvent.as new file mode 100644 index 0000000..c5c6498 --- /dev/null +++ b/flash_decompiled/com/control/guild/event/GuildTradeEvent.as @@ -0,0 +1,30 @@ +package com.control.guild.event +{ + import flash.events.Event; + + public class GuildTradeEvent extends Event + { + + public static const Trade_getTradeData:String = "Trade_getTradeData"; + + public static const Trade_getTradeSettingData:String = "Trade_getTradeSettingData"; + + public static const Trade_sendTradeSave:String = "Trade_sendTradeSave"; + + public static const Trade_sendTradeStart:String = "Trade_sendTradeStart"; + + public var obj:Object; + + public var list:Array; + + public var result:int; + + public var msg:String; + + public function GuildTradeEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/guild/event/GuildTransEvent.as b/flash_decompiled/com/control/guild/event/GuildTransEvent.as new file mode 100644 index 0000000..a9f8296 --- /dev/null +++ b/flash_decompiled/com/control/guild/event/GuildTransEvent.as @@ -0,0 +1,40 @@ +package com.control.guild.event +{ + import flash.events.Event; + + public class GuildTransEvent extends Event + { + + public static const Trans_Items_list:String = "Trans_Items_list"; + + public static const Trans_Items_mylist:String = "Trans_Items_mylist"; + + public static const Trans_Items_buy:String = "Trans_Items_buy"; + + public static const Trans_Items_cacelTrade:String = "Trans_Items_cacelTrade"; + + public static const Trans_Items_Trade:String = "Trans_Items_Trade"; + + public static const Trans_getEvalutions:String = "Trans_getEvalutions"; + + public static const Trans_addImpress:String = "Trans_addImpress"; + + public static const Trans_removeImpress:String = "Trans_removeImpress"; + + public static const Trans_buyItem:String = "Trans_buyItem"; + + public var result:int; + + public var msg:String; + + public var itemObj:Object; + + public var itemList:Array; + + public function GuildTransEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/guild/event/LeagueDefEvent.as b/flash_decompiled/com/control/guild/event/LeagueDefEvent.as new file mode 100644 index 0000000..996ea8f --- /dev/null +++ b/flash_decompiled/com/control/guild/event/LeagueDefEvent.as @@ -0,0 +1,34 @@ +package com.control.guild.event +{ + import flash.events.Event; + + public class LeagueDefEvent extends Event + { + + public static const LeagueDef_showDefView:String = "LeagueDef_showDefView"; + + public static const LeagueDef_gainAward:String = "LeagueDef_gainAward"; + + public static const LeagueDef_showLeagueDefCastle:String = "LeagueDef_showLeagueDefCastle"; + + public static const LeagueDef_selectDefCastle:String = "LeagueDef_selectDefCastle"; + + public static const LeagueDef_startAction:String = "LeagueDef_startAction"; + + public static const LeagueDef_showLeagueDefCastleArmy:String = "LeagueDef_showLeagueDefCastleArmy"; + + public var obj:Object; + + public var listData:Array; + + public var result:int; + + public var msg:String; + + public function LeagueDefEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/help/HelpService.as b/flash_decompiled/com/control/help/HelpService.as new file mode 100644 index 0000000..efc23b8 --- /dev/null +++ b/flash_decompiled/com/control/help/HelpService.as @@ -0,0 +1,82 @@ +package com.control.help +{ + import com.control.connect.Connect; + import com.control.help.event.HelpEvent; + import com.data.MemeberShip; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.help.data.HelpData; + + public class HelpService extends Connect + { + + public function HelpService() + { + super(); + } + + public function getBabelPower(param1:int = 1) : void + { + var _loc2_:String = null; + LoadingMc.getInstance().show(); + if(param1 == 5 || param1 == 6) + { + _loc2_ = "com.huzi.play.action.UserHellAction.getBabelPower"; + } + else + { + _loc2_ = "com.huzi.play.action.BabelAction.getBabelPower"; + } + super.connect(_loc2_,this.getBabelPowerResult); + } + + private function getBabelPowerResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + HelpData.setStagePower(param1.babelPower); + var _loc2_:HelpEvent = new HelpEvent(HelpEvent.BABEL_POWER); + super.dispatchEvent(_loc2_); + } + + public function getRichesPower() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.RichesAction.getBabelPower"; + super.connect(_loc1_,this.getRichesPowerResult); + } + + private function getRichesPowerResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + HelpData.setRichesPower(param1.babelPower); + var _loc2_:HelpEvent = new HelpEvent(HelpEvent.RICHES_POWER); + super.dispatchEvent(_loc2_); + } + + public function getDropPack() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.RichesAction.getBabelDrop"; + super.connect(_loc1_,this.getDropPackResult); + } + + private function getDropPackResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + HelpData.setBabelDrop(param1.dropPack); + var _loc2_:HelpEvent = new HelpEvent(HelpEvent.BABEL_DROP); + super.dispatchEvent(_loc2_); + } + + public function getChaofuMap() : void + { + var _loc1_:int = MemeberShip.getMainCastle().casId; + var _loc2_:String = "com.huzi.play.action.CountryGovAction.govSet"; + super.connect(_loc2_,this.getChaofuMapResult,"1",15); + } + + private function getChaofuMapResult(param1:Object) : void + { + } + } +} + diff --git a/flash_decompiled/com/control/help/event/HelpEvent.as b/flash_decompiled/com/control/help/event/HelpEvent.as new file mode 100644 index 0000000..0ac3ead --- /dev/null +++ b/flash_decompiled/com/control/help/event/HelpEvent.as @@ -0,0 +1,22 @@ +package com.control.help.event +{ + import flash.events.Event; + + public class HelpEvent extends Event + { + + public static const BABEL_POWER:String = "BABEL_POWER"; + + public static const RICHES_POWER:String = "RICHES_POWER"; + + public static const BABEL_DROP:String = "BABEL_DROP"; + + public var obj:Object; + + public function HelpEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/hero/HeroService.as b/flash_decompiled/com/control/hero/HeroService.as new file mode 100644 index 0000000..f485f2a --- /dev/null +++ b/flash_decompiled/com/control/hero/HeroService.as @@ -0,0 +1,1905 @@ +package com.control.hero +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.hero.event.HeroEvent; + import com.control.hero.event.HeroHotelEvent; + import com.control.hero.event.HeroUpEvent; + import com.data.data.govpotz.GovPotz; + import com.data.data.hero.Career; + import com.data.data.hero.Hero; + import com.data.data.hero.HeroHotel; + import com.data.data.hero.Skill; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.biwu.data.HeroTianfuData; + import com.view.ui.hero.data.ChaoFuData; + import com.view.ui.hero.data.HeroSkill; + import com.view.ui.hero.data.HeroSkillData; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PakState; + import flash.net.registerClassAlias; + import flash.utils.setInterval; + + public class HeroService extends Connect + { + + registerClassAlias("HeroHotel",HeroHotel); + registerClassAlias("Hero",Hero); + registerClassAlias("Career",Career); + registerClassAlias("Skill",Skill); + registerClassAlias("GovPotz",GovPotz); + + public function HeroService() + { + super(); + setInterval(this.getHeroListByCasId,300000); + } + + public function getHeroListByCasId() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.getAllHero"; + super.connect(_loc1_,this.getHeroListByCasIdResult); + } + + private function getHeroListByCasIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + NewHeroData.setAllHeroList(_loc3_); + } + + public function getHotelHero() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.freshHotelHeroList"; + super.connect(_loc1_,this.getHotelHeroResult); + } + + private function getHotelHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroHotel = _loc2_.returnObj1 as HeroHotel; + var _loc4_:HeroHotelEvent = new HeroHotelEvent(HeroHotelEvent.getHotelHeroList); + _loc4_.heroHotel = _loc3_; + super.dispatchEvent(_loc4_); + PakState.setGetPackListStatus(); + } + + public function hireHero(param1:int) : void + { + var _loc2_:String = "com.huzi.hero.action.HeroAction.hireHero"; + super.connect(_loc2_,this.hireHeroResult,param1); + } + + private function hireHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + this.getHotelHero(); + NewHeroData.setGetHeroListStatus(); + } + + public function fireHero(param1:int) : void + { + var _loc2_:String = "com.huzi.hero.action.HeroAction.fireHero"; + super.connect(_loc2_,this.fireHeroResult,param1); + } + + private function fireHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:int = int(_loc2_.returnObj1.heroId); + NewHeroData.delHeroById(_loc3_); + } + + public function setEqu(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.setEqu"; + super.connect(_loc3_,this.setEquResult,param1,param2); + } + + private function setEquResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus1(); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_EQU_SET); + super.dispatchEvent(_loc4_); + } + + public function removeEqu(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.removeEqu"; + super.connect(_loc3_,this.removeEquResult,param1,param2); + } + + private function removeEquResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus1(); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_EQU_REMOVE); + super.dispatchEvent(_loc4_); + } + + public function getHeroEquipList(param1:int) : void + { + var _loc2_:String = "com.huzi.hero.action.HeroAction.getHeroEquipList"; + super.connect(_loc2_,this.getHeroEquipListResult,param1); + } + + private function getHeroEquipListResult(param1:Object) : void + { + var _loc2_:HeroEvent = new HeroEvent(HeroEvent.HERO_EQU_HASSET); + _loc2_.equList = param1 as Array; + dispatchEvent(_loc2_); + } + + public function getHeroStrongerView() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.getHeroStrongerView"; + super.connect(_loc1_,this.getHeroStrongerViewResult); + } + + private function getHeroStrongerViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_STRONG_VIEW); + _loc3_.strongObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function strongHero(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.hero.action.HeroAction.strongHero"; + super.connect(_loc4_,this.strongHeroResult,param1,param2,param3); + } + + private function strongHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_STRONG_HERO); + dispatchEvent(_loc4_); + } + + public function getUserGovPotzList() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.getUserGovPotzList"; + super.connect(_loc1_,this.getUserGovPotzListResult); + } + + private function getUserGovPotzListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_GOVPOZ_LIST); + _loc3_.govObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function giveGovPotz(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.giveGovPotz"; + super.connect(_loc3_,this.giveGovPotzResult,param1,param2); + } + + private function giveGovPotzResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_GOVPOZ_GIVE); + dispatchEvent(_loc4_); + } + + public function takeOffGovPotz(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.hero.action.HeroAction.takeOffGovPotz"; + super.connect(_loc2_,this.takeOffGovPotzResult,param1); + } + + private function takeOffGovPotzResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_GOVPOZ_TAKEOFF); + dispatchEvent(_loc4_); + } + + public function changeHeroName(param1:int, param2:String) : void + { + var _loc3_:String = "com.huzi.hero.action.HeroAction.changeHeroName"; + super.connect(_loc3_,this.changeHeroNameResult,param1,param2); + } + + private function changeHeroNameResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function getHeroReliveView() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.getHeroReliveView"; + super.connect(_loc1_,this.getHeroReliveViewResult); + } + + private function getHeroReliveViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_RELIVE_VIEW); + _loc3_.strongObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function heroRelive(param1:int) : void + { + var _loc2_:String = "com.huzi.hero.action.HeroAction.heroRelive"; + super.connect(_loc2_,this.heroReliveResult,param1); + } + + private function heroReliveResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_RELIVE_HERO); + dispatchEvent(_loc3_); + var _loc4_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + PakState.setGetPackListStatus(); + } + + public function getHeroPracticeVoList() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.getHeroPracticeVoList"; + super.connect(_loc1_,this.getHeroPracticeVoListResult); + } + + private function getHeroPracticeVoListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.WUGUAN_VIEW); + _loc3_.heroObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function stopHeroPractice(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.hero.action.HeroAction.stopHeroPractice"; + super.connect(_loc2_,this.stopHeroPracticeResult,param1); + } + + private function stopHeroPracticeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.WUGUAN_PRACTICE_STOP); + _loc3_.heroList = _loc2_.returnList1; + dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + ConnectService.getInstance().castleService.getCastleResource(); + NewHeroData.setGetHeroListStatus(); + } + + public function heroActPractice(param1:Object, param2:int, param3:int) : void + { + var _loc4_:String = "com.huzi.hero.action.HeroAction.heroActPractice"; + super.connect(_loc4_,this.heroActPracticeResult,param1,param2,param3); + } + + private function heroActPracticeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.WUGUAN_PRACTICE_START); + _loc3_.heroObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + var _loc4_:int = _loc3_.heroObj as int; + if(_loc4_ == 5) + { + ConnectService.getInstance().castleService.getUserData(); + } + else + { + ConnectService.getInstance().castleService.getCastleResource(); + } + NewHeroData.setGetHeroListStatus(); + } + + public function getHeroDetail() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.getHeroDetail"; + } + + public function changeHeroXuanYan() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.changeHeroXuanYan"; + } + + public function getHeroNameView() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.getHeroNameView"; + } + + public function getHeroPicView(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.hero.action.HeroAction.getHeroNameView"; + super.connect(_loc2_,this.getHeroPicViewResult,param1); + } + + private function getHeroPicViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:HeroEvent = new HeroEvent(HeroEvent.HERO_IMG_VIEW); + _loc2_.heroObj = param1; + dispatchEvent(_loc2_); + } + + public function getXuanYanList() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.getXuanYanList"; + } + + public function useItemFreshHotelHeroList() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.useItemFreshHotelHeroList"; + super.connect(_loc1_,this.useItemFreshHotelHeroListResult); + } + + private function useItemFreshHotelHeroListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_useItemFreshHotelHeroList); + dispatchEvent(_loc3_); + } + + public function enterHeroManage() : void + { + var _loc1_:String = "com.huzi.play.action.HeroManageAction.entryHeroBuild"; + super.connect(_loc1_,this.enterHeroManageResult); + } + + private function enterHeroManageResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_enter); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.list = _loc2_.returnList1; + dispatchEvent(_loc3_); + } + + public function getHeroView(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HeroManageAction.getHeroView"; + super.connect(_loc2_,this.getHeroViewResult,param1); + } + + private function getHeroViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_getHeroView); + _loc3_.obj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function jinShengHero(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HeroManageAction.jinShengHero"; + super.connect(_loc2_,this.jinShengHeroResult,param1); + } + + private function jinShengHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_jinShengHero); + dispatchEvent(_loc4_); + } + + public function jinFengHero(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HeroManageAction.jinFengHero"; + super.connect(_loc2_,this.jinFengHeroResult,param1); + } + + private function jinFengHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_jinFengHero); + dispatchEvent(_loc4_); + } + + public function xiDianHero(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HeroManageAction.xiDianHero"; + super.connect(_loc2_,this.xiDianHeroResult,param1); + } + + private function xiDianHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_xiDianHero); + dispatchEvent(_loc4_); + } + + public function addDianHero(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.play.action.HeroManageAction.addDianHero"; + super.connect(_loc4_,this.addDianHeroResult,param1,param2,param3); + } + + private function addDianHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_addDianHero); + dispatchEvent(_loc4_); + } + + public function getJingYanView(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HeroManageAction.getJingYanView"; + super.connect(_loc2_,this.getJingYanViewResult,param1); + } + + private function getJingYanViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_getJingYanView); + _loc3_.obj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function jingYanHero(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HeroManageAction.jingYanHero"; + super.connect(_loc2_,this.jingYanHeroResult,param1); + } + + private function jingYanHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + + public function jingYanByItem(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HeroManageAction.jingYanHeroByItem"; + super.connect(_loc3_,this.jingYanByItemResult,param1,param2); + } + + private function jingYanByItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_jingYanByItem); + dispatchEvent(_loc4_); + } + + public function jingYanBySuperItem(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HeroManageAction.jingYanHeroBySuperItem"; + super.connect(_loc3_,this.jingYanBySuperItemResult,param1,param2); + } + + private function jingYanBySuperItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_jingYanByItem); + dispatchEvent(_loc4_); + } + + public function jingyanbyType(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HeroManageAction.saveHero1"; + super.connect(_loc3_,this.saveHero1Result,param1,param2); + } + + private function saveHero1Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + } + + public function saveJingYan(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HeroManageAction.saveHero"; + super.connect(_loc3_,this.saveJingYanResult,param1,param2); + } + + private function saveJingYanResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + } + + public function getHeroCombat(param1:Array) : void + { + var _loc2_:String = "com.huzi.hero.action.HeroAction.getHeroCombat"; + super.connect(_loc2_,this.getHeroCombatResult,param1); + } + + private function getHeroCombatResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_getHeroCombat); + _loc3_.heroObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function getLingTingHeroList() : void + { + var _loc1_:String = "com.huzi.play.action.GoldAction.getAllHeroList"; + super.connect(_loc1_,this.getLingTingHeroListResult); + } + + private function getLingTingHeroListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_getLingTingHeroList); + _loc3_.heroList = _loc2_.returnList1; + dispatchEvent(_loc3_); + } + + public function lingTing(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.GoldAction.addExpByType"; + super.connect(_loc3_,this.lingTingResult,param1,param2); + } + + private function lingTingResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_lingTingHero); + dispatchEvent(_loc4_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function addHeroMerit(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.GoldAction.addHeroMerit"; + super.connect(_loc3_,this.addHeroMeritResult,param1,param2); + } + + private function addHeroMeritResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_lingTingHero); + dispatchEvent(_loc4_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function getSkillByType(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.hero.action.HeroSkillAction.getSkillByType"; + super.connect(_loc4_,this.getSkillByTypeResult,param1,param2,param3); + } + + private function getSkillByTypeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_getSkillByType); + _loc3_.heroObj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function studySkill(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.hero.action.HeroSkillAction.studySkill"; + super.connect(_loc4_,this.studySkillResult,param1,param2,param3); + } + + private function studySkillResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_styudySkill); + dispatchEvent(_loc3_); + } + + public function upSkill(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.hero.action.HeroSkillAction.upHeroSkill"; + super.connect(_loc4_,this.studySkillResult,param1,param2,param3); + } + + public function upSkillOneKey(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.hero.action.HeroSkillAction.upHeroSkillOneKey"; + super.connect(_loc4_,this.studySkillResult,param1,param2,param3); + } + + public function delSkill(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroSkillAction.delSkill"; + super.connect(_loc3_,this.studySkillResult,param1,param2); + } + + public function equipSkill(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroSkillAction.equipSkill"; + super.connect(_loc3_,this.studySkillResult,param1,param2); + } + + public function unEquipSkill(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroSkillAction.unEquipSkill"; + super.connect(_loc3_,this.studySkillResult,param1,param2); + } + + public function getSkill() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroSkillAction.getSkill"; + super.connect(_loc1_,this.getSkillResult); + } + + private function getSkillResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + this.initSkillList(_loc2_.returnObj1); + ConnectService.getInstance().shopService.getShopView(); + } + + private function initSkillList(param1:Object) : void + { + var _loc3_:Object = null; + var _loc4_:HeroSkill = null; + if(param1 == null) + { + return; + } + if(param1.skillList1 == null) + { + return; + } + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in param1.skillList1) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList1 = _loc2_; + _loc2_ = new Vector.(); + for each(_loc3_ in param1.skillList2) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList2 = _loc2_; + _loc2_ = new Vector.(); + for each(_loc3_ in param1.skillList3) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList3 = _loc2_; + _loc2_ = new Vector.(); + for each(_loc3_ in param1.skillList4) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList4 = _loc2_; + _loc2_ = new Vector.(); + for each(_loc3_ in param1.skillList5) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList5 = _loc2_; + _loc2_ = null; + } + + public function getZhuanzhiView(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HeroManageAction.getZhuanzhiView"; + super.connect(_loc2_,this.getZhuanzhiViewResult,param1); + } + + private function getZhuanzhiViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.HeroUp_zhuanzhiView); + _loc3_.obj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function changeHeroCar(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.changeHeroCareer"; + super.connect(_loc3_,this.changeHeroCarResult,param1,param2); + } + + private function changeHeroCarResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + } + + public function changeHeroHead(param1:int, param2:String) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.changeHeroHead"; + super.connect(_loc3_,this.changeHeroHeadResult,param1,param2); + } + + private function changeHeroHeadResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + } + + public function getMiBaoView(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.hero.action.HeroAction.getMiBaoView"; + super.connect(_loc2_,this.getMiBaoViewResult,param1); + } + + private function getMiBaoViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.Hero_mibaoView); + _loc3_.obj = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + + public function studyMiBao(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.studyMiBao"; + super.connect(_loc3_,this.studyMiBaoResult,param1,param2); + } + + private function studyMiBaoResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.Hero_mibaoStudy); + dispatchEvent(_loc4_); + } + + public function upMiBao(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.hero.action.HeroAction.upMiBao"; + super.connect(_loc4_,this.upMiBaoResult,param1,param2,param3); + } + + private function upMiBaoResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.Hero_mibaoUp); + _loc4_.msg = String(_loc2_.returnObj2); + dispatchEvent(_loc4_); + } + + public function upMiBao10(param1:int, param2:int, param3:int, param4:int) : void + { + LoadingMc.getInstance().show(); + var _loc5_:String = "com.huzi.hero.action.HeroAction.upMiBao10"; + super.connect(_loc5_,this.upMiBao10Result,param1,param2,param3,param4); + } + + private function upMiBao10Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.Hero_mibaoUp); + _loc4_.msg = String(_loc2_.returnObj2); + dispatchEvent(_loc4_); + } + + public function upMiBaoNew(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.hero.action.HeroAction.upMiBaoNew"; + super.connect(_loc4_,this.upMiBaoNewResult,param1,param2,param3); + } + + private function upMiBaoNewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.Hero_mibaoUp1); + dispatchEvent(_loc4_); + } + + public function changeMiBao(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.hero.action.HeroAction.changeMiBao"; + super.connect(_loc4_,this.changeMiBaoResult,param1,param2,param3); + } + + private function changeMiBaoResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroUpEvent = new HeroUpEvent(HeroUpEvent.Hero_mibaoChange); + dispatchEvent(_loc4_); + } + + public function superStrongHero(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.superStronger"; + super.connect(_loc3_,this.superStrongerResult,param1,param2); + } + + private function superStrongerResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_SUPERSTRONG_HERO); + dispatchEvent(_loc4_); + } + + public function equChaofu(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.ChaofuAction.equChaofu"; + super.connect(_loc3_,this.equChaofuResult,param1,param2); + } + + private function equChaofuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus1(); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_equChaofu); + dispatchEvent(_loc4_); + } + + public function unEquChaofu(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.ChaofuAction.unEquChaofu"; + super.connect(_loc3_,this.unEquChaofuResult,param1,param2); + } + + private function unEquChaofuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + PakState.setGetPackListStatus1(); + var _loc4_:HeroEvent = new HeroEvent(HeroEvent.HERO_equChaofu); + dispatchEvent(_loc4_); + } + + public function throwItem(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.TreasuryAction.throwTreasury"; + super.connect(_loc2_,this.throwItemResult,param1); + } + + private function throwItemResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_diuqiChaofu); + dispatchEvent(_loc3_); + } + + public function getItemNums() : void + { + var _loc1_:String = "com.huzi.play.action.ChaofuAction.getItemNums"; + super.connect(_loc1_,this.getItemNumsResult); + } + + private function getItemNumsResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ChaoFuData.setItemNums(_loc2_.returnObj1); + } + + public function fenJie(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ChaofuAction.fenJie"; + super.connect(_loc2_,this.fenJieResult,param1); + } + + private function fenJieResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_fenjieChaofu); + dispatchEvent(_loc3_); + } + + public function qianghua(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.play.action.ChaofuAction.strongChaofu"; + super.connect(_loc4_,this.qianghuaResult,param1,param2,param3); + } + + private function qianghuaResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_qianghuaChaofu); + dispatchEvent(_loc3_); + } + + public function supqianghua(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.play.action.ChaofuAction.supStrongChaofu"; + super.connect(_loc4_,this.supqianghuaResult,param1,param2,param3); + } + + private function supqianghuaResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_qianghuaChaofu); + dispatchEvent(_loc3_); + } + + public function getChaofuMap() : void + { + var _loc1_:String = "com.huzi.play.action.ChaofuAction.getChaofuMap"; + super.connect(_loc1_,this.getChaofuMapResult); + } + + private function getChaofuMapResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ChaoFuData.setChaofuList(_loc2_.returnList1); + ChaoFuData.setXiLianObj(_loc2_.returnObj1); + } + + public function clearAllHero() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroAction.clearAllHero"; + super.connect(_loc1_,this.clearAllHeroResult); + } + + private function clearAllHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function getAllBaoshiList() : void + { + var _loc1_:String = "com.huzi.play.action.ChaofuAction.getBaoshiList"; + super.connect(_loc1_,this.getAllBaoshiListResult); + } + + private function getAllBaoshiListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ChaoFuData.setBaoshiList(_loc2_.returnList1); + } + + public function addGem(param1:int, param2:int, param3:int, param4:int) : void + { + LoadingMc.getInstance().show(); + var _loc5_:String = "com.huzi.play.action.ChaofuAction.addGem"; + super.connect(_loc5_,this.addGemResult,param1,param2,param3,param4); + } + + private function addGemResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_inholeChaofu); + dispatchEvent(_loc3_); + } + + public function delGem(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.play.action.ChaofuAction.delGem"; + super.connect(_loc4_,this.delGemResult,param1,param2,param3); + } + + private function delGemResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_inholeChaofu); + dispatchEvent(_loc3_); + } + + public function oneKeyOutHole(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.ChaofuAction.oneKeyOutHole"; + super.connect(_loc3_,this.oneKeyOutHoleResult,param1,param2); + } + + private function oneKeyOutHoleResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_inholeChaofu); + dispatchEvent(_loc3_); + } + + public function xilianChaofu(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.play.action.ChaofuAction.xilianChaofu"; + super.connect(_loc4_,this.xilianChaofuResult,param1,param2,param3); + } + + private function xilianChaofuResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_xilianChaofu); + dispatchEvent(_loc3_); + } + + public function xilianChaofuOneKey(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.ChaofuAction.xilianChaofuOneKey"; + super.connect(_loc3_,this.xilianChaofuOneKeyResult,param1,param2); + } + + private function xilianChaofuOneKeyResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_xilianChaofu); + dispatchEvent(_loc3_); + } + + public function xilianChaofuOneKeyByType(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.play.action.ChaofuAction.xilianChaofuOneKeyByType"; + super.connect(_loc4_,this.xilianChaofuOneKeyByTypeResult,param1,param2,param3); + } + + private function xilianChaofuOneKeyByTypeResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + MessageBoxUI.getInstance().addMessage(_loc2_.msg); + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:HeroEvent = new HeroEvent(HeroEvent.HERO_xilianChaofu); + dispatchEvent(_loc3_); + } + + public function getFightSkill() : void + { + var _loc1_:String = "com.huzi.hero.action.HeroSkillAction.getFightSkill"; + super.connect(_loc1_,this.getFightSkillResult); + } + + private function getFightSkillResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + var _loc4_:Array = _loc2_.returnList2; + HeroSkillData.setAllFightSkillList(_loc3_); + HeroSkillData.setFirstLevelFightSkillList(_loc4_); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.DATA_SKILL_FIGHT)); + } + + public function getUserFightSkill() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.hero.action.HeroSkillAction.getUserFightSkill"; + super.connect(_loc1_,this.getUserFightSkillResult); + } + + private function getUserFightSkillResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + HeroSkillData.setUserSkillList(_loc3_); + } + + public function studyFightSkill(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroSkillAction.studyHeroFightSkill"; + super.connect(_loc3_,this.studyFightSkillResult,param1,param2); + } + + private function studyFightSkillResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + HeroSkillData.setUserSkillList(_loc3_); + } + + public function upFightSkill(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroSkillAction.upHeroFightSkill"; + super.connect(_loc3_,this.upFightSkillResult,param1,param2); + } + + private function upFightSkillResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + var _loc4_:Array = _loc2_.returnList1; + HeroSkillData.setUserSkillList(_loc4_,false); + } + + public function oneKeyUpHeroFightSkill(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroSkillAction.oneKeyUpHeroFightSkill"; + super.connect(_loc3_,this.oneKeyUpHeroFightSkillResult,param1,param2); + } + + private function oneKeyUpHeroFightSkillResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + var _loc4_:Array = _loc2_.returnList1; + HeroSkillData.setUserSkillList(_loc4_,false); + } + + public function equHeroFightSkill(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroSkillAction.equHeroFightSkill"; + super.connect(_loc3_,this.equHeroFightSkillResult,param1,param2); + } + + private function equHeroFightSkillResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + } + + public function unEquHeroFightSkill(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroSkillAction.unEquHeroFightSkill"; + super.connect(_loc3_,this.unEquHeroFightSkillResult,param1,param2); + } + + private function unEquHeroFightSkillResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + } + + public function getAllCopyHeroList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.hero.action.HeroAction.getAllCopyHeroList"; + super.connect(_loc1_,this.getCopyHeroByIdsResult); + } + + private function getCopyHeroByIdsResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + NewHeroData.setAllCopyHeroList(_loc3_); + } + + public function getHeroTianfuList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HeroTianfuAction.getHeroTianfuList"; + super.connect(_loc1_,this.getHeroTianfuListResult); + } + + private function getHeroTianfuListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HeroTianfuData.setPro(_loc3_); + var _loc4_:Array = _loc2_.returnList1; + HeroTianfuData.setTianfuList(_loc4_); + } + + public function upTianfu(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.play.action.HeroTianfuAction.upTianfu"; + super.connect(_loc4_,this.upTianfuResult,param1,param2,param3); + } + + private function upTianfuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + PakState.setGetPackListStatus(); + HeroTianfuData.setTianfuList(_loc3_); + } + + public function equTianfu(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HeroTianfuAction.equTianfu"; + super.connect(_loc3_,this.equTianfuResult,param1,param2); + } + + private function equTianfuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + } + + public function unEquTianfu(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HeroTianfuAction.unEquTianfu"; + super.connect(_loc3_,this.unEquTianfuResult,param1,param2); + } + + private function unEquTianfuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc3_); + } + + public function getUserJiangHunList1() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.hero.action.HeroAction.getUserJiangHunList1"; + super.connect(_loc1_,this.getAllJiangHunList1Result); + } + + private function getAllJiangHunList1Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + NewHeroData.setJiangHunList1(_loc2_.returnList1); + } + + public function getAllJiangHunList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.hero.action.HeroAction.getUserJiangHunList"; + super.connect(_loc1_,this.getAllJiangHunListResult); + } + + private function getAllJiangHunListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + NewHeroData.setJiangHunList(_loc2_.returnList1); + var _loc3_:Object = _loc2_.returnObj1; + NewHeroData.setJiangHunObj(_loc3_); + } + + public function jihuoJiangHun(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.jihuoJiangHun"; + super.connect(_loc3_,this.jihuoJiangHunResult,param1,param2); + } + + private function jihuoJiangHunResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + NewHeroData.setJiangHunList(_loc2_.returnList1); + PakState.setGetPackListStatus(); + } + + public function levelUpJiangHun(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.hero.action.HeroAction.levelUpJiangHun"; + super.connect(_loc4_,this.levelUpJiangHunResult,param1,param2,param3); + } + + private function levelUpJiangHunResult(param1:Object) : void + { + var _loc3_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + NewHeroData.setJiangHunList(_loc2_.returnList1); + if(_loc2_.returnObj2) + { + _loc3_ = new NewHero(_loc2_.returnObj2); + NewHeroData.setHero(_loc3_); + } + } + + public function levelUpJiangHun30(param1:int, param2:int, param3:int, param4:int) : void + { + LoadingMc.getInstance().show(); + var _loc5_:String = "com.huzi.hero.action.HeroAction.levelUpJiangHun30"; + super.connect(_loc5_,this.levelUpJiangHun30Result,param1,param2,param3,param4); + } + + private function levelUpJiangHun30Result(param1:Object) : void + { + var _loc3_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + NewHeroData.setJiangHunList(_loc2_.returnList1); + if(_loc2_.returnObj2) + { + _loc3_ = new NewHero(_loc2_.returnObj2); + NewHeroData.setHero(_loc3_); + } + } + + public function jiangHunFenJie(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.jiangHunFenJie"; + super.connect(_loc3_,this.jiangHunFenJieResult,param1,param2); + } + + private function jiangHunFenJieResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:int = int(_loc2_.returnObj1); + NewHeroData.delJiangHun(_loc3_); + } + + public function jiangHunFenJie1(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.hero.action.HeroAction.jiangHunFenJie1"; + super.connect(_loc2_,this.jiangHunFenJie1Result,param1); + } + + private function jiangHunFenJie1Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:int = int(_loc2_.returnObj1); + NewHeroData.delJiangHun1(_loc3_); + } + + public function downJiangHun(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.downJiangHun"; + super.connect(_loc3_,this.downHunFenJieResult,param1,param2); + } + + private function downHunFenJieResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj2); + NewHeroData.setHero(_loc3_); + NewHeroData.setJiangHunList(_loc2_.returnList1); + } + + public function equHeroJiangHun(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.hero.action.HeroAction.equHeroJiangHun"; + super.connect(_loc3_,this.equHeroJiangHunResult,param1,param2); + } + + private function equHeroJiangHunResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj2); + NewHeroData.setHero(_loc3_); + NewHeroData.setJiangHunList(_loc2_.returnList1); + } + } +} + diff --git a/flash_decompiled/com/control/hero/event/HeroEvent.as b/flash_decompiled/com/control/hero/event/HeroEvent.as new file mode 100644 index 0000000..80d89e0 --- /dev/null +++ b/flash_decompiled/com/control/hero/event/HeroEvent.as @@ -0,0 +1,84 @@ +package com.control.hero.event +{ + import flash.events.Event; + + public class HeroEvent extends Event + { + + public static const HERO_EDITNAME:String = "HERO_EDITNAME"; + + public static const HERO_EQU_SET:String = "HERO_EQU_SET"; + + public static const HERO_EQU_REMOVE:String = "HERO_EQU_REMOVE"; + + public static const HERO_EQU_HASSET:String = "HERO_EQU_HASSET"; + + public static const HERO_IMG_VIEW:String = "HERO_IMG_VIEW"; + + public static const HERO_GOVPOZ_LIST:String = "HERO_GOVPOZ_LIST"; + + public static const HERO_GOVPOZ_GIVE:String = "HERO_GOVPOZ_GIVE"; + + public static const HERO_GOVPOZ_TAKEOFF:String = "HERO_GOVPOZ_TAKEOFF"; + + public static const HERO_STRONG_VIEW:String = "HERO_STRONG_VIEW"; + + public static const HERO_STRONG_HERO:String = "HERO_STRONG_HERO"; + + public static const HERO_SUPERSTRONG_HERO:String = "HERO_SUPERSTRONG_HERO"; + + public static const HERO_getHeroCombat:String = "HERO_getHeroCombat"; + + public static const HERO_RELIVE_VIEW:String = "HERO_RELIVE_VIEW"; + + public static const HERO_RELIVE_HERO:String = "HERO_RELIVE_HERO"; + + public static const WUGUAN_VIEW:String = "HERO_WUGUAN_VIEW"; + + public static const WUGUAN_PRACTICE_START:String = "WUGUAN_PRACTICE_START"; + + public static const WUGUAN_PRACTICE_STOP:String = "WUGUAN_PRACTICE_STOP"; + + public static const HERO_useItemFreshHotelHeroList:String = "HERO_useItemFreshHotelHeroList"; + + public static const HERO_getLingTingHeroList:String = "HERO_getLingTingHeroList"; + + public static const HERO_lingTingHero:String = "HERO_lingTingHero"; + + public static const HERO_getSkillByType:String = "HERO_getSkillByType"; + + public static const HERO_styudySkill:String = "HERO_styudySkill"; + + public static const HERO_equChaofu:String = "HERO_equChaofu"; + + public static const HERO_diuqiChaofu:String = "HERO_diuqiChaofu"; + + public static const HERO_fenjieChaofu:String = "HERO_fenjieChaofu"; + + public static const HERO_qianghuaChaofu:String = "HERO_qianghuaChaofu"; + + public static const HERO_inholeChaofu:String = "HERO_inholeChaofu"; + + public static const HERO_xilianChaofu:String = "HERO_xilianChaofu"; + + public var strongObj:Object; + + public var heroObj:Object; + + public var equList:Array; + + public var govObj:Object; + + public var heroList:Array; + + public var result:int; + + public var msg:String; + + public function HeroEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/hero/event/HeroHotelEvent.as b/flash_decompiled/com/control/hero/event/HeroHotelEvent.as new file mode 100644 index 0000000..063c3d4 --- /dev/null +++ b/flash_decompiled/com/control/hero/event/HeroHotelEvent.as @@ -0,0 +1,19 @@ +package com.control.hero.event +{ + import com.data.data.hero.HeroHotel; + import flash.events.Event; + + public class HeroHotelEvent extends Event + { + + public static const getHotelHeroList:String = "getHotelHeroList"; + + public var heroHotel:HeroHotel; + + public function HeroHotelEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/hero/event/HeroUpEvent.as b/flash_decompiled/com/control/hero/event/HeroUpEvent.as new file mode 100644 index 0000000..088f631 --- /dev/null +++ b/flash_decompiled/com/control/hero/event/HeroUpEvent.as @@ -0,0 +1,56 @@ +package com.control.hero.event +{ + import flash.events.Event; + + public class HeroUpEvent extends Event + { + + public static const HeroUp_enter:String = "HeroUp_enter"; + + public static const HeroUp_getHeroView:String = "HeroUp_getHeroView"; + + public static const HeroUp_jinFengHero:String = "HeroUp_jinFengHero"; + + public static const HeroUp_xiDianHero:String = "HeroUp_xiDianHero"; + + public static const HeroUp_addDianHero:String = "HeroUp_addDianHero"; + + public static const HeroUp_getJingYanView:String = "HeroUp_getJingYanView"; + + public static const HeroUp_jingYanHero:String = "HeroUp_jingYanHero"; + + public static const HeroUp_saveJingYan:String = "HeroUp_saveJingYan"; + + public static const HeroUp_jingYanByItem:String = "HeroUp_jingYanByItem"; + + public static const HeroUp_zhuanzhiView:String = "HeroUp_zhuanzhiView"; + + public static const HeroUp_zhuanzhiResult:String = "HeroUp_zhuanzhiResult"; + + public static const Hero_mibaoView:String = "Hero_mibaoView"; + + public static const Hero_mibaoStudy:String = "Hero_mibaoStudy"; + + public static const Hero_mibaoUp:String = "Hero_mibaoUp"; + + public static const Hero_mibaoUp1:String = "Hero_mibaoUp1"; + + public static const Hero_mibaoChange:String = "Hero_mibaoChange"; + + public static const HeroUp_jinShengHero:String = "HeroUp_jinShengHero"; + + public var list:Array; + + public var obj:Object; + + public var result:int; + + public var msg:String; + + public function HeroUpEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/home/HomeService.as b/flash_decompiled/com/control/home/HomeService.as new file mode 100644 index 0000000..84c52a6 --- /dev/null +++ b/flash_decompiled/com/control/home/HomeService.as @@ -0,0 +1,986 @@ +package com.control.home +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.data.HomeData; + import com.events.DevEvent; + import com.newdata.hero.NewHeroData; + import com.newdata.user.NewRes; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.home.HomeMainUI; + import com.view.ui.message.MessageBoxUI; + + public class HomeService extends Connect + { + + public function HomeService() + { + super(); + } + + public function getUserXunBaoMap() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.getUserXunBaoMap"; + super.connect(_loc1_,this.getUserXunBaoMapResult); + } + + private function getUserXunBaoMapResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserXunBao(_loc3_); + } + + public function beginXunLong() : void + { + var _loc1_:Object = HomeData.getUserXunBao(); + if(_loc1_.times == 0) + { + MessageBoxUI.getInstance().addMessage("今日次数已用完"); + return; + } + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.beginXunLong"; + super.connect(_loc2_,this.beginXunLongResult); + } + + private function beginXunLongResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserXunBao(_loc3_); + } + + public function xunLong(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.xunLong"; + super.connect(_loc2_,this.xunLongResult,param1); + } + + private function xunLongResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserXunBao(_loc3_.xunbaoMap); + HomeData.setUserHome(_loc3_.userHomeMap); + } + + public function resetXunLong() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.resetXunLong"; + super.connect(_loc1_,this.resetXunLongResult); + } + + private function resetXunLongResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserXunBao(_loc3_); + } + + public function getUserCardMap() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.getUserCardMap"; + super.connect(_loc1_,this.getUserCardMapResult); + } + + private function getUserCardMapResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserCard(_loc3_); + } + + public function startUserCard() : void + { + var _loc1_:Object = HomeData.getUserCard(); + if(_loc1_.times == 0) + { + MessageBoxUI.getInstance().addMessage("今日次数已用完"); + return; + } + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.startUserCard"; + super.connect(_loc2_,this.startUserCardResult); + } + + private function startUserCardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserCard(_loc3_); + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_HOME_STARTCARD); + Utils.g_events.dispatchEvent(_loc4_); + } + + public function changeCard(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.changeCard"; + super.connect(_loc2_,this.changeCardResult,param1); + } + + private function changeCardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:Object = _loc3_.cardMap; + var _loc5_:Object = _loc3_.homeMap; + HomeData.setUserCard(_loc4_); + HomeData.setUserHome(_loc5_); + var _loc6_:int = int(_loc3_.delCardPoint); + var _loc7_:int = int(_loc3_.changeCard); + var _loc8_:DevEvent = new DevEvent(DevEvent.EVENT_HOME_CHANGECARD); + _loc8_.id = _loc6_; + _loc8_.para1 = _loc7_; + Utils.g_events.dispatchEvent(_loc8_); + } + + public function endCardGame() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.endCardGame"; + super.connect(_loc1_,this.endCardGameResult); + } + + private function endCardGameResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:Object = _loc3_.cardMap; + var _loc5_:Object = _loc3_.homeMap; + HomeData.setUserCard(_loc3_); + HomeData.setUserHome(_loc5_); + var _loc6_:int = int(_loc3_.addCardPoint); + var _loc7_:DevEvent = new DevEvent(DevEvent.EVENT_HOME_ENDCARD); + _loc7_.id = _loc6_; + Utils.g_events.dispatchEvent(_loc7_); + } + + public function getUserAskMap() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.getUserAskMap"; + super.connect(_loc1_,this.getUserAskMapResult); + } + + private function getUserAskMapResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserAsk(_loc3_); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_HOME_USERASK)); + } + + public function startAsk(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.startAsk"; + super.connect(_loc2_,this.startAskResult,param1); + } + + private function startAskResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserAsk(_loc3_); + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_HOME_USERASK_STARTRESULT); + Utils.g_events.dispatchEvent(_loc4_); + } + + public function submitAnswer(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.submitAnswer"; + super.connect(_loc3_,this.submitAnswerResult,param1,param2); + } + + private function submitAnswerResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserAsk(_loc3_); + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_HOME_USERASK_SUBMITRESULT); + Utils.g_events.dispatchEvent(_loc4_); + } + + public function doAnswer() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.doAnswer"; + super.connect(_loc1_,this.doAnswerResult); + } + + private function doAnswerResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:Object = _loc3_.homeMap; + var _loc5_:Object = _loc3_.askMap; + var _loc6_:String = _loc3_.msg; + HomeData.setUserAsk(_loc5_); + if(_loc4_) + { + HomeData.setUserHome(_loc4_); + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_HOME_USERASK)); + HomeMainUI.getInstance().showMess(_loc6_); + } + + public function getHomeBuildMap() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.getHomeBuildMap"; + super.connect(_loc1_,this.getHomeBuildMapResult); + } + + private function getHomeBuildMapResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:Array = _loc3_.buildList; + var _loc5_:Array = _loc3_.buildingList; + var _loc6_:Object = _loc3_.userHome; + HomeData.setBuildingList(_loc5_); + HomeData.setUserHome(_loc6_); + HomeData.setBuildList(_loc4_); + HomeData.setConfig(_loc3_.homeConfig); + var _loc7_:Object = _loc3_.schoolMap; + HomeData.setSchoolMap(_loc7_); + } + + public function upHomeBuild(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upHomeBuild"; + super.connect(_loc2_,this.upHomeBuildResult,param1); + } + + private function upHomeBuildResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setBuildInfo(_loc3_); + } + + public function updateOverHomeBuild(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.updateOverHomeBuild"; + super.connect(_loc2_,this.updateOverHomeBuildResult,param1); + } + + private function updateOverHomeBuildResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setBuildInfo(_loc3_); + HomeMainUI.getInstance().showMess("建筑升级完成!!"); + } + + public function addBuildSpeed(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.addBuildSpeed"; + super.connect(_loc3_,this.addBuildSpeedResult,param1,param2); + } + + private function addBuildSpeedResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1.userBuild; + HomeData.setBuildInfo(_loc3_); + var _loc4_:Object = _loc2_.returnObj1.userHome; + HomeData.setUserHome(_loc4_); + HomeMainUI.getInstance().showMess("加速完成!!"); + } + + public function createUserHome(param1:String, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.createUserHome"; + super.connect(_loc3_,this.createUserHomeResult,param1,param2); + } + + private function createUserHomeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:Array = _loc3_.buildList; + var _loc5_:Array = _loc3_.buildingList; + var _loc6_:Object = _loc3_.userHome; + HomeData.setBuildingList(_loc5_); + HomeData.setUserHome(_loc6_); + HomeData.setBuildList(_loc4_); + HomeData.setConfig(_loc3_.homeConfig); + var _loc7_:Object = _loc3_.schoolMap; + HomeData.setSchoolMap(_loc7_); + HomeMainUI.getInstance().showMess("家园创建成功!!"); + } + + public function changeChildName(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.changeChildName"; + super.connect(_loc2_,this.changeChildNameResult,param1); + } + + private function changeChildNameResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + HomeData.setUserHome(_loc2_.returnObj1); + HomeMainUI.getInstance().showMess("修改成功!!"); + } + + public function getUserHomeMap() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.getUserHomeMap"; + super.connect(_loc1_,this.getUserHomeMapResult); + } + + private function getUserHomeMapResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + HomeData.setUserHome(_loc2_.returnObj1); + } + + public function upUserHome() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.upUserHome"; + super.connect(_loc1_,this.upUserHomeResult); + } + + private function upUserHomeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + HomeData.setUserHome(_loc2_.returnObj1); + HomeMainUI.getInstance().showMess("提升成功!!"); + } + + public function upUserHomePro(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.upUserHomePro"; + super.connect(_loc3_,this.upUserHomeProResult,param1,param2); + } + + private function upUserHomeProResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + HomeData.setUserHome(_loc2_.returnObj1); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function getGuildSchool() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.getSchoolMap"; + super.connect(_loc1_,this.getGuildSchoolResult); + } + + private function getGuildSchoolResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + HomeData.setSchoolMap(_loc2_.returnObj1); + } + + public function startSchool() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.startSchool"; + super.connect(_loc1_,this.startSchoolResult); + } + + private function startSchoolResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + HomeData.setSchoolMap(_loc2_.returnObj1); + } + + public function enterSchool() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.enterSchool"; + super.connect(_loc1_,this.enterSchoolResult); + } + + private function enterSchoolResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + HomeData.setSchoolMap(_loc2_.returnObj1); + } + + public function resToPoint(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.resToPoint"; + super.connect(_loc3_,this.resToPointResult,param1,param2); + } + + private function resToPointResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:Object = _loc3_.userHome; + HomeData.setUserHome(_loc4_); + var _loc5_:NewRes = new NewRes(_loc3_.casRes); + NewUserData.setRes(_loc5_); + HomeMainUI.getInstance().showMess("兑换成功!!"); + } + + public function upRemalePro() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.upRemalePro"; + super.connect(_loc1_,this.upRemaleProResult); + } + + private function upRemaleProResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upRemalePro20(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upRemalePro20"; + super.connect(_loc2_,this.upRemalePro20Result,param1); + } + + private function upRemalePro20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upRemaleItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upRemaleItem"; + super.connect(_loc2_,this.upRemaleItemResult,param1); + } + + private function upRemaleItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upRemaleItem20(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.upRemaleItem20"; + super.connect(_loc3_,this.upRemaleItem20Result,param1,param2); + } + + private function upRemaleItem20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upBoyPro() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.upBoyPro"; + super.connect(_loc1_,this.upBoyProResult); + } + + private function upBoyProResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upBoyPro20(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upBoyPro20"; + super.connect(_loc2_,this.upBoyPro20Result,param1); + } + + private function upBoyPro20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upBoyItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upBoyItem"; + super.connect(_loc2_,this.upBoyItemResult,param1); + } + + private function upBoyItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upBoyItem20(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.upBoyItem20"; + super.connect(_loc3_,this.upBoyItem20Result,param1,param2); + } + + private function upBoyItem20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upSoldierPro() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.upSoldierPro"; + super.connect(_loc1_,this.upSoldierProResult); + } + + private function upSoldierProResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upSoldierPro20(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upSoldierPro20"; + super.connect(_loc2_,this.upSoldierPro20Result,param1); + } + + private function upSoldierPro20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upSoldierItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upSoldierItem"; + super.connect(_loc2_,this.upSoldierItemResult,param1); + } + + private function upSoldierItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upSoldierItem20(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.upSoldierItem20"; + super.connect(_loc3_,this.upSoldierItem20Result,param1,param2); + } + + private function upSoldierItem20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upSirPro() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.upSirPro"; + super.connect(_loc1_,this.upSirProResult); + } + + private function upSirProResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upSirPro20(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upSirPro20"; + super.connect(_loc2_,this.upSirPro20Result,param1); + } + + private function upSirPro20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upSirItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upSirItem"; + super.connect(_loc2_,this.upSirItemResult,param1); + } + + private function upSirItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upSirItem20(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.upSirItem20"; + super.connect(_loc3_,this.upSirItem20Result,param1,param2); + } + + private function upSirItem20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upGuanjiaPro() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HomeAction.upGuanjiaPro"; + super.connect(_loc1_,this.upGuanjiaProResult); + } + + private function upGuanjiaProResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upGuanjiaPro20(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upGuanjiaPro20"; + super.connect(_loc2_,this.upGuanjiaPro20Result,param1); + } + + private function upGuanjiaPro20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upGuanjiaItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HomeAction.upGuanjiaItem"; + super.connect(_loc2_,this.upGuanjiaItemResult,param1); + } + + private function upGuanjiaItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + + public function upGuanjiaItem20(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.HomeAction.upGuanjiaItem20"; + super.connect(_loc3_,this.upGuanjiaItem20Result,param1,param2); + } + + private function upGuanjiaItem20Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + HomeData.setUserHome(_loc3_); + HomeMainUI.getInstance().showMess("升级成功!!"); + NewHeroData.setGetHeroListStatus(); + } + } +} + diff --git a/flash_decompiled/com/control/iron/IronService.as b/flash_decompiled/com/control/iron/IronService.as new file mode 100644 index 0000000..55abbc8 --- /dev/null +++ b/flash_decompiled/com/control/iron/IronService.as @@ -0,0 +1,477 @@ +package com.control.iron +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.iron.event.IronEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.iron.data.ItemData; + import com.view.ui.pak.data.PakState; + + public class IronService extends Connect + { + + public function IronService() + { + super(); + } + + public function getItemCanBuyList() : void + { + var _loc1_:String = "com.huzi.item.action.IronFactoryAction.getItemCanByList"; + super.connect(_loc1_,this.getItemCanByListResult); + } + + private function getItemCanByListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setIronSellList(_loc2_.returnList1); + } + + public function getCanSellByTagId(param1:int) : void + { + var _loc2_:String = "com.huzi.item.action.IronFactoryAction.getTreasuryCanSellByTagId"; + super.connect(_loc2_,this.getCanSellByTagIdResult,param1); + } + + private function getCanSellByTagIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE1_CANSELLLIST); + _loc3_.itemList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function sellItem(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.item.action.IronFactoryAction.sellItem"; + super.connect(_loc3_,this.sellItemResult,param1,param2); + } + + private function sellItemResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE1_SELLITEM); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + + public function buyItem(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.item.action.IronFactoryAction.buyItem"; + super.connect(_loc3_,this.buyItemResult,param1,param2); + } + + private function buyItemResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE1_BUYITEM); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + + public function getMarrowTresury(param1:int) : void + { + var _loc2_:String = "com.huzi.item.action.IronFactoryAction.getMarrowTresury"; + super.connect(_loc2_,this.getMarrowTresuryResult,param1); + } + + private function getMarrowTresuryResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE2_ITEM_MARROW); + _loc3_.itemObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getDestoryTresury(param1:int) : void + { + var _loc2_:String = "com.huzi.item.action.IronFactoryAction.getDestoryTresury"; + super.connect(_loc2_,this.getDestoryTresuryResult,param1); + } + + private function getDestoryTresuryResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE2_ITEM_CANDES); + _loc3_.itemList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function fenJie(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.item.action.IronFactoryAction.fenJie"; + super.connect(_loc2_,this.fenJieResult,param1); + } + + private function fenJieResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE2_ITEM_FENJIE); + _loc3_.itemObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + + public function getBijousByType(param1:int = 1) : void + { + var _loc2_:String = "com.huzi.item.action.IronFactoryAction.getBijousByType"; + super.connect(_loc2_,this.getBijousByTypeResult,param1); + } + + private function getBijousByTypeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ItemData.setBaoshiData(_loc2_.returnList1); + } + + public function composeBijou(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.item.action.IronFactoryAction.composeBijou"; + super.connect(_loc3_,this.composeBijouResult,param1,param2); + } + + private function composeBijouResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE4_ITEM_COMPOSE_Bijou); + _loc3_.itemObj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function getIHeroList() : void + { + var _loc1_:String = "com.huzi.item.action.IronFactoryAction.getIHeroList"; + super.connect(_loc1_,this.getIHeroListResult); + } + + private function getIHeroListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_HERO_COMBOX_LIST); + _loc3_.comboxList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getHeroEquipList(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.item.action.IronFactoryAction.getHeroEquipList"; + super.connect(_loc3_,this.getHeroEquipListResult,param1,param2); + } + + private function getHeroEquipListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_HERO_ITEM_LIST); + _loc3_.itemList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getGemView(param1:int) : void + { + var _loc2_:String = "com.huzi.item.action.IronFactoryAction.getGemView"; + super.connect(_loc2_,this.getGemViewResult,param1); + } + + private function getGemViewResult(param1:Object) : void + { + var _loc2_:IronEvent = new IronEvent(IronEvent.PAGE_HERO_GEM_VIEW); + _loc2_.itemObj = param1; + super.dispatchEvent(_loc2_); + } + + public function getBijousListForSelect(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.item.action.IronFactoryAction.getBijousListForSelect"; + super.connect(_loc3_,this.getBijousListForSelectResult,param1,param2); + } + + private function getBijousListForSelectResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_HERO_GEM_LIST); + _loc3_.itemList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function actAddGem(param1:int, param2:int, param3:int, param4:int) : void + { + LoadingMc.getInstance().show(); + var _loc5_:String = "com.huzi.item.action.IronFactoryAction.actAddGem"; + super.connect(_loc5_,this.actAddGemResult,param1,param2,param3,param4); + } + + private function actAddGemResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_HERO_GEM_ADD); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + + public function removeGem(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.item.action.IronFactoryAction.removeGem"; + super.connect(_loc4_,this.removeGemResult,param1,param2,param3); + } + + private function removeGemResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_HERO_GEM_DEL); + super.dispatchEvent(_loc3_); + } + + public function removeAllGem(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.item.action.IronFactoryAction.removeAllGem"; + super.connect(_loc3_,this.removeAllGemResult,param1,param2); + } + + private function removeAllGemResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj1) + { + _loc4_ = new NewHero(_loc2_.returnObj1); + NewHeroData.setHero(_loc4_); + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_HERO_GEM_DELALL); + super.dispatchEvent(_loc3_); + } + + public function qiangHua(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.item.action.IronFactoryAction.qiangHua"; + super.connect(_loc4_,this.qiangHuaResult,param1,param2,param3); + } + + private function qiangHuaResult(param1:Object) : void + { + var _loc4_:NewHero = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + if(_loc2_.returnObj2) + { + _loc4_ = new NewHero(_loc2_.returnObj2); + NewHeroData.setHero(_loc4_); + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_QIANGHUA); + _loc3_.itemObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getQiangHuaView(param1:int) : void + { + var _loc2_:String = "com.huzi.item.action.IronFactoryAction.getQiangHuaView"; + super.connect(_loc2_,this.getQiangHuaViewResult,param1); + } + + private function getQiangHuaViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_QIANGHUA_VIEW); + _loc3_.itemObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getTreasuryByTagId(param1:int) : void + { + var _loc2_:String = "com.huzi.item.action.IronFactoryAction.getTreasuryByTagId"; + super.connect(_loc2_,this.getTreasuryByTagIdResult,param1); + } + + private function getTreasuryByTagIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function exchangeBijiuView(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.item.action.IronFactoryAction.exchangeBijiuView"; + super.connect(_loc3_,this.exchangeBijiuViewResult,param1,param2); + } + + private function exchangeBijiuViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_EXCHANGE_VIEW); + _loc3_.itemObj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function exchangeBijiu(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.item.action.IronFactoryAction.exchangeBijiu"; + super.connect(_loc4_,this.exchangeBijiuResult,param1,param2,param3); + } + + private function exchangeBijiuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_EXCHANGE_OK); + super.dispatchEvent(_loc3_); + } + + public function getPiLiangQiangHuaView1(param1:Object, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.item.action.IronFactoryAction.getPiLiangQianghuaView"; + super.connect(_loc3_,this.getPiQiangHuaViewResult,param1,param2); + } + + private function getPiQiangHuaViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_STRONG_VIEW1); + _loc3_.itemList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function piLiangQiangHua(param1:Object, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.item.action.IronFactoryAction.piLiangQianghua"; + super.connect(_loc3_,this.piQiangHuaResult,param1,param2); + } + + private function piQiangHuaResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + var _loc3_:IronEvent = new IronEvent(IronEvent.PAGE_STRONG_PILIANG); + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/iron/event/IronEvent.as b/flash_decompiled/com/control/iron/event/IronEvent.as new file mode 100644 index 0000000..7ede77b --- /dev/null +++ b/flash_decompiled/com/control/iron/event/IronEvent.as @@ -0,0 +1,68 @@ +package com.control.iron.event +{ + import flash.events.Event; + + public class IronEvent extends Event + { + + public static const PAGE1_CANSELLLIST:String = "PAGE1_ITEMS_CANSELLLIST"; + + public static const PAGE1_CANBUYLIST:String = "PAGE1_ITEMS_CANBUYLIST"; + + public static const PAGE1_SELLITEM:String = "PAGE1_SELLITEM"; + + public static const PAGE1_BUYITEM:String = "PAGE1_BUYITEM"; + + public static const PAGE2_ITEM_MARROW:String = "PAGE2_ITEM_MARROW"; + + public static const PAGE2_ITEM_CANDES:String = "PAGE2_ITEM_CANDES"; + + public static const PAGE2_ITEM_FENJIE:String = "PAGE2_ITEM_FENJIE"; + + public static const PAGE4_ITEM_COMPOSE_Bijou:String = "PAGE4_ITEM_COMPOSE_Bijou"; + + public static const PAGE_HERO_COMBOX_LIST:String = "PAGE_HERO_COMBOX_LIST"; + + public static const PAGE_HERO_ITEM_LIST:String = "PAGE_HERO_ITEM_LIST"; + + public static const PAGE_HERO_GEM_VIEW:String = "PAGE_HERO_GEM_VIEW"; + + public static const PAGE_HERO_GEM_LIST:String = "PAGE_HERO_GEM_LIST"; + + public static const PAGE_HERO_GEM_ADD:String = "PAGE_HERO_GEM_ADD"; + + public static const PAGE_HERO_GEM_DEL:String = "PAGE_HERO_GEM_DEL"; + + public static const PAGE_HERO_GEM_DELALL:String = "PAGE_HERO_GEM_DELALL"; + + public static const PAGE_QIANGHUA_VIEW:String = "PAGE_QIANGHUA_VIEW"; + + public static const PAGE_QIANGHUA:String = "PAGE_QIANGHUA"; + + public static const PAGE_EXCHANGE_VIEW:String = "PAGE_EXCHANGE_VIEW"; + + public static const PAGE_EXCHANGE_OK:String = "PAGE_EXCHANGE_OK"; + + public static const PAGE_STRONG_VIEW1:String = "PAGE_STRONG_VIEW1"; + + public static const PAGE_STRONG_PILIANG:String = "PAGE_STRONG_PILIANG"; + + public var itemList:Array; + + public var itemObj:Object; + + public var qianghuaObj:Object; + + public var comboxList:Array; + + public var result:int; + + public var msg:String; + + public function IronEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/item/ItemsService.as b/flash_decompiled/com/control/item/ItemsService.as new file mode 100644 index 0000000..085d28b --- /dev/null +++ b/flash_decompiled/com/control/item/ItemsService.as @@ -0,0 +1,193 @@ +package com.control.item +{ + import com.control.ConnectService; + import com.control.castle.event.CastleBuildEvent; + import com.control.castle.event.CastleEvent; + import com.control.castle.event.CastleWallEvent; + import com.control.castle.event.StrategyEvent; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.item.event.FastInfoEvent; + import com.control.item.event.ItemEvent; + import com.control.tech.event.TechUpEvent; + import com.data.data.city.CastleBuilding; + import com.data.data.items.AddSpeed; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.pak.data.PakState; + import com.view.ui.zhanqi.ZhanqiData; + import flash.net.registerClassAlias; + + public class ItemsService extends Connect + { + + registerClassAlias("AddSpeed",AddSpeed); + + public function ItemsService() + { + super(); + } + + public function getFastInfo(param1:AddSpeed) : void + { + var _loc2_:String = "com.huzi.item.action.ItemAction.getFastInfo"; + super.connect(_loc2_,this.getFastInfoResult,param1); + } + + private function getFastInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:FastInfoEvent = new FastInfoEvent(); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + if(_loc2_.result == ReturnBean.STATUS_0) + { + _loc3_.fastInfo = _loc2_.returnObj1 as AddSpeed; + } + super.dispatchEvent(_loc3_); + } + + public function addSpeed(param1:AddSpeed) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.item.action.ItemAction.fastSelectQuery"; + super.connect(_loc2_,this.addSpeedResult,param1); + } + + private function addSpeedResult(param1:Object) : void + { + var _loc4_:CastleBuilding = null; + var _loc5_:CastleBuildEvent = null; + var _loc6_:TechUpEvent = null; + var _loc7_:CastleWallEvent = null; + var _loc8_:StrategyEvent = null; + var _loc9_:CastleEvent = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:AddSpeed = _loc2_.returnObj1 as AddSpeed; + if(_loc3_.fastQueType == 1) + { + _loc4_ = _loc2_.returnObj2 as CastleBuilding; + _loc5_ = new CastleBuildEvent(CastleBuildEvent.ADD_SPEED_OK); + _loc5_.castleBuild = _loc4_; + super.dispatchEvent(_loc5_); + } + if(_loc3_.fastQueType == 2) + { + _loc6_ = new TechUpEvent(TechUpEvent.ADDSPEED_OK); + _loc6_.obj = _loc2_.returnObj2; + _loc6_.addSpeed = _loc3_; + super.dispatchEvent(_loc6_); + } + if(_loc3_.fastQueType == 3) + { + _loc7_ = new CastleWallEvent(CastleWallEvent.WALL_ADDSPEED); + _loc7_.wallObject = _loc2_.returnObj2; + _loc7_.addSpeed = _loc3_; + super.dispatchEvent(_loc7_); + } + if(_loc3_.fastQueType == 4) + { + _loc8_ = new StrategyEvent(StrategyEvent.Strategy_AddSpeed); + super.dispatchEvent(_loc8_); + } + if(_loc3_.fastQueType == 5) + { + _loc9_ = new CastleEvent(CastleEvent.CASTLE_addSpeedChangeCastle); + super.dispatchEvent(_loc9_); + } + ConnectService.getInstance().castleService.calcuDevData(); + } + + public function useItem(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.item.action.ItemAction.useItem"; + super.connect(_loc4_,this.useItemResult,param1,param2,param3); + } + + private function useItemResult(param1:Object) : void + { + var _loc5_:ItemEvent = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:ItemEvent = new ItemEvent(ItemEvent.Item_useItem); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + if(_loc3_.obj.castleEff) + { + _loc5_ = new ItemEvent(ItemEvent.Item_Castle_useItem); + super.dispatchEvent(_loc5_); + } + var _loc4_:int = int(_loc2_.returnObj1.itemId); + this.useItemBack(_loc4_); + } + + public function useBatchItem(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.item.action.ItemAction.useBatchItem"; + super.connect(_loc4_,this.useBatchItemResult,param1,param2,param3); + } + + private function useBatchItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:ItemEvent = new ItemEvent(ItemEvent.Item_useBatchItemResult); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + var _loc4_:int = int(_loc2_.returnObj1.itemId); + this.useItemBack(_loc4_); + } + + private function useItemBack(param1:int) : void + { + if(param1 == 10491000) + { + ZhanqiData.setNeedGetData(); + return; + } + if(param1 == 10372048 || Boolean(10372051)) + { + ConnectService.getInstance().homeService.getUserHomeMap(); + } + } + + public function decPropertyPoint(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.item.action.ItemAction.useBatchItemByType"; + super.connect(_loc3_,this.udecPropertyPointResult,param1,1,param2); + } + + private function udecPropertyPointResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ItemEvent = new ItemEvent(ItemEvent.Item_decPropertyPoint); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/item/event/FastInfoEvent.as b/flash_decompiled/com/control/item/event/FastInfoEvent.as new file mode 100644 index 0000000..fa053af --- /dev/null +++ b/flash_decompiled/com/control/item/event/FastInfoEvent.as @@ -0,0 +1,23 @@ +package com.control.item.event +{ + import com.data.data.items.AddSpeed; + import flash.events.Event; + + public class FastInfoEvent extends Event + { + + public static const GET_FASTINFO:String = "GET_FASTINFO"; + + public var fastInfo:AddSpeed; + + public var result:int; + + public var msg:String; + + public function FastInfoEvent() + { + super(GET_FASTINFO,true); + } + } +} + diff --git a/flash_decompiled/com/control/item/event/ItemEvent.as b/flash_decompiled/com/control/item/event/ItemEvent.as new file mode 100644 index 0000000..d452403 --- /dev/null +++ b/flash_decompiled/com/control/item/event/ItemEvent.as @@ -0,0 +1,30 @@ +package com.control.item.event +{ + import flash.events.Event; + + public class ItemEvent extends Event + { + + public static const Item_useItem:String = "Item_useItem"; + + public static const Item_useBatchItemResult:String = "Item_useBatchItemResult"; + + public static const Item_decPropertyPoint:String = "Item_decPropertyPoint"; + + public static const Item_Castle_useItem:String = "Item_Castle_useItem"; + + public var list:Array; + + public var obj:Object; + + public var msg:String; + + public var result:int; + + public function ItemEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/login/LoginService.as b/flash_decompiled/com/control/login/LoginService.as new file mode 100644 index 0000000..7d10d6f --- /dev/null +++ b/flash_decompiled/com/control/login/LoginService.as @@ -0,0 +1,132 @@ +package com.control.login +{ + import com.comfig.PathConfig; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.login.event.GetGameInfoEvent; + import com.control.login.event.LoginEvent; + import com.data.DataModoule; + import com.data.GameData; + import com.data.MemeberShip; + import com.data.data.account.Account; + import com.data.data.account.User; + import com.data.data.city.Castle; + import com.newdata.user.NewAccount; + import com.newdata.user.NewGuild; + import com.newdata.user.NewPop; + import com.newdata.user.NewRes; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.BaseBuild; + import com.view.ui.message.RebuildCastle; + import flash.net.registerClassAlias; + + public class LoginService extends Connect + { + + registerClassAlias("User",User); + registerClassAlias("Castle",Castle); + + public function LoginService() + { + super(); + } + + public function reg(param1:String, param2:String, param3:String, param4:Function) : void + { + var _loc5_:String = "com.huzi.base.action.AccountAction.RegAccount"; + super.connect(_loc5_,param4,param1,param2,param3); + } + + public function login(param1:Account) : void + { + var _loc2_:String = "com.huzi.base.action.AccountAction.loginInner"; + super.connect(_loc2_,this.loginSuccResult,param1.accName,param1.accPwd); + } + + private function loginSuccResult(param1:Object) : void + { + var _loc4_:NewAccount = null; + var _loc5_:uint = 0; + var _loc2_:ReturnBean = param1 as ReturnBean; + if(!Utils.isCanSee(PathConfig.getInstance().getServerIp(),BaseBuild._arr)) + { + return; + } + var _loc3_:LoginEvent = new LoginEvent(); + _loc3_.status = _loc2_.result; + _loc3_.msg = _loc2_.msg; + if(_loc2_.result == ReturnBean.STATUS_0) + { + _loc4_ = new NewAccount(_loc2_.returnObj1); + NewUserData.setAccount(_loc4_); + if(_loc4_.userId > 0) + { + _loc5_ = uint(_loc2_.returnObj1.getVipGift); + if(_loc5_ == 1) + { + MemeberShip.setVipGift(true); + } + } + } + super.dispatchEvent(_loc3_); + } + + public function testCreateUser(param1:User, param2:Function) : void + { + var _loc3_:String = "com.huzi.base.action.AccountAction.createUser"; + super.connect(_loc3_,param2,param1); + } + + public function createUser(param1:User, param2:Function) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.base.action.AccountAction.createUser"; + super.connect(_loc3_,param2,param1); + } + + public function getGameData() : void + { + var _loc1_:String = "com.huzi.base.action.AccountAction.getUserCastles"; + super.connect(_loc1_,this.getGameDataResult); + } + + private function getGameDataResult(param1:Object) : void + { + var _loc2_:Array = param1 as Array; + var _loc3_:Object = _loc2_.shift(); + var _loc4_:Castle = _loc3_.castle as Castle; + DataModoule.getInstance().userMgr.castle = _loc4_; + DataModoule.getInstance().userMgr.currentCastle = _loc4_; + var _loc5_:NewRes = new NewRes(_loc3_.castleRes); + NewUserData.setRes(_loc5_); + var _loc6_:NewPop = new NewPop(_loc3_.castlePop); + NewUserData.setNewPop(_loc6_); + var _loc7_:NewUser = new NewUser(_loc3_.userMap); + NewUserData.setUser(_loc7_); + DataModoule.getInstance().userMgr.castleArr = _loc2_; + var _loc8_:NewGuild = null; + if(_loc3_.guild) + { + _loc8_ = new NewGuild(_loc3_.guild); + } + NewUserData.setNewGuild(_loc8_); + var _loc9_:Array = _loc3_.itemList; + GameData.setItemList(_loc9_); + var _loc10_:Object = _loc3_.userRisk; + GameData.setUserRisk(_loc10_); + GameData.setUserHoliday(_loc3_.userActivity); + GameData.setHolidayAward(_loc3_.holidayAward); + GameData.setConfigMap(_loc3_.configMap); + var _loc11_:GetGameInfoEvent = new GetGameInfoEvent(); + super.dispatchEvent(_loc11_); + if(_loc4_.status == 1) + { + RebuildCastle.getInstance().addMessage("您当前的城池处于流亡状态"); + } + } + } +} + diff --git a/flash_decompiled/com/control/login/event/CreateUserEvent.as b/flash_decompiled/com/control/login/event/CreateUserEvent.as new file mode 100644 index 0000000..ea75a61 --- /dev/null +++ b/flash_decompiled/com/control/login/event/CreateUserEvent.as @@ -0,0 +1,20 @@ +package com.control.login.event +{ + import flash.events.Event; + + public class CreateUserEvent extends Event + { + + public static const CreateUser:String = "CreateUser"; + + public var result:int; + + public var msg:String; + + public function CreateUserEvent() + { + super(CreateUser,true); + } + } +} + diff --git a/flash_decompiled/com/control/login/event/GetGameInfoEvent.as b/flash_decompiled/com/control/login/event/GetGameInfoEvent.as new file mode 100644 index 0000000..7d01c92 --- /dev/null +++ b/flash_decompiled/com/control/login/event/GetGameInfoEvent.as @@ -0,0 +1,18 @@ +package com.control.login.event +{ + import flash.events.Event; + + public class GetGameInfoEvent extends Event + { + + public static const getData:String = "getLoginData"; + + public var list:Array; + + public function GetGameInfoEvent() + { + super(getData); + } + } +} + diff --git a/flash_decompiled/com/control/login/event/LoginEvent.as b/flash_decompiled/com/control/login/event/LoginEvent.as new file mode 100644 index 0000000..59cf060 --- /dev/null +++ b/flash_decompiled/com/control/login/event/LoginEvent.as @@ -0,0 +1,26 @@ +package com.control.login.event +{ + import com.data.data.account.Account; + import com.data.data.account.User; + import flash.events.Event; + + public class LoginEvent extends Event + { + + public static const Login:String = "Login"; + + public var status:int; + + public var msg:String; + + public var account:Account; + + public var user:User; + + public function LoginEvent() + { + super(Login,true); + } + } +} + diff --git a/flash_decompiled/com/control/map/MapService.as b/flash_decompiled/com/control/map/MapService.as new file mode 100644 index 0000000..34daa45 --- /dev/null +++ b/flash_decompiled/com/control/map/MapService.as @@ -0,0 +1,128 @@ +package com.control.map +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.map.event.MapEvent; + + public class MapService extends Connect + { + + public function MapService() + { + super(); + } + + public function getSelfMainCastle() : void + { + var _loc1_:String = "com.huzi.develop.action.MapAction.getSelfMainCastle"; + super.connect(_loc1_,this.getSelfMainCastleResult); + } + + private function getSelfMainCastleResult(param1:Object) : void + { + } + + public function findDefaultMapCells() : void + { + var _loc1_:String = "com.huzi.develop.action.MapAction.findDefaultMapCells"; + super.connect(_loc1_,this.findDefaultMapCellsResult); + } + + private function findDefaultMapCellsResult(param1:Object) : void + { + var _loc2_:Object = null; + for each(_loc2_ in param1) + { + } + } + + public function findMapCellsByPoint(param1:int, param2:int, param3:int) : void + { + var _loc4_:String = "com.huzi.develop.action.MapAction.findMapCellsByPoint"; + super.connect(_loc4_,this.findMapCellsByPointResult,param1,param2,param3); + } + + private function findMapCellsByPointResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MapEvent = new MapEvent(MapEvent.findMapCellsByPoint); + _loc3_.data = _loc2_.returnList1 as Array; + super.dispatchEvent(_loc3_); + } + + public function getCellToolTip(param1:int, param2:int, param3:String) : void + { + var _loc4_:String = "cellToolTip4UserCas"; + if(param3 == "USERCAS") + { + _loc4_ = "cellToolTip4UserCas"; + } + if(param3 == "CAPITAL") + { + _loc4_ = "cellToolTip4Capital"; + } + if(param3 == "PVE") + { + _loc4_ = "cellToolTip4Pve"; + } + var _loc5_:String = "com.huzi.develop.action.MapAction." + _loc4_; + super.connect(_loc5_,this.getCellToolTipResult,param1,param2); + } + + private function getCellToolTipResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MapEvent = new MapEvent(MapEvent.getCellToolTip); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getCastleByPos(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.develop.action.MapAction.getCastleByPos"; + super.connect(_loc3_,this.getCastleByPosResult,param1,param2); + } + + private function getCastleByPosResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MapEvent = new MapEvent(MapEvent.getCastleByPos); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.data = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getPveCastleByPos(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.develop.action.MapAction.getPveCastleByPos"; + super.connect(_loc3_,this.getPveCastleByPosResult,param1,param2); + } + + private function getPveCastleByPosResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MapEvent = new MapEvent(MapEvent.getPveCastleByPos); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/map/event/MapEvent.as b/flash_decompiled/com/control/map/event/MapEvent.as new file mode 100644 index 0000000..3e8753d --- /dev/null +++ b/flash_decompiled/com/control/map/event/MapEvent.as @@ -0,0 +1,30 @@ +package com.control.map.event +{ + import flash.events.Event; + + public class MapEvent extends Event + { + + public static const findMapCellsByPoint:String = "findMapCellsByPoint"; + + public static const getCellToolTip:String = "getCellToolTip"; + + public static const getCastleByPos:String = "getCastleByPos"; + + public static const getPveCastleByPos:String = "getPveCastleByPos"; + + public var data:Array; + + public var obj:Object; + + public var result:int; + + public var msg:String; + + public function MapEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/message/MessageService.as b/flash_decompiled/com/control/message/MessageService.as new file mode 100644 index 0000000..470a766 --- /dev/null +++ b/flash_decompiled/com/control/message/MessageService.as @@ -0,0 +1,211 @@ +package com.control.message +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.message.event.MessEvent; + import com.view.mc.sprite.LoadingMc; + + public class MessageService extends Connect + { + + public function MessageService() + { + super(); + } + + public function deleteReaded(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.MessageAction.deleteReadedMessage"; + super.connect(_loc2_,this.deleteReadedResult,param1); + } + + private function deleteReadedResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_delReadMessage); + super.dispatchEvent(_loc3_); + } + + public function getDaoJun(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.function.action.MessageAction.getAppendix"; + super.connect(_loc2_,this.getDaoJunResult,param1); + } + + private function getDaoJunResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_getDaoJun); + super.dispatchEvent(_loc3_); + } + + public function readMessageList(param1:int, param2:int, param3:int, param4:int) : void + { + var _loc5_:String = "com.huzi.function.action.MessageAction.getMessageByType"; + var _loc6_:Object = new Object(); + _loc6_.type = param1 + ""; + _loc6_.pageNo = param2 + ""; + _loc6_.sendFlag = param3 + ""; + _loc6_.messageType = param4 + ""; + super.connect(_loc5_,this.readMessageListResult,_loc6_); + } + + private function readMessageListResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_getMessageByType); + _loc3_.list = _loc2_.returnList1; + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function viewMessage(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.MessageAction.viewMessage"; + super.connect(_loc2_,this.viewMessageResult,param1); + } + + private function viewMessageResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_getMessageView); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function readMessage(param1:int = 0, param2:* = 0) : * + { + } + + public function readCount(param1:int, param2:int, param3:int) : void + { + var _loc4_:String = "com.huzi.function.action.MessageAction.getMessageCount"; + var _loc5_:Object = new Object(); + _loc5_.type = param1 + ""; + _loc5_.sendFlag = param2 + ""; + _loc5_.messageType = param3 + ""; + super.connect(_loc4_,this.readCountResult,_loc5_); + } + + private function readCountResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_getMessageCount); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function deleteMessage(param1:Array, param2:* = 0) : void + { + var _loc3_:String = "com.huzi.function.action.MessageAction.deleteReceiveMessageSelect"; + super.connect(_loc3_,this.deleteMessageResult,param1); + } + + private function deleteMessageResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_delMessage); + super.dispatchEvent(_loc3_); + } + + public function oneKeyGetMess(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.function.action.MessageAction.oneKeyGetMess"; + super.connect(_loc2_,this.oneKeyGetMessResult,param1); + } + + private function oneKeyGetMessResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_delMessage); + super.dispatchEvent(_loc3_); + } + + public function deleteMessageOne(param1:int, param2:* = 0) : void + { + var _loc3_:String = "com.huzi.function.action.MessageAction.deleteReceiveMessage"; + super.connect(_loc3_,this.deleteMessageOneResult,param1); + } + + private function deleteMessageOneResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_delOneMessage); + super.dispatchEvent(_loc3_); + } + + public function addMessage(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.function.action.MessageAction.createNewCommonMessage4Flash"; + super.connect(_loc2_,this.addMessageResult,param1); + } + + private function addMessageResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_addMessage); + super.dispatchEvent(_loc3_); + } + + public function readBattleMessage(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.MessageAction.getWarMessageById"; + super.connect(_loc2_,this.readBattleMessageResult,param1); + } + + private function readBattleMessageResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MessEvent = new MessEvent(MessEvent.Mess_readBattleMessage); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/message/event/MessEvent.as b/flash_decompiled/com/control/message/event/MessEvent.as new file mode 100644 index 0000000..169ecf8 --- /dev/null +++ b/flash_decompiled/com/control/message/event/MessEvent.as @@ -0,0 +1,36 @@ +package com.control.message.event +{ + import flash.events.Event; + + public class MessEvent extends Event + { + + public static const Mess_getMessageByType:String = "Mess_getMessageByType"; + + public static const Mess_getMessageView:String = "Mess_getMessageView"; + + public static const Mess_readBattleMessage:String = "Mess_readBattleMessage"; + + public static const Mess_getMessageCount:String = "Mess_getMessageCount"; + + public static const Mess_delOneMessage:String = "Mess_delOneMessage"; + + public static const Mess_delMessage:String = "Mess_delMessage"; + + public static const Mess_delReadMessage:String = "Mess_delReadMessage"; + + public static const Mess_addMessage:String = "Mess_addMessage"; + + public static const Mess_getDaoJun:String = "Mess_getDaoJun"; + + public var list:Array; + + public var obj:Object; + + public function MessEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/mission/MissionService.as b/flash_decompiled/com/control/mission/MissionService.as new file mode 100644 index 0000000..dc01eef --- /dev/null +++ b/flash_decompiled/com/control/mission/MissionService.as @@ -0,0 +1,324 @@ +package com.control.mission +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.mission.event.MissionEvent; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.pak.data.PakState; + + public class MissionService extends Connect + { + + private var srvname1:String = "com.huzi.mission.action.DailyMissionAction."; + + private var srvname2:String = "com.huzi.mission.action.ActionMissionAction."; + + private var showHonorGift_srv:String = "showHonorGift"; + + private var srvname:String = "com.huzi.mission.action.MissionAction."; + + public function MissionService() + { + super(); + } + + public function getUserDailyMissionList(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "getUserDailyMissionList"; + super.connect(this.srvname1 + _loc2_,this.getUserDailyMissionListResult,param1); + } + + private function getUserDailyMissionListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_getUserDailyMissionList); + _loc3_.list = _loc2_.returnList1; + _loc3_.list2 = _loc2_.returnList2; + super.dispatchEvent(_loc3_); + } + + public function showUserMissionByType(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "showUserMissionByType"; + super.connect(this.srvname + _loc2_,this.showUserMissionByTypeResult,param1); + } + + private function showUserMissionByTypeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_showUserMissionByType); + _loc3_.list = _loc2_.returnList1; + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function showUserLeagueMissionByType(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "showUserLeagueMissionByType"; + super.connect(this.srvname + _loc2_,this.showUserLeagueMissionByTypeResult,param1); + } + + private function showUserLeagueMissionByTypeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_showUserLeagueMissionByType); + _loc3_.list = _loc2_.returnList1; + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + super.dispatchEvent(_loc3_); + } + + public function actDailyMission(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "actDailyMission"; + super.connect(this.srvname1 + _loc2_,this.actDailyMissionResult,param1); + } + + private function actDailyMissionResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_actDailyMission); + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + super.dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + ConnectService.getInstance().castleService.getUserData(); + } + } + + public function addSpeedActDailyMission(param1:int) : void + { + var _loc2_:String = "addSpeedActDailyMission"; + super.connect(this.srvname1 + _loc2_,this.addSpeedMissionBack,param1); + LoadingMc.getInstance().show(); + } + + private function addSpeedMissionBack(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_addSpeed); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function listAllActionMission() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "listAllActionMission"; + super.connect(this.srvname2 + _loc1_,this.listAllActionMissionResult); + } + + private function listAllActionMissionResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_listAllActionMission); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function commitMission(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "commitMission"; + super.connect(this.srvname + _loc2_,this.commitMissionResult,param1); + } + + private function commitMissionResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_commitMission); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.calcuDevData(); + PakState.setGetPackListStatus(); + } + + public function commitMissionWithCash(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "commitMissionNow"; + super.connect(this.srvname + _loc2_,this.commitMissionNowResult,param1); + } + + private function commitMissionNowResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_commitMissionCash); + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.calcuDevData(); + } + + public function showHonorGift() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "showHonorGift"; + super.connect(this.srvname + _loc1_,this.showHonorGiftResult); + } + + private function showHonorGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_showHonorGift); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function changeHonorMission(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "changeHonorMission"; + super.connect(this.srvname + _loc2_,this.changeHonorMissionResult,param1); + } + + private function changeHonorMissionResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_changeHonorMission); + super.dispatchEvent(_loc3_); + } + + public function gainHonorGift(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "gainHonorGift"; + super.connect(this.srvname + _loc2_,this.gainHonorGiftResult,param1); + } + + private function gainHonorGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_gainHonorGift); + super.dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + + public function showOneLeagueMission(param1:int, param2:int) : void + { + var _loc3_:String = "showOneLeagueMission"; + super.connect(this.srvname + _loc3_,this.showOneLeagueMissionResult,param1,param2); + } + + private function showOneLeagueMissionResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_showOneLeagueMission); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function commitLeagueMission(param1:int, param2:int) : * + { + LoadingMc.getInstance().show(); + var _loc3_:String = "commitLeagueMission"; + super.connect(this.srvname + _loc3_,this.commitLeagueMissionResult,param1,param2); + } + + private function commitLeagueMissionResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_commitLeagueMission); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + ConnectService.getInstance().castleService.calcuDevData(); + } + } + + public function commitActionMission(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "commitActionMission"; + super.connect(this.srvname2 + _loc2_,this.commitActionMissionResult,param1); + } + + private function commitActionMissionResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:MissionEvent = new MissionEvent(MissionEvent.Miss_commitActionMission); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + } +} + diff --git a/flash_decompiled/com/control/mission/event/MissionEvent.as b/flash_decompiled/com/control/mission/event/MissionEvent.as new file mode 100644 index 0000000..23f9654 --- /dev/null +++ b/flash_decompiled/com/control/mission/event/MissionEvent.as @@ -0,0 +1,52 @@ +package com.control.mission.event +{ + import flash.events.Event; + + public class MissionEvent extends Event + { + + public static const Miss_getUserDailyMissionList:String = "Miss_getUserDailyMissionList"; + + public static const Miss_actDailyMission:String = "Miss_actDailyMission"; + + public static const Miss_listAllActionMission:String = "Miss_listAllActionMission"; + + public static const Miss_showUserMissionByType:String = "Miss_showUserMissionByType"; + + public static const Miss_commitMission:String = "Miss_commitMission"; + + public static const Miss_commitMissionCash:String = "Miss_commitMissionCash"; + + public static const Miss_showHonorGift:String = "Miss_showHonorGift"; + + public static const Miss_changeHonorMission:String = "Miss_changeHonorMission"; + + public static const Miss_gainHonorGift:String = "Miss_gainHonorGift"; + + public static const Miss_showUserLeagueMissionByType:String = "Miss_showUserLeagueMissionByType"; + + public static const Miss_showOneLeagueMission:String = "Miss_showOneLeagueMission"; + + public static const Miss_commitLeagueMission:String = "Miss_commitLeagueMission"; + + public static const Miss_commitActionMission:String = "Miss_commitActionMission"; + + public static const Miss_addSpeed:String = "Miss_addSpeed"; + + public var list:Array; + + public var obj:Object; + + public var list2:Array; + + public var msg:String; + + public var result:int; + + public function MissionEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/pack/PackService.as b/flash_decompiled/com/control/pack/PackService.as new file mode 100644 index 0000000..10f1d96 --- /dev/null +++ b/flash_decompiled/com/control/pack/PackService.as @@ -0,0 +1,322 @@ +package com.control.pack +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.pack.event.UserPackEvent; + import com.newdata.hero.NewHeroData; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.hero.data.ChaoFuData; + import com.view.ui.pak.data.PakState; + + public class PackService extends Connect + { + + public function PackService() + { + super(); + } + + public function equipEqById(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.equipEqById"; + super.connect(_loc2_,this.equipEqByIdResult,param1); + } + + private function equipEqByIdResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus1(); + NewHeroData.setGetHeroListStatus(); + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.USER_EQUIP_EQ); + super.dispatchEvent(_loc3_); + } + + public function setUnEqu(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.setUnEqu"; + super.connect(_loc2_,this.setUnEquResult,param1); + } + + private function setUnEquResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus1(); + NewHeroData.setGetHeroListStatus(); + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.USER_EQUIP_EQ); + super.dispatchEvent(_loc3_); + } + + public function getAllUserItemList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.function.action.TreasuryAction.getAllUserItemList"; + super.connect(_loc1_,this.getAllUserItemListResult); + } + + private function getAllUserItemListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.USER_EQUIP_LIST); + _loc3_.equipList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getItemListByType() : void + { + var _loc1_:String = "com.huzi.function.action.TreasuryAction.getItemListByType"; + super.connect(_loc1_,this.getItemListByTypeResult); + } + + private function getItemListByTypeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + } + + public function getEquipListByType(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.TreasuryAction.getEquipListByType"; + super.connect(_loc2_,this.getEquipListByTypeResult,param1); + } + + private function getEquipListByTypeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.USER_PACK_EQUIP_LIST); + _loc3_.equipList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function throwItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.function.action.TreasuryAction.throwTreasury"; + super.connect(_loc2_,this.throwItemResult,param1); + } + + private function throwItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.PACK_throwItemResult); + super.dispatchEvent(_loc3_); + } + + public function getElementTip(param1:String) : void + { + var _loc2_:String = "com.huzi.function.action.TreasuryAction.getShowTip"; + super.connect(_loc2_,this.getElementTipResult,param1); + } + + private function getElementTipResult(param1:Object) : void + { + var _loc2_:UserPackEvent = new UserPackEvent(UserPackEvent.PACK_getElementTip); + _loc2_.packObject = param1; + super.dispatchEvent(_loc2_); + } + + public function getItemByChildType(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.TreasuryAction.getItemByChildType"; + super.connect(_loc2_,this.getItemByChildTypeResult,param1); + } + + private function getItemByChildTypeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.PACK_getItemByChildType); + _loc3_.equipList = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getCardNum(param1:int) : void + { + var _loc2_:String = "com.huzi.function.action.TreasuryAction.getCardNum"; + super.connect(_loc2_,this.getCardNumResult,param1); + } + + private function getCardNumResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.PACK_getCardNum); + _loc3_.packObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getExchangeList(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ExchangeAction.getExchangeItemList"; + super.connect(_loc2_,this.getExchangeListResult,param1); + } + + private function getExchangeListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:int = int(_loc2_.returnObj1); + var _loc4_:Array = _loc2_.returnList1; + PakState.setExchangeList(_loc3_,_loc4_); + } + + public function getExchangeItemById(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ExchangeAction.getShowExchange"; + super.connect(_loc2_,this.getExchangeItemByIdResult,param1); + } + + private function getExchangeItemByIdResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.Exchange_getItemById); + _loc3_.packObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function exchangeItem(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.ExchangeAction.exchangeItem"; + super.connect(_loc3_,this.exchangeItemResult,param1,param2); + } + + private function exchangeItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.Exchange_exchangeItem); + super.dispatchEvent(_loc3_); + } + + public function getAwardView() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.function.action.TreasuryAction.getAwardView"; + super.connect(_loc1_,this.getAwardViewResult); + } + + private function getAwardViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.USER_AWARD); + _loc3_.packObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function exchangeAward(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.function.action.TreasuryAction.exchangeAward"; + super.connect(_loc2_,this.exchangeAwardResult,param1); + } + + private function exchangeAwardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.USER_AWARD_EXCHANGE); + super.dispatchEvent(_loc3_); + } + + public function getAllChaofuItemList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.function.action.TreasuryAction.getAllChaofuItemList"; + super.connect(_loc1_,this.getAllChaofuItemListResult); + } + + private function getAllChaofuItemListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ChaoFuData.setPackList(_loc2_.returnList1); + } + + public function deleteAllTreasury(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.function.action.TreasuryAction.deleteAllTreasury"; + super.connect(_loc2_,this.deleteAllTreasuryResult,param1); + } + + private function deleteAllTreasuryResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + var _loc3_:UserPackEvent = new UserPackEvent(UserPackEvent.PACK_throwItemAllResult); + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/pack/event/UserPackEvent.as b/flash_decompiled/com/control/pack/event/UserPackEvent.as new file mode 100644 index 0000000..c4158da --- /dev/null +++ b/flash_decompiled/com/control/pack/event/UserPackEvent.as @@ -0,0 +1,48 @@ +package com.control.pack.event +{ + import flash.events.Event; + + public class UserPackEvent extends Event + { + + public static const USER_PACK_LIST_BYTYPE:String = "USER_PACK_LIST_BYTYPE"; + + public static const USER_PACK_EQUIP_LIST:String = "USER_PACK_EQUIP_LIST"; + + public static const PACK_throwItemResult:String = "PACK_throwItemResult"; + + public static const PACK_throwItemAllResult:String = "PACK_throwItemAllResult"; + + public static const PACK_getElementTip:String = "PACK_getElementTip"; + + public static const PACK_getItemByChildType:String = "PACK_getItemByChildType"; + + public static const PACK_getCardNum:String = "PACK_getCardNum"; + + public static const Exchange_getItemList:String = "Exchange_getItemList"; + + public static const Exchange_getItemById:String = "Exchange_getItemById"; + + public static const Exchange_exchangeItem:String = "Exchange_exchangeItem"; + + public static const USER_EQUIP_LIST:String = "USER_EQUIP_LIST"; + + public static const USER_EQUIP_EQ:String = "USER_EQUIP_EQ"; + + public static const USER_AWARD:String = "USER_AWARD"; + + public static const USER_AWARD_EXCHANGE:String = "USER_AWARD_EXCHANGE"; + + public var packObject:Object; + + public var equipList:Array; + + public var _type:int; + + public function UserPackEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/play/BabelService.as b/flash_decompiled/com/control/play/BabelService.as new file mode 100644 index 0000000..6cc6b7e --- /dev/null +++ b/flash_decompiled/com/control/play/BabelService.as @@ -0,0 +1,917 @@ +package com.control.play +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.play.event.BabelEvent; + import com.control.play.event.BeautyEvent; + import com.control.play.event.RichesEvent; + import com.data.data.battle.DimensionCombatCode; + import com.data.data.battle.DimensionCombatTeam; + import com.data.data.battle.DimensionCombatTroop; + import com.events.DevEvent; + import com.newdata.hero.NewHeroData; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.babel.StageItemData; + import com.view.ui.bigboss.BigBossData; + import com.view.ui.buff.BuffManager; + import com.view.ui.riches.RichesData; + import flash.net.registerClassAlias; + + public class BabelService extends Connect + { + + registerClassAlias("DimensionCombatTeam",DimensionCombatTeam); + registerClassAlias("DimensionCombatCode",DimensionCombatCode); + registerClassAlias("DimensionCombatTroop",DimensionCombatTroop); + + public function BabelService() + { + super(); + } + + public function entryBabel() : void + { + var _loc1_:String = "com.huzi.play.action.BabelAction.entryBabel"; + super.connect(_loc1_,this.entryBabelResult); + } + + private function entryBabelResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.ENTER_BABEL); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getStageAward() : void + { + var _loc1_:String = null; + if(StageItemData.getAwardList().length == 0) + { + _loc1_ = "com.huzi.play.action.BabelAction.getStageAward"; + super.connect(_loc1_,this.getStageAwardResult); + } + } + + private function getStageAwardResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + StageItemData.setAwardList(_loc2_.returnObj1.itemAwardList); + } + + public function useAddExp() : void + { + var _loc1_:String = "com.huzi.play.action.BabelAction.useAddExp"; + super.connect(_loc1_,this.useAddExpResult); + LoadingMc.getInstance().show(); + } + + private function useAddExpResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ConnectService.getInstance().castleService.getUserData(); + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_ADDEXP); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function useBabelRecover() : void + { + var _loc1_:String = "com.huzi.play.action.BabelAction.useBabelRecover"; + super.connect(_loc1_,this.useBabelRecoverResult); + LoadingMc.getInstance().show(); + } + + private function useBabelRecoverResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ConnectService.getInstance().castleService.getUserData(); + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_ADDRECOVER); + super.dispatchEvent(_loc3_); + } + + public function useDoubleDrop() : void + { + var _loc1_:String = "com.huzi.play.action.BabelAction.useDoubleDrop"; + super.connect(_loc1_,this.useDoubleDropResult); + LoadingMc.getInstance().show(); + } + + private function useDoubleDropResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ConnectService.getInstance().castleService.getUserData(); + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_DOUBLEDROP); + super.dispatchEvent(_loc3_); + } + + public function selectRound(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.BabelAction.selectRound"; + super.connect(_loc2_,this.selectRoundResult,param1); + } + + private function selectRoundResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.ENTER_BABEL_SelectRound); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getPreCombatDetail() : void + { + var _loc1_:String = "com.huzi.play.action.BabelAction.getPreCombatDetail"; + super.connect(_loc1_,this.getPreCombatDetailResult); + } + + private function getPreCombatDetailResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.ENTER_BABEL_VIEW); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function changeHero(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.BabelAction.changeChallengeHero"; + super.connect(_loc2_,this.changeHeroResult,param1); + } + + private function changeHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.ENTER_BABEL_CHANGEHERO); + super.dispatchEvent(_loc3_); + } + + public function startCombat(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.BabelAction.startCombat"; + super.connect(_loc2_,this.startCombatResult,param1); + } + + private function startCombatResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_STARTCOMBAT); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function getDimensionCombatById(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.combat.action.CombatAction.getDimensionCombatById"; + super.connect(_loc2_,this.getDimensionCombatByIdResult,param1); + } + + private function getDimensionCombatByIdResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_COMBAT_VIEW); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function treatAllHero() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.BabelAction.treatAllHero"; + super.connect(_loc1_,this.treatAllHeroResult); + } + + private function treatAllHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + NewHeroData.setGetHeroListStatus(); + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_TREAT_HERO); + super.dispatchEvent(_loc3_); + } + + public function saveAutoConfig(param1:Object) : void + { + var _loc2_:String = "com.huzi.play.action.BabelAction.saveAutoConfig"; + super.connect(_loc2_,this.saveAutoConfigResult,param1); + } + + private function saveAutoConfigResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_AUTO_SAVE); + super.dispatchEvent(_loc3_); + } + + public function startCombatAuto(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.BabelAction.startCombatAuto"; + super.connect(_loc2_,this.startCombatAutoResult,param1); + } + + private function startCombatAutoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_AUTO_START); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function stopAutoCombat() : void + { + var _loc1_:String = "com.huzi.play.action.BabelAction.stopAutoCombat"; + super.connect(_loc1_,this.stopAutoCombatResult); + } + + private function stopAutoCombatResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_AUTO_STOP); + super.dispatchEvent(_loc3_); + } + + public function stopChallenge() : void + { + var _loc1_:String = "com.huzi.play.action.BabelAction.stopChallenge"; + super.connect(_loc1_,this.stopChallengeResult); + } + + private function stopChallengeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_EXIT); + super.dispatchEvent(_loc3_); + } + + public function entryRiches(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.RichesAction.entryRiches"; + super.connect(_loc2_,this.entryRichesResult,param1); + } + + private function entryRichesResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + RichesData.setStageAwardList(_loc2_.returnObj1.itemAwardList); + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.ENTER_RICHES); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function selectRichesRound(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.RichesAction.selectRound"; + super.connect(_loc2_,this.selectRichesRoundResult,param1); + } + + private function selectRichesRoundResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.ENTER_RICHES_SelectRound); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getRichesPreCombatDetail() : void + { + var _loc1_:String = "com.huzi.play.action.RichesAction.getPreCombatDetail"; + super.connect(_loc1_,this.getRichesPreCombatDetailResult); + } + + private function getRichesPreCombatDetailResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.ENTER_RICHES_VIEW); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function stopRichesChallenge() : void + { + var _loc1_:String = "com.huzi.play.action.RichesAction.stopChallenge"; + super.connect(_loc1_,this.stopRichesChallengeResult); + } + + private function stopRichesChallengeResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.BABEL_RICHES_EXIT); + super.dispatchEvent(_loc3_); + } + + public function stopRichesAutoCombat() : void + { + var _loc1_:String = "com.huzi.play.action.RichesAction.stopAutoCombat"; + super.connect(_loc1_,this.stopRichesAutoCombatResult); + } + + private function stopRichesAutoCombatResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.BABEL_RICHES_AUTO_STOP); + super.dispatchEvent(_loc3_); + } + + public function startRichesCombatAuto(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.RichesAction.startCombatAuto"; + super.connect(_loc2_,this.startRichesCombatAutoResult,param1); + } + + private function startRichesCombatAutoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.BABEL_AUTO_START); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function treatRichesAllHero() : void + { + var _loc1_:String = "com.huzi.play.action.RichesAction.treatAllHero"; + super.connect(_loc1_,this.treatRichesAllHeroResult); + } + + private function treatRichesAllHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.BABEL_TREAT_HERO); + super.dispatchEvent(_loc3_); + } + + public function changeRichesHero(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.RichesAction.changeChallengeHero"; + super.connect(_loc2_,this.changeRichesHeroResult,param1); + } + + private function changeRichesHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.ENTER_BABEL_CHANGEHERO); + super.dispatchEvent(_loc3_); + } + + public function startRichesCombat(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.RichesAction.startCombat"; + super.connect(_loc2_,this.startRichesCombatResult,param1); + } + + private function startRichesCombatResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.BABEL_STARTCOMBAT); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function saveRichesAutoConfig(param1:Object) : void + { + var _loc2_:String = "com.huzi.play.action.RichesAction.saveAutoConfig"; + super.connect(_loc2_,this.saveRichesAutoConfigResult,param1); + } + + private function saveRichesAutoConfigResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.BABEL_AUTO_SAVE); + super.dispatchEvent(_loc3_); + } + + public function startFastCombat(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.BabelAction.fastPlayBabel"; + super.connect(_loc2_,this.startFastCombatResult,param1); + } + + private function startFastCombatResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_FASTFIGHT); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + if(NewUserData.getUser().viplevel < 3) + { + ConnectService.getInstance().castleService.getUserData(); + } + } + + public function onekeyplay(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.BabelAction.onkeyPlay"; + super.connect(_loc2_,this.onekeyplayResult,param1); + } + + private function onekeyplayResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_FASTFIGHT); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + if(NewUserData.getUser().viplevel < 3) + { + ConnectService.getInstance().castleService.getUserData(); + } + } + + public function tenkeyplay(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.BabelAction.tenkeyPlay"; + super.connect(_loc2_,this.tenkeyplayResult,param1); + } + + private function tenkeyplayResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_FASTFIGHT); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + if(NewUserData.getUser().viplevel < 3) + { + ConnectService.getInstance().castleService.getUserData(); + } + } + + public function fivekeyplay(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.BabelAction.fivekeyPlay"; + super.connect(_loc2_,this.fivekeyPlayResult,param1); + } + + private function fivekeyPlayResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_FASTFIGHT); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + if(NewUserData.getUser().viplevel < 3) + { + ConnectService.getInstance().castleService.getUserData(); + } + } + + public function oneKeyPlayBabel(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.BabelAction.oneKeyPlayBabel"; + super.connect(_loc2_,this.oneKeyPlayBabelResult,param1); + } + + private function oneKeyPlayBabelResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BabelEvent = new BabelEvent(BabelEvent.BABEL_FASTFIGHT); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + if(NewUserData.getUser().viplevel < 3) + { + ConnectService.getInstance().castleService.getUserData(); + } + } + + public function useDoubleDrop1() : void + { + var _loc1_:String = "com.huzi.play.action.RichesAction.useDoubleDrop"; + super.connect(_loc1_,this.useDoubleDrop1Result); + LoadingMc.getInstance().show(); + } + + private function useDoubleDrop1Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ConnectService.getInstance().castleService.getUserData(); + var _loc3_:RichesEvent = new RichesEvent(RichesEvent.BABEL_DOUBLESET); + super.dispatchEvent(_loc3_); + } + + public function enterBeauty() : void + { + var _loc1_:String = "com.huzi.play.action.BeautyAction.enterMain"; + super.connect(_loc1_,this.enterBeautyResult); + LoadingMc.getInstance().show(); + } + + private function enterBeautyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BeautyEvent = new BeautyEvent(BeautyEvent.ENTER_BEAUTY); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function activityBeauty(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.BeautyAction.activityBeauty"; + super.connect(_loc2_,this.activityResult,param1); + LoadingMc.getInstance().show(); + } + + private function activityResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BeautyEvent = new BeautyEvent(BeautyEvent.ACTIVITY_BEAUTY); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function activityBeauty1() : void + { + var _loc1_:String = "com.huzi.play.action.BeautyAction.activateBeauty"; + super.connect(_loc1_,this.activateBeautyResult); + LoadingMc.getInstance().show(); + } + + private function activateBeautyResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BeautyEvent = new BeautyEvent(BeautyEvent.ENTER_BEAUTY); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function levelUp(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.play.action.BeautyAction.levelUp"; + super.connect(_loc3_,this.levelUpResult,param1,param2); + LoadingMc.getInstance().show(); + } + + private function levelUpResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BeautyEvent = new BeautyEvent(BeautyEvent.LEVELUP_BEAUTY); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + var _loc4_:Boolean = Boolean(_loc2_.returnObj2); + if(_loc4_) + { + NewHeroData.setGetHeroListStatus(); + } + } + + public function useSkill(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.BeautyAction.useSkill"; + super.connect(_loc2_,this.useSkillResult,param1); + LoadingMc.getInstance().show(); + } + + private function useSkillResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BeautyEvent = new BeautyEvent(BeautyEvent.LEVELUP_BEAUTY); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + BuffManager.getInstance().update(); + NewHeroData.setGetHeroListStatus(); + } + + public function stopSkill(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.BeautyAction.stopSkill"; + super.connect(_loc2_,this.stopSkillResult,param1); + LoadingMc.getInstance().show(); + } + + private function stopSkillResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:BeautyEvent = new BeautyEvent(BeautyEvent.LEVELUP_BEAUTY); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + BuffManager.getInstance().update(); + NewHeroData.setGetHeroListStatus(); + } + + public function startRiFastCombat(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.RichesAction.fastPlayBabel"; + super.connect(_loc2_,this.startFastRCombatResult,param1); + } + + private function startFastRCombatResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function onekeyplay2(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.RichesAction.onekeyplay"; + super.connect(_loc2_,this.onekeyplay2Result,param1); + } + + private function onekeyplay2Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function tenkeyplay2(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.RichesAction.tenkeyplay"; + super.connect(_loc2_,this.tenkeyplay2Result,param1); + } + + private function tenkeyplay2Result(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function enterBigBoss(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.BossAction.entryBossMain"; + super.connect(_loc2_,this.enterBigBossResult,param1); + } + + private function enterBigBossResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + if(_loc2_.returnObj1.bossList) + { + BigBossData.setBossList(_loc2_.returnObj1.bossList); + BigBossData.setSuccBegin(_loc2_.returnObj1.SUCC_BEGIN); + BigBossData.setSuccAdd(_loc2_.returnObj1.SUCC_ADD); + BigBossData.setFailBegin(_loc2_.returnObj1.FAIL_BEGIN); + } + if(_loc2_.returnObj1.warStatus == 0) + { + BigBossData.setWarTime(); + } + BigBossData.setUserBossData(_loc2_.returnObj1); + } + + public function changeHeroBossHero(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.BossAction.changeChallengeHero"; + super.connect(_loc2_,this.changeHeroBossHeroResult,param1); + } + + private function changeHeroBossHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.BOSS_CHANGEHERO)); + } + + public function treatHeroBossHero() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.BossAction.treatHero"; + super.connect(_loc1_,this.treatHeroBossHeroResult); + } + + private function treatHeroBossHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.BOSS_TREATHERO)); + } + + public function startBossWar(param1:Array, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.BossAction.startCombat"; + super.connect(_loc3_,this.startBossWarResult,param1,param2); + } + + private function startBossWarResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + BigBossData.setWarData(_loc2_.returnObj1); + } + } +} + diff --git a/flash_decompiled/com/control/play/HexagramService.as b/flash_decompiled/com/control/play/HexagramService.as new file mode 100644 index 0000000..76ca9f9 --- /dev/null +++ b/flash_decompiled/com/control/play/HexagramService.as @@ -0,0 +1,161 @@ +package com.control.play +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.play.event.HexagramEvent; + import com.view.mc.sprite.LoadingMc; + + public class HexagramService extends Connect + { + + public function HexagramService() + { + super(); + } + + public function testHall() : void + { + } + + private function testHallResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + } + + public function enterHall() : void + { + var _loc1_:String = "com.huzi.play.action.HexagramAction.enterHall"; + super.connect(_loc1_,this.enterHallResult); + } + + private function enterHallResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HexagramEvent = new HexagramEvent(HexagramEvent.ENTER_HEXAGRAM); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function joinHall(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HexagramAction.joinHall"; + super.connect(_loc2_,this.joinHallResult,param1); + } + + private function joinHallResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HexagramEvent = new HexagramEvent(HexagramEvent.ENTER_HEXAGRAM); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function leaveHall() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HexagramAction.leaveHall"; + super.connect(_loc1_,this.leaveHallResult); + } + + private function leaveHallResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HexagramEvent = new HexagramEvent(HexagramEvent.ENTER_LEAVEHALL); + super.dispatchEvent(_loc3_); + } + + public function refreshHallInfo(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.HexagramAction.refreshHallInfo"; + super.connect(_loc2_,this.refreshHallInfoResult,param1); + } + + private function refreshHallInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HexagramEvent = new HexagramEvent(HexagramEvent.ENTER_REFRESH); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function findPageByRoomNum(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.HexagramAction.findPageByRoomNum"; + super.connect(_loc2_,this.findPageByRoomNumResult,param1); + } + + private function findPageByRoomNumResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HexagramEvent = new HexagramEvent(HexagramEvent.ENTER_SEARCHROOM); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function joinRoom(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.play.action.HexagramAction.joinRoom"; + super.connect(_loc3_,this.joinRoomResult,param1,param2); + } + + private function joinRoomResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HexagramEvent = new HexagramEvent(HexagramEvent.ENTER_JOINROOM); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function fight4Hex(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.play.action.HexagramAction.fight4Hex"; + super.connect(_loc3_,this.fight4HexResult,param1,param2); + } + + private function fight4HexResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HexagramEvent = new HexagramEvent(HexagramEvent.ENTER_REFRESH); + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/play/LeagueService.as b/flash_decompiled/com/control/play/LeagueService.as new file mode 100644 index 0000000..ef32b09 --- /dev/null +++ b/flash_decompiled/com/control/play/LeagueService.as @@ -0,0 +1,199 @@ +package com.control.play +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.play.event.LeagueEvent; + import com.view.mc.sprite.LoadingMc; + + public class LeagueService extends Connect + { + + public function LeagueService() + { + super(); + } + + public function getEntryInfo(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.LeagueAction.getEntryInfo"; + super.connect(_loc2_,this.getEntryInfoResult,param1); + } + + private function getEntryInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_INFO); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function enterHall() : void + { + var _loc1_:String = "com.huzi.play.action.LeagueAction.enterHall"; + super.connect(_loc1_,this.enterHallResult); + } + + private function enterHallResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_EnterWithoutCommit); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function changeHeroList(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.LeagueAction.changeHeroList"; + super.connect(_loc2_,this.changeHeroResult,param1); + } + + private function changeHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_CHANGEHERO); + super.dispatchEvent(_loc3_); + } + + public function refreshHallInfo() : void + { + var _loc1_:String = "com.huzi.play.action.LeagueAction.refreshHallInfo"; + super.connect(_loc1_,this.getHallInfoResult); + } + + private function getHallInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_REFRESHHALLINFO); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function joinLeague(param1:int, param2:Array) : void + { + var _loc3_:String = "com.huzi.play.action.LeagueAction.joinLeague"; + super.connect(_loc3_,this.joinLeagueResult,param1,param2); + } + + private function joinLeagueResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_JOIN); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function leaveHall() : void + { + var _loc1_:String = "com.huzi.play.action.LeagueAction.leaveHall"; + super.connect(_loc1_,this.leaveHallResult); + } + + private function leaveHallResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_LEAVE); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getRankInfo(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.play.action.LeagueAction.getLeagueRankListFromCache"; + super.connect(_loc3_,this.getRankInfoResult,param1,param2); + } + + private function getRankInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_getRankInfo); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getMyRankInfo() : void + { + var _loc1_:String = "com.huzi.play.action.LeagueAction.getMyLeagueRank"; + super.connect(_loc1_,this.getMyRankInfoResult); + } + + private function getMyRankInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_getRankInfo); + _loc3_.obj = _loc2_.returnMap1; + super.dispatchEvent(_loc3_); + } + + public function getNameRankInfo(param1:String) : void + { + var _loc2_:String = "com.huzi.play.action.LeagueAction.getLeagueRankListLikeName"; + super.connect(_loc2_,this.getNameRankInfoResult,param1); + } + + private function getNameRankInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_getRankInfo); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function addJunGong() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.LeagueAction.addJunGong"; + super.connect(_loc1_,this.addJunGongResult); + } + + private function addJunGongResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:LeagueEvent = new LeagueEvent(LeagueEvent.LEAGUE_addJunGong); + super.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/play/PlayService.as b/flash_decompiled/com/control/play/PlayService.as new file mode 100644 index 0000000..d0928aa --- /dev/null +++ b/flash_decompiled/com/control/play/PlayService.as @@ -0,0 +1,1349 @@ +package com.control.play +{ + import com.control.ConnectService; + import com.control.battle.event.BattleViewEvent; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.play.event.CountryEvent; + import com.control.play.event.HeroBabelEvent; + import com.control.play.event.PlayEvent; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.data.data.battle.PveHero; + import com.data.data.battleview.Fight; + import com.data.data.battleview.FighterData; + import com.data.data.battleview.Impact; + import com.events.DevEvent; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.data.UserPetData; + import com.view.ui.zhanqi.ZhanqiData; + import flash.net.registerClassAlias; + + public class PlayService extends Connect + { + + registerClassAlias("Fight",Fight); + registerClassAlias("Fighter",FighterData); + registerClassAlias("Impact",Impact); + registerClassAlias("PveHero",PveHero); + + private var type:int = 1; + + public function PlayService() + { + super(); + } + + public function entryBabel() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HeroBabelAction.entryBabel"; + super.connect(_loc1_,this.entryBabelResult); + } + + private function entryBabelResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.ENTER_BABEL); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + super.dispatchEvent(_loc3_); + } + + public function joinBattle(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HeroBabelAction.joinBattle"; + super.connect(_loc2_,this.joinBattleResult,param1); + } + + private function joinBattleResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_JOIN); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function changeHero(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.HeroBabelAction.changeHero"; + super.connect(_loc2_,this.changeHeroResult,param1); + } + + private function changeHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_CHANGEHERO); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function treatHero(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.HeroBabelAction.treatHero"; + super.connect(_loc2_,this.treatHeroResult,param1); + } + + private function treatHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_TREATHERO); + super.dispatchEvent(_loc3_); + } + + public function saveAutoConfig(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.play.action.HeroBabelAction.saveAutoConfig"; + super.connect(_loc3_,this.saveAutoConfigResult,param1,param2); + } + + private function saveAutoConfigResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_AUTOSET); + super.dispatchEvent(_loc3_); + } + + public function startCombatAuto(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.HeroBabelAction.startCombatAuto"; + super.connect(_loc2_,this.startCombatAutoResult,param1); + } + + private function startCombatAutoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_AUTOSET_RESULT); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function stopChallenge() : void + { + var _loc1_:String = "com.huzi.play.action.HeroBabelAction.stopChallenge"; + super.connect(_loc1_,this.stopChallengeResult); + } + + private function stopChallengeResult(param1:Object) : void + { + var _loc2_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_BACK); + super.dispatchEvent(_loc2_); + } + + public function startCombat(param1:int) : void + { + var _loc2_:String = "com.huzi.play.action.HeroBabelAction.startCombat"; + super.connect(_loc2_,this.startCombatResult,param1); + } + + private function startCombatResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_START); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function refreshBattle() : void + { + var _loc1_:String = "com.huzi.play.action.HeroBabelAction.refreshBattle"; + super.connect(_loc1_,this.refreshBattleResult); + } + + private function refreshBattleResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_REFRESH); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function stopAutoCombat() : void + { + var _loc1_:String = "com.huzi.play.action.HeroBabelAction.stopAutoCombat"; + super.connect(_loc1_,this.stopAutoCombatResult); + } + + private function stopAutoCombatResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_STOPAUTO); + super.dispatchEvent(_loc3_); + } + + public function getFightById(param1:String) : void + { + var _loc2_:String = "com.huzi.combat.action.CombatAction.getFightById"; + super.connect(_loc2_,this.getFightByIdResult,param1); + } + + private function getFightByIdResult(param1:Object) : void + { + var _loc4_:Fight = null; + var _loc2_:ReturnBean = param1 as ReturnBean; + var _loc3_:BattleViewEvent = new BattleViewEvent(BattleViewEvent.BATTLE_VIEW_BYFIGHTID); + if(_loc2_.result == ReturnBean.STATUS_4) + { + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + } + else + { + _loc3_.result = ReturnBean.STATUS_0; + _loc4_ = new Fight(); + _loc4_.atkFighter = _loc2_.returnObj1.atkFight; + _loc4_.dfcFighter = _loc2_.returnObj1.defFight; + _loc4_.codes = _loc2_.returnObj1.codes; + _loc4_.fightId = _loc2_.returnObj1.fightId; + _loc4_.winResult = _loc2_.returnObj1.winResult; + _loc4_.roundNum = _loc2_.returnObj1.winResult; + _loc4_.sendNum = _loc2_.returnObj1.sendNum; + _loc3_.fight = _loc4_; + } + dispatchEvent(_loc3_); + } + + public function enterHeroBoss(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.HeroBossAction.entryHeroBoss"; + super.connect(_loc2_,this.enterHeroBossResult,param1); + } + + private function enterHeroBossResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_HeroBoss_enter); + _loc3_.obj = _loc2_.returnObj1; + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + super.dispatchEvent(_loc3_); + } + + public function changeHeroBossHero(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.HeroBossAction.changeChallengeHero"; + super.connect(_loc2_,this.changeHeroBossHeroResult,param1); + } + + private function changeHeroBossHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_HeroBoss_changeHero); + super.dispatchEvent(_loc3_); + } + + public function treatHeroBossHero() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HeroBossAction.treatHero"; + super.connect(_loc1_,this.treatHeroBossHeroResult); + } + + private function treatHeroBossHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_HeroBoss_treatHero); + super.dispatchEvent(_loc3_); + } + + public function startBossFight() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HeroBossAction.startCombat"; + super.connect(_loc1_,this.startBossFightResult); + } + + private function startBossFightResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_HeroBoss_startFight); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getDailyGift() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HeroBossAction.getDailyGift"; + super.connect(_loc1_,this.getDailyGiftResult); + } + + private function getDailyGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_HeroBoss_getDailyGift); + super.dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + + public function getRankGift() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.HeroBossAction.getRankGift"; + super.connect(_loc1_,this.getRankGiftResult); + } + + private function getRankGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:HeroBabelEvent = new HeroBabelEvent(HeroBabelEvent.BATTLE_HeroBoss_getRankGift); + super.dispatchEvent(_loc3_); + PakState.setGetPackListStatus(); + } + + public function entryMain() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.CountryGovAction.entryMain"; + super.connect(_loc1_,this.entryMainResult,this.type); + } + + private function entryMainResult(param1:Object) : void + { + if(this.type == 1) + { + this.type = 0; + } + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_entryMain); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getForbidList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.CountryGovAction.getCountryForbidList"; + super.connect(_loc1_,this.getForbidListResult); + } + + private function getForbidListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_getForbidList); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function forbidUser(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.CountryGovAction.forbidUser"; + super.connect(_loc2_,this.forbidUserResult,param1); + } + + private function forbidUserResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_forbidUser); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function cancelForbidUser(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.CountryGovAction.cancelForbidUser"; + super.connect(_loc2_,this.cancelForbidUserResult,param1); + } + + private function cancelForbidUserResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_cancelforbidUser); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function entryGovSet() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.CountryGovAction.entryGovSet"; + super.connect(_loc1_,this.entryGovSetResult); + } + + private function entryGovSetResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_enterGovSet); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function govSet(param1:String, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.CountryGovAction.govSet"; + super.connect(_loc3_,this.govSetResult,param1,param2); + } + + private function govSetResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_govSet); + super.dispatchEvent(_loc3_); + } + + public function delGovSet(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.CountryGovAction.delGovSet"; + super.connect(_loc2_,this.delGovSetResult,param1); + } + + private function delGovSetResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_govDelSet); + super.dispatchEvent(_loc3_); + } + + public function getEventList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.CountryGovAction.getEventList"; + super.connect(_loc1_,this.getEventListResult); + } + + private function getEventListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_getEventList); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getNoticeTimes() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.CountryGovAction.getNoticeTimes"; + super.connect(_loc1_,this.getNoticeTimesResult); + } + + private function getNoticeTimesResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_getNoticeTimes); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function sendNotice(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.CountryGovAction.sendNotice"; + super.connect(_loc2_,this.sendNoticeResult,param1); + } + + private function sendNoticeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_sendNotice); + super.dispatchEvent(_loc3_); + } + + public function editAnnounce(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.CountryGovAction.editAnnounce"; + super.connect(_loc2_,this.editAnnounceResult,param1); + } + + private function editAnnounceResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_editAnnounce); + super.dispatchEvent(_loc3_); + } + + public function viewCountryGov(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.CountryGovAction.viewCountryGov"; + super.connect(_loc2_,this.viewCountryGovResult,param1); + } + + private function viewCountryGovResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_viewCountryGov); + _loc2_.obj = param1; + super.dispatchEvent(_loc2_); + } + + public function quitKingGov(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.CountryGovAction.quitKingGov"; + super.connect(_loc2_,this.quitKingGovResult,param1); + } + + private function quitKingGovResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_quitKingGov); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function quitGov() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.CountryGovAction.quitGov"; + super.connect(_loc1_,this.quitGovResult); + } + + private function quitGovResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_quitGov); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function getCountryLogList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.CountryGovAction.getCountryLog"; + super.connect(_loc1_,this.getCountryLogResult); + } + + private function getCountryLogResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:CountryEvent = new CountryEvent(CountryEvent.COUNTRY_logList); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function saveCopyHeros(param1:Array) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.CopyHeroAction.saveCopyHeros"; + super.connect(_loc2_,this.saveCopyHerosResult,param1); + } + + private function saveCopyHerosResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + NewHeroData.setAllCopyHeroList(_loc3_); + var _loc4_:PlayEvent = new PlayEvent(PlayEvent.COPYHERO_SAVE_OK); + super.dispatchEvent(_loc4_); + } + + public function enterHuiWuMain() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.CopyHeroAction.enterMain"; + super.connect(_loc1_,this.enterHuiWuMainResult); + } + + private function enterHuiWuMainResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.HUIWU_ENTERMAIN); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getGiftItem() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.CopyHeroAction.getDailyItem"; + super.connect(_loc1_,this.getGiftItemResult); + } + + private function getGiftItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.HUIWU_ENTERMAIN); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function startCopyCombat(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.CopyHeroAction.startCombat"; + super.connect(_loc2_,this.startCopyCombatResult,param1); + } + + private function startCopyCombatResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.HUIWU_COMBAT_RESULT); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getHuiwuRankListFromCache(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.getHuiwuRankListFromCache"; + super.connect(_loc2_,this.getHuiwuRankListFromCacheResult,param1); + } + + private function getHuiwuRankListFromCacheResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_huiwuRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function enterZhanqi() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ZhanqiAction.enterMain"; + super.connect(_loc1_,this.enterZhanqiResult); + } + + private function enterZhanqiResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ZhanqiData.setZhanqiData(_loc2_.returnObj1); + } + + public function useByType(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.useByType"; + super.connect(_loc2_,this.useByTypeResult,param1); + } + + private function useByTypeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ZhanqiData.setZhanqiData(_loc2_.returnObj1); + NewHeroData.setGetHeroListStatus(); + } + + public function unUseByType(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.unUseByType"; + super.connect(_loc2_,this.unUseByTypeResult,param1); + } + + private function unUseByTypeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ZhanqiData.setZhanqiData(_loc2_.returnObj1); + NewHeroData.setGetHeroListStatus(); + } + + public function fenpei(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.ZhanqiAction.fenpei"; + super.connect(_loc3_,this.fenpeiResult,param1,param2); + } + + private function fenpeiResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ZhanqiData.setZhanqiData(_loc2_.returnObj1); + } + + public function upByTpe(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.ZhanqiAction.upZhanqiByType"; + super.connect(_loc3_,this.upByTpeResult,param1,param2); + } + + private function upByTpeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + ZhanqiData.setZhanqiData(_loc2_.returnObj1); + } + + public function viewPetMain() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ZhanqiAction.enterPetMain"; + super.connect(_loc1_,this.enterPetMainResult); + } + + private function enterPetMainResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + UserPetData.setPetData(_loc2_.returnObj1); + } + + public function upPetCount(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.upPetCount"; + super.connect(_loc2_,this.upPetCountResult,param1); + } + + private function upPetCountResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + UserPetData.setPetData(_loc2_.returnObj1); + } + + public function upPetPro(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.upPetPro"; + super.connect(_loc2_,this.upPetProResult,param1); + } + + private function upPetProResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + UserPetData.setPetData(_loc2_.returnObj1); + NewHeroData.setGetHeroListStatus(); + } + + public function upSuperPetPro(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.upSuperPetPro"; + super.connect(_loc2_,this.upSuperPetProResult,param1); + } + + private function upSuperPetProResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + UserPetData.setPetData(_loc2_.returnObj1); + NewHeroData.setGetHeroListStatus(); + } + + public function upLastPetPro(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.upLastPetPro"; + super.connect(_loc2_,this.upLastPetProResult,param1); + } + + private function upLastPetProResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + UserPetData.setPetData(_loc2_.returnObj1); + NewHeroData.setGetHeroListStatus(); + } + + public function fenJiePetItem(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.fenJie"; + super.connect(_loc2_,this.fenJieResult,param1); + } + + private function fenJieResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.PET_ITEM_FENJIE); + _loc3_.obj = _loc2_.returnObj2; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getPetItem() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ZhanqiAction.getPetItem"; + super.connect(_loc1_,this.getPetItemResult); + } + + private function getPetItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + UserPetData.setPetItemData(_loc2_.returnList1); + } + + public function upPetItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.upPetItem"; + super.connect(_loc2_,this.upPetItemResult,param1); + } + + private function upPetItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + var _loc3_:PlayEvent = new PlayEvent(PlayEvent.PET_ITEM_UP); + Utils.g_events.dispatchEvent(_loc3_); + } + + public function addPetItemRole(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.addPetItemRole"; + super.connect(_loc2_,this.addPetItemRoleResult,param1); + } + + private function addPetItemRoleResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + UserPetData.setPetItemList(_loc2_.returnList1); + var _loc3_:String = _loc2_.msg; + MessageBoxUI.getInstance().addMessage(_loc3_); + } + + public function upPetBaoshi(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.ZhanqiAction.upPetBaoshi"; + super.connect(_loc3_,this.upPetBaoshiResult,param1,param2); + } + + private function upPetBaoshiResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + } + + public function getUserPetItemList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.ZhanqiAction.getUserPetItemList"; + super.connect(_loc1_,this.getUserPetItemListResult); + } + + private function getUserPetItemListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + UserPetData.setPetItemList(_loc2_.returnList1); + } + + public function addPetItemRoleBijou(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.play.action.ZhanqiAction.addPetItemRoleBijou"; + super.connect(_loc4_,this.addPetItemRoleBijouResult,param1,param2,param3); + } + + private function addPetItemRoleBijouResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + UserPetData.setPetItemList(_loc2_.returnList1); + } + + public function outAllPetItemRoleBijou(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.outAllPetItemRoleBijou"; + super.connect(_loc2_,this.outAllPetItemRoleBijouResult,param1); + } + + private function outAllPetItemRoleBijouResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + UserPetData.setPetItemList(_loc2_.returnList1); + } + + public function outPetItemRoleBijou(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.ZhanqiAction.outPetItemRoleBijou"; + super.connect(_loc3_,this.outPetItemRoleBijouResult,param1,param2); + } + + private function outPetItemRoleBijouResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj1); + UserPetData.setPetItemList(_loc2_.returnList1); + } + + public function equPetItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.equPetItem"; + super.connect(_loc2_,this.equPetItemResult,param1); + } + + private function equPetItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj2); + UserPetData.setPetData(_loc2_.returnObj1); + NewHeroData.setGetHeroListStatus(); + } + + public function unEquPetItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.ZhanqiAction.unEquPetItem"; + super.connect(_loc2_,this.unEquPetItemResult,param1); + } + + private function unEquPetItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setPackData(_loc2_.returnObj2); + UserPetData.setPetData(_loc2_.returnObj1); + NewHeroData.setGetHeroListStatus(); + } + + public function enterMineMain() : void + { + var _loc1_:String = "com.huzi.play.action.PlayAction.enterMineMain"; + super.connect(_loc1_,this.enterMineMainResult); + } + + private function enterMineMainResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnList1; + GameData.setMineList(_loc3_); + } + + public function getMineInfo(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.PlayAction.getMineInfo"; + super.connect(_loc2_,this.getMineInfoResult,param1); + } + + private function getMineInfoResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_MINE_INFO); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function startGrabMine(param1:int, param2:Array) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.PlayAction.startGrabMine"; + super.connect(_loc3_,this.startGrabMineResult,param1,param2); + } + + private function startGrabMineResult(param1:Object) : void + { + var _loc4_:DevEvent = null; + var _loc5_:Array = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:String = _loc2_.returnObj1.result; + if(_loc3_ == "ATTACKER") + { + MessageBoxUI.getInstance().addMessage("成功抢夺到该矿场"); + _loc4_ = new DevEvent(DevEvent.EVENT_MINE_FIGHT); + _loc4_.obj = _loc2_.returnObj1.mineInfo; + Utils.g_events.dispatchEvent(_loc4_); + _loc5_ = _loc2_.returnObj1.mineList; + GameData.setMineList(_loc5_); + } + else + { + MessageBoxUI.getInstance().addMessage("抢夺失败"); + } + } + + public function getMineRes(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.PlayAction.getMineRes"; + super.connect(_loc2_,this.getMineResResult,param1); + } + + private function getMineResResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_MINE_INFO); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + MessageBoxUI.getInstance().addMessage("收获成功,资源已通过邮件发送到您的邮箱"); + } + + public function changeMineHeroList(param1:int, param2:Array) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.PlayAction.changeMineHeroList"; + super.connect(_loc3_,this.changeMineHeroListResult,param1,param2); + } + + private function changeMineHeroListResult(param1:Object) : void + { + var _loc3_:Array = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + if(_loc2_.returnObj1.mineList) + { + _loc3_ = _loc2_.returnObj1.mineList; + GameData.setMineList(_loc3_); + MessageBoxUI.getInstance().addMessage("成功丢弃该矿"); + } + else + { + MessageBoxUI.getInstance().addMessage("更换成功"); + } + } + + public function enterLuckBoxMain() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.PlayAction.enterLuckBoxMain"; + super.connect(_loc1_,this.enterLuckBoxMainResult); + } + + private function enterLuckBoxMainResult(param1:Object) : void + { + var _loc3_:DevEvent = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + _loc3_ = new DevEvent(DevEvent.EVENT_LUCKBOX_DATA); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + _loc3_ = new DevEvent(DevEvent.EVENT_LUCKBOX_USERDATA); + _loc3_.obj = _loc2_.returnObj2; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function openLuckBox(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.PlayAction.openLuckBox"; + super.connect(_loc2_,this.openLuckBoxResult,param1); + } + + private function openLuckBoxResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_LUCKBOX_OPENBOX); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_LUCKBOX_USERDATA); + _loc4_.obj = _loc2_.returnObj2; + Utils.g_events.dispatchEvent(_loc4_); + } + + public function getUserLuckBoxMap() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.PlayAction.getUserLuckBoxMap"; + super.connect(_loc1_,this.getUserLuckBoxMapResult); + } + + private function getUserLuckBoxMapResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_LUCKBOX_USERDATA); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/play/event/BabelEvent.as b/flash_decompiled/com/control/play/event/BabelEvent.as new file mode 100644 index 0000000..33d4d94 --- /dev/null +++ b/flash_decompiled/com/control/play/event/BabelEvent.as @@ -0,0 +1,57 @@ +package com.control.play.event +{ + import com.data.data.battle.BabelCombat; + import flash.events.Event; + + public class BabelEvent extends Event + { + + public static const ENTER_BABEL:String = "ENTER_BABEL"; + + public static const ENTER_BABEL_SelectRound:String = "ENTER_BABEL_SelectRound"; + + public static const ENTER_BABEL_VIEW:String = "ENTER_BABEL_VIEW"; + + public static const ENTER_BABEL_CHANGEHERO:String = "ENTER_BABEL_CHANGEHERO"; + + public static const BABEL_STARTCOMBAT:String = "BABEL_STARTCOMBAT"; + + public static const BABEL_COMBAT_VIEW:String = "BABEL_COMBAT_VIEW"; + + public static const BABEL_TREAT_HERO:String = "BABEL_TREAT_HERO"; + + public static const BABEL_AUTO_SAVE:String = "BABEL_AUTO_SAVE"; + + public static const BABEL_AUTO_STOP:String = "BABEL_AUTO_STOP"; + + public static const BABEL_AUTO_START:String = "BABEL_AUTO_START"; + + public static const BABEL_EXIT:String = "BABEL_EXIT"; + + public static const BABEL_ADDEXP:String = "BABEL_ADDEXP"; + + public static const BABEL_ADDRECOVER:String = "BABEL_ADDRECOVER"; + + public static const BABEL_FASTFIGHT:String = "BABEL_FASTFIGHT"; + + public static const BABEL_AWARDLIST:String = "BABEL_AWARDLIST"; + + public static const BABEL_DOUBLEDROP:String = "BABEL_DOUBLEDROP"; + + public static const BABEL_FASTRFIGHT:String = "BABEL_FASTRFIGHT"; + + public var obj:Object; + + public var result:int; + + public var msg:String; + + public var combat:BabelCombat; + + public function BabelEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/play/event/BeautyEvent.as b/flash_decompiled/com/control/play/event/BeautyEvent.as new file mode 100644 index 0000000..7b9bc27 --- /dev/null +++ b/flash_decompiled/com/control/play/event/BeautyEvent.as @@ -0,0 +1,22 @@ +package com.control.play.event +{ + import flash.events.Event; + + public class BeautyEvent extends Event + { + + public static const ENTER_BEAUTY:String = "ENTER_BEAUTY"; + + public static const ACTIVITY_BEAUTY:String = "ACTIVITY_BEAUTY"; + + public static const LEVELUP_BEAUTY:String = "LEVELUP_BEAUTY"; + + public var obj:Object; + + public function BeautyEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/play/event/CountryEvent.as b/flash_decompiled/com/control/play/event/CountryEvent.as new file mode 100644 index 0000000..75101af --- /dev/null +++ b/flash_decompiled/com/control/play/event/CountryEvent.as @@ -0,0 +1,48 @@ +package com.control.play.event +{ + import flash.events.Event; + + public class CountryEvent extends Event + { + + public static const COUNTRY_entryMain:String = "COUNTRY_entryMain"; + + public static const COUNTRY_getForbidList:String = "COUNTRY_getForbidList"; + + public static const COUNTRY_forbidUser:String = "COUNTRY_forbidUser"; + + public static const COUNTRY_cancelforbidUser:String = "COUNTRY_cancelforbidUser"; + + public static const COUNTRY_enterGovSet:String = "COUNTRY_enterGovSet"; + + public static const COUNTRY_govSet:String = "COUNTRY_govSet"; + + public static const COUNTRY_govDelSet:String = "COUNTRY_govDelSet"; + + public static const COUNTRY_getEventList:String = "COUNTRY_getEventList"; + + public static const COUNTRY_getNoticeTimes:String = "COUNTRY_getNoticeTimes"; + + public static const COUNTRY_sendNotice:String = "COUNTRY_sendNotice"; + + public static const COUNTRY_editAnnounce:String = "COUNTRY_editAnnounce"; + + public static const COUNTRY_viewCountryGov:String = "COUNTRY_viewCountryGov"; + + public static const COUNTRY_quitKingGov:String = "COUNTRY_quitKingGov"; + + public static const COUNTRY_quitGov:String = "COUNTRY_quitGov"; + + public static const COUNTRY_logList:String = "COUNTRY_logList"; + + public var obj:Object; + + public var list:Array; + + public function CountryEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/play/event/HellEvent.as b/flash_decompiled/com/control/play/event/HellEvent.as new file mode 100644 index 0000000..f91e31a --- /dev/null +++ b/flash_decompiled/com/control/play/event/HellEvent.as @@ -0,0 +1,44 @@ +package com.control.play.event +{ + import flash.events.Event; + + public class HellEvent extends Event + { + + public static const ENTER_RICHES:String = "ENTER_RICHES"; + + public static const HELL_SELECTROUND:String = "HELL_SELECTROUND"; + + public static const HELL_EXIT:String = "HELL_EXIT"; + + public static const HELL_ENTER:String = "HELL_ENTER"; + + public static const HELL_DOUBLESET:String = "HELL_DOUBLESET"; + + public static const HELL_CHANGEHERO:String = "HELL_CHANGEHERO"; + + public static const HELL_TREATHERO:String = "HELL_TREATHERO"; + + public static const HELL_AUTO_SAVE:String = "HELL_AUTO_SAVE"; + + public static const HELL_AUTO_START:String = "HELL_AUTO_START"; + + public static const HELL_STARTCOMBAT:String = "HELL_STARTCOMBAT"; + + public static const HELL_ADDEXP:String = "HELL_ADDEXP"; + + public static const BABEL_AWARDLIST:String = "BABEL_AWARDLIST"; + + public var obj:Object; + + public var result:int; + + public var msg:String; + + public function HellEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/play/event/HeroBabelEvent.as b/flash_decompiled/com/control/play/event/HeroBabelEvent.as new file mode 100644 index 0000000..6c44741 --- /dev/null +++ b/flash_decompiled/com/control/play/event/HeroBabelEvent.as @@ -0,0 +1,52 @@ +package com.control.play.event +{ + import flash.events.Event; + + public class HeroBabelEvent extends Event + { + + public static const ENTER_BABEL:String = "ENTER_BABEL"; + + public static const BATTLE_START:String = "BATTLE_START"; + + public static const BATTLE_CHANGEHERO:String = "BATTLE_CHANGEHERO"; + + public static const BATTLE_TREATHERO:String = "BATTLE_TREATHERO"; + + public static const BATTLE_AUTOSET:String = "BATTLE_AUTOSET"; + + public static const BATTLE_BACK:String = "BATTLE_BACK"; + + public static const BATTLE_JOIN:String = "BATTLE_JOIN"; + + public static const BATTLE_REFRESH:String = "BATTLE_REFRESH"; + + public static const BATTLE_AUTOSET_RESULT:String = "BATTLE_AUTOSET_RESULT"; + + public static const BATTLE_STOPAUTO:String = "BATTLE_STOPAUTO"; + + public static const BATTLE_HeroBoss_enter:String = "BATTLE_HeroBoss_enter"; + + public static const BATTLE_HeroBoss_changeHero:String = "BATTLE_HeroBoss_changeHero"; + + public static const BATTLE_HeroBoss_treatHero:String = "BATTLE_HeroBoss_treatHero"; + + public static const BATTLE_HeroBoss_startFight:String = "BATTLE_HeroBoss_startFight"; + + public static const BATTLE_HeroBoss_getDailyGift:String = "BATTLE_HeroBoss_getDailyGift"; + + public static const BATTLE_HeroBoss_getRankGift:String = "BATTLE_HeroBoss_getRankGift"; + + public var obj:Object; + + public var msg:String; + + public var result:int; + + public function HeroBabelEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/play/event/HexagramEvent.as b/flash_decompiled/com/control/play/event/HexagramEvent.as new file mode 100644 index 0000000..899f3d8 --- /dev/null +++ b/flash_decompiled/com/control/play/event/HexagramEvent.as @@ -0,0 +1,30 @@ +package com.control.play.event +{ + import flash.events.Event; + + public class HexagramEvent extends Event + { + + public static const ENTER_HEXAGRAM:String = "ENTER_HEXAGRAM"; + + public static const ENTER_LEAVEHALL:String = "ENTER_LEAVEHALL"; + + public static const ENTER_REFRESH:String = "ENTER_REFRESH"; + + public static const ENTER_SEARCHROOM:String = "ENTER_SEARCHROOM"; + + public static const ENTER_JOINROOM:String = "ENTER_JOINROOM"; + + public var obj:Object; + + public var result:int; + + public var msg:String; + + public function HexagramEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/play/event/LeagueEvent.as b/flash_decompiled/com/control/play/event/LeagueEvent.as new file mode 100644 index 0000000..f63f737 --- /dev/null +++ b/flash_decompiled/com/control/play/event/LeagueEvent.as @@ -0,0 +1,36 @@ +package com.control.play.event +{ + import flash.events.Event; + + public class LeagueEvent extends Event + { + + public static const LEAGUE_INFO:String = "LEAGUE_INFO"; + + public static const LEAGUE_EnterWithoutCommit:String = "LEAGUE_EnterWithoutCommit"; + + public static const LEAGUE_CHANGEHERO:String = "LEAGUE_CHANGEHERO"; + + public static const LEAGUE_REFRESHHALLINFO:String = "LEAGUE_REFRESHHALLINFO"; + + public static const LEAGUE_JOIN:String = "LEAGUE_JOIN"; + + public static const LEAGUE_LEAVE:String = "LEAGUE_LEAVE"; + + public static const LEAGUE_getRankInfo:String = "LEAGUE_getRankInfo"; + + public static const LEAGUE_addJunGong:String = "LEAGUE_addJunGong"; + + public var obj:Object; + + public var result:int; + + public var msg:String; + + public function LeagueEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/play/event/PlayEvent.as b/flash_decompiled/com/control/play/event/PlayEvent.as new file mode 100644 index 0000000..d753b37 --- /dev/null +++ b/flash_decompiled/com/control/play/event/PlayEvent.as @@ -0,0 +1,76 @@ +package com.control.play.event +{ + import flash.events.Event; + + public class PlayEvent extends Event + { + + public static const HUIWU_ENTERMAIN:String = "HUIWU_ENTERMAIN"; + + public static const COPYHERO_SAVE_OK:String = "COPYHERO_SAVE_OK"; + + public static const HUIWU_COMBAT_RESULT:String = "HUIWU_COMBAT_RESULT"; + + public static const WORLDBOSS_COMBAT_RESULT:String = "WORLDBOSS_COMBAT_RESULT"; + + public static const WORLDBOSS_RANK_DATA:String = "WORLDBOSS_RANK_DATA"; + + public static const WORLDBOSS_GET_DAILYITEM:String = "WORLDBOSS_GET_DAILYITEM"; + + public static const WORLDBOSS_GET_RANKITEM:String = "WORLDBOSS_GET_RANKITEM"; + + public static const WORLDBOSS_GET_FINALITEM:String = "WORLDBOSS_GET_FINALITEM"; + + public static const WORLDBOSS_GUWU:String = "WORLDBOSS_GUWU"; + + public static const WORLDBOSS_XUNBAO:String = "WORLDBOSS_XUNBAO"; + + public static const ZHANQI_ENTERMAIN:String = "ZHANQI_ENTERMAIN"; + + public static const PET_ENTERMAIN:String = "PET_ENTERMAIN"; + + public static const PET_ITEM_FENJIE:String = "PET_ITEM_FENJIE"; + + public static const PET_ITEM_DATA:String = "PET_ITEM_DATA"; + + public static const PET_ITEM_UP:String = "PET_ITEM_UP"; + + public static const PET_ITEMLIST_DATA:String = "PET_ITEMLIST_DATA"; + + public static const GAMEPLAY_SAVEHEROS:String = "GAMEPLAY_SAVEHEROS"; + + public static const GAMEPLAY_TOPLIST:String = "GAMEPLAY_TOPLIST"; + + public static const GAMEPLAY_enterMain:String = "GAMEPLAY_enterMain"; + + public static const GAMEPLAY_StartCombat:String = "GAMEPLAY_StartCombat"; + + public static const GAMEPLAY_MESSLIST:String = "GAMEPLAY_MESSLIST"; + + public static const GAMEPLAY_ITEMLIST:String = "GAMEPLAY_ITEMLIST"; + + public static const MATCH_enterMain:String = "MATCH_enterMain"; + + public static const MATCH_getMatchMap:String = "MATCH_getMatchMap"; + + public static const MATCH_getMatchReward:String = "MATCH_getMatchReward"; + + public static const MATCH_getUserMatchReward:String = "MATCH_getUserMatchReward"; + + public static const MATCH_getItemResult:String = "MATCH_getItemResult"; + + public var obj:Object; + + public var result:int; + + public var msg:String; + + public var list:Array; + + public function PlayEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/play/event/RichesEvent.as b/flash_decompiled/com/control/play/event/RichesEvent.as new file mode 100644 index 0000000..77a4a1c --- /dev/null +++ b/flash_decompiled/com/control/play/event/RichesEvent.as @@ -0,0 +1,45 @@ +package com.control.play.event +{ + import com.data.data.battle.BabelCombat; + import flash.events.Event; + + public class RichesEvent extends Event + { + + public static const ENTER_RICHES:String = "ENTER_RICHES"; + + public static const ENTER_RICHES_SelectRound:String = "ENTER_RICHES_SelectRound"; + + public static const ENTER_RICHES_VIEW:String = "ENTER_RICHES_VIEW"; + + public static const BABEL_RICHES_EXIT:String = "BABEL_RICHES_EXIT"; + + public static const BABEL_RICHES_AUTO_STOP:String = "BABEL_RICHES_AUTO_STOP"; + + public static const BABEL_AUTO_START:String = "BABEL_RICHES_AUTO_START"; + + public static const BABEL_TREAT_HERO:String = "BABEL_RICHES_TREAT_HERO"; + + public static const ENTER_BABEL_CHANGEHERO:String = "ENTER_RICHES_BABEL_CHANGEHERO"; + + public static const BABEL_STARTCOMBAT:String = "BABEL_RICHES_STARTCOMBAT"; + + public static const BABEL_AUTO_SAVE:String = "BABEL_RICHES_AUTO_SAVE"; + + public static const BABEL_DOUBLESET:String = "BABEL_DOUBLESET"; + + public var obj:Object; + + public var result:int; + + public var msg:String; + + public var combat:BabelCombat; + + public function RichesEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/province/ProvinceService.as b/flash_decompiled/com/control/province/ProvinceService.as new file mode 100644 index 0000000..85960dc --- /dev/null +++ b/flash_decompiled/com/control/province/ProvinceService.as @@ -0,0 +1,402 @@ +package com.control.province +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.province.event.ProvinceEvent; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.pak.data.PakState; + + public class ProvinceService extends Connect + { + + public function ProvinceService() + { + super(); + actUrl = "com.huzi.play.action.ProvinceAction."; + } + + public function getCityList() : void + { + var _loc1_:String = "getWorldMapInfo"; + super.connect(actUrl + _loc1_,this.getCityListResult); + } + + private function getCityListResult(param1:Object) : void + { + var _loc2_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getCityList); + _loc2_.listData = param1 as Array; + super.dispatchEvent(_loc2_); + } + + public function getGuildProvinceAppInfo() : void + { + var _loc1_:String = "getGuildProvinceAppInfo"; + super.connect(actUrl + _loc1_,this.getGuildProvinceAppInfoResult); + } + + private function getGuildProvinceAppInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getGuildProvinceAppInfo); + _loc3_.objData = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getGuildProvinceInfo() : void + { + var _loc1_:String = "getGuildProvinceInfo"; + } + + public function getProvinceEntryInfo() : void + { + var _loc1_:String = "getProvinceEntryInfo"; + super.connect(actUrl + _loc1_,this.getProvinceEntryInfoResult); + } + + private function getProvinceEntryInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getProvinceEntryInfo); + _loc3_.objData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function getAllProvInfoByCountryId(param1:int) : void + { + var _loc2_:String = "getAllProvInfoByCountryId"; + super.connect(actUrl + _loc2_,this.getAllProvInfoByCountryIdResult,param1); + } + + private function getAllProvInfoByCountryIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getAllProvInfoByCountryId); + _loc3_.listData = _loc2_.returnList1; + _loc3_.objData = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function applyProvWar(param1:int, param2:int) : void + { + var _loc3_:String = "applyProvWar"; + super.connect(actUrl + _loc3_,this.applyProvWarResult,param1,param2); + } + + private function applyProvWarResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_applyProvWar); + super.dispatchEvent(_loc3_); + } + + public function addAppItem(param1:int, param2:int) : void + { + var _loc3_:String = "addAppItem"; + super.connect(actUrl + _loc3_,this.addAppItemResult,param1,param2); + } + + private function addAppItemResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_addAppItem); + super.dispatchEvent(_loc3_); + } + + public function getProCasListById(param1:int) : void + { + var _loc2_:String = "getAllWarProvInfoByCountryId"; + super.connect(actUrl + _loc2_,this.getProCasListByIdResult,param1); + } + + private function getProCasListByIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getProCasListById); + _loc3_.listData = _loc2_.returnList1; + _loc3_.objData = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getBattleUserInfo(param1:int) : void + { + var _loc2_:String = "getBattleUserInfo"; + super.connect(actUrl + _loc2_,this.getBattleUserInfoResult,param1,0); + } + + private function getBattleUserInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getBattleUserInfo); + _loc3_.objData = _loc2_.returnObj1; + _loc3_.msg = _loc2_.msg; + _loc3_.result = _loc2_.result; + super.dispatchEvent(_loc3_); + } + + public function joinProvincWar(param1:int, param2:int) : void + { + var _loc3_:String = "joinProvincWar"; + super.connect(actUrl + _loc3_,this.joinProvincWarResult,param1,param2); + } + + private function joinProvincWarResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_joinBattle); + _loc3_.objData = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function userLeave(param1:int) : void + { + var _loc2_:String = "userLeave"; + super.connect(actUrl + _loc2_,this.userLeaveResult,param1); + } + + private function userLeaveResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_leaveBattle); + super.dispatchEvent(_loc3_); + } + + public function kickUser(param1:int, param2:int) : void + { + var _loc3_:String = "kickUser"; + super.connect(actUrl + _loc3_,this.kickUserResult,param1,param2); + } + + private function kickUserResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_kickUser); + super.dispatchEvent(_loc3_); + } + + public function changePlayHeros(param1:int, param2:Array) : void + { + var _loc3_:String = "changePlayHeros"; + super.connect(actUrl + _loc3_,this.changePlayHerosResult,param1,0,param2); + } + + private function changePlayHerosResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_changeHeros); + super.dispatchEvent(_loc3_); + } + + public function getPointForMap(param1:int) : void + { + var _loc2_:String = "getPointForMap"; + super.connect(actUrl + _loc2_,this.getPointForMapResult,param1); + } + + private function getPointForMapResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getPointForMap); + _loc3_.objData = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getBattleInfoForMap(param1:int) : void + { + var _loc2_:String = "getBattleInfoForMap"; + super.connect(actUrl + _loc2_,this.getBattleInfoForMapResult,param1); + } + + private function getBattleInfoForMapResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getBattleInfoForMap); + _loc3_.objData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function getPointUserInfo(param1:int, param2:int) : void + { + var _loc3_:String = "getPointUserInfo"; + super.connect(actUrl + _loc3_,this.getPointUserInfoResult,param1,param2); + } + + private function getPointUserInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getPointUserInfo); + _loc3_.objData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function userMove(param1:int, param2:int) : void + { + var _loc3_:String = "userMove"; + super.connect(actUrl + _loc3_,this.userMoveResult,param1,param2); + } + + private function userMoveResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_userMove); + _loc3_.objData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function getResultOfProvince(param1:int) : void + { + var _loc2_:String = "getResultOfProvince"; + super.connect(actUrl + _loc2_,this.getResultOfProvinceResult,param1); + } + + private function getResultOfProvinceResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getResultOfProvince); + _loc3_.objData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function getMemberInfo(param1:int) : void + { + var _loc2_:String = "getMemberInfo"; + super.connect(actUrl + _loc2_,this.getMemberInfoResult,param1); + } + + private function getMemberInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getMemberInfo); + _loc3_.objData = _loc2_.returnObj1; + _loc3_.result = _loc2_.result; + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function receiveProvinceAward(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "receiveProvinceAward"; + super.connect(actUrl + _loc2_,this.receiveProvinceAwardResult,param1); + } + + private function receiveProvinceAwardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_receiveProvinceAward); + _loc3_.result = _loc2_.result; + _loc3_.objData = _loc2_.returnObj1; + _loc3_.msg = _loc2_.msg; + dispatchEvent(_loc3_); + if(_loc2_.result == ReturnBean.STATUS_0) + { + ConnectService.getInstance().castleService.calcuDevData(); + } + } + + public function getProvinceId() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "getProvinceId"; + super.connect(actUrl + _loc1_,this.getProvinceIdResult); + } + + private function getProvinceIdResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ProvinceEvent = new ProvinceEvent(ProvinceEvent.Pro_getProvinceId); + _loc3_.objData = _loc2_.returnObj1; + dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/province/event/ProvinceEvent.as b/flash_decompiled/com/control/province/event/ProvinceEvent.as new file mode 100644 index 0000000..4e347e0 --- /dev/null +++ b/flash_decompiled/com/control/province/event/ProvinceEvent.as @@ -0,0 +1,62 @@ +package com.control.province.event +{ + import flash.events.Event; + + public class ProvinceEvent extends Event + { + + public static const Pro_getCityList:String = "Pro_getCityList"; + + public static const Pro_getGuildProvinceAppInfo:String = "Pro_getGuildProvinceAppInfo"; + + public static const Pro_getProvinceEntryInfo:String = "Pro_getProvinceEntryInfo"; + + public static const Pro_getAllProvInfoByCountryId:String = "Pro_getAllProvInfoByCountryId"; + + public static const Pro_applyProvWar:String = "Pro_applyProvWar"; + + public static const Pro_addAppItem:String = "Pro_addAppItem"; + + public static const Pro_getProCasListById:String = "Pro_getProCasListById"; + + public static const Pro_getBattleUserInfo:String = "Pro_getBattleUserInfo"; + + public static const Pro_joinBattle:String = "Pro_joinBattle"; + + public static const Pro_leaveBattle:String = "Pro_leaveBattle"; + + public static const Pro_kickUser:String = "Pro_kickUser"; + + public static const Pro_changeHeros:String = "Pro_changeHeros"; + + public static const Pro_getPointForMap:String = "Pro_getPointForMap"; + + public static const Pro_getBattleInfoForMap:String = "Pro_getBattleInfoForMap"; + + public static const Pro_getPointUserInfo:String = "Pro_getPointUserInfo"; + + public static const Pro_userMove:String = "Pro_userMove"; + + public static const Pro_getResultOfProvince:String = "Pro_getResultOfProvince"; + + public static const Pro_getMemberInfo:String = "Pro_getMemberInfo"; + + public static const Pro_receiveProvinceAward:String = "Pro_receiveProvinceAward"; + + public static const Pro_getProvinceId:String = "Pro_getProvinceId"; + + public var listData:Array; + + public var objData:Object; + + public var msg:String; + + public var result:int; + + public function ProvinceEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/control/risk/RiskService.as b/flash_decompiled/com/control/risk/RiskService.as new file mode 100644 index 0000000..4df1920 --- /dev/null +++ b/flash_decompiled/com/control/risk/RiskService.as @@ -0,0 +1,268 @@ +package com.control.risk +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.data.GameData; + import com.events.DevEvent; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.pak.data.PakState; + + public class RiskService extends Connect + { + + public function RiskService() + { + super(); + } + + public function getRishMain() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.RiskAction.getRishMain"; + super.connect(_loc1_,this.getRishMainResult); + } + + private function getRishMainResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + GameData.setRiskConfigObj(_loc2_.returnObj1); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_RISK_CONFIG)); + } + + public function getRishRank() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.RiskAction.getRishRank"; + super.connect(_loc1_,this.getRishRankResult); + } + + private function getRishRankResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_RISK_RANK); + _loc4_.obj = _loc3_; + Utils.g_events.dispatchEvent(_loc4_); + } + + public function getRiskSceneById(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.RiskAction.getRiskSceneById"; + super.connect(_loc2_,this.getRiskSceneByIdResult,param1); + } + + private function getRiskSceneByIdResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:int = int(_loc2_.returnObj1.parentId); + var _loc4_:Array = _loc2_.returnObj1.riskSceneList; + GameData.setRiskSceneList(_loc3_,_loc4_); + var _loc5_:Object = _loc2_.returnObj2; + GameData.setUserRiskSceneBySeqId(_loc3_,_loc5_); + var _loc6_:DevEvent = new DevEvent(DevEvent.EVENT_RISKRCENE_CONFIG); + _loc6_.arr = _loc4_; + Utils.g_events.dispatchEvent(_loc6_); + } + + public function startBattle(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.RiskAction.startBattle"; + super.connect(_loc3_,this.startBattleResult,param1,param2); + } + + private function startBattleResult(param1:Object) : void + { + var _loc4_:NewUser = null; + var _loc5_:Object = null; + var _loc6_:Object = null; + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + if(_loc2_.returnObj1.warResult == "ATTACKER") + { + _loc4_ = new NewUser(_loc2_.returnObj1.userMap); + NewUserData.setUser(_loc4_); + PakState.setGetPackListStatus(); + _loc5_ = _loc2_.returnObj1.userRiskMap; + _loc6_ = _loc2_.returnObj1.userRiskSceneMap; + GameData.setUserRisk(_loc5_); + if(_loc6_) + { + GameData.setUserRiskSceneBySeqId(_loc6_.seqId,_loc6_); + } + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_RISK_COMBAT); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function startBattleTen(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.RiskAction.startBattleTen"; + super.connect(_loc3_,this.startBattleTenResult,param1,param2); + } + + private function startBattleTenResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewUser = new NewUser(_loc2_.returnObj1.userMap); + NewUserData.setUser(_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:Object = _loc2_.returnObj1.userRiskMap; + GameData.setUserRisk(_loc4_); + var _loc5_:DevEvent = new DevEvent(DevEvent.EVENT_RISK_COMBAT_TEN); + _loc5_.obj = _loc2_.returnObj1.dropMap; + Utils.g_events.dispatchEvent(_loc5_); + } + + public function refreshUserHpPoint() : void + { + var _loc1_:String = "com.huzi.play.action.RiskAction.refreshUserHpPoint"; + super.connect(_loc1_,this.refreshUserHpPointResult); + } + + private function refreshUserHpPointResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + GameData.setUserRisk(_loc3_); + } + + public function getSceneAward(param1:int, param2:int) : void + { + LoadingMc.getInstance().unShow(); + var _loc3_:String = "com.huzi.play.action.RiskAction.getSceneAward"; + super.connect(_loc3_,this.getSceneAwardResult,param1,param2); + } + + private function getSceneAwardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1.userRiskSceneMap; + GameData.setUserRiskSceneBySeqId(_loc3_.seqId,_loc3_); + PakState.setGetPackListStatus(); + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_RISK_GETAWARD); + _loc4_.id = _loc3_.seqId; + Utils.g_events.dispatchEvent(_loc4_); + } + + public function getHeroListMap() : void + { + LoadingMc.getInstance().unShow(); + var _loc1_:String = "com.huzi.play.action.RiskAction.getHeroListMap"; + super.connect(_loc1_,this.getHeroListMapResult); + } + + private function getHeroListMapResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_RISK_HEROLIST); + _loc4_.obj = _loc3_; + Utils.g_events.dispatchEvent(_loc4_); + } + + public function changeHero(param1:Array) : void + { + var _loc2_:String = "com.huzi.play.action.RiskAction.changeChallengeHero"; + super.connect(_loc2_,this.changeHeroResult,param1); + } + + private function changeHeroResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_RISK_HEROLIST); + _loc4_.obj = _loc3_; + Utils.g_events.dispatchEvent(_loc4_); + } + + public function clearColdTime() : void + { + LoadingMc.getInstance().unShow(); + var _loc1_:String = "com.huzi.play.action.RiskAction.clearColdTime"; + super.connect(_loc1_,this.clearColdTimeResult); + } + + private function clearColdTimeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1.userRisk; + GameData.setUserRisk(_loc3_); + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_RISK_CLEARCOLD); + Utils.g_events.dispatchEvent(_loc4_); + } + + public function useAddHpItem() : void + { + LoadingMc.getInstance().unShow(); + var _loc1_:String = "com.huzi.play.action.RiskAction.useAddHpItem"; + super.connect(_loc1_,this.useAddHpItemResult); + } + + private function useAddHpItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1.userRisk; + GameData.setUserRisk(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/shop/ShopService.as b/flash_decompiled/com/control/shop/ShopService.as new file mode 100644 index 0000000..c025ca3 --- /dev/null +++ b/flash_decompiled/com/control/shop/ShopService.as @@ -0,0 +1,303 @@ +package com.control.shop +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.shop.event.ShopEvent; + import com.data.data.items.Item; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.pak.data.PakState; + import com.view.ui.shop.ShopState; + import com.view.ui.shop.data.ItemData; + import flash.net.registerClassAlias; + + public class ShopService extends Connect + { + + registerClassAlias("Item",Item); + + private var hasLoadShop:Boolean = false; + + public function ShopService() + { + super(); + } + + public function getShopViewByTagId(param1:int, param2:int = 0) : void + { + var _loc3_:String = "com.huzi.item.action.ShopAction.getShopViewByTagId"; + super.connect(_loc3_,this.getShopViewByTagIdResult,param1,param2); + } + + private function getShopViewByTagIdResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:ShopEvent = new ShopEvent(ShopEvent.SHOP_LIST); + _loc4_.page = _loc3_.page; + _loc4_.shopArr = _loc3_.shopList as Array; + _loc4_.cash = _loc3_.cash; + _loc4_.payPoint = _loc3_.payPoint; + super.dispatchEvent(_loc4_); + } + + public function getPrestigeShopViewByCountry(param1:int, param2:int = 0) : void + { + var _loc3_:String = "com.huzi.item.action.ShopAction.getPrestigeShopViewByCountry"; + super.connect(_loc3_,this.getPrestigeShopViewByCountryResult,param1,param2); + } + + private function getPrestigeShopViewByCountryResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Object = _loc2_.returnObj1; + var _loc4_:ShopEvent = new ShopEvent(ShopEvent.SHOP_PRESTIGE_LIST); + _loc4_.page = _loc3_.countryId; + _loc4_.prestige = _loc3_.prestige; + _loc4_.shopArr = _loc3_.shopList as Array; + super.dispatchEvent(_loc4_); + } + + public function showCashByResView() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.showCashByResView"; + super.connect(_loc1_,this.showCashByResViewResult); + } + + private function showCashByResViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ShopEvent = new ShopEvent(ShopEvent.SHOP_RESOURCE_VIEW); + _loc3_.resObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function buyRes(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.develop.action.CastleAction.useCashBuyRes"; + super.connect(_loc3_,this.buyResResult,param1,param2); + } + + private function buyResResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:ShopEvent = new ShopEvent(ShopEvent.SHOP_RESOURCE_BUY); + _loc3_.resObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + ConnectService.getInstance().castleService.getUserData(); + } + + public function buyGood(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.item.action.ShopAction.buyGood"; + super.connect(_loc4_,this.buyGoodResult,param1,param2,param3); + } + + private function buyGoodResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:ShopEvent = new ShopEvent(ShopEvent.SHOP_ITEM_BUY_RESULT); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function buyPrestigeGood(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.item.action.ShopAction.buyPrestigeGood"; + super.connect(_loc3_,this.buyPrestigeGoodResult,param1,param2); + } + + private function buyPrestigeGoodResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:ShopEvent = new ShopEvent(ShopEvent.SHOP_ITEM_BUY_Prestige); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function buyJunGongGood(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.item.action.ShopAction.buyJunGongGood"; + super.connect(_loc3_,this.buyJunGongGoodResult,param1,param2); + } + + private function buyJunGongGoodResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:ShopEvent = new ShopEvent(ShopEvent.SHOP_ITEM_BUY_Jungong); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function getBuyTools(param1:String) : void + { + var _loc2_:String = "com.huzi.item.action.ShopAction.getQuickStore"; + super.connect(_loc2_,this.getBuyToolsResult,param1); + } + + private function getBuyToolsResult(param1:Object) : void + { + var _loc2_:ShopEvent = new ShopEvent(ShopEvent.SHOP_getBuyTools); + _loc2_.resObject = param1; + super.dispatchEvent(_loc2_); + } + + public function getShopView() : void + { + var _loc1_:String = null; + if(this.hasLoadShop == false) + { + this.hasLoadShop = true; + _loc1_ = "com.huzi.item.action.ShopAction.getAllShopItems"; + super.connect(_loc1_,this.getShopViewResult); + } + } + + private function getShopViewResult(param1:Object) : void + { + var _loc4_:int = 0; + var _loc5_:ItemData = null; + var _loc2_:Array = param1 as Array; + var _loc3_:int = int(_loc2_.length); + while(_loc4_ < _loc3_) + { + _loc5_ = new ItemData(); + if(_loc2_[_loc4_].shopType.toString() == "2" && _loc2_[_loc4_].status == 0) + { + _loc5_.shopId = _loc2_[_loc4_].shopId; + _loc5_.itemId = _loc2_[_loc4_].itemId; + _loc5_.shopType = _loc2_[_loc4_].shopType; + _loc5_.singleNum = _loc2_[_loc4_].singleNum; + _loc5_.singlePrice = _loc2_[_loc4_].singlePrice; + _loc5_.realPrice = _loc2_[_loc4_].realPrice; + _loc5_.isQQAdd = _loc2_[_loc4_].isQQAdd; + _loc5_.pricePercent = _loc2_[_loc4_].pricePercent; + _loc5_.isPayPointCanBuy = _loc2_[_loc4_].isPayPointCanBuy; + ShopState.hotShopList.push(_loc5_); + } + if(_loc2_[_loc4_].tagId.toString() == "4" && _loc2_[_loc4_].status == 0) + { + _loc5_.shopId = _loc2_[_loc4_].shopId; + _loc5_.itemId = _loc2_[_loc4_].itemId; + _loc5_.shopType = _loc2_[_loc4_].shopType; + _loc5_.singleNum = _loc2_[_loc4_].singleNum; + _loc5_.singlePrice = _loc2_[_loc4_].singlePrice; + _loc5_.realPrice = _loc2_[_loc4_].realPrice; + _loc5_.isQQAdd = _loc2_[_loc4_].isQQAdd; + _loc5_.pricePercent = _loc2_[_loc4_].pricePercent; + _loc5_.isPayPointCanBuy = _loc2_[_loc4_].isPayPointCanBuy; + ShopState.devShopList.push(_loc5_); + } + if(_loc2_[_loc4_].tagId.toString() == "5" && _loc2_[_loc4_].status == 0) + { + _loc5_.shopId = _loc2_[_loc4_].shopId; + _loc5_.itemId = _loc2_[_loc4_].itemId; + _loc5_.shopType = _loc2_[_loc4_].shopType; + _loc5_.singleNum = _loc2_[_loc4_].singleNum; + _loc5_.singlePrice = _loc2_[_loc4_].singlePrice; + _loc5_.realPrice = _loc2_[_loc4_].realPrice; + _loc5_.isQQAdd = _loc2_[_loc4_].isQQAdd; + _loc5_.pricePercent = _loc2_[_loc4_].pricePercent; + _loc5_.isPayPointCanBuy = _loc2_[_loc4_].isPayPointCanBuy; + ShopState.militaryShopList.push(_loc5_); + } + if(_loc2_[_loc4_].tagId.toString() == "6" && _loc2_[_loc4_].status == 0) + { + _loc5_.shopId = _loc2_[_loc4_].shopId; + _loc5_.itemId = _loc2_[_loc4_].itemId; + _loc5_.shopType = _loc2_[_loc4_].shopType; + _loc5_.singleNum = _loc2_[_loc4_].singleNum; + _loc5_.singlePrice = _loc2_[_loc4_].singlePrice; + _loc5_.realPrice = _loc2_[_loc4_].realPrice; + _loc5_.isQQAdd = _loc2_[_loc4_].isQQAdd; + _loc5_.pricePercent = _loc2_[_loc4_].pricePercent; + _loc5_.isPayPointCanBuy = _loc2_[_loc4_].isPayPointCanBuy; + ShopState.otherShopList.push(_loc5_); + } + if(_loc2_[_loc4_].tagId.toString() == "30" && _loc2_[_loc4_].status == 0) + { + _loc5_.shopId = _loc2_[_loc4_].shopId; + _loc5_.itemId = _loc2_[_loc4_].itemId; + _loc5_.tagId = _loc2_[_loc4_].tagId; + _loc5_.singlePrice = _loc2_[_loc4_].singlePrice; + _loc5_.realPrice = _loc2_[_loc4_].realPrice; + _loc5_.isQQAdd = _loc2_[_loc4_].isQQAdd; + _loc5_.pricePercent = _loc2_[_loc4_].pricePercent; + _loc5_.needPrestige = _loc2_[_loc4_].needPrestige; + ShopState.preShopList.push(_loc5_); + } + if(_loc2_[_loc4_].tagId.toString() == "40" && _loc2_[_loc4_].status == 0) + { + _loc5_.shopId = _loc2_[_loc4_].shopId; + _loc5_.itemId = _loc2_[_loc4_].itemId; + _loc5_.tagId = _loc2_[_loc4_].tagId; + _loc5_.singlePrice = _loc2_[_loc4_].singlePrice; + _loc5_.realPrice = _loc2_[_loc4_].realPrice; + _loc5_.isQQAdd = _loc2_[_loc4_].isQQAdd; + _loc5_.pricePercent = _loc2_[_loc4_].pricePercent; + _loc5_.needPrestige = _loc2_[_loc4_].needPrestige; + ShopState.exploitShopList.push(_loc5_); + } + if(_loc2_[_loc4_].tagId.toString() == "10" && _loc2_[_loc4_].status == 0) + { + _loc5_.shopId = _loc2_[_loc4_].shopId; + _loc5_.itemId = _loc2_[_loc4_].itemId; + _loc5_.tagId = _loc2_[_loc4_].tagId; + _loc5_.singlePrice = _loc2_[_loc4_].singlePrice; + _loc5_.realPrice = _loc2_[_loc4_].realPrice; + _loc5_.isQQAdd = _loc2_[_loc4_].isQQAdd; + _loc5_.pricePercent = _loc2_[_loc4_].pricePercent; + _loc5_.needPrestige = _loc2_[_loc4_].needPrestige; + _loc5_.isPayPointCanBuy = _loc2_[_loc4_].isPayPointCanBuy; + ShopState.bookShopList.push(_loc5_); + } + _loc5_.viewMap = _loc2_[_loc4_].viewMap; + _loc4_++; + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.SHOPCHANGE)); + } + } +} + diff --git a/flash_decompiled/com/control/shop/event/ShopEvent.as b/flash_decompiled/com/control/shop/event/ShopEvent.as new file mode 100644 index 0000000..da5ce23 --- /dev/null +++ b/flash_decompiled/com/control/shop/event/ShopEvent.as @@ -0,0 +1,48 @@ +package com.control.shop.event +{ + import flash.events.Event; + + public class ShopEvent extends Event + { + + public static const SHOP_LIST:String = "SHOP_VIEW_LIST"; + + public static const SHOP_PRESTIGE_LIST:String = "SHOP_PRESTIGE_LIST"; + + public static const SHOP_RESOURCE_VIEW:String = "SHOP_RESOURCE_VIEW"; + + public static const SHOP_RESOURCE_BUY:String = "SHOP_RESOURCE_BUY"; + + public static const SHOP_ITEM_BUY_RESULT:String = "SHOP_ITEM_BUY_RESULT"; + + public static const SHOP_ITEM_BUY_Prestige:String = "SHOP_ITEM_BUY_Prestige"; + + public static const SHOP_ITEM_BUY_Jungong:String = "SHOP_ITEM_BUY_Jungong"; + + public static const SHOP_getBuyTools:String = "SHOP_getBuyTools"; + + public static const Shop_getShopView:String = "Shop_getShopView"; + + public var resObject:Object; + + public var page:int; + + public var shopArr:Array; + + public var prestige:int; + + public var payPoint:int; + + public var cash:int; + + public var result:int; + + public var msg:String; + + public function ShopEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/tech/TechService.as b/flash_decompiled/com/control/tech/TechService.as new file mode 100644 index 0000000..364c3b7 --- /dev/null +++ b/flash_decompiled/com/control/tech/TechService.as @@ -0,0 +1,99 @@ +package com.control.tech +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.tech.event.TechUpEvent; + import com.data.DataModoule; + import com.data.data.tech.Technology; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.teach.data.TechData; + import flash.net.registerClassAlias; + + public class TechService extends Connect + { + + registerClassAlias("Technology",Technology); + + public function TechService() + { + super(); + } + + public function getTechList(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.develop.action.CastleAction.showTechList"; + super.connect(_loc2_,this.getTechListResult,DataModoule.getInstance().userMgr.castle.casId,param1); + } + + private function getTechListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TechData.setTechListByType(String(_loc2_.returnObj1),_loc2_.returnMap1); + } + + public function techLevelUp(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.develop.action.CastleAction.LevelUpUserTech"; + super.connect(_loc2_,this.techLevelUpResult,DataModoule.getInstance().userMgr.castle.casId,param1); + } + + private function techLevelUpResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:TechUpEvent = new TechUpEvent(TechUpEvent.UP_BEGIN); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + + public function techTimeOver() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.userTechTimeOver"; + super.connect(_loc1_,this.techTimeOverResult); + } + + private function techTimeOverResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:TechUpEvent = new TechUpEvent(TechUpEvent.UP_OVER); + super.dispatchEvent(_loc3_); + } + + public function cancelTech() : void + { + var _loc1_:String = "com.huzi.develop.action.CastleAction.cancelUserTech"; + super.connect(_loc1_,this.cancelTechResult); + } + + private function cancelTechResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:TechUpEvent = new TechUpEvent(TechUpEvent.CANCEL_OVER); + _loc3_.obj = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + } +} + diff --git a/flash_decompiled/com/control/tech/event/TechListEvent.as b/flash_decompiled/com/control/tech/event/TechListEvent.as new file mode 100644 index 0000000..626cb69 --- /dev/null +++ b/flash_decompiled/com/control/tech/event/TechListEvent.as @@ -0,0 +1,20 @@ +package com.control.tech.event +{ + import flash.events.Event; + + public class TechListEvent extends Event + { + + public static const GetTechList:String = "GetTechList"; + + public var techArr:Array; + + public var techType:String; + + public function TechListEvent() + { + super(GetTechList,true); + } + } +} + diff --git a/flash_decompiled/com/control/tech/event/TechUpEvent.as b/flash_decompiled/com/control/tech/event/TechUpEvent.as new file mode 100644 index 0000000..6828292 --- /dev/null +++ b/flash_decompiled/com/control/tech/event/TechUpEvent.as @@ -0,0 +1,27 @@ +package com.control.tech.event +{ + import com.data.data.items.AddSpeed; + import flash.events.Event; + + public class TechUpEvent extends Event + { + + public static const UP_BEGIN:String = "UP_BEGIN"; + + public static const UP_OVER:String = "UP_OVER"; + + public static const CANCEL_OVER:String = "CANCEL_OVER"; + + public static const ADDSPEED_OK:String = "ADDSPEED_OK"; + + public var obj:Object; + + public var addSpeed:AddSpeed; + + public function TechUpEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/control/tower/SingleBabelService.as b/flash_decompiled/com/control/tower/SingleBabelService.as new file mode 100644 index 0000000..e98f812 --- /dev/null +++ b/flash_decompiled/com/control/tower/SingleBabelService.as @@ -0,0 +1,239 @@ +package com.control.tower +{ + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.tower.TowerData; + + public class SingleBabelService extends Connect + { + + public function SingleBabelService() + { + super(); + } + + public function entryBabel() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.entryBabel"; + super.connect(_loc1_,this.entryBabelResult); + } + + private function entryBabelResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TowerData.towerObj = _loc2_.returnObj1; + } + + public function changeChallengeHero(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.SingleBabelAction.changeChallengeHero"; + super.connect(_loc2_,this.changeChallengeHeroResult,param1); + } + + private function changeChallengeHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TowerData.towerObj = _loc2_.returnObj1; + } + + public function stopChallenge() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.stopChallenge"; + super.connect(_loc1_,this.stopChallengeResult); + } + + private function stopChallengeResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TowerData.towerObj = _loc2_.returnObj1; + } + + public function enterBabel(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.SingleBabelAction.enterBabel"; + super.connect(_loc2_,this.enterBabelResult,param1); + } + + private function enterBabelResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TowerData.towerObj = _loc2_.returnObj1; + } + + public function getStageAward() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.getStageAward"; + super.connect(_loc1_,this.getStageAwardResult); + } + + private function getStageAwardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_SINGLEBABEL_DROPLIST); + _loc3_.arr = _loc2_.returnList1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getPreCombatDetail() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.getPreCombatDetail"; + super.connect(_loc1_,this.getPreCombatDetailResult); + } + + private function getPreCombatDetailResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function startCombat() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.startCombat"; + super.connect(_loc1_,this.startCombatResult); + } + + private function startCombatResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TowerData.towerObj = _loc2_.returnObj1; + } + + public function treatAllHero() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.treatAllHero"; + super.connect(_loc1_,this.treatAllHeroResult); + } + + private function treatAllHeroResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TowerData.towerObj = _loc2_.returnObj1; + } + + public function fastPlayBabel() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.fastPlayBabel"; + super.connect(_loc1_,this.fastPlayBabelResult); + } + + private function fastPlayBabelResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TowerData.towerObj = _loc2_.returnObj1; + } + + public function oneKeyPlayBabel() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.oneKeyPlayBabel"; + super.connect(_loc1_,this.oneKeyPlayBabelResult); + } + + private function oneKeyPlayBabelResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TowerData.towerObj = _loc2_.returnObj1; + } + + public function tenKeyPlayBabel() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.tenKeyPlayBabel"; + super.connect(_loc1_,this.tenKeyPlayBabelResult); + } + + private function tenKeyPlayBabelResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + TowerData.towerObj = _loc2_.returnObj1; + } + + public function getBabelPower() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.SingleBabelAction.getBabelPower"; + super.connect(_loc1_,this.getBabelPowerResult); + } + + private function getBabelPowerResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:Array = _loc2_.returnObj1.babelPower; + var _loc4_:DevEvent = new DevEvent(DevEvent.EVENT_SINGLEBABEL_STAGEPOWER); + _loc4_.arr = _loc3_; + Utils.g_events.dispatchEvent(_loc4_); + } + } +} + diff --git a/flash_decompiled/com/control/user/UserService.as b/flash_decompiled/com/control/user/UserService.as new file mode 100644 index 0000000..a3c0def --- /dev/null +++ b/flash_decompiled/com/control/user/UserService.as @@ -0,0 +1,1094 @@ +package com.control.user +{ + import com.control.ConnectService; + import com.control.connect.Connect; + import com.control.data.ReturnBean; + import com.control.user.event.UserEvent; + import com.data.MemeberShip; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.newdata.user.NewAccount; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.activity.data.JunShiData; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.data.UserHorseData; + import flash.net.URLRequest; + import flash.net.navigateToURL; + + public class UserService extends Connect + { + + public function UserService() + { + super(); + } + + public function getUserProperty() : void + { + var _loc1_:String = "com.huzi.base.action.UserAction.getUserProperty"; + super.connect(_loc1_,this.getUserPropertyResult); + } + + private function getUserPropertyResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_PROPERTY); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function addPropertyPoint(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.base.action.UserAction.addPropertyPoint"; + super.connect(_loc3_,this.addPropertyPointResult,param1,param2); + } + + private function addPropertyPointResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_ADDPOINT); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + NewHeroData.setGetHeroListStatus(); + } + + public function updateUserSelfSignature(param1:String) : void + { + var _loc2_:String = "com.huzi.base.action.UserAction.updateUserSelfSignature"; + super.connect(_loc2_,this.updateUserSelfSignatureResult,param1); + } + + private function updateUserSelfSignatureResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_EDITSignature); + _loc3_.msg = _loc2_.msg; + super.dispatchEvent(_loc3_); + } + + public function giveExp(param1:int, param2:int) : void + { + var _loc3_:String = "com.huzi.base.action.UserAction.giveExp"; + super.connect(_loc3_,this.giveExpResult,param1,param2); + } + + private function giveExpResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewHero = new NewHero(_loc2_.returnObj1); + var _loc4_:NewUser = new NewUser(_loc2_.returnObj2); + NewHeroData.setHero(_loc3_); + NewUserData.setUser(_loc4_); + } + + public function changeUserIcon(param1:String) : void + { + var _loc2_:String = "com.huzi.base.action.UserAction.changeUserIcon"; + super.connect(_loc2_,this.changeUserIconResult,param1); + } + + private function changeUserIconResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewUser = new NewUser(_loc2_.returnObj1); + NewUserData.setUser(_loc3_); + var _loc4_:DevEvent = new DevEvent(DevEvent.USER_ICON_CHANGE); + Utils.g_events.dispatchEvent(_loc4_); + PakState.setGetPackListStatus(); + } + + public function bigBossRankAction(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.getBigBossRankListFromCache"; + super.connect(_loc2_,this.bigBossRankResult,param1); + } + + private function bigBossRankResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_bigBossRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function singleBabelRankAction(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.getSingleBabelRankListFromCache"; + super.connect(_loc2_,this.getSingleBabelRankListFromCacheResult,param1); + } + + private function getSingleBabelRankListFromCacheResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_singleBabelRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function pvpRankAction(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.getPvpRankListFromCache"; + super.connect(_loc2_,this.pvpRankActionResult,param1); + } + + private function pvpRankActionResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_pvpRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function hostRankAction(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.getUserRankListFromCache"; + super.connect(_loc2_,this.hostRankActionResult,param1); + } + + private function hostRankActionResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_hostRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function myRankAction() : void + { + var _loc1_:String = "com.huzi.base.action.UserAction.getMyUserRank"; + super.connect(_loc1_,this.myRankActionResult); + } + + private function myRankActionResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_hostRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function nameRankAction(param1:String) : void + { + var _loc2_:String = "com.huzi.base.action.UserAction.getUserRankListLikeName"; + super.connect(_loc2_,this.nameRankActionResult,param1); + } + + private function nameRankActionResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_hostRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function babelRankAction(param1:int) : void + { + var _loc2_:String = "com.huzi.base.action.UserAction.getBabelRankListFromCache"; + super.connect(_loc2_,this.babelRankActionResult,param1); + } + + private function babelRankActionResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_babelRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function geMingRankListFromCache(param1:int) : void + { + var _loc2_:String = "com.huzi.base.action.UserAction.getBabelRankListFromCache1"; + super.connect(_loc2_,this.geMingRankListFromCacheResult,param1); + } + + private function geMingRankListFromCacheResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_mingbabelRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function myBabelAction() : void + { + var _loc1_:String = "com.huzi.base.action.UserAction.getMyBabelRank"; + super.connect(_loc1_,this.myBabelActionResult); + } + + private function myBabelActionResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_babelRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getBabelRankListLikeName(param1:String) : void + { + var _loc2_:String = "com.huzi.base.action.UserAction.getBabelRankListLikeName"; + super.connect(_loc2_,this.nameBabelRankActionResult,param1); + } + + private function nameBabelRankActionResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_babelRankAction); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getUserIdAndCasIdByName(param1:String) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.getUserIdAndCasIdByName"; + super.connect(_loc2_,this.getUserIdAndCasIdByNameResult,param1); + } + + private function getUserIdAndCasIdByNameResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_getUserIdAndCasIdByNameResult); + _loc3_.userObject = _loc2_.returnObj1; + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getUserAnimus() : void + { + var _loc1_:String = "com.huzi.base.action.UserAction.getUserAnimus"; + super.connect(_loc1_,this.getUserAnimusResult); + } + + private function getUserAnimusResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_getUserAnimus); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function getNPCZhengFuAward(param1:int) : void + { + var _loc2_:String = "com.huzi.base.action.UserAction.getNPCZhengFuAward"; + super.connect(_loc2_,this.getNPCZhengFuAwardResult,param1); + } + + private function getNPCZhengFuAwardResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_getNPCZhengFuAward); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getCastleResource(); + } + + public function getLuckInfo() : void + { + var _loc1_:String = "com.huzi.person.action.PersonAction.getLuckInfo"; + super.connect(_loc1_,this.getLuckInfoResult); + } + + private function getLuckInfoResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_getLuckInfo); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function exchangePointView() : void + { + var _loc1_:String = "com.huzi.base.action.UserAction.exchangePointView"; + super.connect(_loc1_,this.exchangePointViewResult); + } + + private function exchangePointViewResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_exchangePointView); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function exchangePoint(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.exchangePoint"; + super.connect(_loc2_,this.exchangePointResult,param1); + } + + private function exchangePointResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_exchangePoint); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function cashToPaypoint(param1:Number) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.cashToPaypoint"; + super.connect(_loc2_,this.cashToPaypointResult,param1); + } + + private function cashToPaypointResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_cashToPoint); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function pointToCash(param1:Number) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.pointToCash"; + super.connect(_loc2_,this.pointToCashResult,param1); + } + + private function pointToCashResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_pointToCash); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function openPayhttp() : void + { + var _loc1_:String = "com.huzi.base.action.UserAction.openPayHttp"; + super.connect(_loc1_,this.openPayhttpResult); + } + + private function openPayhttpResult(param1:Object) : void + { + var _loc2_:String = param1 as String; + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("无法读取配置信息"); + return; + } + navigateToURL(new URLRequest(_loc2_),"_blank"); + } + + public function getActivityView() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.activity.action.ActivityAction.getActivityView"; + super.connect(_loc1_,this.getActivityViewResult); + } + + private function getActivityViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_getActivityView); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function exchangeGift(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.activity.action.ActivityAction.exchangeGift"; + super.connect(_loc3_,this.exchangeGiftResult,param1,param2); + } + + private function exchangeGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + this.getAccount(); + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_exchangeGift); + super.dispatchEvent(_loc3_); + } + + public function getCoinShopListView() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.activity.action.ActivityAction.getCoinShopListView"; + super.connect(_loc1_,this.getCoinShopListViewResult); + } + + private function getCoinShopListViewResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_getCoinShopView); + _loc3_.list = _loc2_.returnList1; + super.dispatchEvent(_loc3_); + } + + public function exchangeCoinGift(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.activity.action.ActivityAction.exchangeCoinGift"; + super.connect(_loc3_,this.exchangeCoinGiftResult,param1,param2); + } + + private function exchangeCoinGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:NewUser = new NewUser(_loc2_.returnObj1); + NewUserData.setUser(_loc3_); + var _loc4_:UserEvent = new UserEvent(UserEvent.USER_exchangeCoinShop); + super.dispatchEvent(_loc4_); + } + + public function addSkillPoint(param1:Function) : void + { + var _loc2_:String = "com.huzi.base.action.UserAction.addSkillPoint"; + super.connect(_loc2_,param1); + } + + public function test(param1:Function) : void + { + var _loc2_:String = "com.huzi.base.action.UserAction.test"; + super.connect(_loc2_,param1); + } + + public function getZhuItemCount() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.base.action.UserAction.getZhuItemCount"; + super.connect(_loc1_,this.getZhuItemCountResult); + } + + private function getZhuItemCountResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_EquipItemCount); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function fenJie(param1:Object) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.fenJie"; + super.connect(_loc2_,this.fenJieResult,param1); + } + + private function fenJieResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_EquipItemFenjie); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function strongUserEqu(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.base.action.UserAction.strongEqu"; + super.connect(_loc3_,this.strongUserEquResult,param1,param2); + } + + private function strongUserEquResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_EquipItemStrong); + super.dispatchEvent(_loc3_); + } + + public function getVipGift() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.base.action.UserAction.getVipGift"; + super.connect(_loc1_,this.getVipGiftResult); + } + + private function getVipGiftResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_GetVipGift); + super.dispatchEvent(_loc3_); + MemeberShip.setVipGift(true); + ConnectService.getInstance().castleService.getUserData(); + } + + public function updatePwd(param1:String, param2:String, param3:String) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.base.action.UserAction.updatePwd"; + super.connect(_loc4_,this.updatePwdResult,param1,param2,param3); + } + + private function updatePwdResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_updatePwd); + super.dispatchEvent(_loc3_); + } + + public function getHorseItemList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.function.action.TreasuryAction.getAllHorseItemList"; + super.connect(_loc1_,this.getHorseItemListResult); + } + + private function getHorseItemListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + UserHorseData.setWuli(_loc2_.returnObj1); + UserHorseData.setHorseItem(_loc2_.returnList1); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.WULICHANGE)); + } + + public function equHorseItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.equipHorseById"; + super.connect(_loc2_,this.equHorseItemResult,param1); + } + + private function equHorseItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + this.getHorseItemList(); + NewHeroData.setGetHeroListStatus(); + } + + public function unEquHorseItem(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.setUnEquHorse"; + super.connect(_loc2_,this.unEequHorseItemResult,param1); + } + + private function unEequHorseItemResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + this.getHorseItemList(); + NewHeroData.setGetHeroListStatus(); + } + + public function levelUpHorseEqu(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.base.action.UserAction.levelUpHorseEqu"; + super.connect(_loc3_,this.levelUpHorseEquResult,param1,param2); + } + + private function levelUpHorseEquResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + this.getHorseItemList(); + ConnectService.getInstance().castleService.getUserData(); + } + + public function viewLaterAward() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.activity.action.ActivityAction.viewLaterAward"; + super.connect(_loc1_,this.viewLaterAwardResult); + } + + private function viewLaterAwardResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_viewLaterAward); + _loc3_.userObject = _loc2_.returnObj1; + super.dispatchEvent(_loc3_); + } + + public function getLaterAwar() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.activity.action.ActivityAction.getLaterAwar"; + super.connect(_loc1_,this.getLaterAwarResult); + } + + private function getLaterAwarResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_getLaterAward); + super.dispatchEvent(_loc3_); + ConnectService.getInstance().castleService.getUserData(); + } + + public function enterUserJunShi(param1:int = 0) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.JunShiAction.enterUserJunShi"; + super.connect(_loc2_,this.enterUserJunShiResult,param1); + } + + private function enterUserJunShiResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + JunShiData.junshiObj = _loc2_.returnObj1; + } + + public function levelUpJunShi(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.JunShiAction.levelUpJunShi"; + super.connect(_loc2_,this.levelUpJunShiResult,param1); + } + + private function levelUpJunShiResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + JunShiData.junshiObj = _loc2_.returnObj1; + var _loc3_:Boolean = Boolean(_loc2_.returnObj2); + if(_loc3_) + { + NewHeroData.setGetHeroListStatus(); + } + } + + public function superLevelUp(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.JunShiAction.levelUpJunShi2"; + super.connect(_loc2_,this.superLevelUpResult,param1); + } + + private function superLevelUpResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + JunShiData.junshiObj = _loc2_.returnObj1; + var _loc3_:Boolean = Boolean(_loc2_.returnObj2); + if(_loc3_) + { + NewHeroData.setGetHeroListStatus(); + } + } + + public function levelUpFuyin(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.play.action.JunShiAction.levelUpFuyin"; + super.connect(_loc3_,this.levelUpFuyinResult,param1,param2); + } + + private function levelUpFuyinResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + JunShiData.junshiObj = _loc2_.returnObj1; + } + + public function getAccount() : void + { + var _loc1_:String = "com.huzi.base.action.UserAction.getAccount"; + super.connect(_loc1_,this.getAccountResult); + } + + private function getAccountResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewAccount = new NewAccount(_loc2_.returnObj1); + NewUserData.setAccount(_loc3_); + } + + public function chooseGameZone(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.chooseGameZone"; + super.connect(_loc2_,this.chooseGameZoneResult,param1); + } + + private function chooseGameZoneResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:NewAccount = new NewAccount(_loc2_.returnObj1); + NewUserData.setAccount(_loc3_); + } + + public function addLiuYu(param1:int, param2:int, param3:int) : void + { + LoadingMc.getInstance().show(); + var _loc4_:String = "com.huzi.base.action.UserAction.userEquInLiuyu"; + super.connect(_loc4_,this.addLiuYuResult,param1,param2,param3); + } + + private function addLiuYuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_addLiuYu); + super.dispatchEvent(_loc3_); + } + + public function delLiuYu(param1:int, param2:int) : void + { + LoadingMc.getInstance().show(); + var _loc3_:String = "com.huzi.base.action.UserAction.userEquOutLiuyu"; + super.connect(_loc3_,this.delLiuYuResult,param1,param2); + } + + private function delLiuYuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_delLiuYu); + super.dispatchEvent(_loc3_); + } + + public function oneKeyOutLiuYu(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.base.action.UserAction.oneKeyOutLiuYu"; + super.connect(_loc2_,this.oneKeyOutLiuYuResult,param1); + } + + private function oneKeyOutLiuYuResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + PakState.setGetPackListStatus(); + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_delAllLiuYu); + super.dispatchEvent(_loc3_); + } + + public function getUserCoinLogList() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.base.action.UserAction.getUserCoinLogList"; + super.connect(_loc1_,this.getUserCoinLogListResult); + } + + private function getUserCoinLogListResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_userCoinLog); + _loc3_.list = _loc2_.returnList1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function getCoinShopContent() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.base.action.UserAction.getCoinShopContent"; + super.connect(_loc1_,this.getCoinShopContentResult); + } + + private function getCoinShopContentResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:UserEvent = new UserEvent(UserEvent.USER_userCoinContent); + _loc3_.userObject = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function testConnect() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.MergeAction.getRishMain"; + super.connect(_loc1_,this.getRishMainResult); + } + + private function getRishMainResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + } + + public function getUserGun() : void + { + LoadingMc.getInstance().show(); + var _loc1_:String = "com.huzi.play.action.JunShiAction.getUserGunData"; + super.connect(_loc1_,this.getUserGunDataResult); + } + + private function getUserGunDataResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.DATA_USERGUN); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function upUserGun(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.JunShiAction.upUserGun"; + super.connect(_loc2_,this.upUserGunResult,param1); + } + + private function upUserGunResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.DATA_USERGUN); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public function upUserChe(param1:int) : void + { + LoadingMc.getInstance().show(); + var _loc2_:String = "com.huzi.play.action.JunShiAction.upUserChe"; + super.connect(_loc2_,this.upUserCheResult,param1); + } + + private function upUserCheResult(param1:Object) : void + { + LoadingMc.getInstance().unShow(); + var _loc2_:ReturnBean = param1 as ReturnBean; + if(checkResult(_loc2_)) + { + return; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.DATA_USERGUN); + _loc3_.obj = _loc2_.returnObj1; + Utils.g_events.dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/control/user/event/UserEvent.as b/flash_decompiled/com/control/user/event/UserEvent.as new file mode 100644 index 0000000..db20a59 --- /dev/null +++ b/flash_decompiled/com/control/user/event/UserEvent.as @@ -0,0 +1,97 @@ +package com.control.user.event +{ + import com.data.data.account.User; + import flash.events.Event; + + public class UserEvent extends Event + { + + public static const USER_INFO:String = "USER_INFO"; + + public static const USER_PROPERTY:String = "USER_PROPERTY"; + + public static const USER_ADDPOINT:String = "USER_ADDPOINT"; + + public static const USER_EDITSignature:String = "USER_EDITSignature"; + + public static const USER_bigBossRankAction:String = "USER_bigBossRankAction"; + + public static const USER_pvpRankAction:String = "USER_pvpRankAction"; + + public static const USER_huiwuRankAction:String = "USER_huiwuRankAction"; + + public static const USER_singleBabelRankAction:String = "USER_singleBabelRankAction"; + + public static const USER_hostRankAction:String = "USER_hostRankAction"; + + public static const USER_nameRankAction:String = "USER_nameRankAction"; + + public static const USER_getUserIdAndCasIdByNameResult:String = "USER_getUserIdAndCasIdByNameResult"; + + public static const USER_getUserAnimus:String = "USER_getUserAnimus"; + + public static const USER_getNPCZhengFuAward:String = "USER_getNPCZhengFuAward"; + + public static const USER_getLuckInfo:String = "USER_getLuckInfo"; + + public static const USER_exchangePointView:String = "USER_exchangePointView"; + + public static const USER_exchangePoint:String = "USER_exchangePoint"; + + public static const USER_updatePwd:String = "USER_updatePwd"; + + public static const USER_getActivityView:String = "USER_getActivityView"; + + public static const USER_exchangeGift:String = "USER_exchangeGift"; + + public static const USER_getCoinShopView:String = "USER_getCoinShopView"; + + public static const USER_exchangeCoinShop:String = "USER_exchangeCoinShop"; + + public static const USER_userCoinLog:String = "USER_userCoinLog"; + + public static const USER_userCoinContent:String = "USER_userCoinContent"; + + public static const USER_babelRankAction:String = "USER_babelRankAction"; + + public static const USER_mingbabelRankAction:String = "USER_mingbabelRankAction"; + + public static const USER_EquipItemCount:String = "USER_EquipItemCount"; + + public static const USER_EquipItemFenjie:String = "USER_EquipItemFenjie"; + + public static const USER_EquipItemStrong:String = "USER_EquipItemStrong"; + + public static const USER_GetVipGift:String = "USER_GetVipGift"; + + public static const USER_cashToPoint:String = "USER_cashToPoint"; + + public static const USER_pointToCash:String = "USER_pointToCash"; + + public static const USER_viewLaterAward:String = "USER_viewLaterAward"; + + public static const USER_getLaterAward:String = "USER_getLaterAward"; + + public static const USER_addLiuYu:String = "USER_addLiuYu"; + + public static const USER_delLiuYu:String = "USER_delLiuYu"; + + public static const USER_delAllLiuYu:String = "USER_delAllLiuYu"; + + public var user:User; + + public var userObject:Object; + + public var msg:String; + + public var heroObj:Object; + + public var list:Array; + + public function UserEvent(param1:String) + { + super(param1,true); + } + } +} + diff --git a/flash_decompiled/com/data/ArmyMgr.as b/flash_decompiled/com/data/ArmyMgr.as new file mode 100644 index 0000000..b31a1e7 --- /dev/null +++ b/flash_decompiled/com/data/ArmyMgr.as @@ -0,0 +1,80 @@ +package com.data +{ + import com.data.data.army.*; + import com.utils.HashMap; + + public class ArmyMgr + { + + private var _armyMap:HashMap; + + private var _towerArmyMap:HashMap; + + public function ArmyMgr() + { + super(); + this._armyMap = new HashMap(); + this._towerArmyMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + var _loc4_:Army = null; + var _loc5_:TowerArmy = null; + for(_loc2_ in param1.Army) + { + _loc4_ = new Army(); + _loc4_.entId = param1.Army[_loc2_].@entId; + _loc4_.armyName = param1.Army[_loc2_].@armyName; + _loc4_.level = param1.Army[_loc2_].@level; + _loc4_.armyDesc = param1.Army[_loc2_].@armyDesc; + _loc4_.armyType = param1.Army[_loc2_].@armyType; + _loc4_.iconPath = param1.Army[_loc2_].@iconPath; + _loc4_.attack = param1.Army[_loc2_].@attack; + _loc4_.defence = param1.Army[_loc2_].@defence; + _loc4_.agile = param1.Army[_loc2_].@agile; + _loc4_.hp = param1.Army[_loc2_].@hp; + _loc4_.attackType = param1.Army[_loc2_].@attackType; + _loc4_.defenceType = param1.Army[_loc2_].@defenceType; + _loc4_.moveRange = param1.Army[_loc2_].@moveRange; + _loc4_.mobility = param1.Army[_loc2_].@mobility; + _loc4_.convey = param1.Army[_loc2_].@convey; + _loc4_.hitRate = param1.Army[_loc2_].@hitRate; + _loc4_.dodgeRate = param1.Army[_loc2_].@dodgeRate; + _loc4_.criticalAtkRate = param1.Army[_loc2_].@criticalAtkRate; + _loc4_.caromAtkRate = param1.Army[_loc2_].@caromAtkRate; + _loc4_.counterAtkRate = param1.Army[_loc2_].@counterAtkRate; + _loc4_.attackRange = param1.Army[_loc2_].@attackRange; + _loc4_.consumeFood = param1.Army[_loc2_].@consumeFood; + this._armyMap.put(_loc4_.entId,_loc4_); + } + for(_loc3_ in param1.TowerArmy) + { + _loc5_ = new TowerArmy(); + _loc5_.entId = param1.TowerArmy[_loc3_].@entId; + _loc5_.armyName = param1.TowerArmy[_loc3_].@armyName; + _loc5_.armyDesc = param1.TowerArmy[_loc3_].@armyDesc; + _loc5_.armyType = param1.TowerArmy[_loc3_].@armyType; + _loc5_.iconPath = param1.TowerArmy[_loc3_].@iconPath; + _loc5_.damageNum = param1.TowerArmy[_loc3_].@damageNum; + _loc5_.wallSpace = param1.TowerArmy[_loc3_].@wallSpace; + _loc5_.attackType = param1.TowerArmy[_loc3_].@attackType; + _loc5_.attackRange = param1.TowerArmy[_loc3_].@attackRange; + this._towerArmyMap.put(_loc5_.entId,_loc5_); + } + } + + public function get armyMap() : HashMap + { + return this._armyMap; + } + + public function get towerArmyMap() : HashMap + { + return this._towerArmyMap; + } + } +} + diff --git a/flash_decompiled/com/data/BattleMgr.as b/flash_decompiled/com/data/BattleMgr.as new file mode 100644 index 0000000..646260b --- /dev/null +++ b/flash_decompiled/com/data/BattleMgr.as @@ -0,0 +1,184 @@ +package com.data +{ + import com.data.data.battle.*; + import com.utils.HashMap; + + public class BattleMgr + { + + private var _armyAttackOrderMap:HashMap; + + private var _armyOvercomeMap:HashMap; + + private var _npcAttackerMap:HashMap; + + private var _pveCastleMap:HashMap; + + private var _pveHeroMap:HashMap; + + private var _pveTroopMap:HashMap; + + private var _pveWallMap:HashMap; + + public function BattleMgr() + { + super(); + this._armyAttackOrderMap = new HashMap(); + this._armyOvercomeMap = new HashMap(); + this._npcAttackerMap = new HashMap(); + this._pveCastleMap = new HashMap(); + this._pveHeroMap = new HashMap(); + this._pveTroopMap = new HashMap(); + this._pveWallMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + var _loc4_:* = undefined; + var _loc5_:* = undefined; + var _loc6_:* = undefined; + var _loc7_:* = undefined; + var _loc8_:* = undefined; + var _loc9_:ArmyOvercome = null; + var _loc10_:ArmyAttackOrder = null; + var _loc11_:PveCastle = null; + var _loc12_:PveTroop = null; + var _loc13_:PveHero = null; + var _loc14_:PveWall = null; + var _loc15_:NpcAttacker = null; + for(_loc2_ in param1.ArmyOvercome) + { + _loc9_ = new ArmyOvercome(); + _loc9_.id = param1.ArmyOvercome[_loc2_].@id; + _loc9_.armyAttackType = param1.ArmyOvercome[_loc2_].@armyAttackType; + _loc9_.armyDefenceType = param1.ArmyOvercome[_loc2_].@armyDefenceType; + _loc9_.factor = param1.ArmyOvercome[_loc2_].@factor; + this._armyOvercomeMap.put(_loc9_.id,_loc9_); + } + for(_loc3_ in param1.ArmyAttackOrder) + { + _loc10_ = new ArmyAttackOrder(); + _loc10_.id = param1.ArmyAttackOrder[_loc3_].@id; + _loc10_.atkArmyType = param1.ArmyAttackOrder[_loc3_].@atkArmyType; + _loc10_.dfcArmyType = param1.ArmyAttackOrder[_loc3_].@dfcArmyType; + _loc10_.orderId = param1.ArmyAttackOrder[_loc3_].@orderId; + this._armyAttackOrderMap.put(_loc10_.id,_loc10_); + } + for(_loc4_ in param1.PveCastle) + { + _loc11_ = new PveCastle(); + _loc11_.pveCastleId = param1.PveCastle[_loc4_].@pveCastleId; + _loc11_.castleLevel = param1.PveCastle[_loc4_].@castleLevel; + _loc11_.troop1 = param1.PveCastle[_loc4_].@troop1; + _loc11_.troop2 = param1.PveCastle[_loc4_].@troop2; + _loc11_.troop3 = param1.PveCastle[_loc4_].@troop3; + _loc11_.pveWallId = param1.PveCastle[_loc4_].@pveWallId; + _loc11_.freshTime = param1.PveCastle[_loc4_].@freshTime; + _loc11_.combatPower = param1.PveCastle[_loc4_].@combatPower; + _loc11_.fightPower = param1.PveCastle[_loc4_].@fightPower; + _loc11_.own = param1.PveCastle[_loc4_].@own; + _loc11_.rangeValue = param1.PveCastle[_loc4_].@rangeValue; + _loc11_.castleType = param1.PveCastle[_loc4_].@castleType; + _loc11_.pveCastleType = param1.PveCastle[_loc4_].@pveCastleType; + _loc11_.npcName = param1.PveCastle[_loc4_].@npcName; + _loc11_.npcDesc = param1.PveCastle[_loc4_].@npcDesc; + _loc11_.iconPath = param1.PveCastle[_loc4_].@iconPath; + _loc11_.merit = param1.PveCastle[_loc4_].@merit; + _loc11_.lingWuLevel = param1.PveCastle[_loc4_].@lingWuLevel; + _loc11_.percent = param1.PveCastle[_loc4_].@percent; + _loc11_.combatItemPackId = param1.PveCastle[_loc4_].@combatItemPackId; + _loc11_.combatExpPackId = param1.PveCastle[_loc4_].@combatExpPackId; + _loc11_.fightItemPackId = param1.PveCastle[_loc4_].@fightItemPackId; + _loc11_.fightExpPackId = param1.PveCastle[_loc4_].@fightExpPackId; + this._pveCastleMap.put(_loc11_.pveCastleId,_loc11_); + } + for(_loc5_ in param1.PveTroop) + { + _loc12_ = new PveTroop(); + _loc12_.id = param1.PveTroop[_loc5_].@id; + _loc12_.troopId = param1.PveTroop[_loc5_].@troopId; + _loc12_.pveHeroId = param1.PveTroop[_loc5_].@pveHeroId; + this._pveTroopMap.put(_loc12_.id,_loc12_); + } + for(_loc6_ in param1.PveHero) + { + _loc13_ = new PveHero(); + _loc13_.heroId = param1.PveHero[_loc6_].@heroId; + _loc13_.upCount = param1.PveHero[_loc6_].@upCount; + _loc13_.careerId = param1.PveHero[_loc6_].@careerId; + _loc13_.name = param1.PveHero[_loc6_].@name; + _loc13_.level = param1.PveHero[_loc6_].@level; + _loc13_.chartr = param1.PveHero[_loc6_].@chartr; + _loc13_.combatSkillId = param1.PveHero[_loc6_].@combatSkillId; + _loc13_.fightSkillId = param1.PveHero[_loc6_].@fightSkillId; + _loc13_.gen = param1.PveHero[_loc6_].@gen; + _loc13_.type = param1.PveHero[_loc6_].@type; + _loc13_.armyEntId = param1.PveHero[_loc6_].@armyEntId; + _loc13_.armyNum = param1.PveHero[_loc6_].@armyNum; + _loc13_.iconPath = param1.PveHero[_loc6_].@iconPath; + this._pveHeroMap.put(_loc13_.heroId,_loc13_); + } + for(_loc7_ in param1.PveWall) + { + _loc14_ = new PveWall(); + _loc14_.pveWallId = param1.PveWall[_loc7_].@pveWallId; + _loc14_.wallHp = param1.PveWall[_loc7_].@wallHp; + _loc14_.wallDef = param1.PveWall[_loc7_].@wallDef; + _loc14_.nuJian = param1.PveWall[_loc7_].@nuJian; + _loc14_.gunMu = param1.PveWall[_loc7_].@gunMu; + _loc14_.leiShi = param1.PveWall[_loc7_].@leiShi; + _loc14_.juMa = param1.PveWall[_loc7_].@juMa; + _loc14_.xianJing = param1.PveWall[_loc7_].@xianJing; + this._pveWallMap.put(_loc14_.pveWallId,_loc14_); + } + for(_loc8_ in param1.NpcAttacker) + { + _loc15_ = new NpcAttacker(); + _loc15_.id = param1.NpcAttacker[_loc8_].@id; + _loc15_.onwer = param1.NpcAttacker[_loc8_].@onwer; + _loc15_.winMin = param1.NpcAttacker[_loc8_].@winMin; + _loc15_.winMax = param1.NpcAttacker[_loc8_].@winMax; + _loc15_.pveCastleId = param1.NpcAttacker[_loc8_].@pveCastleId; + this._npcAttackerMap.put(_loc15_.id,_loc15_); + } + } + + public function get armyAttackOrderMap() : HashMap + { + return this._armyAttackOrderMap; + } + + public function get armyOvercomeMap() : HashMap + { + return this._armyOvercomeMap; + } + + public function get npcAttackerMap() : HashMap + { + return this._npcAttackerMap; + } + + public function get pveCastleMap() : HashMap + { + return this._pveCastleMap; + } + + public function get pveWallMap() : HashMap + { + return this._pveWallMap; + } + + public function get pveHeroMap() : HashMap + { + return this._pveHeroMap; + } + + public function get pveTroopMap() : HashMap + { + return this._pveTroopMap; + } + } +} + diff --git a/flash_decompiled/com/data/CastleMgr.as b/flash_decompiled/com/data/CastleMgr.as new file mode 100644 index 0000000..8c57c13 --- /dev/null +++ b/flash_decompiled/com/data/CastleMgr.as @@ -0,0 +1,56 @@ +package com.data +{ + import com.data.data.city.CastleBuilding; + import com.utils.HashMap; + + public class CastleMgr + { + + private var _mainCastleBuild:HashMap; + + public function CastleMgr() + { + super(); + this._mainCastleBuild = new HashMap(); + } + + public function get mainCastleBuild() : HashMap + { + return this._mainCastleBuild; + } + + public function set mainCastleBuild(param1:HashMap) : void + { + this._mainCastleBuild = param1; + } + + public function setMainCastleBuildList(param1:Array) : void + { + var _loc2_:CastleBuilding = null; + for each(_loc2_ in param1) + { + this._mainCastleBuild.put(_loc2_.posNo,_loc2_); + } + } + + public function setCastleBuild(param1:CastleBuilding) : void + { + this._mainCastleBuild.put(param1.posNo,param1); + } + + public function getMainBuildList(param1:int) : Array + { + var _loc3_:CastleBuilding = null; + var _loc2_:Array = new Array(); + for each(_loc3_ in this._mainCastleBuild.values()) + { + if(_loc3_.buiEntId == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/data/DataModoule.as b/flash_decompiled/com/data/DataModoule.as new file mode 100644 index 0000000..b5768f8 --- /dev/null +++ b/flash_decompiled/com/data/DataModoule.as @@ -0,0 +1,224 @@ +package com.data +{ + import com.comfig.CommonData; + import com.comfig.deng.fzip.FZipFile; + import flash.utils.getTimer; + + public class DataModoule + { + + private static var instance:DataModoule; + + private var _armyMgr:ArmyMgr; + + private var _missionMgr:MissionMgr; + + private var _itemsMgr:ItemsMgr; + + private var _mapMgr:MapMgr; + + private var _shopMgr:ShopMgr; + + private var _towerMgr:TowerMgr; + + private var _battleMgr:BattleMgr; + + private var _examMgr:ExamMgr; + + private var _farmMgr:FarmMgr; + + private var _govPotzMgr:GovPotzMgr; + + private var _heroMgr:HeroMgr; + + private var _userMgr:UserMgr; + + private var _castleMgr:CastleMgr; + + private var xmlData:XML; + + private var time1:int; + + private var time2:int; + + public function DataModoule() + { + super(); + this._armyMgr = new ArmyMgr(); + this._itemsMgr = new ItemsMgr(); + this._mapMgr = new MapMgr(); + this._missionMgr = new MissionMgr(); + this._shopMgr = new ShopMgr(); + this._towerMgr = new TowerMgr(); + this._battleMgr = new BattleMgr(); + this._examMgr = new ExamMgr(); + this._farmMgr = new FarmMgr(); + this._govPotzMgr = new GovPotzMgr(); + this._heroMgr = new HeroMgr(); + this._userMgr = new UserMgr(); + this._castleMgr = new CastleMgr(); + } + + public static function getInstance() : DataModoule + { + if(instance == null) + { + return instance = new DataModoule(); + } + return instance; + } + + public function init(param1:FZipFile) : void + { + this.xmlData = XML(param1.getContentAsString()); + this.time1 = getTimer(); + switch(param1.filename) + { + case CommonData.item: + case CommonData.map: + case CommonData.mission: + case CommonData.shop: + case CommonData.tower: + case CommonData.army: + case CommonData.baseUI: + case CommonData.battle: + case CommonData.exam: + case CommonData.farm: + case CommonData.govPotz: + case CommonData.hero: + } + this.time2 = getTimer(); + } + + public function get userMgr() : UserMgr + { + return this._userMgr; + } + + public function set userMgr(param1:UserMgr) : void + { + this._userMgr = param1; + } + + public function get armyMgr() : ArmyMgr + { + return this._armyMgr; + } + + public function set armyMgr(param1:ArmyMgr) : void + { + this._armyMgr = param1; + } + + public function get missionMgr() : MissionMgr + { + return this._missionMgr; + } + + public function set missionMgr(param1:MissionMgr) : void + { + this._missionMgr = param1; + } + + public function get itemsMgr() : ItemsMgr + { + return this._itemsMgr; + } + + public function set itemsMgr(param1:ItemsMgr) : void + { + this._itemsMgr = param1; + } + + public function get mapMgr() : MapMgr + { + return this._mapMgr; + } + + public function set mapMgr(param1:MapMgr) : void + { + this._mapMgr = param1; + } + + public function get shopMgr() : ShopMgr + { + return this._shopMgr; + } + + public function set shopMgr(param1:ShopMgr) : void + { + this._shopMgr = param1; + } + + public function get towerMgr() : TowerMgr + { + return this._towerMgr; + } + + public function set towerMgr(param1:TowerMgr) : void + { + this._towerMgr = param1; + } + + public function get battleMgr() : BattleMgr + { + return this._battleMgr; + } + + public function set battleMgr(param1:BattleMgr) : void + { + this._battleMgr = param1; + } + + public function get examMgr() : ExamMgr + { + return this._examMgr; + } + + public function set examMgr(param1:ExamMgr) : void + { + this._examMgr = param1; + } + + public function get farmMgr() : FarmMgr + { + return this._farmMgr; + } + + public function set farmMgr(param1:FarmMgr) : void + { + this._farmMgr = param1; + } + + public function get govPotzMgr() : GovPotzMgr + { + return this._govPotzMgr; + } + + public function set govPotzMgr(param1:GovPotzMgr) : void + { + this._govPotzMgr = param1; + } + + public function get heroMgr() : HeroMgr + { + return this._heroMgr; + } + + public function set heroMgr(param1:HeroMgr) : void + { + this._heroMgr = param1; + } + + public function get castleMgr() : CastleMgr + { + return this._castleMgr; + } + + public function set castleMgr(param1:CastleMgr) : void + { + this._castleMgr = param1; + } + } +} + diff --git a/flash_decompiled/com/data/ExamMgr.as b/flash_decompiled/com/data/ExamMgr.as new file mode 100644 index 0000000..f4de50b --- /dev/null +++ b/flash_decompiled/com/data/ExamMgr.as @@ -0,0 +1,40 @@ +package com.data +{ + import com.data.data.exam.*; + import com.utils.HashMap; + + public class ExamMgr + { + + private var _examinationMap:HashMap; + + public function ExamMgr() + { + super(); + this._examinationMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:Examination = null; + for(_loc2_ in param1.Examination) + { + _loc3_ = new Examination(); + _loc3_.code = param1.Examination[_loc2_].@code; + _loc3_.subject = param1.Examination[_loc2_].@subject; + _loc3_.option1 = param1.Examination[_loc2_].@option1; + _loc3_.option2 = param1.Examination[_loc2_].@option2; + _loc3_.option3 = param1.Examination[_loc2_].@option3; + _loc3_.type = param1.Examination[_loc2_].@type; + this._examinationMap.put(_loc3_.code,_loc3_); + } + } + + public function get examinationMap() : HashMap + { + return this._examinationMap; + } + } +} + diff --git a/flash_decompiled/com/data/FarmMgr.as b/flash_decompiled/com/data/FarmMgr.as new file mode 100644 index 0000000..bdf069f --- /dev/null +++ b/flash_decompiled/com/data/FarmMgr.as @@ -0,0 +1,45 @@ +package com.data +{ + import com.data.data.farm.*; + import com.utils.HashMap; + + public class FarmMgr + { + + private var _userFarmTypeMap:HashMap; + + public function FarmMgr() + { + super(); + this._userFarmTypeMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:UserFarmType = null; + for(_loc2_ in param1.UserFarmType) + { + _loc3_ = new UserFarmType(); + _loc3_.id = param1.UserFarmType[_loc2_].@id; + _loc3_.plantName = param1.UserFarmType[_loc2_].@plantName; + _loc3_.resType = param1.UserFarmType[_loc2_].@resType; + _loc3_.needTime = param1.UserFarmType[_loc2_].@needTime; + _loc3_.seedTime = param1.UserFarmType[_loc2_].@seedTime; + _loc3_.popNum = param1.UserFarmType[_loc2_].@popNum; + _loc3_.outputNum = param1.UserFarmType[_loc2_].@outputNum; + _loc3_.isNeedItem = param1.UserFarmType[_loc2_].@isNeedItem; + _loc3_.itemId = param1.UserFarmType[_loc2_].@itemId; + _loc3_.itemNum = param1.UserFarmType[_loc2_].@itemNum; + _loc3_.type = param1.UserFarmType[_loc2_].@type; + this._userFarmTypeMap.put(_loc3_.id,_loc3_); + } + } + + public function get userFarmTypeMap() : HashMap + { + return this._userFarmTypeMap; + } + } +} + diff --git a/flash_decompiled/com/data/GameData.as b/flash_decompiled/com/data/GameData.as new file mode 100644 index 0000000..9fb6d5e --- /dev/null +++ b/flash_decompiled/com/data/GameData.as @@ -0,0 +1,428 @@ +package com.data +{ + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.ui.farm.data.UserFarmAreaDataList; + import com.view.ui.farm.data.UserFarmPlantDataList; + import com.view.ui.friend.OnlineUser; + import com.view.ui.ranking.data.BabelDataList; + import com.view.ui.ranking.data.BattlesDataList; + import com.view.ui.ranking.data.BigBossDataList; + import com.view.ui.ranking.data.LeagueDataList; + import com.view.ui.ranking.data.MonarchDataList; + import com.view.ui.ranking.data.PvpDataList; + import com.view.ui.ranking.data.SingleBabelDataList; + import com.view.ui.ranking.data.TianxiaDataList; + import flash.events.TimerEvent; + import flash.utils.Dictionary; + import flash.utils.Timer; + + public class GameData + { + + private static var riskConfigObj:Object; + + private static var riskParentSceneDic:Dictionary; + + private static var userRisk:Object; + + private static var riskSceneCount:int; + + private static var userHoliday:Object; + + private static var holidayAward:Object; + + private static var configMap:Object; + + private static var mineList:Array; + + private static var riskTimer:Timer; + + private static var riskBackF:Function; + + private static var riskBackF1:Function; + + public static var userFarmPlantDataList:UserFarmPlantDataList = new UserFarmPlantDataList(); + + public static var userFarmAreaDataList:UserFarmAreaDataList = new UserFarmAreaDataList(); + + private static var m_MonarchDataList:MonarchDataList = new MonarchDataList(); + + private static var m_LeagueDataList:LeagueDataList = new LeagueDataList(); + + private static var m_BattlesDataList:BattlesDataList = new BattlesDataList(); + + private static var m_BabelDataList:BabelDataList = new BabelDataList(); + + private static var m_BigBossDataList:BigBossDataList = new BigBossDataList(); + + private static var m_pvpDataList:PvpDataList = new PvpDataList(); + + private static var m_hallFameDataList:BabelDataList = new BabelDataList(); + + private static var m_singleBabelDataList:SingleBabelDataList = new SingleBabelDataList(); + + private static var m_tianxiaDataList:TianxiaDataList = new TianxiaDataList(); + + private static var m_onLineUser:OnlineUser = new OnlineUser(); + + private static var itemList:Array = new Array(); + + private static var riskSceneDic:Dictionary = new Dictionary(); + + private static var userRiskSceneDic:Dictionary = new Dictionary(); + + private static var leftColdTime:int = 0; + + private static var freshLeftTime:int = 0; + + public function GameData() + { + super(); + } + + public static function setItemList(param1:Array) : void + { + itemList = param1; + } + + public static function getItemByEntId(param1:int) : Object + { + var _loc2_:Object = null; + for each(_loc2_ in itemList) + { + if(_loc2_.entId == param1) + { + return _loc2_; + } + } + return null; + } + + public static function clearFarmPlatDataList() : void + { + userFarmPlantDataList = new UserFarmPlantDataList(); + } + + public static function clearFarmAreaDataList() : void + { + userFarmAreaDataList = new UserFarmAreaDataList(); + } + + public static function get monarchDataList() : MonarchDataList + { + return m_MonarchDataList; + } + + public static function get bigBossDataList() : BigBossDataList + { + return m_BigBossDataList; + } + + public static function get pvpDataList() : PvpDataList + { + return m_pvpDataList; + } + + public static function get leagueDataList() : LeagueDataList + { + return m_LeagueDataList; + } + + public static function get battlesDataList() : BattlesDataList + { + return m_BattlesDataList; + } + + public static function get babelDataList() : BabelDataList + { + return m_BabelDataList; + } + + public static function get onLineUser() : OnlineUser + { + return m_onLineUser; + } + + public static function get tianxiaDataList() : TianxiaDataList + { + return m_tianxiaDataList; + } + + public static function set tianxiaDataList(param1:TianxiaDataList) : void + { + m_tianxiaDataList = param1; + } + + public static function get hallFameDataList() : BabelDataList + { + return m_hallFameDataList; + } + + public static function get singleBabelDataList() : SingleBabelDataList + { + return m_singleBabelDataList; + } + + public static function getRiskSceneCount() : int + { + return riskSceneCount; + } + + public static function setRiskConfigObj(param1:Object) : void + { + var _loc3_:Object = null; + riskConfigObj = param1; + riskSceneCount = 0; + riskParentSceneDic = new Dictionary(); + var _loc2_:Array = riskConfigObj.riskParentSceneMap; + for each(_loc3_ in _loc2_) + { + riskParentSceneDic[_loc3_.id] = _loc3_; + ++riskSceneCount; + } + } + + public static function getRiskSceneList(param1:int) : Array + { + return riskSceneDic[param1]; + } + + public static function getRiskSceneBySceneId(param1:int, param2:int) : Object + { + var _loc4_:Object = null; + var _loc3_:Array = getRiskSceneList(param1); + for each(_loc4_ in _loc3_) + { + if(_loc4_.sceneId == param2) + { + return _loc4_; + } + } + return null; + } + + public static function setRiskSceneList(param1:int, param2:Array) : void + { + riskSceneDic[param1] = param2; + } + + public static function getRiskConfigObj() : Object + { + return riskConfigObj; + } + + public static function getRiskParentSceneObjById(param1:int) : Object + { + return riskParentSceneDic[param1]; + } + + public static function setUserRisk(param1:Object) : void + { + if(userRisk == null) + { + startRiskTime(); + } + userRisk = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_RISK_USERRISK)); + var _loc2_:int = int(userRisk.leftTime); + if(_loc2_ == 0) + { + freshLeftTime = -1; + if(Boolean(riskBackF)) + { + riskBackF(0); + } + } + if(_loc2_ > 0 && freshLeftTime <= 0) + { + freshLeftTime = _loc2_; + } + var _loc3_:int = int(userRisk.leftColdTime); + if(_loc3_ == 0) + { + leftColdTime = _loc3_; + return; + } + if(leftColdTime <= 0 && _loc3_ > 0) + { + leftColdTime = _loc3_; + } + } + + public static function getLeftColdTime() : int + { + return leftColdTime; + } + + private static function startRiskTime() : void + { + if(riskTimer == null) + { + riskTimer = new Timer(1000,0); + riskTimer.addEventListener(TimerEvent.TIMER,_riskTime); + } + if(riskTimer.running == false) + { + riskTimer.start(); + } + } + + public static function setTechBackF(param1:Function) : void + { + riskBackF = param1; + } + + public static function setRiskBackF1(param1:Function) : void + { + riskBackF1 = param1; + } + + private static function _riskTime(param1:TimerEvent) : void + { + var _loc2_:DevEvent = null; + if(Boolean(riskBackF) && freshLeftTime >= 0) + { + riskBackF(freshLeftTime); + } + if(Boolean(riskBackF1) && leftColdTime >= 0) + { + riskBackF1(leftColdTime); + } + if(leftColdTime >= 0) + { + --leftColdTime; + } + if(freshLeftTime >= 0) + { + --freshLeftTime; + } + if(freshLeftTime == 0) + { + ConnectService.getInstance().riskService.refreshUserHpPoint(); + } + if(leftColdTime == 0) + { + _loc2_ = new DevEvent(DevEvent.EVENT_RISK_CLEARCOLD); + Utils.g_events.dispatchEvent(_loc2_); + } + } + + public static function getUserRisk() : Object + { + return userRisk; + } + + public static function getTatolFights(param1:int) : int + { + var _loc3_:String = null; + var _loc4_:Array = null; + if(userRisk.totalStage == null) + { + return 0; + } + var _loc2_:Array = userRisk.totalStage.split(";"); + for each(_loc3_ in _loc2_) + { + _loc4_ = _loc3_.split(","); + if(_loc4_[0] == param1) + { + return _loc4_[1]; + } + } + return 0; + } + + public static function getUserRiskSceneBySeqId(param1:int) : Object + { + return userRiskSceneDic[param1]; + } + + public static function getUserRiskFightStatus(param1:int, param2:int) : int + { + var _loc5_:String = null; + var _loc6_:Array = null; + var _loc3_:Object = getUserRiskSceneBySeqId(param1); + if(_loc3_ == null) + { + return 0; + } + var _loc4_:Array = _loc3_.sceneStr.split(";"); + for each(_loc5_ in _loc4_) + { + _loc6_ = _loc5_.split(","); + if(_loc6_[0] == param2) + { + return _loc6_[1]; + } + } + return 0; + } + + public static function setUserRiskSceneBySeqId(param1:int, param2:Object) : void + { + userRiskSceneDic[param1] = param2; + var _loc3_:DevEvent = new DevEvent(DevEvent.EVENT_RISK_USERRISKSCENE); + _loc3_.id = param1; + _loc3_.obj = param2; + Utils.g_events.dispatchEvent(_loc3_); + } + + public static function setUserHoliday(param1:Object) : void + { + userHoliday = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_USERACTIVITY)); + } + + public static function getUserHoliday() : Object + { + return userHoliday; + } + + public static function setHolidayAward(param1:Object) : void + { + holidayAward = param1; + } + + public static function getHolidayAward() : Object + { + return holidayAward; + } + + public static function getConfigMap() : Object + { + return configMap; + } + + public static function setConfigMap(param1:Object) : void + { + configMap = param1; + } + + public static function setMineList(param1:Array) : void + { + mineList = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_MINE_LIST)); + } + + public static function getMineList() : Array + { + return mineList; + } + + public static function getMineById(param1:int) : Object + { + var _loc2_:Object = null; + for each(_loc2_ in mineList) + { + if(_loc2_.id == param1) + { + return _loc2_; + } + } + return null; + } + } +} + diff --git a/flash_decompiled/com/data/GovPotzMgr.as b/flash_decompiled/com/data/GovPotzMgr.as new file mode 100644 index 0000000..54cb18e --- /dev/null +++ b/flash_decompiled/com/data/GovPotzMgr.as @@ -0,0 +1,43 @@ +package com.data +{ + import com.data.data.govpotz.*; + import com.utils.HashMap; + + public class GovPotzMgr + { + + private var _govPotzMap:HashMap; + + public function GovPotzMgr() + { + super(); + this._govPotzMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:GovPotz = null; + for(_loc2_ in param1.GovPotz) + { + _loc3_ = new GovPotz(); + _loc3_.govPotzId = param1.GovPotz[_loc2_].@govPotzId; + _loc3_.name = param1.GovPotz[_loc2_].@name; + _loc3_.proType = param1.GovPotz[_loc2_].@proType; + _loc3_.addNum = param1.GovPotz[_loc2_].@addNum; + _loc3_.addLead = param1.GovPotz[_loc2_].@addLead; + _loc3_.skillId = param1.GovPotz[_loc2_].@skillId; + _loc3_.merit = param1.GovPotz[_loc2_].@merit; + _loc3_.heroLevel = param1.GovPotz[_loc2_].@heroLevel; + _loc3_.itemNum = param1.GovPotz[_loc2_].@itemNum; + this._govPotzMap.put(_loc3_.govPotzId,_loc3_); + } + } + + public function get govPotzMap() : HashMap + { + return this._govPotzMap; + } + } +} + diff --git a/flash_decompiled/com/data/HeroMgr.as b/flash_decompiled/com/data/HeroMgr.as new file mode 100644 index 0000000..1a2fdbd --- /dev/null +++ b/flash_decompiled/com/data/HeroMgr.as @@ -0,0 +1,29 @@ +package com.data +{ + public class HeroMgr + { + + private var _heroList:Array; + + public function HeroMgr() + { + super(); + this._heroList = new Array(); + } + + public function setData(param1:XML) : void + { + } + + public function get heroList() : Array + { + return this._heroList; + } + + public function set heroList(param1:Array) : void + { + this._heroList = param1; + } + } +} + diff --git a/flash_decompiled/com/data/HomeBuildData.as b/flash_decompiled/com/data/HomeBuildData.as new file mode 100644 index 0000000..07cb02d --- /dev/null +++ b/flash_decompiled/com/data/HomeBuildData.as @@ -0,0 +1,123 @@ +package com.data +{ + import com.control.ConnectService; + import flash.events.TimerEvent; + import flash.utils.Timer; + + public class HomeBuildData + { + + private var _buildId:int; + + private var _buiEntId:int; + + private var _level:int; + + private var _status:int; + + private var _leftTime:int; + + private var buildTimer:Timer; + + private var buildBackF:Function; + + public function HomeBuildData(param1:Object) + { + super(); + this._buildId = param1.buildId; + this._buiEntId = param1.buiEntId; + this._level = param1.level; + this._status = param1.status; + this._leftTime = param1.leftTime; + this.checkStatus(); + } + + public function checkStatus() : void + { + if(this._status == 1) + { + this.startBuildTime(); + } + else if(Boolean(this.buildTimer) && this.buildTimer.running) + { + this.buildTimer.stop(); + } + } + + private function startBuildTime() : void + { + if(this.buildTimer == null) + { + this.buildTimer = new Timer(1000,0); + this.buildTimer.addEventListener(TimerEvent.TIMER,this._buildTime); + } + if(this.buildTimer.running == false) + { + this.buildTimer.start(); + if(Boolean(this.buildBackF)) + { + this.buildBackF(this._leftTime); + } + } + } + + private function _buildTime(param1:TimerEvent) : void + { + if(Boolean(this.buildBackF) && this._leftTime >= 0) + { + this.buildBackF(this._leftTime); + } + --this._leftTime; + if(this._leftTime == 0) + { + ConnectService.getInstance().homeService.updateOverHomeBuild(this._buildId); + } + } + + public function setBuildBackF(param1:Function) : void + { + this.buildBackF = param1; + } + + public function get buiEntId() : int + { + return this._buiEntId; + } + + public function get level() : int + { + return this._level; + } + + public function set level(param1:int) : void + { + this._level = param1; + } + + public function get buildId() : int + { + return this._buildId; + } + + public function get status() : int + { + return this._status; + } + + public function set status(param1:int) : void + { + this._status = param1; + } + + public function get leftTime() : int + { + return this._leftTime; + } + + public function set leftTime(param1:int) : void + { + this._leftTime = param1; + } + } +} + diff --git a/flash_decompiled/com/data/HomeData.as b/flash_decompiled/com/data/HomeData.as new file mode 100644 index 0000000..eb6a0fb --- /dev/null +++ b/flash_decompiled/com/data/HomeData.as @@ -0,0 +1,1792 @@ +package com.data +{ + import com.events.DevEvent; + import com.utils.Utils; + + public class HomeData + { + + private static var userXunBao:Object; + + private static var userCard:Object; + + private static var userAsk:Object; + + private static var buildListVec:Vector.; + + private static var buildingList:Array; + + private static var userhome:Object; + + private static var schoolMap:Object; + + private static var config:Object; + + public function HomeData() + { + super(); + } + + public static function setUserXunBao(param1:Object) : void + { + userXunBao = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_HOME_USERXUNBAO)); + } + + public static function getUserXunBao() : Object + { + return userXunBao; + } + + public static function setUserCard(param1:Object) : void + { + userCard = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_HOME_USERCARD)); + } + + public static function getUserCard() : Object + { + return userCard; + } + + public static function setUserAsk(param1:Object) : void + { + userAsk = param1; + } + + public static function getUserAsk() : Object + { + return userAsk; + } + + public static function setBuildingList(param1:Array) : void + { + var _loc2_:Object = null; + if(buildingList != null) + { + return; + } + buildingList = new Array(); + for each(_loc2_ in param1) + { + buildingList.push(_loc2_); + } + } + + public static function getBuildingByEntId(param1:int) : Object + { + var _loc2_:Object = null; + for each(_loc2_ in buildingList) + { + if(_loc2_.entId == param1) + { + return _loc2_; + } + } + return null; + } + + public static function setBuildList(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:HomeBuildData = null; + buildListVec = new Vector.(); + for each(_loc2_ in param1) + { + _loc3_ = new HomeBuildData(_loc2_); + buildListVec.push(_loc3_); + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_HOME_BUILDLIST)); + } + + public static function getBuildByEntId(param1:int) : HomeBuildData + { + var _loc2_:HomeBuildData = null; + for each(_loc2_ in buildListVec) + { + if(_loc2_.buiEntId == param1) + { + return _loc2_; + } + } + return null; + } + + public static function setBuildInfo(param1:Object) : void + { + var _loc2_:HomeBuildData = null; + var _loc3_:DevEvent = null; + for each(_loc2_ in buildListVec) + { + if(_loc2_.buiEntId == param1.buiEntId) + { + _loc2_.level = param1.level; + _loc2_.status = param1.status; + _loc2_.leftTime = param1.leftTime; + _loc2_.checkStatus(); + break; + } + } + _loc3_ = new DevEvent(DevEvent.EVENT_HOME_BUILDDATA); + _loc3_.id = param1.buiEntId; + Utils.g_events.dispatchEvent(_loc3_); + } + + public static function setUserHome(param1:Object) : void + { + userhome = param1; + var _loc2_:DevEvent = new DevEvent(DevEvent.EVENT_HOME_USERHOME); + Utils.g_events.dispatchEvent(_loc2_); + } + + public static function getUserHome() : Object + { + return userhome; + } + + public static function setSchoolMap(param1:Object) : void + { + schoolMap = param1; + var _loc2_:DevEvent = new DevEvent(DevEvent.EVENT_HOME_SCHOOL); + Utils.g_events.dispatchEvent(_loc2_); + } + + public static function getSchoolMap() : Object + { + return schoolMap; + } + + public static function setConfig(param1:Object) : void + { + if(config) + { + return; + } + config = param1; + } + + public static function getConfig() : Object + { + return config; + } + + public static function getFemaleItemByLvAndType(param1:int, param2:int) : Object + { + var _loc4_:String = null; + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc3_:Object = new Object(); + var _loc8_:int = param2 / 3; + var _loc9_:int = param2 - _loc8_ * 3; + switch(param1) + { + case 1: + if(param2 < 4) + { + _loc4_ = "棉布衫"; + _loc5_ = "普通棉布纺织的长衫。侍女专用。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "青麻衫"; + _loc5_ = "普通青麻纺织的长衫。侍女专用。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "百蝶衫"; + _loc5_ = "采细绢纺织的长衫,绣有百蝶起舞的图案。侍女专用。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "梅纹衫"; + _loc5_ = "采薄纱纺织的长衫,绣有寒梅齐放的图案。侍女专用。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "流云衫"; + _loc5_ = "采上等丝绸纺织的长衫,绣有流云晚霞的图案。侍女专用。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "鸾凤衫"; + _loc5_ = "采上等云锦,以金丝银缕纺织而成的长衫,绣有鸾鸟朝凤之图案,当世佳品。侍女专用。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 2: + if(param2 < 4) + { + _loc4_ = "粗木筝"; + _loc5_ = "普通木材制成的筝。侍女专用。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "花梨筝"; + _loc5_ = "采用花梨木制成的筝。侍女专用。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "酸枝筝"; + _loc5_ = "采用上等酸梨木制成的古筝。侍女专用。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "黑檀筝"; + _loc5_ = "采稀有黑檀木制成的宝筝,雕有飞燕花纹。侍女专用。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "紫檀筝"; + _loc5_ = "采稀有紫檀木制成的宝筝,雕有青鸾花纹。侍女专用。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "雪檀筝"; + _loc5_ = "采绝世雪檀木制成的宝筝,雕有凰鸟花纹,音质恍若天籁。侍女专用。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 3: + if(param2 < 4) + { + _loc4_ = "青竹笛"; + _loc5_ = "竹子制成的长笛。侍女专用。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "流苏笛"; + _loc5_ = "装饰有流苏的长笛。侍女专用。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "莺雀笛"; + _loc5_ = "一尺八寸长的名笛,雕有莺雀花纹。侍女专用。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "鹰吟笛"; + _loc5_ = "得自上古之时的名笛,其音如鹰鸣长啸。侍女专用。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "青鸾笛"; + _loc5_ = "上古传世之名笛,雕有青鸾振翅,万羽飘零。侍女专用。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "万凰笛"; + _loc5_ = "上古传世之名笛,雕有万凰朝天,其音恍若天籁。侍女专用。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 4: + if(param2 < 4) + { + _loc4_ = "梳妆镜"; + _loc5_ = "梳妆使用的普通镜子,青铜打磨而成。侍女专用。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "古铜镜"; + _loc5_ = "质地良好的青铜古镜,有风水辟邪之说。侍女专用。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "水鉴镜"; + _loc5_ = "澄明光洁的上品宝镜,光彩照人,镜明如水。侍女专用。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "翡翠镜"; + _loc5_ = "镶嵌翡翠宝石的上品宝镜,雕有鸾鸟花纹,世之精品。侍女专用。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "洛神镜"; + _loc5_ = "得自洛水河畔的上古宝镜,传闻是洛神遗失之仙品,万中无一。侍女专用。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "九天镜"; + _loc5_ = "传闻是九天玄女于洪荒之时赐予轩辕黄帝之宝镜,乃绝世之仙品,巧夺天工。侍女专用。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 5: + if(param2 < 4) + { + _loc4_ = "桃木梳"; + _loc5_ = "普通桃木制成的木梳。侍女专用。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "牛角梳"; + _loc5_ = "普通牛角磨制而成的梳子。侍女专用。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "象牙梳"; + _loc5_ = "以象牙雕琢而成的上好梳子。侍女专用。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "黑檀梳"; + _loc5_ = "以极品黑檀木雕琢而成的梳子。侍女专用。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "紫檀梳"; + _loc5_ = "以极品紫檀木雕琢而成的梳子,雕有同心花纹。侍女专用。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "鎏金梳"; + _loc5_ = "以绝世珍品雪檀木雕琢而成的梳子,以上等黄金装点。侍女专用。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 6: + if(param2 < 4) + { + _loc4_ = "竹木壶"; + _loc5_ = "竹木制造的茶具。侍女专用。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "紫砂壶"; + _loc5_ = "紫砂烧制的茶具。侍女专用。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "青瓷壶"; + _loc5_ = "青瓷烧制的精美茶具。侍女专用。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "琉璃壶"; + _loc5_ = "琉璃烧制的精美茶具。侍女专用。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "玛瑙壶"; + _loc5_ = "玛瑙雕成的精美茶具,稀世珍品。侍女专用。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "鎏金壶"; + _loc5_ = "采玉石雕琢而成,又以纯金装点的精美茶具,绝世珍品。侍女专用。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + } + _loc7_ = "jiadingEquip_1" + param1 + "" + _loc6_ + ".jpg"; + _loc3_.name = _loc4_; + _loc3_.content = _loc5_; + _loc3_.color = _loc6_; + _loc3_.iconPath = _loc7_; + _loc3_.type = param1; + _loc3_.level = _loc9_; + _loc3_.lv = param2; + _loc3_.itempro = HomeData.getConfig().PRO_FEMALE_ITEM; + return _loc3_; + } + + public static function getShutongItemByLvAndType(param1:int, param2:int) : Object + { + var _loc4_:String = null; + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc3_:Object = new Object(); + var _loc8_:int = param2 / 3; + var _loc9_:int = param2 - _loc8_ * 3; + switch(param1) + { + case 1: + if(param2 < 4) + { + _loc4_ = "鸡毫笔"; + _loc5_ = "以鸡胸毛制成,笔力柔软。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "羊毫笔"; + _loc5_ = "以青羊或黄羊之须或尾毫制成,笔力软而无锋柔若无骨。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "狼毫笔"; + _loc5_ = "以狼尾尖之毫制成,笔力劲挺。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "紫毫笔"; + _loc5_ = "以野兔项背之毫制成,笔力挺拔尖锐而锋利。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "鼠须笔"; + _loc5_ = "以家鼠鬓须制成,笔力纯净顺扰尖峰。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "兼毫笔"; + _loc5_ = "以两种以上之毫制成,兼具多种毫笔长处。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 2: + if(param2 < 4) + { + _loc4_ = "松烟墨"; + _loc5_ = "浓黑无光,入水易化。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "油烟墨"; + _loc5_ = "坚而有光,黝而能润,舐笔不胶,入纸不晕。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "包金墨"; + _loc5_ = "通体包金。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "朱砂墨"; + _loc5_ = "以朱砂研磨制成,仅限御用。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "五彩墨"; + _loc5_ = "以红、黄、蓝、绿、白五种矿物颜料精制而成。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "超顶墨"; + _loc5_ = "浓淡分层,落纸如漆。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 3: + if(param2 < 4) + { + _loc4_ = "扎花纸"; + _loc5_ = "薄如蝉翼。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "单宣纸"; + _loc5_ = "质地较薄。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "重单纸"; + _loc5_ = "质地较厚,可经受笔力仿佛搓揉而不破。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "夹宣纸"; + _loc5_ = "经多次抄制而成的加厚宣纸。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "绵连纸"; + _loc5_ = "以竹木纤维为原料,坚韧洁白。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "玉宣纸"; + _loc5_ = "光洁坚致,犹如美玉。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 4: + if(param2 < 4) + { + _loc4_ = "澄泥砚"; + _loc5_ = "质地坚硬耐磨,易发墨,且不耗墨。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "洮砚"; + _loc5_ = "石质细腻,纹理如丝,气色秀润,发墨细快,保温利笔。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "端砚"; + _loc5_ = "体重而轻,质刚而柔,摸之寂寞无纤响,按之如小儿肌肤,温软嫩而不滑。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "歙砚"; + _loc5_ = "其石坚润,抚之如肌,磨之有锋,涩水留笔,滑不拒墨,墨小易干,涤之立净。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "徐公砚"; + _loc5_ = "自然古朴,清新淡雅,质嫩理细,扣之如磐,扪之如玉。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "龟山砚"; + _loc5_ = "研笔如锉,化墨如油,隔宿不漏。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 5: + if(param2 < 4) + { + _loc4_ = "诗经"; + _loc5_ = "集西周初年至春秋中叶共三百余篇的诗歌总集。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "大学"; + _loc5_ = "论述儒家修身治国平天下的散文。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "中庸"; + _loc5_ = "论述儒家人性修养的散文。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "尚书"; + _loc5_ = "汇集上古历史文献与部分追述古代事迹著作的汇编。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "春秋"; + _loc5_ = "记载周朝时期鲁国的国史。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "周易"; + _loc5_ = "阐述六十四卦与三百八十四卦,作占卜之用。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 6: + if(param2 < 4) + { + _loc4_ = "山石盘"; + _loc5_ = "山石形成的棋盘。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "檀木盘"; + _loc5_ = "檀木制成的棋盘。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "琉璃盘"; + _loc5_ = "琉璃制成的棋盘。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "鎏金盘"; + _loc5_ = "鎏金制成的棋盘。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "天晶盘"; + _loc5_ = "取洞府中千年凝结的晶体制成。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "星罗盘"; + _loc5_ = "落子如点星。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + } + _loc7_ = "jiadingEquip_2" + param1 + "" + _loc6_ + ".jpg"; + _loc3_.name = _loc4_; + _loc3_.content = _loc5_; + _loc3_.color = _loc6_; + _loc3_.iconPath = _loc7_; + _loc3_.type = param1; + _loc3_.level = _loc9_; + _loc3_.lv = param2; + _loc3_.itempro = HomeData.getConfig().PRO_FEMALE_ITEM; + return _loc3_; + } + + public static function getShiweiItemByLvAndType(param1:int, param2:int) : Object + { + var _loc4_:String = null; + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc3_:Object = new Object(); + var _loc8_:int = param2 / 3; + var _loc9_:int = param2 - _loc8_ * 3; + switch(param1) + { + case 1: + if(param2 < 4) + { + _loc4_ = "棉布巾"; + _loc5_ = "普通棉布纺织的头巾。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "青麻巾"; + _loc5_ = "普通青麻纺织的头巾。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "百蝶巾"; + _loc5_ = "采细绢纺织的头巾,绣有百蝶起舞的图案。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "梅纹巾"; + _loc5_ = "采薄纱纺织的头巾,绣有寒梅齐放的图案。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "流云巾"; + _loc5_ = "采上等丝绸纺织的头巾,绣有流云晚霞的图案。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "鸾凤巾"; + _loc5_ = "采上等云锦,以金丝银缕纺织而成的头巾,绣有鸾鸟朝凤之图案,当世佳品。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 2: + if(param2 < 4) + { + _loc4_ = "桃纹刀"; + _loc5_ = "选用上好桃木制成的防身用刀,其上木纹清晰可辨。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "流云剑"; + _loc5_ = "剑身如行云流水,锋芒变幻莫测。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "万鸣刀"; + _loc5_ = "运刀时万籁鸣啸,人心轰动。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "啸天剑"; + _loc5_ = "传说此剑出鞘必惊天动地。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "噬魂刀"; + _loc5_ = "噬天之魂,夺地之气。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "弑神剑"; + _loc5_ = "万物俱可毁。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 3: + if(param2 < 4) + { + _loc4_ = "薄木甲"; + _loc5_ = "以薄木板制成的胸甲,有一定防护作用。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "金丝甲"; + _loc5_ = "以金丝编织而成的胸甲,轻且华丽。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "锁心甲"; + _loc5_ = "护心效果一流,可抵一般刀剑。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "无侵甲"; + _loc5_ = "皇家御用护甲,非神器不能伤。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "不覆甲"; + _loc5_ = "从未有人见过它的损坏,哪怕一丝。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "逆型甲"; + _loc5_ = "坚如山峦,柔若肌肤。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 4: + if(param2 < 4) + { + _loc4_ = "织锦套"; + _loc5_ = "织锦编织而成的腕套,有一定防护作用。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "金丝套"; + _loc5_ = "以金丝编织而成的腕套,轻且华丽。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "锁心套"; + _loc5_ = "防护效果一流,可抵一般刀剑。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "无侵套"; + _loc5_ = "皇家御用腕套,非神器不能伤。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "不覆套"; + _loc5_ = "从未有人见过它的损坏,哪怕一丝。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "逆型套"; + _loc5_ = "坚如山峦,柔若肌肤。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 5: + if(param2 < 4) + { + _loc4_ = "织锦袜"; + _loc5_ = "织锦编织而成的护袜,有一定防护作用。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "金丝袜"; + _loc5_ = "以金丝编织而成的护袜,轻且华丽。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "锁心袜"; + _loc5_ = "防护效果一流,可抵一般刀剑。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "无侵袜"; + _loc5_ = "皇家御用护袜,非神器不能伤。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "不覆袜"; + _loc5_ = "从未有人见过它的损坏,哪怕一丝。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "逆型袜"; + _loc5_ = "坚如山峦,柔若肌肤。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 6: + if(param2 < 4) + { + _loc4_ = "桃木牌"; + _loc5_ = "普通桃木雕制而成的腰牌。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "青铜牌"; + _loc5_ = "以青铜烧铸而成的腰牌。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "皓银牌"; + _loc5_ = "以皓银烧铸而成的腰牌。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "象牙牌"; + _loc5_ = "以象牙雕琢而成的上好腰牌。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "鎏金牌"; + _loc5_ = "以鎏金烧铸而成的腰牌,出自名门。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "琉玉牌"; + _loc5_ = "采玉石雕琢而成,又以琉璃装点的精美腰牌,绝世珍品。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + } + _loc7_ = "jiadingEquip_3" + param1 + "" + _loc6_ + ".jpg"; + _loc3_.name = _loc4_; + _loc3_.content = _loc5_; + _loc3_.color = _loc6_; + _loc3_.iconPath = _loc7_; + _loc3_.type = param1; + _loc3_.level = _loc9_; + _loc3_.lv = param2; + _loc3_.itempro = HomeData.getConfig().PRO_FEMALE_ITEM; + return _loc3_; + } + + public static function getXianshengItemByLvAndType(param1:int, param2:int) : Object + { + var _loc4_:String = null; + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc3_:Object = new Object(); + var _loc8_:int = param2 / 3; + var _loc9_:int = param2 - _loc8_ * 3; + switch(param1) + { + case 1: + if(param2 < 4) + { + _loc4_ = "棉布冠"; + _loc5_ = "普通棉布纺织的发冠。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "青麻冠"; + _loc5_ = "普通青麻纺织的发冠。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "百蝶冠"; + _loc5_ = "采细绢纺织的发冠,绣有百蝶起舞的图案。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "梅纹冠"; + _loc5_ = "采薄纱纺织的发冠,绣有寒梅齐放的图案。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "流云冠"; + _loc5_ = "采上等丝绸纺织的发冠,绣有流云晚霞的图案。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "鸾凤冠"; + _loc5_ = "采上等云锦,以金丝银缕纺织而成的发冠,绣有鸾鸟朝凤之图案,当世佳品。"; + _loc6_ = "6"; + } + if(param2 > 0) + { + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + } + break; + case 2: + if(param2 < 4) + { + _loc4_ = "粗木尺"; + _loc5_ = "普通木材制成的戒尺。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "花梨尺"; + _loc5_ = "采用花梨木制成的戒尺。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "酸枝尺"; + _loc5_ = "采用上等酸梨木制成的戒尺。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "黑檀尺"; + _loc5_ = "采稀有黑檀木制成的戒尺,雕有飞燕花纹。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "紫檀尺"; + _loc5_ = "采稀有紫檀木制成的戒尺,雕有青鸾花纹。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "雪檀尺"; + _loc5_ = "采绝世雪檀木制成的戒尺,雕有凰鸟花纹,色泽光鲜夺目。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 3: + if(param2 < 4) + { + _loc4_ = "三字经"; + _loc5_ = "传统启蒙教材,最浅显易懂的读本之一。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "百家姓"; + _loc5_ = "传统蒙学读物之一。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "千字文"; + _loc5_ = "语句平白如话,易诵易记。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "千家诗"; + _loc5_ = "所选诗歌大多为名家名篇。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "论语"; + _loc5_ = "儒家学派的经典著作之一。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "道德经"; + _loc5_ = "被誉为万经之王。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 4: + if(param2 < 4) + { + _loc4_ = "棉布褂"; + _loc5_ = "普通棉布纺织的外褂。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "青麻褂"; + _loc5_ = "普通青麻纺织的外褂。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "百蝶褂"; + _loc5_ = "采细绢纺织的外褂,绣有百蝶起舞的图案。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "梅纹褂"; + _loc5_ = "采薄纱纺织的外褂,绣有寒梅齐放的图案。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "流云褂"; + _loc5_ = "采上等丝绸纺织的外褂,绣有流云晚霞的图案。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "鸾凤褂"; + _loc5_ = "采上等云锦,以金丝银缕纺织而成的外褂,绣有鸾鸟朝凤之图案,当世佳品。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 5: + if(param2 < 4) + { + _loc4_ = "白纸扇"; + _loc5_ = "市面上较为常见的折扇。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "桃木扇"; + _loc5_ = "扇柄以普通桃木雕制而成。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "象牙扇"; + _loc5_ = "扇柄以象牙雕琢而成。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "檀木扇"; + _loc5_ = "扇柄以极品檀木雕琢而成。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "鎏金扇"; + _loc5_ = "扇柄以鎏金烧铸而成,出自名门。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "琉玉扇"; + _loc5_ = "扇柄采玉石雕琢而成,又以琉璃装点,绝世珍品。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 6: + if(param2 < 4) + { + _loc4_ = "棉布鞋"; + _loc5_ = "普通棉布纺织的鞋履。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "青麻鞋"; + _loc5_ = "普通青麻纺织的鞋履。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "百蝶鞋"; + _loc5_ = "采细绢纺织的鞋履,绣有百蝶起舞的图案。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "梅纹鞋"; + _loc5_ = "采薄纱纺织的鞋履,绣有寒梅齐放的图案。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "流云鞋"; + _loc5_ = "采上等丝绸纺织的鞋履,绣有流云晚霞的图案。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "鸾凤鞋"; + _loc5_ = "采上等云锦,以金丝银缕纺织而成的鞋履,绣有鸾鸟朝凤之图案,当世佳品。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + } + _loc7_ = "jiadingEquip_4" + param1 + "" + _loc6_ + ".jpg"; + _loc3_.name = _loc4_; + _loc3_.content = _loc5_; + _loc3_.color = _loc6_; + _loc3_.iconPath = _loc7_; + _loc3_.type = param1; + _loc3_.level = _loc9_; + _loc3_.lv = param2; + _loc3_.itempro = HomeData.getConfig().PRO_SIR_ITEM; + return _loc3_; + } + + public static function getGuanjiaItemByLvAndType(param1:int, param2:int) : Object + { + var _loc4_:String = null; + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc3_:Object = new Object(); + var _loc8_:int = param2 / 3; + var _loc9_:int = param2 - _loc8_ * 3; + switch(param1) + { + case 1: + if(param2 < 4) + { + _loc4_ = "棉布带"; + _loc5_ = "普通棉布纺织的腰带。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "青麻带"; + _loc5_ = "普通青麻纺织的腰带。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "绢纺带"; + _loc5_ = "采细绢纺织的腰带,绣有百花齐放的图案。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "纱纺带"; + _loc5_ = "采薄纱纺织的腰带,绣有百鸟争鸣的图案。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "丝绸带"; + _loc5_ = "采上等丝绸纺织的腰带,绣有高山流水的图案。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "金丝带"; + _loc5_ = "采上等云锦,以金丝银缕纺织而成的腰带,绣有朝霞白露的。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 2: + if(param2 < 4) + { + _loc4_ = "粗木盘"; + _loc5_ = "普通木材制成的算盘。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "梨木盘"; + _loc5_ = "采用花梨木制成的算盘。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "青铜盘"; + _loc5_ = "采用青铜制成的算盘。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "黑铁盘"; + _loc5_ = "采稀有黑铁制成的算盘。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "紫金盘"; + _loc5_ = "采稀有资金制成的算盘。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "乌金盘"; + _loc5_ = "采乌金制成的算盘,雕有凰鸟花纹,色泽光鲜夺目。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 3: + if(param2 < 4) + { + _loc4_ = "白纸簿"; + _loc5_ = "市面上较为常见的账簿。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "桃木簿"; + _loc5_ = "账簿封面以普通桃木雕制而成。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "象牙簿"; + _loc5_ = "账簿封面以象牙作为装饰雕制而成。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "檀木簿"; + _loc5_ = "账簿封面以极品檀木雕琢而成。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "鎏金簿"; + _loc5_ = "账簿封面以鎏金烧铸而成,出自名门。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "琉玉簿"; + _loc5_ = "账簿封面采玉石雕琢而成,又以琉璃装点,绝世珍品。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 4: + if(param2 < 4) + { + _loc4_ = "白丝衣"; + _loc5_ = "普通白丝纺织的丝衣。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "青丝衣"; + _loc5_ = "普通青丝纺织的丝衣。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "蓝丝衣"; + _loc5_ = "采细绢纺织的丝衣,绣有百蝶起舞的图案。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "梅纹衣"; + _loc5_ = "采薄纱纺织的丝衣,绣有寒梅齐放的图案。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "流云衣"; + _loc5_ = "采上等丝绸纺织的丝衣,绣有流云晚霞的图案。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "鸾凤衣"; + _loc5_ = "采上等云锦,以金丝银缕纺织而成的丝衣,绣有鸾鸟朝凤之图案,当世佳品。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 5: + if(param2 < 4) + { + _loc4_ = "白玉章"; + _loc5_ = "白色玉石制作的印章。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "翡翠章"; + _loc5_ = "绿色翡翠制作的印章。"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "蓝玉章"; + _loc5_ = "蓝色玉石制作的印章。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "紫玉章"; + _loc5_ = "紫色玉石制作的印章,印章由能工巧匠雕琢而成。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "和田章"; + _loc5_ = "和田玉制作的印章,印章由传世名匠雕琢而成。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "琉玉章"; + _loc5_ = "琉璃玉制作的印章,印章由上古神匠雕琢而成。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + break; + case 6: + if(param2 < 4) + { + _loc4_ = "羊皮鞋"; + _loc5_ = "普通的羊皮鞋。"; + _loc6_ = "1"; + } + else if(param2 < 7) + { + _loc4_ = "鹿皮鞋"; + _loc5_ = "普通的鹿皮鞋"; + _loc6_ = "2"; + } + else if(param2 < 10) + { + _loc4_ = "虎皮鞋"; + _loc5_ = "由虎皮纺织的鞋履,绣有百虎震山的图案。"; + _loc6_ = "3"; + } + else if(param2 < 13) + { + _loc4_ = "紫龙鞋"; + _loc5_ = "由紫龙皮纺织的鞋履,绣有紫龙出海的图案。"; + _loc6_ = "4"; + } + else if(param2 < 16) + { + _loc4_ = "金龙鞋"; + _loc5_ = "由金龙皮纺织的鞋履,绣有金龙腾天的图案。"; + _loc6_ = "5"; + } + else + { + _loc4_ = "龙凤鞋"; + _loc5_ = "由金龙火凤皮纺织而成的鞋履,绣有龙飞风舞之图案,当世佳品。"; + _loc6_ = "6"; + } + if(_loc9_ == 0) + { + _loc4_ += "(精美)"; + } + if(_loc9_ == 1) + { + _loc4_ += "(精简)"; + } + if(_loc9_ == 2) + { + _loc4_ += "(精良)"; + } + } + _loc7_ = "jiadingEquip_5" + param1 + "" + _loc6_ + ".jpg"; + _loc3_.name = _loc4_; + _loc3_.content = _loc5_; + _loc3_.color = _loc6_; + _loc3_.iconPath = _loc7_; + _loc3_.type = param1; + _loc3_.level = _loc9_; + _loc3_.lv = param2; + _loc3_.itempro = HomeData.getConfig().PRO_GUANJIA_ITEM; + return _loc3_; + } + } +} + diff --git a/flash_decompiled/com/data/ItemsMgr.as b/flash_decompiled/com/data/ItemsMgr.as new file mode 100644 index 0000000..a085823 --- /dev/null +++ b/flash_decompiled/com/data/ItemsMgr.as @@ -0,0 +1,208 @@ +package com.data +{ + import com.data.data.items.*; + import com.utils.HashMap; + + public class ItemsMgr + { + + private var _dropPackMap:HashMap; + + private var _equipMap:HashMap; + + private var _equipDestroyMap:HashMap; + + private var _equipLevelUpMap:HashMap; + + private var _itemMap:HashMap; + + private var _itemEffectMap:HashMap; + + private var _npcSellItemMap:HashMap; + + public function ItemsMgr() + { + super(); + this._dropPackMap = new HashMap(); + this._equipMap = new HashMap(); + this._equipDestroyMap = new HashMap(); + this._equipLevelUpMap = new HashMap(); + this._itemMap = new HashMap(); + this._itemEffectMap = new HashMap(); + this._npcSellItemMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + var _loc4_:* = undefined; + var _loc5_:* = undefined; + var _loc6_:* = undefined; + var _loc7_:* = undefined; + var _loc8_:* = undefined; + var _loc9_:Item = null; + var _loc10_:Equip = null; + var _loc11_:NpcSellItem = null; + var _loc12_:ItemEffect = null; + var _loc13_:EquipLevelUp = null; + var _loc14_:EquipDestroy = null; + var _loc15_:DropPack = null; + for(_loc2_ in param1.Item) + { + _loc9_ = new Item(); + _loc9_.entId = param1.Item[_loc2_].@entId; + _loc9_.itemName = param1.Item[_loc2_].@itemName; + _loc9_.itemDesc = param1.Item[_loc2_].@itemDesc; + _loc9_.type = param1.Item[_loc2_].@type; + _loc9_.childType = param1.Item[_loc2_].@childType; + _loc9_.level = param1.Item[_loc2_].@level; + _loc9_.color = param1.Item[_loc2_].@color; + _loc9_.buyPrice = param1.Item[_loc2_].@buyPrice; + _loc9_.sellPrice = param1.Item[_loc2_].@sellPrice; + _loc9_.buyHonor = param1.Item[_loc2_].@buyHonor; + _loc9_.buyGuild = param1.Item[_loc2_].@buyGuild; + _loc9_.fameType = param1.Item[_loc2_].@fameType; + _loc9_.fameValue = param1.Item[_loc2_].@fameValue; + _loc9_.effectId = param1.Item[_loc2_].@effectId; + _loc9_.sumAble = param1.Item[_loc2_].@sumAble; + _loc9_.useAble = param1.Item[_loc2_].@useAble; + _loc9_.useMaxNum = param1.Item[_loc2_].@useMaxNum; + _loc9_.useContent = param1.Item[_loc2_].@useContent; + _loc9_.throwAble = param1.Item[_loc2_].@throwAble; + _loc9_.bandAble = param1.Item[_loc2_].@bandAble; + _loc9_.dropAble = param1.Item[_loc2_].@dropAble; + _loc9_.instDesc = param1.Item[_loc2_].@instDesc; + _loc9_.instCur = param1.Item[_loc2_].@instCur; + _loc9_.instMax = param1.Item[_loc2_].@instMax; + _loc9_.missionId = param1.Item[_loc2_].@missionId; + _loc9_.iconPath = param1.Item[_loc2_].@iconPath; + _loc9_.time = param1.Item[_loc2_].@time; + _loc9_.userHasMaxNum = param1.Item[_loc2_].@userHasMaxNum; + _loc9_.gemValue = param1.Item[_loc2_].@gemValue; + _loc9_.gemNeedNum = param1.Item[_loc2_].@gemNeedNum; + _loc9_.nextGemLevelEntId = param1.Item[_loc2_].@nextGemLevelEntId; + this._itemMap.put(_loc9_.entId,_loc9_); + } + for(_loc3_ in param1.Equip) + { + _loc10_ = new Equip(); + _loc10_.entId = param1.Equip[_loc3_].@entId; + _loc10_.childType = param1.Equip[_loc3_].@childType; + _loc10_.heroLevel = param1.Equip[_loc3_].@heroLevel; + _loc10_.heroTitle = param1.Equip[_loc3_].@heroTitle; + _loc10_.heroProf = param1.Equip[_loc3_].@heroProf; + _loc10_.value = param1.Equip[_loc3_].@value; + _loc10_.suitId = param1.Equip[_loc3_].@suitId; + _loc10_.currHoleNum = param1.Equip[_loc3_].@currHoleNum; + _loc10_.holeMaxNum = param1.Equip[_loc3_].@holeMaxNum; + this._equipMap.put(_loc10_.entId,_loc10_); + } + for(_loc4_ in param1.NpcSellItem) + { + _loc11_ = new NpcSellItem(); + _loc11_.id = param1.NpcSellItem[_loc4_].@id; + _loc11_.entId = param1.NpcSellItem[_loc4_].@entId; + _loc11_.ironLevel = param1.NpcSellItem[_loc4_].@ironLevel; + this._npcSellItemMap.put(_loc11_.id,_loc11_); + } + for(_loc5_ in param1.ItemEffect) + { + _loc12_ = new ItemEffect(); + _loc12_.id = param1.ItemEffect[_loc5_].@id; + _loc12_.effectName = param1.ItemEffect[_loc5_].@effectName; + _loc12_.effectDesc = param1.ItemEffect[_loc5_].@effectDesc; + _loc12_.effectLevel = param1.ItemEffect[_loc5_].@effectLevel; + _loc12_.iconPath = param1.ItemEffect[_loc5_].@iconPath; + _loc12_.beanName = param1.ItemEffect[_loc5_].@beanName; + _loc12_.effectType = param1.ItemEffect[_loc5_].@effectType; + _loc12_.childType = param1.ItemEffect[_loc5_].@childType; + _loc12_.para1 = param1.ItemEffect[_loc5_].@para1; + _loc12_.para2 = param1.ItemEffect[_loc5_].@para2; + _loc12_.para3 = param1.ItemEffect[_loc5_].@para3; + this._itemEffectMap.put(_loc12_.id,_loc12_); + } + for(_loc6_ in param1.EquipLevelUp) + { + _loc13_ = new EquipLevelUp(); + _loc13_.level = param1.EquipLevelUp[_loc6_].@level; + _loc13_.jingHuaId = param1.EquipLevelUp[_loc6_].@jingHuaId; + _loc13_.jingHuaNum = param1.EquipLevelUp[_loc6_].@jingHuaNum; + _loc13_.itemId = param1.EquipLevelUp[_loc6_].@itemId; + _loc13_.itemNum = param1.EquipLevelUp[_loc6_].@itemNum; + _loc13_.addPercent = param1.EquipLevelUp[_loc6_].@addPercent; + _loc13_.winPercent = param1.EquipLevelUp[_loc6_].@winPercent; + _loc13_.loseLevel = param1.EquipLevelUp[_loc6_].@loseLevel; + _loc13_.addChat = param1.EquipLevelUp[_loc6_].@addChat; + this._equipLevelUpMap.put(_loc13_.level,_loc13_); + } + for(_loc7_ in param1.EquipDestroy) + { + _loc14_ = new EquipDestroy(); + _loc14_.id = param1.EquipDestroy[_loc7_].@id; + _loc14_.color = param1.EquipDestroy[_loc7_].@color; + _loc14_.level = param1.EquipDestroy[_loc7_].@level; + _loc14_.jingHuaId = param1.EquipDestroy[_loc7_].@jingHuaId; + _loc14_.num1 = param1.EquipDestroy[_loc7_].@num1; + _loc14_.percent1 = param1.EquipDestroy[_loc7_].@percent1; + _loc14_.num2 = param1.EquipDestroy[_loc7_].@num2; + _loc14_.percent2 = param1.EquipDestroy[_loc7_].@percent2; + _loc14_.num3 = param1.EquipDestroy[_loc7_].@num3; + _loc14_.percent3 = param1.EquipDestroy[_loc7_].@percent3; + _loc14_.needMoney = param1.EquipDestroy[_loc7_].@needMoney; + this._equipDestroyMap.put(_loc14_.id,_loc14_); + } + for(_loc8_ in param1.DropPack) + { + _loc15_ = new DropPack(); + _loc15_.id = param1.DropPack[_loc8_].@id; + _loc15_.dropPackId = param1.DropPack[_loc8_].@dropPackId; + _loc15_.packType = param1.DropPack[_loc8_].@packType; + _loc15_.dropPercent = param1.DropPack[_loc8_].@dropPercent; + _loc15_.weight = param1.DropPack[_loc8_].@weight; + _loc15_.valueType = param1.DropPack[_loc8_].@valueType; + _loc15_.minValue = param1.DropPack[_loc8_].@minValue; + _loc15_.maxValue = param1.DropPack[_loc8_].@maxValue; + _loc15_.dropItemArea = param1.DropPack[_loc8_].@dropItemArea; + _loc15_.missionId = param1.DropPack[_loc8_].@missionId; + this._dropPackMap.put(_loc15_.id,_loc15_); + } + } + + public function get dropPackMap() : HashMap + { + return this._dropPackMap; + } + + public function get equipMap() : HashMap + { + return this._equipMap; + } + + public function get equipDestroyMap() : HashMap + { + return this._equipDestroyMap; + } + + public function get equipLevelUpMap() : HashMap + { + return this._equipLevelUpMap; + } + + public function get itemMap() : HashMap + { + return this._itemMap; + } + + public function get itemEffectMap() : HashMap + { + return this._itemEffectMap; + } + + public function get npcSellItemMap() : HashMap + { + return this._npcSellItemMap; + } + } +} + diff --git a/flash_decompiled/com/data/MapMgr.as b/flash_decompiled/com/data/MapMgr.as new file mode 100644 index 0000000..171aa7f --- /dev/null +++ b/flash_decompiled/com/data/MapMgr.as @@ -0,0 +1,109 @@ +package com.data +{ + import com.data.data.map.*; + import com.utils.HashMap; + + public class MapMgr + { + + private var _countryMap:HashMap; + + private var _pveMapCellMap:HashMap; + + private var _stateMap:HashMap; + + public function MapMgr() + { + super(); + this._countryMap = new HashMap(); + var _loc1_:Country = new Country(); + _loc1_.countryId = 1; + _loc1_.countryName = "燕"; + var _loc2_:Country = new Country(); + _loc2_.countryId = 2; + _loc2_.countryName = "赵"; + var _loc3_:Country = new Country(); + _loc3_.countryId = 3; + _loc3_.countryName = "齐"; + var _loc4_:Country = new Country(); + _loc4_.countryId = 4; + _loc4_.countryName = "魏"; + var _loc5_:Country = new Country(); + _loc5_.countryId = 5; + _loc5_.countryName = "韩"; + var _loc6_:Country = new Country(); + _loc6_.countryId = 6; + _loc6_.countryName = "秦"; + var _loc7_:Country = new Country(); + _loc7_.countryId = 7; + _loc7_.countryName = "楚"; + this._countryMap.put(_loc1_.countryId,_loc1_); + this._countryMap.put(_loc2_.countryId,_loc2_); + this._countryMap.put(_loc3_.countryId,_loc3_); + this._countryMap.put(_loc4_.countryId,_loc4_); + this._countryMap.put(_loc5_.countryId,_loc5_); + this._countryMap.put(_loc6_.countryId,_loc6_); + this._countryMap.put(_loc7_.countryId,_loc7_); + this._pveMapCellMap = new HashMap(); + this._stateMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + var _loc4_:* = undefined; + var _loc5_:Country = null; + var _loc6_:PveMapCell = null; + var _loc7_:State = null; + for(_loc2_ in param1.Country) + { + _loc5_ = new Country(); + _loc5_.countryId = param1.Country[_loc2_].@countryId; + _loc5_.countryName = param1.Country[_loc2_].@countryName; + this._countryMap.put(_loc5_.countryId,_loc5_); + } + for(_loc3_ in param1.PveMapCell) + { + _loc6_ = new PveMapCell(); + _loc6_.mapCellId = param1.PveMapCell[_loc3_].@mapCellId; + _loc6_.cityId = param1.PveMapCell[_loc3_].@cityId; + _loc6_.posX = param1.PveMapCell[_loc3_].@posX; + _loc6_.posY = param1.PveMapCell[_loc3_].@posY; + _loc6_.pveCastleId = param1.PveMapCell[_loc3_].@pveCastleId; + _loc6_.type = param1.PveMapCell[_loc3_].@type; + _loc6_.reFreshTime = param1.PveMapCell[_loc3_].@reFreshTime; + this._pveMapCellMap.put(_loc6_.mapCellId,_loc6_); + } + for(_loc4_ in param1.State) + { + _loc7_ = new State(); + _loc7_.stateId = param1.State[_loc4_].@stateId; + _loc7_.countryId = param1.State[_loc4_].@countryId; + _loc7_.stateName = param1.State[_loc4_].@stateName; + _loc7_.stateNo = param1.State[_loc4_].@stateNo; + _loc7_.minPosX = param1.State[_loc4_].@minPosX; + _loc7_.maxPosX = param1.State[_loc4_].@maxPosX; + _loc7_.minPosY = param1.State[_loc4_].@minPosY; + _loc7_.maxPosY = param1.State[_loc4_].@maxPosY; + this._stateMap.put(_loc7_.stateId,_loc7_); + } + } + + public function get countryMap() : HashMap + { + return this._countryMap; + } + + public function get pveMapCellMap() : HashMap + { + return this._pveMapCellMap; + } + + public function get stateMap() : HashMap + { + return this._stateMap; + } + } +} + diff --git a/flash_decompiled/com/data/MemeberShip.as b/flash_decompiled/com/data/MemeberShip.as new file mode 100644 index 0000000..bd3f054 --- /dev/null +++ b/flash_decompiled/com/data/MemeberShip.as @@ -0,0 +1,52 @@ +package com.data +{ + import com.InstallFace; + import com.data.data.city.Castle; + + public class MemeberShip + { + + private static var hasGetVipGift:Boolean; + + public function MemeberShip() + { + super(); + } + + public static function getVipGift() : Boolean + { + return hasGetVipGift; + } + + public static function setVipGift(param1:Boolean) : void + { + hasGetVipGift = param1; + } + + public static function getCurrCasId() : int + { + return InstallFace.getInstance().currCasId; + } + + public static function getCastleArr() : Array + { + return DataModoule.getInstance().userMgr.castleArr; + } + + public static function getMainCastle() : Castle + { + return DataModoule.getInstance().userMgr.castle; + } + + public static function getRemainPvpNum() : int + { + return DataModoule.getInstance().userMgr.remainPvpNum; + } + + public static function getFarmProductInfo() : Object + { + return DataModoule.getInstance().userMgr.farmObj; + } + } +} + diff --git a/flash_decompiled/com/data/MissionMgr.as b/flash_decompiled/com/data/MissionMgr.as new file mode 100644 index 0000000..8009b8e --- /dev/null +++ b/flash_decompiled/com/data/MissionMgr.as @@ -0,0 +1,167 @@ +package com.data +{ + import com.data.data.mission.*; + import com.utils.HashMap; + + public class MissionMgr + { + + private var _actionMissionMap:HashMap; + + private var _dailyMissionMap:HashMap; + + private var _missionMap:HashMap; + + private var _missionLimitMap:HashMap; + + public function MissionMgr() + { + super(); + this._actionMissionMap = new HashMap(); + this._dailyMissionMap = new HashMap(); + this._missionMap = new HashMap(); + this._missionLimitMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + var _loc4_:* = undefined; + var _loc5_:* = undefined; + var _loc6_:Mission = null; + var _loc7_:MissionLimit = null; + var _loc8_:DailyMission = null; + var _loc9_:ActionMission = null; + for(_loc2_ in param1.Mission) + { + _loc6_ = new Mission(); + _loc6_.missionId = param1.Mission[_loc2_].@missionId; + _loc6_.missionType = param1.Mission[_loc2_].@missionType; + _loc6_.missionChildType = param1.Mission[_loc2_].@missionChildType; + _loc6_.missionName = param1.Mission[_loc2_].@missionName; + _loc6_.missionDesc = param1.Mission[_loc2_].@missionDesc; + _loc6_.missionGuidDesc = param1.Mission[_loc2_].@missionGuidDesc; + _loc6_.missionCompleteDesc1 = param1.Mission[_loc2_].@missionCompleteDesc1; + _loc6_.missionHardLevel = param1.Mission[_loc2_].@missionHardLevel; + _loc6_.missionLevel = param1.Mission[_loc2_].@missionLevel; + _loc6_.completeCondition = param1.Mission[_loc2_].@completeCondition; + _loc6_.serviceName = param1.Mission[_loc2_].@serviceName; + _loc6_.parentMissionId = param1.Mission[_loc2_].@parentMissionId; + _loc6_.isDelItem = param1.Mission[_loc2_].@isDelItem; + _loc6_.limitCount = param1.Mission[_loc2_].@limitCount; + _loc6_.missioncompleteId1 = param1.Mission[_loc2_].@missioncompleteId1; + _loc6_.missioncompleteId2 = param1.Mission[_loc2_].@missioncompleteId2; + _loc6_.missioncompleteId3 = param1.Mission[_loc2_].@missioncompleteId3; + _loc6_.missioncompleteId4 = param1.Mission[_loc2_].@missioncompleteId4; + _loc6_.missioncompleteId5 = param1.Mission[_loc2_].@missioncompleteId5; + _loc6_.money = param1.Mission[_loc2_].@money; + _loc6_.gold = param1.Mission[_loc2_].@gold; + _loc6_.resource = param1.Mission[_loc2_].@resource; + _loc6_.pop = param1.Mission[_loc2_].@pop; + _loc6_.rangeValue = param1.Mission[_loc2_].@rangeValue; + _loc6_.armyId = param1.Mission[_loc2_].@armyId; + _loc6_.armyNum = param1.Mission[_loc2_].@armyNum; + _loc6_.itemGiveType = param1.Mission[_loc2_].@itemGiveType; + _loc6_.itemId1 = param1.Mission[_loc2_].@itemId1; + _loc6_.itemNum1 = param1.Mission[_loc2_].@itemNum1; + _loc6_.itemId2 = param1.Mission[_loc2_].@itemId2c; + _loc6_.itemNum2 = param1.Mission[_loc2_].@itemNum2; + _loc6_.itemId3 = param1.Mission[_loc2_].@itemId3; + _loc6_.itemNum3 = param1.Mission[_loc2_].@itemNum3; + _loc6_.itemId4 = param1.Mission[_loc2_].@itemId4; + _loc6_.itemNum4 = param1.Mission[_loc2_].@itemNum4; + _loc6_.value1 = param1.Mission[_loc2_].@value1; + _loc6_.valueType1 = param1.Mission[_loc2_].@valueType1; + _loc6_.value2 = param1.Mission[_loc2_].@value2; + _loc6_.valueType2 = param1.Mission[_loc2_].@valueType2; + _loc6_.value3 = param1.Mission[_loc2_].@value3; + _loc6_.value4 = param1.Mission[_loc2_].@value4; + _loc6_.award = param1.Mission[_loc2_].@award; + _loc6_.pic1 = param1.Mission[_loc2_].@pic1; + _loc6_.pic2 = param1.Mission[_loc2_].@pic2; + _loc6_.pic3 = param1.Mission[_loc2_].@pic3; + _loc6_.pic4 = param1.Mission[_loc2_].@pic4; + this._missionMap.put(_loc6_.missionId,_loc6_); + } + for(_loc3_ in param1.MissionLimit) + { + _loc7_ = new MissionLimit(); + _loc7_.missioncompleteId = param1.Mission[_loc3_].@missioncompleteId; + _loc7_.entId = param1.Mission[_loc3_].@entId; + _loc7_.entType = param1.Mission[_loc3_].@entType; + _loc7_.entNum = param1.Mission[_loc3_].@entNum; + _loc7_.octType = param1.Mission[_loc3_].@octType; + this._missionLimitMap.put(_loc7_.missioncompleteId,_loc7_); + } + for(_loc4_ in param1.DailyMission) + { + _loc8_ = new DailyMission(); + _loc8_.dmId = param1.DailyMission[_loc4_].@dmId; + _loc8_.name = param1.DailyMission[_loc4_].@name; + _loc8_.missionDesc = param1.DailyMission[_loc4_].@missionDesc; + _loc8_.detail = param1.DailyMission[_loc4_].@detail; + _loc8_.resultMin = param1.DailyMission[_loc4_].@resultMin; + _loc8_.resultMid = param1.DailyMission[_loc4_].@resultMid; + _loc8_.resultMax = param1.DailyMission[_loc4_].@resultMax; + _loc8_.rankId = param1.DailyMission[_loc4_].@rankId; + _loc8_.reUserProperty = param1.DailyMission[_loc4_].@reUserProperty; + _loc8_.reUserValue = param1.DailyMission[_loc4_].@reUserValue; + _loc8_.requireActPoint = param1.DailyMission[_loc4_].@requireActPoint; + _loc8_.missionActTime = param1.DailyMission[_loc4_].@missionActTime; + _loc8_.coldDownTime = param1.DailyMission[_loc4_].@coldDownTime; + _loc8_.addUserHonor = param1.DailyMission[_loc4_].@addUserHonor; + _loc8_.addUserProPointMin = param1.DailyMission[_loc4_].@addUserProPointMin; + _loc8_.addUserProPointMiddle = param1.DailyMission[_loc4_].@addUserProPointMiddle; + _loc8_.addUserProPointMax = param1.DailyMission[_loc4_].@addUserProPointMax; + _loc8_.food = param1.DailyMission[_loc4_].@food; + _loc8_.money = param1.DailyMission[_loc4_].@money; + _loc8_.idlePop = param1.DailyMission[_loc4_].@idlePop; + _loc8_.newArmy = param1.DailyMission[_loc4_].@newArmy; + _loc8_.towerArmyNum = param1.DailyMission[_loc4_].@towerArmyNum; + _loc8_.dropPackId = param1.DailyMission[_loc4_].@dropPackId; + _loc8_.iconPath = param1.DailyMission[_loc4_].@iconPath; + this._dailyMissionMap.put(_loc8_.dmId,_loc8_); + } + for(_loc5_ in param1.ActionMission) + { + _loc9_ = new ActionMission(); + _loc9_.missionId = param1.ActionMission[_loc5_].@missionId; + _loc9_.name = param1.ActionMission[_loc5_].@name; + _loc9_.name2 = param1.ActionMission[_loc5_].@name2; + _loc9_.actionTime = param1.ActionMission[_loc5_].@actionTime; + _loc9_.missionDesc = param1.ActionMission[_loc5_].@missionDesc; + _loc9_.guide = param1.ActionMission[_loc5_].@guide; + _loc9_.missionDex = param1.ActionMission[_loc5_].@missionDex; + _loc9_.para1 = param1.ActionMission[_loc5_].@para1; + _loc9_.para2 = param1.ActionMission[_loc5_].@para2; + _loc9_.para3 = param1.ActionMission[_loc5_].@para3; + _loc9_.scriptName = param1.ActionMission[_loc5_].@scriptName; + _loc9_.item = param1.ActionMission[_loc5_].@item; + _loc9_.showFlag = param1.ActionMission[_loc5_].@showFlag; + this._actionMissionMap.put(_loc9_.missionId,_loc9_); + } + } + + public function get actionMissionMap() : HashMap + { + return this._actionMissionMap; + } + + public function get dailyMissionMap() : HashMap + { + return this._dailyMissionMap; + } + + public function get missionMap() : HashMap + { + return this._missionMap; + } + + public function get missionLimitMap() : HashMap + { + return this._missionLimitMap; + } + } +} + diff --git a/flash_decompiled/com/data/ShopMgr.as b/flash_decompiled/com/data/ShopMgr.as new file mode 100644 index 0000000..13d2a8d --- /dev/null +++ b/flash_decompiled/com/data/ShopMgr.as @@ -0,0 +1,89 @@ +package com.data +{ + import com.data.data.shop.*; + import com.utils.HashMap; + + public class ShopMgr + { + + private var _fastInfoMap:HashMap; + + private var _prestigeShopMap:HashMap; + + private var _shopMap:HashMap; + + public function ShopMgr() + { + super(); + this._fastInfoMap = new HashMap(); + this._prestigeShopMap = new HashMap(); + this._shopMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + var _loc4_:* = undefined; + var _loc5_:Shop = null; + var _loc6_:FastInfo = null; + var _loc7_:PrestigeShop = null; + for(_loc2_ in param1.Shop) + { + _loc5_ = new Shop(); + _loc5_.shopId = param1.Shop[_loc2_].@shopId; + _loc5_.itemId = param1.Shop[_loc2_].@itemId; + _loc5_.tagId = param1.Shop[_loc2_].@tagId; + _loc5_.shopType = param1.Shop[_loc2_].@shopType; + _loc5_.singleNum = param1.Shop[_loc2_].@singleNum; + _loc5_.singlePrice = param1.Shop[_loc2_].@singlePrice; + _loc5_.isPayPointCanBuy = param1.Shop[_loc2_].@isPayPointCanBuy; + this._shopMap.put(_loc5_.shopId,_loc5_); + } + for(_loc3_ in param1.FastInfo) + { + _loc6_ = new FastInfo(); + _loc6_.id = param1.FastInfo[_loc3_].@id; + _loc6_.type1 = param1.FastInfo[_loc3_].@type1; + _loc6_.time1 = param1.FastInfo[_loc3_].@time1; + _loc6_.money1 = param1.FastInfo[_loc3_].@money1; + _loc6_.type2 = param1.FastInfo[_loc3_].@type2; + _loc6_.time2 = param1.FastInfo[_loc3_].@time2; + _loc6_.money2 = param1.FastInfo[_loc3_].@money2; + _loc6_.type3 = param1.FastInfo[_loc3_].@type3; + _loc6_.time3 = param1.FastInfo[_loc3_].@time3; + _loc6_.money3 = param1.FastInfo[_loc3_].@money3; + _loc6_.type4 = param1.FastInfo[_loc3_].@type4; + _loc6_.time4 = param1.FastInfo[_loc3_].@time4; + _loc6_.money4 = param1.FastInfo[_loc3_].@money4; + this._fastInfoMap.put(_loc6_.id,_loc6_); + } + for(_loc4_ in param1.PrestigeShop) + { + _loc7_ = new PrestigeShop(); + _loc7_.shopId = param1.FastInfo[_loc3_].@shopId; + _loc7_.itemId = param1.FastInfo[_loc3_].@itemId; + _loc7_.countryId = param1.FastInfo[_loc3_].@countryId; + _loc7_.pricePrestige = param1.FastInfo[_loc3_].@pricePrestige; + _loc7_.needPrestige = param1.FastInfo[_loc3_].@needPrestige; + this._prestigeShopMap.put(_loc7_.shopId,_loc7_); + } + } + + public function get fastInfoMap() : HashMap + { + return this._fastInfoMap; + } + + public function get prestigeShopMap() : HashMap + { + return this._prestigeShopMap; + } + + public function get shopMap() : HashMap + { + return this._shopMap; + } + } +} + diff --git a/flash_decompiled/com/data/TowerMgr.as b/flash_decompiled/com/data/TowerMgr.as new file mode 100644 index 0000000..4c88c96 --- /dev/null +++ b/flash_decompiled/com/data/TowerMgr.as @@ -0,0 +1,36 @@ +package com.data +{ + import com.data.data.tower.Floor; + import com.utils.HashMap; + + public class TowerMgr + { + + private var _floorMap:HashMap; + + public function TowerMgr() + { + super(); + this._floorMap = new HashMap(); + } + + public function setData(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:Floor = null; + for(_loc2_ in param1.floor) + { + _loc3_ = new Floor(); + _loc3_.index = param1.floor[_loc2_].@index; + _loc3_.boxInfo = param1.floor[_loc2_].@boxInfo; + this._floorMap.put(_loc3_.index,_loc3_); + } + } + + public function get floorMap() : HashMap + { + return this._floorMap; + } + } +} + diff --git a/flash_decompiled/com/data/UserMgr.as b/flash_decompiled/com/data/UserMgr.as new file mode 100644 index 0000000..95638ad --- /dev/null +++ b/flash_decompiled/com/data/UserMgr.as @@ -0,0 +1,87 @@ +package com.data +{ + import com.data.data.account.Account; + import com.data.data.city.Castle; + + public class UserMgr + { + + private var _account:Account; + + private var _castle:Castle; + + private var _currentCastle:Castle; + + private var _castleArr:Array; + + private var _remainPvpNum:int; + + private var _farmObj:Object; + + public function UserMgr() + { + super(); + } + + public function get account() : Account + { + return this._account; + } + + public function set account(param1:Account) : void + { + this._account = param1; + } + + public function get castle() : Castle + { + return this._castle; + } + + public function set castle(param1:Castle) : void + { + this._castle = param1; + } + + public function get currentCastle() : Castle + { + return this._castle; + } + + public function set currentCastle(param1:Castle) : void + { + this._currentCastle = param1; + } + + public function get castleArr() : Array + { + return this._castleArr; + } + + public function set castleArr(param1:Array) : void + { + this._castleArr = param1; + } + + public function get remainPvpNum() : int + { + return this._remainPvpNum; + } + + public function set remainPvpNum(param1:int) : void + { + this._remainPvpNum = param1; + } + + public function get farmObj() : Object + { + return this._farmObj; + } + + public function set farmObj(param1:Object) : void + { + this._farmObj = param1; + } + } +} + diff --git a/flash_decompiled/com/data/data/account/Account.as b/flash_decompiled/com/data/data/account/Account.as new file mode 100644 index 0000000..1fa5bee --- /dev/null +++ b/flash_decompiled/com/data/data/account/Account.as @@ -0,0 +1,56 @@ +package com.data.data.account +{ + public class Account + { + + public var accId:int; + + public var accName:String; + + public var accPwd:String; + + public var createDttm:Date; + + public var loginIp:String; + + public var lastLoginDttm:Date; + + public var status:int; + + public var statusDec:String; + + public var partnerId:String; + + public var allUserId:int; + + public var accDesc:String; + + public var envelopDttm:Date; + + public var qqVipFlag:int; + + public var qqVipLv:int; + + public var blueVipFlag:int; + + public var blueVipLv:int; + + public var yellowVipFlag:int; + + public var yellowVipLv:int; + + public var userName:String; + + public var inviteAccId:int; + + public var addupOLDttm:Date; + + public var login:Boolean; + + public function Account() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/account/BasePlayer.as b/flash_decompiled/com/data/data/account/BasePlayer.as new file mode 100644 index 0000000..6ec1555 --- /dev/null +++ b/flash_decompiled/com/data/data/account/BasePlayer.as @@ -0,0 +1,24 @@ +package com.data.data.account +{ + public class BasePlayer + { + + public var userId:int; + + public var accId:int; + + public var userName:String; + + public var sex:int; + + public var icon:String; + + public var rankId:int; + + public function BasePlayer() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/account/User.as b/flash_decompiled/com/data/data/account/User.as new file mode 100644 index 0000000..6994ee0 --- /dev/null +++ b/flash_decompiled/com/data/data/account/User.as @@ -0,0 +1,210 @@ +package com.data.data.account +{ + public class User extends BasePlayer + { + + public var waitQueLen:int; + + public var buiQueLen:int; + + public var cash:Number; + + public var skillPoint:int; + + public var headIcon:String; + + public var honor:int; + + public var titleId:int; + + public var titleExpireDttm:Date; + + public var expPoint:int; + + public var influence:int; + + public var militaryPoint:int; + + public var intelPoint:int; + + public var polityPoint:int; + + public var availPropertyPoint:int; + + public var lastLoginDttm:Date; + + public var payPoint:Number; + + public var achieve:int; + + public var casNum:int; + + public var protectStatus:int; + + public var protectEndDttm:Date; + + public var tacticPoint:int; + + public var warStatus:int; + + public var hexagram:int; + + public var constituteNum:int; + + public var laveNum:int; + + public var currGuide:String; + + public var honorNum:int; + + public var hexDate:Date; + + public var usedActPoint:int; + + public var lastActDmDttm:Date; + + public var guildAward:int; + + public var dailyGiftDttm:Date; + + public var partnerId:String; + + public var junGong:int; + + public var createDate:Date; + + public var creditDate:Date; + + public var olTime:int; + + public var defUser:int; + + public var prestige:int; + + public var lasAwardDttm:Date; + + public var prayTimes:int; + + public var selfSignature:String; + + public var pvpNum:int; + + public var countryId:int; + + public var rankName:String; + + public var nextLvHonor:int; + + public var guildFlag:String; + + public var rankIndex:int; + + public var guildId:int; + + public var armyNumLimit:int; + + public var castleList:Array; + + public var country:String; + + public var dutyName:String; + + public var dutyOfGuild:int; + + public var expLimit:int; + + public var finalIntelPoint:int; + + public var finalMilitaryPoint:int; + + public var finalPolityPoint:int; + + public var guildName:String; + + public var influenceRank:int; + + public var intelLimit:int; + + public var userRecoverSuccess:Boolean; + + public var tacticLimit:int; + + public var skillLimit:int; + + public var leaveActPoint:int; + + public var lvParaLimit:Object; + + public var militaryLimit:int; + + public var newHonor:int; + + public var polityLimit:int; + + public var sexName:String; + + public var account:Account; + + public var viplevel:int; + + public var vippoint:int; + + public var govId:int; + + public function User() + { + super(); + } + + public function getCash() : String + { + var _loc1_:int = 0; + if(this.cash > 100000000) + { + _loc1_ = this.cash / 100000000; + return _loc1_ + "亿"; + } + if(this.cash > 100000) + { + _loc1_ = this.cash / 10000; + return _loc1_ + "万"; + } + return this.cash.toString(); + } + + public function getPayPoint() : String + { + var _loc1_:int = 0; + if(this.payPoint > 100000000) + { + _loc1_ = this.payPoint / 100000000; + return _loc1_ + "亿"; + } + if(this.payPoint > 100000) + { + _loc1_ = this.payPoint / 10000; + return _loc1_ + "万"; + } + return this.payPoint.toString(); + } + + public function getHonorMissionNum() : int + { + if(this.lvParaLimit != null) + { + if(this.viplevel > 3) + { + return int(this.lvParaLimit.honorMissNum) - this.honorNum + 2; + } + return int(this.lvParaLimit.honorMissNum) - this.honorNum; + } + return 0; + } + + public function useHonorMission() : void + { + this.honorNum += 1; + } + } +} + diff --git a/flash_decompiled/com/data/data/army/Army.as b/flash_decompiled/com/data/data/army/Army.as new file mode 100644 index 0000000..4663189 --- /dev/null +++ b/flash_decompiled/com/data/data/army/Army.as @@ -0,0 +1,74 @@ +package com.data.data.army +{ + public class Army + { + + public var entId:int; + + public var armyName:String; + + public var level:int; + + public var armyDesc:String; + + public var armyType:String; + + public var iconPath:String; + + public var attack:int; + + public var defence:int; + + public var agile:int; + + public var hp:int; + + public var attackType:String; + + public var defenceType:String; + + public var moveRange:int; + + public var mobility:int; + + public var convey:int; + + public var hitRate:int; + + public var dodgeRate:int; + + public var criticalAtkRate:int; + + public var caromAtkRate:int; + + public var counterAtkRate:int; + + public var attackRange:int; + + public var consumeFood:int; + + public var casId:int; + + public var finalAtk:int; + + public var finalDef:int; + + public var finalAgl:int; + + public var finalHp:int; + + public var finalConvey:int; + + public var basePropertiesSum:int; + + public var entType:String; + + public var viewMap:Object; + + public function Army() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/army/TowerArmy.as b/flash_decompiled/com/data/data/army/TowerArmy.as new file mode 100644 index 0000000..1f044c6 --- /dev/null +++ b/flash_decompiled/com/data/data/army/TowerArmy.as @@ -0,0 +1,18 @@ +package com.data.data.army +{ + public class TowerArmy extends Army + { + + public var damageNum:int; + + public var wallSpace:int; + + public var showAttackType:String; + + public function TowerArmy() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/ArmyAttackOrder.as b/flash_decompiled/com/data/data/battle/ArmyAttackOrder.as new file mode 100644 index 0000000..6921da3 --- /dev/null +++ b/flash_decompiled/com/data/data/battle/ArmyAttackOrder.as @@ -0,0 +1,20 @@ +package com.data.data.battle +{ + public class ArmyAttackOrder + { + + public var id:int; + + public var atkArmyType:String; + + public var dfcArmyType:String; + + public var orderId:int; + + public function ArmyAttackOrder() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/ArmyOvercome.as b/flash_decompiled/com/data/data/battle/ArmyOvercome.as new file mode 100644 index 0000000..c367b74 --- /dev/null +++ b/flash_decompiled/com/data/data/battle/ArmyOvercome.as @@ -0,0 +1,20 @@ +package com.data.data.battle +{ + public class ArmyOvercome + { + + public var id:int; + + public var armyAttackType:String; + + public var armyDefenceType:String; + + public var factor:Number; + + public function ArmyOvercome() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/BabelCombat.as b/flash_decompiled/com/data/data/battle/BabelCombat.as new file mode 100644 index 0000000..1b14c3f --- /dev/null +++ b/flash_decompiled/com/data/data/battle/BabelCombat.as @@ -0,0 +1,12 @@ +package com.data.data.battle +{ + public class BabelCombat extends DimensionCombat + { + + public function BabelCombat() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/CombatRob.as b/flash_decompiled/com/data/data/battle/CombatRob.as new file mode 100644 index 0000000..e995018 --- /dev/null +++ b/flash_decompiled/com/data/data/battle/CombatRob.as @@ -0,0 +1,44 @@ +package com.data.data.battle +{ + public class CombatRob + { + + public var winFoodNum:int; + + public var winWoodNum:int; + + public var winStoneNum:int; + + public var winBronzeNum:int; + + public var winMoneyNum:int; + + public var winPopNum:int; + + public var winRangeValue:int; + + public var winHonor:int; + + public var lostFoodNum:int; + + public var lostWoodNum:int; + + public var lostStoneNum:int; + + public var lostBronzeNum:int; + + public var lostMoneyNum:int; + + public var lostPopNum:int; + + public var lostRangeValue:int; + + public var lostHonor:int; + + public function CombatRob() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/DimensionCombat.as b/flash_decompiled/com/data/data/battle/DimensionCombat.as new file mode 100644 index 0000000..247cff3 --- /dev/null +++ b/flash_decompiled/com/data/data/battle/DimensionCombat.as @@ -0,0 +1,108 @@ +package com.data.data.battle +{ + public class DimensionCombat + { + + public static const COMBAT_RESULT_ATTACKER_WIN:String = "ATTACKER"; + + public static const COMBAT_RESULT_DEFENCER_WIN:String = "DEFENCER"; + + public static const COMBAT_TYPE_ROB_PVP:String = "PVP_ROB"; + + public static const COMBAT_TYPE_SIEGE_PVP:String = "PVP_SIEGE"; + + public static const COMBAT_TYPE_EVP:String = "EVP"; + + public static const COMBAT_TYPE_PVE:String = "PVE"; + + public static const COMBAT_TYPE_BABEL:String = "BABEL"; + + public static const COMBAT_TYPE_PROV:String = "PROVINCE"; + + public static const COMBAT_TYPE_LEAGUE:String = "LEAGUE"; + + public static const FIELD_MAX_POSNO:int = 14; + + public static const COMBAT_PROCESS_C:int = 50; + + public static const ROUND_TIME:Number = 1; + + public static const MAX_X:int = 20; + + public static const MAX_Y:int = 9; + + public static const MIDDLE_Y:int = 5; + + public static const MIDDLE_X:int = 11; + + public static const MOVE_X_FORWARD:int = 1; + + public static const MOVE_X_BACKWARD:int = 2; + + public static const MOVE_Y_FORWARD:int = 3; + + public static const MOVE_Y_BACKWARD:int = 4; + + public static const DIRECTION_RIGHT:int = 3; + + public static const DIRECTION_ABOVE:int = 2; + + public static const DIRECTION_LEFT:int = 1; + + public static const DIRECTION_BELOW:int = 4; + + public var combatId:String; + + public var winResult:String; + + public var roundNum:int; + + public var combatType:String; + + public var codes:Array = new Array(); + + public var attackTroop:DimensionCombatTroop; + + public var defenceTroop:DimensionCombatTroop; + + public var mobileOrderTeams:Array = new Array(); + + public var endDttm:Date; + + public var combatRob:CombatRob; + + public var winnerShowInfo:String; + + public var loserShowInfo:String; + + public var pvpLoseTroopId:int; + + public var posAry:Array; + + public var isAssistDef:Boolean = false; + + public var assistUserId:int; + + public var assistUserName:String; + + public var assistUserIron:String; + + public var assistCastId:int; + + public var assistCastName:String; + + public var posX:int; + + public var posY:int; + + public var atkGunLv:int; + + public var defGunLv:int; + + public function DimensionCombat() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/DimensionCombatCode.as b/flash_decompiled/com/data/data/battle/DimensionCombatCode.as new file mode 100644 index 0000000..71d2426 --- /dev/null +++ b/flash_decompiled/com/data/data/battle/DimensionCombatCode.as @@ -0,0 +1,42 @@ +package com.data.data.battle +{ + import com.data.data.hero.Skill; + + public class DimensionCombatCode + { + + public var codeType:String; + + public var atkTeam:DimensionCombatTeam; + + public var dfcTeam:DimensionCombatTeam; + + public var roundNo:int; + + public var paraNum1:int; + + public var paraNum2:int; + + public var paraStr:String; + + public var skill:Skill; + + public var atkTeamId:String; + + public var dfcTeamId:String; + + public var atkSkillType:int; + + public var defSkillType:int; + + public var atkTianfuType:int; + + public var defTianfuType:int; + + public function DimensionCombatCode() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/DimensionCombatTeam.as b/flash_decompiled/com/data/data/battle/DimensionCombatTeam.as new file mode 100644 index 0000000..91694b4 --- /dev/null +++ b/flash_decompiled/com/data/data/battle/DimensionCombatTeam.as @@ -0,0 +1,95 @@ +package com.data.data.battle +{ + import com.data.data.army.Army; + import com.data.data.battleview.Impact; + import com.data.data.hero.Hero; + import com.data.data.hero.Skill; + + public class DimensionCombatTeam + { + + public var teamId:String; + + public var teamName:String; + + public var hero:Hero; + + public var army:Army; + + public var initNum:int; + + public var curNum:int; + + public var resumeNum:int; + + public var loseNum:int; + + public var damageUnit:int; + + public var justMove:Boolean; + + public var isAttacker:String; + + public var attackRange:int; + + public var skillEndRound:int; + + public var impact:Impact; + + public var impactEndRound:int; + + public var govPotzSkill:Skill; + + public var teamAttack:Number = -1; + + public var teamDefence:Number = -1; + + public var teamHp:Number = -1; + + public var teamAgile:Number = -1; + + public var teamStr:Number = -1; + + public var hitRate:Number = 2147483647; + + public var critiRate:int = -1; + + public var caromRate:int = -1; + + public var counterRate:int = -1; + + public var mobility:int = -1; + + public var moveRange:int = -1; + + public var careerArmyRate:Number = -1; + + public var direction:int; + + public var initPosX:int; + + public var initPosY:int; + + public var moveCnt:int; + + public var posX:int; + + public var posY:int; + + public var cannotMove:int; + + public var dizzyEndRound:int; + + public var posPoor:int; + + public var initSkill:Array; + + public var currSkillType:int; + + public function DimensionCombatTeam() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/DimensionCombatTroop.as b/flash_decompiled/com/data/data/battle/DimensionCombatTroop.as new file mode 100644 index 0000000..83410f7 --- /dev/null +++ b/flash_decompiled/com/data/data/battle/DimensionCombatTroop.as @@ -0,0 +1,46 @@ +package com.data.data.battle +{ + public class DimensionCombatTroop + { + + public var combat:DimensionCombat; + + public var teams:Array = new Array(); + + public var towerTeams:Array = new Array(); + + public var casId:int; + + public var casName:String; + + public var userId:int; + + public var userName:String; + + public var userIcon:String; + + public var rankId:int; + + public var guildId:int; + + public var guildName:String = ""; + + public var powerNum:String; + + public var initNum:int; + + public var lastResumePer:int; + + public var resultScore:int; + + public var atkOutId:int; + + public var gunList:Array; + + public function DimensionCombatTroop() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/NpcAttacker.as b/flash_decompiled/com/data/data/battle/NpcAttacker.as new file mode 100644 index 0000000..16042aa --- /dev/null +++ b/flash_decompiled/com/data/data/battle/NpcAttacker.as @@ -0,0 +1,22 @@ +package com.data.data.battle +{ + public class NpcAttacker + { + + public var id:int; + + public var onwer:int; + + public var winMin:int; + + public var winMax:int; + + public var pveCastleId:int; + + public function NpcAttacker() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/PveCastle.as b/flash_decompiled/com/data/data/battle/PveCastle.as new file mode 100644 index 0000000..d8d9dd0 --- /dev/null +++ b/flash_decompiled/com/data/data/battle/PveCastle.as @@ -0,0 +1,58 @@ +package com.data.data.battle +{ + public class PveCastle + { + + public var pveCastleId:int; + + public var castleLevel:int; + + public var troop1:int; + + public var troop2:int; + + public var troop3:int; + + public var pveWallId:int; + + public var freshTime:int; + + public var combatPower:int; + + public var fightPower:Number; + + public var own:int; + + public var rangeValue:int; + + public var castleType:int; + + public var pveCastleType:int; + + public var npcName:String; + + public var npcDesc:String; + + public var iconPath:String; + + public var merit:int; + + public var lingWuLevel:int; + + public var percent:int; + + public var combatItemPackId:int; + + public var combatExpPackId:int; + + public var fightItemPackId:int; + + public var fightExpPackId:int; + + public function PveCastle() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/PveHero.as b/flash_decompiled/com/data/data/battle/PveHero.as new file mode 100644 index 0000000..529425e --- /dev/null +++ b/flash_decompiled/com/data/data/battle/PveHero.as @@ -0,0 +1,18 @@ +package com.data.data.battle +{ + import com.data.data.hero.Hero; + + public class PveHero extends Hero + { + + public var type:int; + + public var iconPath:int; + + public function PveHero() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/PveTroop.as b/flash_decompiled/com/data/data/battle/PveTroop.as new file mode 100644 index 0000000..bd8aeee --- /dev/null +++ b/flash_decompiled/com/data/data/battle/PveTroop.as @@ -0,0 +1,18 @@ +package com.data.data.battle +{ + public class PveTroop + { + + public var id:int; + + public var troopId:int; + + public var pveHeroId:int; + + public function PveTroop() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battle/PveWall.as b/flash_decompiled/com/data/data/battle/PveWall.as new file mode 100644 index 0000000..27f2806 --- /dev/null +++ b/flash_decompiled/com/data/data/battle/PveWall.as @@ -0,0 +1,28 @@ +package com.data.data.battle +{ + public class PveWall + { + + public var pveWallId:int; + + public var wallHp:int; + + public var wallDef:int; + + public var nuJian:int; + + public var gunMu:int; + + public var leiShi:int; + + public var juMa:int; + + public var xianJing:int; + + public function PveWall() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battleview/Fight.as b/flash_decompiled/com/data/data/battleview/Fight.as new file mode 100644 index 0000000..42258f8 --- /dev/null +++ b/flash_decompiled/com/data/data/battleview/Fight.as @@ -0,0 +1,26 @@ +package com.data.data.battleview +{ + public class Fight + { + + public var atkFighter:FighterData; + + public var dfcFighter:FighterData; + + public var winResult:String; + + public var roundNum:int; + + public var sendNum:int; + + public var fightId:String; + + public var codes:Array; + + public function Fight() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/battleview/FightCode.as b/flash_decompiled/com/data/data/battleview/FightCode.as new file mode 100644 index 0000000..f88f319 --- /dev/null +++ b/flash_decompiled/com/data/data/battleview/FightCode.as @@ -0,0 +1,39 @@ +package com.data.data.battleview +{ + public class FightCode + { + + public var codeType:String; + + public var atkId:int; + + public var dfcId:int; + + public var paraNum1:int; + + public var paraStr:String; + + public var skillType:int; + + public var skillName:String; + + public var skillValue:int; + + public var damageValue:int; + + public function FightCode(param1:Object) + { + super(); + this.codeType = param1.codeType; + this.atkId = param1.atkId; + this.dfcId = param1.dfcId; + this.paraNum1 = param1.paraNum1; + this.paraStr = param1.paraStr; + this.skillType = param1.skillType; + this.skillName = param1.skillName; + this.skillValue = param1.skillValue; + this.damageValue = param1.damageValue; + } + } +} + diff --git a/flash_decompiled/com/data/data/battleview/FighterData.as b/flash_decompiled/com/data/data/battleview/FighterData.as new file mode 100644 index 0000000..9d57a31 --- /dev/null +++ b/flash_decompiled/com/data/data/battleview/FighterData.as @@ -0,0 +1,46 @@ +package com.data.data.battleview +{ + import com.data.data.hero.Hero; + + public class FighterData + { + + public var hero:Hero; + + public var isAttacker:String; + + public var fighterAtk:int; + + public var fighterDfc:int; + + public var fighterAgl:int; + + public var fighterHp:int; + + public var bloodNum:int; + + public var initBloodNum:int; + + public var skillEndRound:int; + + public var selfImpact:Impact; + + public var selfImpactEndSendNum:int; + + public var enemyImpact:Impact; + + public var enemyImpactEndSendNum:int; + + public var resultScore:int; + + public function FighterData() + { + super(); + } + + public function Fighter() : * + { + } + } +} + diff --git a/flash_decompiled/com/data/data/battleview/Impact.as b/flash_decompiled/com/data/data/battleview/Impact.as new file mode 100644 index 0000000..84580f4 --- /dev/null +++ b/flash_decompiled/com/data/data/battleview/Impact.as @@ -0,0 +1,32 @@ +package com.data.data.battleview +{ + public class Impact + { + + public var impactId:String; + + public var quotiety:int; + + public var para1:String; + + public var para1Num:int; + + public var para2:String; + + public var para2Num:int; + + public var sendRate:int; + + public var target:String; + + public var effectRoundNum:int; + + public var specAtt:int; + + public function Impact() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/city/Building.as b/flash_decompiled/com/data/data/city/Building.as new file mode 100644 index 0000000..7f909fd --- /dev/null +++ b/flash_decompiled/com/data/data/city/Building.as @@ -0,0 +1,143 @@ +package com.data.data.city +{ + import com.InstallFace; + import com.data.DataModoule; + import com.data.MemeberShip; + import com.newdata.user.NewRes; + import com.newdata.user.NewUserData; + import com.view.cache.BuildCache; + + public class Building extends Entity + { + + public var buiName:String; + + public var buiDesc:String; + + public var iconPath:String; + + public var numLimit:int; + + public var maxLevel:int; + + public var property:String; + + public var castleType:String; + + public var level:int; + + public var entityConsumeList:Array; + + public var entityLimitList:Array; + + public var buildTime:int; + + public var currentNums:int; + + public var buildAvail:int; + + public function Building() + { + super(); + } + + public function entityConsimeCheck() : Boolean + { + var _loc3_:EntityConsume = null; + var _loc1_:NewRes = NewUserData.getRes(); + if(this.entityConsumeList == null || this.entityConsumeList.length == 0) + { + return true; + } + var _loc2_:Boolean = true; + for each(_loc3_ in this.entityConsumeList) + { + if(_loc3_.needEntId == 20100002) + { + _loc3_.actualNum = _loc1_.foodNum; + if(_loc1_.foodNum < _loc3_.needEntNum) + { + return false; + } + } + if(_loc3_.needEntId == 20100003) + { + _loc3_.actualNum = _loc1_.woodNum; + if(_loc1_.woodNum < _loc3_.needEntNum) + { + return false; + } + } + if(_loc3_.needEntId == 20100004) + { + _loc3_.actualNum = _loc1_.stoneNum; + if(_loc1_.stoneNum < _loc3_.needEntNum) + { + return false; + } + } + if(_loc3_.needEntId == 20100005) + { + _loc3_.actualNum = _loc1_.bronzeNum; + if(_loc1_.bronzeNum < _loc3_.needEntNum) + { + return false; + } + } + if(_loc3_.needEntId == 20100001) + { + _loc3_.actualNum = _loc1_.moneyNum; + if(_loc1_.moneyNum < _loc3_.needEntNum) + { + return false; + } + } + _loc3_.red = !_loc2_; + } + return true; + } + + public function entityLimitCheck() : Boolean + { + var _loc2_:int = 0; + var _loc3_:EntityLimit = null; + var _loc4_:CastleBuilding = null; + if(this.entityLimitList == null || this.entityLimitList.length == 0) + { + return true; + } + var _loc1_:Boolean = true; + for each(_loc3_ in this.entityLimitList) + { + if(_loc3_.needEntId == 90000004) + { + _loc2_ = MemeberShip.getMainCastle().casLv; + if(_loc2_ < _loc3_.needLevel) + { + return false; + } + } + else + { + _loc4_ = BuildCache.getInstance().getCastleBuildingByEntid(InstallFace.getInstance().currCasId,_loc3_.needEntId); + if(!_loc4_) + { + return false; + } + _loc2_ = _loc4_.level; + if(_loc2_ < _loc3_.needLevel) + { + return false; + } + } + } + return true; + } + + public function getBuildList(param1:int) : Array + { + return DataModoule.getInstance().castleMgr.getMainBuildList(param1); + } + } +} + diff --git a/flash_decompiled/com/data/data/city/BuildingQueue.as b/flash_decompiled/com/data/data/city/BuildingQueue.as new file mode 100644 index 0000000..cd0845f --- /dev/null +++ b/flash_decompiled/com/data/data/city/BuildingQueue.as @@ -0,0 +1,36 @@ +package com.data.data.city +{ + public class BuildingQueue + { + + public var queId:int; + + public var casBuiId:int; + + public var time:int; + + public var isUpgrade:int; + + public var opDttm:Date; + + public var queType:String; + + public var memo:String; + + public var userId:int; + + public var casId:int; + + public var posNo:String; + + public var buiEntId:int; + + public var toLevel:int; + + public function BuildingQueue() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/city/Castle.as b/flash_decompiled/com/data/data/city/Castle.as new file mode 100644 index 0000000..cb5c680 --- /dev/null +++ b/flash_decompiled/com/data/data/city/Castle.as @@ -0,0 +1,82 @@ +package com.data.data.city +{ + public class Castle + { + + public var casId:int; + + public var userId:int; + + public var casName:String; + + public var casLv:int; + + public var rangeValue:int; + + public var rangeCeil:int; + + public var rangeLv:int; + + public var calcuDttm:Date; + + public var quarCalcuDttm:Date; + + public var stateId:int; + + public var operPeopleDttm:Date; + + public var preArmyNum:int; + + public var recruitDttm:Date; + + public var posX:int; + + public var posY:int; + + public var status:int; + + public var robbedTimes:int; + + public var todayLost:int; + + public var castleType:String; + + public var parentCasId:int; + + public var branchCasTypeList:String; + + public var occuFlagTime:Date; + + public var addHonorMissionDttm:Date; + + public var addCurrLv:String; + + public var changeCountryDttm:Date; + + public var qqType:String; + + public var qqEndTime:Date; + + public var rangMax:int; + + public var rangeLow:int; + + public var rangeTree:String; + + public var cells:int; + + public var maxCells:int; + + public var entityCapacity:EntityCapacity; + + public var newRangeValue:int; + + public var allCasNumCanHave:int; + + public function Castle() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/city/CastleBuilding.as b/flash_decompiled/com/data/data/city/CastleBuilding.as new file mode 100644 index 0000000..ccdc72c --- /dev/null +++ b/flash_decompiled/com/data/data/city/CastleBuilding.as @@ -0,0 +1,57 @@ +package com.data.data.city +{ + public class CastleBuilding + { + + public var casBuiId:int; + + public var casId:int; + + public var buiEntId:int; + + public var level:int; + + public var posNo:String; + + public var building:Building; + + public var destroyTime:int; + + public var buildQueue:BuildingQueue; + + public var entCap:EntityCapacity; + + public var highEntCap:EntityCapacity; + + public var lowEntCap:EntityCapacity; + + public var upTime:int; + + public var isUp:Boolean; + + public var currCapValue:int; + + public var divEffectValueByPos:int; + + public var highCapValue:int; + + public var lowCapValue:int; + + public var mulEffectValueByPos:int; + + public function CastleBuilding() + { + super(); + } + + public function setQueId(param1:int) : void + { + if(this.buildQueue == null) + { + this.buildQueue = new BuildingQueue(); + } + this.buildQueue.queId = param1; + } + } +} + diff --git a/flash_decompiled/com/data/data/city/CastlePop.as b/flash_decompiled/com/data/data/city/CastlePop.as new file mode 100644 index 0000000..10a2df9 --- /dev/null +++ b/flash_decompiled/com/data/data/city/CastlePop.as @@ -0,0 +1,50 @@ +package com.data.data.city +{ + public class CastlePop + { + + public var casId:int; + + public var idlePop:int; + + public var foodPop:int; + + public var woodPop:int; + + public var stonePop:int; + + public var bronzePop:int; + + public var popCeil:int; + + public var labPop:int; + + public var currPop:int; + + public var moneyAddSpeed:int; + + public var popTrend:String; + + public function CastlePop() + { + super(); + } + + public function getMoneySpeed() : String + { + var _loc1_:int = 0; + if(this.moneyAddSpeed > 100000000) + { + _loc1_ = this.moneyAddSpeed / 100000000; + return _loc1_ + "亿"; + } + if(this.moneyAddSpeed > 100000) + { + _loc1_ = this.moneyAddSpeed / 10000; + return _loc1_ + "万"; + } + return this.moneyAddSpeed.toString(); + } + } +} + diff --git a/flash_decompiled/com/data/data/city/CastleResource.as b/flash_decompiled/com/data/data/city/CastleResource.as new file mode 100644 index 0000000..34252b5 --- /dev/null +++ b/flash_decompiled/com/data/data/city/CastleResource.as @@ -0,0 +1,38 @@ +package com.data.data.city +{ + public class CastleResource + { + + public var casId:int; + + public var foodNum:int; + + public var woodNum:int; + + public var stoneNum:int; + + public var bronzeNum:int; + + public var ironNum:int; + + public var moneyNum:int; + + public var cashNum:int; + + public var lastBuyDttm:Date; + + public var changeExpNum:int; + + public var lastChangeDttm:Date; + + public var bankCapacity:int; + + public var wareCapacity:int; + + public function CastleResource() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/city/Entity.as b/flash_decompiled/com/data/data/city/Entity.as new file mode 100644 index 0000000..e38b7d2 --- /dev/null +++ b/flash_decompiled/com/data/data/city/Entity.as @@ -0,0 +1,16 @@ +package com.data.data.city +{ + public class Entity + { + + public var entId:int; + + public var entType:String; + + public function Entity() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/city/EntityCapacity.as b/flash_decompiled/com/data/data/city/EntityCapacity.as new file mode 100644 index 0000000..97be478 --- /dev/null +++ b/flash_decompiled/com/data/data/city/EntityCapacity.as @@ -0,0 +1,30 @@ +package com.data.data.city +{ + public class EntityCapacity + { + + public var entId:int; + + public var level:int; + + public var capacity:int; + + public var capDesc:String; + + public var type1:String; + + public var para1:int; + + public var type2:String; + + public var para2:int; + + public var iconPath:String; + + public function EntityCapacity() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/city/EntityConsume.as b/flash_decompiled/com/data/data/city/EntityConsume.as new file mode 100644 index 0000000..267fb37 --- /dev/null +++ b/flash_decompiled/com/data/data/city/EntityConsume.as @@ -0,0 +1,33 @@ +package com.data.data.city +{ + public class EntityConsume + { + + public var id:int; + + public var entId:int; + + public var level:int; + + public var needEntId:int; + + public var needEntNum:int; + + public var needEntName:String; + + public var actualNum:int; + + public var needDoubleNum:Number; + + public var red:Boolean; + + public var orgNeedTime:int; + + public function EntityConsume() + { + super(); + this.red = false; + } + } +} + diff --git a/flash_decompiled/com/data/data/city/EntityLimit.as b/flash_decompiled/com/data/data/city/EntityLimit.as new file mode 100644 index 0000000..94f124c --- /dev/null +++ b/flash_decompiled/com/data/data/city/EntityLimit.as @@ -0,0 +1,39 @@ +package com.data.data.city +{ + public class EntityLimit + { + + public var id:int; + + public var entId:int; + + public var level:int; + + public var needEntId:int; + + public var needLevel:int; + + public var leastNum:int; + + public var entTypeChn:String; + + public var needEntName:String; + + public var actualLevel:int; + + public var actualNum:int; + + public var needNum:int; + + public var acNum:int; + + public var red:Boolean; + + public function EntityLimit() + { + super(); + this.red = false; + } + } +} + diff --git a/flash_decompiled/com/data/data/exam/Examination.as b/flash_decompiled/com/data/data/exam/Examination.as new file mode 100644 index 0000000..946e502 --- /dev/null +++ b/flash_decompiled/com/data/data/exam/Examination.as @@ -0,0 +1,24 @@ +package com.data.data.exam +{ + public class Examination + { + + public var code:int; + + public var subject:String; + + public var option1:String; + + public var option2:String; + + public var option3:String; + + public var type:int; + + public function Examination() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/farm/UserFarm.as b/flash_decompiled/com/data/data/farm/UserFarm.as new file mode 100644 index 0000000..686e40a --- /dev/null +++ b/flash_decompiled/com/data/data/farm/UserFarm.as @@ -0,0 +1,39 @@ +package com.data.data.farm +{ + public class UserFarm + { + + public var userId:int; + + public var areaMap:Array; + + public var userFarmTree:UserFarmTree; + + public var plantList:Array; + + public var nextAreaMap:Array; + + public function UserFarm() + { + super(); + } + + public function setPlantTomap() : void + { + } + + public function getAreaMap(param1:int) : UserFarmArea + { + var _loc2_:UserFarmArea = null; + for each(_loc2_ in this.areaMap) + { + if(_loc2_.id == param1) + { + return _loc2_; + } + } + return null; + } + } +} + diff --git a/flash_decompiled/com/data/data/farm/UserFarmArea.as b/flash_decompiled/com/data/data/farm/UserFarmArea.as new file mode 100644 index 0000000..0a5bf5e --- /dev/null +++ b/flash_decompiled/com/data/data/farm/UserFarmArea.as @@ -0,0 +1,24 @@ +package com.data.data.farm +{ + public class UserFarmArea + { + + public var id:int; + + public var userId:int; + + public var posX:int; + + public var posY:int; + + public var state:int; + + public var iRemoteObjectState:int; + + public function UserFarmArea() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/farm/UserFarmInfo.as b/flash_decompiled/com/data/data/farm/UserFarmInfo.as new file mode 100644 index 0000000..b282e26 --- /dev/null +++ b/flash_decompiled/com/data/data/farm/UserFarmInfo.as @@ -0,0 +1,43 @@ +package com.data.data.farm +{ + public class UserFarmInfo + { + + public var userName:String; + + public var areaNum:int; + + public var plantNum:int; + + public var actPoint:int; + + public var foodAreaNum:int; + + public var woodAreaNum:int; + + public var stoneAreaNum:int; + + public var bronzAreaNum:int; + + public var idlePop:int; + + public var userFarm:UserFarm; + + public function UserFarmInfo(param1:Object) + { + super(); + this.userName = param1.userName + " 的农场"; + this.areaNum = param1.areaNum; + this.plantNum = param1.plantNum; + this.actPoint = param1.actPoint; + this.foodAreaNum = param1.foodAreaNum; + this.woodAreaNum = param1.woodAreaNum; + this.stoneAreaNum = param1.stoneAreaNum; + this.bronzAreaNum = param1.bronzAreaNum; + this.idlePop = param1.idlePop; + this.userFarm = param1.userFarm; + this.userFarm.setPlantTomap(); + } + } +} + diff --git a/flash_decompiled/com/data/data/farm/UserFarmPlant.as b/flash_decompiled/com/data/data/farm/UserFarmPlant.as new file mode 100644 index 0000000..9093b65 --- /dev/null +++ b/flash_decompiled/com/data/data/farm/UserFarmPlant.as @@ -0,0 +1,35 @@ +package com.data.data.farm +{ + public class UserFarmPlant + { + + public var id:int; + + public var farmAreaId:int; + + public var farmTypeId:int; + + public var userId:int; + + public var status:int; + + public var startTime:Date; + + public var yeild:int; + + public var standYeild:int; + + public var stealUserId:String; + + public var remainTime:int; + + public var userFarmType:UserFarmType; + + public function UserFarmPlant() + { + super(); + this.stealUserId = ""; + } + } +} + diff --git a/flash_decompiled/com/data/data/farm/UserFarmTree.as b/flash_decompiled/com/data/data/farm/UserFarmTree.as new file mode 100644 index 0000000..0fc0a83 --- /dev/null +++ b/flash_decompiled/com/data/data/farm/UserFarmTree.as @@ -0,0 +1,22 @@ +package com.data.data.farm +{ + public class UserFarmTree + { + + public var userId:int; + + public var waterNum:int; + + public var waterUser:String; + + public var maturnTime:Date; + + public var remainTime:int; + + public function UserFarmTree() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/farm/UserFarmType.as b/flash_decompiled/com/data/data/farm/UserFarmType.as new file mode 100644 index 0000000..f71520d --- /dev/null +++ b/flash_decompiled/com/data/data/farm/UserFarmType.as @@ -0,0 +1,40 @@ +package com.data.data.farm +{ + public class UserFarmType + { + + public var id:int; + + public var plantName:String; + + public var resType:int; + + public var needTime:int; + + public var outputNum:int; + + public var itemId:int; + + public var itemNum:int; + + public var isNeedItem:int; + + public var type:int; + + public var popNum:int; + + public var seedTime:int; + + public var resTypeName:String; + + public var itemName:String; + + public var typeName:String; + + public function UserFarmType() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/govpotz/GovPotz.as b/flash_decompiled/com/data/data/govpotz/GovPotz.as new file mode 100644 index 0000000..5532926 --- /dev/null +++ b/flash_decompiled/com/data/data/govpotz/GovPotz.as @@ -0,0 +1,30 @@ +package com.data.data.govpotz +{ + public class GovPotz + { + + public var govPotzId:int; + + public var name:String; + + public var proType:int; + + public var addNum:Number; + + public var addLead:int; + + public var skillId:int; + + public var merit:int; + + public var heroLevel:int; + + public var itemNum:int; + + public function GovPotz() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/guild/Guild.as b/flash_decompiled/com/data/data/guild/Guild.as new file mode 100644 index 0000000..0cf539a --- /dev/null +++ b/flash_decompiled/com/data/data/guild/Guild.as @@ -0,0 +1,114 @@ +package com.data.data.guild +{ + public class Guild + { + + public var guildId:int; + + public var name:String; + + public var flag:String; + + public var honour:int; + + public var level:int; + + public var capital:int; + + public var guildDesc:String; + + public var guildNotice:String; + + public var state:int; + + public var dismissState:int; + + public var levelUpTime:Date; + + public var dismissTime:Date; + + public var construction:int; + + public var propertyNum:int; + + public var picPath:String; + + public var QQGroup:String; + + public var creator:String; + + public var sellProDttm:Date; + + public var buyProDttm:Date; + + public var sellTacticNum:int; + + public var buyTacticNum:int; + + public var prayTimes:int; + + public var ladder:int; + + public var leaderName:String; + + public var countryName:String; + + public var countryId:int; + + public var upgradeItem:int; + + public var upgradeCon:int; + + public var createDttm:Date; + + public var fireNum:int; + + public var memberCount:int; + + public var leaderUserId:int; + + public var leftDismissTime:int; + + public var dutyName:String; + + public function Guild(param1:Object) + { + super(); + this.guildId = param1.guildId; + this.name = param1.guildId; + this.flag = param1.flag; + this.honour = param1.honour; + this.level = param1.level; + this.capital = param1.capital; + this.guildDesc = param1.guildDesc; + this.guildNotice = param1.guildNotice; + this.state = param1.state; + this.dismissState = param1.dismissState; + this.levelUpTime = param1.levelUpTime; + this.dismissTime = param1.dismissTime; + this.construction = param1.construction; + this.propertyNum = param1.propertyNum; + this.picPath = param1.picPath; + this.QQGroup = param1.QQGroup; + this.creator = param1.creator; + this.sellProDttm = param1.sellProDttm; + this.buyProDttm = param1.buyProDttm; + this.sellTacticNum = param1.sellTacticNum; + this.buyTacticNum = param1.buyTacticNum; + this.prayTimes = param1.prayTimes; + this.ladder = param1.ladder; + this.leaderName = param1.leaderName; + this.countryName = param1.countryName; + this.countryId = param1.countryId; + this.upgradeItem = param1.upgradeItem; + this.upgradeCon = param1.upgradeCon; + this.createDttm = param1.createDttm; + this.fireNum = param1.fireNum; + this.memberCount = param1.memberCount; + this.leaderUserId = param1.leaderUserId; + this.leftDismissTime = param1.leftDismissTime; + this.dutyName = param1.dutyName; + } + } +} + diff --git a/flash_decompiled/com/data/data/guild/GuildRight.as b/flash_decompiled/com/data/data/guild/GuildRight.as new file mode 100644 index 0000000..012af3c --- /dev/null +++ b/flash_decompiled/com/data/data/guild/GuildRight.as @@ -0,0 +1,46 @@ +package com.data.data.guild +{ + public class GuildRight + { + + public var duty:int; + + public var dutyName:String; + + public var dismissGuild:int; + + public var changeLeader:int; + + public var castleDiplomacy:int; + + public var changeDuty:int; + + public var fireMember:int; + + public var changeInfoNotice:int; + + public var inviteMember:int; + + public var permitApply:int; + + public var viewMemberStatus:int; + + public var quitGuild:int; + + public var viewMemberList:int; + + public var broadcastMesssage:int; + + public var upgradeGuild:int; + + public var upgradeCastleDev:int; + + public var manageTrade:int; + + public function GuildRight() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/hero/Career.as b/flash_decompiled/com/data/data/hero/Career.as new file mode 100644 index 0000000..d60927d --- /dev/null +++ b/flash_decompiled/com/data/data/hero/Career.as @@ -0,0 +1,28 @@ +package com.data.data.hero +{ + public class Career + { + + public var careerId:int; + + public var careerName:String; + + public var careerEntName:String; + + public var buBing:Number; + + public var gongBing:Number; + + public var cheBing:Number; + + public var qiBing:Number; + + public var qiXie:Number; + + public function Career() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/hero/Hero.as b/flash_decompiled/com/data/data/hero/Hero.as new file mode 100644 index 0000000..c0c7f16 --- /dev/null +++ b/flash_decompiled/com/data/data/hero/Hero.as @@ -0,0 +1,251 @@ +package com.data.data.hero +{ + import com.data.data.army.Army; + import com.data.data.govpotz.GovPotz; + import com.utils.Utils; + + public class Hero + { + + public var heroId:int; + + public var casId:int; + + public var userId:int; + + public var name:String; + + public var showName:String; + + public var chatName:String; + + public var picPath:String; + + public var exp:int; + + public var needExp:int; + + public var level:int; + + public var maxLevel:int; + + public var gen:int; + + public var chartr:int; + + public var atkXuanYan:String; + + public var defXuanYan:String; + + public var careerId:int; + + public var career:Career; + + public var careerName:String; + + public var merit:int; + + public var upCount:Number; + + public var hp:int; + + public var atk:int; + + public var def:int; + + public var agl:int; + + public var viewHp:int; + + public var viewAtk:int; + + public var viewDef:int; + + public var viewAgl:int; + + public var finalHp:int; + + public var finalAtk:int; + + public var finalDef:int; + + public var finalAgl:int; + + public var finalLead:int; + + public var fen1:int; + + public var fen2:int; + + public var fen3:int; + + public var fen4:int; + + public var lead:int; + + public var changeCount:int; + + public var title:int; + + public var spel1:int; + + public var equ1:int; + + public var equ2:int; + + public var equ3:int; + + public var equ4:int; + + public var equ5:int; + + public var status:int; + + public var hpStatus:int; + + public var hpStatusView:String; + + public var actionStatus:int; + + public var armyEntId:int; + + public var armyNum:int; + + public var armyTechLevelSum:int; + + public var army:Army; + + public var changeTime:Date; + + public var govPotzTime:Date; + + public var govPotzId:int; + + public var govPotz:GovPotz; + + public var heroMissionId:int; + + public var combatSkillId:int; + + public var combatSkill:Skill; + + public var fightSkillId:int; + + public var fightSkill:Skill; + + public var potzSkill:Skill; + + public var govPotzEndTime:Date; + + public var practiceStartDttm:Date; + + public var practiceEndDttm:Date; + + public var buBing:Number; + + public var gongBing:Number; + + public var cheBing:Number; + + public var qiBing:Number; + + public var qiXie:Number; + + public var actionStatusChn:String; + + public var hospitalPoint:int; + + public var hpColor:String; + + public var view:Boolean; + + public var fightStrategy:int; + + public var seconds:int; + + public var color:String; + + public var addPropertyMap:Array; + + public var genView:String; + + public var chartrView:String; + + public var careerView:String; + + public var equIdByStation:int; + + public var character:int; + + public var finalPropertyByIndex:int; + + public var hpConstans:Number; + + public var key:String; + + public var spelByChartr:String; + + public var sumFinalAttr:int; + + public var armyName:String; + + public var fightPower:int; + + public var combatPower:Number; + + public function Hero() + { + super(); + } + + public function getChartrView() : String + { + switch(this.chartr) + { + case 0: + return "谨慎"; + case 1: + return "冷静"; + case 2: + return "果敢"; + case 3: + return "勇猛"; + default: + return ""; + } + } + + public function exect(param1:Object) : void + { + this.name = param1.name; + this.showName = param1.showName; + this.hpColor = param1.hpColor; + this.hpStatus = param1.hpStatus; + this.hpStatusView = param1.hpStatusView; + this.level = param1.level; + this.viewAtk = param1.viewAtk; + this.viewDef = param1.viewDef; + this.viewAgl = param1.viewAgl; + this.viewHp = param1.viewHp; + this.careerName = param1.careerName; + this.actionStatusChn = param1.actionStatusChn; + this.heroId = param1.heroId; + this.picPath = param1.picPath; + this.careerId = param1.careerId; + this.merit = param1.merit; + this.upCount = param1.upCount; + this.changeCount = param1.changeCount; + this.exp = param1.exp; + this.needExp = param1.needExp; + this.armyNum = param1.armyNum; + this.armyName = param1.armyName; + this.fightPower = param1.fightPower; + this.combatPower = Utils.getNumFun(param1.combatPower,0); + this.finalAgl = param1.finalAgl; + this.finalAtk = param1.finalAtk; + this.finalDef = param1.finalDef; + this.finalHp = param1.finalHp; + } + } +} + diff --git a/flash_decompiled/com/data/data/hero/HeroHotel.as b/flash_decompiled/com/data/data/hero/HeroHotel.as new file mode 100644 index 0000000..6bf744c --- /dev/null +++ b/flash_decompiled/com/data/data/hero/HeroHotel.as @@ -0,0 +1,32 @@ +package com.data.data.hero +{ + public class HeroHotel + { + + public var lastFreshTime:Date; + + public var casId:int; + + public var freshDisTime:int; + + public var remainTime:int; + + public var currHeroNum:int; + + public var allHeroNum:int; + + public var nextLvHeroNum:String; + + public var nextLv:int; + + public var level:int; + + public var heroList:Array; + + public function HeroHotel() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/hero/Skill.as b/flash_decompiled/com/data/data/hero/Skill.as new file mode 100644 index 0000000..1b7d9f7 --- /dev/null +++ b/flash_decompiled/com/data/data/hero/Skill.as @@ -0,0 +1,48 @@ +package com.data.data.hero +{ + public class Skill + { + + public var skillId:int; + + public var skillName:String; + + public var skillDesc:String; + + public var skillType:String; + + public var skillTypeChn:String; + + public var skillLv:int; + + public var iconPath:String; + + public var minHeroLv:int; + + public var skillPoint:int; + + public var forFight:int; + + public var sendArmyBinary:String; + + public var acceptArmyBinary:String; + + public var cdRoundNum:int; + + public var isRoundSkill:int; + + public var impact1Id:String; + + public var impact2Id:String; + + public var specAtt:int; + + public var direction:int; + + public function Skill() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/items/AddSpeed.as b/flash_decompiled/com/data/data/items/AddSpeed.as new file mode 100644 index 0000000..4f637d4 --- /dev/null +++ b/flash_decompiled/com/data/data/items/AddSpeed.as @@ -0,0 +1,58 @@ +package com.data.data.items +{ + public class AddSpeed + { + + public var id:int; + + public var fastType:int; + + public var payMoney:int; + + public var payType:int; + + public var fastQueType:int; + + public var remainTime:int; + + public var payPoint:Number; + + public var cash:Number; + + public var type0:int; + + public var time0:int; + + public var money0:int; + + public var type1:int; + + public var time1:int; + + public var money1:int; + + public var type2:int; + + public var time2:int; + + public var money2:int; + + public var type3:int; + + public var time3:int; + + public var money3:int; + + public var type4:int; + + public var time4:int; + + public var money4:int; + + public function AddSpeed() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/items/DropPack.as b/flash_decompiled/com/data/data/items/DropPack.as new file mode 100644 index 0000000..555ca1d --- /dev/null +++ b/flash_decompiled/com/data/data/items/DropPack.as @@ -0,0 +1,32 @@ +package com.data.data.items +{ + public class DropPack + { + + public var id:int; + + public var dropPackId:int; + + public var packType:int; + + public var dropPercent:int; + + public var weight:int; + + public var valueType:int; + + public var minValue:int; + + public var maxValue:int; + + public var dropItemArea:int; + + public var missionId:int; + + public function DropPack() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/items/Equip.as b/flash_decompiled/com/data/data/items/Equip.as new file mode 100644 index 0000000..8c5fe38 --- /dev/null +++ b/flash_decompiled/com/data/data/items/Equip.as @@ -0,0 +1,30 @@ +package com.data.data.items +{ + public class Equip + { + + public var entId:int; + + public var childType:int; + + public var heroLevel:int; + + public var heroTitle:int; + + public var heroProf:int; + + public var value:String; + + public var suitId:int; + + public var currHoleNum:int; + + public var holeMaxNum:int; + + public function Equip() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/items/EquipDestroy.as b/flash_decompiled/com/data/data/items/EquipDestroy.as new file mode 100644 index 0000000..277e1c3 --- /dev/null +++ b/flash_decompiled/com/data/data/items/EquipDestroy.as @@ -0,0 +1,34 @@ +package com.data.data.items +{ + public class EquipDestroy + { + + public var id:int; + + public var color:int; + + public var level:int; + + public var jingHuaId:int; + + public var num1:int; + + public var percent1:int; + + public var num2:int; + + public var percent2:int; + + public var num3:int; + + public var percent3:int; + + public var needMoney:int; + + public function EquipDestroy() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/items/EquipLevelUp.as b/flash_decompiled/com/data/data/items/EquipLevelUp.as new file mode 100644 index 0000000..e427ecf --- /dev/null +++ b/flash_decompiled/com/data/data/items/EquipLevelUp.as @@ -0,0 +1,30 @@ +package com.data.data.items +{ + public class EquipLevelUp + { + + public var level:int; + + public var jingHuaId:int; + + public var jingHuaNum:int; + + public var itemId:int; + + public var itemNum:int; + + public var addPercent:int; + + public var winPercent:int; + + public var loseLevel:int; + + public var addChat:int; + + public function EquipLevelUp() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/items/Item.as b/flash_decompiled/com/data/data/items/Item.as new file mode 100644 index 0000000..e1947aa --- /dev/null +++ b/flash_decompiled/com/data/data/items/Item.as @@ -0,0 +1,88 @@ +package com.data.data.items +{ + public class Item + { + + public var entId:int; + + public var itemName:String; + + public var itemDesc:String; + + public var iconPath:String; + + public var type:int; + + public var effectId:String; + + public var sumAble:int; + + public var bandAble:int; + + public var throwAble:int; + + public var useAble:int; + + public var useMaxNum:int; + + public var childType:int; + + public var level:int; + + public var color:int; + + public var sellPrice:int; + + public var buyPrice:int; + + public var buyHonor:int; + + public var buyGuild:int; + + public var fameType:int; + + public var fameValue:int; + + public var dropAble:int; + + public var instDesc:int; + + public var instCur:int; + + public var instMax:int; + + public var missionId:int; + + public var time:int; + + public var gemValue:int; + + public var gemNeedNum:int; + + public var nextGemLevelEntId:int; + + public var userHasMaxNum:int; + + public var useContent:String; + + public var viewMap:Object; + + public var showName:String; + + public var num:int; + + public var equip:Object; + + public var colorStr:String; + + public var childTypeChn:String; + + public var chatName:String; + + public function Item() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/items/ItemEffect.as b/flash_decompiled/com/data/data/items/ItemEffect.as new file mode 100644 index 0000000..149b434 --- /dev/null +++ b/flash_decompiled/com/data/data/items/ItemEffect.as @@ -0,0 +1,36 @@ +package com.data.data.items +{ + public class ItemEffect + { + + public var id:int; + + public var effectName:int; + + public var effectDesc:int; + + public var effectLevel:int; + + public var iconPath:String; + + public var beanName:String; + + public var effectType:int; + + public var childType:int; + + public var para1:int; + + public var para2:int; + + public var para3:int; + + public var buffName:String; + + public function ItemEffect() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/items/NpcSellItem.as b/flash_decompiled/com/data/data/items/NpcSellItem.as new file mode 100644 index 0000000..9aa8c16 --- /dev/null +++ b/flash_decompiled/com/data/data/items/NpcSellItem.as @@ -0,0 +1,18 @@ +package com.data.data.items +{ + public class NpcSellItem + { + + public var id:int; + + public var entId:int; + + public var ironLevel:int; + + public function NpcSellItem() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/map/Country.as b/flash_decompiled/com/data/data/map/Country.as new file mode 100644 index 0000000..763081d --- /dev/null +++ b/flash_decompiled/com/data/data/map/Country.as @@ -0,0 +1,16 @@ +package com.data.data.map +{ + public class Country + { + + public var countryId:int; + + public var countryName:String; + + public function Country() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/map/PveMapCell.as b/flash_decompiled/com/data/data/map/PveMapCell.as new file mode 100644 index 0000000..8b444ef --- /dev/null +++ b/flash_decompiled/com/data/data/map/PveMapCell.as @@ -0,0 +1,26 @@ +package com.data.data.map +{ + public class PveMapCell + { + + public var mapCellId:int; + + public var cityId:int; + + public var posX:int; + + public var posY:int; + + public var pveCastleId:int; + + public var type:int; + + public var reFreshTime:int; + + public function PveMapCell() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/map/State.as b/flash_decompiled/com/data/data/map/State.as new file mode 100644 index 0000000..79d07b7 --- /dev/null +++ b/flash_decompiled/com/data/data/map/State.as @@ -0,0 +1,28 @@ +package com.data.data.map +{ + public class State + { + + public var stateId:int; + + public var countryId:int; + + public var stateName:int; + + public var stateNo:int; + + public var minPosX:int; + + public var maxPosX:int; + + public var minPosY:int; + + public var maxPosY:int; + + public function State() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/mission/ActionMission.as b/flash_decompiled/com/data/data/mission/ActionMission.as new file mode 100644 index 0000000..42385cd --- /dev/null +++ b/flash_decompiled/com/data/data/mission/ActionMission.as @@ -0,0 +1,38 @@ +package com.data.data.mission +{ + public class ActionMission + { + + public var missionId:int; + + public var name:String; + + public var name2:String; + + public var actionTime:String; + + public var missionDesc:String; + + public var guide:String; + + public var missionDex:String; + + public var para1:int; + + public var para2:int; + + public var para3:int; + + public var scriptName:String; + + public var item:String; + + public var showFlag:int; + + public function ActionMission() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/mission/DailyMission.as b/flash_decompiled/com/data/data/mission/DailyMission.as new file mode 100644 index 0000000..8f17526 --- /dev/null +++ b/flash_decompiled/com/data/data/mission/DailyMission.as @@ -0,0 +1,60 @@ +package com.data.data.mission +{ + public class DailyMission + { + + public var dmId:int; + + public var name:String; + + public var missionDesc:String; + + public var detail:String; + + public var resultMin:String; + + public var resultMid:String; + + public var resultMax:String; + + public var rankId:int; + + public var reUserProperty:String; + + public var reUserValue:int; + + public var requireActPoint:int; + + public var missionActTime:int; + + public var coldDownTime:int; + + public var addUserHonor:int; + + public var addUserProPointMin:int; + + public var addUserProPointMiddle:int; + + public var addUserProPointMax:int; + + public var food:int; + + public var money:int; + + public var idlePop:int; + + public var newArmy:int; + + public var towerArmyNum:int; + + public var dropPackId:int; + + public var iconPath:String; + + public function DailyMission() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/mission/Mission.as b/flash_decompiled/com/data/data/mission/Mission.as new file mode 100644 index 0000000..6768efb --- /dev/null +++ b/flash_decompiled/com/data/data/mission/Mission.as @@ -0,0 +1,104 @@ +package com.data.data.mission +{ + public class Mission + { + + public var missionId:int; + + public var missionType:String; + + public var missionChildType:String; + + public var missionName:String; + + public var missionDesc:String; + + public var missionGuidDesc:String; + + public var missionCompleteDesc1:String; + + public var missionHardLevel:int; + + public var missionLevel:int; + + public var completeCondition:int; + + public var serviceName:String; + + public var parentMissionId:int; + + public var isDelItem:int; + + public var limitCount:int; + + public var missioncompleteId1:int; + + public var missioncompleteId2:int; + + public var missioncompleteId3:int; + + public var missioncompleteId4:int; + + public var missioncompleteId5:int; + + public var money:int; + + public var gold:int; + + public var resource:int; + + public var pop:int; + + public var rangeValue:int; + + public var armyId:int; + + public var armyNum:int; + + public var itemGiveType:int; + + public var itemId1:int; + + public var itemNum1:int; + + public var itemId2:int; + + public var itemNum2:int; + + public var itemId3:int; + + public var itemNum3:int; + + public var itemId4:int; + + public var itemNum4:int; + + public var value1:int; + + public var valueType1:int; + + public var value2:int; + + public var valueType2:int; + + public var value3:int; + + public var value4:int; + + public var award:String; + + public var pic1:int; + + public var pic2:int; + + public var pic3:int; + + public var pic4:int; + + public function Mission() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/mission/MissionLimit.as b/flash_decompiled/com/data/data/mission/MissionLimit.as new file mode 100644 index 0000000..cee4832 --- /dev/null +++ b/flash_decompiled/com/data/data/mission/MissionLimit.as @@ -0,0 +1,22 @@ +package com.data.data.mission +{ + public class MissionLimit + { + + public var missioncompleteId:int; + + public var entId:int; + + public var entType:String; + + public var entNum:int; + + public var octType:String; + + public function MissionLimit() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/shop/FastInfo.as b/flash_decompiled/com/data/data/shop/FastInfo.as new file mode 100644 index 0000000..a41460e --- /dev/null +++ b/flash_decompiled/com/data/data/shop/FastInfo.as @@ -0,0 +1,38 @@ +package com.data.data.shop +{ + public class FastInfo + { + + public var id:int; + + public var type1:int; + + public var time1:int; + + public var money1:int; + + public var type2:int; + + public var time2:int; + + public var money2:int; + + public var type3:int; + + public var time3:int; + + public var money3:int; + + public var type4:int; + + public var time4:int; + + public var money4:int; + + public function FastInfo() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/shop/PrestigeShop.as b/flash_decompiled/com/data/data/shop/PrestigeShop.as new file mode 100644 index 0000000..8dace10 --- /dev/null +++ b/flash_decompiled/com/data/data/shop/PrestigeShop.as @@ -0,0 +1,22 @@ +package com.data.data.shop +{ + public class PrestigeShop + { + + public var shopId:int; + + public var itemId:int; + + public var countryId:int; + + public var pricePrestige:int; + + public var needPrestige:int; + + public function PrestigeShop() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/shop/Shop.as b/flash_decompiled/com/data/data/shop/Shop.as new file mode 100644 index 0000000..3d1c579 --- /dev/null +++ b/flash_decompiled/com/data/data/shop/Shop.as @@ -0,0 +1,26 @@ +package com.data.data.shop +{ + public class Shop + { + + public var shopId:int; + + public var itemId:int; + + public var tagId:int; + + public var shopType:int; + + public var singleNum:int; + + public var singlePrice:int; + + public var isPayPointCanBuy:int; + + public function Shop() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/tech/Technology.as b/flash_decompiled/com/data/data/tech/Technology.as new file mode 100644 index 0000000..a966df9 --- /dev/null +++ b/flash_decompiled/com/data/data/tech/Technology.as @@ -0,0 +1,26 @@ +package com.data.data.tech +{ + public class Technology + { + + public var entId:int; + + public var techType:String; + + public var techName:String; + + public var techDesc:String; + + public var iconPath:String; + + public var maxLevel:int; + + public var orderIndex:int; + + public function Technology() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/data/data/tower/Floor.as b/flash_decompiled/com/data/data/tower/Floor.as new file mode 100644 index 0000000..b84a29d --- /dev/null +++ b/flash_decompiled/com/data/data/tower/Floor.as @@ -0,0 +1,16 @@ +package com.data.data.tower +{ + public class Floor + { + + public var index:int; + + public var boxInfo:String; + + public function Floor() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/events/BroadEvent.as b/flash_decompiled/com/events/BroadEvent.as new file mode 100644 index 0000000..8ce6ef6 --- /dev/null +++ b/flash_decompiled/com/events/BroadEvent.as @@ -0,0 +1,18 @@ +package com.events +{ + import flash.events.Event; + + public class BroadEvent extends Event + { + + public static const HEXAGRAM_EVENT:String = "HEXAGRAM_EVENT"; + + public var msg:String; + + public function BroadEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/events/BroadEventManage.as b/flash_decompiled/com/events/BroadEventManage.as new file mode 100644 index 0000000..9cd4de5 --- /dev/null +++ b/flash_decompiled/com/events/BroadEventManage.as @@ -0,0 +1,25 @@ +package com.events +{ + import flash.events.EventDispatcher; + + public class BroadEventManage extends EventDispatcher + { + + private static var instance:BroadEventManage; + + public function BroadEventManage() + { + super(); + } + + public static function getInstance() : BroadEventManage + { + if(instance == null) + { + instance = new BroadEventManage(); + } + return instance; + } + } +} + diff --git a/flash_decompiled/com/events/DevEvent.as b/flash_decompiled/com/events/DevEvent.as new file mode 100644 index 0000000..481a03b --- /dev/null +++ b/flash_decompiled/com/events/DevEvent.as @@ -0,0 +1,206 @@ +package com.events +{ + public class DevEvent extends ParameterEvent + { + + public static const UNCONNSERVER:String = "UNCONNSERVER"; + + public static const LASTOUTRECORD:String = "lastOutRecord"; + + public static const USERTECH:String = "usertech"; + + public static const HEROCHANGE:String = "heroChange"; + + public static const CHANGEARMY:String = "changeArmy"; + + public static const FARMPLANT:String = "farmplant"; + + public static const RESOUCECHANGE:String = "resourceChange"; + + public static const DEADCASTLE:String = "deadCastle"; + + public static const PVELIST:String = "pveList"; + + public static const AlERT:String = "AlERT"; + + public static const POPCHANGE:String = "POPCHANGE"; + + public static const RESCHANGE:String = "RESCHANGE"; + + public static const CASHCHANGE:String = "CASHCHANGE"; + + public static const USERCHANGE:String = "USERCHANGE"; + + public static const CASTLECHANGE:String = "CASTLECHANGE"; + + public static const FARM_RES_UPDATE:String = "FARM_RES_UPDATE"; + + public static const RemainPvpNum_UPDATE:String = "RemainPvpNum_UPDATE"; + + public static const SHOPCHANGE:String = "SHOPCHANGE"; + + public static const CASTLEMOVE:String = "CASTLEMOVE"; + + public static const UPDATEUSERNAME:String = "UPDATEUSERNAME"; + + public static const OPENHOSPITAL:String = "OPENHOSPITAL"; + + public static const OPENWALL:String = "OPENWALL"; + + public static const NewPlayerEvent:String = "NewPlayerEvent"; + + public static const PAKCHANGE:String = "PAKCHANGE"; + + public static const GUILDCHANGE:String = "GUILDCHANGE"; + + public static const ACCOUNTCHANGE:String = "ACCOUNTCHANGE"; + + public static const USER_ICON_CHANGE:String = "USER_ICON_CHANGE"; + + public static const ONLINEUSER:String = "ONLINEUSER"; + + public static const BAOSHICHANGE:String = "BAOSHICHANGE"; + + public static const OPENHORSE:String = "OPENHORSE"; + + public static const WULICHANGE:String = "WULICHANGE"; + + public static const BOX_ENTER:String = "BOX_ENTER"; + + public static const BOX_ITEMLIST:String = "BOX_ITEMLIST"; + + public static const BOSS_USERDATA:String = "BOSS_USERDATA"; + + public static const BOSS_CHANGEHERO:String = "BOSS_CHANGEHERO"; + + public static const BOSS_TREATHERO:String = "BOSS_TREATHERO"; + + public static const BOSS_WAR:String = "BOSS_WAR"; + + public static const CHAOFU_PACKLIST:String = "CHAOFU_PACKLIST"; + + public static const CHAOFU_ITEMNUMS:String = "CHAOFU_ITEMNUMS"; + + public static const CHAOFU_BAOSHI:String = "CHAOFU_BAOSHI"; + + public static const EVENT_LEVELCONFIG:String = "EVENT_LEVELCONFIG"; + + public static const EVENT_USERACTIVITY:String = "EVENT_USERACTIVITY"; + + public static const JUNSHI_ENTER:String = "JUNSHI_ENTER"; + + public static const DATA_SKILL_FIGHT:String = "DATA_SKILL_FIGHT"; + + public static const DATA_SKILL_USERLIST:String = "DATA_SKILL_USERLIST"; + + public static const DATA_HERO_GETALLHEROLIST:String = "DATA_HERO_GETALLHEROLIST"; + + public static const DATA_HERO_GETHEROBYID:String = "DATA_HERO_GETHEROBYID"; + + public static const DATA_COPYHERO_GETALL:String = "DATA_COPYHERO_GETALL"; + + public static const EVENT_YABIAO_ENTER:String = "EVENT_YABIAO_ENTER"; + + public static const EVENT_YABIAO_YABIAOLIST:String = "EVENT_YABIAO_YABIAOLIST"; + + public static const EVENT_YABIAO_ITEM:String = "EVENT_YABIAO_ITEM"; + + public static const EVENT_CHONGZHI_MAIN:String = "EVENT_CHONGZHI_MAIN"; + + public static const EVENT_CHONGZHI_PAYCOUNT:String = "EVENT_CHONGZHI_PAYCOUNT"; + + public static const EVENT_CHONGZHI_GETGIFT:String = "EVENT_CHONGZHI_GETGIFT"; + + public static const EVENT_CHONGZHI_GETDAILYLIST:String = "EVENT_CHONGZHI_GETDAILYLIST"; + + public static const EVENT_CHONGZHI_GETDAILYLISTRESULT:String = "EVENT_CHONGZHI_GETDAILYLISTRESULT"; + + public static const EVENT_GAMEINFO:String = "EVENT_GAMEINFO"; + + public static const EVENT_WORLDBOSS_ENTER:String = "EVENT_WORLDBOSS_ENTER"; + + public static const EVENT_TIANFU_LIST:String = "EVENT_TIANFU_LIST"; + + public static const EVENT_RISK_CONFIG:String = "EVENT_RISK_CONFIG"; + + public static const EVENT_RISKRCENE_CONFIG:String = "EVENT_RISKRCENE_CONFIG"; + + public static const EVENT_RISK_COMBAT:String = "EVENT_RISK_COMBAT"; + + public static const EVENT_RISK_COMBAT_TEN:String = "EVENT_RISK_COMBAT_TEN"; + + public static const EVENT_RISK_USERRISK:String = "EVENT_RISK_USERRISK"; + + public static const EVENT_RISK_USERRISKSCENE:String = "EVENT_RISK_USERRISKSCENE"; + + public static const EVENT_RISK_GETAWARD:String = "EVENT_RISK_GETAWARD"; + + public static const EVENT_RISK_CLEARCOLD:String = "EVENT_RISK_CLEARCOLD"; + + public static const EVENT_RISK_HEROLIST:String = "EVENT_RISK_HEROLIST"; + + public static const EVENT_RISK_RANK:String = "EVENT_RISK_RANK"; + + public static const EVENT_HOME_USERXUNBAO:String = "EVENT_HOME_USERXUNBAO"; + + public static const EVENT_HOME_USERCARD:String = "EVENT_HOME_USERCARD"; + + public static const EVENT_HOME_STARTCARD:String = "EVENT_HOME_STARTCARD"; + + public static const EVENT_HOME_CHANGECARD:String = "EVENT_HOME_CHANGECARD"; + + public static const EVENT_HOME_ENDCARD:String = "EVENT_HOME_ENDCARD"; + + public static const EVENT_HOME_USERASK:String = "EVENT_HOME_USERASK"; + + public static const EVENT_HOME_USERASK_STARTRESULT:String = "EVENT_HOME_USERASK_STARTRESULT"; + + public static const EVENT_HOME_USERASK_SUBMITRESULT:String = "EVENT_HOME_USERASK_SUBMITRESULT"; + + public static const EVENT_HOME_BUILDLIST:String = "EVENT_HOME_BUILDLIST"; + + public static const EVENT_HOME_BUILDDATA:String = "EVENT_HOME_BUILDDATA"; + + public static const EVENT_HOME_USERHOME:String = "EVENT_HOME_USERHOME"; + + public static const EVENT_HOME_SCHOOL:String = "EVENT_HOME_SCHOOL"; + + public static const EVENT_MINE_LIST:String = "EVENT_MINE_LIST"; + + public static const EVENT_MINE_INFO:String = "EVENT_MINE_INFO"; + + public static const EVENT_MINE_FIGHT:String = "EVENT_MINE_FIGHT"; + + public static const EVENT_LUCKBOX_DATA:String = "EVENT_LUCKBOX_DATA"; + + public static const EVENT_LUCKBOX_USERDATA:String = "EVENT_LUCKBOX_USERDATA"; + + public static const EVENT_LUCKBOX_OPENBOX:String = "EVENT_LUCKBOX_OPENBOX"; + + public static const EVENT_SINGLEBABEL_DATA:String = "EVENT_SINGLEBABEL_DATA"; + + public static const EVENT_SINGLEBABEL_DROPLIST:String = "EVENT_SINGLEBABEL_DROPLIST"; + + public static const EVENT_SINGLEBABEL_STAGEPOWER:String = "EVENT_SINGLEBABEL_STAGEPOWER"; + + public static const DATA_JIANGHUN_LIST:String = "DATA_JIANGHUN_LIST"; + + public static const DATA_JIANGHUN_UPDATE:String = "DATA_JIANGHUN_UPDATE"; + + public static const DATA_USERGUN:String = "DATA_USERGUN"; + + public var id:int; + + public var para1:int; + + public var arr:Array; + + public var obj:Object; + + public function DevEvent(param1:String, param2:* = null) + { + super(param1,param2); + } + } +} + diff --git a/flash_decompiled/com/events/EventUtils.as b/flash_decompiled/com/events/EventUtils.as new file mode 100644 index 0000000..3c0dfc3 --- /dev/null +++ b/flash_decompiled/com/events/EventUtils.as @@ -0,0 +1,130 @@ +package com.events +{ + import com.InstallFace; + import com.view.tip.EquipTips; + import com.view.ui.battle.BattleViewUI; + import com.view.ui.battle.HeroBattleViewUI; + import com.view.ui.farm.FarmView; + import com.view.ui.friend.FriendMainUI; + import com.view.ui.guild.GuildViewUI; + import com.view.world.World; + import flash.events.EventDispatcher; + import flash.geom.Point; + + public class EventUtils extends EventDispatcher + { + + private static var instance:EventUtils; + + private var face:InstallFace = InstallFace.getInstance(); + + public function EventUtils() + { + super(); + addEventListener(LinkEvent.LINK_EVENT,this.getLinkEvent,false,0,true); + } + + public static function getInstance() : EventUtils + { + if(instance == null) + { + instance = new EventUtils(); + } + return instance; + } + + private function getLinkEvent(param1:LinkEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:GuildViewUI = null; + var _loc5_:String = null; + var _loc6_:BattleViewUI = null; + var _loc7_:String = null; + var _loc8_:Point = null; + var _loc9_:EquipTips = null; + var _loc10_:String = null; + var _loc11_:HeroBattleViewUI = null; + var _loc12_:Array = null; + var _loc13_:World = null; + var _loc14_:FriendMainUI = null; + var _loc15_:FarmView = null; + if(param1.eventType == "kinginfo") + { + _loc2_ = param1.id; + return; + } + if(param1.eventType == "unioninfoById") + { + _loc3_ = int(param1.id); + _loc4_ = GuildViewUI.getInstance(); + _loc4_.setGuildId(_loc3_); + this.face.stage.addChild(_loc4_); + _loc4_.x = 300; + _loc4_.y = 120; + return; + } + if(param1.eventType == "combat") + { + _loc5_ = param1.id; + _loc5_ = _loc5_.substr(2,_loc5_.length - 3); + _loc6_ = BattleViewUI.getInstance(); + _loc6_.showUI(_loc5_); + return; + } + if(param1.eventType == "item") + { + _loc7_ = param1.id; + _loc8_ = new Point(); + _loc8_.x = this.face.stage.mouseX; + _loc8_.y = this.face.stage.mouseY; + _loc9_ = EquipTips.getInstance(); + _loc9_.setPosi(_loc8_); + _loc9_.update(_loc7_); + return; + } + if(param1.eventType == "fight") + { + _loc10_ = param1.id; + _loc10_ = _loc10_.substr(2,_loc10_.length - 3); + _loc11_ = HeroBattleViewUI.getInstance(); + _loc11_.showUI(_loc10_); + return; + } + if(param1.eventType == "map") + { + _loc12_ = param1.data; + _loc13_ = World.getInstance(); + _loc13_.toPosi(_loc12_[0],_loc12_[1]); + if(this.face.currStatus != 1) + { + this.face.toWorld(); + } + return; + } + if(param1.eventType == "addFriend") + { + _loc14_ = FriendMainUI.getInstance(); + _loc14_.showApply = true; + _loc14_.show(); + return; + } + if(param1.eventType == "enterFarm") + { + _loc15_ = FarmView.getInstance(); + _loc15_.enterFarmById(int(param1.id)); + _loc15_.show(); + return; + } + if(param1.eventType == "heroId") + { + return; + } + if(param1.eventType == "viewGuild") + { + return; + } + } + } +} + diff --git a/flash_decompiled/com/events/LinkEvent.as b/flash_decompiled/com/events/LinkEvent.as new file mode 100644 index 0000000..c42e240 --- /dev/null +++ b/flash_decompiled/com/events/LinkEvent.as @@ -0,0 +1,22 @@ +package com.events +{ + import flash.events.Event; + + public class LinkEvent extends Event + { + + public static const LINK_EVENT:String = "link_event"; + + public var eventType:String; + + public var id:String; + + public var data:Array; + + public function LinkEvent() + { + super(LINK_EVENT); + } + } +} + diff --git a/flash_decompiled/com/events/ParameterEvent.as b/flash_decompiled/com/events/ParameterEvent.as new file mode 100644 index 0000000..27e77e8 --- /dev/null +++ b/flash_decompiled/com/events/ParameterEvent.as @@ -0,0 +1,27 @@ +package com.events +{ + import flash.events.Event; + + public class ParameterEvent extends Event + { + + private var parameter:Object; + + public function ParameterEvent(param1:String, param2:* = null) + { + this.parameter = param2; + super(param1,false,false); + } + + override public function clone() : Event + { + return new ParameterEvent(type,this.parameter); + } + + public function getParameter() : * + { + return this.parameter; + } + } +} + diff --git a/flash_decompiled/com/greensock/OverwriteManager.as b/flash_decompiled/com/greensock/OverwriteManager.as new file mode 100644 index 0000000..4c4b0eb --- /dev/null +++ b/flash_decompiled/com/greensock/OverwriteManager.as @@ -0,0 +1,181 @@ +package com.greensock +{ + import com.greensock.core.*; + + public class OverwriteManager + { + + public static var enabled:Boolean; + + public static var mode:int; + + public static const version:Number = 6.02; + + public static const NONE:int = 0; + + public static const ALL_IMMEDIATE:int = 1; + + public static const AUTO:int = 2; + + public static const CONCURRENT:int = 3; + + public static const ALL_ONSTART:int = 4; + + public static const PREEXISTING:int = 5; + + public function OverwriteManager() + { + super(); + } + + public static function getGlobalPaused(param1:TweenCore) : Boolean + { + while(param1) + { + if(param1.cachedPaused) + { + return true; + } + param1 = param1.timeline; + } + return false; + } + + public static function init(param1:int = 2) : int + { + if(TweenLite.version < 11.1) + { + throw new Error("Warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com."); + } + TweenLite.overwriteManager = OverwriteManager; + mode = param1; + enabled = true; + return mode; + } + + public static function manageOverwrites(param1:TweenLite, param2:Object, param3:Array, param4:uint) : Boolean + { + var _loc5_:int = 0; + var _loc6_:Boolean = false; + var _loc7_:TweenLite = null; + var _loc13_:uint = 0; + var _loc14_:Number = NaN; + var _loc15_:Number = NaN; + var _loc16_:TweenCore = null; + var _loc17_:Number = NaN; + var _loc18_:SimpleTimeline = null; + if(param4 >= 4) + { + _loc13_ = param3.length; + _loc5_ = 0; + while(_loc5_ < _loc13_) + { + _loc7_ = param3[_loc5_]; + if(_loc7_ != param1) + { + if(_loc7_.setEnabled(false,false)) + { + _loc6_ = true; + } + } + else if(param4 == 5) + { + break; + } + _loc5_++; + } + return _loc6_; + } + var _loc8_:Number = param1.cachedStartTime + 1e-10; + var _loc9_:Array = []; + var _loc10_:Array = []; + var _loc11_:uint = 0; + var _loc12_:uint = 0; + _loc5_ = int(param3.length); + while(--_loc5_ > -1) + { + _loc7_ = param3[_loc5_]; + if(_loc7_ == param1 || _loc7_.gc) + { + continue; + } + if(_loc7_.timeline != param1.timeline) + { + if(!getGlobalPaused(_loc7_)) + { + var _loc19_:uint; + _loc10_[_loc19_ = _loc11_++] = _loc7_; + } + } + else if(_loc7_.cachedStartTime <= _loc8_ && _loc7_.cachedStartTime + _loc7_.totalDuration + 1e-10 > _loc8_ && !getGlobalPaused(_loc7_)) + { + _loc9_[_loc19_ = _loc12_++] = _loc7_; + } + } + if(_loc11_ != 0) + { + _loc14_ = param1.cachedTimeScale; + _loc15_ = _loc8_; + _loc18_ = param1.timeline; + while(_loc18_) + { + _loc14_ *= _loc18_.cachedTimeScale; + _loc15_ += _loc18_.cachedStartTime; + _loc18_ = _loc18_.timeline; + } + _loc8_ = _loc14_ * _loc15_; + _loc5_ = int(_loc11_); + while(--_loc5_ > -1) + { + _loc16_ = _loc10_[_loc5_]; + _loc14_ = _loc16_.cachedTimeScale; + _loc15_ = _loc16_.cachedStartTime; + _loc18_ = _loc16_.timeline; + while(_loc18_) + { + _loc14_ *= _loc18_.cachedTimeScale; + _loc15_ += _loc18_.cachedStartTime; + _loc18_ = _loc18_.timeline; + } + _loc17_ = _loc14_ * _loc15_; + if(_loc17_ <= _loc8_ && (_loc17_ + _loc16_.totalDuration * _loc14_ + 1e-10 > _loc8_ || _loc16_.cachedDuration == 0)) + { + _loc9_[_loc19_ = _loc12_++] = _loc16_; + } + } + } + if(_loc12_ == 0) + { + return _loc6_; + } + _loc5_ = int(_loc12_); + if(param4 == 2) + { + while(--_loc5_ > -1) + { + _loc7_ = _loc9_[_loc5_]; + if(_loc7_.killVars(param2)) + { + _loc6_ = true; + } + if(_loc7_.cachedPT1 == null && _loc7_.initted) + { + _loc7_.setEnabled(false,false); + } + } + } + else + { + while(--_loc5_ > -1) + { + if(TweenLite(_loc9_[_loc5_]).setEnabled(false,false)) + { + _loc6_ = true; + } + } + } + return _loc6_; + } + } +} + diff --git a/flash_decompiled/com/greensock/TweenLite.as b/flash_decompiled/com/greensock/TweenLite.as new file mode 100644 index 0000000..40ee5ec --- /dev/null +++ b/flash_decompiled/com/greensock/TweenLite.as @@ -0,0 +1,521 @@ +package com.greensock +{ + import com.greensock.core.*; + import com.greensock.plugins.*; + import flash.display.*; + import flash.events.*; + import flash.utils.*; + + public class TweenLite extends TweenCore + { + + public static var rootTimeline:SimpleTimeline; + + public static var onPluginEvent:Function; + + public static var rootFramesTimeline:SimpleTimeline; + + public static var overwriteManager:Object; + + public static var rootFrame:Number; + + public static const version:Number = 11.36; + + public static var plugins:Object = {}; + + public static var fastEaseLookup:Dictionary = new Dictionary(false); + + public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; + + public static var defaultEase:Function = TweenLite.easeOut; + + public static var masterList:Dictionary = new Dictionary(false); + + private static var _shape:Shape = new Shape(); + + protected static var _reservedProps:Object = { + "ease":1, + "delay":1, + "overwrite":1, + "onComplete":1, + "onCompleteParams":1, + "useFrames":1, + "runBackwards":1, + "startAt":1, + "onUpdate":1, + "onUpdateParams":1, + "roundProps":1, + "onStart":1, + "onStartParams":1, + "onInit":1, + "onInitParams":1, + "onReverseComplete":1, + "onReverseCompleteParams":1, + "onRepeat":1, + "onRepeatParams":1, + "proxiedEase":1, + "easeParams":1, + "yoyo":1, + "onCompleteListener":1, + "onUpdateListener":1, + "onStartListener":1, + "onReverseCompleteListener":1, + "onRepeatListener":1, + "orientToBezier":1, + "timeScale":1, + "immediateRender":1, + "repeat":1, + "repeatDelay":1, + "timeline":1, + "data":1, + "paused":1 + }; + + protected var _hasPlugins:Boolean; + + public var propTweenLookup:Object; + + public var cachedPT1:PropTween; + + protected var _overwrite:uint; + + protected var _ease:Function; + + public var target:Object; + + public var ratio:Number = 0; + + protected var _overwrittenProps:Object; + + protected var _notifyPluginsOfEnabled:Boolean; + + public function TweenLite(param1:Object, param2:Number, param3:Object) + { + var _loc5_:TweenLite = null; + super(param2,param3); + this.target = param1; + if(this.target is TweenCore && Boolean(this.vars.timeScale)) + { + this.cachedTimeScale = 1; + } + propTweenLookup = {}; + _ease = defaultEase; + _overwrite = Number(param3.overwrite) <= -1 || !overwriteManager.enabled && param3.overwrite > 1 ? uint(overwriteManager.mode) : uint(int(param3.overwrite)); + var _loc4_:Array = masterList[param1]; + if(!_loc4_) + { + masterList[param1] = [this]; + } + else if(_overwrite == 1) + { + for each(_loc5_ in _loc4_) + { + if(!_loc5_.gc) + { + _loc5_.setEnabled(false,false); + } + } + masterList[param1] = [this]; + } + else + { + _loc4_[_loc4_.length] = this; + } + if(this.active || Boolean(this.vars.immediateRender)) + { + renderTime(0,false,true); + } + } + + public static function initClass() : void + { + rootFrame = 0; + rootTimeline = new SimpleTimeline(null); + rootFramesTimeline = new SimpleTimeline(null); + rootTimeline.cachedStartTime = getTimer() * 0.001; + rootFramesTimeline.cachedStartTime = rootFrame; + rootTimeline.autoRemoveChildren = true; + rootFramesTimeline.autoRemoveChildren = true; + _shape.addEventListener(Event.ENTER_FRAME,updateAll,false,0,true); + if(overwriteManager == null) + { + overwriteManager = { + "mode":1, + "enabled":false + }; + } + } + + public static function killTweensOf(param1:Object, param2:Boolean = false, param3:Object = null) : void + { + var _loc4_:Array = null; + var _loc5_:int = 0; + var _loc6_:TweenLite = null; + if(param1 in masterList) + { + _loc4_ = masterList[param1]; + _loc5_ = int(_loc4_.length); + while(--_loc5_ > -1) + { + _loc6_ = _loc4_[_loc5_]; + if(!_loc6_.gc) + { + if(param2) + { + _loc6_.complete(false,false); + } + if(param3 != null) + { + _loc6_.killVars(param3); + } + if(param3 == null || _loc6_.cachedPT1 == null && _loc6_.initted) + { + _loc6_.setEnabled(false,false); + } + } + } + if(param3 == null) + { + delete masterList[param1]; + } + } + } + + public static function from(param1:Object, param2:Number, param3:Object) : TweenLite + { + param3.runBackwards = true; + if(!("immediateRender" in param3)) + { + param3.immediateRender = true; + } + return new TweenLite(param1,param2,param3); + } + + protected static function easeOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number + { + return 1 - (param1 = 1 - param1 / param4) * param1; + } + + public static function delayedCall(param1:Number, param2:Function, param3:Array = null, param4:Boolean = false) : TweenLite + { + return new TweenLite(param2,0,{ + "delay":param1, + "onComplete":param2, + "onCompleteParams":param3, + "immediateRender":false, + "useFrames":param4, + "overwrite":0 + }); + } + + protected static function updateAll(param1:Event = null) : void + { + var _loc2_:Dictionary = null; + var _loc3_:Object = null; + var _loc4_:Array = null; + var _loc5_:int = 0; + rootTimeline.renderTime((getTimer() * 0.001 - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale,false,false); + ++rootFrame; + rootFramesTimeline.renderTime((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale,false,false); + if(!(rootFrame % 60)) + { + _loc2_ = masterList; + for(_loc3_ in _loc2_) + { + _loc4_ = _loc2_[_loc3_]; + _loc5_ = int(_loc4_.length); + while(--_loc5_ > -1) + { + if(TweenLite(_loc4_[_loc5_]).gc) + { + _loc4_.splice(_loc5_,1); + } + } + if(_loc4_.length == 0) + { + delete _loc2_[_loc3_]; + } + } + } + } + + public static function to(param1:Object, param2:Number, param3:Object) : TweenLite + { + return new TweenLite(param1,param2,param3); + } + + protected function easeProxy(param1:Number, param2:Number, param3:Number, param4:Number) : Number + { + return this.vars.proxiedEase.apply(null,arguments.concat(this.vars.easeParams)); + } + + override public function renderTime(param1:Number, param2:Boolean = false, param3:Boolean = false) : void + { + var _loc4_:Boolean = false; + var _loc5_:Number = this.cachedTime; + if(param1 >= this.cachedDuration) + { + this.cachedTotalTime = this.cachedTime = this.cachedDuration; + this.ratio = 1; + _loc4_ = true; + if(this.cachedDuration == 0) + { + if((param1 == 0 || _rawPrevTime < 0) && _rawPrevTime != param1) + { + param3 = true; + } + _rawPrevTime = param1; + } + } + else if(param1 <= 0) + { + this.cachedTotalTime = this.cachedTime = this.ratio = 0; + if(param1 < 0) + { + this.active = false; + if(this.cachedDuration == 0) + { + if(_rawPrevTime > 0) + { + param3 = true; + _loc4_ = true; + } + _rawPrevTime = param1; + } + } + if(this.cachedReversed && _loc5_ != 0) + { + _loc4_ = true; + } + } + else + { + this.cachedTotalTime = this.cachedTime = param1; + this.ratio = _ease(param1,0,1,this.cachedDuration); + } + if(this.cachedTime == _loc5_ && !param3) + { + return; + } + if(!this.initted) + { + init(); + if(!_loc4_ && Boolean(this.cachedTime)) + { + this.ratio = _ease(this.cachedTime,0,1,this.cachedDuration); + } + } + if(!this.active && !this.cachedPaused) + { + this.active = true; + } + if(Boolean(_loc5_ == 0 && this.vars.onStart) && Boolean(this.cachedTime != 0) && !param2) + { + this.vars.onStart.apply(null,this.vars.onStartParams); + } + var _loc6_:PropTween = this.cachedPT1; + while(_loc6_) + { + _loc6_.target[_loc6_.property] = _loc6_.start + this.ratio * _loc6_.change; + _loc6_ = _loc6_.nextNode; + } + if(_hasUpdate && !param2) + { + this.vars.onUpdate.apply(null,this.vars.onUpdateParams); + } + if(_loc4_) + { + if(_hasPlugins && Boolean(this.cachedPT1)) + { + onPluginEvent("onComplete",this); + } + complete(true,param2); + } + } + + override public function setEnabled(param1:Boolean, param2:Boolean = false) : Boolean + { + var _loc3_:Array = null; + if(param1) + { + _loc3_ = TweenLite.masterList[this.target]; + if(!_loc3_) + { + TweenLite.masterList[this.target] = [this]; + } + else + { + _loc3_[_loc3_.length] = this; + } + } + super.setEnabled(param1,param2); + if(_notifyPluginsOfEnabled && Boolean(this.cachedPT1)) + { + return onPluginEvent(param1 ? "onEnable" : "onDisable",this); + } + return false; + } + + protected function init() : void + { + var _loc1_:String = null; + var _loc2_:int = 0; + var _loc3_:* = undefined; + var _loc4_:Boolean = false; + var _loc5_:Array = null; + var _loc6_:PropTween = null; + if(this.vars.onInit) + { + this.vars.onInit.apply(null,this.vars.onInitParams); + } + if(typeof this.vars.ease == "function") + { + _ease = this.vars.ease; + } + if(this.vars.easeParams) + { + this.vars.proxiedEase = _ease; + _ease = easeProxy; + } + this.cachedPT1 = null; + this.propTweenLookup = {}; + for(_loc1_ in this.vars) + { + if(_loc1_ in _reservedProps && !(_loc1_ == "timeScale" && this.target is TweenCore)) + { + continue; + } + if(_loc1_ in plugins && Boolean((_loc3_ = new (plugins[_loc1_] as Class)()).onInitTween(this.target,this.vars[_loc1_],this))) + { + this.cachedPT1 = new PropTween(_loc3_,"changeFactor",0,1,_loc3_.overwriteProps.length == 1 ? _loc3_.overwriteProps[0] : "_MULTIPLE_",true,this.cachedPT1); + if(this.cachedPT1.name == "_MULTIPLE_") + { + _loc2_ = int(_loc3_.overwriteProps.length); + while(--_loc2_ > -1) + { + this.propTweenLookup[_loc3_.overwriteProps[_loc2_]] = this.cachedPT1; + } + } + else + { + this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1; + } + if(_loc3_.priority) + { + this.cachedPT1.priority = _loc3_.priority; + _loc4_ = true; + } + if(Boolean(_loc3_.onDisable) || Boolean(_loc3_.onEnable)) + { + _notifyPluginsOfEnabled = true; + } + _hasPlugins = true; + } + else + { + this.cachedPT1 = new PropTween(this.target,_loc1_,Number(this.target[_loc1_]),typeof this.vars[_loc1_] == "number" ? Number(this.vars[_loc1_]) - this.target[_loc1_] : Number(this.vars[_loc1_]),_loc1_,false,this.cachedPT1); + this.propTweenLookup[_loc1_] = this.cachedPT1; + } + } + if(_loc4_) + { + onPluginEvent("onInit",this); + } + if(this.vars.runBackwards) + { + _loc6_ = this.cachedPT1; + while(_loc6_) + { + _loc6_.start += _loc6_.change; + _loc6_.change = -_loc6_.change; + _loc6_ = _loc6_.nextNode; + } + } + _hasUpdate = Boolean(this.vars.onUpdate != null); + if(_overwrittenProps) + { + killVars(_overwrittenProps); + if(this.cachedPT1 == null) + { + this.setEnabled(false,false); + } + } + if(Boolean(_overwrite > 1 && this.cachedPT1) && (Boolean(_loc5_ = masterList[this.target])) && _loc5_.length > 1) + { + if(overwriteManager.manageOverwrites(this,this.propTweenLookup,_loc5_,_overwrite)) + { + init(); + } + } + this.initted = true; + } + + public function killVars(param1:Object, param2:Boolean = true) : Boolean + { + var _loc3_:String = null; + var _loc4_:PropTween = null; + var _loc5_:Boolean = false; + if(_overwrittenProps == null) + { + _overwrittenProps = {}; + } + for(_loc3_ in param1) + { + if(_loc3_ in propTweenLookup) + { + _loc4_ = propTweenLookup[_loc3_]; + if(_loc4_.isPlugin && _loc4_.name == "_MULTIPLE_") + { + _loc4_.target.killProps(param1); + if(_loc4_.target.overwriteProps.length == 0) + { + _loc4_.name = ""; + } + } + if(_loc4_.name != "_MULTIPLE_") + { + if(_loc4_.nextNode) + { + _loc4_.nextNode.prevNode = _loc4_.prevNode; + } + if(_loc4_.prevNode) + { + _loc4_.prevNode.nextNode = _loc4_.nextNode; + } + else if(this.cachedPT1 == _loc4_) + { + this.cachedPT1 = _loc4_.nextNode; + } + if(_loc4_.isPlugin && Boolean(_loc4_.target.onDisable)) + { + _loc4_.target.onDisable(); + if(_loc4_.target.activeDisable) + { + _loc5_ = true; + } + } + delete propTweenLookup[_loc3_]; + } + } + if(param2 && param1 != _overwrittenProps) + { + _overwrittenProps[_loc3_] = 1; + } + } + return _loc5_; + } + + override public function invalidate() : void + { + if(_notifyPluginsOfEnabled && Boolean(this.cachedPT1)) + { + onPluginEvent("onDisable",this); + } + this.cachedPT1 = null; + _overwrittenProps = null; + _hasUpdate = this.initted = this.active = _notifyPluginsOfEnabled = false; + this.propTweenLookup = {}; + } + } +} + diff --git a/flash_decompiled/com/greensock/TweenMax.as b/flash_decompiled/com/greensock/TweenMax.as new file mode 100644 index 0000000..cb94d21 --- /dev/null +++ b/flash_decompiled/com/greensock/TweenMax.as @@ -0,0 +1,924 @@ +package com.greensock +{ + import com.greensock.core.*; + import com.greensock.events.TweenEvent; + import com.greensock.plugins.*; + import flash.display.*; + import flash.events.*; + import flash.utils.*; + + public class TweenMax extends TweenLite implements IEventDispatcher + { + + public static const version:Number = 11.37; + + private static var _overwriteMode:int = OverwriteManager.enabled ? OverwriteManager.mode : OverwriteManager.init(2); + + public static var killTweensOf:Function = TweenLite.killTweensOf; + + public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; + + TweenPlugin.activate([AutoAlphaPlugin,EndArrayPlugin,FramePlugin,RemoveTintPlugin,TintPlugin,VisiblePlugin,VolumePlugin,BevelFilterPlugin,BezierPlugin,BezierThroughPlugin,BlurFilterPlugin,ColorMatrixFilterPlugin,ColorTransformPlugin,DropShadowFilterPlugin,FrameLabelPlugin,GlowFilterPlugin,HexColorsPlugin,RoundPropsPlugin,ShortRotationPlugin,{}]); + + protected var _cyclesComplete:uint = 0; + + protected var _dispatcher:EventDispatcher; + + protected var _hasUpdateListener:Boolean; + + protected var _easeType:uint; + + protected var _repeatDelay:Number = 0; + + public var yoyo:Boolean; + + protected var _easePower:uint; + + protected var _repeat:int = 0; + + public function TweenMax(param1:Object, param2:Number, param3:Object) + { + super(param1,param2,param3); + if(TweenLite.version < 11.2) + { + throw new Error("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com."); + } + this.yoyo = Boolean(this.vars.yoyo); + _repeat = this.vars.repeat ? int(this.vars.repeat) : 0; + _repeatDelay = this.vars.repeatDelay ? Number(this.vars.repeatDelay) : 0; + this.cacheIsDirty = true; + if(Boolean(this.vars.onCompleteListener) || Boolean(this.vars.onInitListener) || Boolean(this.vars.onUpdateListener) || Boolean(this.vars.onStartListener) || Boolean(this.vars.onRepeatListener) || Boolean(this.vars.onReverseCompleteListener)) + { + initDispatcher(); + if(param2 == 0 && _delay == 0) + { + _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); + _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); + } + } + if(Boolean(this.vars.timeScale) && !(this.target is TweenCore)) + { + this.cachedTimeScale = this.vars.timeScale; + } + } + + public static function set globalTimeScale(param1:Number) : void + { + if(param1 == 0) + { + param1 = 0.0001; + } + if(TweenLite.rootTimeline == null) + { + TweenLite.to({},0,{}); + } + var _loc2_:SimpleTimeline = TweenLite.rootTimeline; + var _loc3_:Number = getTimer() * 0.001; + _loc2_.cachedStartTime = _loc3_ - (_loc3_ - _loc2_.cachedStartTime) * _loc2_.cachedTimeScale / param1; + _loc2_ = TweenLite.rootFramesTimeline; + _loc3_ = TweenLite.rootFrame; + _loc2_.cachedStartTime = _loc3_ - (_loc3_ - _loc2_.cachedStartTime) * _loc2_.cachedTimeScale / param1; + TweenLite.rootFramesTimeline.cachedTimeScale = TweenLite.rootTimeline.cachedTimeScale = param1; + } + + public static function fromTo(param1:Object, param2:Number, param3:Object, param4:Object) : TweenMax + { + param4.startAt = param3; + if(param3.immediateRender) + { + param4.immediateRender = true; + } + return new TweenMax(param1,param2,param4); + } + + public static function allFromTo(param1:Array, param2:Number, param3:Object, param4:Object, param5:Number = 0, param6:Function = null, param7:Array = null) : Array + { + param4.startAt = param3; + if(param3.immediateRender) + { + param4.immediateRender = true; + } + return allTo(param1,param2,param4,param5,param6,param7); + } + + public static function pauseAll(param1:Boolean = true, param2:Boolean = true) : void + { + changePause(true,param1,param2); + } + + public static function getTweensOf(param1:Object) : Array + { + var _loc4_:int = 0; + var _loc5_:uint = 0; + var _loc2_:Array = masterList[param1]; + var _loc3_:Array = []; + if(_loc2_) + { + _loc4_ = int(_loc2_.length); + _loc5_ = 0; + while(--_loc4_ > -1) + { + if(!_loc2_[_loc4_].gc) + { + var _loc6_:uint; + _loc3_[_loc6_ = _loc5_++] = _loc2_[_loc4_]; + } + } + } + return _loc3_; + } + + public static function get globalTimeScale() : Number + { + return TweenLite.rootTimeline == null ? 1 : TweenLite.rootTimeline.cachedTimeScale; + } + + public static function killChildTweensOf(param1:DisplayObjectContainer, param2:Boolean = false) : void + { + var _loc4_:Object = null; + var _loc5_:DisplayObjectContainer = null; + var _loc3_:Array = getAllTweens(); + var _loc6_:int = int(_loc3_.length); + while(--_loc6_ > -1) + { + _loc4_ = _loc3_[_loc6_].target; + if(!(_loc4_ is DisplayObject)) + { + continue; + } + _loc5_ = _loc4_.parent; + while(true) + { + if(!_loc5_) + { + break; + } + if(_loc5_ == param1) + { + if(param2) + { + _loc3_[_loc6_].complete(false); + } + else + { + _loc3_[_loc6_].setEnabled(false,false); + } + } + _loc5_ = _loc5_.parent; + } + } + } + + public static function delayedCall(param1:Number, param2:Function, param3:Array = null, param4:Boolean = false) : TweenMax + { + return new TweenMax(param2,0,{ + "delay":param1, + "onComplete":param2, + "onCompleteParams":param3, + "immediateRender":false, + "useFrames":param4, + "overwrite":0 + }); + } + + public static function isTweening(param1:Object) : Boolean + { + var _loc4_:TweenLite = null; + var _loc2_:Array = getTweensOf(param1); + var _loc3_:int = int(_loc2_.length); + while(--_loc3_ > -1) + { + _loc4_ = _loc2_[_loc3_]; + if(_loc4_.active || _loc4_.cachedStartTime == _loc4_.timeline.cachedTime && _loc4_.timeline.active) + { + return true; + } + } + return false; + } + + public static function killAll(param1:Boolean = false, param2:Boolean = true, param3:Boolean = true) : void + { + var _loc5_:Boolean = false; + var _loc4_:Array = getAllTweens(); + var _loc6_:int = int(_loc4_.length); + while(--_loc6_ > -1) + { + _loc5_ = _loc4_[_loc6_].target == _loc4_[_loc6_].vars.onComplete; + if(_loc5_ == param3 || _loc5_ != param2) + { + if(param1) + { + _loc4_[_loc6_].complete(false); + } + else + { + _loc4_[_loc6_].setEnabled(false,false); + } + } + } + } + + private static function changePause(param1:Boolean, param2:Boolean = true, param3:Boolean = false) : void + { + var _loc5_:Boolean = false; + var _loc4_:Array = getAllTweens(); + var _loc6_:int = int(_loc4_.length); + while(--_loc6_ > -1) + { + _loc5_ = TweenLite(_loc4_[_loc6_]).target == TweenLite(_loc4_[_loc6_]).vars.onComplete; + if(_loc5_ == param3 || _loc5_ != param2) + { + TweenCore(_loc4_[_loc6_]).paused = param1; + } + } + } + + public static function from(param1:Object, param2:Number, param3:Object) : TweenMax + { + param3.runBackwards = true; + if(!("immediateRender" in param3)) + { + param3.immediateRender = true; + } + return new TweenMax(param1,param2,param3); + } + + public static function allFrom(param1:Array, param2:Number, param3:Object, param4:Number = 0, param5:Function = null, param6:Array = null) : Array + { + param3.runBackwards = true; + if(!("immediateRender" in param3)) + { + param3.immediateRender = true; + } + return allTo(param1,param2,param3,param4,param5,param6); + } + + public static function getAllTweens() : Array + { + var _loc4_:Array = null; + var _loc5_:int = 0; + var _loc1_:Dictionary = masterList; + var _loc2_:uint = 0; + var _loc3_:Array = []; + for each(_loc4_ in _loc1_) + { + _loc5_ = int(_loc4_.length); + while(true) + { + if(--_loc5_ <= -1) + { + break; + } + if(!TweenLite(_loc4_[_loc5_]).gc) + { + var _loc8_:uint; + _loc3_[_loc8_ = _loc2_++] = _loc4_[_loc5_]; + } + } + } + return _loc3_; + } + + public static function resumeAll(param1:Boolean = true, param2:Boolean = true) : void + { + changePause(false,param1,param2); + } + + public static function to(param1:Object, param2:Number, param3:Object) : TweenMax + { + return new TweenMax(param1,param2,param3); + } + + public static function allTo(param1:Array, param2:Number, param3:Object, param4:Number = 0, param5:Function = null, param6:Array = null) : Array + { + var i:int = 0; + var varsDup:Object = null; + var p:String = null; + var onCompleteProxy:Function = null; + var onCompleteParamsProxy:Array = null; + var targets:Array = param1; + var duration:Number = param2; + var vars:Object = param3; + var stagger:Number = param4; + var onCompleteAll:Function = param5; + var onCompleteAllParams:Array = param6; + var l:uint = targets.length; + var a:Array = []; + var curDelay:Number = "delay" in vars ? Number(vars.delay) : 0; + onCompleteProxy = vars.onComplete; + onCompleteParamsProxy = vars.onCompleteParams; + var lastIndex:int = stagger <= 0 ? 0 : int(l - 1); + i = 0; + while(i < l) + { + varsDup = {}; + for(p in vars) + { + varsDup[p] = vars[p]; + } + varsDup.delay = curDelay; + if(i == lastIndex && onCompleteAll != null) + { + varsDup.onComplete = function():void + { + if(onCompleteProxy != null) + { + onCompleteProxy.apply(null,onCompleteParamsProxy); + } + onCompleteAll.apply(null,onCompleteAllParams); + }; + } + a[a.length] = new TweenMax(targets[i],duration,varsDup); + curDelay += stagger; + i++; + } + return a; + } + + public function dispatchEvent(param1:Event) : Boolean + { + return _dispatcher == null ? false : _dispatcher.dispatchEvent(param1); + } + + public function set timeScale(param1:Number) : void + { + if(param1 == 0) + { + param1 = 0.0001; + } + var _loc2_:Number = Boolean(_pauseTime) || _pauseTime == 0 ? _pauseTime : this.timeline.cachedTotalTime; + this.cachedStartTime = _loc2_ - (_loc2_ - this.cachedStartTime) * this.cachedTimeScale / param1; + this.cachedTimeScale = param1; + setDirtyCache(false); + } + + override public function renderTime(param1:Number, param2:Boolean = false, param3:Boolean = false) : void + { + var _loc6_:Boolean = false; + var _loc7_:Boolean = false; + var _loc8_:Boolean = false; + var _loc10_:Number = NaN; + var _loc11_:int = 0; + var _loc12_:int = 0; + var _loc13_:Number = NaN; + var _loc4_:Number = this.cacheIsDirty ? this.totalDuration : this.cachedTotalDuration; + var _loc5_:Number = this.cachedTime; + if(param1 >= _loc4_) + { + this.cachedTotalTime = _loc4_; + this.cachedTime = this.cachedDuration; + this.ratio = 1; + _loc6_ = true; + if(this.cachedDuration == 0) + { + if((param1 == 0 || _rawPrevTime < 0) && _rawPrevTime != param1) + { + param3 = true; + } + _rawPrevTime = param1; + } + } + else if(param1 <= 0) + { + if(param1 < 0) + { + this.active = false; + if(this.cachedDuration == 0) + { + if(_rawPrevTime > 0) + { + param3 = true; + _loc6_ = true; + } + _rawPrevTime = param1; + } + } + this.cachedTotalTime = this.cachedTime = this.ratio = 0; + if(this.cachedReversed && _loc5_ != 0) + { + _loc6_ = true; + } + } + else + { + this.cachedTotalTime = this.cachedTime = param1; + _loc8_ = true; + } + if(_repeat != 0) + { + _loc10_ = this.cachedDuration + _repeatDelay; + if(_loc6_) + { + if(this.yoyo && Boolean(_repeat % 2)) + { + this.cachedTime = this.ratio = 0; + } + } + else if(param1 > 0) + { + _loc11_ = int(_cyclesComplete); + _cyclesComplete = int(this.cachedTotalTime / _loc10_); + if(_cyclesComplete == this.cachedTotalTime / _loc10_) + { + --_cyclesComplete; + } + if(_loc11_ != _cyclesComplete) + { + _loc7_ = true; + } + this.cachedTime = (this.cachedTotalTime / _loc10_ - _cyclesComplete) * _loc10_; + if(this.yoyo && Boolean(_cyclesComplete % 2)) + { + this.cachedTime = this.cachedDuration - this.cachedTime; + } + else if(this.cachedTime >= this.cachedDuration) + { + this.cachedTime = this.cachedDuration; + this.ratio = 1; + _loc8_ = false; + } + if(this.cachedTime <= 0) + { + this.cachedTime = this.ratio = 0; + _loc8_ = false; + } + } + } + if(_loc5_ == this.cachedTime && !param3) + { + return; + } + if(!this.initted) + { + init(); + } + if(!this.active && !this.cachedPaused) + { + this.active = true; + } + if(_loc8_) + { + if(_easeType) + { + _loc12_ = int(_easePower); + _loc13_ = this.cachedTime / this.cachedDuration; + if(_easeType == 2) + { + this.ratio = _loc13_ = 1 - _loc13_; + while(--_loc12_ > -1) + { + this.ratio = _loc13_ * this.ratio; + } + this.ratio = 1 - this.ratio; + } + else if(_easeType == 1) + { + this.ratio = _loc13_; + while(--_loc12_ > -1) + { + this.ratio = _loc13_ * this.ratio; + } + } + else if(_loc13_ < 0.5) + { + this.ratio = _loc13_ = _loc13_ * 2; + while(--_loc12_ > -1) + { + this.ratio = _loc13_ * this.ratio; + } + this.ratio *= 0.5; + } + else + { + this.ratio = _loc13_ = (1 - _loc13_) * 2; + while(--_loc12_ > -1) + { + this.ratio = _loc13_ * this.ratio; + } + this.ratio = 1 - 0.5 * this.ratio; + } + } + else + { + this.ratio = _ease(this.cachedTime,0,1,this.cachedDuration); + } + } + if(_loc5_ == 0 && this.cachedTotalTime != 0 && !param2) + { + if(this.vars.onStart) + { + this.vars.onStart.apply(null,this.vars.onStartParams); + } + if(_dispatcher) + { + _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); + } + } + var _loc9_:PropTween = this.cachedPT1; + while(_loc9_) + { + _loc9_.target[_loc9_.property] = _loc9_.start + this.ratio * _loc9_.change; + _loc9_ = _loc9_.nextNode; + } + if(_hasUpdate && !param2) + { + this.vars.onUpdate.apply(null,this.vars.onUpdateParams); + } + if(_hasUpdateListener && !param2) + { + _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); + } + if(_loc6_) + { + if(_hasPlugins && Boolean(this.cachedPT1)) + { + onPluginEvent("onComplete",this); + } + complete(true,param2); + } + else if(_loc7_ && !param2) + { + if(this.vars.onRepeat) + { + this.vars.onRepeat.apply(null,this.vars.onRepeatParams); + } + if(_dispatcher) + { + _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT)); + } + } + } + + override public function set totalDuration(param1:Number) : void + { + if(_repeat == -1) + { + return; + } + this.duration = (param1 - _repeat * _repeatDelay) / (_repeat + 1); + } + + public function addEventListener(param1:String, param2:Function, param3:Boolean = false, param4:int = 0, param5:Boolean = false) : void + { + if(_dispatcher == null) + { + initDispatcher(); + } + if(param1 == TweenEvent.UPDATE) + { + _hasUpdateListener = true; + } + _dispatcher.addEventListener(param1,param2,param3,param4,param5); + } + + protected function insertPropTween(param1:Object, param2:String, param3:Number, param4:*, param5:String, param6:Boolean, param7:PropTween) : PropTween + { + var _loc9_:Array = null; + var _loc10_:int = 0; + var _loc8_:PropTween = new PropTween(param1,param2,param3,typeof param4 == "number" ? param4 - param3 : Number(param4),param5,param6,param7); + if(param6 && param5 == "_MULTIPLE_") + { + _loc9_ = param1.overwriteProps; + _loc10_ = int(_loc9_.length); + while(--_loc10_ > -1) + { + this.propTweenLookup[_loc9_[_loc10_]] = _loc8_; + } + } + else + { + this.propTweenLookup[param5] = _loc8_; + } + return _loc8_; + } + + override protected function init() : void + { + var _loc1_:TweenMax = null; + var _loc2_:String = null; + var _loc3_:String = null; + var _loc4_:Array = null; + var _loc5_:Object = null; + var _loc6_:PropTween = null; + var _loc7_:PropTween = null; + var _loc8_:int = 0; + if(this.vars.startAt) + { + this.vars.startAt.overwrite = 0; + this.vars.startAt.immediateRender = true; + _loc1_ = new TweenMax(this.target,0,this.vars.startAt); + } + if(_dispatcher) + { + _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.INIT)); + } + super.init(); + if(_ease in fastEaseLookup) + { + _easeType = fastEaseLookup[_ease][0]; + _easePower = fastEaseLookup[_ease][1]; + } + if(this.vars.roundProps != null && "roundProps" in TweenLite.plugins) + { + _loc4_ = this.vars.roundProps; + _loc8_ = int(_loc4_.length); + while(--_loc8_ > -1) + { + _loc2_ = _loc4_[_loc8_]; + _loc7_ = this.cachedPT1; + while(true) + { + if(!_loc7_) + { + break; + } + if(_loc7_.name == _loc2_) + { + if(_loc7_.isPlugin) + { + _loc7_.target.round = true; + } + else + { + if(_loc5_ == null) + { + _loc5_ = new TweenLite.plugins.roundProps(); + _loc5_.add(_loc7_.target,_loc2_,_loc7_.start,_loc7_.change); + _hasPlugins = true; + this.cachedPT1 = _loc6_ = insertPropTween(_loc5_,"changeFactor",0,1,"_MULTIPLE_",true,this.cachedPT1); + } + else + { + _loc5_.add(_loc7_.target,_loc2_,_loc7_.start,_loc7_.change); + } + this.removePropTween(_loc7_); + this.propTweenLookup[_loc2_] = _loc6_; + } + } + else if(_loc7_.isPlugin && _loc7_.name == "_MULTIPLE_" && !_loc7_.target.round) + { + _loc3_ = " " + _loc7_.target.overwriteProps.join(" ") + " "; + if(_loc3_.indexOf(" " + _loc2_ + " ") != -1) + { + _loc7_.target.round = true; + } + } + _loc7_ = _loc7_.nextNode; + } + } + } + } + + public function removeEventListener(param1:String, param2:Function, param3:Boolean = false) : void + { + if(_dispatcher) + { + _dispatcher.removeEventListener(param1,param2,param3); + } + } + + public function setDestination(param1:String, param2:*, param3:Boolean = true) : void + { + var _loc4_:Object = {}; + _loc4_[param1] = param2; + updateTo(_loc4_,!param3); + } + + public function willTrigger(param1:String) : Boolean + { + return _dispatcher == null ? false : _dispatcher.willTrigger(param1); + } + + public function hasEventListener(param1:String) : Boolean + { + return _dispatcher == null ? false : _dispatcher.hasEventListener(param1); + } + + protected function initDispatcher() : void + { + if(_dispatcher == null) + { + _dispatcher = new EventDispatcher(this); + } + if(this.vars.onInitListener is Function) + { + _dispatcher.addEventListener(TweenEvent.INIT,this.vars.onInitListener,false,0,true); + } + if(this.vars.onStartListener is Function) + { + _dispatcher.addEventListener(TweenEvent.START,this.vars.onStartListener,false,0,true); + } + if(this.vars.onUpdateListener is Function) + { + _dispatcher.addEventListener(TweenEvent.UPDATE,this.vars.onUpdateListener,false,0,true); + _hasUpdateListener = true; + } + if(this.vars.onCompleteListener is Function) + { + _dispatcher.addEventListener(TweenEvent.COMPLETE,this.vars.onCompleteListener,false,0,true); + } + if(this.vars.onRepeatListener is Function) + { + _dispatcher.addEventListener(TweenEvent.REPEAT,this.vars.onRepeatListener,false,0,true); + } + if(this.vars.onReverseCompleteListener is Function) + { + _dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE,this.vars.onReverseCompleteListener,false,0,true); + } + } + + public function set currentProgress(param1:Number) : void + { + if(_cyclesComplete == 0) + { + setTotalTime(this.duration * param1,false); + } + else + { + setTotalTime(this.duration * param1 + _cyclesComplete * this.cachedDuration,false); + } + } + + public function get totalProgress() : Number + { + return this.cachedTotalTime / this.totalDuration; + } + + public function set totalProgress(param1:Number) : void + { + setTotalTime(this.totalDuration * param1,false); + } + + protected function removePropTween(param1:PropTween) : Boolean + { + if(param1.nextNode) + { + param1.nextNode.prevNode = param1.prevNode; + } + if(param1.prevNode) + { + param1.prevNode.nextNode = param1.nextNode; + } + else if(this.cachedPT1 == param1) + { + this.cachedPT1 = param1.nextNode; + } + if(param1.isPlugin && Boolean(param1.target.onDisable)) + { + param1.target.onDisable(); + if(param1.target.activeDisable) + { + return true; + } + } + return false; + } + + public function get currentProgress() : Number + { + return this.cachedTime / this.duration; + } + + public function get repeat() : int + { + return _repeat; + } + + public function updateTo(param1:Object, param2:Boolean = false) : void + { + var _loc4_:String = null; + var _loc5_:Number = NaN; + var _loc6_:PropTween = null; + var _loc7_:Number = NaN; + var _loc3_:Number = this.ratio; + if(param2 && this.timeline != null && this.cachedStartTime < this.timeline.cachedTime) + { + this.cachedStartTime = this.timeline.cachedTime; + this.setDirtyCache(false); + if(this.gc) + { + this.setEnabled(true,false); + } + else + { + this.timeline.addChild(this); + } + } + for(_loc4_ in param1) + { + this.vars[_loc4_] = param1[_loc4_]; + } + if(this.initted) + { + this.initted = false; + if(!param2) + { + init(); + if(!param2 && this.cachedTime > 0 && this.cachedTime < this.cachedDuration) + { + _loc5_ = 1 / (1 - _loc3_); + _loc6_ = this.cachedPT1; + while(_loc6_) + { + _loc7_ = _loc6_.start + _loc6_.change; + _loc6_.change *= _loc5_; + _loc6_.start = _loc7_ - _loc6_.change; + _loc6_ = _loc6_.nextNode; + } + } + } + } + } + + override public function set currentTime(param1:Number) : void + { + if(_cyclesComplete != 0) + { + if(this.yoyo && _cyclesComplete % 2 == 1) + { + param1 = this.duration - param1 + _cyclesComplete * (this.cachedDuration + _repeatDelay); + } + else + { + param1 += _cyclesComplete * (this.duration + _repeatDelay); + } + } + setTotalTime(param1,false); + } + + public function get repeatDelay() : Number + { + return _repeatDelay; + } + + public function killProperties(param1:Array) : void + { + var _loc2_:Object = {}; + var _loc3_:int = int(param1.length); + while(--_loc3_ > -1) + { + _loc2_[param1[_loc3_]] = true; + } + killVars(_loc2_); + } + + public function set repeatDelay(param1:Number) : void + { + _repeatDelay = param1; + setDirtyCache(true); + } + + public function set repeat(param1:int) : void + { + _repeat = param1; + setDirtyCache(true); + } + + override public function complete(param1:Boolean = false, param2:Boolean = false) : void + { + super.complete(param1,param2); + if(!param2 && Boolean(_dispatcher)) + { + if(this.cachedTotalTime == this.cachedTotalDuration && !this.cachedReversed) + { + _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); + } + else if(this.cachedReversed && this.cachedTotalTime == 0) + { + _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE)); + } + } + } + + override public function invalidate() : void + { + this.yoyo = Boolean(this.vars.yoyo == true); + _repeat = this.vars.repeat ? int(Number(this.vars.repeat)) : 0; + _repeatDelay = this.vars.repeatDelay ? Number(this.vars.repeatDelay) : 0; + _hasUpdateListener = false; + if(this.vars.onCompleteListener != null || this.vars.onUpdateListener != null || this.vars.onStartListener != null) + { + initDispatcher(); + } + setDirtyCache(true); + super.invalidate(); + } + + public function get timeScale() : Number + { + return this.cachedTimeScale; + } + + override public function get totalDuration() : Number + { + if(this.cacheIsDirty) + { + this.cachedTotalDuration = _repeat == -1 ? 999999999999 : this.cachedDuration * (_repeat + 1) + _repeatDelay * _repeat; + this.cacheIsDirty = false; + } + return this.cachedTotalDuration; + } + } +} + diff --git a/flash_decompiled/com/greensock/core/PropTween.as b/flash_decompiled/com/greensock/core/PropTween.as new file mode 100644 index 0000000..85c4a2e --- /dev/null +++ b/flash_decompiled/com/greensock/core/PropTween.as @@ -0,0 +1,42 @@ +package com.greensock.core +{ + public class PropTween + { + + public var priority:int; + + public var start:Number; + + public var prevNode:PropTween; + + public var change:Number; + + public var target:Object; + + public var name:String; + + public var property:String; + + public var nextNode:PropTween; + + public var isPlugin:Boolean; + + public function PropTween(param1:Object, param2:String, param3:Number, param4:Number, param5:String, param6:Boolean, param7:PropTween = null, param8:int = 0) + { + super(); + this.target = param1; + this.property = param2; + this.start = param3; + this.change = param4; + this.name = param5; + this.isPlugin = param6; + if(param7) + { + param7.prevNode = this; + this.nextNode = param7; + } + this.priority = param8; + } + } +} + diff --git a/flash_decompiled/com/greensock/core/SimpleTimeline.as b/flash_decompiled/com/greensock/core/SimpleTimeline.as new file mode 100644 index 0000000..90f3839 --- /dev/null +++ b/flash_decompiled/com/greensock/core/SimpleTimeline.as @@ -0,0 +1,99 @@ +package com.greensock.core +{ + public class SimpleTimeline extends TweenCore + { + + public var autoRemoveChildren:Boolean; + + protected var _lastChild:TweenCore; + + protected var _firstChild:TweenCore; + + public function SimpleTimeline(param1:Object = null) + { + super(0,param1); + } + + override public function renderTime(param1:Number, param2:Boolean = false, param3:Boolean = false) : void + { + var _loc5_:Number = NaN; + var _loc6_:TweenCore = null; + var _loc4_:TweenCore = _firstChild; + this.cachedTotalTime = param1; + this.cachedTime = param1; + while(_loc4_) + { + _loc6_ = _loc4_.nextNode; + if(_loc4_.active || param1 >= _loc4_.cachedStartTime && !_loc4_.cachedPaused && !_loc4_.gc) + { + if(!_loc4_.cachedReversed) + { + _loc4_.renderTime((param1 - _loc4_.cachedStartTime) * _loc4_.cachedTimeScale,param2,false); + } + else + { + _loc5_ = _loc4_.cacheIsDirty ? _loc4_.totalDuration : _loc4_.cachedTotalDuration; + _loc4_.renderTime(_loc5_ - (param1 - _loc4_.cachedStartTime) * _loc4_.cachedTimeScale,param2,false); + } + } + _loc4_ = _loc6_; + } + } + + public function addChild(param1:TweenCore) : void + { + if(!param1.cachedOrphan && Boolean(param1.timeline)) + { + param1.timeline.remove(param1,true); + } + param1.timeline = this; + if(param1.gc) + { + param1.setEnabled(true,true); + } + if(_firstChild) + { + _firstChild.prevNode = param1; + } + param1.nextNode = _firstChild; + _firstChild = param1; + param1.prevNode = null; + param1.cachedOrphan = false; + } + + public function remove(param1:TweenCore, param2:Boolean = false) : void + { + if(param1.cachedOrphan) + { + return; + } + if(!param2) + { + param1.setEnabled(false,true); + } + if(param1.nextNode) + { + param1.nextNode.prevNode = param1.prevNode; + } + else if(_lastChild == param1) + { + _lastChild = param1.prevNode; + } + if(param1.prevNode) + { + param1.prevNode.nextNode = param1.nextNode; + } + else if(_firstChild == param1) + { + _firstChild = param1.nextNode; + } + param1.cachedOrphan = true; + } + + public function get rawTime() : Number + { + return this.cachedTotalTime; + } + } +} + diff --git a/flash_decompiled/com/greensock/core/TweenCore.as b/flash_decompiled/com/greensock/core/TweenCore.as new file mode 100644 index 0000000..ae653b1 --- /dev/null +++ b/flash_decompiled/com/greensock/core/TweenCore.as @@ -0,0 +1,335 @@ +package com.greensock.core +{ + import com.greensock.*; + + public class TweenCore + { + + protected static var _classInitted:Boolean; + + public static const version:Number = 1.382; + + public var initted:Boolean; + + protected var _hasUpdate:Boolean; + + public var active:Boolean; + + protected var _delay:Number; + + public var cachedTime:Number; + + public var cachedReversed:Boolean; + + public var nextNode:TweenCore; + + protected var _rawPrevTime:Number = -1; + + public var vars:Object; + + public var cachedTotalTime:Number; + + public var data:*; + + public var timeline:SimpleTimeline; + + public var cachedOrphan:Boolean; + + public var cachedStartTime:Number; + + public var prevNode:TweenCore; + + public var cachedDuration:Number; + + public var gc:Boolean; + + protected var _pauseTime:Number; + + public var cacheIsDirty:Boolean; + + public var cachedPaused:Boolean; + + public var cachedTimeScale:Number; + + public var cachedTotalDuration:Number; + + public function TweenCore(param1:Number = 0, param2:Object = null) + { + super(); + this.vars = param2 != null ? param2 : {}; + this.cachedDuration = this.cachedTotalDuration = param1; + _delay = this.vars.delay ? Number(this.vars.delay) : 0; + this.cachedTimeScale = this.vars.timeScale ? Number(this.vars.timeScale) : 1; + this.active = Boolean(param1 == 0 && _delay == 0 && this.vars.immediateRender != false); + this.cachedTotalTime = this.cachedTime = 0; + this.data = this.vars.data; + if(!_classInitted) + { + if(!isNaN(TweenLite.rootFrame)) + { + return; + } + TweenLite.initClass(); + _classInitted = true; + } + var _loc3_:SimpleTimeline = this.vars.timeline is SimpleTimeline ? this.vars.timeline : (this.vars.useFrames ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline); + this.cachedStartTime = _loc3_.cachedTotalTime + _delay; + _loc3_.addChild(this); + if(this.vars.reversed) + { + this.cachedReversed = true; + } + if(this.vars.paused) + { + this.paused = true; + } + } + + public function renderTime(param1:Number, param2:Boolean = false, param3:Boolean = false) : void + { + } + + public function get delay() : Number + { + return _delay; + } + + public function restart(param1:Boolean = false, param2:Boolean = true) : void + { + this.reversed = false; + this.paused = false; + this.setTotalTime(param1 ? -_delay : 0,param2); + } + + public function get duration() : Number + { + return this.cachedDuration; + } + + public function set reversed(param1:Boolean) : void + { + if(param1 != this.cachedReversed) + { + this.cachedReversed = param1; + setTotalTime(this.cachedTotalTime,true); + } + } + + public function set startTime(param1:Number) : void + { + var _loc2_:Boolean = Boolean(this.timeline != null && (param1 != this.cachedStartTime || this.gc)); + this.cachedStartTime = param1; + if(_loc2_) + { + this.timeline.addChild(this); + } + } + + public function set delay(param1:Number) : void + { + this.startTime += param1 - _delay; + _delay = param1; + } + + public function resume() : void + { + this.paused = false; + } + + public function get paused() : Boolean + { + return this.cachedPaused; + } + + public function play() : void + { + this.reversed = false; + this.paused = false; + } + + public function set duration(param1:Number) : void + { + this.cachedDuration = this.cachedTotalDuration = param1; + setDirtyCache(false); + } + + public function invalidate() : void + { + } + + public function complete(param1:Boolean = false, param2:Boolean = false) : void + { + if(!param1) + { + renderTime(this.totalDuration,param2,false); + return; + } + if(this.timeline.autoRemoveChildren) + { + this.setEnabled(false,false); + } + else + { + this.active = false; + } + if(!param2) + { + if(Boolean(this.vars.onComplete) && Boolean(this.cachedTotalTime == this.cachedTotalDuration) && !this.cachedReversed) + { + this.vars.onComplete.apply(null,this.vars.onCompleteParams); + } + else if(this.cachedReversed && this.cachedTotalTime == 0 && Boolean(this.vars.onReverseComplete)) + { + this.vars.onReverseComplete.apply(null,this.vars.onReverseCompleteParams); + } + } + } + + public function get reversed() : Boolean + { + return this.cachedReversed; + } + + public function get totalTime() : Number + { + return this.cachedTotalTime; + } + + public function get startTime() : Number + { + return this.cachedStartTime; + } + + public function set currentTime(param1:Number) : void + { + setTotalTime(param1,false); + } + + protected function setDirtyCache(param1:Boolean = true) : void + { + var _loc2_:TweenCore = param1 ? this : this.timeline; + while(_loc2_) + { + _loc2_.cacheIsDirty = true; + _loc2_ = _loc2_.timeline; + } + } + + public function reverse(param1:Boolean = true) : void + { + this.reversed = true; + if(param1) + { + this.paused = false; + } + else if(this.gc) + { + this.setEnabled(true,false); + } + } + + public function set paused(param1:Boolean) : void + { + if(param1 != this.cachedPaused && Boolean(this.timeline)) + { + if(param1) + { + _pauseTime = this.timeline.rawTime; + } + else + { + this.cachedStartTime += this.timeline.rawTime - _pauseTime; + _pauseTime = NaN; + setDirtyCache(false); + } + this.cachedPaused = param1; + this.active = Boolean(!this.cachedPaused && this.cachedTotalTime > 0 && this.cachedTotalTime < this.cachedTotalDuration); + } + if(!param1 && this.gc) + { + this.setTotalTime(this.cachedTotalTime,false); + this.setEnabled(true,false); + } + } + + public function kill() : void + { + setEnabled(false,false); + } + + public function set totalTime(param1:Number) : void + { + setTotalTime(param1,false); + } + + public function get currentTime() : Number + { + return this.cachedTime; + } + + protected function setTotalTime(param1:Number, param2:Boolean = false) : void + { + var _loc3_:Number = NaN; + var _loc4_:Number = NaN; + if(this.timeline) + { + _loc3_ = Boolean(_pauseTime) || _pauseTime == 0 ? _pauseTime : this.timeline.cachedTotalTime; + if(this.cachedReversed) + { + _loc4_ = this.cacheIsDirty ? this.totalDuration : this.cachedTotalDuration; + this.cachedStartTime = _loc3_ - (_loc4_ - param1) / this.cachedTimeScale; + } + else + { + this.cachedStartTime = _loc3_ - param1 / this.cachedTimeScale; + } + if(!this.timeline.cacheIsDirty) + { + setDirtyCache(false); + } + if(this.cachedTotalTime != param1) + { + renderTime(param1,param2,false); + } + } + } + + public function pause() : void + { + this.paused = true; + } + + public function set totalDuration(param1:Number) : void + { + this.duration = param1; + } + + public function get totalDuration() : Number + { + return this.cachedTotalDuration; + } + + public function setEnabled(param1:Boolean, param2:Boolean = false) : Boolean + { + this.gc = !param1; + if(param1) + { + this.active = Boolean(!this.cachedPaused && this.cachedTotalTime > 0 && this.cachedTotalTime < this.cachedTotalDuration); + if(!param2 && this.cachedOrphan) + { + this.timeline.addChild(this); + } + } + else + { + this.active = false; + if(!param2 && !this.cachedOrphan) + { + this.timeline.remove(this,true); + } + } + return false; + } + } +} + diff --git a/flash_decompiled/com/greensock/easing/Linear.as b/flash_decompiled/com/greensock/easing/Linear.as new file mode 100644 index 0000000..d2766c9 --- /dev/null +++ b/flash_decompiled/com/greensock/easing/Linear.as @@ -0,0 +1,34 @@ +package com.greensock.easing +{ + public class Linear + { + + public static const power:uint = 0; + + public function Linear() + { + super(); + } + + public static function easeOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number + { + return param3 * param1 / param4 + param2; + } + + public static function easeIn(param1:Number, param2:Number, param3:Number, param4:Number) : Number + { + return param3 * param1 / param4 + param2; + } + + public static function easeNone(param1:Number, param2:Number, param3:Number, param4:Number) : Number + { + return param3 * param1 / param4 + param2; + } + + public static function easeInOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number + { + return param3 * param1 / param4 + param2; + } + } +} + diff --git a/flash_decompiled/com/greensock/events/TweenEvent.as b/flash_decompiled/com/greensock/events/TweenEvent.as new file mode 100644 index 0000000..57f689c --- /dev/null +++ b/flash_decompiled/com/greensock/events/TweenEvent.as @@ -0,0 +1,33 @@ +package com.greensock.events +{ + import flash.events.Event; + + public class TweenEvent extends Event + { + + public static const VERSION:Number = 1.1; + + public static const START:String = "start"; + + public static const UPDATE:String = "change"; + + public static const COMPLETE:String = "complete"; + + public static const REVERSE_COMPLETE:String = "reverseComplete"; + + public static const REPEAT:String = "repeat"; + + public static const INIT:String = "init"; + + public function TweenEvent(param1:String, param2:Boolean = false, param3:Boolean = false) + { + super(param1,param2,param3); + } + + override public function clone() : Event + { + return new TweenEvent(this.type,this.bubbles,this.cancelable); + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/AutoAlphaPlugin.as b/flash_decompiled/com/greensock/plugins/AutoAlphaPlugin.as new file mode 100644 index 0000000..62f3c88 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/AutoAlphaPlugin.as @@ -0,0 +1,44 @@ +package com.greensock.plugins +{ + import com.greensock.*; + + public class AutoAlphaPlugin extends TweenPlugin + { + + public static const API:Number = 1; + + protected var _target:Object; + + protected var _ignoreVisible:Boolean; + + public function AutoAlphaPlugin() + { + super(); + this.propName = "autoAlpha"; + this.overwriteProps = ["alpha","visible"]; + } + + override public function killProps(param1:Object) : void + { + super.killProps(param1); + _ignoreVisible = Boolean("visible" in param1); + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + _target = param1; + addTween(param1,"alpha",param1.alpha,param2,"alpha"); + return true; + } + + override public function set changeFactor(param1:Number) : void + { + updateTweens(param1); + if(!_ignoreVisible) + { + _target.visible = Boolean(_target.alpha != 0); + } + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/BevelFilterPlugin.as b/flash_decompiled/com/greensock/plugins/BevelFilterPlugin.as new file mode 100644 index 0000000..146c717 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/BevelFilterPlugin.as @@ -0,0 +1,29 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import flash.filters.BevelFilter; + + public class BevelFilterPlugin extends FilterPlugin + { + + public static const API:Number = 1; + + private static var _propNames:Array = ["distance","angle","highlightColor","highlightAlpha","shadowColor","shadowAlpha","blurX","blurY","strength","quality"]; + + public function BevelFilterPlugin() + { + super(); + this.propName = "bevelFilter"; + this.overwriteProps = ["bevelFilter"]; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + _target = param1; + _type = BevelFilter; + initFilter(param2,new BevelFilter(0,0,16777215,0.5,0,0.5,2,2,0,int(param2.quality) || 2),_propNames); + return true; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/BezierPlugin.as b/flash_decompiled/com/greensock/plugins/BezierPlugin.as new file mode 100644 index 0000000..13dfc91 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/BezierPlugin.as @@ -0,0 +1,259 @@ +package com.greensock.plugins +{ + import com.greensock.*; + + public class BezierPlugin extends TweenPlugin + { + + public static const API:Number = 1; + + protected static const _RAD2DEG:Number = 180 / Math.PI; + + protected var _future:Object = {}; + + protected var _orient:Boolean; + + protected var _orientData:Array; + + protected var _target:Object; + + protected var _beziers:Object; + + public function BezierPlugin() + { + super(); + this.propName = "bezier"; + this.overwriteProps = []; + } + + public static function parseBeziers(param1:Object, param2:Boolean = false) : Object + { + var _loc3_:int = 0; + var _loc4_:Array = null; + var _loc5_:Object = null; + var _loc6_:String = null; + var _loc7_:Object = {}; + if(param2) + { + for(_loc6_ in param1) + { + _loc4_ = param1[_loc6_]; + _loc7_[_loc6_] = _loc5_ = []; + if(_loc4_.length <= 2) + { + _loc5_[_loc5_.length] = [_loc4_[0],(_loc4_[0] + _loc4_[1]) / 2,_loc4_[1]]; + continue; + } + _loc5_[_loc5_.length] = [_loc4_[0],_loc4_[1] - (_loc4_[2] - _loc4_[0]) / 4,_loc4_[1]]; + _loc3_ = 1; + while(true) + { + if(_loc3_ >= _loc4_.length - 1) + { + break; + } + _loc5_[_loc5_.length] = [_loc4_[_loc3_],_loc4_[_loc3_] + (_loc4_[_loc3_] - _loc5_[_loc3_ - 1][1]),_loc4_[_loc3_ + 1]]; + _loc3_++; + } + } + } + else + { + for(_loc6_ in param1) + { + _loc4_ = param1[_loc6_]; + _loc7_[_loc6_] = _loc5_ = []; + if(_loc4_.length > 3) + { + _loc5_[_loc5_.length] = [_loc4_[0],_loc4_[1],(_loc4_[1] + _loc4_[2]) / 2]; + _loc3_ = 2; + while(_loc3_ < _loc4_.length - 2) + { + _loc5_[_loc5_.length] = [_loc5_[_loc3_ - 2][2],_loc4_[_loc3_],(_loc4_[_loc3_] + _loc4_[_loc3_ + 1]) / 2]; + _loc3_++; + } + _loc5_[_loc5_.length] = [_loc5_[_loc5_.length - 1][2],_loc4_[_loc4_.length - 2],_loc4_[_loc4_.length - 1]]; + } + else if(_loc4_.length == 3) + { + _loc5_[_loc5_.length] = [_loc4_[0],_loc4_[1],_loc4_[2]]; + } + else if(_loc4_.length == 2) + { + _loc5_[_loc5_.length] = [_loc4_[0],(_loc4_[0] + _loc4_[1]) / 2,_loc4_[1]]; + } + } + } + return _loc7_; + } + + override public function killProps(param1:Object) : void + { + var _loc2_:String = null; + for(_loc2_ in _beziers) + { + if(_loc2_ in param1) + { + delete _beziers[_loc2_]; + } + } + super.killProps(param1); + } + + protected function init(param1:TweenLite, param2:Array, param3:Boolean) : void + { + var _loc6_:int = 0; + var _loc7_:String = null; + var _loc8_:Object = null; + _target = param1.target; + var _loc4_:Object = param1.vars.isTV == true ? param1.vars.exposedVars : param1.vars; + if(_loc4_.orientToBezier == true) + { + _orientData = [["x","y","rotation",0,0.01]]; + _orient = true; + } + else if(_loc4_.orientToBezier is Array) + { + _orientData = _loc4_.orientToBezier; + _orient = true; + } + var _loc5_:Object = {}; + _loc6_ = 0; + while(_loc6_ < param2.length) + { + for(_loc7_ in param2[_loc6_]) + { + if(_loc5_[_loc7_] == undefined) + { + _loc5_[_loc7_] = [param1.target[_loc7_]]; + } + if(typeof param2[_loc6_][_loc7_] == "number") + { + _loc5_[_loc7_].push(param2[_loc6_][_loc7_]); + } + else + { + _loc5_[_loc7_].push(param1.target[_loc7_] + Number(param2[_loc6_][_loc7_])); + } + } + _loc6_++; + } + for(_loc7_ in _loc5_) + { + this.overwriteProps[this.overwriteProps.length] = _loc7_; + if(_loc4_[_loc7_] != undefined) + { + if(typeof _loc4_[_loc7_] == "number") + { + _loc5_[_loc7_].push(_loc4_[_loc7_]); + } + else + { + _loc5_[_loc7_].push(param1.target[_loc7_] + Number(_loc4_[_loc7_])); + } + _loc8_ = {}; + _loc8_[_loc7_] = true; + param1.killVars(_loc8_,false); + delete _loc4_[_loc7_]; + } + } + _beziers = parseBeziers(_loc5_,param3); + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + if(!(param2 is Array)) + { + return false; + } + init(param3,param2 as Array,false); + return true; + } + + override public function set changeFactor(param1:Number) : void + { + var _loc2_:* = 0; + var _loc3_:String = null; + var _loc4_:Object = null; + var _loc5_:Number = NaN; + var _loc6_:uint = 0; + var _loc7_:Number = NaN; + var _loc8_:Object = null; + var _loc9_:Number = NaN; + var _loc10_:Number = NaN; + var _loc11_:Array = null; + var _loc12_:Number = NaN; + var _loc13_:Object = null; + var _loc14_:Boolean = false; + _changeFactor = param1; + if(param1 == 1) + { + for(_loc3_ in _beziers) + { + _loc2_ = int(_beziers[_loc3_].length - 1); + _target[_loc3_] = _beziers[_loc3_][_loc2_][2]; + } + } + else + { + for(_loc3_ in _beziers) + { + _loc6_ = uint(_beziers[_loc3_].length); + if(param1 < 0) + { + _loc2_ = 0; + } + else if(param1 >= 1) + { + _loc2_ = int(_loc6_ - 1); + } + else + { + _loc2_ = int(_loc6_ * param1); + } + _loc5_ = (param1 - _loc2_ * (1 / _loc6_)) * _loc6_; + _loc4_ = _beziers[_loc3_][_loc2_]; + if(this.round) + { + _loc7_ = _loc4_[0] + _loc5_ * (2 * (1 - _loc5_) * (_loc4_[1] - _loc4_[0]) + _loc5_ * (_loc4_[2] - _loc4_[0])); + _target[_loc3_] = _loc7_ > 0 ? int(_loc7_ + 0.5) : int(_loc7_ - 0.5); + } + else + { + _target[_loc3_] = _loc4_[0] + _loc5_ * (2 * (1 - _loc5_) * (_loc4_[1] - _loc4_[0]) + _loc5_ * (_loc4_[2] - _loc4_[0])); + } + } + } + if(_orient) + { + _loc2_ = int(_orientData.length); + _loc8_ = {}; + while(_loc2_--) + { + _loc11_ = _orientData[_loc2_]; + _loc8_[_loc11_[0]] = _target[_loc11_[0]]; + _loc8_[_loc11_[1]] = _target[_loc11_[1]]; + } + _loc13_ = _target; + _loc14_ = this.round; + _target = _future; + this.round = false; + _orient = false; + _loc2_ = int(_orientData.length); + while(_loc2_--) + { + _loc11_ = _orientData[_loc2_]; + this.changeFactor = param1 + (_loc11_[4] || 0.01); + _loc12_ = Number(Number(_loc11_[3]) || 0); + _loc9_ = _future[_loc11_[0]] - _loc8_[_loc11_[0]]; + _loc10_ = _future[_loc11_[1]] - _loc8_[_loc11_[1]]; + _loc13_[_loc11_[2]] = Math.atan2(_loc10_,_loc9_) * _RAD2DEG + _loc12_; + } + _target = _loc13_; + this.round = _loc14_; + _orient = true; + } + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/BezierThroughPlugin.as b/flash_decompiled/com/greensock/plugins/BezierThroughPlugin.as new file mode 100644 index 0000000..c12805b --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/BezierThroughPlugin.as @@ -0,0 +1,27 @@ +package com.greensock.plugins +{ + import com.greensock.TweenLite; + + public class BezierThroughPlugin extends BezierPlugin + { + + public static const API:Number = 1; + + public function BezierThroughPlugin() + { + super(); + this.propName = "bezierThrough"; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + if(!(param2 is Array)) + { + return false; + } + init(param3,param2 as Array,true); + return true; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/BlurFilterPlugin.as b/flash_decompiled/com/greensock/plugins/BlurFilterPlugin.as new file mode 100644 index 0000000..87291b4 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/BlurFilterPlugin.as @@ -0,0 +1,29 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import flash.filters.BlurFilter; + + public class BlurFilterPlugin extends FilterPlugin + { + + public static const API:Number = 1; + + private static var _propNames:Array = ["blurX","blurY","quality"]; + + public function BlurFilterPlugin() + { + super(); + this.propName = "blurFilter"; + this.overwriteProps = ["blurFilter"]; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + _target = param1; + _type = BlurFilter; + initFilter(param2,new BlurFilter(0,0,int(param2.quality) || 2),_propNames); + return true; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/ColorMatrixFilterPlugin.as b/flash_decompiled/com/greensock/plugins/ColorMatrixFilterPlugin.as new file mode 100644 index 0000000..f82236e --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/ColorMatrixFilterPlugin.as @@ -0,0 +1,191 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import flash.filters.ColorMatrixFilter; + + public class ColorMatrixFilterPlugin extends FilterPlugin + { + + public static const API:Number = 1; + + private static var _propNames:Array = []; + + protected static var _idMatrix:Array = [1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]; + + protected static var _lumR:Number = 0.212671; + + protected static var _lumG:Number = 0.71516; + + protected static var _lumB:Number = 0.072169; + + protected var _matrix:Array; + + protected var _matrixTween:EndArrayPlugin; + + public function ColorMatrixFilterPlugin() + { + super(); + this.propName = "colorMatrixFilter"; + this.overwriteProps = ["colorMatrixFilter"]; + } + + public static function setSaturation(param1:Array, param2:Number) : Array + { + if(isNaN(param2)) + { + return param1; + } + var _loc3_:Number = 1 - param2; + var _loc4_:Number = _loc3_ * _lumR; + var _loc5_:Number = _loc3_ * _lumG; + var _loc6_:Number = _loc3_ * _lumB; + var _loc7_:Array = [_loc4_ + param2,_loc5_,_loc6_,0,0,_loc4_,_loc5_ + param2,_loc6_,0,0,_loc4_,_loc5_,_loc6_ + param2,0,0,0,0,0,1,0]; + return applyMatrix(_loc7_,param1); + } + + public static function setHue(param1:Array, param2:Number) : Array + { + if(isNaN(param2)) + { + return param1; + } + param2 *= Math.PI / 180; + var _loc3_:Number = Math.cos(param2); + var _loc4_:Number = Math.sin(param2); + var _loc5_:Array = [_lumR + _loc3_ * (1 - _lumR) + _loc4_ * -_lumR,_lumG + _loc3_ * -_lumG + _loc4_ * -_lumG,_lumB + _loc3_ * -_lumB + _loc4_ * (1 - _lumB),0,0,_lumR + _loc3_ * -_lumR + _loc4_ * 0.143,_lumG + _loc3_ * (1 - _lumG) + _loc4_ * 0.14,_lumB + _loc3_ * -_lumB + _loc4_ * -0.283,0,0,_lumR + _loc3_ * -_lumR + _loc4_ * -(1 - _lumR),_lumG + _loc3_ * -_lumG + _loc4_ * _lumG,_lumB + _loc3_ * (1 - _lumB) + _loc4_ * _lumB,0,0,0,0,0,1,0,0,0,0,0,1]; + return applyMatrix(_loc5_,param1); + } + + public static function setContrast(param1:Array, param2:Number) : Array + { + if(isNaN(param2)) + { + return param1; + } + param2 += 0.01; + var _loc3_:Array = [param2,0,0,0,128 * (1 - param2),0,param2,0,0,128 * (1 - param2),0,0,param2,0,128 * (1 - param2),0,0,0,1,0]; + return applyMatrix(_loc3_,param1); + } + + public static function applyMatrix(param1:Array, param2:Array) : Array + { + var _loc6_:int = 0; + var _loc7_:int = 0; + if(!(param1 is Array) || !(param2 is Array)) + { + return param2; + } + var _loc3_:Array = []; + var _loc4_:int = 0; + var _loc5_:int = 0; + _loc6_ = 0; + while(_loc6_ < 4) + { + _loc7_ = 0; + while(_loc7_ < 5) + { + if(_loc7_ == 4) + { + _loc5_ = int(param1[_loc4_ + 4]); + } + else + { + _loc5_ = 0; + } + _loc3_[_loc4_ + _loc7_] = param1[_loc4_] * param2[_loc7_] + param1[_loc4_ + 1] * param2[_loc7_ + 5] + param1[_loc4_ + 2] * param2[_loc7_ + 10] + param1[_loc4_ + 3] * param2[_loc7_ + 15] + _loc5_; + _loc7_++; + } + _loc4_ += 5; + _loc6_++; + } + return _loc3_; + } + + public static function setThreshold(param1:Array, param2:Number) : Array + { + if(isNaN(param2)) + { + return param1; + } + var _loc3_:Array = [_lumR * 256,_lumG * 256,_lumB * 256,0,-256 * param2,_lumR * 256,_lumG * 256,_lumB * 256,0,-256 * param2,_lumR * 256,_lumG * 256,_lumB * 256,0,-256 * param2,0,0,0,1,0]; + return applyMatrix(_loc3_,param1); + } + + public static function colorize(param1:Array, param2:Number, param3:Number = 1) : Array + { + if(isNaN(param2)) + { + return param1; + } + if(isNaN(param3)) + { + param3 = 1; + } + var _loc4_:Number = (param2 >> 16 & 0xFF) / 255; + var _loc5_:Number = (param2 >> 8 & 0xFF) / 255; + var _loc6_:Number = (param2 & 0xFF) / 255; + var _loc7_:Number = 1 - param3; + var _loc8_:Array = [_loc7_ + param3 * _loc4_ * _lumR,param3 * _loc4_ * _lumG,param3 * _loc4_ * _lumB,0,0,param3 * _loc5_ * _lumR,_loc7_ + param3 * _loc5_ * _lumG,param3 * _loc5_ * _lumB,0,0,param3 * _loc6_ * _lumR,param3 * _loc6_ * _lumG,_loc7_ + param3 * _loc6_ * _lumB,0,0,0,0,0,1,0]; + return applyMatrix(_loc8_,param1); + } + + public static function setBrightness(param1:Array, param2:Number) : Array + { + if(isNaN(param2)) + { + return param1; + } + param2 = param2 * 100 - 100; + return applyMatrix([1,0,0,0,param2,0,1,0,0,param2,0,0,1,0,param2,0,0,0,1,0,0,0,0,0,1],param1); + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + _target = param1; + _type = ColorMatrixFilter; + var _loc4_:Object = param2; + initFilter({ + "remove":param2.remove, + "index":param2.index, + "addFilter":param2.addFilter + },new ColorMatrixFilter(_idMatrix.slice()),_propNames); + _matrix = ColorMatrixFilter(_filter).matrix; + var _loc5_:Array = []; + if(_loc4_.matrix != null && _loc4_.matrix is Array) + { + _loc5_ = _loc4_.matrix; + } + else + { + if(_loc4_.relative == true) + { + _loc5_ = _matrix.slice(); + } + else + { + _loc5_ = _idMatrix.slice(); + } + _loc5_ = setBrightness(_loc5_,_loc4_.brightness); + _loc5_ = setContrast(_loc5_,_loc4_.contrast); + _loc5_ = setHue(_loc5_,_loc4_.hue); + _loc5_ = setSaturation(_loc5_,_loc4_.saturation); + _loc5_ = setThreshold(_loc5_,_loc4_.threshold); + if(!isNaN(_loc4_.colorize)) + { + _loc5_ = colorize(_loc5_,_loc4_.colorize,_loc4_.amount); + } + } + _matrixTween = new EndArrayPlugin(); + _matrixTween.init(_matrix,_loc5_); + return true; + } + + override public function set changeFactor(param1:Number) : void + { + _matrixTween.changeFactor = param1; + ColorMatrixFilter(_filter).matrix = _matrix; + super.changeFactor = param1; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/ColorTransformPlugin.as b/flash_decompiled/com/greensock/plugins/ColorTransformPlugin.as new file mode 100644 index 0000000..57e006d --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/ColorTransformPlugin.as @@ -0,0 +1,69 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import flash.display.*; + import flash.geom.ColorTransform; + + public class ColorTransformPlugin extends TintPlugin + { + + public static const API:Number = 1; + + public function ColorTransformPlugin() + { + super(); + this.propName = "colorTransform"; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + var _loc5_:String = null; + var _loc6_:Number = NaN; + if(!(param1 is DisplayObject)) + { + return false; + } + var _loc4_:ColorTransform = param1.transform.colorTransform; + for(_loc5_ in param2) + { + if(_loc5_ == "tint" || _loc5_ == "color") + { + if(param2[_loc5_] != null) + { + _loc4_.color = int(param2[_loc5_]); + } + } + else + { + if(_loc5_ == "tintAmount" || _loc5_ == "exposure" || _loc5_ == "brightness") + { + continue; + } + _loc4_[_loc5_] = param2[_loc5_]; + } + } + if(!isNaN(param2.tintAmount)) + { + _loc6_ = param2.tintAmount / (1 - (_loc4_.redMultiplier + _loc4_.greenMultiplier + _loc4_.blueMultiplier) / 3); + _loc4_.redOffset *= _loc6_; + _loc4_.greenOffset *= _loc6_; + _loc4_.blueOffset *= _loc6_; + _loc4_.redMultiplier = _loc4_.greenMultiplier = _loc4_.blueMultiplier = 1 - param2.tintAmount; + } + else if(!isNaN(param2.exposure)) + { + _loc4_.redOffset = _loc4_.greenOffset = _loc4_.blueOffset = 255 * (param2.exposure - 1); + _loc4_.redMultiplier = _loc4_.greenMultiplier = _loc4_.blueMultiplier = 1; + } + else if(!isNaN(param2.brightness)) + { + _loc4_.redOffset = _loc4_.greenOffset = _loc4_.blueOffset = Math.max(0,(param2.brightness - 1) * 255); + _loc4_.redMultiplier = _loc4_.greenMultiplier = _loc4_.blueMultiplier = 1 - Math.abs(param2.brightness - 1); + } + _ignoreAlpha = Boolean(param3.vars.alpha != undefined && param2.alphaMultiplier == undefined); + init(param1 as DisplayObject,_loc4_); + return true; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/DropShadowFilterPlugin.as b/flash_decompiled/com/greensock/plugins/DropShadowFilterPlugin.as new file mode 100644 index 0000000..e42a020 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/DropShadowFilterPlugin.as @@ -0,0 +1,29 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import flash.filters.DropShadowFilter; + + public class DropShadowFilterPlugin extends FilterPlugin + { + + public static const API:Number = 1; + + private static var _propNames:Array = ["distance","angle","color","alpha","blurX","blurY","strength","quality","inner","knockout","hideObject"]; + + public function DropShadowFilterPlugin() + { + super(); + this.propName = "dropShadowFilter"; + this.overwriteProps = ["dropShadowFilter"]; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + _target = param1; + _type = DropShadowFilter; + initFilter(param2,new DropShadowFilter(0,45,0,0,0,0,1,int(param2.quality) || 2,param2.inner,param2.knockout,param2.hideObject),_propNames); + return true; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/EndArrayPlugin.as b/flash_decompiled/com/greensock/plugins/EndArrayPlugin.as new file mode 100644 index 0000000..40ebcbd --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/EndArrayPlugin.as @@ -0,0 +1,86 @@ +package com.greensock.plugins +{ + import com.greensock.*; + + public class EndArrayPlugin extends TweenPlugin + { + + public static const API:Number = 1; + + protected var _a:Array; + + protected var _info:Array = []; + + public function EndArrayPlugin() + { + super(); + this.propName = "endArray"; + this.overwriteProps = ["endArray"]; + } + + public function init(param1:Array, param2:Array) : void + { + _a = param1; + var _loc3_:* = int(param2.length); + while(_loc3_--) + { + if(param1[_loc3_] != param2[_loc3_] && param1[_loc3_] != null) + { + _info[_info.length] = new ArrayTweenInfo(_loc3_,_a[_loc3_],param2[_loc3_] - _a[_loc3_]); + } + } + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + if(!(param1 is Array) || !(param2 is Array)) + { + return false; + } + init(param1 as Array,param2); + return true; + } + + override public function set changeFactor(param1:Number) : void + { + var _loc3_:ArrayTweenInfo = null; + var _loc4_:Number = NaN; + var _loc2_:* = int(_info.length); + if(this.round) + { + while(_loc2_--) + { + _loc3_ = _info[_loc2_]; + _loc4_ = _loc3_.start + _loc3_.change * param1; + _a[_loc3_.index] = _loc4_ > 0 ? int(_loc4_ + 0.5) : int(_loc4_ - 0.5); + } + } + else + { + while(_loc2_--) + { + _loc3_ = _info[_loc2_]; + _a[_loc3_.index] = _loc3_.start + _loc3_.change * param1; + } + } + } + } +} + +class ArrayTweenInfo +{ + + public var change:Number; + + public var start:Number; + + public var index:uint; + + public function ArrayTweenInfo(param1:uint, param2:Number, param3:Number) + { + super(); + this.index = param1; + this.start = param2; + this.change = param3; + } +} diff --git a/flash_decompiled/com/greensock/plugins/FilterPlugin.as b/flash_decompiled/com/greensock/plugins/FilterPlugin.as new file mode 100644 index 0000000..1416812 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/FilterPlugin.as @@ -0,0 +1,142 @@ +package com.greensock.plugins +{ + import com.greensock.core.*; + import flash.filters.*; + + public class FilterPlugin extends TweenPlugin + { + + public static const VERSION:Number = 2.03; + + public static const API:Number = 1; + + protected var _remove:Boolean; + + protected var _target:Object; + + protected var _index:int; + + protected var _filter:BitmapFilter; + + protected var _type:Class; + + public function FilterPlugin() + { + super(); + } + + public function onCompleteTween() : void + { + var _loc1_:Array = null; + var _loc2_:* = 0; + if(_remove) + { + _loc1_ = _target.filters; + if(!(_loc1_[_index] is _type)) + { + _loc2_ = int(_loc1_.length); + while(_loc2_--) + { + if(_loc1_[_loc2_] is _type) + { + _loc1_.splice(_loc2_,1); + break; + } + } + } + else + { + _loc1_.splice(_index,1); + } + _target.filters = _loc1_; + } + } + + protected function initFilter(param1:Object, param2:BitmapFilter, param3:Array) : void + { + var _loc5_:String = null; + var _loc6_:* = 0; + var _loc7_:HexColorsPlugin = null; + var _loc4_:Array = _target.filters; + var _loc8_:Object = param1 is BitmapFilter ? {} : param1; + _index = -1; + if(_loc8_.index != null) + { + _index = _loc8_.index; + } + else + { + _loc6_ = int(_loc4_.length); + while(_loc6_--) + { + if(_loc4_[_loc6_] is _type) + { + _index = _loc6_; + break; + } + } + } + if(_index == -1 || _loc4_[_index] == null || _loc8_.addFilter == true) + { + _index = _loc8_.index != null ? int(_loc8_.index) : int(_loc4_.length); + _loc4_[_index] = param2; + _target.filters = _loc4_; + } + _filter = _loc4_[_index]; + if(_loc8_.remove == true) + { + _remove = true; + this.onComplete = onCompleteTween; + } + _loc6_ = int(param3.length); + while(_loc6_--) + { + _loc5_ = param3[_loc6_]; + if(_loc5_ in param1 && _filter[_loc5_] != param1[_loc5_]) + { + if(_loc5_ == "color" || _loc5_ == "highlightColor" || _loc5_ == "shadowColor") + { + _loc7_ = new HexColorsPlugin(); + _loc7_.initColor(_filter,_loc5_,_filter[_loc5_],param1[_loc5_]); + _tweens[_tweens.length] = new PropTween(_loc7_,"changeFactor",0,1,_loc5_,false); + } + else if(_loc5_ == "quality" || _loc5_ == "inner" || _loc5_ == "knockout" || _loc5_ == "hideObject") + { + _filter[_loc5_] = param1[_loc5_]; + } + else + { + addTween(_filter,_loc5_,_filter[_loc5_],param1[_loc5_],_loc5_); + } + } + } + } + + override public function set changeFactor(param1:Number) : void + { + var _loc3_:PropTween = null; + var _loc2_:* = int(_tweens.length); + var _loc4_:Array = _target.filters; + while(_loc2_--) + { + _loc3_ = _tweens[_loc2_]; + _loc3_.target[_loc3_.property] = _loc3_.start + _loc3_.change * param1; + } + if(!(_loc4_[_index] is _type)) + { + _loc2_ = int(_index = _loc4_.length); + while(_loc2_--) + { + if(_loc4_[_loc2_] is _type) + { + _index = _loc2_; + break; + } + } + } + _loc4_[_index] = _filter; + _target.filters = _loc4_; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/FrameLabelPlugin.as b/flash_decompiled/com/greensock/plugins/FrameLabelPlugin.as new file mode 100644 index 0000000..0f2c816 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/FrameLabelPlugin.as @@ -0,0 +1,45 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import flash.display.*; + + public class FrameLabelPlugin extends FramePlugin + { + + public static const API:Number = 1; + + public function FrameLabelPlugin() + { + super(); + this.propName = "frameLabel"; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + if(!param3.target is MovieClip) + { + return false; + } + _target = param1 as MovieClip; + this.frame = _target.currentFrame; + var _loc4_:Array = _target.currentLabels; + var _loc5_:String = param2; + var _loc6_:int = _target.currentFrame; + var _loc7_:* = int(_loc4_.length); + while(_loc7_--) + { + if(_loc4_[_loc7_].name == _loc5_) + { + _loc6_ = int(_loc4_[_loc7_].frame); + break; + } + } + if(this.frame != _loc6_) + { + addTween(this,"frame",this.frame,_loc6_,"frame"); + } + return true; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/FramePlugin.as b/flash_decompiled/com/greensock/plugins/FramePlugin.as new file mode 100644 index 0000000..cade74f --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/FramePlugin.as @@ -0,0 +1,42 @@ +package com.greensock.plugins +{ + import com.greensock.TweenLite; + import flash.display.MovieClip; + + public class FramePlugin extends TweenPlugin + { + + public static const API:Number = 1; + + protected var _target:MovieClip; + + public var frame:int; + + public function FramePlugin() + { + super(); + this.propName = "frame"; + this.overwriteProps = ["frame","frameLabel"]; + this.round = true; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + if(!(param1 is MovieClip) || isNaN(param2)) + { + return false; + } + _target = param1 as MovieClip; + this.frame = _target.currentFrame; + addTween(this,"frame",this.frame,param2,"frame"); + return true; + } + + override public function set changeFactor(param1:Number) : void + { + updateTweens(param1); + _target.gotoAndStop(this.frame); + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/GlowFilterPlugin.as b/flash_decompiled/com/greensock/plugins/GlowFilterPlugin.as new file mode 100644 index 0000000..9a9d2df --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/GlowFilterPlugin.as @@ -0,0 +1,29 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import flash.filters.GlowFilter; + + public class GlowFilterPlugin extends FilterPlugin + { + + public static const API:Number = 1; + + private static var _propNames:Array = ["color","alpha","blurX","blurY","strength","quality","inner","knockout"]; + + public function GlowFilterPlugin() + { + super(); + this.propName = "glowFilter"; + this.overwriteProps = ["glowFilter"]; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + _target = param1; + _type = GlowFilter; + initFilter(param2,new GlowFilter(16777215,0,0,0,Number(param2.strength) || 1,int(param2.quality) || 2,param2.inner,param2.knockout),_propNames); + return true; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/HexColorsPlugin.as b/flash_decompiled/com/greensock/plugins/HexColorsPlugin.as new file mode 100644 index 0000000..1fc6efe --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/HexColorsPlugin.as @@ -0,0 +1,71 @@ +package com.greensock.plugins +{ + import com.greensock.*; + + public class HexColorsPlugin extends TweenPlugin + { + + public static const API:Number = 1; + + protected var _colors:Array; + + public function HexColorsPlugin() + { + super(); + this.propName = "hexColors"; + this.overwriteProps = []; + _colors = []; + } + + override public function killProps(param1:Object) : void + { + var _loc2_:* = int(_colors.length - 1); + while(_loc2_ > -1) + { + if(param1[_colors[_loc2_][1]] != undefined) + { + _colors.splice(_loc2_,1); + } + _loc2_--; + } + super.killProps(param1); + } + + public function initColor(param1:Object, param2:String, param3:uint, param4:uint) : void + { + var _loc5_:Number = NaN; + var _loc6_:Number = NaN; + var _loc7_:Number = NaN; + if(param3 != param4) + { + _loc5_ = param3 >> 16; + _loc6_ = param3 >> 8 & 0xFF; + _loc7_ = param3 & 0xFF; + _colors[_colors.length] = [param1,param2,_loc5_,(param4 >> 16) - _loc5_,_loc6_,(param4 >> 8 & 0xFF) - _loc6_,_loc7_,(param4 & 0xFF) - _loc7_]; + this.overwriteProps[this.overwriteProps.length] = param2; + } + } + + override public function set changeFactor(param1:Number) : void + { + var _loc3_:Array = null; + var _loc2_:int = int(_colors.length); + while(--_loc2_ > -1) + { + _loc3_ = _colors[_loc2_]; + _loc3_[0][_loc3_[1]] = _loc3_[2] + param1 * _loc3_[3] << 16 | _loc3_[4] + param1 * _loc3_[5] << 8 | _loc3_[6] + param1 * _loc3_[7]; + } + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + var _loc4_:String = null; + for(_loc4_ in param2) + { + initColor(param1,_loc4_,uint(param1[_loc4_]),uint(param2[_loc4_])); + } + return true; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/RemoveTintPlugin.as b/flash_decompiled/com/greensock/plugins/RemoveTintPlugin.as new file mode 100644 index 0000000..19f13f1 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/RemoveTintPlugin.as @@ -0,0 +1,15 @@ +package com.greensock.plugins +{ + public class RemoveTintPlugin extends TintPlugin + { + + public static const API:Number = 1; + + public function RemoveTintPlugin() + { + super(); + this.propName = "removeTint"; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/RoundPropsPlugin.as b/flash_decompiled/com/greensock/plugins/RoundPropsPlugin.as new file mode 100644 index 0000000..3e850b1 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/RoundPropsPlugin.as @@ -0,0 +1,23 @@ +package com.greensock.plugins +{ + public class RoundPropsPlugin extends TweenPlugin + { + + public static const API:Number = 1; + + public function RoundPropsPlugin() + { + super(); + this.propName = "roundProps"; + this.overwriteProps = []; + this.round = true; + } + + public function add(param1:Object, param2:String, param3:Number, param4:Number) : void + { + addTween(param1,param2,param3,param3 + param4,param2); + this.overwriteProps[this.overwriteProps.length] = param2; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/ShortRotationPlugin.as b/flash_decompiled/com/greensock/plugins/ShortRotationPlugin.as new file mode 100644 index 0000000..297731f --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/ShortRotationPlugin.as @@ -0,0 +1,43 @@ +package com.greensock.plugins +{ + import com.greensock.*; + + public class ShortRotationPlugin extends TweenPlugin + { + + public static const API:Number = 1; + + public function ShortRotationPlugin() + { + super(); + this.propName = "shortRotation"; + this.overwriteProps = []; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + var _loc4_:String = null; + if(typeof param2 == "number") + { + return false; + } + for(_loc4_ in param2) + { + initRotation(param1,_loc4_,param1[_loc4_],typeof param2[_loc4_] == "number" ? Number(param2[_loc4_]) : param1[_loc4_] + Number(param2[_loc4_])); + } + return true; + } + + public function initRotation(param1:Object, param2:String, param3:Number, param4:Number) : void + { + var _loc5_:Number = (param4 - param3) % 360; + if(_loc5_ != _loc5_ % 180) + { + _loc5_ = _loc5_ < 0 ? _loc5_ + 360 : _loc5_ - 360; + } + addTween(param1,param2,param3,param3 + _loc5_,param2); + this.overwriteProps[this.overwriteProps.length] = param2; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/TintPlugin.as b/flash_decompiled/com/greensock/plugins/TintPlugin.as new file mode 100644 index 0000000..6a4105b --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/TintPlugin.as @@ -0,0 +1,75 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import com.greensock.core.*; + import flash.display.*; + import flash.geom.ColorTransform; + import flash.geom.Transform; + + public class TintPlugin extends TweenPlugin + { + + public static const API:Number = 1; + + protected static var _props:Array = ["redMultiplier","greenMultiplier","blueMultiplier","alphaMultiplier","redOffset","greenOffset","blueOffset","alphaOffset"]; + + protected var _ct:ColorTransform; + + protected var _transform:Transform; + + protected var _ignoreAlpha:Boolean; + + public function TintPlugin() + { + super(); + this.propName = "tint"; + this.overwriteProps = ["tint"]; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + if(!(param1 is DisplayObject)) + { + return false; + } + var _loc4_:ColorTransform = new ColorTransform(); + if(param2 != null && param3.vars.removeTint != true) + { + _loc4_.color = uint(param2); + } + _ignoreAlpha = true; + init(param1 as DisplayObject,_loc4_); + return true; + } + + override public function set changeFactor(param1:Number) : void + { + var _loc2_:ColorTransform = null; + updateTweens(param1); + if(_ignoreAlpha) + { + _loc2_ = _transform.colorTransform; + _ct.alphaMultiplier = _loc2_.alphaMultiplier; + _ct.alphaOffset = _loc2_.alphaOffset; + } + _transform.colorTransform = _ct; + } + + public function init(param1:DisplayObject, param2:ColorTransform) : void + { + var _loc4_:String = null; + _transform = param1.transform; + _ct = _transform.colorTransform; + var _loc3_:* = int(_props.length); + while(_loc3_--) + { + _loc4_ = _props[_loc3_]; + if(_ct[_loc4_] != param2[_loc4_]) + { + _tweens[_tweens.length] = new PropTween(_ct,_loc4_,_ct[_loc4_],param2[_loc4_] - _ct[_loc4_],"tint",false); + } + } + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/TweenPlugin.as b/flash_decompiled/com/greensock/plugins/TweenPlugin.as new file mode 100644 index 0000000..550fa71 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/TweenPlugin.as @@ -0,0 +1,170 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import com.greensock.core.*; + + public class TweenPlugin + { + + public static const VERSION:Number = 1.31; + + public static const API:Number = 1; + + public var activeDisable:Boolean; + + protected var _changeFactor:Number = 0; + + protected var _tweens:Array = []; + + public var onDisable:Function; + + public var propName:String; + + public var round:Boolean; + + public var onEnable:Function; + + public var priority:int = 0; + + public var overwriteProps:Array; + + public var onComplete:Function; + + public function TweenPlugin() + { + super(); + } + + public static function activate(param1:Array) : Boolean + { + var _loc3_:Object = null; + TweenLite.onPluginEvent = TweenPlugin.onTweenEvent; + var _loc2_:* = int(param1.length); + while(_loc2_--) + { + if(param1[_loc2_].hasOwnProperty("API")) + { + _loc3_ = new (param1[_loc2_] as Class)(); + TweenLite.plugins[_loc3_.propName] = param1[_loc2_]; + } + } + return true; + } + + private static function onTweenEvent(param1:String, param2:TweenLite) : Boolean + { + var _loc4_:Boolean = false; + var _loc5_:Array = null; + var _loc6_:* = 0; + var _loc3_:PropTween = param2.cachedPT1; + if(param1 == "onInit") + { + _loc5_ = []; + while(_loc3_) + { + _loc5_[_loc5_.length] = _loc3_; + _loc3_ = _loc3_.nextNode; + } + _loc5_.sortOn("priority",Array.NUMERIC | Array.DESCENDING); + _loc6_ = int(_loc5_.length); + while(_loc6_--) + { + PropTween(_loc5_[_loc6_]).nextNode = _loc5_[_loc6_ + 1]; + PropTween(_loc5_[_loc6_]).prevNode = _loc5_[_loc6_ - 1]; + } + param2.cachedPT1 = _loc5_[0]; + } + else + { + while(_loc3_) + { + if(_loc3_.isPlugin && Boolean(_loc3_.target[param1])) + { + if(_loc3_.target.activeDisable) + { + _loc4_ = true; + } + _loc3_.target[param1](); + } + _loc3_ = _loc3_.nextNode; + } + } + return _loc4_; + } + + protected function updateTweens(param1:Number) : void + { + var _loc3_:PropTween = null; + var _loc4_:Number = NaN; + var _loc2_:* = int(_tweens.length); + if(this.round) + { + while(_loc2_--) + { + _loc3_ = _tweens[_loc2_]; + _loc4_ = _loc3_.start + _loc3_.change * param1; + _loc3_.target[_loc3_.property] = _loc4_ > 0 ? int(_loc4_ + 0.5) : int(_loc4_ - 0.5); + } + } + else + { + while(_loc2_--) + { + _loc3_ = _tweens[_loc2_]; + _loc3_.target[_loc3_.property] = _loc3_.start + _loc3_.change * param1; + } + } + } + + protected function addTween(param1:Object, param2:String, param3:Number, param4:*, param5:String = null) : void + { + var _loc6_:Number = NaN; + if(param4 != null) + { + _loc6_ = typeof param4 == "number" ? Number(param4) - param3 : Number(param4); + if(_loc6_ != 0) + { + _tweens[_tweens.length] = new PropTween(param1,param2,param3,_loc6_,param5 || param2,false); + } + } + } + + public function get changeFactor() : Number + { + return _changeFactor; + } + + public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + addTween(param1,this.propName,param1[this.propName],param2,this.propName); + return true; + } + + public function killProps(param1:Object) : void + { + var _loc2_:* = int(this.overwriteProps.length); + while(_loc2_--) + { + if(this.overwriteProps[_loc2_] in param1) + { + this.overwriteProps.splice(_loc2_,1); + } + } + _loc2_ = int(_tweens.length); + while(_loc2_--) + { + if(PropTween(_tweens[_loc2_]).name in param1) + { + _tweens.splice(_loc2_,1); + } + } + } + + public function set changeFactor(param1:Number) : void + { + updateTweens(param1); + _changeFactor = param1; + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/VisiblePlugin.as b/flash_decompiled/com/greensock/plugins/VisiblePlugin.as new file mode 100644 index 0000000..edbc5dd --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/VisiblePlugin.as @@ -0,0 +1,47 @@ +package com.greensock.plugins +{ + import com.greensock.*; + + public class VisiblePlugin extends TweenPlugin + { + + public static const API:Number = 1; + + protected var _target:Object; + + protected var _initVal:Boolean; + + protected var _visible:Boolean; + + protected var _tween:TweenLite; + + public function VisiblePlugin() + { + super(); + this.propName = "visible"; + this.overwriteProps = ["visible"]; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + _target = param1; + _tween = param3; + _initVal = _target.visible; + _visible = Boolean(param2); + return true; + } + + override public function set changeFactor(param1:Number) : void + { + if(param1 == 1 && (_tween.cachedDuration == _tween.cachedTime || _tween.cachedTime == 0)) + { + _target.visible = _visible; + } + else + { + _target.visible = _initVal; + } + } + } +} + diff --git a/flash_decompiled/com/greensock/plugins/VolumePlugin.as b/flash_decompiled/com/greensock/plugins/VolumePlugin.as new file mode 100644 index 0000000..13c0e41 --- /dev/null +++ b/flash_decompiled/com/greensock/plugins/VolumePlugin.as @@ -0,0 +1,41 @@ +package com.greensock.plugins +{ + import com.greensock.*; + import flash.media.SoundTransform; + + public class VolumePlugin extends TweenPlugin + { + + public static const API:Number = 1; + + protected var _target:Object; + + protected var _st:SoundTransform; + + public function VolumePlugin() + { + super(); + this.propName = "volume"; + this.overwriteProps = ["volume"]; + } + + override public function onInitTween(param1:Object, param2:*, param3:TweenLite) : Boolean + { + if(isNaN(param2) || !param1.hasOwnProperty("soundTransform")) + { + return false; + } + _target = param1; + _st = _target.soundTransform; + addTween(_st,"volume",_st.volume,param2,"volume"); + return true; + } + + override public function set changeFactor(param1:Number) : void + { + updateTweens(param1); + _target.soundTransform = _st; + } + } +} + diff --git a/flash_decompiled/com/hurlant/crypto/symmetric/DESKey.as b/flash_decompiled/com/hurlant/crypto/symmetric/DESKey.as new file mode 100644 index 0000000..fb6e5cd --- /dev/null +++ b/flash_decompiled/com/hurlant/crypto/symmetric/DESKey.as @@ -0,0 +1,279 @@ +package com.hurlant.crypto.symmetric +{ + import com.hurlant.util.Memory; + import flash.utils.ByteArray; + + public class DESKey implements ISymmetricKey + { + + private static const Df_Key:Array = [1,35,69,103,137,171,205,239,254,220,186,152,118,84,50,16,137,171,205,239,1,35,69,103]; + + private static const bytebit:Array = [128,64,32,16,8,4,2,1]; + + private static const bigbyte:Array = [8388608,4194304,2097152,1048576,524288,262144,131072,65536,32768,16384,8192,4096,2048,1024,512,256,128,64,32,16,8,4,2,1]; + + private static const pc1:Array = [56,48,40,32,24,16,8,0,57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,60,52,44,36,28,20,12,4,27,19,11,3]; + + private static const totrot:Array = [1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28]; + + private static const pc2:Array = [13,16,10,23,0,4,2,27,14,5,20,9,22,18,11,3,25,7,15,6,26,19,12,1,40,51,30,36,46,54,29,39,50,44,32,47,43,48,38,55,33,52,45,41,49,35,28,31]; + + private static const SP1:Array = [16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756]; + + private static const SP2:Array = [2148565024,2147516416,32768,1081376,1048576,32,2148532256,2147516448,2147483680,2148565024,2148564992,2147483648,2147516416,1048576,32,2148532256,1081344,1048608,2147516448,0,2147483648,32768,1081376,2148532224,1048608,2147483680,0,1081344,32800,2148564992,2148532224,32800,0,1081376,2148532256,1048576,2147516448,2148532224,2148564992,32768,2148532224,2147516416,32,2148565024,1081376,32,32768,2147483648,32800,2148564992,1048576,2147483680,1048608,2147516448,2147483680,1048608,1081344,0,2147516416,32800,2147483648,2148532256,2148565024,1081344]; + + private static const SP3:Array = [520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584]; + + private static const SP4:Array = [8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928]; + + private static const SP5:Array = [256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080]; + + private static const SP6:Array = [536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312]; + + private static const SP7:Array = [2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154]; + + private static const SP8:Array = [268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696]; + + protected var encKey:Array; + + protected var key:ByteArray; + + protected var decKey:Array; + + public function DESKey(param1:ByteArray) + { + super(); + this.key = param1; + this.encKey = generateWorkingKey(true,param1,0); + this.decKey = generateWorkingKey(false,param1,0); + } + + protected function generateWorkingKey(param1:Boolean, param2:ByteArray, param3:uint) : Array + { + var _loc4_:Array = null; + var _loc5_:ByteArray = null; + var _loc6_:ByteArray = null; + var _loc7_:uint = 0; + var _loc8_:uint = 0; + var _loc9_:uint = 0; + var _loc10_:uint = 0; + var _loc11_:uint = 0; + var _loc12_:uint = 0; + var _loc13_:uint = 0; + _loc4_ = []; + _loc5_ = new ByteArray(); + _loc6_ = new ByteArray(); + _loc8_ = 0; + while(_loc8_ < 56) + { + _loc7_ = uint(pc1[_loc8_]); + _loc5_[_loc8_] = (param2[param3 + (_loc7_ >>> 3)] & bytebit[_loc7_ & 7]) != 0; + _loc8_++; + } + _loc9_ = 0; + while(_loc9_ < 16) + { + if(param1) + { + _loc10_ = uint(_loc9_ << 1); + } + else + { + _loc10_ = uint(15 - _loc9_ << 1); + } + _loc11_ = _loc10_ + 1; + _loc4_[_loc10_] = _loc4_[_loc11_] = 0; + _loc8_ = 0; + while(_loc8_ < 28) + { + _loc7_ = _loc8_ + totrot[_loc9_]; + if(_loc7_ < 28) + { + _loc6_[_loc8_] = _loc5_[_loc7_]; + } + else + { + _loc6_[_loc8_] = _loc5_[_loc7_ - 28]; + } + _loc8_++; + } + _loc8_ = 28; + while(_loc8_ < 56) + { + _loc7_ = _loc8_ + totrot[_loc9_]; + if(_loc7_ < 56) + { + _loc6_[_loc8_] = _loc5_[_loc7_]; + } + else + { + _loc6_[_loc8_] = _loc5_[_loc7_ - 28]; + } + _loc8_++; + } + _loc8_ = 0; + while(_loc8_ < 24) + { + if(_loc6_[pc2[_loc8_]]) + { + _loc4_[_loc10_] |= bigbyte[_loc8_]; + } + if(_loc6_[pc2[_loc8_ + 24]]) + { + _loc4_[_loc11_] |= bigbyte[_loc8_]; + } + _loc8_++; + } + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ != 32) + { + _loc12_ = uint(_loc4_[_loc9_]); + _loc13_ = uint(_loc4_[_loc9_ + 1]); + _loc4_[_loc9_] = (_loc12_ & 0xFC0000) << 6 | (_loc12_ & 0x0FC0) << 10 | (_loc13_ & 0xFC0000) >>> 10 | (_loc13_ & 0x0FC0) >>> 6; + _loc4_[_loc9_ + 1] = (_loc12_ & 0x03F000) << 12 | (_loc12_ & 0x3F) << 16 | (_loc13_ & 0x03F000) >>> 4 | _loc13_ & 0x3F; + _loc9_ += 2; + } + return _loc4_; + } + + public function encrypt(param1:ByteArray, param2:uint = 0) : void + { + desFunc(encKey,param1,param2,param1,param2); + } + + public function decrypt(param1:ByteArray, param2:uint = 0) : void + { + desFunc(decKey,param1,param2,param1,param2); + } + + public function dispose() : void + { + var _loc1_:uint = 0; + _loc1_ = 0; + _loc1_ = 0; + while(_loc1_ < encKey.length) + { + encKey[_loc1_] = 0; + _loc1_++; + } + _loc1_ = 0; + while(_loc1_ < decKey.length) + { + decKey[_loc1_] = 0; + _loc1_++; + } + encKey = null; + decKey = null; + _loc1_ = 0; + while(_loc1_ < key.length) + { + key[_loc1_] = 0; + _loc1_++; + } + key.length = 0; + key = null; + Memory.gc(); + } + + protected function desFunc(param1:Array, param2:ByteArray, param3:uint, param4:ByteArray, param5:uint) : void + { + var _loc6_:uint = 0; + var _loc7_:uint = 0; + var _loc8_:uint = 0; + var _loc9_:uint = 0; + var _loc10_:uint = 0; + _loc8_ = uint((param2[param3 + 0] & 0xFF) << 24); + _loc8_ = uint(_loc8_ | (param2[param3 + 1] & 0xFF) << 16); + _loc8_ = uint(_loc8_ | (param2[param3 + 2] & 0xFF) << 8); + _loc8_ = uint(_loc8_ | param2[param3 + 3] & 0xFF); + _loc7_ = uint((param2[param3 + 4] & 0xFF) << 24); + _loc7_ = uint(_loc7_ | (param2[param3 + 5] & 0xFF) << 16); + _loc7_ = uint(_loc7_ | (param2[param3 + 6] & 0xFF) << 8); + _loc7_ = uint(_loc7_ | param2[param3 + 7] & 0xFF); + _loc6_ = uint((_loc8_ >>> 4 ^ _loc7_) & 0x0F0F0F0F); + _loc7_ ^= _loc6_; + _loc8_ ^= _loc6_ << 4; + _loc6_ = uint((_loc8_ >>> 16 ^ _loc7_) & 0xFFFF); + _loc7_ ^= _loc6_; + _loc8_ ^= _loc6_ << 16; + _loc6_ = uint((_loc7_ >>> 2 ^ _loc8_) & 0x33333333); + _loc8_ ^= _loc6_; + _loc7_ ^= _loc6_ << 2; + _loc6_ = uint((_loc7_ >>> 8 ^ _loc8_) & 0xFF00FF); + _loc8_ ^= _loc6_; + _loc7_ ^= _loc6_ << 8; + _loc7_ = uint((_loc7_ << 1 | _loc7_ >>> 31 & 1) & 0xFFFFFFFF); + _loc6_ = uint((_loc8_ ^ _loc7_) & 0xAAAAAAAA); + _loc8_ ^= _loc6_; + _loc7_ ^= _loc6_; + _loc8_ = uint((_loc8_ << 1 | _loc8_ >>> 31 & 1) & 0xFFFFFFFF); + _loc9_ = 0; + while(_loc9_ < 8) + { + _loc6_ = uint(_loc7_ << 28 | _loc7_ >>> 4); + _loc6_ = uint(_loc6_ ^ param1[_loc9_ * 4 + 0]); + _loc10_ = uint(SP7[_loc6_ & 0x3F]); + _loc10_ = uint(_loc10_ | SP5[_loc6_ >>> 8 & 0x3F]); + _loc10_ = uint(_loc10_ | SP3[_loc6_ >>> 16 & 0x3F]); + _loc10_ = uint(_loc10_ | SP1[_loc6_ >>> 24 & 0x3F]); + _loc6_ = uint(_loc7_ ^ param1[_loc9_ * 4 + 1]); + _loc10_ |= SP8[_loc6_ & 0x3F]; + _loc10_ = uint(_loc10_ | SP6[_loc6_ >>> 8 & 0x3F]); + _loc10_ = uint(_loc10_ | SP4[_loc6_ >>> 16 & 0x3F]); + _loc10_ = uint(_loc10_ | SP2[_loc6_ >>> 24 & 0x3F]); + _loc8_ ^= _loc10_; + _loc6_ = uint(_loc8_ << 28 | _loc8_ >>> 4); + _loc6_ = uint(_loc6_ ^ param1[_loc9_ * 4 + 2]); + _loc10_ = uint(SP7[_loc6_ & 0x3F]); + _loc10_ = uint(_loc10_ | SP5[_loc6_ >>> 8 & 0x3F]); + _loc10_ = uint(_loc10_ | SP3[_loc6_ >>> 16 & 0x3F]); + _loc10_ = uint(_loc10_ | SP1[_loc6_ >>> 24 & 0x3F]); + _loc6_ = uint(_loc8_ ^ param1[_loc9_ * 4 + 3]); + _loc10_ |= SP8[_loc6_ & 0x3F]; + _loc10_ = uint(_loc10_ | SP6[_loc6_ >>> 8 & 0x3F]); + _loc10_ = uint(_loc10_ | SP4[_loc6_ >>> 16 & 0x3F]); + _loc10_ = uint(_loc10_ | SP2[_loc6_ >>> 24 & 0x3F]); + _loc7_ ^= _loc10_; + _loc9_++; + } + _loc7_ = uint(_loc7_ << 31 | _loc7_ >>> 1); + _loc6_ = uint((_loc8_ ^ _loc7_) & 0xAAAAAAAA); + _loc8_ ^= _loc6_; + _loc7_ ^= _loc6_; + _loc8_ = uint(_loc8_ << 31 | _loc8_ >>> 1); + _loc6_ = uint((_loc8_ >>> 8 ^ _loc7_) & 0xFF00FF); + _loc7_ ^= _loc6_; + _loc8_ ^= _loc6_ << 8; + _loc6_ = uint((_loc8_ >>> 2 ^ _loc7_) & 0x33333333); + _loc7_ ^= _loc6_; + _loc8_ ^= _loc6_ << 2; + _loc6_ = uint((_loc7_ >>> 16 ^ _loc8_) & 0xFFFF); + _loc8_ ^= _loc6_; + _loc7_ ^= _loc6_ << 16; + _loc6_ = uint((_loc7_ >>> 4 ^ _loc8_) & 0x0F0F0F0F); + _loc8_ ^= _loc6_; + _loc7_ ^= _loc6_ << 4; + param4[param5 + 0] = _loc7_ >>> 24 & 0xFF; + param4[param5 + 1] = _loc7_ >>> 16 & 0xFF; + param4[param5 + 2] = _loc7_ >>> 8 & 0xFF; + param4[param5 + 3] = _loc7_ & 0xFF; + param4[param5 + 4] = _loc8_ >>> 24 & 0xFF; + param4[param5 + 5] = _loc8_ >>> 16 & 0xFF; + param4[param5 + 6] = _loc8_ >>> 8 & 0xFF; + param4[param5 + 7] = _loc8_ & 0xFF; + } + + public function toString() : String + { + return "des"; + } + + public function getBlockSize() : uint + { + return 8; + } + } +} + diff --git a/flash_decompiled/com/hurlant/crypto/symmetric/ISymmetricKey.as b/flash_decompiled/com/hurlant/crypto/symmetric/ISymmetricKey.as new file mode 100644 index 0000000..2dbb35a --- /dev/null +++ b/flash_decompiled/com/hurlant/crypto/symmetric/ISymmetricKey.as @@ -0,0 +1,19 @@ +package com.hurlant.crypto.symmetric +{ + import flash.utils.ByteArray; + + public interface ISymmetricKey + { + + function encrypt(param1:ByteArray, param2:uint = 0) : void; + + function dispose() : void; + + function getBlockSize() : uint; + + function toString() : String; + + function decrypt(param1:ByteArray, param2:uint = 0) : void; + } +} + diff --git a/flash_decompiled/com/hurlant/util/Memory.as b/flash_decompiled/com/hurlant/util/Memory.as new file mode 100644 index 0000000..95f66e9 --- /dev/null +++ b/flash_decompiled/com/hurlant/util/Memory.as @@ -0,0 +1,32 @@ +package com.hurlant.util +{ + import flash.net.LocalConnection; + import flash.system.System; + + public class Memory + { + + public function Memory() + { + super(); + } + + public static function gc() : void + { + try + { + new LocalConnection().connect("foo"); + new LocalConnection().connect("foo"); + } + catch(e:*) + { + } + } + + public static function get used() : uint + { + return System.totalMemory; + } + } +} + diff --git a/flash_decompiled/com/loader/CLoader.as b/flash_decompiled/com/loader/CLoader.as new file mode 100644 index 0000000..b98d42d --- /dev/null +++ b/flash_decompiled/com/loader/CLoader.as @@ -0,0 +1,118 @@ +package com.loader +{ + import flash.display.Loader; + import flash.events.ErrorEvent; + import flash.events.Event; + import flash.events.IOErrorEvent; + import flash.net.URLRequest; + import flash.system.LoaderContext; + + public class CLoader extends Loader + { + + private static var loader:Loader; + + private static var list:Array; + + private static var loading:Boolean = false; + + private static var count:int = 0; + + private var context:LoaderContext; + + private var has:Object = true; + + private var req:URLRequest; + + public function CLoader() + { + super(); + if(list == null) + { + list = new Array(); + } + } + + private function __onLoadError(param1:IOErrorEvent) : void + { + } + + override public function load(param1:URLRequest, param2:LoaderContext = null) : void + { + super.load(param1,param2); + } + + private function startLoad() : void + { + if(list.length == 0) + { + return; + } + if(count >= 3) + { + return; + } + var _loc1_:* = list.shift(); + if(_loc1_.has) + { + _loc1_.contentLoaderInfo.addEventListener(Event.COMPLETE,this.__loaded); + _loc1_.contentLoaderInfo.addEventListener(Event.UNLOAD,this.__unload,false,0,true); + _loc1_.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,this.__onLoadError,false,0,true); + _loc1_.contentLoaderInfo.addEventListener(ErrorEvent.ERROR,this.__onError); + _loc1_.load2(); + loading = true; + } + else + { + this.startLoad(); + } + } + + private function __onError(param1:IOErrorEvent) : void + { + this.removeListener(param1.currentTarget); + var _loc2_:* = count - 1; + count = _loc2_; + this.startLoad(); + } + + public function load2() : void + { + var _loc1_:* = count + 1; + count = _loc1_; + super.load(this.req,this.context); + } + + public function clear() : void + { + this.has = false; + } + + private function removeListener(param1:*) : void + { + param1.removeEventListener(Event.COMPLETE,this.__loaded); + param1.removeEventListener(IOErrorEvent.IO_ERROR,this.__onLoadError); + } + + private function __loaded(param1:Event) : void + { + this.removeListener(param1.currentTarget); + var _loc2_:* = count - 1; + count = _loc2_; + if(list.length > 0) + { + this.startLoad(); + } + else + { + loading = false; + } + } + + private function __unload(param1:Event) : void + { + this.removeListener(param1.currentTarget); + } + } +} + diff --git a/flash_decompiled/com/net/ChatConnect1.as b/flash_decompiled/com/net/ChatConnect1.as new file mode 100644 index 0000000..649d220 --- /dev/null +++ b/flash_decompiled/com/net/ChatConnect1.as @@ -0,0 +1,209 @@ +package com.net +{ + import com.net.event.ChatEvent; + import com.newdata.user.NewUserData; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.EventDispatcher; + import flash.events.IOErrorEvent; + import flash.events.ProgressEvent; + import flash.events.SecurityErrorEvent; + import flash.net.Socket; + import flash.utils.ByteArray; + import flash.utils.setTimeout; + + public class ChatConnect1 extends EventDispatcher + { + + private var socket:Socket; + + private var address:String; + + private var len:int; + + private var totalbytes:ByteArray; + + private var isRead:Boolean; + + private var reconnect:int; + + private var hasReConnect:Boolean; + + private var userId:int = 0; + + public function ChatConnect1() + { + super(); + this.totalbytes = new ByteArray(); + } + + public function connect(param1:String, param2:int) : void + { + var _address:String = param1; + var port:int = param2; + try + { + this.address = _address; + this.socket = new Socket(); + this.socket.connect(this.address,7898); + this.socket.addEventListener(Event.CONNECT,this.onConnect); + this.socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onSecurity); + this.socket.addEventListener(IOErrorEvent.IO_ERROR,this.onIOError); + this.socket.addEventListener(ProgressEvent.SOCKET_DATA,this.onSocketData); + this.socket.addEventListener(Event.CLOSE,this.onClose); + } + catch(er:Error) + { + MessageBoxUI.getInstance().addMessage("没能连接成功"); + } + } + + private function onSocketData(param1:ProgressEvent) : void + { + var _loc2_:String = null; + if(Boolean(this.socket) && this.socket.bytesAvailable > 0) + { + _loc2_ = this.socket.readMultiByte(this.socket.bytesAvailable,"GBK"); + this.printMsg(_loc2_); + } + } + + private function onConnect(param1:Event) : void + { + this.hasReConnect = true; + dispatchEvent(new ChatEvent(ChatEvent.CONN_SUCCESS)); + if(this.reconnect > 0) + { + this.reconnect = 0; + this.login(); + } + } + + private function onSecurity(param1:SecurityErrorEvent) : void + { + if(NewUserData.getUser() == null) + { + MessageBoxUI.getInstance().addMessage("安全沙箱问题"); + } + } + + private function onIOError(param1:IOErrorEvent) : void + { + var event:IOErrorEvent = param1; + if(this.reconnect >= 10) + { + MessageBoxUI.getInstance().reLogin("你已断开连接,请重新登录游戏"); + return; + } + if(this.reconnect == 0) + { + dispatchEvent(new ChatEvent(ChatEvent.CONN_ERROR)); + MessageBoxUI.getInstance().addMessage("连接异常,请检查地址、端口号,或者服务器是否开启"); + } + else + { + setTimeout(function():void + { + reconnectSer(); + },5000); + } + } + + private function onClose(param1:Event) : void + { + if(this.socket.connected) + { + this.socket.close(); + } + this.socket.removeEventListener(Event.CONNECT,this.onConnect); + this.socket.removeEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onSecurity); + this.socket.removeEventListener(IOErrorEvent.IO_ERROR,this.onIOError); + this.socket.removeEventListener(ProgressEvent.SOCKET_DATA,this.onSocketData); + this.socket.removeEventListener(Event.CLOSE,this.onClose); + this.socket = null; + if(this.reconnect < 10) + { + this.reconnectSer(); + return; + } + } + + public function reconnectSer() : void + { + this.hasReConnect = true; + ++this.reconnect; + try + { + this.socket = new Socket(); + this.socket.connect(this.address,7898); + this.socket.addEventListener(Event.CONNECT,this.onConnect); + this.socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR,this.onSecurity); + this.socket.addEventListener(IOErrorEvent.IO_ERROR,this.onIOError); + this.socket.addEventListener(ProgressEvent.SOCKET_DATA,this.onSocketData); + this.socket.addEventListener(Event.CLOSE,this.onClose); + } + catch(er:Error) + { + } + } + + public function close() : void + { + if(this.socket.connected) + { + this.socket.close(); + } + this.socket = null; + } + + private function printMsg(param1:String) : void + { + var _loc4_:String = null; + var _loc5_:Array = null; + var _loc6_:int = 0; + var _loc7_:String = null; + var _loc8_:ChatEvent = null; + if(param1 == null || param1 == "") + { + return; + } + var _loc2_:Array = param1.split("\r\n"); + var _loc3_:int = 0; + while(_loc3_ < _loc2_.length) + { + _loc4_ = _loc2_[_loc3_]; + if(_loc4_ != "" && _loc4_ != null && _loc4_.length > 0) + { + _loc5_ = _loc4_.split("##"); + _loc6_ = _loc5_[0].length + 2 + _loc5_[1].length + 2; + _loc7_ = _loc4_.substring(_loc6_); + _loc8_ = new ChatEvent(ChatEvent.MESSAGE); + _loc8_.messId = int(_loc5_[0]); + _loc8_.mess = _loc7_; + dispatchEvent(_loc8_); + } + _loc3_++; + } + } + + public function login() : void + { + if(this.userId == 0) + { + this.userId = NewUserData.getAccount().userId; + } + var _loc1_:String = ChatType.type_7 + "##" + this.userId + "##login\r\n"; + this.socket.writeUTFBytes(_loc1_ + "\n"); + this.socket.flush(); + } + + private function heartConnect() : void + { + } + + public function sendHeartConnect() : void + { + } + } +} + diff --git a/flash_decompiled/com/net/ChatType.as b/flash_decompiled/com/net/ChatType.as new file mode 100644 index 0000000..a8e4e17 --- /dev/null +++ b/flash_decompiled/com/net/ChatType.as @@ -0,0 +1,52 @@ +package com.net +{ + public class ChatType + { + + public static const type_1:int = 1; + + public static const type_2:int = 2; + + public static const type_3:int = 3; + + public static const type_4:int = 4; + + public static const type_5:int = 5; + + public static const type_6:int = 6; + + public static const type_7:int = 7; + + public static const type_8:int = 8; + + public static const type_9:int = 9; + + public static const type_10:int = 10; + + public static const type_11:int = 11; + + public static const type_12:int = 12; + + public static const type_13:int = 13; + + public static const type_14:int = 14; + + public static const type_15:int = 15; + + public static const type_16:int = 16; + + public static const type_17:int = 17; + + public static const type_20:int = 20; + + public static const type_21:int = 21; + + public static const type_22:int = 22; + + public function ChatType() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/net/event/ChatEvent.as b/flash_decompiled/com/net/event/ChatEvent.as new file mode 100644 index 0000000..5ff0ab0 --- /dev/null +++ b/flash_decompiled/com/net/event/ChatEvent.as @@ -0,0 +1,24 @@ +package com.net.event +{ + import flash.events.Event; + + public class ChatEvent extends Event + { + + public static const CONN_SUCCESS:String = "connect_ok"; + + public static const CONN_ERROR:String = "connect_err"; + + public static const MESSAGE:String = "message"; + + public var messId:int; + + public var mess:String; + + public function ChatEvent(param1:String) + { + super(param1); + } + } +} + diff --git a/flash_decompiled/com/newdata/activity/ActivityData.as b/flash_decompiled/com/newdata/activity/ActivityData.as new file mode 100644 index 0000000..b9244a9 --- /dev/null +++ b/flash_decompiled/com/newdata/activity/ActivityData.as @@ -0,0 +1,66 @@ +package com.newdata.activity +{ + import com.events.DevEvent; + import com.utils.Utils; + + public class ActivityData + { + + private static var yabiaoData:YabiaoData; + + private static var worldBossData:WorldBossData; + + public function ActivityData() + { + super(); + } + + public static function setYabiaoData(param1:Object) : void + { + yabiaoData = new YabiaoData(param1); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_YABIAO_ENTER)); + } + + public static function getYabiaoData() : YabiaoData + { + return yabiaoData; + } + + public static function setWorldBossData(param1:Object) : void + { + worldBossData = new WorldBossData(param1); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_WORLDBOSS_ENTER)); + } + + public static function getWorldBossData() : WorldBossData + { + return worldBossData; + } + + public static function hasGetDailyItem() : void + { + worldBossData.getdaily = 1; + } + + public static function hasGetRankItem() : void + { + worldBossData.rankId = 1; + } + + public static function hasGetFinalItem() : void + { + worldBossData.isFinal = 1; + } + + public static function setFightLevel(param1:int) : void + { + worldBossData.fightLevel = param1; + } + + public static function setXunbao() : void + { + worldBossData.xunbao = 1; + } + } +} + diff --git a/flash_decompiled/com/newdata/activity/WorldBossData.as b/flash_decompiled/com/newdata/activity/WorldBossData.as new file mode 100644 index 0000000..705dd4b --- /dev/null +++ b/flash_decompiled/com/newdata/activity/WorldBossData.as @@ -0,0 +1,57 @@ +package com.newdata.activity +{ + public class WorldBossData + { + + public var userId:int; + + public var times:int; + + public var damage:int; + + public var isFinal:int; + + public var heroids:Array; + + public var power:int; + + public var getdaily:int; + + public var bossblood:Number; + + public var currblood:Number; + + public var fightLevel:int; + + public var rankId:int; + + public var finalUserId:int; + + public var finalUserName:String; + + public var xunbao:int; + + public function WorldBossData(param1:Object) + { + super(); + this.userId = param1.userId; + this.times = param1.times; + this.damage = param1.damage; + this.isFinal = param1.isFinal; + this.heroids = param1.heroids; + this.bossblood = param1.bossblood; + this.currblood = param1.currblood; + if(this.currblood < 0) + { + this.currblood = 0; + } + this.getdaily = param1.getdaily; + this.rankId = param1.rankId; + this.fightLevel = param1.fightLevel; + this.finalUserId = param1.finalUserId; + this.finalUserName = param1.finalUserName; + this.xunbao = param1.xunbao; + } + } +} + diff --git a/flash_decompiled/com/newdata/activity/YabiaoData.as b/flash_decompiled/com/newdata/activity/YabiaoData.as new file mode 100644 index 0000000..5455425 --- /dev/null +++ b/flash_decompiled/com/newdata/activity/YabiaoData.as @@ -0,0 +1,41 @@ +package com.newdata.activity +{ + public class YabiaoData + { + + public var userId:int; + + public var type:int; + + public var startTime:String; + + public var endTime:String; + + public var leftTimes:int; + + public var robTimes:int; + + public var robUserId1:int; + + public var robUserId2:int; + + public var status:int; + + public var heroids:Array; + + public var power:Number = 0; + + public function YabiaoData(param1:Object) + { + super(); + this.userId = param1.userId; + this.type = param1.type; + this.leftTimes = param1.leftTimes; + this.robTimes = param1.robTimes; + this.status = param1.status; + this.userId = param1.userId; + this.heroids = param1.heroids; + } + } +} + diff --git a/flash_decompiled/com/newdata/hero/NewCareer.as b/flash_decompiled/com/newdata/hero/NewCareer.as new file mode 100644 index 0000000..8dd3fa5 --- /dev/null +++ b/flash_decompiled/com/newdata/hero/NewCareer.as @@ -0,0 +1,76 @@ +package com.newdata.hero +{ + public class NewCareer + { + + private var _careerId:int; + + private var _careerName:String; + + private var _careerEntName:String; + + private var _buBing:Number; + + private var _gongBing:Number; + + private var _cheBing:Number; + + private var _qiBing:Number; + + private var _qiXie:Number; + + public function NewCareer(param1:Object) + { + super(); + this._careerId = param1.careerId; + this._careerName = param1.careerName; + this._careerEntName = param1.careerEntName; + this._buBing = param1.buBing; + this._gongBing = param1.gongBing; + this._cheBing = param1.cheBing; + this._qiBing = param1.qiBing; + this._qiXie = param1.qiXie; + } + + public function get careerId() : int + { + return this._careerId; + } + + public function get careerName() : String + { + return this._careerName; + } + + public function get careerEntName() : String + { + return this._careerEntName; + } + + public function get buBing() : Number + { + return this._buBing; + } + + public function get gongBing() : Number + { + return this._gongBing; + } + + public function get qiXie() : Number + { + return this._qiXie; + } + + public function get qiBing() : Number + { + return this._qiBing; + } + + public function get cheBing() : Number + { + return this._cheBing; + } + } +} + diff --git a/flash_decompiled/com/newdata/hero/NewCopyHero.as b/flash_decompiled/com/newdata/hero/NewCopyHero.as new file mode 100644 index 0000000..c3b36f2 --- /dev/null +++ b/flash_decompiled/com/newdata/hero/NewCopyHero.as @@ -0,0 +1,42 @@ +package com.newdata.hero +{ + public class NewCopyHero + { + + public var heroId:int; + + public var showName:String; + + public var hpColor:String; + + public var hpStatusView:String; + + public var armyName:String; + + public var level:int; + + public var changeCount:int; + + public var armyNum:int; + + public var picPath:String; + + public var power:Number; + + public function NewCopyHero(param1:Object) + { + super(); + this.heroId = param1.heroId; + this.showName = param1.showName; + this.hpColor = param1.hpColor; + this.hpStatusView = param1.hpStatusView; + this.armyName = param1.armyName; + this.level = param1.level; + this.changeCount = param1.changeCount; + this.armyNum = param1.armyNum; + this.picPath = param1.picPath; + this.power = param1.power; + } + } +} + diff --git a/flash_decompiled/com/newdata/hero/NewHero.as b/flash_decompiled/com/newdata/hero/NewHero.as new file mode 100644 index 0000000..1359be1 --- /dev/null +++ b/flash_decompiled/com/newdata/hero/NewHero.as @@ -0,0 +1,260 @@ +package com.newdata.hero +{ + import com.utils.Utils; + + public class NewHero + { + + public var heroId:int; + + public var name:String; + + public var showName:String; + + public var hpColor:String; + + public var hpStatus:int; + + public var hpStatusView:String; + + public var level:int; + + public var viewAtk:Number; + + public var viewDef:Number; + + public var viewAgl:Number; + + public var viewHp:Number; + + public var careerName:String; + + public var actionStatusChn:String; + + public var picPath:String; + + public var careerId:int; + + public var merit:int; + + public var upCount:Number; + + public var changeCount:int; + + public var exp:int; + + public var needExp:int; + + public var armyNum:int; + + public var govPotzName:String; + + public var armyName:String; + + public var careerEntName:String; + + public var lead:int; + + public var finalLead:int; + + public var atk:int; + + public var finalAtk:Number; + + public var def:int; + + public var finalDef:Number; + + public var hp:int; + + public var finalHp:Number; + + public var agl:int; + + public var finalAgl:Number; + + public var chartr:String; + + public var fightPower:Number; + + public var combatPower:Number; + + public var career:NewCareer; + + public var nextcareer:NewCareer; + + public var fightSkill1:uint; + + public var fightSkill2:uint; + + public var fightSkill3:uint; + + public var equ1:int; + + public var equ2:int; + + public var equ3:int; + + public var equ4:int; + + public var equ5:int; + + public var equ6:int; + + public var equ7:int; + + public var equ8:int; + + public var chaofu1:int; + + public var chaofu2:int; + + public var chaofu3:int; + + public var chaofu4:int; + + public var chaofu5:int; + + public var chaofu6:int; + + public var addAtk:int; + + public var addDef:int; + + public var addAgl:int; + + public var addHp:int; + + public var leftPoint:int; + + public var maxLevel:int; + + public var fen1:int; + + public var fen2:int; + + public var fen3:int; + + public var fen4:int; + + public var studyFen1:int; + + public var studyFen2:int; + + public var studyFen3:int; + + public var studyFen4:int; + + public var gen:int; + + public var tianfuLevel1:int; + + public var tianfuLevel2:int; + + public var tianfuLevel3:int; + + public var tianfuLevel4:int; + + public var tianfuLevel5:int; + + public var jianghunLevel1:int; + + public var jianghunLevel2:int; + + public var jianghunLevel3:int; + + public var jianghunLevel4:int; + + public var strPro1:String; + + public function NewHero(param1:Object) + { + super(); + this.heroId = int(param1.heroId); + this.name = param1.name; + this.showName = param1.showName; + this.hpColor = param1.hpColor; + this.hpStatus = param1.hpStatus; + this.hpStatusView = param1.hpStatusView; + this.level = param1.level; + this.viewAtk = Utils.getNumFun(param1.viewAtk,0); + this.viewDef = Utils.getNumFun(param1.viewDef,0); + this.viewAgl = Utils.getNumFun(param1.viewAgl,0); + this.viewHp = Utils.getNumFun(param1.viewHp,0); + this.careerName = param1.careerName; + this.actionStatusChn = param1.actionStatusChn; + this.picPath = param1.picPath; + this.careerId = param1.careerId; + this.gen = param1.gen; + this.merit = param1.merit; + this.upCount = param1.upCount; + this.changeCount = param1.changeCount; + this.exp = param1.exp; + this.needExp = param1.needExp; + this.armyNum = param1.armyNum; + this.govPotzName = param1.govPotzName; + this.armyName = param1.armyName; + this.careerEntName = param1.careerEntName; + this.lead = param1.lead; + this.finalLead = param1.finalLead; + this.hp = param1.hp; + this.finalHp = Utils.getNumFun(param1.finalHp,0); + this.atk = param1.atk; + this.finalAtk = Utils.getNumFun(param1.finalAtk,0); + this.def = param1.def; + this.finalDef = Utils.getNumFun(param1.finalDef,0); + this.agl = param1.agl; + this.finalAgl = Utils.getNumFun(param1.finalAgl,0); + this.chartr = param1.chartr; + this.fightPower = param1.fightPower; + this.combatPower = Utils.getNumFun(param1.combatPower,0); + this.career = new NewCareer(param1.career); + if(param1.nextcareer) + { + this.nextcareer = new NewCareer(param1.nextcareer); + } + this.fightSkill1 = param1.fightskill1; + this.fightSkill2 = param1.fightskill2; + this.fightSkill3 = param1.fightskill3; + this.equ1 = param1.equ1; + this.equ2 = param1.equ2; + this.equ3 = param1.equ3; + this.equ4 = param1.equ4; + this.equ5 = param1.equ5; + this.equ6 = param1.equ6; + this.equ7 = param1.equ7; + this.equ8 = param1.equ8; + this.chaofu1 = param1.chaofu1; + this.chaofu2 = param1.chaofu2; + this.chaofu3 = param1.chaofu3; + this.chaofu4 = param1.chaofu4; + this.chaofu5 = param1.chaofu5; + this.chaofu6 = param1.chaofu6; + this.addAtk = param1.addAtk; + this.addDef = param1.addDef; + this.addAgl = param1.addAgl; + this.addHp = param1.addHp; + this.leftPoint = param1.leftPoint; + this.maxLevel = param1.maxLevel; + this.fen1 = param1.fen1; + this.fen2 = param1.fen2; + this.fen3 = param1.fen3; + this.fen4 = param1.fen4; + this.studyFen1 = param1.studyFen1; + this.studyFen2 = param1.studyFen2; + this.studyFen3 = param1.studyFen3; + this.studyFen4 = param1.studyFen4; + this.tianfuLevel1 = param1.tianfuLevel1; + this.tianfuLevel2 = param1.tianfuLevel2; + this.tianfuLevel3 = param1.tianfuLevel3; + this.tianfuLevel4 = param1.tianfuLevel4; + this.tianfuLevel5 = param1.tianfuLevel5; + this.jianghunLevel1 = param1.jianghunLevel1; + this.jianghunLevel2 = param1.jianghunLevel2; + this.jianghunLevel3 = param1.jianghunLevel3; + this.jianghunLevel4 = param1.jianghunLevel4; + this.strPro1 = "武将:" + param1.name + " 攻击属性组成:
" + param1.strPro1; + } + } +} + diff --git a/flash_decompiled/com/newdata/hero/NewHeroData.as b/flash_decompiled/com/newdata/hero/NewHeroData.as new file mode 100644 index 0000000..290fd29 --- /dev/null +++ b/flash_decompiled/com/newdata/hero/NewHeroData.as @@ -0,0 +1,314 @@ +package com.newdata.hero +{ + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.ui.hero.data.HeroJiangHun; + + public class NewHeroData + { + + private static var heroList:Vector. = new Vector.(); + + private static var copyHeroList:Vector. = new Vector.(); + + private static var needGetHeroList:Boolean = true; + + private static var needGetCopyHeroList:Boolean = true; + + private static var jiangHunList:Vector. = new Vector.(); + + private static var jiangHunObj:Object = new Object(); + + private static var jiangHunList1:Vector. = new Vector.(); + + public function NewHeroData() + { + super(); + } + + public static function setGetHeroListStatus() : void + { + needGetHeroList = true; + } + + private static function getAllHeroListFromSer() : void + { + if(needGetHeroList) + { + needGetHeroList = false; + ConnectService.getInstance().heroService.getHeroListByCasId(); + } + } + + public static function setHero(param1:NewHero) : void + { + var _loc3_:* = undefined; + var _loc2_:int = -1; + for(_loc3_ in heroList) + { + if(heroList[_loc3_].heroId == param1.heroId) + { + _loc2_ = _loc3_; + break; + } + } + if(_loc2_ != -1) + { + heroList[_loc3_] = param1; + } + else + { + heroList.push(param1); + } + var _loc4_:DevEvent = new DevEvent(DevEvent.DATA_HERO_GETHEROBYID); + _loc4_.id = param1.heroId; + Utils.g_events.dispatchEvent(_loc4_); + } + + public static function setAllHeroList(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:NewHero = null; + needGetHeroList = false; + if(param1 == null || param1.length == 0) + { + heroList = new Vector.(); + } + heroList.splice(0,heroList.length); + for each(_loc2_ in param1) + { + _loc3_ = new NewHero(_loc2_); + heroList.push(_loc3_); + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.DATA_HERO_GETALLHEROLIST)); + } + + public static function getHeroByTid(param1:int) : NewHero + { + var _loc2_:NewHero = null; + for each(_loc2_ in heroList) + { + if(_loc2_.equ1 == param1 || _loc2_.equ2 == param1 || _loc2_.equ3 == param1 || _loc2_.equ4 == param1 || _loc2_.equ5 == param1 || _loc2_.equ6 == param1 || _loc2_.equ7 == param1 || _loc2_.equ8 == param1) + { + return _loc2_; + } + } + return null; + } + + public static function getHeroByHeroId(param1:int) : NewHero + { + var _loc2_:NewHero = null; + getAllHeroListFromSer(); + for each(_loc2_ in heroList) + { + if(_loc2_.heroId == param1) + { + return _loc2_; + } + } + return null; + } + + public static function getAllHeroList() : Vector. + { + getAllHeroListFromSer(); + return heroList; + } + + public static function delHeroById(param1:int) : void + { + var _loc2_:* = int(heroList.length - 1); + while(_loc2_ >= 0) + { + if(heroList[_loc2_].heroId == param1) + { + heroList.splice(_loc2_,1); + break; + } + _loc2_--; + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.DATA_HERO_GETALLHEROLIST)); + } + + public static function setAllCopyHeroList(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:NewCopyHero = null; + if(param1 == null || param1.length == 0) + { + copyHeroList = new Vector.(); + } + copyHeroList.splice(0,copyHeroList.length); + for each(_loc2_ in param1) + { + _loc3_ = new NewCopyHero(_loc2_); + copyHeroList.push(_loc3_); + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.DATA_COPYHERO_GETALL)); + } + + public static function getCopyHeroById(param1:int) : NewCopyHero + { + var _loc2_:NewCopyHero = null; + for each(_loc2_ in copyHeroList) + { + if(_loc2_.heroId == param1) + { + return _loc2_; + } + } + return null; + } + + public static function getAllCopyHeroList() : Vector. + { + if(needGetCopyHeroList) + { + getAllCopyHeroListFromSer(); + return new Vector.(); + } + return copyHeroList; + } + + private static function getAllCopyHeroListFromSer() : void + { + if(needGetCopyHeroList) + { + needGetCopyHeroList = false; + ConnectService.getInstance().heroService.getAllCopyHeroList(); + } + } + + public static function setJiangHunList1(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:HeroJiangHun = null; + jiangHunList1 = new Vector.(); + if(param1 != null || param1.length > 0) + { + for each(_loc2_ in param1) + { + _loc3_ = new HeroJiangHun(_loc2_); + jiangHunList1.push(_loc3_); + } + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.DATA_JIANGHUN_LIST)); + } + + public static function setJiangHunList(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:HeroJiangHun = null; + jiangHunList = new Vector.(); + if(param1 != null || param1.length > 0) + { + for each(_loc2_ in param1) + { + _loc3_ = new HeroJiangHun(_loc2_); + jiangHunList.push(_loc3_); + } + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.DATA_JIANGHUN_LIST)); + } + + public static function setJiangHunObj(param1:Object) : void + { + jiangHunObj = param1; + } + + public static function getJiangHunObj() : Object + { + return jiangHunObj; + } + + public static function getJiangHunList() : Vector. + { + return jiangHunList; + } + + public static function getJiangHunList1() : Vector. + { + return jiangHunList1; + } + + public static function delJiangHun1(param1:int) : void + { + if(jiangHunList1.length == 0) + { + return; + } + var _loc2_:* = int(jiangHunList1.length - 1); + while(_loc2_ >= 0) + { + if(jiangHunList1[_loc2_].id == param1) + { + jiangHunList1.splice(_loc2_,1); + break; + } + _loc2_--; + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.DATA_JIANGHUN_LIST)); + } + + public static function setJiangHun(param1:HeroJiangHun) : void + { + if(jiangHunList.length == 0) + { + jiangHunList.push(param1); + return; + } + var _loc2_:int = 0; + while(_loc2_ < jiangHunList.length) + { + if(jiangHunList[_loc2_].id == param1.id) + { + jiangHunList[_loc2_] = param1; + break; + } + _loc2_++; + } + var _loc3_:DevEvent = new DevEvent(DevEvent.DATA_JIANGHUN_UPDATE); + _loc3_.obj = param1; + Utils.g_events.dispatchEvent(_loc3_); + } + + public static function delJiangHun(param1:int) : void + { + if(jiangHunList.length == 0) + { + return; + } + var _loc2_:* = int(jiangHunList.length - 1); + while(_loc2_ >= 0) + { + if(jiangHunList[_loc2_].id == param1) + { + jiangHunList.splice(_loc2_,1); + break; + } + _loc2_--; + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.DATA_JIANGHUN_LIST)); + } + + public static function getJiangHunByHeroAndType(param1:int, param2:int) : HeroJiangHun + { + var _loc3_:HeroJiangHun = null; + if(jiangHunList.length == 0) + { + return null; + } + for each(_loc3_ in jiangHunList) + { + if(_loc3_.heroId == param1 && _loc3_.type == param2) + { + return _loc3_; + } + } + return null; + } + } +} + diff --git a/flash_decompiled/com/newdata/pack/NewItem.as b/flash_decompiled/com/newdata/pack/NewItem.as new file mode 100644 index 0000000..c181200 --- /dev/null +++ b/flash_decompiled/com/newdata/pack/NewItem.as @@ -0,0 +1,89 @@ +package com.newdata.pack +{ + public class NewItem + { + + private var _itemId:int; + + private var _itemType:int; + + private var _itemCount:int; + + private var _equip:int; + + private var _throwAble:int; + + private var _childType:int; + + private var _equipStrongerId:int; + + private var _itemName:String; + + private var _itemDesc:String; + + private var _iconPath:String; + + private var _showName:String; + + public function NewItem(param1:Object) + { + super(); + } + + public function get itemId() : int + { + return this._itemId; + } + + public function get itemType() : int + { + return this._itemType; + } + + public function get itemCount() : int + { + return this._itemCount; + } + + public function get equip() : int + { + return this._equip; + } + + public function get throwAble() : int + { + return this._throwAble; + } + + public function get iconPath() : String + { + return this._iconPath; + } + + public function get childType() : int + { + return this._childType; + } + + public function get itemName() : String + { + return this._itemName; + } + + public function get showName() : String + { + return this._showName; + } + + public function get itemDesc() : String + { + return this._itemDesc; + } + + public function get equipStrongerId() : int + { + return this._equipStrongerId; + } + } +} + diff --git a/flash_decompiled/com/newdata/pack/NewPackData.as b/flash_decompiled/com/newdata/pack/NewPackData.as new file mode 100644 index 0000000..316815c --- /dev/null +++ b/flash_decompiled/com/newdata/pack/NewPackData.as @@ -0,0 +1,38 @@ +package com.newdata.pack +{ + public class NewPackData + { + + private static var _packList:Vector. = new Vector.(); + + public function NewPackData() + { + super(); + } + + public static function getItemNumsByItemId(param1:int) : int + { + var _loc3_:NewItem = null; + var _loc2_:int = 0; + for each(_loc3_ in _packList) + { + if(_loc3_.itemId == param1) + { + _loc2_ += _loc3_.itemCount; + } + } + return _loc2_; + } + + public static function get packList() : Vector. + { + return _packList; + } + + public static function set packList(param1:Vector.) : void + { + _packList = param1; + } + } +} + diff --git a/flash_decompiled/com/newdata/skill/StudySkill.as b/flash_decompiled/com/newdata/skill/StudySkill.as new file mode 100644 index 0000000..34d018d --- /dev/null +++ b/flash_decompiled/com/newdata/skill/StudySkill.as @@ -0,0 +1,18 @@ +package com.newdata.skill +{ + public class StudySkill + { + + public var heroId:int; + + public var skillId:int; + + public function StudySkill(param1:Object) + { + super(); + this.heroId = param1.heroId; + this.skillId = param1.skillId; + } + } +} + diff --git a/flash_decompiled/com/newdata/user/NewAccount.as b/flash_decompiled/com/newdata/user/NewAccount.as new file mode 100644 index 0000000..b758483 --- /dev/null +++ b/flash_decompiled/com/newdata/user/NewAccount.as @@ -0,0 +1,39 @@ +package com.newdata.user +{ + public class NewAccount + { + + public var accId:uint; + + public var accName:String; + + public var status:uint; + + public var statusDesc:String; + + public var point:uint; + + public var bakPoint:uint; + + public var countPoint:uint; + + public var userId:uint; + + public var hestatus:int; + + public function NewAccount(param1:Object) + { + super(); + this.accId = param1.accId; + this.accName = param1.accName; + this.status = param1.status; + this.statusDesc = param1.statusDesc; + this.point = param1.point; + this.bakPoint = param1.bakPoint; + this.countPoint = param1.countPoint; + this.userId = param1.userId; + this.hestatus = param1.hestatus; + } + } +} + diff --git a/flash_decompiled/com/newdata/user/NewGuild.as b/flash_decompiled/com/newdata/user/NewGuild.as new file mode 100644 index 0000000..93cbf6d --- /dev/null +++ b/flash_decompiled/com/newdata/user/NewGuild.as @@ -0,0 +1,21 @@ +package com.newdata.user +{ + public class NewGuild + { + + public var name:String; + + public var guildId:uint; + + public var flag:String; + + public function NewGuild(param1:Object) + { + super(); + this.name = param1.name; + this.guildId = param1.guildId; + this.flag = param1.flag; + } + } +} + diff --git a/flash_decompiled/com/newdata/user/NewPop.as b/flash_decompiled/com/newdata/user/NewPop.as new file mode 100644 index 0000000..6c17c75 --- /dev/null +++ b/flash_decompiled/com/newdata/user/NewPop.as @@ -0,0 +1,46 @@ +package com.newdata.user +{ + public class NewPop + { + + public var foodPop:uint; + + public var popCeil:uint; + + public var idlePop:uint; + + public var currPop:uint; + + public var popTrend:String; + + public var moneyAddSpeed:uint; + + public function NewPop(param1:Object) + { + super(); + this.foodPop = param1.foodPop; + this.popCeil = param1.popCeil; + this.idlePop = param1.idlePop; + this.currPop = param1.currPop; + this.popTrend = param1.popTrend; + this.moneyAddSpeed = param1.moneyAddSpeed; + } + + public function getMoneySpeed() : String + { + var _loc1_:int = 0; + if(this.moneyAddSpeed > 100000000) + { + _loc1_ = this.moneyAddSpeed / 100000000; + return _loc1_ + "亿"; + } + if(this.moneyAddSpeed > 100000) + { + _loc1_ = this.moneyAddSpeed / 10000; + return _loc1_ + "万"; + } + return this.moneyAddSpeed.toString(); + } + } +} + diff --git a/flash_decompiled/com/newdata/user/NewRes.as b/flash_decompiled/com/newdata/user/NewRes.as new file mode 100644 index 0000000..44c51bc --- /dev/null +++ b/flash_decompiled/com/newdata/user/NewRes.as @@ -0,0 +1,39 @@ +package com.newdata.user +{ + public class NewRes + { + + public var foodNum:uint; + + public var woodNum:uint; + + public var stoneNum:uint; + + public var bronzeNum:uint; + + public var ironNum:uint; + + public var moneyNum:uint; + + public var cashNum:uint; + + public var changeExpNum:uint; + + public var wareCapacity:uint; + + public function NewRes(param1:Object) + { + super(); + this.foodNum = param1.foodNum; + this.woodNum = param1.woodNum; + this.stoneNum = param1.stoneNum; + this.bronzeNum = param1.bronzeNum; + this.ironNum = param1.ironNum; + this.moneyNum = param1.moneyNum; + this.cashNum = param1.cashNum; + this.changeExpNum = param1.changeExpNum; + this.wareCapacity = param1.wareCapacity; + } + } +} + diff --git a/flash_decompiled/com/newdata/user/NewUser.as b/flash_decompiled/com/newdata/user/NewUser.as new file mode 100644 index 0000000..73e8500 --- /dev/null +++ b/flash_decompiled/com/newdata/user/NewUser.as @@ -0,0 +1,75 @@ +package com.newdata.user +{ + public class NewUser + { + + public var userId:int; + + public var cash:Number; + + public var paypoint:Number; + + public var rankId:int; + + public var icon:String; + + public var countryId:int; + + public var userName:String; + + public var nextLvHonor:int; + + public var honor:uint; + + public var viplevel:uint; + + public var govId:uint; + + public var leaveActPoint:uint; + + public var expPoint:uint; + + public var expLimit:uint; + + public var prestige:uint; + + public var junGong:uint; + + public var sex:uint; + + public var vippoint:uint; + + public var honorNum:uint; + + public var honorMissNum:int; + + public var coinPoint:int; + + public function NewUser(param1:Object) + { + super(); + this.userId = param1.userId; + this.cash = param1.cash; + this.paypoint = param1.paypoint; + this.rankId = param1.rankId; + this.icon = param1.icon; + this.countryId = param1.countryId; + this.userName = param1.userName; + this.nextLvHonor = param1.nextLvHonor; + this.honor = param1.honor; + this.viplevel = param1.viplevel; + this.govId = param1.govId; + this.leaveActPoint = param1.leaveActPoint; + this.expPoint = param1.expPoint; + this.expLimit = param1.expLimit; + this.prestige = param1.prestige; + this.junGong = param1.junGong; + this.sex = param1.sex; + this.vippoint = param1.vippoint; + this.honorNum = param1.honorNum; + this.honorMissNum = param1.honorMissNum; + this.coinPoint = param1.coinPoint; + } + } +} + diff --git a/flash_decompiled/com/newdata/user/NewUserData.as b/flash_decompiled/com/newdata/user/NewUserData.as new file mode 100644 index 0000000..ae61e19 --- /dev/null +++ b/flash_decompiled/com/newdata/user/NewUserData.as @@ -0,0 +1,126 @@ +package com.newdata.user +{ + import com.events.DevEvent; + import com.utils.Utils; + + public class NewUserData + { + + private static var newUser:NewUser; + + private static var newGuild:NewGuild; + + private static var newAccount:NewAccount; + + private static var newRes:NewRes; + + private static var newPop:NewPop; + + public function NewUserData() + { + super(); + } + + public static function setNewPop(param1:NewPop) : void + { + newPop = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.POPCHANGE)); + } + + public static function getNewPop() : NewPop + { + return newPop; + } + + public static function setRes(param1:NewRes) : void + { + newRes = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.RESCHANGE)); + } + + public static function getRes() : NewRes + { + return newRes; + } + + public static function setAccount(param1:NewAccount) : void + { + newAccount = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.ACCOUNTCHANGE)); + } + + public static function getAccount() : NewAccount + { + return newAccount; + } + + public static function setNewGuild(param1:NewGuild) : void + { + newGuild = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.GUILDCHANGE)); + } + + public static function getNewGuild() : NewGuild + { + return newGuild; + } + + public static function setUser(param1:NewUser) : void + { + newUser = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.USERCHANGE)); + } + + public static function getUser() : NewUser + { + return newUser; + } + + public static function getCash() : String + { + var _loc1_:int = 0; + if(newUser.cash > 100000000) + { + _loc1_ = newUser.cash / 100000000; + return _loc1_ + "亿"; + } + if(newUser.cash > 100000) + { + _loc1_ = newUser.cash / 10000; + return _loc1_ + "万"; + } + return newUser.cash.toString(); + } + + public static function getPayPoint() : String + { + var _loc1_:int = 0; + if(newUser.paypoint > 100000000) + { + _loc1_ = newUser.paypoint / 100000000; + return _loc1_ + "亿"; + } + if(newUser.paypoint > 100000) + { + _loc1_ = newUser.paypoint / 10000; + return _loc1_ + "万"; + } + return newUser.paypoint.toString(); + } + + public static function useHonorMission() : void + { + newUser.honorNum += 1; + } + + public static function getHonorMissionNum() : int + { + if(newUser.viplevel > 3) + { + return newUser.honorMissNum - newUser.honorNum + 2; + } + return newUser.honorMissNum - newUser.honorNum; + } + } +} + diff --git a/flash_decompiled/com/utils/Base64.as b/flash_decompiled/com/utils/Base64.as new file mode 100644 index 0000000..fa5be84 --- /dev/null +++ b/flash_decompiled/com/utils/Base64.as @@ -0,0 +1,109 @@ +package com.utils +{ + import flash.utils.ByteArray; + + public class Base64 + { + + private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + + public static const version:String = "1.0.0"; + + public function Base64() + { + super(); + throw new Error("Base64 class is static container only"); + } + + public static function encode(param1:String) : String + { + var _loc2_:ByteArray = new ByteArray(); + _loc2_.writeUTFBytes(param1); + return encodeByteArray(_loc2_); + } + + public static function encodeByteArray(param1:ByteArray) : String + { + var _loc3_:Array = null; + var _loc5_:uint = 0; + var _loc6_:uint = 0; + var _loc7_:uint = 0; + var _loc2_:String = ""; + var _loc4_:Array = new Array(4); + param1.position = 0; + while(param1.bytesAvailable > 0) + { + _loc3_ = new Array(); + _loc5_ = 0; + while(_loc5_ < 3 && param1.bytesAvailable > 0) + { + _loc3_[_loc5_] = param1.readUnsignedByte(); + _loc5_++; + } + _loc4_[0] = (_loc3_[0] & 0xFC) >> 2; + _loc4_[1] = (_loc3_[0] & 3) << 4 | _loc3_[1] >> 4; + _loc4_[2] = (_loc3_[1] & 0x0F) << 2 | _loc3_[2] >> 6; + _loc4_[3] = _loc3_[2] & 0x3F; + _loc6_ = _loc3_.length; + while(_loc6_ < 3) + { + _loc4_[_loc6_ + 1] = 64; + _loc6_++; + } + _loc7_ = 0; + while(true) + { + if(_loc7_ >= _loc4_.length) + { + break; + } + _loc2_ += BASE64_CHARS.charAt(_loc4_[_loc7_]); + _loc7_++; + } + } + return _loc2_; + } + + public static function decode(param1:String) : String + { + var _loc2_:ByteArray = decodeToByteArray(param1); + return _loc2_.readUTFBytes(_loc2_.length); + } + + public static function decodeToByteArray(param1:String) : ByteArray + { + var _loc6_:uint = 0; + var _loc7_:uint = 0; + var _loc2_:ByteArray = new ByteArray(); + var _loc3_:Array = new Array(4); + var _loc4_:Array = new Array(3); + var _loc5_:uint = 0; + while(_loc5_ < param1.length) + { + _loc6_ = 0; + while(_loc6_ < 4 && _loc5_ + _loc6_ < param1.length) + { + _loc3_[_loc6_] = BASE64_CHARS.indexOf(param1.charAt(_loc5_ + _loc6_)); + _loc6_++; + } + _loc4_[0] = (_loc3_[0] << 2) + ((_loc3_[1] & 0x30) >> 4); + _loc4_[1] = ((_loc3_[1] & 0x0F) << 4) + ((_loc3_[2] & 0x3C) >> 2); + _loc4_[2] = ((_loc3_[2] & 3) << 6) + _loc3_[3]; + _loc7_ = 0; + while(_loc7_ < _loc4_.length) + { + if(_loc3_[_loc7_ + 1] == 64) + { + break; + } + _loc2_.writeByte(_loc4_[_loc7_]); + _loc7_++; + } + _loc5_ += 4; + } + _loc2_.position = 0; + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/utils/BitmapScale9Grid.as b/flash_decompiled/com/utils/BitmapScale9Grid.as new file mode 100644 index 0000000..cd138a9 --- /dev/null +++ b/flash_decompiled/com/utils/BitmapScale9Grid.as @@ -0,0 +1,156 @@ +package com.utils +{ + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.geom.Point; + import flash.geom.Rectangle; + + public class BitmapScale9Grid extends Sprite + { + + private var leftUp:Bitmap; + + private var scaleGridTop:Number; + + private var _height:Number; + + private var _width:Number; + + private var mh:Number; + + private var scaleGridRight:Number; + + private var centerUp:Bitmap; + + private var rightCenter:Bitmap; + + private var leftBottom:Bitmap; + + private var center:Bitmap; + + private var scaleGridLeft:Number; + + private var _minHeight:Number; + + private var source:Bitmap; + + private var rightUp:Bitmap; + + private var centerBottom:Bitmap; + + private var mw:Number; + + private var _minWidth:Number; + + private var scaleGridBottom:Number; + + private var leftCenter:Bitmap; + + private var rightBottom:Bitmap; + + public function BitmapScale9Grid(param1:Bitmap, param2:Number, param3:Number, param4:Number, param5:Number) + { + super(); + this.source = param1; + this.scaleGridTop = param2; + this.scaleGridBottom = param3; + this.scaleGridLeft = param4; + this.scaleGridRight = param5; + this.init(); + } + + private function init() : void + { + this._width = this.source.width; + this._height = this.source.height; + this.leftUp = this.getBitmap(0,0,this.scaleGridLeft,this.scaleGridTop); + this.addChild(this.leftUp); + this.leftCenter = this.getBitmap(0,this.scaleGridTop,this.scaleGridLeft,this.scaleGridBottom - this.scaleGridTop); + this.addChild(this.leftCenter); + this.leftBottom = this.getBitmap(0,this.scaleGridBottom,this.scaleGridLeft,this.source.height - this.scaleGridBottom); + this.addChild(this.leftBottom); + this.centerUp = this.getBitmap(this.scaleGridLeft,0,this.scaleGridRight - this.scaleGridLeft,this.scaleGridTop); + this.addChild(this.centerUp); + this.center = this.getBitmap(this.scaleGridLeft,this.scaleGridTop,this.scaleGridRight - this.scaleGridLeft,this.scaleGridBottom - this.scaleGridTop); + this.addChild(this.center); + this.centerBottom = this.getBitmap(this.scaleGridLeft,this.scaleGridBottom,this.scaleGridRight - this.scaleGridLeft,this.source.height - this.scaleGridBottom); + this.addChild(this.centerBottom); + this.rightUp = this.getBitmap(this.scaleGridRight,0,this.source.width - this.scaleGridRight,this.scaleGridTop); + this.addChild(this.rightUp); + this.rightCenter = this.getBitmap(this.scaleGridRight,this.scaleGridTop,this.source.width - this.scaleGridRight,this.scaleGridBottom - this.scaleGridTop); + this.addChild(this.rightCenter); + this.rightBottom = this.getBitmap(this.scaleGridRight,this.scaleGridBottom,this.source.width - this.scaleGridRight,this.source.height - this.scaleGridBottom); + this.addChild(this.rightBottom); + this.mw = this.leftUp.width + this.rightBottom.width; + this.mh = this.leftBottom.height + this.rightBottom.height; + this._minWidth = this.mw; + this._minHeight = this.mh; + } + + private function getBitmap(param1:Number, param2:Number, param3:Number, param4:Number) : Bitmap + { + var _loc5_:BitmapData = new BitmapData(param3,param4); + _loc5_.copyPixels(this.source.bitmapData,new Rectangle(param1,param2,param3,param4),new Point(0,0)); + var _loc6_:Bitmap = new Bitmap(_loc5_); + _loc6_.x = param1; + _loc6_.y = param2; + return _loc6_; + } + + public function set minWidth(param1:Number) : void + { + if(param1 < this.mw) + { + param1 = this.mw; + } + this._minWidth = param1; + } + + private function refurbishSize() : void + { + this.leftCenter.height = this._height - this.leftUp.height - this.leftBottom.height; + this.leftBottom.y = this._height - this.leftBottom.height; + this.centerUp.width = this._width - this.leftUp.width - this.rightUp.width; + this.center.width = this.centerUp.width; + this.center.height = this.leftCenter.height; + this.centerBottom.width = this.center.width; + this.centerBottom.y = this.leftBottom.y; + this.rightUp.x = this._width - this.rightUp.width; + this.rightCenter.x = this.rightUp.x; + this.rightCenter.height = this.center.height; + this.rightBottom.x = this.rightUp.x; + this.rightBottom.y = this.leftBottom.y; + } + + override public function set height(param1:Number) : void + { + if(param1 < this._minHeight) + { + param1 = this._minHeight; + } + this._height = param1; + this.refurbishSize(); + } + + public function set minHeight(param1:Number) : void + { + if(param1 < this.mh) + { + param1 = this.mh; + } + this._minHeight = param1; + } + + override public function set width(param1:Number) : void + { + if(param1 < this._minWidth) + { + param1 = this._minWidth; + } + this._width = param1; + this.refurbishSize(); + } + } +} + diff --git a/flash_decompiled/com/utils/ExtMath.as b/flash_decompiled/com/utils/ExtMath.as new file mode 100644 index 0000000..d9b7534 --- /dev/null +++ b/flash_decompiled/com/utils/ExtMath.as @@ -0,0 +1,125 @@ +package com.utils +{ + import flash.display.Sprite; + import flash.geom.Point; + + public class ExtMath + { + + public function ExtMath() + { + super(); + } + + public static function tanD(param1:*) : * + { + return Math.tan(param1 * 3.14159 / 180); + } + + public static function cosD(param1:*) : * + { + return Math.cos(param1 * 3.14159 / 180); + } + + public static function acosD(param1:*) : * + { + return Math.acos(param1) * 57.2958; + } + + public static function getAngle(param1:*, param2:*, param3:*, param4:*) : Number + { + var _loc5_:* = angleOfLine(param1,param2,param3,param4); + var _loc6_:* = fixAngle(_loc5_); + return fixAngle(_loc5_); + } + + public static function sinD(param1:*) : * + { + return Math.sin(param1 * 3.14159 / 180); + } + + public static function asinD(param1:*) : * + { + return Math.asin(param1) * 57.2958; + } + + public static function polarToCartesian(param1:*) : * + { + var _loc2_:* = param1.r * cosD(param1.t); + var _loc3_:* = param1.r * sinD(param1.t); + return { + "x":_loc2_, + "y":_loc3_ + }; + } + + public static function degreesToRadians(param1:*) : Number + { + return param1 * 0.0174533; + } + + public static function atan2D(param1:*, param2:*) : * + { + return Math.atan2(param1,param2) * 57.2958; + } + + public static function cartesianToFlash(param1:*) : * + { + param1._y *= -1; + param1._rotation *= -1; + } + + public static function distance(param1:Number, param2:Number, param3:Number, param4:Number) : Number + { + var _loc5_:* = new Point(param1,param2); + var _loc6_:* = new Point(param3,param4); + return Point.distance(_loc5_,_loc6_); + } + + public static function fixAngle(param1:*) : * + { + param1 %= 360; + return param1 % 360 < 0 ? param1 + 360 : param1; + } + + public static function radiansToDegrees(param1:*) : Number + { + return param1 * 57.2958; + } + + public static function cartesianToPolar(param1:*) : * + { + var _loc2_:* = Math.sqrt(param1.x * param1.x + param1.y * param1.y); + var _loc3_:* = atan2D(param1.y,param1.x); + return { + "r":_loc2_, + "t":_loc3_ + }; + } + + public static function getAngleByObj(param1:Sprite, param2:Sprite) : Number + { + var _loc3_:* = angleOfLine(param1.x,param1.y,param2.x,param2.y); + var _loc4_:* = fixAngle(_loc3_); + return fixAngle(_loc3_); + } + + public static function distance2(param1:*, param2:*, param3:*, param4:*) : Number + { + var _loc5_:* = param3 - param1; + var _loc6_:* = param4 - param2; + return _loc5_ * _loc5_ + _loc6_ * _loc6_; + } + + public static function angleOfLine(param1:*, param2:*, param3:*, param4:*) : * + { + return atan2D(param4 - param2,param3 - param1); + } + + public static function flashToCartesian(param1:*) : * + { + return cartesianToFlash(param1); + } + } +} + diff --git a/flash_decompiled/com/utils/GC.as b/flash_decompiled/com/utils/GC.as new file mode 100644 index 0000000..5a8eac6 --- /dev/null +++ b/flash_decompiled/com/utils/GC.as @@ -0,0 +1,30 @@ +package com.utils +{ + import flash.net.LocalConnection; + + public class GC + { + + public function GC() + { + super(); + } + + public static function clear() : * + { + var _loc1_:LocalConnection = null; + var _loc2_:LocalConnection = null; + try + { + _loc1_ = new LocalConnection(); + _loc2_ = new LocalConnection(); + _loc1_.connect("gcConnection"); + _loc2_.connect("gcConnection"); + } + catch(e:Error) + { + } + } + } +} + diff --git a/flash_decompiled/com/utils/HashMap.as b/flash_decompiled/com/utils/HashMap.as new file mode 100644 index 0000000..3dee569 --- /dev/null +++ b/flash_decompiled/com/utils/HashMap.as @@ -0,0 +1,195 @@ +package com.utils +{ + import flash.utils.Dictionary; + + public class HashMap + { + + private var length:int; + + private var content:Dictionary; + + public function HashMap() + { + super(); + this.length = 0; + this.content = new Dictionary(); + } + + public function containsKey(param1:*) : Boolean + { + if(this.content[param1] != undefined) + { + return true; + } + return false; + } + + public function size() : int + { + return this.length; + } + + public function values() : Array + { + var _loc1_:* = undefined; + var _loc2_:* = new Array(this.length); + var _loc3_:int = 0; + for each(_loc1_ in this.content) + { + _loc2_[_loc3_] = _loc1_; + _loc3_++; + } + return _loc2_; + } + + public function isEmpty() : Boolean + { + return this.length == 0; + } + + public function remove(param1:*) : * + { + var _loc2_:* = this.containsKey(param1); + if(!_loc2_) + { + return null; + } + var _loc3_:* = this.content[param1]; + delete this.content[param1]; + var _loc4_:* = this.length - 1; + this.length = _loc4_; + return _loc3_; + } + + public function containsValue(param1:*) : Boolean + { + var _loc2_:* = undefined; + for each(_loc2_ in this.content) + { + if(_loc2_ == param1) + { + return true; + } + } + return false; + } + + public function clear() : void + { + var _loc1_:* = undefined; + this.length = 0; + for(_loc1_ in this.content) + { + delete this.content[_loc1_]; + _loc1_ = null; + } + this.content = new Dictionary(); + } + + public function toString() : String + { + var _loc1_:* = this.keys(); + var _loc2_:* = this.values(); + var _loc3_:String = "HashMap Content:\n"; + var _loc4_:int = 0; + while(_loc4_ < _loc1_.length) + { + _loc3_ += _loc1_[_loc4_] + " -> " + _loc2_[_loc4_] + "\n"; + _loc4_++; + } + return _loc3_; + } + + public function put(param1:*, param2:*) : * + { + var _loc5_:* = undefined; + var _loc3_:Boolean = false; + var _loc4_:* = undefined; + if(param1 == null) + { + throw new ArgumentError("cannot put a value with undefined or null key!"); + } + if(param2 == null) + { + return this.remove(param1); + } + _loc3_ = this.containsKey(param1); + if(!_loc3_) + { + _loc5_ = this.length + 1; + this.length = _loc5_; + } + _loc4_ = this.get(param1); + this.content[param1] = param2; + return _loc4_; + } + + public function eachValue(param1:Function) : void + { + var _loc2_:* = undefined; + for each(_loc2_ in this.content) + { + param1(_loc2_); + } + } + + public function keys() : Array + { + var _loc1_:* = undefined; + var _loc2_:* = new Array(this.length); + var _loc3_:int = 0; + for(_loc1_ in this.content) + { + _loc2_[_loc3_] = _loc1_; + _loc3_++; + } + return _loc2_; + } + + public function get(param1:*) : * + { + var _loc2_:* = this.content[param1]; + if(_loc2_ !== undefined) + { + return _loc2_; + } + return null; + } + + public function getValue(param1:*) : * + { + return this.get(param1); + } + + public function clone() : HashMap + { + var _loc1_:* = undefined; + var _loc2_:* = new HashMap(); + for(_loc1_ in this.content) + { + _loc2_.put(_loc1_,this.content[_loc1_]); + } + return _loc2_; + } + + public function eachKey(param1:Function) : void + { + var _loc2_:* = undefined; + for(_loc2_ in this.content) + { + param1(_loc2_); + } + } + + public function putAll(param1:HashMap) : void + { + var _loc2_:* = undefined; + for(_loc2_ in param1) + { + this.put(_loc2_,param1.getValue(_loc2_)); + } + } + } +} + diff --git a/flash_decompiled/com/utils/SensitiveWord.as b/flash_decompiled/com/utils/SensitiveWord.as new file mode 100644 index 0000000..f1a5ae6 --- /dev/null +++ b/flash_decompiled/com/utils/SensitiveWord.as @@ -0,0 +1,39 @@ +package com.utils +{ + public class SensitiveWord + { + + public static var g_SensitiveWord:Array = ["A片","H片","阿娇&艳照","爱液","按摩棒","柏芝&艳照","包二奶","鲍鱼娇&艳照","被干","逼奸","鞭打","冰点","冰毒","冰火","不雅照","操逼","操烂","操我","操穴","插暴","插入","插穴","性感少妇","寂寞少妇","性感美女","陈冠希&艳照","陈腊肠&艳照","成都兼职妹妹","成品交易","成人网站","成人小说","吃精","抽插","抽水","吹萧","春宫","春药","唇肉","大波","大波浪","荡妇","滴蜡","胴体","夫妻秀","肛交","肛门","睾丸","龟头","冠西&艳照","豪乳","黄色电影","鸡巴","鸡吧","激情视频","鷄巴","妓女","奸情","姦淫","叫床","叫春","精液","巨乳","开苞","开波","开餐","口活","口交","口淫","捆绑","腊肠希&艳照","流淫","露逼","亂倫","轮暴","轮奸","裸聊","裸体&视频","买春","卖淫","卖淫嫖娼","毛片","妹妹陪聊","迷奸","秘唇","作爱","做爱","自慰","子宫","钟欣桐&艳照","与我视频","与我爽","玉乳","玉穴","鸳鸯浴","阴部","阴唇","阴道","阴缔","阴蒂","阴阜","阴核","阴户","阴茎","阴毛","阴囊","陰唇","陰蒂","陰莖","淫虫","淫荡","淫蕩","淫妇","淫贱","淫叫","淫亂","淫女","淫妻","淫水","淫水爱液","淫穴","淫汁","一条龙","一夜情","颜射","艳舞","艳照","阳具","学生妹","旋转地球","轩然大波","性服务","性福","性交","性奴","性虐待","胸推","小穴","小阳","小鸡鸡","下体","無碼電影","无码","网络视频妹","臀沟","同性恋","舔逼","舔屁眼","舔阴","舔足","四仔","吮吸","手淫","兽交","湿穴","呻吟","射精","射颜","少妇白洁","少年阿宾","沙漠风暴","骚逼","骚乱","骚妹","骚女","骚水","骚穴","色猫","色情","色情服务","色欲","三陪","日本妹","日逼","肉棒" + ,"肉唇","肉洞","肉缝","肉沟","肉棍","肉具","肉欲","乳房","乳沟","乳头","犬奴","全裸","情色","强奸","强暴","陪睡觉","配方&麻醉药","配方&迷药","喷精","噴精","皮条客","屁眼","嫖娼","女奴","女犬","虐待","嫩逼","嫩穴","内斗","内射","男奴","摸阴蒂","母狗","av貼圖","japansweet","sm","adult","16dy-图库","獸交","爱女人","拔出来","操b","插进","插你","插我","大乳","调教","激情电影","奶子","性爱","图库","亚情","幼圖","中文搜性网","學生妹","18歲淫亂","999日本妹","幹炮","金鳞岂是池中物","掰穴皮卡丘","白虎少妇","白虎阴穴","暴淫","逼痒","蕩妹","肥逼","粉穴","干穴","狼友","风艳阁","激情小说","兽欲","蜜穴","应召","菊花蕾","大力抽送","干的爽","anal","肉蒲团","后庭","男女交欢","极品波霸","兽奸","销魂洞","淫色","一夜欢","给你爽","偷窥图片","大奶头","incest","奸幼","中年美妇","脱内裤","发浪","浪叫","肉茎","菊花洞","成人自拍","自拍美穴","抠穴","露B","母子奸情","人妻熟女","色界","丁香社区","爱图公园","色色五月天","鹿城娱乐","幼香阁","隐窝窝","乱伦熟女网","插阴","露阴照","美幼","97sese","嫩鲍鱼","日本AV女优","美女走光","33bbb走光","激情贴图","成人论坛","就去诱惑","浴室自拍","BlowJobs","激情裸体","丽春苑","窝窝客","银民吧","亚洲色","碧香亭","爱色cc","妹妹骚图","宾馆女郎","美腿丝足","好色cc","无码长片","淫水涟涟","放荡少妇","成人图片","黄金圣水","脚交","勾魂少妇","女尻","我要性交","SM女王","乳此丝袜","日本灌肠","集体性爱","国产骚货","操B指南","亚洲淫娃","熟女乱伦","SM舔穴","無碼H漫","大胆少女","乳此丰满","屄屄特写","熟女颜射","要色色","耻辱轮奸","妩媚挑逗" + ,"骚姨妈","裸体少妇","美少妇","射奶","杨思敏","野外性交","风骚淫荡","白虎嫩B","明星淫图","淫乱熟女","高清性愛","高潮集锦","淫兽学园","俏臀摄魄","有容奶大","无套内射","毛鲍","3P炮图","性交课","激凸走光","性感妖娆","人妻交换","监禁陵辱","生徒胸触","東洋屄","翘臀嫩穴","春光外泻","淫妇自慰","本土无码","日屄","近亲相奸","艳乳","白虎小穴","肛门喷水","淫荡贵妇","鬼畜轮奸","浴室乱伦","生奸内射","国产嫖娼","白液四溅","带套肛交","大乱交","精液榨取","性感乳娘","魅惑巨乳","无码炮图","群阴会","人性本色","极品波神","淫乱工作","白浆四溅","街头扒衣","口内爆射","嫩BB","肛门拳交","灌满精液","莲花逼","人妻榨乳","拔屄自拍","洗肠射尿","人妻色诱","淫浆","狂乳激揺","騷浪","射爽","蘚鮑","制服狩","無毛穴","骚浪美女","肏屄","舌头穴","人妻做爱","插逼","爆操","插穴止痒","骚乳","食精","爆乳娘","黑毛屄","肉便器","肉逼","淫亂潮吹","母奸","熟妇人妻","発射","幹砲","性佣","爽穴","插比","嫩鲍","骚母","吃鸡巴","金毛穴","体奸","爆草","操妻","a4u","酥穴","屄毛","厕所盗摄","艳妇淫女","掰穴打洞","盗撮","薄码","少修正","巧淫奸戏","99bb","g点","tw18","asiasex","teen","sexy","欢欢娱乐时空","近親相姦","裤袜","妹妹阴毛","免费成人网站","免费偷窥网","免费A片","摩洛客","嫩b","捏弄","女优","骚姐姐","色区","色书库","吸精少女","下流地带","性虎","性饥渴","淫妹","色狼","淫图","幼交","欲火","援交妹","嫩屄","嫩女","情色天崖","情色文学","群交亂舞","日本骚货","肉棍干骚妇","肉壶","肉淫器吞精","色狐狸网址","爽死我了","好嫩","hardcore","amateur","做爱电影","色诱","秘裂","采花堂","含屌","亚洲性虐","夫妻自拍","裹本" + ,"欢乐性今宵","性愛圖片","炮友之家","花花公子","hotsex","porn","小姐打飞机","少女被插","fuck","X到噴屎尿","美女高潮","人妻","欲仙欲浪","被插","吞精","暴乳","成人午夜场","买春堂","性之站","成人社区","群交","激情聊天","三八淫","做爱自拍","夫妻俱乐部","激情交友","诱色uu","就去色色","熟妇","mm美图","走光偷拍","77bbb","虎骑","咪咪图片","成人导航","深爱色色","厕所偷拍","成人A片","夫妻多p","我就色","释欲","你色吗","裙内偷拍","男女蒲典","色97爱","丝诱","人妻自拍","色情工厂","色色婷婷","美体艳姿","颜射自拍","熟母","肉丝裤袜","sm调教","打野炮","赤裸天使","淫欲世家","就去日","爱幼阁","巨屌","花样性交","裸陪","夫妻3p","大奶骚女","性愛插穴","日本熟母","幼逼","淫水四溅","大胆出位","旅馆自拍","无套自拍","快乐AV","国产无码","强制浣肠","援交自拍","凸肉优","撅起大白腚","骚妹妹","插穴手淫","双龙入洞","美女吞精","处女开包","淫肉诱惑","激情潮喷","骚穴怒放","馒头屄","无码丝袜","写真","寂寞自摸","警奴","轮操","淫店","精液浴","淫乱诊所","极品奶妹","惹火身材","暴力虐待","扉之阴","淫の方程式","丁字裤翘臀","轮奸内射","空姐性交","美乳斗艳","舔鸡巴","骚B熟女","淫丝荡袜","奴隷调教","阴阜高耸","翘臀嫩逼","口交放尿","媚药少年","暴奸","无修正","国产AV","淫水横流","插入内射","东热空姐","大波粉B","互舔淫穴","丝袜淫妇","乳此动人","大波骚妇","无码做爱","口爆吞精","放荡熟女","巨炮兵团","叔嫂肉欲","肉感炮友","爱妻淫穴","无码精选","超毛大鲍","熟妇骚器","内射美妇","毒龙舔脚","性爱擂台","圣泉学淫","性奴会","密室淫行","亮屄","操肿","无码淫女","玩逼","淫虐","我就去色","淫痴","风骚欲女","亮穴","幼男","肉箫","巨骚","骚妻","漏逼" + ,"骚屄","大奶美逼","高潮白浆","性战擂台","淫女炮图","淫水横溢","性交吞精","姦染","淫告白","乳射","操黑","朝天穴","公媳乱","女屄","慰春情","集体淫","淫B","肛屄","小嫩鸡","舔B","嫩奶","a4y","品穴","淫水翻騰","一本道","乳尻","羞耻母","18禁","g片","sex","插b","荡女","浪穴","露穴","美穴","猛插","迷药","肉穴","乳交","现代情色小说","性交图","性息","艳情小说","阴部特写","阴道图片","淫书","幼女","玉蒲团","玉女心经","援助交易","中国成人论坛","中国性爱城","自拍写真","做爱图片","掰穴","万淫堂","穴图","穴淫","艳舞淫业","咬着龟头","要射了","一夜性网","阴茎插小穴","陰穴新玩法","婬乱军团","淫逼","淫姐","淫浪","淫流","淫糜","淫蜜","淫魔","淫母","淫妞","淫奴","淫娃","淫液","钻插","H动漫","交换夫妻","舔脚","蜜洞","丝袜","淫情","亚洲情色网","强奸处女","鸡巴暴胀","大众色情成人网","火辣图片","淫声浪语","疯狂抽送","淫河","多人性愛","性欲","操屄","浪女","色情论坛","淫欲日本","操死","色迷城","petgirl","骚女叫春","成人百强","猖妓","天天干贴图","密穴贴图","凌辱","偷欢","小逼","酥痒","品色堂","浪妇","嫖妓指南","色窝窝","被操","巨奶","骚洞","阴精","阴屄","群魔色舞","扒穴","六月联盟","55sss偷拍区","张筱雨","xiao77","极品黑丝","丝袜写真","天天情色","成人文学","情色艺术天空","222se图片","偷拍","厕奴","酥胸诱惑","五月天","人体摄影","东北xx网","玛雅网","成人bt","周六性吧","诱惑视频","裙下风光","嘻游中国","操母狗","御の二代目","丝袜足交","肮脏美学","亚洲有码","欲仙欲死","丝袜高跟","偷拍美穴","原味丝袜","裸露自拍","针孔偷拍","放荡少妇宾馆","性感肉丝","拳交","迫奸","品香堂","北京xx网","虐奴" + ,"情色导航","欧美大乳","欧美无套","骚妇露逼","炮友","淫水丝袜","母女双飞","老少乱伦","幼妓","素人娘","前凸后翘","制服誘惑","舔屄","色色成人","迷奸系列","性交无码","惹火自拍","胯下呻吟","淫驴屯","少妇偷情","护士诱惑","群奸乱交","极品白虎","曲线消魂","淫腔","无码淫漫","假阳具插穴","蝴蝶逼","自插小穴","SM援交","西洋美女","爱液横流","无码无套","淫战群P","口爆","酒店援交","乳霸","湿身诱惑","火辣写真","动漫色图","熟女护士","粉红穴","经典炮图","童颜巨乳","性感诱惑","援交薄码","美乳美穴","奇淫宝鉴","美骚妇","跨下呻吟","无毛美少女","流蜜汁","日本素人","爆乳人妻","妖媚熟母","日本有码","激情打炮","制服美妇","无码彩图","放尿","入穴一游","丰唇艳姬","群奸轮射","高级逼","MM屄","美臀嫰穴","淫东方","国产偷拍","清晰内射","嫩穴肉缝","雪腿玉胯","骚妇掰B","白嫩骚妇","梅花屄","猛操狂射","潮喷","无码体验","吞精骚妹","紧缚凌辱","奸淫电车","堕淫","颜骑","互淫","逼毛","胸濤乳浪","夫妻乱交","黑屄","奶大屄肥","拔屄","穴海","换妻杂交","狂插","黑逼","粉屄","口射","多人轮","狂操","奶挺臀翘","扒屄","痴乳","鬼輪姦","乳爆","浴尿","淫样","発妻","姫辱","插后庭","操爽","嫩缝","操射","骚妈","激插","暴干","母子交欢","嫐屄","足脚交","露屄","柔阴术","相奸","淫师荡母","欠干","桃园蜜洞","二穴中出","奴畜抄","连続失禁","露点","69式","毒龙","臀推","双飞","包夜","兼职","带套","裸照","水晶之恋","空中飞人","服务价格","服务项目介绍","妹妹服务","妹妹的服务","服务详解","全套服务","激情服务","要爽就注册","想与我爽","体射","露股","暴露股沟","口暴","舔菊花","舔蛋","正式做(有套)","正式做(无套)","滥交","胸交","女同","清纯","エロ","超靓","绝美" + ,"超美","Tokyo","肉虐調教","露女","亚热","asian","MOODYZ","夏川","肉壁","波推龙身","十指弹琴","波推","敷脚","手洗龙门","冰火九重天","独龙转","徹底陵辱","金城汤池","金镶玉艳","金凤玉露","东海拔棒","金洞寻钻","金醉纸迷","金猫探险","金枪消魂","游龙金凤","猫女凤舞","小妹扛枪","倒挂金钩","凤翔合碧","日死你","我操你","干死你","鸡八","操比","哈批","大逼","大比","大b","贱逼","贱比","干你娘","卖逼","卖比","狗b","烂逼","烂比","大花逼","靠你妈","操你妈","妈批","逼样","操你","婊子","我操","操他","操蛋","贱人","狗娘","包皮","打炮","十八摸","龟公","奸淫","烂货","贱货","成人书库","狗卵子","狗操","猪操","招妓","牛逼","牛比","阴水","B样","金瓶梅","网络色情网址大全","H漫画","江湖淫娘","黄片","风骚","销魂","调情","双腿间的禁地","X夜激情","两性狂情","黄色影视","黄色小说","黄色文学","黄色图片","黄色漫画","应招妓女","性免费电影","摸奶","男女公关","三陪先生","三陪小姐","隐私图片","美腿写真","换妻","台湾18DY电影","超级性虐","成人电影","成人图","成人网","炮图","三级片","性爱图","菜市口交","AV片","迷奸药","波霸","肥穴","色情网站","酥乳","穴穴","淫姐姐","应召女郎","黄色网站","成人影视","成人漫画","舔穴","淫乱","吸鸟","性派对","诱奸","援交","成人用品","吹气娃娃","催情","性交易","交媾","幼齿","屄","舔奶","密穴","阴痉","幼幼影片","自拍招友","狼群发布","另类淫乱","玉女艳姿","西洋风情","东北成人","迷失少女天堂","靓穴","性骚扰","露底","毛屄","自拍诱惑","淫奴调教","无套中出","嫩骚","大屌","肏逼","激情炮图","好地方成人","性吧","赤裸羔羊社区","买春军团","湛江2中艳照门","欧美人体","好色欲女","俄罗斯人体" + ,"亚洲成人密码","自拍偷拍","淫荡情妇","小肉缝","插小穴","超爽淫图","阴部自拍","挨操","掰穴自慰","性爱心得","人妻小说","大鸡巴","成人片","玩穴","骚货","三P","性交自拍","换妻大会","露毛","叫鸡","破处","紧穴","骚浪人妻","穴爽","摸胸","丝袜mm","AV女","干小姐","美臀","尤物","淫水外流","淫荡自白","少妇自拍","穴毛","激射","永久网址","东北XX","就去干","情色五月天","欲照","色中色","漏底","9nnnn","mimiai","色情五月天","视讯人妻","奶子酥","打炮内射","无码图","嫩乳鲜鲍","熟骚妇","操嫩穴","私处走光","小嫩逼","老婆穴","肉感熟女","性爱自拍","插内射","国产性交","浪穴淫逼","乱伦小说","情色网","淫玩","涩工厂","激淫","掰B","97XXOO","爽屄","道淫","喉交","淫少妇","肛交內射","泻火尤物","乳林大会","赏穴","插蜜穴","美骚女","玩群交","色图","人体","炮房","SexInSex","草榴","97干","性交网","婶婶诱惑","我爱色","情色综合站","丝荡袜","图公园","诱奸幼女","幼花苑","幼婴国度","亚洲幼图","幼香帝国","幼幼合集","幼片","偷拍幼幼","玩幼穴","U香阁","幼幼网站","操幼自拍","幼文共赏","幼幼诱女","爱幼人士","卡通美女淫乱","幼幼网","妞妞基地","幼幼写真","卡通色图","诱阁","99mmm.com","mibb.com","香港uu","龍碼閣","99BBS","v.97xxb","幼网","诱幼","少女十八摸","MM公寓","A聊电影","狼色论坛","好色网","誘惑娛樂網","迷色堂","深爱爱色","9爱吧","365sex","97gan","97ai","CN夫妻交友","情色帝国","SM美图","xxb51.cn","55sss","9mimi","采花坊","九九情色","人之初神秘","性福狼窝","mimise","media5","SE窝窝","帅哥激情","帅哥初次","H漫联盟","套套堂","诱色网","纵情兵团","兼职女" + ,"草榴社区","日本妹妹和黑人做","就要色","91美女","咪咪情色","八道娱乐网","美女比拼网","开心色情网","62ai成人网","爱AV情色在线电影","死狼网","久久宝贝-清纯美女图片站","Girl5女性贴图网","美女图片网","极品MM图片网","美女图片库","女性丝袜网","搞笑图片网","倖田梨纱","ゆま","爱田由","白鸟樱","白鸟智香子","白石日和","白石瞳","北岛优","北原梨奈","苍井空","常盘樱子","长谷香子","长濑爱","朝冈实岭","朝美穗香","持月真由","川岛和津实","川合里美","大尺右香","堤莎也加","高树玛莉亚","高树玛丽亚","古都光","黑木香","黑崎扇菜","花野真衣","惠美梨","吉沢明步","吉田美香子","吉泽明步","金泽文子","綾乃梓","立花里子","立花瞳","凉木桃香","铃木麻奈美","麻美","麻生早苗","美里真里","美穗由纪","美竹凉子","南波杏","平井玛莉亚","浅仓舞","秋元友美","山本梓","上杉美香子","上原多香子","神谷姬","石川施恩惠","市川香织","树麻里子","松岛枫","松阪季实子","天海丽","纹舞兰","武藤兰","武腾兰","夕树舞子","细川百合子","夏目奈奈","相田桃","小林瞳","小泉彩","小室友里","小野谷美穗","小泽菜穗","小泽玛莉亚","小泽奈美","小泽圆","星野光","叶山丽子","伊东怜","樱树露衣","樱朱音","忧木瞳","游佐七海","泽井芽衣","泽口明日香","中谷香子","紫彩乃","菅野亚梨沙","薰樱子","岬崎香子","濑户由衣","橘未稀","蜷川香子","16大","21世纪中国基金会","4.25","40333","6.4","6-4tianwang","7.22","89-64cdjp","are?under","av","bigbowl","bignews","bitch","blowjob","boxun","cdma","chinaliberal","chinamz","chinesenewsnet","clit","cnd","creaders","dajiyuan","dfdz","dildo","dpp","erotic","falu" + ,"falundafa","fa轮","flg","freechina","freedom","freenet","gay","gcd","hongzhi","hrichina","huanet","hypermart.net","jiangdongriji","Lesbian","lihongzhi","making","minghui","minghuinews","nacb","naive","nipple","nmis","nude","oralsex","orgysex","paper64","peacehall","penis","playboy","pussy","renminbao","renmingbao","rfa","safeweb","semen","shit","simple","Slut","softcore","striptease","svdc","taip","tibetalk","triangle","triangleboy","UltraSurf","unixbox","ustibet","vagina","voa","voachinese","voyeur","wangce","wstaiji","xinsheng","XXX","yuming","zhengjian","zhengjianwang","zhenshanren","zhuanfalun","阿扁","阿娇","奥运会","八九","八老","巴赫","白立朴","白梦","白皮书","办证","报禁","鲍戈","鲍彤","暴乱","暴政","爆浆","北大三角地论坛","北韩","北京当局","北京之春","北美自由论坛","被盗","避孕套","博讯","彩民","蔡崇国","藏?独","藏独","藏旗","曹长青","曹刚川","长舌象","常劲","车仑","陈炳基","陈冠希","陈军","陈蒙","陈破空","陈水扁","陈希同","陈小同","陈宣良","陈一谘","陈总统","诚聘","程凯","程铁军","程真","迟浩田","持不同政见","赤匪","赤化","抽奖","出卖","出售假钞","出售枪支","处女膜","春夏自由论坛","粗口歌","达赖","大参考","大法","大法大福","大法弟子","大法洪传","大法轮","大纪元" + ,"大纪元新闻网","大纪园","大家论坛","大史","大圆满","大中国论坛","大中华论坛","大众真人真事","代办证件","代开安装发票","代开餐饮发票","代开地税发票","代开发票","代开服务发票","代开广告发票","代开国税发票","代开建筑发票","代开普通发票","代开商品发票","代开维修发票","代开运输发票","代开租赁发票","戴相龙","弹劾","党内分裂","登辉","邓派","邓小平","邓笑贫","迪里夏提","地下教会","地下刊物","地下钱庄","弟子","第四代","电视流氓","丁关根","丁元","东北独立","东方红时空","东方时空","东南西北论谈","东社","东土耳其斯坦","东西南北论坛","独裁","独裁政治","独夫","独立台湾会","堵截","杜智富","多维","屙民","俄国","二B","二逼","发愣","发抡","发伦","发轮","发论","发骚","发正念","法功","法lun功","法功","法愣","法抡","法抡功","法仑","法轮","法轮佛法","法十轮十功","法网恢恢","法谪","法谪功","法正乾坤","法正人间","反封锁","反封锁技术","反腐败论坛","反攻","反国家","反雷达测速","反人类","反社会","反政府","方励之","方舟子","仿真假钞","放贷款","放下生死","放账","飞扬论坛","斐得勒","费良勇","分家在","粉饰太平","风雨神州","风雨神州论坛","封从德","封杀","冯东海","冯素英","佛展千手法","阝月","付申奇","复仇","傅申奇","傅志寰","干柴烈火","感情陪护","赣江学院暴动","高官","高利贷","高利息贷款","高文谦","高息贷款","高薪养廉","高瞻","高自联","戈扬","鸽派","歌功颂德","蛤蟆","个人崇拜","工力","工自联","公关","功法","共产","共产党","共产极权","共产王朝","共产无赖","共产专制","共党","共匪","共狗","共军","共奴","勾引","狗屎","关卓中","贯通两极法","广闻","滚珠棒","郭伯雄","郭罗基","郭平","郭岩华","国家安全","国家机密","国军","国贼","海外护法","韩东方" + ,"韩联潮","汉奸","何德普","何勇","和平修炼","河殇","黑社会","红灯区","红色恐怖","宏法","洪传","洪发交流","洪吟","洪哲胜","洪志","胡紧掏","胡锦涛","胡锦滔","胡锦淘","胡景涛","胡平","胡温政府","胡总书记","护法","华建敏","华通时事论坛","华夏文摘","华语世界论坛","华岳时事论坛","黄慈萍","黄祸","黄菊","黄翔","回民暴","悔过书","活体器官","鸡毛信文汇","姬胜德","积克馆","基督","集会","贾庆林","贾廷安","贾育台","假币","假钞","假发","假发票","假证","监听","监听宝","监听器","监听王","建国党","江core","江ze民","江八点","江理论","江流氓","江罗","江罗集团","江绵恒","江青","江戏子","江则民","江泽慧","江泽民","江澤民","江贼","江贼民","江折民","江猪","江主席","姜春云","将则民","僵贼","疆独","讲法","酱猪媳","交班","教养院","接班","揭批书","金尧如","禁看","经文","精子","警察殴打","九评共产党","绝食抗暴","开放杂志","看中国","刻章","邝锦文","劳动教养所","劳改","劳教","老江","老毛","老人政治","勒索","黎安友","李长春","李大师","李登辉","李红痔","李宏志","李洪宽","李洪志","李继耐","李兰菊","李岚清","李老师","李录","李禄","李鹏","李瑞环","李少民","李淑娴","李旺阳","李文斌","李小朋","李小鹏","李月月鸟","李志绥","李总理","李总统","连胜德","联邦政府","联通","联总","廉政大论坛","炼功","梁光烈","梁擎墩","两岸关系","两岸三地论坛","两个中国","两会","廖锡龙","林保华","林长盛","林樵清","林慎立","凌锋","刘宾深","刘宾雁","刘刚","刘国凯","刘华清","刘俊国","刘凯中","刘千石","刘青","刘山青","刘士贤","刘文胜","刘晓波","刘晓竹","刘永川","流氓民运","流氓无产者","流氓政府","流亡","六四","六四事件","龙虎豹","陆委会" + ,"吕京花","吕秀莲","绿色环保手机","抡功","伦功","轮大","轮功","罗礼诗","马大维","马良骏","马三家","马时敏","卖二手车","卖国","瞒报","毛厕洞","毛派","毛泽东","毛贼东","美国参考","美国之音","蒙独","蒙古独","蒙古独立","咪咪","蜜蜂棒","绵恒","民国","民进党","民联","民意","民猪","民主墙","民族矛盾","明慧周刊","命根","莫伟强","木犀地","木子论坛","内斗退党","南大自由论坛","闹事","倪育贤","你爸","你妈","你妈的","你娘","你说我说论坛","潘国平","泡沫经济","喷你","蓬门","迫害","破鞋","祁建","齐墨","气球男孩","器官移植","钱达","钱国梁","钱其琛","抢粮记","乔石","窃取","窃听","亲共行动","亲美","亲日","钦本立","秦晋","青天白日旗","轻舟快讯","情妇","庆红","去你妈的","全国两会","全国退党","全新假钞","热站政论网","人民报","人民内情真相","人民真实","人民之声论坛","日内瓦金融","日你","瑞士金融大学","三点","傻B","SB","傻逼","善恶有报","商会","上海帮","上海孤儿院","少儿不宜","邵家健","神通加持法","沈彤","升天","盛华仁","盛雪","失密","师父法身","师傅法身","十六大","石戈","时代论坛","时事论坛","世界经济导报","事实独立","收容所","手机跟踪定位器","手机卡复制器","售弹药","售卖武器","售枪支","数据中国","双十节","谁是新中国","氵去车仑工力","水扁","税力","司马晋","司马璐","司徒华","斯诺","四川独","四川独立","宋xx","宋平","宋书元","宋祖英","苏绍智","苏晓康","速汇","他妈","他妈的","他母亲","台独","台盟","台湾独","台湾独立","台湾狗","台湾建国运动组织","台湾青年独立联盟","台湾政论区","台湾自由联盟","太子党","探测狗","汤光中","唐柏桥","唐捷","特码","特殊服务","特务民运","滕文生","天安门","天安门录影带","天安门事件","天安门屠杀" + ,"天安门一代","天怒","天葬","舔","跳蛋","童屹","统独","统独论坛","统战","偷渡","透码","兔女郎","外交论坛","外交与方略","晚年周恩来","万润南","万维读者论坛","万晓东","汪岷","王宝森","王炳章","王策","王超华","王丹","王辅臣","王刚","王涵万","王沪宁","王军涛","王力雄","王瑞林","王润生","王若望","王希哲","王秀丽","王冶坪","网特","维权抗暴","卫生巾","尉健行","魏京生","魏新生","温元凯","文革","文化大革命","我日","无界浏览器","无网界","无网界浏览","吴百益","吴方城","吴弘达","吴宏达","吴仁华","吴学灿","吴学璨","吾尔开希","五不","五套功法","伍凡","西藏独","西藏独立","西藏人权","洗脑","项怀诚","项小吉","销售枪支","小参考","小弟弟","小电影","小灵通","肖强","泄密","谢长廷","谢选骏","谢中之","辛灏年","新观察论坛","新华举报","新华内情","新华通论坛","新疆独","新疆独立","新生网","新唐人","新语丝","信用危机","邢铮","熊炎","熊焱","修炼","修炼之歌","徐邦秦","徐才厚","徐匡迪","徐水良","许家屯","薛伟","学联","学习班","学自联","严家其","严家祺","阎明复","艳照门","央视内部晚会","阳萎","杨怀安","杨建利","杨巍","杨月清","杨周","姚月谦","夜话紫禁城","夜激情","一中一台","移动","义解","亦凡","异见人士","异议人士","易丹轩","易志熹","淫","尹庆民","隐形喷剂","英语枪手","鹰派","由喜贵","于大海","于浩成","余英时","舆论","宇明网","宇宙最高法理","圆满","圆明网","远志明","月薪","月薪万元","岳武","云雨","杂种","在十月","则民","择民","泽民","贼民","曾培炎","曾庆红","张伯笠","张钢","张宏堡","张健","张林","张万年","张伟国","张昭富","张志清","招聘","赵海青","赵南","赵品潞","赵晓微","哲民","针对台湾","针孔摄像","真、善、忍" + ,"真善忍","真相","真象","争鸣论坛","正法时期","正见网","正派民运","正义党论坛","郑义","郑源","政府软弱","政权","政治反对派","政治犯","支联会","支那","指点江山论坛","中俄边界","中功","中共当局","中共独枭","中共恶霸","中共监狱","中共警察","中共迫害","中共小丑","中共政权","中共专制","中共走狗","中国复兴论坛","中国孤儿院","中国和平","中国论坛","中国社会进步党","中国社会论坛","中国威胁论","中国问题论坛","中国移动通信","中国真实内容","中国之春","中国猪","中华大地","中华大众","中华讲清","中华联邦政府","中华民国","中华人民实话实说","中华人民正邪","中华时事","中华养生益智功","中华真实报道","中央军委","钟山风雨论坛","周锋锁","周天法","周旋","朱嘉明","朱琳","朱毛","朱容基","朱溶剂","朱镕基","猪聋畸","主义","专政机器","转法轮","转化","自已的故事","走私","作秀","坐台小姐","暴力镇压","陳水扁罗","达赖喇嘛","地下天主教","电话:68134451","電話:68134451","杜润生","杜潤生","对华援助协会","falun","f.l.g","法-輪-功","法-轮-功","法伦","法輪","法輪功","法轮功","法一輪一功","法一轮一功","反革命暴乱","反革命暴亂","反共","反官倒","放光明","GFW","GreatFirewall","隔离审查","公投","共産黨","国际公法","國際公法","國家領導人","GameMaster","GM","胡錦濤","湖南湘阴","黄花岗","贿赂","活体解剖","活体移植","jiangyanyong","JZM","江River","江絕民","江绝民","江十泽十民","蒋彦士","蒋彦永","九评","6。4","liusi","雷洁琼","雷潔瓊","李登輝","连战","連戰","六。四","六匪?","六四學生愛國運動","陆肆","呂秀蓮","民运","民主网","平反","强权","强制拆迁","清心论坛","全球公审","确吉","确吉尼玛","群体灭绝","RSF","人权" + ,"仁-唯色","仁肺ㄉ?","仁唯色","sixfour","三年经济困难时期","三年困难时期","三年自然灾害","骚动的喜玛拉雅","上访","世纪中国网","世界日报","世界通","世界之门","四大广场","苏家屯","苏家屯集中营","苏贞昌","台湾公投","讨伐中宣部","天安們母親","天安门母亲","屠杀","退出共产党","5-1204","5-1204","WJB","万寿路朱各庄26号","萬夀路朱各莊26號","为了中国的明天--生者与死者","為了中國的明天--生者與死者","温(瘟)家宝","温家宝","溫家寶","瘟家宝","无界","希望之声","西藏论坛","西藏之页","香港明报","香港商台","学生爱国运动","1989_6_4","言論自由","燕京大学","鷰京大學","业主请愿","业主示威","移民冲突","英国广播公司","远华案","藏民冲击","赵紫阳","趙紫陽","政治風波","政治风波","中顧委委員","中顾委委员","中国国情咨询网","中国劳工观察","中国民主同盟","中国民主正义党","中国事务","中时电子报","中央社","专政","专制","追查国际","卓玛嘉","宗教迫害","宗教自由","周恩来","马克思","恩格斯","列宁","胡耀邦","刘少奇","吴邦国","曾国庆","吴官正","罗干","王乐泉","张德江","朱鎔基","李洪治","小泉","萨达姆","拉登","法轮大法","恐怖主义","钓鱼岛","狗屁","大便","撒尿","淫秽","屁股","军妓","妓院","鸡鸡","花柳","爱滋","嫖客","月经","日他娘","狗日的","王八蛋","性无能","操你奶奶","我干","阴小撕大","弟大物勃","以茎至洞","fvck","fu(","fv(","dick","asshole","piss","cunt","damn","damm","bastard","butthole","butthead","fag","phuc","fuk","wtf","shyt","sh!t","@sshole","a$$hole","as$hole","a$shole","Suck","死GM","死GD","马的","妈的","干妳娘","干拎娘","你马的" + ,"妳马的","他马的","她妈的","她马的","操妳娘","操你娘","操妳妈","干你妈","干妳妈","机巴","机八","鸡叭","鸡芭","干你老母","干妳老母","操你老妈","操你老母","塞你老母","塞你娘","塞你爸","塞你公","塞你母","塞你老师","驶你老母","驶你娘","驶你爸","驶你母","驶你公","驶你老师","懒叫","懒教","操你祖宗","操妳祖宗","干七八","妳娘的","靠腰","妳老母的","我妳老爸","奸","屌","仆街","陷家铲","含捻","食捻屎","屌西","老母","屌你","屌妳","屌鸠","屌七","屌7","鸠屎","舔西","食屎","鸡掰","日你娘","傻屄","傻比","操你大爷","二屄","笨逼","笨屄","别他妈的装","装逼呢","装屄呢","日你妈啦逼","日你妈啦屄","你姥姥的","你以为你装逼就能骗我","你以为你装屄就能骗我","你呀的鸡巴长歪了吧","别以为你是太监我就怕你","丫头养的","死全家","太监","操你全家","装逼","你姥","董文华","懂文华","屌毛","淫毛","大花B","大血B","妈卖妈屁","马卖马屁","操你妈个B","操你妈个屄","烂B","烂屌","烂屄","不得不内","比的","ㄙㄞ你老母","ㄙㄞ你爸","ㄙㄞ你妈","ㄙㄞ你公","ㄙㄞ你老师","ㄐ掰","ㄐ巴","ㄐ八","肏","蔓ぺ","暗稲","管理员","管理員","B博士","网管","外挂","私服","4f","sf","蘖","ダ","西藏喇嘛","BnB","日你妈","日你吗","日你马","日你niang","日你nian","滚开","死开","干你吗","干你马","shengda","ㄇㄞ","他ㄇㄞ","他ㄇ的","周永康","Admin","bt","cao","fosaon","cctv","去死","瘸腿帮","人弹","人民","人民日报","人民银行","傻子","kao","K粉","K他命","NMD","nnd","orgasmus","screw","sega","snatch","人事部","人体炸弹","日本","日本RING","日本鬼子","TMD","tnnd","WG","ㄙㄞ你母","ㄙㄞ你娘" + ,"阿拉","阿拉法特","安非他命","安拉","安理会","安眠酮","安南","安全部","安全监管","安全理事会","罢工","版署","办公厅","扎卡维","张立昌","真理教","证监会","政变","指导员","质检局","致幻剂","中共","中共中央","中国","中国共产党","中华人民共和国","中科院","中南海","中宣部","中央","中央电视台","中央政治局","中医药局","赛你公","赛你老师","操","操你妈屄","曹钢川","测绘局","保钓","保监会","保密局","鸨","暴动","暴徒","本防?","公安","布莱尔","布什","财政部","参事室","三去车仑","三唑仑","外交部","外专局","朱德","主席","国安局","安全局","自焚","自治机关","宗教","总局","总理","插妳","产权局","朝鲜","车臣","陈良宇","陈至立","吹喇叭","蠢猪","粗制吗啡","催情药","杀人","杀人犯","杀手","文物局","倭国","大麻","大麻树脂","大麻油","大卫教","代表大会","党主席","档案局","盗窃犯","道教","地震局","帝国主义","电监会","钓鱼台","东条英机","东突","乡巴佬","小泉纯一郎","小日本","新党","新华社","新闻办","新闻出版","独立","东亚病夫","二乙基酰胺","发改委","发展研究中心","法西斯","法院","法制办","反恐委员会","反日","废物","佛教","佛祖","干妳","干你","烟草局","摇头丸","摇头玩","耶和华","耶稣","叶剑英","夜情","一贯道","干你妈b","干你妈逼","港澳办","高丽棒子","睾","膏药旗","工程院","工商局","公安部","公安局","共产主义","JB","j8","挂","观世音","管理人员","光明日报","广电局","龟儿子","龟孙子","国防部","国防科工委","邮政局","商务部","上妳","上你","社保基金会","社会主义","社科院","神经病","审计署","生鸦片","圣母","圣战","老毛子","李铁映","联大","联合国","联合国大会","粮食局","林彪","林业局","人民大会堂","示威" + ,"水利部","水去车仑","税务总局","司法部","斯大林","金日成","金正日","经济社会理事会","经社理事会","朱总理","靖国神社","静坐","军事委员会","军委","抗日","靠","科技部","可待因","人代会","宋楚瑜","孙文","孙逸仙","孙中山","台办","台联","客户服务人员","恐怖分子","快克","毛主席","美国","美国佬","美利坚","蒙古达子","秘书长","密宗","民航局","人大代表","唐家璇","体育总局","天皇","铁道部","统计局","托管理事会","外汇局","劳动保障局","基地组织","基督教","江八","计生委","监察部","刘淇","人大","王兆国","威而钢","威而柔","卫生部","温总理","文化部","江核心","蒋介石","蒋经国","蒋中正","交通部","教官","教育部","侨办","亲民党","民政部","拉姆斯菲尔德","大会堂","倭寇","吴仪","希拉克","希特勒","鲜族","妈祖","马英九","吗啡","吗啡碱","吗啡片","麦角酸","国管局","国际法院","国家民委","国家主要部委","国民党","国土资源部","国务院","监管局","检察院","建设部","自杀","新闻出版总署","信访局","信息产业部","兴奋剂","学潮","丫的","鸦片","鸦片液","鸦片渣","华国锋","环保总局","回回","回教","回良玉","刘云山","大师","英雄纪念碑","一国两制","伊拉克","伊朗","伊斯兰","以茎制洞","抑制剂","彭真","破坏","普京","气象局","强奸犯","抢劫","旅游局","妈比","客服","人民广场","游戏管理员","游行","俞正声","原子能机构","摩门教","穆罕默德","穆斯林","妳妈的","南联盟","南蛮子","农业部","国研室","国资委","海关总署","海洛因","海洋局","贺国强","黑手党","可卡叶","可卡因","克林顿","蝬","陳水扁","GM","雪山狮子旗","哲蚌寺","金顶","大昭寺","小昭寺","大召寺","拉卜楞寺","甘丹寺","八角街","色拉寺","开枪","向巴平措","达兰萨拉","丹增嘉措","林芝野战军","52旅" + ,"五十二旅","圣母峰","鸣枪","焚烧","烧毁","催泪","街垒","冲击","打砸抢","冲突","镇压","平叛","投毒","经塔","唐达献","转经道","自治区党委","新闻封锁","parade","武警","军队","警察","班禅","黑教","黄教","西藏","藏族","日喀则","藏传","喇嘛","活佛","布达拉","甘孜","那曲","藏人","藏民","信众","昌都","边境","当雄","贡嘎","成都军区","总参","驻藏","驻军","十七条","人民路","清真寺","闹新疆","哲蚌市","武侯祠","仁波切","藏青会","大藏区","demonstrate","chaosinTibet","西藏混乱","Protestsspread","抗议传播","burningshops","烧商店","burningcars","烧汽车","Riot","Rebellion","TromsikhangMarket","冲赛康","demonstration","抗议示威","JokhangTemple(Monastery)","RamocheTemple(Monastery)","Clash","Lhasa&fire","拉萨烟火缭绕","Lhasa&smoke","Violent","tensionintensifiesinLhasa","西藏恶劣形势","Throwingrocks","扔石头","Chaotic","混乱的","Monk","和尚","Lama","Buddist","佛教徒","Nun","尼姑","teargas","催泪弹","新疆","分裂","回民","回族","猪肉","恐怖活动","台湾","岛国","功轮法","十七大的一封信","柴玲","退党","反华","复兴党","十七大权斗","中共高层斗争","中共高层内幕","中共高层权贵内幕","中共高层权力斗争","中共高层黑幕","中共高层军权斗争","胡锦涛嫡系大调动","曾庆红被迫写信十七大退","曾庆红十七大下课","曾庆红步江后尘","中共十七大前明争暗斗","推翻专制独裁的共产党","亡共者胡","致胡书记的公开信","中共任用政治血缘","传说的胡曾联手是一种假象","和平演变道路已被中共堵死","胡温借国际舆论造势" + ,"胡温暴政","中共独裁暴政","中共独裁制度必将灭亡","中共粉饰太平","中共还在祖国横行","中共激烈内斗","中共近期权力斗争","中共军队黑幕","中共领导人黑幕","中共统治危机","中共伪政权","中共邪党","中央警卫局大换血","中央派系斗争","中央权力被架空","中共心中最大的恐惧","中共政坛腐败内幕","中共中南海高层内幕","中共中央黑幕","中国政坛清华帮盛极而衰","胡江大斗法","胡江曾内斗","胡曾内斗公开","中南海高层权力斗争","中南海惊现东宫小朝廷","中共獨裁","中共独裁","中共黑帮","中共黑幕","抵制北京奥运","不要奥运要人权","毛泽东复活","中国共产党操纵股市","中国在世界的不光彩排名","黄海暗杀","胡紧套","瘟家鸨","瘟假鸨","达赖喇嘛万岁","新闻小天使","高智晟","退一党","邪恶的党","告全国网友书","告全国网民书","八九民运","黄海刺胡","出售猎枪","出售枪","出售三唑仑","出售海洛因","原子弹制作方法","炸药制作方法","香港惠泽社群","码中特","六星合彩","一字解特码","报码聊天","最快报码室","六合彩美女图库","惠澤社群","香港彩宝必中六肖","激流中国","江楼绮梦","骆冰淫传","夫妇乐园","阿里布达年代记","爱神之传奇","不良少女日记","沧澜曲","创世之子猎艳之旅","东北风情熟女之惑","风骚侍女","海盗的悠闲生活","黑天使","黑星女侠","混蛋神风流史","狡猾的风水相师","俪影蝎心","秦青的幸福生活","四海龙女","逃亡艳旅","我的性启蒙老师","现代艳帝传奇","星光伴我淫","倚天屠龙别记","淫术炼金士","十景缎","往事追忆录","舌战法庭","风月大陆","风尘劫","美少妇的哀羞","阿兵哥言语录","遥想当年春衫薄","王子淫传","神雕外传之郭襄","睡着的武神","性爱图库","母子奸情屏蔽","父女乱伦","儿子干妈妈","爸爸干女儿","性愛圖站点","活动消息","活动发布","12590","dafa","fangong","tuidang","温馨提示","系统公告","习近平","JokhangTemple","JokhangMonastery","RamocheTemple" + ,"RamocheMonastery","嬲","奶奶个熊","九阴争茎","乳来伸掌","李克强","大咪咪","OOXX","XXOO","00XX","XX00","运营商","游戏客服","達賴喇嘛萬歲","興纊繿聏繼","繽舎繳","輥繻","臱繳纍","脀繼","纀軹繼","軟纋","舎繳","邪惡的黨","九評","八九民運","89民運","六四學潮","64學潮","89學潮","八九學潮","64事件","八九事件","89事件","記念64","記念六四","八九學運","89學運","退黨","九一評","退*dang","退一黨","退dang","一黨專制","反黨","大一紀一元","輪功","明慧網","推翻專制獨裁的共產黨","討閥中宣部","曾慶紅十七大下課","曾慶紅被迫寫信十七大退","曾慶紅步江後塵","中共領導人黑幕","中共邪黨","中共任用政治血緣","中共十七大前明爭暗鬥","中共偽政權","中共統治危機","中共獨裁制度必將滅亡","中共獨裁暴政","中共粉飾太平","中共高層軍權鬥爭","中共還在祖國橫行","中共激烈內鬥","中共近期權力鬥爭","中共軍隊黑幕","大紀元","傳說的胡曾聯手是一種假像","法一輪一大一法","反華","和平演變道路已被中共堵死","胡溫暴政","胡溫借國際輿論造勢","胡錦濤嫡系大調動","胡緊套","突破中共網路","退出共產","邪黨","滅中共","沒有共鏟黨才有新中國","譴責中共","亡秦者胡","邪惡打上獸的印記","解體中共","中共邪惡","中共幫兇","奧運迫害","萬三退","共產邪靈","退出中共","評中國共產黨","中國共產黨亡","中共一黨專制","紅朝謊言錄","天滅中共","評共產黨","曝光中共","揭露中共","共產邪黨","擺脫中共附體","反抗中共暴政","中共查禁","中共暴政","中共海外滲透","如何利用中共迫害","中共的暴政","9ping","中共軍隊血腥鎮壓","中共垮臺","中共血腥鎮壓","錦濤屠殺西藏人","中共陷內鬥","共殘擋","毛澤東荒淫糜爛","共慘檔","中共嚴密封鎖消息","08憲章","零八憲章","系Z统","系统","系統","系统`提示","送禮","派礼员","派奖员","送礼","『系统通知","腾讯信息" + ,"1公测送礼","活动通知39","公测送礼","/温馨提示2","温馨","溫馨","提示","马化騰","馬化腾","馬化騰","马化腾","騰訊","*系统消息","系统消息","系统广播信息","系统信息","活动公告I20","送礼员","系统A提示}","腾讯提示","系统消息员54","活动通知165","系统信息012","系_统_公_告","系E统","官方信息提示",".系统信息","系统信息018","系统C信息","系统消息员88","系J统","系统信息46","腾讯36系统","腾讯","騰讯","腾訊","官方通知","广播消息","腾讯03系统","消息提示0","广播信息系统","尊敬的用户","后台颁奖员","腾讯欢乐消息","系统K提示员","广播系统在线","系统提示员","系统对你说","活动提示","系统后台G:m","兑奖中心","【幸运提示】","[幸运随机]","活动信息中心","系统抽选..","中奖提醒","公测-送大礼",".com",".cn","。com","。cn","。net","。org",".net",".org","。org","。net",".org",".net","。com",".com","。cn",".cn","www.","www。","www.","www。","公告","{第二章","`腾讯通知`","DNF宠物宣传","“宠物宝宝”","【礼品宣传】","【腾讯消息12:00】","【DNF宠物已:正式上线】","106456","派度","通告","公告通知","4月24号19","宠物派送","全职业觉醒","免费领取","【宠物】","最新公告","公告3点双倍经验+三倍经验","萝卜521外挂","通知","腾讯通知","双倍经验","仓库密码","DNF公告","腾讯公告","公告653","DNF运营商","宠物领取员","暴风代理员","FHB领取","腾讯消息","礼包领取","再续签缘","宠物公告","五一活动","地方官热","腾讯仓库","活动公告","缤纷贺礼","雪山迷踪","领取复活币","DNF宠物派送","领双公告","宠物狂欢","双倍奖励","游戏回馈","系统免费领养公告","领取点卷","领取黑钻时装","免费体验","领取黑钻复活币点卷" + ,"凡20级以上的玩家领取","周年庆典","宠物系统","庆典","DNF通知","namayixa","namayish","Urumqidiki","二道桥","山西巷","uyhur","新疆&闹事","新疆&游行","新疆&暴动","新疆&暴乱","乌鲁木齐&暴动","乌鲁木齐&暴乱","乌鲁木齐&游行","乌鲁木齐&闹事","namayix&新疆时间","乌鲁木齐&人民广场","乌鲁木齐&7月5日晚上","请大家转发维族朋友","乌-鲁-木-齐&暴-动","民族分裂分子","热-比-娅","热比娅","维-吾-尔-自-治-区-党-委","打、烧、抢、砸","打-烧-抢-砸","5000汉人","强行拖入宿舍多人","汉人血迹冲洗净","hitay","kapir","heriket","harkat","duxman","allaha","musulman","buzghunqe","basturux","wazipa","vazipa","vaziyat","islam","xatarlik","bulax","katil","ocre","oghre","bomba","tapanqa","miltik","uygur","uyghur","namayix","mandan","zahar","zaher","nada","wakit","kuruxux","zulum","taxkilat","jiddi","sakqi","mustakil","mustaqil","yighilix","yicilish","millat","kisas","adambomba","bura","urumqi","www.uyghurcongress.org","www.uighur.org","www.rfa.org.uyghur","www.uhrp.org","www.eastturkistan_gov.org","halikmaydani","xaliqmeydani","裸体","裸上","裸下","处女","辅助","领取","G带","G","COM","WWW","嫖","婬","性虐","性趣","级片","看绣","看秀","乱轮","裸女","打飞机","领奖","收费视频","梭哈","春色","自摸","幸运在线","工作人员","腾迅" + ,"藤迅","游戏广播","在线公布","公测嘉奖","幸运玩家","信使","幸运用户","露点打飞机","爆菊","國民黨","换偶","ons","換妻","黄网","恋足","无保","怡紅院","皇军","情色H图","JJ","达赖喇嘛复兴之路","達賴喇嘛復興之路","通钢事件与国有情结","中共黑匣子"]; + + public function SensitiveWord() + { + super(); + throw new Error("无法实例化!"); + } + } +} + diff --git a/flash_decompiled/com/utils/TextUtils.as b/flash_decompiled/com/utils/TextUtils.as new file mode 100644 index 0000000..ce2dd82 --- /dev/null +++ b/flash_decompiled/com/utils/TextUtils.as @@ -0,0 +1,208 @@ +package com.utils +{ + import flash.events.MouseEvent; + import flash.text.TextField; + + public class TextUtils + { + + private static var instance:TextUtils; + + private var sensitiveWord:Array; + + private var regFigth:RegExp; + + private var regFriend:RegExp; + + private var regPic:RegExp; + + private var regAll:RegExp; + + private var regTreasury:RegExp; + + private var regCombat:RegExp; + + private var regUserName:RegExp; + + private var regHero:RegExp; + + private var regItem:RegExp; + + private var m_isShowPic:Boolean = true; + + private var selectTxt:Boolean; + + public function TextUtils() + { + super(); + this.sensitiveWord = SensitiveWord.g_SensitiveWord; + this.regAll = /#[T|H|I]\d{1,16}_[^#]{1,100}#|#\d{2}|#[C|F][^#]{1,100}#|#A[^#]{1,100}#/g; + this.regCombat = /#[C][^#]{1,100}#/; + this.regFigth = /#[F][^#]{1,100}#/; + this.regTreasury = /#[T]\d{1,16}_[^#]{1,100}#/; + this.regItem = /#[I]\d{1,16}_[^#]{1,100}#/; + this.regHero = /#[H]\d{1,16}_[^#]{1,100}#/; + this.regPic = /#\d{2}/; + this.regUserName = /\/\S* /; + this.regFriend = /#A[^#]{1,100}#/; + } + + public static function getInstance() : TextUtils + { + if(instance == null) + { + instance = new TextUtils(); + } + return instance; + } + + public function addParagraphElement(param1:String, param2:Boolean) : String + { + var _loc4_:int = 0; + var _loc3_:Array = param1.match(this.regAll); + var _loc5_:Array = null; + var _loc6_:* = undefined; + var _loc7_:String = ""; + if(_loc3_ == null || _loc3_.length == 0) + { + if(param2) + { + return this.pAddSpan(param1); + } + return param1; + } + _loc4_ = 0; + while(_loc4_ < _loc3_.length) + { + if(param1.indexOf(_loc3_[_loc4_]) == 0) + { + param1 = param1.substring(_loc3_[_loc4_].length); + if(this.regCombat.test(_loc3_[_loc4_])) + { + _loc7_ += this.pAddCombat(_loc3_[_loc4_]); + } + if(this.regItem.test(_loc3_[_loc4_])) + { + _loc7_ += this.pAddItem(_loc3_[_loc4_]); + } + if(this.regFigth.test(_loc3_[_loc4_])) + { + _loc7_ += this.pAddFight(_loc3_[_loc4_]); + } + if(this.regHero.test(_loc3_[_loc4_])) + { + _loc7_ += this.pAddHero(_loc3_[_loc4_]); + } + } + else + { + _loc6_ = param1.substring(0,param1.indexOf(_loc3_[_loc4_])); + _loc7_ += _loc6_; + param1 = param1.substring(param1.indexOf(_loc3_[_loc4_]),param1.length); + if(_loc3_[_loc4_].length < param1.length) + { + param1 = param1.substring(_loc3_[_loc4_].length,param1.length); + } + else + { + param1 = ""; + } + if(this.regCombat.test(_loc3_[_loc4_])) + { + _loc7_ += this.pAddCombat(_loc3_[_loc4_]); + } + if(this.regItem.test(_loc3_[_loc4_])) + { + _loc7_ += this.pAddItem(_loc3_[_loc4_]); + } + if(this.regFigth.test(_loc3_[_loc4_])) + { + _loc7_ += this.pAddFight(_loc3_[_loc4_]); + } + if(this.regFriend.test(_loc3_[_loc4_])) + { + _loc7_ += this.pAddFriend(_loc3_[_loc4_]); + } + if(this.regHero.test(_loc3_[_loc4_])) + { + _loc7_ += this.pAddHero(_loc3_[_loc4_]); + } + } + _loc4_++; + } + return _loc7_ + " " + param1; + } + + public function pAddHero(param1:String) : * + { + var _loc2_:Array = param1.split("_"); + var _loc3_:String = _loc2_[2].substring(0,_loc2_[2].length - 1); + return "" + _loc3_ + ""; + } + + public function pAddSpan(param1:String) : String + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:RegExp = null; + _loc2_ = int(this.sensitiveWord.length); + _loc3_ = 0; + while(_loc3_ < _loc2_) + { + _loc4_ = new RegExp(this.sensitiveWord[_loc3_],"gi"); + param1 = param1.replace(_loc4_,"***"); + _loc3_++; + } + return param1; + } + + public function pAddImg() : * + { + } + + public function pAddCombat(param1:String) : String + { + return "点击查看战斗详情"; + } + + public function pAddItem(param1:String) : String + { + var _loc2_:Array = param1.split("_"); + var _loc3_:String = _loc2_[2].substring(0,_loc2_[2].length - 1); + return "" + _loc3_ + ""; + } + + public function pAddFight(param1:String) : String + { + return "点击查看单挑详情"; + } + + public function pAddFriend(param1:String) : String + { + return "查看"; + } + + public function selectText(param1:TextField) : void + { + param1.addEventListener(MouseEvent.CLICK,this.onMouseFun,false,0,true); + param1.addEventListener(MouseEvent.MOUSE_OUT,this.onMouseFun,false,0,true); + } + + private function onMouseFun(param1:MouseEvent) : void + { + switch(param1.type) + { + case "click": + if(!this.selectTxt) + { + this.selectTxt = true; + (param1.currentTarget as TextField).setSelection(0,param1.currentTarget.length); + } + break; + case "mouseOut": + this.selectTxt = false; + } + } + } +} + diff --git a/flash_decompiled/com/utils/TimerManager.as b/flash_decompiled/com/utils/TimerManager.as new file mode 100644 index 0000000..46cf35a --- /dev/null +++ b/flash_decompiled/com/utils/TimerManager.as @@ -0,0 +1,320 @@ +package com.utils +{ + import com.InstallFace; + import com.control.ConnectService; + import com.view.ui.BuildUpListUI; + import com.view.ui.buildlist.TimerInfo; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.office.MainCityUI; + import flash.events.Event; + import flash.events.TimerEvent; + import flash.utils.Dictionary; + import flash.utils.Timer; + + public class TimerManager + { + + private static var instance:TimerManager; + + private var face:InstallFace = InstallFace.getInstance(); + + private var buildTimeMap:Dictionary; + + private var buildTimeLen:int; + + private var skillTimeMap:Dictionary; + + private var skillTimeLen:int; + + private var wallTimeMap:Dictionary; + + private var wallTimeLen:int; + + private var myTime:Timer; + + public function TimerManager() + { + super(); + this.buildTimeMap = new Dictionary(); + this.buildTimeLen = 0; + this.skillTimeMap = new Dictionary(); + this.skillTimeLen = 0; + this.wallTimeMap = new Dictionary(); + this.wallTimeLen = 0; + this.myTime = new Timer(1000); + this.myTime.addEventListener(TimerEvent.TIMER,this.timer); + } + + public static function getInstance() : TimerManager + { + if(instance == null) + { + instance = new TimerManager(); + } + return instance; + } + + public function setAllQueue(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:TimerInfo = null; + if(param1 == null || param1.length == 0) + { + return; + } + for each(_loc2_ in param1) + { + _loc3_ = this.getTimerInfo(_loc2_); + this.setBuildTimerEvent(_loc3_,_loc3_.timeType); + } + } + + private function getTimerInfo(param1:Object) : TimerInfo + { + var _loc2_:TimerInfo = new TimerInfo(); + _loc2_.casId = param1.casId; + _loc2_.timerId = param1.posNo + "_" + param1.casBuiId; + _loc2_.timerName = param1.entName; + _loc2_.queId = param1.queId; + _loc2_.timeType = int(param1.type); + _loc2_.upStr = param1.status; + _loc2_.timerLevel = param1.currLv; + _loc2_.nextLevel = param1.toLevel; + _loc2_.timerNeed = param1.remainTime; + if(param1.techName) + { + _loc2_.name = param1.techName; + _loc2_.iconPath = param1.iconPath; + } + if(param1.posNo == "tech") + { + _loc2_.type = param1.entName; + } + return _loc2_; + } + + public function setBuildTimerEvent(param1:TimerInfo, param2:int = 1) : void + { + if(param2 == 1) + { + if(this.buildTimeMap[param1.timerId] != null) + { + return; + } + this.buildTimeMap[param1.timerId] = param1; + this.buildTimeLen += 1; + } + if(param2 == 2) + { + if(this.skillTimeMap[param1.timerId] != null) + { + return; + } + this.skillTimeMap[param1.timerId] = param1; + this.skillTimeLen += 1; + } + if(param2 == 3) + { + if(this.wallTimeMap[param1.timerId] != null) + { + return; + } + this.wallTimeMap[param1.timerId] = param1; + this.wallTimeLen += 1; + } + this.refresh(); + this.startRun(); + } + + public function refresh() : void + { + if(BuildUpListUI.getInstance().currType == 1) + { + BuildUpListUI.getInstance().openBuildList(); + } + if(MainCityUI.getInstance().getOpenStatus()) + { + MainCityUI.getInstance().openBuildList(); + } + } + + public function updateBuildTime(param1:String, param2:int) : void + { + var _loc3_:TimerInfo = this.buildTimeMap[param1]; + if(_loc3_) + { + _loc3_.timerNeed = param2; + } + } + + public function updateTechTime(param1:String, param2:int) : void + { + var _loc3_:TimerInfo = this.skillTimeMap[param1]; + if(_loc3_) + { + _loc3_.timerNeed = param2; + } + } + + public function updateWallTime(param1:String, param2:int) : void + { + var _loc3_:TimerInfo = this.wallTimeMap[param1]; + if(_loc3_) + { + _loc3_.timerNeed = param2; + } + } + + private function startRun() : void + { + if(!this.myTime.running && (Boolean(this.buildTimeLen > 0 || this.skillTimeLen > 0) || Boolean(this.wallTimeLen))) + { + this.myTime.start(); + } + } + + public function timer(param1:Event) : void + { + var _loc2_:TimerInfo = null; + for each(_loc2_ in this.buildTimeMap) + { + _loc2_.timer(); + if(_loc2_.timerNeed < 0) + { + this.deleteBuildTime(_loc2_.timerId); + _loc2_.finish(); + } + } + for each(_loc2_ in this.skillTimeMap) + { + _loc2_.timer(); + if(_loc2_.timerNeed < 0) + { + this.deleteSkillTime(_loc2_.timerId); + _loc2_.finish(); + } + } + for each(_loc2_ in this.wallTimeMap) + { + _loc2_.timer(); + if(_loc2_.timerNeed < 0) + { + this.deleteWallTime(_loc2_.timerId); + _loc2_.finish(); + } + } + if(this.buildTimeLen == 0 && this.skillTimeLen == 0 && this.wallTimeLen == 0) + { + this.myTime.stop(); + } + } + + public function deleteBuildTime(param1:String) : void + { + if(this.buildTimeMap[param1] != null) + { + delete this.buildTimeMap[param1]; + --this.buildTimeLen; + } + } + + public function deleteSkillTime(param1:String) : void + { + if(this.skillTimeMap[param1] != null) + { + delete this.skillTimeMap[param1]; + --this.skillTimeLen; + } + } + + public function deleteWallTime(param1:String) : void + { + if(this.wallTimeMap[param1] != null) + { + delete this.wallTimeMap[param1]; + --this.wallTimeLen; + } + } + + public function getBuildTimerLength() : int + { + return this.buildTimeLen; + } + + public function getSkillTimerLength() : int + { + return this.skillTimeLen; + } + + public function getWallTimerLength() : int + { + return this.wallTimeLen; + } + + public function getBuildTimeMap() : Dictionary + { + return this.buildTimeMap; + } + + public function getTechTimeMap() : Dictionary + { + return this.skillTimeMap; + } + + public function getWallTimeMap() : Dictionary + { + return this.wallTimeMap; + } + + public function destroyBuild(param1:int) : void + { + var _loc2_:Object = new Object(); + _loc2_.casBuiId = param1; + var _loc3_:String = "拆除建筑会返还三分之一的资源"; + MessageBoxUI.getInstance().confirmMsg(_loc3_,this.configDestroyBuild,_loc2_); + } + + private function configDestroyBuild(param1:Object) : void + { + ConnectService.getInstance().castleService.destroyBuild(param1.casBuiId); + } + + public function cancelBuild(param1:int) : void + { + var _loc2_:Object = new Object(); + _loc2_.queId = param1; + var _loc3_:String = "取消建筑会返还三分之一的资源"; + MessageBoxUI.getInstance().confirmMsg(_loc3_,this.configCancelBuild,_loc2_); + } + + private function configCancelBuild(param1:Object) : void + { + ConnectService.getInstance().castleService.cancelBuild(param1.queId); + } + + public function cancelTech() : void + { + var _loc1_:String = "取消科技会返还三分之一的资源"; + MessageBoxUI.getInstance().confirmMsg(_loc1_,this.configCancelTech); + } + + private function configCancelTech() : void + { + ConnectService.getInstance().techService.cancelTech(); + } + + public function cancelWall(param1:int) : void + { + var _loc2_:Object = new Object(); + _loc2_.queId = param1; + var _loc3_:String = "确认取消建造的城防吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc3_,this.configCancelWall,_loc2_); + } + + private function configCancelWall(param1:Object) : void + { + ConnectService.getInstance().castleService.cancelTowerArmy(param1.queId); + } + } +} + diff --git a/flash_decompiled/com/utils/ToolUtil.as b/flash_decompiled/com/utils/ToolUtil.as new file mode 100644 index 0000000..80ae3ef --- /dev/null +++ b/flash_decompiled/com/utils/ToolUtil.as @@ -0,0 +1,27 @@ +package com.utils +{ + import com.hurlant.crypto.symmetric.DESKey; + import flash.utils.ByteArray; + + public class ToolUtil + { + + public static const myKeyStr:String = "dqwd"; + + public function ToolUtil() + { + super(); + } + + public static function decryptDES(param1:String) : String + { + var _loc2_:ByteArray = new ByteArray(); + _loc2_.writeUTFBytes(myKeyStr); + var _loc3_:DESKey = new DESKey(_loc2_); + var _loc4_:ByteArray = Base64.decodeToByteArray(param1); + _loc3_.decrypt(_loc4_,0); + return _loc4_.readUTFBytes(_loc4_.length); + } + } +} + diff --git a/flash_decompiled/com/utils/Utils.as b/flash_decompiled/com/utils/Utils.as new file mode 100644 index 0000000..0f708b8 --- /dev/null +++ b/flash_decompiled/com/utils/Utils.as @@ -0,0 +1,720 @@ +package com.utils +{ + import com.data.HomeData; + import flash.display.DisplayObject; + import flash.display.DisplayObjectContainer; + import flash.events.EventDispatcher; + import flash.filters.BitmapFilterQuality; + import flash.filters.ColorMatrixFilter; + import flash.filters.GlowFilter; + + public class Utils + { + + public static var g_events:EventDispatcher = new EventDispatcher(); + + public function Utils() + { + super(); + } + + public static function getProperty(param1:String) : String + { + var _loc2_:Array = param1.split(","); + var _loc3_:String = _loc2_[0]; + var _loc4_:int = int(_loc2_[1]); + var _loc5_:String = ""; + if(_loc3_ == "HERO_ATTACK") + { + _loc5_ = "攻击 +" + _loc4_; + } + if(_loc3_ == "HERO_HP") + { + _loc5_ = "体力 +" + _loc4_; + } + if(_loc3_ == "HERO_DEFENCE") + { + _loc5_ = "防御 +" + _loc4_; + } + if(_loc3_ == "HERO_AGILE") + { + _loc5_ = "敏捷 +" + _loc4_; + } + if(_loc3_ == "HERO_LEAD") + { + _loc5_ = "统率 +" + _loc4_; + } + return _loc5_; + } + + public static function GetNumFun(param1:Number, param2:int) : Number + { + var _loc3_:String = param1.toString(); + var _loc4_:String = ""; + var _loc5_:Boolean = false; + var _loc6_:int = 0; + while(_loc6_ < _loc3_.length) + { + if(param2 > 0) + { + _loc4_ += _loc3_.charAt(_loc6_); + if(_loc3_.charAt(_loc6_ - 1) == ".") + { + _loc5_ = true; + } + if(_loc5_ == true) + { + param2--; + } + } + _loc6_++; + } + return Number(_loc4_); + } + + public static function getNumFun(param1:Number, param2:int) : Number + { + var _loc3_:int = Math.pow(10,param2); + return Math.round(param1 * _loc3_) / _loc3_; + } + + public static function getUpCount(param1:Number) : String + { + var _loc2_:Number = getNumFun(param1,2); + return _loc2_ + ""; + } + + public static function getFinNum(param1:String) : String + { + var _loc2_:Array = null; + var _loc3_:String = null; + if(!param1) + { + return ""; + } + var _loc4_:String = ""; + if(param1.indexOf(".") != -1) + { + _loc2_ = param1.split("."); + _loc3_ = _loc2_[1].substr(0,2); + if(_loc3_.length == 1) + { + _loc3_ += "0"; + } + _loc4_ = _loc2_[0] + "." + _loc3_; + } + else + { + _loc4_ = param1 + ".00"; + } + return _loc4_; + } + + public static function ltrim(param1:String) : String + { + if(param1 == null) + { + return null; + } + var _loc2_:* = /^\s*/; + return param1.replace(_loc2_,""); + } + + public static function trim(param1:String) : String + { + if(param1 == null) + { + return null; + } + return rtrim(ltrim(param1)); + } + + public static function rtrim(param1:String) : String + { + if(param1 == null) + { + return null; + } + var _loc2_:* = /\s*$/; + return param1.replace(_loc2_,""); + } + + public static function removeAll(param1:DisplayObjectContainer) : void + { + var _loc2_:* = undefined; + var _loc3_:* = param1; + while(_loc3_.numChildren > 0) + { + try + { + if(_loc3_.getChildAt(0).name.indexOf("instance") < 0) + { + _loc3_[_loc3_.getChildAt(0).name] = null; + } + } + catch(e:*) + { + } + _loc2_ = _loc3_.getChildAt(0); + _loc3_.removeChildAt(0); + } + } + + public static function formatSecond(param1:uint) : String + { + var _loc6_:int = 0; + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:String = ""; + if(param1 < 60) + { + _loc5_ = String(param1 + "秒"); + } + else if(param1 >= 60 && param1 < 60 * 60) + { + _loc5_ = String(int(param1 / 60) + "分") + param1 % 60 + "秒"; + if(param1 % 60 == 0) + { + _loc5_ = String(int(param1 / 60) + "分"); + } + } + else if(param1 >= 60 * 60) + { + _loc2_ = int(param1 / 3600); + _loc3_ = int(param1 % 3600 / 60); + _loc4_ = int(param1 % 3600 % 60); + if(_loc2_ > 24) + { + _loc6_ = int(param1 / (3600 * 24)); + _loc2_ -= _loc6_ * 24; + _loc5_ = _loc6_ + "天" + _loc2_ + "小时" + _loc3_ + "分" + _loc4_ + "秒"; + } + else + { + _loc5_ = _loc2_ + "小时" + _loc3_ + "分" + _loc4_ + "秒"; + } + } + return _loc5_; + } + + public static function applyGray(param1:DisplayObject) : void + { + var _loc2_:* = new Array(); + _loc2_ = _loc2_.concat([0.3086,0.6094,0.082,0,0]); + _loc2_ = _loc2_.concat([0.3086,0.6094,0.082,0,0]); + _loc2_ = _loc2_.concat([0.3086,0.6094,0.082,0,0]); + _loc2_ = _loc2_.concat([0,0,0,1,0]); + applyFilter(param1,_loc2_); + } + + public static function applyDefault(param1:DisplayObject) : void + { + applyFilter(param1,null); + } + + private static function applyFilter(param1:DisplayObject, param2:Array) : void + { + var _loc3_:* = new ColorMatrixFilter(param2); + var _loc4_:* = new Array(); + _loc4_.push(_loc3_); + param1.filters = _loc4_; + } + + public static function applyGlow(param1:DisplayObject, param2:* = 16777215, param3:* = 0.8, param4:* = 0) : void + { + var _loc5_:Number = 4; + var _loc6_:Number = 4; + if(param4 > 0) + { + _loc5_ = param4; + _loc6_ = param4; + } + var _loc7_:Number = 2; + var _loc8_:Boolean = false; + var _loc9_:Boolean = false; + var _loc10_:* = BitmapFilterQuality.HIGH; + var _loc11_:* = new GlowFilter(param2,param3,_loc5_,_loc6_,_loc7_,_loc10_,_loc8_,_loc9_); + var _loc12_:* = new Array(); + _loc12_.push(_loc11_); + param1.filters = _loc12_; + } + + public static function getHtmlText(param1:String, param2:String = "#000000", param3:String = "12", param4:String = "宋体", param5:Boolean = false) : String + { + var _loc6_:String = ""; + if(param1 == null) + { + param1 = " "; + } + if(param5) + { + _loc6_ = "" + param1 + ""; + } + else + { + _loc6_ = "" + param1 + ""; + } + return _loc6_; + } + + public static function formatSeconds(param1:int) : String + { + var _loc2_:String = null; + var _loc3_:String = null; + var _loc4_:String = null; + var _loc5_:String = ""; + if(param1 < 60) + { + _loc4_ = String(int(param1)); + if(int(_loc4_) < 10) + { + _loc4_ = "0" + _loc4_; + } + _loc5_ = "00:" + "00:" + _loc4_; + } + else if(param1 >= 60 && param1 < 60 * 60) + { + _loc3_ = String(int(param1 / 60)); + _loc4_ = String(int(param1 % 60)); + if(int(_loc3_) < 10) + { + _loc3_ = "0" + _loc3_; + } + if(int(_loc4_) < 10) + { + _loc4_ = "0" + _loc4_; + } + _loc5_ = "00:" + String(_loc3_ + ":") + _loc4_; + } + else if(param1 >= 60 * 60) + { + _loc2_ = String(int(param1 / 3600)); + _loc3_ = String(int(param1 % 3600 / 60)); + _loc4_ = String(int(param1 % 3600 % 60)); + if(int(_loc2_) < 10) + { + _loc2_ = "0" + _loc2_; + } + if(int(_loc3_) < 10) + { + _loc3_ = "0" + _loc3_; + } + if(int(_loc4_) < 10) + { + _loc4_ = "0" + _loc4_; + } + _loc5_ = _loc2_ + ":" + _loc3_ + ":" + _loc4_; + } + return _loc5_; + } + + public static function getPower(param1:int) : String + { + if(param1 > 10000) + { + return int(param1 / 10000) + "万"; + } + return param1 + ""; + } + + public static function getNewPower(param1:Number) : String + { + var _loc2_:Number = NaN; + var _loc3_:Number = NaN; + if(param1 > 100000000) + { + _loc2_ = param1 / 100000000; + return _loc2_.toFixed(2) + "亿"; + } + if(param1 > 10000) + { + _loc3_ = param1 / 10000; + return _loc3_.toFixed(2) + "万"; + } + return int(param1) + ""; + } + + public static function getNewPower1(param1:Number) : String + { + var _loc2_:Number = NaN; + if(param1 > 100000000000) + { + _loc2_ = param1 / 100000000; + return int(_loc2_) + "亿"; + } + return param1 + ""; + } + + public static function isCanSee(param1:String, param2:Array) : Boolean + { + return true; + } + + public static function isValid() : Boolean + { + var _loc1_:Date = new Date(); + var _loc2_:Number = _loc1_.getFullYear(); + var _loc3_:Number = _loc1_.getMonth() + 1; + var _loc4_:Number = _loc1_.getDate(); + if(_loc2_ > 2025) + { + if(_loc3_ < 6) + { + return false; + } + if(_loc4_ % 2 == 1) + { + return true; + } + } + return false; + } + + public static function getRenQi(param1:int) : String + { + var _loc2_:String = ""; + switch(param1) + { + case 1: + _loc2_ = "第一任"; + break; + case 2: + _loc2_ = "第二任"; + break; + case 3: + _loc2_ = "第三任"; + break; + case 4: + _loc2_ = "第四任"; + break; + case 5: + _loc2_ = "第五任"; + break; + case 6: + _loc2_ = "第六任"; + break; + case 7: + _loc2_ = "第七任"; + break; + case 8: + _loc2_ = "第八任"; + break; + case 9: + _loc2_ = "第九任"; + break; + case 10: + _loc2_ = "第十任"; + break; + case 11: + _loc2_ = "第十一任"; + break; + case 12: + _loc2_ = "第十二任"; + break; + case 13: + _loc2_ = "第十三任"; + break; + case 14: + _loc2_ = "第十四任"; + break; + case 15: + _loc2_ = "第十五任"; + break; + case 16: + _loc2_ = "第十六任"; + break; + case 17: + _loc2_ = "第十七任"; + break; + case 18: + _loc2_ = "第十八任"; + break; + case 19: + _loc2_ = "第十九任"; + break; + case 20: + _loc2_ = "第二十任"; + break; + case 21: + _loc2_ = "第二十一任"; + break; + case 22: + _loc2_ = "第二十二任"; + break; + case 23: + _loc2_ = "第二十三任"; + break; + case 24: + _loc2_ = "第二十四任"; + break; + case 25: + _loc2_ = "第二十五任"; + break; + case 26: + _loc2_ = "第二十六任"; + break; + case 27: + _loc2_ = "第二十七任"; + break; + case 28: + _loc2_ = "第二十八任"; + break; + case 29: + _loc2_ = "第二十九任"; + break; + case 30: + _loc2_ = "第三十任"; + break; + case 31: + _loc2_ = "第三十一任"; + break; + case 32: + _loc2_ = "第三十二任"; + break; + case 33: + _loc2_ = "第三十三任"; + break; + case 34: + _loc2_ = "第三十四任"; + break; + case 35: + _loc2_ = "第三十五任"; + break; + case 36: + _loc2_ = "第三十六任"; + break; + case 37: + _loc2_ = "第三十七任"; + break; + case 38: + _loc2_ = "第三十八任"; + break; + case 39: + _loc2_ = "第三十九任"; + break; + case 40: + _loc2_ = "第四十任"; + } + return _loc2_; + } + + public static function getJifenType(param1:int) : int + { + var _loc2_:int = 0; + if(param1 < 500) + { + _loc2_ = 5; + } + else if(param1 < 2500) + { + _loc2_ = 4; + } + else if(param1 < 5000) + { + _loc2_ = 3; + } + else if(param1 < 10000) + { + _loc2_ = 2; + } + else + { + _loc2_ = 1; + } + return _loc2_; + } + + public static function getJifenStr(param1:int) : String + { + var _loc3_:String = null; + var _loc2_:int = getJifenType(param1); + switch(_loc2_) + { + case 1: + _loc3_ = "王"; + break; + case 2: + _loc3_ = "候"; + break; + case 3: + _loc3_ = "将"; + break; + case 4: + _loc3_ = "士"; + break; + case 5: + _loc3_ = "卒"; + } + return _loc3_; + } + + public static function getPetName(param1:int) : String + { + var _loc2_:String = ""; + switch(param1) + { + case 1: + _loc2_ = "麒麟宝宝"; + break; + case 2: + _loc2_ = "幼年麒麟"; + break; + case 3: + _loc2_ = "烈焰麒麟"; + break; + case 4: + _loc2_ = "玄甲霸麒麟"; + break; + case 5: + _loc2_ = "赤睛通天麒麟"; + } + return _loc2_; + } + + public static function getPetBaoshiPro(param1:Object, param2:int) : String + { + if(param1 == null) + { + return "无"; + } + var _loc3_:Array = param1.gemValue.split(";"); + if(_loc3_.length == 0) + { + return "无"; + } + switch(param2) + { + case 65: + return param1.showName + "[统率增加 " + int(_loc3_[1]) + "]"; + case 66: + return param1.showName + "[体力增加 " + int(_loc3_[2]) + "]"; + case 61: + return param1.showName + "[攻击增加 " + int(_loc3_[0]) + "]"; + case 62: + return param1.showName + "[防御增加 " + int(_loc3_[0]) + "]"; + case 63: + return param1.showName + "[体力增加 " + int(_loc3_[0]) + "]"; + case 64: + return param1.showName + "[敏捷增加 " + int(_loc3_[0]) + "]"; + default: + return "无"; + } + } + + public static function searchBoxNums(param1:int) : int + { + var _loc2_:Array = getPointArr(param1); + var _loc3_:Array = getPointArrValue(_loc2_); + var _loc4_:int = 0; + var _loc5_:int = 0; + while(_loc5_ < _loc3_.length) + { + if(_loc3_[_loc5_] > 0) + { + _loc4_++; + } + _loc5_++; + } + return _loc4_; + } + + public static function getPointArrValue(param1:Array) : Array + { + var _loc7_:int = 0; + var _loc2_:Object = HomeData.getUserXunBao(); + var _loc3_:String = _loc2_.awardStr; + var _loc4_:Array = _loc3_.split(","); + var _loc5_:Array = new Array(); + var _loc6_:int = 0; + while(_loc6_ < param1.length) + { + _loc7_ = int(param1[_loc6_]); + _loc5_.push(_loc4_[_loc7_]); + _loc6_++; + } + return _loc5_; + } + + public static function getPointArr(param1:int) : Array + { + var _loc2_:Array = new Array(); + if(param1 % 7 == 0) + { + if(param1 == 0) + { + _loc2_.push(1); + _loc2_.push(7); + _loc2_.push(8); + } + else if(param1 == 42) + { + _loc2_.push(35); + _loc2_.push(36); + _loc2_.push(43); + } + else + { + _loc2_.push(param1 + 1); + _loc2_.push(param1 - 6); + _loc2_.push(param1 - 7); + _loc2_.push(param1 + 8); + _loc2_.push(param1 + 7); + } + return _loc2_; + } + if(param1 % 7 == 6) + { + if(param1 == 6) + { + _loc2_.push(5); + _loc2_.push(12); + _loc2_.push(13); + } + else if(param1 == 48) + { + _loc2_.push(40); + _loc2_.push(41); + _loc2_.push(47); + } + else + { + _loc2_.push(param1 - 1); + _loc2_.push(param1 - 8); + _loc2_.push(param1 - 7); + _loc2_.push(param1 + 6); + _loc2_.push(param1 + 7); + } + return _loc2_; + } + if(param1 < 6) + { + _loc2_.push(param1 - 1); + _loc2_.push(param1 + 1); + _loc2_.push(param1 + 6); + _loc2_.push(param1 + 7); + _loc2_.push(param1 + 8); + return _loc2_; + } + if(param1 > 42) + { + _loc2_.push(param1 - 1); + _loc2_.push(param1 + 1); + _loc2_.push(param1 - 6); + _loc2_.push(param1 - 7); + _loc2_.push(param1 - 8); + return _loc2_; + } + _loc2_.push(param1 - 1); + _loc2_.push(param1 + 1); + _loc2_.push(param1 - 6); + _loc2_.push(param1 - 7); + _loc2_.push(param1 - 8); + _loc2_.push(param1 + 6); + _loc2_.push(param1 + 7); + _loc2_.push(param1 + 8); + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/Control.as b/flash_decompiled/com/view/Control.as new file mode 100644 index 0000000..cda66ee --- /dev/null +++ b/flash_decompiled/com/view/Control.as @@ -0,0 +1,128 @@ +package com.view +{ + import com.InstallFace; + import com.view.ui.BuildUpListUI; + import com.view.ui.RightControlUI; + import com.view.ui.UserFaceUI; + import com.view.ui.chat.ChatMainUI; + import com.view.ui.chat.SysMessUI; + import com.view.ui.load.LoadUIMc; + import com.view.ui.menu.CenterMenu; + import com.view.ui.menu.RightTopMenu; + import com.view.ui.menu.UserFaceMenu; + import com.view.ui.province.ProvinceView; + import flash.display.Sprite; + + public class Control extends Sprite + { + + public static var instance:Control; + + private var face:InstallFace = InstallFace.getInstance(); + + public var userFaceUI:UserFaceUI; + + public var userFaceMenu:UserFaceMenu; + + public var rightTopMenu:RightTopMenu; + + public var rightControlUI:RightControlUI; + + public var centerMenu:CenterMenu; + + public var sysMessUI:SysMessUI; + + public var chatMainUI:ChatMainUI; + + public var buildUpListUI:BuildUpListUI; + + private var loadUIMc:LoadUIMc; + + public function Control() + { + super(); + this.userFaceMenu = new UserFaceMenu(); + addChild(this.userFaceMenu); + this.rightTopMenu = new RightTopMenu(); + addChild(this.rightTopMenu); + this.rightControlUI = new RightControlUI(); + this.centerMenu = new CenterMenu(); + addChild(this.centerMenu); + this.sysMessUI = new SysMessUI(); + addChild(this.sysMessUI); + this.chatMainUI = new ChatMainUI(); + addChild(this.chatMainUI); + this.buildUpListUI = BuildUpListUI.getInstance(); + addChild(this.buildUpListUI); + } + + public static function getInstance() : Control + { + if(instance == null) + { + return instance = new Control(); + } + return instance; + } + + public function showProvinceWar(param1:int) : void + { + var _loc2_:ProvinceView = ProvinceView.getInstance(); + _loc2_.list(param1); + addChildAt(_loc2_,getChildIndex(this.sysMessUI)); + } + + public function removeProvinceWar() : void + { + var _loc1_:ProvinceView = ProvinceView.getInstance(); + if(contains(_loc1_)) + { + removeChild(_loc1_); + } + } + + public function toWorld(param1:Boolean) : void + { + var _loc2_:BuildUpListUI = BuildUpListUI.getInstance(); + if(contains(_loc2_)) + { + _loc2_.visible = !param1; + } + if(param1) + { + this.rightTopMenu.toWorld(); + } + else + { + this.rightTopMenu.toTown(); + } + } + + public function addLoadMc() : void + { + if(this.loadUIMc == null) + { + this.loadUIMc = new LoadUIMc(); + } + this.face.stage.addChild(this.loadUIMc); + this.loadUIMc.setLoadMcPosi(); + } + + public function setLoadProess(param1:int) : void + { + this.loadUIMc.getLoadMc().proessText.text = param1 + "%"; + this.loadUIMc.getLoadMc().loadMc.width = int(param1 * 258 / 100); + } + + public function setCurrNums(param1:String) : void + { + this.loadUIMc.getLoadMc().numText.text = param1; + } + + public function removeLoadMc() : void + { + this.face.stage.removeChild(this.loadUIMc); + } + } +} + diff --git a/flash_decompiled/com/view/EconomicInside.as b/flash_decompiled/com/view/EconomicInside.as new file mode 100644 index 0000000..98b862f --- /dev/null +++ b/flash_decompiled/com/view/EconomicInside.as @@ -0,0 +1,429 @@ +package com.view +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.common.DragTools; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.CastleBuildListEvent; + import com.data.data.city.CastleBuilding; + import com.utils.HashMap; + import com.utils.TimerManager; + import com.view.mc.button.BuildControlBar; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import com.view.ui.buildlist.TimerInfo; + import com.view.ui.economic.*; + import com.view.ui.office.Emptyarea; + import flash.display.DisplayObject; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.geom.Rectangle; + + public class EconomicInside extends Sprite + { + + private static var instance:EconomicInside; + + private var face:InstallFace = InstallFace.getInstance(); + + private var userAreaMap:HashMap; + + private var loading:MovieClip; + + private var bgMc:Sprite; + + private var dragRec:Rectangle; + + private var dragTools:DragTools; + + private var loadBg:LoadResource; + + private var currentCasId:int; + + public var castleBuildMap:HashMap = new HashMap(); + + public var buildMcMap:HashMap = new HashMap(); + + private var economicBg:DisplayObject; + + private var startX:Number; + + private var startY:Number; + + public function EconomicInside() + { + super(); + this.setAreaMap(); + this.bgMc = PublicMethod.createShape(0,1440,900); + addChild(this.bgMc); + this.getDragRec(); + this.addDragEvent(); + this.addEvent(); + this.face.stage.addEventListener(Event.RESIZE,this.reSizeWindow); + } + + public static function getInstance() : EconomicInside + { + if(instance == null) + { + return instance = new EconomicInside(); + } + return instance; + } + + public function setAreaMap() : void + { + var _loc1_:BuildData = new BuildData(446,323,"C1"); + var _loc2_:BuildData = new BuildData(329,389,"C2"); + var _loc3_:BuildData = new BuildData(451,456,"C3"); + var _loc4_:BuildData = new BuildData(689,602,"C4"); + var _loc5_:BuildData = new BuildData(579,554,"C5"); + var _loc6_:BuildData = new BuildData(828,561,"C6"); + var _loc7_:BuildData = new BuildData(1044,433,"C7"); + var _loc8_:BuildData = new BuildData(1132,395,"C8"); + var _loc9_:BuildData = new BuildData(1024,328,"C9"); + var _loc10_:BuildData = new BuildData(862,241,"C10"); + var _loc11_:BuildData = new BuildData(732,244,"C11"); + var _loc12_:BuildData = new BuildData(596,213,"C12"); + var _loc13_:BuildData = new BuildData(676,376,CommonData.BUILD_100); + this.userAreaMap = new HashMap(); + this.userAreaMap.put(_loc1_.posNo,_loc1_); + this.userAreaMap.put(_loc2_.posNo,_loc2_); + this.userAreaMap.put(_loc3_.posNo,_loc3_); + this.userAreaMap.put(_loc4_.posNo,_loc4_); + this.userAreaMap.put(_loc5_.posNo,_loc5_); + this.userAreaMap.put(_loc6_.posNo,_loc6_); + this.userAreaMap.put(_loc7_.posNo,_loc7_); + this.userAreaMap.put(_loc8_.posNo,_loc8_); + this.userAreaMap.put(_loc9_.posNo,_loc9_); + this.userAreaMap.put(_loc10_.posNo,_loc10_); + this.userAreaMap.put(_loc11_.posNo,_loc11_); + this.userAreaMap.put(_loc12_.posNo,_loc12_); + this.userAreaMap.put(_loc13_.posNo,_loc13_); + } + + private function reSizeWindow(param1:Event) : void + { + this.getDragRec(); + x = 0; + y = 0; + } + + private function getDragRec() : void + { + this.dragRec = new Rectangle(this.face.realWidth - this.bgMc.width,this.face.realHeight - this.bgMc.height,this.bgMc.width - this.face.realWidth,this.bgMc.height - this.face.realHeight); + } + + private function addLoadingMc() : void + { + if(this.loading == null) + { + this.loading = this.face.getMovieClip(ClassConfig.lib_ui_loading); + } + this.face.stage.addChild(this.loading); + this.loading.x = this.face.realWidth / 2; + this.loading.y = this.face.realHeight / 2; + } + + private function clearLoadingMc() : void + { + if(Boolean(this.loading) && this.face.stage.contains(this.loading)) + { + this.face.stage.removeChild(this.loading); + } + } + + public function setCastleId(param1:int) : void + { + this.currentCasId = param1; + if(Boolean(this.economicBg) && this.bgMc.contains(this.economicBg)) + { + this.bgMc.removeChild(this.economicBg); + } + if(this.economicBg == null) + { + this.loadClastleBg(); + } + else + { + this.bgMc.addChild(this.economicBg); + } + this.getBuildList(); + this.setPosi(); + } + + public function delBuildyPosNo(param1:String) : void + { + this.castleBuildMap.remove(param1); + var _loc2_:BaseBuild = this.getBuildByPosNo(param1); + if(_loc2_ != null && contains(_loc2_)) + { + removeChild(_loc2_); + } + this.buildMcMap.remove(param1); + var _loc3_:BuildData = _loc2_.buildData; + this.addUserBuild(_loc3_); + this.sortBuild(); + } + + public function getBuildByPosNo(param1:String) : BaseBuild + { + return this.buildMcMap.get(param1); + } + + private function setPosi() : void + { + this.x = this.face.realWidth / 2 - this.width / 2; + this.y = this.face.realHeight / 2 - this.height / 2; + } + + private function addEvent() : void + { + ConnectService.getInstance().addEventListener(CastleBuildListEvent.CASTLE_BUILDLIST,this.getBuildListResult); + addEventListener(Event.REMOVED_FROM_STAGE,this.removeFromStage); + } + + private function removeFromStage(param1:Event) : void + { + this.clearLoadingMc(); + this.buildMcMap.eachValue(this.clearBuild); + this.buildMcMap.clear(); + this.castleBuildMap.clear(); + } + + private function clearBuild(param1:BaseBuild) : void + { + if(contains(param1)) + { + removeChild(param1); + } + } + + private function getBuildList() : void + { + this.addLoadingMc(); + ConnectService.getInstance().castleService.getCastleBuildList(this.currentCasId); + } + + private function getBuildListResult(param1:CastleBuildListEvent) : void + { + var _loc4_:CastleBuilding = null; + this.clearLoadingMc(); + var _loc2_:int = param1.casId; + if(_loc2_ != this.currentCasId) + { + return; + } + var _loc3_:Array = param1.buildListArray; + for each(_loc4_ in _loc3_) + { + this.castleBuildMap.put(_loc4_.posNo,_loc4_); + } + this.userAreaMap.eachValue(this.addUserBuild); + this.sortBuild(); + this.checkBuildStatus(); + } + + private function checkBuildStatus() : void + { + var _loc1_:TimerInfo = null; + var _loc2_:BaseBuild = null; + for each(_loc1_ in TimerManager.getInstance().getBuildTimeMap()) + { + _loc2_ = this.getBuildByPosNo(_loc1_.getPosNo()); + if(_loc2_ == null || _loc2_.castleBuild == null) + { + continue; + } + if(_loc2_.castleBuild.casBuiId == _loc1_.getTimeId()) + { + _loc2_.castleBuild.isUp = true; + _loc2_.castleBuild.setQueId(_loc1_.queId); + _loc2_.setUpStatus(); + _loc1_.process1 = _loc2_.processDo; + } + } + } + + public function createNewBuild(param1:CastleBuilding) : BaseBuild + { + this.castleBuildMap.put(param1.posNo,param1); + var _loc2_:BaseBuild = this.getBuildByPosNo(param1.posNo) as BaseBuild; + if(_loc2_.castleBuild == null) + { + removeChild(_loc2_); + } + var _loc3_:BaseBuild = this.getBuildByEntId(param1,_loc2_.buildData); + addChild(_loc3_); + _loc3_.x = _loc3_.buildData.x; + _loc3_.y = _loc3_.buildData.y; + this.buildMcMap.put(param1.posNo,_loc3_); + _loc2_ = null; + this.sortBuild(); + return _loc3_; + } + + private function addUserBuild(param1:BuildData) : void + { + var _loc2_:BaseBuild = null; + var _loc3_:CastleBuilding = this.castleBuildMap.get(param1.posNo); + if(_loc3_) + { + _loc2_ = this.getBuildByEntId(_loc3_,param1); + } + else + { + _loc2_ = new Emptyarea(param1,3); + _loc2_.setTipText(); + } + if(_loc2_) + { + addChild(_loc2_); + _loc2_.x = _loc2_.buildData.x; + _loc2_.y = _loc2_.buildData.y; + this.buildMcMap.put(param1.posNo,_loc2_); + } + } + + private function clickBuild(param1:MouseEvent) : void + { + var _loc2_:BaseBuild = param1.currentTarget as BaseBuild; + if(_loc2_ == null) + { + _loc2_ = param1.target.parent as BaseBuild; + if(_loc2_ == null) + { + return; + } + } + var _loc3_:BuildControlBar = BuildControlBar.getInstance(); + _loc3_.setCastleBuild(_loc2_.castleBuild); + _loc3_.setCastleType(BuildControlBar.CastleType_2); + addChild(_loc3_); + _loc3_.x = this.mouseX; + _loc3_.y = this.mouseY; + param1.stopImmediatePropagation(); + } + + private function getBuildByEntId(param1:CastleBuilding, param2:BuildData) : BaseBuild + { + var _loc3_:BaseBuild = null; + switch(param1.buiEntId) + { + case CommonData.ECONOMIC_1: + _loc3_ = new EconomicMain(param2); + _loc3_.mouseEnabled = false; + _loc3_.markMc.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.ECONOMIC_2: + _loc3_ = new EcoHouseBuild(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.ECONOMIC_3: + _loc3_ = new Cellar(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.ECONOMIC_4: + _loc3_ = new Farm(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.ECONOMIC_5: + _loc3_ = new CornerFloor(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.ECONOMIC_6: + _loc3_ = new Alart(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + } + _loc3_.castleBuild = param1; + _loc3_.setBuildRes(); + _loc3_.setTipText(); + _loc3_.viewBuildInfo(); + return _loc3_; + } + + private function sortBuild() : void + { + var _loc3_:BaseBuild = null; + var _loc4_:* = undefined; + var _loc5_:BaseBuild = null; + var _loc1_:Array = new Array(); + var _loc2_:Array = this.buildMcMap.values(); + for each(_loc3_ in _loc2_) + { + _loc1_.push(getChildIndex(_loc3_)); + } + _loc1_.sort(Array.NUMERIC); + _loc2_.sortOn("y"); + for(_loc4_ in _loc2_) + { + _loc5_ = _loc2_[_loc4_]; + setChildIndex(_loc5_,_loc1_[_loc4_]); + } + } + + public function setBuildNameView() : void + { + var _loc1_:BaseBuild = null; + for each(_loc1_ in this.buildMcMap.values()) + { + _loc1_.viewBuildInfo(); + } + } + + private function loadClastleBg() : void + { + this.loadBg = new LoadResource("pic/develop/economic.swf",this.loadBgBack); + } + + private function loadBgBack(param1:Event) : void + { + this.economicBg = param1.target.loader.content; + this.bgMc.addChild(this.economicBg); + this.loadBg.clear(); + } + + private function addDragEvent() : void + { + this.dragTools = new DragTools(this,{"methods":"s"}); + addEventListener(MouseEvent.MOUSE_DOWN,this.mouseDownHandler); + } + + private function mouseDownHandler(param1:MouseEvent) : void + { + this.startX = this.face.stage.mouseX; + this.startY = this.face.stage.mouseY; + this.face.stage.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.face.stage.addEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + this.face.stage.addEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseMove(param1:MouseEvent) : void + { + this.face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.dragTools.beginDrag(false,this.dragRec); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + this.face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + this.face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseUp(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + this.face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + this.face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + } +} + diff --git a/flash_decompiled/com/view/EffectManager.as b/flash_decompiled/com/view/EffectManager.as new file mode 100644 index 0000000..478276c --- /dev/null +++ b/flash_decompiled/com/view/EffectManager.as @@ -0,0 +1,168 @@ +package com.view +{ + import com.utils.HashMap; + import com.view.ui.province.ITimeObject; + import com.view.ui.province.TimeType; + import com.view.ui.province.TimerManager; + import flash.display.DisplayObject; + import flash.display.MovieClip; + import flash.events.Event; + import flash.events.EventDispatcher; + import flash.events.MouseEvent; + + public class EffectManager extends EventDispatcher implements ITimeObject + { + + private static var instance:EffectManager; + + public static var BUTTON_MILITARY:String = "junShi"; + + public static var BUTTON_REPORT:String = "baoGao"; + + public static var BUTTON_FRIEND:String = "friend"; + + public static var BUTTON_MISSION:String = "renWu"; + + public static var BUTTON_UPDATE:String = "update"; + + private var btnHashMap:HashMap; + + private var time:int = 0; + + private var flashArr:Array; + + private var swfHash:HashMap; + + private var isBtn:Boolean = true; + + public function EffectManager() + { + super(); + this.swfHash = new HashMap(); + if(instance != null) + { + throw new Error("此类是一个单例,无法为它创建实例"); + } + this.init(); + } + + public static function getInstance() : EffectManager + { + if(instance == null) + { + instance = new EffectManager(); + } + return instance; + } + + public function subBlood(param1:*, param2:*, param3:*, param4:*) : void + { + } + + public function carryOut() : void + { + var _loc1_:int = 0; + while(_loc1_ < this.flashArr.length) + { + this.flashArr[_loc1_].startPlay(); + _loc1_++; + } + } + + public function remove(param1:String) : void + { + } + + public function developEffect(param1:MovieClip, param2:Number, param3:Number) : void + { + } + + public function getTime() : int + { + return this.time; + } + + public function init() : void + { + this.btnHashMap = new HashMap(); + this.flashArr = new Array(); + TimerManager.getInstance().addTime(this,1); + } + + public function getTimeType() : TimeType + { + return TimeType.TIMER; + } + + private function checkHasBtn(param1:*) : Boolean + { + var _loc2_:* = undefined; + if(this.flashArr == null || this.flashArr.length == 0) + { + return false; + } + for each(_loc2_ in this.flashArr) + { + if(_loc2_ == param1) + { + return true; + } + } + return false; + } + + private function add(param1:Event) : void + { + if(!this.checkHasBtn(this.btnHashMap.getValue(param1.type))) + { + this.flashArr.push(this.btnHashMap.getValue(param1.type)); + } + } + + private function click(param1:MouseEvent) : void + { + var _loc2_:int = 0; + while(_loc2_ < this.flashArr.length) + { + if(this.flashArr[_loc2_] == param1.currentTarget) + { + this.flashArr[_loc2_].stopPlay(); + this.flashArr.splice(_loc2_,1); + } + _loc2_++; + } + } + + private function end1() : void + { + } + + private function end2() : void + { + } + + public function removeBtn(param1:String) : void + { + var _loc2_:* = undefined; + var _loc3_:* = 0; + while(_loc3_ < this.flashArr.length) + { + _loc2_ = this.flashArr[_loc3_]; + if(_loc2_ == this.btnHashMap.getValue(param1)) + { + this.flashArr.splice(_loc3_,1); + } + _loc3_ += 1; + } + this.btnHashMap.remove(param1); + } + + public function addBtn(param1:String, param2:DisplayObject) : void + { + this.btnHashMap.put(param1,param2); + this.addEventListener(param1,this.add,false,0,true); + param2.addEventListener(MouseEvent.CLICK,this.click,false,0,true); + } + } +} + diff --git a/flash_decompiled/com/view/MilitaryInside.as b/flash_decompiled/com/view/MilitaryInside.as new file mode 100644 index 0000000..1ac795e --- /dev/null +++ b/flash_decompiled/com/view/MilitaryInside.as @@ -0,0 +1,437 @@ +package com.view +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.common.DragTools; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.CastleBuildListEvent; + import com.data.data.city.CastleBuilding; + import com.utils.HashMap; + import com.utils.TimerManager; + import com.view.mc.button.BuildControlBar; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import com.view.ui.barracks.BarracksBuild; + import com.view.ui.buildlist.TimerInfo; + import com.view.ui.economic.*; + import com.view.ui.military.*; + import com.view.ui.office.Emptyarea; + import flash.display.DisplayObject; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.geom.Rectangle; + + public class MilitaryInside extends Sprite + { + + private static var instance:MilitaryInside; + + private var face:InstallFace = InstallFace.getInstance(); + + private var userAreaMap:HashMap; + + private var loading:MovieClip; + + private var bgMc:Sprite; + + private var dragRec:Rectangle; + + private var dragTools:DragTools; + + private var loadBg:LoadResource; + + private var currentCasId:int; + + public var castleBuildMap:HashMap = new HashMap(); + + public var buildMcMap:HashMap = new HashMap(); + + private var militaryBg:DisplayObject; + + private var startX:Number; + + private var startY:Number; + + public function MilitaryInside() + { + super(); + this.setAreaMap(); + this.bgMc = PublicMethod.createShape(0,1440,900); + addChild(this.bgMc); + this.getDragRec(); + this.addDragEvent(); + this.init(); + this.face.stage.addEventListener(Event.RESIZE,this.reSizeWindow); + } + + public static function getInstance() : MilitaryInside + { + if(instance == null) + { + return instance = new MilitaryInside(); + } + return instance; + } + + public function setAreaMap() : void + { + var _loc1_:BuildData = new BuildData(446,323,"C1"); + var _loc2_:BuildData = new BuildData(329,389,"C2"); + var _loc3_:BuildData = new BuildData(451,456,"C3"); + var _loc4_:BuildData = new BuildData(688,617,"C4"); + var _loc5_:BuildData = new BuildData(579,554,"C5"); + var _loc6_:BuildData = new BuildData(846,550,"C6"); + var _loc7_:BuildData = new BuildData(1011,470,"C7"); + var _loc8_:BuildData = new BuildData(1145,396,"C8"); + var _loc9_:BuildData = new BuildData(1039,349,"C9"); + var _loc10_:BuildData = new BuildData(852,240,"C10"); + var _loc11_:BuildData = new BuildData(605,232,"C11"); + var _loc12_:BuildData = new BuildData(714,190,"C12"); + var _loc13_:BuildData = new BuildData(617,415,CommonData.BUILD_100); + this.userAreaMap = new HashMap(); + this.userAreaMap.put(_loc1_.posNo,_loc1_); + this.userAreaMap.put(_loc2_.posNo,_loc2_); + this.userAreaMap.put(_loc3_.posNo,_loc3_); + this.userAreaMap.put(_loc4_.posNo,_loc4_); + this.userAreaMap.put(_loc5_.posNo,_loc5_); + this.userAreaMap.put(_loc6_.posNo,_loc6_); + this.userAreaMap.put(_loc7_.posNo,_loc7_); + this.userAreaMap.put(_loc8_.posNo,_loc8_); + this.userAreaMap.put(_loc9_.posNo,_loc9_); + this.userAreaMap.put(_loc10_.posNo,_loc10_); + this.userAreaMap.put(_loc11_.posNo,_loc11_); + this.userAreaMap.put(_loc12_.posNo,_loc12_); + this.userAreaMap.put(_loc13_.posNo,_loc13_); + } + + private function reSizeWindow(param1:Event) : void + { + this.getDragRec(); + x = 0; + y = 0; + } + + private function getDragRec() : void + { + this.dragRec = new Rectangle(this.face.realWidth - this.bgMc.width,this.face.realHeight - this.bgMc.height,this.bgMc.width - this.face.realWidth,this.bgMc.height - this.face.realHeight); + } + + private function init() : void + { + addEventListener(Event.REMOVED_FROM_STAGE,this.removeFromStage); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + } + + private function addLoadingMc() : void + { + if(this.loading == null) + { + this.loading = this.face.getMovieClip(ClassConfig.lib_ui_loading); + } + this.face.stage.addChild(this.loading); + this.loading.x = this.face.realWidth / 2; + this.loading.y = this.face.realHeight / 2; + } + + private function clearLoadingMc() : void + { + if(Boolean(this.loading) && this.face.stage.contains(this.loading)) + { + this.face.stage.removeChild(this.loading); + } + } + + public function setCastleId(param1:int) : void + { + this.currentCasId = param1; + if(Boolean(this.militaryBg) && this.bgMc.contains(this.militaryBg)) + { + this.bgMc.removeChild(this.militaryBg); + } + if(this.militaryBg == null) + { + this.loadClastleBg(); + } + else + { + this.bgMc.addChild(this.militaryBg); + } + this.getBuildList(); + this.setPosi(); + } + + public function getBuildByPosNo(param1:String) : BaseBuild + { + return this.buildMcMap.get(param1); + } + + public function delBuildyPosNo(param1:String) : void + { + this.castleBuildMap.remove(param1); + var _loc2_:BaseBuild = this.getBuildByPosNo(param1); + if(_loc2_ != null && contains(_loc2_)) + { + removeChild(_loc2_); + } + this.buildMcMap.remove(param1); + var _loc3_:BuildData = _loc2_.buildData; + this.addUserBuild(_loc3_); + this.sortBuild(); + } + + private function setPosi() : void + { + this.x = this.face.realWidth / 2 - this.width / 2; + this.y = this.face.realHeight / 2 - this.height / 2; + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(CastleBuildListEvent.CASTLE_BUILDLIST,this.getBuildListResult); + } + + private function removeFromStage(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(CastleBuildListEvent.CASTLE_BUILDLIST,this.getBuildListResult); + this.clearLoadingMc(); + this.buildMcMap.eachValue(this.clearBuild); + this.buildMcMap.clear(); + this.castleBuildMap.clear(); + } + + private function clearBuild(param1:BaseBuild) : void + { + if(contains(param1)) + { + removeChild(param1); + } + } + + private function getBuildList() : void + { + this.addLoadingMc(); + ConnectService.getInstance().castleService.getCastleBuildList(this.currentCasId); + } + + private function getBuildListResult(param1:CastleBuildListEvent) : void + { + var _loc4_:CastleBuilding = null; + this.clearLoadingMc(); + var _loc2_:int = param1.casId; + if(_loc2_ != this.currentCasId) + { + return; + } + var _loc3_:Array = param1.buildListArray; + for each(_loc4_ in _loc3_) + { + this.castleBuildMap.put(_loc4_.posNo,_loc4_); + } + this.userAreaMap.eachValue(this.addUserBuild); + this.sortBuild(); + this.checkBuildStatus(); + } + + private function checkBuildStatus() : void + { + var _loc1_:TimerInfo = null; + var _loc2_:BaseBuild = null; + for each(_loc1_ in TimerManager.getInstance().getBuildTimeMap()) + { + _loc2_ = this.getBuildByPosNo(_loc1_.getPosNo()); + if(_loc2_ == null || _loc2_.castleBuild == null) + { + continue; + } + if(_loc2_.castleBuild.casBuiId == _loc1_.getTimeId()) + { + _loc2_.castleBuild.isUp = true; + _loc2_.castleBuild.setQueId(_loc1_.queId); + _loc2_.setUpStatus(); + _loc1_.process1 = _loc2_.processDo; + } + } + } + + public function createNewBuild(param1:CastleBuilding) : BaseBuild + { + this.castleBuildMap.put(param1.posNo,param1); + var _loc2_:BaseBuild = this.getBuildByPosNo(param1.posNo) as BaseBuild; + if(_loc2_.castleBuild == null) + { + removeChild(_loc2_); + } + var _loc3_:BaseBuild = this.getBuildByEntId(param1,_loc2_.buildData); + addChild(_loc3_); + _loc3_.x = _loc3_.buildData.x; + _loc3_.y = _loc3_.buildData.y; + this.buildMcMap.put(param1.posNo,_loc3_); + _loc2_ = null; + this.sortBuild(); + return _loc3_; + } + + private function addUserBuild(param1:BuildData) : void + { + var _loc2_:BaseBuild = null; + var _loc3_:CastleBuilding = this.castleBuildMap.get(param1.posNo); + if(_loc3_) + { + _loc2_ = this.getBuildByEntId(_loc3_,param1); + } + else + { + _loc2_ = new Emptyarea(param1,2); + _loc2_.setTipText(); + } + if(_loc2_) + { + addChild(_loc2_); + _loc2_.x = _loc2_.buildData.x; + _loc2_.y = _loc2_.buildData.y; + this.buildMcMap.put(param1.posNo,_loc2_); + } + } + + private function clickBuild(param1:MouseEvent) : void + { + var _loc2_:BaseBuild = param1.currentTarget as BaseBuild; + if(_loc2_ == null) + { + _loc2_ = param1.target.parent as BaseBuild; + if(_loc2_ == null) + { + return; + } + } + var _loc3_:BuildControlBar = BuildControlBar.getInstance(); + _loc3_.setCastleBuild(_loc2_.castleBuild); + _loc3_.setCastleType(BuildControlBar.CastleType_3); + addChild(_loc3_); + _loc3_.x = this.mouseX; + _loc3_.y = this.mouseY; + param1.stopImmediatePropagation(); + } + + private function getBuildByEntId(param1:CastleBuilding, param2:BuildData) : BaseBuild + { + var _loc3_:BaseBuild = null; + switch(param1.buiEntId) + { + case CommonData.MILITARY_1: + _loc3_ = new MilitaryMain(param2); + _loc3_.mouseEnabled = false; + _loc3_.markMc.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.MILITARY_2: + _loc3_ = new BarracksBuild(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.MILITARY_3: + _loc3_ = new PracticeState(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.MILITARY_4: + _loc3_ = new RefineCamp(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.MILITARY_5: + _loc3_ = new Fort(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + break; + case CommonData.MILITARY_6: + _loc3_ = new StagingCamp(param2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + } + _loc3_.castleBuild = param1; + _loc3_.setBuildRes(); + _loc3_.setTipText(); + _loc3_.viewBuildInfo(); + return _loc3_; + } + + private function sortBuild() : void + { + var _loc3_:BaseBuild = null; + var _loc4_:* = undefined; + var _loc5_:BaseBuild = null; + var _loc1_:Array = new Array(); + var _loc2_:Array = this.buildMcMap.values(); + for each(_loc3_ in _loc2_) + { + _loc1_.push(getChildIndex(_loc3_)); + } + _loc1_.sort(Array.NUMERIC); + _loc2_.sortOn("y"); + for(_loc4_ in _loc2_) + { + _loc5_ = _loc2_[_loc4_]; + setChildIndex(_loc5_,_loc1_[_loc4_]); + } + } + + public function setBuildNameView() : void + { + var _loc1_:BaseBuild = null; + for each(_loc1_ in this.buildMcMap.values()) + { + _loc1_.viewBuildInfo(); + } + } + + private function loadClastleBg() : void + { + this.loadBg = new LoadResource("pic/develop/military.swf",this.loadBgBack); + } + + private function loadBgBack(param1:Event) : void + { + this.militaryBg = param1.target.loader.content; + this.bgMc.addChild(this.militaryBg); + this.loadBg.clear(); + } + + private function addDragEvent() : void + { + this.dragTools = new DragTools(this,{"methods":"s"}); + addEventListener(MouseEvent.MOUSE_DOWN,this.mouseDownHandler); + } + + private function mouseDownHandler(param1:MouseEvent) : void + { + this.startX = this.face.stage.mouseX; + this.startY = this.face.stage.mouseY; + this.face.stage.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.face.stage.addEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + this.face.stage.addEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseMove(param1:MouseEvent) : void + { + this.face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.dragTools.beginDrag(false,this.dragRec); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + this.face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + this.face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseUp(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + this.face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + this.face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + } +} + diff --git a/flash_decompiled/com/view/TownInside.as b/flash_decompiled/com/view/TownInside.as new file mode 100644 index 0000000..cd9365a --- /dev/null +++ b/flash_decompiled/com/view/TownInside.as @@ -0,0 +1,680 @@ +package com.view +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.common.DragTools; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.AllQueueEvent; + import com.control.castle.event.CastleBuildListEvent; + import com.data.DataModoule; + import com.data.data.city.CastleBuilding; + import com.utils.HashMap; + import com.utils.TimerManager; + import com.view.mc.button.BuildControlBar; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import com.view.ui.activity.FuyinBuild; + import com.view.ui.activity.JunShiBuild; + import com.view.ui.armyboss.ArmyBoss; + import com.view.ui.babel.BabelBuild; + import com.view.ui.barracks.BarracksBuild; + import com.view.ui.biwu.WushuBuild; + import com.view.ui.buildlist.TimerInfo; + import com.view.ui.countybattle.CountyBattleBuild; + import com.view.ui.fish.FishBuild; + import com.view.ui.hebi.HebiBuild; + import com.view.ui.herobattle.HeroBattleBuild; + import com.view.ui.heroboss.HeroBoss; + import com.view.ui.horse.Horse; + import com.view.ui.horse.RadomBox; + import com.view.ui.hospital.HospitalBuild; + import com.view.ui.hotel.HotelBuild; + import com.view.ui.house.HouseBuild; + import com.view.ui.iron.IronBuild; + import com.view.ui.league.LeagueBuild; + import com.view.ui.leitai.LeitaiBuild; + import com.view.ui.market.MarketBuild; + import com.view.ui.office.Emptyarea; + import com.view.ui.office.MainCity; + import com.view.ui.riches.RichesBuild; + import com.view.ui.teach.TechBuild; + import com.view.ui.temple.TempleBuild; + import com.view.ui.wall.*; + import com.view.ui.warehouse.WarehouseBuild; + import com.view.ui.wuguan.WuguanBuild; + import flash.display.DisplayObject; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.geom.Rectangle; + + public class TownInside extends Sprite + { + + private static var instance:TownInside; + + private var face:InstallFace = InstallFace.getInstance(); + + private var bgMc:Sprite; + + private var bgUrl:String; + + private var loadBg:LoadResource; + + private var dragRec:Rectangle; + + private var dragTools:DragTools; + + private var userAreaMap:HashMap; + + private var npcAreaMap:HashMap; + + public var npcBuildMap:HashMap = new HashMap(); + + private var loading:MovieClip; + + private var curCasId:int; + + private var window:Rectangle = new Rectangle(0,0,1440,900); + + private var cityBg:DisplayObject; + + public var castleBuildMap:HashMap = new HashMap(); + + public var buildMcMap:HashMap = new HashMap(); + + public var hasHospital:Boolean; + + private var startX:Number; + + private var startY:Number; + + public function TownInside() + { + super(); + this.scrollRect = this.window; + this.setAreaMap(); + this.bgMc = PublicMethod.createShape(0,1440,900); + addChild(this.bgMc); + this.getDragRec(); + this.addDragEvent(); + this.bgUrl = DataModoule.getInstance().userMgr.castle.entityCapacity.iconPath; + this.addEvent(); + this.face.stage.addEventListener(Event.RESIZE,this.reSizeWindow); + } + + public static function getInstance() : TownInside + { + if(instance == null) + { + return instance = new TownInside(); + } + return instance; + } + + private function setAreaMap() : void + { + var _loc1_:BuildData = new BuildData(823,662,"C1"); + var _loc2_:BuildData = new BuildData(725,620,"C2"); + var _loc3_:BuildData = new BuildData(640,567,"C3"); + var _loc4_:BuildData = new BuildData(755,548,"C4"); + var _loc5_:BuildData = new BuildData(888,617,"C5"); + var _loc6_:BuildData = new BuildData(994,576,"C6"); + var _loc7_:BuildData = new BuildData(909,533,"C7"); + var _loc8_:BuildData = new BuildData(548,457,"C8"); + var _loc9_:BuildData = new BuildData(451,482,"C9"); + var _loc10_:BuildData = new BuildData(370,436,"C10"); + var _loc11_:BuildData = new BuildData(292,393,"C11"); + var _loc12_:BuildData = new BuildData(397,346,"C12"); + var _loc13_:BuildData = new BuildData(479,407,"C13"); + var _loc14_:BuildData = new BuildData(498,311,"C14"); + var _loc15_:BuildData = new BuildData(1150,518,"C15"); + var _loc16_:BuildData = new BuildData(1225,471,"C16"); + var _loc17_:BuildData = new BuildData(1281,412,"C17"); + var _loc18_:BuildData = new BuildData(1151,427,"C18"); + var _loc19_:BuildData = new BuildData(1192,357,"C19"); + var _loc20_:BuildData = new BuildData(1063,361,"C20"); + var _loc21_:BuildData = new BuildData(1122,302,"C21"); + var _loc22_:BuildData = new BuildData(986,237,"C22"); + var _loc23_:BuildData = new BuildData(878,192,"C23"); + var _loc24_:BuildData = new BuildData(876,258,"C24"); + var _loc25_:BuildData = new BuildData(684,269,"C25"); + var _loc26_:BuildData = new BuildData(777,121,"C26"); + var _loc27_:BuildData = new BuildData(725,207,"C27"); + var _loc28_:BuildData = new BuildData(601,225,"C28"); + this.userAreaMap = new HashMap(); + this.npcAreaMap = new HashMap(); + this.userAreaMap.put(_loc1_.posNo,_loc1_); + this.userAreaMap.put(_loc2_.posNo,_loc2_); + this.userAreaMap.put(_loc3_.posNo,_loc3_); + this.userAreaMap.put(_loc4_.posNo,_loc4_); + this.userAreaMap.put(_loc5_.posNo,_loc5_); + this.userAreaMap.put(_loc6_.posNo,_loc6_); + this.userAreaMap.put(_loc7_.posNo,_loc7_); + this.userAreaMap.put(_loc8_.posNo,_loc8_); + this.userAreaMap.put(_loc9_.posNo,_loc9_); + this.userAreaMap.put(_loc10_.posNo,_loc10_); + this.userAreaMap.put(_loc11_.posNo,_loc11_); + this.userAreaMap.put(_loc12_.posNo,_loc12_); + this.userAreaMap.put(_loc13_.posNo,_loc13_); + this.userAreaMap.put(_loc14_.posNo,_loc14_); + this.userAreaMap.put(_loc15_.posNo,_loc15_); + this.userAreaMap.put(_loc16_.posNo,_loc16_); + this.userAreaMap.put(_loc17_.posNo,_loc17_); + this.userAreaMap.put(_loc18_.posNo,_loc18_); + this.userAreaMap.put(_loc19_.posNo,_loc19_); + this.userAreaMap.put(_loc20_.posNo,_loc20_); + this.userAreaMap.put(_loc21_.posNo,_loc21_); + this.userAreaMap.put(_loc22_.posNo,_loc22_); + this.userAreaMap.put(_loc23_.posNo,_loc23_); + this.userAreaMap.put(_loc24_.posNo,_loc24_); + this.userAreaMap.put(_loc25_.posNo,_loc25_); + this.userAreaMap.put(_loc26_.posNo,_loc26_); + this.userAreaMap.put(_loc27_.posNo,_loc27_); + this.userAreaMap.put(_loc28_.posNo,_loc28_); + var _loc29_:BuildData = new BuildData(726,370,CommonData.BUILD_100); + var _loc30_:BuildData = new BuildData(0,-20,CommonData.BUILD_101); + this.userAreaMap.put(_loc29_.posNo,_loc29_); + this.userAreaMap.put(_loc30_.posNo,_loc30_); + var _loc31_:BuildData = new BuildData(147,352,CommonData.BUILD_102); + var _loc32_:BuildData = new BuildData(308,188,CommonData.BUILD_103); + var _loc33_:BuildData = new BuildData(488,147,CommonData.BUILD_104); + var _loc34_:BuildData = new BuildData(619,108,CommonData.BUILD_105); + var _loc35_:BuildData = new BuildData(908,-7,CommonData.BUILD_106); + var _loc36_:BuildData = new BuildData(1060,183,CommonData.BUILD_107); + var _loc37_:BuildData = new BuildData(1283,320,CommonData.BUILD_108); + var _loc38_:BuildData = new BuildData(1020,415,CommonData.BUILD_109); + var _loc39_:BuildData = new BuildData(500,190,CommonData.BUILD_110); + var _loc40_:BuildData = new BuildData(660,465,CommonData.BUILD_111); + var _loc41_:BuildData = new BuildData(990,290,CommonData.BUILD_112); + var _loc42_:BuildData = new BuildData(610,310,CommonData.BUILD_113); + var _loc43_:BuildData = new BuildData(530,530,CommonData.BUILD_114); + var _loc44_:BuildData = new BuildData(230,410,CommonData.BUILD_116); + var _loc45_:BuildData = new BuildData(300,420,CommonData.BUILD_117); + this.npcAreaMap.put(_loc31_.posNo,_loc31_); + this.npcAreaMap.put(_loc32_.posNo,_loc32_); + this.npcAreaMap.put(_loc33_.posNo,_loc33_); + this.npcAreaMap.put(_loc34_.posNo,_loc34_); + this.npcAreaMap.put(_loc35_.posNo,_loc35_); + this.npcAreaMap.put(_loc36_.posNo,_loc36_); + this.npcAreaMap.put(_loc37_.posNo,_loc37_); + this.npcAreaMap.put(_loc38_.posNo,_loc38_); + if(CommonData.openRiches) + { + this.npcAreaMap.put(_loc39_.posNo,_loc39_); + } + this.npcAreaMap.put(_loc40_.posNo,_loc40_); + this.npcAreaMap.put(_loc41_.posNo,_loc41_); + if(CommonData.openRadomBox) + { + this.npcAreaMap.put(_loc42_.posNo,_loc42_); + } + if(CommonData.openArmyBoss) + { + this.npcAreaMap.put(_loc43_.posNo,_loc43_); + } + if(CommonData.openJunShiSkill) + { + this.npcAreaMap.put(_loc44_.posNo,_loc44_); + this.npcAreaMap.put(_loc45_.posNo,_loc45_); + } + } + + private function reSizeWindow(param1:Event) : void + { + this.getDragRec(); + x = 0; + y = 0; + if(Boolean(this.loading) && this.face.stage.contains(this.loading)) + { + this.loading.x = this.face.realWidth / 2; + this.loading.y = this.face.realHeight / 2; + } + } + + private function setPosi() : void + { + this.x = this.face.realWidth / 2 - this.width / 2; + this.y = this.face.realHeight / 2 - this.height / 2; + } + + private function getDragRec() : void + { + var _loc1_:int = this.face.realWidth; + var _loc2_:int = this.face.realHeight; + this.dragRec = new Rectangle(_loc1_ - this.bgMc.width,_loc2_ - this.bgMc.height,this.bgMc.width - _loc1_,this.bgMc.height - _loc2_); + } + + private function addCityBg() : void + { + if(this.cityBg == null) + { + this.loadClastleBg(); + } + else if(!this.bgMc.contains(this.cityBg)) + { + this.bgMc.addChild(this.cityBg); + } + this.setPosi(); + } + + public function getCastleBuildList() : void + { + this.addLoadingMc(); + this.curCasId = DataModoule.getInstance().userMgr.castle.casId; + ConnectService.getInstance().castleService.getCastleBuildList(this.curCasId); + } + + private function addLoadingMc() : void + { + if(this.loading == null) + { + this.loading = this.face.getMovieClip(ClassConfig.lib_ui_loading); + } + this.face.stage.addChild(this.loading); + this.loading.x = this.face.realWidth / 2; + this.loading.y = this.face.realHeight / 2; + } + + private function clearLoadingMc() : void + { + if(Boolean(this.loading) && this.face.stage.contains(this.loading)) + { + this.face.stage.removeChild(this.loading); + } + } + + public function delBuildyPosNo(param1:String) : void + { + this.castleBuildMap.remove(param1); + var _loc2_:BaseBuild = this.getBuildByPosNo(param1); + if(_loc2_ != null && contains(_loc2_)) + { + removeChild(_loc2_); + } + this.buildMcMap.remove(param1); + var _loc3_:BuildData = _loc2_.buildData; + this.addUserBuild(_loc3_); + this.sortBuild(); + } + + private function addEvent() : void + { + addEventListener(Event.REMOVED_FROM_STAGE,this.removeFromStage); + addEventListener(Event.ADDED_TO_STAGE,this.addToStage); + ConnectService.getInstance().addEventListener(AllQueueEvent.AllQueue,this.getAllQueueResult); + ConnectService.getInstance().addEventListener(CastleBuildListEvent.CASTLE_BUILDLIST,this.getBuildListResult); + } + + private function getAllQueueResult(param1:AllQueueEvent) : void + { + this.getCastleBuildList(); + } + + private function addToStage(param1:Event) : void + { + this.addCityBg(); + } + + private function removeFromStage(param1:Event) : void + { + this.clearLoadingMc(); + this.npcBuildMap.eachValue(this.clearNpcBuild); + this.npcBuildMap.clear(); + this.buildMcMap.eachValue(this.clearUserBuild); + this.buildMcMap.clear(); + this.castleBuildMap.clear(); + } + + private function clearUserBuild(param1:BaseBuild) : void + { + if(contains(param1)) + { + removeChild(param1); + } + } + + private function clearNpcBuild(param1:BaseBuild) : void + { + if(contains(param1)) + { + removeChild(param1); + } + } + + private function loadClastleBg() : void + { + var _loc1_:Date = new Date(); + var _loc2_:int = _loc1_.month + 1; + if(_loc2_ == 12 || _loc2_ == 1 || _loc2_ == 2) + { + this.loadBg = new LoadResource("pic/develop/d_" + this.bgUrl,this.loadBgBack); + } + else + { + this.loadBg = new LoadResource("pic/develop/" + this.bgUrl,this.loadBgBack); + } + } + + private function loadBgBack(param1:Event) : void + { + if(Boolean(this.cityBg) && this.bgMc.contains(this.cityBg)) + { + this.bgMc.removeChild(this.cityBg); + } + this.cityBg = param1.target.loader.content; + this.bgMc.addChild(this.cityBg); + this.loadBg.clear(); + } + + private function addNpcBuild(param1:BuildData) : void + { + var _loc2_:BaseBuild = null; + switch(param1.posNo) + { + case CommonData.BUILD_102: + _loc2_ = new LeagueBuild(param1); + break; + case CommonData.BUILD_103: + _loc2_ = new HeroBattleBuild(param1); + break; + case CommonData.BUILD_104: + _loc2_ = new BabelBuild(param1); + break; + case CommonData.BUILD_105: + _loc2_ = new HebiBuild(param1); + break; + case CommonData.BUILD_106: + _loc2_ = new CountyBattleBuild(param1); + break; + case CommonData.BUILD_107: + _loc2_ = new WushuBuild(param1); + break; + case CommonData.BUILD_108: + _loc2_ = new LeitaiBuild(param1); + break; + case CommonData.BUILD_109: + _loc2_ = new FishBuild(param1); + break; + case CommonData.BUILD_110: + _loc2_ = new RichesBuild(param1); + break; + case CommonData.BUILD_111: + _loc2_ = new HeroBoss(param1); + break; + case CommonData.BUILD_112: + _loc2_ = new Horse(param1); + break; + case CommonData.BUILD_113: + _loc2_ = new RadomBox(param1); + break; + case CommonData.BUILD_114: + _loc2_ = new ArmyBoss(param1); + break; + case CommonData.BUILD_116: + _loc2_ = new JunShiBuild(param1); + break; + case CommonData.BUILD_117: + _loc2_ = new FuyinBuild(param1); + } + if(_loc2_) + { + addChild(_loc2_); + this.npcBuildMap.put(param1.posNo,_loc2_); + _loc2_.x = _loc2_.buildData.x; + _loc2_.y = _loc2_.buildData.y; + _loc2_.viewBuildInfo(); + } + } + + private function getBuildListResult(param1:CastleBuildListEvent) : void + { + var _loc4_:CastleBuilding = null; + this.clearLoadingMc(); + var _loc2_:int = param1.casId; + if(_loc2_ != this.curCasId) + { + return; + } + var _loc3_:Array = param1.buildListArray; + for each(_loc4_ in _loc3_) + { + this.castleBuildMap.put(_loc4_.posNo,_loc4_); + } + this.npcAreaMap.eachValue(this.addNpcBuild); + this.userAreaMap.eachValue(this.addUserBuild); + this.sortBuild(); + this.checkBuildStatus(); + } + + private function checkBuildStatus() : void + { + var _loc1_:TimerInfo = null; + var _loc2_:BaseBuild = null; + for each(_loc1_ in TimerManager.getInstance().getBuildTimeMap()) + { + _loc2_ = this.getBuildByPosNo(_loc1_.getPosNo()); + if(_loc2_ == null || _loc2_.castleBuild == null) + { + continue; + } + if(_loc2_.castleBuild.casBuiId == _loc1_.getTimeId()) + { + _loc2_.castleBuild.isUp = true; + _loc2_.castleBuild.setQueId(_loc1_.queId); + _loc2_.setUpStatus(); + _loc1_.process1 = _loc2_.processDo; + } + } + } + + public function createNewBuild(param1:CastleBuilding) : BaseBuild + { + this.castleBuildMap.put(param1.posNo,param1); + var _loc2_:BaseBuild = this.getBuildByPosNo(param1.posNo) as BaseBuild; + if(_loc2_.castleBuild == null) + { + removeChild(_loc2_); + } + var _loc3_:BaseBuild = this.getBuildByEntId(param1,_loc2_.buildData); + addChild(_loc3_); + _loc3_.x = _loc3_.buildData.x; + _loc3_.y = _loc3_.buildData.y; + this.buildMcMap.put(param1.posNo,_loc3_); + _loc2_ = null; + this.sortBuild(); + return _loc3_; + } + + public function casLvUp(param1:String) : void + { + if(this.bgUrl != param1) + { + this.bgUrl = param1; + this.loadClastleBg(); + } + } + + private function addUserBuild(param1:BuildData) : void + { + var _loc2_:BaseBuild = null; + var _loc3_:CastleBuilding = this.castleBuildMap.get(param1.posNo); + if(_loc3_) + { + _loc2_ = this.getBuildByEntId(_loc3_,param1); + } + else + { + _loc2_ = new Emptyarea(param1); + _loc2_.setTipText(); + } + if(_loc2_) + { + addChild(_loc2_); + _loc2_.x = _loc2_.buildData.x; + _loc2_.y = _loc2_.buildData.y; + this.buildMcMap.put(param1.posNo,_loc2_); + } + } + + private function clickBuild(param1:MouseEvent) : void + { + var _loc2_:BaseBuild = param1.currentTarget as BaseBuild; + if(_loc2_ == null) + { + _loc2_ = param1.target.parent as BaseBuild; + if(_loc2_ == null) + { + return; + } + } + var _loc3_:BuildControlBar = BuildControlBar.getInstance(); + _loc3_.setCastleBuild(_loc2_.castleBuild); + _loc3_.setCastleType(BuildControlBar.CastleType_1); + addChild(_loc3_); + _loc3_.x = this.mouseX; + _loc3_.y = this.mouseY; + param1.stopImmediatePropagation(); + } + + private function getBuildByEntId(param1:CastleBuilding, param2:BuildData) : BaseBuild + { + var _loc3_:BaseBuild = null; + switch(param1.buiEntId) + { + case CommonData.BUILD_CITY: + _loc3_ = new MainCity(param2); + _loc3_.mouseEnabled = false; + break; + case CommonData.BUILD_WALL: + _loc3_ = new CityWall(param2); + _loc3_.mouseEnabled = false; + break; + case CommonData.BUILD_HOUSE: + _loc3_ = new HouseBuild(param2); + break; + case CommonData.BUILD_WAREHOUSE: + _loc3_ = new WarehouseBuild(param2); + break; + case CommonData.BUILD_MARKET: + _loc3_ = new MarketBuild(param2); + break; + case CommonData.BUILD_PUB: + _loc3_ = new HotelBuild(param2); + break; + case CommonData.BUILD_CAMP: + _loc3_ = new BarracksBuild(param2); + break; + case CommonData.BUILD_MEDICAL: + _loc3_ = new HospitalBuild(param2); + this.hasHospital = true; + break; + case CommonData.BUILD_WORK: + _loc3_ = new WuguanBuild(param2); + break; + case CommonData.BUILD_BOOK: + _loc3_ = new TechBuild(param2); + break; + case CommonData.BUILD_SMITHY: + _loc3_ = new IronBuild(param2); + break; + case CommonData.BUILD_MISSION: + _loc3_ = new TempleBuild(param2); + } + if(param1.buiEntId == CommonData.BUILD_WALL) + { + _loc3_.markMc.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + } + else + { + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBuild,false,0,true); + } + _loc3_.castleBuild = param1; + _loc3_.setBuildRes(); + _loc3_.setTipText(); + _loc3_.viewBuildInfo(); + return _loc3_; + } + + public function getBuildByPosNo(param1:String) : BaseBuild + { + return this.buildMcMap.get(param1); + } + + private function sortBuild() : void + { + var _loc3_:BaseBuild = null; + var _loc4_:* = undefined; + var _loc5_:BaseBuild = null; + var _loc1_:Array = new Array(); + var _loc2_:Array = this.buildMcMap.values(); + for each(_loc3_ in _loc2_) + { + _loc1_.push(getChildIndex(_loc3_)); + } + _loc1_.sort(Array.NUMERIC); + _loc2_.sortOn("y"); + for(_loc4_ in _loc2_) + { + _loc5_ = _loc2_[_loc4_]; + setChildIndex(_loc5_,_loc1_[_loc4_]); + } + } + + public function setBuildNameView() : void + { + var _loc1_:BaseBuild = null; + var _loc2_:BaseBuild = null; + for each(_loc1_ in this.buildMcMap.values()) + { + _loc1_.viewBuildInfo(); + } + for each(_loc2_ in this.npcBuildMap.values()) + { + _loc2_.viewBuildInfo(); + } + } + + private function addDragEvent() : void + { + this.dragTools = new DragTools(this,{"methods":"s"}); + addEventListener(MouseEvent.MOUSE_DOWN,this.mouseDownHandler); + } + + private function mouseDownHandler(param1:MouseEvent) : void + { + this.startX = this.face.stage.mouseX; + this.startY = this.face.stage.mouseY; + this.face.stage.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.face.stage.addEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + this.face.stage.addEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseMove(param1:MouseEvent) : void + { + this.face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.dragTools.beginDrag(false,this.dragRec); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + this.face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + this.face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseUp(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + this.face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + this.face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + } +} + diff --git a/flash_decompiled/com/view/UIListManage.as b/flash_decompiled/com/view/UIListManage.as new file mode 100644 index 0000000..135d4cf --- /dev/null +++ b/flash_decompiled/com/view/UIListManage.as @@ -0,0 +1,95 @@ +package com.view +{ + import com.InstallFace; + import com.greensock.TweenMax; + import com.view.ui.BaseUI; + + public class UIListManage + { + + private static var instance:UIListManage; + + private var face:InstallFace = InstallFace.getInstance(); + + private var _openUI:BaseUI; + + public function UIListManage() + { + super(); + } + + public static function getInstance() : UIListManage + { + if(instance == null) + { + return instance = new UIListManage(); + } + return instance; + } + + public function addUI(param1:BaseUI) : void + { + if(this._openUI) + { + if(this._openUI != param1) + { + this.delFromStage(this._openUI); + this.addToStage(param1); + this._openUI = param1; + } + } + else + { + this.addToStage(param1); + this._openUI = param1; + } + } + + public function containsUI(param1:BaseUI) : Boolean + { + return this.face.stage.contains(param1); + } + + public function getClass(param1:Class) : BaseUI + { + if(Boolean(this._openUI) && this._openUI is param1) + { + return this._openUI; + } + return null; + } + + public function delUI(param1:BaseUI) : void + { + if(Boolean(param1) && this.face.stage.contains(param1)) + { + this.delFromStage(param1); + this._openUI = null; + } + } + + private function addToStage(param1:BaseUI) : void + { + this.face.stage.addChild(param1); + param1.alpha = 0; + TweenMax.to(param1,0.5,{"alpha":1}); + } + + private function delFromStage(param1:BaseUI) : void + { + if(this.face.stage.contains(param1)) + { + this.face.stage.removeChild(param1); + } + } + + public function clearAll() : void + { + if(this._openUI) + { + this.delUI(this._openUI); + } + } + } +} + diff --git a/flash_decompiled/com/view/cache/BuildCache.as b/flash_decompiled/com/view/cache/BuildCache.as new file mode 100644 index 0000000..8cae72e --- /dev/null +++ b/flash_decompiled/com/view/cache/BuildCache.as @@ -0,0 +1,162 @@ +package com.view.cache +{ + import com.data.MemeberShip; + import com.data.data.city.CastleBuilding; + import com.utils.HashMap; + + public class BuildCache + { + + private static var instance:BuildCache; + + public var buiMap:HashMap; + + public var newBuildMap:HashMap; + + public function BuildCache() + { + super(); + this.buiMap = new HashMap(); + this.newBuildMap = new HashMap(); + } + + public static function getInstance() : BuildCache + { + if(instance == null) + { + instance = new BuildCache(); + } + return instance; + } + + public function getBuiList(param1:int) : Array + { + return this.buiMap.get(param1); + } + + public function setBuiList(param1:int, param2:Array) : void + { + if(this.buiMap.get(param1) == null) + { + this.buiMap.put(param1,param2); + } + } + + public function getCastleBuilding(param1:int, param2:String) : CastleBuilding + { + var _loc4_:CastleBuilding = null; + var _loc3_:Array = this.buiMap.get(param1); + if(_loc3_ != null) + { + for each(_loc4_ in _loc3_) + { + if(_loc4_.posNo == param2) + { + return _loc4_; + } + } + } + return null; + } + + public function getCastleBuildingByEntid(param1:int, param2:int) : CastleBuilding + { + var _loc4_:CastleBuilding = null; + var _loc5_:CastleBuilding = null; + var _loc3_:Array = this.buiMap.get(param1); + if(_loc3_ != null) + { + for each(_loc5_ in _loc3_) + { + if(_loc5_.buiEntId == param2) + { + if(_loc4_ == null) + { + _loc4_ = _loc5_; + } + else if(_loc4_.level < _loc5_.level) + { + _loc4_ = _loc5_; + } + } + } + if(_loc4_) + { + return _loc4_; + } + } + if(param1 != MemeberShip.getMainCastle().casId) + { + return this.getCastleBuildingByEntid(MemeberShip.getMainCastle().casId,param2); + } + return null; + } + + public function getBuildNums(param1:int, param2:int) : int + { + var _loc5_:CastleBuilding = null; + var _loc3_:int = 0; + var _loc4_:Array = this.buiMap.get(param1); + if((Boolean(_loc4_)) && _loc4_.length > 0) + { + for each(_loc5_ in _loc4_) + { + if(_loc5_.buiEntId == param2) + { + _loc3_++; + } + } + } + return _loc3_; + } + + public function updateCastleBuild(param1:CastleBuilding) : void + { + var _loc3_:* = undefined; + var _loc2_:Array = this.getBuiList(param1.casId); + if(_loc2_) + { + for(_loc3_ in _loc2_) + { + if(_loc2_[_loc3_].posNo == param1.posNo) + { + _loc2_[_loc3_] = param1; + return; + } + } + _loc2_.push(param1); + } + } + + public function delCastleBuild(param1:int, param2:String) : void + { + var _loc4_:* = undefined; + var _loc3_:Array = this.getBuiList(param1); + if(_loc3_) + { + for(_loc4_ in _loc3_) + { + if(_loc3_[_loc4_].posNo == param2) + { + _loc3_.splice(_loc4_,1); + return; + } + } + } + } + + public function getNewBuiList(param1:String) : Array + { + return this.newBuildMap.get(param1); + } + + public function setNewBuiList(param1:String, param2:Array) : void + { + if(this.newBuildMap.get(param1) == null) + { + this.newBuildMap.put(param1,param2); + } + } + } +} + diff --git a/flash_decompiled/com/view/cache/ImgCache.as b/flash_decompiled/com/view/cache/ImgCache.as new file mode 100644 index 0000000..6d31e0e --- /dev/null +++ b/flash_decompiled/com/view/cache/ImgCache.as @@ -0,0 +1,45 @@ +package com.view.cache +{ + import com.utils.HashMap; + import flash.display.Bitmap; + + public class ImgCache + { + + private static var instance:ImgCache; + + public var imgMap:HashMap; + + public function ImgCache() + { + super(); + this.imgMap = new HashMap(); + } + + public static function getInstance() : ImgCache + { + if(instance == null) + { + instance = new ImgCache(); + } + return instance; + } + + public function getImg(param1:String) : Bitmap + { + return this.imgMap.get(param1); + } + + public function setImg(param1:String, param2:Bitmap) : void + { + if(this.imgMap.containsKey(param1)) + { + return; + } + var _loc3_:Bitmap = new Bitmap(); + _loc3_.bitmapData = param2.bitmapData.clone(); + this.imgMap.put(param1,_loc3_); + } + } +} + diff --git a/flash_decompiled/com/view/mc/MyCellRenderer.as b/flash_decompiled/com/view/mc/MyCellRenderer.as new file mode 100644 index 0000000..b39354a --- /dev/null +++ b/flash_decompiled/com/view/mc/MyCellRenderer.as @@ -0,0 +1,26 @@ +package com.view.mc +{ + import fl.controls.listClasses.CellRenderer; + import fl.controls.listClasses.ICellRenderer; + import flash.text.TextFormat; + + public class MyCellRenderer extends CellRenderer implements ICellRenderer + { + + public function MyCellRenderer() + { + super(); + } + + override protected function drawBackground() : void + { + var _loc1_:TextFormat = new TextFormat(); + _loc1_.color = data.color; + _loc1_.size = 12; + _loc1_.align = "center"; + setStyle("textFormat",_loc1_); + super.drawBackground(); + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/BuildControlBar.as b/flash_decompiled/com/view/mc/button/BuildControlBar.as new file mode 100644 index 0000000..7a74d07 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/BuildControlBar.as @@ -0,0 +1,320 @@ +package com.view.mc.button +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.data.data.city.CastleBuilding; + import com.data.data.items.AddSpeed; + import com.utils.TimerManager; + import com.view.EconomicInside; + import com.view.MilitaryInside; + import com.view.TownInside; + import com.view.cache.BuildCache; + import com.view.tip.BuildUpTip; + import com.view.ui.BaseBuild; + import com.view.ui.addspeed.AddSpeedUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class BuildControlBar extends ButtonSprite + { + + private static var instance:BuildControlBar; + + public static const CastleType_1:int = 1; + + public static const CastleType_2:int = 2; + + public static const CastleType_3:int = 3; + + private var upStatus:Boolean; + + private var canUp:Boolean; + + private var currentBuild:CastleBuilding; + + private var upTip:BuildUpTip; + + private var castleType:int; + + public function BuildControlBar() + { + super(); + super.getBtnBg(ClassConfig.sprite_btn_5); + btnBg.left_btn.gotoAndStop(1); + btnBg.enter_btn.gotoAndStop(1); + btnBg.right_btn.gotoAndStop(1); + btnBg.right_txt.mouseEnabled = false; + btnBg.left_txt.mouseEnabled = false; + btnBg.center_txt.mouseEnabled = false; + this.addMouseEvent(); + } + + public static function getInstance() : BuildControlBar + { + if(instance == null) + { + instance = new BuildControlBar(); + } + return instance; + } + + override public function addMouseEvent() : void + { + btnBg.left_btn.addEventListener(MouseEvent.ROLL_OVER,this.mouse_over); + btnBg.left_btn.addEventListener(MouseEvent.ROLL_OUT,this.mouse_out); + btnBg.left_btn.addEventListener(MouseEvent.MOUSE_DOWN,this.mouse_down); + btnBg.left_btn.addEventListener(MouseEvent.MOUSE_UP,this.mouse_up); + btnBg.left_btn.addEventListener(MouseEvent.CLICK,this.destroyBuild); + btnBg.enter_btn.addEventListener(MouseEvent.ROLL_OVER,this.mouse_over); + btnBg.enter_btn.addEventListener(MouseEvent.ROLL_OUT,this.mouse_out); + btnBg.enter_btn.addEventListener(MouseEvent.MOUSE_DOWN,this.mouse_down); + btnBg.enter_btn.addEventListener(MouseEvent.MOUSE_UP,this.mouse_up); + btnBg.enter_btn.addEventListener(MouseEvent.CLICK,this.viewBuild); + btnBg.right_btn.addEventListener(MouseEvent.ROLL_OVER,this.mouse_over); + btnBg.right_btn.addEventListener(MouseEvent.ROLL_OUT,this.mouse_out); + btnBg.right_btn.addEventListener(MouseEvent.MOUSE_DOWN,this.mouse_down); + btnBg.right_btn.addEventListener(MouseEvent.MOUSE_UP,this.mouse_up); + btnBg.right_btn.addEventListener(MouseEvent.CLICK,this.upBuild); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + } + + private function addEvent(param1:Event) : void + { + if(!ConnectService.getInstance().hasEventListener(CastleEvent.CASTLE_selectCasBui)) + { + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_selectCasBui,this.getSelectSucc); + } + } + + private function delEvent(param1:Event) : void + { + if(ConnectService.getInstance().hasEventListener(CastleEvent.CASTLE_selectCasBui)) + { + ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_selectCasBui,this.getSelectSucc); + } + } + + override public function mouse_over(param1:MouseEvent) : void + { + if(param1.currentTarget == btnBg.right_btn && !this.canUp) + { + return; + } + param1.currentTarget.gotoAndStop(2); + } + + override public function mouse_out(param1:MouseEvent) : void + { + if(param1.currentTarget == btnBg.right_btn && !this.canUp) + { + return; + } + param1.currentTarget.gotoAndStop(1); + } + + override public function mouse_down(param1:MouseEvent) : void + { + if(param1.currentTarget == btnBg.right_btn && !this.canUp) + { + return; + } + param1.currentTarget.gotoAndStop(3); + } + + override public function mouse_up(param1:MouseEvent) : void + { + if(param1.currentTarget == btnBg.right_btn && !this.canUp) + { + return; + } + param1.currentTarget.gotoAndStop(1); + } + + private function addTip() : void + { + if(this.currentBuild == null) + { + return; + } + if(!this.canUp) + { + if(this.upTip) + { + this.upTip.destroyTip(); + } + return; + } + if(this.currentBuild.isUp) + { + if(this.upTip != null) + { + this.upTip.destroyTip(); + } + } + else + { + this.loadTip(); + } + } + + private function loadTip() : void + { + var _loc1_:CastleBuilding = BuildCache.getInstance().getCastleBuilding(face.currCasId,this.currentBuild.posNo); + if(_loc1_) + { + if(this.upTip == null) + { + this.upTip = new BuildUpTip(btnBg.right_btn,face.stage,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.currentBuild.posNo) + { + return; + } + if(this.upTip == null) + { + this.upTip = new BuildUpTip(btnBg.right_btn,face.stage,face.tip_bg); + } + this.upTip.setData(_loc2_.building); + this.upTip.addTip(); + } + + public function setCastleType(param1:int) : void + { + this.castleType = param1; + } + + public function setCastleBuild(param1:CastleBuilding) : void + { + this.currentBuild = param1; + if(this.currentBuild.highEntCap == null) + { + this.canUp = false; + PublicMethod.setBlack(btnBg.right_btn); + btnBg.right_txt.textColor = 16777215; + } + else + { + this.canUp = true; + PublicMethod.setColor(btnBg.right_btn); + } + this.addTip(); + this.upStatus = this.currentBuild.isUp; + this.setViewSatus(); + } + + private function setViewSatus() : void + { + if(this.upStatus) + { + this.addSpeedStatus(); + } + else + { + this.setUpStatus(); + } + } + + private function setUpStatus() : void + { + btnBg.left_txt.text = "拆除"; + btnBg.right_txt.text = "升级"; + } + + private function addSpeedStatus() : void + { + btnBg.left_txt.text = "取消"; + btnBg.right_txt.text = "加速"; + } + + private function destroyBuild(param1:MouseEvent) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + if(this.currentBuild == null) + { + return; + } + if(this.upStatus) + { + _loc2_ = this.currentBuild.buildQueue.queId; + TimerManager.getInstance().cancelBuild(_loc2_); + } + else + { + _loc3_ = this.currentBuild.casBuiId; + TimerManager.getInstance().destroyBuild(_loc3_); + } + } + + private function viewBuild(param1:MouseEvent) : void + { + var _loc2_:BaseBuild = null; + if(this.currentBuild.level == 0) + { + return; + } + switch(this.castleType) + { + case CastleType_1: + _loc2_ = TownInside.getInstance().getBuildByPosNo(this.currentBuild.posNo); + break; + case CastleType_2: + _loc2_ = EconomicInside.getInstance().getBuildByPosNo(this.currentBuild.posNo); + break; + case CastleType_3: + _loc2_ = MilitaryInside.getInstance().getBuildByPosNo(this.currentBuild.posNo); + } + _loc2_.openBuildUI(); + } + + private function upBuild(param1:MouseEvent) : void + { + var _loc2_:AddSpeed = null; + var _loc3_:AddSpeedUI = null; + var _loc4_:int = 0; + if(this.currentBuild == null) + { + return; + } + if(!this.canUp) + { + return; + } + if(this.upStatus) + { + _loc2_ = new AddSpeed(); + _loc2_.id = this.currentBuild.buildQueue.queId; + _loc2_.fastQueType = 1; + _loc3_ = AddSpeedUI.getInstance(); + _loc3_.getFastInfo(_loc2_); + _loc3_.addToStage(); + } + else + { + _loc4_ = this.currentBuild.casBuiId; + ConnectService.getInstance().castleService.upCastleBui(_loc4_); + } + } + + public function clear() : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/ButtonDown.as b/flash_decompiled/com/view/mc/button/ButtonDown.as new file mode 100644 index 0000000..3c06752 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/ButtonDown.as @@ -0,0 +1,47 @@ +package com.view.mc.button +{ + import com.InstallFace; + import com.view.newui.UIConfig; + import flash.display.Bitmap; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class ButtonDown extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var img:Bitmap; + + private var isDwon:Boolean; + + public function ButtonDown() + { + super(); + var _loc1_:SimpleButton = this.face.getButton(UIConfig.btn_down); + addChild(_loc1_); + this.img = new Bitmap(this.face.getPng(UIConfig.arrow_down)); + addChild(this.img); + this.img.x = 4; + this.img.y = 6; + addEventListener(MouseEvent.CLICK,this.mouseClick); + } + + private function mouseClick(param1:MouseEvent) : void + { + if(this.isDwon) + { + this.img.y = 6; + this.isDwon = false; + } + else + { + this.img.y = 12; + this.isDwon = true; + } + this.img.scaleY = -this.img.scaleY; + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/ButtonSprite.as b/flash_decompiled/com/view/mc/button/ButtonSprite.as new file mode 100644 index 0000000..d7a1f61 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/ButtonSprite.as @@ -0,0 +1,240 @@ +package com.view.mc.button +{ + import com.InstallFace; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.greensock.TweenMax; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.Font; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ButtonSprite extends Sprite + { + + public var face:InstallFace = InstallFace.getInstance(); + + private var textField:TextField; + + public var btn:SimpleButton; + + public var btnBg:MovieClip; + + public var playStatus:Boolean = false; + + public var css:TextFormat; + + public var canClick:Boolean; + + public var onclick:Function; + + private var cur_i:int; + + private var n:int = 1; + + public function ButtonSprite() + { + super(); + this.canClick = true; + this.css = new TextFormat(); + this.css.align = "center"; + } + + public function getBtn(param1:String) : void + { + this.btn = this.face.getButton(param1); + addChild(this.btn); + this.btn.addEventListener(MouseEvent.CLICK,this.mouseClick,false,0,true); + } + + private function mouseClick(param1:MouseEvent) : void + { + if(Boolean(this.onclick)) + { + if(this.btn.enabled) + { + this.onclick(); + } + } + } + + public function getBtnBg(param1:String) : void + { + this.btnBg = this.face.getMovieClip(param1); + addChild(this.btnBg); + } + + public function set label(param1:String) : void + { + this.textField.text = param1; + this.textField.setTextFormat(this.css); + } + + public function set onClick(param1:Function) : void + { + this.onclick = param1; + } + + public function getBtnText(param1:int, param2:uint = 16777215) : void + { + this.textField = PublicMethod.getTextField(param2,param1); + addChild(this.textField); + } + + public function setTextBold(param1:int = 12) : void + { + this.css.bold = true; + this.css.size = param1; + } + + public function setEmbdFont() : void + { + var _loc1_:Class = this.face.getClass("myfont"); + Font.registerFont(_loc1_); + var _loc2_:Font = new _loc1_() as Font; + this.css.font = _loc2_.fontName; + } + + public function addFillter() : void + { + this.textField.filters = [PublicGlow.getInstance().blackGlow]; + } + + public function setText(param1:String) : void + { + this.textField.htmlText = param1; + this.textField.setTextFormat(this.css); + } + + public function setTextPosi(param1:int, param2:int) : void + { + this.textField.x = param1; + this.textField.y = param2; + } + + public function setClick() : void + { + this.btn.upState = this.btn.downState; + } + + public function setUnClick() : void + { + this.btn.upState = this.btn.upState; + } + + public function addMouseEvent() : void + { + if(this.btnBg) + { + addEventListener(MouseEvent.ROLL_OVER,this.mouse_over); + addEventListener(MouseEvent.ROLL_OUT,this.mouse_out); + addEventListener(MouseEvent.MOUSE_DOWN,this.mouse_down); + addEventListener(MouseEvent.MOUSE_UP,this.mouse_up); + } + } + + public function stop(param1:int) : void + { + this.playStatus = false; + this.btnBg.gotoAndStop(param1); + } + + public function mouse_over(param1:MouseEvent) : void + { + if(!this.playStatus) + { + this.btnBg.gotoAndStop(2); + } + } + + public function mouse_down(param1:MouseEvent) : void + { + if(!this.playStatus) + { + this.btnBg.gotoAndStop(3); + } + } + + public function mouse_up(param1:MouseEvent) : void + { + if(!this.playStatus) + { + this.btnBg.gotoAndStop(2); + } + } + + public function mouse_out(param1:MouseEvent) : void + { + if(!this.playStatus) + { + this.btnBg.gotoAndStop(1); + } + } + + public function setPlay() : void + { + if(this.playStatus) + { + return; + } + this.playStatus = true; + this.play(); + } + + private function play() : void + { + if(!this.playStatus) + { + return; + } + ++this.cur_i; + this.btnBg.gotoAndStop(this.cur_i); + if(this.cur_i == 3) + { + this.cur_i = 0; + } + TweenMax.to(this.btnBg,0.1,{"onComplete":this.play}); + } + + public function setEnable() : void + { + TweenMax.to(this,0.1,{"colorMatrixFilter":{"saturation":1}}); + this.btn.enabled = true; + } + + public function setUnEnable() : void + { + TweenMax.to(this,0.1,{"colorMatrixFilter":{"saturation":0}}); + this.btn.enabled = false; + } + + public function startPlay(param1:int) : void + { + this.btnBg.gotoAndStop(param1); + } + + public function sPlay() : void + { + this.btnBg.gotoAndStop(this.n); + ++this.n; + if(this.n > 3) + { + this.n = 1; + } + } + + public function setTextWidth(param1:int) : void + { + this.textField.width = param1; + } + + public function setTextHeight(param1:int) : void + { + this.textField.height = param1; + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_1.as b/flash_decompiled/com/view/mc/button/Button_1.as new file mode 100644 index 0000000..5189660 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_1.as @@ -0,0 +1,18 @@ +package com.view.mc.button +{ + import com.comfig.ClassConfig; + + public class Button_1 extends ButtonSprite + { + + public function Button_1(param1:String, param2:uint = 16763749) + { + super(); + super.getBtn(ClassConfig.button_1); + super.getBtnText(46,param2); + super.setText(param1); + super.setTextPosi(2,0); + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_11.as b/flash_decompiled/com/view/mc/button/Button_11.as new file mode 100644 index 0000000..60c8407 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_11.as @@ -0,0 +1,69 @@ +package com.view.mc.button +{ + import flash.events.MouseEvent; + + public class Button_11 extends ButtonSprite + { + + public var hasClick:Boolean; + + public function Button_11(param1:String, param2:String = "sprite_btn_10") + { + super(); + this.hasClick = false; + super.getBtnBg(param2); + super.getBtnText(56,16763749); + super.setText(param1); + super.setTextPosi(11,5); + stop(1); + addMouseEvent(); + } + + override public function mouse_over(param1:MouseEvent) : void + { + if(!this.hasClick) + { + btnBg.gotoAndStop(2); + } + } + + override public function mouse_down(param1:MouseEvent) : void + { + if(!this.hasClick) + { + this.hasClick = true; + btnBg.gotoAndStop(3); + } + } + + override public function mouse_up(param1:MouseEvent) : void + { + if(!this.hasClick) + { + btnBg.gotoAndStop(2); + } + } + + override public function mouse_out(param1:MouseEvent) : void + { + if(!this.hasClick) + { + btnBg.gotoAndStop(1); + } + } + + public function setClickStatus(param1:Boolean) : void + { + this.hasClick = param1; + if(this.hasClick) + { + btnBg.gotoAndStop(3); + } + else + { + btnBg.gotoAndStop(1); + } + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_13.as b/flash_decompiled/com/view/mc/button/Button_13.as new file mode 100644 index 0000000..6d34eb0 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_13.as @@ -0,0 +1,18 @@ +package com.view.mc.button +{ + import com.comfig.ClassConfig; + + public class Button_13 extends ButtonSprite + { + + public function Button_13(param1:String) + { + super(); + super.getBtn(ClassConfig.button_5); + super.getBtnText(54,16763749); + super.setText(param1); + super.setTextPosi(3,0); + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_15.as b/flash_decompiled/com/view/mc/button/Button_15.as new file mode 100644 index 0000000..f7d55d3 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_15.as @@ -0,0 +1,62 @@ +package com.view.mc.button +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class Button_15 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var btn:MovieClip; + + private var click:Boolean; + + public function Button_15() + { + super(); + this.click = false; + this.btn = this.face.getMovieClip(ClassConfig.sprite_btn_14); + addChild(this.btn); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.btn.gotoAndStop(1); + buttonMode = true; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(!this.click) + { + this.btn.gotoAndStop(1); + } + } + + private function mouseOver(param1:MouseEvent) : void + { + this.btn.gotoAndStop(2); + } + + public function setClick(param1:Boolean) : void + { + this.click = param1; + if(this.click) + { + this.btn.gotoAndStop(2); + } + else + { + this.btn.gotoAndStop(1); + } + } + + public function getStatus() : Boolean + { + return this.click; + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_16.as b/flash_decompiled/com/view/mc/button/Button_16.as new file mode 100644 index 0000000..7544529 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_16.as @@ -0,0 +1,18 @@ +package com.view.mc.button +{ + import com.comfig.ClassConfig; + + public class Button_16 extends ButtonSprite + { + + public function Button_16(param1:String) + { + super(); + super.getBtn(ClassConfig.button_6); + super.getBtnText(54,16763749); + super.setText(param1); + super.setTextPosi(4,2); + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_2.as b/flash_decompiled/com/view/mc/button/Button_2.as new file mode 100644 index 0000000..122b697 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_2.as @@ -0,0 +1,18 @@ +package com.view.mc.button +{ + import com.comfig.ClassConfig; + + public class Button_2 extends ButtonSprite + { + + public function Button_2(param1:String) + { + super(); + super.getBtn(ClassConfig.button_2); + super.getBtnText(34,16764006); + super.setText(param1); + super.setTextPosi(7,1); + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_30.as b/flash_decompiled/com/view/mc/button/Button_30.as new file mode 100644 index 0000000..8565125 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_30.as @@ -0,0 +1,17 @@ +package com.view.mc.button +{ + import com.comfig.ClassConfig; + + public class Button_30 extends ButtonSprite + { + + public function Button_30() + { + super(); + super.getBtnBg(ClassConfig.sprite_btn_update); + stop(1); + addMouseEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_32.as b/flash_decompiled/com/view/mc/button/Button_32.as new file mode 100644 index 0000000..8adc0ef --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_32.as @@ -0,0 +1,26 @@ +package com.view.mc.button +{ + import com.comfig.ClassConfig; + + public class Button_32 extends ButtonSprite + { + + public function Button_32(param1:String) + { + super(); + super.getBtn(ClassConfig.button_20); + super.getBtnText(68,16777215); + super.setTextBold(14); + super.setTextHeight(24); + super.setTextWidth(84); + super.setText(param1); + super.setTextPosi(10,10); + } + + public function setLabel(param1:String) : void + { + super.setText(param1); + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_4.as b/flash_decompiled/com/view/mc/button/Button_4.as new file mode 100644 index 0000000..202ed68 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_4.as @@ -0,0 +1,20 @@ +package com.view.mc.button +{ + import com.comfig.ClassConfig; + + public class Button_4 extends ButtonSprite + { + + public function Button_4(param1:String, param2:Boolean = false) + { + super(); + super.getBtnBg(param2 ? ClassConfig.sprite_btn_2 : ClassConfig.sprite_btn_1); + super.getBtnText(30); + super.setText(param1); + super.setTextPosi(12,6); + stop(1); + addMouseEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/Button_9.as b/flash_decompiled/com/view/mc/button/Button_9.as new file mode 100644 index 0000000..bcdc751 --- /dev/null +++ b/flash_decompiled/com/view/mc/button/Button_9.as @@ -0,0 +1,84 @@ +package com.view.mc.button +{ + import com.common.PublicGlow; + import com.common.PublicMethod; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class Button_9 extends Sprite + { + + private var titleText:TextField; + + private var _func:Function; + + public function Button_9(param1:String) + { + super(); + this.titleText = PublicMethod.getTextField(16776960,100); + this.titleText.htmlText = "" + param1 + ""; + this.titleText.width = this.titleText.textWidth + 4; + addChild(this.titleText); + this.addEventListener(MouseEvent.MOUSE_DOWN,this.mouse_down); + this.addEventListener(MouseEvent.MOUSE_OUT,this.mouse_out); + this.addEventListener(MouseEvent.MOUSE_UP,this.mouse_up); + this.addEventListener(MouseEvent.CLICK,this.mouse_click); + } + + public function setText(param1:String) : void + { + this.titleText.htmlText = "" + param1 + ""; + } + + public function setTextHeight(param1:int) : void + { + this.titleText.height = param1; + } + + public function setFiller() : void + { + this.titleText.filters = [PublicGlow.getInstance().blackGlow]; + } + + private function mouse_down(param1:MouseEvent) : void + { + this.titleText.x = 1; + this.titleText.y = 1; + } + + private function mouse_up(param1:MouseEvent) : void + { + this.titleText.x = 0; + this.titleText.y = 0; + } + + private function mouse_out(param1:MouseEvent) : void + { + if(this.titleText.x != 0) + { + this.titleText.x = 0; + this.titleText.y = 0; + } + } + + public function get func() : Function + { + return this._func; + } + + public function set func(param1:Function) : void + { + this._func = param1; + } + + private function mouse_click(param1:MouseEvent) : void + { + if(Boolean(this._func)) + { + this._func(); + } + } + } +} + diff --git a/flash_decompiled/com/view/mc/button/EnterButton.as b/flash_decompiled/com/view/mc/button/EnterButton.as new file mode 100644 index 0000000..c4c449a --- /dev/null +++ b/flash_decompiled/com/view/mc/button/EnterButton.as @@ -0,0 +1,44 @@ +package com.view.mc.button +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class EnterButton extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var btnMc:MovieClip; + + public var onClick:Function; + + private var canClick:Boolean = true; + + public function EnterButton(param1:String) + { + super(); + this.btnMc = this.face.getMovieClip(ClassConfig.LIB_UI_BT_dating); + addChild(this.btnMc); + this.btnMc.label.text = param1; + this.btnMc.label.mouseEnabled = false; + this.btnMc.addEventListener(MouseEvent.CLICK,this.mouseClick); + } + + private function mouseClick(param1:MouseEvent) : void + { + if(this.onClick != null && this.canClick) + { + this.onClick(); + } + } + + private function setEnabled(param1:Boolean) : void + { + this.canClick = param1; + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/BorderMc2.as b/flash_decompiled/com/view/mc/sprite/BorderMc2.as new file mode 100644 index 0000000..3506b0f --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/BorderMc2.as @@ -0,0 +1,37 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import flash.display.Sprite; + import flash.text.TextField; + + public class BorderMc2 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var bor3_title:TextField; + + public function BorderMc2(param1:String, param2:int, param3:int = 11) + { + super(); + param2 -= 23; + var _loc4_:Sprite = new Scale9Grid(this.face.getSprite(ClassConfig.lib_border_bg),param2,param3); + addChild(_loc4_); + this.bor3_title = PublicMethod.getTextField(16764006,width - 10); + this.bor3_title.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.bor3_title.text = param1; + addChild(this.bor3_title); + this.bor3_title.x = width / 2 - this.bor3_title.width / 2; + this.bor3_title.y = 1; + } + + public function setTabName(param1:String) : void + { + this.bor3_title.text = param1; + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/CheckBoxMc.as b/flash_decompiled/com/view/mc/sprite/CheckBoxMc.as new file mode 100644 index 0000000..753275d --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/CheckBoxMc.as @@ -0,0 +1,57 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class CheckBoxMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var boxMc:MovieClip; + + private var click:Boolean; + + public function CheckBoxMc() + { + super(); + this.boxMc = this.face.getMovieClip(ClassConfig.sprite_btn_checkBox); + addChild(this.boxMc); + this.boxMc.gotoAndStop(1); + this.click = false; + } + + public function setSelect() : void + { + this.click = true; + this.boxMc.gotoAndStop(3); + } + + public function setUnSelect() : void + { + this.click = false; + this.boxMc.gotoAndStop(1); + } + + public function getStatus() : Boolean + { + return this.click; + } + + public function clickBoxMc(param1:MouseEvent) : void + { + if(this.click) + { + this.setUnSelect(); + } + else + { + this.setSelect(); + } + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/CloudMc.as b/flash_decompiled/com/view/mc/sprite/CloudMc.as new file mode 100644 index 0000000..ac52db5 --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/CloudMc.as @@ -0,0 +1,67 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.common.LoadResource; + import com.control.ConnectService; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class CloudMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var cloudLoad:LoadResource; + + private var cloudMc:MovieClip; + + private var cloudUrl:String = "pic/swf/cloud.swf"; + + public function CloudMc() + { + super(); + } + + private function loadCloudBack(param1:Event) : void + { + this.cloudMc = param1.target.loader.content; + this.cloudLoad.clear(); + this.play(); + } + + public function addCloudMc() : void + { + if(this.cloudMc == null) + { + this.cloudLoad = new LoadResource(this.cloudUrl,this.loadCloudBack); + } + else + { + this.play(); + } + } + + private function play() : void + { + this.face.stage.addChild(this.cloudMc); + this.cloudMc.gotoAndPlay(1); + addEventListener(Event.ENTER_FRAME,this.enterFrame); + } + + private function enterFrame(param1:Event) : void + { + if(this.cloudMc.currentFrame == 50) + { + ConnectService.getInstance().castleService.preLevelUpCastle(); + } + if(this.cloudMc.currentFrame == 80) + { + removeEventListener(Event.ENTER_FRAME,this.enterFrame); + this.face.stage.removeChild(this.cloudMc); + this.cloudMc.gotoAndStop(1); + } + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/ExpBar.as b/flash_decompiled/com/view/mc/sprite/ExpBar.as new file mode 100644 index 0000000..15b8909 --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/ExpBar.as @@ -0,0 +1,89 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.text.TextField; + + public class ExpBar extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var expMc:MovieClip; + + private var expLength:int; + + private var expMax:int; + + private var curExp:int; + + private var expText:TextField; + + public function ExpBar() + { + super(); + this.expMc = this.face.getMovieClip(ClassConfig.lib_exp); + addChild(this.expMc); + this.expText = PublicMethod.getTextFieldWithFillter(16777215,180); + addChild(this.expText); + this.expText.y = -3; + } + + public function setSize(param1:int) : void + { + this.expText.width = param1; + this.expMc.centerbg.width = param1 - this.expMc.leftbg.width - this.expMc.rightbg.width; + this.expMc.rightbg.x = param1 - this.expMc.rightbg.width; + this.expLength = param1 - 10; + this.expText.x = width / 2 - this.expText.width / 2; + } + + public function setLength(param1:int) : void + { + this.expMax = param1; + } + + public function setCurValue(param1:int) : void + { + this.curExp = param1; + this.expMc.expBar.x = 6; + this.expMc.expBar.y = 2; + var _loc2_:Number = this.curExp / this.expMax; + if(_loc2_ > 1) + { + _loc2_ = 1; + } + this.expMc.expBar.width = int(this.expLength * _loc2_); + this.expText.text = param1 + "/" + this.expMax; + this.expText.setTextFormat(PublicMethod.getCenterTextFormat()); + } + + public function setStr(param1:String) : void + { + this.expText.htmlText = param1 + "" + this.curExp + "/" + this.expMax + ""; + this.expText.setTextFormat(PublicMethod.getCenterTextFormat()); + } + + public function setStr1(param1:String) : void + { + this.expText.htmlText = param1 + "" + this.curExp; + this.expText.setTextFormat(PublicMethod.getCenterTextFormat()); + } + + public function setStr2(param1:String) : void + { + this.expText.htmlText = param1; + this.expText.setTextFormat(PublicMethod.getCenterTextFormat()); + } + + public function setFillters() : void + { + this.expText.filters = [PublicGlow.getInstance().blackGlow]; + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/ItemMc.as b/flash_decompiled/com/view/mc/sprite/ItemMc.as new file mode 100644 index 0000000..04480d3 --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/ItemMc.as @@ -0,0 +1,157 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.filters.GlowFilter; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ItemMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var bg:MovieClip; + + private var loader:LoadResource; + + private var itemPng:Bitmap; + + private var isLock:Boolean; + + private var lockMc:MovieClip; + + private var titleText:TextField; + + private var fillers:GlowFilter; + + private var centerCss:TextFormat; + + private var msg:String = ""; + + public function ItemMc() + { + super(); + this.getFillers(); + this.centerCss = new TextFormat(); + this.centerCss.align = "center"; + this.isLock = false; + this.bg = this.face.getMovieClip(ClassConfig.lib_tech_bg); + this.bg.gotoAndStop(1); + addChild(this.bg); + this.itemPng = new Bitmap(); + addChild(this.itemPng); + this.itemPng.x = 15; + this.itemPng.y = 15; + this.lockMc = this.face.getMovieClip(ClassConfig.lib_ui_lock); + addChild(this.lockMc); + this.lockMc.x = 15; + this.lockMc.y = 15; + this.lockMc.bg.alpha = 0; + this.lockMc.alpha = 0; + this.titleText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,84); + addChild(this.titleText); + this.titleText.y = 78; + mouseChildren = false; + } + + public function addClickEvent() : void + { + addEventListener(MouseEvent.CLICK,this.clickMc); + } + + 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 = 2; + } + + public function setImg(param1:String) : void + { + 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.itemPng.alpha = 1; + this.itemPng.width = 58; + this.itemPng.height = 58; + } + + public function setLock(param1:Boolean) : void + { + this.isLock = param1; + if(this.isLock) + { + this.lockMc.alpha = 1; + this.lockMc.bg.alpha = 1; + } + else + { + this.lockMc.alpha = 0; + this.lockMc.bg.alpha = 0; + } + } + + public function setErrMsg(param1:String) : void + { + this.msg = param1; + } + + public function getErrMsg() : String + { + return this.msg; + } + + public function getLock() : Boolean + { + return this.isLock; + } + + public function setTitle(param1:String) : void + { + this.titleText.text = param1; + this.titleText.setTextFormat(this.centerCss); + } + + public function clickMc(param1:MouseEvent) : void + { + this.setClick(); + } + + public function setUnClick() : void + { + this.bg.filters = null; + } + + public function setClick() : void + { + this.bg.filters = [this.fillers]; + } + + public function clear() : void + { + this.setUnClick(); + this.itemPng.alpha = 0; + this.titleText.text = ""; + this.lockMc.alpha = 0; + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/LabelMc.as b/flash_decompiled/com/view/mc/sprite/LabelMc.as new file mode 100644 index 0000000..284f053 --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/LabelMc.as @@ -0,0 +1,91 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFieldType; + import flash.text.TextFormat; + + public class LabelMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var labelText:TextField; + + private var valueText:TextField; + + private var css:TextFormat; + + public function LabelMc(param1:int, param2:int = 31, param3:int = 11) + { + super(); + var _loc4_:Sprite = this.face.getSprite(ClassConfig.ui_bg_2); + var _loc5_:Sprite = this.face.getSprite(ClassConfig.ui_bg_1); + var _loc6_:Sprite = new Scale9Grid(_loc4_,param2,param3); + var _loc7_:Sprite = new Scale9Grid(_loc5_,param1,param3); + addChild(_loc6_); + addChild(_loc7_); + _loc7_.x = _loc6_.width + 2; + this.labelText = PublicMethod.getTextField(11583207,_loc6_.width); + _loc6_.addChild(this.labelText); + this.labelText.y = 1; + this.valueText = PublicMethod.getTextField(16777215,_loc7_.width - 4); + _loc7_.addChild(this.valueText); + this.valueText.y = 1; + this.valueText.x = 3; + this.css = PublicMethod.getCenterTextFormat(); + } + + public function setLabel(param1:String) : void + { + this.labelText.text = param1; + this.labelText.setTextFormat(this.css); + } + + public function setValue(param1:String, param2:Boolean = true) : void + { + this.valueText.htmlText = param1; + if(param2) + { + this.valueText.setTextFormat(this.css); + } + } + + public function setTextInput(param1:Boolean) : void + { + if(param1) + { + if(this.valueText.type == TextFieldType.INPUT) + { + return; + } + this.valueText.mouseEnabled = true; + this.valueText.type = TextFieldType.INPUT; + } + else + { + if(this.valueText.type == TextFieldType.DYNAMIC) + { + return; + } + this.valueText.mouseEnabled = false; + this.valueText.type = TextFieldType.DYNAMIC; + } + } + + public function setMaxChar(param1:int) : void + { + this.valueText.maxChars = param1; + } + + public function getValue() : String + { + return PublicMethod.trim(this.valueText.text); + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/LoadMc.as b/flash_decompiled/com/view/mc/sprite/LoadMc.as new file mode 100644 index 0000000..751546e --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/LoadMc.as @@ -0,0 +1,54 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import flash.display.MovieClip; + import flash.display.Sprite; + + public class LoadMc extends Sprite + { + + private static var instance:LoadMc; + + private var loading:MovieClip; + + private var bg:Sprite; + + private var face:InstallFace = InstallFace.getInstance(); + + public function LoadMc() + { + super(); + this.loading = this.face.getMovieClip(ClassConfig.lib_ui_loading); + this.bg = PublicMethod.createShape(0,2000,1400); + this.bg.alpha = 0.1; + } + + public static function getInstance() : LoadMc + { + if(instance == null) + { + instance = new LoadMc(); + } + return instance; + } + + public function addMc() : void + { + addChild(this.bg); + this.bg.x = -1000; + this.bg.y = -700; + addChild(this.loading); + this.loading.gotoAndPlay(1); + } + + public function stop() : void + { + removeChild(this.loading); + removeChild(this.bg); + this.loading.gotoAndStop(1); + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/LoadingMc.as b/flash_decompiled/com/view/mc/sprite/LoadingMc.as new file mode 100644 index 0000000..228b0cd --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/LoadingMc.as @@ -0,0 +1,77 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.common.PublicMethod; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class LoadingMc extends Sprite + { + + private static var instance:LoadingMc; + + private var face:InstallFace = InstallFace.getInstance(); + + public function LoadingMc() + { + super(); + var _loc1_:Sprite = PublicMethod.createShape(0,CommonData.MAX_WIDTH,CommonData.MAX_HEIGHT); + addChild(_loc1_); + _loc1_.alpha = 0; + _loc1_.x = -_loc1_.width / 2; + _loc1_.y = -_loc1_.height / 2; + var _loc2_:MovieClip = this.face.getMovieClip(ClassConfig.lib_ui_loading); + addChild(_loc2_); + addEventListener(Event.ADDED_TO_STAGE,this.addToStage); + addEventListener(Event.REMOVED_FROM_STAGE,this.removeFromStage); + } + + public static function getInstance() : LoadingMc + { + if(instance == null) + { + instance = new LoadingMc(); + } + return instance; + } + + private function addToStage(param1:Event) : void + { + this.face.stage.addEventListener(Event.RESIZE,this.resize); + } + + private function removeFromStage(param1:Event) : void + { + this.face.stage.removeEventListener(Event.RESIZE,this.resize); + } + + private function resize(param1:Event) : void + { + this.setPosi(); + } + + private function setPosi() : void + { + this.x = this.face.realWidth / 2; + this.y = this.face.realHeight / 2; + } + + public function show() : void + { + this.face.stage.addChild(this); + this.setPosi(); + } + + public function unShow() : void + { + if(this.face.stage.contains(this)) + { + this.face.stage.removeChild(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/MessListBar.as b/flash_decompiled/com/view/mc/sprite/MessListBar.as new file mode 100644 index 0000000..4aa9fdb --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/MessListBar.as @@ -0,0 +1,129 @@ +package com.view.mc.sprite +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import fl.controls.UIScrollBar; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFieldType; + import flash.text.TextFormat; + + public class MessListBar extends Sprite + { + + public var tf:TextField; + + private var sb:UIScrollBar = new UIScrollBar(); + + private var _width:int; + + private var _height:int; + + private var css:TextFormat; + + private var currTxt:String = ""; + + public function MessListBar() + { + super(); + } + + public function setSize(param1:int, param2:int) : void + { + this._width = param1; + this._height = param2; + } + + public function create() : void + { + this.createTextField(); + this.assignScrollBar(); + } + + private function createTextField() : void + { + this.css = new TextFormat(); + this.css.leading = 4; + this.css.font = "SimSun"; + this.tf = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,this._width); + this.tf.width = this._width; + this.tf.height = this._height; + this.tf.wordWrap = true; + this.tf.multiline = true; + this.tf.textColor = 16777215; + this.tf.htmlText = ""; + addChild(this.tf); + this.tf.defaultTextFormat = this.css; + } + + public function print(param1:String) : void + { + this.tf.htmlText = param1; + this.tf.setTextFormat(this.css); + if(this.tf.textHeight < this._height) + { + this.sb.visible = false; + } + else + { + this.sb.visible = true; + this.sb.update(); + } + } + + public function appendTxt(param1:String) : void + { + this.currTxt += param1; + this.tf.htmlText = this.currTxt; + this.tf.setTextFormat(this.css); + if(this.tf.textHeight < this._height) + { + this.sb.visible = false; + } + else + { + this.sb.visible = true; + this.sb.update(); + } + } + + private function assignScrollBar() : void + { + this.sb = new UIScrollBar(); + this.sb.move(this.tf.x + this.tf.width,this.tf.y); + this.sb.setSize(this.sb.width,this.tf.height); + this.sb.scrollTarget = this.tf; + addChild(this.sb); + } + + public function clear() : void + { + this.tf.htmlText = ""; + this.sb.update(); + } + + public function set input(param1:Boolean) : void + { + this.tf.mouseEnabled = param1; + if(param1) + { + this.tf.type = TextFieldType.INPUT; + } + else + { + this.tf.type = TextFieldType.DYNAMIC; + } + } + + public function getValue() : String + { + return this.tf.htmlText; + } + + public function setMaxChar(param1:int) : void + { + this.tf.maxChars = param1; + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/PageInputMc.as b/flash_decompiled/com/view/mc/sprite/PageInputMc.as new file mode 100644 index 0000000..8aa02c5 --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/PageInputMc.as @@ -0,0 +1,124 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PageInputMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var mc:MovieClip; + + private var maxNums:int; + + private var minNums:int; + + public var food:int; + + public var foodMax:int; + + public var money:int; + + public var moneyMax:int; + + public var armyNum:int; + + public var backF:Function; + + public function PageInputMc() + { + super(); + this.mc = this.face.getMovieClip(ClassConfig.lib_ui_input); + addChild(this.mc); + this.mc.numText.text = "1"; + this.mc.numText.restrict = "0-9"; + this.mc.leftBtn.addEventListener(MouseEvent.CLICK,this.leftEvent,false,0,true); + this.mc.rightBtn.addEventListener(MouseEvent.CLICK,this.rightEvent,false,0,true); + this.mc.numText.addEventListener(Event.CHANGE,this.checkNum,false,0,true); + } + + public function getLeftBtn() : SimpleButton + { + return this.mc.leftBtn; + } + + public function getRightBtn() : SimpleButton + { + return this.mc.rightBtn; + } + + public function getInputText() : TextField + { + return this.mc.numText; + } + + private function leftEvent(param1:MouseEvent) : void + { + this.mc.numText.text = this.minNums.toString(); + if(this.backF != null) + { + this.backF(); + } + } + + private function rightEvent(param1:MouseEvent) : void + { + this.mc.numText.text = this.maxNums.toString(); + if(this.backF != null) + { + this.backF(); + } + } + + public function setMaxNum(param1:int) : void + { + this.maxNums = param1; + } + + public function setMinNum(param1:int) : void + { + this.minNums = param1; + } + + public function setMaxLen(param1:int) : void + { + this.mc.numText.maxChars = param1; + } + + public function getText() : int + { + return int(this.mc.numText.text); + } + + public function setText(param1:int) : void + { + this.mc.numText.text = param1.toString(); + } + + private function checkNum(param1:Event) : void + { + var _loc2_:int = this.getText(); + if(_loc2_ < this.minNums) + { + _loc2_ = this.minNums; + } + if(_loc2_ > this.maxNums) + { + _loc2_ = this.maxNums; + } + this.mc.numText.text = _loc2_.toString(); + if(this.backF != null) + { + this.backF(); + } + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/PageInputMc2.as b/flash_decompiled/com/view/mc/sprite/PageInputMc2.as new file mode 100644 index 0000000..b2179a2 --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/PageInputMc2.as @@ -0,0 +1,116 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PageInputMc2 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var mc:MovieClip; + + private var maxNums:int; + + private var minNums:int; + + public var food:int; + + public var foodMax:int; + + public var money:int; + + public var moneyMax:int; + + public var armyNum:int; + + public function PageInputMc2() + { + super(); + this.mc = this.face.getMovieClip(ClassConfig.sprite_input); + addChild(this.mc); + this.mc.numText.text = "1"; + this.mc.numText.restrict = "0-9"; + this.mc.numText.addEventListener(Event.CHANGE,this.checkNum,false,0,true); + this.mc.leftBtn.addEventListener(MouseEvent.CLICK,this.leftEvent,false,0,true); + this.mc.rightBtn.addEventListener(MouseEvent.CLICK,this.rightEvent,false,0,true); + } + + public function getLeftBtn() : SimpleButton + { + return this.mc.leftBtn; + } + + public function getRightBtn() : SimpleButton + { + return this.mc.rightBtn; + } + + public function getInputText() : TextField + { + return this.mc.numText; + } + + private function leftEvent(param1:MouseEvent) : void + { + this.mc.numText.text = this.minNums.toString(); + } + + private function rightEvent(param1:MouseEvent) : void + { + this.mc.numText.text = this.maxNums.toString(); + } + + public function setMaxNum(param1:int) : void + { + this.maxNums = param1; + } + + public function setMinNum(param1:int) : void + { + this.minNums = param1; + } + + public function setMaxLen(param1:int) : void + { + this.mc.numText.maxChars = param1; + } + + public function getText() : int + { + return int(this.mc.numText.text); + } + + public function setText(param1:int) : void + { + this.mc.numText.text = param1.toString(); + } + + private function checkNum(param1:Event) : void + { + var _loc2_:int = this.getText(); + if(_loc2_ < this.minNums) + { + _loc2_ = this.minNums; + } + if(_loc2_ > this.maxNums) + { + _loc2_ = this.maxNums; + } + this.mc.numText.text = _loc2_.toString(); + } + + public function hiddenBtn() : void + { + this.mc.rightBtn.visible = false; + this.mc.leftBtn.visible = false; + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/TextBar.as b/flash_decompiled/com/view/mc/sprite/TextBar.as new file mode 100644 index 0000000..b0a82fd --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/TextBar.as @@ -0,0 +1,114 @@ +package com.view.mc.sprite +{ + import com.common.PublicMethod; + import fl.controls.UIScrollBar; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class TextBar extends Sprite + { + + private var tf:TextField; + + private var sb:UIScrollBar = new UIScrollBar(); + + private var css:TextFormat; + + public function TextBar() + { + super(); + this.css = new TextFormat(); + this.css.color = 16777215; + this.css.font = "SimSun"; + } + + public function createTextField(param1:int, param2:int, param3:uint = 16640697) : void + { + this.tf = PublicMethod.getTextFieldWithFillter(param3,param1); + this.tf.height = param2; + this.tf.wordWrap = true; + this.tf.multiline = true; + this.tf.textColor = param3; + this.tf.htmlText = ""; + addChild(this.tf); + this.tf.defaultTextFormat = this.css; + this.assignScrollBar(); + } + + public function setTextType(param1:String = "input") : void + { + this.tf.type = param1; + } + + public function setEnabled() : void + { + this.tf.mouseEnabled = true; + } + + public function setTextFormat(param1:TextFormat) : void + { + this.tf.defaultTextFormat = param1; + } + + public function getText() : String + { + return this.tf.text; + } + + public function setText(param1:String) : void + { + if(param1 == null) + { + param1 = ""; + this.sb.visible = false; + } + this.tf.text = param1; + this.sb.scrollPosition = this.sb.maxScrollPosition; + this.sb.update(); + } + + public function traceMsg(param1:String) : void + { + if(param1 == null) + { + param1 = ""; + this.tf.htmlText = ""; + this.sb.visible = false; + } + this.tf.htmlText = param1; + this.sb.scrollPosition = this.sb.maxScrollPosition; + this.sb.update(); + } + + public function print(param1:String) : void + { + if(this.tf.htmlText == "") + { + this.tf.htmlText = param1; + } + else + { + this.tf.htmlText += param1; + } + this.sb.scrollPosition = this.sb.maxScrollPosition; + this.sb.update(); + } + + private function assignScrollBar() : void + { + this.sb = new UIScrollBar(); + this.sb.move(this.tf.x + this.tf.width,this.tf.y); + this.sb.setSize(this.sb.width,this.tf.height); + this.sb.scrollTarget = this.tf; + addChild(this.sb); + } + + public function clear() : void + { + this.tf.htmlText = ""; + this.sb.update(); + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/UserExpMc.as b/flash_decompiled/com/view/mc/sprite/UserExpMc.as new file mode 100644 index 0000000..7334795 --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/UserExpMc.as @@ -0,0 +1,59 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.greensock.TweenMax; + import flash.display.Bitmap; + import flash.display.DisplayObject; + import flash.display.Sprite; + + public class UserExpMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var nums:int; + + public function UserExpMc() + { + super(); + } + + public function addExp(param1:int) : void + { + if(param1 <= 0) + { + return; + } + var _loc2_:Sprite = new Sprite(); + _loc2_.name = "mc_" + this.nums; + var _loc3_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_txt_exp)); + _loc2_.addChild(_loc3_); + var _loc4_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_num_10)); + _loc2_.addChild(_loc4_); + _loc4_.x = _loc3_.width + 5; + _loc4_.y = -3; + var _loc5_:Sprite = PublicMethod.getResNumMc(param1); + _loc2_.addChild(_loc5_); + _loc5_.x = _loc4_.x + 30; + _loc5_.y = -3; + addChild(_loc2_); + TweenMax.to(_loc2_,2,{ + "y":-70, + "onComplete":this.moveComplete, + "onCompleteParams":[_loc2_] + }); + ++this.nums; + } + + private function moveComplete(param1:DisplayObject) : void + { + if(contains(param1)) + { + removeChild(param1); + } + } + } +} + diff --git a/flash_decompiled/com/view/mc/sprite/UserRangeMc.as b/flash_decompiled/com/view/mc/sprite/UserRangeMc.as new file mode 100644 index 0000000..7fb01d7 --- /dev/null +++ b/flash_decompiled/com/view/mc/sprite/UserRangeMc.as @@ -0,0 +1,55 @@ +package com.view.mc.sprite +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.greensock.TweenMax; + import flash.display.Bitmap; + import flash.display.DisplayObject; + import flash.display.Sprite; + + public class UserRangeMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public function UserRangeMc() + { + super(); + } + + public function addRange(param1:int) : void + { + if(param1 <= 0) + { + return; + } + var _loc2_:Sprite = new Sprite(); + var _loc3_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_txt_range)); + _loc2_.addChild(_loc3_); + var _loc4_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_num_10)); + _loc2_.addChild(_loc4_); + _loc4_.x = _loc3_.width + 6; + _loc4_.y = -3; + var _loc5_:Sprite = PublicMethod.getResNumMc(param1); + _loc2_.addChild(_loc5_); + _loc5_.x = _loc4_.x + 30; + _loc5_.y = -5; + addChild(_loc2_); + TweenMax.to(_loc2_,2,{ + "y":-70, + "onComplete":this.moveComplete, + "onCompleteParams":[_loc2_] + }); + } + + private function moveComplete(param1:DisplayObject) : void + { + if(contains(param1)) + { + removeChild(param1); + } + } + } +} + diff --git a/flash_decompiled/com/view/newui/IconBtn.as b/flash_decompiled/com/view/newui/IconBtn.as new file mode 100644 index 0000000..b3716d7 --- /dev/null +++ b/flash_decompiled/com/view/newui/IconBtn.as @@ -0,0 +1,107 @@ +package com.view.newui +{ + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class IconBtn extends UIBase + { + + private var btnPng:Bitmap; + + private var smallWidth:int; + + private var smallHeight:int; + + private var bigWidth:int; + + private var bigHeight:int; + + private var smallX:int; + + private var smallY:int; + + private var bigX:int; + + private var bigY:int; + + private var isEnable:Boolean = true; + + private var onclick:Function; + + public function IconBtn(param1:String, param2:String = null) + { + super(); + if(param2 == null) + { + this.btnPng = face.getBitMap(param1); + } + else + { + this.btnPng = game.getBitMap(param1,game.getApplication(param2)); + } + this.smallWidth = this.btnPng.width; + this.smallHeight = this.btnPng.height; + this.bigWidth = this.smallWidth + 4; + this.bigHeight = this.smallHeight + 4; + this.smallX = -int(this.smallWidth / 2); + this.smallY = -int(this.smallHeight / 2); + this.bigX = -int(this.bigWidth / 2); + this.bigY = -int(this.bigHeight / 2); + addChild(this.btnPng); + this.btnPng.x = this.smallX; + this.btnPng.y = this.smallY; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.MOUSE_DOWN,this.mouseDown); + addEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + this.buttonMode = true; + } + + private function mouseOut(param1:MouseEvent) : void + { + this.btnPng.width = this.smallWidth; + this.btnPng.height = this.smallHeight; + this.btnPng.x = this.smallX; + this.btnPng.y = this.smallY; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.btnPng.width = this.bigWidth; + this.btnPng.height = this.bigHeight; + this.btnPng.x = this.bigX; + this.btnPng.y = this.bigY; + } + + private function mouseDown(param1:MouseEvent) : void + { + this.btnPng.width = this.smallWidth; + this.btnPng.height = this.smallHeight; + this.btnPng.x = this.smallX; + this.btnPng.y = this.smallY; + } + + public function set onClick(param1:Function) : void + { + this.onclick = param1; + } + + public function mouseUp(param1:MouseEvent) : void + { + if(this.isEnable) + { + this.dispatchClickEvent(param1); + this.mouseOver(param1); + } + } + + public function dispatchClickEvent(param1:MouseEvent) : void + { + if(Boolean(this.onclick) && this.isEnable) + { + this.onclick(); + } + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIBase.as b/flash_decompiled/com/view/newui/UIBase.as new file mode 100644 index 0000000..950a84c --- /dev/null +++ b/flash_decompiled/com/view/newui/UIBase.as @@ -0,0 +1,20 @@ +package com.view.newui +{ + import com.InstallFace; + import com.view.res.GameUIRes; + import flash.display.Sprite; + + public class UIBase extends Sprite + { + + public var face:InstallFace = InstallFace.getInstance(); + + public var game:GameUIRes = GameUIRes.getInstance(); + + public function UIBase() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIBaseBtn.as b/flash_decompiled/com/view/newui/UIBaseBtn.as new file mode 100644 index 0000000..29dda48 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIBaseBtn.as @@ -0,0 +1,247 @@ +package com.view.newui +{ + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.greensock.TweenMax; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UIBaseBtn extends UIBase + { + + public var normal_skin:Sprite = new Sprite(); + + public var over_skin:Sprite = new Sprite(); + + public var down_skin:Sprite = new Sprite(); + + public var selected_skin:Sprite = new Sprite(); + + public var currViewPng:Sprite; + + private var onclick:Function; + + private var selectCss:TextFormat; + + private var normalCss:TextFormat; + + private var buttonText:TextField; + + private var isEnable:Boolean = true; + + private var isPlay:Boolean; + + public var swfLoad:UISwfEff; + + public function UIBaseBtn() + { + super(); + } + + public function addButtonText(param1:int) : void + { + this.selectCss = PublicMethod.getCenterTextFormat(); + this.selectCss.color = 16119823; + this.normalCss = PublicMethod.getCenterTextFormat(); + this.normalCss.color = 14010517; + this.buttonText = PublicMethod.getTextField(14010517,param1); + addChild(this.buttonText); + this.buttonText.defaultTextFormat = this.normalCss; + this.buttonText.y = 6; + this.buttonText.x = 0; + this.buttonText.filters = [PublicGlow.getInstance().textGlow]; + this.buttonText.mouseEnabled = false; + } + + public function setTextWidth() : void + { + this.buttonText.width = this.buttonText.textWidth + 4; + } + + public function setText(param1:String) : void + { + this.buttonText.text = param1; + } + + public function setHtmlText(param1:String) : void + { + this.buttonText.htmlText = param1; + } + + public function setTextPosiY(param1:int) : void + { + if(this.buttonText) + { + this.buttonText.y = param1; + } + } + + public function setTextPosiX(param1:int) : void + { + if(this.buttonText) + { + this.buttonText.x = param1; + } + } + + public function setButtonMode(param1:Boolean = true) : void + { + this.buttonMode = param1; + } + + public function set onClick(param1:Function) : void + { + this.onclick = param1; + } + + public function addEvent() : void + { + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.MOUSE_DOWN,this.mouseDown); + addEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + public function mouseOver(param1:MouseEvent) : void + { + if(this.isEnable) + { + this.viewPng(this.over_skin); + } + } + + public function mouseOut(param1:MouseEvent) : void + { + if(this.isEnable) + { + this.viewPng(this.normal_skin); + } + } + + public function mouseDown(param1:MouseEvent) : void + { + if(this.isEnable) + { + this.viewPng(this.down_skin); + } + } + + public function mouseUp(param1:MouseEvent) : void + { + if(this.isEnable) + { + this.viewPng(this.normal_skin); + this.dispatchClickEvent(param1); + } + } + + public function dispatchClickEvent(param1:MouseEvent) : void + { + if(Boolean(this.onclick) && this.isEnable) + { + this.onclick(param1); + } + } + + private function viewPng(param1:Sprite) : void + { + if(Boolean(this.currViewPng) && contains(this.currViewPng)) + { + removeChild(this.currViewPng); + } + this.currViewPng = param1; + addChildAt(this.currViewPng,0); + } + + public function setSelect() : void + { + this.setSelectCss(); + this.viewPng(this.selected_skin); + } + + public function setUnSelect() : void + { + this.setNormalCss(); + this.viewPng(this.normal_skin); + } + + public function init() : void + { + this.viewPng(this.normal_skin); + } + + public function setSelectCss() : void + { + if(Boolean(this.buttonText) && Boolean(this.selectCss) && this.isEnable) + { + this.buttonText.setTextFormat(this.selectCss); + } + } + + public function setTextCss(param1:TextFormat) : void + { + if(Boolean(this.buttonText) && Boolean(param1)) + { + this.buttonText.setTextFormat(param1); + } + } + + public function setNormalCss() : void + { + if(Boolean(this.buttonText) && Boolean(this.normalCss) && this.isEnable) + { + this.buttonText.setTextFormat(this.normalCss); + } + } + + public function setEnable() : void + { + TweenMax.to(this,0.1,{"colorMatrixFilter":{"saturation":1}}); + this.isEnable = true; + } + + public function setUnEnable() : void + { + TweenMax.to(this,0.1,{"colorMatrixFilter":{"saturation":0}}); + this.isEnable = false; + } + + public function startPlay() : void + { + if(this.isPlay) + { + return; + } + this.isPlay = true; + this.swfLoad = new UISwfEff(this.getEffUrl()); + this.addEff(); + } + + public function addEff() : void + { + addChild(this.swfLoad); + } + + public function getEffUrl() : String + { + return ""; + } + + public function stopPlay() : void + { + if(!this.isPlay) + { + return; + } + this.isPlay = false; + if(Boolean(this.swfLoad) && contains(this.swfLoad)) + { + this.swfLoad.stop(); + removeChild(this.swfLoad); + } + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIBigButton.as b/flash_decompiled/com/view/newui/UIBigButton.as new file mode 100644 index 0000000..64c54b1 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIBigButton.as @@ -0,0 +1,118 @@ +package com.view.newui +{ + import com.common.LoadResource; + import com.common.Scale9Grid; + import flash.display.Bitmap; + import flash.events.Event; + + public class UIBigButton extends UIBaseBtn + { + + private static var txt_1:String = "txt_kaishitiaozhan"; + + private static var txt_2:String = "txt_zidongtiaozhan"; + + private static var txt_3:String = "txt_lingqujiangli"; + + private static var txt_4:String = "txt_yilingqu"; + + private static var txt_5:String = "txt_jingxiangtongbu"; + + private static var txt_6:String = "txt_hubiao"; + + private static var txt_7:String = "txt_meirichongzhijiangli"; + + private static var txt_8:String = "txt_meirichongzhipaiming"; + + private var _url:String; + + private var loadRes:LoadResource; + + private var titlePic:Bitmap; + + public function UIBigButton(param1:int, param2:int = 1, param3:int = 17) + { + super(); + if(param2 == 1) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.specialBtn_normal_skin),86,param3); + over_skin = new Scale9Grid(face.getSprite(UIConfig.specialBtn_over_skin),86,param3); + down_skin = new Scale9Grid(face.getSprite(UIConfig.specialBtn_down_skin),86,param3); + } + else if(param2 == 2) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.specialBtn_normal_skin),37,param3); + over_skin = new Scale9Grid(face.getSprite(UIConfig.specialBtn_over_skin),37,param3); + down_skin = new Scale9Grid(face.getSprite(UIConfig.specialBtn_down_skin),37,param3); + } + else + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.specialBtn_normal_skin),124,param3); + over_skin = new Scale9Grid(face.getSprite(UIConfig.specialBtn_over_skin),124,param3); + down_skin = new Scale9Grid(face.getSprite(UIConfig.specialBtn_down_skin),124,param3); + } + this.loadTitle(param1); + setButtonMode(); + addEvent(); + init(); + } + + public function loadTitle(param1:int) : void + { + switch(param1) + { + case 1: + this._url = txt_1; + break; + case 2: + this._url = txt_2; + break; + case 3: + this._url = txt_3; + break; + case 4: + this._url = txt_4; + break; + case 5: + this._url = txt_5; + break; + case 6: + this._url = txt_6; + break; + case 7: + this._url = txt_7; + break; + case 8: + this._url = txt_8; + } + var _loc2_:String = "pic/title/" + this._url; + this.loadRes = new LoadResource(_loc2_ + ".png",this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.titlePic) && contains(this.titlePic)) + { + removeChild(this.titlePic); + } + this.titlePic = Bitmap(param1.target.loader.content); + addChild(this.titlePic); + this.titlePic.x = 4; + this.titlePic.y = 4; + this.loadRes.clear(); + } + + override public function setUnEnable() : void + { + super.setUnEnable(); + super.setButtonMode(false); + } + + override public function setEnable() : void + { + super.setEnable(); + super.setButtonMode(true); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIBigItem.as b/flash_decompiled/com/view/newui/UIBigItem.as new file mode 100644 index 0000000..cf09654 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIBigItem.as @@ -0,0 +1,141 @@ +package com.view.newui +{ + import com.common.LoadResource; + import com.view.tip.ItemTip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class UIBigItem extends UIBase + { + + private var itemSprite:Sprite; + + private var itemObject:Object; + + private var loadItemPng:LoadResource; + + private var itemsTip:ItemTip; + + private var itemImg:Bitmap; + + private var _clickFunc:Function; + + public function UIBigItem(param1:int = 1) + { + var _loc2_:Bitmap = null; + super(); + if(param1 == 1) + { + _loc2_ = new Bitmap(face.getPng(UIConfig.bigItem_skin)); + } + else + { + _loc2_ = new Bitmap(face.getPng(UIConfig.bigItem_lock_skin)); + } + addChild(_loc2_); + _loc2_.width = 59; + _loc2_.height = 59; + this.itemSprite = new Sprite(); + addChild(this.itemSprite); + this.itemSprite.x = 3; + this.itemSprite.y = 3; + addEventListener(MouseEvent.CLICK,this.clickItem); + } + + public function setItemObject(param1:Object) : void + { + if(Boolean(this.itemObject) && Boolean(param1) && param1.id == this.itemObject.id) + { + return; + } + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + } + if(param1 == null) + { + this.itemObject = null; + if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg)) + { + this.itemSprite.removeChild(this.itemImg); + } + } + else + { + if(Boolean(this.itemObject) && param1.id == this.itemObject.id) + { + return; + } + this.itemObject = param1; + this.loadItemImg(); + } + } + + private function loadItemImg() : void + { + if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg)) + { + this.itemSprite.removeChild(this.itemImg); + } + this.loadItemPng = new LoadResource("pic/equip/" + this.itemObject.viewMap.iconPath,this.loadPngBack); + } + + private function loadPngBack(param1:Event) : void + { + if(this.itemObject == null) + { + this.loadItemPng.clear(); + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + this.itemSprite.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + var _loc2_:Bitmap = new Bitmap(); + _loc2_.bitmapData = this.itemImg.bitmapData.clone(); + this.itemsTip = new ItemTip(this.itemSprite,face.stage,face.tip_bg,this.itemObject.viewMap); + } + + public function getItem() : Object + { + return this.itemObject; + } + + public function clickItem(param1:MouseEvent) : void + { + if(Boolean(this._clickFunc)) + { + this._clickFunc(param1); + } + } + + public function get clickFunc() : Function + { + return this._clickFunc; + } + + public function set clickFunc(param1:Function) : void + { + this._clickFunc = param1; + } + + public function clear() : void + { + this.itemSprite.removeEventListener(MouseEvent.CLICK,this.clickItem); + this.itemObject = null; + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + } + if(this.loadItemPng) + { + this.loadItemPng.clear(); + } + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIBigNumInputText.as b/flash_decompiled/com/view/newui/UIBigNumInputText.as new file mode 100644 index 0000000..ea940e9 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIBigNumInputText.as @@ -0,0 +1,165 @@ +package com.view.newui +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFieldType; + + public class UIBigNumInputText extends UIBase + { + + private var inputText:TextField; + + private var upBtn:SimpleButton; + + private var downBtn:SimpleButton; + + private var maxNum:Number = 999999999; + + private var inputEvent:Function; + + public function UIBigNumInputText(param1:int) + { + super(); + var _loc2_:Sprite = new Scale9Grid(face.getSprite(UIConfig.textInput_skin),param1 - 50,12); + addChild(_loc2_); + this.inputText = PublicMethod.getTextField(1048575,param1); + this.inputText.type = TextFieldType.INPUT; + this.inputText.mouseEnabled = true; + addChild(this.inputText); + this.inputText.text = "1"; + this.inputText.restrict = "0-9"; + this.inputText.maxChars = 6; + this.inputText.y = 3; + this.inputText.x = 4; + this.upBtn = face.getButton(UIConfig.btn_input_up); + this.upBtn.useHandCursor = false; + addChild(this.upBtn); + this.upBtn.x = param1 - 20; + this.upBtn.y = 1; + this.downBtn = face.getButton(UIConfig.btn_input_down); + this.downBtn.useHandCursor = false; + addChild(this.downBtn); + this.downBtn.x = this.upBtn.x; + this.downBtn.y = this.upBtn.y + 10; + this.inputText.addEventListener(Event.CHANGE,this.inputNum); + this.upBtn.addEventListener(MouseEvent.CLICK,this.upEvent); + this.downBtn.addEventListener(MouseEvent.CLICK,this.downEvent); + } + + public function readOnly() : void + { + this.inputText.type = TextFieldType.DYNAMIC; + } + + public function canInput() : void + { + this.inputText.type = TextFieldType.INPUT; + } + + public function hiddenBtn() : void + { + this.upBtn.visible = false; + this.downBtn.visible = false; + } + + public function setMaxChars(param1:int) : void + { + this.inputText.maxChars = param1; + } + + public function setTextNull() : void + { + this.inputText.text = ""; + } + + private function inputNum(param1:Event) : void + { + var _loc2_:Number = Number(this.inputText.text); + if(_loc2_ < 1) + { + _loc2_ = 1; + } + if(_loc2_ > this.maxNum) + { + _loc2_ = this.maxNum; + } + this.inputText.text = _loc2_ + ""; + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + public function setMaxNum(param1:Number) : void + { + this.maxNum = param1; + } + + private function upEvent(param1:MouseEvent) : void + { + var _loc2_:Number = Number(this.inputText.text); + _loc2_--; + if(_loc2_ < 1) + { + _loc2_ = 1; + } + this.inputText.text = _loc2_ + ""; + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + private function downEvent(param1:MouseEvent) : void + { + var _loc2_:Number = Number(this.inputText.text); + _loc2_ += 1; + if(_loc2_ > this.maxNum) + { + _loc2_ = this.maxNum; + } + this.inputText.text = _loc2_ + ""; + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + public function getTextNum() : Number + { + if(PublicMethod.trim(this.inputText.text) == "") + { + return 0; + } + return Number(this.inputText.text); + } + + public function setTextNum(param1:Number) : void + { + if(param1 < 1) + { + param1 = 1; + } + if(param1 > this.maxNum) + { + param1 = this.maxNum; + } + this.inputText.text = param1 + ""; + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + public function setInputEvent(param1:Function) : void + { + this.inputEvent = param1; + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIBorderMc.as b/flash_decompiled/com/view/newui/UIBorderMc.as new file mode 100644 index 0000000..0eef379 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIBorderMc.as @@ -0,0 +1,79 @@ +package com.view.newui +{ + import com.common.LoadResource; + import com.common.Scale9Grid; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class UIBorderMc extends UIBase + { + + private var title_1:String = "title_wujiangxuanze"; + + private var title_2:String = "title_guankajiangli"; + + private var title_3:String = "title_jinengshuoming"; + + private var title_4:String = "title_shengjiyaoqiu"; + + private var title_5:String = "title_huodongguize"; + + private var title_6:String = "title_tongguanxinxi"; + + private var title_7:String = "title_jianghunliebiao"; + + private var title_8:String = "title_jianghunshuxing"; + + private var title_9:String = "title_jianghunshengji"; + + private var title_10:String = "title_match_1"; + + private var title_11:String = "title_match_2"; + + private var title_12:String = "title_match_9"; + + private var title_13:String = "title_match_3"; + + private var title_14:String = "title_match_4"; + + private var title_15:String = "title_match_5"; + + private var title_16:String = "title_match_6"; + + private var title_17:String = "title_match_7"; + + private var title_18:String = "title_match_8"; + + private var title_19:String = "title_match_10"; + + private var title_20:String = "title_match_11"; + + private var loadRes:LoadResource; + + private var titlePic:Bitmap; + + public function UIBorderMc(param1:int = 30, param2:int = 15) + { + super(); + var _loc3_:Sprite = new Scale9Grid(face.getSprite(UIConfig.title_bottom_bg),param1,param2); + addChild(_loc3_); + } + + public function loadTitle(param1:int) : void + { + var _loc2_:String = this["title_" + param1]; + var _loc3_:String = "pic/title/" + _loc2_; + this.loadRes = new LoadResource(_loc3_ + ".png",this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.titlePic = Bitmap(param1.target.loader.content); + addChild(this.titlePic); + this.titlePic.x = int(width / 2 - this.titlePic.width / 2); + this.titlePic.y = int(height / 2 - this.titlePic.height / 2); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIButton.as b/flash_decompiled/com/view/newui/UIButton.as new file mode 100644 index 0000000..b63f33d --- /dev/null +++ b/flash_decompiled/com/view/newui/UIButton.as @@ -0,0 +1,65 @@ +package com.view.newui +{ + import com.common.Scale9Grid; + import flash.events.MouseEvent; + + public class UIButton extends UIBaseBtn + { + + public function UIButton(param1:String, param2:int = 1, param3:int = 12) + { + super(); + if(param2 == 1) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_normal_skin),26,param3); + over_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_over_skin),26,param3); + down_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_down_skin),26,param3); + } + else if(param2 == 2) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_normal_skin),37,param3); + over_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_over_skin),37,param3); + down_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_down_skin),37,param3); + } + else if(param2 == 3) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_normal_skin),58,param3); + over_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_over_skin),58,param3); + down_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_down_skin),58,param3); + } + else if(param2 == 4) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_normal_skin),70,param3); + over_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_over_skin),70,param3); + down_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_down_skin),70,param3); + } + else + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_normal_skin),100,param3); + over_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_over_skin),100,param3); + down_skin = new Scale9Grid(face.getSprite(UIConfig.normalBtn_down_skin),100,param3); + } + addButtonText(normal_skin.width); + setText(param1); + var _loc4_:int = 12 - param3; + var _loc5_:int = _loc4_ / 2; + setTextPosiY(5 - _loc5_); + setButtonMode(); + addEvent(); + init(); + } + + override public function mouseOver(param1:MouseEvent) : void + { + super.mouseOver(param1); + super.setSelectCss(); + } + + override public function mouseOut(param1:MouseEvent) : void + { + super.mouseOut(param1); + super.setNormalCss(); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIButton1.as b/flash_decompiled/com/view/newui/UIButton1.as new file mode 100644 index 0000000..3107bba --- /dev/null +++ b/flash_decompiled/com/view/newui/UIButton1.as @@ -0,0 +1,51 @@ +package com.view.newui +{ + import com.comfig.ClassConfig; + import com.common.Scale9Grid; + + public class UIButton1 extends UIBaseBtn + { + + public function UIButton1(param1:String, param2:int = 1, param3:int = 14) + { + super(); + if(param2 == 1) + { + normal_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),40,param3); + over_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),40,param3); + down_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_down),40,param3); + selected_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),40,param3); + } + else if(param2 == 2) + { + normal_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),26,param3); + over_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),26,param3); + down_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_down),26,param3); + selected_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),26,param3); + } + else if(param2 == 3) + { + normal_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),60,param3); + over_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),60,param3); + down_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_down),60,param3); + selected_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),60,param3); + } + else + { + normal_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),32,param3); + over_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),32,param3); + down_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_down),32,param3); + selected_skin = new Scale9Grid(face.getSprite(ClassConfig.window_btn_up),32,param3); + } + setButtonMode(); + addButtonText(normal_skin.width); + setText(param1); + addEvent(); + var _loc4_:int = 12 - param3; + var _loc5_:int = _loc4_ / 2; + setTextPosiY(4 - _loc5_); + init(); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIBuyItem.as b/flash_decompiled/com/view/newui/UIBuyItem.as new file mode 100644 index 0000000..051e71d --- /dev/null +++ b/flash_decompiled/com/view/newui/UIBuyItem.as @@ -0,0 +1,197 @@ +package com.view.newui +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.shop.event.ShopEvent; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UIBuyItem extends UIWindowBg + { + + private var itemNameText:UITitleBg; + + private var inputUI:UINumInputText; + + private var sum_txt:TextField; + + private var cashBuy:UICheckBtn; + + private var pointBuy:UICheckBtn; + + private var buyBtn:UIButton; + + private var itemObj:Object; + + private var itemsImg:Bitmap; + + private var payPointIcon:Sprite; + + private var realPrice:int; + + public var ui_closeBtn:UICloseBtn; + + private var buyType:int; + + private var preCheckBtn:UICheckBtn; + + public var buyCompleteF:Function; + + public function UIBuyItem() + { + var _loc2_:Sprite = null; + var _loc3_:TextField = null; + var _loc5_:TextField = null; + super(); + initSecondPanel(210,145); + this.itemNameText = new UITitleBg("道具",202); + addChild(this.itemNameText); + this.ui_closeBtn = new UICloseBtn(); + addChild(this.ui_closeBtn); + this.ui_closeBtn.x = width - 22; + this.ui_closeBtn.y = 2; + this.ui_closeBtn.onClick = this.closeUI; + this.buyBtn = new UIButton("购 买",1,10); + addChild(this.buyBtn); + this.buyBtn.x = 135; + this.buyBtn.y = 125; + this.buyBtn.onClick = this.buyItems; + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(16777215,56); + addChild(_loc1_); + _loc1_.x = 72; + _loc1_.y = 42; + _loc1_.text = "购买数量"; + this.inputUI = new UINumInputText(80); + addChild(this.inputUI); + this.inputUI.x = _loc1_.x + 55; + this.inputUI.y = _loc1_.y - 2; + this.inputUI.setInputEvent(this.changeNum); + this.inputUI.setMaxNum(500000); + _loc2_ = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + addChild(_loc2_); + _loc2_.x = 7; + _loc2_.y = 30; + _loc3_ = PublicMethod.getTextFieldWithFillter(16777215,56); + addChild(_loc3_); + _loc3_.x = _loc1_.x - 20; + _loc3_.y = _loc1_.y + 52; + _loc3_.text = "购买方式"; + var _loc4_:Sprite = face.getSprite(ClassConfig.lib_ui_cash); + addChild(_loc4_); + _loc4_.x = _loc3_.x + 56; + _loc4_.y = _loc3_.y; + this.cashBuy = new UICheckBtn(); + addChild(this.cashBuy); + this.cashBuy.x = _loc4_.x + 25; + this.cashBuy.y = _loc3_.y; + this.cashBuy.onClick = this.choosePayType; + this.payPointIcon = face.getSprite(ClassConfig.lib_ui_point); + addChild(this.payPointIcon); + this.payPointIcon.x = this.cashBuy.x + 30; + this.payPointIcon.y = _loc3_.y; + this.pointBuy = new UICheckBtn(); + addChild(this.pointBuy); + this.pointBuy.x = this.payPointIcon.x + 25; + this.pointBuy.y = _loc3_.y; + this.pointBuy.onClick = this.choosePayType; + _loc5_ = PublicMethod.getTextFieldWithFillter(16777215,56); + addChild(_loc5_); + _loc5_.x = _loc1_.x; + _loc5_.y = _loc1_.y + 26; + _loc5_.text = " 总 价"; + this.sum_txt = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(this.sum_txt); + this.sum_txt.x = _loc5_.x + 55; + this.sum_txt.y = _loc5_.y; + this.itemsImg = new Bitmap(); + addChild(this.itemsImg); + this.itemsImg.x = 10; + this.itemsImg.y = 33; + ConnectService.getInstance().addEventListener(ShopEvent.SHOP_ITEM_BUY_RESULT,this.buyItemsResult); + } + + public function setData(param1:Object, param2:BitmapData) : void + { + if(param1 == null) + { + return; + } + this.itemObj = param1; + this.itemNameText.setTitleName(this.itemObj.viewMap.showName); + if(param2) + { + this.itemsImg.bitmapData = param2; + this.itemsImg.width = 53; + this.itemsImg.height = 53; + } + this.realPrice = int(param1.realPrice); + if(this.itemObj.isPayPointCanBuy == 1) + { + this.pointBuy.visible = true; + this.payPointIcon.visible = true; + this.pointBuy.setUnSelect(); + } + else + { + this.pointBuy.visible = false; + this.payPointIcon.visible = false; + } + this.inputUI.setTextNum(1); + this.buyType = 2; + this.cashBuy.setSelect(); + } + + private function changeNum() : void + { + var _loc1_:int = this.inputUI.getTextNum(); + this.sum_txt.text = String(this.realPrice * _loc1_); + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function buyItems(param1:MouseEvent) : void + { + var _loc2_:int = this.inputUI.getTextNum(); + ConnectService.getInstance().shopService.buyGood(this.itemObj.shopId,_loc2_,this.buyType); + } + + private function choosePayType(param1:MouseEvent) : void + { + var _loc2_:UICheckBtn = param1.currentTarget as UICheckBtn; + if(_loc2_ == this.cashBuy) + { + this.buyType = 2; + this.cashBuy.setSelect(); + this.pointBuy.setUnSelect(); + } + else + { + this.buyType = 1; + this.cashBuy.setUnSelect(); + this.pointBuy.setSelect(); + } + } + + private function buyItemsResult(param1:ShopEvent) : void + { + this.closeUI(null); + if(this.buyCompleteF != null) + { + this.buyCompleteF(); + this.buyCompleteF = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIBuyPresItem.as b/flash_decompiled/com/view/newui/UIBuyPresItem.as new file mode 100644 index 0000000..22cf075 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIBuyPresItem.as @@ -0,0 +1,197 @@ +package com.view.newui +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.shop.event.ShopEvent; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UIBuyPresItem extends UIWindowBg + { + + private var itemNameText:UITitleBg; + + private var inputUI:UINumInputText; + + private var sum_txt:TextField; + + private var cashBuy:UICheckBtn; + + private var pointBuy:UICheckBtn; + + private var buyBtn:UIButton; + + private var itemObj:Object; + + private var itemsImg:Bitmap; + + private var buyTypeText:TextField; + + private var realPrice:int; + + public var ui_closeBtn:UICloseBtn; + + public var buyCompleteF:Function; + + public function UIBuyPresItem() + { + var _loc2_:Sprite = null; + var _loc3_:TextField = null; + var _loc4_:TextField = null; + super(); + initSecondPanel(210,145); + this.itemNameText = new UITitleBg("道具",202); + addChild(this.itemNameText); + this.ui_closeBtn = new UICloseBtn(); + addChild(this.ui_closeBtn); + this.ui_closeBtn.x = width - 22; + this.ui_closeBtn.y = 2; + this.ui_closeBtn.onClick = this.closeUI; + this.buyBtn = new UIButton("购 买",1,10); + addChild(this.buyBtn); + this.buyBtn.x = 135; + this.buyBtn.y = 125; + this.buyBtn.onClick = this.buyItems; + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(16777215,56); + addChild(_loc1_); + _loc1_.x = 72; + _loc1_.y = 42; + _loc1_.text = "购买数量"; + this.inputUI = new UINumInputText(80); + addChild(this.inputUI); + this.inputUI.x = _loc1_.x + 55; + this.inputUI.y = _loc1_.y - 2; + this.inputUI.setInputEvent(this.changeNum); + this.inputUI.setMaxNum(10000); + _loc2_ = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + addChild(_loc2_); + _loc2_.x = 7; + _loc2_.y = 30; + _loc3_ = PublicMethod.getTextFieldWithFillter(16777215,56); + addChild(_loc3_); + _loc3_.x = _loc1_.x; + _loc3_.y = _loc1_.y + 52; + _loc3_.text = "购买方式"; + this.buyTypeText = PublicMethod.getTextFieldWithFillter(16773120,30); + addChild(this.buyTypeText); + this.buyTypeText.x = this.inputUI.x; + this.buyTypeText.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(16777215,56); + addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = _loc1_.y + 26; + _loc4_.text = " 总 价"; + this.sum_txt = PublicMethod.getTextFieldWithFillter(16773120,100); + addChild(this.sum_txt); + this.sum_txt.x = _loc4_.x + 55; + this.sum_txt.y = _loc4_.y; + this.itemsImg = new Bitmap(); + addChild(this.itemsImg); + this.itemsImg.x = 10; + this.itemsImg.y = 33; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + } + + public function setData(param1:Object, param2:BitmapData) : void + { + if(param1 == null) + { + return; + } + this.itemObj = param1; + this.itemNameText.setTitleName(this.itemObj.viewMap.showName); + if(param2) + { + this.itemsImg.bitmapData = param2; + this.itemsImg.width = 53; + this.itemsImg.height = 53; + } + this.realPrice = int(param1.realPrice); + if(param1.tagId == 40) + { + this.buyTypeText.text = "军工"; + this.inputUI.setMaxNum(1000); + } + else + { + this.buyTypeText.text = "声望"; + this.inputUI.setMaxNum(10); + } + this.inputUI.setTextNum(1); + } + + private function changeNum() : void + { + var _loc1_:int = this.inputUI.getTextNum(); + this.sum_txt.text = String(this.realPrice * _loc1_); + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(ShopEvent.SHOP_ITEM_BUY_Jungong,this.buyItemsResult); + ConnectService.getInstance().addEventListener(ShopEvent.SHOP_ITEM_BUY_Prestige,this.buyItemsResult); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(ShopEvent.SHOP_ITEM_BUY_Jungong,this.buyItemsResult); + ConnectService.getInstance().removeEventListener(ShopEvent.SHOP_ITEM_BUY_Prestige,this.buyItemsResult); + } + + private function buyItems(param1:MouseEvent) : void + { + if(this.itemObj == null) + { + return; + } + var _loc2_:int = this.inputUI.getTextNum(); + if(_loc2_ < 1) + { + return; + } + if(this.itemObj.tagId == 40) + { + this.buyJunGongGood(_loc2_); + } + else + { + this.buyPrestigeGood(_loc2_); + } + } + + private function buyPrestigeGood(param1:int) : void + { + ConnectService.getInstance().shopService.buyPrestigeGood(this.itemObj.shopId,param1); + } + + private function buyJunGongGood(param1:int) : void + { + ConnectService.getInstance().shopService.buyJunGongGood(this.itemObj.shopId,param1); + } + + private function buyItemsResult(param1:ShopEvent) : void + { + this.closeUI(null); + if(this.buyCompleteF != null) + { + this.buyCompleteF(); + this.buyCompleteF = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/newui/UICheckBtn.as b/flash_decompiled/com/view/newui/UICheckBtn.as new file mode 100644 index 0000000..a115b91 --- /dev/null +++ b/flash_decompiled/com/view/newui/UICheckBtn.as @@ -0,0 +1,52 @@ +package com.view.newui +{ + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class UICheckBtn extends UIBaseBtn + { + + private var isSelect:Boolean; + + public function UICheckBtn() + { + super(); + normal_skin.addChild(new Bitmap(face.getPng(UIConfig.checkBox_normal_skin))); + selected_skin.addChild(new Bitmap(face.getPng(UIConfig.checkBox_selected_skin))); + setButtonMode(); + init(); + addEvent(); + } + + public function getSelect() : Boolean + { + return this.isSelect; + } + + override public function mouseOver(param1:MouseEvent) : void + { + } + + override public function mouseOut(param1:MouseEvent) : void + { + } + + override public function mouseDown(param1:MouseEvent) : void + { + } + + override public function mouseUp(param1:MouseEvent) : void + { + if(this.isSelect) + { + this.isSelect = false; + } + else + { + this.isSelect = true; + } + dispatchClickEvent(param1); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UICloseBtn.as b/flash_decompiled/com/view/newui/UICloseBtn.as new file mode 100644 index 0000000..d2f8cb2 --- /dev/null +++ b/flash_decompiled/com/view/newui/UICloseBtn.as @@ -0,0 +1,20 @@ +package com.view.newui +{ + import flash.display.Bitmap; + + public class UICloseBtn extends UIBaseBtn + { + + public function UICloseBtn() + { + super(); + normal_skin.addChild(new Bitmap(face.getPng(UIConfig.closeBtn_normal_skin))); + over_skin.addChild(new Bitmap(face.getPng(UIConfig.closeBtn_over_skin))); + down_skin.addChild(new Bitmap(face.getPng(UIConfig.closeBtn_down_skin))); + setButtonMode(); + init(); + addEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIConfig.as b/flash_decompiled/com/view/newui/UIConfig.as new file mode 100644 index 0000000..cb1027e --- /dev/null +++ b/flash_decompiled/com/view/newui/UIConfig.as @@ -0,0 +1,168 @@ +package com.view.newui +{ + public class UIConfig + { + + public static var selectBgColor:uint = 13382604; + + public static var overBgColor:uint = 6378823; + + public static var labelColor:uint = 10852210; + + public static var textColor:uint = 16640697; + + public static var succColor:uint = 65280; + + public static var importColor:uint = 65280; + + public static var warnColor:uint = 16711680; + + public static var bgUrl_qifu:String = "bg_qifu.jpg"; + + public static const firstPanel_skin:String = "firstPanel_skin"; + + public static const secondPanel_skin:String = "secondPanel_skin"; + + public static const thirdPanel_skin:String = "thirdPanel_skin"; + + public static const tabBtn_selected_skin:String = "tabBtn_selected_skin"; + + public static const tabBtn_over_skin:String = "tabBtn_over_skin"; + + public static const tabBtn_normal_skin:String = "tabBtn_normal_skin"; + + public static const tabBtn_down_skin:String = "tabBtn_down_skin"; + + public static const chat_btn_selected:String = "chat_btn_selected"; + + public static const chat_btn_over:String = "chat_btn_over"; + + public static const chat_btn_up:String = "chat_btn_up"; + + public static const chat_btn_down:String = "chat_btn_down"; + + public static const normalBtn_down_skin:String = "normalBtn_down_skin"; + + public static const normalBtn_normal_skin:String = "normalBtn_normal_skin"; + + public static const normalBtn_over_skin:String = "normalBtn_over_skin"; + + public static const specialBtn_over_skin:String = "specialBtn_over_skin"; + + public static const specialBtn_normal_skin:String = "specialBtn_normal_skin"; + + public static const specialBtn_down_skin:String = "specialBtn_down_skin"; + + public static const progressBg_skin:String = "progressBg_skin"; + + public static const progress_skin:String = "progress_skin"; + + public static const titleBg:String = "titleBg"; + + public static const titleBg_small:String = "titleBg_small"; + + public static const shop_item_bg:String = "shop_item_bg"; + + public static const textInput_skin:String = "textInput_skin"; + + public static const page_num:String = "page_num"; + + public static const light_separete:String = "light_separete"; + + public static const tip_bg:String = "tip_bg"; + + public static const bagGood_normal_skin:String = "bagGood_normal_skin"; + + public static const boxItem:String = "boxItem"; + + public static const arrow_1:String = "arrow_1"; + + public static const chat_bg:String = "chat_bg"; + + public static const chat_bg1:String = "chat_bg1"; + + public static const chat_input_border:String = "chat_input_border"; + + public static const enter_bg:String = "enter_bg"; + + public static const title_bottom_bg:String = "title_bottom_bg"; + + public static const arrow_down:String = "arrow_down"; + + public static const checkBox_selected_skin:String = "checkBox_selected_skin"; + + public static const checkBox_normal_skin:String = "checkBox_normal_skin"; + + public static const radio_selected_skin:String = "radio_selected_skin"; + + public static const radio_normal_skin:String = "radio_normal_skin"; + + public static const png_num_1:String = "png_num_1"; + + public static const png_num_2:String = "png_num_2"; + + public static const png_num_3:String = "png_num_3"; + + public static const png_num_4:String = "png_num_4"; + + public static const png_num_5:String = "png_num_5"; + + public static const png_num_6:String = "png_num_6"; + + public static const png_num_7:String = "png_num_7"; + + public static const png_num_8:String = "png_num_8"; + + public static const png_num_9:String = "png_num_9"; + + public static const png_num_10:String = "png_num_10"; + + public static const png_num_11:String = "png_num_11"; + + public static const png_num_12:String = "png_num_12"; + + public static const png_num_13:String = "png_num_13"; + + public static const png_num_14:String = "png_num_14"; + + public static const png_num_15:String = "png_num_15"; + + public static const png_num_16:String = "png_num_16"; + + public static const png_num_17:String = "png_num_17"; + + public static const png_num_18:String = "png_num_18"; + + public static const bigItem_skin:String = "bigItem_skin"; + + public static const bigItem_lock_skin:String = "bigItem_lock_skin"; + + public static const closeBtn_over_skin:String = "closeBtn_over_skin"; + + public static const closeBtn_normal_skin:String = "closeBtn_normal_skin"; + + public static const closeBtn_down_skin:String = "closeBtn_down_skin"; + + public static const btn_input_down:String = "btn_input_down"; + + public static const btn_input_up:String = "btn_input_up"; + + public static const btn_page_left:String = "btn_page_left"; + + public static const btn_page_right:String = "btn_page_right"; + + public static const btn_add:String = "btn_add"; + + public static const btn_jian:String = "btn_jian"; + + public static const btn_down:String = "btn_down"; + + public static const btn_up:String = "btn_up"; + + public function UIConfig() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIExpBar.as b/flash_decompiled/com/view/newui/UIExpBar.as new file mode 100644 index 0000000..abed666 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIExpBar.as @@ -0,0 +1,153 @@ +package com.view.newui +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.geom.Point; + import flash.geom.Rectangle; + import flash.text.TextField; + + public class UIExpBar extends UIBase + { + + private var expMax:int; + + private var currExp:int; + + private var _width:int; + + private var expImg1:Bitmap; + + private var expImg2:Bitmap; + + private var expImg3:Bitmap; + + private var expText:TextField; + + private var expMax1:Number; + + private var currExp1:Number; + + public function UIExpBar() + { + super(); + } + + public function setWidth(param1:int) : void + { + this._width = param1 - 13; + } + + public function setMaxValue(param1:int) : void + { + this.expMax = param1; + } + + public function setMaxValue1(param1:Number) : void + { + this.expMax1 = param1; + } + + public function setCurValue1(param1:Number) : void + { + this.currExp1 = param1; + if(this.currExp1 > this.expMax1) + { + this.currExp1 = this.expMax1; + } + this.expText.text = this.currExp1 + "/" + this.expMax1; + this.setSize1(); + } + + public function setSize1() : void + { + var _loc1_:int = int(this._width * this.currExp1 / this.expMax1); + if(_loc1_ < 10) + { + this.expImg2.width = 0; + this.expImg3.x = this.expImg1.x + this.expImg1.width; + this.expImg3.y = this.expImg1.y; + } + else + { + this.expImg2.x = this.expImg1.x + this.expImg1.width; + this.expImg2.y = this.expImg1.y; + this.expImg2.width = _loc1_ - 4; + this.expImg3.x = this.expImg2.x + this.expImg2.width; + this.expImg3.y = this.expImg1.y; + } + } + + public function init() : void + { + var _loc1_:Sprite = new Scale9Grid(face.getSprite(UIConfig.progressBg_skin),this._width,6); + addChild(_loc1_); + var _loc2_:BitmapData = face.getPng(UIConfig.progress_skin); + var _loc3_:BitmapData = new BitmapData(5,7); + _loc3_.copyPixels(_loc2_,new Rectangle(0,0,5,7),new Point(0,0)); + this.expImg1 = new Bitmap(_loc3_); + var _loc4_:BitmapData = new BitmapData(10,7); + _loc4_.copyPixels(_loc2_,new Rectangle(5,0,10,7),new Point(0,0)); + this.expImg2 = new Bitmap(_loc4_); + var _loc5_:BitmapData = new BitmapData(5,7); + _loc5_.copyPixels(_loc2_,new Rectangle(15,0,5,7),new Point(0,0)); + this.expImg3 = new Bitmap(_loc5_); + addChild(this.expImg1); + addChild(this.expImg2); + addChild(this.expImg3); + this.expImg1.x = 3; + this.expImg1.y = 3; + this.expText = PublicMethod.getTextFieldWithFillter(16777215,this._width); + this.expText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + addChild(this.expText); + this.expText.x = 2; + } + + public function setSize() : void + { + var _loc1_:int = int(this._width * this.currExp / this.expMax); + if(_loc1_ < 10) + { + this.expImg2.width = 0; + this.expImg3.x = this.expImg1.x + this.expImg1.width; + this.expImg3.y = this.expImg1.y; + } + else + { + this.expImg2.x = this.expImg1.x + this.expImg1.width; + this.expImg2.y = this.expImg1.y; + this.expImg2.width = _loc1_ - 4; + this.expImg3.x = this.expImg2.x + this.expImg2.width; + this.expImg3.y = this.expImg1.y; + } + } + + public function setCurValue(param1:int) : void + { + this.currExp = param1; + if(this.currExp > this.expMax) + { + this.currExp = this.expMax; + } + this.expText.text = this.currExp + "/" + this.expMax; + this.setSize(); + } + + public function setCurTime(param1:int) : void + { + this.currExp = param1; + this.expText.text = "剩余:" + PublicMethod.getTimeStr(this.currExp); + this.setSize(); + } + + public function setCurLen(param1:int, param2:String) : void + { + this.currExp = param1; + this.expText.text = param2 + ""; + this.setSize(); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIHeroItem.as b/flash_decompiled/com/view/newui/UIHeroItem.as new file mode 100644 index 0000000..f5e12fd --- /dev/null +++ b/flash_decompiled/com/view/newui/UIHeroItem.as @@ -0,0 +1,131 @@ +package com.view.newui +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.ui.hero.HeroConst; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class UIHeroItem extends UIWindowBg + { + + private var imgSp:Sprite; + + private var name_txt:TextField; + + private var hp_txt:TextField; + + private var num_txt:TextField; + + private var level_txt:TextField; + + private var tongbing_txt:TextField; + + private var url:String; + + private var loadImg:LoadResource; + + private var currHero:Object; + + private var headImg:Bitmap; + + public function UIHeroItem() + { + super(); + initSecondPanel(112,76); + var _loc1_:Sprite = face.getSprite(ClassConfig.lib_herobg); + addChild(_loc1_); + _loc1_.x = 2; + _loc1_.y = 2; + _loc1_.width = 68; + _loc1_.height = 82; + this.name_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + addChild(this.name_txt); + this.name_txt.x = 71; + this.name_txt.y = 4; + this.hp_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + addChild(this.hp_txt); + this.hp_txt.x = this.name_txt.x; + this.hp_txt.y = this.name_txt.y + 20; + this.tongbing_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + addChild(this.tongbing_txt); + this.tongbing_txt.x = this.hp_txt.x; + this.tongbing_txt.y = this.hp_txt.y + 20; + this.num_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + addChild(this.num_txt); + this.num_txt.x = this.hp_txt.x; + this.num_txt.y = this.tongbing_txt.y + 20; + this.level_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,66); + addChild(this.level_txt); + this.level_txt.x = 5; + this.level_txt.y = 64; + this.imgSp = new Sprite(); + _loc1_.addChild(this.imgSp); + this.imgSp.x = 4; + this.imgSp.y = 4; + } + + public function setData(param1:Object) : void + { + this.currHero = param1; + if(param1 == null) + { + this.name_txt.htmlText = ""; + this.hp_txt.htmlText = ""; + this.tongbing_txt.htmlText = ""; + this.num_txt.text = ""; + this.level_txt.text = ""; + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + } + else + { + this.name_txt.htmlText = param1.showName; + this.hp_txt.htmlText = "" + param1.hpStatusView + ""; + if(param1.armyNum > 0) + { + this.tongbing_txt.htmlText = param1.armyName; + } + else + { + this.tongbing_txt.htmlText = "未带兵"; + } + this.num_txt.text = "" + param1.armyNum; + this.level_txt.text = HeroConst.changeName(param1.level,param1.changeCount); + this.loadHeroImg(param1.picPath); + } + } + + private function loadHeroImg(param1:String) : void + { + if(this.url == param1 && Boolean(this.headImg)) + { + this.imgSp.addChild(this.headImg); + return; + } + this.url = param1; + this.loadImg = new LoadResource("pic/head/" + this.url,this.loadOver); + } + + private function loadOver(param1:Event) : void + { + if(this.currHero == null) + { + return; + } + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.imgSp.addChild(this.headImg); + this.loadImg.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIIconBtn.as b/flash_decompiled/com/view/newui/UIIconBtn.as new file mode 100644 index 0000000..54fed60 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIIconBtn.as @@ -0,0 +1,49 @@ +package com.view.newui +{ + import flash.display.Bitmap; + import flash.events.MouseEvent; + import flash.filters.GlowFilter; + + public class UIIconBtn extends UIBase + { + + private var bitmap:Bitmap; + + private var filter:Array; + + public function UIIconBtn(param1:Bitmap) + { + super(); + this.bitmap = param1; + addChild(this.bitmap); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.MOUSE_DOWN,this.mouseDown); + addEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + this.filter = [new GlowFilter(16777215,0.2,70,70,3,1,true)]; + this.buttonMode = true; + } + + private function mouseOut(param1:MouseEvent) : void + { + this.bitmap.filters = null; + this.bitmap.y = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.bitmap.filters = this.filter; + } + + private function mouseDown(param1:MouseEvent) : void + { + this.bitmap.y = 2; + } + + private function mouseUp(param1:MouseEvent) : void + { + this.bitmap.y = 0; + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIInputText.as b/flash_decompiled/com/view/newui/UIInputText.as new file mode 100644 index 0000000..c0fd6d5 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIInputText.as @@ -0,0 +1,108 @@ +package com.view.newui +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.utils.Utils; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + import flash.text.TextFieldType; + import flash.text.TextFormat; + + public class UIInputText extends UIBase + { + + private var inputText:TextField; + + private var inputEvent:Function; + + public function UIInputText(param1:int, param2:int = 12) + { + super(); + var _loc3_:Sprite = new Scale9Grid(face.getSprite(UIConfig.textInput_skin),param1 - 50,param2); + addChild(_loc3_); + this.inputText = PublicMethod.getTextField(1048575,param1); + this.inputText.type = TextFieldType.INPUT; + this.inputText.mouseEnabled = true; + addChild(this.inputText); + this.inputText.y = 3; + this.inputText.x = 2; + this.inputText.addEventListener(Event.CHANGE,this.inputNum); + } + + public function setMaxChars(param1:int) : void + { + this.inputText.maxChars = param1; + } + + public function numOnly() : void + { + this.inputText.restrict = "0-9"; + } + + public function readOnly() : void + { + this.inputText.type = TextFieldType.DYNAMIC; + } + + private function inputNum(param1:Event) : void + { + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + public function getText() : String + { + return Utils.trim(this.inputText.text); + } + + public function setText(param1:String) : void + { + this.inputText.text = param1; + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + public function setInputEvent(param1:Function) : void + { + this.inputEvent = param1; + } + + public function setTextFormat(param1:TextFormat) : void + { + this.inputText.defaultTextFormat = param1; + } + + public function setTextInput(param1:Boolean) : void + { + if(param1) + { + if(this.inputText.type == TextFieldType.INPUT) + { + return; + } + this.inputText.mouseEnabled = true; + this.inputText.type = TextFieldType.INPUT; + } + else + { + if(this.inputText.type == TextFieldType.DYNAMIC) + { + return; + } + this.inputText.mouseEnabled = false; + this.inputText.type = TextFieldType.DYNAMIC; + } + } + + public function getTextField() : TextField + { + return this.inputText; + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIItem.as b/flash_decompiled/com/view/newui/UIItem.as new file mode 100644 index 0000000..9768af8 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIItem.as @@ -0,0 +1,226 @@ +package com.view.newui +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + 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 UIItem extends UIBase + { + + public static const TYPE_1:int = 61; + + public static const TYPE_2:int = 62; + + public static const TYPE_3:int = 63; + + public static const TYPE_4:int = 65; + + public static const TYPE_5:int = 64; + + public static const TYPE_6:int = 67; + + public static const TYPE_7:int = 68; + + public static const TYPE_8:int = 69; + + private var numText:TextField; + + private var itemSprite:Sprite; + + private var _type:int; + + private var _clickFunc:Function; + + private var itemObject:PackItem; + + private var loadItemPng:LoadResource; + + private var itemsTip:ItemTip; + + private var itemImg:Bitmap; + + private var png:Bitmap; + + private var typeText:TextField; + + public function UIItem(param1:int = 28, param2:int = 28) + { + var _loc4_:TextFormat = null; + super(); + var _loc3_:Sprite = new Scale9Grid(face.getSprite(UIConfig.bagGood_normal_skin),param1,param2); + addChild(_loc3_); + this.typeText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,44); + addChild(this.typeText); + this.typeText.x = 2; + this.typeText.y = 14; + this.typeText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemSprite = new Sprite(); + addChild(this.itemSprite); + this.itemSprite.x = 3; + this.itemSprite.y = 3; + this.numText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40); + _loc4_ = PublicMethod.getRightTextFormat(); + addChild(this.numText); + this.numText.x = int(width - this.numText.width - 3); + this.numText.y = height - 18; + this.numText.defaultTextFormat = _loc4_; + addEventListener(MouseEvent.CLICK,this.clickItem); + } + + public function getItemSprite() : Sprite + { + return this.itemSprite; + } + + public function showTypeText() : void + { + switch(this._type) + { + case TYPE_1: + this.typeText.text = "头盔"; + break; + case TYPE_2: + this.typeText.text = "铠甲"; + break; + case TYPE_3: + this.typeText.text = "武器"; + break; + case TYPE_4: + this.typeText.text = "饰品"; + break; + case TYPE_5: + this.typeText.text = "护腿"; + break; + case TYPE_6: + this.typeText.text = "挂饰"; + break; + case TYPE_7: + this.typeText.text = "串珠"; + break; + case TYPE_8: + this.typeText.text = "护心镜"; + } + } + + public function get type() : int + { + return this._type; + } + + public function set type(param1:int) : void + { + this._type = param1; + } + + public function get clickFunc() : Function + { + return this._clickFunc; + } + + public function set clickFunc(param1:Function) : void + { + this._clickFunc = param1; + } + + public function clickItem(param1:MouseEvent) : void + { + if(Boolean(this._clickFunc)) + { + this._clickFunc(param1); + } + } + + public function getItemObj() : PackItem + { + return this.itemObject; + } + + public function setEquData(param1:PackItem) : void + { + this.itemObject = param1; + if(this.itemObject == null) + { + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg)) + { + this.itemSprite.removeChild(this.itemImg); + } + } + } + else + { + this.loadItemImg(); + } + } + + private function loadItemImg() : void + { + this.loadItemPng = new LoadResource("pic/equip/" + this.itemObject.viewMap.iconPath,this.loadPngBack); + } + + private function loadPngBack(param1:Event) : void + { + if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg)) + { + this.itemSprite.removeChild(this.itemImg); + } + if(this.itemObject == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + this.itemImg.width = 41; + this.itemImg.height = 41; + this.itemSprite.addChild(this.itemImg); + this.loadItemPng.clear(); + if(this.itemsTip == null) + { + if(this.itemObject) + { + this.itemsTip = new ItemTip(this.itemSprite,face.stage,face.tip_bg,this.itemObject.viewMap); + } + } + else + { + this.itemsTip.setTipData(this.itemObject.viewMap); + } + } + + public function addPng(param1:Bitmap) : void + { + this.clear(); + this.png = param1; + this.itemSprite.addChild(this.png); + } + + public function clear() : void + { + if(Boolean(this.png) && this.itemSprite.contains(this.png)) + { + this.itemSprite.removeChild(this.png); + } + } + + public function setItemNums(param1:int) : void + { + this.numText.text = param1 + ""; + } + + public function setTextStr(param1:String) : void + { + this.typeText.text = param1; + } + } +} + diff --git a/flash_decompiled/com/view/newui/UILabel.as b/flash_decompiled/com/view/newui/UILabel.as new file mode 100644 index 0000000..ed622c4 --- /dev/null +++ b/flash_decompiled/com/view/newui/UILabel.as @@ -0,0 +1,35 @@ +package com.view.newui +{ + import com.common.PublicMethod; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UILabel extends UIBase + { + + private var textField:TextField; + + public function UILabel(param1:int, param2:uint = 16355072) + { + super(); + this.textField = PublicMethod.getTextFieldWithFillter(param2,param1); + addChild(this.textField); + } + + public function setText(param1:String) : void + { + this.textField.htmlText = param1; + } + + public function setTextForMat(param1:TextFormat) : void + { + this.textField.defaultTextFormat = param1; + } + + public function setColor(param1:uint) : void + { + this.textField.textColor = param1; + } + } +} + diff --git a/flash_decompiled/com/view/newui/UINumInputText.as b/flash_decompiled/com/view/newui/UINumInputText.as new file mode 100644 index 0000000..4e137fe --- /dev/null +++ b/flash_decompiled/com/view/newui/UINumInputText.as @@ -0,0 +1,165 @@ +package com.view.newui +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFieldType; + + public class UINumInputText extends UIBase + { + + private var inputText:TextField; + + private var upBtn:SimpleButton; + + private var downBtn:SimpleButton; + + private var maxNum:int = 999999999; + + private var inputEvent:Function; + + public function UINumInputText(param1:int) + { + super(); + var _loc2_:Sprite = new Scale9Grid(face.getSprite(UIConfig.textInput_skin),param1 - 50,12); + addChild(_loc2_); + this.inputText = PublicMethod.getTextField(1048575,param1); + this.inputText.type = TextFieldType.INPUT; + this.inputText.mouseEnabled = true; + addChild(this.inputText); + this.inputText.text = "1"; + this.inputText.restrict = "0-9"; + this.inputText.maxChars = 6; + this.inputText.y = 3; + this.inputText.x = 4; + this.upBtn = face.getButton(UIConfig.btn_input_up); + this.upBtn.useHandCursor = false; + addChild(this.upBtn); + this.upBtn.x = param1 - 20; + this.upBtn.y = 1; + this.downBtn = face.getButton(UIConfig.btn_input_down); + this.downBtn.useHandCursor = false; + addChild(this.downBtn); + this.downBtn.x = this.upBtn.x; + this.downBtn.y = this.upBtn.y + 10; + this.inputText.addEventListener(Event.CHANGE,this.inputNum); + this.upBtn.addEventListener(MouseEvent.CLICK,this.upEvent); + this.downBtn.addEventListener(MouseEvent.CLICK,this.downEvent); + } + + public function readOnly() : void + { + this.inputText.type = TextFieldType.DYNAMIC; + } + + public function canInput() : void + { + this.inputText.type = TextFieldType.INPUT; + } + + public function hiddenBtn() : void + { + this.upBtn.visible = false; + this.downBtn.visible = false; + } + + public function setMaxChars(param1:int) : void + { + this.inputText.maxChars = param1; + } + + public function setTextNull() : void + { + this.inputText.text = ""; + } + + private function inputNum(param1:Event) : void + { + var _loc2_:int = int(this.inputText.text); + if(_loc2_ < 1) + { + _loc2_ = 1; + } + if(_loc2_ > this.maxNum) + { + _loc2_ = this.maxNum; + } + this.inputText.text = _loc2_ + ""; + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + public function setMaxNum(param1:int) : void + { + this.maxNum = param1; + } + + private function upEvent(param1:MouseEvent) : void + { + var _loc2_:int = int(this.inputText.text); + _loc2_--; + if(_loc2_ < 1) + { + _loc2_ = 1; + } + this.inputText.text = _loc2_ + ""; + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + private function downEvent(param1:MouseEvent) : void + { + var _loc2_:int = int(this.inputText.text); + _loc2_ += 1; + if(_loc2_ > this.maxNum) + { + _loc2_ = this.maxNum; + } + this.inputText.text = _loc2_ + ""; + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + public function getTextNum() : int + { + if(PublicMethod.trim(this.inputText.text) == "") + { + return 0; + } + return int(this.inputText.text); + } + + public function setTextNum(param1:int) : void + { + if(param1 < 1) + { + param1 = 1; + } + if(param1 > this.maxNum) + { + param1 = this.maxNum; + } + this.inputText.text = param1 + ""; + if(Boolean(this.inputEvent)) + { + this.inputEvent(); + } + } + + public function setInputEvent(param1:Function) : void + { + this.inputEvent = param1; + } + } +} + diff --git a/flash_decompiled/com/view/newui/UINums.as b/flash_decompiled/com/view/newui/UINums.as new file mode 100644 index 0000000..58b2867 --- /dev/null +++ b/flash_decompiled/com/view/newui/UINums.as @@ -0,0 +1,244 @@ +package com.view.newui +{ + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.geom.Point; + import flash.geom.Rectangle; + + public class UINums extends UIBase + { + + private var numArr:Array; + + private var hasAdd:Boolean; + + private var _width:int = 0; + + private var bitmap1:Bitmap; + + private var bitmap2:Bitmap; + + private var bitmap3:Bitmap; + + private var bitmap4:Bitmap; + + public function UINums(param1:int) + { + var _loc3_:int = 0; + var _loc6_:BitmapData = null; + this.bitmap1 = new Bitmap(); + this.bitmap2 = new Bitmap(); + this.bitmap3 = new Bitmap(); + this.bitmap4 = new Bitmap(); + super(); + this.hasAdd = false; + var _loc2_:Bitmap = new Bitmap(); + switch(param1) + { + case 1: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_1); + break; + case 2: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_2); + break; + case 3: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_3); + break; + case 4: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_4); + break; + case 5: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_5); + break; + case 6: + this.hasAdd = true; + _loc2_.bitmapData = face.getPng(UIConfig.png_num_6); + break; + case 7: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_7); + break; + case 8: + this.hasAdd = true; + _loc2_.bitmapData = face.getPng(UIConfig.png_num_8); + break; + case 9: + this.hasAdd = true; + _loc2_.bitmapData = face.getPng(UIConfig.png_num_9); + break; + case 10: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_10); + break; + case 11: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_11); + break; + case 12: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_12); + break; + case 13: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_13); + break; + case 14: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_14); + break; + case 15: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_15); + break; + case 16: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_16); + break; + case 17: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_17); + break; + case 18: + _loc2_.bitmapData = face.getPng(UIConfig.png_num_18); + } + if(this.hasAdd) + { + _loc3_ = 11; + } + else + { + _loc3_ = 10; + } + this.numArr = new Array(); + var _loc4_:int = _loc2_.width / _loc3_; + var _loc5_:int = 0; + while(_loc5_ < _loc3_) + { + _loc6_ = new BitmapData(_loc4_,_loc2_.height); + _loc6_.copyPixels(_loc2_.bitmapData,new Rectangle(_loc4_ * _loc5_,0,_loc4_,_loc2_.height),new Point(0,0)); + this.numArr.push(_loc6_); + _loc5_++; + } + } + + public function initWidth(param1:int) : void + { + this._width = param1; + } + + public function showNum(param1:int) : void + { + if(Boolean(this.bitmap1) && contains(this.bitmap1)) + { + removeChild(this.bitmap1); + } + if(Boolean(this.bitmap2) && contains(this.bitmap2)) + { + removeChild(this.bitmap2); + } + if(Boolean(this.bitmap3) && contains(this.bitmap3)) + { + removeChild(this.bitmap3); + } + if(Boolean(this.bitmap4) && contains(this.bitmap4)) + { + removeChild(this.bitmap4); + } + var _loc2_:int = -1; + var _loc3_:int = -1; + var _loc4_:int = -1; + var _loc5_:int = -1; + if(param1 >= 1000) + { + _loc2_ = int(param1 / 1000); + _loc3_ = int(param1 - _loc2_ * 1000) / 100; + _loc4_ = int(param1 - _loc2_ * 1000 - _loc3_ * 100) / 10; + _loc5_ = param1 - _loc2_ * 1000 - _loc3_ * 100 - _loc4_ * 10; + } + else if(param1 >= 100) + { + _loc3_ = param1 / 100; + _loc4_ = int(param1 - _loc3_ * 100) / 10; + _loc5_ = param1 - _loc3_ * 100 - _loc4_ * 10; + } + else if(param1 >= 10) + { + _loc4_ = int(param1 / 10); + _loc5_ = param1 - _loc4_ * 10; + } + else + { + _loc5_ = param1; + } + var _loc6_:int = 0; + if(_loc2_ > 0) + { + this.bitmap1.bitmapData = this.numArr[int(_loc2_)]; + addChild(this.bitmap1); + if(this._width > 0) + { + _loc6_ = this._width; + } + else + { + _loc6_ = this.bitmap1.width; + } + this.bitmap2.bitmapData = this.numArr[int(_loc3_)]; + addChild(this.bitmap2); + this.bitmap2.x = _loc6_; + if(this._width > 0) + { + _loc6_ += this._width; + } + else + { + _loc6_ += this.bitmap2.width; + } + this.bitmap3.bitmapData = this.numArr[int(_loc4_)]; + addChild(this.bitmap3); + this.bitmap3.x = _loc6_; + if(this._width > 0) + { + _loc6_ += this._width; + } + else + { + _loc6_ += this.bitmap3.width; + } + } + else if(_loc3_ > 0) + { + this.bitmap2.bitmapData = this.numArr[int(_loc3_)]; + addChild(this.bitmap2); + this.bitmap2.x = _loc6_; + if(this._width > 0) + { + _loc6_ += this._width; + } + else + { + _loc6_ += this.bitmap2.width; + } + this.bitmap3.bitmapData = this.numArr[int(_loc4_)]; + addChild(this.bitmap3); + this.bitmap3.x = _loc6_; + if(this._width > 0) + { + _loc6_ += this._width; + } + else + { + _loc6_ += this.bitmap3.width; + } + } + else if(_loc4_ > 0) + { + this.bitmap3.bitmapData = this.numArr[int(_loc4_)]; + addChild(this.bitmap3); + if(this._width > 0) + { + _loc6_ += this._width; + } + else + { + _loc6_ += this.bitmap3.width; + } + } + this.bitmap4.bitmapData = this.numArr[int(_loc5_)]; + addChild(this.bitmap4); + this.bitmap4.x = _loc6_; + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIPageMc.as b/flash_decompiled/com/view/newui/UIPageMc.as new file mode 100644 index 0000000..61eb3b7 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIPageMc.as @@ -0,0 +1,113 @@ +package com.view.newui +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UIPageMc extends UIBase + { + + private var leftPageBtn:SimpleButton; + + private var rightPageBtn:SimpleButton; + + private var pageNumText:TextField; + + public var pageCount:int; + + private var currPage:int; + + private var isLast:Boolean; + + private var isFirst:Boolean; + + private var _preFunc:Function; + + private var _nextFunc:Function; + + public function UIPageMc() + { + super(); + this.leftPageBtn = face.getButton(UIConfig.btn_page_left); + this.rightPageBtn = face.getButton(UIConfig.btn_page_right); + addChild(this.leftPageBtn); + addChild(this.rightPageBtn); + var _loc1_:Sprite = new Scale9Grid(face.getSprite(UIConfig.page_num),30,10); + addChild(_loc1_); + this.pageNumText = PublicMethod.getTextFieldWithFillter(16777215,54); + _loc1_.x = this.leftPageBtn.x + this.leftPageBtn.width + 4; + _loc1_.y = -2; + this.rightPageBtn.x = _loc1_.x + _loc1_.width + 4; + this.rightPageBtn.y = this.leftPageBtn.y; + this.pageNumText.text = "1/2"; + this.pageNumText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + _loc1_.addChild(this.pageNumText); + this.pageNumText.x = 2; + this.pageNumText.y = 3; + this.leftPageBtn.addEventListener(MouseEvent.CLICK,this.toPrePage); + this.rightPageBtn.addEventListener(MouseEvent.CLICK,this.toNextPage); + } + + public function setPageCount(param1:int) : void + { + this.pageCount = param1; + } + + public function getCurrPage() : int + { + return this.currPage; + } + + public function setPage(param1:int) : void + { + this.currPage = param1; + this.pageNumText.text = param1 + "/" + this.pageCount; + if(this.currPage == 1) + { + this.isFirst = true; + } + else + { + this.isFirst = false; + } + if(this.currPage == this.pageCount) + { + this.isLast = true; + } + else + { + this.isLast = false; + } + } + + private function toPrePage(param1:MouseEvent) : void + { + if(!this.isFirst && Boolean(this._preFunc)) + { + this._preFunc(); + } + } + + private function toNextPage(param1:MouseEvent) : void + { + if(Boolean(this._nextFunc) && !this.isLast) + { + this._nextFunc(); + } + } + + public function set preFunc(param1:Function) : void + { + this._preFunc = param1; + } + + public function set nextFunc(param1:Function) : void + { + this._nextFunc = param1; + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIPresItem.as b/flash_decompiled/com/view/newui/UIPresItem.as new file mode 100644 index 0000000..414cbf7 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIPresItem.as @@ -0,0 +1,129 @@ +package com.view.newui +{ + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.view.cache.ImgCache; + import com.view.tip.ShopItemTip; + import com.view.ui.shop.ShopUI; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UIPresItem extends UIBase + { + + private var bg:UIWindowBg; + + private var itemNameText:UITitleBg; + + private var itemObj:Object; + + private var itemsTip:ShopItemTip; + + private var buyTypeText:TextField; + + private var url:String; + + private var itemImg:Bitmap; + + private var loadItemPng:LoadResource; + + private var buyItemImg:BitmapData; + + private var itemSprite:Sprite; + + private var priceText:TextField; + + private var buyBtn:UIButton; + + public function UIPresItem(param1:Object) + { + super(); + this.itemObj = param1; + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(192,100); + addChild(this.bg); + this.itemNameText = new UITitleBg(this.itemObj.viewMap.showName,202); + addChild(this.itemNameText); + this.priceText = PublicMethod.getTextField(14671635,120); + addChild(this.priceText); + this.priceText.x = 70; + this.priceText.y = 33; + this.priceText.filters = [PublicGlow.getInstance().blackGlow]; + this.priceText.text = "价格:" + this.itemObj.singlePrice; + this.buyBtn = new UIButton("购 买",1,10); + addChild(this.buyBtn); + this.buyBtn.x = 135; + this.buyBtn.y = 78; + this.buyBtn.onClick = this.openBuyItemsUI; + this.buyTypeText = PublicMethod.getTextFieldWithFillter(13213748,30); + addChild(this.buyTypeText); + this.buyTypeText.x = 165; + this.buyTypeText.y = this.priceText.y; + if(param1.tagId == 40) + { + this.buyTypeText.text = "军工"; + } + else + { + this.buyTypeText.text = "声望"; + } + var _loc2_:Sprite = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + addChild(_loc2_); + _loc2_.x = 7; + _loc2_.y = 30; + this.itemSprite = new Sprite(); + addChild(this.itemSprite); + this.itemSprite.x = 10; + this.itemSprite.y = 33; + this.url = "pic/equip/" + this.itemObj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.itemImg.width = 53; + this.itemImg.height = 53; + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(this.url,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + this.loadItemPng.clear(); + this.setImgValue(); + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + } + + private function setImgValue() : void + { + this.itemSprite.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + var _loc1_:Bitmap = new Bitmap(); + _loc1_.bitmapData = this.itemImg.bitmapData.clone(); + this.buyItemImg = this.itemImg.bitmapData.clone(); + this.itemsTip = new ShopItemTip(this.itemSprite,face.stage,face.tip_bg,this.itemObj.viewMap,_loc1_); + } + + public function setItemName(param1:String) : void + { + this.itemNameText.setTitleName(param1); + } + + private function openBuyItemsUI(param1:MouseEvent) : void + { + ShopUI.getInstance().buyPresItems(this.itemObj,this.buyItemImg); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIRadioBtn.as b/flash_decompiled/com/view/newui/UIRadioBtn.as new file mode 100644 index 0000000..5a79c9c --- /dev/null +++ b/flash_decompiled/com/view/newui/UIRadioBtn.as @@ -0,0 +1,52 @@ +package com.view.newui +{ + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class UIRadioBtn extends UIBaseBtn + { + + private var isSelect:Boolean; + + public function UIRadioBtn() + { + super(); + normal_skin.addChild(new Bitmap(face.getPng(UIConfig.radio_normal_skin))); + selected_skin.addChild(new Bitmap(face.getPng(UIConfig.radio_selected_skin))); + setButtonMode(); + init(); + addEvent(); + } + + public function getSelect() : Boolean + { + return this.isSelect; + } + + override public function mouseOver(param1:MouseEvent) : void + { + } + + override public function mouseOut(param1:MouseEvent) : void + { + } + + override public function mouseDown(param1:MouseEvent) : void + { + } + + override public function mouseUp(param1:MouseEvent) : void + { + if(this.isSelect) + { + this.isSelect = false; + } + else + { + this.isSelect = true; + } + dispatchClickEvent(param1); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UIShopItem.as b/flash_decompiled/com/view/newui/UIShopItem.as new file mode 100644 index 0000000..4e81d36 --- /dev/null +++ b/flash_decompiled/com/view/newui/UIShopItem.as @@ -0,0 +1,129 @@ +package com.view.newui +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.view.cache.ImgCache; + import com.view.tip.ShopItemTip; + import com.view.ui.shop.ShopUI; + import com.view.ui.shop.data.ItemData; + 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 UIShopItem extends UIBase + { + + private var bg:UIWindowBg; + + private var itemNameText:UITitleBg; + + private var itemObj:ItemData; + + private var itemsTip:ShopItemTip; + + private var url:String; + + private var itemImg:Bitmap; + + private var loadItemPng:LoadResource; + + private var buyItemImg:BitmapData; + + private var itemSprite:Sprite; + + private var priceText:TextField; + + private var buyBtn:UIButton; + + public function UIShopItem(param1:ItemData) + { + var _loc3_:Sprite = null; + super(); + this.itemObj = param1; + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(192,100); + addChild(this.bg); + this.itemNameText = new UITitleBg(this.itemObj.viewMap.showName,202); + addChild(this.itemNameText); + this.priceText = PublicMethod.getTextFieldWithFillter(14671635,120); + addChild(this.priceText); + this.priceText.x = 70; + this.priceText.y = 33; + this.priceText.text = "价格:" + this.itemObj.singlePrice; + this.buyBtn = new UIButton("购 买",1,10); + addChild(this.buyBtn); + this.buyBtn.x = 135; + this.buyBtn.y = 78; + this.buyBtn.onClick = this.openBuyItemsUI; + var _loc2_:MovieClip = face.getMovieClip(ClassConfig.new_cashorpoint); + addChild(_loc2_); + _loc2_.x = 165; + _loc2_.y = 30; + if(this.itemObj.isPayPointCanBuy == 1) + { + _loc2_.gotoAndStop(2); + } + else + { + _loc2_.gotoAndStop(1); + } + _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.url = "pic/equip/" + this.itemObj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.itemImg.width = 53; + this.itemImg.height = 53; + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(this.url,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + this.loadItemPng.clear(); + this.setImgValue(); + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + } + + private function setImgValue() : void + { + this.itemSprite.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + var _loc1_:Bitmap = new Bitmap(); + _loc1_.bitmapData = this.itemImg.bitmapData.clone(); + this.buyItemImg = this.itemImg.bitmapData.clone(); + this.itemsTip = new ShopItemTip(this.itemSprite,face.stage,face.tip_bg,this.itemObj.viewMap,_loc1_); + } + + public function setItemName(param1:String) : void + { + this.itemNameText.setTitleName(param1); + } + + private function openBuyItemsUI(param1:MouseEvent) : void + { + ShopUI.getInstance().buyItems(this.itemObj,this.buyItemImg); + } + } +} + diff --git a/flash_decompiled/com/view/newui/UISmallBtn.as b/flash_decompiled/com/view/newui/UISmallBtn.as new file mode 100644 index 0000000..4a635c4 --- /dev/null +++ b/flash_decompiled/com/view/newui/UISmallBtn.as @@ -0,0 +1,117 @@ +package com.view.newui +{ + import com.common.Scale9Grid; + import flash.events.MouseEvent; + + public class UISmallBtn extends UIBaseBtn + { + + private var currType:int; + + private var _select:Boolean; + + public function UISmallBtn(param1:String, param2:int = 1) + { + super(); + this.currType = param2; + if(param2 == 1) + { + normal_skin = face.getSprite(UIConfig.chat_btn_up); + over_skin = face.getSprite(UIConfig.chat_btn_over); + down_skin = face.getSprite(UIConfig.chat_btn_down); + selected_skin = face.getSprite(UIConfig.chat_btn_selected); + } + else if(param2 == 2) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.chat_btn_up),30,10); + over_skin = new Scale9Grid(face.getSprite(UIConfig.chat_btn_over),30,10); + down_skin = new Scale9Grid(face.getSprite(UIConfig.chat_btn_down),30,10); + selected_skin = new Scale9Grid(face.getSprite(UIConfig.chat_btn_selected),30,10); + } + else + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.chat_btn_up),40,10); + over_skin = new Scale9Grid(face.getSprite(UIConfig.chat_btn_over),40,10); + down_skin = new Scale9Grid(face.getSprite(UIConfig.chat_btn_down),40,10); + selected_skin = new Scale9Grid(face.getSprite(UIConfig.chat_btn_selected),40,10); + } + addButtonText(normal_skin.width); + setTextPosiY(2); + setText(param1); + setButtonMode(); + addEvent(); + init(); + } + + public function set select(param1:Boolean) : void + { + this._select = param1; + if(this._select) + { + setSelect(); + } + else + { + setUnSelect(); + } + } + + public function get select() : Boolean + { + return this._select; + } + + override public function mouseOver(param1:MouseEvent) : void + { + if(!this._select) + { + super.mouseOver(param1); + } + } + + override public function mouseOut(param1:MouseEvent) : void + { + if(!this._select) + { + super.mouseOut(param1); + } + } + + override public function mouseDown(param1:MouseEvent) : void + { + if(!this._select) + { + super.mouseDown(param1); + } + } + + override public function mouseUp(param1:MouseEvent) : void + { + if(!this._select) + { + super.mouseUp(param1); + } + } + + override public function getEffUrl() : String + { + return "fastFun_light.swf"; + } + + override public function addEff() : void + { + super.addEff(); + if(this.currType == 3) + { + swfLoad.y = -5; + swfLoad.x = -7; + } + else + { + swfLoad.y = -5; + swfLoad.x = -12; + } + } + } +} + diff --git a/flash_decompiled/com/view/newui/UISwfEff.as b/flash_decompiled/com/view/newui/UISwfEff.as new file mode 100644 index 0000000..3c1ea40 --- /dev/null +++ b/flash_decompiled/com/view/newui/UISwfEff.as @@ -0,0 +1,72 @@ +package com.view.newui +{ + import com.InstallFace; + import com.common.LoadResource; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.utils.getTimer; + + public class UISwfEff extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var effSwf:MovieClip; + + private var swfLoad:LoadResource; + + private var frameTime:int = 100; + + private var currFrame:int; + + private var maxFrame:int; + + private var currTime:int; + + public function UISwfEff(param1:String) + { + super(); + this.swfLoad = new LoadResource("pic/eff/" + param1,this.loadSwfBack); + } + + private function loadSwfBack(param1:Event) : void + { + if(Boolean(this.effSwf) && contains(this.effSwf)) + { + removeChild(this.effSwf); + } + this.effSwf = MovieClip(param1.target.loader.content); + this.swfLoad.clear(); + addChild(this.effSwf); + this.maxFrame = this.effSwf.totalFrames; + this.currFrame = 1; + this.face.stage.addEventListener(Event.ENTER_FRAME,this.playEff); + } + + private function playEff(param1:Event) : void + { + var _loc2_:int = getTimer(); + if(_loc2_ - this.currTime > this.frameTime) + { + this.currTime = _loc2_; + this.effSwf.gotoAndStop(this.currFrame); + ++this.currFrame; + if(this.currFrame > this.maxFrame) + { + this.currFrame = 1; + } + } + } + + public function stop() : void + { + this.face.stage.removeEventListener(Event.ENTER_FRAME,this.playEff); + if(Boolean(this.effSwf) && contains(this.effSwf)) + { + removeChild(this.effSwf); + } + } + } +} + diff --git a/flash_decompiled/com/view/newui/UITabBtn.as b/flash_decompiled/com/view/newui/UITabBtn.as new file mode 100644 index 0000000..20fac41 --- /dev/null +++ b/flash_decompiled/com/view/newui/UITabBtn.as @@ -0,0 +1,114 @@ +package com.view.newui +{ + import com.common.Scale9Grid; + import flash.events.MouseEvent; + + public class UITabBtn extends UIBaseBtn + { + + private var _select:Boolean; + + public function UITabBtn(param1:String, param2:int = 1) + { + super(); + if(param2 == 1) + { + normal_skin = face.getSprite(UIConfig.tabBtn_normal_skin); + over_skin = face.getSprite(UIConfig.tabBtn_over_skin); + down_skin = face.getSprite(UIConfig.tabBtn_selected_skin); + selected_skin = face.getSprite(UIConfig.tabBtn_selected_skin); + } + else if(param2 == 2) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_normal_skin),37,12); + over_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_over_skin),37,12); + down_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),37,12); + selected_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),37,12); + } + else if(param2 == 3) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_normal_skin),57,12); + over_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_over_skin),57,12); + down_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),57,12); + selected_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),57,12); + } + else if(param2 == 4) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_normal_skin),14,12); + over_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_over_skin),14,12); + down_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),14,12); + selected_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),14,12); + } + else if(param2 == 5) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_normal_skin),18,12); + over_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_over_skin),18,12); + down_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),18,12); + selected_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),18,12); + } + else if(param2 == 6) + { + normal_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_normal_skin),28,12); + over_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_over_skin),28,12); + down_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),28,12); + selected_skin = new Scale9Grid(face.getSprite(UIConfig.tabBtn_selected_skin),28,12); + } + addButtonText(normal_skin.width); + setText(param1); + setButtonMode(); + addEvent(); + init(); + } + + public function set select(param1:Boolean) : void + { + this._select = param1; + if(this._select) + { + setSelect(); + } + else + { + setUnSelect(); + } + } + + public function get select() : Boolean + { + return this._select; + } + + override public function mouseOver(param1:MouseEvent) : void + { + if(!this._select) + { + super.mouseOver(param1); + } + } + + override public function mouseOut(param1:MouseEvent) : void + { + if(!this._select) + { + super.mouseOut(param1); + } + } + + override public function mouseDown(param1:MouseEvent) : void + { + if(!this._select) + { + super.mouseDown(param1); + } + } + + override public function mouseUp(param1:MouseEvent) : void + { + if(!this._select) + { + super.mouseUp(param1); + } + } + } +} + diff --git a/flash_decompiled/com/view/newui/UITable.as b/flash_decompiled/com/view/newui/UITable.as new file mode 100644 index 0000000..bdb4254 --- /dev/null +++ b/flash_decompiled/com/view/newui/UITable.as @@ -0,0 +1,129 @@ +package com.view.newui +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UITable extends UIBase + { + + public var lineHeight:int = 25; + + public var drawLine:Boolean = true; + + public var borderColor1:uint = 1643790; + + public var borderColor2:uint = 3749425; + + public var bgColor:uint = 3090721; + + public var borderTextColor:uint = 14010517; + + private var titleVec:Vector. = new Vector.(); + + 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.(); + } + } + + 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/BabelDescEnterUI7.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI7.as new file mode 100644 index 0000000..db31cdc --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI7.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 BabelDescEnterUI7 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 = 1700; + + private var stage_2:int = 1600; + + 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 BabelDescEnterUI7() + { + 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_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.(); + _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/BabelDescEnterUI8.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI8.as new file mode 100644 index 0000000..eeb6101 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI8.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 BabelDescEnterUI8 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 = 1800; + + private var stage_2:int = 1700; + + 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 BabelDescEnterUI8() + { + 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_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.(); + _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/BabelDescEnterUI9.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI9.as new file mode 100644 index 0000000..ca589b4 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescEnterUI9.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 BabelDescEnterUI9 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 = 1900; + + private var stage_2:int = 1800; + + 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 BabelDescEnterUI9() + { + 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_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.(); + _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,121); + _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/BabelDescPage1.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage1.as new file mode 100644 index 0000000..1e1b7ff --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage1.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage1 extends Sprite + { + + private var url:String = "bg_babel1.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 BabelDescPage1() + { + 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[9] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[10] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes1); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1000) + { + _loc5_ = 0; + } + if(_loc5_ > 1100) + { + _loc5_ = 100; + } + if(_loc5_ > 1000 && _loc5_ <= 1100) + { + _loc5_ -= 1000; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage10.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage10.as new file mode 100644 index 0000000..605ca10 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage10.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage10 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 BabelDescPage10() + { + 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[18] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[19] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes10); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1900) + { + _loc5_ = 0; + } + if(_loc5_ > 2000) + { + _loc5_ = 100; + } + if(_loc5_ > 1900 && _loc5_ <= 2000) + { + _loc5_ -= 1900; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage11.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage11.as new file mode 100644 index 0000000..41949ee --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage11.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage11 extends Sprite + { + + private var url:String = "bg_babel11.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 BabelDescPage11() + { + 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[19] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[20] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes11); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2000) + { + _loc5_ = 0; + } + if(_loc5_ > 2100) + { + _loc5_ = 100; + } + if(_loc5_ > 2000 && _loc5_ <= 2100) + { + _loc5_ -= 2000; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage12.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage12.as new file mode 100644 index 0000000..2e14300 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage12.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage12 extends Sprite + { + + private var url:String = "bg_babel12.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 BabelDescPage12() + { + 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[20] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[21] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes12); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2100) + { + _loc5_ = 0; + } + if(_loc5_ > 2200) + { + _loc5_ = 100; + } + if(_loc5_ > 2100 && _loc5_ <= 2200) + { + _loc5_ -= 2100; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage13.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage13.as new file mode 100644 index 0000000..a3f6d1c --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage13.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage13 extends Sprite + { + + private var url:String = "bg_babel13.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 BabelDescPage13() + { + 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[21] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[22] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes13); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2200) + { + _loc5_ = 0; + } + if(_loc5_ > 2300) + { + _loc5_ = 100; + } + if(_loc5_ > 2200 && _loc5_ <= 2300) + { + _loc5_ -= 2200; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage14.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage14.as new file mode 100644 index 0000000..e255d15 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage14.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage14 extends Sprite + { + + private var url:String = "bg_babel14.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 BabelDescPage14() + { + 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[22] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[23] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes14); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2300) + { + _loc5_ = 0; + } + if(_loc5_ > 2400) + { + _loc5_ = 100; + } + if(_loc5_ > 2300 && _loc5_ <= 2400) + { + _loc5_ -= 2300; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage15.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage15.as new file mode 100644 index 0000000..63e6eaa --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage15.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage15 extends Sprite + { + + private var url:String = "bg_babel15.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 BabelDescPage15() + { + 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[23] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[24] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes15); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2400) + { + _loc5_ = 0; + } + if(_loc5_ > 2500) + { + _loc5_ = 100; + } + if(_loc5_ > 2400 && _loc5_ <= 2500) + { + _loc5_ -= 2400; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage2.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage2.as new file mode 100644 index 0000000..99a2885 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage2.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage2 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 BabelDescPage2() + { + 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[10] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes2); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1100) + { + _loc5_ = 0; + } + if(_loc5_ > 1200) + { + _loc5_ = 100; + } + if(_loc5_ > 1100 && _loc5_ <= 1200) + { + _loc5_ -= 1100; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage3.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage3.as new file mode 100644 index 0000000..e437634 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage3.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage3 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 BabelDescPage3() + { + 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[11] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[12] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes3); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1200) + { + _loc5_ = 0; + } + if(_loc5_ > 1300) + { + _loc5_ = 100; + } + if(_loc5_ > 1200 && _loc5_ <= 1300) + { + _loc5_ -= 1200; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage4.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage4.as new file mode 100644 index 0000000..c7bcdd3 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage4.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage4 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 BabelDescPage4() + { + 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[12] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[13] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes4); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1300) + { + _loc5_ = 0; + } + if(_loc5_ > 1400) + { + _loc5_ = 100; + } + if(_loc5_ > 1300 && _loc5_ <= 1400) + { + _loc5_ -= 1300; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage5.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage5.as new file mode 100644 index 0000000..a113830 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage5.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage5 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 BabelDescPage5() + { + 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[13] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[14] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes5); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1400) + { + _loc5_ = 0; + } + if(_loc5_ > 1500) + { + _loc5_ = 100; + } + if(_loc5_ > 1400 && _loc5_ <= 1500) + { + _loc5_ -= 1400; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage6.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage6.as new file mode 100644 index 0000000..a462d27 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage6.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage6 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 BabelDescPage6() + { + 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[14] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[15] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes6); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1500) + { + _loc5_ = 0; + } + if(_loc5_ > 1600) + { + _loc5_ = 100; + } + if(_loc5_ > 1500 && _loc5_ <= 1600) + { + _loc5_ -= 1500; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage7.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage7.as new file mode 100644 index 0000000..1b01af4 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage7.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage7 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 BabelDescPage7() + { + 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[15] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[16] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes7); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1600) + { + _loc5_ = 0; + } + if(_loc5_ > 1700) + { + _loc5_ = 100; + } + if(_loc5_ > 1600 && _loc5_ <= 1700) + { + _loc5_ -= 1600; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage8.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage8.as new file mode 100644 index 0000000..1a34732 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage8.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage8 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 BabelDescPage8() + { + 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[16] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[17] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes8); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1700) + { + _loc5_ = 0; + } + if(_loc5_ > 1800) + { + _loc5_ = 100; + } + if(_loc5_ > 1700 && _loc5_ <= 1800) + { + _loc5_ -= 1700; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/BabelDescPage9.as b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage9.as new file mode 100644 index 0000000..1c2dd94 --- /dev/null +++ b/flash_decompiled/com/view/ui/babeldesc/BabelDescPage9.as @@ -0,0 +1,146 @@ +package com.view.ui.babeldesc +{ + 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 BabelDescPage9 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 BabelDescPage9() + { + 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[17] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelNameArr[18] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes9); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 1800) + { + _loc5_ = 0; + } + if(_loc5_ > 1900) + { + _loc5_ = 100; + } + if(_loc5_ > 1800 && _loc5_ <= 1900) + { + _loc5_ -= 1800; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldBuildUI.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldBuildUI.as new file mode 100644 index 0000000..aa580c7 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldBuildUI.as @@ -0,0 +1,816 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldBuildUI extends PlayUI + { + + private var bg1:Sprite; + + private var page1:BabelGoldPage1; + + private var page2:BabelGoldPage2; + + private var page3:BabelGoldPage3; + + private var page4:BabelGoldPage4; + + private var page5:BabelGoldPage5; + + private var page6:BabelGoldPage6; + + private var page7:BabelGoldPage7; + + private var page8:BabelGoldPage8; + + private var page9:BabelGoldPage9; + + private var page10:BabelGoldPage10; + + private var page11:BabelGoldPage11; + + private var page12:BabelGoldPage12; + + 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:BabelGoldEnterUI1; + + private var babelEnterUI2:BabelGoldEnterUI2; + + private var babelEnterUI3:BabelGoldEnterUI3; + + private var babelEnterUI4:BabelGoldEnterUI4; + + private var babelEnterUI5:BabelGoldEnterUI5; + + private var babelEnterUI6:BabelGoldEnterUI6; + + private var babelEnterUI7:BabelGoldEnterUI7; + + private var babelEnterUI8:BabelGoldEnterUI8; + + private var babelEnterUI9:BabelGoldEnterUI9; + + private var babelEnterUI10:BabelGoldEnterUI10; + + private var babelEnterUI11:BabelGoldEnterUI11; + + private var babelEnterUI12:BabelGoldEnterUI12; + + public function BabelGoldBuildUI() + { + 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_babel_gold); + this.btnArr = new Array(); + this.btn_1 = new UITabBtn("第" + CommonData.babelMoreNameArr1[0],6); + this.btn_2 = new UITabBtn("第" + CommonData.babelMoreNameArr1[1],6); + this.btn_3 = new UITabBtn("第" + CommonData.babelMoreNameArr1[2],6); + this.btn_4 = new UITabBtn("第" + CommonData.babelMoreNameArr1[3],6); + this.btn_5 = new UITabBtn("第" + CommonData.babelMoreNameArr1[4],6); + this.btn_6 = new UITabBtn("第" + CommonData.babelMoreNameArr1[5],6); + this.btn_7 = new UITabBtn("第" + CommonData.babelMoreNameArr1[6],6); + this.btn_8 = new UITabBtn("第" + CommonData.babelMoreNameArr1[7],6); + this.btn_9 = new UITabBtn("第" + CommonData.babelMoreNameArr1[8],6); + this.btn_10 = new UITabBtn("第" + CommonData.babelMoreNameArr1[9],6); + this.btn_11 = new UITabBtn("第" + CommonData.babelMoreNameArr1[10],6); + this.btn_12 = new UITabBtn("第" + CommonData.babelMoreNameArr1[11],6); + var _loc1_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE31); + var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE32); + var _loc3_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE33); + var _loc4_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE34); + var _loc5_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE35); + var _loc6_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE36); + var _loc7_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE37); + var _loc8_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE38); + var _loc9_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE39); + var _loc10_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE40); + var _loc11_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE41); + var _loc12_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE42); + 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 BabelGoldPage1(); + _loc15_.addChild(this.page1); + this.page1.x = 4; + this.page1.y = 4; + this.page2 = new BabelGoldPage2(); + _loc15_.addChild(this.page2); + this.page2.visible = false; + this.page2.x = 4; + this.page2.y = 4; + this.page3 = new BabelGoldPage3(); + _loc15_.addChild(this.page3); + this.page3.visible = false; + this.page3.x = 4; + this.page3.y = 4; + this.page4 = new BabelGoldPage4(); + _loc15_.addChild(this.page4); + this.page4.visible = false; + this.page4.x = 4; + this.page4.y = 4; + this.page5 = new BabelGoldPage5(); + _loc15_.addChild(this.page5); + this.page5.visible = false; + this.page5.x = 4; + this.page5.y = 4; + this.page6 = new BabelGoldPage6(); + _loc15_.addChild(this.page6); + this.page6.visible = false; + this.page6.x = 4; + this.page6.y = 4; + this.page7 = new BabelGoldPage7(); + _loc15_.addChild(this.page7); + this.page7.visible = false; + this.page7.x = 4; + this.page7.y = 4; + this.page8 = new BabelGoldPage8(); + _loc15_.addChild(this.page8); + this.page8.visible = false; + this.page8.x = 4; + this.page8.y = 4; + this.page9 = new BabelGoldPage9(); + _loc15_.addChild(this.page9); + this.page9.visible = false; + this.page9.x = 4; + this.page9.y = 4; + this.page10 = new BabelGoldPage10(); + _loc15_.addChild(this.page10); + this.page10.visible = false; + this.page10.x = 4; + this.page10.y = 4; + this.page11 = new BabelGoldPage11(); + _loc15_.addChild(this.page11); + this.page11.visible = false; + this.page11.x = 4; + this.page11.y = 4; + this.page12 = new BabelGoldPage12(); + _loc15_.addChild(this.page12); + this.page12.visible = false; + this.page12.x = 4; + this.page12.y = 4; + 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.dfreeTimes31 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3300) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr[7] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[0]); + return; + } + this.enterStage1(); + return; + } + if(this.page2.visible) + { + if(this.towerObj.dfreeTimes32 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3400) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[0] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[1]); + return; + } + this.enterStage2(); + return; + } + if(this.page3.visible) + { + if(this.towerObj.dfreeTimes33 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3500) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[1] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[2]); + return; + } + this.enterStage3(); + return; + } + if(this.page4.visible) + { + if(this.towerObj.dfreeTimes34 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3600) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[2] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[3]); + return; + } + this.enterStage4(); + return; + } + if(this.page5.visible) + { + if(this.towerObj.dfreeTimes35 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3700) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[3] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[4]); + return; + } + this.enterStage5(); + return; + } + if(this.page6.visible) + { + if(this.towerObj.dfreeTimes36 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3800) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[4] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[5]); + return; + } + this.enterStage6(); + return; + } + if(this.page7.visible) + { + if(this.towerObj.dfreeTimes37 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3900) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[5] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[6]); + return; + } + this.enterStage7(); + return; + } + if(this.page8.visible) + { + if(this.towerObj.dfreeTimes38 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4000) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[6] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[7]); + return; + } + this.enterStage8(); + return; + } + if(this.page9.visible) + { + if(this.towerObj.dfreeTimes39 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4100) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[7] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[8]); + return; + } + this.enterStage9(); + return; + } + if(this.page10.visible) + { + if(this.towerObj.dfreeTimes40 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4200) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[8] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[9]); + return; + } + this.enterStage10(); + return; + } + if(this.page11.visible) + { + if(this.towerObj.dfreeTimes41 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4300) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[9] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[10]); + return; + } + this.enterStage11(); + return; + } + if(this.page12.visible) + { + if(this.towerObj.dfreeTimes42 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4400) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr1[10] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr1[11]); + return; + } + this.enterStage12(); + return; + } + } + + private function enterStage1() : void + { + ConnectService.getInstance().babelService.selectRound(3301); + } + + private function enterStage2() : void + { + ConnectService.getInstance().babelService.selectRound(3401); + } + + private function enterStage3() : void + { + ConnectService.getInstance().babelService.selectRound(3501); + } + + private function enterStage4() : void + { + ConnectService.getInstance().babelService.selectRound(3601); + } + + private function enterStage5() : void + { + ConnectService.getInstance().babelService.selectRound(3701); + } + + private function enterStage6() : void + { + ConnectService.getInstance().babelService.selectRound(3801); + } + + private function enterStage7() : void + { + ConnectService.getInstance().babelService.selectRound(3901); + } + + private function enterStage8() : void + { + ConnectService.getInstance().babelService.selectRound(4001); + } + + private function enterStage9() : void + { + ConnectService.getInstance().babelService.selectRound(4101); + } + + private function enterStage10() : void + { + ConnectService.getInstance().babelService.selectRound(4201); + } + + private function enterStage11() : void + { + ConnectService.getInstance().babelService.selectRound(4301); + } + + private function enterStage12() : void + { + ConnectService.getInstance().babelService.selectRound(4401); + } + + private function enterBabel(param1:BabelEvent) : void + { + var _loc2_:int = param1.obj as int; + this.enterBabelRoom(_loc2_); + } + + private function enterBabelRoom(param1:int) : void + { + if(param1 > 4500 || param1 < 3300) + { + MessageBoxUI.getInstance().addMessage("请先退出其他楼"); + closeUI(null); + return; + } + if(param1 > 4400) + { + if(this.babelEnterUI12 == null) + { + this.babelEnterUI12 = new BabelGoldEnterUI12(); + } + this.babelEnterUI12.show(); + } + else if(param1 > 4300) + { + if(this.babelEnterUI11 == null) + { + this.babelEnterUI11 = new BabelGoldEnterUI11(); + } + this.babelEnterUI11.show(); + } + else if(param1 > 4200) + { + if(this.babelEnterUI10 == null) + { + this.babelEnterUI10 = new BabelGoldEnterUI10(); + } + this.babelEnterUI10.show(); + } + else if(param1 > 4100) + { + if(this.babelEnterUI9 == null) + { + this.babelEnterUI9 = new BabelGoldEnterUI9(); + } + this.babelEnterUI9.show(); + } + else if(param1 > 4000) + { + if(this.babelEnterUI8 == null) + { + this.babelEnterUI8 = new BabelGoldEnterUI8(); + } + this.babelEnterUI8.show(); + } + else if(param1 > 3900) + { + if(this.babelEnterUI7 == null) + { + this.babelEnterUI7 = new BabelGoldEnterUI7(); + } + this.babelEnterUI7.show(); + } + else if(param1 > 3800) + { + if(this.babelEnterUI6 == null) + { + this.babelEnterUI6 = new BabelGoldEnterUI6(); + } + this.babelEnterUI6.show(); + } + else if(param1 > 3700) + { + if(this.babelEnterUI5 == null) + { + this.babelEnterUI5 = new BabelGoldEnterUI5(); + } + this.babelEnterUI5.show(); + } + else if(param1 > 3600) + { + if(this.babelEnterUI4 == null) + { + this.babelEnterUI4 = new BabelGoldEnterUI4(); + } + this.babelEnterUI4.show(); + } + else if(param1 > 3500) + { + if(this.babelEnterUI3 == null) + { + this.babelEnterUI3 = new BabelGoldEnterUI3(); + } + this.babelEnterUI3.show(); + } + else if(param1 > 3400) + { + if(this.babelEnterUI2 == null) + { + this.babelEnterUI2 = new BabelGoldEnterUI2(); + } + this.babelEnterUI2.show(); + } + else if(param1 > 3300) + { + if(this.babelEnterUI1 == null) + { + this.babelEnterUI1 = new BabelGoldEnterUI1(); + } + this.babelEnterUI1.show(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI1.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI1.as new file mode 100644 index 0000000..ebd73db --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI1.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI1 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 BabelGoldEnterUI1() + { + 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_gold_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.(); + _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 = _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/babelgold/BabelGoldEnterUI10.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI10.as new file mode 100644 index 0000000..23c01a6 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI10.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI10 extends PlayUI + { + + private var stage_1:int = 4300; + + private var stage_2:int = 4200; + + 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 BabelGoldEnterUI10() + { + 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_gold_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,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 = _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/babelgold/BabelGoldEnterUI11.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI11.as new file mode 100644 index 0000000..91c309e --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI11.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI11 extends PlayUI + { + + private var stage_1:int = 4400; + + private var stage_2:int = 4300; + + 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 BabelGoldEnterUI11() + { + 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_gold_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,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 = _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/babelgold/BabelGoldEnterUI12.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI12.as new file mode 100644 index 0000000..3d22e5c --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI12.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI12 extends PlayUI + { + + private var stage_1:int = 4500; + + private var stage_2:int = 4400; + + 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 BabelGoldEnterUI12() + { + 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_gold_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,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 = _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/babelgold/BabelGoldEnterUI2.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI2.as new file mode 100644 index 0000000..8cb0837 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI2.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI2 extends PlayUI + { + + private var stage_1:int = 3500; + + private var stage_2:int = 3400; + + 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 BabelGoldEnterUI2() + { + 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_gold_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.(); + _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 = _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/babelgold/BabelGoldEnterUI3.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI3.as new file mode 100644 index 0000000..5b73e7b --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI3.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI3 extends PlayUI + { + + private var stage_1:int = 3600; + + private var stage_2:int = 3500; + + 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 BabelGoldEnterUI3() + { + 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_gold_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.(); + _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 = _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/babelgold/BabelGoldEnterUI4.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI4.as new file mode 100644 index 0000000..52fffad --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI4.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI4 extends PlayUI + { + + private var stage_1:int = 3700; + + private var stage_2:int = 3600; + + 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 BabelGoldEnterUI4() + { + 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_gold_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,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 = _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/babelgold/BabelGoldEnterUI5.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI5.as new file mode 100644 index 0000000..e77baea --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI5.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI5 extends PlayUI + { + + private var stage_1:int = 3800; + + private var stage_2:int = 3700; + + 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 BabelGoldEnterUI5() + { + 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_gold_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,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 = _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/babelgold/BabelGoldEnterUI6.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI6.as new file mode 100644 index 0000000..848acba --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI6.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI6 extends PlayUI + { + + private var stage_1:int = 3900; + + private var stage_2:int = 3800; + + 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 BabelGoldEnterUI6() + { + 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_gold_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,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 = _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/babelgold/BabelGoldEnterUI7.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI7.as new file mode 100644 index 0000000..5bf0414 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI7.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI7 extends PlayUI + { + + private var stage_1:int = 4000; + + private var stage_2:int = 3900; + + 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 BabelGoldEnterUI7() + { + 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_gold_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.(); + _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 = _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/babelgold/BabelGoldEnterUI8.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI8.as new file mode 100644 index 0000000..02b7b83 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI8.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI8 extends PlayUI + { + + private var stage_1:int = 4100; + + private var stage_2:int = 4000; + + 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 BabelGoldEnterUI8() + { + 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_gold_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.(); + _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 = _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/babelgold/BabelGoldEnterUI9.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI9.as new file mode 100644 index 0000000..2187b1c --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldEnterUI9.as @@ -0,0 +1,970 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldEnterUI9 extends PlayUI + { + + private var stage_1:int = 4200; + + private var stage_2:int = 4100; + + 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 BabelGoldEnterUI9() + { + 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_gold_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.(); + _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 = _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/babelgold/BabelGoldPage1.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage1.as new file mode 100644 index 0000000..2785bf6 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage1.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage1 extends Sprite + { + + private var url:String = "bg_babel32.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 BabelGoldPage1() + { + 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.babelMoreNameArr[7] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[0] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes31); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3300) + { + _loc5_ = 0; + } + if(_loc5_ > 3400) + { + _loc5_ = 100; + } + if(_loc5_ > 3300 && _loc5_ <= 3400) + { + _loc5_ -= 3300; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage10.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage10.as new file mode 100644 index 0000000..e2cf692 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage10.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage10 extends Sprite + { + + private var url:String = "bg_babel41.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 BabelGoldPage10() + { + 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.babelMoreNameArr1[8] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes40); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 4200) + { + _loc5_ = 0; + } + if(_loc5_ > 4300) + { + _loc5_ = 100; + } + if(_loc5_ > 4200 && _loc5_ <= 4300) + { + _loc5_ -= 4200; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage11.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage11.as new file mode 100644 index 0000000..4a7d065 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage11.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage11 extends Sprite + { + + private var url:String = "bg_babel42.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 BabelGoldPage11() + { + 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.babelMoreNameArr1[9] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[10] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes41); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 4300) + { + _loc5_ = 0; + } + if(_loc5_ > 4400) + { + _loc5_ = 100; + } + if(_loc5_ > 4300 && _loc5_ <= 4400) + { + _loc5_ -= 4300; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage12.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage12.as new file mode 100644 index 0000000..efa8033 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage12.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage12 extends Sprite + { + + private var url:String = "bg_babel43.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 BabelGoldPage12() + { + 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.babelMoreNameArr1[10] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes42); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 4400) + { + _loc5_ = 0; + } + if(_loc5_ > 4500) + { + _loc5_ = 100; + } + if(_loc5_ > 4400 && _loc5_ <= 4500) + { + _loc5_ -= 4400; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage2.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage2.as new file mode 100644 index 0000000..4bcdd22 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage2.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage2 extends Sprite + { + + private var url:String = "bg_babel33.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 BabelGoldPage2() + { + 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.babelMoreNameArr1[0] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes32); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3400) + { + _loc5_ = 0; + } + if(_loc5_ > 3500) + { + _loc5_ = 100; + } + if(_loc5_ > 3400 && _loc5_ <= 3500) + { + _loc5_ -= 3400; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage3.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage3.as new file mode 100644 index 0000000..0d766f6 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage3.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage3 extends Sprite + { + + private var url:String = "bg_babel34.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 BabelGoldPage3() + { + 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.babelMoreNameArr1[1] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes33); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3500) + { + _loc5_ = 0; + } + if(_loc5_ > 3600) + { + _loc5_ = 100; + } + if(_loc5_ > 3500 && _loc5_ <= 3600) + { + _loc5_ -= 3500; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage4.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage4.as new file mode 100644 index 0000000..bccc8fa --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage4.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage4 extends Sprite + { + + private var url:String = "bg_babel35.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 BabelGoldPage4() + { + 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.babelMoreNameArr1[2] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes34); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3600) + { + _loc5_ = 0; + } + if(_loc5_ > 3700) + { + _loc5_ = 100; + } + if(_loc5_ > 3600 && _loc5_ <= 3700) + { + _loc5_ -= 3600; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage5.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage5.as new file mode 100644 index 0000000..9ceebf3 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage5.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage5 extends Sprite + { + + private var url:String = "bg_babel36.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 BabelGoldPage5() + { + 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.babelMoreNameArr1[3] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes35); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3700) + { + _loc5_ = 0; + } + if(_loc5_ > 3800) + { + _loc5_ = 100; + } + if(_loc5_ > 3700 && _loc5_ <= 3800) + { + _loc5_ -= 3700; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage6.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage6.as new file mode 100644 index 0000000..416778c --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage6.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage6 extends Sprite + { + + private var url:String = "bg_babel37.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 BabelGoldPage6() + { + 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.babelMoreNameArr1[4] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes36); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3800) + { + _loc5_ = 0; + } + if(_loc5_ > 3900) + { + _loc5_ = 100; + } + if(_loc5_ > 3800 && _loc5_ <= 3900) + { + _loc5_ -= 3800; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage7.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage7.as new file mode 100644 index 0000000..291380d --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage7.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage7 extends Sprite + { + + private var url:String = "bg_babel38.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 BabelGoldPage7() + { + 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.babelMoreNameArr1[5] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes37); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3900) + { + _loc5_ = 0; + } + if(_loc5_ > 4000) + { + _loc5_ = 100; + } + if(_loc5_ > 3900 && _loc5_ <= 4000) + { + _loc5_ -= 3900; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage8.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage8.as new file mode 100644 index 0000000..c3ddbd3 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage8.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage8 extends Sprite + { + + private var url:String = "bg_babel39.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 BabelGoldPage8() + { + 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.babelMoreNameArr1[6] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes38); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 4000) + { + _loc5_ = 0; + } + if(_loc5_ > 4100) + { + _loc5_ = 100; + } + if(_loc5_ > 4000 && _loc5_ <= 4100) + { + _loc5_ -= 4000; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelgold/BabelGoldPage9.as b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage9.as new file mode 100644 index 0000000..2e02e73 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelgold/BabelGoldPage9.as @@ -0,0 +1,146 @@ +package com.view.ui.babelgold +{ + 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 BabelGoldPage9 extends Sprite + { + + private var url:String = "bg_babel40.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 BabelGoldPage9() + { + 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.babelMoreNameArr1[7] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--黄金" + CommonData.babelMoreNameArr1[8] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes39); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 4100) + { + _loc5_ = 0; + } + if(_loc5_ > 4200) + { + _loc5_ = 100; + } + if(_loc5_ > 4100 && _loc5_ <= 4200) + { + _loc5_ -= 4100; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babellast/BabelLastBuildUI.as b/flash_decompiled/com/view/ui/babellast/BabelLastBuildUI.as new file mode 100644 index 0000000..b0e7f1b --- /dev/null +++ b/flash_decompiled/com/view/ui/babellast/BabelLastBuildUI.as @@ -0,0 +1,840 @@ +package com.view.ui.babellast +{ + 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 BabelLastBuildUI extends PlayUI + { + + private var bg1:Sprite; + + private var page1:BabelLastPage1; + + private var page2:BabelLastPage1; + + private var page3:BabelLastPage1; + + private var page4:BabelLastPage1; + + private var page5:BabelLastPage1; + + private var page6:BabelLastPage1; + + private var page7:BabelLastPage1; + + private var page8:BabelLastPage1; + + private var page9:BabelLastPage1; + + private var page10:BabelLastPage1; + + private var page11:BabelLastPage1; + + private var page12:BabelLastPage1; + + 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:BabelLastEnterUI1; + + private var babelEnterUI2:BabelLastEnterUI1; + + private var babelEnterUI3:BabelLastEnterUI1; + + private var babelEnterUI4:BabelLastEnterUI1; + + private var babelEnterUI5:BabelLastEnterUI1; + + private var babelEnterUI6:BabelLastEnterUI1; + + private var babelEnterUI7:BabelLastEnterUI1; + + private var babelEnterUI8:BabelLastEnterUI1; + + private var babelEnterUI9:BabelLastEnterUI1; + + private var babelEnterUI10:BabelLastEnterUI1; + + private var babelEnterUI11:BabelLastEnterUI1; + + private var babelEnterUI12:BabelLastEnterUI1; + + public function BabelLastBuildUI() + { + 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_babel_last); + this.btnArr = new Array(); + this.btn_1 = new UITabBtn(CommonData.babelMoreNameArr2[0] + "楼",6); + this.btn_2 = new UITabBtn(CommonData.babelMoreNameArr2[1] + "楼",6); + this.btn_3 = new UITabBtn(CommonData.babelMoreNameArr2[2] + "楼",6); + this.btn_4 = new UITabBtn(CommonData.babelMoreNameArr2[3] + "楼",6); + this.btn_5 = new UITabBtn(CommonData.babelMoreNameArr2[4] + "楼",6); + this.btn_6 = new UITabBtn(CommonData.babelMoreNameArr2[5] + "楼",6); + this.btn_7 = new UITabBtn(CommonData.babelMoreNameArr2[6] + "楼",6); + this.btn_8 = new UITabBtn(CommonData.babelMoreNameArr2[7] + "楼",6); + this.btn_9 = new UITabBtn(CommonData.babelMoreNameArr2[8] + "楼",6); + this.btn_10 = new UITabBtn(CommonData.babelMoreNameArr2[9] + "楼",6); + this.btn_11 = new UITabBtn(CommonData.babelMoreNameArr2[10] + "楼",6); + this.btn_12 = new UITabBtn(CommonData.babelMoreNameArr2[11] + "楼",6); + var _loc1_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE51); + var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE52); + var _loc3_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE53); + var _loc4_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE54); + var _loc5_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE55); + var _loc6_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE56); + var _loc7_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE57); + var _loc8_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE58); + var _loc9_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE59); + var _loc10_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE60); + var _loc11_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE61); + var _loc12_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE62); + 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 BabelLastPage1(); + _loc15_.addChild(this.page1); + this.page1.x = 4; + this.page1.y = 4; + this.page1.init(51); + this.page2 = new BabelLastPage1(); + _loc15_.addChild(this.page2); + this.page2.visible = false; + this.page2.x = 4; + this.page2.y = 4; + this.page2.init(52); + this.page3 = new BabelLastPage1(); + _loc15_.addChild(this.page3); + this.page3.visible = false; + this.page3.x = 4; + this.page3.y = 4; + this.page3.init(53); + this.page4 = new BabelLastPage1(); + _loc15_.addChild(this.page4); + this.page4.visible = false; + this.page4.x = 4; + this.page4.y = 4; + this.page4.init(54); + this.page5 = new BabelLastPage1(); + _loc15_.addChild(this.page5); + this.page5.visible = false; + this.page5.x = 4; + this.page5.y = 4; + this.page5.init(55); + this.page6 = new BabelLastPage1(); + _loc15_.addChild(this.page6); + this.page6.visible = false; + this.page6.x = 4; + this.page6.y = 4; + this.page6.init(56); + this.page7 = new BabelLastPage1(); + _loc15_.addChild(this.page7); + this.page7.visible = false; + this.page7.x = 4; + this.page7.y = 4; + this.page7.init(57); + this.page8 = new BabelLastPage1(); + _loc15_.addChild(this.page8); + this.page8.visible = false; + this.page8.x = 4; + this.page8.y = 4; + this.page8.init(58); + this.page9 = new BabelLastPage1(); + _loc15_.addChild(this.page9); + this.page9.visible = false; + this.page9.x = 4; + this.page9.y = 4; + this.page9.init(59); + this.page10 = new BabelLastPage1(); + _loc15_.addChild(this.page10); + this.page10.visible = false; + this.page10.x = 4; + this.page10.y = 4; + this.page10.init(60); + this.page11 = new BabelLastPage1(); + _loc15_.addChild(this.page11); + this.page11.visible = false; + this.page11.x = 4; + this.page11.y = 4; + this.page11.init(61); + this.page12 = new BabelLastPage1(); + _loc15_.addChild(this.page12); + this.page12.visible = false; + this.page12.x = 4; + this.page12.y = 4; + this.page12.init(62); + 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.dfreeTimes51 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4500) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr1[11] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr2[0] + "楼"); + return; + } + this.enterStage1(); + return; + } + if(this.page2.visible) + { + if(this.towerObj.dfreeTimes52 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4600) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[0] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr2[1] + "楼"); + return; + } + this.enterStage2(); + return; + } + if(this.page3.visible) + { + if(this.towerObj.dfreeTimes53 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4700) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[1] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[2] + "楼"); + return; + } + this.enterStage3(); + return; + } + if(this.page4.visible) + { + if(this.towerObj.dfreeTimes54 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4800) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[2] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[3] + "楼"); + return; + } + this.enterStage4(); + return; + } + if(this.page5.visible) + { + if(this.towerObj.dfreeTimes55 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 4900) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[3] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[4] + "楼"); + return; + } + this.enterStage5(); + return; + } + if(this.page6.visible) + { + if(this.towerObj.dfreeTimes56 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 5000) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[4] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[5] + "楼"); + return; + } + this.enterStage6(); + return; + } + if(this.page7.visible) + { + if(this.towerObj.dfreeTimes57 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 5100) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[5] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[6] + "楼"); + return; + } + this.enterStage7(); + return; + } + if(this.page8.visible) + { + if(this.towerObj.dfreeTimes58 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 5200) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[6] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[7] + "楼"); + return; + } + this.enterStage8(); + return; + } + if(this.page9.visible) + { + if(this.towerObj.dfreeTimes59 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 5300) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[7] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[8] + "楼"); + return; + } + this.enterStage9(); + return; + } + if(this.page10.visible) + { + if(this.towerObj.dfreeTimes60 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 5400) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[8] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[9] + "楼"); + return; + } + this.enterStage10(); + return; + } + if(this.page11.visible) + { + if(this.towerObj.dfreeTimes61 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 5500) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[9] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[10] + "楼"); + return; + } + this.enterStage11(); + return; + } + if(this.page12.visible) + { + if(this.towerObj.dfreeTimes62 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 5600) + { + MessageBoxUI.getInstance().addMessage("你没有通过黄金" + CommonData.babelMoreNameArr2[10] + "最高层,没有资格挑战黄金" + CommonData.babelMoreNameArr2[11] + "楼"); + return; + } + this.enterStage12(); + return; + } + } + + private function enterStage1() : void + { + ConnectService.getInstance().babelService.selectRound(4501); + } + + private function enterStage2() : void + { + ConnectService.getInstance().babelService.selectRound(4601); + } + + private function enterStage3() : void + { + ConnectService.getInstance().babelService.selectRound(4701); + } + + private function enterStage4() : void + { + ConnectService.getInstance().babelService.selectRound(4801); + } + + private function enterStage5() : void + { + ConnectService.getInstance().babelService.selectRound(4901); + } + + private function enterStage6() : void + { + ConnectService.getInstance().babelService.selectRound(5001); + } + + private function enterStage7() : void + { + ConnectService.getInstance().babelService.selectRound(5101); + } + + private function enterStage8() : void + { + ConnectService.getInstance().babelService.selectRound(5201); + } + + private function enterStage9() : void + { + ConnectService.getInstance().babelService.selectRound(5301); + } + + private function enterStage10() : void + { + ConnectService.getInstance().babelService.selectRound(5401); + } + + private function enterStage11() : void + { + ConnectService.getInstance().babelService.selectRound(5501); + } + + private function enterStage12() : void + { + ConnectService.getInstance().babelService.selectRound(5601); + } + + private function enterBabel(param1:BabelEvent) : void + { + var _loc2_:int = param1.obj as int; + this.enterBabelRoom(_loc2_); + } + + private function enterBabelRoom(param1:int) : void + { + if(param1 < 4500) + { + MessageBoxUI.getInstance().addMessage("请先退出其他楼"); + closeUI(null); + return; + } + if(param1 > 5600) + { + if(this.babelEnterUI12 == null) + { + this.babelEnterUI12 = new BabelLastEnterUI1(); + this.babelEnterUI12.init(62); + } + this.babelEnterUI12.show(); + } + else if(param1 > 5500) + { + if(this.babelEnterUI11 == null) + { + this.babelEnterUI11 = new BabelLastEnterUI1(); + this.babelEnterUI11.init(61); + } + this.babelEnterUI11.show(); + } + else if(param1 > 5400) + { + if(this.babelEnterUI10 == null) + { + this.babelEnterUI10 = new BabelLastEnterUI1(); + this.babelEnterUI10.init(60); + } + this.babelEnterUI10.show(); + } + else if(param1 > 5300) + { + if(this.babelEnterUI9 == null) + { + this.babelEnterUI9 = new BabelLastEnterUI1(); + this.babelEnterUI9.init(59); + } + this.babelEnterUI9.show(); + } + else if(param1 > 5200) + { + if(this.babelEnterUI8 == null) + { + this.babelEnterUI8 = new BabelLastEnterUI1(); + this.babelEnterUI8.init(58); + } + this.babelEnterUI8.show(); + } + else if(param1 > 5100) + { + if(this.babelEnterUI7 == null) + { + this.babelEnterUI7 = new BabelLastEnterUI1(); + this.babelEnterUI7.init(57); + } + this.babelEnterUI7.show(); + } + else if(param1 > 5000) + { + if(this.babelEnterUI6 == null) + { + this.babelEnterUI6 = new BabelLastEnterUI1(); + this.babelEnterUI6.init(56); + } + this.babelEnterUI6.show(); + } + else if(param1 > 4900) + { + if(this.babelEnterUI5 == null) + { + this.babelEnterUI5 = new BabelLastEnterUI1(); + this.babelEnterUI5.init(55); + } + this.babelEnterUI5.show(); + } + else if(param1 > 4800) + { + if(this.babelEnterUI4 == null) + { + this.babelEnterUI4 = new BabelLastEnterUI1(); + this.babelEnterUI4.init(54); + } + this.babelEnterUI4.show(); + } + else if(param1 > 4700) + { + if(this.babelEnterUI3 == null) + { + this.babelEnterUI3 = new BabelLastEnterUI1(); + this.babelEnterUI3.init(53); + } + this.babelEnterUI3.show(); + } + else if(param1 > 4600) + { + if(this.babelEnterUI2 == null) + { + this.babelEnterUI2 = new BabelLastEnterUI1(); + this.babelEnterUI2.init(52); + } + this.babelEnterUI2.show(); + } + else if(param1 > 4500) + { + if(this.babelEnterUI1 == null) + { + this.babelEnterUI1 = new BabelLastEnterUI1(); + this.babelEnterUI1.init(51); + } + this.babelEnterUI1.show(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/babellast/BabelLastEnterUI1.as b/flash_decompiled/com/view/ui/babellast/BabelLastEnterUI1.as new file mode 100644 index 0000000..8fcf62f --- /dev/null +++ b/flash_decompiled/com/view/ui/babellast/BabelLastEnterUI1.as @@ -0,0 +1,1013 @@ +package com.view.ui.babellast +{ + 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 BabelLastEnterUI1 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 BabelLastEnterUI1() + { + 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_last_1); + break; + case 52: + super.loadTitle(UITitleConfig.title_babel_last_2); + break; + case 53: + super.loadTitle(UITitleConfig.title_babel_last_3); + break; + case 54: + super.loadTitle(UITitleConfig.title_babel_last_4); + break; + case 55: + super.loadTitle(UITitleConfig.title_babel_last_5); + break; + case 56: + super.loadTitle(UITitleConfig.title_babel_last_6); + break; + case 57: + super.loadTitle(UITitleConfig.title_babel_last_7); + break; + case 58: + super.loadTitle(UITitleConfig.title_babel_last_8); + break; + case 59: + super.loadTitle(UITitleConfig.title_babel_last_9); + break; + case 60: + super.loadTitle(UITitleConfig.title_babel_last_10); + break; + case 61: + super.loadTitle(UITitleConfig.title_babel_last_11); + break; + case 62: + super.loadTitle(UITitleConfig.title_babel_last_12); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/babellast/BabelLastPage1.as b/flash_decompiled/com/view/ui/babellast/BabelLastPage1.as new file mode 100644 index 0000000..c117366 --- /dev/null +++ b/flash_decompiled/com/view/ui/babellast/BabelLastPage1.as @@ -0,0 +1,156 @@ +package com.view.ui.babellast +{ + 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 BabelLastPage1 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 BabelLastPage1() + { + 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 - 600; + 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/babelmore/BabelMoreBuildUI.as b/flash_decompiled/com/view/ui/babelmore/BabelMoreBuildUI.as new file mode 100644 index 0000000..ced7f11 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMoreBuildUI.as @@ -0,0 +1,612 @@ +package com.view.ui.babelmore +{ + 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 BabelMoreBuildUI extends PlayUI + { + + private var bg1:Sprite; + + private var page1:BabelMorePage1; + + private var page2:BabelMorePage2; + + private var page3:BabelMorePage3; + + private var page4:BabelMorePage4; + + private var page5:BabelMorePage5; + + private var page6:BabelMorePage6; + + private var page7:BabelMorePage7; + + private var page8:BabelMorePage8; + + 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 lastTab:UITabBtn; + + private var prePage:Sprite; + + private var enterBtn:UIButton; + + private var towerObj:Object; + + private var topStageId:int; + + private var babelEnterUI1:BabelMoreEnterUI1; + + private var babelEnterUI2:BabelMoreEnterUI2; + + private var babelEnterUI3:BabelMoreEnterUI3; + + private var babelEnterUI4:BabelMoreEnterUI4; + + private var babelEnterUI5:BabelMoreEnterUI5; + + private var babelEnterUI6:BabelMoreEnterUI6; + + private var babelEnterUI7:BabelMoreEnterUI7; + + private var babelEnterUI8:BabelMoreEnterUI8; + + public function BabelMoreBuildUI() + { + 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 _loc9_:int = 0; + var _loc10_:UITabBtn = null; + var _loc11_:UIWindowBg = null; + var _loc12_:UIWindowBg = null; + var _loc13_:UITitleBg = null; + var _loc14_:UITitleBg = null; + super.createUI(); + super.loadTitle(UITitleConfig.title_babel_more); + this.btnArr = new Array(); + this.btn_1 = new UITabBtn(CommonData.babelMoreNameArr[0],2); + this.btn_2 = new UITabBtn(CommonData.babelMoreNameArr[1],2); + this.btn_3 = new UITabBtn(CommonData.babelMoreNameArr[2],2); + this.btn_4 = new UITabBtn(CommonData.babelMoreNameArr[3],2); + this.btn_5 = new UITabBtn(CommonData.babelMoreNameArr[4],2); + this.btn_6 = new UITabBtn(CommonData.babelMoreNameArr[5],2); + this.btn_7 = new UITabBtn(CommonData.babelMoreNameArr[6],2); + this.btn_8 = new UITabBtn(CommonData.babelMoreNameArr[7],2); + var _loc1_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE21); + var _loc2_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE22); + var _loc3_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE23); + var _loc4_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE24); + var _loc5_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE25); + var _loc6_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE26); + var _loc7_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE27); + var _loc8_:int = int(GameData.getConfigMap().BABEL_OPEN_STAGE28); + 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); + } + for each(_loc10_ in this.btnArr) + { + addChild(_loc10_); + _loc10_.x = 15 + _loc9_ * 66; + _loc10_.y = 40; + _loc10_.onClick = this.changeType; + _loc9_++; + } + _loc11_ = new UIWindowBg(); + _loc11_.initSecondPanel(630 + 32,375); + addChild(_loc11_); + _loc11_.x = 11; + _loc11_.y = 65; + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(385,366); + _loc11_.addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = 4; + _loc12_ = new UIWindowBg(); + _loc12_.initThirdPanel(222 + 32,366); + _loc11_.addChild(_loc12_); + _loc12_.x = this.bg2.x + this.bg2.width + 4; + _loc12_.y = this.bg2.y; + _loc13_ = new UITitleBg("活动介绍",_loc12_.width); + _loc12_.addChild(_loc13_); + _loc13_.x = int(_loc12_.width / 2 - _loc13_.width / 2); + _loc14_ = new UITitleBg("参加活动",_loc12_.width); + _loc12_.addChild(_loc14_); + _loc14_.x = int(_loc12_.width / 2 - _loc14_.width / 2); + _loc14_.y = 230; + this.page1 = new BabelMorePage1(); + _loc11_.addChild(this.page1); + this.page1.x = 4; + this.page1.y = 4; + this.page2 = new BabelMorePage2(); + _loc11_.addChild(this.page2); + this.page2.visible = false; + this.page2.x = 4; + this.page2.y = 4; + this.page3 = new BabelMorePage3(); + _loc11_.addChild(this.page3); + this.page3.visible = false; + this.page3.x = 4; + this.page3.y = 4; + this.page4 = new BabelMorePage4(); + _loc11_.addChild(this.page4); + this.page4.visible = false; + this.page4.x = 4; + this.page4.y = 4; + this.page5 = new BabelMorePage5(); + _loc11_.addChild(this.page5); + this.page5.visible = false; + this.page5.x = 4; + this.page5.y = 4; + this.page6 = new BabelMorePage6(); + _loc11_.addChild(this.page6); + this.page6.visible = false; + this.page6.x = 4; + this.page6.y = 4; + this.page7 = new BabelMorePage7(); + _loc11_.addChild(this.page7); + this.page7.visible = false; + this.page7.x = 4; + this.page7.y = 4; + this.page8 = new BabelMorePage8(); + _loc11_.addChild(this.page8); + this.page8.visible = false; + this.page8.x = 4; + this.page8.y = 4; + this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + this.enterBtn = new UIButton("进 入",2,10); + _loc11_.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; + } + } + + 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); + } + 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.dfreeTimes21 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 2500) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelNameArr[24] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr[0]); + return; + } + this.enterStage1(); + return; + } + if(this.page2.visible) + { + if(this.towerObj.dfreeTimes22 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 2600) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr[0] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr[1]); + return; + } + this.enterStage2(); + return; + } + if(this.page3.visible) + { + if(this.towerObj.dfreeTimes23 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 2700) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr[1] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr[2]); + return; + } + this.enterStage3(); + return; + } + if(this.page4.visible) + { + if(this.towerObj.dfreeTimes24 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 2800) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr[2] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr[3]); + return; + } + this.enterStage4(); + return; + } + if(this.page5.visible) + { + if(this.towerObj.dfreeTimes25 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 2900) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr[3] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr[4]); + return; + } + this.enterStage5(); + return; + } + if(this.page6.visible) + { + if(this.towerObj.dfreeTimes26 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3000) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr[4] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr[5]); + return; + } + this.enterStage6(); + return; + } + if(this.page7.visible) + { + if(this.towerObj.dfreeTimes27 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3100) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr[5] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr[6]); + return; + } + this.enterStage7(); + return; + } + if(this.page8.visible) + { + if(this.towerObj.dfreeTimes28 <= 0) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + if(this.topStageId < 3200) + { + MessageBoxUI.getInstance().addMessage("你没有通过" + CommonData.babelMoreNameArr[6] + "最高层,没有资格挑战" + CommonData.babelMoreNameArr[7]); + return; + } + this.enterStage8(); + return; + } + } + + private function enterStage1() : void + { + ConnectService.getInstance().babelService.selectRound(2501); + } + + private function enterStage2() : void + { + ConnectService.getInstance().babelService.selectRound(2601); + } + + private function enterStage3() : void + { + ConnectService.getInstance().babelService.selectRound(2701); + } + + private function enterStage4() : void + { + ConnectService.getInstance().babelService.selectRound(2801); + } + + private function enterStage5() : void + { + ConnectService.getInstance().babelService.selectRound(2901); + } + + private function enterStage6() : void + { + ConnectService.getInstance().babelService.selectRound(3001); + } + + private function enterStage7() : void + { + ConnectService.getInstance().babelService.selectRound(3101); + } + + private function enterStage8() : void + { + ConnectService.getInstance().babelService.selectRound(3201); + } + + private function enterBabel(param1:BabelEvent) : void + { + var _loc2_:int = param1.obj as int; + this.enterBabelRoom(_loc2_); + } + + private function enterBabelRoom(param1:int) : void + { + if(param1 > 3300 || param1 < 2500) + { + MessageBoxUI.getInstance().addMessage("请先退出其他楼"); + closeUI(null); + return; + } + if(param1 > 3200) + { + if(this.babelEnterUI8 == null) + { + this.babelEnterUI8 = new BabelMoreEnterUI8(); + } + this.babelEnterUI8.show(); + } + else if(param1 > 3100) + { + if(this.babelEnterUI7 == null) + { + this.babelEnterUI7 = new BabelMoreEnterUI7(); + } + this.babelEnterUI7.show(); + } + else if(param1 > 3000) + { + if(this.babelEnterUI6 == null) + { + this.babelEnterUI6 = new BabelMoreEnterUI6(); + } + this.babelEnterUI6.show(); + } + else if(param1 > 2900) + { + if(this.babelEnterUI5 == null) + { + this.babelEnterUI5 = new BabelMoreEnterUI5(); + } + this.babelEnterUI5.show(); + } + else if(param1 > 2800) + { + if(this.babelEnterUI4 == null) + { + this.babelEnterUI4 = new BabelMoreEnterUI4(); + } + this.babelEnterUI4.show(); + } + else if(param1 > 2700) + { + if(this.babelEnterUI3 == null) + { + this.babelEnterUI3 = new BabelMoreEnterUI3(); + } + this.babelEnterUI3.show(); + } + else if(param1 > 2600) + { + if(this.babelEnterUI2 == null) + { + this.babelEnterUI2 = new BabelMoreEnterUI2(); + } + this.babelEnterUI2.show(); + } + else if(param1 > 2500) + { + if(this.babelEnterUI1 == null) + { + this.babelEnterUI1 = new BabelMoreEnterUI1(); + } + this.babelEnterUI1.show(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI1.as b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI1.as new file mode 100644 index 0000000..7691f15 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI1.as @@ -0,0 +1,965 @@ +package com.view.ui.babelmore +{ + 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 BabelMoreEnterUI1 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 BabelMoreEnterUI1() + { + 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_more_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,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 = _loc6_ + ""; + this.aktPowerText.text = _loc7_ + ""; + if(this.topStageId > 2600) + { + this.topStageId = 100; + } + else + { + this.topStageId -= 2500; + } + 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 > 2600) + { + this.realStageId = 100; + } + else + { + this.realStageId -= 2500; + } + 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_ > 2600 || _loc5_ < 2501)) + { + 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/babelmore/BabelMoreEnterUI2.as b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI2.as new file mode 100644 index 0000000..a4d837b --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI2.as @@ -0,0 +1,965 @@ +package com.view.ui.babelmore +{ + 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 BabelMoreEnterUI2 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 BabelMoreEnterUI2() + { + 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_more_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,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 = _loc6_ + ""; + this.aktPowerText.text = _loc7_ + ""; + if(this.topStageId > 2700) + { + this.topStageId = 100; + } + else + { + this.topStageId -= 2600; + } + 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 > 2700) + { + this.realStageId = 100; + } + else + { + this.realStageId -= 2600; + } + 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_ > 2700 || _loc5_ < 2601)) + { + 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/babelmore/BabelMoreEnterUI3.as b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI3.as new file mode 100644 index 0000000..0fa72f1 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI3.as @@ -0,0 +1,965 @@ +package com.view.ui.babelmore +{ + 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 BabelMoreEnterUI3 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 BabelMoreEnterUI3() + { + 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_more_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,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 = _loc6_ + ""; + this.aktPowerText.text = _loc7_ + ""; + if(this.topStageId > 2800) + { + this.topStageId = 100; + } + else + { + this.topStageId -= 2700; + } + 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 > 2800) + { + this.realStageId = 100; + } + else + { + this.realStageId -= 2700; + } + 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_ > 2800 || _loc5_ < 2701)) + { + 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/babelmore/BabelMoreEnterUI4.as b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI4.as new file mode 100644 index 0000000..6b51314 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI4.as @@ -0,0 +1,965 @@ +package com.view.ui.babelmore +{ + 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 BabelMoreEnterUI4 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 BabelMoreEnterUI4() + { + 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_more_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,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 = _loc6_ + ""; + this.aktPowerText.text = _loc7_ + ""; + if(this.topStageId > 2900) + { + this.topStageId = 100; + } + else + { + this.topStageId -= 2800; + } + 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 > 2900) + { + this.realStageId = 100; + } + else + { + this.realStageId -= 2800; + } + 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_ > 2900 || _loc5_ < 2801)) + { + 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/babelmore/BabelMoreEnterUI5.as b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI5.as new file mode 100644 index 0000000..3262c35 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI5.as @@ -0,0 +1,965 @@ +package com.view.ui.babelmore +{ + 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 BabelMoreEnterUI5 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 BabelMoreEnterUI5() + { + 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_more_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,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 = _loc6_ + ""; + this.aktPowerText.text = _loc7_ + ""; + if(this.topStageId > 3000) + { + this.topStageId = 100; + } + else + { + this.topStageId -= 2900; + } + 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 > 3000) + { + this.realStageId = 100; + } + else + { + this.realStageId -= 2900; + } + 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_ > 3000 || _loc5_ < 2901)) + { + 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/babelmore/BabelMoreEnterUI6.as b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI6.as new file mode 100644 index 0000000..b9c09c6 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI6.as @@ -0,0 +1,965 @@ +package com.view.ui.babelmore +{ + 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 BabelMoreEnterUI6 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 BabelMoreEnterUI6() + { + 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_more_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,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 = _loc6_ + ""; + this.aktPowerText.text = _loc7_ + ""; + if(this.topStageId > 3100) + { + this.topStageId = 100; + } + else + { + this.topStageId -= 3000; + } + 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 > 3100) + { + this.realStageId = 100; + } + else + { + this.realStageId -= 3000; + } + 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_ > 3100 || _loc5_ < 3001)) + { + 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/babelmore/BabelMoreEnterUI7.as b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI7.as new file mode 100644 index 0000000..8baf1ff --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI7.as @@ -0,0 +1,965 @@ +package com.view.ui.babelmore +{ + 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 BabelMoreEnterUI7 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 BabelMoreEnterUI7() + { + 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_more_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,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 = _loc6_ + ""; + this.aktPowerText.text = _loc7_ + ""; + if(this.topStageId > 3200) + { + this.topStageId = 100; + } + else + { + this.topStageId -= 3100; + } + 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 > 3200) + { + this.realStageId = 100; + } + else + { + this.realStageId -= 3100; + } + 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_ > 3200 || _loc5_ < 3101)) + { + 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/babelmore/BabelMoreEnterUI8.as b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI8.as new file mode 100644 index 0000000..43b8e56 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMoreEnterUI8.as @@ -0,0 +1,965 @@ +package com.view.ui.babelmore +{ + 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 BabelMoreEnterUI8 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 BabelMoreEnterUI8() + { + 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_more_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,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 = _loc6_ + ""; + this.aktPowerText.text = _loc7_ + ""; + if(this.topStageId > 3300) + { + this.topStageId = 100; + } + else + { + this.topStageId -= 3200; + } + 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 > 3300) + { + this.realStageId = 100; + } + else + { + this.realStageId -= 3200; + } + 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_ > 3300 || _loc5_ < 3201)) + { + 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/babelmore/BabelMorePage1.as b/flash_decompiled/com/view/ui/babelmore/BabelMorePage1.as new file mode 100644 index 0000000..eb2d1bc --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMorePage1.as @@ -0,0 +1,146 @@ +package com.view.ui.babelmore +{ + 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 BabelMorePage1 extends Sprite + { + + private var url:String = "babelmore_1.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 BabelMorePage1() + { + 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[24] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelMoreNameArr[0] + "。它是仙人的宫殿?还是天子的宝库?也许一切的问题都需要用胜利来解答...”
挑战每层后可回复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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes21); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2500) + { + _loc5_ = 0; + } + if(_loc5_ > 2600) + { + _loc5_ = 100; + } + if(_loc5_ > 2500 && _loc5_ <= 2600) + { + _loc5_ -= 2500; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelmore/BabelMorePage2.as b/flash_decompiled/com/view/ui/babelmore/BabelMorePage2.as new file mode 100644 index 0000000..1bb0ba6 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMorePage2.as @@ -0,0 +1,146 @@ +package com.view.ui.babelmore +{ + 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 BabelMorePage2 extends Sprite + { + + private var url:String = "babelmore_2.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 BabelMorePage2() + { + 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.babelMoreNameArr[0] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelMoreNameArr[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes22); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2600) + { + _loc5_ = 0; + } + if(_loc5_ > 2700) + { + _loc5_ = 100; + } + if(_loc5_ > 2600 && _loc5_ <= 2700) + { + _loc5_ -= 2600; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelmore/BabelMorePage3.as b/flash_decompiled/com/view/ui/babelmore/BabelMorePage3.as new file mode 100644 index 0000000..5af390e --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMorePage3.as @@ -0,0 +1,146 @@ +package com.view.ui.babelmore +{ + 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 BabelMorePage3 extends Sprite + { + + private var url:String = "babelmore_3.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 BabelMorePage3() + { + 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.babelMoreNameArr[1] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelMoreNameArr[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes23); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2700) + { + _loc5_ = 0; + } + if(_loc5_ > 2800) + { + _loc5_ = 100; + } + if(_loc5_ > 2700 && _loc5_ <= 2800) + { + _loc5_ -= 2700; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelmore/BabelMorePage4.as b/flash_decompiled/com/view/ui/babelmore/BabelMorePage4.as new file mode 100644 index 0000000..8984cfc --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMorePage4.as @@ -0,0 +1,146 @@ +package com.view.ui.babelmore +{ + 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 BabelMorePage4 extends Sprite + { + + private var url:String = "babelmore_4.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 BabelMorePage4() + { + 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.babelMoreNameArr[2] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelMoreNameArr[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes24); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2800) + { + _loc5_ = 0; + } + if(_loc5_ > 2900) + { + _loc5_ = 100; + } + if(_loc5_ > 2800 && _loc5_ <= 2900) + { + _loc5_ -= 2800; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelmore/BabelMorePage5.as b/flash_decompiled/com/view/ui/babelmore/BabelMorePage5.as new file mode 100644 index 0000000..6dfc1bc --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMorePage5.as @@ -0,0 +1,146 @@ +package com.view.ui.babelmore +{ + 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 BabelMorePage5 extends Sprite + { + + private var url:String = "babelmore_5.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 BabelMorePage5() + { + 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.babelMoreNameArr[3] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelMoreNameArr[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes25); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 2900) + { + _loc5_ = 0; + } + if(_loc5_ > 3000) + { + _loc5_ = 100; + } + if(_loc5_ > 2900 && _loc5_ <= 3000) + { + _loc5_ -= 2900; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelmore/BabelMorePage6.as b/flash_decompiled/com/view/ui/babelmore/BabelMorePage6.as new file mode 100644 index 0000000..e771dd8 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMorePage6.as @@ -0,0 +1,146 @@ +package com.view.ui.babelmore +{ + 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 BabelMorePage6 extends Sprite + { + + private var url:String = "babelmore_6.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 BabelMorePage6() + { + 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.babelMoreNameArr[4] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelMoreNameArr[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes26); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3000) + { + _loc5_ = 0; + } + if(_loc5_ > 3100) + { + _loc5_ = 100; + } + if(_loc5_ > 3000 && _loc5_ <= 3100) + { + _loc5_ -= 3000; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelmore/BabelMorePage7.as b/flash_decompiled/com/view/ui/babelmore/BabelMorePage7.as new file mode 100644 index 0000000..9fc83bb --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMorePage7.as @@ -0,0 +1,146 @@ +package com.view.ui.babelmore +{ + 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 BabelMorePage7 extends Sprite + { + + private var url:String = "babelmore_7.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 BabelMorePage7() + { + 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.babelMoreNameArr[5] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelMoreNameArr[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes27); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3100) + { + _loc5_ = 0; + } + if(_loc5_ > 3200) + { + _loc5_ = 100; + } + if(_loc5_ > 3100 && _loc5_ <= 3200) + { + _loc5_ -= 3100; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/babelmore/BabelMorePage8.as b/flash_decompiled/com/view/ui/babelmore/BabelMorePage8.as new file mode 100644 index 0000000..03f31e2 --- /dev/null +++ b/flash_decompiled/com/view/ui/babelmore/BabelMorePage8.as @@ -0,0 +1,146 @@ +package com.view.ui.babelmore +{ + 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 BabelMorePage8 extends Sprite + { + + private var url:String = "babelmore_8.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 BabelMorePage8() + { + 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.babelMoreNameArr[6] + "顶!你的武勋必将为世人所铭记!而现在,有更大的挑战等待着你--" + CommonData.babelMoreNameArr[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 = 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 setData(param1:Object) : void + { + var _loc2_:int = int(param1.totalFreeTimes); + var _loc3_:int = int(param1.dfreeTimes28); + var _loc4_:int = _loc2_ + 2 - _loc3_; + var _loc5_:int = int(param1.topStageId); + var _loc6_:Array = param1.topList as Array; + this.free_txt.text = _loc4_ + " 次"; + this.item_txt.text = _loc3_ + " 次"; + if(_loc5_ <= 3200) + { + _loc5_ = 0; + } + if(_loc5_ > 3300) + { + _loc5_ = 100; + } + if(_loc5_ > 3200 && _loc5_ <= 3300) + { + _loc5_ -= 3200; + } + this.title_txt.text = _loc5_.toString(); + this.freeTimesT.text = "13"; + this.itemTimesT.text = "0"; + } + + 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/barracks/BarracksBuild.as b/flash_decompiled/com/view/ui/barracks/BarracksBuild.as new file mode 100644 index 0000000..ac9c4ca --- /dev/null +++ b/flash_decompiled/com/view/ui/barracks/BarracksBuild.as @@ -0,0 +1,60 @@ +package com.view.ui.barracks +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class BarracksBuild extends BaseBuild + { + + public function BarracksBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/BarracksView1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/BarracksView3.swf"; + buildData.picUrl = "pic/build/BarracksView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/BarracksView2.swf"; + buildData.picUrl = "pic/build/BarracksView2.png"; + } + else + { + buildData.swfUrl = "pic/build/BarracksView1.swf"; + buildData.picUrl = "pic/build/BarracksView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new BarracksBuildUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/barracks/BarracksBuildUI.as b/flash_decompiled/com/view/ui/barracks/BarracksBuildUI.as new file mode 100644 index 0000000..669b2bb --- /dev/null +++ b/flash_decompiled/com/view/ui/barracks/BarracksBuildUI.as @@ -0,0 +1,806 @@ +package com.view.ui.barracks +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.BarrackEvent; + import com.control.data.ReturnBean; + import com.data.data.army.Army; + import com.data.data.city.EntityConsume; + import com.data.data.city.EntityLimit; + import com.view.mc.sprite.ItemMc; + import com.view.mc.sprite.PageInputMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.tip.TipTitle; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tools.ToolView; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BarracksBuildUI extends BaseUI + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var tableMc:UITable; + + private var resName1:TextField; + + private var resNum1:TextField; + + private var countNum1:TextField; + + private var resName2:TextField; + + private var resNum2:TextField; + + private var countNum2:TextField; + + private var resName3:TextField; + + private var resNum3:TextField; + + private var countNum3:TextField; + + private var newArmyNum:TextField; + + private var armyNumLimit:TextField; + + private var addSpeedText:TextField; + + private var atkText:TextField; + + private var defText:TextField; + + private var hpText:TextField; + + private var agileText:TextField; + + private var moveText:TextField; + + private var attackText:TextField; + + private var mobilityText:TextField; + + private var tip_mc1:TextField; + + private var tip_mc2:TextField; + + private var tip_mc3:TextField; + + private var tip_mc4:TextField; + + private var tip_mc5:TextField; + + private var tip_mc6:TextField; + + private var tip_mc7:TextField; + + private var recruitBtn:UIButton; + + private var input:PageInputMc; + + private var armyMcArr:Array; + + private var armyList:Array = new Array(); + + private var casArmyList:Array = new Array(); + + private var curr_i:int = -1; + + private var currArmyType:String; + + private var obj:Object; + + private var myArmyScroll:ScrollPane; + + private var myArmyMc:Sprite; + + private var myArmyArr:Vector.; + + private var dismissArmyView:DismissArmyView; + + public function BarracksBuildUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_junying); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc5_:Sprite = null; + var _loc6_:TextField = null; + var _loc8_:TextField = null; + var _loc9_:Array = null; + var _loc10_:Array = null; + var _loc24_:MyArmyMc = null; + var _loc25_:ItemMc = null; + var _loc1_:TextFormat = PublicMethod.getCenterTextFormat(); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(622,298); + bigBg.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 98; + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(152,88); + _loc2_.addChild(this.bg1); + this.bg1.x = 3; + this.bg1.y = 3; + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(450,291); + _loc2_.addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 3; + this.bg2.y = this.bg1.y; + var _loc3_:UITitleBg = new UITitleBg("军营信息",this.bg1.width); + this.bg1.addChild(_loc3_); + _loc3_.x = int(this.bg1.width / 2 - _loc3_.width / 2); + var _loc4_:Sprite = PublicMethod.getTrLine(150); + _loc5_ = PublicMethod.getTrLine(150); + this.bg1.addChild(_loc4_); + this.bg1.addChild(_loc5_); + _loc4_.x = 3; + _loc5_.x = 3; + _loc4_.y = 47; + _loc5_.y = 72; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc6_.text = "新兵数:"; + this.bg1.addChild(_loc6_); + _loc6_.x = 6; + _loc6_.y = 29; + this.newArmyNum = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg1.addChild(this.newArmyNum); + this.newArmyNum.x = 50; + this.newArmyNum.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc7_.text = "总兵数:"; + this.bg1.addChild(_loc7_); + _loc7_.x = _loc6_.x; + _loc7_.y = _loc6_.y + 25; + this.armyNumLimit = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.bg1.addChild(this.armyNumLimit); + this.armyNumLimit.x = this.newArmyNum.x; + this.armyNumLimit.y = _loc7_.y; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,85); + _loc8_.text = "新兵增长速度:"; + this.bg1.addChild(_loc8_); + _loc8_.x = _loc6_.x; + _loc8_.y = _loc7_.y + 25; + this.addSpeedText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,77); + this.bg1.addChild(this.addSpeedText); + this.addSpeedText.x = 90; + this.addSpeedText.y = _loc8_.y; + _loc9_ = ["兵种","兵力","操作"]; + _loc10_ = [55,54,55]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(7,_loc9_,_loc10_); + _loc2_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 103; + this.myArmyMc = new Sprite(); + this.myArmyScroll = new ScrollPane(); + this.myArmyScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.myArmyScroll.setSize(158,175); + this.tableMc.addChild(this.myArmyScroll); + this.myArmyScroll.x = 1; + this.myArmyScroll.y = 25; + this.myArmyScroll.source = this.myArmyMc; + this.myArmyArr = new Vector.(); + var _loc11_:int = 0; + while(_loc11_ < 7) + { + _loc24_ = new MyArmyMc(); + this.myArmyMc.addChild(_loc24_); + _loc24_.y = _loc11_ * 25; + this.myArmyArr.push(_loc24_); + _loc24_.dismissFunc = this.dismissArmy; + _loc11_++; + } + this.myArmyScroll.update(); + var _loc12_:Sprite = face.getSprite(ClassConfig.ui_btn_add); + this.bg1.addChild(_loc12_); + _loc12_.x = 146; + _loc12_.y = 32; + _loc12_.addEventListener(MouseEvent.CLICK,this.addNewArmy); + this.armyMcArr = new Array(); + var _loc13_:int = 0; + while(_loc13_ < 5) + { + _loc25_ = new ItemMc(); + this.bg2.addChild(_loc25_); + _loc25_.x = 5 + _loc13_ * 91; + _loc25_.y = 6; + this.armyMcArr.push(_loc25_); + _loc25_.addEventListener(MouseEvent.CLICK,this.clickArmyMc); + switch(_loc13_) + { + case 0: + new TipTitle(_loc25_,face.stage,face.tip_bg,{"titletext":"步兵防御能力出众,善于克制工兵和骑兵"}); + break; + case 1: + new TipTitle(_loc25_,face.stage,face.tip_bg,{"titletext":"工兵拥有远程打击能力,敏捷较高,善于克制骑兵和器械部队"}); + break; + case 2: + new TipTitle(_loc25_,face.stage,face.tip_bg,{"titletext":"骑兵敏捷较高,移动能力强,善于克制战车和器械部队"}); + break; + case 3: + new TipTitle(_loc25_,face.stage,face.tip_bg,{"titletext":"战车体力出众,冲锋时伤害巨大,善于克制步兵和工兵"}); + break; + case 4: + new TipTitle(_loc25_,face.stage,face.tip_bg,{"titletext":"器械拥有远程打击能力,攻击出众,善于克制步兵和战车,破坏城墙"}); + } + _loc13_++; + } + var _loc14_:UITitleBg = new UITitleBg("新兵训练",this.bg2.width); + this.bg2.addChild(_loc14_); + _loc14_.x = int(this.bg2.width / 2 - _loc14_.width / 2); + _loc14_.y = 115; + this.tip_mc1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + this.atkText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + this.bg2.addChild(this.tip_mc1); + this.tip_mc1.x = 10; + this.tip_mc1.y = 150; + this.tip_mc1.text = "攻击:"; + this.bg2.addChild(this.atkText); + this.atkText.x = this.tip_mc1.x + 36; + this.atkText.y = this.tip_mc1.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,170); + this.bg2.addChild(_loc15_); + _loc15_.x = this.tip_mc1.x + 100; + _loc15_.y = this.tip_mc1.y; + _loc15_.text = "提供伤害"; + this.tip_mc2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + this.defText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + this.bg2.addChild(this.tip_mc2); + this.tip_mc2.x = this.tip_mc1.x; + this.tip_mc2.y = this.tip_mc1.y + 20; + this.tip_mc2.text = "防御:"; + this.bg2.addChild(this.defText); + this.defText.x = this.atkText.x; + this.defText.y = this.tip_mc2.y; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,170); + this.bg2.addChild(_loc16_); + _loc16_.x = _loc15_.x; + _loc16_.y = this.tip_mc2.y; + _loc16_.text = "抵抗伤害"; + this.tip_mc3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + this.hpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + this.bg2.addChild(this.tip_mc3); + this.tip_mc3.x = this.tip_mc1.x; + this.tip_mc3.y = this.tip_mc2.y + 20; + this.tip_mc3.text = "体力:"; + this.bg2.addChild(this.hpText); + this.hpText.x = this.atkText.x; + this.hpText.y = this.tip_mc3.y; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,170); + this.bg2.addChild(_loc17_); + _loc17_.x = _loc15_.x; + _loc17_.y = this.tip_mc3.y; + _loc17_.text = "影响生命值"; + this.tip_mc4 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + this.agileText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + this.bg2.addChild(this.tip_mc4); + this.tip_mc4.x = this.tip_mc1.x; + this.tip_mc4.y = this.tip_mc3.y + 20; + this.tip_mc4.text = "敏捷:"; + this.bg2.addChild(this.agileText); + this.agileText.x = this.atkText.x; + this.agileText.y = this.tip_mc4.y; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,170); + this.bg2.addChild(_loc18_); + _loc18_.x = _loc15_.x; + _loc18_.y = this.tip_mc4.y; + _loc18_.text = "影响闪避几率和暴击倍数"; + this.tip_mc5 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + this.moveText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + this.bg2.addChild(this.tip_mc5); + this.tip_mc5.x = this.tip_mc1.x; + this.tip_mc5.y = this.tip_mc4.y + 20; + this.tip_mc5.text = "移动:"; + this.bg2.addChild(this.moveText); + this.moveText.x = this.atkText.x; + this.moveText.y = this.tip_mc5.y; + var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,170); + this.bg2.addChild(_loc19_); + _loc19_.x = _loc15_.x; + _loc19_.y = this.tip_mc5.y; + _loc19_.text = "每回合的最远移动距离"; + this.tip_mc6 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + this.attackText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + this.bg2.addChild(this.tip_mc6); + this.tip_mc6.x = this.tip_mc1.x; + this.tip_mc6.y = this.tip_mc5.y + 20; + this.tip_mc6.text = "射程:"; + this.bg2.addChild(this.attackText); + this.attackText.x = this.atkText.x; + this.attackText.y = this.tip_mc6.y; + var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,170); + this.bg2.addChild(_loc20_); + _loc20_.x = _loc15_.x; + _loc20_.y = this.tip_mc6.y; + _loc20_.text = "能够攻击到的最远距离"; + this.tip_mc7 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + this.mobilityText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + this.bg2.addChild(this.tip_mc7); + this.tip_mc7.x = this.tip_mc1.x; + this.tip_mc7.y = this.tip_mc6.y + 20; + this.tip_mc7.text = "机动:"; + this.bg2.addChild(this.mobilityText); + this.mobilityText.x = this.atkText.x; + this.mobilityText.y = this.tip_mc7.y; + var _loc21_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,170); + this.bg2.addChild(_loc21_); + _loc21_.x = _loc15_.x; + _loc21_.y = this.tip_mc7.y; + _loc21_.text = "影响回合内的行动顺序"; + _loc9_ = ["训练条件","消耗数量","当前数量"]; + _loc10_ = [55,64,80]; + var _loc22_:UITable = new UITable(); + _loc22_.drawLine = true; + _loc22_.install(3,_loc9_,_loc10_); + this.bg2.addChild(_loc22_); + _loc22_.x = 260; + _loc22_.y = 145; + this.resName1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,55); + this.resNum1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,64); + this.countNum1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + _loc22_.addChild(this.resName1); + this.resName1.x = 2; + this.resName1.y = 29; + _loc22_.addChild(this.resNum1); + this.resNum1.x = this.resName1.x + this.resName1.width; + this.resNum1.y = this.resName1.y; + _loc22_.addChild(this.countNum1); + this.countNum1.x = this.resNum1.x + this.resNum1.width; + this.countNum1.y = this.resName1.y; + this.resName2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,55); + this.resNum2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,64); + this.countNum2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + _loc22_.addChild(this.resName2); + this.resName2.x = this.resName1.x; + this.resName2.y = this.resName1.y + 25; + _loc22_.addChild(this.resNum2); + this.resNum2.x = this.resName2.x + this.resName2.width; + this.resNum2.y = this.resName2.y; + _loc22_.addChild(this.countNum2); + this.countNum2.x = this.resNum2.x + this.resNum2.width; + this.countNum2.y = this.resName2.y; + this.resName3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,55); + this.resNum3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,64); + this.countNum3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + _loc22_.addChild(this.resName3); + this.resName3.x = this.resName1.x; + this.resName3.y = this.resName2.y + 25; + _loc22_.addChild(this.resNum3); + this.resNum3.x = this.resName3.x + this.resName3.width; + this.resNum3.y = this.resName3.y; + _loc22_.addChild(this.countNum3); + this.countNum3.x = this.resNum3.x + this.resNum3.width; + this.countNum3.y = this.resName3.y; + this.resName1.defaultTextFormat = _loc1_; + this.resNum1.defaultTextFormat = _loc1_; + this.countNum1.defaultTextFormat = _loc1_; + this.resName2.defaultTextFormat = _loc1_; + this.resNum2.defaultTextFormat = _loc1_; + this.countNum2.defaultTextFormat = _loc1_; + this.resName3.defaultTextFormat = _loc1_; + this.resNum3.defaultTextFormat = _loc1_; + this.countNum3.defaultTextFormat = _loc1_; + var _loc23_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,170); + this.bg2.addChild(_loc23_); + _loc23_.x = 252; + _loc23_.y = 260; + _loc23_.text = "训练数量"; + this.input = new PageInputMc(); + this.bg2.addChild(this.input); + this.input.x = _loc23_.x + 55; + this.input.y = _loc23_.y; + this.input.setMinNum(0); + this.input.setMaxLen(6); + this.input.setMaxNum(2); + this.input.getLeftBtn().addEventListener(MouseEvent.CLICK,this.changeArmy); + this.input.getRightBtn().addEventListener(MouseEvent.CLICK,this.changeArmy); + this.input.getInputText().addEventListener(Event.CHANGE,this.changeArmyInput); + this.recruitBtn = new UIButton("训 练",2,10); + this.bg2.addChild(this.recruitBtn); + this.recruitBtn.x = this.input.x + this.input.width + 3; + this.recruitBtn.y = 258; + this.recruitBtn.onClick = this.recruitArmy; + } + + private function showBarracksResult(param1:BarrackEvent) : void + { + var _loc8_:Object = null; + var _loc9_:ItemMc = null; + var _loc10_:Army = null; + var _loc11_:Array = null; + var _loc12_:EntityLimit = null; + var _loc13_:String = null; + this.input.setText(0); + this.obj = param1.barrackView; + var _loc2_:int = int(this.obj.addSpeed); + var _loc3_:int = int(this.obj.maxArmyCap); + var _loc4_:int = int(this.obj.currArmyNum); + var _loc5_:int = int(this.obj.userArmyNumLimit); + var _loc6_:int = int(this.obj.userCurrArmyNum); + this.casArmyList = this.obj.casArmyList as Array; + this.armyList = this.obj.armyList as Array; + this.getCastleArmy(); + this.input.setMaxNum(_loc4_); + this.newArmyNum.text = _loc4_ + "/" + _loc3_; + this.armyNumLimit.text = _loc6_ + "/" + _loc5_; + this.addSpeedText.text = _loc2_ + "/小时"; + var _loc7_:int = 0; + while(_loc7_ < 5) + { + _loc8_ = this.armyList[_loc7_] as Object; + if(_loc8_ != null) + { + _loc9_ = this.armyMcArr[_loc7_] as ItemMc; + _loc10_ = _loc8_.army as Army; + _loc11_ = _loc8_.limits as Array; + if((Boolean(_loc11_)) && _loc11_.length > 0) + { + _loc12_ = _loc11_[0] as EntityLimit; + _loc9_.setLock(_loc12_.red); + if(_loc12_.red) + { + _loc13_ = "请先升级:" + _loc12_.entTypeChn + "需要" + _loc12_.needEntName; + _loc13_ = _loc13_ + "(等级" + _loc12_.needLevel + ") 当前" + _loc12_.actualLevel; + _loc9_.setErrMsg(_loc13_); + } + } + else + { + _loc9_.setLock(false); + } + _loc9_.setImg("pic/army/" + _loc10_.iconPath); + _loc9_.setTitle(_loc10_.armyName); + } + _loc7_++; + } + this.setArmyValue(0); + } + + private function crearArmyMc() : void + { + var _loc1_:int = int(this.myArmyArr.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.myArmyArr[_loc2_].setData(null); + if(_loc2_ >= 7) + { + this.myArmyMc.removeChild(this.myArmyArr[_loc2_]); + this.myArmyArr.splice(_loc2_,1); + } + _loc2_--; + } + this.myArmyScroll.update(); + } + + private function getCastleArmy() : void + { + var _loc2_:Object = null; + var _loc3_:MyArmyMc = null; + this.crearArmyMc(); + if(this.casArmyList == null || this.casArmyList.length < 1) + { + return; + } + var _loc1_:int = 0; + while(_loc1_ < this.casArmyList.length) + { + _loc2_ = this.casArmyList[_loc1_] as Object; + if(_loc1_ > 6) + { + _loc3_ = new MyArmyMc(); + this.myArmyMc.addChild(_loc3_); + _loc3_.y = _loc1_ * 24; + this.myArmyArr.push(_loc3_); + _loc3_.dismissFunc = this.dismissArmy; + } + this.myArmyArr[_loc1_].setData(_loc2_); + _loc1_++; + } + this.myArmyScroll.update(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + this.newArmyNum.text = ""; + this.armyNumLimit.text = ""; + this.addSpeedText.text = ""; + ConnectService.getInstance().addEventListener(BarrackEvent.ShowBarracks,this.showBarracksResult); + ConnectService.getInstance().addEventListener(BarrackEvent.RecruitNewArmy,this.recruitNewArmyResult); + ConnectService.getInstance().addEventListener(BarrackEvent.Army_dismissCasArmyResult,this.dissmissArmySucc); + ConnectService.getInstance().addEventListener(BarrackEvent.Army_levelUpArmy,this.levelUpArmySucc); + } + + override public function removeFromStage(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(BarrackEvent.ShowBarracks,this.showBarracksResult); + ConnectService.getInstance().removeEventListener(BarrackEvent.RecruitNewArmy,this.recruitNewArmyResult); + ConnectService.getInstance().removeEventListener(BarrackEvent.Army_dismissCasArmyResult,this.dissmissArmySucc); + ConnectService.getInstance().removeEventListener(BarrackEvent.Army_levelUpArmy,this.levelUpArmySucc); + super.removeFromStage(param1); + super.delBuildEvent(); + this.crearArmyMc(); + this.closeDismissUI(); + } + + private function dissmissArmySucc(param1:BarrackEvent) : void + { + MessageBoxUI.getInstance().addMessage("解散操作成功"); + this.closeDismissUI(); + this.loadLocalData(); + } + + private function levelUpArmySucc(param1:BarrackEvent) : void + { + MessageBoxUI.getInstance().addMessage("进阶操作成功"); + this.closeDismissUI(); + this.loadLocalData(); + } + + private function closeDismissUI() : void + { + if(Boolean(this.dismissArmyView) && contains(this.dismissArmyView)) + { + removeChild(this.dismissArmyView); + } + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + this.recruitBtn.setUnEnable(); + ConnectService.getInstance().castleService.showBarracks(); + } + + private function clickArmyMc(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:ItemMc = null; + var _loc2_:ItemMc = param1.target as ItemMc; + for(_loc3_ in this.armyMcArr) + { + _loc4_ = this.armyMcArr[_loc3_] as ItemMc; + if(_loc2_ == _loc4_) + { + this.setArmyValue(_loc3_); + break; + } + } + } + + private function setArmyValue(param1:int) : void + { + var _loc4_:* = undefined; + var _loc5_:Army = null; + var _loc6_:Array = null; + var _loc7_:EntityConsume = null; + if(this.curr_i == param1) + { + return; + } + var _loc2_:Object = this.armyList[param1] as Object; + if(_loc2_ == null) + { + return; + } + var _loc3_:ItemMc = this.armyMcArr[param1] as ItemMc; + if(_loc3_.getLock()) + { + MessageBoxUI.getInstance().addMessage(_loc3_.getErrMsg()); + return; + } + for(_loc4_ in this.armyMcArr) + { + if(param1 == _loc4_) + { + this.armyMcArr[_loc4_].setClick(); + } + else + { + this.armyMcArr[_loc4_].setUnClick(); + } + } + _loc5_ = _loc2_.army as Army; + this.atkText.htmlText = this.getArmyStr(_loc5_.attack,_loc5_.finalAtk); + this.defText.htmlText = this.getArmyStr(_loc5_.defence,_loc5_.finalDef); + this.hpText.htmlText = this.getArmyStr(_loc5_.hp,_loc5_.finalHp); + this.agileText.htmlText = this.getArmyStr(_loc5_.agile,_loc5_.finalAgl); + this.moveText.text = _loc5_.moveRange + ""; + this.attackText.text = _loc5_.attackRange + ""; + this.mobilityText.text = _loc5_.mobility + ""; + this.currArmyType = _loc5_.armyType; + _loc6_ = _loc2_.consumes as Array; + for each(_loc7_ in _loc6_) + { + if(_loc7_.needEntId == 20100001) + { + this.resName1.text = _loc7_.needEntName; + this.resNum1.text = _loc7_.needEntNum.toString(); + this.input.money = _loc7_.needEntNum; + this.countNum1.text = _loc7_.actualNum.toString(); + this.input.moneyMax = _loc7_.actualNum; + } + if(_loc7_.needEntId == 20100002) + { + this.resName2.text = _loc7_.needEntName; + this.resNum2.text = _loc7_.needEntNum.toString(); + this.input.food = _loc7_.needEntNum; + this.countNum2.text = _loc7_.actualNum.toString(); + this.input.foodMax = _loc7_.actualNum; + } + if(_loc7_.needEntId == 90000002) + { + this.resName3.text = _loc7_.needEntName; + this.resNum3.text = _loc7_.needEntNum.toString(); + this.countNum3.text = _loc7_.actualNum.toString(); + this.input.armyNum = _loc7_.actualNum; + } + } + this.recruitBtn.setEnable(); + this.input.setText(1); + } + + private function getArmyStr(param1:int, param2:int) : String + { + var _loc3_:String = param1.toString(); + var _loc4_:int = param2 - param1; + if(_loc4_ > 0) + { + _loc3_ = _loc3_ + "(+" + _loc4_ + ")"; + } + return _loc3_; + } + + private function addNewArmy(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.list(-1,121,-1,1,"QUICK_STORE_ZHENGBING"); + _loc2_.onRefresh = this.loadLocalData; + _loc2_.show(); + } + + private function recruitArmy(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getText(); + if(_loc2_ <= 0) + { + return; + } + if(this.currArmyType != "") + { + this.recruitBtn.setUnEnable(); + ConnectService.getInstance().castleService.recruitNewArmy(this.currArmyType,_loc2_); + } + } + + private function changeArmy(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc2_:int = this.input.getText(); + if(_loc2_ * this.input.money > this.input.moneyMax) + { + _loc2_ = this.input.moneyMax / this.input.money; + } + if(_loc2_ * this.input.food > this.input.foodMax) + { + _loc2_ = this.input.foodMax / this.input.food; + } + if(_loc2_ > this.input.armyNum) + { + _loc2_ = this.input.armyNum; + } + if(this.obj) + { + _loc3_ = int(this.obj.userArmyNumLimit); + _loc4_ = int(this.obj.userCurrArmyNum); + if(_loc2_ > _loc3_ - _loc4_) + { + _loc2_ = _loc3_ - _loc4_; + } + } + this.input.setText(_loc2_); + this.totalArmy(); + } + + private function changeArmyInput(param1:Event) : void + { + this.totalArmy(); + } + + private function totalArmy() : void + { + var _loc1_:int = this.input.getText() * this.input.money; + if(_loc1_ > this.input.moneyMax) + { + this.countNum1.text = "铜币不够"; + } + else + { + this.countNum1.text = this.input.moneyMax.toString(); + } + this.resNum1.text = _loc1_.toString(); + var _loc2_:int = this.input.getText() * this.input.food; + if(_loc2_ > this.input.foodMax) + { + this.countNum2.text = "粮食不够"; + } + else + { + this.countNum2.text = this.input.foodMax.toString(); + } + this.resNum2.text = _loc2_.toString(); + var _loc3_:int = this.input.getText(); + if(_loc3_ > this.input.armyNum) + { + this.countNum3.text = "新兵不够"; + } + else + { + this.countNum3.text = this.input.armyNum.toString(); + } + this.resNum3.text = _loc3_.toString(); + } + + private function recruitNewArmyResult(param1:BarrackEvent) : void + { + this.recruitBtn.setEnable(); + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + this.loadLocalData(); + } + + private function dismissArmy(param1:Object) : void + { + if(this.dismissArmyView == null) + { + this.dismissArmyView = new DismissArmyView(); + this.dismissArmyView.x = int(realUIWidth / 2 - this.dismissArmyView.width / 2); + this.dismissArmyView.y = int(realUIheight / 2 - this.dismissArmyView.height / 2); + } + addChild(this.dismissArmyView); + this.dismissArmyView.update(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/barracks/DismissArmyView.as b/flash_decompiled/com/view/ui/barracks/DismissArmyView.as new file mode 100644 index 0000000..69fa027 --- /dev/null +++ b/flash_decompiled/com/view/ui/barracks/DismissArmyView.as @@ -0,0 +1,217 @@ +package com.view.ui.barracks +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.BarrackEvent; + import com.view.mc.sprite.PageInputMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class DismissArmyView extends UIWindowBg + { + + private var bg:Sprite; + + private var level_txt:TextField; + + private var food1_txt:TextField; + + private var money1_txt:TextField; + + private var food_txt:TextField; + + private var money_txt:TextField; + + private var input1:PageInputMc; + + private var input2:PageInputMc; + + private var btn1:UIButton; + + private var btn2:UIButton; + + private var obj:Object; + + private var _object:Object; + + public function DismissArmyView() + { + var _loc4_:TextField = null; + var _loc8_:TextField = null; + super(); + initSize(100,250); + loadTitle(UITitleConfig.title_shibingcaozuo); + addCloseBtn(); + initBg(); + var _loc1_:UITitleBg = new UITitleBg("士兵进阶",bg1.width); + bg1.addChild(_loc1_); + _loc1_.x = int(bg1.width / 2 - _loc1_.width / 2); + var _loc2_:UITitleBg = new UITitleBg("士兵遣散",bg1.width); + bg1.addChild(_loc2_); + _loc2_.x = int(bg1.width / 2 - _loc2_.width / 2); + _loc2_.y = 140; + this.level_txt = PublicMethod.getTextFieldWithFillter(16711680,200); + bg1.addChild(this.level_txt); + this.level_txt.x = 60; + this.level_txt.y = 30; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + bg1.addChild(_loc3_); + _loc3_.x = 50; + _loc3_.y = 55; + _loc3_.text = "进阶数量:"; + this.input1 = new PageInputMc(); + bg1.addChild(this.input1); + this.input1.x = 120; + this.input1.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + bg1.addChild(_loc4_); + _loc4_.x = _loc3_.x; + _loc4_.y = _loc3_.y + 25; + _loc4_.text = "消耗粮食:"; + this.food1_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + bg1.addChild(this.food1_txt); + this.food1_txt.x = 120; + this.food1_txt.y = _loc4_.y; + this.food1_txt.text = "0"; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + bg1.addChild(_loc5_); + _loc5_.x = _loc3_.x; + _loc5_.y = _loc4_.y + 25; + _loc5_.text = "消耗铜币:"; + this.money1_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + bg1.addChild(this.money1_txt); + this.money1_txt.x = 120; + this.money1_txt.y = _loc5_.y; + this.money1_txt.text = "0"; + this.btn1 = new UIButton("确 定",2); + this.btn2 = new UIButton("确 定",2); + bg1.addChild(this.btn1); + this.btn1.x = 210; + this.btn1.y = _loc3_.y - 4; + bg1.addChild(this.btn2); + this.btn2.x = 210; + this.btn2.onClick = this.dismissArmy; + this.btn1.onClick = this.upArmy; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + bg1.addChild(_loc6_); + _loc6_.x = 50; + _loc6_.y = 190; + _loc6_.text = "遣散数量:"; + this.btn2.y = _loc6_.y - 4; + this.input2 = new PageInputMc(); + bg1.addChild(this.input2); + this.input2.x = this.input1.x; + this.input2.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + bg1.addChild(_loc7_); + _loc7_.x = _loc6_.x; + _loc7_.y = _loc6_.y + 25; + _loc7_.text = "返还粮食:"; + this.food_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + bg1.addChild(this.food_txt); + this.food_txt.x = 120; + this.food_txt.y = _loc7_.y; + this.food_txt.text = "0"; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + bg1.addChild(_loc8_); + _loc8_.x = _loc6_.x; + _loc8_.y = _loc7_.y + 25; + _loc8_.text = "返还铜币:"; + this.money_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + bg1.addChild(this.money_txt); + this.money_txt.x = 120; + this.money_txt.y = _loc8_.y; + this.money_txt.text = "0"; + this.input1.setMinNum(0); + this.input1.setMaxLen(7); + this.input2.setMaxLen(7); + this.input2.setMinNum(0); + this.input1.getInputText().addEventListener(Event.CHANGE,this.changeUpText); + this.input1.getLeftBtn().addEventListener(MouseEvent.CLICK,this.changeUpText); + this.input1.getRightBtn().addEventListener(MouseEvent.CLICK,this.changeUpText); + this.input2.getInputText().addEventListener(Event.CHANGE,this.changeDismissText); + this.input2.getLeftBtn().addEventListener(MouseEvent.CLICK,this.changeDismissText); + this.input2.getRightBtn().addEventListener(MouseEvent.CLICK,this.changeDismissText); + } + + private function changeDismissText(param1:Event) : void + { + this.food_txt.text = String(int(this._object.armyFood * this.input2.getText() / 4)); + this.money_txt.text = String(int(this._object.armyMoney * this.input2.getText() / 4)); + if(int(this.food_txt.text) < 0) + { + this.food_txt.text = "0"; + this.money_txt.text = "0"; + } + } + + private function changeUpText(param1:Event) : void + { + if(this._object.level >= this._object.maxLevel) + { + this.food1_txt.text = "0"; + this.money1_txt.text = "0"; + return; + } + this.food1_txt.text = String((this._object.maxArmyFood - this._object.armyFood) * this.input1.getText()); + this.money1_txt.text = String((this._object.maxArmyMoney - this._object.armyMoney) * this.input1.getText()); + } + + public function update(param1:Object) : void + { + this.obj = param1; + this.input1.setMaxNum(this.obj.armyNum); + this.input2.setMaxNum(this.obj.armyNum); + this.input1.setText(0); + this.input2.setText(0); + this.level_txt.htmlText = "将" + this.obj.armyName + "升级到最高阶"; + ConnectService.getInstance().castleService.showArmyOperView(this.obj.armyEntId); + if(!ConnectService.getInstance().hasEventListener(BarrackEvent.Army_ShowArmyOperView)) + { + ConnectService.getInstance().addEventListener(BarrackEvent.Army_ShowArmyOperView,this.showArmySucc); + } + } + + private function showArmySucc(param1:BarrackEvent) : void + { + ConnectService.getInstance().removeEventListener(BarrackEvent.Army_ShowArmyOperView,this.showArmySucc); + this._object = param1.barrackView; + if(this._object.level >= this._object.maxLevel) + { + this.btn1.setUnEnable(); + this.level_txt.htmlText = "" + "已达此城池最大兵阶,不可升阶" + ""; + } + } + + private function dismissArmy(param1:MouseEvent) : void + { + var _loc2_:int = this.input2.getText(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("您输入的解散人数有误"); + return; + } + ConnectService.getInstance().castleService.dismissCasArmy(this.obj.armyEntId,_loc2_); + } + + private function upArmy(param1:MouseEvent) : void + { + var _loc2_:int = this.input1.getText(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("您输入的进阶人数有误"); + return; + } + ConnectService.getInstance().castleService.levelUpArmy(this.obj.armyEntId,_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/barracks/MyArmyMc.as b/flash_decompiled/com/view/ui/barracks/MyArmyMc.as new file mode 100644 index 0000000..74524f8 --- /dev/null +++ b/flash_decompiled/com/view/ui/barracks/MyArmyMc.as @@ -0,0 +1,75 @@ +package com.view.ui.barracks +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class MyArmyMc extends Sprite + { + + private var armyEntId:int; + + private var btn:UISmallBtn; + + private var armName:TextField; + + private var num:TextField; + + private var obj:Object; + + public var dismissFunc:Function; + + public function MyArmyMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(158); + addChild(_loc1_); + this.armName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,55); + addChild(this.armName); + this.armName.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.armName.y = 3; + this.num = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,53); + this.num.y = this.armName.y; + addChild(this.num); + this.num.x = this.armName.width; + this.num.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.btn = new UISmallBtn("进 阶",2); + addChild(this.btn); + this.btn.x = this.num.x + this.num.width + 2; + this.btn.y = 2; + this.btn.visible = false; + this.btn.onClick = this.armyOper; + } + + public function setData(param1:Object) : void + { + this.obj = param1; + if(this.obj == null) + { + this.armyEntId = 0; + this.btn.visible = false; + this.armName.text = ""; + this.num.text = ""; + } + else + { + this.armyEntId = int(this.obj.armyEntId); + this.armName.text = this.obj.armyName; + this.num.text = this.obj.armyNum; + this.btn.visible = true; + } + } + + private function armyOper(param1:MouseEvent) : void + { + if(this.dismissFunc != null) + { + this.dismissFunc(this.obj); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battle/BattleRes.as b/flash_decompiled/com/view/ui/battle/BattleRes.as new file mode 100644 index 0000000..a9510ec --- /dev/null +++ b/flash_decompiled/com/view/ui/battle/BattleRes.as @@ -0,0 +1,95 @@ +package com.view.ui.battle +{ + 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 BattleRes + { + + private static var instance:BattleRes; + + private var _loaderInfo:ApplicationDomain; + + public function BattleRes() + { + super(); + if(instance != null) + { + throw new Error("错误,单例,无法创建新的实例"); + } + } + + public static function getInstance() : BattleRes + { + if(instance == null) + { + instance = new BattleRes(); + } + 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/battle/BattleUI.as b/flash_decompiled/com/view/ui/battle/BattleUI.as new file mode 100644 index 0000000..3674137 --- /dev/null +++ b/flash_decompiled/com/view/ui/battle/BattleUI.as @@ -0,0 +1,77 @@ +package com.view.ui.battle +{ + import com.comfig.PathConfig; + import com.view.Control; + import com.view.ui.BaseUI; + import flash.display.Loader; + import flash.events.Event; + import flash.events.ProgressEvent; + import flash.net.URLRequest; + import flash.system.ApplicationDomain; + import flash.system.LoaderContext; + + public class BattleUI extends BaseUI + { + + private var urlArr:Array = ["Battle.swf","resc/BattleResource.swf","resc/BattleEffect.swf","resc/BossBattle.swf"]; + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var loadNums:int; + + public function BattleUI() + { + super(); + if(this.battleRes.getLoaderInfo() == null) + { + _loaderInfo = new ApplicationDomain(); + Control.getInstance().addLoadMc(); + this.beginLoadRes(); + } + else + { + this.createUI(); + } + } + + private function beginLoadRes() : void + { + Control.getInstance().setCurrNums(this.loadNums + 1 + "/" + this.urlArr.length); + var _loc1_:URLRequest = new URLRequest(PathConfig.getInstance().getVerStr(this.urlArr[this.loadNums])); + this.loadUIResource(_loc1_); + } + + override public function loadUIResource(param1:URLRequest) : void + { + loader = new Loader(); + loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadUiComplete); + loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,loadProgress); + loader.load(param1,new LoaderContext(false,_loaderInfo)); + } + + override public function loadUiComplete(param1:Event) : void + { + ++this.loadNums; + if(this.loadNums < this.urlArr.length) + { + this.beginLoadRes(); + } + else + { + this.battleRes.setLoaderInfo(_loaderInfo); + _loaderInfo = null; + loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.loadUiComplete); + loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,loadProgress); + loader = null; + Control.getInstance().setCurrNums(""); + Control.getInstance().removeLoadMc(); + this.createUI(); + } + } + + override public function createUI() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/battle/BattleViewUI.as b/flash_decompiled/com/view/ui/battle/BattleViewUI.as new file mode 100644 index 0000000..d26f678 --- /dev/null +++ b/flash_decompiled/com/view/ui/battle/BattleViewUI.as @@ -0,0 +1,114 @@ +package com.view.ui.battle +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.BabelEvent; + import com.view.ui.battleview.BattleView; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class BattleViewUI extends BattleUI + { + + private static var instance:BattleViewUI; + + private var bg:Sprite; + + private var combatId:String; + + private var battleView:BattleView; + + public function BattleViewUI() + { + super(); + if(instance != null) + { + throw new Error("不能实例"); + } + } + + public static function getInstance() : BattleViewUI + { + if(instance == null) + { + instance = new BattleViewUI(); + } + return instance; + } + + public function showUI(param1:String) : void + { + this.combatId = param1; + if(this.battleView) + { + this.battleView.loadBattleData(this.combatId); + } + if(!face.stage.contains(this)) + { + face.stage.addChild(this); + this.setBattlePosi(); + } + } + + override public function createUI() : void + { + this.bg = PublicMethod.createShape(16711680,CommonData.MAX_WIDTH,CommonData.MAX_HEIGHT); + this.bg.alpha = 0; + addChild(this.bg); + this.bg.x = -int(this.bg.width / 2); + this.bg.y = -int(this.bg.height / 2); + this.battleView = new BattleView(); + this.battleView.loadBattleData(this.combatId); + addChild(this.battleView); + this.battleView.x = -int(this.battleView.width / 2); + this.battleView.y = -int(this.battleView.height / 2); + this.battleView.ui_closeBtn.onClick = this.closeUI; + this.battleView.setCloseFunc(this.closeUI); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(BabelEvent.BABEL_COMBAT_VIEW,this.getCombatDataResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_COMBAT_VIEW,this.getCombatDataResult); + this.combatId = ""; + } + + private function setBattlePosi() : void + { + this.x = face.realWidth / 2; + this.y = face.realHeight / 2; + } + + override public function setPosition() : void + { + this.setBattlePosi(); + } + + override public function closeUI(param1:MouseEvent) : void + { + if(face.stage.contains(this)) + { + face.stage.removeChild(this); + } + } + + private function getCombatDataResult(param1:BabelEvent) : void + { + if(param1.obj == null) + { + MessageBoxUI.getInstance().addMessage("此战斗已结束"); + this.closeUI(null); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battle/HeroBattleViewUI.as b/flash_decompiled/com/view/ui/battle/HeroBattleViewUI.as new file mode 100644 index 0000000..29e690b --- /dev/null +++ b/flash_decompiled/com/view/ui/battle/HeroBattleViewUI.as @@ -0,0 +1,107 @@ +package com.view.ui.battle +{ + import com.control.ConnectService; + import com.control.battle.event.BattleViewEvent; + import com.control.data.ReturnBean; + import com.view.ui.battleview.FightView; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class HeroBattleViewUI extends BattleUI + { + + private static var instance:HeroBattleViewUI; + + private var battleId:String; + + private var fightView:FightView; + + public function HeroBattleViewUI() + { + super(); + if(instance != null) + { + throw new Error("不能实例"); + } + } + + public static function getInstance() : HeroBattleViewUI + { + if(instance == null) + { + instance = new HeroBattleViewUI(); + } + return instance; + } + + public function showUI(param1:String) : void + { + this.closeUI(null); + this.battleId = param1; + if(!face.stage.contains(this)) + { + face.stage.addChild(this); + this.x = int(face.realWidth / 2); + this.y = int(face.realHeight / 2); + } + if(this.fightView) + { + this.fightView.loadBattleData(this.battleId); + } + } + + override public function createUI() : void + { + this.fightView = new FightView(); + addChild(this.fightView); + this.fightView.x = -int(this.fightView.width / 2); + this.fightView.y = -int(this.fightView.height / 2); + this.fightView.loadBattleData(this.battleId); + this.fightView.ui_closeBtn.onClick = this.closeUI; + this.fightView.end_mc.addEventListener(MouseEvent.CLICK,this.closeUI,false,0,true); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(BattleViewEvent.BATTLE_VIEW_BYFIGHTID,this.getFightDataResult); + } + + override public function removeFromStage(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(BattleViewEvent.BATTLE_VIEW_BYFIGHTID,this.getFightDataResult); + super.removeFromStage(param1); + this.battleId = ""; + } + + private function setBattlePosi() : void + { + this.x = face.realWidth / 2; + this.y = face.realHeight / 2; + } + + override public function setPosition() : void + { + this.setBattlePosi(); + } + + override public function closeUI(param1:MouseEvent) : void + { + if(face.stage.contains(this)) + { + face.stage.removeChild(this); + } + } + + private function getFightDataResult(param1:BattleViewEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + this.closeUI(null); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/ArmyType.as b/flash_decompiled/com/view/ui/battleview/ArmyType.as new file mode 100644 index 0000000..f585924 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/ArmyType.as @@ -0,0 +1,97 @@ +package com.view.ui.battleview +{ + import flash.utils.Dictionary; + + public class ArmyType + { + + private static var _aliaName:Dictionary; + + public static const TAT_GUNMU:String = "TAT_GUNMU"; + + public static const TAT_XIANJING:String = "TAT_XIANJING"; + + public static const TAT_JUMA:String = "TAT_JUMA"; + + public static const TAT_NUJIAN:String = "TAT_NUJIAN"; + + public static const TAT_LEISHI:String = "TAT_LEISHI"; + + public static const AT_QIXIE:String = "AT_QIXIE"; + + public static const AT_ZHANCHE:String = "AT_ZHANCHE"; + + public static const AT_BUBING:String = "AT_BUBING"; + + public static const AT_QIBING:String = "AT_QIBING"; + + public static const AT_GONGBING:String = "AT_GONGBING"; + + public static const DF_WALL:String = "WALL"; + + public function ArmyType() + { + super(); + } + + public static function getTowerName(param1:String) : String + { + var _loc2_:String = ""; + switch(param1) + { + case ArmyType.TAT_GUNMU: + _loc2_ = "滚木"; + break; + case ArmyType.TAT_NUJIAN: + _loc2_ = "弩箭"; + break; + case ArmyType.TAT_JUMA: + _loc2_ = "拒马"; + break; + case ArmyType.TAT_XIANJING: + _loc2_ = "陷阱"; + break; + case ArmyType.TAT_LEISHI: + _loc2_ = "擂石"; + } + return _loc2_; + } + + public static function get aliaName() : Dictionary + { + if(_aliaName == null) + { + _aliaName = new Dictionary(); + _aliaName[ArmyType.AT_BUBING] = "bubing"; + _aliaName[ArmyType.AT_GONGBING] = "gongbing"; + _aliaName[ArmyType.AT_QIBING] = "qibing"; + _aliaName[ArmyType.AT_ZHANCHE] = "zhanche"; + _aliaName[ArmyType.AT_QIXIE] = "qixue"; + _aliaName[ArmyType.TAT_NUJIAN] = "wall_nujian"; + _aliaName[ArmyType.TAT_GUNMU] = "wall_gunmu"; + _aliaName[ArmyType.TAT_JUMA] = "wall_juma"; + _aliaName[ArmyType.TAT_XIANJING] = "wall_xianjing"; + _aliaName[ArmyType.TAT_LEISHI] = "wall_leishi"; + } + return _aliaName; + } + + public static function getArmyPosY(param1:String) : int + { + var _loc2_:* = 0; + switch(param1) + { + case ArmyType.AT_BUBING: + _loc2_ = 0; + break; + case ArmyType.AT_GONGBING: + _loc2_ = 28; + break; + default: + _loc2_ = 0; + } + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/Armyer.as b/flash_decompiled/com/view/ui/battleview/Armyer.as new file mode 100644 index 0000000..4f5ca23 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/Armyer.as @@ -0,0 +1,802 @@ +package com.view.ui.battleview +{ + import com.comfig.ServerConfig; + import com.data.data.battle.DimensionCombatTeam; + import com.data.data.hero.Hero; + import com.greensock.TweenLite; + import com.utils.ExtMath; + import com.view.ui.battleview.charactor.Charactor; + import com.view.ui.battleview.charactor.Direction; + import com.view.ui.battleview.charactor.ImgData; + import com.view.ui.battleview.mc.FightTextMc; + import com.view.ui.battleview.mc.SkillEffMc; + import com.view.ui.battleview.mc.XuanyunMc; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.BlendMode; + import flash.display.Loader; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.geom.Matrix; + import flash.net.URLRequest; + import flash.utils.setTimeout; + + public class Armyer extends Charactor + { + + public static const SPEND_TIME:Number = 0.01; + + private var _rowId:int = 0; + + private var _cellWidth:Number; + + public var postion:int = 0; + + private var _data:DimensionCombatTeam; + + public var armyType:String = ""; + + public var hero:Hero; + + private var _initNum:int = 1; + + private var _curNum:int = 0; + + private var _heroName:String; + + private var _head:Head2; + + private var bloodBar:Sprite; + + public var power:int; + + public var isWall:Boolean = false; + + private var xuanyunMc:XuanyunMc; + + public var initSkill:Array; + + private var effList:Vector.; + + public function Armyer() + { + super(); + this.bloodBar = new Sprite(); + } + + public function attack2(param1:Armyer, param2:int, param3:int) : void + { + } + + public function get rowId() : int + { + return this._rowId; + } + + public function set rowId(param1:int) : void + { + this._rowId = param1; + this._cellWidth = LandCube.WIDTH; + } + + public function getType() : int + { + return type; + } + + public function setType(param1:int) : void + { + type = param1; + if(type == 1) + { + this.postion = 0; + this.setDirection(Direction.RIGHT); + } + if(type == 2) + { + this.postion = LandCube.CUBE_X_NUM - 1; + this.setDirection(Direction.LEFT); + } + } + + public function get data() : DimensionCombatTeam + { + return this._data; + } + + public function set data(param1:DimensionCombatTeam) : void + { + this._data = param1; + } + + public function get initNum() : int + { + return this._initNum; + } + + public function set initNum(param1:int) : void + { + this._initNum = param1; + } + + public function get curNum() : int + { + return this._curNum; + } + + public function set curNum(param1:int) : void + { + this._curNum = param1; + } + + public function get heroName() : String + { + return this._heroName; + } + + public function set heroName(param1:String) : void + { + this._heroName = param1; + } + + public function get head() : Head2 + { + return this._head; + } + + public function set head(param1:Head2) : void + { + this._head = param1; + } + + public function setArmyType(param1:String) : void + { + this.armyType = param1; + } + + override public function getImgData() : void + { + var _loc1_:int = 0; + var _loc3_:ImgData = null; + if(Boolean(imgDataVec) && imgDataVec.length > 0) + { + imgDataVec = new Vector.(); + } + if(type == 1) + { + _loc1_ = 1; + } + else + { + _loc1_ = 2; + } + var _loc2_:BitmapData = battleRes.getPng(this.armyType + "_PIC" + _loc1_); + bigBitMap = new Bitmap(_loc2_); + init_x = bigBitMap.width / 25; + init_y = bigBitMap.height / 3; + var _loc4_:int = 0; + while(_loc4_ < 75) + { + _loc3_ = new ImgData(init_x,init_y,init_x * (_loc4_ % 25),init_y * int(_loc4_ / 25)); + imgDataVec.push(_loc3_); + _loc4_++; + } + super.loadBmpData(); + } + + override public function loadOver() : void + { + if(characBitMap == null) + { + characBitMap = new Bitmap(); + } + if(!contains(characBitMap)) + { + addChild(characBitMap); + } + this.setDirection(getDirection()); + this.stand(); + this.drawUI(); + super.loadOver(); + this.loadSkillEff(); + } + + public function drawUI() : void + { + this.bloodBar.x = -20; + this.bloodBar.y = -30; + this.addChild(this.bloodBar); + this.update(); + } + + override public function setDirection(param1:int) : void + { + super.setDirection(param1); + var _loc2_:Matrix = characBitMap.transform.matrix; + offset_x = -init_x - init_x / 2; + offset_y = -init_y - init_y / 2; + if(direction == Direction.UP) + { + _loc2_.a = 1; + } + if(direction == Direction.RIGHT) + { + _loc2_.a = 1; + } + if(direction == Direction.LEFT) + { + offset_x = -init_x / 2; + offset_y = -init_y - init_y / 2; + _loc2_.a = -1; + } + if(direction == Direction.DOWN) + { + _loc2_.a = 1; + } + characBitMap.transform.matrix = _loc2_; + } + + override public function doAction() : void + { + super.doAction(); + if(currFrame >= endFrame) + { + if(actType == FIGHT) + { + this.stand(); + } + currFrame = beginFrame; + } + } + + override public function stand() : void + { + super.stand(); + if(this._curNum > 0) + { + if(direction == Direction.LEFT) + { + beginFrame = 0 + 1 * 25; + endFrame = 0 + 1 * 25; + } + else + { + beginFrame = 0 + direction * 25; + endFrame = 0 + direction * 25; + } + currFrame = beginFrame; + } + } + + override public function walk() : void + { + super.walk(); + if(direction == Direction.LEFT) + { + beginFrame = 1 + 1 * 25; + endFrame = 7 + 1 * 25; + } + else + { + beginFrame = 1 + direction * 25; + endFrame = 7 + direction * 25; + } + currFrame = beginFrame; + } + + override public function fight() : void + { + super.fight(); + if(direction == Direction.LEFT) + { + beginFrame = 7 + 1 * 25; + endFrame = 16 + 1 * 25; + } + else + { + beginFrame = 7 + direction * 25; + endFrame = 16 + direction * 25; + } + currFrame = beginFrame; + } + + public function move(param1:int = 0, param2:int = 0, param3:Number = 0.5) : void + { + var _loc4_:Number = -490; + var _loc5_:Number = -160; + if(LandCube.hasWall && type == 2 && this.postion == 14) + { + this.postion = 14 - 2; + this.x -= 2 * this._cellWidth + 15; + this.y += 20; + } + this.postion = param1; + var _loc6_:Number = _loc4_ + param1 * this._cellWidth + this._cellWidth / 2; + var _loc7_:Number = this.y; + if(param2 > 0) + { + _loc7_ = _loc5_ + param2 * LandCube.HEIGHT; + this.rowId = param2; + } + this.mPosX = _loc6_; + this.mPosY = this.rowId * LandCube.HEIGHT; + moveTo(_loc6_,_loc7_,param3); + this.removeXuanYun(); + } + + private function drawBloodBar() : void + { + if(!this.bloodBar) + { + return; + } + var _loc1_:* = this.curNum / this.initNum; + this.bloodBar.graphics.clear(); + this.bloodBar.graphics.lineStyle(1,0,0.8); + this.bloodBar.graphics.beginFill(3355443,1); + this.bloodBar.graphics.drawRect(0,0,30,3); + this.bloodBar.graphics.beginFill(39168,1); + this.bloodBar.graphics.drawRect(0,0,30 * _loc1_,3); + this.bloodBar.graphics.endFill(); + } + + private function clearBloodBar() : void + { + if(this.contains(this.bloodBar)) + { + this.removeChild(this.bloodBar); + } + } + + public function update() : void + { + this.drawBloodBar(); + this._head.setBlood(this._curNum); + if(this._curNum <= 0) + { + this.die(); + } + } + + override public function die() : void + { + this.clearBloodBar(); + if(direction == Direction.LEFT) + { + beginFrame = 16 + 1 * 25; + endFrame = 25 + 1 * 25; + } + else + { + beginFrame = 16 + direction * 25; + endFrame = 25 + direction * 25; + } + currFrame = beginFrame; + super.die(); + this.clearEff(); + } + + public function playSkillEff(param1:int) : void + { + var _loc2_:SkillEffMc = new SkillEffMc(); + _loc2_.playMc(param1); + if(this.effList == null) + { + this.effList = new Vector.(); + } + this.effList.push(_loc2_); + addChild(_loc2_); + } + + public function attack(param1:int, param2:int, param3:Armyer, param4:String = "", param5:int = 0, param6:Number = 0.18, param7:Boolean = false, param8:int = 0, param9:int = 0) : void + { + var par:String = null; + var a:int = 0; + var swf:Sprite = null; + var ang:* = undefined; + var atkSkillType:int = param1; + var defSkillType:int = param2; + var defArmyer:Armyer = param3; + var atkType:String = param4; + var param:int = param5; + var time:Number = param6; + var isSkill:Boolean = param7; + var atkTianfuType:int = param8; + var defTianfuType:int = param9; + if(atkSkillType > 0) + { + this.playSkillEff(atkSkillType); + } + if(defSkillType > 0) + { + defArmyer.playSkillEff(defSkillType); + } + a = -5; + if(!isView) + { + return; + } + if(!defArmyer.isWall) + { + directionTo(defArmyer.x,defArmyer.y); + } + this.fight(); + if(atkTianfuType > 0) + { + showTianfu("tianfu_" + atkTianfuType); + } + if(defTianfuType > 0) + { + defArmyer.showTianfu("tianfu_" + defTianfuType); + if(defTianfuType == 3) + { + defArmyer.subBlood(defArmyer.initNum); + } + } + time += Math.abs(this.postion - defArmyer.postion) * SPEND_TIME; + if(defArmyer.armyType == ArmyType.DF_WALL) + { + } + if(atkType == AttackType.KILL_DODGE || atkType == AttackType.KILL_GUARD) + { + par = "shanbi"; + if(atkType == AttackType.KILL_GUARD) + { + par = "gedang"; + } + if(this.type == 1) + { + a = 5; + } + setTimeout(function():* + { + if(isView) + { + defArmyer.x -= a; + setTimeout(function():* + { + if(isView) + { + defArmyer.x += a; + defArmyer.subBlood(par); + } + },400); + } + },200); + } + else + { + if(this.armyType == ArmyType.AT_GONGBING) + { + swf = this.getAtkSwf(this.armyType,3,isSkill); + swf.x = this.x; + swf.y = this.y - 20; + parent.addChild(swf); + ang = ExtMath.getAngle(this.x,this.y - 20,defArmyer.x,defArmyer.y - 20); + swf.rotation = ang; + TweenLite.to(swf,time,{ + "x":defArmyer.x, + "y":defArmyer.y - 20 + }); + TweenLite.delayedCall(time,function():* + { + if(Boolean(parent) && parent.contains(swf)) + { + parent.removeChild(swf); + } + }); + } + defArmyer.curNum -= param; + setTimeout(function():* + { + if(isView) + { + hited(defArmyer,isSkill); + defArmyer.update(); + setTimeout(function():* + { + if(isView) + { + defArmyer.subBlood(param,atkType); + } + },100); + } + },500); + } + } + + protected function getAtkSwf(param1:String, param2:int, param3:Boolean) : Sprite + { + var _loc4_:Sprite = new Sprite(); + var _loc5_:String = ""; + if(param2 == 3) + { + _loc5_ = "gongbing_3.png"; + } + if(param1 == ArmyType.AT_QIXIE && param2 == 2) + { + _loc5_ = "gongji_toushi"; + if(this.direction == Direction.DOWN || this.direction == Direction.UP) + { + _loc5_ = "gongji_toushi_2"; + } + } + else if(param1 == ArmyType.AT_ZHANCHE) + { + _loc5_ = "gongji_daoguang"; + } + else if(param1 == ArmyType.AT_BUBING) + { + _loc5_ = "gongji_bubing"; + } + else if(param1 == ArmyType.AT_QIBING) + { + _loc5_ = "gongji_qibing"; + } + else if(param1 == ArmyType.AT_GONGBING) + { + _loc5_ = "gongji_qibing"; + } + else + { + _loc5_ = ArmyType.aliaName[param1] + "_" + param2; + } + var _loc6_:MovieClip = battleRes.getMovieClip(_loc5_); + _loc4_.addChild(_loc6_); + if(this.direction == Direction.LEFT) + { + _loc4_.scaleX = -1; + } + if(param1 == ArmyType.AT_ZHANCHE) + { + _loc4_.scaleX = 1; + if(this.direction == Direction.DOWN) + { + _loc4_.rotation = 90; + } + if(this.direction == Direction.UP) + { + _loc4_.rotation = -90; + } + if(this.direction == Direction.LEFT) + { + _loc4_.scaleX = -1; + } + } + if(param1 == ArmyType.AT_GONGBING && param2 == 3) + { + _loc4_.scaleX = 1; + } + return _loc4_; + } + + public function hited(param1:Armyer, param2:Boolean = false) : void + { + var mc:Sprite = null; + var enemy:Armyer = param1; + var isSkill:Boolean = param2; + if(!isView) + { + return; + } + mc = this.getAtkSwf(this.armyType,2,isSkill); + enemy.parent.addChild(mc); + mc.x = enemy.x; + mc.y = enemy.y - 20; + if(enemy.isWall) + { + mc.x = enemy.x + enemy.width / 2; + mc.y = -10; + } + setTimeout(function():* + { + var _loc1_:MovieClip = undefined; + if(Boolean(enemy.parent) && enemy.parent.contains(mc)) + { + enemy.parent.removeChild(mc); + } + _loc1_ = mc.getChildAt(0) as MovieClip; + _loc1_.stop(); + _loc1_.addFrameScript(_loc1_.totalFrames,null); + mc = null; + },1500); + } + + public function gunKillBlood(param1:int) : void + { + var _loc2_:int = -param1; + if(int(_loc2_) == 0) + { + return; + } + this.dropBlood(_loc2_); + this.curNum -= param1; + this.update(); + } + + public function subBlood(param1:*, param2:String = "") : void + { + var _loc3_:Sprite = null; + var _loc4_:String = null; + var _loc5_:* = undefined; + var _loc6_:Bitmap = null; + var _loc10_:* = undefined; + var _loc7_:* = param1; + var _loc8_:* = param2; + if(!isView) + { + return; + } + if(this.type == 1) + { + _loc4_ = "hong"; + } + if(this.type == 2) + { + _loc4_ = "lan"; + } + var _loc9_:Sprite = new Sprite(); + if(_loc7_ == "shanbi" || _loc7_ == "gedang") + { + this.fightText(_loc4_ + "_" + _loc7_); + return; + } + if(_loc7_ is Number) + { + _loc7_ = -_loc7_; + if(int(_loc7_) == 0) + { + return; + } + this.dropBlood(_loc7_); + return; + } + if(_loc8_ == AttackType.KILL_CRITICAL) + { + } + } + + override public function fightText(param1:String) : void + { + var _loc2_:FightTextMc = new FightTextMc(); + addChild(_loc2_); + _loc2_.viewText(param1); + _loc2_.x = -10; + _loc2_.y = -60; + } + + override public function dropBlood(param1:int) : void + { + var _loc2_:FightTextMc = new FightTextMc(); + addChild(_loc2_); + _loc2_.x = -10; + _loc2_.y = -60; + _loc2_.viewBlood(-param1); + } + + public function roundLight(param1:String) : void + { + var _loc2_:Sprite = this.getSkillSwf("guanghuan.swf"); + addChildAt(_loc2_,0); + _loc2_.x = -_loc2_.width / 2; + _loc2_.y = -_loc2_.height / 2; + } + + protected function getSkillSwf(param1:String) : Sprite + { + var _loc2_:Sprite = new Sprite(); + var _loc3_:Loader = new Loader(); + _loc3_.load(new URLRequest(ServerConfig.IMAGE_BATTLE_URL + param1)); + _loc3_.addEventListener(Event.REMOVED,this.skillRemoved,false,0,true); + _loc2_.addChild(_loc3_); + return _loc2_; + } + + private function skillRemoved(param1:Event) : * + { + var _loc2_:Loader = param1.currentTarget as Loader; + _loc2_.removeEventListener(Event.REMOVED,this.skillRemoved); + _loc2_.unloadAndStop(); + _loc2_ = null; + } + + public function jitui() : void + { + var len:int = 0; + len = 10; + if(direction == Direction.RIGHT) + { + len = -10; + } + x += len; + setTimeout(function():* + { + if(isPlay) + { + x -= len; + } + },1000); + } + + public function xuanyun() : void + { + if(this.xuanyunMc == null) + { + this.xuanyunMc = new XuanyunMc(); + addChild(this.xuanyunMc); + } + this.xuanyunMc.load(); + } + + public function removeXuanYun() : void + { + if(Boolean(this.xuanyunMc) && contains(this.xuanyunMc)) + { + removeChild(this.xuanyunMc); + this.xuanyunMc.clear(); + } + } + + public function loadSkillEff() : void + { + var _loc1_:int = 0; + var _loc2_:MovieClip = null; + if(this.initSkill != null && this.initSkill.length > 0) + { + for each(_loc1_ in this.initSkill) + { + _loc2_ = battleRes.getMovieClip(SkillEffect.getEffBySkillType(_loc1_,this.armyType)); + this.addSkillEff(_loc1_,_loc2_); + } + } + } + + private function addSkillEff(param1:int, param2:MovieClip) : void + { + if(param1 == 2 || param1 == 17 || param1 == 3 || param1 == 4 || param1 == 12 || param1 == 13 || param1 == 14 || param1 == 15) + { + param2.blendMode = BlendMode.ADD; + } + if(param1 == 17 || param1 == 12 || param1 == 13 || param1 == 14 || param1 == 15 || param1 == 16) + { + addChildAt(param2,0); + } + else + { + addChild(param2); + } + if(this.effList == null) + { + this.effList = new Vector.(); + } + this.effList.push(param2); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + this.clearEff(); + } + + private function clearEff() : void + { + var _loc1_:MovieClip = null; + if(this.effList == null || this.effList.length == 0) + { + return; + } + for each(_loc1_ in this.effList) + { + if(Boolean(_loc1_) && contains(_loc1_)) + { + removeChild(_loc1_); + _loc1_.stop(); + _loc1_ = null; + } + } + this.effList.splice(0,this.effList.length); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/AttackType.as b/flash_decompiled/com/view/ui/battleview/AttackType.as new file mode 100644 index 0000000..1667579 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/AttackType.as @@ -0,0 +1,46 @@ +package com.view.ui.battleview +{ + public class AttackType + { + + public static const CHANGE_TOWER_NUM:String = "CHANGE_TOWER_NUM"; + + public static const KILL_DOT:String = "KILL_DOT"; + + public static const MOVE:String = "MOVE"; + + public static const SKILL_SEND:String = "SKILL_SEND"; + + public static const ADD_BLOOD:String = "ADD_BLOOD"; + + public static const RESULT:String = "RESULT"; + + public static const KILL_CRITICAL:String = "KILL_CRITICAL"; + + public static const KILL_GUARD:String = "KILL_GUARD"; + + public static const KILL_DODGE:String = "KILL_DODGE"; + + public static const KILL_NORMAL:String = "KILL_NORMAL"; + + public static const KILL_TOWER:String = "KILL_TOWER"; + + public static const KILL_CAROM:String = "KILL_CAROM"; + + public static const KILL_COUNTER:String = "KILL_COUNTER"; + + public static const SKILL_BEGIN:String = "SKILL_BEGIN"; + + public static const CANNOT_FIGHT:String = "CANNOT_FIGHT"; + + public static const WIN_ATK:String = ""; + + public static const WIN_DFC:String = "DEFENCER"; + + public function AttackType() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/BattleBaseView.as b/flash_decompiled/com/view/ui/battleview/BattleBaseView.as new file mode 100644 index 0000000..b109f23 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/BattleBaseView.as @@ -0,0 +1,71 @@ +package com.view.ui.battleview +{ + import com.view.ui.BaseUI; + import com.view.ui.battle.BattleRes; + import flash.events.Event; + + public class BattleBaseView extends BaseUI + { + + public var battleRes:BattleRes = BattleRes.getInstance(); + + public var isPlay:Boolean; + + public function BattleBaseView() + { + super(); + } + + override public function addToStage(param1:Event) : void + { + this.isPlay = true; + } + + override public function removeFromStage(param1:Event) : void + { + this.isPlay = false; + } + + public function getWinResult(param1:int) : String + { + var _loc2_:* = ""; + switch(param1) + { + case 5: + _loc2_ = "完胜"; + break; + case 4: + _loc2_ = "大胜"; + break; + case 3: + _loc2_ = "胜利"; + break; + case 2: + _loc2_ = "小胜"; + break; + case 1: + _loc2_ = "险胜"; + break; + case -1: + _loc2_ = "败了"; + break; + case -2: + _loc2_ = "小败"; + break; + case -3: + _loc2_ = "失败"; + break; + case -4: + _loc2_ = "大败"; + break; + case -5: + _loc2_ = "完败"; + break; + default: + _loc2_ = param1; + } + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/BattleView.as b/flash_decompiled/com/view/ui/battleview/BattleView.as new file mode 100644 index 0000000..a042030 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/BattleView.as @@ -0,0 +1,1074 @@ +package com.view.ui.battleview +{ + import com.control.ConnectService; + import com.control.play.event.BabelEvent; + import com.data.data.battle.DimensionCombat; + import com.data.data.battle.DimensionCombatCode; + import com.data.data.battle.DimensionCombatTeam; + import com.data.data.battle.DimensionCombatTroop; + import com.data.data.hero.Skill; + import com.newdata.user.NewUserData; + import com.utils.GC; + import com.utils.HashMap; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.battleview.charactor.Charactor; + import com.view.ui.battleview.mc.BattleOver; + import com.view.ui.battleview.mc.BattleResult; + import com.view.ui.battleview.mc.GunMc; + import com.view.ui.battleview.mc.NumberMC; + import com.view.ui.battleview.mc.UserHead; + import com.view.ui.battleview.mc.UserInfo; + import com.view.ui.battleview.mc.ZhanqiMc; + import com.view.ui.heroboss.mc.HeroBlood; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.utils.clearInterval; + import flash.utils.setInterval; + import flash.utils.setTimeout; + + public class BattleView extends BattleBaseView + { + + public var battleMc:MovieClip; + + private var battleResult:BattleResult; + + private var atkHead2Vec:Vector.; + + private var dfcHead2Vec:Vector.; + + private var atkArmyVec:Vector.; + + private var dfcArmyVec:Vector.; + + private var cube_w:Number = LandCube.WIDTH; + + private var cube_h:Number = LandCube.HEIGHT; + + private var cube_num:int = 20; + + private var roundTime:Number = 0.3; + + private var _batId:int = 0; + + private var battleStep:int = 0; + + private var combatType:String; + + private var attackTroop:DimensionCombatTroop; + + private var defenceTroop:DimensionCombatTroop; + + private var winResult:String; + + private var roundNum:int; + + private var codes:Array; + + private var armys:Array; + + private var armyHash:HashMap; + + private var enemys:Array; + + private var numMC1:NumberMC; + + private var numMC2:NumberMC; + + private var battleOverMc:BattleOver; + + private var wall:Wall; + + private var wallHead:WallHead; + + private var atkUser:UserInfo; + + private var defUser:UserInfo; + + private var atkBlood:HeroBlood; + + private var defBlood:HeroBlood; + + private var atkHead:UserHead; + + private var defHead:UserHead; + + private var atkZhanqiMc:ZhanqiMc; + + private var defZhanqiMc:ZhanqiMc; + + private var bg1:UIWindowBg; + + private var battleBg:Sprite; + + private var offsetX:int = 499; + + private var offsetY:int = 289; + + private var combatId:String = ""; + + private var gunMc1:GunMc; + + private var gunMc2:GunMc; + + private var showAtkGun:Boolean; + + private var showDefGun:Boolean; + + public function BattleView() + { + super(); + this.initBattleMc(); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 361; + window_heihgt = UIWindowBg.normal_window_h + 172; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 361; + ui_closeBtn.y = 10; + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg1.addChild(param1); + param1.x = 2; + param1.y = 2; + param1.width = 997; + param1.height = 578; + } + + private function initBattleMc() : void + { + var _loc2_:int = 0; + var _loc3_:Head2 = null; + var _loc4_:Head2 = null; + var _loc5_:Armyer = null; + var _loc6_:Armyer = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_yezhan); + this.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + 361,400 + 172); + addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:String = "pic/bg/bg_battle_1.jpg"; + loadBg(_loc1_); + this.battleBg = new Sprite(); + addChild(this.battleBg); + this.battleBg.x = 11 + this.offsetX; + this.battleBg.y = 39 + this.offsetY; + this.atkUser = new UserInfo(1); + this.battleBg.addChild(this.atkUser); + this.atkUser.x = 70 - this.offsetX; + this.atkUser.y = 14 - this.offsetY; + this.defUser = new UserInfo(2); + this.battleBg.addChild(this.defUser); + this.defUser.x = 775 - this.offsetX; + this.defUser.y = 14 - this.offsetY; + this.atkBlood = new HeroBlood(1); + this.battleBg.addChild(this.atkBlood); + this.atkBlood.x = 60 - this.offsetX; + this.atkBlood.y = 6 - this.offsetY; + this.defBlood = new HeroBlood(2); + this.battleBg.addChild(this.defBlood); + this.defBlood.x = 636 - this.offsetX; + this.defBlood.y = 6 - this.offsetY; + this.atkHead = new UserHead(); + this.battleBg.addChild(this.atkHead); + this.atkHead.x = -this.offsetX; + this.atkHead.y = -this.offsetY; + this.defHead = new UserHead(); + this.battleBg.addChild(this.defHead); + this.defHead.x = 906 - this.offsetX; + this.defHead.y = -this.offsetY; + this.atkZhanqiMc = new ZhanqiMc(); + this.battleBg.addChild(this.atkZhanqiMc); + this.atkZhanqiMc.x = -this.offsetX + 5; + this.atkZhanqiMc.y = -this.offsetY + 95; + this.defZhanqiMc = new ZhanqiMc(); + this.battleBg.addChild(this.defZhanqiMc); + this.defZhanqiMc.x = 906 - this.offsetX - this.defZhanqiMc.width - 20 - 105; + this.defZhanqiMc.y = this.atkZhanqiMc.y; + this.battleResult = new BattleResult(); + this.atkHead2Vec = new Vector.(); + this.dfcHead2Vec = new Vector.(); + this.atkArmyVec = new Vector.(); + this.dfcArmyVec = new Vector.(); + _loc2_ = 0; + while(_loc2_ < 5) + { + _loc3_ = new Head2(); + this.battleBg.addChild(_loc3_); + _loc3_.type = 1; + _loc3_.x = 15 - this.offsetX; + _loc3_.y = 476 + _loc2_ * 21 - this.offsetY; + this.atkHead2Vec.push(_loc3_); + _loc4_ = new Head2(); + this.battleBg.addChild(_loc4_); + _loc4_.type = 2; + _loc4_.x = 870 - this.offsetX; + _loc4_.y = _loc3_.y; + this.dfcHead2Vec.push(_loc4_); + _loc5_ = new Armyer(); + _loc5_.head = _loc3_; + this.atkArmyVec.push(_loc5_); + _loc6_ = new Armyer(); + _loc6_.head = _loc4_; + this.dfcArmyVec.push(_loc6_); + _loc2_++; + } + this.numMC1 = new NumberMC(); + this.numMC2 = new NumberMC(); + this.battleBg.addChild(this.numMC1); + this.numMC1.x = -220; + this.numMC1.y = -260; + this.battleBg.addChild(this.numMC2); + this.numMC2.x = 140; + this.numMC2.y = -260; + this.battleOverMc = new BattleOver(); + this.battleOverMc.x = 0; + this.battleOverMc.y = 10; + } + + public function setCloseFunc(param1:Function) : void + { + if(this.battleResult) + { + this.battleResult.setCloseFun(param1); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(BabelEvent.BABEL_COMBAT_VIEW,this.getCombatDataResult); + this.getCombatById(); + this.init(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(BabelEvent.BABEL_COMBAT_VIEW,this.getCombatDataResult); + this.clear(); + } + + private function init() : void + { + this.armyHash = new HashMap(); + this.armys = new Array(); + this.enemys = new Array(); + } + + private function getCombatById() : void + { + if(this.combatId == "") + { + return; + } + ConnectService.getInstance().babelService.getDimensionCombatById(this.combatId); + } + + private function getCombat(param1:Object) : DimensionCombat + { + var _loc2_:DimensionCombat = new DimensionCombat(); + _loc2_.assistCastId = param1.assistCastId; + _loc2_.assistCastName = param1.assistCastName; + _loc2_.assistUserId = param1.assistUserId; + _loc2_.assistUserIron = param1.assistUserIron; + _loc2_.assistUserName = param1.assistUserName; + _loc2_.attackTroop = param1.attackTroop; + _loc2_.codes = param1.codes; + _loc2_.combatId = param1.combatId; + _loc2_.combatType = param1.combatType; + _loc2_.defenceTroop = param1.defenceTroop; + _loc2_.isAssistDef = param1.isAssistDef; + _loc2_.loserShowInfo = param1.loserShowInfo; + _loc2_.pvpLoseTroopId = param1.pvpLoseTroopId; + _loc2_.roundNum = param1.roundNum; + _loc2_.winnerShowInfo = param1.winnerShowInfo; + _loc2_.winResult = param1.winResult; + _loc2_.attackTroop.gunList = param1.atkGunMap; + _loc2_.defenceTroop.gunList = param1.defGunMap; + _loc2_.atkGunLv = param1.atkGunLv; + _loc2_.defGunLv = param1.defGunLv; + return _loc2_; + } + + private function getCombatDataResult(param1:BabelEvent) : void + { + var _loc3_:DimensionCombat = null; + var _loc4_:Object = null; + var _loc5_:Object = null; + var _loc2_:Object = param1.obj; + if(_loc2_ != null) + { + _loc3_ = this.getCombat(_loc2_); + this.battleResult.update(_loc3_); + _loc4_ = _loc2_.atkZhanqi; + _loc5_ = _loc2_.defZhanqi; + this.atkZhanqiMc.setObj(_loc4_); + this.defZhanqiMc.setObj(_loc5_); + this.initData(_loc3_); + } + } + + public function loadBattleData(param1:String) : void + { + this.combatId = param1; + } + + private function showBattleResult() : void + { + if(!isPlay) + { + return; + } + this.battleBg.addChild(this.battleResult); + this.battleResult.x = -int(this.battleResult.width / 2); + this.battleResult.y = -int(this.battleResult.height / 2) + 30; + } + + private function initData(param1:DimensionCombat) : void + { + var towerArr:Array; + var combat:DimensionCombat = param1; + this.combatType = combat.combatType; + if(this.combatType == "PVP_SIEGE") + { + super.loadTitle(UITitleConfig.title_gongchengzhan); + } + else + { + super.loadTitle(UITitleConfig.title_yezhan); + } + this.attackTroop = combat.attackTroop; + this.defenceTroop = combat.defenceTroop; + this.winResult = combat.winResult; + this.combatId = combat.combatId; + this.roundNum = combat.roundNum; + this.codes = combat.codes; + this.initArmy(); + this.initEnemy(); + towerArr = this.defenceTroop.towerTeams as Array; + if(towerArr != null) + { + this.initTower(towerArr); + } + this.showAtkGun = false; + this.showDefGun = false; + if(Boolean(this.attackTroop) && Boolean(this.attackTroop.gunList)) + { + this.showAtkGun = true; + if(this.gunMc1 == null) + { + this.gunMc1 = new GunMc(); + } + this.battleBg.addChild(this.gunMc1); + this.gunMc1.setGunType(1); + this.gunMc1.setGunLv(combat.atkGunLv); + this.gunMc1.x = -300; + this.gunMc1.y = 0; + } + if(Boolean(this.defenceTroop) && Boolean(this.defenceTroop.gunList)) + { + this.showDefGun = true; + if(this.gunMc2 == null) + { + this.gunMc2 = new GunMc(); + } + this.battleBg.addChild(this.gunMc2); + this.gunMc2.setGunType(2); + this.gunMc2.setGunLv(combat.defGunLv); + this.gunMc2.x = 280; + this.gunMc2.y = 0; + } + if(this.showAtkGun) + { + setTimeout(function():* + { + playAtkGunMc(); + },2000); + } + else if(this.showDefGun) + { + setTimeout(function():* + { + playDefGunMc(); + },2000); + } + else + { + this.start(); + } + } + + public function playAtkGunMc() : void + { + var list:Array = null; + var obj:Object = null; + var teamId:String = null; + var nums:int = 0; + var dfcArmyer:Armyer = null; + if(Boolean(this.gunMc1) && Boolean(this.showAtkGun) && Boolean(this.attackTroop)) + { + this.gunMc1.play(); + list = this.attackTroop.gunList; + for each(obj in list) + { + teamId = obj.id; + nums = int(obj.nums); + dfcArmyer = this.armyHash.get(teamId) as Armyer; + dfcArmyer.gunKillBlood(nums); + } + this.checkArmyNum(); + } + setTimeout(function():* + { + playDefGunMc(); + },2000); + } + + private function playDefGunMc() : void + { + var list:Array = null; + var obj:Object = null; + var teamId:String = null; + var nums:int = 0; + var atkArmyer:Armyer = null; + if(this.showDefGun == false) + { + this.start(); + return; + } + if(Boolean(this.gunMc2) && Boolean(this.showDefGun) && Boolean(this.defenceTroop)) + { + this.gunMc2.play(); + list = this.defenceTroop.gunList; + for each(obj in list) + { + teamId = obj.id; + nums = int(obj.nums); + atkArmyer = this.armyHash.get(teamId) as Armyer; + atkArmyer.gunKillBlood(nums); + } + this.checkArmyNum(); + } + setTimeout(function():* + { + start(); + },2000); + } + + public function initArmy() : void + { + var _loc1_:DimensionCombatTeam = null; + var _loc6_:Armyer = null; + this.atkUser.setUserName(this.attackTroop.userName); + this.atkUser.setGuildName(this.attackTroop.guildName); + this.atkUser.setPower(this.attackTroop.powerNum); + this.atkHead.loadHead(this.attackTroop.userIcon); + var _loc2_:Number = -490; + var _loc3_:Number = -160; + var _loc4_:Array = this.attackTroop.teams as Array; + var _loc5_:int = 0; + while(_loc5_ < 5) + { + if(_loc4_[_loc5_]) + { + _loc1_ = _loc4_[_loc5_]; + _loc6_ = this.atkArmyVec[_loc5_]; + this.battleBg.addChild(_loc6_); + _loc6_.rowId = _loc1_.initPosY - 1; + _loc6_.setType(1); + _loc6_.teamId = _loc1_.teamId; + _loc6_.data = _loc1_; + _loc6_.setArmyType(_loc1_.army.armyType); + _loc6_.hero = _loc1_.hero; + _loc6_.name = "army_" + _loc5_; + _loc6_.initNum = _loc1_.initNum; + _loc6_.curNum = _loc1_.initNum; + _loc6_.heroName = _loc1_.hero.name; + _loc6_.x = _loc2_ + (_loc1_.initPosX - 1) * this.cube_w + this.cube_w / 2 + this.cube_num * LandCube.EDGE * (LandCube.CUBE_Y_NUM - _loc1_.posY - 1) / 2; + _loc6_.y = _loc3_ + _loc6_.rowId * this.cube_h; + _loc6_.actType = Charactor.STAND; + _loc6_.head.totalBlood = _loc1_.initNum; + _loc6_.head.armyType = _loc6_.armyType; + _loc6_.head.level = _loc1_.army.level; + _loc6_.initSkill = _loc1_.initSkill; + _loc6_.getImgData(); + this.armyHash.put(_loc6_.teamId,_loc6_); + this.armys.push(_loc6_); + } + _loc5_++; + } + } + + public function initEnemy() : void + { + var _loc1_:DimensionCombatTeam = null; + var _loc7_:String = null; + var _loc8_:Object = null; + var _loc9_:Armyer = null; + this.defUser.setUserName(this.defenceTroop.userName); + this.defUser.setGuildName(this.defenceTroop.guildName); + this.defUser.setPower(this.defenceTroop.powerNum); + if(this.defenceTroop.userIcon != "1" && this.defenceTroop.userIcon != null) + { + this.defHead.loadHead(this.defenceTroop.userIcon); + } + var _loc2_:Number = -490; + var _loc3_:Number = -160; + var _loc4_:Array = this.defenceTroop.teams as Array; + var _loc5_:int = 0; + while(_loc5_ < _loc4_.length) + { + if(_loc4_[_loc5_].teamId == "wall") + { + LandCube.hasWall = true; + break; + } + _loc5_ += 1; + } + if(LandCube.hasWall == true) + { + _loc7_ = "pic/bg/bg_battle_1.jpg"; + loadBg(_loc7_); + } + else + { + _loc7_ = "pic/bg/bg_battle_2.jpg"; + loadBg(_loc7_); + } + var _loc6_:int = 0; + while(_loc6_ < _loc4_.length) + { + _loc8_ = _loc4_[_loc6_]; + if(_loc8_.teamId == "wall") + { + this.wall = new Wall(); + this.battleBg.addChild(this.wall); + this.wall.x = -12; + this.wall.y = 0; + this.wall.teamId = _loc8_.teamId; + this.wall.curNum = _loc8_.initNum; + this.wall.heroName = _loc8_.teamName; + this.wall.initNum = _loc8_.initNum; + this.wall.type = 1; + this.wall.setArmyType(ArmyType.DF_WALL); + this.wallHead = new WallHead(); + this.wallHead.totalBlood = _loc8_.initNum; + this.battleBg.addChild(this.wallHead); + this.wall.head = this.wallHead; + this.wallHead.x = 20 - 130; + this.wallHead.y = 250; + this.wall.update(); + this.armyHash.put(this.wall.teamId,this.wall); + } + else + { + _loc1_ = _loc4_[_loc6_]; + _loc9_ = this.dfcArmyVec[_loc6_]; + this.battleBg.addChild(_loc9_); + _loc9_.rowId = _loc1_.initPosY - 1; + _loc9_.setType(2); + _loc9_.data = _loc1_; + _loc9_.teamId = _loc1_.teamId; + _loc9_.setArmyType(_loc1_.army.armyType); + _loc9_.heroName = ""; + if(_loc1_.hero) + { + _loc9_.heroName = _loc1_.hero.name; + } + _loc9_.actType = Charactor.STAND; + _loc9_.hero = _loc1_.hero; + _loc9_.name = "enemy_" + _loc6_; + _loc9_.initNum = _loc1_.initNum; + _loc9_.curNum = _loc1_.initNum; + _loc9_.x = _loc2_ + (_loc1_.initPosX - 1) * this.cube_w + this.cube_w / 2 - this.cube_num * LandCube.EDGE * (LandCube.CUBE_Y_NUM - _loc1_.posY - 1) / 2; + _loc9_.y = _loc3_ + _loc9_.rowId * this.cube_h; + _loc9_.head.totalBlood = _loc1_.initNum; + _loc9_.head.armyType = _loc9_.armyType; + _loc9_.head.level = _loc1_.army.level; + _loc9_.getImgData(); + this.armyHash.put(_loc9_.teamId,_loc9_); + this.enemys.push(_loc9_); + } + _loc6_++; + } + } + + private function initTower(param1:Array) : void + { + var _loc2_:* = undefined; + var _loc3_:Tower = null; + var _loc4_:* = 0; + while(_loc4_ < param1.length) + { + _loc2_ = param1[_loc4_]; + _loc3_ = new Tower(); + _loc3_.initNum = _loc2_.initNum; + _loc3_.curNum = _loc3_.initNum; + _loc3_.damageNum = _loc2_.damageNum; + _loc3_.setArmyType(_loc2_.army.armyType); + _loc3_.teamId = _loc2_.teamId; + _loc3_.head = this.wallHead; + this.armyHash.put(_loc3_.teamId,_loc3_); + this.wallHead.setTowerNum(_loc3_.armyType,_loc3_.initNum); + _loc4_ += 1; + } + } + + private function start() : void + { + this.battle(); + } + + private function battle() : void + { + var _loc3_:Skill = null; + var _loc1_:String = undefined; + var _loc2_:String = undefined; + var _loc4_:Number = NaN; + this.checkDepth(); + clearInterval(this._batId); + if(!isPlay) + { + return; + } + if(this.battleStep > this.codes.length - 1) + { + return; + } + var _loc5_:DimensionCombatCode = this.codes[this.battleStep]; + var _loc6_:String = _loc5_.codeType; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:int = _loc5_.atkSkillType; + var _loc10_:int = _loc5_.defSkillType; + var _loc11_:String = ""; + var _loc12_:int = _loc5_.atkTianfuType; + var _loc13_:int = _loc5_.defTianfuType; + if(_loc5_.paraNum1 > 0) + { + _loc7_ = _loc5_.paraNum1; + } + if(_loc5_.paraNum2 > 0) + { + _loc8_ = _loc5_.paraNum2; + } + if(_loc5_.paraStr != null) + { + _loc11_ = _loc5_.paraStr; + } + if(_loc5_.atkTeamId != null) + { + _loc1_ = _loc5_.atkTeamId; + } + if(_loc5_.dfcTeamId != null) + { + _loc2_ = _loc5_.dfcTeamId; + } + if(_loc5_.skill != null) + { + _loc3_ = _loc5_.skill; + } + var _loc14_:Number = this.roundTime; + if(_loc6_ == AttackType.MOVE) + { + } + if(_loc1_ != null) + { + _loc4_ = 0; + } + if(_loc6_.split("_")[0] == "KILL") + { + _loc4_ = 0.2; + if(this.armyHash.size() <= 2) + { + _loc4_ = 0.6; + } + } + else if(_loc6_ == AttackType.SKILL_SEND) + { + _loc4_ = 2; + } + _loc14_ += _loc4_; + switch(_loc6_) + { + case AttackType.MOVE: + this.batMove(_loc1_,_loc7_ - 1,_loc8_ - 1); + break; + case AttackType.KILL_NORMAL: + this.batAttack(_loc1_,_loc2_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_,_loc12_,_loc13_); + break; + case AttackType.KILL_COUNTER: + this.batAttack(_loc2_,_loc1_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_,_loc12_,_loc13_); + break; + case AttackType.KILL_CRITICAL: + this.batAttack(_loc1_,_loc2_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_,_loc12_,_loc13_); + break; + case AttackType.KILL_DODGE: + this.batAttack(_loc1_,_loc2_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_,_loc12_,_loc13_); + break; + case AttackType.KILL_GUARD: + this.batAttack(_loc1_,_loc2_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_,_loc12_,_loc13_); + break; + case AttackType.KILL_TOWER: + this.batTower(_loc1_,_loc2_,_loc7_,_loc11_); + break; + case AttackType.SKILL_SEND: + this.batSkill(_loc1_,_loc2_,_loc3_,_loc7_,_loc11_); + break; + case AttackType.CHANGE_TOWER_NUM: + this.batTowerNum(_loc1_,_loc11_,_loc7_); + break; + case AttackType.RESULT: + this.batResult(_loc7_); + break; + case AttackType.ADD_BLOOD: + this.batAddBlood(_loc1_,_loc7_); + } + ++this.battleStep; + this.checkArmyNum(); + if(_loc6_ != AttackType.RESULT) + { + this._batId = setInterval(this.battle,_loc14_ * 1000); + } + } + + private function checkDepth() : void + { + var _loc3_:* = undefined; + var _loc4_:* = undefined; + var _loc5_:* = undefined; + var _loc6_:Armyer = null; + var _loc1_:Array = new Array(); + var _loc2_:Array = new Array(); + for each(_loc3_ in this.armys) + { + _loc1_.push(this.battleBg.getChildIndex(_loc3_)); + _loc2_.push(_loc3_); + } + for each(_loc4_ in this.enemys) + { + _loc1_.push(this.battleBg.getChildIndex(_loc4_)); + _loc2_.push(_loc4_); + } + _loc1_.sort(Array.NUMERIC); + _loc2_.sortOn("y",Array.NUMERIC); + for(_loc5_ in _loc2_) + { + _loc6_ = _loc2_[_loc5_] as Armyer; + if(_loc6_.curNum <= 0) + { + this.battleBg.setChildIndex(_loc6_,_loc1_[0]); + } + else + { + this.battleBg.setChildIndex(_loc6_,_loc1_[_loc5_]); + } + } + } + + public function checkArmyNum() : void + { + var _loc1_:Armyer = null; + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + while(_loc6_ < this.armys.length) + { + _loc1_ = this.armys[_loc6_]; + _loc2_ += _loc1_.initNum; + _loc3_ += _loc1_.curNum; + _loc6_ += 1; + } + _loc6_ = 0; + while(_loc6_ < this.enemys.length) + { + _loc1_ = this.enemys[_loc6_]; + _loc4_ += _loc1_.initNum; + _loc5_ += _loc1_.curNum; + _loc6_ += 1; + } + if(_loc3_ > 0) + { + this.numMC1.autoPlay = true; + } + else + { + this.numMC1.autoPlay = false; + } + this.numMC1.value = _loc3_; + if(_loc5_ > 0) + { + this.numMC2.autoPlay = true; + } + else + { + this.numMC2.autoPlay = false; + } + this.numMC2.value = _loc5_; + if(_loc3_ < 0) + { + _loc3_ = 0; + } + if(_loc5_ < 0) + { + _loc5_ = 0; + } + this.atkBlood.setMaxBlood(_loc2_); + this.atkBlood.setCurrBlood(_loc3_); + this.defBlood.setMaxBlood(_loc4_); + this.defBlood.setCurrBlood(_loc5_); + } + + private function batMove(param1:String, param2:int, param3:int) : void + { + var _loc4_:* = undefined; + if(!isPlay) + { + return; + } + var _loc5_:Armyer = this.armyHash.get(param1) as Armyer; + _loc5_.move(param2,param3); + _loc5_.update(); + } + + private function batAttack(param1:String, param2:String, param3:String, param4:int, param5:String, param6:int, param7:int, param8:int, param9:int) : void + { + if(!isPlay) + { + return; + } + var _loc10_:Armyer = this.armyHash.get(param1) as Armyer; + var _loc11_:Armyer = this.armyHash.get(param2) as Armyer; + var _loc12_:Boolean = false; + if(param5 == "skill") + { + _loc12_ = true; + } + _loc10_.attack(param6,param7,_loc11_,param3,param4,0.18,_loc12_,param8,param9); + } + + private function batTower(param1:String, param2:String, param3:int, param4:String) : void + { + if(!isPlay) + { + return; + } + var _loc5_:Armyer = this.armyHash.get(param1) as Armyer; + var _loc6_:Armyer = this.armyHash.get(param2) as Armyer; + _loc5_.attack2(_loc6_,int(param3),int(param4)); + this.wallHead.setTowerNum(_loc5_.armyType,_loc5_.curNum); + } + + private function batSkill(param1:String, param2:String, param3:Skill, param4:int, param5:String) : void + { + var _loc9_:int = 0; + var _loc10_:String = null; + var _loc6_:Armyer = null; + var _loc7_:String = null; + var _loc8_:Array = null; + var _loc11_:String = undefined; + var _loc12_:int = undefined; + var _loc13_:Armyer = null; + if(!isPlay) + { + return; + } + var _loc14_:Armyer = this.armyHash.get(param1); + if(param2 != undefined && param2 != "") + { + _loc6_ = this.armyHash.get(param2); + } + _loc14_.update(); + var _loc15_:int = int(param3.skillType); + switch(_loc15_) + { + case 1: + _loc7_ = "Wind"; + break; + case 2: + _loc7_ = "Wood"; + break; + case 3: + _loc7_ = "Fire"; + break; + case 4: + _loc7_ = "Hill"; + } + if(int(param3.isRoundSkill) == 0) + { + _loc14_.roundLight(_loc7_); + } + param3.direction = param4; + SkillManager.getInstance().playSkill(_loc14_,_loc6_,param3); + if(_loc7_ == "Wood") + { + _loc8_ = param5.split(";"); + _loc9_ = 0; + while(_loc9_ < _loc8_.length - 1) + { + _loc10_ = _loc8_[_loc9_]; + if(_loc10_ != "") + { + _loc11_ = _loc10_.split("|")[0]; + _loc12_ = int(_loc10_.split("|")[1]); + _loc13_ = this.armyHash.getValue(_loc11_) as Armyer; + _loc13_.curNum -= _loc12_; + _loc13_.update(); + _loc13_.subBlood(_loc12_); + } + _loc9_ += 1; + } + } + if(_loc6_) + { + if(_loc7_ == "Fire") + { + _loc6_.curNum -= _loc12_; + _loc6_.subBlood(_loc12_); + } + if(_loc7_ == "Wind") + { + } + if(_loc7_ == "Hill") + { + _loc6_.subBlood(_loc12_,""); + } + _loc6_.update(); + } + } + + private function batTowerNum(param1:String, param2:String, param3:int) : void + { + var _loc4_:Tower = null; + var _loc6_:* = undefined; + var _loc5_:* = this.armyHash.get(param1); + _loc4_ = this.armyHash.get(param1); + _loc4_.curNum += param3; + if(param3 < 0) + { + _loc6_ = "损失" + Math.abs(param3); + } + else + { + _loc6_ = "增加" + Math.abs(param3); + } + this.wall.subBlood(ArmyType.getTowerName(_loc4_.armyType) + " " + _loc6_); + this.wallHead.setTowerNum(_loc4_.armyType,_loc4_.curNum); + } + + private function batResult(param1:int) : void + { + if(!isPlay) + { + return; + } + this.battleBg.addChild(this.battleOverMc); + if(this.winResult == "ATTACKER") + { + if(this.attackTroop.userName == NewUserData.getUser().userName) + { + this.battleOverMc.win(); + } + else + { + this.battleOverMc.lost(); + } + } + else if(this.attackTroop.userName == NewUserData.getUser().userName) + { + this.battleOverMc.lost(); + } + else + { + this.battleOverMc.win(); + } + clearInterval(this._batId); + setTimeout(function():* + { + showBattleResult(); + },1200); + } + + private function batAddBlood(param1:String, param2:int) : void + { + } + + public function clear() : void + { + var _loc1_:* = undefined; + this.numMC1.value = 0; + this.numMC2.value = 0; + if(Boolean(this.battleOverMc) && this.battleBg.contains(this.battleOverMc)) + { + this.battleBg.removeChild(this.battleOverMc); + } + if(Boolean(this.battleResult) && this.battleBg.contains(this.battleResult)) + { + this.battleBg.removeChild(this.battleResult); + } + this.combatType = null; + this.attackTroop = null; + this.defenceTroop = null; + this.winResult = null; + this.combatId = null; + this.roundNum = 0; + this.codes = null; + this.roundNum = 0; + for each(_loc1_ in this.armys) + { + if(Boolean(_loc1_) && this.battleBg.contains(_loc1_)) + { + this.battleBg.removeChild(_loc1_); + } + } + for each(_loc1_ in this.enemys) + { + if(Boolean(_loc1_) && this.battleBg.contains(_loc1_)) + { + this.battleBg.removeChild(_loc1_); + } + } + this.battleStep = 0; + this.armyHash = null; + this.armys = null; + this.enemys = null; + if(Boolean(this.wall) && this.battleBg.contains(this.wall)) + { + this.battleBg.removeChild(this.wall); + this.wall = null; + } + if(Boolean(this.wallHead) && this.battleBg.contains(this.wallHead)) + { + this.battleBg.removeChild(this.wallHead); + this.wallHead = null; + } + GC.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/CopyBattleView.as b/flash_decompiled/com/view/ui/battleview/CopyBattleView.as new file mode 100644 index 0000000..fe37e59 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/CopyBattleView.as @@ -0,0 +1,851 @@ +package com.view.ui.battleview +{ + import com.data.data.hero.Skill; + import com.newdata.user.NewUserData; + import com.utils.GC; + import com.utils.HashMap; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.battleview.charactor.Charactor; + import com.view.ui.battleview.mc.BattleOver; + import com.view.ui.battleview.mc.CopyResult; + import com.view.ui.battleview.mc.GunMc; + import com.view.ui.battleview.mc.NumberMC; + import com.view.ui.battleview.mc.UserHead; + import com.view.ui.battleview.mc.UserInfo; + import com.view.ui.battleview.mc.ZhanqiMc; + import com.view.ui.heroboss.mc.HeroBlood; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.utils.clearInterval; + import flash.utils.setInterval; + import flash.utils.setTimeout; + + public class CopyBattleView extends BattleBaseView + { + + private var bg1:UIWindowBg; + + private var battleBg:Sprite; + + private var offsetX:int = 499; + + private var offsetY:int = 289; + + private var atkUser:UserInfo; + + private var defUser:UserInfo; + + private var atkBlood:HeroBlood; + + private var defBlood:HeroBlood; + + private var atkHead:UserHead; + + private var defHead:UserHead; + + private var armys:Array; + + private var armyHash:HashMap; + + private var enemys:Array; + + private var cube_w:Number = LandCube.WIDTH; + + private var cube_h:Number = LandCube.HEIGHT; + + private var cube_num:int = 20; + + private var atkZhanqiMc:ZhanqiMc; + + private var defZhanqiMc:ZhanqiMc; + + private var battleResult:CopyResult; + + private var atkHead2Vec:Vector.; + + private var dfcHead2Vec:Vector.; + + private var atkArmyVec:Vector.; + + private var dfcArmyVec:Vector.; + + private var numMC1:NumberMC; + + private var numMC2:NumberMC; + + private var battleOverMc:BattleOver; + + private var winResult:String; + + private var codes:Array; + + private var roundNum:int; + + private var attackTroop:Object; + + private var defenceTroop:Object; + + private var combatObj:Object; + + private var gunMc1:GunMc; + + private var gunMc2:GunMc; + + private var showAtkGun:Boolean; + + private var showDefGun:Boolean; + + private var _batId:int = 0; + + private var battleStep:int = 0; + + private var roundTime:Number = 0.3; + + public function CopyBattleView() + { + super(); + this.initBattleMc(); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 361; + window_heihgt = UIWindowBg.normal_window_h + 172; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 361; + ui_closeBtn.y = 10; + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg1.addChild(param1); + param1.x = 2; + param1.y = 2; + param1.width = 997; + param1.height = 578; + } + + private function initBattleMc() : void + { + var _loc3_:Head2 = null; + var _loc4_:Head2 = null; + var _loc5_:Armyer = null; + var _loc6_:Armyer = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_yezhan); + this.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + 361,400 + 172); + addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:String = "pic/bg/bg_battle_2.jpg"; + loadBg(_loc1_); + this.battleBg = new Sprite(); + addChild(this.battleBg); + this.battleBg.x = 11 + this.offsetX; + this.battleBg.y = 39 + this.offsetY; + this.atkUser = new UserInfo(1); + this.battleBg.addChild(this.atkUser); + this.atkUser.x = 70 - this.offsetX; + this.atkUser.y = 14 - this.offsetY; + this.defUser = new UserInfo(2); + this.battleBg.addChild(this.defUser); + this.defUser.x = 775 - this.offsetX; + this.defUser.y = 14 - this.offsetY; + this.atkBlood = new HeroBlood(1); + this.battleBg.addChild(this.atkBlood); + this.atkBlood.x = 60 - this.offsetX; + this.atkBlood.y = 6 - this.offsetY; + this.defBlood = new HeroBlood(2); + this.battleBg.addChild(this.defBlood); + this.defBlood.x = 636 - this.offsetX; + this.defBlood.y = 6 - this.offsetY; + this.atkHead = new UserHead(); + this.battleBg.addChild(this.atkHead); + this.atkHead.x = -this.offsetX; + this.atkHead.y = -this.offsetY; + this.defHead = new UserHead(); + this.battleBg.addChild(this.defHead); + this.defHead.x = 906 - this.offsetX; + this.defHead.y = -this.offsetY; + this.atkZhanqiMc = new ZhanqiMc(); + this.battleBg.addChild(this.atkZhanqiMc); + this.atkZhanqiMc.x = -this.offsetX + 5; + this.atkZhanqiMc.y = -this.offsetY + 95; + this.defZhanqiMc = new ZhanqiMc(); + this.battleBg.addChild(this.defZhanqiMc); + this.defZhanqiMc.x = 906 - this.offsetX; + this.defZhanqiMc.y = this.atkZhanqiMc.y; + this.battleResult = new CopyResult(); + this.atkHead2Vec = new Vector.(); + this.dfcHead2Vec = new Vector.(); + this.atkArmyVec = new Vector.(); + this.dfcArmyVec = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + _loc3_ = new Head2(); + this.battleBg.addChild(_loc3_); + _loc3_.type = 1; + _loc3_.x = 15 - this.offsetX; + _loc3_.y = 476 + _loc2_ * 21 - this.offsetY; + this.atkHead2Vec.push(_loc3_); + _loc4_ = new Head2(); + this.battleBg.addChild(_loc4_); + _loc4_.type = 2; + _loc4_.x = 870 - this.offsetX; + _loc4_.y = _loc3_.y; + this.dfcHead2Vec.push(_loc4_); + _loc5_ = new Armyer(); + _loc5_.head = _loc3_; + this.atkArmyVec.push(_loc5_); + _loc6_ = new Armyer(); + _loc6_.head = _loc4_; + this.dfcArmyVec.push(_loc6_); + _loc2_++; + } + this.numMC1 = new NumberMC(); + this.numMC2 = new NumberMC(); + this.battleBg.addChild(this.numMC1); + this.numMC1.x = -200; + this.numMC1.y = -260; + this.battleBg.addChild(this.numMC2); + this.numMC2.x = 200; + this.numMC2.y = -260; + this.battleOverMc = new BattleOver(); + this.battleOverMc.x = 0; + this.battleOverMc.y = 10; + } + + public function initData(param1:Object) : void + { + var atkZhanqi:Object; + var defZhanqi:Object; + var obj:Object = param1; + isPlay = true; + this.combatObj = obj; + this.battleResult.update(this.combatObj); + this.attackTroop = this.combatObj.atkInfo; + this.defenceTroop = this.combatObj.defInfo; + this.roundNum = this.combatObj.roundNum; + this.winResult = this.combatObj.winResult; + this.codes = this.combatObj.codes; + atkZhanqi = obj.atkZhanqi; + defZhanqi = obj.defZhanqi; + this.atkZhanqiMc.setObj(atkZhanqi); + this.defZhanqiMc.setObj(defZhanqi); + this.defZhanqiMc.x = 906 - this.offsetX + 90 - this.defZhanqiMc.width; + this.init(); + this.initArmy(); + this.initEnemy(); + this.showAtkGun = false; + this.showDefGun = false; + if(obj.atkGunMap) + { + this.showAtkGun = true; + if(this.gunMc1 == null) + { + this.gunMc1 = new GunMc(); + } + this.battleBg.addChild(this.gunMc1); + this.gunMc1.setGunType(1); + this.gunMc1.setGunLv(obj.atkGunLv); + this.gunMc1.x = -300; + this.gunMc1.y = 0; + } + if(obj.defGunMap) + { + this.showDefGun = true; + if(this.gunMc2 == null) + { + this.gunMc2 = new GunMc(); + } + this.battleBg.addChild(this.gunMc2); + this.gunMc2.setGunType(2); + this.gunMc2.setGunLv(obj.defGunLv); + this.gunMc2.x = 280; + this.gunMc2.y = 0; + } + if(this.showAtkGun) + { + setTimeout(function():* + { + playAtkGunMc(); + },2000); + } + else if(this.showDefGun) + { + setTimeout(function():* + { + playDefGunMc(); + },2000); + } + else + { + this.start(); + } + } + + public function playAtkGunMc() : void + { + var list:Array = null; + var obj:Object = null; + var teamId:String = null; + var nums:int = 0; + var dfcArmyer:Armyer = null; + if(Boolean(this.gunMc1) && Boolean(this.showAtkGun) && Boolean(this.attackTroop)) + { + this.gunMc1.play(); + list = this.combatObj.atkGunMap; + for each(obj in list) + { + teamId = obj.id; + nums = int(obj.nums); + dfcArmyer = this.armyHash.get(teamId) as Armyer; + dfcArmyer.gunKillBlood(nums); + } + this.checkArmyNum(); + } + setTimeout(function():* + { + playDefGunMc(); + },2000); + } + + private function playDefGunMc() : void + { + var list:Array = null; + var obj:Object = null; + var teamId:String = null; + var nums:int = 0; + var atkArmyer:Armyer = null; + if(this.showDefGun == false) + { + this.start(); + return; + } + if(Boolean(this.gunMc2) && Boolean(this.showDefGun) && Boolean(this.defenceTroop)) + { + this.gunMc2.play(); + list = this.combatObj.defGunMap; + for each(obj in list) + { + teamId = obj.id; + nums = int(obj.nums); + atkArmyer = this.armyHash.get(teamId) as Armyer; + atkArmyer.gunKillBlood(nums); + } + this.checkArmyNum(); + } + setTimeout(function():* + { + start(); + },2000); + } + + public function setCloseFunc(param1:Function) : void + { + if(this.battleResult) + { + this.battleResult.setCloseFun(param1); + } + } + + public function initArmy() : void + { + var _loc5_:Object = null; + var _loc6_:Armyer = null; + this.atkUser.setUserName(this.attackTroop.userName); + this.atkUser.setGuildName(this.attackTroop.guildName); + this.atkUser.setPower(this.attackTroop.powerNum); + this.atkHead.loadHead(this.attackTroop.userIcon); + var _loc1_:Number = -490; + var _loc2_:Number = -160; + var _loc3_:Array = this.attackTroop.teams as Array; + var _loc4_:int = 0; + while(_loc4_ < 5) + { + if(_loc3_[_loc4_]) + { + _loc5_ = _loc3_[_loc4_]; + _loc6_ = this.atkArmyVec[_loc4_]; + this.battleBg.addChild(_loc6_); + _loc6_.rowId = _loc5_.initPosY - 1; + _loc6_.setType(1); + _loc6_.teamId = _loc5_.teamId; + _loc6_.setArmyType(_loc5_.army.armyType); + _loc6_.hero = _loc5_.hero; + _loc6_.name = "army_" + _loc4_; + _loc6_.initNum = _loc5_.initNum; + _loc6_.curNum = _loc5_.initNum; + _loc6_.heroName = _loc5_.heroName; + _loc6_.x = _loc1_ + (_loc5_.initPosX - 1) * this.cube_w + this.cube_w / 2 + this.cube_num * LandCube.EDGE * (LandCube.CUBE_Y_NUM - _loc5_.posY - 1) / 2; + _loc6_.y = _loc2_ + _loc6_.rowId * this.cube_h; + _loc6_.actType = Charactor.STAND; + _loc6_.head.totalBlood = _loc5_.initNum; + _loc6_.head.armyType = _loc6_.armyType; + _loc6_.head.level = _loc5_.army.level; + _loc6_.initSkill = _loc5_.initSkill; + _loc6_.getImgData(); + this.armyHash.put(_loc6_.teamId,_loc6_); + this.armys.push(_loc6_); + } + _loc4_++; + } + } + + public function initEnemy() : void + { + var _loc5_:Object = null; + var _loc6_:Armyer = null; + this.defUser.setUserName(this.defenceTroop.userName); + this.defUser.setGuildName(this.defenceTroop.guildName); + this.defUser.setPower(this.defenceTroop.powerNum); + this.defHead.loadHead(this.defenceTroop.userIcon); + var _loc1_:Number = -490; + var _loc2_:Number = -160; + var _loc3_:Array = this.defenceTroop.teams as Array; + var _loc4_:int = 0; + while(_loc4_ < _loc3_.length) + { + _loc5_ = _loc3_[_loc4_]; + _loc6_ = this.dfcArmyVec[_loc4_]; + this.battleBg.addChild(_loc6_); + _loc6_.rowId = _loc5_.initPosY - 1; + _loc6_.setType(2); + _loc6_.teamId = _loc5_.teamId; + _loc6_.setArmyType(_loc5_.army.armyType); + _loc6_.heroName = ""; + _loc6_.heroName = _loc5_.heroName; + _loc6_.actType = Charactor.STAND; + _loc6_.hero = _loc5_.hero; + _loc6_.name = "enemy_" + _loc4_; + _loc6_.initNum = _loc5_.initNum; + _loc6_.curNum = _loc5_.initNum; + _loc6_.x = _loc1_ + (_loc5_.initPosX - 1) * this.cube_w + this.cube_w / 2 - this.cube_num * LandCube.EDGE * (LandCube.CUBE_Y_NUM - _loc5_.posY - 1) / 2; + _loc6_.y = _loc2_ + _loc6_.rowId * this.cube_h; + _loc6_.head.totalBlood = _loc5_.initNum; + _loc6_.head.armyType = _loc6_.armyType; + _loc6_.head.level = _loc5_.army.level; + _loc6_.getImgData(); + this.armyHash.put(_loc6_.teamId,_loc6_); + this.enemys.push(_loc6_); + _loc4_++; + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + isPlay = false; + this.clear(); + } + + public function clear() : void + { + var _loc1_:* = undefined; + this.numMC1.value = 0; + this.numMC2.value = 0; + if(Boolean(this.battleOverMc) && this.battleBg.contains(this.battleOverMc)) + { + this.battleBg.removeChild(this.battleOverMc); + } + if(Boolean(this.battleResult) && this.battleBg.contains(this.battleResult)) + { + this.battleBg.removeChild(this.battleResult); + } + for each(_loc1_ in this.armys) + { + if(Boolean(_loc1_) && this.battleBg.contains(_loc1_)) + { + this.battleBg.removeChild(_loc1_); + } + } + for each(_loc1_ in this.enemys) + { + if(Boolean(_loc1_) && this.battleBg.contains(_loc1_)) + { + this.battleBg.removeChild(_loc1_); + } + } + this.battleStep = 0; + this.armyHash = null; + this.armys = null; + this.enemys = null; + GC.clear(); + } + + private function init() : void + { + this.armyHash = new HashMap(); + this.armys = new Array(); + this.enemys = new Array(); + } + + private function start() : void + { + this.battle(); + } + + private function battle() : void + { + var _loc3_:Skill = null; + var _loc1_:String = undefined; + var _loc2_:String = undefined; + var _loc4_:Number = NaN; + this.checkDepth(); + clearInterval(this._batId); + if(!isPlay) + { + return; + } + if(this.battleStep > this.codes.length - 1) + { + return; + } + var _loc5_:Object = this.codes[this.battleStep]; + var _loc6_:String = _loc5_.codeType; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:int = int(_loc5_.atkSkillType); + var _loc10_:int = int(_loc5_.defSkillType); + var _loc11_:String = ""; + if(_loc5_.paraNum1 > 0) + { + _loc7_ = int(_loc5_.paraNum1); + } + if(_loc5_.paraNum2 > 0) + { + _loc8_ = int(_loc5_.paraNum2); + } + if(_loc5_.paraStr != null) + { + _loc11_ = _loc5_.paraStr; + } + if(_loc5_.atkTeamId != null) + { + _loc1_ = _loc5_.atkTeamId; + } + if(_loc5_.dfcTeamId != null) + { + _loc2_ = _loc5_.dfcTeamId; + } + if(_loc5_.skill != null) + { + _loc3_ = _loc5_.skill; + } + var _loc12_:Number = this.roundTime; + if(_loc6_ == AttackType.MOVE) + { + } + if(_loc1_ != null) + { + _loc4_ = 0; + } + if(_loc6_.split("_")[0] == "KILL") + { + _loc4_ = 0.2; + if(this.armyHash.size() <= 2) + { + _loc4_ = 0.6; + } + } + else if(_loc6_ == AttackType.SKILL_SEND) + { + _loc4_ = 2; + } + _loc12_ += _loc4_; + switch(_loc6_) + { + case AttackType.MOVE: + this.batMove(_loc1_,_loc7_ - 1,_loc8_ - 1); + break; + case AttackType.KILL_NORMAL: + this.batAttack(_loc1_,_loc2_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_); + break; + case AttackType.KILL_COUNTER: + this.batAttack(_loc2_,_loc1_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_); + break; + case AttackType.KILL_CRITICAL: + this.batAttack(_loc1_,_loc2_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_); + break; + case AttackType.KILL_DODGE: + this.batAttack(_loc1_,_loc2_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_); + break; + case AttackType.KILL_GUARD: + this.batAttack(_loc1_,_loc2_,_loc6_,_loc7_,_loc11_,_loc9_,_loc10_); + break; + case AttackType.SKILL_SEND: + this.batSkill(_loc1_,_loc2_,_loc3_,_loc7_,_loc11_); + break; + case AttackType.RESULT: + this.batResult(_loc7_); + break; + case AttackType.ADD_BLOOD: + this.batAddBlood(_loc1_,_loc7_); + } + ++this.battleStep; + this.checkArmyNum(); + if(_loc6_ != AttackType.RESULT) + { + this._batId = setInterval(this.battle,_loc12_ * 1000); + } + } + + private function checkDepth() : void + { + var _loc3_:* = undefined; + var _loc4_:* = undefined; + var _loc5_:* = undefined; + var _loc6_:Armyer = null; + var _loc1_:Array = new Array(); + var _loc2_:Array = new Array(); + for each(_loc3_ in this.armys) + { + _loc1_.push(this.battleBg.getChildIndex(_loc3_)); + _loc2_.push(_loc3_); + } + for each(_loc4_ in this.enemys) + { + _loc1_.push(this.battleBg.getChildIndex(_loc4_)); + _loc2_.push(_loc4_); + } + _loc1_.sort(Array.NUMERIC); + _loc2_.sortOn("y",Array.NUMERIC); + for(_loc5_ in _loc2_) + { + _loc6_ = _loc2_[_loc5_] as Armyer; + if(_loc6_.curNum <= 0) + { + this.battleBg.setChildIndex(_loc6_,_loc1_[0]); + } + else + { + this.battleBg.setChildIndex(_loc6_,_loc1_[_loc5_]); + } + } + } + + private function batMove(param1:String, param2:int, param3:int) : void + { + var _loc4_:* = undefined; + if(!isPlay) + { + return; + } + var _loc5_:Armyer = this.armyHash.get(param1) as Armyer; + _loc5_.move(param2,param3); + _loc5_.update(); + } + + private function batAttack(param1:String, param2:String, param3:String, param4:int, param5:String, param6:int, param7:int) : void + { + if(!isPlay) + { + return; + } + var _loc8_:Armyer = this.armyHash.get(param1) as Armyer; + var _loc9_:Armyer = this.armyHash.get(param2) as Armyer; + var _loc10_:Boolean = false; + if(param5 == "skill") + { + _loc10_ = true; + } + _loc8_.attack(param6,param7,_loc9_,param3,param4,0.18,_loc10_); + } + + private function batSkill(param1:String, param2:String, param3:Skill, param4:int, param5:String) : void + { + var _loc9_:int = 0; + var _loc10_:String = null; + var _loc6_:Armyer = null; + var _loc7_:String = null; + var _loc8_:Array = null; + var _loc11_:String = undefined; + var _loc12_:int = undefined; + var _loc13_:Armyer = null; + if(!isPlay) + { + return; + } + var _loc14_:Armyer = this.armyHash.get(param1); + if(param2 != undefined && param2 != "") + { + _loc6_ = this.armyHash.get(param2); + } + _loc14_.update(); + var _loc15_:int = int(param3.skillType); + switch(_loc15_) + { + case 1: + _loc7_ = "Wind"; + break; + case 2: + _loc7_ = "Wood"; + break; + case 3: + _loc7_ = "Fire"; + break; + case 4: + _loc7_ = "Hill"; + } + if(int(param3.isRoundSkill) == 0) + { + _loc14_.roundLight(_loc7_); + } + param3.direction = param4; + SkillManager.getInstance().playSkill(_loc14_,_loc6_,param3); + if(_loc7_ == "Wood") + { + _loc8_ = param5.split(";"); + _loc9_ = 0; + while(_loc9_ < _loc8_.length - 1) + { + _loc10_ = _loc8_[_loc9_]; + if(_loc10_ != "") + { + _loc11_ = _loc10_.split("|")[0]; + _loc12_ = int(_loc10_.split("|")[1]); + _loc13_ = this.armyHash.getValue(_loc11_) as Armyer; + _loc13_.curNum -= _loc12_; + _loc13_.update(); + _loc13_.subBlood(_loc12_); + } + _loc9_ += 1; + } + } + if(_loc6_) + { + if(_loc7_ == "Fire") + { + _loc6_.curNum -= _loc12_; + _loc6_.subBlood(_loc12_); + } + if(_loc7_ == "Wind") + { + } + if(_loc7_ == "Hill") + { + _loc6_.subBlood(_loc12_,""); + } + _loc6_.update(); + } + } + + private function batResult(param1:int) : void + { + if(!isPlay) + { + return; + } + this.battleBg.addChild(this.battleOverMc); + if(this.winResult == "ATTACKER") + { + if(this.attackTroop.userName == NewUserData.getUser().userName) + { + this.battleOverMc.win(); + } + else + { + this.battleOverMc.lost(); + } + } + else if(this.attackTroop.userName == NewUserData.getUser().userName) + { + this.battleOverMc.lost(); + } + else + { + this.battleOverMc.win(); + } + clearInterval(this._batId); + setTimeout(function():* + { + showBattleResult(); + },1200); + } + + private function batAddBlood(param1:String, param2:int) : void + { + } + + private function checkArmyNum() : void + { + var _loc1_:Armyer = null; + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + while(_loc6_ < this.armys.length) + { + _loc1_ = this.armys[_loc6_]; + _loc2_ += _loc1_.initNum; + _loc3_ += _loc1_.curNum; + _loc6_ += 1; + } + _loc6_ = 0; + while(_loc6_ < this.enemys.length) + { + _loc1_ = this.enemys[_loc6_]; + _loc4_ += _loc1_.initNum; + _loc5_ += _loc1_.curNum; + _loc6_ += 1; + } + if(_loc3_ > 0) + { + this.numMC1.autoPlay = true; + } + else + { + this.numMC1.autoPlay = false; + } + this.numMC1.value = _loc3_; + if(_loc5_ > 0) + { + this.numMC2.autoPlay = true; + } + else + { + this.numMC2.autoPlay = false; + } + this.numMC2.value = _loc5_; + this.atkBlood.setMaxBlood(_loc2_); + this.atkBlood.setCurrBlood(_loc3_); + this.defBlood.setMaxBlood(_loc4_); + this.defBlood.setCurrBlood(_loc5_); + } + + private function showBattleResult() : void + { + if(!isPlay) + { + return; + } + this.battleBg.addChild(this.battleResult); + this.battleResult.x = -int(this.battleResult.width / 2); + this.battleResult.y = -int(this.battleResult.height / 2) + 30; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/CopyBattleViewUI.as b/flash_decompiled/com/view/ui/battleview/CopyBattleViewUI.as new file mode 100644 index 0000000..976b93d --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/CopyBattleViewUI.as @@ -0,0 +1,97 @@ +package com.view.ui.battleview +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.view.ui.battle.BattleUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class CopyBattleViewUI extends BattleUI + { + + private static var instance:CopyBattleViewUI; + + private var bg:Sprite; + + private var battleView:CopyBattleView; + + private var currObj:Object; + + private var combatId:String; + + public function CopyBattleViewUI() + { + super(); + if(instance != null) + { + throw new Error("不能实例"); + } + } + + public static function getInstance() : CopyBattleViewUI + { + if(instance == null) + { + instance = new CopyBattleViewUI(); + } + return instance; + } + + override public function createUI() : void + { + this.bg = PublicMethod.createShape(16711680,CommonData.MAX_WIDTH,CommonData.MAX_HEIGHT); + this.bg.alpha = 0; + addChild(this.bg); + this.bg.x = -int(this.bg.width / 2); + this.bg.y = -int(this.bg.height / 2); + this.battleView = new CopyBattleView(); + addChild(this.battleView); + this.battleView.x = -int(this.battleView.width / 2); + this.battleView.y = -int(this.battleView.height / 2); + this.battleView.ui_closeBtn.onClick = this.closeUI; + this.battleView.setCloseFunc(this.closeUI); + if(this.currObj) + { + this.battleView.initData(this.currObj); + } + } + + override public function setPosition() : void + { + this.setBattlePosi(); + } + + private function setBattlePosi() : void + { + this.x = face.realWidth / 2; + this.y = face.realHeight / 2; + } + + override public function closeUI(param1:MouseEvent) : void + { + if(face.stage.contains(this)) + { + face.stage.removeChild(this); + } + } + + public function initData(param1:Object) : void + { + this.currObj = param1; + if(this.battleView) + { + this.battleView.initData(param1); + } + } + + public function showUI() : void + { + if(!face.stage.contains(this)) + { + face.stage.addChild(this); + this.setBattlePosi(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/FightView.as b/flash_decompiled/com/view/ui/battleview/FightView.as new file mode 100644 index 0000000..b6f814a --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/FightView.as @@ -0,0 +1,714 @@ +package com.view.ui.battleview +{ + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.control.battle.event.BattleViewEvent; + import com.control.data.ReturnBean; + import com.data.data.battleview.Fight; + import com.data.data.battleview.FightCode; + import com.data.data.battleview.FighterData; + import com.view.mc.sprite.LoadMc; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.battleview.charactor.Charactor; + import com.view.ui.battleview.charactor.Direction; + import com.view.ui.battleview.mc.BattleBeginMc; + import com.view.ui.battleview.mc.BattleOver; + import com.view.ui.battleview.mc.BattleTextBar; + import com.view.ui.heroboss.mc.HeadInfo; + import com.view.ui.heroboss.mc.HeroBlood; + import com.view.ui.heroboss.mc.NewHeroHead; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.utils.setTimeout; + + public class FightView extends BattleBaseView + { + + private var fightDfc:Fighter; + + private var fightAtk:Fighter; + + private var uiTextBar:BattleTextBar; + + private var beginMc:BattleBeginMc; + + private var battleOverMc:BattleOver; + + private var battleId:String; + + private var atkHead:NewHeroHead; + + private var defHead:NewHeroHead; + + private var atkBlood:HeroBlood; + + private var defBlood:HeroBlood; + + private var atkInfo:HeadInfo; + + private var defInfo:HeadInfo; + + public var end_mc:MovieClip; + + private var loadMc:LoadMc = LoadMc.getInstance(); + + private var fightData:Fight; + + private var bg1:UIWindowBg; + + private var battleBg:Sprite; + + private var roundStep:int; + + private var roundAtkFight:Fighter; + + private var roundDfcFight:Fighter; + + public function FightView() + { + super(); + this.fightDfc = new Fighter(); + this.fightAtk = new Fighter(); + this.fightAtk.setDirection(Direction.RIGHT); + this.fightAtk.type = 1; + this.fightAtk.initLight(); + this.fightDfc.setDirection(Direction.LEFT); + this.fightDfc.type = 2; + this.fightDfc.initLight(); + this.initBattleMc(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.end_mc.visible = false; + ConnectService.getInstance().addEventListener(BattleViewEvent.BATTLE_VIEW_BYFIGHTID,this.getFightDataResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(BattleViewEvent.BATTLE_VIEW_BYFIGHTID,this.getFightDataResult); + this.fightData = null; + this.roundStep = 0; + this.fightDfc.stopPlay(); + this.fightAtk.stopPlay(); + if(this.battleBg.contains(this.battleBg)) + { + this.battleBg.removeChild(this.fightDfc); + } + if(this.battleBg.contains(this.fightAtk)) + { + this.battleBg.removeChild(this.fightAtk); + } + this.atkInfo.setHeroLevel(0); + this.atkInfo.setHeroName(""); + this.defInfo.setHeroLevel(0); + this.defInfo.setHeroName(""); + this.atkHead.clear(); + this.defHead.clear(); + this.atkBlood.setCurrBlood(0); + this.defBlood.setCurrBlood(0); + this.end_mc.visible = false; + this.uiTextBar.clear(); + } + + public function loadBattleData(param1:String) : void + { + this.battleId = param1; + addChild(this.loadMc); + this.loadMc.addMc(); + this.loadMc.x = 450; + this.loadMc.y = 232; + ConnectService.getInstance().playService.getFightById(this.battleId); + } + + private function getFightDataResult(param1:BattleViewEvent) : void + { + if(contains(this.loadMc)) + { + removeChild(this.loadMc); + this.loadMc.stop(); + } + if(param1.result != ReturnBean.STATUS_0) + { + return; + } + if(this.battleId != param1.fight.fightId) + { + return; + } + this.fightData = param1.fight; + this.initAtk(this.fightData.atkFighter); + this.initDfc(this.fightData.dfcFighter); + this.setFighterData(); + this.startFight(); + } + + private function setFighterData() : void + { + this.atkBlood.setMaxBlood(this.fightData.atkFighter.initBloodNum); + this.fightAtk.currBlood = this.fightData.atkFighter.initBloodNum; + this.updataBlood(this.fightAtk,0); + this.defBlood.setMaxBlood(this.fightData.dfcFighter.initBloodNum); + this.fightDfc.currBlood = this.fightData.dfcFighter.initBloodNum; + this.updataBlood(this.fightDfc,0); + this.atkInfo.setHeroName(this.fightData.atkFighter.hero.showName); + this.atkInfo.setHeroLevel(this.fightData.atkFighter.hero.level); + this.defInfo.setHeroName(this.fightData.dfcFighter.hero.showName); + this.defInfo.setHeroLevel(this.fightData.dfcFighter.hero.level); + this.loadAtkHead(); + this.loadDfcHead(); + } + + private function updataBlood(param1:Fighter, param2:int) : void + { + param1.currBlood -= param2; + if(param1.currBlood < 0) + { + param1.currBlood = 0; + } + if(param1.type == 1) + { + this.atkBlood.setCurrBlood(param1.currBlood); + } + else + { + this.defBlood.setCurrBlood(param1.currBlood); + } + } + + public function loadAtkHead() : void + { + this.atkHead.loadHead(this.fightData.atkFighter.hero.picPath); + } + + public function loadDfcHead() : void + { + this.defHead.loadHead(this.fightData.dfcFighter.hero.picPath); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 264; + window_heihgt = UIWindowBg.normal_window_h + 95; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 264; + ui_closeBtn.y = 10; + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg1.addChild(param1); + param1.x = 2; + param1.y = 2; + } + + private function initBattleMc() : void + { + super.addUIBg(); + super.loadTitle(UITitleConfig.title_dantiao); + this.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + 264,400 + 95); + addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:String = "pic/bg/bg_dantiao.jpg"; + loadBg(_loc1_); + this.battleBg = new Sprite(); + addChild(this.battleBg); + this.battleBg.x = 11; + this.battleBg.y = 39; + this.atkInfo = new HeadInfo(1); + this.battleBg.addChild(this.atkInfo); + this.atkInfo.x = 65; + this.atkInfo.y = 14; + this.atkBlood = new HeroBlood(1); + this.battleBg.addChild(this.atkBlood); + this.atkBlood.x = 65; + this.atkBlood.y = 6; + this.atkHead = new NewHeroHead(); + this.battleBg.addChild(this.atkHead); + this.defInfo = new HeadInfo(2); + this.battleBg.addChild(this.defInfo); + this.defInfo.x = 675; + this.defInfo.y = this.atkInfo.y; + this.defBlood = new HeroBlood(2); + this.battleBg.addChild(this.defBlood); + this.defBlood.x = 535; + this.defBlood.y = 6; + this.defHead = new NewHeroHead(); + this.battleBg.addChild(this.defHead); + this.defHead.x = 807; + this.beginMc = new BattleBeginMc(); + this.battleBg.addChild(this.beginMc); + this.beginMc.x = 440; + this.beginMc.y = 170; + this.uiTextBar = new BattleTextBar(); + this.battleBg.addChild(this.uiTextBar); + this.uiTextBar.x = 675; + this.uiTextBar.y = 390; + this.battleOverMc = new BattleOver(); + this.battleBg.addChild(this.battleOverMc); + this.battleOverMc.x = 450; + this.battleOverMc.y = 140; + this.end_mc = battleRes.getMovieClip(ClassConfig.battle_endmc); + this.battleBg.addChild(this.end_mc); + this.end_mc.x = 540; + this.end_mc.y = 70; + this.end_mc.visible = false; + } + + private function fight() : void + { + var codes:FightCode; + var roundTime:uint; + if(!isPlay) + { + return; + } + if(this.roundStep >= this.fightData.codes.length) + { + return; + } + codes = new FightCode(this.fightData.codes[this.roundStep]); + if(codes.codeType == AttackType.RESULT) + { + this.battleOver(); + return; + } + if(codes.atkId == this.fightAtk.fighter.hero.heroId) + { + this.roundAtkFight = this.fightAtk; + this.roundDfcFight = this.fightDfc; + } + else + { + this.roundAtkFight = this.fightDfc; + this.roundDfcFight = this.fightAtk; + } + roundTime = 2000; + switch(codes.codeType) + { + case AttackType.SKILL_BEGIN: + this.showFightBeginSkill(this.roundAtkFight,this.roundDfcFight,codes); + break; + case AttackType.KILL_NORMAL: + if(codes.skillType > 0) + { + roundTime = 4000; + } + this.normalAttack(this.roundAtkFight,this.roundDfcFight,codes); + break; + case AttackType.CANNOT_FIGHT: + this.stopAttack(this.roundAtkFight,this.roundDfcFight,codes.codeType,codes.paraNum1); + break; + case AttackType.KILL_CRITICAL: + if(codes.skillType > 0) + { + roundTime = 4000; + } + this.normalAttack(this.roundAtkFight,this.roundDfcFight,codes); + break; + case AttackType.KILL_DODGE: + if(codes.skillType > 0) + { + roundTime = 4000; + } + this.shaobiAttack(this.roundAtkFight,this.roundDfcFight,codes); + break; + case AttackType.KILL_GUARD: + if(codes.skillType > 0) + { + roundTime = 4000; + } + this.shaobiAttack(this.roundAtkFight,this.roundDfcFight,codes); + break; + case AttackType.SKILL_SEND: + case AttackType.RESULT: + case AttackType.KILL_DOT: + } + ++this.roundStep; + setTimeout(function():void + { + fight(); + },roundTime); + } + + private function batSkill(param1:*, param2:*, param3:*) : * + { + } + + private function stopAttack(param1:Fighter, param2:Fighter, param3:String, param4:int) : void + { + var _loc5_:String = ""; + var _loc6_:String = ""; + if(param1.type == 1) + { + _loc5_ = "" + param1.fighter.hero.name + ""; + _loc6_ = "" + param2.fighter.hero.name + ""; + } + else + { + _loc5_ = "" + param1.fighter.hero.name + ""; + _loc6_ = "" + param2.fighter.hero.name + ""; + } + var _loc7_:String = _loc5_ + " 受虚弱术影响,本回合无法攻击"; + this.uiTextBar.print(_loc7_); + } + + private function normalAttack(param1:Fighter, param2:Fighter, param3:FightCode) : void + { + var attackType:String = null; + var blood:int = 0; + var bloodStr:String = null; + var atkName:String = null; + var dfcName:String = null; + var fightMsg:String = null; + var atkFight:Fighter = param1; + var dfcFight:Fighter = param2; + var codes:FightCode = param3; + attackType = codes.codeType; + blood = codes.paraNum1; + var skillType:int = codes.skillType; + bloodStr = "" + blood + ""; + atkName = ""; + dfcName = ""; + if(atkFight.type == 1) + { + atkName = "" + atkFight.fighter.hero.name + ""; + dfcName = "" + dfcFight.fighter.hero.name + ""; + } + else + { + atkName = "" + atkFight.fighter.hero.name + ""; + dfcName = "" + dfcFight.fighter.hero.name + ""; + } + fightMsg = ""; + if(skillType > 0) + { + switch(skillType) + { + case 11: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。技能效果:本次伤害增加 " + codes.damageValue + "。"; + atkFight.showFightSkill(ClassConfig.fightskill_11); + break; + case 12: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。技能效果:【" + dfcName + "】的生命减少了" + codes.damageValue + "。"; + atkFight.showFightSkill(ClassConfig.fightskill_12); + if(codes.damageValue > 0) + { + setTimeout(function():void + { + updataBlood(dfcFight,codes.damageValue); + dfcFight.dropBlood(codes.damageValue); + },500); + } + break; + case 13: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。技能效果:【" + dfcName + "】停止攻击1回合。"; + atkFight.showFightSkill(ClassConfig.fightskill_13); + break; + case 17: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。技能效果:本次伤害增加 " + codes.damageValue + "。"; + atkFight.showFightSkill(ClassConfig.fightskill_17); + break; + case 19: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。技能效果:恢复已方武将 " + codes.damageValue + " 生命。"; + atkFight.showFightSkill(ClassConfig.fightskill_19); + if(codes.damageValue > 0) + { + setTimeout(function():void + { + updataBlood(atkFight,-codes.damageValue); + atkFight.dropBlood(-codes.damageValue); + },500); + } + break; + case 20: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。技能效果:恢复已方武将 " + codes.damageValue + " 生命。"; + if(codes.damageValue > 0) + { + setTimeout(function():void + { + updataBlood(atkFight,-codes.damageValue); + atkFight.dropBlood(-codes.damageValue); + },500); + } + break; + case 21: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。技能效果:【" + dfcName + "】的生命减少了" + codes.damageValue + "。"; + atkFight.showFightSkill(ClassConfig.fightskill_21); + if(codes.damageValue > 0) + { + setTimeout(function():void + { + updataBlood(dfcFight,codes.damageValue); + dfcFight.dropBlood(codes.damageValue); + },500); + } + } + this.uiTextBar.print(fightMsg); + setTimeout(function():void + { + if(codes.codeType == AttackType.KILL_CRITICAL) + { + fightMsg = atkName + "暴击了" + dfcName + "造成了" + bloodStr + "伤害"; + } + else + { + fightMsg = atkName + "攻击了" + dfcName + "造成了" + bloodStr + "伤害"; + } + atkFight.attack(dfcFight,blood,attackType); + updataBlood(dfcFight,blood); + uiTextBar.print(fightMsg); + },1500); + } + else + { + if(codes.codeType == AttackType.KILL_CRITICAL) + { + fightMsg = atkName + "暴击了" + dfcName + "造成了" + bloodStr + "伤害"; + } + else + { + fightMsg = atkName + "攻击了" + dfcName + "造成了" + bloodStr + "伤害"; + } + atkFight.attack(dfcFight,blood,attackType); + this.updataBlood(dfcFight,blood); + this.uiTextBar.print(fightMsg); + } + } + + private function shaobiAttack(param1:Fighter, param2:Fighter, param3:FightCode) : void + { + var attackType:String = null; + var blood:int = 0; + var atkName:String = null; + var dfcName:String = null; + var fightMsg:String = null; + var atkFight:Fighter = param1; + var dfcFight:Fighter = param2; + var codes:FightCode = param3; + attackType = codes.codeType; + blood = codes.paraNum1; + var skillType:int = codes.skillType; + var bloodStr:String = "" + blood + ""; + atkName = ""; + dfcName = ""; + if(atkFight.type == 1) + { + atkName = "" + atkFight.fighter.hero.name + ""; + dfcName = "" + dfcFight.fighter.hero.name + ""; + } + else + { + atkName = "" + atkFight.fighter.hero.name + ""; + dfcName = "" + dfcFight.fighter.hero.name + ""; + } + fightMsg = ""; + if(skillType > 0) + { + switch(skillType) + { + case 11: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。"; + atkFight.showFightSkill(ClassConfig.fightskill_11); + break; + case 12: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。"; + atkFight.showFightSkill(ClassConfig.fightskill_12); + break; + case 13: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。"; + atkFight.showFightSkill(ClassConfig.fightskill_13); + break; + case 17: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。"; + atkFight.showFightSkill(ClassConfig.fightskill_17); + break; + case 19: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。技能效果:恢复已方武将 " + codes.damageValue + " 生命。"; + atkFight.showFightSkill(ClassConfig.fightskill_19); + this.uiTextBar.print(fightMsg); + fightMsg = ""; + if(codes.damageValue > 0) + { + setTimeout(function():void + { + updataBlood(atkFight,-codes.damageValue); + atkFight.dropBlood(-codes.damageValue); + },500); + } + break; + case 20: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。技能效果:恢复已方武将 " + codes.damageValue + " 生命。"; + atkFight.showFightSkill(ClassConfig.fightskill_20); + this.uiTextBar.print(fightMsg); + fightMsg = ""; + if(codes.damageValue > 0) + { + setTimeout(function():void + { + updataBlood(atkFight,-codes.damageValue); + atkFight.dropBlood(-codes.damageValue); + },500); + } + break; + case 21: + fightMsg = "【" + atkName + "】触发技能『" + codes.skillName + "』。"; + atkFight.showFightSkill(ClassConfig.fightskill_12); + } + setTimeout(function():void + { + if(attackType == AttackType.KILL_GUARD) + { + fightMsg = fightMsg + dfcName + "闪避了" + atkName + "的进攻"; + } + else + { + fightMsg = fightMsg + dfcName + "格挡了" + atkName + "的进攻"; + } + atkFight.attack(dfcFight,blood,attackType); + updataBlood(dfcFight,blood); + uiTextBar.print(fightMsg); + },1500); + } + else + { + if(attackType == AttackType.KILL_GUARD) + { + fightMsg = fightMsg + dfcName + "闪避了" + atkName + "的进攻"; + } + else + { + fightMsg = fightMsg + dfcName + "格挡了" + atkName + "的进攻"; + } + atkFight.attack(dfcFight,blood,attackType); + this.updataBlood(dfcFight,blood); + this.uiTextBar.print(fightMsg); + } + } + + public function initAtk(param1:FighterData) : void + { + this.fightAtk.sex = param1.hero.gen; + this.fightAtk.fighter = param1; + this.fightAtk.actType = Charactor.STAND; + this.fightAtk.getImgData(); + this.battleBg.addChildAt(this.fightAtk,this.battleBg.getChildIndex(this.atkInfo)); + this.fightAtk.x = 300; + this.fightAtk.y = 400; + } + + public function initDfc(param1:FighterData) : void + { + this.fightDfc.sex = param1.hero.gen; + this.fightDfc.fighter = param1; + this.fightDfc.actType = Charactor.STAND; + this.fightDfc.getImgData(); + this.battleBg.addChildAt(this.fightDfc,this.battleBg.getChildIndex(this.atkInfo)); + this.fightDfc.x = 600; + this.fightDfc.y = 400; + } + + private function battleOver() : void + { + if(this.fightData.winResult == AttackType.WIN_DFC) + { + this.battleOverMc.lost(); + } + else + { + this.battleOverMc.win(); + } + var _loc1_:String = "" + this.fightAtk.fighter.hero.name + "" + getWinResult(this.fightAtk.fighter.resultScore); + _loc1_ += ","; + _loc1_ = _loc1_ + "" + this.fightDfc.fighter.hero.name + "" + getWinResult(this.fightDfc.fighter.resultScore); + this.uiTextBar.print(_loc1_); + this.end_mc.visible = true; + } + + private function startFight() : void + { + this.fightAtk.speak(); + setTimeout(function():void + { + if(!isPlay) + { + return; + } + fightDfc.speak(); + setTimeout(function():void + { + if(!isPlay) + { + return; + } + beginMc.play(); + setTimeout(function():void + { + if(!isPlay) + { + return; + } + fight(); + },1000); + },2000); + },1500); + } + + private function showFightBeginSkill(param1:Fighter, param2:Fighter, param3:FightCode) : void + { + var _loc4_:String = ""; + var _loc5_:String = ""; + if(param1.type == 1) + { + _loc4_ = "" + param1.fighter.hero.name + ""; + _loc5_ = "" + param2.fighter.hero.name + ""; + } + else + { + _loc4_ = "" + param1.fighter.hero.name + ""; + _loc5_ = "" + param2.fighter.hero.name + ""; + } + var _loc6_:String = ""; + switch(param3.skillType) + { + case 14: + _loc6_ = "【" + _loc4_ + "】触发技能『" + param3.skillName + "』。技能效果:减少对方武将 " + param3.skillValue + "% 的敏捷。"; + param1.showFightSkill(ClassConfig.fightskill_14); + break; + case 15: + _loc6_ = "【" + _loc4_ + "】触发技能『" + param3.skillName + "』。技能效果:减少对方武将 " + param3.skillValue + "% 的防御。"; + param1.showFightSkill(ClassConfig.fightskill_15); + break; + case 16: + _loc6_ = "【" + _loc4_ + "】触发技能『" + param3.skillName + "』。技能效果:增加已方武将 " + param3.skillValue + "% 的敏捷。"; + param1.showFightSkill(ClassConfig.fightskill_16); + break; + case 18: + _loc6_ = "【" + _loc4_ + "】触发技能『" + param3.skillName + "』。技能效果:增加已方武将 " + param3.skillValue + "% 的防御。"; + param1.showFightSkill(ClassConfig.fightskill_18); + } + this.uiTextBar.print(_loc6_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/Fighter.as b/flash_decompiled/com/view/ui/battleview/Fighter.as new file mode 100644 index 0000000..6c3f2df --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/Fighter.as @@ -0,0 +1,611 @@ +package com.view.ui.battleview +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.data.data.battleview.FighterData; + import com.greensock.TweenLite; + import com.view.ui.battleview.charactor.Charactor; + import com.view.ui.battleview.charactor.Direction; + import com.view.ui.battleview.charactor.ImgData; + import com.view.ui.battleview.mc.LightMc; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.MovieClip; + import flash.geom.Matrix; + import flash.utils.setTimeout; + + public class Fighter extends Charactor + { + + public var sex:int; + + private var speakMc:MovieClip; + + public var fighter:FighterData; + + public var bossClass:String = "ChallengeBoss"; + + public var isBoss:Boolean; + + public function Fighter() + { + super(); + } + + override public function getImgData() : void + { + var _loc1_:BitmapData = null; + var _loc2_:String = null; + if(Boolean(imgDataVec) && imgDataVec.length > 0) + { + imgDataVec = new Vector.(); + } + if(this.sex == 0) + { + _loc2_ = ClassConfig.man1; + } + else + { + _loc2_ = ClassConfig.female1; + offset_y = -30; + } + if(this.isBoss) + { + _loc2_ = this.bossClass; + } + _loc1_ = battleRes.getPng(_loc2_); + bigBitMap = new Bitmap(_loc1_); + this.getMalePngData(); + super.loadBmpData(); + } + + private function getMalePngData() : void + { + var _loc2_:ImgData = null; + var _loc3_:int = 0; + var _loc1_:int = bigBitMap.width / 12; + _loc3_ = 0; + while(_loc3_ < 12) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * _loc3_,0); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 12; + while(_loc3_ < 24) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 12),170); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 24; + while(_loc3_ < 36) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 24),340); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 36; + while(_loc3_ < 48) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 36),510); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 48; + while(_loc3_ < 60) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 48),680); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 60; + while(_loc3_ < 72) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 60),850); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 72; + while(_loc3_ < 84) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 72),1020); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 84; + while(_loc3_ < 96) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 84),1190); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 96; + while(_loc3_ < 108) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 96),1360); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 108; + while(_loc3_ < 120) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 108),1530); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 120; + while(_loc3_ < 132) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 120),1700); + imgDataVec.push(_loc2_); + _loc3_++; + } + } + + private function getFemalePngData() : void + { + var _loc2_:ImgData = null; + var _loc3_:int = 0; + var _loc1_:int = bigBitMap.width / 12; + _loc3_ = 0; + while(_loc3_ < 12) + { + _loc2_ = new ImgData(_loc1_,150,_loc1_ * _loc3_,0); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 12; + while(_loc3_ < 24) + { + _loc2_ = new ImgData(_loc1_,150,_loc1_ * (_loc3_ - 12),148); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 24; + while(_loc3_ < 36) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 24),318); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 36; + while(_loc3_ < 48) + { + _loc2_ = new ImgData(_loc1_,240,_loc1_ * (_loc3_ - 36),480); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 48; + while(_loc3_ < 60) + { + _loc2_ = new ImgData(_loc1_,150,_loc1_ * (_loc3_ - 48),710); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 60; + while(_loc3_ < 72) + { + _loc2_ = new ImgData(_loc1_,156,_loc1_ * (_loc3_ - 60),856); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 72; + while(_loc3_ < 84) + { + _loc2_ = new ImgData(_loc1_,210,_loc1_ * (_loc3_ - 72),1010); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 84; + while(_loc3_ < 96) + { + _loc2_ = new ImgData(_loc1_,170,_loc1_ * (_loc3_ - 84),1220); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 96; + while(_loc3_ < 108) + { + _loc2_ = new ImgData(_loc1_,190,_loc1_ * (_loc3_ - 96),1410); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 108; + while(_loc3_ < 120) + { + _loc2_ = new ImgData(_loc1_,156,_loc1_ * (_loc3_ - 108),1600); + imgDataVec.push(_loc2_); + _loc3_++; + } + _loc3_ = 120; + while(_loc3_ < 132) + { + _loc2_ = new ImgData(_loc1_,150,_loc1_ * (_loc3_ - 120),1747); + imgDataVec.push(_loc2_); + _loc3_++; + } + } + + override public function loadOver() : void + { + if(characBitMap == null) + { + characBitMap = new Bitmap(); + } + if(!contains(characBitMap)) + { + addChild(characBitMap); + } + this.setDirect(); + this.stand(); + super.loadOver(); + } + + private function setDirect() : void + { + var _loc1_:Matrix = characBitMap.transform.matrix; + if(this.sex == 0) + { + if(direction == Direction.RIGHT) + { + init_x = -180; + init_y = -150; + _loc1_.a = 1; + } + if(direction == Direction.LEFT) + { + init_x = 180; + init_y = -150; + _loc1_.a = -1; + } + } + else + { + if(direction == Direction.RIGHT) + { + init_x = -150; + init_y = -130; + _loc1_.a = 1; + } + if(direction == Direction.LEFT) + { + init_x = 150; + init_y = -130; + _loc1_.a = -1; + } + } + characBitMap.transform.matrix = _loc1_; + } + + public function initLight() : void + { + light = new LightMc(); + addChild(light); + var _loc1_:Matrix = light.transform.matrix; + if(type == 2) + { + _loc1_.a = -1; + } + light.transform.matrix = _loc1_; + } + + override public function doAction() : void + { + super.doAction(); + if(Boolean(lightFunc)) + { + lightFunc(); + } + if(currFrame >= endFrame) + { + this.stand(); + } + } + + override public function stand() : void + { + super.stand(); + beginFrame = 0; + endFrame = 12; + currFrame = beginFrame; + lightFunc = null; + } + + override public function beFight() : void + { + beginFrame = 12; + endFrame = 24; + currFrame = beginFrame; + lightFunc = null; + } + + override public function die() : void + { + super.die(); + beginFrame = 24; + endFrame = 36; + currFrame = beginFrame; + lightFunc = null; + } + + override public function fight() : void + { + var _loc1_:int = 2; + switch(_loc1_) + { + case 0: + this.fight1(); + break; + case 1: + this.fight2(); + break; + case 2: + this.fight3(); + } + } + + override public function geDang() : void + { + switch(PublicMethod.Random(3)) + { + case 0: + this.gedang1(); + break; + case 1: + this.gedang2(); + break; + case 2: + this.gedang3(); + } + setTimeout(function():void + { + if(!isView) + { + return; + } + if(type == 1) + { + fightText(ClassConfig.hong_gedang); + } + else + { + fightText(ClassConfig.lan_gedang); + } + },100); + } + + override public function duobi() : void + { + switch(PublicMethod.Random(2)) + { + case 0: + this.duobi1(); + break; + case 1: + this.duobi2(); + } + setTimeout(function():void + { + if(!isView) + { + return; + } + if(type == 1) + { + fightText(ClassConfig.hong_shanbi); + } + else + { + fightText(ClassConfig.lan_shanbi); + } + },100); + } + + private function fight1() : void + { + beginFrame = 36; + endFrame = 48; + currFrame = beginFrame; + setTimeout(function():void + { + if(!isView) + { + return; + } + if(sex == 0) + { + light.play(ClassConfig.man_gongji_1); + } + else + { + light.play(ClassConfig.female_gongji_1); + } + },100); + } + + private function fight2() : void + { + beginFrame = 48; + endFrame = 60; + currFrame = beginFrame; + setTimeout(function():void + { + if(!isView) + { + return; + } + if(sex == 0) + { + light.play(ClassConfig.man_gongji_2); + } + else + { + light.play(ClassConfig.female_gongji_2); + } + },100); + } + + private function fight3() : void + { + beginFrame = 60; + endFrame = 72; + currFrame = beginFrame; + setTimeout(function():void + { + if(!isView) + { + return; + } + if(sex == 0) + { + light.play(ClassConfig.man_gongji_3); + } + else + { + light.play(ClassConfig.female_gongji_3); + } + },100); + } + + public function gedang1() : void + { + beginFrame = 72; + endFrame = 84; + currFrame = beginFrame; + } + + public function gedang2() : void + { + beginFrame = 84; + endFrame = 96; + currFrame = beginFrame; + } + + public function gedang3() : void + { + beginFrame = 96; + endFrame = 108; + currFrame = beginFrame; + } + + public function duobi1() : void + { + beginFrame = 108; + endFrame = 120; + currFrame = beginFrame; + } + + public function duobi2() : void + { + beginFrame = 120; + endFrame = 132; + currFrame = beginFrame; + } + + public function speak() : void + { + if(this.speakMc == null) + { + this.speakMc = battleRes.getMovieClip(ClassConfig.battle_talk); + addChild(this.speakMc); + this.speakMc.y = -150; + } + this.speakMc.visible = true; + if(type == 1) + { + this.speakMc.txt.textColor = 16711680; + } + else + { + this.speakMc.txt.textColor = 39423; + } + if(type == 1) + { + this.speakMc.txt.text = this.fighter.hero.atkXuanYan; + } + else + { + this.speakMc.txt.text = this.fighter.hero.defXuanYan; + } + setTimeout(function():void + { + speakMc.visible = false; + },2000); + } + + private function getOffSetX() : int + { + if(type == 1) + { + return 150; + } + return -150; + } + + public function attack(param1:Fighter, param2:int = 0, param3:String = "") : void + { + TweenLite.to(this,0.1,{ + "x":this.x + this.getOffSetX(), + "onComplete":this.doAttack, + "onCompleteParams":[param1,param2,param3] + }); + } + + private function doAttack(param1:Fighter, param2:int = 0, param3:String = "") : void + { + this.fight(); + setTimeout(function():void + { + if(!isView) + { + return; + } + if(param3 == AttackType.KILL_DODGE) + { + param1.duobi(); + } + else if(param3 == AttackType.KILL_GUARD) + { + param1.geDang(); + } + else + { + param1.beFight(); + } + setTimeout(function():void + { + if(!isView) + { + return; + } + if(param2 > 0) + { + param1.dropBlood(param2); + } + },200); + },170); + setTimeout(function():void + { + if(!isView) + { + return; + } + if(param1.currBlood > 0) + { + doAttackOver(); + } + else + { + param1.die(); + } + },1200); + } + + private function doAttackOver() : void + { + TweenLite.to(this,0.15,{"x":this.x - this.getOffSetX()}); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/Head2.as b/flash_decompiled/com/view/ui/battleview/Head2.as new file mode 100644 index 0000000..97a935c --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/Head2.as @@ -0,0 +1,97 @@ +package com.view.ui.battleview +{ + import com.common.PublicMethod; + import com.view.ui.battle.BattleRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class Head2 extends Sprite + { + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var barMC1:MovieClip; + + private var barMC2:MovieClip; + + public var level_txt:TextField; + + public var num_txt:TextField; + + private var total:int; + + private var curNum:int; + + private var center:TextFormat; + + public function Head2() + { + super(); + this.center = new TextFormat(); + this.center.align = "center"; + this.barMC1 = this.battleRes.getMovieClip("armyType_atk") as MovieClip; + this.barMC1.gotoAndStop(1); + this.barMC1.x = 10; + this.barMC1.y = 8; + this.barMC2 = this.battleRes.getMovieClip("armyType_def") as MovieClip; + this.barMC2.gotoAndStop(1); + this.barMC2.x = 10; + this.barMC2.y = 8; + this.level_txt = PublicMethod.getTextFieldWithFillter(16777215,20); + this.num_txt = PublicMethod.getTextFieldWithFillter(16777215,120); + addChild(this.barMC1); + addChild(this.barMC2); + addChild(this.level_txt); + addChild(this.num_txt); + this.num_txt.x = this.level_txt.width; + } + + public function set armyType(param1:String) : void + { + if(contains(this.barMC1)) + { + this.barMC1.gotoAndStop(param1); + } + if(contains(this.barMC2)) + { + this.barMC2.gotoAndStop(param1); + } + } + + public function set level(param1:int) : void + { + this.level_txt.text = param1.toString(); + this.level_txt.setTextFormat(this.center); + } + + public function set type(param1:int) : void + { + if(param1 == 1) + { + removeChild(this.barMC2); + } + else if(param1 == 2) + { + removeChild(this.barMC1); + } + } + + public function setBlood(param1:int) : void + { + this.curNum = param1; + if(this.curNum <= 0) + { + this.curNum = 0; + } + this.num_txt.text = this.curNum + "/" + this.total; + } + + public function set totalBlood(param1:int) : void + { + this.total = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/LandCube.as b/flash_decompiled/com/view/ui/battleview/LandCube.as new file mode 100644 index 0000000..afc7d4a --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/LandCube.as @@ -0,0 +1,28 @@ +package com.view.ui.battleview +{ + public class LandCube + { + + public static var hasWall:Boolean = false; + + public static var WIDTH:Number = 47; + + public static var HEIGHT:Number = 38; + + public static var CUBE_X_NUM:int = 20; + + public static var CUBE_Y_NUM:int = 9; + + public static var EDGE:int = 0; + + private var h:Number = 0; + + private var w:Number = 0; + + public function LandCube() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/SkillEffect.as b/flash_decompiled/com/view/ui/battleview/SkillEffect.as new file mode 100644 index 0000000..1b87486 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/SkillEffect.as @@ -0,0 +1,98 @@ +package com.view.ui.battleview +{ + public class SkillEffect + { + + public function SkillEffect() + { + super(); + } + + public static function getEffBySkillType(param1:int, param2:String = "") : String + { + var _loc3_:String = null; + switch(param1) + { + case 1: + _loc3_ = "FX_dadao"; + break; + case 2: + _loc3_ = "FX_huojian"; + break; + case 3: + _loc3_ = "FX_chongfeng"; + break; + case 4: + _loc3_ = "FX_qixi"; + break; + case 5: + _loc3_ = "FX_toushiche"; + break; + case 6: + _loc3_ = "FX_jianlie"; + break; + case 7: + _loc3_ = "FX_zhongdu"; + break; + case 8: + _loc3_ = "FX_xixue"; + break; + case 9: + _loc3_ = "FX_xielie"; + break; + case 10: + _loc3_ = "FX_ranshao"; + break; + case 11: + _loc3_ = "FX_dunqiang"; + break; + case 12: + _loc3_ = "FX_shanbi"; + break; + case 13: + _loc3_ = "FX_jingzhun"; + break; + case 14: + _loc3_ = "FX_baoji"; + break; + case 15: + _loc3_ = "FX_gongji"; + break; + case 16: + _loc3_ = "FX_fangyu"; + break; + case 17: + _loc3_ = "FX_minjie"; + break; + case 18: + if(param2 == "AT_BUBING") + { + _loc3_ = "buff_bubing"; + } + if(param2 == "AT_GONGBING") + { + _loc3_ = "buff_gongbing"; + } + if(param2 == "AT_QIBING") + { + _loc3_ = "buff_qibing"; + } + if(param2 == "AT_ZHANCHE") + { + _loc3_ = "buff_chebing"; + } + break; + case 19: + _loc3_ = "buff_qixie"; + break; + case 20: + _loc3_ = "buff_su"; + break; + case 21: + _loc3_ = "buff_jiansu"; + } + return _loc3_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/SkillManager.as b/flash_decompiled/com/view/ui/battleview/SkillManager.as new file mode 100644 index 0000000..87aef46 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/SkillManager.as @@ -0,0 +1,191 @@ +package com.view.ui.battleview +{ + import com.comfig.ServerConfig; + import com.data.data.hero.Skill; + import com.view.ui.battle.BattleRes; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Loader; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.net.URLRequest; + import flash.utils.Dictionary; + import flash.utils.setTimeout; + + public class SkillManager + { + + public static var instance:SkillManager; + + public var skillHash:Dictionary; + + public var battleRes:BattleRes = BattleRes.getInstance(); + + public function SkillManager() + { + super(); + this.init(); + } + + public static function getInstance() : SkillManager + { + if(instance == null) + { + instance = new SkillManager(); + } + return instance; + } + + public function init() : void + { + this.skillHash = new Dictionary(false); + this.skillHash["107001"] = "skill_daoguang,jitui"; + this.skillHash["107002"] = "skill_jianshi,xuanyun"; + this.skillHash["107003"] = "skill_daoguang,jitui"; + this.skillHash["107004"] = "skill_daoguang,xuanyun"; + this.skillHash["107005"] = "skill_jushi,xuanyun"; + this.skillHash["107006"] = "skill_xuanfeng"; + this.skillHash["107007"] = "skill_hengpai"; + this.skillHash["107008"] = "skill_shupai"; + this.skillHash["107009"] = "skill_sanshe"; + this.skillHash["107010"] = "skill_luoshi"; + this.skillHash["107015"] = "fangyu_shuizhu"; + this.skillHash["107016"] = "fangyu_shuizhu"; + this.skillHash["107017"] = "fangyu_yanwu"; + this.skillHash["107011"] = "guanghuan"; + this.skillHash["107012"] = "guanghuan"; + this.skillHash["107013"] = "guanghuan"; + this.skillHash["107014"] = "guanghuan"; + } + + public function playSkill2(param1:Skill, param2:int) : Sprite + { + var _loc3_:Sprite = new Sprite(); + var _loc4_:String = param1.skillId.toString(); + var _loc5_:String = _loc4_.substr(0,6); + var _loc6_:BitmapData = this.battleRes.getPng("skill_" + _loc5_ + "_" + param2); + var _loc7_:Bitmap = new Bitmap(_loc6_); + _loc3_.addChild(_loc7_); + _loc7_.x = -_loc7_.width / 2; + return _loc3_; + } + + public function playSkill(param1:Armyer, param2:Armyer, param3:Skill) : Sprite + { + var content:String; + var swf:String = null; + var load:Sprite = null; + var loader:Loader = null; + var dx:* = undefined; + var dy:* = undefined; + var d:* = undefined; + var Obj:* = undefined; + var name:String = null; + var army:Armyer = param1; + var enemy:Armyer = param2; + var skill:Skill = param3; + var skillId:String = skill.skillId.toString(); + var id:String = skillId.substr(0,6); + var className:String = "skill_" + id + "_" + army.type; + army.fightText(className); + content = this.skillHash[id]; + if(enemy == null) + { + return null; + } + swf = content.split(",")[0]; + load = new Sprite(); + if(swf == "skill_hengpai" || swf == "skill_shupai") + { + d = skill.direction; + if(d == 1) + { + } + if(d == 2) + { + } + if(d == 3) + { + } + if(d == 4) + { + } + if(swf == "skill_hengpai") + { + load.x = army.mPosX + dx * LandCube.WIDTH; + load.y = army.mPosY + dy * LandCube.HEIGHT; + if(d == 4) + { + load.rotation = -90; + } + if(d == 2) + { + load.rotation = 90; + } + if(d == 3) + { + load.rotation = 180; + } + } + if(swf == "skill_shupai") + { + if(d == 2) + { + load.rotation = -90; + } + if(d == 4) + { + load.rotation = 90; + } + load.x = army.mPosX + LandCube.WIDTH * dx; + load.y = army.mPosY + LandCube.WIDTH * dy; + } + } + try + { + load.addChild(this.battleRes.getMovieClip(swf)); + } + catch(e:Error) + { + loader = new Loader(); + loader.load(new URLRequest(ServerConfig.IMAGE_BATTLE_URL + swf + ".swf")); + load.addChild(loader); + } + enemy.addChild(load); + setTimeout(function():* + { + var _loc1_:MovieClip = null; + if(enemy.isPlay) + { + if(enemy.contains(load)) + { + enemy.removeChild(load); + try + { + _loc1_ = load.getChildAt(0) as MovieClip; + _loc1_.stop(); + _loc1_.addFrameScript(_loc1_.totalFrames,null); + } + catch(e:*) + { + } + } + } + },3000); + if(content.split(",").length > 1) + { + name = content.split(",")[1]; + if(name == "jitui") + { + enemy.jitui(); + } + if(name == "xuanyun") + { + enemy.xuanyun(); + } + } + return load; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/Tower.as b/flash_decompiled/com/view/ui/battleview/Tower.as new file mode 100644 index 0000000..b6f507c --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/Tower.as @@ -0,0 +1,68 @@ +package com.view.ui.battleview +{ + import flash.display.Sprite; + import flash.utils.setTimeout; + + public class Tower extends Armyer + { + + private var _damageNum:int = 0; + + public function Tower() + { + super(); + type = 1; + } + + override public function hited(param1:Armyer, param2:Boolean = false) : void + { + var mc:Sprite = null; + var enemy:* = undefined; + enemy = param1; + var isSkill:* = param2; + if(!enemy.stage) + { + return; + } + mc = getAtkSwf(this.armyType,2,false); + enemy.parent.addChild(mc); + mc.x = enemy.x; + mc.y = enemy.y; + setTimeout(function():* + { + if(enemy.stage) + { + enemy.parent.removeChild(mc); + } + },1000); + } + + public function get damageNum() : int + { + return this._damageNum; + } + + override public function attack2(param1:Armyer, param2:int, param3:int) : void + { + var enemy:Armyer = param1; + this.hited(enemy); + this.curNum -= param2; + enemy.subBlood(param2); + setTimeout(function():* + { + if(!enemy.stage) + { + return; + } + enemy.curNum -= param2; + enemy.update(); + },1800); + } + + public function set damageNum(param1:int) : void + { + this._damageNum = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/Wall.as b/flash_decompiled/com/view/ui/battleview/Wall.as new file mode 100644 index 0000000..08db980 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/Wall.as @@ -0,0 +1,69 @@ +package com.view.ui.battleview +{ + import com.comfig.ClassConfig; + import com.view.ui.battleview.mc.FightTextMc; + import flash.display.MovieClip; + + public class Wall extends Armyer + { + + private var wall:MovieClip; + + public function Wall() + { + super(); + type = 1; + isWall = true; + this.wall = battleRes.getMovieClip(ClassConfig.battle_wall1); + addChild(this.wall); + this.wall.y = -180; + this.wall.gotoAndStop(1); + } + + override public function die() : void + { + this.wall.gotoAndStop(3); + } + + override public function update() : void + { + if(this.curNum < this.initNum / 2) + { + if(this.contains(this.wall)) + { + this.wall.gotoAndStop(2); + } + } + super.update(); + } + + override public function subBlood(param1:*, param2:String = "") : void + { + var _loc3_:* = param1; + var _loc4_:* = param2; + if(this.stage == null) + { + return; + } + if(_loc3_ is Number) + { + _loc3_ = -_loc3_; + if(int(_loc3_) == 0) + { + return; + } + } + this.dropBlood(_loc3_); + } + + override public function dropBlood(param1:int) : void + { + var _loc2_:FightTextMc = new FightTextMc(); + addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = -60; + _loc2_.viewBlood(-param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/WallHead.as b/flash_decompiled/com/view/ui/battleview/WallHead.as new file mode 100644 index 0000000..9ea4ad7 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/WallHead.as @@ -0,0 +1,99 @@ +package com.view.ui.battleview +{ + import com.comfig.ClassConfig; + import com.utils.Utils; + import flash.display.MovieClip; + import flash.text.TextField; + + public class WallHead extends Head2 + { + + private var headmc:MovieClip; + + private var txtNum:TextField; + + private var bar:MovieClip; + + private var _width:int; + + private var txt_nujian:TextField; + + private var txt_gunmu:TextField; + + private var txt_leishi:TextField; + + private var txt_xianjing:TextField; + + private var txt_juma:TextField; + + private var _blood:int = 0; + + private var _totalBlood:int = 0; + + public function WallHead() + { + super(); + this.headmc = battleRes.getMovieClip(ClassConfig.battle_wallhead); + addChild(this.headmc); + this.txtNum = this.headmc.getChildByName("num_txt") as TextField; + this.bar = this.headmc.getChildByName("blood_mc") as MovieClip; + this._width = this.bar.width; + this.txt_nujian = this.headmc.getChildByName("nujian_txt") as TextField; + this.txt_gunmu = this.headmc.getChildByName("gunmu_txt") as TextField; + this.txt_leishi = this.headmc.getChildByName("leishi_txt") as TextField; + this.txt_xianjing = this.headmc.getChildByName("xianjing_txt") as TextField; + this.txt_juma = this.headmc.getChildByName("juma_txt") as TextField; + } + + public function light(param1:Number = 1) : void + { + } + + public function setTowerNum(param1:*, param2:*) : void + { + switch(param1) + { + case ArmyType.TAT_GUNMU: + this.txt_gunmu.text = String(param2); + break; + case ArmyType.TAT_JUMA: + this.txt_juma.text = String(param2); + break; + case ArmyType.TAT_LEISHI: + this.txt_leishi.text = String(param2); + break; + case ArmyType.TAT_XIANJING: + this.txt_xianjing.text = String(param2); + break; + case ArmyType.TAT_NUJIAN: + this.txt_nujian.text = String(param2); + } + } + + public function gray() : void + { + Utils.applyGray(this); + } + + override public function set totalBlood(param1:int) : void + { + this._totalBlood = param1; + this.txtNum.text = this._totalBlood + "/" + this._totalBlood; + } + + override public function setBlood(param1:int) : void + { + this._blood = param1; + if(this._blood < 0) + { + this._blood = 0; + } + if(this._totalBlood > 0) + { + this.bar.width = this._width * this._blood / this._totalBlood; + this.txtNum.text = this._blood + "/" + this._totalBlood; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/WorldBossBattleUI.as b/flash_decompiled/com/view/ui/battleview/WorldBossBattleUI.as new file mode 100644 index 0000000..4cd86c9 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/WorldBossBattleUI.as @@ -0,0 +1,97 @@ +package com.view.ui.battleview +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.view.ui.battle.BattleUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class WorldBossBattleUI extends BattleUI + { + + private static var instance:WorldBossBattleUI; + + private var bg:Sprite; + + private var battleView:WorldBossBattleView; + + private var currObj:Object; + + private var combatId:String; + + public function WorldBossBattleUI() + { + super(); + if(instance != null) + { + throw new Error("不能实例"); + } + } + + public static function getInstance() : WorldBossBattleUI + { + if(instance == null) + { + instance = new WorldBossBattleUI(); + } + return instance; + } + + override public function createUI() : void + { + this.bg = PublicMethod.createShape(16711680,CommonData.MAX_WIDTH,CommonData.MAX_HEIGHT); + this.bg.alpha = 0; + addChild(this.bg); + this.bg.x = -int(this.bg.width / 2); + this.bg.y = -int(this.bg.height / 2); + this.battleView = new WorldBossBattleView(); + addChild(this.battleView); + this.battleView.x = -int(this.battleView.width / 2); + this.battleView.y = -int(this.battleView.height / 2); + this.battleView.ui_closeBtn.onClick = this.closeUI; + this.battleView.setCloseFunc(this.closeUI); + if(this.currObj) + { + this.battleView.initData(this.currObj); + } + } + + override public function setPosition() : void + { + this.setBattlePosi(); + } + + private function setBattlePosi() : void + { + this.x = face.realWidth / 2; + this.y = face.realHeight / 2; + } + + override public function closeUI(param1:MouseEvent) : void + { + if(face.stage.contains(this)) + { + face.stage.removeChild(this); + } + } + + public function initData(param1:Object) : void + { + this.currObj = param1; + if(this.battleView) + { + this.battleView.initData(param1); + } + } + + public function showUI() : void + { + if(!face.stage.contains(this)) + { + face.stage.addChild(this); + this.setBattlePosi(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/WorldBossBattleView.as b/flash_decompiled/com/view/ui/battleview/WorldBossBattleView.as new file mode 100644 index 0000000..db981de --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/WorldBossBattleView.as @@ -0,0 +1,441 @@ +package com.view.ui.battleview +{ + import com.utils.GC; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.battleview.charactor.Charactor; + import com.view.ui.battleview.mc.BattleOver; + import com.view.ui.battleview.mc.BattleResult; + import com.view.ui.battleview.mc.Bosser; + import com.view.ui.battleview.mc.NumberMC; + import com.view.ui.battleview.mc.UserHead; + import com.view.ui.battleview.mc.UserInfo; + import com.view.ui.battleview.mc.ZhanqiMc; + import com.view.ui.heroboss.mc.HeroBlood; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.utils.setTimeout; + + public class WorldBossBattleView extends BattleBaseView + { + + private var battleResult:BattleResult; + + private var bg1:UIWindowBg; + + private var battleBg:Sprite; + + private var offsetX:int = 499; + + private var offsetY:int = 289; + + private var atkUser:UserInfo; + + private var defUser:UserInfo; + + private var atkBlood:HeroBlood; + + private var defBlood:HeroBlood; + + private var atkHead:UserHead; + + private var defHead:UserHead; + + private var armys:Array; + + private var armyHash:Array; + + private var enemys:Array; + + private var atkZhanqiMc:ZhanqiMc; + + private var defZhanqiMc:ZhanqiMc; + + private var wall:Wall; + + private var atkHead2Vec:Vector.; + + private var dfcHead2Vec:Vector.; + + private var atkArmyVec:Vector.; + + private var dfcArmyVec:Vector.; + + private var numMC1:NumberMC; + + private var numMC2:NumberMC; + + private var battleOverMc:BattleOver; + + private var winResult:String; + + private var codes:Array; + + private var roundNum:int; + + private var attackTroop:Object; + + private var defenceTroop:Object; + + private var combatObj:Object; + + private var cube_w:Number = LandCube.WIDTH; + + private var cube_h:Number = LandCube.HEIGHT; + + private var cube_num:int = 20; + + private var bosser:Bosser; + + public function WorldBossBattleView() + { + super(); + this.initBattleMc(); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 361; + window_heihgt = UIWindowBg.normal_window_h + 172; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 361; + ui_closeBtn.y = 10; + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg1.addChild(param1); + param1.x = 2; + param1.y = 2; + param1.width = 997; + param1.height = 578; + } + + private function initBattleMc() : void + { + var _loc3_:Head2 = null; + var _loc4_:Head2 = null; + var _loc5_:Armyer = null; + var _loc6_:Armyer = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_worldboss); + this.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + 361,400 + 172); + addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:String = "pic/bg/bg_battle_1.jpg"; + loadBg(_loc1_); + this.battleBg = new Sprite(); + addChild(this.battleBg); + this.battleBg.x = 11 + this.offsetX; + this.battleBg.y = 39 + this.offsetY; + this.atkUser = new UserInfo(1); + this.battleBg.addChild(this.atkUser); + this.atkUser.x = 70 - this.offsetX; + this.atkUser.y = 14 - this.offsetY; + this.defUser = new UserInfo(2); + this.battleBg.addChild(this.defUser); + this.defUser.x = 775 - this.offsetX; + this.defUser.y = 14 - this.offsetY; + this.atkBlood = new HeroBlood(1); + this.battleBg.addChild(this.atkBlood); + this.atkBlood.x = 60 - this.offsetX; + this.atkBlood.y = 6 - this.offsetY; + this.defBlood = new HeroBlood(2); + this.battleBg.addChild(this.defBlood); + this.defBlood.x = 636 - this.offsetX; + this.defBlood.y = 6 - this.offsetY; + this.atkHead = new UserHead(); + this.battleBg.addChild(this.atkHead); + this.atkHead.x = -this.offsetX; + this.atkHead.y = -this.offsetY; + this.defHead = new UserHead(); + this.battleBg.addChild(this.defHead); + this.defHead.x = 906 - this.offsetX; + this.defHead.y = -this.offsetY; + this.atkZhanqiMc = new ZhanqiMc(); + this.battleBg.addChild(this.atkZhanqiMc); + this.atkZhanqiMc.x = -this.offsetX + 5; + this.atkZhanqiMc.y = -this.offsetY + 95; + this.battleResult = new BattleResult(); + this.atkHead2Vec = new Vector.(); + this.dfcHead2Vec = new Vector.(); + this.atkArmyVec = new Vector.(); + this.dfcArmyVec = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + _loc3_ = new Head2(); + this.battleBg.addChild(_loc3_); + _loc3_.type = 1; + _loc3_.x = 15 - this.offsetX; + _loc3_.y = 476 + _loc2_ * 21 - this.offsetY; + this.atkHead2Vec.push(_loc3_); + _loc4_ = new Head2(); + this.battleBg.addChild(_loc4_); + _loc4_.type = 2; + _loc4_.x = 870 - this.offsetX; + _loc4_.y = _loc3_.y; + this.dfcHead2Vec.push(_loc4_); + _loc5_ = new Armyer(); + _loc5_.head = _loc3_; + this.atkArmyVec.push(_loc5_); + _loc6_ = new Armyer(); + _loc6_.head = _loc4_; + this.dfcArmyVec.push(_loc6_); + _loc2_++; + } + this.numMC1 = new NumberMC(); + this.numMC2 = new NumberMC(); + this.battleBg.addChild(this.numMC1); + this.numMC1.x = -220; + this.numMC1.y = -260; + this.battleBg.addChild(this.numMC2); + this.numMC2.x = 140; + this.numMC2.y = -260; + this.battleOverMc = new BattleOver(); + this.battleOverMc.x = 0; + this.battleOverMc.y = 10; + } + + public function initData(param1:Object) : void + { + var atkZhanqi:Object; + var obj:Object = param1; + isPlay = true; + this.combatObj = obj; + this.init(); + this.initArmy(); + this.initEnemy(); + atkZhanqi = obj.atkZhanqi; + this.atkZhanqiMc.setObj(atkZhanqi); + setTimeout(function():* + { + battle(); + },1000); + } + + private function init() : void + { + this.armyHash = new Array(); + this.armys = new Array(); + this.enemys = new Array(); + } + + public function initArmy() : void + { + var _loc4_:Object = null; + var _loc7_:Armyer = null; + this.atkUser.setUserName(this.combatObj.userName); + this.atkUser.setGuildName(this.combatObj.guildName); + this.atkUser.setPower(this.combatObj.powerNum); + this.atkHead.loadHead(this.combatObj.userIcon); + var _loc1_:Number = -490; + var _loc2_:Number = -160; + var _loc3_:Array = this.combatObj.powerList as Array; + var _loc5_:int = 0; + var _loc6_:int = 0; + while(_loc6_ < 5) + { + if(_loc3_[_loc6_]) + { + _loc4_ = _loc3_[_loc6_]; + _loc7_ = this.atkArmyVec[_loc6_]; + this.battleBg.addChild(_loc7_); + _loc7_.rowId = _loc4_.initPosY - 1; + _loc7_.setType(1); + _loc7_.teamId = _loc4_.teamId; + _loc7_.power = _loc4_.power; + _loc7_.setArmyType(_loc4_.army.armyType); + _loc7_.hero = _loc4_.hero; + _loc7_.name = "army_" + _loc6_; + _loc7_.initNum = _loc4_.initNum; + _loc7_.curNum = _loc4_.initNum; + _loc7_.heroName = _loc4_.heroName; + _loc7_.x = _loc1_ + (_loc4_.initPosX - 1) * this.cube_w + this.cube_w / 2 + this.cube_num * LandCube.EDGE * (LandCube.CUBE_Y_NUM - _loc4_.posY - 1) / 2; + _loc7_.y = _loc2_ + _loc7_.rowId * this.cube_h; + _loc7_.actType = Charactor.STAND; + _loc7_.head.totalBlood = _loc4_.initNum; + _loc7_.head.armyType = _loc7_.armyType; + _loc7_.head.level = _loc4_.army.level; + _loc7_.initSkill = _loc4_.initSkill; + _loc7_.getImgData(); + this.armyHash.push(_loc7_); + this.armys.push(_loc7_); + _loc5_ += _loc7_.initNum; + } + _loc6_++; + } + this.atkBlood.setMaxBlood(_loc5_); + this.atkBlood.setCurrBlood(_loc5_); + } + + public function initEnemy() : void + { + this.defUser.setUserName("世界BOSS"); + this.defUser.setGuildName("无"); + this.defUser.setPower("**********"); + this.defHead.loadHead("user1_16.jpg"); + var _loc1_:Number = -490; + var _loc2_:Number = -160; + var _loc3_:String = "pic/bg/bg_battle_1.jpg"; + loadBg(_loc3_); + this.defBlood.setMaxBlood(this.combatObj.bossblood); + this.defBlood.setCurrBlood(this.combatObj.currblood); + if(this.wall == null) + { + this.wall = new Wall(); + } + this.battleBg.addChild(this.wall); + if(this.bosser == null) + { + this.bosser = new Bosser(); + } + this.battleBg.addChild(this.bosser); + this.bosser.stand(); + this.bosser.beginPlay(); + this.bosser.bloodCount = this.combatObj.currblood; + } + + private function battle() : void + { + var atkArmyer:Armyer; + var dropBlood:int = 0; + if(isPlay == false) + { + return; + } + if(this.bosser.bloodCount <= 0) + { + this.showResult(); + return; + } + if(this.armyHash.length == 0) + { + this.showResult(); + return; + } + atkArmyer = this.armyHash[0] as Armyer; + dropBlood = atkArmyer.power; + atkArmyer.fight(); + setTimeout(function():* + { + bosser.dropBlood(dropBlood); + var _loc1_:int = defBlood.getCurrBlood() - dropBlood; + if(_loc1_ < 0) + { + _loc1_ = 0; + } + defBlood.setCurrBlood(_loc1_); + },500); + setTimeout(function():* + { + bossbattle(); + },2000); + } + + private function bossbattle() : void + { + var atkArmyer:Armyer = null; + if(this.bosser.bloodCount <= 0) + { + this.showResult(); + return; + } + if(isPlay == false) + { + return; + } + atkArmyer = this.armyHash[0] as Armyer; + this.bosser.fight(); + setTimeout(function():* + { + atkArmyer.dropBlood(-99999999); + atkArmyer.die(); + armyHash.shift(); + var _loc1_:int = atkBlood.getCurrBlood() - atkArmyer.initNum; + if(_loc1_ <= 0) + { + _loc1_ = 0; + } + atkBlood.setCurrBlood(_loc1_); + },1000); + setTimeout(function():* + { + battle(); + },2000); + } + + private function showResult() : void + { + if(isPlay == false) + { + return; + } + this.battleBg.addChild(this.battleResult); + this.battleResult.x = -int(this.battleResult.width / 2); + this.battleResult.y = -int(this.battleResult.height / 2) + 30; + this.battleResult.updateBossResult(this.combatObj); + } + + public function setCloseFunc(param1:Function) : void + { + if(this.battleResult) + { + this.battleResult.setCloseFun(param1); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.clear(); + } + + public function clear() : void + { + var _loc1_:* = undefined; + isPlay = false; + this.numMC1.value = 0; + this.numMC2.value = 0; + if(Boolean(this.battleOverMc) && this.battleBg.contains(this.battleOverMc)) + { + this.battleBg.removeChild(this.battleOverMc); + } + if(Boolean(this.battleResult) && this.battleBg.contains(this.battleResult)) + { + this.battleBg.removeChild(this.battleResult); + } + this.winResult = null; + for each(_loc1_ in this.armys) + { + if(Boolean(_loc1_) && this.battleBg.contains(_loc1_)) + { + this.battleBg.removeChild(_loc1_); + } + } + if(Boolean(this.wall) && this.battleBg.contains(this.wall)) + { + this.battleBg.removeChild(this.wall); + this.wall = null; + } + GC.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/charactor/Charactor.as b/flash_decompiled/com/view/ui/battleview/charactor/Charactor.as new file mode 100644 index 0000000..15a53dc --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/charactor/Charactor.as @@ -0,0 +1,420 @@ +package com.view.ui.battleview.charactor +{ + import com.InstallFace; + import com.view.ui.battle.BattleRes; + import com.view.ui.battleview.mc.FightTextMc; + import com.view.ui.battleview.mc.LightMc; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.Event; + import flash.geom.Point; + import flash.geom.Rectangle; + import flash.utils.clearInterval; + import flash.utils.getTimer; + import flash.utils.setInterval; + + public class Charactor extends Sprite + { + + public static const DIE:int = 1; + + public static const STAND:int = 2; + + public static const FIGHT:int = 3; + + public static const BEFIGHT:int = 4; + + public static var STATUS_CHANGED:String = "status_changed"; + + public var teamId:String = ""; + + private var tan45:Number; + + public var face:InstallFace = InstallFace.getInstance(); + + public var battleRes:BattleRes = BattleRes.getInstance(); + + public var offset_x:int; + + public var offset_y:int; + + public var init_x:int; + + public var init_y:int; + + public var type:int; + + public var textView:FightTextMc; + + public var currBlood:int; + + public var imgDataVec:Vector.; + + public var imgVec:Vector.; + + public var bigBitMap:Bitmap; + + public var characBitMap:Bitmap; + + protected var direction:int = 0; + + public var actType:int; + + public var timer:int = 60; + + public var currFrame:int; + + public var beginFrame:int; + + public var endFrame:int; + + public var isPlay:Boolean; + + public var isView:Boolean; + + public var light:LightMc; + + public var lightFunc:Function; + + public var mPosX:Number; + + public var mPosY:Number; + + private var currTime:int; + + private var _moveId:uint; + + private var _tox:Number; + + private var _toy:Number; + + private var _status:Number; + + private var _moveTan:Number; + + private var _moveFlag:Boolean = false; + + private var _moveAuto:Boolean = false; + + private var timeType:Boolean = false; + + public var moveSpeed:Number = 0; + + public function Charactor() + { + super(); + this.tan45 = Math.tan(45 / 180 * Math.PI); + this.characBitMap = new Bitmap(); + this.imgDataVec = new Vector.(); + this.imgVec = new Vector.(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + } + + public function addEvent(param1:Event) : void + { + this.isView = true; + } + + public function delEvent(param1:Event) : void + { + this.isView = false; + } + + public function getImgData() : void + { + } + + public function loadBmpData() : void + { + var _loc1_:ImgData = null; + var _loc2_:BitmapData = null; + if(Boolean(this.imgVec) && this.imgVec.length > 0) + { + this.imgVec = new Vector.(); + } + for each(_loc1_ in this.imgDataVec) + { + _loc2_ = new BitmapData(_loc1_._width,_loc1_._height); + _loc2_.copyPixels(this.bigBitMap.bitmapData,new Rectangle(_loc1_._x,_loc1_._y,_loc1_._width,_loc1_._height),new Point(0,0)); + this.imgVec.push(_loc2_); + } + this.loadOver(); + } + + public function loadOver() : void + { + this.beginPlay(); + } + + public function setDirection(param1:int) : void + { + this.direction = param1; + } + + public function getDirection() : int + { + return this.direction; + } + + public function dropBlood(param1:int) : void + { + var _loc2_:FightTextMc = new FightTextMc(); + addChild(_loc2_); + _loc2_.x = -30; + _loc2_.y = -140; + _loc2_.viewBlood(param1); + } + + public function fightText(param1:String) : void + { + var _loc2_:FightTextMc = new FightTextMc(); + addChild(_loc2_); + _loc2_.viewText(param1); + _loc2_.x = -30; + _loc2_.y = -140; + } + + public function showFightSkill(param1:String) : void + { + var _loc2_:FightTextMc = new FightTextMc(); + addChild(_loc2_); + _loc2_.showSkillEff(param1); + _loc2_.x = -60; + _loc2_.y = -140; + } + + public function showTianfu(param1:String) : void + { + var _loc2_:FightTextMc = new FightTextMc(); + addChild(_loc2_); + _loc2_.showSkillEff(param1); + _loc2_.x = -60; + _loc2_.y = -60; + } + + public function beginPlay() : void + { + if(this.isPlay == false) + { + this.isPlay = true; + this.face.stage.addEventListener(Event.ENTER_FRAME,this.frame); + } + } + + public function stopPlay() : void + { + if(this.isPlay) + { + this.isPlay = false; + this.face.stage.removeEventListener(Event.ENTER_FRAME,this.frame); + } + } + + private function frame(param1:Event) : void + { + if(getTimer() - this.currTime > this.timer) + { + this.currTime = getTimer(); + this.doAction(); + } + } + + public function doAction() : void + { + this.characBitMap.bitmapData = this.imgVec[this.currFrame]; + this.characBitMap.x = this.init_x + this.offset_x; + this.characBitMap.y = this.init_y + this.offset_y; + ++this.currFrame; + if(this.actType == DIE && this.currFrame == this.endFrame) + { + this.stopPlay(); + return; + } + } + + public function walk() : void + { + } + + public function fight() : void + { + this.actType = FIGHT; + } + + public function geDang() : void + { + } + + public function stand() : void + { + if(this.actType == DIE) + { + return; + } + this.actType = STAND; + } + + public function beFight() : void + { + } + + public function die() : void + { + this.actType = DIE; + } + + public function duobi() : void + { + } + + private function moveGo(param1:Number = 1, param2:Boolean = true) : void + { + var _loc3_:Number = this.moveSpeed / 10; + var _loc4_:Event = null; + if(this._status != CharactorStatus.MOVE) + { + clearInterval(this._moveId); + this._moveFlag = false; + return; + } + var _loc5_:Number = this._tox - this.x; + var _loc6_:Number = this._toy - this.y; + var _loc7_:* = 0; + if(!(param1 == -Infinity || param1 == Infinity)) + { + _loc7_ = _loc5_ > 0 ? Math.abs(_loc3_ * Math.cos(Math.atan(param1))) : -Math.abs(_loc3_ * Math.cos(Math.atan(param1))); + } + var _loc8_:* = _loc6_ > 0 ? Math.abs(_loc3_ * Math.sin(Math.atan(param1))) : -Math.abs(_loc3_ * Math.sin(Math.atan(param1))); + this.x += _loc7_; + this.y += _loc8_; + if(Math.sqrt(_loc5_ * _loc5_ + _loc6_ * _loc6_) <= _loc3_) + { + this.x = this._tox; + this.y = this._toy; + clearInterval(this._moveId); + this._moveFlag = false; + if(param2) + { + this._status = CharactorStatus.ARISE; + this.stand(); + } + _loc4_ = new Event(Charactor.STATUS_CHANGED); + dispatchEvent(_loc4_); + } + } + + public function moveTo(param1:Number, param2:Number, param3:Number = 0, param4:Boolean = true) : void + { + var fromx:Number; + var fromy:Number; + var tri_a:Number; + var tri_b:Number; + var tan:Number = NaN; + var to_x:Number = param1; + var to_y:Number = param2; + var time:Number = param3; + var auto:Boolean = param4; + this.walk(); + clearInterval(this._moveId); + this._tox = to_x; + §§push(this); + this._toy = to_y; + this.directionTo(to_x,to_y); + fromx = this.x; + fromy = this.y; + if(fromx == this._tox && fromy == this._toy) + { + if(auto) + { + this.stand(); + } + return; + } + tri_a = this._tox - fromx; + tri_b = this._toy - fromy; + tan = tri_b / tri_a; + if(time > 0) + { + this.moveSpeed = Math.sqrt(tri_a * tri_a + tri_b * tri_b) / time; + } + if(tan > 100) + { + } + if(this._status != CharactorStatus.MOVE) + { + this._status = CharactorStatus.MOVE; + } + this._moveTan = tan; + this._moveFlag = true; + this._moveAuto = auto; + if(!this.timeType) + { + this._moveId = setInterval(function():void + { + moveGo(tan,auto); + },100); + } + } + + public function directionTo(param1:Number, param2:Number) : void + { + var _loc3_:Number = param1 - this.x; + var _loc4_:Number = param2 - this.y; + if(_loc3_ == 0) + { + if(_loc4_ > 0) + { + this.direction = Direction.DOWN; + } + else + { + this.direction = Direction.UP; + } + } + else if(_loc3_ > 0) + { + if(_loc4_ > 0) + { + if(_loc4_ > _loc3_) + { + this.direction = Direction.DOWN; + } + else + { + this.direction = Direction.RIGHT; + } + } + else if(Math.abs(_loc4_) > _loc3_) + { + this.direction = Direction.UP; + } + else + { + this.direction = Direction.RIGHT; + } + } + else if(_loc4_ > 0) + { + if(_loc4_ > Math.abs(_loc3_)) + { + this.direction = Direction.DOWN; + } + else + { + this.direction = Direction.LEFT; + } + } + else if(Math.abs(_loc4_) > Math.abs(_loc3_)) + { + this.direction = Direction.UP; + } + else + { + this.direction = Direction.LEFT; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/charactor/CharactorStatus.as b/flash_decompiled/com/view/ui/battleview/charactor/CharactorStatus.as new file mode 100644 index 0000000..40ec1f2 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/charactor/CharactorStatus.as @@ -0,0 +1,26 @@ +package com.view.ui.battleview.charactor +{ + public class CharactorStatus + { + + public static const DIE:Number = 6; + + public static const LIE:Number = 3; + + public static const ARISE:Number = 0; + + public static const MOVE:Number = 1; + + public static const HITED:Number = 5; + + public static const HIT:Number = 4; + + public static const SIT:Number = 2; + + public function CharactorStatus() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/charactor/Direction.as b/flash_decompiled/com/view/ui/battleview/charactor/Direction.as new file mode 100644 index 0000000..82d4d15 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/charactor/Direction.as @@ -0,0 +1,20 @@ +package com.view.ui.battleview.charactor +{ + public class Direction + { + + public static const UP:int = 0; + + public static const RIGHT:int = 1; + + public static const DOWN:int = 2; + + public static const LEFT:int = 3; + + public function Direction() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/charactor/ImgData.as b/flash_decompiled/com/view/ui/battleview/charactor/ImgData.as new file mode 100644 index 0000000..377e355 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/charactor/ImgData.as @@ -0,0 +1,24 @@ +package com.view.ui.battleview.charactor +{ + public class ImgData + { + + public var _width:int; + + public var _height:int; + + public var _x:int; + + public var _y:int; + + public function ImgData(param1:int, param2:int, param3:int, param4:int) + { + super(); + this._width = param1; + this._height = param2; + this._x = param3; + this._y = param4; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/BattleBeginMc.as b/flash_decompiled/com/view/ui/battleview/mc/BattleBeginMc.as new file mode 100644 index 0000000..3150bc3 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/BattleBeginMc.as @@ -0,0 +1,44 @@ +package com.view.ui.battleview.mc +{ + import com.comfig.ClassConfig; + import com.view.ui.battle.BattleRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class BattleBeginMc extends Sprite + { + + private var beginMc:MovieClip; + + private var battleRes:BattleRes = BattleRes.getInstance(); + + private var isPlay:Boolean; + + public function BattleBeginMc() + { + super(); + this.beginMc = this.battleRes.getMovieClip(ClassConfig.battle_begin); + addChild(this.beginMc); + this.beginMc.gotoAndStop(1); + } + + public function play() : void + { + this.isPlay = true; + this.beginMc.gotoAndPlay(1); + addEventListener(Event.ENTER_FRAME,this.enterFrame,false,0,true); + } + + private function enterFrame(param1:Event) : void + { + if(this.beginMc.currentFrame >= 14) + { + this.isPlay = false; + this.beginMc.gotoAndStop(1); + removeEventListener(Event.ENTER_FRAME,this.enterFrame); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/BattleOver.as b/flash_decompiled/com/view/ui/battleview/mc/BattleOver.as new file mode 100644 index 0000000..a751a0f --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/BattleOver.as @@ -0,0 +1,98 @@ +package com.view.ui.battleview.mc +{ + import com.comfig.ClassConfig; + import com.view.ui.battle.BattleRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class BattleOver extends Sprite + { + + private var winMc:MovieClip; + + private var lostMc:MovieClip; + + private var battleRes:BattleRes = BattleRes.getInstance(); + + private var isPlayWin:Boolean; + + private var isPlayLost:Boolean; + + public function BattleOver() + { + super(); + addEventListener(Event.REMOVED_FROM_STAGE,this.clear); + } + + private function clear(param1:Event) : void + { + if(this.isPlayWin) + { + this.isPlayWin = false; + removeEventListener(Event.ENTER_FRAME,this.winFrame); + } + if(this.winMc) + { + this.winMc.gotoAndStop(1); + } + if(this.isPlayLost) + { + this.isPlayLost = false; + removeEventListener(Event.ENTER_FRAME,this.lostFrame); + } + if(this.lostMc) + { + this.lostMc.gotoAndStop(1); + } + } + + public function win() : void + { + if(this.winMc == null) + { + this.winMc = this.battleRes.getMovieClip(ClassConfig.battle_win); + addChild(this.winMc); + } + this.isPlayWin = true; + this.winMc.gotoAndPlay(1); + addEventListener(Event.ENTER_FRAME,this.winFrame); + } + + private function winFrame(param1:Event) : void + { + if(this.winMc.currentFrame >= 18) + { + this.winMc.stop(); + this.isPlayWin = false; + } + } + + public function lost() : void + { + if(this.lostMc == null) + { + this.lostMc = this.battleRes.getMovieClip(ClassConfig.battle_lose); + } + if(!contains(this.lostMc)) + { + addChild(this.lostMc); + } + this.isPlayLost = true; + this.lostMc.gotoAndPlay(1); + addEventListener(Event.ENTER_FRAME,this.lostFrame); + } + + private function lostFrame(param1:Event) : void + { + if(this.lostMc.currentFrame >= 18) + { + removeEventListener(Event.ENTER_FRAME,this.lostFrame); + this.lostMc.stop(); + this.isPlayLost = false; + removeChild(this.lostMc); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/BattleResult.as b/flash_decompiled/com/view/ui/battleview/mc/BattleResult.as new file mode 100644 index 0000000..a094f0a --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/BattleResult.as @@ -0,0 +1,577 @@ +package com.view.ui.battleview.mc +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.data.data.battle.DimensionCombat; + import com.data.data.battle.DimensionCombatTeam; + import com.data.data.battle.DimensionCombatTroop; + import com.newdata.user.NewUserData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.battleview.ArmyType; + import com.view.ui.battleview.BattleBaseView; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.events.Event; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BattleResult extends BattleBaseView + { + + private var battleResult:MovieClip; + + private var isAtkWin:Boolean; + + private var towerTeams:Array; + + private var atkArmyVec:Vector.; + + private var dfcArmyVec:Vector.; + + private var headSp1:UIWindowBg; + + private var headSp2:UIWindowBg; + + private var user1_txt:TextField; + + private var lv1_txt:TextField; + + private var guild1_txt:TextField; + + private var user2_txt:TextField; + + private var lv2_txt:TextField; + + private var guild2_txt:TextField; + + private var xianjing_txt:TextField; + + private var gunmu_txt:TextField; + + private var juma_txt:TextField; + + private var leishi_txt:TextField; + + private var nujian_txt:TextField; + + private var my_txt:TextField; + + private var you_txt:TextField; + + private var closeBtn:UIButton; + + private var title2:UITitleBg; + + private var title3:UITitleBg; + + private var loaderAtk:LoadResource; + + private var atkImg:Bitmap; + + private var loaderDfc:LoadResource; + + private var dfcImg:Bitmap; + + public function BattleResult() + { + var _loc8_:TextField = null; + var _loc9_:TextField = null; + var _loc13_:TextField = null; + var _loc20_:ResultItem = null; + var _loc21_:ResultItem = null; + super(); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.leading = 4; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(920,471); + addChild(_loc2_); + var _loc3_:UITitleBg = new UITitleBg("战斗结果",_loc2_.width); + _loc2_.addChild(_loc3_); + _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2); + var _loc4_:Array = ["武将","等级","军队","数量","损失","通天炮损失","恢复"]; + var _loc5_:Array = [100,50,60,60,60,70,60]; + var _loc6_:UITable = new UITable(); + _loc6_.drawLine = true; + _loc6_.install(5,_loc4_,_loc5_); + _loc2_.addChild(_loc6_); + _loc6_.x = 7; + _loc6_.y = 140; + var _loc7_:UITable = new UITable(); + _loc7_.drawLine = true; + _loc7_.install(5,_loc4_,_loc5_); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc6_.x + 462; + _loc7_.y = _loc6_.y; + this.headSp1 = new UIWindowBg(); + this.headSp1.initSecondPanel(88,88); + _loc2_.addChild(this.headSp1); + this.headSp1.x = 10; + this.headSp1.y = 35; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc8_.text = "君 主:"; + _loc2_.addChild(_loc8_); + _loc8_.x = 120; + _loc8_.y = 40; + this.user1_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.user1_txt); + this.user1_txt.x = _loc8_.x + _loc8_.width; + this.user1_txt.y = _loc8_.y; + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc9_.text = "等 级:"; + _loc2_.addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y + 30; + this.lv1_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.lv1_txt); + this.lv1_txt.x = this.user1_txt.x; + this.lv1_txt.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc10_.text = "联 盟:"; + _loc2_.addChild(_loc10_); + _loc10_.x = _loc8_.x; + _loc10_.y = _loc9_.y + 30; + this.guild1_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.guild1_txt); + this.guild1_txt.x = this.user1_txt.x; + this.guild1_txt.y = _loc10_.y; + this.headSp2 = new UIWindowBg(); + this.headSp2.initSecondPanel(88,88); + _loc2_.addChild(this.headSp2); + this.headSp2.x = 820; + this.headSp2.y = this.headSp1.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc11_.text = "君 主:"; + _loc2_.addChild(_loc11_); + _loc11_.x = 670; + _loc11_.y = _loc8_.y; + this.user2_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.user2_txt); + this.user2_txt.x = _loc11_.x + _loc11_.width; + this.user2_txt.y = _loc11_.y; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc12_.text = "等 级:"; + _loc2_.addChild(_loc12_); + _loc12_.x = _loc11_.x; + _loc12_.y = _loc11_.y + 30; + this.lv2_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.lv2_txt); + this.lv2_txt.x = this.user2_txt.x; + this.lv2_txt.y = _loc12_.y; + _loc13_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc13_.text = "联 盟:"; + _loc2_.addChild(_loc13_); + _loc13_.x = _loc12_.x; + _loc13_.y = _loc12_.y + 30; + this.guild2_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.guild2_txt); + this.guild2_txt.x = this.lv2_txt.x; + this.guild2_txt.y = _loc13_.y; + var _loc14_:UIWindowBg = new UIWindowBg(); + _loc14_.initThirdPanel(908,20); + _loc2_.addChild(_loc14_); + _loc14_.x = _loc6_.x; + _loc14_.y = _loc6_.y + _loc6_.height + 3; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,90); + _loc14_.addChild(_loc15_); + _loc15_.x = 60; + _loc15_.y = 7; + _loc15_.text = "本次造成伤害:"; + this.xianjing_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.xianjing_txt); + this.xianjing_txt.x = _loc15_.x + _loc15_.width; + this.xianjing_txt.y = _loc15_.y; + this.gunmu_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.gunmu_txt); + this.gunmu_txt.x = this.xianjing_txt.x + 110; + this.gunmu_txt.y = _loc15_.y; + this.juma_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.juma_txt); + this.juma_txt.x = this.gunmu_txt.x + 110; + this.juma_txt.y = _loc15_.y; + this.leishi_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.leishi_txt); + this.leishi_txt.x = this.juma_txt.x + 110; + this.leishi_txt.y = _loc15_.y; + this.nujian_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.nujian_txt); + this.nujian_txt.x = this.leishi_txt.x + 110; + this.nujian_txt.y = _loc15_.y; + var _loc16_:UIWindowBg = new UIWindowBg(); + _loc16_.initThirdPanel(447,110); + _loc2_.addChild(_loc16_); + _loc16_.x = _loc6_.x; + _loc16_.y = _loc14_.y + _loc14_.height + 3; + var _loc17_:UIWindowBg = new UIWindowBg(); + _loc17_.initThirdPanel(447,110); + _loc2_.addChild(_loc17_); + _loc17_.x = _loc7_.x; + _loc17_.y = _loc16_.y; + this.title2 = new UITitleBg("攻方损失",_loc16_.width); + _loc16_.addChild(this.title2); + this.title2.x = int(_loc16_.width / 2 - this.title2.width / 2); + this.title3 = new UITitleBg("守方损失",_loc17_.width); + _loc17_.addChild(this.title3); + this.title3.x = int(_loc17_.width / 2 - this.title3.width / 2); + this.my_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,420); + this.my_txt.height = 90; + this.my_txt.wordWrap = true; + this.my_txt.multiline = true; + _loc16_.addChild(this.my_txt); + this.my_txt.x = 4; + this.my_txt.y = 26; + this.my_txt.defaultTextFormat = _loc1_; + this.you_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,420); + this.you_txt.height = 90; + this.you_txt.wordWrap = true; + this.you_txt.multiline = true; + _loc17_.addChild(this.you_txt); + this.you_txt.x = 4; + this.you_txt.y = 26; + this.you_txt.defaultTextFormat = _loc1_; + this.atkArmyVec = new Vector.(); + var _loc18_:int = 0; + while(_loc18_ < 5) + { + _loc20_ = new ResultItem(); + _loc20_.x = 4; + _loc20_.y = 29 + _loc18_ * 25; + _loc6_.addChild(_loc20_); + this.atkArmyVec.push(_loc20_); + _loc18_++; + } + this.dfcArmyVec = new Vector.(); + var _loc19_:int = 0; + while(_loc19_ < 5) + { + _loc21_ = new ResultItem(); + _loc21_.x = 4; + _loc21_.y = 29 + _loc19_ * 25; + _loc7_.addChild(_loc21_); + this.dfcArmyVec.push(_loc21_); + _loc19_++; + } + this.battleResult = battleRes.getMovieClip(ClassConfig.battle_result); + _loc2_.addChild(this.battleResult); + this.battleResult.x = 285; + this.battleResult.y = 40; + this.closeBtn = new UIButton("关 闭",2,10); + _loc2_.addChild(this.closeBtn); + this.closeBtn.x = 435; + this.closeBtn.y = 452; + } + + override public function setPosition() : void + { + } + + public function setCloseFun(param1:Function) : void + { + this.closeBtn.onClick = param1; + } + + override public function removeFromStage(param1:Event) : void + { + var _loc2_:ResultItem = null; + var _loc3_:ResultItem = null; + super.removeFromStage(param1); + for each(_loc2_ in this.dfcArmyVec) + { + _loc2_.clear(); + } + for each(_loc3_ in this.atkArmyVec) + { + _loc3_.clear(); + } + if(Boolean(this.atkImg) && this.headSp1.contains(this.atkImg)) + { + this.headSp1.removeChild(this.atkImg); + } + if(Boolean(this.dfcImg) && this.headSp2.contains(this.dfcImg)) + { + this.headSp2.removeChild(this.dfcImg); + } + } + + private function init(param1:DimensionCombatTroop, param2:int, param3:Array) : void + { + var _loc7_:String = null; + var _loc8_:String = null; + var _loc9_:String = null; + var _loc10_:String = null; + var _loc11_:String = null; + var _loc12_:String = null; + var _loc4_:DimensionCombatTeam = undefined; + var _loc5_:Array = param1.teams as Array; + var _loc6_:int = 0; + while(_loc6_ < _loc5_.length) + { + _loc4_ = _loc5_[_loc6_]; + _loc7_ = _loc4_.teamName; + _loc8_ = _loc4_.initNum.toString(); + _loc9_ = _loc4_.resumeNum.toString(); + _loc10_ = _loc4_.loseNum.toString(); + if(_loc4_.teamId == "wall") + { + _loc6_++; + } + else + { + if(_loc4_.teamId.indexOf("unit_") > -1) + { + _loc12_ = "-"; + _loc11_ = _loc4_.army.armyName; + } + else + { + _loc12_ = _loc4_.hero.level.toString(); + _loc11_ = _loc4_.army.armyName; + } + if(param2 == 0) + { + this.atkArmyVec[_loc6_].setHeroName(_loc7_); + this.atkArmyVec[_loc6_].setInitNum(_loc8_); + this.atkArmyVec[_loc6_].setResumeNum(_loc9_); + this.atkArmyVec[_loc6_].setLoseNum(_loc10_); + this.atkArmyVec[_loc6_].setArmyName(_loc11_); + this.atkArmyVec[_loc6_].setHeroLv(_loc12_); + this.atkArmyVec[_loc6_].setGunNum(this.getGunNums(param3,_loc4_.teamId) + ""); + } + else + { + this.dfcArmyVec[_loc6_].setHeroName(_loc7_); + this.dfcArmyVec[_loc6_].setInitNum(_loc8_); + this.dfcArmyVec[_loc6_].setResumeNum(_loc9_); + this.dfcArmyVec[_loc6_].setLoseNum(_loc10_); + this.dfcArmyVec[_loc6_].setArmyName(_loc11_); + this.dfcArmyVec[_loc6_].setHeroLv(_loc12_); + this.dfcArmyVec[_loc6_].setGunNum(this.getGunNums(param3,_loc4_.teamId) + ""); + } + _loc6_++; + } + } + this.initTower(param1.towerTeams); + } + + private function getGunNums(param1:Array, param2:String) : int + { + var _loc3_:Object = null; + if(param1 == null) + { + return 0; + } + for each(_loc3_ in param1) + { + if(_loc3_.id == param2) + { + return int(_loc3_.nums); + } + } + return 0; + } + + public function updateBossResult(param1:Object) : void + { + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc9_:String = null; + var _loc10_:String = null; + var _loc2_:int = 1; + if(param1.winResult == "ATTACKER") + { + this.isAtkWin = true; + _loc2_ = 1; + } + else + { + this.isAtkWin = false; + _loc2_ = 2; + } + this.battleResult.title_mc.gotoAndStop(_loc2_); + this.loaderAtk = new LoadResource("pic/head/" + param1.userIcon,this.loadAtkBack); + this.user1_txt.text = param1.userName; + if(param1.rankId > 0) + { + this.lv1_txt.text = param1.rankId + ""; + } + this.guild1_txt.text = String(param1.guildName); + this.loaderDfc = new LoadResource("pic/head/user1_16.jpg",this.loadDfcBack); + this.user2_txt.text = "世界BOSS"; + this.lv2_txt.text = "999"; + this.guild2_txt.text = "无"; + var _loc3_:Array = param1.powerList as Array; + var _loc4_:int = 0; + var _loc8_:String = "0"; + var _loc11_:int = 0; + while(_loc4_ < _loc3_.length) + { + _loc5_ = _loc3_[_loc4_].heroName; + _loc6_ = _loc3_[_loc4_].initNum; + _loc7_ = _loc3_[_loc4_].initNum; + _loc5_ = _loc3_[_loc4_].heroName; + _loc9_ = _loc3_[_loc4_].army.armyName; + _loc10_ = _loc3_[_loc4_].heroLevel; + this.atkArmyVec[_loc4_].setHeroName(_loc5_); + this.atkArmyVec[_loc4_].setInitNum(_loc6_); + this.atkArmyVec[_loc4_].setResumeNum(_loc7_); + this.atkArmyVec[_loc4_].setLoseNum(_loc8_); + this.atkArmyVec[_loc4_].setArmyName(_loc9_); + this.atkArmyVec[_loc4_].setHeroLv(_loc10_); + _loc11_ += _loc3_[_loc4_].power; + _loc4_++; + } + this.dfcArmyVec[0].setHeroName("世界BOSS"); + this.dfcArmyVec[0].setHeroLv("9999"); + this.dfcArmyVec[0].setArmyName("boss"); + this.dfcArmyVec[0].setInitNum("0"); + this.dfcArmyVec[0].setLoseNum("0"); + this.dfcArmyVec[0].setResumeNum("0"); + this.xianjing_txt.text = "" + _loc11_; + } + + public function update(param1:DimensionCombat) : void + { + var _loc2_:DimensionCombatTroop = param1.attackTroop; + var _loc3_:DimensionCombatTroop = param1.defenceTroop; + var _loc4_:String = param1.winnerShowInfo; + var _loc5_:String = param1.loserShowInfo; + if(param1.winResult == "ATTACKER") + { + this.isAtkWin = true; + } + else + { + this.isAtkWin = false; + } + this.init(_loc2_,0,_loc3_.gunList); + this.init(_loc3_,1,_loc2_.gunList); + var _loc6_:int = 1; + if(_loc2_.userName == NewUserData.getUser().userName) + { + if(this.isAtkWin) + { + _loc6_ = 1; + this.my_txt.htmlText = _loc4_; + this.you_txt.htmlText = _loc5_; + this.title2.setTitleName("攻方收获"); + this.title3.setTitleName("守方损失"); + } + else + { + _loc6_ = 2; + this.my_txt.htmlText = _loc5_; + this.you_txt.htmlText = _loc4_; + this.title2.setTitleName("攻方损失"); + this.title3.setTitleName("守方收获"); + } + } + else if(this.isAtkWin) + { + _loc6_ = 2; + this.my_txt.htmlText = _loc4_; + this.you_txt.htmlText = _loc5_; + this.title2.setTitleName("攻方收获"); + this.title3.setTitleName("守方损失"); + } + else + { + _loc6_ = 1; + this.my_txt.htmlText = _loc5_; + this.you_txt.htmlText = _loc4_; + this.title2.setTitleName("攻方损失"); + this.title3.setTitleName("守方收获"); + } + this.battleResult.title_mc.gotoAndStop(_loc6_); + this.loaderAtk = new LoadResource("pic/head/" + _loc2_.userIcon,this.loadAtkBack); + this.user1_txt.text = _loc2_.userName; + if(_loc2_.rankId > 0) + { + this.lv1_txt.text = _loc2_.rankId + ""; + } + this.guild1_txt.text = String(_loc2_.guildName); + this.loaderDfc = new LoadResource("pic/head/" + _loc3_.userIcon,this.loadDfcBack); + this.user2_txt.text = _loc3_.userName; + this.lv2_txt.text = "无"; + if(_loc3_.rankId > 0) + { + this.lv2_txt.text = _loc3_.rankId + ""; + } + this.guild2_txt.text = String(_loc3_.guildName); + } + + private function loadAtkBack(param1:Event) : void + { + if(Boolean(this.atkImg) && this.headSp1.contains(this.atkImg)) + { + this.headSp1.removeChild(this.atkImg); + } + this.atkImg = Bitmap(param1.target.loader.content); + this.loaderAtk.clear(); + this.headSp1.addChild(this.atkImg); + this.atkImg.x = 2; + this.atkImg.y = 2; + } + + private function loadDfcBack(param1:Event) : void + { + if(Boolean(this.dfcImg) && this.headSp2.contains(this.dfcImg)) + { + this.headSp2.removeChild(this.dfcImg); + } + this.dfcImg = Bitmap(param1.target.loader.content); + this.loaderDfc.clear(); + this.headSp2.addChild(this.dfcImg); + this.dfcImg.x = 2; + this.dfcImg.y = 2; + } + + private function initTower(param1:Array) : void + { + this.gunmu_txt.text = ""; + this.juma_txt.text = ""; + this.leishi_txt.text = ""; + this.xianjing_txt.text = ""; + this.nujian_txt.text = ""; + if(param1 == null || param1.length == 0) + { + return; + } + var _loc2_:* = undefined; + var _loc3_:* = undefined; + var _loc4_:* = undefined; + var _loc5_:* = 342; + var _loc6_:* = 140; + var _loc7_:* = 0; + while(_loc7_ < param1.length) + { + _loc2_ = param1[_loc7_]; + _loc3_ = _loc2_.army.armyType; + _loc4_ = int(int(_loc2_.initNum) - int(_loc2_.curNum)); + switch(_loc3_) + { + case ArmyType.TAT_GUNMU: + this.gunmu_txt.text = String(_loc4_) + " 滚木"; + break; + case ArmyType.TAT_JUMA: + this.juma_txt.text = String(_loc4_) + " 拒马"; + break; + case ArmyType.TAT_LEISHI: + this.leishi_txt.text = String(_loc4_) + " 礌石"; + break; + case ArmyType.TAT_XIANJING: + this.xianjing_txt.text = String(_loc4_) + " 陷阱"; + break; + case ArmyType.TAT_NUJIAN: + this.nujian_txt.text = String(_loc4_) + " 弩箭"; + } + _loc7_ += 1; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/BattleTextBar.as b/flash_decompiled/com/view/ui/battleview/mc/BattleTextBar.as new file mode 100644 index 0000000..2d66bed --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/BattleTextBar.as @@ -0,0 +1,78 @@ +package com.view.ui.battleview.mc +{ + import com.common.PublicGlow; + import fl.controls.UIScrollBar; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BattleTextBar extends Sprite + { + + private var tf:TextField; + + private var sb:UIScrollBar = new UIScrollBar(); + + private var _width:int; + + private var _height:int; + + private var css:TextFormat; + + public function BattleTextBar(param1:int = 212, param2:int = 112) + { + super(); + this._width = param1; + this._height = param2; + this.createTextField(); + this.assignScrollBar(); + } + + private function createTextField() : void + { + this.css = new TextFormat(); + this.css.leading = 2; + this.tf = new TextField(); + this.tf.width = this._width; + this.tf.height = this._height; + this.tf.wordWrap = true; + this.tf.multiline = true; + this.tf.textColor = 16777215; + this.tf.htmlText = ""; + addChild(this.tf); + this.tf.filters = [PublicGlow.getInstance().blackGlow]; + } + + public function print(param1:String) : void + { + this.tf.htmlText += param1 + "
"; + this.tf.setTextFormat(this.css); + this.sb.scrollPosition = this.sb.maxScrollPosition; + this.sb.update(); + } + + public function setText(param1:String) : void + { + this.tf.htmlText = param1; + this.tf.setTextFormat(this.css); + this.sb.scrollPosition = this.sb.maxScrollPosition; + this.sb.update(); + } + + private function assignScrollBar() : void + { + this.sb = new UIScrollBar(); + this.sb.move(this.tf.x + this.tf.width,this.tf.y); + this.sb.setSize(this.sb.width,this.tf.height); + this.sb.scrollTarget = this.tf; + addChild(this.sb); + } + + public function clear() : void + { + this.tf.htmlText = ""; + this.sb.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/Bosser.as b/flash_decompiled/com/view/ui/battleview/mc/Bosser.as new file mode 100644 index 0000000..1b7aaa6 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/Bosser.as @@ -0,0 +1,116 @@ +package com.view.ui.battleview.mc +{ + import com.InstallFace; + import com.view.ui.battle.BattleRes; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.Event; + import flash.utils.getTimer; + + public class Bosser extends Sprite + { + + public var imgVec:Vector.; + + public var battleRes:BattleRes; + + public var face:InstallFace; + + private var actType:int = 1; + + public var isPlay:Boolean; + + private var currTime:int; + + public var beginFrame:int; + + public var endFrame:int; + + public var timer:int = 100; + + public var characBitMap:Bitmap; + + public var currFrame:int; + + public var bloodCount:int; + + public function Bosser() + { + var _loc2_:BitmapData = null; + this.battleRes = BattleRes.getInstance(); + this.face = InstallFace.getInstance(); + super(); + this.imgVec = new Vector.(); + var _loc1_:int = 1; + while(_loc1_ < 12) + { + _loc2_ = this.battleRes.getPng("boss_" + _loc1_); + this.imgVec.push(_loc2_); + _loc1_++; + } + this.characBitMap = new Bitmap(); + addChild(this.characBitMap); + this.characBitMap.x = -280; + this.characBitMap.y = -180; + } + + public function stand() : void + { + this.actType = 1; + this.beginFrame = 0; + this.endFrame = 3; + } + + public function fight() : void + { + this.actType = 2; + this.beginFrame = 4; + this.endFrame = 10; + } + + public function beginPlay() : void + { + if(this.isPlay == false) + { + this.isPlay = true; + this.face.stage.addEventListener(Event.ENTER_FRAME,this.frame); + } + } + + private function frame(param1:Event) : void + { + if(getTimer() - this.currTime > this.timer) + { + this.currTime = getTimer(); + this.doAction(); + } + } + + public function doAction() : void + { + this.characBitMap.bitmapData = this.imgVec[this.currFrame]; + ++this.currFrame; + if(this.currFrame == this.endFrame + 1) + { + if(this.actType == 2) + { + this.stand(); + } + this.currFrame = this.beginFrame; + } + } + + public function dropBlood(param1:int) : void + { + var _loc2_:FightTextMc = null; + _loc2_ = new FightTextMc(); + addChild(_loc2_); + _loc2_.x = -50; + _loc2_.y = -60; + _loc2_.viewBlood(param1); + this.bloodCount -= param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/CopyResult.as b/flash_decompiled/com/view/ui/battleview/mc/CopyResult.as new file mode 100644 index 0000000..655a061 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/CopyResult.as @@ -0,0 +1,474 @@ +package com.view.ui.battleview.mc +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.newdata.user.NewUserData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.battleview.BattleBaseView; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.events.Event; + import flash.text.TextField; + import flash.text.TextFormat; + + public class CopyResult extends BattleBaseView + { + + private var battleResult:MovieClip; + + private var isAtkWin:Boolean; + + private var towerTeams:Array; + + private var atkArmyVec:Vector.; + + private var dfcArmyVec:Vector.; + + private var headSp1:UIWindowBg; + + private var headSp2:UIWindowBg; + + private var user1_txt:TextField; + + private var lv1_txt:TextField; + + private var guild1_txt:TextField; + + private var user2_txt:TextField; + + private var lv2_txt:TextField; + + private var guild2_txt:TextField; + + private var xianjing_txt:TextField; + + private var gunmu_txt:TextField; + + private var juma_txt:TextField; + + private var leishi_txt:TextField; + + private var nujian_txt:TextField; + + private var my_txt:TextField; + + private var you_txt:TextField; + + private var closeBtn:UIButton; + + private var title2:UITitleBg; + + private var title3:UITitleBg; + + private var loaderAtk:LoadResource; + + private var atkImg:Bitmap; + + private var loaderDfc:LoadResource; + + private var dfcImg:Bitmap; + + public function CopyResult() + { + var _loc8_:TextField = null; + var _loc9_:TextField = null; + var _loc13_:TextField = null; + var _loc20_:ResultItem = null; + var _loc21_:ResultItem = null; + super(); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.leading = 4; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(920,471); + addChild(_loc2_); + var _loc3_:UITitleBg = new UITitleBg("战斗结果",_loc2_.width); + _loc2_.addChild(_loc3_); + _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2); + var _loc4_:Array = ["武将","等级","军队","数量","损失","通天炮损失","恢复"]; + var _loc5_:Array = [100,50,60,60,60,70,60]; + var _loc6_:UITable = new UITable(); + _loc6_.drawLine = true; + _loc6_.install(5,_loc4_,_loc5_); + _loc2_.addChild(_loc6_); + _loc6_.x = 5; + _loc6_.y = 140; + var _loc7_:UITable = new UITable(); + _loc7_.drawLine = true; + _loc7_.install(5,_loc4_,_loc5_); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc6_.x + 462; + _loc7_.y = _loc6_.y; + this.headSp1 = new UIWindowBg(); + this.headSp1.initSecondPanel(88,88); + _loc2_.addChild(this.headSp1); + this.headSp1.x = 10; + this.headSp1.y = 35; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc8_.text = "君 主:"; + _loc2_.addChild(_loc8_); + _loc8_.x = 120; + _loc8_.y = 40; + this.user1_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.user1_txt); + this.user1_txt.x = _loc8_.x + _loc8_.width; + this.user1_txt.y = _loc8_.y; + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc9_.text = "等 级:"; + _loc2_.addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y + 30; + this.lv1_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.lv1_txt); + this.lv1_txt.x = this.user1_txt.x; + this.lv1_txt.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc10_.text = "联 盟:"; + _loc2_.addChild(_loc10_); + _loc10_.x = _loc8_.x; + _loc10_.y = _loc9_.y + 30; + this.guild1_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.guild1_txt); + this.guild1_txt.x = this.user1_txt.x; + this.guild1_txt.y = _loc10_.y; + this.headSp2 = new UIWindowBg(); + this.headSp2.initSecondPanel(88,88); + _loc2_.addChild(this.headSp2); + this.headSp2.x = 820; + this.headSp2.y = this.headSp1.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc11_.text = "君 主:"; + _loc2_.addChild(_loc11_); + _loc11_.x = 550; + _loc11_.y = _loc8_.y; + this.user2_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.user2_txt); + this.user2_txt.x = _loc11_.x + _loc11_.width; + this.user2_txt.y = _loc11_.y; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc12_.text = "等 级:"; + _loc2_.addChild(_loc12_); + _loc12_.x = _loc11_.x; + _loc12_.y = _loc11_.y + 30; + this.lv2_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.lv2_txt); + this.lv2_txt.x = this.user2_txt.x; + this.lv2_txt.y = _loc12_.y; + _loc13_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc13_.text = "联 盟:"; + _loc2_.addChild(_loc13_); + _loc13_.x = _loc12_.x; + _loc13_.y = _loc12_.y + 30; + this.guild2_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.guild2_txt); + this.guild2_txt.x = this.lv2_txt.x; + this.guild2_txt.y = _loc13_.y; + var _loc14_:UIWindowBg = new UIWindowBg(); + _loc14_.initThirdPanel(908,20); + _loc2_.addChild(_loc14_); + _loc14_.x = _loc6_.x; + _loc14_.y = _loc6_.y + _loc6_.height + 3; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,90); + _loc14_.addChild(_loc15_); + _loc15_.x = 60; + _loc15_.y = 7; + _loc15_.text = "守方城防消耗:"; + this.xianjing_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.xianjing_txt); + this.xianjing_txt.x = _loc15_.x + _loc15_.width; + this.xianjing_txt.y = _loc15_.y; + this.gunmu_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.gunmu_txt); + this.gunmu_txt.x = this.xianjing_txt.x + 110; + this.gunmu_txt.y = _loc15_.y; + this.juma_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.juma_txt); + this.juma_txt.x = this.gunmu_txt.x + 110; + this.juma_txt.y = _loc15_.y; + this.leishi_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.leishi_txt); + this.leishi_txt.x = this.juma_txt.x + 110; + this.leishi_txt.y = _loc15_.y; + this.nujian_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc14_.addChild(this.nujian_txt); + this.nujian_txt.x = this.leishi_txt.x + 110; + this.nujian_txt.y = _loc15_.y; + var _loc16_:UIWindowBg = new UIWindowBg(); + _loc16_.initThirdPanel(447,110); + _loc2_.addChild(_loc16_); + _loc16_.x = _loc6_.x; + _loc16_.y = _loc14_.y + _loc14_.height + 3; + var _loc17_:UIWindowBg = new UIWindowBg(); + _loc17_.initThirdPanel(447,110); + _loc2_.addChild(_loc17_); + _loc17_.x = _loc7_.x; + _loc17_.y = _loc16_.y; + this.title2 = new UITitleBg("攻方损失",_loc16_.width); + _loc16_.addChild(this.title2); + this.title2.x = int(_loc16_.width / 2 - this.title2.width / 2); + this.title3 = new UITitleBg("守方损失",_loc17_.width); + _loc17_.addChild(this.title3); + this.title3.x = int(_loc17_.width / 2 - this.title3.width / 2); + this.my_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,420); + this.my_txt.height = 90; + this.my_txt.wordWrap = true; + this.my_txt.multiline = true; + _loc16_.addChild(this.my_txt); + this.my_txt.x = 4; + this.my_txt.y = 26; + this.my_txt.defaultTextFormat = _loc1_; + this.you_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,420); + this.you_txt.height = 90; + this.you_txt.wordWrap = true; + this.you_txt.multiline = true; + _loc17_.addChild(this.you_txt); + this.you_txt.x = 4; + this.you_txt.y = 26; + this.you_txt.defaultTextFormat = _loc1_; + this.atkArmyVec = new Vector.(); + var _loc18_:int = 0; + while(_loc18_ < 5) + { + _loc20_ = new ResultItem(); + _loc20_.x = 4; + _loc20_.y = 29 + _loc18_ * 25; + _loc6_.addChild(_loc20_); + this.atkArmyVec.push(_loc20_); + _loc18_++; + } + this.dfcArmyVec = new Vector.(); + var _loc19_:int = 0; + while(_loc19_ < 6) + { + _loc21_ = new ResultItem(); + _loc21_.x = 4; + _loc21_.y = 29 + _loc19_ * 25; + _loc7_.addChild(_loc21_); + this.dfcArmyVec.push(_loc21_); + _loc19_++; + } + this.battleResult = battleRes.getMovieClip(ClassConfig.battle_result); + _loc2_.addChild(this.battleResult); + this.battleResult.x = 285; + this.battleResult.y = 40; + this.closeBtn = new UIButton("关 闭",2,10); + _loc2_.addChild(this.closeBtn); + this.closeBtn.x = 435; + this.closeBtn.y = 452; + } + + override public function setPosition() : void + { + } + + public function setCloseFun(param1:Function) : void + { + this.closeBtn.onClick = param1; + } + + override public function removeFromStage(param1:Event) : void + { + var _loc2_:ResultItem = null; + var _loc3_:ResultItem = null; + super.removeFromStage(param1); + for each(_loc2_ in this.dfcArmyVec) + { + _loc2_.clear(); + } + for each(_loc3_ in this.atkArmyVec) + { + _loc3_.clear(); + } + if(Boolean(this.atkImg) && this.headSp1.contains(this.atkImg)) + { + this.headSp1.removeChild(this.atkImg); + } + if(Boolean(this.dfcImg) && this.headSp2.contains(this.dfcImg)) + { + this.headSp2.removeChild(this.dfcImg); + } + } + + public function update(param1:Object) : void + { + if(param1 == null) + { + return; + } + var _loc2_:Object = param1.atkInfo; + var _loc3_:Object = param1.defInfo; + var _loc4_:String = param1.winnerShowInfo; + var _loc5_:String = param1.loserShowInfo; + if(param1.winResult == "ATTACKER") + { + this.isAtkWin = true; + } + else + { + this.isAtkWin = false; + } + this.init(_loc2_,0,param1.defGunMap); + this.init(_loc3_,1,param1.atkGunMap); + var _loc6_:int = 1; + if(_loc2_.userName == NewUserData.getUser().userName) + { + if(this.isAtkWin) + { + _loc6_ = 1; + this.my_txt.htmlText = _loc4_; + this.you_txt.htmlText = _loc5_; + this.title2.setTitleName("攻方收获"); + this.title3.setTitleName("守方损失"); + } + else + { + _loc6_ = 2; + this.my_txt.htmlText = _loc5_; + this.you_txt.htmlText = _loc4_; + this.title2.setTitleName("攻方损失"); + this.title3.setTitleName("守方收获"); + } + } + else if(this.isAtkWin) + { + _loc6_ = 2; + this.my_txt.htmlText = _loc4_; + this.you_txt.htmlText = _loc5_; + this.title2.setTitleName("攻方收获"); + this.title3.setTitleName("守方损失"); + } + else + { + _loc6_ = 1; + this.my_txt.htmlText = _loc5_; + this.you_txt.htmlText = _loc4_; + this.title2.setTitleName("攻方损失"); + this.title3.setTitleName("守方收获"); + } + this.battleResult.title_mc.gotoAndStop(_loc6_); + this.loaderAtk = new LoadResource("pic/head/" + _loc2_.userIcon,this.loadAtkBack); + this.user1_txt.text = _loc2_.userName; + if(_loc2_.rankId > 0) + { + this.lv1_txt.text = _loc2_.rankId + ""; + } + this.guild1_txt.text = String(_loc2_.guildName); + this.loaderDfc = new LoadResource("pic/head/" + _loc3_.userIcon,this.loadDfcBack); + this.user2_txt.text = _loc3_.userName; + this.lv2_txt.text = "无"; + if(_loc3_.rankId > 0) + { + this.lv2_txt.text = _loc3_.rankId + ""; + } + this.guild2_txt.text = String(_loc3_.guildName); + } + + private function init(param1:Object, param2:int, param3:Array) : void + { + var _loc7_:String = null; + var _loc8_:String = null; + var _loc9_:String = null; + var _loc10_:String = null; + var _loc11_:String = null; + var _loc12_:String = null; + var _loc4_:Object = undefined; + var _loc5_:Array = param1.teams as Array; + var _loc6_:int = 0; + while(_loc6_ < _loc5_.length) + { + _loc4_ = _loc5_[_loc6_]; + _loc7_ = _loc4_.heroName; + _loc8_ = _loc4_.initNum.toString(); + _loc9_ = _loc4_.initNum.toString(); + _loc10_ = "0"; + _loc10_ = _loc4_.loseNum.toString(); + if(_loc4_.teamId == "wall") + { + _loc6_++; + } + else + { + if(_loc4_.teamId.indexOf("unit_") > -1) + { + _loc12_ = "-"; + _loc11_ = _loc4_.army.armyName; + } + else + { + _loc12_ = _loc4_.heroLevel.toString(); + _loc11_ = _loc4_.army.armyName; + } + if(param2 == 0) + { + this.atkArmyVec[_loc6_].setHeroName(_loc7_); + this.atkArmyVec[_loc6_].setInitNum(_loc8_); + this.atkArmyVec[_loc6_].setResumeNum(_loc9_); + this.atkArmyVec[_loc6_].setLoseNum(_loc10_); + this.atkArmyVec[_loc6_].setArmyName(_loc11_); + this.atkArmyVec[_loc6_].setHeroLv(_loc12_); + this.atkArmyVec[_loc6_].setGunNum(this.getGunNums(param3,_loc4_.teamId) + ""); + } + else + { + this.dfcArmyVec[_loc6_].setHeroName(_loc7_); + this.dfcArmyVec[_loc6_].setInitNum(_loc8_); + this.dfcArmyVec[_loc6_].setResumeNum(_loc9_); + this.dfcArmyVec[_loc6_].setLoseNum(_loc10_); + this.dfcArmyVec[_loc6_].setArmyName(_loc11_); + this.dfcArmyVec[_loc6_].setHeroLv(_loc12_); + this.dfcArmyVec[_loc6_].setGunNum(this.getGunNums(param3,_loc4_.teamId) + ""); + } + _loc6_++; + } + } + } + + private function getGunNums(param1:Array, param2:String) : int + { + var _loc3_:Object = null; + if(param1 == null) + { + return 0; + } + for each(_loc3_ in param1) + { + if(_loc3_.id == param2) + { + return int(_loc3_.nums); + } + } + return 0; + } + + private function loadAtkBack(param1:Event) : void + { + if(Boolean(this.atkImg) && this.headSp1.contains(this.atkImg)) + { + this.headSp1.removeChild(this.atkImg); + } + this.atkImg = Bitmap(param1.target.loader.content); + this.loaderAtk.clear(); + this.headSp1.addChild(this.atkImg); + this.atkImg.x = 2; + this.atkImg.y = 2; + } + + private function loadDfcBack(param1:Event) : void + { + if(Boolean(this.dfcImg) && this.headSp2.contains(this.dfcImg)) + { + this.headSp2.removeChild(this.dfcImg); + } + this.dfcImg = Bitmap(param1.target.loader.content); + this.loaderDfc.clear(); + this.headSp2.addChild(this.dfcImg); + this.dfcImg.x = 2; + this.dfcImg.y = 2; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/FightTextMc.as b/flash_decompiled/com/view/ui/battleview/mc/FightTextMc.as new file mode 100644 index 0000000..1e67a72 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/FightTextMc.as @@ -0,0 +1,109 @@ +package com.view.ui.battleview.mc +{ + import com.greensock.TweenMax; + import com.view.ui.battle.BattleRes; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + + public class FightTextMc extends Sprite + { + + private var mc:Sprite; + + public var battleRes:BattleRes = BattleRes.getInstance(); + + public function FightTextMc() + { + super(); + } + + public function viewBlood(param1:int) : void + { + var _loc2_:BitmapData = null; + var _loc5_:String = null; + var _loc6_:Bitmap = null; + this.mc = new Sprite(); + addChild(this.mc); + if(param1 < 0) + { + _loc2_ = this.battleRes.getPng("png_12"); + } + else + { + _loc2_ = this.battleRes.getPng("png_11"); + } + this.mc.addChild(new Bitmap(_loc2_)); + var _loc3_:String = param1.toString(); + var _loc4_:int = 0; + while(_loc4_ < _loc3_.length) + { + _loc5_ = _loc3_.charAt(_loc4_); + _loc6_ = new Bitmap(this.battleRes.getPng("png_" + _loc5_)); + this.mc.addChild(_loc6_); + _loc6_.x = 20 + _loc4_ * 20; + _loc4_++; + } + try + { + TweenMax.to(this.mc,2,{ + "alpha":0, + "y":-50, + "onComplete":this.complete + }); + } + catch(e:Error) + { + } + } + + private function complete() : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function viewText(param1:String) : void + { + this.mc = new Sprite(); + addChild(this.mc); + var _loc2_:BitmapData = this.battleRes.getPng(param1); + this.mc.addChild(new Bitmap(_loc2_)); + this.mc.width = 60; + this.mc.height = 23; + try + { + TweenMax.to(this.mc,1,{ + "alpha":0.1, + "y":-50, + "onComplete":this.complete + }); + } + catch(e:Error) + { + } + } + + public function showSkillEff(param1:String) : void + { + this.mc = new Sprite(); + addChild(this.mc); + var _loc2_:BitmapData = this.battleRes.getPng(param1); + this.mc.addChild(new Bitmap(_loc2_)); + try + { + TweenMax.to(this.mc,1.5,{ + "alpha":1, + "y":-50, + "onComplete":this.complete + }); + } + catch(e:Error) + { + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/GunMc.as b/flash_decompiled/com/view/ui/battleview/mc/GunMc.as new file mode 100644 index 0000000..1023d6a --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/GunMc.as @@ -0,0 +1,79 @@ +package com.view.ui.battleview.mc +{ + import com.comfig.ClassConfig; + import com.view.newui.UILabel; + import com.view.ui.battle.BattleRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class GunMc extends Sprite + { + + private var gunMc:MovieClip; + + private var battleRes:BattleRes = BattleRes.getInstance(); + + private var gunLv:int; + + private var gunLvLabel:UILabel; + + public function GunMc() + { + super(); + this.gunMc = this.battleRes.getMovieClip(ClassConfig.battle_gun); + addChild(this.gunMc); + this.gunMc.gotoAndStop(20); + this.gunLvLabel = new UILabel(100); + this.gunMc.addChild(this.gunLvLabel); + this.gunLvLabel.x = -40; + this.gunLvLabel.y = 30; + addEventListener(Event.ENTER_FRAME,this.winFrame); + } + + public function play() : void + { + this.gunMc.gotoAndPlay(1); + } + + public function setGunLv(param1:int) : void + { + this.gunLv = param1; + this.gunLvLabel.setText(param1 + "级通天炮级"); + } + + public function setGunType(param1:int) : void + { + if(param1 == 1) + { + this.gunMc.scaleX = 1; + this.gunLvLabel.scaleX = 1; + } + else + { + this.gunMc.scaleX = -1; + this.gunLvLabel.scaleX = -1; + this.gunLvLabel.x = 50; + } + if(Boolean(this.gunMc) && contains(this.gunMc) == false) + { + addChild(this.gunMc); + this.gunMc.gotoAndStop(20); + } + } + + private function winFrame(param1:Event) : void + { + if(this.gunMc.currentFrame >= 25) + { + this.gunMc.stop(); + if(contains(this.gunMc)) + { + removeChild(this.gunMc); + } + this.gunLvLabel.setText(""); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/LightMc.as b/flash_decompiled/com/view/ui/battleview/mc/LightMc.as new file mode 100644 index 0000000..a17ce0b --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/LightMc.as @@ -0,0 +1,60 @@ +package com.view.ui.battleview.mc +{ + import com.view.ui.battle.BattleRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class LightMc extends Sprite + { + + public static var battleRes:BattleRes = BattleRes.getInstance(); + + private var isPlay:Boolean; + + private var mc:MovieClip; + + public function LightMc() + { + super(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + } + + private function addEvent(param1:Event) : void + { + addEventListener(Event.ENTER_FRAME,this.frame); + } + + private function delEvent(param1:Event) : void + { + removeEventListener(Event.ENTER_FRAME,this.frame); + } + + public function play(param1:String) : void + { + this.mc = battleRes.getMovieClip(param1); + addChild(this.mc); + this.mc.gotoAndPlay(1); + this.isPlay = true; + } + + private function frame(param1:Event) : void + { + if(this.isPlay) + { + if(this.mc) + { + if(this.mc.currentFrame >= this.mc.totalFrames) + { + this.isPlay = false; + this.mc.stop(); + removeChild(this.mc); + this.mc = null; + } + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/NumberMC.as b/flash_decompiled/com/view/ui/battleview/mc/NumberMC.as new file mode 100644 index 0000000..1f680ba --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/NumberMC.as @@ -0,0 +1,116 @@ +package com.view.ui.battleview.mc +{ + import com.view.ui.battle.BattleRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.utils.clearInterval; + import flash.utils.setInterval; + + public class NumberMC extends Sprite + { + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var valid:uint; + + private var _auto:Boolean = false; + + private var _value:int; + + private var mc:Sprite; + + public function NumberMC() + { + super(); + } + + public function set value(param1:int) : void + { + var b:int; + var oldvalue:int = 0; + var n:int = 0; + var currValue:int = 0; + oldvalue = this._value; + n = -1; + currValue = param1; + if(oldvalue == currValue) + { + return; + } + b = int(Math.abs(currValue - oldvalue) / 20); + if(b > 0) + { + n *= b; + } + clearInterval(this.valid); + if(this._auto && currValue != 0) + { + this.valid = setInterval(function():void + { + oldvalue += n; + if(oldvalue <= currValue) + { + oldvalue = currValue; + } + setValue(oldvalue); + if(oldvalue == currValue) + { + clearInterval(valid); + } + },20); + } + else + { + this.setValue(currValue); + } + } + + private function setValue(param1:int) : void + { + var _loc2_:String = null; + var _loc3_:Bitmap = null; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc4_:* = param1; + this._value = _loc4_; + if(this.mc) + { + if(this.contains(this.mc)) + { + this.removeChild(this.mc); + } + } + this.mc = new Sprite(); + this.addChild(this.mc); + var _loc5_:String = this._value.toString(); + while(_loc7_ < _loc5_.length) + { + _loc2_ = _loc5_.charAt(_loc7_); + try + { + _loc3_ = new Bitmap(this.battleRes.getPng("png_" + _loc2_)); + _loc3_.x = _loc6_; + _loc6_ += _loc3_.width; + _loc3_.y = 0; + this.mc.addChild(_loc3_); + } + catch(e:Error) + { + } + _loc7_ += 1; + } + this.mc.x = -this.mc.width / 2; + } + + public function set autoPlay(param1:Boolean) : void + { + this._auto = param1; + } + + public function get value() : int + { + return this._value; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/ResultItem.as b/flash_decompiled/com/view/ui/battleview/mc/ResultItem.as new file mode 100644 index 0000000..b711be0 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/ResultItem.as @@ -0,0 +1,110 @@ +package com.view.ui.battleview.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ResultItem extends Sprite + { + + public var loseNum_txt:TextField; + + public var initNum_txt:TextField; + + public var resumeNum_txt:TextField; + + public var army_txt:TextField; + + public var lv_txt:TextField; + + public var name_txt:TextField; + + public var gun_txt:TextField; + + public var jingyan_txt:TextField; + + private var centerCss:TextFormat; + + public function ResultItem() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.name_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,96); + this.lv_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + this.army_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.initNum_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.loseNum_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.gun_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.resumeNum_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.name_txt); + addChild(this.lv_txt); + this.lv_txt.x = this.name_txt.width; + addChild(this.army_txt); + this.army_txt.x = this.lv_txt.x + this.lv_txt.width; + addChild(this.initNum_txt); + this.initNum_txt.x = this.army_txt.x + this.army_txt.width; + addChild(this.loseNum_txt); + this.loseNum_txt.x = this.initNum_txt.x + this.initNum_txt.width; + addChild(this.gun_txt); + this.gun_txt.x = this.loseNum_txt.x + this.loseNum_txt.width; + addChild(this.resumeNum_txt); + this.resumeNum_txt.x = this.gun_txt.x + this.gun_txt.width; + this.name_txt.defaultTextFormat = this.centerCss; + this.lv_txt.defaultTextFormat = this.centerCss; + this.army_txt.defaultTextFormat = this.centerCss; + this.initNum_txt.defaultTextFormat = this.centerCss; + this.loseNum_txt.defaultTextFormat = this.centerCss; + this.resumeNum_txt.defaultTextFormat = this.centerCss; + this.gun_txt.defaultTextFormat = this.centerCss; + } + + public function setHeroLv(param1:String) : void + { + this.lv_txt.text = param1; + } + + public function setLoseNum(param1:String) : void + { + this.loseNum_txt.text = param1; + } + + public function setInitNum(param1:String) : void + { + this.initNum_txt.text = param1; + } + + public function setArmyName(param1:String) : void + { + this.army_txt.text = param1; + } + + public function setHeroName(param1:String) : void + { + this.name_txt.htmlText = param1; + } + + public function setResumeNum(param1:String) : void + { + this.resumeNum_txt.text = param1; + } + + public function setGunNum(param1:String) : void + { + this.gun_txt.text = param1; + } + + public function clear() : void + { + this.lv_txt.text = ""; + this.loseNum_txt.text = ""; + this.initNum_txt.text = ""; + this.army_txt.text = ""; + this.name_txt.htmlText = ""; + this.resumeNum_txt.text = ""; + this.gun_txt.text = ""; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/SkillEffMc.as b/flash_decompiled/com/view/ui/battleview/mc/SkillEffMc.as new file mode 100644 index 0000000..9394d22 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/SkillEffMc.as @@ -0,0 +1,65 @@ +package com.view.ui.battleview.mc +{ + import com.view.ui.battle.BattleRes; + import com.view.ui.battleview.SkillEffect; + import flash.display.BlendMode; + import flash.display.MovieClip; + import flash.events.Event; + + public class SkillEffMc extends MovieClip + { + + public static var battleRes:BattleRes = BattleRes.getInstance(); + + private var isPlay:Boolean; + + private var mc:MovieClip; + + public function SkillEffMc() + { + super(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + } + + private function addEvent(param1:Event) : void + { + addEventListener(Event.ENTER_FRAME,this.frame); + } + + private function delEvent(param1:Event) : void + { + removeEventListener(Event.ENTER_FRAME,this.frame); + } + + public function playMc(param1:int) : void + { + this.mc = battleRes.getMovieClip(SkillEffect.getEffBySkillType(param1)); + if(param1 == 2 || param1 == 3 || param1 == 5) + { + this.mc.blendMode = BlendMode.ADD; + } + addChild(this.mc); + this.mc.gotoAndPlay(1); + this.isPlay = true; + } + + private function frame(param1:Event) : void + { + if(this.isPlay) + { + if(this.mc) + { + if(this.mc.currentFrame >= this.mc.totalFrames) + { + this.isPlay = false; + this.mc.stop(); + removeChild(this.mc); + this.mc = null; + } + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/UserHead.as b/flash_decompiled/com/view/ui/battleview/mc/UserHead.as new file mode 100644 index 0000000..fad8e35 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/UserHead.as @@ -0,0 +1,60 @@ +package com.view.ui.battleview.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.view.ui.battle.BattleRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class UserHead extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var headBg:Sprite; + + private var load:LoadResource; + + public function UserHead() + { + super(); + var _loc1_:Sprite = this.battleRes.getSprite(ClassConfig.battle_headbg); + addChild(_loc1_); + _loc1_.width = 90; + _loc1_.height = 90; + this.headBg = new Sprite(); + addChild(this.headBg); + } + + public function loadHead(param1:String) : void + { + var _loc2_:String = "pic/head/" + param1; + this.load = new LoadResource(_loc2_,this.loadHeadBack); + } + + private function loadHeadBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.load.clear(); + this.headBg.addChild(_loc2_); + _loc2_.width = 85; + _loc2_.height = 87; + var _loc3_:Sprite = this.battleRes.getSprite(ClassConfig.battle_headmask); + _loc3_.width = 78; + _loc3_.height = 78; + this.headBg.addChild(_loc3_); + _loc3_.x = 7; + _loc3_.y = 8; + this.headBg.mask = _loc3_; + } + + public function clear() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/UserInfo.as b/flash_decompiled/com/view/ui/battleview/mc/UserInfo.as new file mode 100644 index 0000000..de4d5f3 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/UserInfo.as @@ -0,0 +1,93 @@ +package com.view.ui.battleview.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + import flash.text.TextField; + + public class UserInfo extends Sprite + { + + private var currType:int; + + private var userName:TextField; + + private var guildName:TextField; + + private var powerText:TextField; + + public function UserInfo(param1:int) + { + var _loc7_:TextField = null; + super(); + this.currType = param1; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(140,60); + addChild(_loc2_); + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,34); + _loc2_.addChild(_loc3_); + _loc3_.text = "君主:"; + _loc3_.y = 10; + var _loc4_:Sprite = PublicMethod.getTrLine(138); + _loc2_.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = _loc3_.y + 18; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,34); + _loc2_.addChild(_loc5_); + _loc5_.text = "联盟:"; + _loc5_.y = _loc3_.y + 20; + var _loc6_:Sprite = PublicMethod.getTrLine(138); + _loc2_.addChild(_loc6_); + _loc6_.x = 5; + _loc6_.y = _loc4_.y + 20; + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,34); + _loc2_.addChild(_loc7_); + _loc7_.text = "战力:"; + _loc7_.y = _loc5_.y + 20; + this.userName = PublicMethod.getTextFieldWithFillter(16773120,100); + _loc2_.addChild(this.userName); + this.userName.y = _loc3_.y; + this.guildName = PublicMethod.getTextFieldWithFillter(16773120,100); + _loc2_.addChild(this.guildName); + this.guildName.y = _loc5_.y; + this.powerText = PublicMethod.getTextFieldWithFillter(16773120,100); + _loc2_.addChild(this.powerText); + this.powerText.y = _loc7_.y; + if(this.currType == 1) + { + _loc3_.x = 18; + _loc5_.x = _loc3_.x; + _loc7_.x = _loc3_.x; + this.userName.x = _loc3_.x + _loc3_.width; + this.guildName.x = this.userName.x; + this.powerText.x = this.userName.x; + } + else + { + _loc3_.x = 10; + _loc5_.x = _loc3_.x; + _loc7_.x = _loc3_.x; + this.userName.x = _loc3_.x + _loc3_.width; + this.guildName.x = this.userName.x; + this.powerText.x = this.userName.x; + } + } + + public function setUserName(param1:String) : void + { + this.userName.text = param1; + } + + public function setGuildName(param1:String) : void + { + this.guildName.text = param1; + } + + public function setPower(param1:String) : void + { + this.powerText.text = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/XuanyunMc.as b/flash_decompiled/com/view/ui/battleview/mc/XuanyunMc.as new file mode 100644 index 0000000..187cf41 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/XuanyunMc.as @@ -0,0 +1,54 @@ +package com.view.ui.battleview.mc +{ + import com.comfig.ServerConfig; + import flash.display.Loader; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.IOErrorEvent; + import flash.net.URLRequest; + + public class XuanyunMc extends Sprite + { + + private var mc:MovieClip; + + private var loader:Loader; + + public function XuanyunMc() + { + super(); + } + + public function load() : void + { + this.loader = new Loader(); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.onLoadComplete,false,0,true); + this.loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,this.onLoadError,false,0,true); + this.loader.load(new URLRequest(ServerConfig.IMAGE_BATTLE_URL + "xuanyun.swf")); + } + + private function onLoadComplete(param1:Event) : void + { + addChild(this.loader); + } + + private function onLoadError(param1:Event) : void + { + } + + public function clear() : void + { + if(this.loader) + { + this.loader.unloadAndStop(); + this.loader = null; + } + while(numChildren > 0) + { + removeChildAt(0); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/battleview/mc/ZhanqiMc.as b/flash_decompiled/com/view/ui/battleview/mc/ZhanqiMc.as new file mode 100644 index 0000000..0e10f72 --- /dev/null +++ b/flash_decompiled/com/view/ui/battleview/mc/ZhanqiMc.as @@ -0,0 +1,141 @@ +package com.view.ui.battleview.mc +{ + import com.view.ui.zhanqi.ZhantiItem; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + + public class ZhanqiMc extends Sprite + { + + private var zhanqiItem1:ZhantiItem; + + private var zhanqiItem2:ZhantiItem; + + private var zhanqiItem3:ZhantiItem; + + private var zhanqiItem4:ZhantiItem; + + private var zhanqiItem5:ZhantiItem; + + public function ZhanqiMc() + { + super(); + this.zhanqiItem1 = new ZhantiItem(); + this.zhanqiItem2 = new ZhantiItem(); + this.zhanqiItem3 = new ZhantiItem(); + this.zhanqiItem4 = new ZhantiItem(); + this.zhanqiItem5 = new ZhantiItem(); + addChild(this.zhanqiItem1); + addChild(this.zhanqiItem2); + addChild(this.zhanqiItem3); + addChild(this.zhanqiItem4); + addChild(this.zhanqiItem5); + this.zhanqiItem1.visible = false; + this.zhanqiItem2.visible = false; + this.zhanqiItem3.visible = false; + this.zhanqiItem4.visible = false; + this.zhanqiItem5.visible = false; + } + + public function setObj(param1:Object) : void + { + var _loc3_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + if(param1 == null) + { + this.zhanqiItem1.visible = false; + this.zhanqiItem2.visible = false; + this.zhanqiItem3.visible = false; + this.zhanqiItem4.visible = false; + this.zhanqiItem5.visible = false; + return; + } + var _loc2_:int = int(param1.level1); + _loc3_ = int(param1.level2); + var _loc4_:int = int(param1.level3); + _loc5_ = int(param1.level4); + _loc6_ = int(param1.level5); + _loc7_ = int(param1.pro1); + var _loc8_:int = int(param1.pro2); + var _loc9_:int = int(param1.pro3); + var _loc10_:int = int(param1.pro4); + var _loc11_:int = int(param1.pro5); + var _loc12_:String = ""; + var _loc13_:int = 0; + var _loc14_:String = ""; + if(_loc7_ > 0) + { + this.zhanqiItem1.visible = true; + this.zhanqiItem1.x = 0; + _loc13_ += 51; + _loc14_ = "金旗
当前等级:" + _loc2_ + "
当前属性:武将防御 + " + _loc7_; + ToolTipManager.getInstance().setToolTip(this.zhanqiItem1,new TxtTooltip(_loc14_),true,-1,false); + if(_loc2_ > 18) + { + _loc2_ = 18; + } + _loc12_ = "zhanqijin" + _loc2_ + ".png"; + this.zhanqiItem1.loadImg(_loc12_); + } + if(_loc8_ > 0) + { + this.zhanqiItem2.visible = true; + this.zhanqiItem2.x = _loc13_; + _loc13_ += 51; + _loc14_ = "木旗
当前等级:" + _loc3_ + "
当前属性:武将体力 + " + _loc8_; + ToolTipManager.getInstance().setToolTip(this.zhanqiItem2,new TxtTooltip(_loc14_),true,-1,false); + if(_loc3_ > 18) + { + _loc3_ = 18; + } + _loc12_ = "zhanqimu" + _loc3_ + ".png"; + this.zhanqiItem2.loadImg(_loc12_); + } + if(_loc9_ > 0) + { + this.zhanqiItem3.visible = true; + this.zhanqiItem3.x = _loc13_; + _loc13_ += 51; + _loc14_ = "水旗
当前等级:" + _loc4_ + "
当前属性:武将敏捷 + " + _loc9_; + ToolTipManager.getInstance().setToolTip(this.zhanqiItem3,new TxtTooltip(_loc14_),true,-1,false); + if(_loc4_ > 18) + { + _loc4_ = 18; + } + _loc12_ = "zhanqishui" + _loc4_ + ".png"; + this.zhanqiItem3.loadImg(_loc12_); + } + if(_loc10_ > 0) + { + this.zhanqiItem4.visible = true; + this.zhanqiItem4.x = _loc13_; + _loc13_ += 51; + _loc14_ = "火旗
当前等级:" + _loc5_ + "
当前属性:武将攻击 + " + _loc10_; + ToolTipManager.getInstance().setToolTip(this.zhanqiItem4,new TxtTooltip(_loc14_),true,-1,false); + if(_loc5_ > 18) + { + _loc5_ = 18; + } + _loc12_ = "zhanqihuo" + _loc5_ + ".png"; + this.zhanqiItem4.loadImg(_loc12_); + } + if(_loc11_ > 0) + { + this.zhanqiItem5.visible = true; + this.zhanqiItem5.x = _loc13_; + _loc14_ = "土旗
当前等级:" + _loc6_ + "
当前属性:武将统率 + " + _loc11_; + ToolTipManager.getInstance().setToolTip(this.zhanqiItem5,new TxtTooltip(_loc14_),true,-1,false); + if(_loc6_ > 18) + { + _loc6_ = 18; + } + _loc12_ = "zhanqitu" + _loc6_ + ".png"; + this.zhanqiItem5.loadImg(_loc12_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/beauty/BeautyItem.as b/flash_decompiled/com/view/ui/beauty/BeautyItem.as new file mode 100644 index 0000000..5471927 --- /dev/null +++ b/flash_decompiled/com/view/ui/beauty/BeautyItem.as @@ -0,0 +1,124 @@ +package com.view.ui.beauty +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.mc.sprite.ExpBar; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class BeautyItem extends Sprite + { + + public var currNum:int; + + private var load:LoadResource; + + private var m_jingYanBar:ExpBar; + + private var bg1:Sprite; + + private var jihuo:Sprite; + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemImg:Bitmap; + + private var currLevel:int; + + public var currObj:Object; + + public var currExp:int; + + public function BeautyItem(param1:int) + { + super(); + this.currNum = param1; + this.bg1 = PublicMethod.createRectangle(6250335,1645596,152,325); + addChild(this.bg1); + switch(this.currNum) + { + case 1: + this.load = new LoadResource("pic/sys/fbb.jpg",this.loadPngBack); + break; + case 2: + this.load = new LoadResource("pic/sys/lyf.jpg",this.loadPngBack); + break; + case 3: + this.load = new LoadResource("pic/sys/ym.jpg",this.loadPngBack); + break; + case 4: + this.load = new LoadResource("pic/sys/lss.jpg",this.loadPngBack); + } + this.buttonMode = true; + this.m_jingYanBar = new ExpBar(); + addChild(this.m_jingYanBar); + this.m_jingYanBar.setSize(100); + this.m_jingYanBar.x = 30; + this.m_jingYanBar.y = 300; + this.m_jingYanBar.setFillters(); + this.m_jingYanBar.setLength(500); + this.m_jingYanBar.setCurValue(0); + this.m_jingYanBar.setStr("经验:"); + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + this.bg1.addChild(this.itemImg); + this.itemImg.x = 1; + this.itemImg.y = 1; + this.itemImg.width = 152; + this.itemImg.height = 325; + this.load.clear(); + } + + public function getLevel() : int + { + return this.currLevel; + } + + public function setData(param1:Object) : void + { + this.currObj = param1; + this.currLevel = param1.userBeauty["level" + this.currNum]; + this.currExp = param1.userBeauty["exp" + this.currNum]; + if(this.currLevel < 0) + { + if(this.jihuo == null) + { + this.jihuo = this.face.getSprite(ClassConfig.lib_ui_jihuo); + addChild(this.jihuo); + this.jihuo.x = 50; + this.jihuo.y = 160; + } + this.m_jingYanBar.visible = false; + Utils.applyGray(this.bg1); + } + else + { + if(this.jihuo) + { + if(contains(this.jihuo)) + { + removeChild(this.jihuo); + } + } + this.m_jingYanBar.visible = true; + Utils.applyDefault(this.bg1); + if(this.currLevel >= param1.maxLevel) + { + this.m_jingYanBar.setStr2("已满级"); + } + else + { + this.m_jingYanBar.setCurValue(this.currExp); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/beauty/BeautyUI.as b/flash_decompiled/com/view/ui/beauty/BeautyUI.as new file mode 100644 index 0000000..b10bee8 --- /dev/null +++ b/flash_decompiled/com/view/ui/beauty/BeautyUI.as @@ -0,0 +1,413 @@ +package com.view.ui.beauty +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.play.event.BeautyEvent; + import com.newdata.user.NewUserData; + 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.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.filters.GlowFilter; + import flash.text.TextField; + + public class BeautyUI extends BaseUI + { + + private var beautyItem1:BeautyItem; + + private var beautyItem2:BeautyItem; + + private var beautyItem3:BeautyItem; + + private var beautyItem4:BeautyItem; + + private var bg:Sprite; + + private var activeBtn:Button_32; + + private var upBtn:Button_32; + + private var equBtn:Button_32; + + private var preItem:BeautyItem; + + private var fillers:GlowFilter; + + private var text1:TextField; + + private var text2:TextField; + + private var text3:TextField; + + private var text4:TextField; + + private var text5:TextField; + + private var text6:TextField; + + private var beautyObj:Object; + + private var pro_1:int = 50; + + private var pro_2:int = 5; + + private var pro_3:int = 10; + + private var pro_4:int = 10; + + private var maxLevel:int = 20; + + private var txt1:String = ""; + + private var txt2:String = ""; + + private var txt3:String = ""; + + private var txt4:String = ""; + + private var giveBeautyExpUI:GiveBeautyExp; + + public function BeautyUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_meirenxitong); + setPosition(); + this.getFillers(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_img_border),590,33); + var _loc3_:Sprite = PublicMethod.createShape(2502192,int(_loc2_.width),int(_loc2_.height)); + _loc3_.addChild(_loc2_); + _loc1_.addChild(_loc3_); + _loc3_.x = 5; + _loc3_.y = 334; + this.text1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + this.text2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,450); + this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + this.text4 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250); + this.text5 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250); + this.text6 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250); + _loc3_.addChild(this.text1); + this.text1.x = 15; + this.text1.y = 7; + _loc3_.addChild(this.text5); + this.text5.x = 150; + this.text5.y = 7; + _loc3_.addChild(this.text6); + this.text6.x = 260; + this.text6.y = 7; + _loc3_.addChild(this.text2); + this.text2.x = 15; + this.text2.y = 27; + _loc3_.addChild(this.text3); + this.text3.x = 15; + this.text3.y = 47; + _loc3_.addChild(this.text4); + this.text4.x = 150; + this.text4.y = 47; + this.beautyItem1 = new BeautyItem(1); + _loc1_.addChild(this.beautyItem1); + this.beautyItem1.x = 5; + this.beautyItem1.y = 5; + this.beautyItem2 = new BeautyItem(2); + _loc1_.addChild(this.beautyItem2); + this.beautyItem2.x = this.beautyItem1.x + this.beautyItem1.width + 6; + this.beautyItem2.y = this.beautyItem1.y; + this.beautyItem3 = new BeautyItem(3); + _loc1_.addChild(this.beautyItem3); + this.beautyItem3.x = this.beautyItem2.x + this.beautyItem2.width + 6; + this.beautyItem3.y = this.beautyItem1.y; + this.beautyItem4 = new BeautyItem(4); + _loc1_.addChild(this.beautyItem4); + this.beautyItem4.x = this.beautyItem3.x + this.beautyItem3.width + 6; + this.beautyItem4.y = this.beautyItem1.y; + this.beautyItem1.addEventListener(MouseEvent.CLICK,this.clickItem); + this.beautyItem2.addEventListener(MouseEvent.CLICK,this.clickItem); + this.beautyItem3.addEventListener(MouseEvent.CLICK,this.clickItem); + this.beautyItem4.addEventListener(MouseEvent.CLICK,this.clickItem); + this.activeBtn = new Button_32("激活美女"); + _loc3_.addChild(this.activeBtn); + this.activeBtn.x = 520; + this.activeBtn.y = 20; + this.activeBtn.visible = false; + this.activeBtn.onclick = this.activityBeauty; + this.upBtn = new Button_32("升级美女"); + _loc3_.addChild(this.upBtn); + this.upBtn.x = 410; + this.upBtn.y = 20; + this.upBtn.visible = false; + this.upBtn.onclick = this.giveBeautyExp; + this.equBtn = new Button_32("美女出战"); + _loc3_.addChild(this.equBtn); + this.equBtn.x = this.activeBtn.x; + this.equBtn.y = this.activeBtn.y; + this.equBtn.visible = false; + var _loc4_:Button_9 = new Button_9("说 明"); + _loc3_.addChild(_loc4_); + _loc4_.x = 580; + _loc4_.y = 3; + _loc4_.buttonMode = true; + var _loc5_:String = "系统说明:
"; + _loc5_ = _loc5_ + "每个美人需要花费一定数量元宝激活后才能升级
"; + _loc5_ = _loc5_ + "使用缠绵露可以获得美人经验,缠绵露在地宫中有一定几率掉落
"; + _loc5_ = _loc5_ + "美人出战才会对战斗有帮助,同一时刻只能使用一个美人出战
"; + _loc5_ = _loc5_ + "不同美人所增加属性不一样
"; + ToolTipManager.getInstance().setToolTip(_loc4_,new TxtTooltip(_loc5_),false,-1,false); + } + + public function clickItem(param1:Event) : void + { + var _loc2_:Number = NaN; + if(this.preItem) + { + this.preItem.filters = null; + } + this.preItem = param1.currentTarget as BeautyItem; + this.preItem.filters = [this.fillers]; + switch(this.preItem.currNum) + { + case 1: + this.text1.htmlText = "美人名称:西施"; + this.text2.htmlText = this.txt1; + if(this.preItem.getLevel() < 0) + { + this.text3.htmlText = "当前级别:未激活"; + this.text4.htmlText = "当前效果:无"; + break; + } + this.text3.htmlText = "当前级别:" + this.preItem.getLevel() + "级"; + if(this.preItem.getLevel() > 0) + { + this.text4.htmlText = "当前效果:君主武力增加" + this.preItem.getLevel() * this.pro_1; + break; + } + this.text4.htmlText = "当前效果:无"; + break; + case 2: + this.text1.htmlText = "美人名称:贵妃"; + this.text2.htmlText = this.txt2; + if(this.preItem.getLevel() < 0) + { + this.text3.htmlText = "当前级别:未激活"; + this.text4.htmlText = "当前效果:无"; + break; + } + this.text3.htmlText = "当前级别:" + this.preItem.getLevel() + "级"; + if(this.preItem.getLevel() > 0) + { + _loc2_ = this.pro_2 / 10; + this.text4.htmlText = "当前效果:武将统率加成" + this.preItem.getLevel() * _loc2_ + "%"; + break; + } + this.text4.htmlText = "当前效果:无"; + break; + case 3: + this.text1.htmlText = "美人名称:昭君"; + this.text2.htmlText = this.txt3; + if(this.preItem.getLevel() < 0) + { + this.text3.htmlText = "当前级别:未激活"; + this.text4.htmlText = "当前效果:无"; + break; + } + this.text3.htmlText = "当前级别:" + this.preItem.getLevel() + "级"; + if(this.preItem.getLevel() > 0) + { + _loc2_ = this.pro_3 / 10; + this.text4.htmlText = "当前效果:部队伤害加成" + this.preItem.getLevel() * _loc2_ + "%"; + break; + } + this.text4.htmlText = "当前效果:无"; + break; + case 4: + this.text1.htmlText = "美人名称:貂蝉"; + this.text2.htmlText = this.txt4; + if(this.preItem.getLevel() < 0) + { + this.text3.htmlText = "当前级别:未激活"; + this.text4.htmlText = "当前效果:无"; + break; + } + this.text3.htmlText = "当前级别:" + this.preItem.getLevel() + "级"; + if(this.preItem.getLevel() > 0) + { + _loc2_ = this.pro_4 / 10; + this.text4.htmlText = "当前效果:武将四维属性加成" + Utils.getNumFun(this.preItem.getLevel() * _loc2_,2) + "%"; + break; + } + this.text4.htmlText = "当前效果:无"; + } + if(this.preItem.getLevel() < 0) + { + this.activeBtn.visible = true; + this.upBtn.visible = false; + this.equBtn.visible = false; + } + else + { + this.activeBtn.visible = false; + this.upBtn.visible = true; + this.equBtn.visible = true; + } + if(this.beautyObj.userBeauty.currUse == this.preItem.currNum) + { + this.text5.htmlText = "当前状态出战中"; + } + else + { + this.text5.htmlText = "当前状态未出战"; + } + this.text6.htmlText = "经验池经验:" + this.beautyObj.userBeauty.point; + if(this.beautyObj.userBeauty.currUse == this.preItem.currNum) + { + this.equBtn.setText("美女休战"); + this.equBtn.onclick = this.stopBeauty; + } + else + { + this.equBtn.setText("美女出战"); + this.equBtn.onclick = this.useBeauty; + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.entryHell(); + Utils.g_events.addEventListener(BeautyEvent.ENTER_BEAUTY,this.enterResult); + Utils.g_events.addEventListener(BeautyEvent.ACTIVITY_BEAUTY,this.enterResult); + Utils.g_events.addEventListener(BeautyEvent.LEVELUP_BEAUTY,this.enterResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + Utils.g_events.removeEventListener(BeautyEvent.ENTER_BEAUTY,this.enterResult); + Utils.g_events.removeEventListener(BeautyEvent.ACTIVITY_BEAUTY,this.enterResult); + Utils.g_events.removeEventListener(BeautyEvent.LEVELUP_BEAUTY,this.enterResult); + } + + 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 entryHell() : void + { + ConnectService.getInstance().babelService.enterBeauty(); + } + + private function enterResult(param1:BeautyEvent) : void + { + this.beautyObj = param1.obj; + this.beautyItem1.setData(this.beautyObj); + this.beautyItem2.setData(this.beautyObj); + this.beautyItem3.setData(this.beautyObj); + this.beautyItem4.setData(this.beautyObj); + this.pro_1 = this.beautyObj.pro_1; + this.pro_2 = this.beautyObj.pro_2; + this.pro_3 = this.beautyObj.pro_3; + this.pro_4 = this.beautyObj.pro_4; + this.maxLevel = this.beautyObj.maxLevel; + this.txt1 = "技能简介:君主武力加成" + this.pro_1 * this.maxLevel + ",每升一级+" + this.pro_1 + "点武力,共计" + this.maxLevel + "级"; + var _loc2_:int = this.pro_2 * this.maxLevel / 10; + this.txt2 = "技能简介:武将统率加成" + _loc2_ + "%,每升一级+0." + this.pro_2 + "%,共计" + this.maxLevel + "级"; + _loc2_ = this.pro_3 * this.maxLevel / 10; + var _loc3_:Number = this.pro_3 / 10; + this.txt3 = "技能简介:部队伤害加成" + _loc2_ + "%,每升一级加" + _loc3_ + "%,共计" + this.maxLevel + "级"; + _loc2_ = this.pro_4 * this.maxLevel / 10; + _loc3_ = this.pro_4 / 10; + this.txt4 = "技能简介:武将四维属性加成" + _loc2_ + "%,每升一级加" + _loc3_ + "%,共计" + this.maxLevel + "级"; + if(this.preItem) + { + this.preItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + else + { + this.beautyItem1.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + private function activityBeauty() : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要激活的美人"); + return; + } + MessageBoxUI.getInstance().confirmMsg("确认花费 " + this.beautyObj.studyMoney + " 元宝激活该美人?",this.confirmActivity); + } + + private function confirmActivity() : void + { + var _loc1_:int = int(this.beautyObj.studyMoney); + var _loc2_:Number = NewUserData.getUser().cash; + if(_loc2_ < _loc1_) + { + MessageBoxUI.getInstance().addMessage("当前元宝数量不够"); + return; + } + var _loc3_:int = this.preItem.currNum; + ConnectService.getInstance().babelService.activityBeauty(_loc3_); + } + + private function giveBeautyExp() : void + { + if(this.giveBeautyExpUI == null) + { + this.giveBeautyExpUI = new GiveBeautyExp(); + this.giveBeautyExpUI.maxLevel = this.maxLevel; + this.giveBeautyExpUI.x = int(width / 2 - this.giveBeautyExpUI.width / 2); + this.giveBeautyExpUI.y = int(height / 2 - this.giveBeautyExpUI.height / 2); + } + addChild(this.giveBeautyExpUI); + this.giveBeautyExpUI.setData(this.preItem); + } + + private function useBeauty() : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要出战的美人"); + return; + } + var _loc1_:int = this.preItem.currNum; + ConnectService.getInstance().babelService.useSkill(_loc1_); + } + + private function stopBeauty() : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要出战的美人"); + return; + } + var _loc1_:int = this.preItem.currNum; + ConnectService.getInstance().babelService.stopSkill(_loc1_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/beauty/GiveBeautyExp.as b/flash_decompiled/com/view/ui/beauty/GiveBeautyExp.as new file mode 100644 index 0000000..bccad0e --- /dev/null +++ b/flash_decompiled/com/view/ui/beauty/GiveBeautyExp.as @@ -0,0 +1,146 @@ +package com.view.ui.beauty +{ + import com.common.PublicMethod; + import com.control.ConnectService; + 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.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GiveBeautyExp extends UIWindowBg + { + + private var bg:Sprite; + + private var input:UINumInputText; + + private var heroExpBar:ExpBar; + + private var label0:TextField; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var maxPoint:int; + + private var effId:int; + + private var currLevel:int; + + public var maxLevel:int = 20; + + public function GiveBeautyExp() + { + var _loc2_:UIButton = null; + super(); + initSize(100,150); + loadTitle(UITitleConfig.title_jingyanfenpei); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(270,110); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.label0 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + _loc1_.addChild(this.label0); + this.label0.x = 10; + this.label0.y = 15; + this.label0.text = "当前美人:"; + _loc1_.addChild(this.label1); + this.label1.x = 10; + this.label1.y = 40; + this.label1.text = "当前经验:"; + this.heroExpBar = new ExpBar(); + _loc1_.addChild(this.heroExpBar); + this.heroExpBar.setSize(168); + this.heroExpBar.x = 80; + this.heroExpBar.y = 43; + _loc1_.addChild(this.label2); + this.label2.x = this.label1.x; + this.label2.y = 70; + this.label2.text = "分配数量:"; + this.input = new UINumInputText(50); + this.input.hiddenBtn(); + _loc1_.addChild(this.input); + this.input.x = this.label2.x + this.label2.width - 10; + this.input.y = this.label2.y - 3; + _loc1_.addChild(this.label3); + this.label3.x = this.label1.x; + this.label3.y = 95; + this.label3.text = "经 验 池:"; + _loc2_ = new UIButton("确 定",2,10); + var _loc3_:UIButton = new UIButton("取 消",2,10); + addChild(_loc2_); + addChild(_loc3_); + _loc2_.x = 80; + _loc2_.y = 178; + _loc3_.x = _loc2_.x + 90; + _loc3_.y = _loc2_.y; + _loc3_.onClick = closeSelf; + _loc2_.onClick = this.giveSubmit; + } + + public function setData(param1:BeautyItem) : void + { + this.effId = param1.currNum; + this.currLevel = param1.getLevel(); + switch(this.effId) + { + case 1: + this.label0.htmlText = "当前美人:西施"; + break; + case 2: + this.label0.htmlText = "当前美人:贵妃"; + break; + case 3: + this.label0.htmlText = "当前美人:昭君"; + break; + case 4: + this.label0.htmlText = "当前美人:貂蝉"; + } + this.maxPoint = param1.currObj.userBeauty.point; + this.input.setMaxNum(this.maxPoint); + this.heroExpBar.setLength(500); + this.heroExpBar.setCurValue(param1.currExp); + this.label3.htmlText = "经 验 池:" + this.maxPoint + ""; + } + + private function giveSubmit(param1:MouseEvent) : void + { + if(this.currLevel >= this.maxLevel) + { + closeSelf(null); + MessageBoxUI.getInstance().addMessage("已达最大等级"); + return; + } + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ > this.maxPoint) + { + MessageBoxUI.getInstance().addMessage("经验池经验不足。"); + } + else if(_loc2_ > 0) + { + ConnectService.getInstance().babelService.levelUp(this.effId,_loc2_); + closeSelf(null); + } + else + { + MessageBoxUI.getInstance().addMessage("分配经验数量必须大于0。"); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/bigboss/BigBossData.as b/flash_decompiled/com/view/ui/bigboss/BigBossData.as new file mode 100644 index 0000000..5c936c1 --- /dev/null +++ b/flash_decompiled/com/view/ui/bigboss/BigBossData.as @@ -0,0 +1,111 @@ +package com.view.ui.bigboss +{ + import com.events.DevEvent; + import com.utils.Utils; + + public class BigBossData + { + + private static var userBigBoss:Object; + + private static var SUCC_BEGIN:int; + + private static var SUCC_ADD:int; + + private static var FAIL_BEGIN:int; + + private static var combatId:String; + + private static var combatFinishSeconds:int; + + private static var bossList:Array = new Array(); + + public function BigBossData() + { + super(); + } + + public static function setSuccBegin(param1:int) : void + { + SUCC_BEGIN = param1; + } + + public static function setSuccAdd(param1:int) : void + { + SUCC_ADD = param1; + } + + public static function setFailBegin(param1:int) : void + { + FAIL_BEGIN = param1; + } + + public static function getSuccPointByStage(param1:int) : int + { + return SUCC_BEGIN + (10 - param1) * SUCC_ADD; + } + + public static function getFailPointByStage() : int + { + return FAIL_BEGIN; + } + + public static function setBossList(param1:Array) : void + { + bossList = param1; + } + + public static function getBossList() : Array + { + return bossList; + } + + public static function getBossByStageId(param1:int) : Object + { + var _loc2_:int = 1; + while(_loc2_ <= bossList.length) + { + if(bossList[_loc2_].stageId == param1) + { + return bossList[_loc2_]; + } + _loc2_++; + } + return null; + } + + public static function setUserBossData(param1:Object) : void + { + userBigBoss = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.BOSS_USERDATA)); + } + + public static function getUserBossData() : Object + { + return userBigBoss; + } + + public static function setWarData(param1:Object) : void + { + combatId = param1.combatId; + combatFinishSeconds = param1.combatFinishSeconds; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.BOSS_WAR)); + } + + public static function setWarTime() : void + { + combatFinishSeconds = 0; + } + + public static function getCombatId() : String + { + return combatId; + } + + public static function getCombatFinishSeconds() : int + { + return combatFinishSeconds; + } + } +} + diff --git a/flash_decompiled/com/view/ui/bigboss/BigBossMainUI.as b/flash_decompiled/com/view/ui/bigboss/BigBossMainUI.as new file mode 100644 index 0000000..367325c --- /dev/null +++ b/flash_decompiled/com/view/ui/bigboss/BigBossMainUI.as @@ -0,0 +1,469 @@ +package com.view.ui.bigboss +{ + import com.common.PublicMethod; + import com.control.ConnectService; + 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.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.battle.BattleViewUI; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class BigBossMainUI extends PlayUI + { + + private var tableMc:UITable; + + private var bg:Sprite; + + private var chooseHero:UIButton; + + private var medicHero:UIButton; + + private var exchangeBtn:UIButton; + + private var viewWarBtn:UIButton; + + private var warTimeText:TextField; + + private var preBossMc:BigBossMc; + + private var bossListMc:Vector.; + + private var currPower:TextField; + + private var hasSetBoss:Boolean; + + private var freeTimesText:TextField; + + private var itemTimesText:TextField; + + private var heroMcVec:Vector.; + + private var heroIdList:Vector. = new Vector.(); + + private var combatId:String; + + private var seconds:int; + + private var timer:Timer; + + public function BigBossMainUI() + { + super(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc4_:int = 0; + var _loc5_:UIWindowBg = null; + var _loc11_:BigBossMc = null; + var _loc12_:UIHeroItem = null; + super.createUI(); + super.loadTitle(UITitleConfig.title_mingjiangxitong); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["排名","名将","战力","竞技点","晋级场次","胜","负","掉落","是否已征服"]; + var _loc3_:Array = [40,45,55,40,55,32,32,57,75]; + this.tableMc = new UITable(); + this.tableMc.install(10,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.bossListMc = new Vector.(); + _loc4_ = 0; + while(_loc4_ < 10) + { + _loc11_ = new BigBossMc(); + this.bossListMc.push(_loc11_); + this.tableMc.addChild(_loc11_); + _loc11_.y = 25 + _loc4_ * 25; + _loc11_.x = 4; + _loc11_.addEventListener(MouseEvent.CLICK,this.selectBoss); + _loc4_++; + } + _loc5_ = new UIWindowBg(); + _loc5_.initSecondPanel(189,265); + _loc1_.addChild(_loc5_); + _loc5_.x = this.tableMc.x + this.tableMc.width + 1; + _loc5_.y = 4; + var _loc6_:UITitleBg = new UITitleBg("活动说明",_loc5_.width); + _loc5_.addChild(_loc6_); + _loc6_.x = int(_loc5_.width / 2 - _loc6_.width / 2); + var _loc7_:String = "活动类型:单人副本。
"; + _loc7_ = _loc7_ + "模式:战略战。
"; + _loc7_ = _loc7_ + "免费挑战次数:
"; + _loc7_ = _loc7_ + "道具挑战次数:
"; + _loc7_ = _loc7_ + "奖励:大量武将经验、神秘装备、大量元宝等
"; + _loc7_ = _loc7_ + "规则:
"; + _loc7_ = _loc7_ + "1、挑战从最后一名开始,对名将胜场达到一定数量后即已征服该名将,可进一步挑战更高级名将。
"; + _loc7_ = _loc7_ + "2、免费挑战次数用完后继续挑战需要消耗金钥匙,否则无法继续挑战。
"; + _loc7_ = _loc7_ + "3、本活动中战斗有70%的伤亡恢复率,精英战力较高请慎重!"; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,190); + _loc8_.height = 244; + _loc8_.wordWrap = true; + _loc8_.multiline = true; + var _loc9_:TextFormat = new TextFormat(); + _loc9_.leading = 4; + _loc5_.addChild(_loc8_); + _loc8_.defaultTextFormat = _loc9_; + _loc8_.htmlText = _loc7_; + _loc8_.selectable = false; + _loc8_.x = 4; + _loc8_.y = 28; + this.freeTimesText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.itemTimesText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc5_.addChild(this.freeTimesText); + this.freeTimesText.x = 92; + this.freeTimesText.y = 62; + _loc5_.addChild(this.itemTimesText); + this.itemTimesText.x = 92; + this.itemTimesText.y = 78; + var _loc10_:UIWindowBg = new UIWindowBg(); + _loc10_.initThirdPanel(621,113); + _loc1_.addChild(_loc10_); + _loc10_.x = 4; + _loc10_.y = this.tableMc.y + this.tableMc.height + 3; + this.heroMcVec = new Vector.(); + _loc4_ = 0; + while(_loc4_ < 5) + { + _loc12_ = new UIHeroItem(); + _loc10_.addChild(_loc12_); + _loc12_.x = 5 + _loc4_ * 124; + _loc12_.y = 5; + this.heroMcVec.push(_loc12_); + _loc4_++; + } + this.chooseHero = new UIButton("选择武将",2,10); + this.medicHero = new UIButton("医疗武将",2,10); + _loc10_.addChild(this.chooseHero); + _loc10_.addChild(this.medicHero); + this.chooseHero.x = 5; + this.chooseHero.y = 94; + this.medicHero.x = this.chooseHero.x + 70; + this.medicHero.y = this.chooseHero.y; + this.medicHero.onClick = this.treatHeroAllHero; + this.viewWarBtn = new UIButton("查看战斗",2,10); + _loc10_.addChild(this.viewWarBtn); + this.viewWarBtn.x = 550; + this.viewWarBtn.y = this.medicHero.y; + this.viewWarBtn.onClick = this.viewWar; + this.viewWarBtn.visible = false; + this.exchangeBtn = new UIButton("挑 战",2,10); + _loc10_.addChild(this.exchangeBtn); + this.exchangeBtn.x = 274; + this.exchangeBtn.y = this.chooseHero.y; + this.exchangeBtn.onClick = this.startFight; + this.chooseHero.onClick = this.selectHero; + this.currPower = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,200); + _loc10_.addChild(this.currPower); + this.currPower.x = 353; + this.currPower.y = 98; + this.warTimeText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,100); + _loc10_.addChild(this.warTimeText); + this.warTimeText.x = 148; + this.warTimeText.y = this.currPower.y; + this.entryHell(); + } + + private function selectBoss(param1:MouseEvent) : void + { + if(this.preBossMc) + { + this.preBossMc.showBg(false); + } + var _loc2_:BigBossMc = param1.currentTarget as BigBossMc; + this.preBossMc = _loc2_; + this.preBossMc.showBg(true); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(this.tableMc) + { + this.entryHell(); + } + Utils.g_events.addEventListener(DevEvent.BOSS_USERDATA,this.getUserBossData); + Utils.g_events.addEventListener(DevEvent.BOSS_TREATHERO,this.treatHeroResult); + Utils.g_events.addEventListener(DevEvent.BOSS_CHANGEHERO,this.changeHeroResult); + Utils.g_events.addEventListener(DevEvent.BOSS_WAR,this.warResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + Utils.g_events.removeEventListener(DevEvent.BOSS_TREATHERO,this.treatHeroResult); + Utils.g_events.removeEventListener(DevEvent.BOSS_CHANGEHERO,this.changeHeroResult); + Utils.g_events.removeEventListener(DevEvent.BOSS_USERDATA,this.getUserBossData); + Utils.g_events.removeEventListener(DevEvent.BOSS_WAR,this.warResult); + } + + private function entryHell() : void + { + var _loc1_:int = 1; + if(this.hasSetBoss) + { + _loc1_ = 0; + } + ConnectService.getInstance().babelService.enterBigBoss(_loc1_); + } + + private function getUserBossData(param1:DevEvent) : void + { + var _loc4_:Array = null; + var _loc5_:int = 0; + if(this.hasSetBoss == false) + { + this.hasSetBoss = true; + _loc4_ = BigBossData.getBossList(); + _loc5_ = 0; + while(_loc5_ < 10) + { + this.bossListMc[_loc5_].setBossObj(_loc4_[_loc5_ + 1]); + this.bossListMc[_loc5_].setUserObj(); + _loc5_++; + } + } + else + { + _loc5_ = 0; + while(_loc5_ < 10) + { + this.bossListMc[_loc5_].setUserObj(); + _loc5_++; + } + } + var _loc2_:Object = BigBossData.getUserBossData(); + var _loc3_:Array = _loc2_.atkHeroList as Array; + this.initHeroView(_loc3_); + this.currPower.text = "当前战力:" + Math.round(_loc2_.myPower); + this.freeTimesText.text = _loc2_.freeTimes; + this.itemTimesText.text = _loc2_.itemTimes; + this.seconds = BigBossData.getCombatFinishSeconds(); + if(this.seconds > 2) + { + this.initBtnStatus(true); + } + else + { + this.initBtnStatus(false); + } + } + + private function initHeroView(param1:Array) : void + { + var _loc2_:* = undefined; + this.clearHeroIdList(); + for(_loc2_ in this.heroMcVec) + { + if(param1[_loc2_]) + { + this.heroIdList.push(param1[_loc2_].heroId); + this.heroMcVec[_loc2_].setData(param1[_loc2_]); + } + else + { + this.heroMcVec[_loc2_].setData(null); + } + } + } + + private function clearHeroIdList() : void + { + if(this.heroIdList.length > 0) + { + this.heroIdList = new Vector.(); + } + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance(); + if(contains(_loc2_)) + { + return; + } + _loc2_.setSelectheroArr(this.heroIdList); + addChild(_loc2_); + _loc2_.x = 0; + _loc2_.y = 0; + _loc2_.backFunc = this.selectHeroList; + } + + private function selectHeroList(param1:Vector.) : void + { + var _loc3_:Hero = null; + if(param1.length == 0) + { + MessageBoxUI.getInstance().addMessage("未选择武将"); + return; + } + if(param1.length > 5) + { + MessageBoxUI.getInstance().addMessage("最多只能选择5个武将"); + return; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in param1) + { + _loc2_.push(_loc3_.heroId); + } + ConnectService.getInstance().babelService.changeHeroBossHero(_loc2_); + } + + private function treatHeroAllHero(param1:MouseEvent) : void + { + if(this.heroIdList == null || this.heroIdList.length <= 0) + { + MessageBoxUI.getInstance().addMessage("未选择武将,无法医疗"); + return; + } + ConnectService.getInstance().babelService.treatHeroBossHero(); + } + + private function treatHeroResult(param1:DevEvent) : void + { + this.entryHell(); + } + + private function changeHeroResult(param1:DevEvent) : void + { + this.entryHell(); + } + + private function startFight(param1:MouseEvent) : void + { + var _loc2_:Object = BigBossData.getUserBossData(); + if(_loc2_.freeTimes > 0) + { + this.startWar(); + } + else + { + if(_loc2_.itemTimes <= 0) + { + MessageBoxUI.getInstance().addMessage("今日次数已达上限,请明日再来!"); + return; + } + MessageBoxUI.getInstance().confirmMsg("是否消耗一个【金钥匙】进入?",this.startWar); + } + } + + private function startWar() : void + { + var _loc4_:int = 0; + var _loc5_:Object = null; + if(this.preBossMc == null) + { + MessageBoxUI.getInstance().addMessage("请选择要挑战的名将!"); + return; + } + var _loc1_:Object = BigBossData.getUserBossData(); + var _loc2_:int = this.preBossMc.getStageId(); + if(_loc2_ < _loc1_.userBigBoss.stageId) + { + _loc5_ = BigBossData.getBossByStageId(_loc1_.userBigBoss.stageId); + MessageBoxUI.getInstance().addMessage("尚未征服" + _loc5_.name); + return; + } + var _loc3_:Array = new Array(); + for each(_loc4_ in this.heroIdList) + { + _loc3_.push(_loc4_); + } + ConnectService.getInstance().babelService.startBossWar(_loc3_,_loc2_); + } + + private function warResult(param1:DevEvent) : void + { + this.combatId = BigBossData.getCombatId(); + this.seconds = BigBossData.getCombatFinishSeconds(); + if(this.seconds > 2) + { + this.initBtnStatus(true); + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + } + + private function initBtnStatus(param1:Boolean) : void + { + if(param1) + { + this.viewWarBtn.visible = true; + this.chooseHero.setUnEnable(); + this.medicHero.setUnEnable(); + this.exchangeBtn.setUnEnable(); + } + else + { + this.viewWarBtn.visible = false; + this.chooseHero.setEnable(); + this.medicHero.setEnable(); + this.exchangeBtn.setEnable(); + } + } + + private function timerFrame(param1:TimerEvent) : void + { + this.warTimeText.text = "战斗剩余时间:" + this.seconds; + --this.seconds; + if(this.seconds < 0) + { + this.seconds = 0; + this.timer.stop(); + this.timeOver(); + } + } + + private function timeOver() : void + { + this.warTimeText.text = ""; + this.viewWarBtn.visible = false; + this.entryHell(); + } + + private function viewWar(param1:MouseEvent) : void + { + var _loc2_:BattleViewUI = null; + if(this.combatId != "") + { + _loc2_ = BattleViewUI.getInstance(); + _loc2_.showUI(this.combatId); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/bigboss/BigBossMc.as b/flash_decompiled/com/view/ui/bigboss/BigBossMc.as new file mode 100644 index 0000000..a5c8b73 --- /dev/null +++ b/flash_decompiled/com/view/ui/bigboss/BigBossMc.as @@ -0,0 +1,211 @@ +package com.view.ui.bigboss +{ + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.mc.button.Button_9; + 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; + import flash.text.TextFormat; + + public class BigBossMc extends Sprite + { + + private var text1:TextField; + + private var text2:TextField; + + private var text3:TextField; + + private var text4:TextField; + + private var text5:TextField; + + private var text6:TextField; + + private var giftBtn:Button_9; + + private var text8:TextField; + + private var pointBtn:Button_9; + + private var bg:Sprite; + + private var selectBg:Sprite; + + private var isSelect:Boolean; + + private var bossObj:Object; + + public function BigBossMc() + { + var _loc1_:TextFormat = null; + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,420,25); + this.bg.alpha = 0.2; + addChild(this.bg); + this.bg.visible = false; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,420,25); + this.selectBg.alpha = 0.3; + addChild(this.selectBg); + this.selectBg.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + _loc1_ = PublicMethod.getCenterTextFormat(); + this.text1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,38); + this.text2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,45); + this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,55); + this.text4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,55); + this.text5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,32); + this.text6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,32); + this.giftBtn = new Button_9("查看掉落"); + this.giftBtn.setTextHeight(22); + this.giftBtn.buttonMode = true; + addChild(this.giftBtn); + this.giftBtn.visible = false; + this.pointBtn = new Button_9("查看"); + this.pointBtn.setTextHeight(22); + this.pointBtn.buttonMode = true; + addChild(this.pointBtn); + this.pointBtn.visible = false; + this.text8 = PublicMethod.getTextField(16777215,73); + this.text1.defaultTextFormat = _loc1_; + this.text2.defaultTextFormat = _loc1_; + this.text3.defaultTextFormat = _loc1_; + this.text4.defaultTextFormat = _loc1_; + this.text5.defaultTextFormat = _loc1_; + this.text6.defaultTextFormat = _loc1_; + this.text8.defaultTextFormat = _loc1_; + addChild(this.text1); + addChild(this.text2); + addChild(this.text3); + addChild(this.text4); + addChild(this.text5); + addChild(this.text6); + addChild(this.text8); + this.text1.y = 4; + this.text2.x = this.text1.x + this.text1.width; + this.text2.y = this.text1.y; + this.text3.x = this.text2.x + this.text2.width; + this.text3.y = this.text1.y; + this.pointBtn.x = this.text3.x + this.text3.width + 7; + this.pointBtn.y = this.text1.y; + this.text4.x = this.pointBtn.x + 33; + this.text4.y = this.text1.y; + this.text5.x = this.text4.x + this.text4.width; + this.text5.y = this.text1.y; + this.text6.x = this.text5.x + this.text5.width; + this.text6.y = this.text1.y; + this.giftBtn.x = this.text6.x + this.text6.width + 2; + this.giftBtn.y = this.text1.y; + this.text8.x = this.text6.x + this.text6.width + 55; + this.text8.y = this.text1.y; + } + + public function showBg(param1:Boolean) : void + { + this.isSelect = param1; + this.selectBg.visible = this.isSelect; + } + + private function getPower(param1:Number) : String + { + var _loc2_:Number = NaN; + if(param1 > 100000000) + { + _loc2_ = param1 / 100000000; + return Utils.GetNumFun(_loc2_,2) + "亿"; + } + if(param1 > 10000000) + { + _loc2_ = param1 / 10000000; + return Utils.GetNumFun(_loc2_,2) + "千万"; + } + if(param1 > 1000000) + { + _loc2_ = param1 / 1000000; + return Utils.GetNumFun(_loc2_,2) + "百万"; + } + return param1 + ""; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.bossObj) && this.isSelect == false) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.bossObj) && this.isSelect == false) + { + this.bg.visible = true; + } + } + + public function setBossObj(param1:Object) : void + { + var _loc5_:String = null; + var _loc6_:String = null; + if(param1 == null) + { + return; + } + this.bossObj = param1; + this.text1.text = param1.stageId; + this.text2.text = param1.name; + this.text3.text = this.getPower(param1.power); + this.text4.text = param1.wintimes; + var _loc2_:String = ""; + var _loc3_:Array = param1.awardList; + if(_loc3_ == null) + { + return; + } + var _loc4_:int = 0; + for each(_loc5_ in _loc3_) + { + _loc2_ += _loc5_; + if(_loc4_ < _loc3_.length - 1) + { + _loc2_ += "
"; + } + _loc4_++; + } + this.giftBtn.visible = true; + this.pointBtn.visible = true; + ToolTipManager.getInstance().setToolTip(this.giftBtn,new TxtTooltip(_loc2_),false,-1,false); + _loc6_ = "挑战成功获得" + BigBossData.getSuccPointByStage(param1.stageId) + "竞技点,挑战失败获得" + BigBossData.getFailPointByStage() + "竞技点"; + ToolTipManager.getInstance().setToolTip(this.pointBtn,new TxtTooltip(_loc6_),false,-1,false); + } + + public function setUserObj() : void + { + var _loc1_:Object = BigBossData.getUserBossData(); + var _loc2_:int = int(this.bossObj.stageId); + var _loc3_:* = _loc1_.userBigBoss["win" + _loc2_]; + var _loc4_:* = _loc1_.userBigBoss["lost" + _loc2_]; + this.text5.text = _loc3_; + this.text6.text = _loc4_; + if(_loc1_.userBigBoss.stageId < _loc2_) + { + this.text8.htmlText = "已征服"; + } + else + { + this.text8.htmlText = "未征服"; + } + } + + public function getStageId() : int + { + return this.bossObj.stageId; + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/AddPointUI.as b/flash_decompiled/com/view/ui/biwu/AddPointUI.as new file mode 100644 index 0000000..2cb20cd --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/AddPointUI.as @@ -0,0 +1,88 @@ +package com.view.ui.biwu +{ + import com.common.PublicMethod; + 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 flash.events.MouseEvent; + import flash.text.TextField; + + public class AddPointUI extends UIWindowBg + { + + private var input:UINumInputText; + + private var leftPointText:TextField; + + public var addPointF:Function; + + public function AddPointUI() + { + var _loc4_:TextField = null; + var _loc5_:UIButton = null; + super(); + initSize(125,150); + loadTitle(UITitleConfig.title_fenpeishuxing); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(300,120); + bg1.addChild(_loc1_); + _loc1_.x = 7; + _loc1_.y = 7; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,180); + _loc2_.text = "你可以在这里分配属性点"; + _loc1_.addChild(_loc2_); + _loc2_.x = 35; + _loc2_.y = 20; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,105); + _loc3_.text = "可分配最大属性点:"; + _loc1_.addChild(_loc3_); + _loc3_.x = 35; + _loc3_.y = 55; + this.leftPointText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,105); + _loc1_.addChild(this.leftPointText); + this.leftPointText.x = _loc3_.x + _loc3_.width; + this.leftPointText.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,105); + _loc4_.text = "请输入分配的点数:"; + _loc1_.addChild(_loc4_); + _loc4_.x = 35; + _loc4_.y = 90; + this.input = new UINumInputText(100); + _loc1_.addChild(this.input); + this.input.x = 155; + this.input.y = _loc4_.y - 3; + _loc5_ = new UIButton("确 定",2,10); + var _loc6_:UIButton = new UIButton("取 消",2,10); + bg1.addChild(_loc5_); + bg1.addChild(_loc6_); + _loc5_.x = 90; + _loc5_.y = 148; + _loc6_.x = 200; + _loc6_.y = _loc5_.y; + _loc6_.onClick = closeSelf; + _loc5_.onClick = this.giveSubmit; + } + + public function update(param1:int) : void + { + this.input.setMaxNum(param1); + this.input.setTextNum(0); + this.leftPointText.text = param1.toString(); + } + + private function giveSubmit(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ > 0 && this.addPointF != null) + { + this.addPointF(_loc2_); + } + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/ChangeHeroCareer.as b/flash_decompiled/com/view/ui/biwu/ChangeHeroCareer.as new file mode 100644 index 0000000..e8a9441 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/ChangeHeroCareer.as @@ -0,0 +1,669 @@ +package com.view.ui.biwu +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroUpEvent; + import com.newdata.hero.NewHero; + import com.view.mc.sprite.*; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.tip.HeroTip; + import com.view.ui.hero.HeroConst; + import com.view.ui.hero.HeroFirstViewStar; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ChangeHeroCareer extends HeroBuildBase + { + + private var bg1:UIWindowBg; + + private var imgSp:Sprite; + + private var heroTip:HeroTip; + + private var leadText:TextField; + + private var atkText:TextField; + + private var defText:TextField; + + private var hpText:TextField; + + private var aglText:TextField; + + private var value3:TextField; + + private var b1:TextField; + + private var b2:TextField; + + private var b3:TextField; + + private var b4:TextField; + + private var b5:TextField; + + private var careerArr:Array; + + private var changeBtn:UIButton; + + private var btn1:UIRadioBtn; + + private var btn2:UIRadioBtn; + + private var btn3:UIRadioBtn; + + private var btn4:UIRadioBtn; + + private var btn5:UIRadioBtn; + + private var btn6:UIRadioBtn; + + private var currBtn:UIRadioBtn; + + private var text1:TextField; + + private var text2:TextField; + + private var text3:TextField; + + private var text4:TextField; + + private var text5:TextField; + + private var text6:TextField; + + private var label1:LabelMc; + + public var starMap:HeroFirstViewStar; + + private var careerImg:MovieClip; + + private var currHero:NewHero; + + private var loader:LoadResource; + + private var headImg:Bitmap; + + public function ChangeHeroCareer() + { + var _loc2_:TextField = null; + var _loc3_:Sprite = null; + var _loc5_:TextField = null; + var _loc6_:TextField = null; + var _loc11_:int = 0; + var _loc12_:TextField = null; + var _loc18_:int = 0; + var _loc27_:MovieClip = null; + this.careerArr = new Array(); + super(); + var _loc1_:Bitmap = new Bitmap(playUIRes.getPng(ClassConfig.jingyan_bg)); + addChild(_loc1_); + _loc1_.x = 15; + _loc1_.y = 10; + this.imgSp = new Sprite(); + addChild(this.imgSp); + this.imgSp.x = _loc1_.x + 22; + this.imgSp.y = _loc1_.y + 16; + this.heroTip = new HeroTip(this.imgSp,face.stage,face.tip_bg); + this.careerImg = face.getMovieClip(ClassConfig.lib_hero_careerName); + addChild(this.careerImg); + this.careerImg.x = 54 + this.imgSp.x; + this.careerImg.y = 70 + this.imgSp.y; + this.careerImg.gotoAndStop(1); + _loc2_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "当前职业:"; + addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = _loc1_.y + _loc1_.height + 6; + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.value3); + this.value3.x = _loc2_.x + _loc2_.width; + this.value3.y = _loc2_.y; + _loc3_ = PublicMethod.getTdLine(145); + addChild(_loc3_); + _loc3_.x = 140; + _loc3_.y = 5; + this.starMap = new HeroFirstViewStar(); + addChild(this.starMap); + this.starMap.x = 224; + this.starMap.y = 90; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + addChild(_loc4_); + _loc4_.x = this.starMap.x - 77; + _loc4_.y = this.starMap.y - 20; + _loc4_.text = "体力"; + addChild(_loc5_); + _loc5_.x = this.starMap.x - 54; + _loc5_.y = this.starMap.y + 41; + _loc5_.text = "防御"; + addChild(_loc6_); + _loc6_.x = this.starMap.x + 34; + _loc6_.y = this.starMap.y + 41; + _loc6_.text = "敏捷"; + addChild(_loc7_); + _loc7_.x = this.starMap.x + 50; + _loc7_.y = this.starMap.y - 20; + _loc7_.text = "攻击"; + addChild(_loc8_); + _loc8_.x = this.starMap.x - 9; + _loc8_.y = this.starMap.y - 67; + _loc8_.text = "统率"; + var _loc9_:Sprite = PublicMethod.getTdLine(145); + addChild(_loc9_); + _loc9_.x = 330; + _loc9_.y = 5; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + addChild(_loc10_); + _loc10_.x = _loc9_.x + 20; + _loc10_.y = 20; + _loc10_.text = "统 率:"; + this.leadText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.leadText); + this.leadText.x = _loc10_.x + _loc10_.width; + this.leadText.y = _loc10_.y; + _loc11_ = 25; + _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + addChild(_loc12_); + _loc12_.x = _loc10_.x; + _loc12_.y = _loc10_.y + _loc11_; + _loc12_.text = "攻 击:"; + this.atkText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.atkText); + this.atkText.x = this.leadText.x; + this.atkText.y = _loc12_.y; + _loc2_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + addChild(_loc2_); + _loc2_.x = _loc10_.x; + _loc2_.y = _loc12_.y + _loc11_; + _loc2_.text = "防 御:"; + this.defText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.defText); + this.defText.x = this.leadText.x; + this.defText.y = _loc2_.y; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + addChild(_loc13_); + _loc13_.x = _loc10_.x; + _loc13_.y = _loc2_.y + _loc11_; + _loc13_.text = "体 力:"; + this.hpText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.hpText); + this.hpText.x = this.leadText.x; + this.hpText.y = _loc13_.y; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + addChild(_loc14_); + _loc14_.x = _loc10_.x; + _loc14_.y = _loc13_.y + _loc11_; + _loc14_.text = "敏 捷:"; + this.aglText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.aglText); + this.aglText.x = this.leadText.x; + this.aglText.y = _loc14_.y; + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(310,202); + addChild(this.bg1); + this.bg1.x = 5; + this.bg1.y = 160; + var _loc15_:UIWindowBg = new UIWindowBg(); + _loc15_.initThirdPanel(195,202); + addChild(_loc15_); + _loc15_.x = this.bg1.x + this.bg1.width + 3; + _loc15_.y = 160; + var _loc16_:UITitleBg = new UITitleBg("选择职业",this.bg1.width); + this.bg1.addChild(_loc16_); + _loc16_.x = int(this.bg1.width / 2 - _loc16_.width / 2); + var _loc17_:UITitleBg = new UITitleBg("兵种适应",_loc15_.width); + _loc15_.addChild(_loc17_); + _loc17_.x = int(_loc15_.width / 2 - _loc17_.width / 2); + _loc18_ = 1; + while(_loc18_ < 7) + { + this["btn" + _loc18_] = new UIRadioBtn(); + this.bg1.addChild(this["btn" + _loc18_]); + this["btn" + _loc18_].x = 10; + this["btn" + _loc18_].y = 13 + 23 * _loc18_; + this["btn" + _loc18_].onClick = this.clickCareer; + this["text" + _loc18_] = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.bg1.addChild(this["text" + _loc18_]); + this["text" + _loc18_].x = 34; + this["text" + _loc18_].y = 15 + 23 * _loc18_; + _loc18_++; + } + var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc19_.height = 130; + _loc19_.wordWrap = true; + _loc19_.multiline = true; + _loc19_.mouseEnabled = false; + this.bg1.addChild(_loc19_); + _loc19_.x = 110; + _loc19_.y = 39; + var _loc20_:TextFormat = new TextFormat(); + _loc20_.leading = 4; + _loc19_.defaultTextFormat = _loc20_; + var _loc21_:String = "1、达到60级的空闲武将才能转职
"; + _loc21_ = _loc21_ + "2、兵种适应性和武将基础属性都会改变
"; + _loc21_ = _loc21_ + "3、转职后会遗忘所学技能,返还全部聚灵丹和90%的技能点
"; + _loc21_ = _loc21_ + "4、每个武将每天只能转职1次(次日登陆刷新)
"; + _loc21_ = _loc21_ + "5、每次转职消耗一张转职卡"; + _loc19_.htmlText = _loc21_; + this.changeBtn = new UIButton("转 换",2,10); + this.bg1.addChild(this.changeBtn); + this.changeBtn.x = 130; + this.changeBtn.y = 180; + this.changeBtn.onClick = this.changeSubmit; + var _loc22_:TextField = PublicMethod.getTextFieldWithFillter(11583207,45); + var _loc23_:TextField = PublicMethod.getTextFieldWithFillter(11583207,45); + var _loc24_:TextField = PublicMethod.getTextFieldWithFillter(11583207,45); + var _loc25_:TextField = PublicMethod.getTextFieldWithFillter(11583207,45); + var _loc26_:TextField = PublicMethod.getTextFieldWithFillter(11583207,45); + this.b1 = PublicMethod.getTextField(11583207,30); + this.b2 = PublicMethod.getTextField(11583207,30); + this.b3 = PublicMethod.getTextField(11583207,30); + this.b4 = PublicMethod.getTextField(11583207,30); + this.b5 = PublicMethod.getTextField(11583207,30); + _loc15_.addChild(_loc22_); + _loc22_.x = 6; + _loc22_.y = 39; + _loc22_.text = "步兵"; + _loc15_.addChild(this.b1); + this.b1.x = _loc22_.x + 28; + this.b1.y = _loc22_.y; + this.b1.text = "A"; + _loc15_.addChild(_loc23_); + _loc23_.x = _loc22_.x; + _loc23_.y = _loc22_.y + 30; + _loc23_.text = "弓兵"; + _loc15_.addChild(this.b2); + this.b2.x = this.b1.x; + this.b2.y = _loc23_.y; + this.b2.text = "A"; + _loc15_.addChild(_loc24_); + _loc24_.x = _loc22_.x; + _loc24_.y = _loc23_.y + 30; + _loc24_.text = "骑兵"; + _loc15_.addChild(this.b3); + this.b3.x = this.b1.x; + this.b3.y = _loc24_.y; + this.b3.text = "A"; + _loc15_.addChild(_loc25_); + _loc25_.x = _loc22_.x; + _loc25_.y = _loc24_.y + 30; + _loc25_.text = "车兵"; + _loc15_.addChild(this.b4); + this.b4.x = this.b1.x; + this.b4.y = _loc25_.y; + this.b4.text = "A"; + _loc15_.addChild(_loc26_); + _loc26_.x = _loc22_.x; + _loc26_.y = _loc25_.y + 30; + _loc26_.text = "器械"; + _loc15_.addChild(this.b5); + this.b5.x = this.b1.x; + this.b5.y = _loc26_.y; + this.b5.text = "A"; + _loc18_ = 1; + while(_loc18_ < 6) + { + _loc27_ = face.getMovieClip("lib_ui_career" + _loc18_); + this.careerArr.push(_loc27_); + _loc15_.addChild(_loc27_); + _loc27_.x = 64; + _loc27_.y = 10 + _loc18_ * 30; + _loc27_.gotoAndStop(1); + _loc18_++; + } + } + + override public function update(param1:NewHero) : void + { + this.currHero = param1; + this.refresh(); + } + + private function refresh() : void + { + this.changeBtn.setUnEnable(); + if(this.currBtn != null) + { + this.currBtn.setUnSelect(); + } + this.setZhuanzhiView(); + } + + private function setZhuanzhiView() : void + { + var _loc1_:String = "pic/head/" + this.currHero.picPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + this.careerImg.gotoAndStop(HeroConst.getFrameByCareerName(this.currHero.career.careerEntName)); + var _loc2_:String = "" + this.currHero.lead + ""; + var _loc3_:int = this.currHero.finalLead - this.currHero.lead; + if(_loc3_ > 0) + { + _loc2_ = _loc2_ + " (+" + _loc3_ + ")"; + } + this.leadText.htmlText = _loc2_; + var _loc4_:String = "" + this.currHero.atk + ""; + var _loc5_:int = this.currHero.finalAtk - this.currHero.atk; + if(_loc5_ > 0) + { + _loc4_ = _loc4_ + " (+" + _loc5_ + ")"; + } + this.atkText.htmlText = _loc4_; + var _loc6_:String = "" + this.currHero.def + ""; + var _loc7_:int = this.currHero.finalDef - this.currHero.def; + if(_loc7_ > 0) + { + _loc6_ = _loc6_ + " (+" + _loc7_ + ")"; + } + this.defText.htmlText = _loc6_; + var _loc8_:String = "" + this.currHero.hp + ""; + var _loc9_:int = this.currHero.finalHp - this.currHero.hp; + if(_loc9_ > 0) + { + _loc8_ = _loc8_ + " (+" + _loc9_ + ")"; + } + this.hpText.htmlText = _loc8_; + var _loc10_:String = "" + this.currHero.agl + ""; + var _loc11_:int = this.currHero.finalAgl - this.currHero.agl; + if(_loc11_ > 0) + { + _loc10_ = _loc10_ + " (+" + _loc11_ + ")"; + } + this.aglText.htmlText = _loc10_; + this.value3.htmlText = this.currHero.career.careerName; + this.initCareerName(this.currHero.careerId); + this.starMap.showChart(new Array([this.currHero.finalLead,10000],[this.currHero.finalAtk,5000],[this.currHero.finalAgl,5000],[this.currHero.finalDef,5000],[this.currHero.finalHp,5000])); + } + + private function initCareerName(param1:int) : void + { + var _loc3_:String = null; + var _loc4_:String = null; + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc8_:String = null; + var _loc2_:int = param1 % 10; + this.btn1.visible = true; + this.btn2.visible = true; + this.btn3.visible = true; + this.btn4.visible = true; + this.btn5.visible = true; + this.btn6.visible = true; + if(param1 < 10) + { + _loc3_ = "勇士"; + _loc4_ = "步将"; + _loc5_ = "弓将"; + _loc6_ = "骑将"; + _loc7_ = "车将"; + _loc8_ = "器械师"; + } + else if(param1 < 20) + { + _loc3_ = "高级勇士"; + _loc4_ = "高级步将"; + _loc5_ = "高级弓将"; + _loc6_ = "高级骑将"; + _loc7_ = "高级车将"; + _loc8_ = "高级器械师"; + } + else if(param1 < 30) + { + _loc3_ = "精锐勇士"; + _loc4_ = "精锐步将"; + _loc5_ = "精锐弓将"; + _loc6_ = "精锐骑将"; + _loc7_ = "精锐车将"; + _loc8_ = "精锐器械师"; + } + else if(param1 < 40) + { + _loc3_ = "武圣"; + _loc4_ = "战神"; + _loc5_ = "神箭"; + _loc6_ = "飞骑"; + _loc7_ = "车神"; + _loc8_ = "工神"; + } + else if(param1 < 50) + { + _loc3_ = "武神"; + _loc4_ = "禁军步尉"; + _loc5_ = "禁军弓尉"; + _loc6_ = "禁军骑尉"; + _loc7_ = "禁军车尉"; + _loc8_ = "禁军器尉"; + } + else if(param1 < 60) + { + _loc3_ = "御前勇士"; + _loc4_ = "御前步师"; + _loc5_ = "御前箭师"; + _loc6_ = "御前骑师"; + _loc7_ = "御前车师"; + _loc8_ = "御前器师"; + } + else if(param1 < 60) + { + _loc3_ = "皇家勇士"; + _loc4_ = "皇家战神"; + _loc5_ = "皇家神箭"; + _loc6_ = "皇家飞骑"; + _loc7_ = "皇家车神"; + _loc8_ = "皇家工神"; + } + else + { + _loc3_ = "霸天武神"; + _loc4_ = "霸天虎将"; + _loc5_ = "霸天龙箭"; + _loc6_ = "霸天翼骑"; + _loc7_ = "霸天车皇"; + _loc8_ = "霸天工圣"; + } + this.text1.text = _loc3_; + this.text2.text = _loc4_; + this.text3.text = _loc5_; + this.text4.text = _loc6_; + this.text5.text = _loc7_; + this.text6.text = _loc8_; + if(_loc2_ == 0) + { + this.btn1.visible = false; + } + if(_loc2_ == 1) + { + this.btn2.visible = false; + } + if(_loc2_ == 2) + { + this.btn3.visible = false; + } + if(_loc2_ == 3) + { + this.btn4.visible = false; + } + if(_loc2_ == 4) + { + this.btn5.visible = false; + } + if(_loc2_ == 5) + { + this.btn6.visible = false; + } + this.careerArr[0].gotoAndStop(this.getNum(Number(this.currHero.career.buBing))); + this.careerArr[1].gotoAndStop(this.getNum(Number(this.currHero.career.gongBing))); + this.careerArr[2].gotoAndStop(this.getNum(Number(this.currHero.career.qiBing))); + this.careerArr[3].gotoAndStop(this.getNum(Number(this.currHero.career.cheBing))); + this.careerArr[4].gotoAndStop(this.getNum(Number(this.currHero.career.qiXie))); + this.setStr(this.getNum(Number(this.currHero.career.buBing)),this.b1); + this.setStr(this.getNum(Number(this.currHero.career.gongBing)),this.b2); + this.setStr(this.getNum(Number(this.currHero.career.qiBing)),this.b3); + this.setStr(this.getNum(Number(this.currHero.career.cheBing)),this.b4); + this.setStr(this.getNum(Number(this.currHero.career.qiXie)),this.b5); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + ConnectService.getInstance().addEventListener(HeroUpEvent.HeroUp_zhuanzhiResult,this.getZhuanzhiResult); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(HeroUpEvent.HeroUp_zhuanzhiResult,this.getZhuanzhiResult); + } + + private function getNum(param1:Number) : Number + { + var _loc2_:Number = NaN; + if(param1 < 0.92 && param1 >= 0.88) + { + _loc2_ = 1; + } + else if(param1 < 1.01 && param1 >= 1) + { + _loc2_ = 2; + } + else if(param1 < 1.11 && param1 >= 1.1) + { + _loc2_ = 3; + } + else if(param1 < 1.21 && param1 >= 1.2) + { + _loc2_ = 4; + } + else if(param1 > 1.2 && param1 <= 1.3) + { + _loc2_ = 5; + } + else if(param1 > 1.3 && param1 <= 1.4) + { + _loc2_ = 6; + } + else + { + _loc2_ = 7; + } + return _loc2_; + } + + private function setStr(param1:Number, param2:TextField) : * + { + if(param2 == null) + { + return; + } + param2.htmlText = ""; + if(param1 <= 1) + { + param2.htmlText = "C"; + } + else if(param1 <= 2) + { + param2.htmlText = "B"; + } + else if(param1 <= 3) + { + param2.htmlText = "A"; + } + else if(param1 <= 4) + { + param2.htmlText = "S"; + } + else if(param1 <= 5) + { + param2.htmlText = "SS"; + } + else if(param1 <= 6) + { + param2.htmlText = "SSS"; + } + else + { + param2.htmlText = "SSSS"; + } + } + + private function clickCareer(param1:MouseEvent) : void + { + if(this.currBtn != null) + { + this.currBtn.setUnSelect(); + } + this.currBtn = param1.currentTarget as UIRadioBtn; + this.currBtn.setSelect(); + this.changeBtn.setEnable(); + } + + private function changeSubmit(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("该武将的职业将会改变,四维属性将随之改变,遗忘所学技能,返回90%技能点,是否继续?",this.configSubmit); + } + + private function configSubmit() : void + { + var _loc1_:int = 0; + if(this.currBtn == this.btn1) + { + _loc1_ = 0; + } + if(this.currBtn == this.btn2) + { + _loc1_ = 1; + } + if(this.currBtn == this.btn3) + { + _loc1_ = 2; + } + if(this.currBtn == this.btn4) + { + _loc1_ = 3; + } + if(this.currBtn == this.btn5) + { + _loc1_ = 4; + } + if(this.currBtn == this.btn6) + { + _loc1_ = 5; + } + ConnectService.getInstance().heroService.changeHeroCar(this.currHero.heroId,_loc1_); + } + + private function getZhuanzhiResult(param1:HeroUpEvent) : void + { + MessageBoxUI.getInstance().addMessage("转职成功!"); + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/HeroBuildBase.as b/flash_decompiled/com/view/ui/biwu/HeroBuildBase.as new file mode 100644 index 0000000..c7b5995 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/HeroBuildBase.as @@ -0,0 +1,39 @@ +package com.view.ui.biwu +{ + import com.InstallFace; + import com.newdata.hero.NewHero; + import com.view.ui.PlayUIRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class HeroBuildBase extends Sprite + { + + public var playUIRes:PlayUIRes = PlayUIRes.getInstance(); + + public var face:InstallFace = InstallFace.getInstance(); + + public var playMc:MovieClip; + + public function HeroBuildBase() + { + super(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + } + + public function addEvent(param1:Event) : void + { + } + + public function delEvent(param1:Event) : void + { + } + + public function update(param1:NewHero) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/HeroBuildUI.as b/flash_decompiled/com/view/ui/biwu/HeroBuildUI.as new file mode 100644 index 0000000..cc6aa67 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/HeroBuildUI.as @@ -0,0 +1,344 @@ +package com.view.ui.biwu +{ + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + 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.hero.mc.HeroNameMc; + import flash.events.Event; + import flash.events.MouseEvent; + + public class HeroBuildUI extends PlayUI + { + + private var bg3:UIWindowBg; + + private var btnArr:Vector.; + + 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 lastBtn:UITabBtn; + + private var lastHeroMc:HeroNameMc; + + private var lastHeroPage:HeroBuildBase; + + private var heroList:Array; + + private var heroMcVec:Vector.; + + private var jinFengPage:HeroJinFeng; + + private var jingYanPage:HeroJingYan; + + private var changeCareer:ChangeHeroCareer; + + private var shenbingPage:Shenbing; + + private var jiangHun:JiangHun; + + public function HeroBuildUI() + { + super(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc4_:int = 0; + var _loc5_:UITabBtn = null; + var _loc6_:HeroNameMc = null; + super.createUI(); + super.loadTitle(UITitleConfig.title_dianjiangtai); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(79,392); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UITitleBg = new UITitleBg("武将列表",82); + _loc2_.addChild(_loc3_); + _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2); + this.btn_1 = new UITabBtn("晋 封",2); + this.btn_2 = new UITabBtn("精 研",2); + this.btn_3 = new UITabBtn("转 职",2); + this.btn_4 = new UITabBtn("天 赋",2); + this.btn_5 = new UITabBtn("将 魂",2); + this.btnArr = new Vector.(); + 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); + _loc4_ = 0; + for each(_loc5_ in this.btnArr) + { + _loc1_.addChild(_loc5_); + _loc5_.x = 110 + _loc4_ * 66; + _loc5_.y = 4; + _loc5_.onClick = this.getHeroPage; + _loc4_++; + } + this.heroMcVec = new Vector.(); + _loc4_ = 0; + while(_loc4_ < 15) + { + _loc6_ = new HeroNameMc(); + _loc2_.addChild(_loc6_); + _loc6_.x = 2; + _loc6_.y = 25 + 25 * _loc4_; + this.heroMcVec.push(_loc6_); + _loc6_.addEventListener(MouseEvent.CLICK,this.clickHero,false,0,true); + _loc4_++; + } + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(528,367); + _loc1_.addChild(this.bg3); + this.bg3.x = _loc2_.x + _loc2_.width + 4; + this.bg3.y = 29; + this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListResult); + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETHEROBYID,this.getHeroResult); + this.getHeroList(); + } + + private function getHeroPage(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.lastBtn) + { + this.lastBtn.select = false; + } + this.lastBtn = _loc2_; + this.lastBtn.select = true; + if(this.lastBtn == this.btn_1) + { + if(this.lastHeroPage != this.getJinFeng()) + { + if(this.lastHeroPage != null && this.bg3.contains(this.lastHeroPage)) + { + this.bg3.removeChild(this.lastHeroPage); + } + this.lastHeroPage = this.getJinFeng(); + this.bg3.addChild(this.lastHeroPage); + } + } + if(this.lastBtn == this.btn_2) + { + if(this.lastHeroPage != this.getJingYan()) + { + if(this.lastHeroPage != null && this.bg3.contains(this.lastHeroPage)) + { + this.bg3.removeChild(this.lastHeroPage); + } + this.lastHeroPage = this.getJingYan(); + this.bg3.addChild(this.lastHeroPage); + } + } + if(this.lastBtn == this.btn_3) + { + if(this.lastHeroPage != this.getChangeCareer()) + { + if(this.lastHeroPage != null && this.bg3.contains(this.lastHeroPage)) + { + this.bg3.removeChild(this.lastHeroPage); + } + this.lastHeroPage = this.getChangeCareer(); + this.bg3.addChild(this.lastHeroPage); + } + } + if(this.lastBtn == this.btn_4) + { + if(this.lastHeroPage != this.getShenbing()) + { + if(this.lastHeroPage != null && this.bg3.contains(this.lastHeroPage)) + { + this.bg3.removeChild(this.lastHeroPage); + } + this.lastHeroPage = this.getShenbing(); + this.bg3.addChild(this.lastHeroPage); + } + } + if(this.lastBtn == this.btn_5) + { + if(this.lastHeroPage != this.getJiangHun()) + { + if(this.lastHeroPage != null && this.bg3.contains(this.lastHeroPage)) + { + this.bg3.removeChild(this.lastHeroPage); + } + this.lastHeroPage = this.getJiangHun(); + this.bg3.addChild(this.lastHeroPage); + } + } + this.showHeroPage(); + } + + private function getHeroListResult(param1:DevEvent) : void + { + this.getHeroList(); + } + + private function getHeroResult(param1:DevEvent) : void + { + var _loc3_:* = undefined; + var _loc2_:NewHero = NewHeroData.getHeroByHeroId(param1.id); + for(_loc3_ in this.heroMcVec) + { + if(Boolean(this.heroMcVec[_loc3_].hero) && this.heroMcVec[_loc3_].hero.heroId == _loc2_.heroId) + { + this.heroMcVec[_loc3_].setHero(_loc2_); + } + } + if(this.lastHeroMc.hero.heroId == _loc2_.heroId) + { + this.showHeroPage(); + } + } + + private function clickHero(param1:MouseEvent) : void + { + var _loc2_:HeroNameMc = param1.currentTarget as HeroNameMc; + if(_loc2_.hero == null) + { + return; + } + if(this.lastHeroMc) + { + this.lastHeroMc.setClick(false); + } + this.lastHeroMc = _loc2_; + this.lastHeroMc.setClick(true); + this.showHeroPage(); + } + + private function showHeroPage() : void + { + if(this.lastHeroMc == null) + { + return; + } + var _loc1_:NewHero = this.lastHeroMc.hero; + this.lastHeroPage.update(_loc1_); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(this.heroMcVec) + { + this.getHeroList(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + } + + private function getHeroList() : void + { + var _loc2_:* = undefined; + this.clearHero(); + var _loc1_:Vector. = NewHeroData.getAllHeroList(); + if(_loc1_.length == 0) + { + return; + } + for(_loc2_ in this.heroMcVec) + { + if(_loc2_ >= _loc1_.length) + { + this.heroMcVec[_loc2_].setHero(null); + } + else + { + this.heroMcVec[_loc2_].setHero(_loc1_[_loc2_]); + } + } + if(this.lastHeroMc == null) + { + this.lastHeroMc = this.heroMcVec[0]; + } + this.lastHeroMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + + private function clearHero() : void + { + var _loc1_:HeroNameMc = null; + for each(_loc1_ in this.heroMcVec) + { + _loc1_.setHero(null); + } + } + + private function getJinFeng() : HeroBuildBase + { + if(this.jinFengPage == null) + { + this.jinFengPage = new HeroJinFeng(); + this.jinFengPage.x = 4; + this.jinFengPage.y = 4; + } + return this.jinFengPage; + } + + private function getJingYan() : HeroBuildBase + { + if(this.jingYanPage == null) + { + this.jingYanPage = new HeroJingYan(); + } + return this.jingYanPage; + } + + private function getChangeCareer() : ChangeHeroCareer + { + if(this.changeCareer == null) + { + this.changeCareer = new ChangeHeroCareer(); + } + return this.changeCareer; + } + + private function getShenbing() : Shenbing + { + if(this.shenbingPage == null) + { + this.shenbingPage = new Shenbing(); + } + return this.shenbingPage; + } + + private function getJiangHun() : JiangHun + { + if(this.jiangHun == null) + { + this.jiangHun = new JiangHun(); + } + return this.jiangHun; + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/HeroJinFeng.as b/flash_decompiled/com/view/ui/biwu/HeroJinFeng.as new file mode 100644 index 0000000..bc522cf --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/HeroJinFeng.as @@ -0,0 +1,491 @@ +package com.view.ui.biwu +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.hero.event.HeroUpEvent; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.newui.UIWindowBg; + import com.view.tip.HeroTip; + import com.view.ui.hero.HeroConst; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PakState; + import com.view.ui.tools.ToolView; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HeroJinFeng extends HeroBuildBase + { + + private var imgSp:Sprite; + + private var careerImg:MovieClip; + + private var jinfeng1:JinfengItem1; + + private var jinfeng2:JinfengItem2; + + private var jinfeng3:JinfengItem3; + + private var jinfeng4:JinfengItem4; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var value6:TextField; + + private var leftPoint:TextField; + + private var itemNum:TextField; + + private var upLevel:UISmallBtn; + + private var maxLevel:TextField; + + private var xidianBtn:UISmallBtn; + + private var piLiang1:UISmallBtn; + + private var piLiang2:UISmallBtn; + + private var piLiang3:UISmallBtn; + + private var piLiang4:UISmallBtn; + + private var currHero:NewHero; + + private var loader:LoadResource; + + private var headImg:Bitmap; + + private var heroTip:HeroTip; + + private var regenerView:HeroRegenerView; + + private var type:int; + + private var addPointUI:AddPointUI; + + public function HeroJinFeng() + { + var _loc3_:int = 0; + var _loc4_:TextField = null; + super(); + var _loc1_:Bitmap = new Bitmap(playUIRes.getPng(ClassConfig.jingyan_bg)); + addChild(_loc1_); + _loc1_.x = 55; + _loc1_.y = 12; + this.imgSp = new Sprite(); + addChild(this.imgSp); + this.imgSp.x = _loc1_.x + 22; + this.imgSp.y = _loc1_.y + 16; + this.careerImg = face.getMovieClip(ClassConfig.lib_hero_careerName); + addChild(this.careerImg); + this.careerImg.x = 54 + this.imgSp.x; + this.careerImg.y = 70 + this.imgSp.y; + this.careerImg.gotoAndStop(1); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,42); + _loc2_.text = "姓 名:"; + addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = _loc1_.y + _loc1_.height + 20; + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(this.value1); + this.value1.x = _loc2_.x + _loc2_.width; + this.value1.y = _loc2_.y; + _loc3_ = 25; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc4_.text = "等 级:"; + addChild(_loc4_); + _loc4_.x = _loc2_.x; + _loc4_.y = _loc2_.y + _loc3_; + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc5_.text = "攻 击:"; + addChild(_loc5_); + _loc5_.x = _loc2_.x; + _loc5_.y = _loc4_.y + _loc3_; + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,118); + addChild(this.value3); + this.value3.x = this.value1.x; + this.value3.y = _loc5_.y; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc6_.text = "防 御:"; + addChild(_loc6_); + _loc6_.x = _loc2_.x; + _loc6_.y = _loc5_.y + _loc3_; + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,118); + addChild(this.value4); + this.value4.x = this.value1.x; + this.value4.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc7_.text = "体 力:"; + addChild(_loc7_); + _loc7_.x = _loc2_.x; + _loc7_.y = _loc6_.y + _loc3_; + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,118); + addChild(this.value5); + this.value5.x = this.value1.x; + this.value5.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc8_.text = "敏 捷:"; + addChild(_loc8_); + _loc8_.x = _loc2_.x; + _loc8_.y = _loc7_.y + _loc3_; + this.value6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,118); + addChild(this.value6); + this.value6.x = this.value1.x; + this.value6.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,85); + _loc9_.text = "可分配属性点:"; + addChild(_loc9_); + _loc9_.x = _loc2_.x; + _loc9_.y = _loc8_.y + _loc3_; + this.leftPoint = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.leftPoint); + this.leftPoint.x = _loc9_.x + _loc9_.width; + this.leftPoint.y = _loc9_.y; + this.piLiang1 = new UISmallBtn("批 量",2); + this.piLiang2 = new UISmallBtn("批 量",2); + this.piLiang3 = new UISmallBtn("批 量",2); + this.piLiang4 = new UISmallBtn("批 量",2); + this.piLiang1.onClick = this.piLiangUI; + this.piLiang2.onClick = this.piLiangUI; + this.piLiang3.onClick = this.piLiangUI; + this.piLiang4.onClick = this.piLiangUI; + addChild(this.piLiang1); + this.piLiang1.x = this.value3.x + this.value3.width; + this.piLiang1.y = this.value3.y - 2; + addChild(this.piLiang2); + this.piLiang2.x = this.piLiang1.x; + this.piLiang2.y = this.value4.y - 2; + addChild(this.piLiang3); + this.piLiang3.x = this.piLiang1.x; + this.piLiang3.y = this.value5.y - 2; + addChild(this.piLiang4); + this.piLiang4.x = this.piLiang1.x; + this.piLiang4.y = this.value6.y - 2; + this.xidianBtn = new UISmallBtn("洗 点",2); + addChild(this.xidianBtn); + this.xidianBtn.x = this.piLiang1.x; + this.xidianBtn.y = this.leftPoint.y - 2; + this.xidianBtn.onClick = this.xidian; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,85); + _loc10_.text = "武将最大等级:"; + addChild(_loc10_); + _loc10_.x = _loc2_.x; + _loc10_.y = _loc9_.y + _loc3_; + this.upLevel = new UISmallBtn("晋 升",2); + addChild(this.upLevel); + this.upLevel.x = this.xidianBtn.x; + this.upLevel.y = _loc10_.y - 2; + this.upLevel.onClick = this.jinShengHero; + var _loc11_:Button_9 = new Button_9("购买洗点卡"); + _loc11_.addEventListener(MouseEvent.CLICK,this.buyItem1); + addChild(_loc11_); + _loc11_.x = _loc2_.x; + _loc11_.y = _loc10_.y + _loc3_; + this.maxLevel = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.maxLevel); + this.maxLevel.x = _loc10_.x + _loc10_.width; + this.maxLevel.y = _loc10_.y; + var _loc12_:UIWindowBg = new UIWindowBg(); + _loc12_.initSecondPanel(300,358); + addChild(_loc12_); + _loc12_.x = 220; + this.heroTip = new HeroTip(this.imgSp,face.stage,face.tip_bg); + var _loc13_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_ui_bg_9),55,11); + _loc12_.addChild(_loc13_); + _loc13_.x = 120; + _loc13_.y = 50; + var _loc14_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_ui_bg_9),65,11); + _loc12_.addChild(_loc14_); + _loc14_.x = 260; + _loc14_.y = 115; + _loc14_.rotation = 90; + var _loc15_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_ui_bg_9),55,11); + _loc12_.addChild(_loc15_); + _loc15_.x = 195; + _loc15_.y = 255; + _loc15_.rotation = 180; + this.jinfeng1 = new JinfengItem1(); + this.jinfeng2 = new JinfengItem2(); + this.jinfeng3 = new JinfengItem3(); + this.jinfeng4 = new JinfengItem4(); + this.jinfeng1.onClickF = this.showViewClick; + this.jinfeng2.onClickF = this.showViewClick; + this.jinfeng3.onClickF = this.showViewClick; + this.jinfeng4.onClickF = this.showViewClick; + _loc12_.addChild(this.jinfeng1); + this.jinfeng1.x = 20; + this.jinfeng1.y = 20; + _loc12_.addChild(this.jinfeng2); + this.jinfeng2.x = 200; + this.jinfeng2.y = this.jinfeng1.y; + _loc12_.addChild(this.jinfeng3); + this.jinfeng3.x = this.jinfeng2.x; + this.jinfeng3.y = 200; + _loc12_.addChild(this.jinfeng4); + this.jinfeng4.x = 10; + this.jinfeng4.y = 190; + ToolTipManager.getInstance().setToolTip(this.xidianBtn,new TxtTooltip("使用1张洗点卡可以把分配的属性全部洗去"),false,-1,false); + var _loc16_:Button_9 = new Button_9("购买晋封卡"); + _loc16_.addEventListener(MouseEvent.CLICK,this.buyItem2); + _loc12_.addChild(_loc16_); + _loc16_.x = 120; + _loc16_.y = 140; + var _loc17_:Button_9 = new Button_9("晋封说明"); + _loc12_.addChild(_loc17_); + _loc17_.x = 250; + _loc17_.y = 340; + var _loc18_:String = "晋封说明:
"; + _loc18_ = _loc18_ + "禁军武将升一级可获得5点分配属性
"; + _loc18_ = _loc18_ + "御前武将升一级获得20点分配属性
"; + _loc18_ = _loc18_ + "皇家武将升一级获得30点分配属性
"; + _loc18_ = _loc18_ + "霸天武将升一级获得100点分配属性
"; + ToolTipManager.getInstance().setToolTip(_loc17_,new TxtTooltip(_loc18_),false,-1,false); + this.itemNum = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc12_.addChild(this.itemNum); + this.itemNum.x = 10; + this.itemNum.y = 340; + var _loc19_:String = "晋升说明:
"; + _loc19_ = _loc19_ + "当武将等级达到霸天后即可晋升
"; + _loc19_ = _loc19_ + "晋升后武将等级能进一步得到提升
"; + _loc19_ = _loc19_ + "每晋级一次,武将最大等级提高100级
"; + _loc19_ = _loc19_ + "每晋升一次,需要消耗一个晋升令
"; + ToolTipManager.getInstance().setToolTip(this.upLevel,new TxtTooltip(_loc19_),false,-1,false); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + ConnectService.getInstance().addEventListener(HeroUpEvent.HeroUp_jinFengHero,this.jinFengHeroSucc); + ConnectService.getInstance().addEventListener(HeroUpEvent.HeroUp_jinShengHero,this.jinShengHeroSucc); + ConnectService.getInstance().addEventListener(HeroUpEvent.HeroUp_xiDianHero,this.xiDianHeroSucc); + ConnectService.getInstance().addEventListener(HeroUpEvent.HeroUp_addDianHero,this.addDianHeroSucc); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(HeroUpEvent.HeroUp_jinFengHero,this.jinFengHeroSucc); + ConnectService.getInstance().removeEventListener(HeroUpEvent.HeroUp_jinShengHero,this.jinShengHeroSucc); + ConnectService.getInstance().removeEventListener(HeroUpEvent.HeroUp_xiDianHero,this.xiDianHeroSucc); + ConnectService.getInstance().removeEventListener(HeroUpEvent.HeroUp_addDianHero,this.addDianHeroSucc); + if(Boolean(this.regenerView) && contains(this.regenerView)) + { + removeChild(this.regenerView); + } + if(Boolean(this.addPointUI) && contains(this.addPointUI)) + { + removeChild(this.addPointUI); + } + } + + override public function update(param1:NewHero) : void + { + this.currHero = param1; + this.setHeroInfo(); + } + + private function jinShengHero(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.jinShengHero(this.currHero.heroId); + } + + private function jinShengHeroSucc(param1:HeroUpEvent) : void + { + this.refresh(); + } + + private function refresh() : void + { + this.setItemCount(null); + } + + private function jinFengHeroSucc(param1:HeroUpEvent) : void + { + this.refresh(); + if(Boolean(this.regenerView) && contains(this.regenerView)) + { + removeChild(this.regenerView); + } + } + + private function xiDianHeroSucc(param1:HeroUpEvent) : void + { + this.refresh(); + } + + private function getItems1() : int + { + return PakState.getItemsByEntId(10371272); + } + + private function setItemCount(param1:DevEvent) : void + { + this.itemNum.htmlText = "晋升令数量:" + this.getItems1() + ""; + this.initItem(); + } + + private function setHeroInfo() : void + { + this.value1.htmlText = this.currHero.showName; + this.value2.text = HeroConst.changeName(this.currHero.level,this.currHero.changeCount); + this.careerImg.gotoAndStop(HeroConst.getFrameByCareerName(this.currHero.career.careerEntName)); + this.value3.text = this.currHero.finalAtk - this.currHero.addAtk + "+(" + this.currHero.addAtk + ")"; + this.value4.text = this.currHero.finalDef - this.currHero.addDef + "+(" + this.currHero.addDef + ")"; + this.value5.text = this.currHero.finalHp - this.currHero.addHp + "+(" + this.currHero.addHp + ")"; + this.value6.text = this.currHero.finalAgl - this.currHero.addAgl + "+(" + this.currHero.addAgl + ")"; + this.leftPoint.htmlText = "" + this.currHero.leftPoint + ""; + this.maxLevel.text = "" + this.currHero.maxLevel; + this.loadHeroHead(); + this.setItemCount(null); + } + + private function initItem() : void + { + this.jinfeng1.update(this.currHero); + this.jinfeng2.update(this.currHero); + this.jinfeng3.update(this.currHero); + this.jinfeng4.update(this.currHero); + } + + private function loadHeroHead() : void + { + var _loc1_:String = ServerConfig.IMAGE_HEAD_URL + this.currHero.picPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + } + + private function buyItem1(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_WUJIANGXIDIAN"); + _loc2_.onRefresh = null; + _loc2_.show(); + } + + private function buyItem2(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_JINGFENG"); + _loc2_.onRefresh = this.refresh1; + _loc2_.show(); + } + + private function refresh1() : void + { + var _loc1_:ToolView = ToolView.getInstance(); + _loc1_.closeUI(null); + this.refresh(); + } + + private function showViewClick(param1:int) : void + { + if(this.currHero.level < 120) + { + MessageBoxUI.getInstance().addMessage("武将未达到晋封等级"); + return; + } + if(this.regenerView == null) + { + this.regenerView = new HeroRegenerView(); + } + addChild(this.regenerView); + this.regenerView.x = int(width / 2 - this.regenerView.width / 2); + this.regenerView.y = int(height / 2 - this.regenerView.height / 2); + this.regenerView.update(this.currHero,param1); + } + + private function xidian(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确定洗去该武将已分配的属性点么?",this.configXiDian); + } + + private function configXiDian() : void + { + ConnectService.getInstance().heroService.xiDianHero(this.currHero.heroId); + } + + private function addPoint(param1:int) : void + { + ConnectService.getInstance().heroService.addDianHero(this.currHero.heroId,this.type,param1); + } + + private function addDianHeroSucc(param1:HeroUpEvent) : void + { + if(Boolean(this.addPointUI) && contains(this.addPointUI)) + { + removeChild(this.addPointUI); + } + this.refresh(); + } + + private function piLiangUI(param1:MouseEvent) : void + { + var _loc2_:UISmallBtn = param1.currentTarget as UISmallBtn; + if(_loc2_ == this.piLiang1) + { + this.type = 1; + } + if(_loc2_ == this.piLiang2) + { + this.type = 2; + } + if(_loc2_ == this.piLiang3) + { + this.type = 3; + } + if(_loc2_ == this.piLiang4) + { + this.type = 4; + } + if(this.addPointUI == null) + { + this.addPointUI = new AddPointUI(); + this.addPointUI.addPointF = this.addPoint; + } + addChild(this.addPointUI); + this.addPointUI.x = int(width / 2 - this.addPointUI.width / 2); + this.addPointUI.y = int(height / 2 - this.addPointUI.height / 2); + this.addPointUI.update(this.currHero.leftPoint); + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/HeroJingYan.as b/flash_decompiled/com/view/ui/biwu/HeroJingYan.as new file mode 100644 index 0000000..dbd1fdf --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/HeroJingYan.as @@ -0,0 +1,664 @@ +package com.view.ui.biwu +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.newdata.hero.NewHero; + import com.newdata.user.NewUserData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITabBtn; + import com.view.newui.UITable; + import com.view.newui.UIWindowBg; + import com.view.tip.HeroTip; + import com.view.ui.hero.HeroConst; + import com.view.ui.hero.HeroFirstViewStar; + import com.view.ui.message.MessageBoxUI; + import fl.controls.ComboBox; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HeroJingYan extends HeroBuildBase + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var imgSp:Sprite; + + private var careerImg:MovieClip; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var combox:ComboBox; + + private var m_regBtn:UIButton; + + private var m_replaceBtn:UIButton; + + private var m_keepBtn:UIButton; + + public var starMap:HeroFirstViewStar; + + private var tab1:UITabBtn; + + private var tab2:UITabBtn; + + private var tab3:UITabBtn; + + private var currAtk:TextField; + + private var currDef:TextField; + + private var currHp:TextField; + + private var currAgl:TextField; + + private var b2:TextField; + + private var b3:TextField; + + private var b4:TextField; + + private var b5:TextField; + + private var c2:TextField; + + private var c3:TextField; + + private var c4:TextField; + + private var c5:TextField; + + private var d2:TextField; + + private var d3:TextField; + + private var d4:TextField; + + private var d5:TextField; + + private var lastType:Sprite; + + private var tabTable:UIWindowBg; + + private var lastTabBtn:UITabBtn; + + private var currHero:NewHero; + + private var m_money:String; + + private var loader:LoadResource; + + private var lastUrl:String; + + private var headImg:Bitmap; + + private var heroTip:HeroTip; + + private var page1:JingYanItem1; + + private var page2:JingYanItem2; + + private var page3:JingYanItem3; + + public function HeroJingYan() + { + var _loc3_:TextField = null; + var _loc6_:TextField = null; + var _loc12_:TextFormat = null; + super(); + var _loc1_:Bitmap = new Bitmap(playUIRes.getPng(ClassConfig.jingyan_bg)); + addChild(_loc1_); + _loc1_.x = 15; + _loc1_.y = 10; + this.imgSp = new Sprite(); + addChild(this.imgSp); + this.imgSp.x = _loc1_.x + 22; + this.imgSp.y = _loc1_.y + 16; + this.heroTip = new HeroTip(this.imgSp,face.stage,face.tip_bg); + this.careerImg = face.getMovieClip(ClassConfig.lib_hero_careerName); + addChild(this.careerImg); + this.careerImg.x = 54 + this.imgSp.x; + this.careerImg.y = 70 + this.imgSp.y; + this.careerImg.gotoAndStop(1); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "姓 名:"; + addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = _loc1_.y + _loc1_.height + 6; + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.value1); + this.value1.x = _loc2_.x + _loc2_.width; + this.value1.y = _loc2_.y; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc3_.text = "等 级:"; + addChild(_loc3_); + _loc3_.x = _loc2_.x; + _loc3_.y = _loc2_.y + 23; + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc3_.y; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc4_.text = "经验境界:"; + addChild(_loc4_); + _loc4_.x = _loc3_.x; + _loc4_.y = _loc3_.y + 23; + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.value3); + this.value3.x = _loc4_.x + _loc4_.width; + this.value3.y = _loc4_.y; + var _loc5_:Sprite = PublicMethod.getTdLine(185); + addChild(_loc5_); + _loc5_.x = 140; + _loc5_.y = 5; + this.starMap = new HeroFirstViewStar(); + addChild(this.starMap); + this.starMap.x = 224; + this.starMap.y = 90; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + addChild(_loc6_); + _loc6_.x = this.starMap.x - 77; + _loc6_.y = this.starMap.y - 20; + _loc6_.text = "体力"; + addChild(_loc7_); + _loc7_.x = this.starMap.x - 54; + _loc7_.y = this.starMap.y + 41; + _loc7_.text = "防御"; + addChild(_loc8_); + _loc8_.x = this.starMap.x + 34; + _loc8_.y = this.starMap.y + 41; + _loc8_.text = "敏捷"; + addChild(_loc9_); + _loc9_.x = this.starMap.x + 50; + _loc9_.y = this.starMap.y - 20; + _loc9_.text = "攻击"; + addChild(_loc10_); + _loc10_.x = this.starMap.x - 9; + _loc10_.y = this.starMap.y - 67; + _loc10_.text = "统率"; + this.tab1 = new UITabBtn("普通精研",2); + this.tab2 = new UITabBtn("强化精研",2); + this.tab3 = new UITabBtn("超级精研",2); + this.tab1.onClick = this.changeType; + this.tab2.onClick = this.changeType; + this.tab3.onClick = this.changeType; + addChild(this.tab1); + this.tab1.x = 320; + this.tab1.y = 4; + addChild(this.tab2); + this.tab2.x = this.tab1.x + 66; + this.tab2.y = this.tab1.y; + addChild(this.tab3); + this.tab3.x = this.tab2.x + 66; + this.tab3.y = this.tab1.y; + this.tabTable = new UIWindowBg(); + this.tabTable.initSecondPanel(213,153); + addChild(this.tabTable); + this.tabTable.x = this.tab1.x - 10; + this.tabTable.y = this.tab3.y + 25; + this.tab1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(519,166); + addChild(this.bg1); + this.bg1.x = 5; + this.bg1.y = this.tabTable.y + this.tabTable.height + 4; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc11_.height = 150; + _loc11_.multiline = true; + _loc11_.wordWrap = true; + _loc11_.textColor = 16777215; + this.bg1.addChild(_loc11_); + _loc12_ = new TextFormat(); + _loc12_.leading = 4; + _loc11_.defaultTextFormat = _loc12_; + _loc11_.htmlText = "精研对象:\n已晋封或达到60级的空闲武将\n"; + _loc11_.htmlText += "精研效果:\n"; + _loc11_.htmlText += "精研后将会重新分配基础属性,单项属性的比例在10%~50%之间。单项属性越高,该属性继续增长的几率越小,同时变化的幅度也越小。"; + _loc11_.x = 10; + _loc11_.y = 10; + var _loc13_:TextFormat = new TextFormat(); + _loc13_.align = "center"; + _loc13_.size = 12; + _loc13_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"选择一种精研方式", + "data":0 + }); + this.combox.addItem({ + "label":"攻50%防10%体10%敏30%", + "data":1 + }); + this.combox.addItem({ + "label":"攻10%防50%体10%敏30%", + "data":2 + }); + this.combox.addItem({ + "label":"攻10%防10%体50%敏30%", + "data":3 + }); + this.combox.addItem({ + "label":"攻50%防10%体30%敏10%", + "data":4 + }); + this.combox.width = 160; + this.bg1.addChild(this.combox); + this.combox.textField.setStyle("textFormat",_loc13_); + this.combox.dropdown.setRendererStyle("textFormat",_loc13_); + this.combox.x = 30; + this.combox.y = 145; + var _loc14_:UIButton = new UIButton("保存",2,10); + this.bg1.addChild(_loc14_); + _loc14_.x = this.combox.x + 170; + _loc14_.y = 145; + _loc14_.onClick = this.selectColor; + var _loc15_:Array = ["当前基础属性","当前比例","新属性","新比例"]; + var _loc16_:Array = [90,60,80,60]; + var _loc17_:UITable = new UITable(); + _loc17_.lineHeight = 26; + _loc17_.drawLine = true; + _loc17_.install(4,_loc15_,_loc16_); + this.bg1.addChild(_loc17_); + _loc17_.x = 238; + _loc17_.y = 4; + this.m_regBtn = new UIButton("精 研",2,10); + this.m_replaceBtn = new UIButton("换成新属性",3,10); + this.m_keepBtn = new UIButton("维持旧属性",3,10); + this.m_replaceBtn.onClick = this.saveJingYan; + this.m_keepBtn.onClick = this.cancelJingYan; + this.bg1.addChild(this.m_regBtn); + this.bg1.addChild(this.m_replaceBtn); + this.bg1.addChild(this.m_keepBtn); + this.m_regBtn.x = 345; + this.m_regBtn.y = _loc17_.y + _loc17_.height + 9; + this.m_replaceBtn.x = 345; + this.m_replaceBtn.y = this.m_regBtn.y; + this.m_keepBtn.x = this.m_replaceBtn.x + 90; + this.m_keepBtn.y = this.m_regBtn.y; + this.m_regBtn.onClick = this.jingyanHero; + _loc12_ = PublicMethod.getCenterTextFormat(); + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40); + _loc18_.text = "攻击:"; + _loc17_.addChild(_loc18_); + _loc18_.x = 5; + _loc18_.y = 29; + this.currAtk = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + _loc17_.addChild(this.currAtk); + this.currAtk.x = _loc18_.x + _loc18_.width; + this.currAtk.y = _loc18_.y; + var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40); + _loc19_.text = "防御:"; + _loc17_.addChild(_loc19_); + _loc19_.x = _loc18_.x; + _loc19_.y = _loc18_.y + 26; + this.currDef = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + _loc17_.addChild(this.currDef); + this.currDef.x = _loc19_.x + _loc19_.width; + this.currDef.y = _loc19_.y; + var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40); + _loc20_.text = "体力:"; + _loc17_.addChild(_loc20_); + _loc20_.x = _loc18_.x; + _loc20_.y = _loc19_.y + 26; + this.currHp = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + _loc17_.addChild(this.currHp); + this.currHp.x = _loc20_.x + _loc20_.width; + this.currHp.y = _loc20_.y; + var _loc21_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40); + _loc21_.text = "敏捷:"; + _loc17_.addChild(_loc21_); + _loc21_.x = _loc18_.x; + _loc21_.y = _loc20_.y + 26; + this.currAgl = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + _loc17_.addChild(this.currAgl); + this.currAgl.x = _loc21_.x + _loc21_.width; + this.currAgl.y = _loc21_.y; + this.b2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,46); + this.b2.text = ""; + _loc17_.addChild(this.b2); + this.b2.x = 94; + this.b2.y = _loc18_.y; + this.b2.defaultTextFormat = _loc12_; + this.b3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,46); + _loc17_.addChild(this.b3); + this.b3.x = this.b2.x; + this.b3.y = _loc19_.y; + this.b3.defaultTextFormat = _loc12_; + this.b4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,46); + _loc17_.addChild(this.b4); + this.b4.x = this.b2.x; + this.b4.y = _loc20_.y; + this.b4.defaultTextFormat = _loc12_; + this.b5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,46); + _loc17_.addChild(this.b5); + this.b5.x = this.b2.x; + this.b5.y = _loc21_.y; + this.b5.defaultTextFormat = _loc12_; + this.c2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,82); + this.c2.text = ""; + _loc17_.addChild(this.c2); + this.c2.x = 150; + this.c2.y = _loc18_.y; + this.c2.defaultTextFormat = _loc12_; + this.c3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,82); + _loc17_.addChild(this.c3); + this.c3.x = this.c2.x; + this.c3.y = _loc19_.y; + this.c3.defaultTextFormat = _loc12_; + this.c4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,82); + _loc17_.addChild(this.c4); + this.c4.x = this.c2.x; + this.c4.y = _loc20_.y; + this.c4.defaultTextFormat = _loc12_; + this.c5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,82); + _loc17_.addChild(this.c5); + this.c5.x = this.c2.x; + this.c5.y = _loc21_.y; + this.c5.defaultTextFormat = _loc12_; + this.d2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + this.d2.text = ""; + _loc17_.addChild(this.d2); + this.d2.x = 233; + this.d2.y = _loc18_.y; + this.d2.defaultTextFormat = _loc12_; + this.d3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + _loc17_.addChild(this.d3); + this.d3.x = this.d2.x; + this.d3.y = _loc19_.y; + this.d3.defaultTextFormat = _loc12_; + this.d4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + _loc17_.addChild(this.d4); + this.d4.x = this.d2.x; + this.d4.y = _loc20_.y; + this.d4.defaultTextFormat = _loc12_; + this.d5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + _loc17_.addChild(this.d5); + this.d5.x = this.d2.x; + this.d5.y = _loc21_.y; + this.d5.defaultTextFormat = _loc12_; + } + + private function selectColor(param1:Event) : void + { + var _loc2_:int = int(this.combox.selectedItem.data); + if(_loc2_ == 0) + { + MessageBoxUI.getInstance().addMessage("请选择一种精研方式"); + return; + } + ConnectService.getInstance().heroService.jingyanbyType(this.currHero.heroId,_loc2_); + } + + private function changeType(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.lastTabBtn) + { + this.lastTabBtn.select = false; + } + this.lastTabBtn = _loc2_; + this.lastTabBtn.select = true; + if(this.lastType) + { + this.tabTable.removeChild(this.lastType); + } + if(_loc2_ == this.tab1) + { + this.lastType = this.getPage1(); + } + if(_loc2_ == this.tab2) + { + this.lastType = this.getPage2(); + } + if(_loc2_ == this.tab3) + { + this.lastType = this.getPage3(); + } + this.tabTable.addChild(this.lastType); + } + + override public function update(param1:NewHero) : void + { + this.currHero = param1; + this.setJingYanInfo(); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + } + + private function setJingYanInfo() : void + { + this.careerImg.gotoAndStop(HeroConst.getFrameByCareerName(this.currHero.career.careerEntName)); + this.starMap.showChart(new Array([this.currHero.finalLead,10000],[this.currHero.finalAtk,5000],[this.currHero.finalAgl,5000],[this.currHero.finalDef,5000],[this.currHero.finalHp,5000])); + var _loc1_:Number = 0.4; + var _loc2_:int = 5; + var _loc3_:int = NewUserData.getUser().rankId; + this.m_money = String(_loc1_ * _loc3_ + _loc2_).slice(0,4); + this.page1.setMoney(this.m_money); + this.value1.htmlText = this.currHero.showName; + this.value2.text = HeroConst.changeName(this.currHero.level,this.currHero.changeCount); + this.value3.htmlText = HeroConst.getChenghao(this.currHero); + this.currAtk.text = this.currHero.atk + ""; + this.currAgl.text = this.currHero.agl + ""; + this.currDef.text = this.currHero.def + ""; + this.currHp.text = this.currHero.hp + ""; + var _loc4_:* = String(this.currHero.fen2 / 10); + this.b2.text = this.getFinNum(Number(_loc4_)); + var _loc5_:* = String(this.currHero.fen3 / 10); + this.b3.text = this.getFinNum(Number(_loc5_)); + var _loc6_:* = String(this.currHero.fen1 / 10); + this.b4.text = this.getFinNum(Number(_loc6_)); + var _loc7_:* = String(this.currHero.fen4 / 10); + this.b5.text = this.getFinNum(Number(_loc7_)); + this.loadHeroHead(); + this.c2.text = ""; + this.c3.text = ""; + this.c4.text = ""; + this.c5.text = ""; + this.d2.text = ""; + this.d3.text = ""; + this.d4.text = ""; + this.d5.text = ""; + var _loc8_:* = this.currHero.studyFen1 + this.currHero.studyFen2 + this.currHero.studyFen3 + this.currHero.studyFen4; + this.m_regBtn.visible = false; + this.m_replaceBtn.visible = false; + this.m_keepBtn.visible = false; + if(this.currHero.level < 60) + { + return; + } + if(_loc8_ == 0) + { + this.m_regBtn.visible = true; + this.m_regBtn.setEnable(); + return; + } + this.m_replaceBtn.visible = true; + this.m_keepBtn.visible = true; + var _loc9_:Array = HeroConst.changeHeroPoint(this.currHero); + this.c2.text = String(_loc9_[1]); + this.c3.text = String(_loc9_[2]); + this.c4.text = String(_loc9_[0]); + this.c5.text = String(_loc9_[3]); + this.d2.text = String(_loc9_[1] - this.currHero.atk); + this.d3.text = String(_loc9_[2] - this.currHero.def); + this.d4.text = String(_loc9_[0] - this.currHero.hp); + this.d5.text = String(_loc9_[3] - this.currHero.agl); + if(_loc9_[1] - this.currHero.atk < 0) + { + this.c2.textColor = 16711680; + this.d2.textColor = 16711680; + } + else + { + this.d2.text = "+" + String(_loc9_[1] - this.currHero.atk); + this.c2.textColor = 65280; + this.d2.textColor = 65280; + } + if(_loc9_[2] - this.currHero.def < 0) + { + this.c3.textColor = 16711680; + this.d3.textColor = 16711680; + } + else + { + this.d3.text = "+" + String(_loc9_[2] - this.currHero.def); + this.c3.textColor = 65280; + this.d3.textColor = 65280; + } + if(_loc9_[0] - this.currHero.hp < 0) + { + this.c4.textColor = 16711680; + this.d4.textColor = 16711680; + } + else + { + this.d4.text = "+" + String(_loc9_[0] - this.currHero.hp); + this.d4.textColor = 65280; + this.c4.textColor = 65280; + } + if(_loc9_[3] - this.currHero.agl < 0) + { + this.c5.textColor = 16711680; + this.d5.textColor = 16711680; + } + else + { + this.d5.text = "+" + String(_loc9_[3] - this.currHero.agl); + this.c5.textColor = 65280; + this.d5.textColor = 65280; + } + } + + private function getFinNum(param1:Number) : String + { + var _loc2_:Array = null; + var _loc3_:String = null; + var _loc4_:* = String(param1); + if(!_loc4_) + { + return ""; + } + var _loc5_:String = ""; + if(_loc4_.indexOf(".") != -1) + { + _loc2_ = _loc4_.split("."); + _loc3_ = _loc2_[1].substr(0,1); + _loc5_ = _loc2_[0] + "." + _loc3_; + } + else + { + _loc5_ = _loc4_ + ".0"; + } + return _loc5_ + "%"; + } + + private function loadHeroHead() : void + { + var _loc1_:String = ServerConfig.IMAGE_HEAD_URL + this.currHero.picPath; + if(_loc1_ == this.lastUrl) + { + return; + } + this.lastUrl = _loc1_; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + } + + private function getPage1() : Sprite + { + if(this.page1 == null) + { + this.page1 = new JingYanItem1(); + this.page1.x = 3; + this.page1.y = 10; + } + return this.page1; + } + + private function getPage2() : Sprite + { + if(this.page2 == null) + { + this.page2 = new JingYanItem2(); + this.page2.y = 10; + } + return this.page2; + } + + private function getPage3() : Sprite + { + if(this.page3 == null) + { + this.page3 = new JingYanItem3(); + this.page3.y = 10; + } + return this.page3; + } + + public function jingyanHero(param1:MouseEvent) : void + { + var _loc2_:int = 0; + if(this.lastTabBtn == this.tab1) + { + ConnectService.getInstance().heroService.jingYanHero(this.currHero.heroId); + } + else if(this.lastTabBtn == this.tab2) + { + _loc2_ = this.page2.currType; + ConnectService.getInstance().heroService.jingYanByItem(this.currHero.heroId,_loc2_); + } + else + { + _loc2_ = this.page3.currType; + ConnectService.getInstance().heroService.jingYanBySuperItem(this.currHero.heroId,_loc2_); + } + } + + private function saveJingYan(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.saveJingYan(this.currHero.heroId,1); + } + + private function cancelJingYan(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.saveJingYan(this.currHero.heroId,2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/HeroRegenerView.as b/flash_decompiled/com/view/ui/biwu/HeroRegenerView.as new file mode 100644 index 0000000..d677857 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/HeroRegenerView.as @@ -0,0 +1,298 @@ +package com.view.ui.biwu +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.newdata.hero.NewCareer; + import com.newdata.hero.NewHero; + import com.view.newui.UIButton; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.HeroConst; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HeroRegenerView extends UIWindowBg + { + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value6:TextField; + + private var value7:TextField; + + private var value8:TextField; + + private var heroObj:NewHero; + + public function HeroRegenerView() + { + var _loc4_:TextField = null; + var _loc10_:TextField = null; + var _loc11_:UIButton = null; + super(); + initSize(125,250); + loadTitle(UITitleConfig.title_wujiangjinfeng); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(300,230); + bg1.addChild(_loc1_); + _loc1_.x = 8; + _loc1_.y = 6; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(12371404,60); + _loc1_.addChild(_loc2_); + _loc2_.x = 15; + _loc2_.y = 15; + _loc2_.text = "当前武将:"; + this.value1 = PublicMethod.getTextFieldWithFillter(16777215,100); + _loc1_.addChild(this.value1); + this.value1.x = _loc2_.x + 65; + this.value1.y = _loc2_.y; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(12371404,60); + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x; + _loc3_.y = _loc2_.y + 20; + _loc3_.text = "当前职业:"; + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,100); + _loc1_.addChild(this.value2); + this.value2.x = _loc3_.x + 65; + this.value2.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(12371404,95); + _loc1_.addChild(_loc4_); + _loc4_.x = _loc2_.x; + _loc4_.y = _loc3_.y + 20; + _loc4_.text = "当前兵种适应性:"; + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,185); + _loc1_.addChild(this.value3); + this.value3.x = _loc4_.x + 95; + this.value3.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(16777215,222); + _loc1_.addChild(_loc5_); + _loc5_.x = _loc2_.x; + _loc5_.y = _loc4_.y + 25; + _loc5_.text = "(兵种适应性影响武将带兵效果)"; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(15527140,100); + _loc1_.addChild(_loc6_); + _loc6_.x = _loc2_.x; + _loc6_.y = _loc5_.y + 35; + _loc6_.text = "晋封效果"; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(12371404,110); + _loc1_.addChild(_loc7_); + _loc7_.x = _loc2_.x; + _loc7_.y = _loc6_.y + 40; + _loc7_.text = "晋封后武将等级为:"; + this.value6 = PublicMethod.getTextFieldWithFillter(65280,165); + _loc1_.addChild(this.value6); + this.value6.x = _loc7_.x + 110; + this.value6.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(12371404,95); + _loc1_.addChild(_loc8_); + _loc8_.x = _loc2_.x; + _loc8_.y = _loc7_.y + 20; + _loc8_.text = "晋封后职业:"; + this.value7 = PublicMethod.getTextFieldWithFillter(65280,165); + _loc1_.addChild(this.value7); + this.value7.x = _loc8_.x + 65; + this.value7.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(12371404,110); + _loc1_.addChild(_loc9_); + _loc9_.x = _loc2_.x; + _loc9_.y = _loc8_.y + 20; + _loc9_.text = "晋封后兵种适应性:"; + this.value8 = PublicMethod.getTextFieldWithFillter(16777215,196); + _loc1_.addChild(this.value8); + this.value8.x = _loc9_.x + 108; + this.value8.y = _loc9_.y; + _loc10_ = PublicMethod.getTextFieldWithFillter(65280,270); + _loc1_.addChild(_loc10_); + _loc10_.x = _loc2_.x; + _loc10_.y = _loc9_.y + 20; + _loc10_.text = "每次升级额外获得5点可分配属性和10点统率"; + _loc11_ = new UIButton("晋 封",2,10); + bg1.addChild(_loc11_); + _loc11_.x = 130; + _loc11_.y = _loc1_.y + _loc1_.height + 5; + _loc11_.onClick = this.jinFeng; + } + + public function update(param1:NewHero, param2:int) : void + { + var _loc3_:String = null; + this.heroObj = param1; + this.value1.htmlText = this.heroObj.showName; + this.value2.text = this.heroObj.career.careerName; + this.value3.htmlText = this.adapt(this.heroObj.career); + var _loc4_:* = this.heroObj.changeCount + 1; + if(_loc4_ == 4) + { + _loc3_ = "禁军1级"; + } + else if(_loc4_ == 5) + { + _loc3_ = "御前1级"; + } + else if(_loc4_ == 6) + { + _loc3_ = "皇家1级"; + } + else if(_loc4_ > 6) + { + _loc3_ = "霸天1级"; + } + else + { + _loc3_ = ""; + } + this.value6.text = _loc3_; + this.value7.text = this.getCarName(this.heroObj.careerId); + this.value8.htmlText = this.adapt(this.heroObj.nextcareer); + } + + private function adapt(param1:NewCareer) : String + { + var _loc2_:String = null; + if(param1 == null) + { + return ""; + } + var _loc3_:Number = int(Math.round(param1.buBing * 100)) / 100; + _loc2_ = "步兵" + HeroConst.bingzhong(_loc3_.toString()); + var _loc4_:Number = int(Math.round(param1.gongBing * 100)) / 100; + _loc2_ = _loc2_ + "弓兵" + HeroConst.bingzhong(_loc4_.toString()); + var _loc5_:Number = int(Math.round(param1.cheBing * 100)) / 100; + _loc2_ = _loc2_ + "车兵" + HeroConst.bingzhong(_loc5_.toString()); + var _loc6_:Number = int(Math.round(param1.qiBing * 100)) / 100; + _loc2_ = _loc2_ + "骑兵" + HeroConst.bingzhong(_loc6_.toString()); + var _loc7_:Number = int(Math.round(param1.qiXie * 100)) / 100; + return _loc2_ + "器械" + HeroConst.bingzhong(_loc7_.toString()); + } + + private function getCarName(param1:int) : String + { + var _loc2_:String = ""; + var _loc3_:int = param1 / 10; + var _loc4_:int = param1 % 10; + switch(_loc4_) + { + case 0: + if(_loc3_ == 3) + { + _loc2_ = "武神"; + break; + } + if(_loc3_ == 4) + { + _loc2_ = "御前勇士"; + break; + } + if(_loc3_ == 5) + { + _loc2_ = "皇家武圣"; + break; + } + _loc2_ = "霸天武神"; + break; + case 1: + if(_loc3_ == 3) + { + _loc2_ = "禁军步尉"; + break; + } + if(_loc3_ == 4) + { + _loc2_ = "御前步师"; + break; + } + if(_loc3_ == 5) + { + _loc2_ = "皇家战神"; + break; + } + _loc2_ = "霸天虎将"; + break; + case 2: + if(_loc3_ == 3) + { + _loc2_ = "禁军弓尉"; + break; + } + if(_loc3_ == 4) + { + _loc2_ = "御前箭师"; + break; + } + if(_loc3_ == 5) + { + _loc2_ = "皇家神箭"; + break; + } + _loc2_ = "霸天龙箭"; + break; + case 3: + if(_loc3_ == 3) + { + _loc2_ = "禁军骑尉"; + break; + } + if(_loc3_ == 4) + { + _loc2_ = "御前骑师"; + break; + } + if(_loc3_ == 5) + { + _loc2_ = "皇家飞骑"; + break; + } + _loc2_ = "霸天翼骑"; + break; + case 4: + if(_loc3_ == 3) + { + _loc2_ = "禁军车尉"; + break; + } + if(_loc3_ == 4) + { + _loc2_ = "御前车师"; + break; + } + if(_loc3_ == 5) + { + _loc2_ = "皇家车神"; + break; + } + _loc2_ = "霸天车皇"; + break; + case 5: + if(_loc3_ == 3) + { + _loc2_ = "禁军器尉"; + break; + } + if(_loc3_ == 4) + { + _loc2_ = "御前器师"; + break; + } + if(_loc3_ == 5) + { + _loc2_ = "皇家工神"; + break; + } + _loc2_ = "霸天工圣"; + } + return _loc2_; + } + + private function jinFeng(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.jinFengHero(this.heroObj.heroId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/JiangHun.as b/flash_decompiled/com/view/ui/biwu/JiangHun.as new file mode 100644 index 0000000..e04a5b5 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/JiangHun.as @@ -0,0 +1,619 @@ +package com.view.ui.biwu +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.newui.UIBorderMc; + import com.view.newui.UIButton1; + import com.view.newui.UILabel; + import com.view.newui.UIRadioBtn; + import com.view.newui.UIWindowBg; + import com.view.ui.biwu.mc.JiangHunMc; + import com.view.ui.hero.data.HeroJiangHun; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PakState; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class JiangHun extends HeroBuildBase + { + + private var leftBg:UIWindowBg; + + private var itemList:Vector.; + + private var typeRadio1:UIRadioBtn; + + private var typeRadio2:UIRadioBtn; + + private var currBtn:UIRadioBtn; + + private var upType:int = 1; + + private var btn0:UIButton1; + + private var btn1:UIButton1; + + private var btn5:UIButton1; + + private var btn2:UIButton1; + + private var btn3:UIButton1; + + private var btn4:UIButton1; + + private var btn6:UIButton1; + + private var valueText1:UILabel; + + private var valueText2:UILabel; + + private var valueText3:UILabel; + + private var valueText4:UILabel; + + private var valueText5:UILabel; + + private var valueText6:UILabel; + + private var valueText7:UILabel; + + private var valueText8:UILabel; + + private var valueText9:UILabel; + + private var currType:int = 0; + + private var preItem:JiangHunMc; + + private var currHero:NewHero; + + public function JiangHun() + { + var _loc9_:UILabel = null; + var _loc10_:UILabel = null; + var _loc12_:UILabel = null; + var _loc15_:JiangHunMc = null; + super(); + this.leftBg = new UIWindowBg(); + this.leftBg.initThirdPanel(280,358); + addChild(this.leftBg); + this.leftBg.x = 4; + this.leftBg.y = 4; + var _loc1_:UIBorderMc = new UIBorderMc(209); + this.leftBg.addChild(_loc1_); + _loc1_.x = 0; + _loc1_.y = 1; + _loc1_.loadTitle(7); + this.itemList = new Vector.(); + var _loc2_:int = 1; + while(_loc2_ < 5) + { + _loc15_ = new JiangHunMc(_loc2_); + _loc15_.addEventListener(MouseEvent.CLICK,this.clickItem); + this.leftBg.addChild(_loc15_); + _loc15_.x = 20; + _loc15_.y = 20; + _loc15_.buttonMode = true; + this.itemList.push(_loc15_); + switch(_loc2_) + { + case 1: + _loc15_.x = 30; + _loc15_.y = 60; + break; + case 2: + _loc15_.x = 160; + _loc15_.y = 60; + break; + case 3: + _loc15_.x = 30; + _loc15_.y = 190; + break; + case 4: + _loc15_.x = 160; + _loc15_.y = 190; + } + _loc2_++; + } + this.typeRadio1 = new UIRadioBtn(); + this.leftBg.addChild(this.typeRadio1); + this.typeRadio1.x = 30; + this.typeRadio1.y = 330; + this.typeRadio1.onClick = this.clickCareer; + this.typeRadio1.setSelect(); + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(10852210,120); + _loc3_.text = "将魂精魄升级"; + this.leftBg.addChild(_loc3_); + _loc3_.x = this.typeRadio1.x + 24; + _loc3_.y = this.typeRadio1.y; + this.typeRadio2 = new UIRadioBtn(); + this.leftBg.addChild(this.typeRadio2); + this.typeRadio2.x = this.typeRadio1.x + 140; + this.typeRadio2.y = this.typeRadio1.y; + this.typeRadio2.onClick = this.clickCareer; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(10852210,120); + _loc4_.text = "16宝石升级"; + this.leftBg.addChild(_loc4_); + _loc4_.x = this.typeRadio2.x + 24; + _loc4_.y = this.typeRadio2.y; + var _loc5_:UIWindowBg = new UIWindowBg(); + _loc5_.initSecondPanel(227,198); + addChild(_loc5_); + _loc5_.x = 297; + _loc5_.y = 4; + var _loc6_:UIBorderMc = new UIBorderMc(156); + _loc5_.addChild(_loc6_); + _loc6_.x = 0; + _loc6_.y = 1; + _loc6_.loadTitle(8); + var _loc7_:UILabel = new UILabel(70,10852210); + _loc5_.addChild(_loc7_); + _loc7_.x = 16; + _loc7_.y = 38; + _loc7_.setText("将魂名称:"); + this.valueText1 = new UILabel(130); + _loc5_.addChild(this.valueText1); + this.valueText1.x = 80; + this.valueText1.y = _loc7_.y; + var _loc8_:UILabel = new UILabel(70,10852210); + _loc5_.addChild(_loc8_); + _loc8_.x = _loc7_.x; + _loc8_.y = _loc7_.y + 19; + _loc8_.setText("将魂等级:"); + this.valueText2 = new UILabel(130); + _loc5_.addChild(this.valueText2); + this.valueText2.x = this.valueText1.x; + this.valueText2.y = _loc8_.y; + _loc9_ = new UILabel(70,10852210); + _loc5_.addChild(_loc9_); + _loc9_.x = _loc7_.x; + _loc9_.y = _loc8_.y + 19; + _loc9_.setText("最大等级:"); + this.valueText3 = new UILabel(130); + _loc5_.addChild(this.valueText3); + this.valueText3.x = this.valueText1.x; + this.valueText3.y = _loc9_.y; + _loc10_ = new UILabel(70,10852210); + _loc5_.addChild(_loc10_); + _loc10_.x = _loc7_.x; + _loc10_.y = _loc9_.y + 19; + _loc10_.setText("升级所需:"); + this.valueText4 = new UILabel(130); + _loc5_.addChild(this.valueText4); + this.valueText4.x = this.valueText1.x; + this.valueText4.y = _loc10_.y; + var _loc11_:UILabel = new UILabel(70,10852210); + _loc5_.addChild(_loc11_); + _loc11_.x = _loc7_.x; + _loc11_.y = _loc10_.y + 19; + _loc11_.setText("当前拥有:"); + this.valueText5 = new UILabel(130); + _loc5_.addChild(this.valueText5); + this.valueText5.x = this.valueText1.x; + this.valueText5.y = _loc11_.y; + _loc12_ = new UILabel(70,10852210); + _loc5_.addChild(_loc12_); + _loc12_.x = _loc7_.x; + _loc12_.y = _loc11_.y + 19; + _loc12_.setText("将魂属性:"); + this.valueText6 = new UILabel(140); + _loc5_.addChild(this.valueText6); + this.valueText6.x = this.valueText1.x; + this.valueText6.y = _loc12_.y; + this.valueText7 = new UILabel(140); + _loc5_.addChild(this.valueText7); + this.valueText7.x = this.valueText6.x; + this.valueText7.y = this.valueText6.y + 19; + this.valueText8 = new UILabel(140); + _loc5_.addChild(this.valueText8); + this.valueText8.x = this.valueText7.x; + this.valueText8.y = this.valueText7.y + 19; + this.valueText9 = new UILabel(140); + _loc5_.addChild(this.valueText9); + this.valueText9.x = this.valueText7.x; + this.valueText9.y = this.valueText8.y + 19; + var _loc13_:UIWindowBg = new UIWindowBg(); + _loc13_.initSecondPanel(227,146); + addChild(_loc13_); + _loc13_.x = 297; + _loc13_.y = _loc5_.y + _loc5_.height + 4; + var _loc14_:UIBorderMc = new UIBorderMc(156); + _loc13_.addChild(_loc14_); + _loc14_.x = 0; + _loc14_.y = 1; + _loc14_.loadTitle(9); + this.btn0 = new UIButton1("激活将魂"); + _loc13_.addChild(this.btn0); + this.btn0.x = 28; + this.btn0.y = 40; + this.btn0.onClick = this.jihuoJiangHun; + this.btn1 = new UIButton1("将魂升级"); + _loc13_.addChild(this.btn1); + this.btn1.x = 28; + this.btn1.y = 40; + this.btn1.onClick = this.levelUpJiangHun; + this.btn2 = new UIButton1("一键30级"); + _loc13_.addChild(this.btn2); + this.btn2.x = this.btn1.x + this.btn1.width + 20; + this.btn2.y = this.btn1.y; + this.btn2.onClick = this.levelUpJiangHun30; + this.btn3 = new UIButton1("一键100级"); + _loc13_.addChild(this.btn3); + this.btn3.x = this.btn1.x; + this.btn3.y = this.btn1.y + 40; + this.btn3.onClick = this.levelUpJiangHun100; + this.btn6 = new UIButton1("一键1000级"); + _loc13_.addChild(this.btn6); + this.btn6.x = this.btn2.x; + this.btn6.y = this.btn3.y; + this.btn6.onClick = this.levelUpJiangHun1000; + this.btn4 = new UIButton1("将魂分解"); + _loc13_.addChild(this.btn4); + this.btn4.x = this.btn1.x; + this.btn4.y = this.btn3.y + 40; + this.btn4.onClick = this.jiangHunFenJie; + this.btn5 = new UIButton1("卸下将魂"); + _loc13_.addChild(this.btn5); + this.btn5.x = this.btn6.x; + this.btn5.y = this.btn4.y; + this.btn5.onClick = this.downJiangHun; + Utils.g_events.addEventListener(DevEvent.DATA_JIANGHUN_LIST,this.getJiangHunListResult); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + this.getALlJunHunList(); + } + + private function clickCareer(param1:MouseEvent) : void + { + this.currBtn = param1.currentTarget as UIRadioBtn; + if(this.currBtn == this.typeRadio1) + { + this.upType = 1; + this.typeRadio1.setSelect(); + this.typeRadio2.setUnSelect(); + } + else + { + this.upType = 2; + this.typeRadio1.setUnSelect(); + this.typeRadio2.setSelect(); + } + this.setHeroInfo(); + } + + private function itemChange(param1:DevEvent) : void + { + var _loc2_:int = PakState.getItemsByEntId(20202335); + this.valueText5.setText(_loc2_ + " 将魂精魄"); + } + + private function clickItem(param1:MouseEvent) : void + { + if(this.preItem) + { + this.preItem.setSelect(false); + } + this.preItem = param1.currentTarget as JiangHunMc; + this.preItem.setSelect(true); + var _loc2_:int = int(NewHeroData.getJiangHunObj().jianghun_jihuo); + var _loc3_:int = int(NewHeroData.getJiangHunObj().jianghun_pro); + var _loc4_:int = int(NewHeroData.getJiangHunObj().jianghun_maxlevel); + var _loc5_:int = this.preItem.getType(); + this.currType = _loc5_; + var _loc6_:String = ""; + var _loc7_:String = ""; + var _loc8_:String = ""; + var _loc9_:String = ""; + var _loc10_:String = ""; + var _loc11_:String = ""; + var _loc12_:String = ""; + var _loc13_:String = ""; + var _loc14_:String = ""; + switch(_loc5_) + { + case 1: + _loc6_ = "白起将魂"; + break; + case 2: + _loc6_ = "王翦将魂"; + break; + case 3: + _loc6_ = "李牧将魂"; + break; + case 4: + _loc6_ = "廉颇将魂"; + } + this.valueText1.setText(_loc6_); + this.setHeroInfo(); + } + + private function getALlJunHunList() : void + { + ConnectService.getInstance().heroService.getAllJiangHunList(); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + } + + override public function update(param1:NewHero) : void + { + this.currHero = param1; + this.setHeroInfo(); + if(this.currHero) + { + this.itemList[0].setStates(this.currHero.jianghunLevel1,this.currHero.heroId); + this.itemList[1].setStates(this.currHero.jianghunLevel2,this.currHero.heroId); + this.itemList[2].setStates(this.currHero.jianghunLevel3,this.currHero.heroId); + this.itemList[3].setStates(this.currHero.jianghunLevel4,this.currHero.heroId); + } + } + + private function setHeroInfo() : void + { + var _loc5_:int = 0; + var _loc6_:Number = NaN; + var _loc7_:Number = NaN; + if(this.currHero == null || this.currType == 0) + { + return; + } + var _loc1_:int = 0; + var _loc2_:HeroJiangHun = NewHeroData.getJiangHunByHeroAndType(this.currHero.heroId,this.currType); + this.preItem.setDate(_loc2_); + var _loc3_:int = int(NewHeroData.getJiangHunObj().jianghun_maxlevel); + var _loc4_:int = int(NewHeroData.getJiangHunObj().jianghun_jihuo); + this.valueText3.setText(_loc3_ + " 级"); + if(_loc2_ == null) + { + this.valueText2.setText("0 级"); + this.valueText6.setText("武将攻击 + 0"); + this.valueText7.setText("武将防御 + 0"); + this.valueText8.setText("武将体力 + 0"); + this.valueText9.setText("武将敏捷 + 0"); + _loc5_ = int(NewHeroData.getJiangHunObj().jianghun_level_a); + this.valueText4.setText(_loc4_ + " 个16级攻击武魄"); + this.btn0.visible = true; + this.btn1.visible = false; + this.btn2.setUnEnable(); + this.btn3.setUnEnable(); + this.btn4.setUnEnable(); + this.btn5.setUnEnable(); + this.btn6.setUnEnable(); + } + else + { + _loc6_ = _loc2_.level * NewHeroData.getJiangHunObj().jianghun_pro; + _loc7_ = Number(_loc6_ * 1.2); + this.btn0.visible = false; + this.btn1.visible = true; + this.btn2.setEnable(); + this.btn3.setEnable(); + this.btn4.setEnable(); + this.btn5.setEnable(); + this.btn6.setEnable(); + if(this.upType == 1) + { + this.valueText4.setText(_loc2_.needItems + "个将魂精魄"); + } + else + { + this.valueText4.setText(_loc2_.needItems1 + "个16级攻击武魄"); + } + this.valueText2.setText(_loc2_.level + " 级"); + if(_loc2_.type == 1) + { + this.valueText6.setText("武将攻击 + " + Utils.getNewPower(_loc7_)); + this.valueText7.setText("武将防御 + " + Utils.getNewPower(_loc6_)); + this.valueText8.setText("武将体力 + " + Utils.getNewPower(_loc6_)); + this.valueText9.setText("武将敏捷 + " + Utils.getNewPower(_loc6_)); + } + if(_loc2_.type == 2) + { + this.valueText6.setText("武将攻击 + " + Utils.getNewPower(_loc6_)); + this.valueText7.setText("武将防御 + " + Utils.getNewPower(_loc7_)); + this.valueText8.setText("武将体力 + " + Utils.getNewPower(_loc6_)); + this.valueText9.setText("武将敏捷 + " + Utils.getNewPower(_loc6_)); + } + if(_loc2_.type == 3) + { + this.valueText6.setText("武将攻击 + " + Utils.getNewPower(_loc6_)); + this.valueText7.setText("武将防御 + " + Utils.getNewPower(_loc6_)); + this.valueText8.setText("武将体力 + " + Utils.getNewPower(_loc7_)); + this.valueText9.setText("武将敏捷 + " + Utils.getNewPower(_loc6_)); + } + if(_loc2_.type == 4) + { + this.valueText6.setText("武将攻击 + " + Utils.getNewPower(_loc6_)); + this.valueText7.setText("武将防御 + " + Utils.getNewPower(_loc6_)); + this.valueText8.setText("武将体力 + " + Utils.getNewPower(_loc6_)); + this.valueText9.setText("武将敏捷 + " + Utils.getNewPower(_loc7_)); + } + } + this.btn5.setText("装备将魂"); + this.btn5.onClick = this.equHunFenJie; + if(this.currType == 1 && this.currHero.jianghunLevel1 > 0) + { + this.btn5.setText("卸下将魂"); + this.btn5.onClick = this.downJiangHun; + } + if(this.currType == 2 && this.currHero.jianghunLevel2 > 0) + { + this.btn5.setText("卸下将魂"); + this.btn5.onClick = this.downJiangHun; + } + if(this.currType == 3 && this.currHero.jianghunLevel3 > 0) + { + this.btn5.setText("卸下将魂"); + this.btn5.onClick = this.downJiangHun; + } + if(this.currType == 4 && this.currHero.jianghunLevel4 > 0) + { + this.btn5.setText("卸下将魂"); + this.btn5.onClick = this.downJiangHun; + } + this.itemChange(null); + } + + private function getJiangHunListResult(param1:DevEvent) : void + { + if(this.preItem == null) + { + this.preItem = this.itemList[0]; + } + this.preItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + if(this.currHero) + { + this.itemList[0].setStates(this.currHero.jianghunLevel1,this.currHero.heroId); + this.itemList[1].setStates(this.currHero.jianghunLevel2,this.currHero.heroId); + this.itemList[2].setStates(this.currHero.jianghunLevel3,this.currHero.heroId); + this.itemList[3].setStates(this.currHero.jianghunLevel4,this.currHero.heroId); + } + } + + public function jihuoJiangHun(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要激活的将魂!"); + return; + } + ConnectService.getInstance().heroService.jihuoJiangHun(this.currHero.heroId,this.currType); + } + + public function levelUpJiangHun(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.preItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + ConnectService.getInstance().heroService.levelUpJiangHun(_loc2_.id,this.currHero.heroId,this.upType); + } + + public function levelUpJiangHun30(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.preItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + ConnectService.getInstance().heroService.levelUpJiangHun30(_loc2_.id,this.currHero.heroId,this.upType,1); + } + + public function levelUpJiangHun100(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.preItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + ConnectService.getInstance().heroService.levelUpJiangHun30(_loc2_.id,this.currHero.heroId,this.upType,2); + } + + public function levelUpJiangHun1000(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.preItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + ConnectService.getInstance().heroService.levelUpJiangHun30(_loc2_.id,this.currHero.heroId,this.upType,3); + } + + private function jiangHunFenJie(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.preItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要分解的将魂!"); + return; + } + var _loc3_:MessageBoxUI = MessageBoxUI.getInstance(); + _loc3_.confirmMsg("您是否确定要分解该将魂?分解将魂只返还部分升级材料。",this.configFenJie); + } + + private function configFenJie() : void + { + var _loc1_:HeroJiangHun = this.preItem.getHeroJiangHun(); + ConnectService.getInstance().heroService.jiangHunFenJie(_loc1_.id,this.currHero.heroId); + } + + public function downJiangHun(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要卸下的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.preItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要卸下的将魂!"); + return; + } + if(_loc2_.heroId == 0) + { + MessageBoxUI.getInstance().addMessage("该将魂未附于武将!"); + return; + } + ConnectService.getInstance().heroService.downJiangHun(_loc2_.id,this.currHero.heroId); + } + + public function equHunFenJie(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要装备的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.preItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要装备的将魂!"); + return; + } + ConnectService.getInstance().heroService.equHeroJiangHun(_loc2_.id,this.currHero.heroId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/JinfengItem1.as b/flash_decompiled/com/view/ui/biwu/JinfengItem1.as new file mode 100644 index 0000000..7a2ddb6 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/JinfengItem1.as @@ -0,0 +1,154 @@ +package com.view.ui.biwu +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.newdata.hero.NewHero; + import com.view.newui.UISmallBtn; + import com.view.ui.PlayUIRes; + import com.view.ui.pak.data.PakState; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class JinfengItem1 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var playUIRes:PlayUIRes = PlayUIRes.getInstance(); + + private var jinfeng:UISmallBtn; + + private var bg:Sprite; + + private var heroObj:NewHero; + + private var armyNameUrl:String; + + private var loader:LoadResource; + + private var armyImg:Bitmap; + + public var onClickF:Function; + + public function JinfengItem1() + { + super(); + this.bg = this.playUIRes.getSprite(ClassConfig.jingyan_career_1); + addChild(this.bg); + var _loc1_:Bitmap = new Bitmap(this.playUIRes.getPng(ClassConfig.reg1)); + this.bg.addChild(_loc1_); + _loc1_.x = 4; + this.jinfeng = new UISmallBtn("晋 封",2); + addChild(this.jinfeng); + this.jinfeng.x = 20; + this.jinfeng.y = 92; + this.jinfeng.onClick = this.jinfengClick; + } + + public function update(param1:NewHero) : void + { + var _loc8_:String = null; + this.heroObj = param1; + if(this.heroObj == null) + { + return; + } + var _loc2_:int = PakState.getItemsByEntId(10372044) + PakState.getItemsByEntId(10472044); + var _loc3_:int = this.heroObj.maxLevel; + var _loc4_:int = this.heroObj.careerId; + var _loc5_:int = this.heroObj.level; + if(_loc3_ <= 120) + { + _loc8_ = "晋封需求"; + if(_loc5_ == 120) + { + _loc8_ = _loc8_ + "\n武将等级:" + _loc5_ + "/" + 120 + ""; + } + else + { + _loc8_ = _loc8_ + "\n武将等级:" + _loc5_ + "/" + 120 + ""; + } + if(_loc2_ > 0) + { + _loc8_ += "\n晋封道具:一级晋封卡"; + } + else + { + _loc8_ += "\n晋封道具:一级晋封卡"; + } + this.jinfeng.visible = true; + ToolTipManager.getInstance().setToolTip(this.jinfeng,new TxtTooltip(_loc8_)); + } + else + { + this.jinfeng.visible = false; + } + var _loc6_:String = "晋封效果"; + _loc6_ = _loc6_ + "\n等级上限:禁军120级"; + var _loc7_:int = _loc4_ % 10; + switch(_loc7_) + { + case 0: + this.armyNameUrl = "f1.png"; + _loc6_ += "\n武圣->禁军勇士"; + break; + case 1: + this.armyNameUrl = "b1.png"; + _loc6_ += "\n战神->禁军步尉"; + break; + case 2: + this.armyNameUrl = "a1.png"; + _loc6_ += "\n神箭->禁军弓尉"; + break; + case 3: + this.armyNameUrl = "d1.png"; + _loc6_ += "\n飞骑->禁军骑尉"; + break; + case 4: + this.armyNameUrl = "e1.png"; + _loc6_ += "\n车神->禁军车尉"; + break; + case 5: + this.armyNameUrl = "c1.png"; + _loc6_ += "\n工神->禁军器尉"; + } + _loc6_ += "\n兵种适应:全兵种适应性加强(武将带兵效果更佳)"; + ToolTipManager.getInstance().setToolTip(this.bg,new TxtTooltip(_loc6_)); + this.loadHeroHead(); + } + + private function loadHeroHead() : void + { + var _loc1_:String = ServerConfig.IMAGE_CAREER_URL + this.armyNameUrl; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.armyImg) && this.bg.contains(this.armyImg)) + { + this.bg.removeChild(this.armyImg); + } + this.armyImg = Bitmap(param1.target.loader.content); + this.armyImg.x = -5; + this.armyImg.y = 60; + this.loader.clear(); + this.bg.addChild(this.armyImg); + } + + private function jinfengClick(param1:MouseEvent) : void + { + if(Boolean(this.onClickF)) + { + this.onClickF(1); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/JinfengItem2.as b/flash_decompiled/com/view/ui/biwu/JinfengItem2.as new file mode 100644 index 0000000..1ae3d93 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/JinfengItem2.as @@ -0,0 +1,153 @@ +package com.view.ui.biwu +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.newdata.hero.NewHero; + import com.view.newui.UISmallBtn; + import com.view.ui.PlayUIRes; + import com.view.ui.pak.data.PakState; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class JinfengItem2 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var playUIRes:PlayUIRes = PlayUIRes.getInstance(); + + private var jinfeng:UISmallBtn; + + private var bg:Sprite; + + private var heroObj:NewHero; + + private var armyNameUrl:String; + + private var loader:LoadResource; + + private var armyImg:Bitmap; + + public var onClickF:Function; + + public function JinfengItem2() + { + super(); + this.bg = this.playUIRes.getSprite(ClassConfig.jingyan_career_2); + addChild(this.bg); + var _loc1_:Bitmap = new Bitmap(this.playUIRes.getPng(ClassConfig.reg1)); + this.bg.addChild(_loc1_); + this.jinfeng = new UISmallBtn("晋 封",2); + addChild(this.jinfeng); + this.jinfeng.x = 20; + this.jinfeng.y = 92; + this.jinfeng.onClick = this.jinfengClick; + } + + public function update(param1:NewHero) : void + { + var _loc8_:String = null; + this.heroObj = param1; + if(this.heroObj == null) + { + return; + } + var _loc2_:int = PakState.getItemsByEntId(10372045) + PakState.getItemsByEntId(10472045); + var _loc3_:int = this.heroObj.maxLevel; + var _loc4_:int = this.heroObj.careerId; + var _loc5_:int = this.heroObj.level; + if(_loc3_ == 240) + { + _loc8_ = "晋封需求"; + if(_loc5_ == 240) + { + _loc8_ = _loc8_ + "\n武将等级:" + (_loc5_ - 120) + "/" + 120 + ""; + } + else + { + _loc8_ = _loc8_ + "\n武将等级:" + (_loc5_ - 120) + "/" + 120 + ""; + } + if(_loc2_ > 0) + { + _loc8_ += "\n晋封道具:二级晋封卡"; + } + else + { + _loc8_ += "\n晋封道具:二级晋封卡"; + } + this.jinfeng.visible = true; + ToolTipManager.getInstance().setToolTip(this.jinfeng,new TxtTooltip(_loc8_)); + } + else + { + this.jinfeng.visible = false; + } + var _loc6_:String = "晋封效果"; + _loc6_ = _loc6_ + "\n等级上限:御前120级"; + var _loc7_:int = _loc4_ % 10; + switch(_loc7_) + { + case 0: + this.armyNameUrl = "f2.png"; + _loc6_ += "\n禁军勇士->御前勇士"; + break; + case 1: + this.armyNameUrl = "b2.png"; + _loc6_ += "\n禁军步尉->御前步师"; + break; + case 2: + this.armyNameUrl = "a2.png"; + _loc6_ += "\n禁军弓尉->禁军箭师"; + break; + case 3: + this.armyNameUrl = "d2.png"; + _loc6_ += "\n禁军骑尉->禁军骑师"; + break; + case 4: + this.armyNameUrl = "e2.png"; + _loc6_ += "\n禁军车尉->禁军车师"; + break; + case 5: + this.armyNameUrl = "c2.png"; + _loc6_ += "\n禁军器尉->禁军器师"; + } + _loc6_ += "\n兵种适应:全兵种适应性加强(武将带兵效果更佳)"; + ToolTipManager.getInstance().setToolTip(this.bg,new TxtTooltip(_loc6_)); + this.loadHeroHead(); + } + + private function loadHeroHead() : void + { + var _loc1_:String = ServerConfig.IMAGE_CAREER_URL + this.armyNameUrl; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.armyImg) && this.bg.contains(this.armyImg)) + { + this.bg.removeChild(this.armyImg); + } + this.armyImg = Bitmap(param1.target.loader.content); + this.armyImg.x = -5; + this.armyImg.y = 60; + this.loader.clear(); + this.bg.addChild(this.armyImg); + } + + private function jinfengClick(param1:MouseEvent) : void + { + if(Boolean(this.onClickF)) + { + this.onClickF(2); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/JinfengItem3.as b/flash_decompiled/com/view/ui/biwu/JinfengItem3.as new file mode 100644 index 0000000..262251e --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/JinfengItem3.as @@ -0,0 +1,153 @@ +package com.view.ui.biwu +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.newdata.hero.NewHero; + import com.view.newui.UISmallBtn; + import com.view.ui.PlayUIRes; + import com.view.ui.pak.data.PakState; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class JinfengItem3 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var playUIRes:PlayUIRes = PlayUIRes.getInstance(); + + private var jinfeng:UISmallBtn; + + private var bg:Sprite; + + private var heroObj:NewHero; + + private var armyNameUrl:String; + + private var loader:LoadResource; + + private var armyImg:Bitmap; + + public var onClickF:Function; + + public function JinfengItem3() + { + super(); + this.bg = this.playUIRes.getSprite(ClassConfig.jingyan_career_3); + addChild(this.bg); + var _loc1_:Bitmap = new Bitmap(this.playUIRes.getPng(ClassConfig.reg1)); + this.bg.addChild(_loc1_); + this.jinfeng = new UISmallBtn("晋 封",2); + addChild(this.jinfeng); + this.jinfeng.x = 20; + this.jinfeng.y = 92; + this.jinfeng.onClick = this.jinfengClick; + } + + public function update(param1:NewHero) : void + { + var _loc8_:String = null; + this.heroObj = param1; + if(this.heroObj == null) + { + return; + } + var _loc2_:int = PakState.getItemsByEntId(10372046) + PakState.getItemsByEntId(10472046); + var _loc3_:int = this.heroObj.maxLevel; + var _loc4_:int = this.heroObj.careerId; + var _loc5_:int = this.heroObj.level; + if(_loc3_ == 360) + { + _loc8_ = "晋封需求"; + if(_loc5_ == 360) + { + _loc8_ = _loc8_ + "\n武将等级:" + (_loc5_ - 240) + "/" + 120 + ""; + } + else + { + _loc8_ = _loc8_ + "\n武将等级:" + (_loc5_ - 240) + "/" + 120 + ""; + } + if(_loc2_ > 0) + { + _loc8_ += "\n晋封道具:三级晋封卡"; + } + else + { + _loc8_ += "\n晋封道具:三级晋封卡"; + } + this.jinfeng.visible = true; + ToolTipManager.getInstance().setToolTip(this.jinfeng,new TxtTooltip(_loc8_)); + } + else + { + this.jinfeng.visible = false; + } + var _loc6_:String = "晋封效果"; + _loc6_ = _loc6_ + "\n等级上限:皇家120级"; + var _loc7_:int = _loc4_ % 10; + switch(_loc7_) + { + case 0: + this.armyNameUrl = "f3.png"; + _loc6_ += "\n御前勇士->皇家武圣"; + break; + case 1: + this.armyNameUrl = "b3.png"; + _loc6_ += "\n御前步师->皇家战神"; + break; + case 2: + this.armyNameUrl = "a3.png"; + _loc6_ += "\n禁军箭师->皇家神箭"; + break; + case 3: + this.armyNameUrl = "d3.png"; + _loc6_ += "\n禁军骑师->皇家飞骑"; + break; + case 4: + this.armyNameUrl = "e3.png"; + _loc6_ += "\n禁军车师->皇家车神"; + break; + case 5: + this.armyNameUrl = "c3.png"; + _loc6_ += "\n禁军器师->皇家工神"; + } + _loc6_ += "\n兵种适应:全兵种适应性加强(武将带兵效果更佳)"; + ToolTipManager.getInstance().setToolTip(this.bg,new TxtTooltip(_loc6_)); + this.loadHeroHead(); + } + + private function loadHeroHead() : void + { + var _loc1_:String = ServerConfig.IMAGE_CAREER_URL + this.armyNameUrl; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.armyImg) && this.bg.contains(this.armyImg)) + { + this.bg.removeChild(this.armyImg); + } + this.armyImg = Bitmap(param1.target.loader.content); + this.armyImg.x = -5; + this.armyImg.y = 60; + this.loader.clear(); + this.bg.addChild(this.armyImg); + } + + private function jinfengClick(param1:MouseEvent) : void + { + if(Boolean(this.onClickF)) + { + this.onClickF(2); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/JinfengItem4.as b/flash_decompiled/com/view/ui/biwu/JinfengItem4.as new file mode 100644 index 0000000..37354b5 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/JinfengItem4.as @@ -0,0 +1,155 @@ +package com.view.ui.biwu +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.newdata.hero.NewHero; + import com.view.newui.UISmallBtn; + import com.view.ui.PlayUIRes; + import com.view.ui.pak.data.PakState; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class JinfengItem4 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var playUIRes:PlayUIRes = PlayUIRes.getInstance(); + + private var jinfeng:UISmallBtn; + + private var bg:Sprite; + + private var heroObj:NewHero; + + private var armyNameUrl:String; + + private var loader:LoadResource; + + private var armyImg:Bitmap; + + public var onClickF:Function; + + public function JinfengItem4() + { + super(); + this.bg = this.playUIRes.getSprite(ClassConfig.jingyan_career_4); + addChild(this.bg); + var _loc1_:Bitmap = new Bitmap(this.playUIRes.getPng(ClassConfig.reg4)); + this.bg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + this.jinfeng = new UISmallBtn("晋 封",2); + addChild(this.jinfeng); + this.jinfeng.x = 28; + this.jinfeng.y = 110; + this.jinfeng.onClick = this.jinfengClick; + } + + public function update(param1:NewHero) : void + { + var _loc8_:String = null; + this.heroObj = param1; + if(this.heroObj == null) + { + return; + } + var _loc2_:int = PakState.getItemsByEntId(10472047) + PakState.getItemsByEntId(10372047); + var _loc3_:int = this.heroObj.maxLevel; + var _loc4_:int = this.heroObj.careerId; + var _loc5_:int = this.heroObj.level; + if(_loc3_ == 480) + { + _loc8_ = "晋封需求"; + if(_loc5_ == 480) + { + _loc8_ = _loc8_ + "\n武将等级:" + (_loc5_ - 360) + "/" + 120 + ""; + } + else + { + _loc8_ = _loc8_ + "\n武将等级:" + (_loc5_ - 360) + "/" + 120 + ""; + } + if(_loc2_ > 0) + { + _loc8_ += "\n晋封道具:四级晋封卡"; + } + else + { + _loc8_ += "\n晋封道具:四级晋封卡"; + } + this.jinfeng.visible = true; + ToolTipManager.getInstance().setToolTip(this.jinfeng,new TxtTooltip(_loc8_)); + } + else + { + this.jinfeng.visible = false; + } + var _loc6_:String = "晋封效果"; + _loc6_ = _loc6_ + "\n等级上限:霸天120级"; + var _loc7_:int = _loc4_ % 10; + switch(_loc7_) + { + case 0: + this.armyNameUrl = "f4.png"; + _loc6_ += "\n皇家武圣->霸天武神"; + break; + case 1: + this.armyNameUrl = "b4.png"; + _loc6_ += "\n皇家战神->霸天虎将"; + break; + case 2: + this.armyNameUrl = "a4.png"; + _loc6_ += "\n皇家神箭->霸天龙箭"; + break; + case 3: + this.armyNameUrl = "d4.png"; + _loc6_ += "\n皇家飞骑->霸天翼骑"; + break; + case 4: + this.armyNameUrl = "e4.png"; + _loc6_ += "\n皇家车神->霸天车皇"; + break; + case 5: + this.armyNameUrl = "c4.png"; + _loc6_ += "\n皇家工神->霸天工圣"; + } + _loc6_ += "\n兵种适应:全兵种适应性加强(武将带兵效果更佳)"; + ToolTipManager.getInstance().setToolTip(this.bg,new TxtTooltip(_loc6_)); + this.loadHeroHead(); + } + + private function loadHeroHead() : void + { + var _loc1_:String = ServerConfig.IMAGE_CAREER_URL + this.armyNameUrl; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.armyImg) && this.bg.contains(this.armyImg)) + { + this.bg.removeChild(this.armyImg); + } + this.armyImg = Bitmap(param1.target.loader.content); + this.armyImg.x = 8; + this.armyImg.y = 80; + this.loader.clear(); + this.bg.addChild(this.armyImg); + } + + private function jinfengClick(param1:MouseEvent) : void + { + if(Boolean(this.onClickF)) + { + this.onClickF(2); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/JingYanItem1.as b/flash_decompiled/com/view/ui/biwu/JingYanItem1.as new file mode 100644 index 0000000..7165eb2 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/JingYanItem1.as @@ -0,0 +1,42 @@ +package com.view.ui.biwu +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class JingYanItem1 extends Sprite + { + + private var moneyText:TextField; + + public function JingYanItem1() + { + super(); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.leading = 6; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc2_.wordWrap = true; + _loc2_.multiline = true; + _loc2_.height = 120; + addChild(_loc2_); + _loc2_.defaultTextFormat = _loc1_; + _loc2_.htmlText = "花费 可重置一次成长分布(四项基础属性均有变化,总和不变),但无法保证某一属性的增减效果"; + _loc2_.x = 10; + _loc2_.y = 6; + this.moneyText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,70); + addChild(this.moneyText); + this.moneyText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.moneyText.text = "39.4万铜币"; + this.moneyText.x = 40; + this.moneyText.y = 6; + } + + public function setMoney(param1:String) : void + { + this.moneyText.text = param1 + "万铜币"; + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/JingYanItem2.as b/flash_decompiled/com/view/ui/biwu/JingYanItem2.as new file mode 100644 index 0000000..e9b9522 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/JingYanItem2.as @@ -0,0 +1,123 @@ +package com.view.ui.biwu +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.ui.tools.ToolView; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class JingYanItem2 extends Sprite + { + + private var atkBtn:UIRadioBtn; + + private var defBtn:UIRadioBtn; + + private var hpBtn:UIRadioBtn; + + private var aglBtn:UIRadioBtn; + + private var lastBtn:UIRadioBtn; + + public var currType:int; + + public function JingYanItem2() + { + var _loc3_:TextField = null; + super(); + this.atkBtn = new UIRadioBtn(); + this.defBtn = new UIRadioBtn(); + this.hpBtn = new UIRadioBtn(); + this.aglBtn = new UIRadioBtn(); + addChild(this.atkBtn); + this.atkBtn.x = 6; + this.atkBtn.y = 5; + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(_loc1_); + _loc1_.x = 26; + _loc1_.y = 7; + _loc1_.text = "攻击"; + addChild(this.defBtn); + this.defBtn.x = this.atkBtn.x; + this.defBtn.y = this.atkBtn.y + 30; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(_loc2_); + _loc2_.x = _loc1_.x; + _loc2_.y = _loc1_.y + 30; + _loc2_.text = "防御"; + addChild(this.hpBtn); + this.hpBtn.x = this.atkBtn.x; + this.hpBtn.y = this.defBtn.y + 30; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(_loc3_); + _loc3_.x = _loc1_.x; + _loc3_.y = _loc2_.y + 30; + _loc3_.text = "体力"; + addChild(this.aglBtn); + this.aglBtn.x = this.atkBtn.x; + this.aglBtn.y = this.hpBtn.y + 30; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = _loc3_.y + 30; + _loc4_.text = "敏捷"; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + _loc5_.wordWrap = true; + _loc5_.multiline = true; + _loc5_.height = 120; + addChild(_loc5_); + var _loc6_:TextFormat = new TextFormat(); + _loc6_.leading = 6; + _loc5_.defaultTextFormat = _loc6_; + _loc5_.htmlText = "您可消耗一张精研符来指定某项属性,使其继续增长的几率有所增加,同时变化幅度也有所扩大。"; + _loc5_.x = 70; + _loc5_.y = 6; + _loc5_.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.atkBtn.onClick = this.clickBtn; + this.defBtn.onClick = this.clickBtn; + this.hpBtn.onClick = this.clickBtn; + this.aglBtn.onClick = this.clickBtn; + this.atkBtn.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_WUJIANGJINGYAN"); + _loc2_.onRefresh = null; + _loc2_.show(); + } + + private function clickBtn(param1:MouseEvent) : void + { + var _loc2_:UIRadioBtn = param1.currentTarget as UIRadioBtn; + if(this.lastBtn != null) + { + this.lastBtn.setUnSelect(); + } + this.lastBtn = _loc2_; + this.lastBtn.setSelect(); + if(this.lastBtn == this.atkBtn) + { + this.currType = 1; + } + if(this.lastBtn == this.defBtn) + { + this.currType = 2; + } + if(this.lastBtn == this.hpBtn) + { + this.currType = 3; + } + if(this.lastBtn == this.aglBtn) + { + this.currType = 4; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/JingYanItem3.as b/flash_decompiled/com/view/ui/biwu/JingYanItem3.as new file mode 100644 index 0000000..06fd71b --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/JingYanItem3.as @@ -0,0 +1,123 @@ +package com.view.ui.biwu +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.ui.tools.ToolView; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class JingYanItem3 extends Sprite + { + + private var atkBtn:UIRadioBtn; + + private var defBtn:UIRadioBtn; + + private var hpBtn:UIRadioBtn; + + private var aglBtn:UIRadioBtn; + + private var lastBtn:UIRadioBtn; + + public var currType:int; + + public function JingYanItem3() + { + var _loc3_:TextField = null; + super(); + this.atkBtn = new UIRadioBtn(); + this.defBtn = new UIRadioBtn(); + this.hpBtn = new UIRadioBtn(); + this.aglBtn = new UIRadioBtn(); + addChild(this.atkBtn); + this.atkBtn.x = 6; + this.atkBtn.y = 5; + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(_loc1_); + _loc1_.x = 26; + _loc1_.y = 7; + _loc1_.text = "攻击"; + addChild(this.defBtn); + this.defBtn.x = this.atkBtn.x; + this.defBtn.y = this.atkBtn.y + 30; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(_loc2_); + _loc2_.x = _loc1_.x; + _loc2_.y = _loc1_.y + 30; + _loc2_.text = "防御"; + addChild(this.hpBtn); + this.hpBtn.x = this.atkBtn.x; + this.hpBtn.y = this.defBtn.y + 30; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(_loc3_); + _loc3_.x = _loc1_.x; + _loc3_.y = _loc2_.y + 30; + _loc3_.text = "体力"; + addChild(this.aglBtn); + this.aglBtn.x = this.atkBtn.x; + this.aglBtn.y = this.hpBtn.y + 30; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = _loc3_.y + 30; + _loc4_.text = "敏捷"; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + _loc5_.wordWrap = true; + _loc5_.multiline = true; + _loc5_.height = 120; + addChild(_loc5_); + var _loc6_:TextFormat = new TextFormat(); + _loc6_.leading = 6; + _loc5_.defaultTextFormat = _loc6_; + _loc5_.htmlText = "您可消耗一张精研玺来指定某项属性,使其继续增长的几率大幅增加,同时变化幅度也大幅扩大。"; + _loc5_.x = 70; + _loc5_.y = 6; + _loc5_.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.atkBtn.onClick = this.clickBtn; + this.defBtn.onClick = this.clickBtn; + this.hpBtn.onClick = this.clickBtn; + this.aglBtn.onClick = this.clickBtn; + this.atkBtn.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_WUJIANGJINGYAN"); + _loc2_.onRefresh = null; + _loc2_.show(); + } + + private function clickBtn(param1:MouseEvent) : void + { + var _loc2_:UIRadioBtn = param1.currentTarget as UIRadioBtn; + if(this.lastBtn != null) + { + this.lastBtn.setUnSelect(); + } + this.lastBtn = _loc2_; + this.lastBtn.setSelect(); + if(this.lastBtn == this.atkBtn) + { + this.currType = 1; + } + if(this.lastBtn == this.defBtn) + { + this.currType = 2; + } + if(this.lastBtn == this.hpBtn) + { + this.currType = 3; + } + if(this.lastBtn == this.aglBtn) + { + this.currType = 4; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/Shenbing.as b/flash_decompiled/com/view/ui/biwu/Shenbing.as new file mode 100644 index 0000000..b2fb8d2 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/Shenbing.as @@ -0,0 +1,586 @@ +package com.view.ui.biwu +{ + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.utils.Utils; + import com.view.newui.UIBorderMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIExpBar; + import com.view.newui.UIInputText; + import com.view.newui.UIWindowBg; + import com.view.ui.biwu.data.HeroTianfuData; + import com.view.ui.biwu.data.TianfuData; + import com.view.ui.biwu.mc.ShenbingMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PakState; + 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 Shenbing extends HeroBuildBase + { + + private var imgSp:Sprite; + + private var valueText1:TextField; + + private var valueText2:TextField; + + private var valueText3:TextField; + + private var valueText4:TextField; + + private var valueText5:TextField; + + private var valueText6:TextField; + + private var proBar:UIExpBar; + + private var valueText8:TextField; + + private var inputText:UIInputText; + + private var equBtn:UIButton; + + private var itemList:Vector.; + + private var preItem:ShenbingMc; + + private var currType:int = 0; + + private var loadRes:LoadResource; + + private var currHero:NewHero; + + public function Shenbing() + { + var _loc4_:TextField = null; + var _loc7_:TextField = null; + var _loc10_:UIWindowBg = null; + var _loc18_:ShenbingMc = null; + super(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,265); + addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + _loc1_.text = "说明:武将只能同时装备一种天赋。"; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(227,198); + addChild(_loc2_); + _loc2_.x = 297; + _loc2_.y = 4; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.addChild(_loc3_); + _loc3_.x = 5; + _loc3_.y = 40; + _loc3_.text = "天赋名称:"; + this.valueText1 = PublicMethod.getTextFieldWithFillter(UIConfig.succColor,130); + _loc2_.addChild(this.valueText1); + this.valueText1.x = _loc3_.x + _loc3_.width; + this.valueText1.y = _loc3_.y; + this.valueText1.filters = [PublicGlow.getInstance().blackGlow]; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.addChild(_loc4_); + _loc4_.x = _loc3_.x; + _loc4_.y = _loc3_.y + 20; + _loc4_.text = "当前效果:"; + this.valueText2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,168); + _loc2_.addChild(this.valueText2); + this.valueText2.x = this.valueText1.x; + this.valueText2.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.addChild(_loc5_); + _loc5_.x = _loc3_.x; + _loc5_.y = _loc4_.y + 20; + _loc5_.text = "下级效果:"; + this.valueText3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,168); + _loc2_.addChild(this.valueText3); + this.valueText3.x = this.valueText1.x; + this.valueText3.y = _loc5_.y; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.addChild(_loc6_); + _loc6_.x = _loc3_.x; + _loc6_.y = _loc5_.y + 20; + _loc6_.text = "当前等级:"; + this.valueText4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + _loc2_.addChild(this.valueText4); + this.valueText4.x = this.valueText1.x; + this.valueText4.y = _loc6_.y; + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc3_.x; + _loc7_.y = _loc6_.y + 20; + _loc7_.text = "最高等级:"; + this.valueText5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + _loc2_.addChild(this.valueText5); + this.valueText5.x = this.valueText1.x; + this.valueText5.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.addChild(_loc8_); + _loc8_.x = _loc3_.x; + _loc8_.y = _loc7_.y + 20; + _loc8_.text = "天赋说明:"; + this.valueText6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,160); + this.valueText6.wordWrap = true; + this.valueText6.multiline = true; + this.valueText6.height = 65; + _loc2_.addChild(this.valueText6); + this.valueText6.x = this.valueText1.x; + this.valueText6.y = _loc8_.y; + var _loc9_:TextFormat = new TextFormat(); + _loc9_.leading = 4; + this.valueText6.defaultTextFormat = _loc9_; + _loc10_ = new UIWindowBg(); + _loc10_.initSecondPanel(227,146); + addChild(_loc10_); + _loc10_.x = 297; + _loc10_.y = _loc2_.y + _loc2_.height + 4; + this.imgSp = new Sprite(); + addChild(this.imgSp); + this.imgSp.x = 4; + this.imgSp.y = 4; + var _loc11_:UIBorderMc = new UIBorderMc(227 - 71); + _loc2_.addChild(_loc11_); + _loc11_.x = 0; + _loc11_.y = 1; + _loc11_.loadTitle(3); + var _loc12_:UIBorderMc = new UIBorderMc(227 - 71); + _loc10_.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 1; + _loc12_.loadTitle(4); + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc10_.addChild(_loc13_); + _loc13_.x = _loc3_.x; + _loc13_.y = 45; + _loc13_.text = "当前经验:"; + this.proBar = new UIExpBar(); + this.proBar.setWidth(120); + this.proBar.init(); + _loc10_.addChild(this.proBar); + this.proBar.x = this.valueText1.x; + this.proBar.y = _loc13_.y; + this.proBar.setMaxValue(100); + this.proBar.setCurValue(0); + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc10_.addChild(_loc14_); + _loc14_.x = _loc3_.x; + _loc14_.y = _loc13_.y + 25; + _loc14_.text = "天 赋 丹:"; + this.valueText8 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + _loc10_.addChild(this.valueText8); + this.valueText8.x = this.valueText1.x; + this.valueText8.y = _loc14_.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc10_.addChild(_loc15_); + _loc15_.x = _loc3_.x; + _loc15_.y = _loc14_.y + 25; + _loc15_.text = "升级经验:"; + this.inputText = new UIInputText(90); + _loc10_.addChild(this.inputText); + this.inputText.x = this.valueText8.x; + this.inputText.y = _loc15_.y - 4; + this.inputText.numOnly(); + this.inputText.setMaxChars(7); + var _loc16_:UIButton = new UIButton("升 级",2,10); + _loc10_.addChild(_loc16_); + _loc16_.x = 50; + _loc16_.y = 123; + _loc16_.onClick = this.upTianfu; + this.equBtn = new UIButton("装 备",2,10); + _loc10_.addChild(this.equBtn); + this.equBtn.x = _loc16_.x + 80; + this.equBtn.y = _loc16_.y; + this.equBtn.onClick = this.equTianfu; + this.itemList = new Vector.(); + var _loc17_:int = 1; + while(_loc17_ < 6) + { + _loc18_ = new ShenbingMc(_loc17_); + addChild(_loc18_); + _loc18_.addEventListener(MouseEvent.CLICK,this.clickItem); + _loc18_.buttonMode = true; + this.itemList.push(_loc18_); + switch(_loc17_) + { + case 1: + _loc18_.x = 116; + _loc18_.y = 60; + break; + case 2: + _loc18_.x = 214; + _loc18_.y = 145; + break; + case 3: + _loc18_.x = 180; + _loc18_.y = 250; + break; + case 4: + _loc18_.x = 52; + _loc18_.y = 250; + break; + case 5: + _loc18_.x = 20; + _loc18_.y = 145; + } + _loc17_++; + } + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + this.getHeroTianfuList(); + this.loadPng(); + } + + private function clickItem(param1:MouseEvent) : void + { + if(this.preItem) + { + this.preItem.setSelect(false); + } + this.preItem = param1.currentTarget as ShenbingMc; + this.preItem.setSelect(true); + var _loc2_:int = HeroTianfuData.tianfu_status; + var _loc3_:int = HeroTianfuData.tianfu_maxlevel; + var _loc4_:int = this.preItem.num; + this.currType = _loc4_; + var _loc5_:String = ""; + var _loc6_:String = ""; + var _loc7_:String = ""; + var _loc8_:String = ""; + var _loc9_:String = ""; + var _loc10_:String = ""; + var _loc11_:String = ""; + var _loc12_:String = ""; + switch(_loc4_) + { + case 1: + _loc5_ = "进攻术"; + _loc6_ = "被动"; + _loc7_ = "增加武将进攻"; + _loc8_ = "5级"; + _loc9_ = _loc3_ + " 级"; + _loc10_ = "到达" + _loc3_ + "级后可触发[虎啸]技能,战斗中100%触发,每次攻击伤害提高一倍"; + break; + case 2: + _loc5_ = "防御术"; + _loc6_ = "被动"; + _loc7_ = "增加武将防御"; + _loc8_ = "5级"; + _loc9_ = _loc3_ + " 级"; + _loc10_ = "到达" + _loc3_ + "级后可触发[玄武圣甲]技能,战斗中100%触发,受到伤害同时反射给攻击者"; + break; + case 3: + _loc5_ = "体力术"; + _loc6_ = "被动"; + _loc7_ = "增加武将体力"; + _loc8_ = "5级"; + _loc9_ = _loc3_ + " 级"; + _loc10_ = "到达顶级后可触发[涅槃]技能,部队死亡后10%几率满血复活,每次战役只能触发一次"; + break; + case 4: + _loc5_ = "敏捷术"; + _loc6_ = "被动"; + _loc7_ = "增加武将进攻"; + _loc8_ = "5级"; + _loc9_ = _loc3_ + " 级"; + _loc10_ = "到达顶级后可触发[龙呤]技能,10%几率触发一击必杀,每次战役只能触发一次"; + break; + case 5: + _loc5_ = "统率术"; + _loc6_ = "被动"; + _loc7_ = "增加武将进攻"; + _loc8_ = "5级"; + _loc9_ = _loc3_ + " 级"; + _loc10_ = ""; + } + if(_loc2_ == 2) + { + _loc10_ = ""; + } + this.valueText1.text = _loc5_; + this.valueText3.text = _loc7_; + this.valueText5.text = _loc9_; + this.valueText6.htmlText = _loc10_; + this.setHeroInfo(); + } + + private function loadPng() : void + { + var _loc1_:String = "pic/bg/special_bg.jpg"; + this.loadRes = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.imgSp.addChild(_loc2_); + _loc2_.width = 290; + _loc2_.height = 368; + this.loadRes.clear(); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + Utils.g_events.addEventListener(DevEvent.EVENT_TIANFU_LIST,this.getTianfuListResult); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + Utils.g_events.removeEventListener(DevEvent.EVENT_TIANFU_LIST,this.getTianfuListResult); + } + + private function getHeroTianfuList() : void + { + ConnectService.getInstance().heroService.getHeroTianfuList(); + } + + private function getTianfuListResult(param1:DevEvent) : void + { + this.setItemCount(null); + var _loc2_:Array = HeroTianfuData.getTianfuList(); + if(this.preItem == null) + { + this.preItem = this.itemList[0]; + } + this.preItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + + override public function update(param1:NewHero) : void + { + var _loc2_:ShenbingMc = null; + this.currHero = param1; + for each(_loc2_ in this.itemList) + { + switch(_loc2_.num) + { + case 1: + if(this.currHero.tianfuLevel1 > 0) + { + _loc2_.setUseText("已装备"); + } + else + { + _loc2_.setUseText("未装备"); + } + break; + case 2: + if(this.currHero.tianfuLevel2 > 0) + { + _loc2_.setUseText("已装备"); + } + else + { + _loc2_.setUseText("未装备"); + } + break; + case 3: + if(this.currHero.tianfuLevel3 > 0) + { + _loc2_.setUseText("已装备"); + } + else + { + _loc2_.setUseText("未装备"); + } + break; + case 4: + if(this.currHero.tianfuLevel4 > 0) + { + _loc2_.setUseText("已装备"); + } + else + { + _loc2_.setUseText("未装备"); + } + break; + case 5: + if(this.currHero.tianfuLevel5 > 0) + { + _loc2_.setUseText("已装备"); + } + else + { + _loc2_.setUseText("未装备"); + } + } + } + this.setHeroInfo(); + } + + private function setHeroInfo() : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:String = null; + if(this.currHero == null || this.currType == 0) + { + return; + } + var _loc1_:int = 0; + var _loc2_:TianfuData = HeroTianfuData.getTianfu(this.currHero.heroId,this.currType); + if(_loc2_ == null) + { + this.proBar.setCurValue(0); + this.proBar.setMaxValue(100); + this.valueText4.htmlText = "0 级"; + } + else + { + _loc3_ = (_loc2_.level + 1) * 100; + this.proBar.setMaxValue(_loc3_); + this.proBar.setCurValue(_loc2_.exp); + this.valueText4.htmlText = "" + _loc2_.level + " 级"; + _loc1_ = _loc2_.level; + } + if(this.currType == 5) + { + _loc4_ = _loc1_ * HeroTianfuData.pro_add / 2; + this.valueText2.text = "统率+" + _loc1_ * HeroTianfuData.lead_add + " 四维+" + _loc4_; + if(_loc1_ < HeroTianfuData.tianfu_maxlevel) + { + _loc5_ = (_loc1_ + 1) * HeroTianfuData.pro_add / 2; + this.valueText3.text = "统率+" + (_loc1_ + 1) * HeroTianfuData.lead_add + " 四维+" + _loc5_; + } + else + { + this.valueText3.text = "已满级"; + } + } + else + { + _loc6_ = ""; + if(this.currType == 1) + { + _loc6_ = "武将进攻"; + } + else if(this.currType == 2) + { + _loc6_ = "武将防御"; + } + else if(this.currType == 3) + { + _loc6_ = "武将体力"; + } + else + { + _loc6_ = "武将敏捷"; + } + this.valueText2.text = _loc6_ + " + " + _loc1_ * HeroTianfuData.pro_add; + if(_loc1_ < HeroTianfuData.tianfu_maxlevel) + { + this.valueText3.text = _loc6_ + " + " + (_loc1_ + 1) * HeroTianfuData.pro_add; + } + else + { + this.valueText3.text = "已满级"; + } + } + switch(this.currType) + { + case 1: + if(this.currHero.tianfuLevel1 > 0) + { + this.equBtn.setText("卸 下"); + this.equBtn.onClick = this.unEquTianfu; + break; + } + this.equBtn.setText("装 备"); + this.equBtn.onClick = this.equTianfu; + break; + case 2: + if(this.currHero.tianfuLevel2 > 0) + { + this.equBtn.setText("卸 下"); + this.equBtn.onClick = this.unEquTianfu; + break; + } + this.equBtn.setText("装 备"); + this.equBtn.onClick = this.equTianfu; + break; + case 3: + if(this.currHero.tianfuLevel3 > 0) + { + this.equBtn.setText("卸 下"); + this.equBtn.onClick = this.unEquTianfu; + break; + } + this.equBtn.setText("装 备"); + this.equBtn.onClick = this.equTianfu; + break; + case 4: + if(this.currHero.tianfuLevel4 > 0) + { + this.equBtn.setText("卸 下"); + this.equBtn.onClick = this.unEquTianfu; + break; + } + this.equBtn.setText("装 备"); + this.equBtn.onClick = this.equTianfu; + break; + case 5: + if(this.currHero.tianfuLevel5 > 0) + { + this.equBtn.setText("卸 下"); + this.equBtn.onClick = this.unEquTianfu; + break; + } + this.equBtn.setText("装 备"); + this.equBtn.onClick = this.equTianfu; + } + } + + private function upTianfu(param1:MouseEvent) : void + { + if(this.currHero == null || this.currType == 0) + { + return; + } + var _loc2_:int = int(this.inputText.getText()); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("请输入升级经验"); + return; + } + ConnectService.getInstance().heroService.upTianfu(this.currHero.heroId,this.currType,_loc2_); + } + + private function setItemCount(param1:DevEvent) : void + { + this.valueText8.htmlText = "" + this.getItems1() + ""; + } + + private function getItems1() : int + { + return PakState.getItemsByEntId(10471546); + } + + private function equTianfu(param1:MouseEvent) : void + { + if(this.currHero == null || this.currType == 0) + { + return; + } + ConnectService.getInstance().heroService.equTianfu(this.currHero.heroId,this.currType); + } + + private function unEquTianfu(param1:MouseEvent) : void + { + if(this.currHero == null || this.currType == 0) + { + return; + } + ConnectService.getInstance().heroService.unEquTianfu(this.currHero.heroId,this.currType); + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/WushuBuild.as b/flash_decompiled/com/view/ui/biwu/WushuBuild.as new file mode 100644 index 0000000..a6c88cf --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/WushuBuild.as @@ -0,0 +1,58 @@ +package com.view.ui.biwu +{ + import com.newdata.user.NewUserData; + 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 WushuBuild extends BaseBuild + { + + public function WushuBuild(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/biwu.swf"; + super.buildData = param1; + super.loadSwfBg(); + super.addEvent(); + super.createNpcTip(); + this.buttonMode = true; + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

点将台

"; + npcTipStr += "周子册封绝世名将之所,在此可升级武将武令,并进行武将晋封,转职,精研。
君主40级可参加"; + } + + override public function getBuildNameMc() : MovieClip + { + if(_nameMc == null) + { + _nameMc = getBuildNameSp("点将台"); + _nameMc.mouseEnabled = false; + _nameMc.mouseChildren = false; + setNameMcPosi(); + } + return _nameMc; + } + + override public function mouseClick(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 40) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,君主等级必须达到40级。"); + return; + } + if(buildUI == null) + { + buildUI = new HeroBuildUI(); + } + buildUI.show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/data/HeroTianfuData.as b/flash_decompiled/com/view/ui/biwu/data/HeroTianfuData.as new file mode 100644 index 0000000..b7e79b3 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/data/HeroTianfuData.as @@ -0,0 +1,68 @@ +package com.view.ui.biwu.data +{ + import com.events.DevEvent; + import com.utils.Utils; + + public class HeroTianfuData + { + + public static var heroTianfuList:Array = new Array(); + + public static var pro_add:int = 0; + + public static var lead_add:int = 0; + + public static var tianfu_status:int = 1; + + public static var tianfu_maxlevel:int = 10; + + public function HeroTianfuData() + { + super(); + } + + public static function setPro(param1:Object) : void + { + if(pro_add == 0) + { + pro_add = param1.tianfu_add_pro; + lead_add = param1.tianfu_add_lead; + tianfu_status = param1.tianfu_status; + tianfu_maxlevel = param1.tianfu_maxlevel; + } + } + + public static function setTianfuList(param1:Array) : void + { + var _loc3_:Object = null; + var _loc4_:TianfuData = null; + var _loc2_:Array = new Array(); + for each(_loc3_ in param1) + { + _loc4_ = new TianfuData(_loc3_); + _loc2_.push(_loc4_); + } + heroTianfuList = _loc2_; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.EVENT_TIANFU_LIST)); + } + + public static function getTianfuList() : Array + { + return heroTianfuList; + } + + public static function getTianfu(param1:int, param2:int) : TianfuData + { + var _loc3_:TianfuData = null; + for each(_loc3_ in heroTianfuList) + { + if(_loc3_.heroId == param1 && _loc3_.type == param2) + { + return _loc3_; + } + } + return null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/data/TianfuData.as b/flash_decompiled/com/view/ui/biwu/data/TianfuData.as new file mode 100644 index 0000000..0617f54 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/data/TianfuData.as @@ -0,0 +1,24 @@ +package com.view.ui.biwu.data +{ + public class TianfuData + { + + public var heroId:int; + + public var type:int; + + public var exp:int; + + public var level:int; + + public function TianfuData(param1:Object) + { + super(); + this.heroId = param1.heroId; + this.type = param1.type; + this.exp = param1.exp; + this.level = param1.level; + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/mc/JiangHunMc.as b/flash_decompiled/com/view/ui/biwu/mc/JiangHunMc.as new file mode 100644 index 0000000..1482247 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/mc/JiangHunMc.as @@ -0,0 +1,97 @@ +package com.view.ui.biwu.mc +{ + import com.common.PublicGlow; + import com.newdata.hero.NewHeroData; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + import com.view.ui.hero.data.HeroJiangHun; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.text.TextFormat; + + public class JiangHunMc extends UIBase + { + + private var bg:Sprite; + + private var type:int; + + private var jianghunPng:Bitmap; + + private var levelText:UILabel; + + private var equipText:UILabel; + + private var jianghun:HeroJiangHun; + + public function JiangHunMc(param1:int) + { + super(); + this.type = param1; + this.jianghunPng = face.getBitMap("jianghun" + this.type); + addChild(this.jianghunPng); + this.buttonMode = true; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.align = "center"; + _loc2_.size = 12; + this.levelText = new UILabel(100); + addChild(this.levelText); + this.levelText.x = 2; + this.levelText.y = 105; + this.levelText.setTextForMat(_loc2_); + this.equipText = new UILabel(100); + addChild(this.equipText); + this.equipText.x = 6; + this.equipText.y = 76; + } + + public function getType() : int + { + return this.type; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.jianghunPng.filters = [PublicGlow.getInstance().yellowGlow1]; + } + else + { + this.jianghunPng.filters = null; + } + } + + public function setDate(param1:HeroJiangHun) : void + { + this.jianghun = param1; + if(this.jianghun == null) + { + this.levelText.setText("未激活"); + } + else + { + this.levelText.setText("当前等级:" + this.jianghun.level); + } + } + + public function getHeroJiangHun() : HeroJiangHun + { + return this.jianghun; + } + + public function setStates(param1:int, param2:int) : void + { + if(param1 == 0) + { + this.equipText.setText("未装备"); + } + else + { + this.equipText.setText("已装备"); + } + this.setDate(NewHeroData.getJiangHunByHeroAndType(param2,this.type)); + } + } +} + diff --git a/flash_decompiled/com/view/ui/biwu/mc/ShenbingMc.as b/flash_decompiled/com/view/ui/biwu/mc/ShenbingMc.as new file mode 100644 index 0000000..3640b21 --- /dev/null +++ b/flash_decompiled/com/view/ui/biwu/mc/ShenbingMc.as @@ -0,0 +1,78 @@ +package com.view.ui.biwu.mc +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.view.newui.UIConfig; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class ShenbingMc extends Sprite + { + + public var face:InstallFace = InstallFace.getInstance(); + + public var num:int; + + private var _w:int = 40; + + private var useText:TextField; + + private var bg:Sprite; + + private var loadItemPng:LoadResource; + + private var itemImg:Bitmap; + + public function ShenbingMc(param1:int) + { + super(); + this.bg = new Scale9Grid(this.face.getSprite(UIConfig.bagGood_normal_skin),this._w,this._w); + addChild(this.bg); + this.num = param1; + this.loadItemImg(); + this.useText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + addChild(this.useText); + this.useText.y = 65; + this.useText.x = 10; + } + + public function setUseText(param1:String) : void + { + this.useText.text = param1; + } + + private function loadItemImg() : void + { + this.loadItemPng = new LoadResource("pic/sblq/" + this.num + "-1.png",this.loadPngBack); + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + this.itemImg.width = 53; + this.itemImg.height = 53; + this.bg.addChild(this.itemImg); + this.loadItemPng.clear(); + this.itemImg.x = 3; + this.itemImg.y = 3; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.bg.filters = [PublicGlow.getInstance().yellowGlow1]; + } + else + { + this.bg.filters = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/boss/BossItem1.as b/flash_decompiled/com/view/ui/boss/BossItem1.as new file mode 100644 index 0000000..9466fe0 --- /dev/null +++ b/flash_decompiled/com/view/ui/boss/BossItem1.as @@ -0,0 +1,93 @@ +package com.view.ui.boss +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class BossItem1 extends Sprite + { + + private var stageText:TextField; + + private var awardText:TextField; + + private var numsText:TextField; + + private var bg:Sprite; + + private var itemObj:Object; + + public function BossItem1() + { + 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 = 20; + 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.id); + this.stageText.text = "" + _loc2_; + this.awardText.htmlText = this.itemObj.itemName; + if(this.itemObj.itemNums) + { + _loc3_ = int(this.itemObj.itemNums); + } + else + { + _loc3_ = 1; + } + this.numsText.text = _loc3_ + ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/boss/BossItemMc.as b/flash_decompiled/com/view/ui/boss/BossItemMc.as new file mode 100644 index 0000000..70c580a --- /dev/null +++ b/flash_decompiled/com/view/ui/boss/BossItemMc.as @@ -0,0 +1,120 @@ +package com.view.ui.boss +{ + import com.common.PublicMethod; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + 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; + import flash.text.TextField; + + public class BossItemMc extends UIWindowBg + { + + private var tableMc:UITable; + + private var listVec:Vector.; + + private var awardMc:Sprite; + + private var scrollPane:ScrollPane; + + public function BossItemMc() + { + var _loc1_:Array = null; + var _loc2_:Array = null; + var _loc6_:BossItem1 = null; + super(); + initSize(105,324); + 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 = 320; + _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) + { + _loc6_ = new BossItem1(); + this.listVec.push(_loc6_); + this.awardMc.addChild(_loc6_); + _loc6_.x = 4; + _loc6_.y = 25 * _loc4_; + _loc4_++; + } + this.scrollPane.update(); + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,280); + _loc5_.text = "世界BOSS死亡后可寻宝一次,随机获得一种上述道具。"; + bg1.addChild(_loc5_); + _loc5_.x = 15; + _loc5_.y = 300; + } + + public function setAwardList(param1:Array) : void + { + var _loc4_:BossItem1 = 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 BossItem1(); + 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/boss/BossUI.as b/flash_decompiled/com/view/ui/boss/BossUI.as new file mode 100644 index 0000000..2ca0adc --- /dev/null +++ b/flash_decompiled/com/view/ui/boss/BossUI.as @@ -0,0 +1,755 @@ +package com.view.ui.boss +{ + import com.common.LoadResource; + 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.WorldBossData; + import com.newdata.hero.NewCopyHero; + import com.newdata.hero.NewHeroData; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UIBigButton; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIExpBar; + import com.view.newui.UIHeroItem; + import com.view.newui.UIInputText; + import com.view.newui.UISmallBtn; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.battleview.WorldBossBattleUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tianxia.CopyHeroSetUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + 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.text.TextField; + import flash.text.TextFormat; + + public class BossUI extends BaseUI + { + + private var bg:UIWindowBg; + + private var paneBg:UIWindowBg; + + private var centerBg:UIWindowBg; + + private var bloodBar:UIExpBar; + + private var _pw:int = 150; + + private var leftTimes:TextField; + + private var getDailyBtn:UIButton; + + private var getRankBtn:UIButton; + + private var btn2:UISmallBtn; + + private var input:UIInputText; + + private var guwuText:TextField; + + private var guwuView:Button_9; + + private var finalUserText:TextField; + + private var getFinalBtn:UIButton; + + private var rankView:Button_9; + + private var dailyView:Button_9; + + private var finalView:Button_9; + + private var ranklistMc:Vector.; + + private var heroMcVec:Vector.; + + private var powerText:TextField; + + private var fightBtn:UIBigButton; + + private var loadRes:LoadResource; + + private var currHeroIds:Array = new Array(); + + private var copyHeroSetUI:CopyHeroSetUI; + + private var currCopyHeroVec:Vector. = new Vector.(); + + private var finalUserId:int; + + private var rankList:Array; + + private var itemList:Array; + + private var bossItemMc:BossItemMc; + + public function BossUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_worldboss); + super.setPosition(); + this.createUI(); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + this._pw; + window_heihgt = UIWindowBg.normal_window_h + 100; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + this._pw; + ui_closeBtn.y = 10; + } + + override public function createUI() : void + { + var _loc2_:Sprite = null; + var _loc4_:TextField = null; + var _loc7_:String = null; + var _loc8_:TextField = null; + var _loc14_:int = 0; + var _loc21_:RankMc = null; + var _loc22_:UIHeroItem = null; + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630 + this._pw,400 + 100); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(140,392); + this.paneBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + this.centerBg = new UIWindowBg(); + this.centerBg.initThirdPanel(420,392); + this.paneBg.addChild(this.centerBg); + this.centerBg.x = _loc1_.x + _loc1_.width + 3; + this.centerBg.y = _loc1_.y; + _loc2_ = new Sprite(); + this.paneBg.addChild(_loc2_); + _loc2_.x = this.centerBg.x; + _loc2_.y = this.centerBg.y; + this.leftTimes = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,150); + _loc2_.addChild(this.leftTimes); + this.leftTimes.x = 10; + this.leftTimes.y = 10; + this.leftTimes.text = "今日挑战次数:0"; + var _loc3_:UISmallBtn = new UISmallBtn("清除冷却",3); + _loc2_.addChild(_loc3_); + _loc3_.x = 10; + _loc3_.y = 35; + _loc2_.addChild(_loc3_); + ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("使用回魂丹可清除冷却时间"),false,-1,false); + _loc3_.onClick = this.clearTime; + this.rankView = new Button_9("查看排行奖励"); + this.rankView.setTextHeight(20); + this.rankView.buttonMode = true; + _loc2_.addChild(this.rankView); + this.rankView.x = 336; + this.rankView.y = 10; + this.dailyView = new Button_9("查看每日奖励"); + this.dailyView.setTextHeight(20); + this.dailyView.buttonMode = true; + _loc2_.addChild(this.dailyView); + this.dailyView.x = this.rankView.x; + this.dailyView.y = this.rankView.y + 25; + this.finalView = new Button_9("最后一击奖励"); + this.finalView.setTextHeight(20); + this.finalView.buttonMode = true; + _loc2_.addChild(this.finalView); + this.finalView.x = this.rankView.x; + this.finalView.y = this.dailyView.y + 25; + this.bloodBar = new UIExpBar(); + this.bloodBar.setWidth(290); + this.bloodBar.init(); + _loc2_.addChild(this.bloodBar); + this.bloodBar.x = 70; + this.bloodBar.y = 315; + this.bloodBar.setMaxValue1(100); + this.bloodBar.setCurValue1(0); + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.addChild(_loc4_); + _loc4_.x = this.bloodBar.x + this.bloodBar.width; + _loc4_.y = this.bloodBar.y; + _loc4_.text = "血量"; + var _loc5_:UIWindowBg = new UIWindowBg(); + _loc5_.initThirdPanel(185,392); + this.paneBg.addChild(_loc5_); + _loc5_.x = this.centerBg.x + this.centerBg.width + 3; + _loc5_.y = _loc1_.y; + var _loc6_:UITitleBg = new UITitleBg("活动规则",_loc1_.width); + _loc1_.addChild(_loc6_); + _loc6_.x = int(_loc1_.width / 2 - _loc6_.width / 2); + _loc7_ = "1、活动时间每天8:00-21:00
"; + _loc7_ = _loc7_ + "2、每天不限制活动次数,每次攻击后有5分钟冷却时间,冷却时间过后可继续攻击BOSS,使用回魂丹可清除冷却时间
"; + _loc7_ = _loc7_ + "3、BOSS血量每天凌晨恢复,每天玩家攻击boss时的最大攻击会被记录下来参与排名奖励。
"; + _loc7_ = _loc7_ + "4、当boss死于某玩家攻击时,该玩家为最后一击幸运者,可领取丰富的奖励。
"; + _loc7_ = _loc7_ + "5、当每天活动结束而boss还存活时,该天没有最后一击幸运玩家。
"; + _loc7_ = _loc7_ + "6、右侧显示排名为前一日伤害排名,排行榜每日凌晨更新。"; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,142); + _loc8_.wordWrap = true; + _loc8_.multiline = true; + _loc8_.width = 142; + _loc8_.height = 300; + _loc1_.addChild(_loc8_); + _loc8_.x = 4; + _loc8_.y = 30; + var _loc9_:TextFormat = new TextFormat(); + _loc9_.leading = 4; + _loc9_.color = UIConfig.labelColor; + _loc8_.defaultTextFormat = _loc9_; + _loc8_.htmlText = _loc7_; + this.getDailyBtn = new UIButton("领取每日奖励",3,10); + _loc1_.addChild(this.getDailyBtn); + this.getDailyBtn.x = 33; + this.getDailyBtn.y = 340; + this.getDailyBtn.onClick = this.getDailyGift; + ToolTipManager.getInstance().setToolTip(this.getDailyBtn,new TxtTooltip("挑战3次后,点击领取每日参与奖励"),false,-1,false); + this.getRankBtn = new UIButton("领取排行奖励",3,10); + _loc1_.addChild(this.getRankBtn); + this.getRankBtn.x = this.getDailyBtn.x; + this.getRankBtn.y = this.getDailyBtn.y + 30; + this.getRankBtn.onClick = this.getRankGift; + ToolTipManager.getInstance().setToolTip(this.getRankBtn,new TxtTooltip("点击领取昨日排行奖励"),false,-1,false); + var _loc10_:UITitleBg = new UITitleBg("伤害排名",_loc5_.width); + _loc5_.addChild(_loc10_); + _loc10_.x = int(_loc5_.width / 2 - _loc10_.width / 2); + var _loc11_:Array = ["排名","君主名称","伤害值"]; + var _loc12_:Array = [40,88,70]; + var _loc13_:UITable = new UITable(); + _loc13_.drawLine = true; + _loc13_.lineHeight = 24; + _loc13_.install(10,_loc11_,_loc12_); + _loc5_.addChild(_loc13_); + _loc13_.x = 0; + _loc13_.y = 25; + this.ranklistMc = new Vector.(); + _loc14_ = 0; + while(_loc14_ < 10) + { + _loc21_ = new RankMc(); + this.ranklistMc.push(_loc21_); + _loc13_.addChild(_loc21_); + _loc21_.y = 26 + 24 * _loc14_; + _loc21_.x = 3; + _loc14_++; + } + var _loc15_:UITitleBg = new UITitleBg("最后一击",_loc5_.width); + _loc5_.addChild(_loc15_); + _loc15_.x = int(_loc5_.width / 2 - _loc15_.width / 2); + _loc15_.y = 292; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40); + _loc5_.addChild(_loc4_); + _loc4_.x = 20; + _loc4_.y = _loc15_.y + 50; + _loc4_.text = "君主:"; + this.finalUserText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,88); + _loc5_.addChild(this.finalUserText); + this.finalUserText.x = _loc4_.x + 40; + this.finalUserText.y = _loc4_.y; + this.finalUserText.mouseEnabled = true; + this.finalUserText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.getFinalBtn = new UIButton("领取奖励",2,10); + _loc5_.addChild(this.getFinalBtn); + this.getFinalBtn.x = this.finalUserText.x; + this.getFinalBtn.y = this.finalUserText.y + 25; + this.getFinalBtn.onClick = this.getFinalGift; + var _loc16_:UIWindowBg = new UIWindowBg(); + _loc16_.initThirdPanel(620 + this._pw,86); + this.paneBg.addChild(_loc16_); + _loc16_.x = _loc1_.x; + _loc16_.y = _loc1_.y + _loc1_.height + 3; + this.heroMcVec = new Vector.(); + _loc14_ = 0; + while(_loc14_ < 5) + { + _loc22_ = new UIHeroItem(); + _loc16_.addChild(_loc22_); + _loc22_.x = 5 + _loc14_ * 124; + _loc22_.y = 5; + this.heroMcVec.push(_loc22_); + _loc14_++; + } + var _loc17_:UIButton = new UIButton("镜像设置",2,10); + _loc16_.addChild(_loc17_); + _loc17_.x = 650; + _loc17_.y = 25; + _loc17_.onClick = this.openHeroSet; + this.powerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + _loc16_.addChild(this.powerText); + this.powerText.x = 626; + this.powerText.y = 65; + this.powerText.htmlText = "战力:0"; + this.loadPng(); + this.guwuText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110); + this.guwuText.text = "当前鼓舞等级:0"; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110); + _loc18_.text = "鼓舞 次"; + _loc2_.addChild(_loc18_); + _loc18_.x = 10; + _loc18_.y = 366; + this.input = new UIInputText(50); + _loc2_.addChild(this.input); + this.input.x = 40; + this.input.y = 362; + this.input.setMaxChars(2); + this.input.numOnly(); + this.input.setTextFormat(PublicMethod.getCenterTextFormat()); + var _loc19_:UISmallBtn = new UISmallBtn("鼓 舞",2); + _loc2_.addChild(this.guwuText); + this.guwuText.x = 10; + this.guwuText.y = 340; + _loc2_.addChild(_loc19_); + _loc19_.x = 112; + _loc19_.y = this.guwuText.y + 25; + _loc19_.onClick = this.guwu; + this.guwuView = new Button_9("鼓舞说明"); + this.guwuView.setTextHeight(20); + this.guwuView.buttonMode = true; + _loc2_.addChild(this.guwuView); + this.guwuView.x = this.guwuText.x + 100; + this.guwuView.y = this.guwuText.y; + this.fightBtn = new UIBigButton(1); + _loc2_.addChild(this.fightBtn); + this.fightBtn.x = 165; + this.fightBtn.y = 345; + this.fightBtn.onClick = this.startFight; + this.btn2 = new UISmallBtn("寻 宝",2); + _loc2_.addChild(this.btn2); + this.btn2.x = 360; + this.btn2.y = _loc19_.y; + this.btn2.onClick = this.xunbao; + ToolTipManager.getInstance().setToolTip(this.btn2,new TxtTooltip("世界boss死亡后可以进行一次寻宝"),false,-1,false); + var _loc20_:Button_9 = new Button_9("寻宝道具"); + _loc20_.setTextHeight(20); + _loc20_.buttonMode = true; + _loc2_.addChild(_loc20_); + _loc20_.x = this.btn2.x; + _loc20_.y = this.guwuView.y; + _loc20_.addEventListener(MouseEvent.CLICK,this.openXunbaoUI); + this.getInitData(); + this.getRankMap(); + } + + private function loadPng() : void + { + var _loc1_:String = "pic/bg/boss_bg.jpg"; + this.loadRes = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.centerBg.addChild(_loc2_); + _loc2_.y = 3; + _loc2_.x = 3; + _loc2_.width = 424; + _loc2_.height = 396; + this.loadPng1(); + } + + private function loadPng1() : void + { + var _loc1_:String = "pic/bg/boss.png"; + this.loadRes = new LoadResource(_loc1_,this.loadBack1); + } + + private function loadBack1(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.centerBg.addChild(_loc2_); + _loc2_.x = 40; + _loc2_.y = 40; + this.loadRes.clear(); + } + + private function getInitData() : void + { + ConnectService.getInstance().activityService.enterWorldBoss(); + } + + private function getRankMap() : void + { + ConnectService.getInstance().activityService.getRankMap(); + } + + private function openHeroSet(param1:MouseEvent) : void + { + if(this.copyHeroSetUI == null) + { + this.copyHeroSetUI = CopyHeroSetUI.getInstants(); + } + if(!contains(this.copyHeroSetUI)) + { + addChild(this.copyHeroSetUI); + this.copyHeroSetUI.y = 65; + this.copyHeroSetUI.x = 60; + } + this.copyHeroSetUI.init(this.currCopyHeroVec,3); + } + + 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_ + ""; + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + Utils.g_events.addEventListener(DevEvent.EVENT_WORLDBOSS_ENTER,this.getDataResult); + Utils.g_events.addEventListener(DevEvent.DATA_COPYHERO_GETALL,this.getAllCopyHeroListResult); + ConnectService.getInstance().addEventListener(PlayEvent.WORLDBOSS_RANK_DATA,this.getRankResult); + ConnectService.getInstance().addEventListener(PlayEvent.WORLDBOSS_COMBAT_RESULT,this.startCombatResult); + ConnectService.getInstance().addEventListener(PlayEvent.WORLDBOSS_GET_DAILYITEM,this.getDailyGiftResult); + ConnectService.getInstance().addEventListener(PlayEvent.WORLDBOSS_GET_RANKITEM,this.getRankGiftResult); + ConnectService.getInstance().addEventListener(PlayEvent.WORLDBOSS_GET_FINALITEM,this.getFinalGiftResult); + ConnectService.getInstance().addEventListener(PlayEvent.WORLDBOSS_GUWU,this.guwuResult); + ConnectService.getInstance().addEventListener(PlayEvent.WORLDBOSS_XUNBAO,this.xunbaoResult); + if(this.heroMcVec != null) + { + this.getHeroList(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + Utils.g_events.removeEventListener(DevEvent.EVENT_WORLDBOSS_ENTER,this.getDataResult); + Utils.g_events.removeEventListener(DevEvent.DATA_COPYHERO_GETALL,this.getAllCopyHeroListResult); + ConnectService.getInstance().removeEventListener(PlayEvent.WORLDBOSS_RANK_DATA,this.getRankResult); + ConnectService.getInstance().removeEventListener(PlayEvent.WORLDBOSS_COMBAT_RESULT,this.startCombatResult); + ConnectService.getInstance().removeEventListener(PlayEvent.WORLDBOSS_GET_DAILYITEM,this.getDailyGiftResult); + ConnectService.getInstance().removeEventListener(PlayEvent.WORLDBOSS_GET_RANKITEM,this.getRankGiftResult); + ConnectService.getInstance().removeEventListener(PlayEvent.WORLDBOSS_GET_FINALITEM,this.getFinalGiftResult); + ConnectService.getInstance().removeEventListener(PlayEvent.WORLDBOSS_GUWU,this.guwuResult); + ConnectService.getInstance().removeEventListener(PlayEvent.WORLDBOSS_XUNBAO,this.xunbaoResult); + } + + private function getDataResult(param1:DevEvent) : void + { + var _loc2_:WorldBossData = ActivityData.getWorldBossData(); + this.bloodBar.setMaxValue1(_loc2_.bossblood); + this.bloodBar.setCurValue1(_loc2_.currblood); + this.leftTimes.text = "今日挑战次数:" + _loc2_.times; + if(_loc2_.getdaily == 1) + { + this.getDailyBtn.setUnEnable(); + } + else + { + this.getDailyBtn.setEnable(); + } + if(_loc2_.xunbao == 1) + { + this.btn2.setUnEnable(); + } + else + { + this.btn2.setEnable(); + } + this.initRankBtn(); + this.initFinalBtn(); + this.initGuwuTimes(); + this.currHeroIds = _loc2_.heroids; + this.getHeroList(); + } + + private function initFinalBtn() : void + { + var _loc1_:NewUser = null; + var _loc2_:WorldBossData = null; + this.getFinalBtn.visible = false; + if(this.finalUserId > 0) + { + _loc1_ = NewUserData.getUser(); + if(this.finalUserId == _loc1_.userId) + { + this.getFinalBtn.visible = true; + _loc2_ = ActivityData.getWorldBossData(); + if(_loc2_.isFinal == 1) + { + this.getFinalBtn.setUnEnable(); + } + else + { + this.getFinalBtn.setEnable(); + } + } + } + } + + private function initRankBtn() : void + { + var _loc1_:WorldBossData = ActivityData.getWorldBossData(); + if(_loc1_.rankId == -1) + { + this.getRankBtn.visible = false; + } + else + { + this.getRankBtn.visible = true; + if(_loc1_.rankId == 0) + { + this.getRankBtn.setEnable(); + } + else + { + this.getRankBtn.setUnEnable(); + } + } + } + + private function getAllCopyHeroListResult(param1:DevEvent) : void + { + this.getHeroList(); + } + + private function startFight(param1:MouseEvent) : void + { + ConnectService.getInstance().activityService.startBossCombat(); + } + + private function getRankResult(param1:PlayEvent) : void + { + var _loc2_:Object = param1.obj; + this.rankList = _loc2_.rankData as Array; + var _loc3_:String = _loc2_.dailyItemStr; + var _loc4_:String = _loc2_.finalItemStr; + var _loc5_:String = _loc2_.heroBossAwardStr; + var _loc6_:int = int(_loc2_.guwucash); + var _loc7_:String = "鼓舞1次可使攻击增加100%,鼓舞2次攻击增加200%,最高鼓舞等级10级。每次鼓舞所需元宝" + _loc6_; + this.itemList = _loc2_.xunBaoItem; + ToolTipManager.getInstance().setToolTip(this.guwuView,new TxtTooltip(_loc7_),false,-1,false); + var _loc8_:String = ""; + this.finalUserId = _loc2_.finalUserId; + var _loc9_:String = _loc2_.finalUserName; + if(this.finalUserId > 0) + { + _loc8_ = "" + _loc9_ + ""; + } + else + { + _loc8_ = "无"; + } + this.finalUserText.htmlText = _loc8_; + ToolTipManager.getInstance().setToolTip(this.rankView,new TxtTooltip(_loc5_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.dailyView,new TxtTooltip(_loc3_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.finalView,new TxtTooltip(_loc4_),false,-1,false); + this.initRankView(); + this.initFinalBtn(); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + + private function initRankView() : void + { + var _loc1_:int = 0; + var _loc2_:RankMc = null; + var _loc3_:Object = null; + if(this.rankList != null && this.rankList.length > 0) + { + _loc1_ = 0; + for each(_loc2_ in this.ranklistMc) + { + if(this.rankList[_loc1_]) + { + _loc2_.setObj(this.rankList[_loc1_]); + } + else + { + _loc3_ = new Object(); + _loc3_.rankId = _loc1_ + 1; + _loc2_.setObj(_loc3_); + } + _loc1_++; + } + } + } + + private function startCombatResult(param1:PlayEvent) : void + { + var _loc2_:WorldBossBattleUI = WorldBossBattleUI.getInstance(); + _loc2_.initData(param1.obj); + _loc2_.showUI(); + } + + private function getDailyGift(param1:MouseEvent) : void + { + var _loc2_:WorldBossData = ActivityData.getWorldBossData(); + if(_loc2_.getdaily == 1) + { + MessageBoxUI.getInstance().addMessage("今日奖励已领取"); + return; + } + if(_loc2_.times < 3) + { + MessageBoxUI.getInstance().addMessage("挑战3次后才可领取奖励"); + return; + } + ConnectService.getInstance().activityService.getDailyGift(); + } + + private function getDailyGiftResult(param1:PlayEvent) : void + { + this.getDailyBtn.setUnEnable(); + } + + private function getRankGift(param1:MouseEvent) : void + { + var _loc2_:WorldBossData = ActivityData.getWorldBossData(); + if(_loc2_.rankId == -1) + { + MessageBoxUI.getInstance().addMessage("今日奖励已领取"); + return; + } + ConnectService.getInstance().activityService.getRankGift(); + } + + private function getRankGiftResult(param1:PlayEvent) : void + { + this.initRankBtn(); + } + + private function getFinalGift(param1:MouseEvent) : void + { + var _loc2_:WorldBossData = ActivityData.getWorldBossData(); + if(_loc2_.isFinal == 1) + { + MessageBoxUI.getInstance().addMessage("今日奖励已领取"); + return; + } + ConnectService.getInstance().activityService.getFinalGift(); + } + + private function getFinalGiftResult(param1:PlayEvent) : void + { + this.getFinalBtn.setUnEnable(); + } + + private function guwu(param1:MouseEvent) : void + { + var _loc2_:WorldBossData = ActivityData.getWorldBossData(); + if(_loc2_.fightLevel == 10) + { + MessageBoxUI.getInstance().addMessage("鼓舞等级已达最大级"); + return; + } + if(this.input.getText() == "") + { + MessageBoxUI.getInstance().addMessage("请输入鼓舞次数。"); + return; + } + var _loc3_:int = int(this.input.getText()); + if(_loc3_ <= 0 || _loc3_ > 10) + { + MessageBoxUI.getInstance().addMessage("鼓舞次数只能在1-10之间。"); + return; + } + ConnectService.getInstance().activityService.guwu(_loc3_); + } + + private function guwuResult(param1:PlayEvent) : void + { + this.initGuwuTimes(); + } + + private function initGuwuTimes() : void + { + var _loc1_:WorldBossData = ActivityData.getWorldBossData(); + this.guwuText.htmlText = "当前鼓舞等级:" + _loc1_.fightLevel + ""; + } + + private function openXunbaoUI(param1:MouseEvent) : void + { + if(this.bossItemMc == null) + { + this.bossItemMc = new BossItemMc(); + this.bossItemMc.setAwardList(this.itemList); + } + addChild(this.bossItemMc); + this.bossItemMc.x = 238; + this.bossItemMc.y = 100; + } + + private function xunbao(param1:MouseEvent) : void + { + var _loc2_:WorldBossData = ActivityData.getWorldBossData(); + if(_loc2_.xunbao == 1) + { + MessageBoxUI.getInstance().addMessage("你已寻过宝"); + return; + } + ConnectService.getInstance().activityService.xunbao(); + } + + private function xunbaoResult(param1:PlayEvent) : void + { + this.btn2.setUnEnable(); + } + + private function clearTime(param1:MouseEvent) : void + { + ConnectService.getInstance().activityService.clearTime(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/boss/RankMc.as b/flash_decompiled/com/view/ui/boss/RankMc.as new file mode 100644 index 0000000..b3e08d1 --- /dev/null +++ b/flash_decompiled/com/view/ui/boss/RankMc.as @@ -0,0 +1,115 @@ +package com.view.ui.boss +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class RankMc extends Sprite + { + + private var numText:TextField; + + private var nameText:TextField; + + private var damageText:TextField; + + private var css:TextFormat = new TextFormat(); + + private var bg1:Sprite; + + private var rankObj:Object; + + public function RankMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,188,23); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.numText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,26); + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,88); + this.damageText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.numText); + addChild(this.nameText); + addChild(this.damageText); + this.numText.x = 15; + this.numText.y = 4; + this.nameText.y = this.numText.y; + this.damageText.y = this.numText.y; + this.nameText.x = this.numText.x + this.numText.width; + this.damageText.x = this.nameText.x + this.nameText.width; + this.nameText.mouseEnabled = true; + this.nameText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.rankObj) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.rankObj) + { + this.bg1.visible = true; + } + } + + public function setObj(param1:Object) : void + { + this.rankObj = param1; + var _loc2_:int = int(param1.rankId); + if(_loc2_ == 1) + { + this.css.color = 16750693; + } + else if(_loc2_ == 2) + { + this.css.color = 13369599; + } + else if(_loc2_ == 3) + { + this.css.color = 1048575; + } + else + { + this.css.color = UIConfig.textColor; + } + this.numText.text = param1.rankId; + var _loc3_:String = param1.rankId + "、"; + if(param1.userName) + { + _loc3_ = "" + param1.userName + ""; + this.damageText.htmlText = param1.damage; + } + else + { + _loc3_ = "无"; + this.damageText.htmlText = ""; + } + this.nameText.htmlText = _loc3_; + this.nameText.setTextFormat(this.css); + this.damageText.setTextFormat(this.css); + this.numText.setTextFormat(this.css); + } + } +} + diff --git a/flash_decompiled/com/view/ui/buff/BuffItem.as b/flash_decompiled/com/view/ui/buff/BuffItem.as new file mode 100644 index 0000000..c89f4a0 --- /dev/null +++ b/flash_decompiled/com/view/ui/buff/BuffItem.as @@ -0,0 +1,55 @@ +package com.view.ui.buff +{ + import com.InstallFace; + import com.comfig.CommonData; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.Scale9Grid; + import com.view.newui.UIConfig; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class BuffItem extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var buffBg:String = ServerConfig.IMAGE_IMG_URL + "buf_bg.png"; + + private var url:String; + + private var loadRes:LoadResource; + + public function BuffItem(param1:String) + { + super(); + this.url = param1; + var _loc2_:Sprite = new Scale9Grid(this.face.getSprite(UIConfig.boxItem),13,13); + addChild(_loc2_); + this.loadRes = new LoadResource(this.url,this.loadBuffBack); + } + + private function loadBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + addChild(_loc2_); + _loc2_.width = 32; + _loc2_.height = 32; + this.loadRes.clear(); + this.loadRes = new LoadResource(this.url,this.loadBuffBack); + } + + private function loadBuffBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + addChild(_loc2_); + _loc2_.width = CommonData.BUFF_WIDTH; + _loc2_.height = CommonData.BUFF_HEIGHT; + _loc2_.x = 3; + _loc2_.y = 3; + this.loadRes.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/buff/BuffManager.as b/flash_decompiled/com/view/ui/buff/BuffManager.as new file mode 100644 index 0000000..eba1b26 --- /dev/null +++ b/flash_decompiled/com/view/ui/buff/BuffManager.as @@ -0,0 +1,64 @@ +package com.view.ui.buff +{ + import com.comfig.ServerConfig; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.utils.Utils; + import com.view.world.ToolTipManager; + import flash.display.Sprite; + + public class BuffManager extends Sprite + { + + private static var instance:BuffManager; + + public function BuffManager() + { + super(); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_getBuffTipListById,this.buffSucc); + } + + public static function getInstance() : BuffManager + { + if(instance == null) + { + instance = new BuffManager(); + } + return instance; + } + + public function refresh() : void + { + ConnectService.getInstance().castleService.getBuffTipListById(); + } + + private function buffSucc(param1:CastleEvent) : void + { + var _loc2_:Array = param1.castleList; + Utils.removeAll(this); + var _loc3_:BuffItem = null; + var _loc4_:int = 0; + while(_loc4_ < _loc2_.length) + { + if(!(_loc2_[_loc4_].iconPath == null || _loc2_[_loc4_].iconPath == "" || _loc2_[_loc4_].iconPath == undefined)) + { + _loc3_ = new BuffItem(ServerConfig.IMAGE_EQUIP_URL + _loc2_[_loc4_].iconPath); + ToolTipManager.getInstance().setToolTip(_loc3_,new BuffTooltip(_loc2_[_loc4_].desc,_loc2_[_loc4_].remainTime)); + _loc3_.x = (26 + 12) * _loc4_; + addChild(_loc3_); + } + _loc4_++; + } + } + + public function resize() : void + { + } + + public function update() : void + { + this.refresh(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/buff/BuffTooltip.as b/flash_decompiled/com/view/ui/buff/BuffTooltip.as new file mode 100644 index 0000000..f5ac18c --- /dev/null +++ b/flash_decompiled/com/view/ui/buff/BuffTooltip.as @@ -0,0 +1,60 @@ +package com.view.ui.buff +{ + import com.utils.Utils; + import com.view.world.AbstractToolTipCell; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class BuffTooltip extends AbstractToolTipCell + { + + public var txt:String; + + private var time:int; + + private var title:String; + + private var myTime:Timer; + + private var time_txt:TextField; + + public function BuffTooltip(param1:String, param2:int, param3:String = "") + { + super(); + this.time = param2; + this.title = param3; + this.txt = param1; + this.time_txt = getTextField("剩余时间:" + Utils.formatSecond(param2)); + this.myTime = new Timer(1000); + this.myTime.addEventListener(TimerEvent.TIMER,this.__time); + this.myTime.start(); + } + + private function __time(param1:TimerEvent) : void + { + --this.time; + if(this.time <= 0) + { + BuffManager.getInstance().refresh(); + this.myTime.stop(); + } + this.time_txt.text = "剩余时间:" + Utils.formatSecond(this.time); + } + + override protected function drawUI() : void + { + var _loc1_:* = this.getTextFieldHtml("" + this.title + "",16776960,13); + _loc1_.y = 0; + this.mySprite.addChild(_loc1_); + var _loc2_:* = getTextFieldHtml(this.txt); + _loc2_.y = _loc1_.height + _loc1_.y; + this.mySprite.addChild(_loc2_); + _loc1_.x = (mySprite.width - _loc1_.width) / 2; + this.time_txt.y = _loc2_.height + _loc2_.y; + this.mySprite.addChild(this.time_txt); + this.drawFrame(-5,-5,mySprite.width,mySprite.height); + } + } +} + diff --git a/flash_decompiled/com/view/ui/buildlist/BuildTimeMc.as b/flash_decompiled/com/view/ui/buildlist/BuildTimeMc.as new file mode 100644 index 0000000..acbca28 --- /dev/null +++ b/flash_decompiled/com/view/ui/buildlist/BuildTimeMc.as @@ -0,0 +1,99 @@ +package com.view.ui.buildlist +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.data.data.items.AddSpeed; + import com.utils.TimerManager; + import com.view.tip.TipTitle; + import com.view.ui.addspeed.AddSpeedUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BuildTimeMc extends Sprite + { + + private var face:InstallFace; + + private var textformat:TextFormat; + + private var buildTime:TextField; + + public var timeInfo:TimerInfo; + + public function BuildTimeMc(param1:TimerInfo) + { + var _loc6_:Sprite = null; + this.face = InstallFace.getInstance(); + super(); + this.timeInfo = param1; + this.textformat = new TextFormat(); + this.textformat.align = "center"; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(16760942,60); + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(380415,48); + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(65280,40); + this.buildTime = PublicMethod.getTextFieldWithFillter(16711680,54); + var _loc5_:Sprite = this.face.getSprite(ClassConfig.sprite_btn_7); + _loc5_.addEventListener(MouseEvent.CLICK,this.addSpeedBuild,false,0,true); + _loc6_ = this.face.getSprite(ClassConfig.sprite_btn_6); + _loc6_.addEventListener(MouseEvent.CLICK,this.cancelBuild,false,0,true); + addChild(_loc2_); + _loc2_.text = this.timeInfo.timerName; + _loc2_.setTextFormat(this.textformat); + addChild(_loc3_); + _loc3_.x = _loc2_.width; + _loc3_.text = this.timeInfo.upStr; + addChild(_loc4_); + _loc4_.x = _loc3_.x + _loc3_.width; + _loc4_.text = this.timeInfo.timerLevel + "-" + this.timeInfo.nextLevel; + _loc4_.setTextFormat(this.textformat); + addChild(this.buildTime); + this.buildTime.x = _loc4_.x + _loc4_.width; + this.buildTime.text = this.timeInfo.timerStr; + addChild(_loc5_); + _loc5_.x = this.buildTime.x + this.buildTime.width; + _loc5_.y = 4; + addChild(_loc6_); + _loc6_.x = _loc5_.x + _loc5_.width + 5; + _loc6_.y = _loc5_.y; + _loc6_.buttonMode = true; + _loc5_.buttonMode = true; + new TipTitle(_loc6_,this.face.stage,this.face.tip_bg,{"titletext":"取消"}); + new TipTitle(_loc5_,this.face.stage,this.face.tip_bg,{"titletext":"加速"}); + } + + public function getTimer(param1:TimerInfo) : void + { + this.buildTime.text = param1.timerStr; + } + + private function addSpeedBuild(param1:MouseEvent) : void + { + var _loc2_:AddSpeed = new AddSpeed(); + _loc2_.id = this.timeInfo.queId; + _loc2_.fastQueType = this.timeInfo.timeType; + var _loc3_:AddSpeedUI = AddSpeedUI.getInstance(); + _loc3_.getFastInfo(_loc2_); + _loc3_.addToStage(); + } + + private function cancelBuild(param1:MouseEvent) : void + { + var _loc2_:int = this.timeInfo.queId; + switch(this.timeInfo.timeType) + { + case 1: + TimerManager.getInstance().cancelBuild(_loc2_); + break; + case 2: + TimerManager.getInstance().cancelTech(); + break; + case 3: + TimerManager.getInstance().cancelWall(_loc2_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/buildlist/TimerInfo.as b/flash_decompiled/com/view/ui/buildlist/TimerInfo.as new file mode 100644 index 0000000..4f3ca34 --- /dev/null +++ b/flash_decompiled/com/view/ui/buildlist/TimerInfo.as @@ -0,0 +1,136 @@ +package com.view.ui.buildlist +{ + import com.control.ConnectService; + + public class TimerInfo + { + + public var timeType:int; + + public var timerId:String; + + public var timerName:String; + + public var timerLevel:int; + + public var nextLevel:int; + + public var timerNeed:int; + + public var timerStr:String = "00:00:00"; + + public var upStr:String; + + public var casId:int; + + public var type:String; + + public var name:String; + + public var iconPath:String; + + public var queId:int; + + public var process1:Function; + + public var process2:Function; + + public var process3:Function; + + public var finish1:Function; + + public var finish2:Function; + + public var finish3:Function; + + public function TimerInfo() + { + super(); + } + + public function timer() : void + { + --this.timerNeed; + this.getTimeStr(); + this.process(); + } + + private function process() : void + { + if(this.process1 != null) + { + this.process1(this); + } + if(this.process2 != null) + { + this.process2(this); + } + if(this.process3 != null) + { + this.process3(this); + } + } + + public function finish() : void + { + this.upOkToServer(); + if(this.finish2 != null) + { + this.finish2(); + } + if(this.finish3 != null) + { + this.finish3(); + } + } + + private function getTimeStr() : void + { + if(this.timerNeed < 0) + { + this.timerStr = ""; + return; + } + var _loc1_:int = this.timerNeed / 3600; + var _loc2_:int = (this.timerNeed - 3600 * _loc1_) / 60; + var _loc3_:int = this.timerNeed - 3600 * _loc1_ - _loc2_ * 60; + this.timerStr = this.getStr(_loc1_) + ":" + this.getStr(_loc2_) + ":" + this.getStr(_loc3_); + } + + private function getStr(param1:int) : String + { + var _loc2_:String = param1.toString(); + if(param1 < 10) + { + _loc2_ = "0" + _loc2_; + } + return _loc2_; + } + + private function upOkToServer() : void + { + switch(this.timeType) + { + case 1: + ConnectService.getInstance().castleService.upBuildTimeOver(this.casId,this.getPosNo(),this.getTimeId()); + break; + case 2: + ConnectService.getInstance().techService.techTimeOver(); + break; + case 3: + ConnectService.getInstance().castleService.wallTimeOver(); + } + } + + public function getTimeId() : int + { + return int(this.timerId.split("_")[1]); + } + + public function getPosNo() : String + { + return String(this.timerId.split("_")[0]); + } + } +} + diff --git a/flash_decompiled/com/view/ui/castle/NewCastleUI.as b/flash_decompiled/com/view/ui/castle/NewCastleUI.as new file mode 100644 index 0000000..42fde49 --- /dev/null +++ b/flash_decompiled/com/view/ui/castle/NewCastleUI.as @@ -0,0 +1,273 @@ +package com.view.ui.castle +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.NewCastleEvent; + import com.view.UIListManage; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class NewCastleUI extends BaseUI + { + + private static var instance:NewCastleUI; + + private var bg:Sprite; + + private var castleMc:MovieClip; + + private var desc_txt:TextField; + + private var need_txt:TextField; + + private var submitBtn:UIButton; + + private var closeBtn:SimpleButton; + + private var parentUI:Sprite; + + private var clickCastle:MovieClip; + + public function NewCastleUI() + { + var _loc3_:TextFormat = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xinjiantequ); + super.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630 - (440 - 180),400 - (380 - 270)); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(350,230); + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 10; + this.castleMc = face.getMovieClip(ClassConfig.ui_newcastle); + _loc2_.addChild(this.castleMc); + this.castleMc.x = 10; + this.castleMc.y = 10; + _loc3_ = new TextFormat(); + _loc3_.leading = 4; + this.desc_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,290); + this.desc_txt.height = 36; + this.desc_txt.wordWrap = true; + this.desc_txt.multiline = true; + _loc2_.addChild(this.desc_txt); + this.desc_txt.x = 30; + this.desc_txt.y = 136; + this.desc_txt.defaultTextFormat = _loc3_; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc4_.text = "消耗资源:"; + _loc2_.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 170; + this.need_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,290); + this.need_txt.height = 36; + this.need_txt.wordWrap = true; + this.need_txt.multiline = true; + _loc2_.addChild(this.need_txt); + this.need_txt.x = _loc4_.x + _loc4_.width; + this.need_txt.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,200); + _loc5_.text = "城池达到一定等级时可建造特区"; + _loc2_.addChild(_loc5_); + _loc5_.x = 80; + _loc5_.y = _loc4_.y + 40; + this.castleMc.btn1.gotoAndStop(1); + this.castleMc.btn2.gotoAndStop(1); + this.castleMc.btn3.gotoAndStop(1); + this.castleMc.jingji_mc.gotoAndStop(2); + this.castleMc.junshi_mc.gotoAndStop(2); + this.castleMc.keji_mc.gotoAndStop(1); + this.castleMc.jingji_mc.mouseEnabled = false; + this.castleMc.junshi_mc.mouseEnabled = false; + this.castleMc.title1.mouseEnabled = false; + this.castleMc.title2.mouseEnabled = false; + this.castleMc.btn1.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + this.castleMc.btn1.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.castleMc.btn1.addEventListener(MouseEvent.CLICK,this.mouseClick); + this.castleMc.btn2.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + this.castleMc.btn2.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.castleMc.btn2.addEventListener(MouseEvent.CLICK,this.mouseClick); + this.submitBtn = new UIButton("确 认",2,10); + _loc1_.addChild(this.submitBtn); + this.submitBtn.x = 150; + this.submitBtn.y = 260; + this.submitBtn.setEnable(); + this.submitBtn.onClick = this.buildNewCastle; + ConnectService.getInstance().addEventListener(NewCastleEvent.GET_NEW_CASTLE,this.getNewCastleConsResult); + ConnectService.getInstance().addEventListener(NewCastleEvent.BUILD_NEW_CASTLE_OK,this.getNewCastleResult); + } + + public static function getInstance() : NewCastleUI + { + if(instance == null) + { + instance = new NewCastleUI(); + } + return instance; + } + + override public function setWindowSize() : void + { + window_width = 180; + window_heihgt = 270; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 - 260; + ui_closeBtn.y = 10; + } + + private function getCastleRes() : void + { + ConnectService.getInstance().castleService.getNewCastleConsume(); + } + + public function openUI(param1:Sprite = null) : void + { + this.parentUI = param1; + if(this.parentUI == null) + { + UIListManage.getInstance().addUI(this); + } + else + { + this.parentUI.addChild(this); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(NewCastleEvent.BUILD_NEW_CASTLE_OK,this.buildSucc); + } + + private function closeThis(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.getCastleRes(); + if(this.submitBtn) + { + this.submitBtn.setEnable(); + } + ConnectService.getInstance().addEventListener(NewCastleEvent.BUILD_NEW_CASTLE_OK,this.buildSucc); + } + + private function getNewCastleConsResult(param1:NewCastleEvent) : void + { + this.need_txt.htmlText = param1.res; + } + + private function mouseOut(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ != this.clickCastle) + { + _loc2_.gotoAndStop(1); + } + } + + private function mouseOver(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ != this.clickCastle) + { + _loc2_.gotoAndStop(3); + } + } + + private function mouseClick(param1:MouseEvent) : void + { + this.clickCastle = param1.currentTarget as MovieClip; + if(this.castleMc.btn1 == this.clickCastle) + { + this.castleMc.btn1.gotoAndStop(3); + this.castleMc.btn2.gotoAndStop(1); + this.desc_txt.text = "封邑是获取赋税资源的经济领地,可以为主城提供源源不断的资源供给。"; + } + else + { + this.castleMc.btn1.gotoAndStop(1); + this.castleMc.btn2.gotoAndStop(3); + this.desc_txt.text = "军镇是募兵养兵的军事领地,可以为主城提供大批训练有素的战斗人员。"; + } + } + + private function buildNewCastle(param1:MouseEvent) : void + { + var _loc2_:String = null; + if(this.clickCastle == null) + { + MessageBoxUI.getInstance().addMessage("请选择特区类型"); + } + else + { + this.submitBtn.setUnEnable(); + _loc2_ = ""; + if(this.clickCastle == this.castleMc.btn1) + { + _loc2_ = "economic"; + } + if(this.clickCastle == this.castleMc.btn2) + { + _loc2_ = "military"; + } + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("请选择特区类型"); + } + else + { + ConnectService.getInstance().castleService.buildNewCastle(_loc2_); + } + } + } + + private function buildSucc(param1:NewCastleEvent) : void + { + closeUI(null); + } + + private function getNewCastleResult(param1:NewCastleEvent) : void + { + if(this.parentUI == null) + { + if(UIListManage.getInstance().containsUI(this)) + { + UIListManage.getInstance().addUI(this); + } + } + else + { + this.closeThis(null); + } + MessageBoxUI.getInstance().addMessage("建造特区成功。"); + } + } +} + diff --git a/flash_decompiled/com/view/ui/castle/ViewTransCastle.as b/flash_decompiled/com/view/ui/castle/ViewTransCastle.as new file mode 100644 index 0000000..fd5d7bd --- /dev/null +++ b/flash_decompiled/com/view/ui/castle/ViewTransCastle.as @@ -0,0 +1,280 @@ +package com.view.ui.castle +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.data.data.items.AddSpeed; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.addspeed.AddSpeedUI; + import com.view.ui.province.ITimeObject; + import com.view.ui.province.TimeType; + import com.view.ui.province.TimerManager; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ViewTransCastle extends BaseUI implements ITimeObject + { + + private static var instance:ViewTransCastle; + + private var bg:Sprite; + + private var town1:Sprite; + + private var town2:Sprite; + + private var text1:TextField; + + private var text2:TextField; + + private var text3:TextField; + + private var leftTime:TextField; + + private var _casid:int; + + private var seconds:int; + + public function ViewTransCastle() + { + var _loc4_:UIWindowBg = null; + var _loc5_:TextFormat = null; + var _loc8_:TextField = null; + var _loc11_:UIButton = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_chengchizhuanhuan); + super.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630 - 333,400 - 110); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(88,85); + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 10; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(88,85); + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x + _loc2_.width + 90; + _loc3_.y = _loc2_.y; + _loc4_ = new UIWindowBg(); + _loc4_.initSecondPanel(276,110); + _loc1_.addChild(_loc4_); + _loc4_.x = _loc2_.x; + _loc4_.y = _loc2_.y + _loc2_.height + 35; + _loc5_ = new TextFormat(); + _loc5_.size = 24; + _loc5_.color = 16777215; + _loc5_.align = "center"; + _loc5_.font = "SimSun"; + this.town1 = face.getSprite(ClassConfig.lib_ui_town_1); + _loc1_.addChild(this.town1); + this.town1.x = _loc2_.x + 2; + this.town1.y = _loc2_.y + 2; + this.text1 = new TextField(); + _loc1_.addChild(this.text1); + this.text1.width = 98; + this.text1.height = 30; + this.text1.defaultTextFormat = _loc5_; + this.text1.text = "封邑"; + this.text1.x = this.town1.x; + this.text1.y = 110; + var _loc6_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_ui_bg_9),40,11); + _loc1_.addChild(_loc6_); + _loc6_.x = 126; + _loc6_.y = 50; + this.town2 = face.getSprite(ClassConfig.lib_ui_town_2); + _loc1_.addChild(this.town2); + this.town2.x = _loc3_.x + 2; + this.town2.y = _loc3_.y + 2; + this.text2 = new TextField(); + _loc1_.addChild(this.text2); + this.text2.width = 98; + this.text2.height = 30; + this.text2.defaultTextFormat = _loc5_; + this.text2.text = "封邑"; + this.text2.x = this.town2.x; + this.text2.y = this.text1.y; + var _loc7_:TextField = new TextField(); + _loc7_.width = 128; + _loc7_.height = 30; + _loc7_.defaultTextFormat = _loc5_; + _loc7_.text = "即将改建为"; + _loc4_.addChild(_loc7_); + _loc7_.x = 30; + _loc7_.y = 10; + this.text3 = new TextField(); + this.text3.width = 128; + this.text3.height = 30; + this.text3.defaultTextFormat = _loc5_; + this.text3.textColor = 65280; + _loc4_.addChild(this.text3); + this.text3.x = 136; + this.text3.y = 10; + this.leftTime = PublicMethod.getTextFieldWithFillter(16777215,150); + _loc4_.addChild(this.leftTime); + this.leftTime.x = 60; + this.leftTime.y = 50; + _loc8_ = PublicMethod.getTextFieldWithFillter(16711680,200); + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(16711680,200); + _loc4_.addChild(_loc8_); + _loc8_.x = 30; + _loc8_.y = 70; + _loc4_.addChild(_loc9_); + _loc9_.x = 30; + _loc9_.y = 86; + _loc8_.text = "改建中的特区功能失效,不能进入。"; + _loc9_.text = "改建完成后,需要重新登录游戏。"; + var _loc10_:UIButton = new UIButton("加 速",2,10); + _loc4_.addChild(_loc10_); + _loc10_.x = 80; + _loc10_.y = 126; + _loc10_.onClick = this.addSpeedF; + _loc11_ = new UIButton("关 闭",2,10); + _loc4_.addChild(_loc11_); + _loc11_.x = _loc10_.x + 90; + _loc11_.y = _loc10_.y; + _loc11_.onClick = closeUI; + } + + public static function getInstance() : ViewTransCastle + { + if(instance == null) + { + instance = new ViewTransCastle(); + } + return instance; + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w - 333; + window_heihgt = UIWindowBg.normal_window_h - 110; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 - 333; + ui_closeBtn.y = 10; + } + + private function addSpeedF(param1:MouseEvent) : void + { + if(this._casid <= 0) + { + return; + } + var _loc2_:AddSpeed = new AddSpeed(); + _loc2_.id = this._casid; + _loc2_.fastQueType = 5; + var _loc3_:AddSpeedUI = AddSpeedUI.getInstance(); + _loc3_.getFastInfo(_loc2_); + _loc3_.addToStage(); + } + + public function getTimeType() : TimeType + { + return TimeType.COUNT_DOWN; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_getChangeCastleInfo,this.showinfo); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_addSpeedChangeCastle,this.addSpeedSucc); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_getChangeCastleInfo,this.showinfo); + ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_addSpeedChangeCastle,this.addSpeedSucc); + this.onRemoved(param1); + } + + private function addSpeedSucc(param1:CastleEvent) : void + { + closeUI(null); + } + + override public function setPosition() : void + { + super.setPosition(); + } + + public function update(param1:Object) : void + { + this._casid = param1["id"]; + var _loc2_:* = param1["type"]; + if(_loc2_ == "economic") + { + this.town2.x = 12; + this.town1.x = 200; + this.text1.text = "封邑"; + this.text2.text = "军镇"; + this.text3.text = "军镇"; + } + else if(_loc2_ == "military") + { + this.town1.x = 12; + this.town2.x = 200; + this.text1.text = "军镇"; + this.text2.text = "封邑"; + this.text3.text = "封邑"; + } + ConnectService.getInstance().castleService.getChangeCastleInfo(this._casid); + } + + private function showinfo(param1:CastleEvent) : void + { + this.settime(int(param1.castleObj)); + } + + private function settime(param1:int) : void + { + var _loc2_:* = undefined; + if(param1 > 0) + { + TimerManager.getInstance().addTime(this); + this.seconds = param1; + _loc2_ = Utils.formatSecond(this.seconds); + this.leftTime.text = "剩余时间:" + _loc2_; + } + } + + public function getTime() : int + { + return this.seconds; + } + + public function carryOut() : void + { + --this.seconds; + var _loc1_:* = Utils.formatSecond(this.seconds); + this.leftTime.text = "剩余时间:" + _loc1_; + if(this.seconds <= 0) + { + this.seconds = 0; + TimerManager.getInstance().removeTime(this); + } + } + + private function onRemoved(param1:Event = null) : void + { + TimerManager.getInstance().removeTime(this); + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/BigSpeaker.as b/flash_decompiled/com/view/ui/chat/BigSpeaker.as new file mode 100644 index 0000000..15ffc1d --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/BigSpeaker.as @@ -0,0 +1,200 @@ +package com.view.ui.chat +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.greensock.TweenLite; + import com.greensock.easing.Linear; + import com.newdata.user.NewUserData; + import com.view.ui.chat.mc.*; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + import flash.utils.setTimeout; + + public class BigSpeaker extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var noticeMc:MovieClip; + + private var messageArr:Vector.; + + private var isPlay:Boolean; + + private var showTimer:Timer; + + private var _tMask:MovieClip; + + private var charFormat:TextFormat; + + private var currTextfield:TextField; + + private var moveTime:int; + + public function BigSpeaker() + { + super(); + this.noticeMc = this.face.getMovieClip(ClassConfig.chat_brodcast); + addChild(this.noticeMc); + this.noticeMc.x = -this.noticeMc.width / 2; + this.noticeMc.visible = false; + this.messageArr = new Vector.(); + this.showTimer = new Timer(10000,1); + this.showTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onTimer); + this._tMask = this.noticeMc["tMask"] as MovieClip; + this.charFormat = new TextFormat(); + this.charFormat.size = 16; + } + + private function onTimer(param1:TimerEvent) : void + { + var _loc2_:Number = NaN; + if(this.moveTime > 0) + { + _loc2_ = 530 - this.currTextfield.width; + TweenLite.to(this.currTextfield,this.moveTime,{ + "x":_loc2_, + "ease":Linear.easeNone, + "onComplete":this.moveOver + }); + return; + } + this.showTimer.stop(); + this.checkNext(); + } + + private function checkNext() : void + { + this.noticeMc.removeChild(this.currTextfield); + this.isPlay = false; + if(this.messageArr.length > 0) + { + this.checkPlay(); + } + else + { + this.noticeMc.visible = false; + } + } + + private function moveOver() : void + { + setTimeout(function():* + { + timeEnd(); + },2000); + } + + private function timeEnd() : void + { + this.checkNext(); + } + + private function getMoveTime(param1:Number) : int + { + var _loc2_:int = int((param1 - 535) / 16); + if(_loc2_ <= 0) + { + _loc2_ = 1; + } + return _loc2_; + } + + private function checkPlay() : void + { + var _loc1_:SpeakerData = null; + if(!this.isPlay) + { + _loc1_ = this.messageArr.shift(); + if(_loc1_.type > 0) + { + this.isPlay = true; + this.showUserTitle(_loc1_); + return; + } + this.noticeMc.visible = true; + this.showTimer.reset(); + this.currTextfield = this.getTextField(_loc1_.msg); + this.noticeMc.addChildAt(this.currTextfield,this.noticeMc.getChildIndex(this._tMask)); + this.currTextfield.mask = this._tMask; + this.currTextfield.y = -3; + if(this.currTextfield.width > 535) + { + this.moveTime = this.getMoveTime(this.currTextfield.width); + } + else + { + this.moveTime = 0; + } + this.showTimer.start(); + this.isPlay = true; + } + } + + public function showMessage(param1:String) : void + { + var _loc2_:SpeakerData = new SpeakerData(); + _loc2_.msg = param1; + _loc2_.type = 0; + this.messageArr.push(_loc2_); + this.checkPlay(); + } + + private function getTextField(param1:String) : TextField + { + var _loc2_:TextField = PublicMethod.getTextField(16760832,100); + _loc2_.height = 24; + _loc2_.htmlText = "" + param1 + ""; + _loc2_.width = _loc2_.textWidth + 10; + return _loc2_; + } + + public function showPlayMessage(param1:String) : void + { + var _loc2_:Array = param1.split("#"); + if(_loc2_.length < 3) + { + return; + } + var _loc3_:SpeakerData = new SpeakerData(); + _loc3_.msg = _loc2_[2]; + _loc3_.type = _loc2_[0]; + _loc3_.userName = _loc2_[1]; + if(_loc3_.type > 0 && _loc3_.type < 10) + { + if(NewUserData.getUser().countryId == _loc3_.type) + { + this.messageArr.unshift(_loc3_); + } + } + else + { + this.messageArr.push(_loc3_); + } + this.checkPlay(); + } + + private function showUserTitle(param1:SpeakerData) : void + { + var _loc2_:TitleMc = new TitleMc(); + _loc2_.init(param1); + _loc2_.overF = this.playTitleOver; + addChild(_loc2_); + } + + public function playTitleOver() : void + { + this.isPlay = false; + if(this.messageArr.length > 0) + { + this.checkPlay(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/BroadCastSpeak.as b/flash_decompiled/com/view/ui/chat/BroadCastSpeak.as new file mode 100644 index 0000000..e94b2e8 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/BroadCastSpeak.as @@ -0,0 +1,165 @@ +package com.view.ui.chat +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.greensock.TweenLite; + import com.greensock.easing.Linear; + import com.view.ui.chat.mc.*; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + import flash.utils.setTimeout; + + public class BroadCastSpeak extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var noticeMc:MovieClip; + + private var messageArr:Vector.; + + private var isPlay:Boolean; + + private var showTimer:Timer; + + private var _tMask:Sprite; + + private var textSp:Sprite; + + private var charFormat:TextFormat; + + private var currTextfield:TextField; + + private var moveTime:int; + + public function BroadCastSpeak() + { + super(); + this.noticeMc = this.face.getMovieClip(ClassConfig.chat_Speaker); + addChild(this.noticeMc); + this.noticeMc.x = -this.noticeMc.width / 2; + this.noticeMc.visible = false; + this.messageArr = new Vector.(); + this.showTimer = new Timer(10000,1); + this.showTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onTimer); + this._tMask = PublicMethod.createShape(16777215,470,20); + this.textSp = new Sprite(); + this.noticeMc.addChild(this.textSp); + this.textSp.x = 58; + this.textSp.y = 10; + this.noticeMc.addChild(this._tMask); + this._tMask.x = 58; + this._tMask.y = 10; + this.charFormat = new TextFormat(); + this.charFormat.size = 16; + } + + private function onTimer(param1:TimerEvent) : void + { + var _loc2_:Number = NaN; + if(this.moveTime > 0) + { + _loc2_ = 470 - this.currTextfield.width; + TweenLite.to(this.currTextfield,this.moveTime,{ + "x":_loc2_, + "ease":Linear.easeNone, + "onComplete":this.moveOver + }); + return; + } + this.showTimer.stop(); + this.checkNext(); + } + + private function checkNext() : void + { + this.textSp.removeChild(this.currTextfield); + this.isPlay = false; + if(this.messageArr.length > 0) + { + this.checkPlay(); + } + else + { + this.noticeMc.visible = false; + } + } + + private function moveOver() : void + { + setTimeout(function():* + { + timeEnd(); + },2000); + } + + private function timeEnd() : void + { + this.checkNext(); + } + + private function getMoveTime(param1:Number) : int + { + var _loc2_:int = int((param1 - 470) / 16); + if(_loc2_ <= 0) + { + _loc2_ = 1; + } + return _loc2_; + } + + private function checkPlay() : void + { + var _loc1_:String = null; + if(!this.isPlay) + { + _loc1_ = this.messageArr.shift(); + this.noticeMc.visible = true; + this.showTimer.reset(); + this.currTextfield = this.getTextField(_loc1_); + this.textSp.addChild(this.currTextfield); + this.textSp.mask = this._tMask; + if(this.currTextfield.width > 470) + { + this.moveTime = this.getMoveTime(this.currTextfield.width); + } + else + { + this.moveTime = 0; + } + this.showTimer.start(); + this.isPlay = true; + } + } + + public function showMessage(param1:String) : void + { + this.messageArr.push(param1); + this.checkPlay(); + } + + private function getTextField(param1:String) : TextField + { + var _loc2_:TextField = PublicMethod.getTextField(16760832,100); + _loc2_.height = 24; + _loc2_.htmlText = "" + param1 + ""; + _loc2_.width = _loc2_.textWidth + 10; + return _loc2_; + } + + public function playTitleOver() : void + { + this.isPlay = false; + if(this.messageArr.length > 0) + { + this.checkPlay(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/ChannelUI.as b/flash_decompiled/com/view/ui/chat/ChannelUI.as new file mode 100644 index 0000000..c3b6e09 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/ChannelUI.as @@ -0,0 +1,132 @@ +package com.view.ui.chat +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.chat.mc.ChannelBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ChannelUI extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var btn_1:UISmallBtn; + + private var btn_2:UISmallBtn; + + private var btn_3:UISmallBtn; + + public var currChannel:int; + + private var label1:TextField; + + private var lastBtn:UISmallBtn; + + public function ChannelUI() + { + super(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,32); + this.label1.text = "世界"; + addChild(this.label1); + this.label1.y = 2; + this.label1.x = 3; + this.currChannel = 1; + var _loc1_:ChannelBtn = new ChannelBtn(); + addChild(_loc1_); + _loc1_.addEventListener(MouseEvent.CLICK,this.clickMainChannel); + this.btn_1 = new UISmallBtn("世 界",2); + this.btn_2 = new UISmallBtn("国 家",2); + this.btn_3 = new UISmallBtn("联 盟",2); + addChild(this.btn_1); + addChild(this.btn_2); + addChild(this.btn_3); + this.btn_1.y = -21; + this.btn_2.y = -42; + this.btn_3.y = -63; + this.btn_1.visible = false; + this.btn_2.visible = false; + this.btn_3.visible = false; + this.btn_1.onClick = this.selectChannel; + this.btn_2.onClick = this.selectChannel; + this.btn_3.onClick = this.selectChannel; + this.face.stage.addEventListener(MouseEvent.CLICK,this.clickStage); + } + + private function clickStage(param1:MouseEvent) : void + { + if(this.btn_1.visible) + { + this.clickMainChannel(param1); + } + } + + private function clickMainChannel(param1:MouseEvent) : void + { + if(this.btn_1.visible) + { + this.btn_1.visible = false; + this.btn_2.visible = false; + this.btn_3.visible = false; + } + else + { + this.btn_1.visible = true; + this.btn_2.visible = true; + this.btn_3.visible = true; + } + if(this.lastBtn == this.btn_1) + { + this.label1.text = "世界"; + } + if(this.lastBtn == this.btn_2) + { + this.label1.text = "国家"; + } + if(this.lastBtn == this.btn_3) + { + this.label1.text = "联盟"; + } + param1.stopPropagation(); + } + + public function setChannelType(param1:int) : void + { + this.currChannel = param1; + if(this.currChannel == 1) + { + this.label1.text = "世界"; + } + if(this.currChannel == 3) + { + this.label1.text = "联盟"; + } + if(this.currChannel == 2) + { + this.label1.text = "国家"; + } + } + + private function selectChannel(param1:MouseEvent) : void + { + this.lastBtn = param1.currentTarget as UISmallBtn; + if(this.lastBtn == this.btn_1) + { + this.currChannel = 1; + } + else if(this.lastBtn == this.btn_2) + { + this.currChannel = 2; + } + else if(this.lastBtn == this.btn_3) + { + this.currChannel = 3; + } + this.clickMainChannel(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/ChatMainUI.as b/flash_decompiled/com/view/ui/chat/ChatMainUI.as new file mode 100644 index 0000000..6bf3446 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/ChatMainUI.as @@ -0,0 +1,386 @@ +package com.view.ui.chat +{ + import com.comfig.ClassConfig; + import com.comfig.PathConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.chat.event.ChatMainEvent; + import com.control.data.ReturnBean; + import com.newdata.user.NewUserData; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UISmallBtn; + import com.view.ui.BaseUI; + import com.view.ui.chat.data.ChatData; + import com.view.world.ui.CastleUserUI; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.utils.getTimer; + + public class ChatMainUI extends BaseUI + { + + private var regUserName:RegExp; + + private var input:UIInputText; + + private var faceUI:FaceUI; + + private var channelUI:ChannelUI; + + private var channelArr:Array; + + private var clickChannel:UISmallBtn; + + private var lastSendTime:int; + + private var currMessBar:RichTextArea; + + private var messBar_1:RichTextArea; + + private var messBar_2:RichTextArea; + + private var messBar_3:RichTextArea; + + private var messBar_4:RichTextArea; + + public function ChatMainUI() + { + var _loc5_:UISmallBtn = null; + var _loc6_:UISmallBtn = null; + var _loc7_:UISmallBtn = null; + var _loc9_:UISmallBtn = null; + this.regUserName = /\/\S* /; + super(); + var _loc1_:Sprite = new Scale9Grid(face.getSprite(UIConfig.chat_bg),190,170); + addChild(_loc1_); + _loc1_.y = -_loc1_.height; + var _loc2_:Sprite = new Scale9Grid(face.getSprite(UIConfig.chat_input_border),276,12); + addChild(_loc2_); + _loc2_.y = -28; + this.input = new UIInputText(166,10); + addChild(this.input); + this.input.y = -25; + this.input.x = 55; + this.input.setMaxChars(100); + var _loc3_:SimpleButton = face.getButton(ClassConfig.faceBtn); + addChild(_loc3_); + _loc3_.y = -21; + _loc3_.x = 228; + _loc3_.addEventListener(MouseEvent.CLICK,this.openFaceUI); + var _loc4_:UISmallBtn = new UISmallBtn("发送",1); + addChild(_loc4_); + _loc4_.y = -24; + _loc4_.x = 246; + _loc4_.onClick = this.sendMess; + _loc5_ = new UISmallBtn("世界",2); + addChild(_loc5_); + _loc5_.y = -48; + _loc5_.x = 2; + _loc6_ = new UISmallBtn("国家",2); + addChild(_loc6_); + _loc6_.y = _loc5_.y; + _loc6_.x = _loc5_.x + _loc5_.width; + _loc7_ = new UISmallBtn("联盟",2); + addChild(_loc7_); + _loc7_.y = _loc5_.y; + _loc7_.x = _loc6_.x + _loc6_.width; + var _loc8_:UISmallBtn = new UISmallBtn("私聊",2); + addChild(_loc8_); + _loc8_.y = _loc5_.y; + _loc8_.x = _loc7_.x + _loc7_.width; + this.createMessList(); + this.channelArr = new Array(); + this.channelArr.push(_loc5_); + this.channelArr.push(_loc6_); + this.channelArr.push(_loc7_); + this.channelArr.push(_loc8_); + for each(_loc9_ in this.channelArr) + { + _loc9_.onClick = this.mouseClickChannel; + } + addEventListener(KeyboardEvent.KEY_UP,this.sendMessByKey); + this.channelUI = new ChannelUI(); + addChild(this.channelUI); + this.channelUI.y = -25; + _loc5_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + this.setPosition(); + } + + private function openFaceUI(param1:MouseEvent) : void + { + if(this.faceUI == null) + { + this.faceUI = FaceUI.getInstance(); + this.faceUI.setFunc(this.addFaceMc); + } + param1.stopImmediatePropagation(); + if(contains(this.faceUI)) + { + removeChild(this.faceUI); + } + else + { + addChild(this.faceUI); + this.faceUI.x = 260; + this.faceUI.y = -280; + this.faceUI.addEvent(); + } + } + + private function addFaceMc(param1:String) : void + { + this.input.setText(this.input.getText() + param1); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(ChatMainEvent.Chat_userSendMessage,this.sendResult); + } + + override public function setPosition() : void + { + this.x = 0; + this.y = face.realHeight; + } + + private function mouseClickChannel(param1:MouseEvent) : void + { + var _loc2_:UISmallBtn = param1.currentTarget as UISmallBtn; + if(_loc2_ == this.clickChannel) + { + return; + } + if(this.clickChannel) + { + this.clickChannel.select = false; + } + this.clickChannel = _loc2_; + this.clickChannel.select = true; + this.currMessBar.visible = false; + if(this.clickChannel == this.channelArr[0]) + { + this.channelUI.setChannelType(1); + this.currMessBar = this.messBar_1; + } + else if(this.clickChannel == this.channelArr[1]) + { + this.channelUI.setChannelType(2); + this.currMessBar = this.messBar_2; + } + else if(this.clickChannel == this.channelArr[2]) + { + this.channelUI.setChannelType(3); + this.currMessBar = this.messBar_3; + } + else + { + this.currMessBar = this.messBar_4; + } + this.currMessBar.visible = true; + } + + private function sendMess(param1:MouseEvent) : void + { + var _loc4_:Array = null; + var _loc5_:* = undefined; + var _loc6_:* = undefined; + var _loc2_:int = NewUserData.getUser().rankId; + var _loc3_:String = this.input.getText(); + _loc3_ = PublicMethod.trim(_loc3_); + if(_loc2_ < 100) + { + this.currMessBar.appendRichText("君主等级达到100级才可使用该功能"); + return; + } + if(_loc3_.indexOf("<") >= 0 || _loc3_.indexOf(">") >= 0) + { + this.currMessBar.appendRichText("输入字符含非法字符"); + return; + } + if(_loc3_.length > 0) + { + if(getTimer() - this.lastSendTime < 500) + { + this.currMessBar.appendRichText("请不要输入过快"); + return; + } + this.lastSendTime = getTimer(); + _loc4_ = _loc3_.match(this.regUserName); + _loc5_ = ""; + _loc6_ = _loc3_; + if(!(_loc4_ == null || _loc4_.length == 0)) + { + _loc5_ = _loc4_[0].substring(1,_loc4_[0].length - 1); + _loc6_ = _loc3_.substring(_loc4_[0].length,_loc3_.length); + if(_loc6_ == "" || PublicMethod.trim(_loc6_) == "") + { + return; + } + this.input.setText("/" + _loc5_ + " "); + this.input.getTextField().setSelection(this.input.getText().length,this.input.getText().length); + ConnectService.getInstance().chatService.userSendPrivateMessage(PublicMethod.trim(_loc6_),_loc5_); + return; + } + this.input.setText(""); + ConnectService.getInstance().chatService.userSendMessage(this.channelUI.currChannel,_loc3_); + } + } + + override public function reSizeWindow(param1:Event) : void + { + this.setPosition(); + } + + private function sendMessByKey(param1:KeyboardEvent) : void + { + if(param1.keyCode == 13) + { + this.sendMess(null); + } + } + + private function sendResult(param1:ChatMainEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + this.currMessBar.appendRichText("" + param1.msg + ""); + } + } + + private function createMessList() : void + { + this.messBar_1 = new RichTextArea(261,164); + this.messBar_1.configXML = ChatData._confingXML; + this.messBar_1.textField.wordWrap = true; + this.messBar_1.textField.multiline = true; + this.messBar_1.headPath = PathConfig.getInstance().getServerPath(); + this.messBar_1.textField.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + addChild(this.messBar_1); + this.messBar_1.x = 17; + this.messBar_1.y = -212; + this.currMessBar = this.messBar_1; + this.messBar_2 = new RichTextArea(261,164); + addChild(this.messBar_2); + this.messBar_2.configXML = ChatData._confingXML; + this.messBar_2.textField.wordWrap = true; + this.messBar_2.textField.multiline = true; + this.messBar_2.headPath = PathConfig.getInstance().getServerPath(); + this.messBar_2.x = 17; + this.messBar_2.y = -212; + this.messBar_2.textField.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.messBar_3 = new RichTextArea(261,164); + addChild(this.messBar_3); + this.messBar_3.configXML = ChatData._confingXML; + this.messBar_3.textField.wordWrap = true; + this.messBar_3.textField.multiline = true; + this.messBar_3.headPath = PathConfig.getInstance().getServerPath(); + this.messBar_3.x = 17; + this.messBar_3.y = -212; + this.messBar_3.textField.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.messBar_4 = new RichTextArea(261,164); + addChild(this.messBar_4); + this.messBar_4.configXML = ChatData._confingXML; + this.messBar_4.textField.wordWrap = true; + this.messBar_4.textField.multiline = true; + this.messBar_4.headPath = PathConfig.getInstance().getServerPath(); + this.messBar_4.x = 17; + this.messBar_4.y = -212; + this.messBar_4.textField.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.messBar_2.visible = false; + this.messBar_3.visible = false; + this.messBar_4.visible = false; + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc7_:CastleUserUI = null; + var _loc2_:String = param1.text; + var _loc3_:Array = _loc2_.split(":"); + var _loc4_:String = _loc3_[0]; + var _loc5_:String = _loc3_[1]; + if(_loc5_ == NewUserData.getUser().userName) + { + return; + } + if(_loc4_ == "viewUser") + { + _loc7_ = CastleUserUI.getInstance(); + _loc7_.show(); + _loc7_.updateByUserName(_loc5_); + return; + } + var _loc6_:UserControl = UserControl.getInstance(); + _loc6_.show(_loc5_); + } + + public function printWorldMess(param1:String) : void + { + this.messBar_1.appendRichText(param1); + } + + public function printCountryMess(param1:String, param2:Boolean = false) : void + { + var _loc3_:Array = this.execMsg(param1); + if(param2) + { + this.messBar_3.appendRichText("[联盟]" + param1); + this.printWorldMess("[联盟]" + param1); + return; + } + if(_loc3_[0] == NewUserData.getUser().countryId) + { + this.messBar_2.appendRichText(_loc3_[1]); + this.printWorldMess("[国家]" + _loc3_[1]); + } + } + + public function printUnionMess(param1:String) : void + { + if(NewUserData.getNewGuild() == null) + { + return; + } + var _loc2_:Array = this.execMsg(param1); + if(_loc2_[0] == NewUserData.getNewGuild().guildId) + { + this.messBar_3.appendRichText("[联盟]" + _loc2_[1]); + this.printWorldMess("[联盟]" + _loc2_[1]); + } + } + + public function printUserMess(param1:String) : void + { + this.messBar_4.appendRichText(param1); + this.printWorldMess("[私聊]" + param1); + } + + public function talkToUser(param1:String) : void + { + if(param1 == NewUserData.getUser().userName) + { + return; + } + this.input.setText("/" + param1 + " "); + this.input.getTextField().setSelection(this.input.getText().length,this.input.getText().length); + } + + private function execMsg(param1:String) : Array + { + var _loc2_:Array = param1.split("-"); + var _loc3_:int = int(_loc2_[0]); + var _loc4_:* = param1.substring(1 + _loc3_.toString().length); + var _loc5_:Array = new Array(); + _loc5_[0] = _loc3_; + _loc5_[1] = _loc4_; + return _loc5_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/FaceUI.as b/flash_decompiled/com/view/ui/chat/FaceUI.as new file mode 100644 index 0000000..1c2cba1 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/FaceUI.as @@ -0,0 +1,128 @@ +package com.view.ui.chat +{ + import com.InstallFace; + import com.common.PublicGlow; + import com.common.Scale9Grid; + import com.view.ui.chat.data.ChatData; + import flash.display.Sprite; + import flash.events.IOErrorEvent; + import flash.events.MouseEvent; + + public class FaceUI extends Sprite + { + + public static var instance:FaceUI; + + private var bg:Sprite; + + private var face:InstallFace = InstallFace.getInstance(); + + private var funcF:Function; + + private var _gifPlayer:GifPlayer; + + public function FaceUI() + { + super(); + this.bg = new Scale9Grid(this.face.tip_bg,240,245); + addChild(this.bg); + this._gifPlayer = new GifPlayer(); + this.addFace(); + } + + public static function getInstance() : FaceUI + { + if(instance == null) + { + instance = new FaceUI(); + } + return instance; + } + + public function unshow() : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + if(this.face.stage.hasEventListener(MouseEvent.CLICK)) + { + this.face.stage.removeEventListener(MouseEvent.CLICK,this.onclick); + } + } + + public function addEvent() : void + { + this.face.stage.addEventListener(MouseEvent.CLICK,this.onclick); + } + + private function onclick(param1:MouseEvent) : void + { + this.unshow(); + } + + public function addFace() : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:Object = null; + var _loc6_:Sprite = null; + var _loc1_:Vector. = ChatData.getAllFaceList(); + for each(_loc5_ in _loc1_) + { + _loc6_ = this.addGif(_loc5_); + this.bg.addChild(_loc6_); + _loc3_ = _loc2_ % 10; + _loc4_ = _loc2_ / 10; + _loc6_.x = 4 + _loc3_ * 25; + _loc6_.y = 4 + _loc4_ * 25; + _loc6_.addEventListener(MouseEvent.CLICK,this.clickFace); + _loc6_.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + _loc6_.addEventListener(MouseEvent.MOUSE_OVER,this.mouseOver); + _loc6_.buttonMode = true; + _loc2_++; + } + } + + private function clickFace(param1:MouseEvent) : void + { + var _loc2_:Sprite = param1.currentTarget as Sprite; + this.funcF(_loc2_.name); + } + + private function mouseOut(param1:MouseEvent) : void + { + var _loc2_:Sprite = param1.currentTarget as Sprite; + _loc2_.filters = null; + } + + private function mouseOver(param1:MouseEvent) : void + { + var _loc2_:Sprite = param1.currentTarget as Sprite; + _loc2_.filters = [PublicGlow.getInstance().greenGlow1]; + } + + public function setFunc(param1:Function) : void + { + this.funcF = param1; + } + + private function addGif(param1:Object) : Sprite + { + var _loc2_:Sprite = new Sprite(); + this._gifPlayer.createGif(_loc2_,param1.iconUrl,this.loadOver,this.loadError); + _loc2_.name = param1.iconStr; + return _loc2_; + } + + private function loadOver(param1:*) : void + { + } + + private function loadError(param1:IOErrorEvent) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/GifPlayer.as b/flash_decompiled/com/view/ui/chat/GifPlayer.as new file mode 100644 index 0000000..c4188a7 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/GifPlayer.as @@ -0,0 +1,111 @@ +package com.view.ui.chat +{ + import flash.display.Loader; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.IOErrorEvent; + import flash.net.URLRequest; + import flash.utils.ByteArray; + + public class GifPlayer + { + + private var _gifPlayerClass:Class; + + private var _gifPlayerEvent:Class; + + private var _byteArray:ByteArray; + + private var _loader:Loader; + + private const GIFPLAYERSTR:* = "Q1dTCVYpAAB4nNU6WXQU15Xv1va6qltSqdUtCQlBA80mBMiAwQZjEJIaJAMNEpgl7nZVt6pVDb3IXS0WrzKOszp2HCdOnDgJJrGD4zWJE2c3xtlmksnQ0gBnznxM5sOT+Zhz5uRzzpnjnnuruoXAMP+jw61679Z999393df2LvgiG2MsAGyg2ccY6xeq1ep74QAOgX344s///YW3Ircx9l6ocSVh8E9naxhnIExFpqb+h099JDKB0Owv/9V3BZiYLZTbi6XxNanTZcsslczTa8azmTWZkpm3HN/OoViMRnIffWnI5EzHXjOWdSZy5mltR7acNycGzLIpnShmxzTv67hVzKsjVrpsFsZzlt9DTpazOUfdgVu4jPiOYjFnmQVltFzKFsYDHpF1wiqUncBQfLBUKpYGaSa7T+1ANm95CNUjLVhl7eDI7hHrgUnLKc/7uPxjVro4ZpU0VGDAGyrx1DGUKnpL2s3XaH3ZAkpmmXkpW8iWtXLJLDhDhTHrVGDcKu8uFif6i5OFsjieLvPUeH8xVywJWZuTXYqOpdhWdtwuC9mTSsq1kJrKFdPHR7MPWkL2lJA9zXEdzTjuMLZ7dEBxJjOZ7KkmT46hvDlukVED7rYTZskqpE/LWULT9q4/aHkjLXc3P2CmcpaKhim7i7WS5dToVPSuVcqZaUslavdzo8s3Y5X2ZU9ZOcc/Qa8+ZwKNIznHsxPymIXe5TlPSHfdqF0skaquDXy26bgeEs10WXZ1c4l20KihLqFrIWWiZKFmPhKNQkIiukDNTveauUlLRXpPDrJKLGeO+xDjyql4MeinxTs8K2uurKNlM31ccYdOmDjuLJkTdjbdXyyUS8Xc4Kmy6tS5uqsHvA21zKxgru1GsxShFJS+utQa4XchWKUmGu61yk7anLCQp3wyO1a21Vzd+7RmgCwV8PyAhsboFdFsZDrSRHHKZnnSWXSr7Npczy4tNZtJN0nFWlpQDhQny24WLL0V1ea5VJrL3B0uueWCazSyK1UjCrUPtarl2/JbLryeDj2bLjfEsjnrwOkJj9+yW+85l+xmGlN0Ode40VR2nzfj6RJvvo74JjwnXFnVWakVr3otvhXlNf0kp1yc8JeLZTMX86qiS7u7MC5NYnop6WIhbZYxMDAFkJEjucWxWOgv5idyVtlSJ0u53UUKKRVLljfipscqkJ4sYX57weczJ8tF2tM/XiwX+wpjo7ixREgpO1RIu7HplSW1WKhVyTopLVMmJ8bMsqWhErU6JpFQStZNW54/7ZZR2X1KeTOL5XeilC1bzaMH+g4cHL0/vm9w7/2DIyPxkcAe85SbZW4FcOOC0letE97TUhvF4iN7+g54i3wHhvYM3h8/eICXvSBsjI30IWZkcO/A4MjggA8VRZmsMV9/fM++3YMHBn3pmon40N57+3YPDfBs4YSZy44tssvlic1r15pjxZS1BqnW9o2uX7uut3fj2tRkNlfOFnz1uuHDzM6Ws8WCROVHqyf++nXKZIEwspPLpi1fJpvLkQraCB5LXpDMO1QqFsYjrnaRwmQ+ZZUiE6bjWGNwGk4pOaswXrZ1MvrBgpMdL1iue8Hi6DMaeUWPPA4FOU0lAVKQhnHIwjGxbKagpBQoshxeSFPxcvx7Bw+M9vftG1y3pjeQKRXz/bZZ6kc/iRhrqDo6KZ5pHvJMEEGJrUgZI1qamHTsltnQoSoRK5byZlnZMbS3b+SINjaL0c2xMTepdmcdLEd4kA3FPefI5JyRBiq9Zjltu0RK2SyhGSVaH7ruaN/sJUfn9cgB7+2do/PnntmbXX4DNeZWqev6hUO1TqFknqSTquu6pUM3rDX6CpHJwvFC8WQh4uZ2pJhGi1tjPZG8edyKODiOlG0rgkbzjIQJWMZodiJmOYJdhVOOFAuW51dtr+fXYsabO5HNkXq34daN4Gi6lJ0o18sm4VTMHy/NxFxhXJlwXSync8hUGkMVeGmyUMCjQ8byXio37S2WbZxFysUIKXunm8oRZEablijaevADioWi4xmbzZyOmLWgS1nlk5ZViNwWMQtjkaYbDNFwnb0xLvAkxxM3e8LyMK3Xfe/3jGCVlrZCq9iqtKqt/tam1pbWcHu7zNqPtH6iPdF+f3uq3WrNtGdbj7XnEftpaAt3tHe0ycz3PMis7VhHvuN96LgIHR+A7zfg+y20/h40RYM2tX2e6r06fJ3gAwEC0BwIw/yWrs7QgoWRRfP8YejyRouXQMvvgYPABYmDzEXOwccljcsBDg0cGrmic6WZK0HOQ9zXyqGNa/O41sG1Tg7zudbFtQVcW8i1CNcWcW0x15ZwLcq1pVxbxrXlXFvBtZVc6+baKq71cFjNtTVcW8u1Xq7dxrV1XFvPtQ1cu51rG7m2iWt3cO1Orm3m2hau3cW1rRzu5to2rm3n0MdhB9f6uTbAYZBrMa7t5Nourg1xbZhr93BtN9f2cG0vhzjX9nFtP9dGuDbK4QDXDnLtXq4d4tphDhs5HOWB+3ggycHgAZNDmgfGePM4B5u3HOdijkOBQ5GHJzg8wMMlDg6HCIcyD0/y8AnOT/LwKQ6nOTzI4SEOMR5+mIcf4eFHefgxDlPAw4+jUUd5+Ay+nsDpJxGeBC5/CuefBi5+Brj2WYTPIXwe4SmEL+C3pxG+iPAlhC9DJ6gbBQ4jHBZx+CqoX0M/wQv46esI3wDe+SK+v4nwLYSzCC8hnEP4DsJ3gbe9jO9X8P09hPMIryJ8H+E1hNcR3kB4E+EthLcRfoA8f4TwY4R3QW0VVUlS75PVpKyasjomq+MK5z9Fpj9D+DnCLxB+ifArhF8jvAfqBVzrU49yNc159A/Au/4O4e8RcMOuP6JGXP0TYJj9A5L/GeEfQY1w9bjKlWk0zAzCPyFchl2s/odXIwDwBu6FiBCihA9ZxJmMA4E+KUTHPQzz1d6AKxBApIFcQ94IMGdc+xOYBNdmwNS5n1ThuplyC8IbJj7mA78fZI0k99ODo2ByoKYeyA0e7nq56kAKiUQA9Ycwa5g5cs/+qY1Nqspgu87wStkMrClIfFqAKSFiFKZZKz3aiIvYTsN59OhgTGKdLnI+zbvosYAeC5E4QosXAWtYjCJp2hIijgLzLwUWXEaT5chhBYm7Evl3owlW0dIeYJ2rXZ5raLoW9+qlwW3AGtcRy/Uk5gZgzbcDkzYSZhN59A5ggTsFJmwGxrcQ17uAyVvp8920fBuNttOjD1hoB9q4391kgD4OAtNjwLSdwMK7gLUPEXKYDCfeg7fp3WiNPbR0L/GNu6HSpPrZAmEfjfeTMiN+tYEtYqN+tRG1PEDePuhXm1DJe0m6Q35VZ93s8BE1yFazo59QQ6y38z5gdyYEtiXJ2P3MAHa7CWxTClh/GtgdY8DWWYxl2DjtbAtsc1ZgW4+hJscFdneOJMnT7gVg61H2viKaaALY9geAbUChd5QEdpfDWCMrA9s4SZQnGDvJTp1WW1kMA+FBJoIoPsRkkMSHmaSwRyhExEcx0ASxi0XgMQXUZwCWYJXC0bMAy+BxGj0HsBLO0OgrAD1sLRtk6nxoxCxbCILEYDGMSExYCqMSE1fAQYlJq+CQxOQ1cFhiygAclRjfCack8O2ibJOWXupNPhJl5iPJR6NgPpp8MCqYDyYfTijDCjMfTj60dCpiPrTTjWJJXofEw1Gwh5OdUWZ3Jtvw2Zbsx2d/cvFye3FyNQ5XXxpiyfUJPsyZvR5XCoAr5Uu9RhuWClEUJLkb2ayOVu3VlSh7uzuIWbGyYgy8EcS8Sq42tlYyT0Dmk2CvNlbjCqm+fAAnMkmhXepNxKIsFqPao9Q/D+OESwFJfhcu9UamxCtRdjXK0hKCjKAgcARfQoxKxpLMk3AOn5+Cc8MieMQu0klLLtpxF3H9fkxQWqXvxkElxVO+2KdBcNLK9Ez3havdaTWlrJbPR/VXzCeghtIQpZyP+uag/CllaRXOI8Ln92k+9aIv5UtJ4der1YscecrhF6rVaZTfJ/kk+dFLvVF2c+mvoMHMz8CNkhod8c8CIzK915OX610kbwKmuy9ciQGgRZ2rRgfupczEPweiu60U/hcUQEkpKMAfqlXk8nlg6DBVapbkv4muFS9/XBTEpvmKtA/HtJWG4EcIIDQgNCI0JTYbHbHNaNjLBkZHY5ExfIshrDfGQFR4Ce2XXJZCpd4KYtlLxFLKc+jNzP4pScfSGZmS7GXGskjLHfhts7HMZdSd5rGngHkchRCqZywOYg2OsklaY9w9OZn2GUuMTSlf/AsgROFK1Dcrto7lVE3JTlo1VgSfYiwlGa1Npxi7KOjLyGBSWtKzNBCQXrqqJ2gMOBau6lhfVPL+dFqPCim9Q6E9ddQkKtZmoGMpjkq1maDjQaHTSNQFevr0zgvVqvjtavV8tfpOtYqTlISipKSZs+jElGp0nXUwkoz2wDEUTTWGzuFUM+YT1m/MQ6JASjOGzqYCATxc3CGhZGPeOSfdoGO5Vo3tqYbuC+kG9DMFWrrRWJdqJKd3p5uirAWXVVL+VBMG4EU/DgLhP6LnZWTRGv7wo2piRyW+A9DzmiBK8kZyvHCF4OP56WUnftLxYEw8DT3fhuGnsXBR9Pol0c3tyJRy2WjMPIyvCnLovmI+A9M+wfwiVIwh80l8tpufggquCAhYDbZhOjfHm1kl0rKSsUsVU0/sjO9kidtit7HmFtxld3w3hQ0LoFGTceNRO657owftuBFHNg1yWJJnFMqbm8RrPfH/r3hF0BGaEYIILdHqZWOe0XrOuWJsj7zWTT8LrzS2Z56F6TeC2BYktyfEaSwc9nZjYySElkhuTIjGQ4TZaEQ8TKSOiRjbIqFGxGwjTBTOEnJbYjA2yBzcGVJNL3ejtIBOxZyMCmedqxUKjyYXpSCB8vJzXj3y6wvJ2RsTkPJjVmMxeAKMSG2W8tfdK4X/uVpFw6dDTjqYCvlC7qhldtQ8O9JnR4HZkUYjx7VLgz5DiYNmCX0PMPJSSgDP3BSaLoTdSGJDbAPDCMNpA54/+ptuDQqmGhNgrEehgl7hwSfFZEp7GdVpTGlRH761i8FU4P10QC8h38aUfB5rZGNKeYUIUspLJIV/5q3uZnT0StSIvxakHbAVIPVC2Nx8zDxzTKd3IZ1aCXVjvG5DQZoxNZpRjFlToVRoq5SfzIwPXf9PZIgDH25Kml23KqUTreqg9XvI+v8Hx1nPUOqlXVe0/Qkr6xwqNz31GeOhJlLooZvtRVxmaKLW3DtT/3JRnEFTRdlrXlIilzeC2LpiDZeplsgpH2nU/H662diOXFuQawtJ6W4xK+XFhlTDdHjZR9VUC9WPZrd+IEVDPaQ8gv+oVrEkNNKJq+L5Gjceee15TLYmQizGExwRdjyJeWkPJLcmxGFsk7YmQxE7lNwTsffgUl0UZe2uS72Hui/3Wsg5D/Wnoce+BMzJg46d7aXeSu9RrBLdvavy4OV3l0+wIAe7INi16Ah2PF8G7I5Ys4z8XoSPMRSSnW422Z0e0sDmpLHAmPdR30j66cZ64mh00vOl+FdArA2j1RA5opPI51CcdfK1aRjrta7fIGZNQKPzWk3yBF7pnESBheddgb9KFxoWlLFluSyQ2Fc8sXEtHqJ5kV48L7k42X0q7pO7T5/7VN2nZkHF1Vakbc45c1i4jdY1NoaOFFj78CmQmq5WgpOXPR2mSYerNR2ImUyfA9psZX2FDJEQl04JbmNEO1yTS38YbelyxN1yvPuCBavyvBbVJPAtvtx6DSqWIzEUD69cnVlLpL6o/vKr+FajPvetvUq9k0tIBgifqlZp4S4Yn4JPAlpc+xpeIIC9gJcSzr6ORQvYN/AKBQw9gZewF/FaAuybeJsQ2bfw9gHs265vzrp+apEUSf439NByOj4iT7rHx/LL+p3Ix6vTV/RLqHliZXwl05fMwSYJ2xfvY/qzNNoQ34A3KHe5jieXOuPWQcnLvLNPXr0oYZXyhz+sVmd6fgghTN3ELjzAdEzmRE+8h+n3EBd31IdBuZW6Dnnpf0NKrrUdGKZottoUZjsNwe00BJ/c+UG1KjjV6iPVKo50bHHUZZf1B6iFwTuLWvOxicsSLu9ozyxrTJPoolnO1N9sqc0Et79htZk4u6vk7irhrtjYSH/9qPq3j6ovVqvfcRudyonuZmzPVrrH+Innm9/5iKpJiNr//e5BnRiMDzLPjpeTbZXo/PNR4RW7zcA7RYiSqg3vGW3JxZUoUMF7ni4XibWxtSyqnbNXJ4NexgddLsg4LGLvcRJ7jyfJhT1ATz1IPbDhOSv2EqAHLl8UpqNK+K8oX887EDtHBa+lqR78icM9P4HhwyAmFsYXMmPLie7grArPB7FUJUOJpcaC2FLAIhc2QkYvutUO4/atEib5C0K9A0nOd0W15ye7vEFXcp43mJds9QatddX3VpZO1VTcm1xRiW73xiuSa6JCJcrPv2yvMfYGw7j5Htx8DW2+J7nO2GOv00OIXGeE7HVGrxF0jRbGaoxwBXtjVN5YZwTpJLpCA69ZWBcJzVYsV68gMLYzsSi+yIvAObiB7quZgQtpaSYlmQN4MxGTHQnJGDLahyXB7kguMTrsJYnueDf2hAnB6DBWDwtC/Dt42iwO+ry9p3HHxPL4cnJQm4SeH3INlBzyTDCUbPcG7XVbbLlmiy3JBXX9FyR7PW/3Jld5g1XIsJ08fuRS76IzlxeduaJDPf+M9VGGSkchFGU0qR+6Zy7jRKhPriSHp7G2VF61h+m4eGuup5vfcU++eSIedM2XvL3dBxUjPAE7FNz59lq1SPYbbXj73ZRQjPlGFzWNw4pkb0ouM5bYy5J3G2H7bo+udih21o7POQJ/bP8P3f3n48VZ1HH/74LR1Gs0HWZddiPiuxAt4e0MhwuoX0cSunHvr9j7k/um7X2IX1hf+nJtKXTZAuIjtetz8rGeZ8B+DDGLJEFW8Hi/VFm+fEhExGK6rodw6SvuUj/+Oyx0ddkj+G0JLQ/g8inoeRbsKboyRCVRVhrrDJIHpu0DiF1a5/K9a1xE5DKK35bVuTwOPc+B/ThxWX49l3un7XsRu6LO5fw1LhJyOYjfVta5nIGer4B9hrh036jMqjqDV68xkJHBIfzWQz8ceGZcLeA6TuuGiM2a+qrvu6uO4L/DCq46jN/WAijcW9UridzneMbPVexccjKZp9uOncfLjj2ZPJE4idPhk4J9Ijnu9UfjSSuRGc4w2zIs4zXIvA7mG4BDf+ZxMMbib4KAEy3zFhhFd3LCCGTeBuMBmiSdRONwI7Md3Po2QeA+P0r4A6jEfwAk9DpCNSGqUMn8EDI/gniB0Otlydf8+mzzQf2G4J7l3rku1foKOlTp0zVBURU7bzhuG3EHtWxO7Hbs2GrL9MXUVI0n3GOdOkzHHcTAfMdFuYe5VDvzxfB0tZpMGuN4f7KTRo5a1kQ6nmY6xnziWBTixwA1SRw0DpIdxjF/34HMjyGDxfigQPrp9g29C5GPGCOZx4ZHgAiwl9EHajQwh+aQcShzBoYPzRItrBEJdaIjPb8DV7Kzw0dARJKd4qb34AN4F54DHPwVDrvvpwRsMqSfYtPA2c+wjQD2c6Bfnn+BDQRnGxSZ+/4K7g83ZJXkZCKP1TPfXSufeSqfRvK73VftyRmfSP0AavhLrMzkrGlsV7EoT5+hHzKiY2fMX4I+SPadbMYintx/zSKxXwGz9xuIMSY9TPzXaJ1ROtrnIO39+nY68rdgAXQyd16NwkztkJ9Hx/nMLboHsfPP2D08Xa3+olrFEdlv1BjNTEGN8/CoUAu220UM/XWeuvu9356805ZEm74mGZ62FbpHINHngdFvBBspTDHRE/fF72OGVYmXid8mwqpu8Hphe4cA3NeNtw7yDJoHmynjROY9oPugcSJ+AZhOQXSk5xKQ23DFnYArsFq7ZHQ7QrL76ODZTKx8+GESL4wowRaozYk1zu+qz51YC8P5VprTD4o5nNxdn4zjZJuMWv8rehl7kre76ZBbWXG5vBn8CWMVww7RuUllIAEJqKCXn0OYLQgUoOrNvZkwjHzMgJu5NH9Tl16JwvRcl07fwqWC69Jn6i693jh086OfcCr1BKAfctBi20nPv9xUz3f/H+k5J1ZuoWgfhfFd3s9dH9e1EZePV55DuejnrpuxoIDeQTy2uqnwcRb6LAs32W/JpJ+YbKp3j15uEIXjtrHhWq2drtUNNN37wNzc8jqFATywlAWYPhfdA+sD6DV+g/AJ/HeYd+GffRSpBgF8qnd0xUBQtSApfvQyHl+Jo8NHGQ7xy05k5Vt+qddiczn9FuF3CKfx32Ffl/tnn0LybS1q7T970f/8Qv+Fh/0vXZM6yQ=="; + + public function GifPlayer() + { + super(); + this._byteArray = new Base64(this.GIFPLAYERSTR); + this._loader = new Loader(); + this.createClass(); + } + + public function createGif(param1:Sprite, param2:String, param3:Function = null, param4:Function = null) : void + { + var $_gifPlayer:* = undefined; + var $container:Sprite = param1; + var $url:String = param2; + var $onComplete:Function = param3; + var $onError:Function = param4; + var $_fun:Function = function():void + { + $_gifPlayer = new _gifPlayerClass(); + $_gifPlayer.load(new URLRequest($url)); + $_gifPlayer.addEventListener(_gifPlayerEvent.COMPLETE,$onComplete); + $_gifPlayer.addEventListener(IOErrorEvent.IO_ERROR,$onError); + $container.addChild($_gifPlayer); + }; + this.createClass($_fun); + } + + private function createClass(param1:Function = null) : void + { + var $_completeHandler:Function; + var $onComplete:Function = param1; + if(this._gifPlayerClass != null) + { + if($onComplete != null) + { + $onComplete(); + } + return; + } + $_completeHandler = function(param1:Event):void + { + _gifPlayerClass = _loader.contentLoaderInfo.applicationDomain.getDefinition("org.bytearray.gif.player.GIFPlayer") as Class; + _gifPlayerEvent = _loader.contentLoaderInfo.applicationDomain.getDefinition("org.bytearray.gif.events.GIFPlayerEvent") as Class; + if($onComplete != null) + { + $onComplete(); + } + }; + this._loader.loadBytes(this._byteArray); + this._loader.contentLoaderInfo.addEventListener(Event.COMPLETE,$_completeHandler); + } + + public function get gifPlayerClass() : Class + { + return this._gifPlayerClass; + } + + public function get gifPlayerEvent() : Class + { + return this._gifPlayerEvent; + } + } +} + +import flash.utils.ByteArray; + +class Base64 extends ByteArray +{ + + private static const BASE64:Array = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,0,0,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,0,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,0,0,0,0,0]; + + public function Base64(param1:String) + { + var _loc2_:int = 0; + var _loc3_:int = 0; + super(); + var _loc4_:int = 0; + while(_loc4_ < param1.length && param1.charAt(_loc4_) != "=") + { + _loc3_ = _loc3_ << 6 | BASE64[param1.charCodeAt(_loc4_)]; + _loc2_ += 6; + while(_loc2_ >= 8) + { + writeByte(_loc3_ >> (_loc2_ = _loc2_ - 8) & 0xFF); + } + _loc4_++; + } + position = 0; + } +} diff --git a/flash_decompiled/com/view/ui/chat/RichTextArea.as b/flash_decompiled/com/view/ui/chat/RichTextArea.as new file mode 100644 index 0000000..4ee0cff --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/RichTextArea.as @@ -0,0 +1,692 @@ +package com.view.ui.chat +{ + import com.common.PublicGlow; + import fl.controls.UIScrollBar; + import flash.display.DisplayObject; + import flash.display.Loader; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.IOErrorEvent; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.geom.Rectangle; + import flash.net.URLRequest; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.text.TextLineMetrics; + import flash.utils.getDefinitionByName; + + public class RichTextArea extends Sprite + { + + private var _textField:TextField; + + private var _cacheTextField:TextField; + + private var _txtInfo:Object; + + private var _configXML:XML; + + private var _richTxt:String; + + private var _defaultFormat:TextFormat; + + private var _spriteMap:Array; + + private var _spriteContainer:Sprite; + + private var _spriteMask:Sprite; + + private var _this:Sprite; + + private var _rectangle:Rectangle; + + private var _gifPlayer:GifPlayer; + + private const PLACEHOLDER:String = " "; + + private const TYPE_MOVIECLIP:String = "movieClip"; + + private const TYPE_JPG:String = "jpg"; + + private const TYPE_GIF:String = "gif"; + + private const STATUS_INIT:String = "init"; + + private const STATUS_LOADED:String = "loaded"; + + private const STATUS_NORMAL:String = "normal"; + + private const STATUS_CHANGE:String = "change"; + + private const STATUS_CONVERT:String = "convert"; + + private const STATUS_SCROLL:String = "scroll"; + + private const STATUS_INPUT:String = "input"; + + private var sb:UIScrollBar; + + private var messVec:Vector. = new Vector.(); + + private var _headPath:String; + + public function RichTextArea(param1:int, param2:int) + { + super(); + this._this = this; + this._spriteMap = new Array(); + this._configXML = new XML(); + this._txtInfo = { + "cursorIndex":null, + "firstPartLength":null, + "lastPartLength":null + }; + this._gifPlayer = new GifPlayer(); + this._cacheTextField = new TextField(); + this._cacheTextField.multiline = true; + this._textField = new TextField(); + this._textField.width = param1; + this._textField.height = param2; + this._textField.filters = [PublicGlow.getInstance().blackGlow]; + this._textField.selectable = false; + var _loc3_:TextFormat = new TextFormat(); + _loc3_.color = 16760942; + _loc3_.size = 12; + _loc3_.leading = 4; + _loc3_.font = "SimSun"; + this._textField.defaultTextFormat = _loc3_; + this._textField.textColor = 16760942; + _loc3_ = new TextFormat(); + _loc3_.size = 12; + _loc3_.letterSpacing = 0; + _loc3_.font = "SimSun"; + this._spriteContainer = new Sprite(); + this._spriteMask = new Sprite(); + this.drawRectGraphics(this._spriteMask,param1,param2,true); + this._spriteContainer.mask = this._spriteMask; + this._this.addChild(this._textField); + this._this.addChild(this._spriteContainer); + this._this.addChild(this._spriteMask); + this.sb = new UIScrollBar(); + this.sb.move(-16,-5); + this.sb.setSize(this.sb.width,170); + this.sb.scrollTarget = this._textField; + addChild(this.sb); + this._this.addEventListener(Event.ADDED_TO_STAGE,this.initHandler); + this._this.addEventListener(Event.UNLOAD,this.unloadHandler); + this._textField.addEventListener(MouseEvent.CLICK,this.clickHandler); + this._textField.addEventListener(KeyboardEvent.KEY_DOWN,this.keyHandler); + this._textField.addEventListener(Event.CHANGE,this.changeHandler); + this._textField.addEventListener(Event.SCROLL,this.scrollHandler); + } + + public function appendRichText(param1:String) : void + { + var _loc2_:String = null; + var _loc3_:String = null; + this.messVec.push(param1); + if(this.messVec.length > 100) + { + this.messVec.splice(0,80); + this._textField.htmlText = ""; + this.clear(); + for each(_loc2_ in this.messVec) + { + this._textField.htmlText += _loc2_; + } + this.convert(); + } + else + { + _loc3_ = this._textField.htmlText; + _loc3_ += param1; + this._textField.htmlText = _loc3_; + this.convert(); + } + this.sb.scrollPosition = this.sb.maxScrollPosition; + this.sb.update(); + } + + public function insertRichText(param1:String, param2:int = -1, param3:int = -1) : void + { + param2 = param2 != -1 ? param2 : this._textField.selectionBeginIndex; + param3 = param3 != -1 ? param3 : this._textField.selectionEndIndex; + this._textField.replaceText(param2,param3,param1); + this.refreshArr(param2,param1.length - (param3 - param2)); + this.controlManager(this.STATUS_CHANGE); + stage.focus = this._textField; + } + + public function resizeTo(param1:int, param2:int) : void + { + this._textField.width = param1; + this._textField.height = param2; + this._spriteContainer.x = this._textField.x; + this._spriteContainer.y = this._textField.y; + this.drawRectGraphics(this._spriteMask,param1,param2,true); + } + + public function autoAdjust() : void + { + this._spriteContainer.x = this._textField.x; + this._spriteContainer.y = this._textField.y; + this.drawRectGraphics(this._spriteMask,this._textField.width,this._textField.height,true); + } + + public function clear() : void + { + this._spriteMap = []; + this._txtInfo = { + "cursorIndex":null, + "firstPartLength":null, + "lastPartLength":null + }; + while(this._spriteContainer.numChildren) + { + this._spriteContainer.removeChildAt(0); + } + this._textField.htmlText = ""; + } + + private function initHandler(param1:Event) : void + { + this._defaultFormat = this._textField.defaultTextFormat; + } + + private function unloadHandler(param1:Event) : void + { + this._textField.removeEventListener(MouseEvent.CLICK,this.clickHandler); + this._textField.removeEventListener(KeyboardEvent.KEY_DOWN,this.keyHandler); + this._textField.removeEventListener(Event.CHANGE,this.changeHandler); + this._textField.removeEventListener(Event.SCROLL,this.scrollHandler); + this._this.removeChild(this._textField); + this._this.removeChild(this._spriteContainer); + this._this.removeChild(this._spriteMask); + } + + private function clickHandler(param1:Event) : void + { + this.setTextInfo(); + } + + private function keyHandler(param1:KeyboardEvent) : void + { + this.setDefaultFormat(); + this.setTextInfo(); + } + + private function scrollHandler(param1:Event) : void + { + if(this._textField.htmlText == null || this._textField.htmlText == "") + { + return; + } + this.controlManager(this.STATUS_SCROLL); + } + + private function changeHandler(param1:Event) : void + { + this.controlManager(this.STATUS_CHANGE); + } + + private function controlManager(param1:String) : void + { + if(param1 == this.STATUS_CONVERT) + { + this.convert(); + } + else if(param1 == this.STATUS_CHANGE) + { + this.setDefaultFormat(); + this.change(); + this.refresh(); + this.convert(); + this.setTextInfo(); + } + else if(param1 == this.STATUS_SCROLL) + { + this.refresh(); + } + } + + private function convert() : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:String = null; + var _loc6_:Object = null; + var _loc7_:DisplayObject = null; + var _loc1_:String = this.PLACEHOLDER; + while(_loc4_ != -1) + { + _loc6_ = this.getInfoFormXML(this._textField.text); + _loc4_ = int(_loc6_.index); + if(_loc4_ != -1) + { + this.refreshArr(_loc4_,_loc1_.length - _loc6_.iconStr.length); + _loc2_ = int(_loc6_.iconStr.length); + this._textField.replaceText(_loc6_.index,_loc6_.index + _loc2_,_loc1_); + _loc3_ = int(this._spriteMap.length); + if(_loc6_.iconType == this.TYPE_MOVIECLIP) + { + _loc7_ = this.addMovieClip(_loc6_,_loc3_,this.onItemLoaded); + } + else if(_loc6_.iconType == this.TYPE_JPG) + { + _loc7_ = this.addJpg(_loc6_,_loc3_,this.onItemLoaded); + } + else if(_loc6_.iconType == this.TYPE_GIF) + { + _loc7_ = this.addGif(_loc6_,_loc3_,this.onItemLoaded); + } + this._spriteMap.push({ + "item":_loc7_, + "iconStr":_loc6_.iconStr, + "type":_loc6_.iconType, + "url":_loc6_.iconUrl, + "index":_loc4_, + "textFormat":null, + "status":this.STATUS_INIT + }); + if(_loc7_) + { + this._spriteContainer.addChild(_loc7_); + } + } + } + } + + private function revert() : String + { + var _loc5_:int = 0; + var _loc6_:Object = null; + var _loc7_:Sprite = null; + var _loc1_:String = this.PLACEHOLDER; + var _loc2_:int = _loc1_.length; + var _loc3_:Array = this._spriteMap; + var _loc4_:* = int(this._spriteMap.length); + var _loc8_:String = ""; + this._cacheTextField.htmlText = this._textField.htmlText; + _loc3_.sortOn(["index"],16); + while(_loc4_--) + { + _loc6_ = _loc3_[_loc4_]; + if(_loc6_) + { + _loc5_ = int(_loc6_.index); + this._cacheTextField.replaceText(_loc5_,_loc5_ + _loc2_,_loc6_.iconStr); + } + } + return this._cacheTextField.htmlText; + } + + private function refreshArr(param1:int, param2:int) : void + { + var _loc5_:Object = null; + var _loc3_:Array = this._spriteMap; + var _loc4_:int = int(_loc3_.length); + var _loc6_:int = 0; + while(_loc6_ < _loc4_) + { + _loc5_ = _loc3_[_loc6_]; + if(_loc5_) + { + if(_loc5_.index >= param1) + { + _loc5_.index += param2; + } + } + _loc6_++; + } + if(param2 != 0) + { + this._textField.setSelection(this._textField.caretIndex + param2,this._textField.caretIndex + param2); + this.setTextInfo(); + } + } + + private function change() : void + { + var _loc3_:Object = null; + var _loc4_:DisplayObject = null; + var _loc5_:TextFormat = null; + var _loc1_:Array = this._spriteMap; + var _loc2_:* = int(_loc1_.length); + var _loc6_:Object = this.getTextInfo(); + var _loc7_:int = _loc6_.cursorIndex < this._txtInfo.cursorIndex ? int(_loc6_.cursorIndex) : int(this._txtInfo.cursorIndex); + var _loc8_:int = _loc6_.firstPartLength - this._txtInfo.firstPartLength + _loc6_.lastPartLength - this._txtInfo.lastPartLength; + while(_loc2_--) + { + _loc3_ = _loc1_[_loc2_]; + if(_loc3_) + { + _loc4_ = _loc3_.item; + if(_loc3_.index >= _loc7_) + { + _loc3_.index += _loc8_; + } + if(_loc3_.index < 0 || _loc3_.index >= this._textField.length) + { + this._spriteContainer.removeChild(_loc4_); + _loc1_[_loc2_] = null; + _loc3_ = null; + } + else + { + _loc5_ = this._textField.getTextFormat(_loc3_.index); + if(_loc3_.status == this.STATUS_NORMAL && _loc5_.font != _loc3_.textFormat.font) + { + this._spriteContainer.removeChild(_loc4_); + _loc1_[_loc2_] = null; + _loc3_ = null; + } + } + } + } + } + + private function refresh() : void + { + var _loc3_:Object = null; + var _loc4_:DisplayObject = null; + var _loc5_:Rectangle = null; + var _loc6_:TextLineMetrics = null; + var _loc7_:int = 0; + var _loc1_:Array = this._spriteMap; + var _loc2_:* = int(_loc1_.length); + while(_loc2_--) + { + _loc3_ = _loc1_[_loc2_]; + if(_loc3_) + { + _loc4_ = _loc3_.item; + _loc5_ = this._textField.getCharBoundaries(_loc3_.index); + if(_loc5_) + { + _loc6_ = this._textField.getLineMetrics(this._textField.getLineIndexOfChar(_loc3_.index)); + _loc7_ = _loc5_.height * 0.5 > _loc4_.height ? int(_loc6_.ascent - _loc4_.height) : int((_loc5_.height - _loc4_.height) * 0.5); + _loc4_.visible = true; + _loc4_.x = _loc5_.x + (_loc5_.width - _loc4_.width) * 0.5; + _loc4_.y = _loc5_.y + _loc7_; + } + else + { + _loc4_.visible = false; + } + } + } + this.setContainerPos(); + } + + private function onItemLoaded(param1:int) : void + { + this.setFormat(param1); + this.refresh(); + } + + private function setFormat(param1:int) : void + { + var _loc2_:TextFormat = null; + var _loc3_:DisplayObject = null; + var _loc4_:Rectangle = null; + var _loc5_:Object = this._spriteMap[param1]; + _loc3_ = _loc5_.item; + _loc2_ = new TextFormat(); + _loc2_.size = _loc3_.height; + _loc2_.font = _loc3_.name; + _loc2_.font = "SimSun"; + _loc2_.letterSpacing = _loc3_.width - _loc3_.height * 0.5; + this._textField.setTextFormat(_loc2_,_loc5_.index); + _loc5_.textFormat = _loc2_; + _loc5_.status = this.STATUS_NORMAL; + } + + private function setDefaultFormat() : void + { + this._textField.defaultTextFormat = this._defaultFormat; + } + + private function setTextInfo() : void + { + this._txtInfo = { + "cursorIndex":this._textField.caretIndex, + "firstPartLength":this._textField.caretIndex, + "lastPartLength":this._textField.length - this._textField.caretIndex + }; + } + + private function getTextInfo() : Object + { + return { + "cursorIndex":this._textField.caretIndex, + "firstPartLength":this._textField.caretIndex, + "lastPartLength":this._textField.length - this._textField.caretIndex + }; + } + + private function getTextFieldPos() : Object + { + var _loc1_:Number = this._textField.scrollH; + var _loc2_:* = int(this._textField.scrollV - 1); + var _loc3_:Number = 0; + while(_loc2_--) + { + _loc3_ += this._textField.getLineMetrics(_loc2_).height; + } + return { + "x":-_loc1_, + "y":-_loc3_ + }; + } + + private function setContainerPos() : void + { + var _loc1_:Object = this.getTextFieldPos(); + this._spriteContainer.x = this._textField.x + _loc1_.x; + this._spriteContainer.y = this._textField.y + _loc1_.y; + } + + private function getInfoFormXML(param1:String) : Object + { + var _loc2_:XML = this._configXML; + var _loc3_:int = int(_loc2_.icon.length()); + var _loc4_:int = -1; + var _loc5_:int = -1; + if(_loc3_ <= 0) + { + return null; + } + var _loc6_:Object = { + "index":-1, + "iconStr":"", + "iconUrl":"", + "iconType":"" + }; + var _loc7_:int = 0; + while(_loc7_ < _loc3_) + { + _loc4_ = param1.indexOf(this.getIconStr(_loc7_)); + if(_loc5_ == -1 || _loc4_ != -1 && _loc5_ > _loc4_) + { + _loc5_ = _loc4_; + _loc6_.index = _loc4_; + _loc6_.iconStr = this.getIconStr(_loc7_); + _loc6_.iconUrl = this.getIconUrl(_loc7_); + _loc6_.iconType = this.getIconType(_loc7_); + } + _loc7_++; + } + return _loc6_; + } + + private function getIconStr(param1:int) : String + { + var _loc2_:XML = this._configXML; + return _loc2_.icon[param1].@iconStr; + } + + private function getIconUrl(param1:int) : String + { + var _loc2_:XML = this._configXML; + return this._headPath + _loc2_.icon[param1].@iconUrl; + } + + private function getIconType(param1:int) : String + { + var _loc2_:XML = this._configXML; + return _loc2_.icon[param1].@iconType; + } + + private function addMovieClip(param1:Object, param2:int = 0, param3:Function = null) : DisplayObject + { + var $info:Object = param1; + var $id:int = param2; + var $onComplete:Function = param3; + var $_class:Class = getDefinitionByName($info.iconUrl) as Class; + var $_item:DisplayObject = new $_class(); + var $_eventHandler:Function = function(param1:Event):void + { + if($onComplete != null) + { + $onComplete($id); + } + }; + $_item.addEventListener(Event.ADDED_TO_STAGE,$_eventHandler); + return $_item; + } + + private function addJpg(param1:Object, param2:int = 0, param3:Function = null) : DisplayObject + { + var $_sprite:Sprite = null; + var $info:Object = param1; + var $id:int = param2; + var $onComplete:Function = param3; + $_sprite = new Sprite(); + var $_imgLoader:Loader = new Loader(); + var $_info:Object = this._spriteMap[$id]; + var $_onComplete:Function = function(param1:Event):void + { + if($onComplete != null) + { + $onComplete($id); + } + }; + var $_onError:Function = function(param1:Event):void + { + drawErrGraphics($_sprite); + if($onComplete != null) + { + $onComplete($id); + } + }; + $_imgLoader.load(new URLRequest($info.iconUrl)); + $_imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,$_onComplete); + $_imgLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,$_onError); + $_sprite.addChild($_imgLoader); + return $_sprite; + } + + private function addGif(param1:Object, param2:int = 0, param3:Function = null) : DisplayObject + { + var $_sprite:Sprite = null; + var $info:Object = param1; + var $id:int = param2; + var $onComplete:Function = param3; + $_sprite = new Sprite(); + var $_info:Object = this._spriteMap[$id]; + var $_onComplete:Function = function(param1:Object):void + { + var _loc2_:Rectangle = param1.rect; + drawRectGraphics($_sprite,_loc2_.width,_loc2_.height,false,0); + if($onComplete != null) + { + $onComplete($id); + } + }; + var $_onError:Function = function(param1:Event):void + { + drawErrGraphics($_sprite); + if($onComplete != null) + { + $onComplete($id); + } + }; + this._gifPlayer.createGif($_sprite,$info.iconUrl,$_onComplete,$_onError); + return $_sprite; + } + + private function drawErrGraphics(param1:Sprite) : void + { + param1.graphics.clear(); + param1.graphics.lineStyle(1,16711680); + param1.graphics.beginFill(16777215); + param1.graphics.drawRect(0,0,10,10); + param1.graphics.moveTo(0,0); + param1.graphics.lineTo(10,10); + param1.graphics.moveTo(0,10); + param1.graphics.lineTo(10,0); + param1.graphics.endFill(); + } + + private function drawRectGraphics(param1:Sprite, param2:int = 10, param3:int = 10, param4:Boolean = false, param5:int = 1) : void + { + if(param4) + { + param1.graphics.clear(); + } + param1.graphics.beginFill(0,param5); + param1.graphics.drawRect(0,0,param2,param3); + param1.graphics.endFill(); + } + + public function get textField() : TextField + { + return this._textField; + } + + public function set richText(param1:String) : void + { + this.clear(); + this._richTxt = param1; + this._textField.htmlText = param1; + if(param1 == null || param1 == "" || this._configXML == null) + { + return; + } + this.controlManager(this.STATUS_CONVERT); + } + + public function get richText() : String + { + return this.revert(); + } + + public function set configXML(param1:XML) : void + { + this._configXML = param1; + } + + public function get configXML() : XML + { + return this._configXML; + } + + public function set defaultTextFormat(param1:TextFormat) : void + { + this._defaultFormat = param1; + } + + public function get headPath() : String + { + return this._headPath; + } + + public function set headPath(param1:String) : void + { + this._headPath = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/SysMessUI.as b/flash_decompiled/com/view/ui/chat/SysMessUI.as new file mode 100644 index 0000000..b607f63 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/SysMessUI.as @@ -0,0 +1,257 @@ +package com.view.ui.chat +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.data.GameData; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.newdata.hero.NewHeroData; + import com.utils.TextUtils; + import com.view.newui.UIConfig; + import com.view.tip.TipTitle; + import com.view.ui.BaseUI; + import com.view.ui.chat.mc.KingLoginOnMc; + import com.view.ui.gift.GiftView; + import com.view.ui.message.MessageBoxUI; + import fl.controls.UIScrollBar; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SysMessUI extends BaseUI + { + + private var mc:Sprite; + + private var tf:TextField; + + private var sb:UIScrollBar = new UIScrollBar(); + + private var css:TextFormat; + + private var bigSpeaker:BigSpeaker; + + private var broadCastSpeaker:BroadCastSpeak; + + private var kingOnLineMc:KingLoginOnMc; + + private var btn_add:SimpleButton; + + private var btn_jian:SimpleButton; + + private var systemMessUI:SystemMessUI; + + private var showMessUI:Boolean = false; + + public function SysMessUI() + { + super(); + this.css = new TextFormat(); + this.css.leading = 1.5; + this.mc = new Scale9Grid(face.getSprite(UIConfig.chat_bg1),280,90); + addChild(this.mc); + this.mc.x = 2; + this.mc.y = 10; + this.createTextField(); + this.assignScrollBar(); + this.bigSpeaker = new BigSpeaker(); + addChild(this.bigSpeaker); + this.bigSpeaker.x = face.realWidth / 2; + this.bigSpeaker.y = -40; + this.broadCastSpeaker = new BroadCastSpeak(); + addChild(this.broadCastSpeaker); + this.broadCastSpeaker.x = face.realWidth / 2; + this.broadCastSpeaker.y = 0; + this.kingOnLineMc = new KingLoginOnMc(); + addChild(this.kingOnLineMc); + this.kingOnLineMc.y = 30; + this.setPosition(); + this.btn_add = face.getButton(UIConfig.btn_add); + addChild(this.btn_add); + this.btn_add.x = 0; + this.btn_add.y = -14; + this.btn_add.addEventListener(MouseEvent.CLICK,this.openMessUI); + this.btn_jian = face.getButton(UIConfig.btn_jian); + addChild(this.btn_jian); + this.btn_jian.x = this.btn_add.x; + this.btn_jian.y = this.btn_add.y; + this.btn_jian.addEventListener(MouseEvent.CLICK,this.openMessUI); + this.btn_jian.visible = false; + new TipTitle(this.btn_add,face.stage,face.tip_bg,{ + "titletext":"查看消息记录", + "titleColor":16777215, + "bgAlpha":1 + }); + new TipTitle(this.btn_jian,face.stage,face.tip_bg,{ + "titletext":"查看消息记录", + "titleColor":16777215, + "bgAlpha":1 + }); + var _loc1_:GiftView = GiftView.getInstance(); + addChild(_loc1_); + _loc1_.x = 290; + _loc1_.y = 40; + } + + private function clearMess(param1:MouseEvent) : void + { + } + + public function openMessUI(param1:MouseEvent) : void + { + if(this.showMessUI == false) + { + this.showMessUI = true; + if(this.systemMessUI == null) + { + this.systemMessUI = new SystemMessUI(); + } + this.systemMessUI.show(); + this.btn_jian.visible = true; + this.btn_add.visible = false; + } + else + { + this.showMessUI = false; + this.systemMessUI.closeUI(param1); + this.btn_jian.visible = false; + this.btn_add.visible = true; + } + } + + public function hidden() : void + { + this.showMessUI = false; + this.btn_jian.visible = false; + this.btn_add.visible = true; + } + + override public function setPosition() : void + { + x = 0; + y = 116; + this.bigSpeaker.y = -50; + this.bigSpeaker.x = face.realWidth / 2; + this.broadCastSpeaker.x = face.realWidth / 2; + this.broadCastSpeaker.y = 0; + this.kingOnLineMc.x = face.realWidth / 2; + this.kingOnLineMc.y = 50; + } + + private function createTextField() : void + { + this.tf = PublicMethod.getTextFieldWithFillter(16760942,260); + this.tf.mouseEnabled = true; + this.tf.width = 265; + this.tf.height = 90; + this.tf.wordWrap = true; + this.tf.multiline = true; + this.tf.htmlText = ""; + addChild(this.tf); + this.tf.x = 20; + this.tf.y = 12; + this.tf.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + } + + private function assignScrollBar() : void + { + this.sb = new UIScrollBar(); + this.sb.move(2,10); + this.sb.setSize(this.sb.width,this.tf.height + 6); + this.sb.scrollTarget = this.tf; + addChild(this.sb); + } + + public function printMess(param1:String) : void + { + if(this.covertSystem(param1)) + { + return; + } + var _loc2_:int = param1.indexOf("你获得了道具"); + var _loc3_:int = param1.indexOf("你的道具"); + if(_loc2_ >= 0 || _loc3_ >= 0) + { + } + var _loc4_:int = param1.indexOf("得到经验"); + if(_loc4_ >= 0) + { + NewHeroData.setGetHeroListStatus(); + } + var _loc5_:String = PublicMethod.getSysMess(param1,false); + this.tf.htmlText += _loc5_ + "
"; + this.sb.scrollPosition = this.sb.maxScrollPosition; + this.tf.setTextFormat(this.css); + this.sb.update(); + if(this.systemMessUI == null) + { + this.systemMessUI = new SystemMessUI(); + } + this.systemMessUI.printMess(_loc5_); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:Array = _loc2_.split(":"); + var _loc4_:String = _loc3_[0]; + var _loc5_:String = _loc3_[1]; + var _loc6_:LinkEvent = new LinkEvent(); + _loc6_.eventType = _loc4_; + _loc6_.id = _loc5_; + EventUtils.getInstance().dispatchEvent(_loc6_); + } + + public function titleMsg(param1:String) : void + { + this.bigSpeaker.showMessage(TextUtils.getInstance().addParagraphElement(param1,false)); + } + + public function broadcastMsg(param1:String) : void + { + this.broadCastSpeaker.showMessage(TextUtils.getInstance().addParagraphElement(param1,false)); + } + + public function userTitleMsg(param1:String) : void + { + this.bigSpeaker.showPlayMessage(TextUtils.getInstance().addParagraphElement(param1,false)); + } + + public function kingLoginMsg(param1:String) : void + { + this.kingOnLineMc.showUser(param1); + } + + private function covertSystem(param1:String) : Boolean + { + if(param1 == "refreshCache_shop") + { + return true; + } + if(param1 == "refreshCache_farm") + { + GameData.clearFarmPlatDataList(); + GameData.clearFarmAreaDataList(); + return true; + } + if(param1 == "refreshCache_Castle_destroy") + { + return true; + } + if(param1 == "refreshCache_all") + { + MessageBoxUI.getInstance().reLogin("恭喜你!分城转换成功,现在请重新登陆游戏!"); + return true; + } + if(param1 == "refreshCache_guild") + { + return true; + } + return false; + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/SystemMessUI.as b/flash_decompiled/com/view/ui/chat/SystemMessUI.as new file mode 100644 index 0000000..043574f --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/SystemMessUI.as @@ -0,0 +1,98 @@ +package com.view.ui.chat +{ + import com.common.PublicMethod; + import com.view.Control; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import fl.controls.UIScrollBar; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SystemMessUI extends BaseUI + { + + private var bg:UIWindowBg; + + private var sb:UIScrollBar; + + private var messText:TextField; + + private var firstTime:Boolean = false; + + private var messStr:String; + + public function SystemMessUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xitongxinxi); + super.setPosition(); + this.bg = new UIWindowBg(); + this.bg.initSecondPanel(282,318); + addChild(this.bg); + this.bg.x = 11; + this.bg.y = 40; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.leading = 4; + this.messText = PublicMethod.getTextFieldWithFillter(16774306,280); + this.messText.height = 322; + this.messText.wordWrap = true; + this.messText.multiline = true; + this.messText.defaultTextFormat = _loc1_; + this.bg.addChild(this.messText); + this.messText.x = 4; + this.messText.y = 4; + this.sb = new UIScrollBar(); + this.sb.move(276,4); + this.sb.setSize(this.sb.width,this.messText.height); + this.sb.scrollTarget = this.messText; + this.bg.addChild(this.sb); + } + + override public function setWindowSize() : void + { + window_width = 90; + window_heihgt = 300; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 290; + ui_closeBtn.y = 10; + } + + public function printMess(param1:String) : void + { + if(this.firstTime) + { + this.messStr = this.messStr + "
" + param1; + } + else + { + this.messStr = param1; + } + if(this.firstTime == false) + { + this.firstTime = true; + } + this.messText.htmlText = this.messStr; + this.sb.scrollPosition = this.sb.maxScrollPosition; + this.sb.update(); + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI(param1); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + Control.getInstance().sysMessUI.hidden(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/UserControl.as b/flash_decompiled/com/view/ui/chat/UserControl.as new file mode 100644 index 0000000..a424290 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/UserControl.as @@ -0,0 +1,135 @@ +package com.view.ui.chat +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.view.Control; + import com.view.ui.mail.MailUI; + import com.view.world.ui.CastleUserUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.system.System; + import flash.utils.setTimeout; + + public class UserControl extends Sprite + { + + private static var instance:UserControl; + + private var face:InstallFace; + + private var controlMc:MovieClip; + + private var btnArr:Array; + + private var userName:String; + + public function UserControl() + { + var _loc1_:MovieClip = null; + this.face = InstallFace.getInstance(); + super(); + this.controlMc = this.face.getMovieClip(ClassConfig.chat_control); + addChild(this.controlMc); + this.btnArr = new Array(); + this.btnArr.push(this.controlMc.btn_0); + this.controlMc.btn_0.tf.text = "私聊"; + this.btnArr.push(this.controlMc.btn_1); + this.controlMc.btn_1.tf.text = "加为好友"; + this.btnArr.push(this.controlMc.btn_2); + this.controlMc.btn_2.tf.text = "写信"; + this.btnArr.push(this.controlMc.btn_3); + this.controlMc.btn_3.tf.text = "复制名称"; + this.btnArr.push(this.controlMc.btn_4); + this.controlMc.btn_4.tf.text = "加为仇人"; + this.btnArr.push(this.controlMc.btn_5); + this.controlMc.btn_5.tf.text = "查看信息"; + for each(_loc1_ in this.btnArr) + { + _loc1_.buttonMode = true; + _loc1_.gotoAndStop(1); + _loc1_.addEventListener(MouseEvent.CLICK,this.mouseClick); + _loc1_.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + _loc1_.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + _loc1_.tf.mouseEnabled = false; + } + } + + public static function getInstance() : UserControl + { + if(instance == null) + { + instance = new UserControl(); + } + return instance; + } + + private function mouseClick(param1:MouseEvent) : void + { + var _loc3_:MailUI = null; + var _loc4_:CastleUserUI = null; + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ == this.btnArr[0]) + { + Control.getInstance().chatMainUI.talkToUser(this.userName); + } + else if(_loc2_ == this.btnArr[1]) + { + ConnectService.getInstance().friendService.addFriend(this.userName); + } + else if(_loc2_ == this.btnArr[2]) + { + _loc3_ = MailUI.getInstance(); + _loc3_.setStartPage(2); + _loc3_.setReceiveName(this.userName); + _loc3_.show(); + } + else if(_loc2_ == this.btnArr[3]) + { + System.setClipboard(this.userName); + } + else if(_loc2_ == this.btnArr[4]) + { + ConnectService.getInstance().friendService.addEnemy(this.userName); + } + else if(_loc2_ == this.btnArr[5]) + { + _loc4_ = CastleUserUI.getInstance(); + _loc4_.show(); + _loc4_.updateByUserName(this.userName); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + param1.currentTarget.gotoAndStop(1); + } + + private function mouseOver(param1:MouseEvent) : void + { + param1.currentTarget.gotoAndStop(2); + } + + public function show(param1:String) : void + { + this.userName = param1; + setTimeout(this.afterShow,50); + } + + private function afterShow() : void + { + if(!this.face.stage.contains(this)) + { + this.face.stage.addChild(this); + this.x = stage.mouseX + 20; + this.y = stage.mouseY; + if(this.y + this.height > this.face.realHeight) + { + this.y = this.face.realHeight - this.height; + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/data/ChatData.as b/flash_decompiled/com/view/ui/chat/data/ChatData.as new file mode 100644 index 0000000..c326237 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/data/ChatData.as @@ -0,0 +1,164 @@ +package com.view.ui.chat.data +{ + import com.comfig.PathConfig; + + public class ChatData + { + + public static var _confingXML:XML = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + + public static var _headPath:String = PathConfig.getInstance().getServerPath(); + + public function ChatData() + { + super(); + } + + public static function getAllFaceList() : Vector. + { + var _loc5_:Object = null; + var _loc1_:Vector. = new Vector.(); + var _loc2_:XML = _confingXML; + var _loc3_:int = int(_loc2_.icon.length()); + if(_loc3_ <= 0) + { + return null; + } + var _loc4_:int = 0; + while(_loc4_ < _loc3_) + { + _loc5_ = { + "iconStr":"", + "iconUrl":"", + "iconType":"" + }; + _loc5_.iconStr = getIconStr(_loc4_); + _loc5_.iconUrl = getIconUrl(_loc4_); + _loc5_.iconType = getIconType(_loc4_); + _loc1_.push(_loc5_); + _loc4_++; + } + return _loc1_; + } + + private static function getIconStr(param1:int) : String + { + var _loc2_:XML = _confingXML; + return _loc2_.icon[param1].@iconStr; + } + + private static function getIconUrl(param1:int) : String + { + var _loc2_:XML = _confingXML; + return _headPath + _loc2_.icon[param1].@iconUrl; + } + + private static function getIconType(param1:int) : String + { + var _loc2_:XML = _confingXML; + return _loc2_.icon[param1].@iconType; + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/mc/ChannelBtn.as b/flash_decompiled/com/view/ui/chat/mc/ChannelBtn.as new file mode 100644 index 0000000..1222e64 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/mc/ChannelBtn.as @@ -0,0 +1,28 @@ +package com.view.ui.chat.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Bitmap; + import flash.display.Sprite; + + public class ChannelBtn extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public function ChannelBtn() + { + super(); + var _loc1_:Sprite = PublicMethod.createShape(0,46,20); + addChild(_loc1_); + _loc1_.alpha = 0; + var _loc2_:Bitmap = new Bitmap(this.face.getPng(UIConfig.arrow_down)); + addChild(_loc2_); + _loc2_.y = 7; + _loc2_.x = 32; + this.buttonMode = true; + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/mc/KingLoginOnMc.as b/flash_decompiled/com/view/ui/chat/mc/KingLoginOnMc.as new file mode 100644 index 0000000..9223f25 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/mc/KingLoginOnMc.as @@ -0,0 +1,75 @@ +package com.view.ui.chat.mc +{ + import com.common.PublicGlow; + import flash.display.Sprite; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class KingLoginOnMc extends Sprite + { + + private var titleT:TextField; + + private var messArr:Vector. = new Vector.(); + + private var isPlay:Boolean = false; + + private var showTimer:Timer; + + public function KingLoginOnMc() + { + super(); + this.titleT = new TextField(); + this.titleT.width = 560; + this.titleT.height = 24; + this.titleT.filters = [PublicGlow.getInstance().blackGlow1]; + this.titleT.mouseEnabled = false; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.size = 16; + _loc1_.align = "center"; + addChild(this.titleT); + this.titleT.defaultTextFormat = _loc1_; + this.titleT.x = -280; + this.titleT.visible = false; + } + + public function showUser(param1:String) : void + { + this.messArr.push(param1); + this.show(); + } + + private function show() : void + { + var _loc1_:String = null; + if(this.showTimer == null) + { + this.showTimer = new Timer(20000,1); + this.showTimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.onTimer); + } + if(this.messArr.length == 0) + { + return; + } + this.titleT.visible = true; + if(!this.isPlay) + { + _loc1_ = this.messArr.shift(); + this.titleT.htmlText = "※※※※※【国君】[" + _loc1_ + "]上线了!※※※※※"; + this.isPlay = true; + this.showTimer.start(); + } + } + + private function onTimer(param1:TimerEvent) : void + { + this.isPlay = false; + this.showTimer.stop(); + this.titleT.visible = false; + this.show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/mc/SpeakerData.as b/flash_decompiled/com/view/ui/chat/mc/SpeakerData.as new file mode 100644 index 0000000..5492358 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/mc/SpeakerData.as @@ -0,0 +1,18 @@ +package com.view.ui.chat.mc +{ + public class SpeakerData + { + + public var msg:String; + + public var type:int; + + public var userName:String; + + public function SpeakerData() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/mc/TitleInputMc.as b/flash_decompiled/com/view/ui/chat/mc/TitleInputMc.as new file mode 100644 index 0000000..37c3856 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/mc/TitleInputMc.as @@ -0,0 +1,134 @@ +package com.view.ui.chat.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.chat.event.ChatMainEvent; + 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.TextFieldType; + + public class TitleInputMc extends UIWindowBg + { + + private static var instance:TitleInputMc; + + private var okBtn:UIButton; + + private var msgText:TextField; + + private var itemId:int; + + public function TitleInputMc() + { + var _loc3_:UIButton = null; + super(); + if(instance != null) + { + throw Error("单例"); + } + initSize(88,170); + loadTitle(UITitleConfig.title_quanfuguangbo); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140); + _loc1_.text = "最多能输入40字"; + bg1.addChild(_loc1_); + _loc1_.x = 20; + _loc1_.y = 10; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(240,110); + bg1.addChild(_loc2_); + _loc2_.x = 20; + _loc2_.y = 30; + this.msgText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,240); + this.msgText.height = 100; + _loc2_.addChild(this.msgText); + this.msgText.wordWrap = true; + this.msgText.multiline = true; + this.msgText.textColor = 16777215; + this.msgText.x = 3; + this.msgText.y = 3; + this.msgText.mouseEnabled = true; + this.msgText.type = TextFieldType.INPUT; + this.okBtn = new UIButton("确 定",2,10); + bg1.addChild(this.okBtn); + this.okBtn.x = 66; + this.okBtn.y = 160; + this.okBtn.onClick = this.submit; + _loc3_ = new UIButton("取 消",2,10); + bg1.addChild(_loc3_); + _loc3_.x = this.okBtn.x + 100; + _loc3_.y = this.okBtn.y; + _loc3_.onClick = closeSelf; + ConnectService.getInstance().addEventListener(ChatMainEvent.Chat_userSendTitleMessage,this.sendMessSucc); + } + + public static function getInstance() : TitleInputMc + { + if(instance == null) + { + instance = new TitleInputMc(); + } + return instance; + } + + public function showSelf(param1:*) : void + { + param1.addChild(this); + x = int(param1.width / 2 - width / 2); + y = int(param1.height / 2 - height / 2); + } + + public function update(param1:int) : void + { + var _loc2_:String = null; + this.itemId = param1; + switch(this.itemId) + { + case 10379997: + case 10479997: + _loc2_ = "情人恋语"; + break; + case 10379994: + case 10479994: + _loc2_ = "情缘牵绊"; + break; + case 10379996: + case 10479996: + _loc2_ = "生日祝福"; + break; + case 10379993: + case 10479993: + _loc2_ = "笑言戏语"; + break; + case 10379995: + case 10479995: + _loc2_ = "言笑无忌"; + } + this.msgText.text = ""; + this.okBtn.setEnable(); + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.msgText.text); + if(_loc2_.length > 40) + { + MessageBoxUI.getInstance().addMessage("输入字符过长"); + return; + } + ConnectService.getInstance().chatService.userSendTitleMessage(_loc2_,this.itemId); + } + + private function sendMessSucc(param1:ChatMainEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/chat/mc/TitleMc.as b/flash_decompiled/com/view/ui/chat/mc/TitleMc.as new file mode 100644 index 0000000..b061809 --- /dev/null +++ b/flash_decompiled/com/view/ui/chat/mc/TitleMc.as @@ -0,0 +1,197 @@ +package com.view.ui.chat.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.ui.chat.UserControl; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.getTimer; + + public class TitleMc extends Sprite + { + + public var face:InstallFace = InstallFace.getInstance(); + + public var titleMc:MovieClip; + + public var data:SpeakerData; + + public var playTime:int; + + public var beginTime:int; + + public var userNameText:TextField; + + public var msgText:TextField; + + public var head:Sprite; + + private var maskSp:Sprite; + + private var nameFormat:TextFormat; + + private var charFormat:TextFormat; + + public var overF:Function; + + private var moveMinX:int; + + public function TitleMc() + { + super(); + this.charFormat = new TextFormat(); + this.charFormat.size = 16; + this.nameFormat = new TextFormat(); + this.nameFormat.size = 16; + this.nameFormat.color = 16750848; + this.nameFormat.align = "right"; + } + + public function init(param1:SpeakerData) : void + { + this.data = param1; + switch(this.data.type) + { + case 10379993: + case 10479993: + this.titleMc = this.face.getMovieClip("LIB_UI_MC_laba_bishi"); + this.titleMc.x = -262; + this.titleMc.y = 0; + this.playTime = 22000; + break; + case 10379997: + case 10479997: + this.titleMc = this.face.getMovieClip("LIB_UI_MC_laba_qingrenjie"); + this.titleMc.x = -256; + this.titleMc.y = -2; + this.playTime = 22000; + break; + case 10379994: + case 10479994: + this.titleMc = this.face.getMovieClip("LIB_UI_MC_laba_qiubaoyang"); + this.titleMc.x = -255; + this.titleMc.y = 0; + this.playTime = 22000; + break; + case 10379996: + case 10479996: + this.titleMc = this.face.getMovieClip("LIB_UI_MC_laba_shengri"); + this.titleMc.x = -255; + this.titleMc.y = 0; + this.playTime = 22000; + break; + case 10379995: + case 10479995: + this.titleMc = this.face.getMovieClip("LIB_UI_MC_laba_tiaoxin"); + this.titleMc.x = -255; + this.titleMc.y = 0; + this.playTime = 22000; + break; + default: + if(this.data.type > 0 && this.data.type < 10) + { + this.titleMc = this.face.getMovieClip("LIB_CUNTRY_6"); + this.titleMc.x = -255; + this.titleMc.y = 20; + this.playTime = 22000; + } + } + addChild(this.titleMc); + this.installText(); + this.play(); + } + + public function installText() : void + { + this.userNameText = new TextField(); + this.userNameText.height = 24; + this.userNameText.width = 100; + this.userNameText.x = -230; + this.userNameText.y = -3 + this.titleMc.y; + this.userNameText.mouseEnabled = true; + addChild(this.userNameText); + this.userNameText.htmlText = this.data.userName; + this.userNameText.setTextFormat(this.nameFormat); + this.userNameText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.head = this.face.getSprite("LIB_UI_MC_face"); + addChild(this.head); + this.head.x = this.userNameText.x + this.userNameText.width - this.userNameText.textWidth - 22; + this.head.y = this.userNameText.y + 3; + this.msgText = PublicMethod.getTextField(16763904,400); + addChild(this.msgText); + this.msgText.height = 24; + this.msgText.x = this.userNameText.x + this.userNameText.width + 4; + this.msgText.y = this.userNameText.y; + this.msgText.defaultTextFormat = this.charFormat; + this.msgText.text = this.data.msg; + this.msgText.width = this.msgText.textWidth + 10; + this.maskSp = PublicMethod.createShape(16777215,400,24); + addChild(this.maskSp); + this.maskSp.x = this.msgText.x; + this.maskSp.y = this.msgText.y; + this.msgText.mask = this.maskSp; + if(this.msgText.textWidth > 400) + { + this.moveMinX = this.msgText.x - (this.msgText.textWidth - 400); + } + } + + public function play() : void + { + this.beginTime = getTimer(); + addEventListener(Event.ENTER_FRAME,this.enterFrame); + } + + public function enterFrame(param1:Event) : void + { + if(this.msgText.textWidth > 400 && getTimer() - this.beginTime > 8000) + { + if(this.msgText.x > this.moveMinX) + { + this.msgText.x -= 2; + } + } + if(getTimer() - this.beginTime > this.playTime) + { + this.clear(); + } + } + + public function clear() : void + { + removeEventListener(Event.ENTER_FRAME,this.enterFrame); + if(parent.contains(this)) + { + parent.removeChild(this); + } + removeChild(this.titleMc); + this.titleMc = null; + Utils.removeAll(this); + if(Boolean(this.overF)) + { + this.overF(); + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:Array = _loc2_.split(":"); + var _loc4_:String = _loc3_[0]; + var _loc5_:String = _loc3_[1]; + if(_loc5_ == NewUserData.getUser().userName) + { + return; + } + var _loc6_:UserControl = UserControl.getInstance(); + _loc6_.show(_loc5_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/CountryGovInfoUI.as b/flash_decompiled/com/view/ui/countrygov/CountryGovInfoUI.as new file mode 100644 index 0000000..6236c2b --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/CountryGovInfoUI.as @@ -0,0 +1,114 @@ +package com.view.ui.countrygov +{ + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.control.ConnectService; + import com.control.play.event.CountryEvent; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.countrygov.mc.GovItem; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class CountryGovInfoUI extends UIWindowBg + { + + private var bg:Sprite; + + private var itemVec:Vector.; + + private var tableMc:UITable; + + private var preBtn:MovieClip; + + private var btnArr:Array; + + public function CountryGovInfoUI() + { + var _loc1_:MovieClip = null; + var _loc8_:int = 0; + var _loc11_:GovItem = null; + super(); + initSize(150,344); + loadTitle(UITitleConfig.title_guojiajinyan); + addCloseBtn(); + initBg(); + this.btnArr = new Array(); + _loc1_ = face.getMovieClip(ClassConfig.ui_country); + var _loc2_:MovieClip = face.getMovieClip(ClassConfig.ui_country); + var _loc3_:MovieClip = face.getMovieClip(ClassConfig.ui_country); + var _loc4_:MovieClip = face.getMovieClip(ClassConfig.ui_country); + var _loc5_:MovieClip = face.getMovieClip(ClassConfig.ui_country); + var _loc6_:MovieClip = face.getMovieClip(ClassConfig.ui_country); + var _loc7_:MovieClip = face.getMovieClip(ClassConfig.ui_country); + _loc8_ = 1; + while(_loc8_ < 8) + { + _loc1_ = face.getMovieClip(ClassConfig.ui_country); + this.btnArr.push(_loc1_); + _loc1_.gotoAndStop(_loc8_); + bg1.addChild(_loc1_); + _loc1_.x = _loc8_ * 30; + _loc1_.y = 10; + _loc1_.addEventListener(MouseEvent.CLICK,this.clickCountry); + _loc1_.name = _loc8_ + ""; + _loc1_.buttonMode = true; + _loc8_++; + } + var _loc9_:Array = ["官职","君主","联盟"]; + var _loc10_:Array = [60,150,120]; + this.tableMc = new UITable(); + this.tableMc.install(11,_loc9_,_loc10_); + bg1.addChild(this.tableMc); + this.tableMc.x = 12; + this.tableMc.y = 58; + this.itemVec = new Vector.(); + _loc8_ = 0; + while(_loc8_ < 11) + { + _loc11_ = new GovItem(_loc8_); + this.itemVec.push(_loc11_); + _loc11_.y = 25 + _loc8_ * 25; + this.tableMc.addChild(_loc11_); + _loc8_++; + } + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_viewCountryGov,this.getDataResult); + this.btnArr[0].dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + + private function clickCountry(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(this.preBtn == _loc2_) + { + return; + } + if(this.preBtn) + { + this.preBtn.filters = null; + } + this.preBtn = _loc2_; + _loc2_.filters = [PublicGlow.getInstance().yellowGlow1]; + var _loc3_:int = int(this.preBtn.name); + ConnectService.getInstance().playService.viewCountryGov(_loc3_); + } + + public function getData() : void + { + } + + public function getDataResult(param1:CountryEvent) : void + { + var _loc2_:Object = param1.obj; + var _loc3_:int = 0; + while(_loc3_ < 11) + { + this.itemVec[_loc3_].setObj(_loc2_); + _loc3_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/CountryGovUI.as b/flash_decompiled/com/view/ui/countrygov/CountryGovUI.as new file mode 100644 index 0000000..d74fb92 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/CountryGovUI.as @@ -0,0 +1,158 @@ +package com.view.ui.countrygov +{ + import com.control.ConnectService; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class CountryGovUI extends BaseUI + { + + private var btnArr:Array; + + private var btn_1:UITabBtn; + + private var btn_2:UITabBtn; + + private var btn_3:UITabBtn; + + private var paneBg:UIWindowBg; + + private var preBtn:UITabBtn; + + private var prePage:CountryPage; + + private var page1:CountryPage1; + + private var page2:CountryPage2; + + private var page3:CountryPage3; + + public function CountryGovUI() + { + var _loc1_:int = 0; + var _loc2_:UITabBtn = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_guojia); + super.setPosition(); + this.btnArr = new Array(); + this.btn_1 = new UITabBtn("国家信息",2); + this.btn_2 = new UITabBtn("国家历史",2); + this.btn_3 = new UITabBtn("国家事件",2); + this.btnArr.push(this.btn_1); + this.btnArr.push(this.btn_2); + this.btnArr.push(this.btn_3); + for each(_loc2_ in this.btnArr) + { + addChild(_loc2_); + _loc2_.x = 25 + _loc1_ * 66; + _loc2_.y = 40; + _loc1_++; + } + this.btn_1.onClick = this.clickTab; + this.btn_2.onClick = this.clickTab; + this.btn_3.onClick = this.clickTab; + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + public function viewMoreEvent() : void + { + this.btn_3.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(_loc2_ == this.preBtn) + { + return; + } + if(this.preBtn) + { + this.preBtn.select = false; + } + this.preBtn = _loc2_; + this.preBtn.select = true; + if(this.prePage) + { + this.prePage.removeSelf(); + } + if(this.preBtn == this.btn_1) + { + this.prePage = this.getPage1(); + } + if(this.preBtn == this.btn_2) + { + this.prePage = this.getPage2(); + } + if(this.preBtn == this.btn_3) + { + this.prePage = this.getPage3(); + } + this.paneBg.addChild(this.prePage); + this.prePage.getDate(); + } + + private function getPage1() : CountryPage + { + if(this.page1 == null) + { + this.page1 = new CountryPage1(); + } + return this.page1; + } + + private function getPage2() : CountryPage2 + { + if(this.page2 == null) + { + this.page2 = new CountryPage2(); + } + return this.page2; + } + + private function getPage3() : CountryPage3 + { + if(this.page3 == null) + { + this.page3 = new CountryPage3(); + } + return this.page3; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(Boolean(this.prePage) && this.prePage == this.getPage1()) + { + this.enterCountryMain(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + } + + public function enterCountryMain() : void + { + ConnectService.getInstance().playService.entryMain(); + } + + override public function setPosition() : void + { + this.x = int(face.realWidth / 2 - 730 / 2); + this.y = int(face.realHeight / 2 - 500 / 2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/CountryNoticeUI.as b/flash_decompiled/com/view/ui/countrygov/CountryNoticeUI.as new file mode 100644 index 0000000..e7bd1b8 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/CountryNoticeUI.as @@ -0,0 +1,109 @@ +package com.view.ui.countrygov +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.CountryEvent; + 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.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFieldType; + + public class CountryNoticeUI extends UIWindowBg + { + + private var bg:Sprite; + + private var useTimes:TextField; + + private var okBtn:UIButton; + + private var msgText:TextField; + + public function CountryNoticeUI() + { + super(); + initSize(92,160); + loadTitle(UITitleConfig.title_guojunlaba); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,110); + _loc1_.text = "最多输入40字"; + bg1.addChild(_loc1_); + _loc1_.x = 20; + _loc1_.y = 15; + this.useTimes = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,120); + bg1.addChild(this.useTimes); + this.useTimes.x = 166; + this.useTimes.y = _loc1_.y; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(245,112); + bg1.addChild(_loc2_); + _loc2_.x = _loc1_.x; + _loc2_.y = _loc1_.y + 20; + this.msgText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,240); + this.msgText.height = 100; + _loc2_.addChild(this.msgText); + this.msgText.type = TextFieldType.INPUT; + this.msgText.mouseEnabled = true; + this.msgText.wordWrap = true; + this.msgText.multiline = true; + this.msgText.x = 4; + this.msgText.y = 4; + this.okBtn = new UIButton("确 定",2,10); + addChild(this.okBtn); + this.okBtn.x = 70; + this.okBtn.y = 200; + this.okBtn.onClick = this.submit; + var _loc3_:UIButton = new UIButton("取 消",2,10); + addChild(_loc3_); + _loc3_.x = this.okBtn.x + 100; + _loc3_.y = this.okBtn.y; + _loc3_.onClick = closeSelf; + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_getNoticeTimes,this.getDataResult); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_sendNotice,this.sendNoticeResult); + } + + public function getData() : void + { + ConnectService.getInstance().playService.getNoticeTimes(); + } + + public function getDataResult(param1:CountryEvent) : void + { + var _loc2_:int = int(param1.obj); + _loc2_ = 10 - _loc2_; + if(_loc2_ <= 0) + { + _loc2_ = 0; + } + this.useTimes.text = "剩余使用次数:" + _loc2_; + } + + private function sendNoticeResult(param1:CountryEvent) : void + { + closeSelf(null); + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.msgText.text); + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("请输入喇叭内容"); + return; + } + if(_loc2_.length > 40) + { + MessageBoxUI.getInstance().addMessage("输入字符过长"); + return; + } + ConnectService.getInstance().playService.sendNotice(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/CountryPage.as b/flash_decompiled/com/view/ui/countrygov/CountryPage.as new file mode 100644 index 0000000..a5f569e --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/CountryPage.as @@ -0,0 +1,26 @@ +package com.view.ui.countrygov +{ + import flash.display.Sprite; + + public class CountryPage extends Sprite + { + + public function CountryPage() + { + super(); + } + + public function removeSelf() : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function getDate() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/CountryPage1.as b/flash_decompiled/com/view/ui/countrygov/CountryPage1.as new file mode 100644 index 0000000..243ee45 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/CountryPage1.as @@ -0,0 +1,436 @@ +package com.view.ui.countrygov +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.CountryEvent; + 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.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.countrygov.mc.*; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFieldType; + + public class CountryPage1 extends CountryPage + { + + private var kingMc:KingMc; + + private var jiangjunMc:JiangJunMc; + + private var duweiMc:DuweiMc; + + private var simaMc:SimaMc; + + private var scrollPane:ScrollPane; + + private var paneBg1:UIWindowBg; + + private var paneBg2:UIWindowBg; + + private var paneBg3:UIWindowBg; + + private var _scrollEvent:ScrollEvent; + + private var manageBtn1:UIButton; + + private var manageBtn2:UIButton; + + private var manageBtn3:UIButton; + + private var manageBtn4:UIButton; + + private var manageBtn5:UIButton; + + private var manageBtn6:UIButton; + + private var manageBtn7:UIButton; + + private var countryNotice:TextField; + + private var editBtn:Button_9; + + private var forBidUserUI:ForBidUserUI; + + private var setGovUI:SetGovUI; + + private var noticeUI:CountryNoticeUI; + + private var countryGovInfoUI:CountryGovInfoUI; + + private var quitKingUI:QuitKingUI; + + public function CountryPage1() + { + var _loc4_:Sprite = null; + var _loc5_:Button_9 = null; + super(); + this.paneBg1 = new UIWindowBg(); + this.paneBg1.initThirdPanel(330,334); + addChild(this.paneBg1); + this.paneBg1.x = 4; + this.paneBg1.y = 4; + var _loc1_:UITitleBg = new UITitleBg("国家官职",340); + this.paneBg1.addChild(_loc1_); + _loc1_.x = int(this.paneBg1.width / 2 - _loc1_.width / 2); + this.paneBg2 = new UIWindowBg(); + this.paneBg2.initThirdPanel(278,334); + addChild(this.paneBg2); + this.paneBg2.x = this.paneBg1.x + this.paneBg1.width + 4; + this.paneBg2.y = 4; + this.paneBg3 = new UIWindowBg(); + this.paneBg3.initThirdPanel(268 + 354,16); + addChild(this.paneBg3); + this.paneBg3.x = 4; + this.paneBg3.y = this.paneBg1.y + this.paneBg1.height + 4; + var _loc2_:UITitleBg = new UITitleBg("国家公告",286); + this.paneBg2.addChild(_loc2_); + _loc2_.x = int(this.paneBg2.width / 2 - _loc2_.width / 2); + var _loc3_:UITitleBg = new UITitleBg("国家管理",286); + this.paneBg2.addChild(_loc3_); + _loc3_.x = int(this.paneBg2.width / 2 - _loc3_.width / 2); + _loc3_.y = 210; + _loc4_ = new Sprite(); + _loc5_ = new Button_9("官职任免规则"); + _loc4_.addChild(_loc5_); + _loc5_.x = 2; + _loc5_.y = 2; + _loc5_.setFiller(); + var _loc6_:String = "国君任免规则
国君(1名)
占领国度的联盟盟主可称为国君,有权任免一切官职
"; + _loc6_ = _loc6_ + "大将军(1名)
由国君直接任命,有权任命都尉、司马
"; + _loc6_ = _loc6_ + "都尉(3名)
由国君或大将军任命,有权任命司马
"; + _loc6_ = _loc6_ + "司马(6名)
由国君或大将军或都尉任命
"; + _loc6_ = _loc6_ + "国君禅让每天只能执行一次
"; + _loc6_ = _loc6_ + "每日可任命官职10次,次数每日凌晨30分刷新
"; + ToolTipManager.getInstance().setToolTip(_loc5_,new TxtTooltip(_loc6_),false,-1,false); + this.kingMc = new KingMc(); + _loc4_.addChild(this.kingMc); + this.kingMc.x = 165; + this.kingMc.y = 15; + this.kingMc.setKingName(""); + this.jiangjunMc = new JiangJunMc(); + _loc4_.addChild(this.jiangjunMc); + this.jiangjunMc.x = 165; + this.jiangjunMc.y = 105; + this.jiangjunMc.setKingName(""); + this.duweiMc = new DuweiMc(); + _loc4_.addChild(this.duweiMc); + this.duweiMc.x = 165; + this.duweiMc.y = 200; + this.simaMc = new SimaMc(); + _loc4_.addChild(this.simaMc); + this.simaMc.x = 165; + this.simaMc.y = 300; + var _loc7_:TextField = PublicMethod.getTextField(16777215,10); + _loc4_.addChild(_loc7_); + _loc7_.y = 434; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(329,316); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.paneBg1.addChild(this.scrollPane); + this.scrollPane.x = 10; + this.scrollPane.y = 25; + this.scrollPane.source = _loc4_; + this.scrollPane.update(); + this.countryNotice = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,277); + this.countryNotice.height = 138; + this.countryNotice.wordWrap = true; + this.countryNotice.multiline = true; + this.paneBg2.addChild(this.countryNotice); + this.countryNotice.x = 5; + this.countryNotice.y = 28; + this.editBtn = new Button_9("保存"); + this.paneBg2.addChild(this.editBtn); + this.editBtn.x = 244; + this.editBtn.y = 182; + this.editBtn.setFiller(); + this.editBtn.addEventListener(MouseEvent.CLICK,this.editNotice); + this.editBtn.buttonMode = true; + this.manageBtn1 = new UIButton("国家禁言",2); + this.paneBg2.addChild(this.manageBtn1); + this.manageBtn1.x = 13; + this.manageBtn1.y = 260; + this.manageBtn1.onClick = this.openForBidUI; + this.manageBtn2 = new UIButton("人事任免",2); + this.paneBg2.addChild(this.manageBtn2); + this.manageBtn2.x = 110; + this.manageBtn2.y = this.manageBtn1.y; + this.manageBtn2.onClick = this.openGovUI; + this.manageBtn3 = new UIButton("国君喇叭",2); + this.paneBg2.addChild(this.manageBtn3); + this.manageBtn3.x = 205; + this.manageBtn3.y = this.manageBtn1.y; + this.manageBtn3.onClick = this.openNoticeUI; + this.manageBtn4 = new UIButton("国家外交",2); + this.manageBtn4.x = 15; + this.manageBtn4.y = 60; + this.manageBtn5 = new UIButton("官职卸任",2); + this.paneBg2.addChild(this.manageBtn5); + this.manageBtn5.x = this.manageBtn1.x; + this.manageBtn5.y = this.manageBtn1.y + 35; + this.manageBtn5.onClick = this.quitGov; + this.manageBtn6 = new UIButton("国君禅让",2); + this.paneBg2.addChild(this.manageBtn6); + this.manageBtn6.x = 110; + this.manageBtn6.y = this.manageBtn5.y; + this.manageBtn6.onClick = this.openQuitKingUI; + this.manageBtn7 = new UIButton("官职信息",2); + this.paneBg2.addChild(this.manageBtn7); + this.manageBtn7.x = 205; + this.manageBtn7.y = this.manageBtn5.y; + this.manageBtn7.onClick = this.openCountryGovUI; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(15715767,50); + _loc8_.text = "国家事件"; + this.paneBg3.addChild(_loc8_); + _loc8_.x = 10; + _loc8_.y = 6; + this._scrollEvent = new ScrollEvent(); + this._scrollEvent.x = 65; + this._scrollEvent.y = 4; + this.paneBg3.addChild(this._scrollEvent); + var _loc9_:Button_9 = new Button_9("查看更多"); + this.paneBg3.addChild(_loc9_); + _loc9_.buttonMode = true; + _loc9_.x = 575; + _loc9_.y = 6; + _loc9_.addEventListener(MouseEvent.CLICK,this.viewMore); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_entryMain,this.getDataResult); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_govSet,this.govSetResult); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_govDelSet,this.delGovSetResult); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_quitKingGov,this.quitKingGovResult); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_quitGov,this.quitGovResult); + this.initBtnStatus(NewUserData.getUser().govId); + } + + private function viewMore(param1:MouseEvent) : void + { + var _loc2_:CountryGovUI = parent.parent as CountryGovUI; + _loc2_.viewMoreEvent(); + } + + private function openForBidUI(param1:MouseEvent) : void + { + if(this.forBidUserUI == null) + { + this.forBidUserUI = new ForBidUserUI(); + this.forBidUserUI.x = int(663 / 2 - this.forBidUserUI.width / 2); + this.forBidUserUI.y = int(459 / 2 - this.forBidUserUI.height / 2) - 50; + } + addChild(this.forBidUserUI); + this.forBidUserUI.getData(); + } + + private function getDataResult(param1:CountryEvent) : void + { + var _loc7_:* = undefined; + var _loc2_:Object = param1.obj; + var _loc3_:Object = _loc2_.countrygov; + if(_loc3_.kingName) + { + this.kingMc.setKingName(_loc3_.kingName); + } + else + { + this.kingMc.setKingName(null); + } + if(_loc3_.generalName) + { + this.jiangjunMc.setKingName(_loc3_.generalName); + } + else + { + this.jiangjunMc.setKingName(null); + } + this.duweiMc.setName(_loc3_); + this.simaMc.setName(_loc3_); + if(_loc3_.notice) + { + this.countryNotice.htmlText = _loc3_.notice; + } + else + { + this.countryNotice.htmlText = ""; + } + if(_loc2_.dropItem1) + { + this.kingMc.setDropItem(_loc2_.dropItem1); + this.jiangjunMc.setDropItem(_loc2_.dropItem2); + this.duweiMc.setDropItem(_loc2_.dropItem3); + this.simaMc.setDropItem(_loc2_.dropItem4); + } + var _loc4_:int = int(_loc2_.govId); + this.initBtnStatus(_loc4_); + var _loc5_:String = ""; + var _loc6_:Array = _loc2_.eventList; + if(_loc6_ != null && _loc6_.length > 0) + { + for(_loc7_ in _loc6_) + { + if(_loc7_ > 0) + { + _loc5_ = _loc5_ + " " + (_loc7_ + 1) + "、" + _loc6_[_loc7_].eventmsg; + } + else + { + _loc5_ = "" + (_loc7_ + 1) + "、" + _loc6_[_loc7_].eventmsg; + } + } + this._scrollEvent.setinfo(_loc5_); + } + } + + private function initBtnStatus(param1:int) : void + { + this.countryNotice.type = TextFieldType.DYNAMIC; + this.editBtn.visible = false; + this.manageBtn2.setUnEnable(); + this.manageBtn3.setUnEnable(); + this.manageBtn5.setUnEnable(); + this.manageBtn6.setUnEnable(); + switch(param1) + { + case 1: + this.countryNotice.type = TextFieldType.INPUT; + this.countryNotice.mouseEnabled = true; + this.editBtn.visible = true; + this.manageBtn6.setEnable(); + this.manageBtn2.setEnable(); + this.manageBtn3.setEnable(); + break; + case 2: + this.manageBtn2.setEnable(); + this.manageBtn5.setEnable(); + break; + case 3: + this.manageBtn2.setEnable(); + this.manageBtn5.setEnable(); + break; + case 4: + this.manageBtn5.setEnable(); + } + } + + private function openGovUI(param1:MouseEvent) : void + { + if(this.setGovUI == null) + { + this.setGovUI = new SetGovUI(); + this.setGovUI.x = int(636 / 2 - this.setGovUI.width / 2); + this.setGovUI.y = int(380 / 2 - this.setGovUI.height / 2); + } + addChild(this.setGovUI); + this.setGovUI.getData(); + } + + private function govSetResult(param1:CountryEvent) : void + { + MessageBoxUI.getInstance().addMessage("任免官职成功"); + ConnectService.getInstance().playService.entryMain(); + } + + private function delGovSetResult(param1:CountryEvent) : void + { + MessageBoxUI.getInstance().addMessage("罢免官职成功"); + ConnectService.getInstance().playService.entryMain(); + } + + private function openNoticeUI(param1:MouseEvent) : void + { + if(this.noticeUI == null) + { + this.noticeUI = new CountryNoticeUI(); + this.noticeUI.x = int(636 / 2 - this.noticeUI.width / 2); + this.noticeUI.y = int(380 / 2 - this.noticeUI.height / 2); + } + if(!contains(this.noticeUI)) + { + addChild(this.noticeUI); + this.noticeUI.getData(); + } + } + + private function openCountryGovUI(param1:MouseEvent) : void + { + if(this.countryGovInfoUI == null) + { + this.countryGovInfoUI = new CountryGovInfoUI(); + this.countryGovInfoUI.x = int(636 / 2 - this.countryGovInfoUI.width / 2); + this.countryGovInfoUI.y = int(380 / 2 - this.countryGovInfoUI.height / 2 - 20); + } + if(!contains(this.countryGovInfoUI)) + { + addChild(this.countryGovInfoUI); + this.countryGovInfoUI.getData(); + } + } + + private function openQuitKingUI(param1:MouseEvent) : void + { + if(this.quitKingUI == null) + { + this.quitKingUI = new QuitKingUI(); + this.quitKingUI.x = int(636 / 2 - this.quitKingUI.width / 2); + this.quitKingUI.y = int(380 / 2 - this.quitKingUI.height / 2); + } + if(!contains(this.quitKingUI)) + { + addChild(this.quitKingUI); + } + } + + private function quitGov(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确认要卸任官职吗",this.confirmQuitGov); + } + + private function confirmQuitGov() : void + { + ConnectService.getInstance().playService.quitGov(); + } + + private function quitGovResult(param1:CountryEvent) : void + { + MessageBoxUI.getInstance().addMessage("官职卸任成功"); + ConnectService.getInstance().playService.entryMain(); + } + + override public function removeSelf() : void + { + super.removeSelf(); + this._scrollEvent.run = false; + } + + override public function getDate() : void + { + super.getDate(); + this._scrollEvent.run = true; + } + + private function editNotice(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确认修改国家公告吗?",this.configEditNotice); + } + + private function configEditNotice() : void + { + var _loc1_:String = this.countryNotice.htmlText; + ConnectService.getInstance().playService.editAnnounce(_loc1_); + } + + private function quitKingGovResult(param1:CountryEvent) : void + { + MessageBoxUI.getInstance().addMessage("禅让君主成功"); + ConnectService.getInstance().playService.entryMain(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/CountryPage2.as b/flash_decompiled/com/view/ui/countrygov/CountryPage2.as new file mode 100644 index 0000000..a65220c --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/CountryPage2.as @@ -0,0 +1,116 @@ +package com.view.ui.countrygov +{ + import com.control.ConnectService; + import com.control.play.event.CountryEvent; + import com.view.newui.UITable; + import com.view.ui.countrygov.mc.CountrylogItem; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class CountryPage2 extends CountryPage + { + + private var tableMc:UITable; + + private var scrollPane:ScrollPane; + + private var itemBg:Sprite; + + private var itemVec:Vector.; + + public function CountryPage2() + { + var _loc2_:Array = null; + var _loc4_:CountrylogItem = null; + super(); + var _loc1_:Array = ["任期","国君","联盟名称","上任时间","退位时间","原因","在位时间"]; + _loc2_ = [85,120,100,80,80,80,90]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(14,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(631,350); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.x = 1; + this.scrollPane.y = 25; + this.itemBg = new Sprite(); + this.itemVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 14) + { + _loc4_ = new CountrylogItem(); + this.itemVec.push(_loc4_); + _loc4_.y = _loc3_ * 25; + this.itemBg.addChild(_loc4_); + _loc3_++; + } + this.scrollPane.source = this.itemBg; + this.scrollPane.update(); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_logList,this.getDateResult); + } + + override public function getDate() : void + { + ConnectService.getInstance().playService.getCountryLogList(); + } + + private function getDateResult(param1:CountryEvent) : void + { + var _loc3_:int = 0; + var _loc4_:* = undefined; + var _loc5_:CountrylogItem = null; + var _loc2_:Array = param1.list; + this.clear(); + if(_loc2_ != null && _loc2_.length > 0) + { + _loc3_ = 0; + for(_loc4_ in _loc2_) + { + if(_loc2_[_loc4_].downtype == 0) + { + continue; + } + if(_loc3_ > 13) + { + _loc5_ = new CountrylogItem(); + this.itemBg.addChild(_loc5_); + this.itemVec.push(_loc5_); + _loc5_.y = 25 * _loc3_; + _loc5_.setDate(_loc2_[_loc4_]); + } + else + { + this.itemVec[_loc3_].setDate(_loc2_[_loc4_]); + } + _loc3_++; + } + } + this.scrollPane.verticalScrollPosition = 0; + this.scrollPane.update(); + } + + private function clear() : void + { + var _loc1_:* = int(this.itemVec.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 13) + { + this.itemBg.removeChild(this.itemVec[_loc1_]); + this.itemVec.splice(_loc1_,1); + } + else + { + this.itemVec[_loc1_].setDate(null); + } + _loc1_--; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/CountryPage3.as b/flash_decompiled/com/view/ui/countrygov/CountryPage3.as new file mode 100644 index 0000000..d5c7772 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/CountryPage3.as @@ -0,0 +1,119 @@ +package com.view.ui.countrygov +{ + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.CountryEvent; + import com.view.newui.UITable; + import com.view.ui.countrygov.mc.EventMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.text.TextField; + + public class CountryPage3 extends CountryPage + { + + private var tableMc:UITable; + + private var scrollPane:ScrollPane; + + private var itemBg:Sprite; + + private var itemVec:Vector.; + + public function CountryPage3() + { + var _loc2_:Array = null; + var _loc4_:TextField = null; + var _loc5_:EventMc = null; + super(); + var _loc1_:Array = ["序号","国家事件","发生时间"]; + _loc2_ = [40,490,106]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(14,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(631,350); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.x = 1; + this.scrollPane.y = 25; + this.itemBg = new Sprite(); + this.itemVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 14) + { + _loc5_ = new EventMc(); + this.itemVec.push(_loc5_); + _loc5_.y = _loc3_ * 25; + this.itemBg.addChild(_loc5_); + _loc3_++; + } + this.scrollPane.source = this.itemBg; + this.scrollPane.update(); + _loc4_ = PublicMethod.getTextField(65280,190); + _loc4_.text = "记录最近发生的24条国家事件"; + _loc4_.filters = [PublicGlow.getInstance().blackGlow]; + addChild(_loc4_); + _loc4_.x = 450; + _loc4_.y = -22; + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_getEventList,this.getEventListResult); + } + + override public function getDate() : void + { + ConnectService.getInstance().playService.getEventList(); + } + + private function clear() : void + { + var _loc1_:* = int(this.itemVec.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 13) + { + this.itemBg.removeChild(this.itemVec[_loc1_]); + this.itemVec.splice(_loc1_,1); + } + else + { + this.itemVec[_loc1_].setDate(null); + } + _loc1_--; + } + } + + private function getEventListResult(param1:CountryEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:EventMc = null; + var _loc2_:Array = param1.list; + this.clear(); + if(_loc2_ != null && _loc2_.length > 0) + { + for(_loc3_ in _loc2_) + { + if(_loc3_ > 13) + { + _loc4_ = new EventMc(); + this.itemBg.addChild(_loc4_); + this.itemVec.push(_loc4_); + _loc4_.y = 25 * _loc3_; + _loc4_.setDate(_loc2_[_loc3_],_loc3_); + } + else + { + this.itemVec[_loc3_].setDate(_loc2_[_loc3_],_loc3_); + } + } + } + this.scrollPane.verticalScrollPosition = 0; + this.scrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/ForBidUserUI.as b/flash_decompiled/com/view/ui/countrygov/ForBidUserUI.as new file mode 100644 index 0000000..ee715c7 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/ForBidUserUI.as @@ -0,0 +1,203 @@ +package com.view.ui.countrygov +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.CountryEvent; + 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.UIInputText; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.countrygov.mc.ForbidMc; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ForBidUserUI extends UIWindowBg + { + + private var bg:Sprite; + + private var tableMc:UITable; + + private var scrollPane:ScrollPane; + + private var itemBg:Sprite; + + private var itemVec:Vector.; + + private var timesText:TextField; + + private var userInput:UIInputText; + + private var addForbidBtn:UIButton; + + private var titleT:TextField; + + public function ForBidUserUI() + { + var _loc2_:Array = null; + var _loc6_:ForbidMc = null; + super(); + initSize(240,230); + loadTitle(UITitleConfig.title_guojiajinyan); + addCloseBtn(); + initBg(); + var _loc1_:Array = ["序号","君主","联盟","等级","剩余禁言时间","操作"]; + _loc2_ = [35,100,95,45,85,75]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(8,_loc1_,_loc2_); + bg1.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + var _loc3_:Button_9 = new Button_9("禁言规则"); + bg1.addChild(_loc3_); + _loc3_.x = 5; + _loc3_.y = 236; + var _loc4_:String = "禁言规则
国君有权禁止本国任意国民在各聊天频道发言,持续时间2小时,每天最多可使用10次
"; + _loc4_ = _loc4_ + "国君亦可随时解除对某国民的禁言处罚"; + ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip(_loc4_),false,-1,false); + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(430,200); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.x = 1; + this.scrollPane.y = 25; + this.itemBg = new Sprite(); + this.itemVec = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 8) + { + _loc6_ = new ForbidMc(); + this.itemVec.push(_loc6_); + _loc6_.y = _loc5_ * 25; + _loc6_.x = 4; + this.itemBg.addChild(_loc6_); + _loc5_++; + } + this.scrollPane.source = this.itemBg; + this.scrollPane.update(); + this.timesText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110); + bg1.addChild(this.timesText); + this.timesText.x = 95; + this.timesText.y = _loc3_.y; + this.timesText.text = "可禁言次数:5/5"; + this.titleT = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + bg1.addChild(this.titleT); + this.titleT.x = 215; + this.titleT.y = _loc3_.y; + this.titleT.text = "君主名称:"; + this.userInput = new UIInputText(90); + bg1.addChild(this.userInput); + this.userInput.x = this.titleT.x + this.titleT.width; + this.userInput.y = _loc3_.y - 3; + this.userInput.setTextInput(true); + this.userInput.setMaxChars(20); + this.addForbidBtn = new UIButton("添加禁言",2); + bg1.addChild(this.addForbidBtn); + this.addForbidBtn.x = this.userInput.x + this.userInput.width + 2; + this.addForbidBtn.y = this.userInput.y; + this.addForbidBtn.onClick = this.addForbidUser; + this.initForbid(0); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_getForbidList,this.getDataResult); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_forbidUser,this.getDataResult); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_cancelforbidUser,this.getDataResult); + } + + public function getData() : void + { + ConnectService.getInstance().playService.getForbidList(); + } + + private function getDataResult(param1:CountryEvent) : void + { + var _loc2_:Array = null; + var _loc3_:* = undefined; + var _loc4_:ForbidMc = null; + _loc2_ = param1.obj.userlist; + this.clear(); + if(_loc2_ != null && _loc2_.length > 0) + { + for(_loc3_ in _loc2_) + { + if(_loc3_ > 7) + { + _loc4_ = new ForbidMc(); + this.itemBg.addChild(_loc4_); + this.itemVec.push(_loc4_); + _loc4_.y = _loc3_ * 25; + _loc4_.x = 4; + _loc4_.setDate(_loc2_[_loc3_],_loc3_); + } + else + { + this.itemVec[_loc3_].setDate(_loc2_[_loc3_],_loc3_); + } + } + } + this.scrollPane.verticalScrollPosition = 0; + this.scrollPane.update(); + this.initForbid(param1.obj.times); + } + + private function initForbid(param1:int) : void + { + this.timesText.htmlText = "可禁言次数:" + param1 + "/5"; + if(NewUserData.getUser().govId == 1) + { + this.timesText.visible = true; + this.userInput.visible = true; + this.addForbidBtn.visible = true; + this.titleT.visible = true; + } + else + { + this.timesText.visible = false; + this.userInput.visible = false; + this.addForbidBtn.visible = false; + this.titleT.visible = false; + } + } + + private function clear() : void + { + var _loc1_:* = int(this.itemVec.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 7) + { + this.itemBg.removeChild(this.itemVec[_loc1_]); + this.itemVec.splice(_loc1_,1); + } + else + { + this.itemVec[_loc1_].setDate(null); + } + _loc1_--; + } + } + + private function addForbidUser(param1:MouseEvent) : void + { + var _loc2_:String = this.userInput.getText(); + _loc2_ = Utils.trim(_loc2_); + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("请输入君主名称"); + return; + } + ConnectService.getInstance().playService.forbidUser(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/QuitKingUI.as b/flash_decompiled/com/view/ui/countrygov/QuitKingUI.as new file mode 100644 index 0000000..e8ed425 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/QuitKingUI.as @@ -0,0 +1,88 @@ +package com.view.ui.countrygov +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.CountryEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class QuitKingUI extends UIWindowBg + { + + private var bg:Sprite; + + private var userInput:UIInputText; + + public function QuitKingUI() + { + var _loc5_:TextField = null; + super(); + initSize(120,115); + loadTitle(UITitleConfig.title_guojunshanrang); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + bg1.addChild(_loc1_); + _loc1_.x = 20; + _loc1_.y = 20; + bg1.addChild(_loc2_); + _loc2_.x = _loc1_.x; + _loc2_.y = _loc1_.y + 20; + bg1.addChild(_loc3_); + _loc3_.x = _loc1_.x; + _loc3_.y = _loc2_.y + 20; + bg1.addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = _loc3_.y + 20; + _loc1_.text = "1、禅让国君时,盟主也一并被禅让"; + _loc2_.text = "2、只能把国君禅让给本联盟成员"; + _loc3_.text = "3、禅让成功后,国君变为该联盟普通成员"; + _loc4_.text = "4、每天只能禅让一次,禅让即时生效"; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,115); + bg1.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = 106; + _loc5_.text = "请输入新国君名称:"; + this.userInput = new UIInputText(90); + this.userInput.setTextInput(true); + this.userInput.setMaxChars(20); + bg1.addChild(this.userInput); + this.userInput.x = 125; + this.userInput.y = _loc5_.y - 3; + var _loc6_:UIButton = new UIButton("确 定",2,10); + bg1.addChild(_loc6_); + _loc6_.x = 220; + _loc6_.y = 104; + _loc6_.onClick = this.quitKingGov; + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_quitKingGov,this.quitKingGovResult); + } + + private function quitKingGov(param1:MouseEvent) : void + { + var _loc2_:String = Utils.trim(this.userInput.getText()); + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("请输入新国君名称"); + return; + } + ConnectService.getInstance().playService.quitKingGov(_loc2_); + } + + private function quitKingGovResult(param1:CountryEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/SetGovUI.as b/flash_decompiled/com/view/ui/countrygov/SetGovUI.as new file mode 100644 index 0000000..5853ddf --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/SetGovUI.as @@ -0,0 +1,266 @@ +package com.view.ui.countrygov +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.CountryEvent; + 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.UIInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import fl.controls.ComboBox; + import fl.data.DataProvider; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SetGovUI extends UIWindowBg + { + + private var bg:Sprite; + + private var combox:ComboBox; + + private var tft:TextFormat; + + private var userInput:UIInputText; + + private var govInfoText:TextField; + + private var currTimes:TextField; + + public function SetGovUI() + { + var _loc5_:UIButton = null; + super(); + initSize(240,105); + loadTitle(UITitleConfig.title_renshirenmian); + addCloseBtn(); + initBg(); + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.text = "君主名称:"; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "官职名称:"; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc3_.text = "操作:"; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + _loc4_.text = "当前官职信息"; + bg1.addChild(_loc1_); + _loc1_.x = 33; + _loc1_.y = 25; + bg1.addChild(_loc2_); + _loc2_.x = 144; + _loc2_.y = _loc1_.y; + bg1.addChild(_loc3_); + _loc3_.x = 255; + _loc3_.y = _loc1_.y; + bg1.addChild(_loc4_); + _loc4_.x = 323; + _loc4_.y = _loc1_.y; + this.userInput = new UIInputText(90); + this.userInput.setTextInput(true); + this.userInput.setMaxChars(20); + bg1.addChild(this.userInput); + this.userInput.x = 20; + this.userInput.y = 55; + this.combox = new ComboBox(); + bg1.addChild(this.combox); + this.combox.textField.setStyle("textFormat",this.tft); + this.combox.dropdown.setRendererStyle("textFormat",this.tft); + this.combox.x = 125; + this.combox.y = this.userInput.y; + _loc5_ = new UIButton("确 定",2,10); + bg1.addChild(_loc5_); + _loc5_.x = 245; + _loc5_.y = this.userInput.y; + _loc5_.onClick = this.govSet; + this.govInfoText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + this.govInfoText.wordWrap = true; + this.govInfoText.multiline = true; + this.govInfoText.height = 70; + bg1.addChild(this.govInfoText); + this.govInfoText.x = 328; + var _loc6_:TextFormat = new TextFormat(); + _loc6_.leading = 4; + this.govInfoText.y = this.userInput.y; + this.govInfoText.defaultTextFormat = _loc6_; + var _loc7_:Button_9 = new Button_9("官职任免规则"); + bg1.addChild(_loc7_); + _loc7_.x = 18; + _loc7_.y = 106; + _loc7_.setFiller(); + var _loc8_:String = "国君任免规则
国君(1名)
占领国度的联盟盟主可称为国君,有权任免一切官职
"; + _loc8_ = _loc8_ + "大将军(1名)
由国君直接任命,有权任命都尉、司马
"; + _loc8_ = _loc8_ + "都尉(3名)
由国君或大将军任命,有权任命司马
"; + _loc8_ = _loc8_ + "司马(6名)
由国君或大将军或都尉任命
"; + _loc8_ = _loc8_ + "国君禅让每天只能执行一次
"; + _loc8_ = _loc8_ + "每日可任命官职10次,次数每日凌晨30分刷新
"; + ToolTipManager.getInstance().setToolTip(_loc7_,new TxtTooltip(_loc8_),false,-1,false); + this.currTimes = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,131); + bg1.addChild(this.currTimes); + this.currTimes.x = 118; + this.currTimes.y = _loc7_.y; + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_enterGovSet,this.getDataResult); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_govSet,this.govSetResult); + ConnectService.getInstance().addEventListener(CountryEvent.COUNTRY_govDelSet,this.govSetResult); + } + + public function getData() : void + { + ConnectService.getInstance().playService.entryGovSet(); + } + + public function getDataResult(param1:CountryEvent) : void + { + var _loc2_:Object = param1.obj.govInfo; + this.currTimes.htmlText = "今日可任命次数:" + param1.obj.govtime + "/15"; + var _loc3_:int = int(param1.obj.currGovId); + var _loc4_:int = 0; + if(_loc2_.king > 0) + { + _loc4_ = 1; + } + var _loc5_:int = 0; + if(_loc2_.general > 0) + { + _loc5_ = 1; + } + var _loc6_:int = 0; + if(_loc2_.duwei1 > 0) + { + _loc6_ += 1; + } + if(_loc2_.duwei2 > 0) + { + _loc6_ += 1; + } + if(_loc2_.duwei3 > 0) + { + _loc6_ += 1; + } + var _loc7_:int = 0; + if(_loc2_.sima1 > 0) + { + _loc7_ += 1; + } + if(_loc2_.sima2 > 0) + { + _loc7_ += 1; + } + if(_loc2_.sima3 > 0) + { + _loc7_ += 1; + } + if(_loc2_.sima4 > 0) + { + _loc7_ += 1; + } + if(_loc2_.sima5 > 0) + { + _loc7_ += 1; + } + if(_loc2_.sima6 > 0) + { + _loc7_ += 1; + } + var _loc8_:String = "国 君:" + _loc4_ + "/1
"; + _loc8_ = _loc8_ + "大将军:" + _loc5_ + "/1
"; + _loc8_ = _loc8_ + "都 尉:" + _loc6_ + "/3
"; + _loc8_ = _loc8_ + "司 马:" + _loc7_ + "/6"; + this.govInfoText.htmlText = _loc8_; + var _loc9_:DataProvider = new DataProvider(); + var _loc10_:Object = { + "label":"请选择官职", + "data":0 + }; + _loc9_.addItem(_loc10_); + if(_loc3_ == 1) + { + _loc9_.addItem({ + "label":"无", + "data":1 + }); + _loc9_.addItem({ + "label":"大将军", + "data":2 + }); + _loc9_.addItem({ + "label":"都尉", + "data":3 + }); + _loc9_.addItem({ + "label":"司马", + "data":4 + }); + } + if(_loc3_ == 2) + { + _loc9_.addItem({ + "label":"无", + "data":1 + }); + _loc9_.addItem({ + "label":"都尉", + "data":3 + }); + _loc9_.addItem({ + "label":"司马", + "data":4 + }); + } + if(_loc3_ == 3) + { + _loc9_.addItem({ + "label":"无", + "data":1 + }); + _loc9_.addItem({ + "label":"司马", + "data":4 + }); + } + this.combox.dataProvider = _loc9_; + this.combox.selectedItem = _loc10_; + this.combox.textField.setStyle("textFormat",this.tft); + } + + private function govSet(param1:MouseEvent) : void + { + var _loc2_:String = Utils.trim(this.userInput.getText()); + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("请输入君主账号"); + return; + } + var _loc3_:int = int(this.combox.selectedItem.data); + if(_loc3_ == 0) + { + MessageBoxUI.getInstance().addMessage("请选择任免官职名称"); + return; + } + if(_loc3_ == 1) + { + ConnectService.getInstance().playService.delGovSet(_loc2_); + return; + } + ConnectService.getInstance().playService.govSet(_loc2_,_loc3_); + } + + private function govSetResult(param1:CountryEvent) : void + { + this.userInput.setText(""); + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/mc/CountrylogItem.as b/flash_decompiled/com/view/ui/countrygov/mc/CountrylogItem.as new file mode 100644 index 0000000..f1cfc01 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/mc/CountrylogItem.as @@ -0,0 +1,143 @@ +package com.view.ui.countrygov.mc +{ + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + + public class CountrylogItem extends Sprite + { + + private var bg1:Sprite; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var label6:TextField; + + private var label7:TextField; + + private var bg:Sprite; + + private var obj:Object; + + public function CountrylogItem() + { + super(); + this.bg1 = PublicMethod.getTrLine(620); + addChild(this.bg1); + this.bg1.x = 5; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,620,24); + this.bg.alpha = 0.2; + addChild(this.bg); + this.bg.visible = false; + this.bg.x = 5; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.label1 = PublicMethod.getTextFieldWithFillter(16764006,85); + addChild(this.label1); + this.label1.y = 4; + this.label2 = PublicMethod.getTextFieldWithFillter(65535,120); + addChild(this.label2); + this.label2.x = this.label1.x + this.label1.width; + this.label2.y = this.label1.y; + this.label3 = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(this.label3); + this.label3.x = this.label2.x + this.label2.width; + this.label3.y = this.label1.y; + this.label4 = PublicMethod.getTextFieldWithFillter(16777215,80); + addChild(this.label4); + this.label4.x = this.label3.x + this.label3.width; + this.label4.y = this.label1.y; + this.label5 = PublicMethod.getTextFieldWithFillter(16777215,80); + addChild(this.label5); + this.label5.x = this.label4.x + this.label4.width; + this.label5.y = this.label1.y; + this.label6 = PublicMethod.getTextFieldWithFillter(16711680,80); + addChild(this.label6); + this.label6.x = this.label5.x + this.label5.width; + this.label6.y = this.label1.y; + this.label7 = PublicMethod.getTextFieldWithFillter(16777215,75); + addChild(this.label7); + this.label7.x = this.label6.x + this.label6.width; + this.label7.y = this.label1.y; + this.label2.mouseEnabled = true; + this.label2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.label1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label3.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label4.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label5.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label6.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label7.defaultTextFormat = PublicMethod.getCenterTextFormat(); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = true; + } + } + + public function setDate(param1:Object) : void + { + var _loc2_:int = 0; + this.obj = param1; + if(this.obj == null) + { + this.bg.visible = false; + this.label1.text = ""; + this.label2.text = ""; + this.label3.text = ""; + this.label4.text = ""; + this.label5.text = ""; + this.label6.text = ""; + this.label7.text = ""; + } + else + { + _loc2_ = int(this.obj.kid); + this.label1.text = Utils.getRenQi(_loc2_); + this.label2.htmlText = "" + this.obj.userName + ""; + this.label3.text = this.obj.guildname; + this.label4.text = this.obj.ontime; + this.label5.text = this.obj.offtime; + this.label7.text = this.obj.days + " 天"; + this.label6.text = this.obj.reason; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + if(this.obj == null) + { + return; + } + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/mc/DuweiMc.as b/flash_decompiled/com/view/ui/countrygov/mc/DuweiMc.as new file mode 100644 index 0000000..c23e140 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/mc/DuweiMc.as @@ -0,0 +1,131 @@ +package com.view.ui.countrygov.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.view.mc.button.Button_9; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class DuweiMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var tipText:Button_9; + + private var govName1:TextField; + + private var govName2:TextField; + + private var govName3:TextField; + + private var tip:String; + + private var name1:String; + + private var name2:String; + + private var name3:String; + + public function DuweiMc() + { + super(); + var _loc1_:Sprite = this.face.getSprite(ClassConfig.LIB_CUNTRY_3); + addChild(_loc1_); + this.tipText = new Button_9("特权"); + addChild(this.tipText); + this.tipText.x = -75; + this.tipText.y = 15; + this.tipText.setFiller(); + var _loc2_:TextFormat = new TextFormat(); + _loc2_.align = "center"; + _loc2_.color = 16777215; + this.govName1 = PublicMethod.getTextField(16777215,100); + addChild(this.govName1); + this.govName1.x = -50; + this.govName1.y = 18; + this.govName1.defaultTextFormat = _loc2_; + this.govName1.filters = [PublicGlow.getInstance().blackGlow]; + this.govName2 = PublicMethod.getTextField(16777215,100); + addChild(this.govName2); + this.govName2.x = -50; + this.govName2.y = 38; + this.govName2.defaultTextFormat = _loc2_; + this.govName2.filters = [PublicGlow.getInstance().blackGlow]; + this.govName3 = PublicMethod.getTextField(16777215,100); + addChild(this.govName3); + this.govName3.x = -50; + this.govName3.y = 58; + this.govName3.defaultTextFormat = _loc2_; + this.govName3.filters = [PublicGlow.getInstance().blackGlow]; + this.govName1.htmlText = "空缺"; + this.govName2.htmlText = "空缺"; + this.govName3.htmlText = "空缺"; + this.govName1.mouseEnabled = true; + this.govName2.mouseEnabled = true; + this.govName3.mouseEnabled = true; + this.govName1.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govName2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govName3.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + } + + public function setDropItem(param1:String) : void + { + this.tip = "都尉特权
1、提升10%部队攻防
2、有权任免司马
"; + this.tip += "3、都尉专属城堡标识
"; + this.tip = this.tip + "4、每日00:30发放大将军礼包(" + param1 + ");(俸禄以系统邮件方式发放)"; + ToolTipManager.getInstance().setToolTip(this.tipText,new TxtTooltip(this.tip),false,-1,false); + } + + public function setName(param1:Object) : void + { + this.name1 = param1.duwei1Name; + if(this.name1 == null || this.name1 == "") + { + this.govName1.htmlText = "空缺"; + } + else + { + this.govName1.htmlText = "" + this.name1 + ""; + } + this.name2 = param1.duwei2Name; + if(this.name2 == null || this.name2 == "") + { + this.govName2.htmlText = "空缺"; + } + else + { + this.govName2.htmlText = "" + this.name2 + ""; + } + this.name3 = param1.duwei3Name; + if(this.name3 == null || this.name3 == "") + { + this.govName3.htmlText = "空缺"; + } + else + { + this.govName3.htmlText = "" + this.name3 + ""; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + if(_loc2_ == null || _loc2_ == "") + { + return; + } + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/mc/EventMc.as b/flash_decompiled/com/view/ui/countrygov/mc/EventMc.as new file mode 100644 index 0000000..7a7c3f1 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/mc/EventMc.as @@ -0,0 +1,99 @@ +package com.view.ui.countrygov.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + + public class EventMc extends Sprite + { + + private var bg:Sprite; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var obj:Object; + + public function EventMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(620); + addChild(_loc1_); + _loc1_.x = 5; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,620,24); + this.bg.alpha = 0.2; + addChild(this.bg); + this.bg.visible = false; + this.bg.x = 5; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.label1 = PublicMethod.getTextFieldWithFillter(16777215,30); + addChild(this.label1); + this.label1.x = 10; + this.label1.y = 4; + this.label2 = PublicMethod.getTextFieldWithFillter(16777215,480); + addChild(this.label2); + this.label2.x = 45; + this.label2.y = this.label1.y; + this.label3 = PublicMethod.getTextFieldWithFillter(16777215,90); + addChild(this.label3); + this.label3.x = 534; + this.label3.y = this.label1.y; + this.label2.mouseEnabled = true; + this.label2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = true; + } + } + + public function setDate(param1:Object, param2:int = 0) : void + { + this.obj = param1; + if(this.obj == null) + { + this.label1.text = ""; + this.label2.text = ""; + this.label3.text = ""; + } + else + { + this.label1.text = param2 + 1 + ""; + this.label2.htmlText = param1.eventmsg; + this.label3.text = param1.createtime; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + if(this.obj == null) + { + return; + } + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/mc/ForbidMc.as b/flash_decompiled/com/view/ui/countrygov/mc/ForbidMc.as new file mode 100644 index 0000000..219b6b1 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/mc/ForbidMc.as @@ -0,0 +1,140 @@ +package com.view.ui.countrygov.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.newdata.user.NewUserData; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + + public class ForbidMc extends Sprite + { + + private var tr:Sprite; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var btn1:UISmallBtn; + + private var bg:Sprite; + + public var obj:Object; + + public function ForbidMc() + { + super(); + this.tr = PublicMethod.getTrLine(424); + addChild(this.tr); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,424,24); + this.bg.alpha = 0.2; + addChild(this.bg); + this.bg.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,95); + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,45); + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,85); + addChild(this.value1); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + this.value1.y = 4; + this.value2.x = this.value1.x + this.value1.width; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.value1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.value2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.value3.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.value4.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.value5.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.btn1 = new UISmallBtn("取 消",2); + addChild(this.btn1); + this.btn1.x = this.value5.width + this.value5.x + 10; + this.btn1.y = 4; + this.btn1.visible = false; + this.btn1.onClick = this.cancelForBid; + this.value2.mouseEnabled = true; + this.value2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = true; + } + } + + public function setDate(param1:Object, param2:int = 0) : void + { + this.obj = param1; + this.btn1.visible = false; + if(this.obj == null) + { + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + } + else + { + this.value1.text = "" + (param2 + 1); + this.value2.htmlText = "" + param1.userName + ""; + this.value3.text = param1.guildName; + this.value4.text = param1.level; + this.value5.text = PublicMethod.getTimeStr(param1.leftTime); + if(NewUserData.getUser().govId == 1) + { + this.btn1.visible = true; + } + } + } + + private function cancelForBid(param1:MouseEvent) : void + { + if(this.obj == null) + { + return; + } + ConnectService.getInstance().playService.cancelForbidUser(this.obj.userId); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/mc/GovItem.as b/flash_decompiled/com/view/ui/countrygov/mc/GovItem.as new file mode 100644 index 0000000..4eed828 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/mc/GovItem.as @@ -0,0 +1,292 @@ +package com.view.ui.countrygov.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + + public class GovItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var type:int; + + private var bg:Sprite; + + private var userName:String; + + private var currObj:Object; + + public function GovItem(param1:int) + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,320,24); + this.bg.alpha = 0.2; + addChild(this.bg); + this.bg.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.type = param1; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,150); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.label1); + addChild(this.label2); + addChild(this.label3); + this.label1.y = 4; + this.label2.x = 60; + this.label2.y = this.label1.y; + this.label3.x = 210; + this.label3.y = this.label1.y; + this.label2.mouseEnabled = true; + this.label2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.label1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label3.defaultTextFormat = PublicMethod.getCenterTextFormat(); + } + + public function setObj(param1:Object) : void + { + this.currObj = param1; + if(param1) + { + switch(this.type) + { + case 0: + this.label1.text = "国君"; + if(param1.govInfo.king > 0) + { + this.userName = param1.govInfo.kingName; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName1) + { + this.label3.text = param1.guildName1; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 1: + this.label1.text = "大将军"; + if(param1.govInfo.general > 0) + { + this.userName = param1.govInfo.generalName; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName2) + { + this.label3.text = param1.guildName2; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 2: + this.label1.text = "都尉"; + if(param1.govInfo.duwei1 > 0) + { + this.userName = param1.govInfo.duwei1Name; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName3) + { + this.label3.text = param1.guildName3; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 3: + this.label1.text = "都尉"; + if(param1.govInfo.duwei2 > 0) + { + this.userName = param1.govInfo.duwei2Name; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName4) + { + this.label3.text = param1.guildName4; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 4: + this.label1.text = "都尉"; + if(param1.govInfo.duwei3 > 0) + { + this.userName = param1.govInfo.duwei3Name; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName5) + { + this.label3.text = param1.guildName5; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 5: + this.label1.text = "司马"; + if(param1.govInfo.sima1 > 0) + { + this.userName = param1.govInfo.sima1Name; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName6) + { + this.label3.text = param1.guildName6; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 6: + this.label1.text = "司马"; + if(param1.govInfo.sima2 > 0) + { + this.userName = param1.govInfo.sima2Name; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName7) + { + this.label3.text = param1.guildName7; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 7: + this.label1.text = "司马"; + if(param1.govInfo.sima3 > 0) + { + this.userName = param1.govInfo.sima3Name; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName8) + { + this.label3.text = param1.guildName8; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 8: + this.label1.text = "司马"; + if(param1.govInfo.sima4 > 0) + { + this.userName = param1.govInfo.sima4Name; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName9) + { + this.label3.text = param1.guildName9; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 9: + this.label1.text = "司马"; + if(param1.govInfo.sima5 > 0) + { + this.userName = param1.govInfo.sima5Name; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName10) + { + this.label3.text = param1.guildName10; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + break; + case 10: + this.label1.text = "司马"; + if(param1.govInfo.sima6 > 0) + { + this.userName = param1.govInfo.sima6Name; + this.label2.htmlText = "" + this.userName + ""; + if(param1.guildName11) + { + this.label3.text = param1.guildName11; + break; + } + this.label3.text = "无"; + break; + } + this.userName = null; + this.label2.htmlText = "空缺"; + this.label3.text = "---"; + } + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.currObj) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.currObj) + { + this.bg.visible = true; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + if(this.userName == null) + { + return; + } + var _loc2_:CastleUserUI = CastleUserUI.getInstance(); + _loc2_.show(); + _loc2_.updateByUserName(this.userName); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/mc/JiangJunMc.as b/flash_decompiled/com/view/ui/countrygov/mc/JiangJunMc.as new file mode 100644 index 0000000..9ee7b07 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/mc/JiangJunMc.as @@ -0,0 +1,87 @@ +package com.view.ui.countrygov.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.view.mc.button.Button_9; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class JiangJunMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var tipText:Button_9; + + private var govName:TextField; + + private var tip:String; + + private var currName:String; + + public function JiangJunMc() + { + super(); + var _loc1_:Sprite = this.face.getSprite(ClassConfig.LIB_CUNTRY_2); + addChild(_loc1_); + this.tipText = new Button_9("特权"); + addChild(this.tipText); + this.tipText.x = -75; + this.tipText.y = 26; + this.tipText.setFiller(); + var _loc2_:TextFormat = new TextFormat(); + _loc2_.align = "center"; + _loc2_.color = 16777215; + this.govName = PublicMethod.getTextField(16777215,100); + addChild(this.govName); + this.govName.x = -50; + this.govName.y = 35; + this.govName.defaultTextFormat = _loc2_; + this.govName.filters = [PublicGlow.getInstance().blackGlow]; + this.govName.mouseEnabled = true; + this.govName.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + ToolTipManager.getInstance().setToolTip(this.tipText,new TxtTooltip(this.tip),false,-1,false); + } + + public function setDropItem(param1:String) : void + { + this.tip = "大将军特权
1、提升15%部队攻防
2、有权任免都尉、司马
"; + this.tip += "3、大将军专属城堡标识
"; + this.tip = this.tip + "4、每日00:30发放大将军礼包(" + param1 + ");(俸禄以系统邮件方式发放)"; + ToolTipManager.getInstance().setToolTip(this.tipText,new TxtTooltip(this.tip),false,-1,false); + } + + public function setKingName(param1:String) : void + { + this.currName = param1; + if(this.currName == null || this.currName == "") + { + this.govName.htmlText = "空缺"; + } + else + { + this.govName.htmlText = "" + this.currName + ""; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + if(this.currName == null) + { + return; + } + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/mc/KingMc.as b/flash_decompiled/com/view/ui/countrygov/mc/KingMc.as new file mode 100644 index 0000000..546bbae --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/mc/KingMc.as @@ -0,0 +1,86 @@ +package com.view.ui.countrygov.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.view.mc.button.Button_9; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class KingMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var tipText:Button_9; + + private var govName:TextField; + + private var tip:String; + + private var currName:String; + + public function KingMc() + { + super(); + var _loc1_:Sprite = this.face.getSprite(ClassConfig.LIB_CUNTRY_1); + addChild(_loc1_); + this.tipText = new Button_9("特权"); + addChild(this.tipText); + this.tipText.x = -72; + this.tipText.y = 26; + this.tipText.setFiller(); + var _loc2_:TextFormat = new TextFormat(); + _loc2_.align = "center"; + _loc2_.color = 16777215; + this.govName = PublicMethod.getTextField(16777215,100); + addChild(this.govName); + this.govName.x = -50; + this.govName.y = 35; + this.govName.defaultTextFormat = _loc2_; + this.govName.filters = [PublicGlow.getInstance().blackGlow]; + this.govName.mouseEnabled = true; + this.govName.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + } + + public function setDropItem(param1:String) : void + { + this.tip = "国君特权
1、提升20%部队攻防
2、任免一切官职
"; + this.tip += "3、将任意国民禁言
4、上线时全国广播"; + this.tip = this.tip + "
5、国君喇叭、国家公告、国君专属城堡标识
6、每日00:30发放国君礼包(" + param1 + ");(俸禄以系统邮件方式发放)"; + ToolTipManager.getInstance().setToolTip(this.tipText,new TxtTooltip(this.tip),false,-1,false); + } + + public function setKingName(param1:String) : void + { + this.currName = param1; + if(this.currName == null || this.currName == "") + { + this.govName.htmlText = "空缺"; + } + else + { + this.govName.htmlText = "" + this.currName + ""; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + if(this.currName == null) + { + return; + } + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/mc/ScrollEvent.as b/flash_decompiled/com/view/ui/countrygov/mc/ScrollEvent.as new file mode 100644 index 0000000..054c677 --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/mc/ScrollEvent.as @@ -0,0 +1,78 @@ +package com.view.ui.countrygov.mc +{ + import flash.display.Shape; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class ScrollEvent extends Sprite + { + + private var _msgtxt:TextField; + + private var _width:int; + + private var _mask:Shape; + + private var _run:Boolean; + + public function ScrollEvent() + { + super(); + this._msgtxt = new TextField(); + this._mask = new Shape(); + this._msgtxt.textColor = 16777215; + this._msgtxt.autoSize = "left"; + this._msgtxt.selectable = false; + var _loc1_:Boolean = false; + mouseEnabled = false; + mouseChildren = _loc1_; + this._mask.graphics.beginFill(0); + this._mask.graphics.drawRect(0,0,505,22); + addChild(this._mask); + mask = this._mask; + } + + public function setinfo(param1:String) : void + { + addChild(this._msgtxt); + this._msgtxt.htmlText = param1; + this._width = this._msgtxt.width; + this._msgtxt.x = 0; + if(this._width > 550) + { + if(hasEventListener(Event.ENTER_FRAME) == false) + { + addEventListener(Event.ENTER_FRAME,this.movehandler); + } + } + else if(hasEventListener(Event.ENTER_FRAME)) + { + removeEventListener(Event.ENTER_FRAME,this.movehandler); + } + } + + private function movehandler(param1:Event) : void + { + if(this._run) + { + --this._msgtxt.x; + if(this._msgtxt.x < -this._width) + { + this._msgtxt.x = 0; + } + } + } + + public function get run() : Boolean + { + return this._run; + } + + public function set run(param1:Boolean) : void + { + this._run = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/countrygov/mc/SimaMc.as b/flash_decompiled/com/view/ui/countrygov/mc/SimaMc.as new file mode 100644 index 0000000..a212fda --- /dev/null +++ b/flash_decompiled/com/view/ui/countrygov/mc/SimaMc.as @@ -0,0 +1,197 @@ +package com.view.ui.countrygov.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.view.mc.button.Button_9; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SimaMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var tipText:Button_9; + + private var govName1:TextField; + + private var govName2:TextField; + + private var govName3:TextField; + + private var govName4:TextField; + + private var govName5:TextField; + + private var govName6:TextField; + + private var tip:String; + + private var name1:String; + + private var name2:String; + + private var name3:String; + + private var name4:String; + + private var name5:String; + + private var name6:String; + + public function SimaMc() + { + super(); + var _loc1_:Sprite = this.face.getSprite(ClassConfig.LIB_CUNTRY_4); + addChild(_loc1_); + this.tipText = new Button_9("特权"); + addChild(this.tipText); + this.tipText.x = -75; + this.tipText.y = 15; + this.tipText.setFiller(); + var _loc2_:TextFormat = new TextFormat(); + _loc2_.align = "center"; + _loc2_.color = 16777215; + this.govName1 = PublicMethod.getTextField(16777215,100); + addChild(this.govName1); + this.govName1.x = -50; + this.govName1.y = 16; + this.govName1.defaultTextFormat = _loc2_; + this.govName1.filters = [PublicGlow.getInstance().blackGlow]; + this.govName2 = PublicMethod.getTextField(16777215,100); + addChild(this.govName2); + this.govName2.x = -50; + this.govName2.y = 34; + this.govName2.defaultTextFormat = _loc2_; + this.govName2.filters = [PublicGlow.getInstance().blackGlow]; + this.govName3 = PublicMethod.getTextField(16777215,100); + addChild(this.govName3); + this.govName3.x = -50; + this.govName3.y = 52; + this.govName3.defaultTextFormat = _loc2_; + this.govName3.filters = [PublicGlow.getInstance().blackGlow]; + this.govName4 = PublicMethod.getTextField(16777215,100); + addChild(this.govName4); + this.govName4.x = -50; + this.govName4.y = 70; + this.govName4.defaultTextFormat = _loc2_; + this.govName4.filters = [PublicGlow.getInstance().blackGlow]; + this.govName5 = PublicMethod.getTextField(16777215,100); + addChild(this.govName5); + this.govName5.x = -50; + this.govName5.y = 88; + this.govName5.defaultTextFormat = _loc2_; + this.govName5.filters = [PublicGlow.getInstance().blackGlow]; + this.govName6 = PublicMethod.getTextField(16777215,100); + addChild(this.govName6); + this.govName6.x = -50; + this.govName6.y = 106; + this.govName6.defaultTextFormat = _loc2_; + this.govName6.filters = [PublicGlow.getInstance().blackGlow]; + this.govName1.htmlText = "空缺"; + this.govName2.htmlText = "空缺"; + this.govName3.htmlText = "空缺"; + this.govName4.htmlText = "空缺"; + this.govName5.htmlText = "空缺"; + this.govName6.htmlText = "空缺"; + this.govName1.mouseEnabled = true; + this.govName2.mouseEnabled = true; + this.govName3.mouseEnabled = true; + this.govName4.mouseEnabled = true; + this.govName5.mouseEnabled = true; + this.govName6.mouseEnabled = true; + this.govName1.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govName2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govName3.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govName4.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govName5.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govName6.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + } + + public function setDropItem(param1:String) : void + { + this.tip = "都尉特权
1、提升5%部队攻防
"; + this.tip += "2、司马专属城堡标识
"; + this.tip = this.tip + "3、每日00:30发放大将军礼包(" + param1 + ");(俸禄以系统邮件方式发放)"; + ToolTipManager.getInstance().setToolTip(this.tipText,new TxtTooltip(this.tip),false,-1,false); + } + + public function setName(param1:Object) : void + { + this.name1 = param1.sima1Name; + if(this.name1 == null || this.name1 == "") + { + this.govName1.htmlText = "空缺"; + } + else + { + this.govName1.htmlText = "" + this.name1 + ""; + } + this.name2 = param1.sima2Name; + if(this.name2 == null || this.name2 == "") + { + this.govName2.htmlText = "空缺"; + } + else + { + this.govName2.htmlText = "" + this.name2 + ""; + } + this.name3 = param1.sima3Name; + if(this.name3 == null || this.name3 == "") + { + this.govName3.htmlText = "空缺"; + } + else + { + this.govName3.htmlText = "" + this.name3 + ""; + } + this.name4 = param1.sima4Name; + if(this.name4 == null || this.name4 == "") + { + this.govName4.htmlText = "空缺"; + } + else + { + this.govName4.htmlText = "" + this.name4 + ""; + } + this.name5 = param1.sima5Name; + if(this.name5 == null || this.name5 == "") + { + this.govName5.htmlText = "空缺"; + } + else + { + this.govName5.htmlText = "" + this.name5 + ""; + } + this.name6 = param1.sima6Name; + if(this.name6 == null || this.name6 == "") + { + this.govName6.htmlText = "空缺"; + } + else + { + this.govName6.htmlText = "" + this.name6 + ""; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + if(_loc2_ == null || _loc2_ == "") + { + return; + } + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countybattle/CityTip.as b/flash_decompiled/com/view/ui/countybattle/CityTip.as new file mode 100644 index 0000000..29d5988 --- /dev/null +++ b/flash_decompiled/com/view/ui/countybattle/CityTip.as @@ -0,0 +1,50 @@ +package com.view.ui.countybattle +{ + import com.view.world.AbstractToolTipCell; + import flash.text.TextField; + + public class CityTip extends AbstractToolTipCell + { + + private var _tipDate:Object; + + public function CityTip(param1:Object = null) + { + super(); + MY_WIDTH = 150; + this._tipDate = param1; + } + + override protected function drawUI() : void + { + var _loc2_:TextField = null; + var _loc1_:TextField = null; + _loc2_ = null; + var _loc3_:* = getTextField("【" + this._tipDate.provinceName + "】"); + _loc3_.y = 0; + _loc3_.x = (this.MY_WIDTH - _loc3_.width) / 2; + this.mySprite.addChild(_loc3_); + var _loc4_:* = getTextField("(" + this._tipDate.levelName + ")"); + _loc4_.y = 0; + _loc4_.x = _loc3_.width + _loc3_.x + 2; + this.mySprite.addChild(_loc4_); + var _loc5_:* = ["所属国家:","所属联盟:","占据时间:","********申请前提********","所属国家:","联盟荣誉:","联盟等级:"]; + var _loc6_:* = [this._tipDate.countryName,this._tipDate.occuGuild,this._tipDate.occuTime + "天",null,this._tipDate.needCountryName,this._tipDate.needPrestige,this._tipDate.needLevel + "级"]; + var _loc7_:int = 0; + while(_loc7_ < 8) + { + _loc1_ = getTextField(_loc5_[_loc7_]); + _loc1_.x = 0; + _loc1_.y = 20 * (_loc7_ + 1); + this.mySprite.addChild(_loc1_); + _loc2_ = getTextField(_loc6_[_loc7_]); + _loc2_.x = 70; + _loc2_.y = 20 * (_loc7_ + 1); + this.mySprite.addChild(_loc2_); + _loc7_++; + } + this.drawFrame(-5,-5,this.MY_WIDTH,mySprite.height); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countybattle/CityView.as b/flash_decompiled/com/view/ui/countybattle/CityView.as new file mode 100644 index 0000000..29b5731 --- /dev/null +++ b/flash_decompiled/com/view/ui/countybattle/CityView.as @@ -0,0 +1,122 @@ +package com.view.ui.countybattle +{ + import com.utils.Utils; + import com.view.world.ToolTipManager; + import flash.display.MovieClip; + import flash.events.Event; + import flash.events.MouseEvent; + + public class CityView extends MovieClip + { + + public var cityMc:MovieClip; + + public var countrymc:MovieClip; + + public var cName:MovieClip; + + public var cFlag:MovieClip; + + public var cLevel:MovieClip; + + public var onFight:MovieClip; + + private var cityTip:CityTip; + + private var _cDate:Object; + + public function CityView(param1:MovieClip) + { + super(); + this.cityMc = param1; + this.cityMc.x = int(param1.x); + this.cityMc.y = int(param1.y); + this.countrymc = this.cityMc.countrymc; + this.countrymc.visible = false; + this.cName = this.cityMc.cName; + this.cFlag = this.cityMc.cFlag; + this.cFlag.nametxt.text = ""; + this.cFlag.visible = false; + this.cFlag.mouseEnabled = false; + this.cFlag.mouseChildren = false; + this.onFight = this.cityMc.onFight; + this.onFight.mouseEnabled = false; + this.onFight.mouseChildren = false; + this.onFight.visible = false; + this.cLevel = this.cityMc.cLevel; + this.cLevel.x = int(this.cLevel.x); + this.cLevel.y = int(this.cLevel.y); + this.addEventListener(Event.REMOVED_FROM_STAGE,this.__removed,false,0,true); + } + + private function __removed(param1:Event) : void + { + this.removeEventListener(Event.REMOVED_FROM_STAGE,this.__removed); + this.clear(); + } + + private function clear() : void + { + ToolTipManager.getInstance().disposeToolTip(this.cLevel); + this.removeEventListener(MouseEvent.CLICK,this.onFightClick); + Utils.removeAll(this.cFlag); + Utils.removeAll(this); + } + + private function fireeffect(param1:int) : void + { + this.onFight.mouseEnabled = false; + if(param1 == 1) + { + this.onFight.visible = false; + } + else if(param1 == 2) + { + this.addEventListener(MouseEvent.CLICK,this.onFightClick,false,0,true); + this.onFight.visible = true; + } + else if(param1 == 3) + { + } + } + + private function onFightClick(param1:MouseEvent) : void + { + } + + public function set cDate(param1:Object) : void + { + var _loc2_:String = null; + var _loc3_:* = param1; + this._cDate = _loc3_; + try + { + _loc2_ = this._cDate["occuGuildFlag"]; + if(_loc2_ != "") + { + this.cFlag.visible = true; + this.cFlag.nametxt.text = _loc2_; + } + } + catch(e:Error) + { + } + this.cFlag.gotoAndStop(this._cDate.countryId); + try + { + this.countrymc.gotoAndStop(this._cDate.countryId); + this.countrymc.visible = true; + } + catch(e:Error) + { + } + this.cLevel.gotoAndStop(this._cDate.level); + this.fireeffect(this._cDate.status); + this.cName.visible = false; + this.cityTip = null; + this.cityTip = new CityTip(this._cDate); + ToolTipManager.getInstance().setToolTip(this.cLevel,this.cityTip); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countybattle/CountryFightView.as b/flash_decompiled/com/view/ui/countybattle/CountryFightView.as new file mode 100644 index 0000000..ff243d9 --- /dev/null +++ b/flash_decompiled/com/view/ui/countybattle/CountryFightView.as @@ -0,0 +1,224 @@ +package com.view.ui.countybattle +{ + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.common.DragTools; + import com.common.PublicMethod; + import com.control.province.event.ProvinceEvent; + import com.view.world.ViewManager; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.geom.Point; + import flash.geom.Rectangle; + + public class CountryFightView extends ICountryFight + { + + private var selfHeight:Number; + + private var selfWidth:Number; + + private var cityList:Array; + + private var cityNum:int = 56; + + private var fightMc:MovieClip; + + public var mapView:MapPreview; + + private var _dragBg:MovieClip; + + private var lastMapPoint:Point; + + private var lastPoint:Point; + + private var maskSp:Sprite; + + private var dragRec:Rectangle; + + private var dragTools:DragTools; + + public function CountryFightView() + { + super(); + } + + override public function loadOver() : void + { + super.loadOver(); + this.fightMc = getMovieClip(ClassConfig.FightView); + addChild(this.fightMc); + this.init(); + this.initContryInfo(); + this.initDragBg(); + this.show(); + this.maskSp = PublicMethod.createShape(0,CommonData.STAGE_MAX_WIDTH,CommonData.STAGE_MAX_HEIGHT); + addChild(this.maskSp); + this.mask = this.maskSp; + getCityList(); + this.resize(); + } + + override public function show() : void + { + } + + private function init() : void + { + this.selfWidth = 1900; + this.selfHeight = 1310; + this.mapView = new MapPreview(this.fightMc.mapView); + this.cityList = [null]; + } + + private function initContryInfo() : void + { + var _loc1_:CityView = null; + var _loc2_:int = 1; + while(_loc2_ <= this.cityNum) + { + _loc1_ = new CityView(this.fightMc["city_" + _loc2_]); + _loc1_.cFlag.stop(); + _loc1_.cLevel.stop(); + _loc1_.cName.visible = false; + this.mapView.addDot(_loc1_.cityMc.x,_loc1_.cityMc.y,_loc2_); + this.cityList.push(_loc1_); + _loc2_++; + } + } + + private function initDragBg() : void + { + this._dragBg = this.fightMc.dragBg as MovieClip; + this._dragBg.addEventListener(MouseEvent.MOUSE_DOWN,this.onDragMouseDown,false,0,true); + } + + private function onDragMouseDown(param1:MouseEvent) : void + { + this._dragBg.addEventListener(MouseEvent.MOUSE_MOVE,this.onDragMouseMove,false,0,true); + face.stage.addEventListener(MouseEvent.MOUSE_UP,this.onDragMouseUp,false,0,true); + this.lastPoint = new Point(param1.stageX,param1.stageY); + this.lastMapPoint = new Point(this.fightMc.x,this.fightMc.y); + } + + private function onDragMouseUp(param1:MouseEvent) : void + { + this._dragBg.removeEventListener(MouseEvent.MOUSE_MOVE,this.onDragMouseMove); + face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.onDragMouseUp); + } + + private function onDragMouseMove(param1:MouseEvent) : void + { + var _loc4_:* = undefined; + var _loc2_:* = new Point(param1.stageX,param1.stageY); + var _loc3_:* = this.lastMapPoint.x + (_loc2_.x - this.lastPoint.x); + _loc4_ = this.lastMapPoint.y + (_loc2_.y - this.lastPoint.y); + var _loc5_:* = 0; + var _loc6_:* = 0; + var _loc7_:* = ViewManager.getStageWidth() - this.selfWidth; + var _loc8_:* = ViewManager.getStageHeight() - this.selfHeight; + _loc3_ = _loc3_ > _loc5_ ? _loc5_ : _loc3_; + _loc4_ = _loc4_ > _loc6_ ? _loc6_ : _loc4_; + _loc3_ = _loc3_ < _loc7_ ? _loc7_ : _loc3_; + _loc4_ = _loc4_ < _loc8_ ? _loc8_ : _loc4_; + this.fightMc.x = _loc3_; + this.fightMc.y = _loc4_; + this.mapView.moveLocation(this.fightMc.x / -this.selfWidth,this.fightMc.y / -this.selfHeight); + this.mapView.resetLocation(ViewManager.getStageWidth() - this.fightMc.x,-this.fightMc.y); + } + + private function getDragRec() : void + { + var _loc1_:int = face.realWidth; + var _loc2_:int = face.realHeight; + this.dragRec = new Rectangle(_loc1_ - this.selfWidth,_loc2_ - this.selfHeight,this.selfWidth - _loc1_,this.selfHeight - _loc2_); + } + + public function resize() : void + { + var _loc1_:int = 0; + var _loc2_:int = 0; + if(loadComplete) + { + this.fightMc.x = 0; + this.fightMc.y = 0; + this.mapView.moveLocation(this.x / -this.selfWidth,this.y / -this.selfHeight); + _loc1_ = ViewManager.getStageWidth() - this.fightMc.x; + _loc2_ = -this.fightMc.y; + this.mapView.resetLocation(_loc1_,_loc2_); + } + } + + override public function reSizeWindow(param1:Event) : void + { + this.resize(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(loadComplete) + { + getCityList(); + } + this.resize(); + } + + override public function setPosition() : void + { + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + } + + override public function getCityListSucc(param1:ProvinceEvent) : void + { + var _loc2_:* = undefined; + for(_loc2_ in param1.listData) + { + this.cityList[param1.listData[_loc2_].provinceId].cDate = param1.listData[_loc2_]; + this.mapView.setDotColor(param1.listData[_loc2_].provinceId,param1.listData[_loc2_].countryId); + } + } + + private function addDragEvent() : void + { + this.dragTools = new DragTools(this.fightMc,{"methods":"s"}); + this.fightMc.addEventListener(MouseEvent.MOUSE_DOWN,this.mouseDownHandler); + } + + private function mouseDownHandler(param1:MouseEvent) : void + { + face.stage.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + face.stage.addEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + face.stage.addEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseMove(param1:MouseEvent) : void + { + face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.dragTools.beginDrag(false,this.dragRec); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseUp(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countybattle/CountyBattleBuild.as b/flash_decompiled/com/view/ui/countybattle/CountyBattleBuild.as new file mode 100644 index 0000000..2f11c0a --- /dev/null +++ b/flash_decompiled/com/view/ui/countybattle/CountyBattleBuild.as @@ -0,0 +1,50 @@ +package com.view.ui.countybattle +{ + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import com.view.ui.guild.GuildMainUI; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class CountyBattleBuild extends BaseBuild + { + + public function CountyBattleBuild(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/junjige.swf"; + super.buildData = param1; + super.loadSwfBg(); + super.addEvent(); + super.createNpcTip(); + this.buttonMode = true; + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

郡城争夺

"; + npcTipStr += "军事重地,在此可进行大型的多人活动"; + } + + override public function getBuildNameMc() : MovieClip + { + if(_nameMc == null) + { + _nameMc = getBuildNameSp("郡城争夺"); + _nameMc.mouseEnabled = false; + _nameMc.mouseChildren = false; + _nameMc.x = 60; + _nameMc.y = 80; + } + return _nameMc; + } + + override public function mouseClick(param1:MouseEvent) : void + { + var _loc2_:GuildMainUI = GuildMainUI.getInstance(); + _loc2_.show(); + _loc2_.init(4); + } + } +} + diff --git a/flash_decompiled/com/view/ui/countybattle/ICountryFight.as b/flash_decompiled/com/view/ui/countybattle/ICountryFight.as new file mode 100644 index 0000000..abb79df --- /dev/null +++ b/flash_decompiled/com/view/ui/countybattle/ICountryFight.as @@ -0,0 +1,146 @@ +package com.view.ui.countybattle +{ + import com.comfig.PathConfig; + import com.common.App; + import com.control.ConnectService; + import com.control.province.event.ProvinceEvent; + import com.view.Control; + import com.view.world.ui.AbstractView; + 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.ProgressEvent; + import flash.net.URLRequest; + import flash.system.ApplicationDomain; + import flash.system.LoaderContext; + + public class ICountryFight extends AbstractView + { + + private var urlArr:Array = ["CountryFight.swf"]; + + public var loadComplete:Boolean; + + private var loadNums:int; + + public function ICountryFight() + { + super(); + _loaderInfo = new ApplicationDomain(); + Control.getInstance().addLoadMc(); + this.loadComplete = false; + loader = new Loader(); + loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadUiComplete); + loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,this.loadProgress); + this.beginLoadRes(); + } + + override public function addToStage(param1:Event) : void + { + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getCityList,this.getCityListSucc); + } + + override public function removeFromStage(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getCityList,this.getCityListSucc); + super.removeFromStage(param1); + } + + public function getCityList() : void + { + ConnectService.getInstance().provinceService.getCityList(); + } + + public function getCityListSucc(param1:ProvinceEvent) : void + { + } + + private function beginLoadRes() : void + { + Control.getInstance().setCurrNums(this.loadNums + 1 + "/" + this.urlArr.length); + var _loc1_:URLRequest = new URLRequest(PathConfig.getInstance().getVerStr(this.urlArr[this.loadNums])); + loader.load(_loc1_,new LoaderContext(false,_loaderInfo)); + } + + override public function loadProgress(param1:ProgressEvent) : void + { + var _loc2_:int = int(param1.bytesLoaded / param1.bytesTotal * 100); + Control.getInstance().setLoadProess(_loc2_); + } + + override public function loadUiComplete(param1:Event) : void + { + ++this.loadNums; + if(this.loadNums < this.urlArr.length) + { + this.beginLoadRes(); + } + else + { + this.loadComplete = true; + loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.loadUiComplete); + loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,this.loadProgress); + loader = null; + Control.getInstance().setCurrNums(""); + Control.getInstance().removeLoadMc(); + this.loadOver(); + } + } + + public function loadOver() : void + { + } + + public function setLoaderInfo(param1:ApplicationDomain) : void + { + _loaderInfo = param1; + } + + public function getLoaderInfo() : ApplicationDomain + { + return _loaderInfo; + } + + override public function getSprite(param1:String) : Sprite + { + var _loc2_:Sprite = null; + _loc2_ = App.createSprite(param1,_loaderInfo); + if(_loc2_ == null) + { + _loc2_ = null; + } + return _loc2_; + } + + override public function getMovieClip(param1:String) : MovieClip + { + return createClip(param1); + } + + override public function getPng(param1:String) : BitmapData + { + var _loc2_:BitmapData = null; + _loc2_ = App.createPng(param1,_loaderInfo); + if(_loc2_ == null) + { + _loc2_ = null; + } + return _loc2_; + } + + override public function getButton(param1:String) : SimpleButton + { + var _loc2_:SimpleButton = null; + _loc2_ = App.createButton(param1,_loaderInfo); + if(_loc2_ == null) + { + _loc2_ = null; + } + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/countybattle/MapPreview.as b/flash_decompiled/com/view/ui/countybattle/MapPreview.as new file mode 100644 index 0000000..56b2376 --- /dev/null +++ b/flash_decompiled/com/view/ui/countybattle/MapPreview.as @@ -0,0 +1,112 @@ +package com.view.ui.countybattle +{ + import com.InstallFace; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class MapPreview extends MovieClip + { + + private var mapMc:MovieClip; + + public var toMap:SimpleButton; + + private var viewDot:Sprite; + + private var countryColor:Object; + + private var viewMask:MovieClip; + + private var face:InstallFace = InstallFace.getInstance(); + + private var _viewMask:MovieClip; + + public function MapPreview(param1:MovieClip) + { + super(); + this.mapMc = param1; + this.countryColor = [null,1175278,16633363,11087357,1231634,15860907,16585491,191724]; + this.viewMask = this.mapMc._viewMask as MovieClip; + this.viewDot = new Sprite(); + this.viewDot.x = this.viewMask.x; + this.viewDot.y = this.viewMask.y; + this.mapMc.addChild(this.viewDot); + this.viewDot.mask = this.viewMask; + this.toMap = this.face.getButton(UIConfig.btn_jian); + this.mapMc.addChild(this.toMap); + this.toMap.x = 160; + this.toMap.y = 30; + ToolTipManager.getInstance().setToolTip(this.toMap,new TxtTooltip("关闭小地图")); + this.toMap.addEventListener(MouseEvent.CLICK,this.gotoMap,false,0,true); + this.addEventListener(Event.REMOVED,this.__removed,false,0,true); + } + + private function __removed(param1:Event) : void + { + this.removeEventListener(Event.REMOVED,this.__removed); + this.toMap.removeEventListener(MouseEvent.CLICK,this.gotoMap); + Utils.removeAll(this.mapMc); + this.viewMask = null; + this.viewDot = null; + } + + public function moveLocation(param1:Number, param2:Number) : void + { + this.viewDot.x = -(1900 / 7 - 160) * param1 + this.viewMask.x; + this.viewDot.y = -(1310 / 7 - 160) * param2 + this.viewMask.y; + } + + public function resetLocation(param1:Number, param2:Number) : void + { + this.mapMc.x = param1 - 215 + 20; + this.mapMc.y = param2 - 15; + } + + public function addDot(param1:Number, param2:Number, param3:int) : void + { + var _loc4_:* = new CityDot(); + _loc4_.name = "dot_" + param3; + _loc4_.x = param1 / 7; + _loc4_.y = param2 / 7; + this.viewDot.addChild(_loc4_); + } + + private function gotoMap(param1:MouseEvent) : void + { + InstallFace.getInstance().toWorld(); + } + + public function setDotColor(param1:uint, param2:uint) : void + { + var _loc3_:CityDot = this.viewDot.getChildByName("dot_" + param1) as CityDot; + _loc3_.changeColor(this.countryColor[param2]); + } + } +} + +import flash.display.Sprite; + +class CityDot extends Sprite +{ + + public function CityDot(param1:uint = 16777215) + { + super(); + this.graphics.beginFill(param1); + this.graphics.drawCircle(0,0,3); + } + + public function changeColor(param1:uint = 16777215) : void + { + this.graphics.clear(); + this.graphics.beginFill(param1); + this.graphics.drawCircle(0,0,3); + } +} diff --git a/flash_decompiled/com/view/ui/crossrank/CrossRank.as b/flash_decompiled/com/view/ui/crossrank/CrossRank.as new file mode 100644 index 0000000..6c130ce --- /dev/null +++ b/flash_decompiled/com/view/ui/crossrank/CrossRank.as @@ -0,0 +1,116 @@ +package com.view.ui.crossrank +{ + 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 CrossRank extends BaseUI + { + + public var btnArr:Array; + + private var page1:RankPage1; + + private var page2:RankPage2; + + private var prePage:Sprite; + + private var preBtn:UITabBtn; + + public function CrossRank() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_crossrank); + super.setPosition(); + this.createUI(); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w; + window_heihgt = UIWindowBg.normal_window_h + 15; + } + + 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; + 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_++; + } + _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) && contains(this.prePage)) + { + 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 RankPage1(); + } + this.prePage = this.page1; + } + if(this.btnArr[1] == this.preBtn) + { + if(this.page2 == null) + { + this.page2 = new RankPage2(); + } + this.prePage = this.page2; + } + addChild(this.prePage); + this.prePage.x = 11; + this.prePage.y = 65; + } + + override public function addToStage(param1:Event) : void + { + if(this.prePage == this.page1) + { + this.page1.getMessList(); + } + } + + override public function removeFromStage(param1:Event) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/crossrank/RankMc.as b/flash_decompiled/com/view/ui/crossrank/RankMc.as new file mode 100644 index 0000000..91799c5 --- /dev/null +++ b/flash_decompiled/com/view/ui/crossrank/RankMc.as @@ -0,0 +1,156 @@ +package com.view.ui.crossrank +{ + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class RankMc extends UIBase + { + + 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 css:TextFormat; + + private var startCombat:UISmallBtn; + + public var defaultRank:int; + + private var _obj:Object; + + public var combatF:Function; + + public function RankMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,396,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,396,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(UIConfig.textColor,38); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,102); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,79); + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,99); + this.startCombat = new UISmallBtn("挑 战",2); + this.value2.mouseEnabled = true; + addChild(this.value1); + addChild(this.value2); + addChild(this.value4); + addChild(this.value5); + addChild(this.startCombat); + this.value1.y = 2; + this.value2.x = this.value1.x + this.value1.width + 10; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value2.x + this.value2.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.startCombat.x = this.value5.x + this.value5.width + 10; + this.startCombat.y = this.value1.y; + this.startCombat.onClick = this.combat; + this.startCombat.visible = false; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + } + + 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 setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 1) + { + _loc2_.color = 16771584; + } + else if(param1 == 2) + { + _loc2_.color = 16743936; + } + else if(param1 == 3) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + this.value5.setTextFormat(_loc2_); + } + + public function setObj(param1:Object) : void + { + this._obj = param1; + if(param1 == null) + { + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.startCombat.visible = false; + } + else + { + this.value1.text = param1.id; + this.value2.text = param1.userName; + this.value3.text = param1.rankId; + this.value4.text = Utils.getNewPower(param1.armyPower); + this.value5.text = param1.zoneName; + this.startCombat.visible = true; + this.setStyle(param1.id); + } + } + + private function combat(param1:MouseEvent) : void + { + if(Boolean(this._obj) && Boolean(this.combatF)) + { + this.combatF(this._obj.id); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/crossrank/RankMsgMc.as b/flash_decompiled/com/view/ui/crossrank/RankMsgMc.as new file mode 100644 index 0000000..24c5cc9 --- /dev/null +++ b/flash_decompiled/com/view/ui/crossrank/RankMsgMc.as @@ -0,0 +1,108 @@ +package com.view.ui.crossrank +{ + import com.common.PublicMethod; + import com.view.mc.button.Button_9; + import com.view.newui.UIBase; + 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 RankMsgMc extends UIBase + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var guwuView:Button_9; + + private var _obj:Object; + + public function RankMsgMc() + { + var _loc2_:Sprite = null; + var _loc3_:Sprite = null; + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,216,24); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,216,24); + this.bg2.alpha = 0.3; + addChild(this.bg2); + this.bg2.visible = false; + var _loc1_:Sprite = PublicMethod.getTrLine(220); + addChild(_loc1_); + _loc1_.y = 24; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,84); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.value1); + addChild(this.value2); + this.value1.x = 2; + this.value1.y = 4; + this.value2.x = this.value1.x + this.value1.width + 10; + this.value2.y = this.value1.y; + _loc2_ = PublicMethod.getTdLine(23); + addChild(_loc2_); + _loc2_.x = this.value1.x + this.value1.width; + _loc2_.y = 2; + _loc3_ = PublicMethod.getTdLine(23); + addChild(_loc3_); + _loc3_.x = this.value2.x + this.value2.width; + _loc3_.y = _loc2_.y; + this.guwuView = new Button_9("说明"); + this.guwuView.setTextHeight(20); + this.guwuView.buttonMode = true; + addChild(this.guwuView); + this.guwuView.x = this.value2.x + this.value2.width + 2; + this.guwuView.y = 4; + } + + 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 setObj(param1:Object) : void + { + this._obj = param1; + if(this._obj) + { + this.value1.text = param1.userName; + this.value2.text = param1.zoneName; + ToolTipManager.getInstance().setToolTip(this.guwuView,new TxtTooltip(param1.msg),false,-1,false); + this.guwuView.visible = true; + } + else + { + this.value1.text = ""; + this.value2.text = ""; + this.guwuView.visible = false; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/crossrank/RankPage1.as b/flash_decompiled/com/view/ui/crossrank/RankPage1.as new file mode 100644 index 0000000..47213b3 --- /dev/null +++ b/flash_decompiled/com/view/ui/crossrank/RankPage1.as @@ -0,0 +1,403 @@ +package com.view.ui.crossrank +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.data.data.hero.Hero; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIHeroItem; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.battleview.CopyBattleViewUI; + import com.view.ui.hero.HeroListSelectUI; + 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 RankPage1 extends UIBase + { + + private var tableMc:UITable; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var saveBtn:UIButton; + + private var getDailyBtn:UIButton; + + private var getRankBtn:UIButton; + + private var heroMcVec:Vector.; + + private var userListVec:Vector.; + + private var powerText:TextField; + + private var timeText:TextField; + + private var heroIdList:Vector.; + + public function RankPage1() + { + var _loc1_:UIWindowBg = null; + var _loc4_:int = 0; + var _loc5_:UIWindowBg = null; + var _loc10_:RankMc = null; + var _loc11_:RankMsgMc = null; + var _loc12_:UIHeroItem = null; + this.heroIdList = new Vector.(); + super(); + _loc1_ = new UIWindowBg(); + _loc1_.initSecondPanel(630,387); + addChild(_loc1_); + var _loc2_:Array = ["排名","君主名称","战力","所属区","挑战"]; + var _loc3_:Array = [40,110,80,100,76]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.lineHeight = 24; + this.tableMc.install(10,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.userListVec = new Vector.(); + _loc4_ = 0; + while(_loc4_ < 10) + { + _loc10_ = new RankMc(); + this.tableMc.addChild(_loc10_); + this.userListVec.push(_loc10_); + _loc10_.y = 26 + _loc4_ * 24; + _loc10_.x = 2; + _loc10_.combatF = this.startCombat; + _loc4_++; + } + _loc5_ = new UIWindowBg(); + _loc5_.initThirdPanel(216,256); + _loc1_.addChild(_loc5_); + _loc5_.x = this.tableMc.x + this.tableMc.width; + _loc5_.y = 4; + var _loc6_:UITitleBg = new UITitleBg("活动信息",230); + _loc5_.addChild(_loc6_); + _loc6_.x = int(_loc5_.width / 2 - _loc6_.width / 2); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(222,240); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc5_.addChild(this.packScrollPane); + this.packScrollPane.x = 3; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc7_:int = 0; + while(_loc7_ < 10) + { + _loc11_ = new RankMsgMc(); + this.packMc.addChild(_loc11_); + this.packList.push(_loc11_); + _loc11_.y = 24 * _loc7_; + _loc7_++; + } + this.packScrollPane.update(); + var _loc8_:UIWindowBg = new UIWindowBg(); + _loc8_.initThirdPanel(621,113); + _loc1_.addChild(_loc8_); + _loc8_.x = 4; + _loc8_.y = this.tableMc.height + 5; + this.heroMcVec = new Vector.(); + _loc4_ = 0; + while(_loc4_ < 5) + { + _loc12_ = new UIHeroItem(); + _loc8_.addChild(_loc12_); + _loc12_.x = 5 + _loc4_ * 124; + _loc12_.y = 5; + this.heroMcVec.push(_loc12_); + _loc4_++; + } + var _loc9_:UIButton = new UIButton("武将选择",2,10); + _loc8_.addChild(_loc9_); + _loc9_.x = 10; + _loc9_.y = 95; + _loc9_.onClick = this.selectHero; + this.getDailyBtn = new UIButton("领取挑战奖励",3); + this.getRankBtn = new UIButton("领取排行榜奖励",4); + _loc8_.addChild(this.getDailyBtn); + this.getDailyBtn.x = 280; + this.getDailyBtn.y = _loc9_.y; + this.getDailyBtn.onClick = this.getDailyCombatItem; + _loc8_.addChild(this.getRankBtn); + this.getRankBtn.x = this.getDailyBtn.x + this.getDailyBtn.width + 10; + this.getRankBtn.y = _loc9_.y; + this.getRankBtn.onClick = this.getRankCombatItem; + this.saveBtn = new UIButton("报名参赛",3,10); + _loc8_.addChild(this.saveBtn); + this.saveBtn.x = 537; + this.saveBtn.y = 95; + this.saveBtn.onClick = this.saveHeroids; + this.powerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc8_.addChild(this.powerText); + this.powerText.x = _loc9_.x + 70; + this.powerText.y = _loc9_.y + 3; + this.powerText.htmlText = "武将镜像战斗力:0"; + this.timeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc8_.addChild(this.timeText); + this.timeText.x = 500; + this.timeText.y = this.powerText.y; + Utils.g_events.addEventListener(PlayEvent.GAMEPLAY_SAVEHEROS,this.saveHeroListResult); + Utils.g_events.addEventListener(PlayEvent.GAMEPLAY_TOPLIST,this.listResult); + Utils.g_events.addEventListener(PlayEvent.GAMEPLAY_enterMain,this.enterMain); + Utils.g_events.addEventListener(PlayEvent.MATCH_getItemResult,this.getItemResult); + Utils.g_events.addEventListener(PlayEvent.GAMEPLAY_StartCombat,this.startCombatResult); + Utils.g_events.addEventListener(PlayEvent.GAMEPLAY_MESSLIST,this.getMessListResult); + ConnectService.getInstance().activityService.enterCrossRankMain(); + } + + private function getDailyCombatItem(param1:MouseEvent) : void + { + ConnectService.getInstance().activityService.getDailyCombatItem(); + } + + private function getRankCombatItem(param1:MouseEvent) : void + { + ConnectService.getInstance().activityService.getRankItem(); + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = null; + _loc2_ = HeroListSelectUI.getInstance(); + _loc2_.setSelectheroArr(this.heroIdList); + addChild(_loc2_); + _loc2_.x = -12; + _loc2_.y = -60; + _loc2_.backFunc = this.selectHeroList; + } + + private function clearHeroIdList() : void + { + if(this.heroIdList.length > 0) + { + this.heroIdList = new Vector.(); + } + } + + public function selectHeroList(param1:Vector.) : void + { + var _loc3_:* = undefined; + this.clearHeroIdList(); + var _loc2_:Number = 0; + for(_loc3_ in this.heroMcVec) + { + if(param1.length > 0 && param1.length > _loc3_) + { + this.heroIdList.push(param1[_loc3_].heroId); + this.heroMcVec[_loc3_].setData(param1[_loc3_]); + _loc2_ += param1[_loc3_].combatPower; + } + else + { + this.heroMcVec[_loc3_].setData(null); + } + } + _loc2_ = Math.round(_loc2_); + this.powerText.htmlText = "武将战斗力:" + _loc2_ + ""; + } + + private function saveHeroids(param1:MouseEvent) : void + { + var _loc3_:int = 0; + if(this.heroIdList.length == 0) + { + MessageBoxUI.getInstance().addMessage("请选择武将参与活动"); + return; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in this.heroIdList) + { + _loc2_.push(_loc3_); + } + ConnectService.getInstance().activityService.saveGamePlayer(_loc2_); + } + + private function saveHeroListResult(param1:PlayEvent) : void + { + MessageBoxUI.getInstance().addMessage("参与成功!"); + this.enterMain(param1); + } + + private function listResult(param1:PlayEvent) : void + { + var _loc3_:int = 0; + var _loc4_:Object = null; + var _loc2_:Array = param1.list; + if(_loc2_.length > 0) + { + _loc3_ = 0; + while(_loc3_ < _loc2_.length) + { + if(_loc3_ > 9) + { + break; + } + _loc4_ = _loc2_[_loc3_ + 1]; + this.userListVec[_loc3_].setObj(_loc4_); + _loc3_++; + } + } + } + + private function getItemResult(param1:PlayEvent) : void + { + var _loc2_:Object = param1.obj; + if(_loc2_.times2 > 0) + { + this.getDailyBtn.setUnEnable(); + } + else + { + this.getDailyBtn.setEnable(); + } + if(_loc2_.times3 > 0) + { + this.getRankBtn.setUnEnable(); + } + else + { + this.getRankBtn.setEnable(); + } + } + + private function enterMain(param1:PlayEvent) : void + { + var _loc2_:Object = param1.obj; + var _loc3_:int = int(_loc2_.status); + var _loc4_:int = int(_loc2_.leftTime); + var _loc5_:Array = _loc2_.msgMap; + this.traceMsg(_loc5_); + if(_loc3_ == 1) + { + this.saveBtn.visible = true; + this.timeText.htmlText = ""; + } + else + { + this.saveBtn.visible = false; + this.timeText.htmlText = "今日剩余挑战次数:" + _loc4_ + ""; + } + if(_loc2_.times2 > 0) + { + this.getDailyBtn.setUnEnable(); + } + else + { + this.getDailyBtn.setEnable(); + } + if(_loc2_.times3 > 0) + { + this.getRankBtn.setUnEnable(); + } + else + { + this.getRankBtn.setEnable(); + } + } + + private function getMessListResult(param1:PlayEvent) : void + { + var _loc2_:Array = param1.list; + this.traceMsg(_loc2_); + } + + private function traceMsg(param1:Array) : void + { + var _loc2_:int = 0; + var _loc3_:RankMsgMc = null; + this.clearMsgList(); + if(param1 != null && param1.length > 0) + { + _loc2_ = 0; + while(_loc2_ < param1.length) + { + if(_loc2_ > 9) + { + _loc3_ = new RankMsgMc(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 24 * _loc2_; + _loc3_.setObj(param1[_loc2_]); + } + else + { + this.packList[_loc2_].setObj(param1[_loc2_]); + } + _loc2_++; + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + } + + private function clearMsgList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setObj(null); + } + _loc1_--; + } + } + + private function startCombat(param1:int) : void + { + var _loc3_:int = 0; + if(param1 == 0) + { + MessageBoxUI.getInstance().addMessage("数据不正确"); + return; + } + if(this.heroIdList.length == 0) + { + MessageBoxUI.getInstance().addMessage("请选择武将参与活动"); + return; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in this.heroIdList) + { + _loc2_.push(_loc3_); + } + ConnectService.getInstance().activityService.startGamePlayerBattle(_loc2_,param1); + } + + private function startCombatResult(param1:PlayEvent) : void + { + var _loc2_:CopyBattleViewUI = CopyBattleViewUI.getInstance(); + _loc2_.initData(param1.obj); + _loc2_.showUI(); + } + + public function getMessList() : void + { + ConnectService.getInstance().activityService.getMessList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/crossrank/RankPage2.as b/flash_decompiled/com/view/ui/crossrank/RankPage2.as new file mode 100644 index 0000000..9ba4ed1 --- /dev/null +++ b/flash_decompiled/com/view/ui/crossrank/RankPage2.as @@ -0,0 +1,253 @@ +package com.view.ui.crossrank +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIBorderMc; + import com.view.newui.UIConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.activity.gift.NewItemMc; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class RankPage2 extends UIBase + { + + private var _bg1:UIWindowBg; + + private var _bg2:UIWindowBg; + + private var _bg3:UIWindowBg; + + private var _bg4:UIWindowBg; + + private var _bg5:UIWindowBg; + + private var _bg6:UIWindowBg; + + public function RankPage2() + { + var _loc6_:UIBorderMc = null; + var _loc8_:Sprite = null; + var _loc9_:TextField = null; + var _loc10_:String = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,387); + addChild(_loc1_); + var _loc2_:UIBorderMc = new UIBorderMc(558); + _loc1_.addChild(_loc2_); + _loc2_.x = 0; + _loc2_.y = 1; + _loc2_.loadTitle(5); + var _loc3_:String = "1、每周六周日报名参赛。全服所有区均可报名。
"; + _loc3_ += "2、周一凌晨系统根据报名数据赛选战力前十名进入大厅排行榜。
"; + _loc3_ += "3、玩家可对排行榜玩家发起挑战,挑战胜利,胜利方进入榜单,失败者排名下滑一位,直到掉出前十,无论挑战胜利还是失败,均可获得挑战奖励,每个玩家每天可挑战3次,挑战时间为每天早5点-晚上11点
"; + _loc3_ += "4、系统每日凌晨根据前一天挑战结果当天前十名榜单数据。
"; + _loc3_ += "5、系统周六对榜单进行清理,周六周日为重新报名时间。周一凌晨进行新一轮重复。
"; + _loc3_ += "6、对于排行榜前十名玩家,每日均可进行排行榜奖励领取。"; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,620); + _loc4_.wordWrap = true; + _loc4_.multiline = true; + _loc4_.height = 300; + _loc1_.addChild(_loc4_); + _loc4_.x = 15; + _loc4_.y = 45; + var _loc5_:TextFormat = new TextFormat(); + _loc5_.leading = 8; + _loc4_.defaultTextFormat = _loc5_; + _loc4_.htmlText = _loc3_; + _loc6_ = new UIBorderMc(558); + _loc1_.addChild(_loc6_); + _loc6_.x = 0; + _loc6_.y = 200; + _loc6_.loadTitle(20); + this._bg1 = new UIWindowBg(); + this._bg1.initThirdPanel(199,70); + _loc1_.addChild(this._bg1); + this._bg1.x = 4; + this._bg1.y = _loc6_.y + _loc6_.height + 2; + this._bg2 = new UIWindowBg(); + this._bg2.initThirdPanel(199,70); + _loc1_.addChild(this._bg2); + this._bg2.x = this._bg1.x + this._bg1.width + 2; + this._bg2.y = this._bg1.y; + this._bg3 = new UIWindowBg(); + this._bg3.initThirdPanel(199,70); + _loc1_.addChild(this._bg3); + this._bg3.x = this._bg2.x + this._bg2.width + 2; + this._bg3.y = this._bg1.y; + this._bg4 = new UIWindowBg(); + this._bg4.initThirdPanel(200,70); + _loc1_.addChild(this._bg4); + this._bg4.x = this._bg1.x; + this._bg4.y = this._bg1.y + this._bg1.height + 2; + this._bg5 = new UIWindowBg(); + this._bg5.initThirdPanel(200,70); + _loc1_.addChild(this._bg5); + this._bg5.x = this._bg2.x; + this._bg5.y = this._bg4.y; + this._bg6 = new UIWindowBg(); + this._bg6.initThirdPanel(200,70); + _loc1_.addChild(this._bg6); + this._bg6.x = this._bg3.x; + this._bg6.y = this._bg4.y; + var _loc7_:int = 1; + while(_loc7_ < 7) + { + _loc8_ = PublicMethod.getTrLine(195,5327407); + this["_bg" + _loc7_].addChild(_loc8_); + _loc8_.x = 5; + _loc8_.y = 55; + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,190); + this["_bg" + _loc7_].addChild(_loc9_); + _loc9_.x = 5; + _loc9_.y = _loc8_.y + 5; + _loc10_ = ""; + switch(_loc7_) + { + case 1: + _loc10_ = "排行榜第一名奖励设置"; + break; + case 2: + _loc10_ = "排行榜第二名奖励设置"; + break; + case 3: + _loc10_ = "排行榜第三名奖励设置"; + break; + case 4: + _loc10_ = "排行榜第四-六名奖励设置"; + break; + case 5: + _loc10_ = "排行榜第七到十名奖励设置"; + break; + case 6: + _loc10_ = "每日挑战奖励设置"; + } + _loc9_.text = _loc10_; + _loc7_++; + } + Utils.g_events.addEventListener(PlayEvent.GAMEPLAY_ITEMLIST,this.getItemListResult); + this.getItemList(); + } + + private function getItemList() : void + { + ConnectService.getInstance().activityService.getGameRankReward(); + } + + private function getItemListResult(param1:PlayEvent) : void + { + var _loc2_:Object = null; + var _loc9_:int = 0; + var _loc10_:NewItemMc = null; + _loc2_ = param1.obj; + var _loc3_:Array = _loc2_["1"]; + var _loc4_:Array = _loc2_["2"]; + var _loc5_:Array = _loc2_["3"]; + var _loc6_:Array = _loc2_["4"]; + var _loc7_:Array = _loc2_["5"]; + var _loc8_:Array = _loc2_["6"]; + _loc9_ = 0; + while(_loc9_ < _loc3_.length) + { + if(_loc9_ > 4) + { + break; + } + _loc2_ = _loc3_[_loc9_]; + _loc10_ = new NewItemMc(1); + this._bg1.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = 10; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc4_.length) + { + if(_loc9_ > 4) + { + break; + } + _loc2_ = _loc4_[_loc9_]; + _loc10_ = new NewItemMc(1); + this._bg2.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = 10; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc5_.length) + { + if(_loc9_ > 4) + { + break; + } + _loc2_ = _loc5_[_loc9_]; + _loc10_ = new NewItemMc(1); + this._bg3.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = 10; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc6_.length) + { + if(_loc9_ > 4) + { + break; + } + _loc2_ = _loc6_[_loc9_]; + _loc10_ = new NewItemMc(1); + this._bg4.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = 10; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc7_.length) + { + if(_loc9_ > 4) + { + break; + } + _loc2_ = _loc7_[_loc9_]; + _loc10_ = new NewItemMc(1); + this._bg5.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = 10; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc8_.length) + { + if(_loc9_ > 4) + { + break; + } + _loc2_ = _loc8_[_loc9_]; + _loc10_ = new NewItemMc(1); + this._bg6.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = 10; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/Alart.as b/flash_decompiled/com/view/ui/economic/Alart.as new file mode 100644 index 0000000..92dd210 --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/Alart.as @@ -0,0 +1,60 @@ +package com.view.ui.economic +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class Alart extends BaseBuild + { + + public function Alart(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/Alart1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/Alart3.swf"; + buildData.picUrl = "pic/build/Alart3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/Alart2.swf"; + buildData.picUrl = "pic/build/Alart2.png"; + } + else + { + buildData.swfUrl = "pic/build/Alart1.swf"; + buildData.picUrl = "pic/build/Alart1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new AlartUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/AlartUI.as b/flash_decompiled/com/view/ui/economic/AlartUI.as new file mode 100644 index 0000000..725bda8 --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/AlartUI.as @@ -0,0 +1,277 @@ +package com.view.ui.economic +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.AlartEvent; + import com.view.Control; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIExpBar; + import com.view.newui.UINumInputText; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + 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 AlartUI extends BaseUI + { + + private var textCss:TextFormat; + + private var duihuanBtn:UIButton; + + private var res1:TextField; + + private var res2:TextField; + + private var res3:TextField; + + private var res4:TextField; + + private var label5:TextField; + + private var input:UINumInputText; + + private var expText:TextField; + + private var expBar:UIExpBar; + + private var msgText:TextField; + + public function AlartUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_jitan); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc5_:TextField = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + this.textCss = new TextFormat(); + this.textCss.bold = true; + this.textCss.color = 11711961; + this.textCss.size = 14; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(612,38); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initSecondPanel(612,238); + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x; + _loc3_.y = _loc2_.y + _loc2_.height + 4; + var _loc4_:UITitleBg = new UITitleBg("兑换武将经验",_loc3_.width); + _loc3_.addChild(_loc4_); + _loc4_.x = int(_loc3_.width / 2 - _loc4_.width / 2); + _loc5_ = PublicMethod.getTextField(12239073,80); + _loc1_.addChild(_loc5_); + _loc5_.height = 24; + _loc5_.x = 20; + _loc5_.y = 20; + _loc5_.text = "武将经验池"; + _loc5_.setTextFormat(this.textCss); + this.expBar = new UIExpBar(); + this.expBar.setWidth(430); + this.expBar.init(); + _loc2_.addChild(this.expBar); + this.expBar.x = 105; + this.expBar.y = 18; + this.expBar.setMaxValue(100); + this.expBar.setCurValue(0); + var _loc6_:UIButton = new UIButton("分 配",2); + _loc1_.addChild(_loc6_); + _loc6_.x = this.expBar.x + this.expBar.width + 10; + _loc6_.y = 15; + _loc6_.onClick = this.openMyHero; + var _loc7_:UIWindowBg = new UIWindowBg(); + _loc7_.initSecondPanel(150,112); + _loc3_.addChild(_loc7_); + _loc7_.x = 20; + _loc7_.y = 40; + var _loc8_:Sprite = PublicMethod.getTrLine(_loc7_.width - 6); + var _loc9_:Sprite = PublicMethod.getTrLine(_loc7_.width - 6); + var _loc10_:Sprite = PublicMethod.getTrLine(_loc7_.width - 6); + _loc7_.addChild(_loc8_); + _loc7_.addChild(_loc9_); + _loc7_.addChild(_loc10_); + _loc8_.y = 30; + _loc9_.y = 60; + _loc10_.y = 90; + _loc8_.x = 3; + _loc9_.x = 3; + _loc10_.x = 3; + var _loc11_:Bitmap = new Bitmap(face.getPng(ClassConfig.ui_resource_1)); + var _loc12_:Bitmap = new Bitmap(face.getPng(ClassConfig.ui_resource_2)); + var _loc13_:Bitmap = new Bitmap(face.getPng(ClassConfig.ui_resource_3)); + var _loc14_:Bitmap = new Bitmap(face.getPng(ClassConfig.ui_resource_4)); + _loc7_.addChild(_loc11_); + _loc7_.addChild(_loc12_); + _loc7_.addChild(_loc13_); + _loc7_.addChild(_loc14_); + _loc11_.x = 14; + _loc12_.x = 14; + _loc13_.x = 14; + _loc14_.x = 14; + _loc11_.y = 5; + _loc12_.y = 35; + _loc13_.y = 65; + _loc14_.y = 95; + this.res1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.res1.text = ""; + this.res2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.res2.text = ""; + this.res3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.res3.text = ""; + this.res4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.res4.text = ""; + _loc7_.addChild(this.res1); + _loc7_.addChild(this.res2); + _loc7_.addChild(this.res3); + _loc7_.addChild(this.res4); + this.res1.x = 40; + this.res2.x = 40; + this.res3.x = 40; + this.res4.x = 40; + this.res1.y = 5; + this.res2.y = 35; + this.res3.y = 65; + this.res4.y = 95; + var _loc15_:Bitmap = new Bitmap(face.getPng(ClassConfig.ui_toright)); + _loc3_.addChild(_loc15_); + _loc15_.x = 200; + _loc15_.y = 90; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,180); + _loc3_.addChild(_loc16_); + _loc16_.x = 254; + _loc16_.y = _loc15_.y + 10; + _loc16_.text = "兑换武将经验:1000 × "; + this.input = new UINumInputText(80); + _loc3_.addChild(this.input); + this.input.x = 420; + this.input.y = _loc15_.y + 6; + this.duihuanBtn = new UIButton("兑 换",2); + _loc3_.addChild(this.duihuanBtn); + this.duihuanBtn.x = 522; + this.duihuanBtn.y = _loc15_.y + 6; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250); + _loc3_.addChild(_loc17_); + _loc17_.x = 22; + _loc17_.y = 210; + _loc17_.text = "小提示:4种资源各1千兑换一次武将经验1000"; + this.msgText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,250); + _loc3_.addChild(this.msgText); + this.msgText.x = 400; + this.msgText.y = 160; + this.msgText.text = ""; + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,150); + _loc3_.addChild(this.label5); + this.label5.x = 400; + this.label5.y = 210; + this.label5.text = ""; + this.duihuanBtn.onClick = this.changeExp; + ConnectService.getInstance().addEventListener(AlartEvent.GET_ALART_INFO,this.getAlartViewResult); + ConnectService.getInstance().addEventListener(AlartEvent.GET_ALART_CHANGE,this.changeExpResult); + } + + override public function loadUiData() : void + { + if(this.msgText) + { + this.msgText.text = ""; + } + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + ConnectService.getInstance().castleService.getChangeExpPoolView(); + } + + private function getAlartViewResult(param1:AlartEvent) : void + { + var _loc2_:Object = param1.alartObject; + this.res1.text = _loc2_.wood; + this.res2.text = _loc2_.food; + this.res3.text = _loc2_.stone; + this.res4.text = _loc2_.bronze; + var _loc3_:int = int(_loc2_.maxNum); + var _loc4_:int = int(_loc2_.currNum); + var _loc5_:int = int(_loc2_.expPoint); + var _loc6_:int = int(_loc2_.expLimit); + this.label5.text = "今日已兑换次数:" + _loc4_ + "/" + _loc3_; + this.input.setMaxNum(_loc3_ - _loc4_); + this.expBar.setMaxValue(_loc6_); + this.expBar.setCurValue(_loc5_); + if(_loc4_ >= _loc3_) + { + this.duihuanBtn.setUnEnable(); + } + else + { + this.duihuanBtn.setEnable(); + } + } + + private function changeExp(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ > 0) + { + ConnectService.getInstance().castleService.changeExp(_loc2_); + } + } + + private function changeExpResult(param1:AlartEvent) : void + { + this.duihuanBtn.setEnable(); + if(param1.msg != null) + { + this.msgText.text = param1.msg; + } + this.loadLocalData(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + + private function openMyHero(param1:MouseEvent) : void + { + Control.getInstance().centerMenu.getUserHero(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/Cellar.as b/flash_decompiled/com/view/ui/economic/Cellar.as new file mode 100644 index 0000000..b4eabe2 --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/Cellar.as @@ -0,0 +1,60 @@ +package com.view.ui.economic +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class Cellar extends BaseBuild + { + + public function Cellar(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/Cellar1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/Cellar3.swf"; + buildData.picUrl = "pic/build/Cellar3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/Cellar2.swf"; + buildData.picUrl = "pic/build/Cellar2.png"; + } + else + { + buildData.swfUrl = "pic/build/Cellar1.swf"; + buildData.picUrl = "pic/build/Cellar1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new CellarUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/CellarUI.as b/flash_decompiled/com/view/ui/economic/CellarUI.as new file mode 100644 index 0000000..983c232 --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/CellarUI.as @@ -0,0 +1,93 @@ +package com.view.ui.economic +{ + import com.comfig.ClassConfig; + import com.data.data.city.CastleBuilding; + import com.newdata.user.NewRes; + import com.newdata.user.NewUserData; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.display.MovieClip; + import flash.events.Event; + + public class CellarUI extends BaseUI + { + + private var cellMc:MovieClip; + + public function CellarUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_dijiao); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + this.cellMc = face.getMovieClip(ClassConfig.ui_cellar); + _loc1_.addChild(this.cellMc); + this.cellMc.x = 3; + this.cellMc.y = 3; + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + var _loc1_:CastleBuilding = getBuild().castleBuild; + var _loc2_:NewRes = NewUserData.getRes(); + var _loc3_:int = int(_loc2_.wareCapacity); + var _loc4_:int = _loc1_.entCap.capacity; + var _loc5_:int = int(_loc2_.foodNum); + var _loc6_:int = int(_loc2_.woodNum); + var _loc7_:int = int(_loc2_.stoneNum); + var _loc8_:int = int(_loc2_.bronzeNum); + this.cellMc.ware_txt.text = _loc3_.toString(); + this.cellMc.limit_txt.text = _loc4_.toString(); + this.cellMc.food.txt.text = _loc5_.toString(); + this.cellMc.wood.txt.text = _loc6_.toString(); + this.cellMc.stone.txt.text = _loc7_.toString(); + this.cellMc.bronze.txt.text = _loc8_.toString(); + this.cellMc.food_mc.height = int(160 * _loc5_ / _loc3_); + this.cellMc.food_p.height = int(160 * _loc4_ / _loc3_); + this.cellMc.wood_mc.height = int(160 * _loc6_ / _loc3_); + this.cellMc.wood_p.height = int(160 * _loc4_ / _loc3_); + this.cellMc.stone_mc.height = int(160 * _loc7_ / _loc3_); + this.cellMc.stone_p.height = int(160 * _loc4_ / _loc3_); + this.cellMc.bronze_mc.height = int(160 * _loc8_ / _loc3_); + this.cellMc.bronze_p.height = int(160 * _loc4_ / _loc3_); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/CornerFloor.as b/flash_decompiled/com/view/ui/economic/CornerFloor.as new file mode 100644 index 0000000..4e08462 --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/CornerFloor.as @@ -0,0 +1,60 @@ +package com.view.ui.economic +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class CornerFloor extends BaseBuild + { + + public function CornerFloor(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/CornerFloor1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/CornerFloor3.swf"; + buildData.picUrl = "pic/build/CornerFloor3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/CornerFloor2.swf"; + buildData.picUrl = "pic/build/CornerFloor2.png"; + } + else + { + buildData.swfUrl = "pic/build/CornerFloor1.swf"; + buildData.picUrl = "pic/build/CornerFloor1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new CornerFloorUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/CornerFloorUI.as b/flash_decompiled/com/view/ui/economic/CornerFloorUI.as new file mode 100644 index 0000000..ee327a7 --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/CornerFloorUI.as @@ -0,0 +1,57 @@ +package com.view.ui.economic +{ + import com.view.newui.UICloseBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.events.Event; + + public class CornerFloorUI extends BaseUI + { + + public function CornerFloorUI(param1:BaseBuild) + { + super(); + this.addUIBg(); + super.loadTitle(UITitleConfig.title_jiaolou); + this.setPosition(); + super.setBuild(param1); + createUI(); + } + + override public function getUIHeight() : int + { + return 89; + } + + override public function addUIBg() : void + { + ui_bg = new UIWindowBg(); + ui_bg.initSize(UIWindowBg.normal_window_w,this.getUIHeight() - 20); + ui_closeBtn = new UICloseBtn(); + addChild(ui_bg); + addChild(ui_closeBtn); + ui_closeBtn.onClick = closeUI; + setCloseBtnPosi(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/EcoHouseBuild.as b/flash_decompiled/com/view/ui/economic/EcoHouseBuild.as new file mode 100644 index 0000000..7b2bb45 --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/EcoHouseBuild.as @@ -0,0 +1,60 @@ +package com.view.ui.economic +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class EcoHouseBuild extends BaseBuild + { + + public function EcoHouseBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/ResidenceView1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/ResidenceView3.swf"; + buildData.picUrl = "pic/build/ResidenceView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/ResidenceView2.swf"; + buildData.picUrl = "pic/build/ResidenceView2.png"; + } + else if(castleBuild.level >= 0) + { + buildData.swfUrl = "pic/build/ResidenceView1.swf"; + buildData.picUrl = "pic/build/ResidenceView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new EcoHouseBuildUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/EcoHouseBuildUI.as b/flash_decompiled/com/view/ui/economic/EcoHouseBuildUI.as new file mode 100644 index 0000000..437c9f2 --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/EcoHouseBuildUI.as @@ -0,0 +1,57 @@ +package com.view.ui.economic +{ + import com.view.newui.UICloseBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.events.Event; + + public class EcoHouseBuildUI extends BaseUI + { + + public function EcoHouseBuildUI(param1:BaseBuild) + { + super(); + this.addUIBg(); + super.loadTitle(UITitleConfig.title_minju); + this.setPosition(); + super.setBuild(param1); + createUI(); + } + + override public function addUIBg() : void + { + ui_bg = new UIWindowBg(); + ui_bg.initSize(UIWindowBg.normal_window_w,this.getUIHeight() - 20); + ui_closeBtn = new UICloseBtn(); + addChild(ui_bg); + addChild(ui_closeBtn); + ui_closeBtn.onClick = closeUI; + setCloseBtnPosi(); + } + + override public function getUIHeight() : int + { + return 89; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/EconomicMain.as b/flash_decompiled/com/view/ui/economic/EconomicMain.as new file mode 100644 index 0000000..cc1fb43 --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/EconomicMain.as @@ -0,0 +1,70 @@ +package com.view.ui.economic +{ + import com.comfig.ClassConfig; + import com.view.UIListManage; + import com.view.tip.BuildTipTitle; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.events.MouseEvent; + + public class EconomicMain extends BaseBuild + { + + public function EconomicMain(param1:BuildData) + { + super(); + super.buildData = param1; + markMc = face.getSprite(ClassConfig.ui_economic_bg); + addChild(markMc); + markMc.alpha = 0; + markMc.x = -33; + markMc.y = -30; + } + + override public function setSwfBgUnClick() : void + { + bgSwf.mouseEnabled = false; + } + + override public function setBuildRes() : void + { + if(castleBuild.level >= 0) + { + buildData.swfUrl = "pic/build/ShenNong1.swf"; + buildData.picUrl = "pic/build/ShenNong1.png"; + } + super.loadSwfBg(); + this.addEvent(); + } + + override public function addEvent() : void + { + markMc.addEventListener(MouseEvent.ROLL_OVER,mouseOverBuild); + markMc.addEventListener(MouseEvent.ROLL_OUT,mouseOutBuild); + markMc.addEventListener(MouseEvent.CLICK,mouseClick); + } + + override public function setTipInfo(param1:Object) : void + { + if(tipTitle == null) + { + tipTitle = new BuildTipTitle(markMc,face.stage,face.tip_bg,param1); + } + else + { + tipTitle.infoObject = param1; + } + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new EconomicMainUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/EconomicMainUI.as b/flash_decompiled/com/view/ui/economic/EconomicMainUI.as new file mode 100644 index 0000000..ef2aedd --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/EconomicMainUI.as @@ -0,0 +1,224 @@ +package com.view.ui.economic +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.view.mc.button.Button_9; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.shop.ShopUI; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class EconomicMainUI extends BaseUI + { + + private var reBuildBtn:UIButton; + + private var text3:TextField; + + private var label11:TextField; + + private var numText:TextField; + + public function EconomicMainUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_situshu); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc7_:TextFormat = null; + var _loc9_:UIWindowBg = null; + var _loc12_:TextFormat = null; + var _loc16_:Sprite = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(202,290); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initSecondPanel(397,290); + _loc1_.addChild(_loc3_); + _loc3_.x = 4 + _loc2_.x + _loc2_.width; + _loc3_.y = 4; + var _loc4_:UITitleBg = new UITitleBg("说 明",_loc2_.width); + _loc2_.addChild(_loc4_); + _loc4_.x = int(_loc2_.width / 2 - _loc4_.width / 2); + var _loc5_:UITitleBg = new UITitleBg("改 建",_loc3_.width); + _loc3_.addChild(_loc5_); + _loc5_.x = int(_loc3_.width / 2 - _loc5_.width / 2); + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc6_.height = 250; + _loc6_.wordWrap = true; + _loc6_.multiline = true; + _loc7_ = new TextFormat(); + _loc7_.leading = 4; + _loc2_.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = 35; + _loc6_.defaultTextFormat = _loc7_; + var _loc8_:String = "1、改建开始后需要重新登录游戏。"; + _loc8_ = _loc8_ + "

2、改建过程中,该特区所有功能失效,并且不能中途取消。"; + _loc8_ = _loc8_ + "

3、改建完成后,所有特区建筑等级不变,转为另一种特区的相应建筑。司徒署将改建为司马署,民居将改建为军营,地窖将改建为操练场,工坊将改建为炼丹炉,祭坛将改建为行营。"; + _loc6_.htmlText = _loc8_; + _loc9_ = new UIWindowBg(); + _loc9_.initSecondPanel(88,85); + _loc3_.addChild(_loc9_); + _loc9_.x = 60; + _loc9_.y = 60; + var _loc10_:UIWindowBg = new UIWindowBg(); + _loc10_.initSecondPanel(88,85); + _loc3_.addChild(_loc10_); + _loc10_.x = _loc9_.x + 200; + _loc10_.y = _loc9_.y; + var _loc11_:Sprite = face.getSprite(ClassConfig.lib_ui_town_1); + _loc9_.addChild(_loc11_); + _loc11_.x = 2; + _loc11_.y = 2; + _loc12_ = new TextFormat(); + _loc12_.size = 24; + _loc12_.color = 16777215; + _loc12_.align = "center"; + var _loc13_:TextField = new TextField(); + _loc13_.width = 100; + _loc13_.height = 30; + _loc13_.text = "封邑"; + _loc13_.setTextFormat(_loc12_); + _loc3_.addChild(_loc13_); + _loc13_.x = 60; + _loc13_.y = 156; + var _loc14_:TextField = new TextField(); + _loc14_.width = 110; + _loc14_.height = 30; + _loc14_.text = "军镇"; + _loc14_.setTextFormat(_loc12_); + _loc3_.addChild(_loc14_); + _loc14_.x = 250; + _loc14_.y = 156; + var _loc15_:Sprite = face.getSprite(ClassConfig.lib_ui_town_2); + _loc10_.addChild(_loc15_); + _loc15_.x = 2; + _loc15_.y = 2; + _loc16_ = new Scale9Grid(face.getSprite(ClassConfig.lib_ui_bg_9),80,11); + _loc3_.addChild(_loc16_); + _loc16_.x = 160; + _loc16_.y = 90; + this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,300); + _loc3_.addChild(this.text3); + this.text3.y = 200; + this.text3.x = 80; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc17_.text = "消耗物品:"; + this.label11 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.label11.text = "天工图×2"; + _loc3_.addChild(_loc17_); + _loc17_.x = 20; + _loc17_.y = 250; + _loc3_.addChild(this.label11); + this.label11.x = _loc17_.x + _loc17_.width; + this.label11.y = _loc17_.y; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc18_.text = "当前拥有:"; + _loc3_.addChild(_loc18_); + _loc18_.x = 20; + _loc18_.y = _loc17_.y + 25; + this.numText = PublicMethod.getTextFieldWithFillter(16777215,60); + _loc3_.addChild(this.numText); + this.numText.x = this.label11.x; + this.numText.y = _loc18_.y; + var _loc19_:Button_9 = new Button_9("购买天工图"); + _loc3_.addChild(_loc19_); + _loc19_.x = this.numText.x + this.numText.width; + _loc19_.y = _loc18_.y; + _loc19_.addEventListener(MouseEvent.CLICK,this.buyPropFun); + this.reBuildBtn = new UIButton("改 建",2); + _loc3_.addChild(this.reBuildBtn); + this.reBuildBtn.x = 335; + this.reBuildBtn.y = 265; + this.reBuildBtn.onClick = this.reBuild; + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + ConnectService.getInstance().castleService.getTransInfo(face.currCasId); + } + + private function getTransSucc(param1:CastleEvent) : void + { + var _loc2_:Object = param1.castleObj; + this.text3.htmlText = "中心建筑" + _loc2_.level + "级,若改建为军镇,需要耗时" + PublicMethod.getTimeStr(_loc2_.time) + "."; + this.label11.text = _loc2_.itemName; + this.numText.text = _loc2_.num; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_getTransInfo,this.getTransSucc); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_getTransInfo,this.getTransSucc); + } + + private function buyPropFun(param1:MouseEvent) : void + { + var _loc2_:ShopUI = ShopUI.getInstance(); + _loc2_.open(2); + } + + private function refresh() : void + { + this.loadLocalData(); + } + + private function reBuild(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("改建特区需要消耗天工图,确定改建吗?",this.onsubmit); + } + + private function onsubmit() : void + { + ConnectService.getInstance().castleService.changeBranchCastleType(face.currCasId,"military"); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/Farm.as b/flash_decompiled/com/view/ui/economic/Farm.as new file mode 100644 index 0000000..67a6c2e --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/Farm.as @@ -0,0 +1,60 @@ +package com.view.ui.economic +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class Farm extends BaseBuild + { + + public function Farm(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/Farm1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/Farm3.swf"; + buildData.picUrl = "pic/build/Farm3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/Farm2.swf"; + buildData.picUrl = "pic/build/Farm2.png"; + } + else + { + buildData.swfUrl = "pic/build/Farm1.swf"; + buildData.picUrl = "pic/build/Farm1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new FarmUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/economic/FarmUI.as b/flash_decompiled/com/view/ui/economic/FarmUI.as new file mode 100644 index 0000000..81095db --- /dev/null +++ b/flash_decompiled/com/view/ui/economic/FarmUI.as @@ -0,0 +1,57 @@ +package com.view.ui.economic +{ + import com.view.newui.UICloseBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.events.Event; + + public class FarmUI extends BaseUI + { + + public function FarmUI(param1:BaseBuild) + { + super(); + this.addUIBg(); + super.loadTitle(UITitleConfig.title_gongfang); + this.setPosition(); + super.setBuild(param1); + createUI(); + } + + override public function getUIHeight() : int + { + return 89; + } + + override public function addUIBg() : void + { + ui_bg = new UIWindowBg(); + ui_bg.initSize(UIWindowBg.normal_window_w,this.getUIHeight() - 20); + ui_closeBtn = new UICloseBtn(); + addChild(ui_bg); + addChild(ui_closeBtn); + ui_closeBtn.onClick = closeUI; + setCloseBtnPosi(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/BaseFarm.as b/flash_decompiled/com/view/ui/farm/BaseFarm.as new file mode 100644 index 0000000..f11dc51 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/BaseFarm.as @@ -0,0 +1,472 @@ +package com.view.ui.farm +{ + import com.comfig.ServerConfig; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.farm.event.FarmSeedEvent; + import com.control.farm.event.UserFarmEvent; + import com.data.DataModoule; + import com.data.data.city.Castle; + import com.data.data.farm.UserFarmType; + import com.events.DevEvent; + import com.newdata.user.NewPop; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.utils.ExtMath; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.ui.BaseUI; + import com.view.ui.farm.data.UserFarmAdditionDataList; + import com.view.ui.farm.data.UserFarmTreeData; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.net.URLRequest; + import flash.utils.Dictionary; + + public class BaseFarm extends BaseUI + { + + public static var _wight:int = 104; + + public static var _hight:int = 58; + + public var hasLoadRes:Boolean; + + public var userFarmAdditionDataList:UserFarmAdditionDataList; + + public var userFarmTreeData:UserFarmTreeData; + + public var seedDic:Dictionary; + + private var isLoad:Boolean; + + public var range_arr:Array; + + public function BaseFarm() + { + super(); + this.userFarmAdditionDataList = new UserFarmAdditionDataList(); + this.userFarmTreeData = new UserFarmTreeData(); + this.range_arr = []; + var _loc1_:int = 0; + while(_loc1_ < 16) + { + this.range_arr[_loc1_] = []; + _loc1_ += 1; + } + this.range_arr[0] = [[0,0],[0,1],[0,-1],[-1,0],[1,0]]; + this.range_arr[1] = [[-1,1],[1,1],[-1,-1],[1,-1]]; + this.range_arr[2] = [[0,2],[0,-2],[2,0],[-2,0]]; + this.range_arr[3] = [[0,3],[0,-3],[3,0],[-3,0]]; + this.range_arr[4] = [[-1,2],[2,1],[-2,-1],[1,-2]]; + this.range_arr[5] = [[1,2],[-2,1],[2,-1],[-1,-2]]; + this.range_arr[6] = [[0,4],[-4,0],[4,0],[0,-4]]; + this.range_arr[7] = [[-2,2],[2,2],[-2,-2],[2,-2]]; + this.range_arr[8] = [[-1,3],[3,1],[-3,-1],[1,-3]]; + this.range_arr[9] = [[1,3],[-3,1],[3,-1],[-1,-3]]; + this.range_arr[10] = [[-1,4],[4,1],[-4,-1],[1,-4]]; + this.range_arr[11] = [[1,4],[-4,1],[4,-1],[-1,-4]]; + this.range_arr[12] = [[-2,3],[2,3],[-3,2],[3,2],[-3,-2],[3,-2],[-2,-3],[2,-3]]; + this.range_arr[13] = [[0,5],[-3,3],[3,3],[5,0],[-5,0],[-3,-3],[3,-3],[0,-5]]; + this.range_arr[14] = [[-1,5],[1,5],[-5,1],[5,1],[-5,-1],[5,-1],[-1,-5],[1,-5]]; + this.range_arr[15] = [[0,6],[-2,4],[2,4],[-4,2],[4,2],[-6,0],[6,0],[-4,-2],[4,-2],[-2,-4],[2,-4],[0,-6]]; + } + + public function loadRes() : void + { + var _loc1_:String = null; + var _loc2_:URLRequest = null; + if(_loaderInfo == null) + { + _loc1_ = ServerConfig.getFarmSwf(); + _loc2_ = new URLRequest(_loc1_); + super.loadUIResource(_loc2_); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_enterFarm,this.getFarmDateSucc); + ConnectService.getInstance().addEventListener(FarmSeedEvent.SEED_LIST,this.getSeedListSucc); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_startPlant,this.startPlantOnFarmAreaSucc); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_quanzheng,this.harvestPlantOnFarmAreaAllSucc); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_enterOtherFarm,this.enterSucc); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_lidi,this.clearFarmAreaResult); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_zhengshou,this.harvestPlantOnFarmAreaResult); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_qiangzheng,this.harvestCompulsoryResult); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_steal,this.stealAreaOfOtherFarmResult); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_stealAll,this.harvestPlantOthersResult); + Utils.g_events.addEventListener(DevEvent.AlERT,this.getAlertResult); + Utils.g_events.addEventListener(DevEvent.POPCHANGE,this.popChange); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_harvestFarmTree,this.harvestUserFarmTreeResult); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_waterFarmTree,this.waterFarmTreeResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_enterFarm,this.getFarmDateSucc); + ConnectService.getInstance().removeEventListener(FarmSeedEvent.SEED_LIST,this.getSeedListSucc); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_startPlant,this.startPlantOnFarmAreaSucc); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_quanzheng,this.harvestPlantOnFarmAreaAllSucc); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_enterOtherFarm,this.enterSucc); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_lidi,this.clearFarmAreaResult); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_zhengshou,this.harvestPlantOnFarmAreaResult); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_qiangzheng,this.harvestCompulsoryResult); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_steal,this.stealAreaOfOtherFarmResult); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_stealAll,this.harvestPlantOthersResult); + Utils.g_events.removeEventListener(DevEvent.AlERT,this.getAlertResult); + Utils.g_events.removeEventListener(DevEvent.POPCHANGE,this.popChange); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_harvestFarmTree,this.harvestUserFarmTreeResult); + ConnectService.getInstance().removeEventListener(UserFarmEvent.FARM_waterFarmTree,this.waterFarmTreeResult); + } + + public function popChange(param1:DevEvent) : void + { + } + + public function getUserId() : int + { + return NewUserData.getUser().userId; + } + + public function getUser() : NewUser + { + return NewUserData.getUser(); + } + + public function getPopulation() : NewPop + { + return NewUserData.getNewPop(); + } + + public function getCastle() : Castle + { + return DataModoule.getInstance().userMgr.castle; + } + + public function enterFarm(param1:int) : void + { + ConnectService.getInstance().farmService.enterFarm(param1); + } + + public function getFarmDateSucc(param1:UserFarmEvent) : void + { + } + + public function getSeedData() : void + { + ConnectService.getInstance().farmService.getSeedData(); + } + + public function getSeedListSucc(param1:FarmSeedEvent) : void + { + var _loc2_:UserFarmType = null; + this.seedDic = new Dictionary(); + for each(_loc2_ in param1.seedArr) + { + this.seedDic[_loc2_.id] = _loc2_; + } + } + + public function startPlantOnFarmArea(param1:int, param2:int, param3:int) : void + { + ConnectService.getInstance().farmService.startPlantOnFarmArea(param1,param2,param3); + } + + public function startPlantOnFarmAreaSucc(param1:UserFarmEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + this.fresh(); + } + else + { + this.rushSucc(param1.farmData); + } + } + + public function harvestPlantOnFarmAreaAll() : void + { + if(this.isLoad) + { + return; + } + this.isLoad = true; + LoadingMc.getInstance().show(); + ConnectService.getInstance().farmService.harvestPlantOnFarmAreaAll(); + } + + public function harvestPlantOnFarmAreaAllSucc(param1:UserFarmEvent) : void + { + LoadingMc.getInstance().unShow(); + this.isLoad = false; + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + this.refreshAll({"data":param1.list},0,true); + } + + public function enterOtherFarm(param1:int) : void + { + ConnectService.getInstance().farmService.enterOtherFarm(param1); + } + + public function enterSucc(param1:UserFarmEvent) : void + { + } + + public function clearFarmArea(param1:int, param2:int) : void + { + ConnectService.getInstance().farmService.clearFarmArea(param1,param2); + } + + public function clearFarmAreaResult(param1:UserFarmEvent) : void + { + var _loc2_:* = undefined; + if(param1.result == ReturnBean.STATUS_4) + { + _loc2_ = this.getPix(param1.posX,param1.posY); + this.onfail(param1.msg,_loc2_.x,_loc2_.y); + } + else + { + this.rushSucc(param1.farmData); + } + } + + public function harvestPlantOnFarmArea(param1:String, param2:String) : void + { + ConnectService.getInstance().farmService.harvestPlantOnFarmArea(param1,param2); + } + + private function harvestPlantOnFarmAreaResult(param1:UserFarmEvent) : void + { + var _loc2_:* = undefined; + if(param1.result == ReturnBean.STATUS_4) + { + _loc2_ = this.getPix(param1.posX,param1.posY); + this.onfail(param1.msg,_loc2_.x,_loc2_.y); + } + else + { + this.rushSucc(param1.farmData); + } + } + + public function harvestCompulsory(param1:String, param2:String) : void + { + ConnectService.getInstance().farmService.harvestCompulsory(param1,param2); + } + + private function harvestCompulsoryResult(param1:UserFarmEvent) : void + { + var _loc2_:* = undefined; + if(param1.result == ReturnBean.STATUS_4) + { + _loc2_ = this.getPix(param1.posX,param1.posY); + this.onfail(param1.msg,_loc2_.x,_loc2_.y); + } + else + { + this.rushSucc(param1.farmData); + } + } + + public function stealAreaOfOtherFarm(param1:int, param2:int, param3:int) : void + { + ConnectService.getInstance().farmService.stealAreaOfOtherFarm(param1,param2,param3); + } + + private function stealAreaOfOtherFarmResult(param1:UserFarmEvent) : void + { + var _loc2_:* = undefined; + if(param1.result == ReturnBean.STATUS_4) + { + _loc2_ = this.getPix(param1.posX,param1.posY); + this.onfail(param1.msg,_loc2_.x,_loc2_.y); + } + else + { + this.rushSucc(param1.farmData); + } + } + + public function harvestPlantOthers(param1:int) : void + { + if(this.isLoad) + { + return; + } + LoadingMc.getInstance().show(); + this.isLoad = true; + ConnectService.getInstance().farmService.harvestPlantOthers(param1); + } + + public function harvestPlantOthersResult(param1:UserFarmEvent) : void + { + this.isLoad = false; + LoadingMc.getInstance().unShow(); + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + } + else + { + this.refreshAll({"data":param1.list},0,true); + } + } + + public function harvestUserFarmTree() : void + { + ConnectService.getInstance().farmService.harvestUserFarmTree(); + } + + public function harvestUserFarmTreeResult(param1:UserFarmEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + this.fresh(); + } + else + { + this.treeMessageSucc({"data":param1.farmData}); + } + } + + public function waterFarmTree(param1:int) : void + { + ConnectService.getInstance().farmService.waterFarmTree(param1); + } + + public function waterFarmTreeResult(param1:UserFarmEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + this.fresh(); + } + else + { + this.treeMessageSucc({"data":param1.farmData}); + } + } + + public function treeMessageSucc(param1:Object) : void + { + } + + public function refreshAll(param1:Object, param2:int = 0, param3:Boolean = false) : void + { + } + + public function fresh() : void + { + } + + public function rushSucc(param1:Object) : void + { + } + + public function onfail(param1:String, param2:int, param3:int, param4:Boolean = false) : void + { + } + + public function mouseOutBtn(param1:MouseEvent) : void + { + param1.target.gotoAndStop(1); + } + + public function mouseOverBtn(param1:MouseEvent) : void + { + param1.target.gotoAndStop(2); + } + + public function mouseDownBtn(param1:MouseEvent) : void + { + param1.target.gotoAndStop(3); + } + + public function mouseUpBtn(param1:MouseEvent) : void + { + param1.target.gotoAndStop(2); + } + + public function getPix(param1:Number, param2:Number) : Object + { + var _loc3_:* = new Object(); + var _loc4_:* = -param2 * 104 / 2; + var _loc5_:* = -1 / 2 * _loc4_; + var _loc6_:* = _loc4_ + param1 * 104 / 2; + var _loc7_:* = _loc5_ + param1 * 58 / 2; + _loc6_ -= 104 / 2; + _loc7_ -= 58 / 2; + _loc3_.x = _loc6_; + _loc3_.y = _loc7_; + return _loc3_; + } + + public function getSeedById(param1:int) : UserFarmType + { + return this.seedDic[param1]; + } + + public function getGlobalXY(param1:Number, param2:Number) : Object + { + var _loc3_:* = 0; + var _loc4_:* = 0; + var _loc5_:* = 0; + var _loc6_:* = 0; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:* = _wight; + var _loc10_:* = _hight; + var _loc11_:* = _hight * Math.sqrt(5) / 2; + var _loc12_:* = 0; + var _loc13_:* = 0; + var _loc14_:* = param2 - 1 / 2 * param1; + var _loc15_:* = param2 + 1 / 2 * param1; + var _loc16_:* = -(param2 - 1 / 2 * param1); + var _loc17_:* = -1 / 2 * _loc16_; + var _loc18_:* = ExtMath.distance(0,0,_loc16_,_loc17_); + var _loc19_:* = ExtMath.distance(_loc16_,_loc17_,param1,param2); + if(ExtMath.distance(_loc16_,_loc17_,param1,param2) < _loc11_ / 2) + { + _loc19_ = _loc11_ / 2; + } + if(_loc18_ < _loc11_ / 2) + { + _loc18_ = _loc11_ / 2; + } + _loc5_ = Math.ceil((_loc19_ - _loc11_ / 2) / _loc11_); + _loc6_ = Math.ceil((_loc18_ - _loc11_ / 2) / _loc11_); + if(_loc14_ < 0) + { + _loc6_ *= -1; + } + if(_loc15_ < 0) + { + _loc5_ *= -1; + } + _loc7_ = _loc5_; + _loc8_ = _loc6_; + var _loc20_:* = new Object(); + _loc20_.relX = _loc7_; + _loc20_.relY = _loc8_; + _loc20_.x = _loc7_ + 9; + _loc20_.y = _loc8_ + 9; + return _loc20_; + } + + public function getAlertResult(param1:DevEvent) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FarmAlertMessage.as b/flash_decompiled/com/view/ui/farm/FarmAlertMessage.as new file mode 100644 index 0000000..ffd9595 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FarmAlertMessage.as @@ -0,0 +1,20 @@ +package com.view.ui.farm +{ + public class FarmAlertMessage + { + + public static var NOTNULLEARE:String = "该地块已经开工。"; + + public static var ZHENGSHOUSHIBAI:String = "该地块没有完工,不能进行征收。"; + + public static var QUANSHOUSHIBAI:String = "没有可以征收的资源。"; + + public static var KAIGONGSHIBAI:String = "空闲人口不足400,请建民居并增丁。"; + + public function FarmAlertMessage() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FarmFriendUI.as b/flash_decompiled/com/view/ui/farm/FarmFriendUI.as new file mode 100644 index 0000000..89d8b49 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FarmFriendUI.as @@ -0,0 +1,231 @@ +package com.view.ui.farm +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.farm.event.UserFarmEvent; + import com.greensock.TweenMax; + import com.view.newui.UIButton; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class FarmFriendUI extends Sprite + { + + private var farmUI:FarmView; + + private var openStatus:Boolean = true; + + private var farm_friend:MovieClip; + + private var _changeFun:Function; + + private var index:int = 1; + + private var type:int = 2; + + private var maxCount:int = 1; + + private var friendList:Vector.; + + private var lastFriendItem:FriendListItem; + + public function FarmFriendUI() + { + var _loc2_:int = 0; + var _loc3_:FriendListItem = null; + this.farmUI = FarmView.getInstance(); + super(); + this.farm_friend = this.farmUI.getMovieClip(ClassConfig.farm_friend); + this.farm_friend.btnMc.gotoAndStop(1); + this.farm_friend.label1.mouseEnabled = false; + this.farm_friend.label2.mouseEnabled = false; + this.farm_friend.friend_btn.buttonMode = true; + this.farm_friend.friend_btn.gotoAndStop(3); + this.farm_friend.friend_btn.addEventListener(MouseEvent.CLICK,this.typeShow,false,0,true); + this.farm_friend.chouren_btn.buttonMode = true; + this.farm_friend.chouren_btn.gotoAndStop(1); + this.farm_friend.chouren_btn.addEventListener(MouseEvent.CLICK,this.typeShow,false,0,true); + this.farm_friend.pre_btn.gotoAndStop(1); + this.farm_friend.next_btn.gotoAndStop(1); + this.farm_friend.btnMc.buttonMode = true; + this.farm_friend.btnMc.addEventListener(MouseEvent.CLICK,this.openFriendUI); + addChild(this.farm_friend); + this.farm_friend.pre_btn.buttonMode = true; + this.farm_friend.pre_btn.addEventListener(MouseEvent.CLICK,this.__prev,false,0,true); + this.farm_friend.next_btn.buttonMode = true; + this.farm_friend.next_btn.addEventListener(MouseEvent.CLICK,this.__next,false,0,true); + var _loc1_:UIButton = new UIButton("刷 新",2,10); + this.farm_friend.addChild(_loc1_); + _loc1_.x = 88; + _loc1_.y = 352; + _loc1_.onClick = this.flush; + this.friendList = new Vector.(); + _loc2_ = 0; + while(_loc2_ < 12) + { + _loc3_ = new FriendListItem(); + this.friendList.push(_loc3_); + this.farm_friend.addChild(_loc3_); + _loc3_.x = 37; + _loc3_.y = 34 + _loc2_ * 23.7; + _loc3_.addEventListener(MouseEvent.CLICK,this.changeUser,false,0,true); + _loc2_++; + } + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_getFriendInfo,this.getListSucc); + } + + private function openFriendUI(param1:MouseEvent) : void + { + if(this.openStatus) + { + this.openStatus = false; + this.farm_friend.btnMc.gotoAndStop(2); + TweenMax.to(this.farm_friend,0.4,{"x":180}); + } + else + { + this.openStatus = true; + this.farm_friend.btnMc.gotoAndStop(1); + TweenMax.to(this.farm_friend,0.4,{"x":0}); + } + } + + private function typeShow(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ == this.farm_friend.friend_btn) + { + this.type = 2; + this.farm_friend.friend_btn.gotoAndStop(3); + this.farm_friend.chouren_btn.gotoAndStop(1); + } + else + { + this.type = 1; + this.farm_friend.friend_btn.gotoAndStop(1); + this.farm_friend.chouren_btn.gotoAndStop(3); + } + this.index = 1; + this.list(); + } + + public function setChangeFun(param1:Function) : void + { + this._changeFun = param1; + } + + private function changeUser(param1:MouseEvent) : void + { + if(this.lastFriendItem != null) + { + this.lastFriendItem.setUnSelect(); + } + this.lastFriendItem = param1.currentTarget as FriendListItem; + this.lastFriendItem.setSelect(); + if(this._changeFun != null) + { + this._changeFun(this.lastFriendItem.friendId); + } + } + + public function delStealIcon() : void + { + if(this.lastFriendItem) + { + this.lastFriendItem.hiddenStealIcon(); + } + } + + public function delWaterIcon() : void + { + if(this.lastFriendItem) + { + this.lastFriendItem.hiddenWaterIcon(); + } + } + + private function flush(param1:MouseEvent) : void + { + this.list(); + } + + private function __prev(param1:MouseEvent) : void + { + if(this.index - 1 <= 0) + { + return; + } + --this.index; + this.list(); + } + + private function __next(param1:MouseEvent) : void + { + if(this.index + 1 > this.maxCount) + { + return; + } + this.index += 1; + this.list(); + } + + public function list() : void + { + ConnectService.getInstance().farmService.getFriendInfo(this.index,this.type); + } + + private function getListSucc(param1:UserFarmEvent) : void + { + var _loc4_:* = undefined; + var _loc2_:Object = param1.farmData; + if(_loc2_.type != this.type) + { + return; + } + if(this.index != _loc2_.pageNo) + { + return; + } + this.maxCount = Math.max(1,_loc2_.pageCount); + this.farm_friend.page_txt.text = this.index + "/" + this.maxCount; + this.init(); + var _loc3_:Array = _loc2_.friendList; + for(_loc4_ in this.friendList) + { + this.friendList[_loc4_].setUnSelect(); + this.friendList[_loc4_].update(_loc3_[_loc4_]); + } + } + + private function init() : void + { + if(this.maxCount == 1) + { + PublicMethod.setBlack(this.farm_friend.pre_btn); + PublicMethod.setBlack(this.farm_friend.next_btn); + } + else + { + if(this.index == 1) + { + PublicMethod.setBlack(this.farm_friend.pre_btn); + } + else + { + PublicMethod.setColor(this.farm_friend.pre_btn); + } + if(this.index == this.maxCount) + { + PublicMethod.setBlack(this.farm_friend.next_btn); + } + else + { + PublicMethod.setColor(this.farm_friend.next_btn); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FarmMessItem.as b/flash_decompiled/com/view/ui/farm/FarmMessItem.as new file mode 100644 index 0000000..2130c03 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FarmMessItem.as @@ -0,0 +1,83 @@ +package com.view.ui.farm +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class FarmMessItem extends Sprite + { + + private var label:TextField; + + private var timeText:TextField; + + private var bg:Sprite; + + private var line:Sprite; + + private var obj:Object; + + public function FarmMessItem() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,620,24); + addChild(this.bg); + this.bg.alpha = 0.3; + this.timeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,125); + addChild(this.timeText); + this.timeText.y = 4; + this.timeText.x = 6; + this.line = PublicMethod.getTrLine(622); + addChild(this.line); + this.label = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,450); + addChild(this.label); + this.label.x = this.timeText.x + this.timeText.width; + this.label.y = this.timeText.y; + this.label.mouseEnabled = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.bg.visible = false; + } + + public function update(param1:Object) : void + { + this.obj = param1; + if(this.obj == null) + { + this.bg.visible = false; + this.timeText.text = ""; + this.label.htmlText = ""; + } + else + { + this.timeText.text = this.obj.date; + this.label.htmlText = this.obj.mes; + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = true; + } + } + + public function clear() : void + { + removeEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + removeEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FarmMessage.as b/flash_decompiled/com/view/ui/farm/FarmMessage.as new file mode 100644 index 0000000..5f5dcf4 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FarmMessage.as @@ -0,0 +1,131 @@ +package com.view.ui.farm +{ + import com.control.ConnectService; + import com.control.farm.event.UserFarmEvent; + 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.MouseEvent; + + public class FarmMessage extends BaseUI + { + + private var bg2:Sprite; + + private var messListVec:Vector.; + + private var messScrollPane:ScrollPane; + + private var messListMc:Sprite; + + public function FarmMessage() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_nongchangdongtai); + this.setPosition(); + this.createUI(); + } + + override public function setPosition() : void + { + } + + override public function createUI() : void + { + var _loc6_:FarmMessItem = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["发生时间","发生事件"]; + var _loc3_:Array = [130,504]; + var _loc4_:UITable = new UITable(); + _loc4_.drawLine = false; + _loc4_.install(15,_loc2_,_loc3_); + _loc1_.addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 4; + this.messListVec = new Vector.(); + this.messScrollPane = new ScrollPane(); + this.messScrollPane.setSize(630,375); + this.messScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc4_.addChild(this.messScrollPane); + this.messScrollPane.y = 25; + this.messListMc = new Sprite(); + this.messScrollPane.source = this.messListMc; + var _loc5_:int = 0; + while(_loc5_ < 15) + { + _loc6_ = new FarmMessItem(); + this.messListMc.addChild(_loc6_); + this.messListVec.push(_loc6_); + _loc6_.y = _loc5_ * 25; + _loc6_.x = 4; + _loc5_++; + } + this.messScrollPane.update(); + ConnectService.getInstance().addEventListener(UserFarmEvent.FARM_getMessList,this.getMessListResult); + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function getMessList() : void + { + ConnectService.getInstance().farmService.getFarmMesOfUser(); + } + + private function clearMessList() : void + { + var _loc1_:int = int(this.messListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ < 15) + { + this.messListVec[_loc2_].update(null); + } + else + { + this.messListVec[_loc2_].clear(); + this.messListMc.removeChild(this.messListVec[_loc2_]); + this.messListVec.splice(_loc2_,1); + } + _loc2_--; + } + this.messScrollPane.update(); + } + + private function getMessListResult(param1:UserFarmEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:FarmMessItem = null; + var _loc2_:Array = param1.list; + this.clearMessList(); + for(_loc3_ in _loc2_) + { + if(_loc3_ > 14) + { + _loc4_ = new FarmMessItem(); + this.messListMc.addChild(_loc4_); + this.messListVec.push(_loc4_); + _loc4_.y = _loc3_ * 24; + } + this.messListVec[_loc3_].update(_loc2_[_loc3_]); + } + this.messScrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FarmPackageItem.as b/flash_decompiled/com/view/ui/farm/FarmPackageItem.as new file mode 100644 index 0000000..8b6a1c5 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FarmPackageItem.as @@ -0,0 +1,75 @@ +package com.view.ui.farm +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.utils.HashMap; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.events.Event; + + public class FarmPackageItem extends MovieClip + { + + private var map:HashMap; + + private var imgUrl:String; + + public var imgName:String; + + private var _typeId:int; + + private var head_mc:LoadResource; + + private var seedPng:Bitmap; + + public function FarmPackageItem() + { + super(); + } + + public function removed(param1:Event) : void + { + this.clear(); + } + + public function upData(param1:String) : void + { + this.imgName = param1 + ".png"; + buttonMode = true; + this.initData(); + } + + public function clear() : void + { + } + + public function get typeId() : int + { + return this._typeId; + } + + public function set typeId(param1:int) : void + { + this._typeId = param1; + } + + private function initData() : void + { + this.imgUrl = ServerConfig.IMG_SEED_URL + this.imgName; + this.head_mc = new LoadResource(this.imgUrl,this.loadBack); + this.tip(); + } + + private function loadBack(param1:Event) : void + { + this.seedPng = Bitmap(param1.target.loader.content); + this.head_mc.clear(); + addChild(this.seedPng); + } + + private function tip() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FarmPlot.as b/flash_decompiled/com/view/ui/farm/FarmPlot.as new file mode 100644 index 0000000..3751f89 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FarmPlot.as @@ -0,0 +1,307 @@ +package com.view.ui.farm +{ + import com.comfig.ClassConfig; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + + public class FarmPlot extends Sprite + { + + private var farmView:FarmView = FarmView.getInstance(); + + private var xx:int = 0; + + private var _isEmpty:int; + + private var bmp:Bitmap; + + public var plotName:String; + + private var _standYeild:int; + + private var _status:int; + + private var _curYeild:int; + + private var yy:int = 0; + + private var _resType:int; + + private var _nowYeild:int; + + private var _flag:int; + + public var statusType:int; + + private var _tooltipStr:String; + + private var _selfPosX:int; + + private var _selfPosY:int; + + public var _isNext:Boolean = false; + + private var _needTime:int = 0; + + private var _posX:int; + + private var _posY:int; + + private var _remainTime:int; + + private var bmpd:BitmapData; + + public function FarmPlot(param1:int) + { + super(); + this.bmp = new Bitmap(); + this._flag = param1; + switch(param1) + { + case 0: + this.statusType = 0; + this.plotName = "空地"; + this.bmpd = this.farmView.getPng(ClassConfig.NullPlace); + break; + case 1: + this.statusType = 1; + this.plotName = "战乱"; + this.bmpd = this.farmView.getPng(ClassConfig.WarPlace); + break; + case 2: + this.statusType = 2; + this.plotName = "下级开启"; + this.bmpd = this.farmView.getPng(ClassConfig.NextPlace); + break; + case 3: + this.statusType = 3; + this.plotName = "麦子生长"; + this.bmpd = this.farmView.getPng(ClassConfig.MaiZi); + this.xx = -5; + this.yy = -3.6; + break; + case 4: + this.statusType = 4; + this.plotName = "麦子成熟"; + this.bmpd = this.farmView.getPng(ClassConfig.MaiZiShu); + this.xx = -6; + this.yy = -11; + break; + case 5: + this.statusType = 5; + this.plotName = "木材生长"; + this.bmpd = this.farmView.getPng(ClassConfig.MuCai); + this.yy = -31.5; + break; + case 6: + this.statusType = 6; + this.plotName = "木材成熟"; + this.bmpd = this.farmView.getPng(ClassConfig.MuCaiShu); + this.yy = -11; + break; + case 7: + this.statusType = 7; + this.plotName = "石头生长"; + this.bmpd = this.farmView.getPng(ClassConfig.ShiTou); + this.xx = -7; + this.yy = -28.5; + break; + case 8: + this.statusType = 8; + this.plotName = "石头成熟"; + this.bmpd = this.farmView.getPng(ClassConfig.ShiTouShu); + break; + case 9: + this.statusType = 9; + this.plotName = "青铜生长"; + this.bmpd = this.farmView.getPng(ClassConfig.QingTong); + this.xx = -7; + this.yy = -18.5; + break; + case 10: + this.statusType = 10; + this.plotName = "青铜成熟"; + this.bmpd = this.farmView.getPng(ClassConfig.QingTongShu); + this.xx = 3; + this.yy = -7; + break; + case 11: + this.statusType = 11; + this.plotName = "青铜种子"; + this.bmpd = this.farmView.getPng(ClassConfig.QingTongSeed); + break; + case 12: + this.statusType = 12; + this.plotName = "石头种子"; + this.bmpd = this.farmView.getPng(ClassConfig.StoneSeed); + break; + case 13: + this.statusType = 13; + this.plotName = "粮食种子"; + this.bmpd = this.farmView.getPng(ClassConfig.FoodSeed); + break; + case 14: + this.statusType = 14; + this.plotName = "木材种子"; + this.bmpd = this.farmView.getPng(ClassConfig.WoodSeed); + } + if(this.bmpd != null) + { + this.bmp.bitmapData = this.bmpd; + this.addChild(this.bmp); + } + } + + public function set isNext(param1:*) : void + { + this._isNext = param1; + } + + public function set isEmpty(param1:*) : void + { + this._isEmpty = param1; + } + + public function set tooltipStr(param1:*) : void + { + this._tooltipStr = param1; + } + + public function get posX() : int + { + return this._posX; + } + + public function set posX(param1:*) : void + { + this._posX = param1; + } + + public function get needTime() : int + { + return this._needTime; + } + + public function set needTime(param1:int) : void + { + this._needTime = param1; + } + + public function set posY(param1:*) : void + { + this._posY = param1; + } + + public function get posY() : int + { + return this._posY; + } + + public function get tooltipStr() : String + { + return this._tooltipStr; + } + + public function set remainTime(param1:*) : void + { + this._remainTime = param1; + } + + public function get curYeild() : int + { + return this._curYeild; + } + + public function get isNext() : Boolean + { + return this._isNext; + } + + public function getStatusType() : int + { + return this.statusType; + } + + public function get isEmpty() : int + { + return this._isEmpty; + } + + public function set standYeild(param1:*) : void + { + this._standYeild = param1; + } + + public function set nowYeild(param1:*) : void + { + this._nowYeild = param1; + } + + public function get remainTime() : int + { + return this._remainTime; + } + + public function get standYeild() : int + { + return this._standYeild; + } + + public function set selfPosX(param1:int) : void + { + this._selfPosX = param1; + } + + public function get nowYeild() : int + { + return this._nowYeild; + } + + public function set selfPosY(param1:int) : void + { + this._selfPosY = param1; + } + + public function set curYeild(param1:*) : void + { + this._curYeild = param1; + } + + public function set status(param1:*) : void + { + this._status = param1; + } + + public function get flag() : int + { + return this._flag; + } + + public function get selfPosY() : int + { + return this._selfPosY; + } + + public function get status() : int + { + return this._status; + } + + public function set resType(param1:*) : void + { + this._resType = param1; + } + + public function get selfPosX() : int + { + return this._selfPosX; + } + + public function get resType() : int + { + return this._resType; + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FarmRule.as b/flash_decompiled/com/view/ui/farm/FarmRule.as new file mode 100644 index 0000000..0271aac --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FarmRule.as @@ -0,0 +1,31 @@ +package com.view.ui.farm +{ + import com.comfig.ClassConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + + public class FarmRule extends UIWindowBg + { + + private var farm:FarmView = FarmView.getInstance(); + + private var bg:Sprite; + + private var str1:String = ""; + + public function FarmRule() + { + super(); + initSize(190,350); + loadTitle(UITitleConfig.title_nongchangguize); + addCloseBtn(); + initBg(); + var _loc1_:Sprite = this.farm.getSprite(ClassConfig.farm_rule); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FarmView.as b/flash_decompiled/com/view/ui/farm/FarmView.as new file mode 100644 index 0000000..f5ad859 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FarmView.as @@ -0,0 +1,1881 @@ +package com.view.ui.farm +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.data.ReturnBean; + import com.control.farm.event.FarmSeedEvent; + import com.control.farm.event.UserFarmEvent; + import com.data.GameData; + import com.data.data.farm.UserFarmType; + import com.events.DevEvent; + import com.utils.GC; + import com.utils.HashMap; + import com.utils.Utils; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.farm.data.UserFarmAdditionData; + import com.view.ui.farm.data.UserFarmAreaData; + import com.view.ui.farm.data.UserFarmPlantData; + import com.view.ui.message.MessageBoxUI; + import com.view.world.EmptyContainer; + import com.view.world.ToolTip; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + 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.ui.Mouse; + import flash.utils.clearInterval; + import flash.utils.setInterval; + import flash.utils.setTimeout; + + public class FarmView extends BaseFarm + { + + private static var instance:FarmView; + + public var currentUserId:int = 0; + + private var m_isClose:Boolean; + + private var farmBg:Sprite; + + private var ui_width:int = 840; + + private var ui_height:int = 507; + + private var farm_info:MovieClip; + + private var controlMc:Sprite; + + private var farm_rightCon:MovieClip; + + private var farm_control:MovieClip; + + private var btnArr:Array; + + private var areaMap:HashMap; + + private var plantMap:HashMap; + + private var farmHash:HashMap; + + private var mycontainer:EmptyContainer; + + private var farmPlotMcMap:HashMap; + + private var mouseContainer:MovieClip; + + private var plantTip:ToolTip; + + private var lastFarmPlot:FarmPlot; + + private var package_mc:PackageList; + + private var isLianXu:Boolean; + + private var lastTypeBtn:MovieClip; + + private var treeContainerMc:EmptyContainer; + + private var resourceMessageArr:Array; + + private var lastUserId:int = -1; + + private var farm_friend:FarmFriendUI; + + private var farm_rule:FarmRule; + + private var farmMessage:FarmMessage; + + public var treeContainer_mc:EmptyContainer; + + private var treeMc:TreeMc; + + public function FarmView() + { + super(); + if(instance != null) + { + throw new Error("此类是一个单例,无法为它创建实例"); + } + this.areaMap = new HashMap(); + this.plantMap = new HashMap(); + this.farmHash = new HashMap(); + this.farmPlotMcMap = new HashMap(); + loadRes(); + } + + public static function getInstance() : FarmView + { + if(instance == null) + { + return instance = new FarmView(); + } + return instance; + } + + override public function loadUiComplete(param1:Event) : void + { + super.loadUiComplete(param1); + this.createUI(); + hasLoadRes = true; + this.show(); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 326; + window_heihgt = UIWindowBg.normal_window_h + 150; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 326; + ui_closeBtn.y = 10; + } + + override public function createUI() : void + { + var _loc1_:UIWindowBg = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_wodenongchang); + super.setPosition(); + _loc1_ = new UIWindowBg(); + _loc1_.initSecondPanel(630 + 326,400 + 150); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.btnArr = new Array(); + this.farmBg = getSprite(ClassConfig.farm_bg); + _loc1_.addChild(this.farmBg); + this.mycontainer = new EmptyContainer(); + _loc1_.addChild(this.mycontainer); + this.farmBg.x = 2; + this.farmBg.y = 2; + this.mycontainer.x = 2 + 500; + this.mycontainer.y = 2 + 275; + this.treeContainerMc = new EmptyContainer(); + _loc1_.addChild(this.treeContainerMc); + this.treeMc = new TreeMc(); + this.treeContainerMc.addChild(this.treeMc); + this.treeMc.x = -40; + this.treeMc.y = 380; + this.treeMc.shouhuoFunc = this.shouhuo; + this.treeMc.jiaoshuiFunc = this.jiaoshui; + this.controlMc = new Sprite(); + _loc1_.addChild(this.controlMc); + this.controlMc.x = this.farmBg.x; + this.controlMc.y = this.farmBg.y; + this.farm_info = getMovieClip(ClassConfig.farm_info); + this.controlMc.addChild(this.farm_info); + this.farm_info.x = 1; + this.farm_info.y = -7; + this.farm_info.other_bg.visible = false; + this.farm_rightCon = getMovieClip(ClassConfig.farm_topControl); + this.controlMc.addChild(this.farm_rightCon); + this.farm_rightCon.x = 600; + this.farm_rightCon.y = 6; + this.btnArr.push(this.farm_rightCon.myFarm_btn); + this.btnArr.push(this.farm_rightCon.farmMessage_btn); + this.btnArr.push(this.farm_rightCon.flush_btn); + this.btnArr.push(this.farm_rightCon.farmRule_btn); + this.farm_control = getMovieClip(ClassConfig.farm_control); + this.controlMc.addChild(this.farm_control); + this.farm_control.x = 250; + this.farm_control.y = 495; + this.btnArr.push(this.farm_control.mouse_btn); + this.btnArr.push(this.farm_control.touqu_btn); + this.btnArr.push(this.farm_control.kaigong_btn); + this.btnArr.push(this.farm_control.lidi_btn); + this.btnArr.push(this.farm_control.quantou_btn); + this.btnArr.push(this.farm_control.zhengshou_btn); + this.btnArr.push(this.farm_control.qiangzheng_btn); + this.btnArr.push(this.farm_control.quanzheng_btn); + this.addBtnEvent(); + this.setPosition(); + getSeedData(); + this.installFriendContr(); + ToolTipManager.getInstance().setToolTip(this.farm_control.mouse_btn,new TxtTooltip("还原鼠标状态"),false,0,false); + ToolTipManager.getInstance().setToolTip(this.farm_control.lidi_btn,new TxtTooltip("使田地成为空地,并补偿一定损失的资源"),false,0,false); + ToolTipManager.getInstance().setToolTip(this.farm_control.kaigong_btn,new TxtTooltip("用来选择种子播种"),false,0,false); + ToolTipManager.getInstance().setToolTip(this.farm_control.zhengshou_btn,new TxtTooltip("用来收获资源"),false,0,false); + ToolTipManager.getInstance().setToolTip(this.farm_control.qiangzheng_btn,new TxtTooltip("提前的收获资源,但会有一定的损失"),false,0,false); + ToolTipManager.getInstance().setToolTip(this.farm_control.quanzheng_btn,new TxtTooltip("一键全部收获"),false,0,false); + ToolTipManager.getInstance().setToolTip(this.farm_control.touqu_btn,new TxtTooltip("用来摘取其他玩家的资源"),false,0,false); + ToolTipManager.getInstance().setToolTip(this.farm_control.quantou_btn,new TxtTooltip("一键全部摘取"),false,0,false); + this.plantTip = new ToolTip(); + ToolTipManager.getInstance().setToolTip(this.mycontainer,this.plantTip,true,-1,false); + this.package_mc = new PackageList(); + _loc1_.addChild(this.package_mc); + this.package_mc.closeF = this.closePackageList; + this.package_mc.changeLian = this.setIsLianXu; + this.package_mc.visible = false; + this.mouseContainer = new MovieClip(); + this.mouseContainer.mouseChildren = false; + this.mouseContainer.mouseEnabled = false; + _loc1_.addChild(this.mouseContainer); + this.mycontainer.addEventListener(MouseEvent.MOUSE_MOVE,this.doMouseOver,false,0,true); + this.mycontainer.addEventListener(MouseEvent.CLICK,this.doSth,false,0,true); + addEventListener(MouseEvent.MOUSE_DOWN,this.down,false,0,true); + addEventListener(MouseEvent.MOUSE_UP,this.up,false,0,true); + } + + private function closePackageList() : void + { + this.package_mc.visible = false; + } + + private function setIsLianXu(param1:Boolean) : void + { + this.isLianXu = param1; + } + + override public function getSeedListSucc(param1:FarmSeedEvent) : void + { + super.getSeedListSucc(param1); + this.loadData(); + } + + private function addBtnEvent() : void + { + var _loc1_:MovieClip = null; + for each(_loc1_ in this.btnArr) + { + _loc1_.buttonMode = true; + _loc1_.addEventListener(MouseEvent.ROLL_OUT,mouseOutBtn); + _loc1_.addEventListener(MouseEvent.ROLL_OVER,mouseOverBtn); + _loc1_.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownBtn); + _loc1_.addEventListener(MouseEvent.MOUSE_UP,mouseUpBtn); + _loc1_.addEventListener(MouseEvent.CLICK,this.mouseClickBtn); + _loc1_.gotoAndStop(1); + } + } + + override public function setPosition() : void + { + x = int(face.realWidth / 2 - 1034 / 2); + y = int(face.realHeight / 2 - 618 / 2); + } + + private function installFriendContr() : void + { + this.farm_friend = new FarmFriendUI(); + this.controlMc.addChild(this.farm_friend); + var _loc1_:Sprite = PublicMethod.createShape(16777215,210,410); + this.controlMc.addChild(_loc1_); + this.farm_friend.x = 758; + this.farm_friend.y = 100; + _loc1_.x = this.farm_friend.x - 5; + _loc1_.y = this.farm_friend.y - 27; + this.farm_friend.mask = _loc1_; + this.farm_friend.setChangeFun(this.changeUser); + this.farm_friend.list(); + } + + private function mouseClickBtn(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.target as MovieClip; + switch(_loc2_.name) + { + case "mouse_btn": + this.selectBtn(); + break; + case "kaigong_btn": + this.kaiGong(param1); + break; + case "lidi_btn": + this.typeShow(param1); + break; + case "zhengshou_btn": + this.typeShow(param1); + break; + case "qiangzheng_btn": + this.typeShow(param1); + break; + case "quanzheng_btn": + this.quanzheng(param1); + break; + case "touqu_btn": + this.typeShow(param1); + break; + case "quantou_btn": + this.quantou(param1); + break; + case "myFarm_btn": + this.myFarm(); + break; + case "farmMessage_btn": + this.showMessage(); + break; + case "flush_btn": + this.refreshAll(new Object()); + break; + case "farmRule_btn": + this.showRule(); + } + } + + private function myFarm() : void + { + this.currentUserId = getUser().userId; + this.refreshAll(new Object(),0,true); + this.mouseShow(); + } + + public function enterFarmById(param1:int = 0) : void + { + if(param1 == 0) + { + param1 = getUserId(); + } + this.currentUserId = param1; + if(hasLoadRes) + { + this.loadData(); + } + } + + private function loadData() : void + { + if(this.currentUserId == getUserId()) + { + this.update(this.currentUserId); + } + else + { + this.changeUser(this.currentUserId); + } + } + + override public function show() : void + { + if(hasLoadRes) + { + super.show(); + } + } + + private function showRule() : void + { + if(this.farm_rule == null) + { + this.farm_rule = new FarmRule(); + this.farm_rule.x = int(500 - this.farm_rule.width / 2); + this.farm_rule.y = int(275 - this.farm_rule.height / 2); + } + this.controlMc.addChild(this.farm_rule); + this.mouseShow(); + } + + public function update(param1:int = 0, param2:Boolean = false, param3:Boolean = true) : void + { + var _loc4_:Array = null; + var _loc5_:Array = null; + var _loc6_:Boolean = false; + var _loc7_:int = 0; + this.m_isClose = param3; + var _loc8_:* = param1 == 0 ? getUser().userId : param1; + this.currentUserId = _loc8_; + if(_loc8_ == getUser().userId) + { + _loc4_ = GameData.userFarmPlantDataList.getUserFarmPlantDataValues(); + _loc5_ = GameData.userFarmAreaDataList.getFarmAreaDataValues(); + if(_loc4_.length != 0 && _loc5_.length != 0) + { + _loc6_ = false; + _loc7_ = 0; + while(_loc7_ < _loc4_.length) + { + if((_loc4_[_loc7_] as UserFarmPlantData).isTimeOut()) + { + _loc6_ = true; + break; + } + _loc7_ += 1; + } + if(param2 || _loc6_) + { + enterFarm(_loc8_); + } + else + { + this.enterOwnFarm(); + } + } + else + { + enterFarm(_loc8_); + } + } + else + { + enterOtherFarm(_loc8_); + } + } + + override public function enterSucc(param1:UserFarmEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + this.enterFail(param1); + return; + } + if(!this.m_isClose) + { + this.clearFarm(); + } + this.enterFarmSucc(param1.farmData); + } + + private function enterFarmSucc(param1:Object) : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + var _loc4_:Object = null; + var _loc5_:Object = null; + var _loc7_:int = 0; + var _loc9_:* = undefined; + var _loc10_:* = undefined; + var _loc6_:* = param1; + this.mouseShow(); + if(_loc6_ == null) + { + return; + } + if(_loc6_.userName == null || _loc6_.userName == undefined) + { + return; + } + if(this.currentUserId == 0 || this.currentUserId == getUser().userId) + { + this.showAndHide(true); + this.farm_info.name_txt.text = _loc6_.userName + "的农场"; + this.farm_info.xingdongli_txt.htmlText = "君主行动力:" + _loc6_.data.actPoint; + ToolTipManager.getInstance().disposeToolTip(this.farm_control.xingdongli2_txt); + ToolTipManager.getInstance().setToolTip(this.farm_info.xingdongli_txt,new TxtTooltip("每采摘其他玩家的一块地需要消耗1点君主行动力")); + this.farm_info.num_txt.htmlText = "当前土地数:" + _loc6_.plantNum + "/" + _loc6_.areaNum; + this.farm_info.peopleNum_txt.htmlText = "空闲人口:" + _loc6_.idlePop; + this.farm_info.num1_txt.text = _loc6_.foodAreaNum + "块"; + this.farm_info.num2_txt.text = _loc6_.woodAreaNum + "块"; + this.farm_info.num3_txt.text = _loc6_.stoneAreaNum + "块"; + this.farm_info.num4_txt.text = _loc6_.bronzAreaNum + "块"; + ToolTipManager.getInstance().setToolTip(this.farm_info.name_txt,new TxtTooltip("开工地块数:" + _loc6_.plantNum + "\n粮食地块数:" + _loc6_.foodAreaNum + "\n木头地块数:" + _loc6_.woodAreaNum + "\n石头地块数:" + _loc6_.stoneAreaNum + "\n青铜地块数:" + _loc6_.bronzAreaNum)); + } + else + { + ToolTipManager.getInstance().disposeToolTip(this.farm_info.xingdongli_txt); + ToolTipManager.getInstance().setToolTip(this.farm_control.xingdongli2_txt,new TxtTooltip("每采摘其他玩家的一块地需要消耗1点君主行动力")); + this.showAndHide(false); + this.farm_info.name2_txt.text = _loc6_.userName + "的农场"; + this.farm_control.xingdongli2_txt.text = "我的君主行动力:" + _loc6_.actPoint; + ToolTipManager.getInstance().disposeToolTip(this.farm_info.name_txt); + } + _loc7_ = 0; + var _loc8_:* = _loc6_.areaList; + for(_loc9_ in _loc8_) + { + _loc2_ = _loc8_[_loc9_]; + this.areaMap.put(_loc8_[_loc9_].posX + "_" + _loc8_[_loc9_].posY,new UserFarmAreaData()); + } + _loc7_ = 0; + _loc8_ = _loc6_.plantList; + for(_loc10_ in _loc8_) + { + _loc4_ = _loc8_[_loc10_]; + _loc5_ = new Object(); + _loc5_.resType = _loc4_.resType; + _loc5_.posX = _loc4_.posX; + _loc5_.posY = _loc4_.posY; + _loc5_.isEmpty = _loc4_.isEmpty; + if(_loc4_.isEmpty == 1) + { + _loc5_.status = _loc4_.status; + _loc5_.standYeild = _loc4_.standYeild; + _loc5_.status = _loc4_.status; + if(_loc4_.status == 0 || _loc4_.status == 3) + { + _loc5_.remainTime = _loc4_.remainTime; + _loc5_.nowYeild = _loc4_.nowYeild; + } + else + { + _loc5_.curYeild = _loc4_.curYeild; + } + } + this.plantMap.put(_loc4_.posX + "_" + _loc4_.posY,_loc5_); + } + this.showFarm(range_arr,_loc6_.rangeLv); + if(_loc6_.treeStats <= 1) + { + if(_loc6_.treeStats == 0) + { + this.treeMc.firstStep(); + } + else if(_loc6_.treeStats == 1) + { + this.treeMc.secondStep(_loc6_); + } + else + { + this.treeMc.treeMc.time_mc.visible = false; + this.treeMc.jiaoshuiBtn.visible = false; + this.treeMc.treeMc.water_mc.visible = false; + } + this.treeMc.shouhuoBtn.visible = false; + } + else if(_loc6_.treeStats == 2) + { + this.treeMc.threeStep(); + } + else + { + this.treeMc.fourStep(); + } + if(this.resourceMessageArr != null) + { + this.makeMessage(this.resourceMessageArr,0,0); + this.resourceMessageArr = null; + } + } + + override public function popChange(param1:DevEvent) : void + { + this.farm_info.peopleNum_txt.htmlText = "空闲人口:" + getPopulation().idlePop; + } + + private function clearFarm() : void + { + ToolTipManager.getInstance().disposeToolTip(this.farm_info.name_txt); + this.treeMc.clear(); + this.package_mc.visible = false; + this.areaMap.clear(); + this.plantMap.clear(); + this.farmPlotMcMap.clear(); + this.farmHash.clear(); + this.mycontainer.clear(); + } + + public function enterFail(param1:UserFarmEvent) : void + { + MessageBoxUI.getInstance().addMessage(param1.msg); + if(this.m_isClose) + { + } + if(this.lastUserId != -1) + { + this.currentUserId = this.lastUserId; + } + } + + override public function getFarmDateSucc(param1:UserFarmEvent) : void + { + var _loc2_:Object = param1.farmData; + var _loc3_:UserFarmAreaData = null; + var _loc4_:UserFarmPlantData = null; + var _loc5_:UserFarmAdditionData = null; + var _loc6_:Array = _loc2_.areaMap; + var _loc7_:Array = _loc2_.plantMap; + var _loc8_:Array = _loc2_.farmEffect; + var _loc9_:int = 0; + while(_loc9_ < _loc6_.length) + { + _loc3_ = new UserFarmAreaData(); + _loc3_.readObject(_loc6_[_loc9_]); + GameData.userFarmAreaDataList.putFarmAreaData(_loc3_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc7_.length) + { + _loc4_ = new UserFarmPlantData(); + _loc4_.readObject(_loc7_[_loc9_]); + GameData.userFarmPlantDataList.putUserFarmPlantData(_loc4_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < (_loc8_ as Array).length) + { + _loc5_ = new UserFarmAdditionData(); + _loc5_.readObject(_loc8_[_loc9_]); + userFarmAdditionDataList.putUserFarmAdditionData(_loc5_); + _loc9_++; + } + if(_loc2_.userFarmTree != null) + { + userFarmTreeData.readObject(_loc2_.userFarmTree); + } + this.enterOwnFarm(); + } + + private function enterOwnFarm() : void + { + var _loc1_:UserFarmAreaData = null; + var _loc2_:Object = null; + var _loc4_:* = undefined; + var _loc5_:Array = null; + var _loc6_:UserFarmPlantData = null; + var _loc7_:UserFarmType = null; + var _loc8_:* = undefined; + if(this.currentUserId == 0 || this.currentUserId == getUserId()) + { + this.showUserMessage(); + } + var _loc3_:Array = GameData.userFarmAreaDataList.getFarmAreaDataValues(); + for(_loc4_ in _loc3_) + { + if(_loc3_[_loc4_].state == 2) + { + this.areaMap.remove(_loc3_[_loc4_].posX + "_" + _loc3_[_loc4_].posY); + } + else + { + this.areaMap.put(_loc3_[_loc4_].posX + "_" + _loc3_[_loc4_].posY,_loc3_[_loc4_]); + } + } + _loc5_ = GameData.userFarmPlantDataList.getUserFarmPlantDataValues(); + for(_loc8_ in _loc5_) + { + _loc6_ = _loc5_[_loc8_]; + _loc1_ = GameData.userFarmAreaDataList.getFarmAreaData(_loc6_.farmAreaId); + if(_loc1_ == null) + { + continue; + } + _loc7_ = getSeedById(_loc6_.farmTypeId); + _loc2_ = new Object(); + _loc2_.resType = _loc7_.resType; + _loc2_.needTime = _loc7_.needTime; + _loc2_.posX = _loc1_.posX; + _loc2_.posY = _loc1_.posY; + _loc2_.isEmpty = 1; + if(_loc2_.isEmpty == 1) + { + _loc2_.status = _loc6_.status; + _loc2_.standYeild = _loc6_.standYeild; + if(_loc2_.status == 0 || _loc2_.status == 3) + { + _loc2_.remainTime = _loc6_.remainTime; + _loc2_.nowYeild = _loc6_.getNowYeild(); + } + else + { + _loc2_.curYeild = _loc6_.curYeild; + } + } + this.plantMap.put(_loc1_.posX + "_" + _loc1_.posY,_loc2_); + } + this.showFarm(range_arr,getCastle().casLv); + this.updateTree(); + if(this.resourceMessageArr != null) + { + this.makeMessage(this.resourceMessageArr,0,0); + this.resourceMessageArr = null; + } + } + + private function showUserMessage() : void + { + this.showAndHide(true); + this.farm_info.name_txt.text = getUser().userName + "的农场"; + this.farm_info.xingdongli_txt.htmlText = "君主行动力:" + getUser().leaveActPoint; + ToolTipManager.getInstance().disposeToolTip(this.farm_control.xingdongli2_txt); + ToolTipManager.getInstance().setToolTip(this.farm_info.xingdongli_txt,new TxtTooltip("每采摘其他玩家的一块地需要消耗1点君主行动力")); + this.farm_info.num_txt.htmlText = "当前土地数:" + GameData.userFarmPlantDataList.getUserFarmPlantDataValues().length + "/" + GameData.userFarmAreaDataList.getFarmAreaDataValues().length; + this.farm_info.peopleNum_txt.htmlText = "空闲人口:" + getPopulation().idlePop; + var _loc1_:* = this.getPlantsNum(); + this.farm_info.num1_txt.text = _loc1_.getValue(1) + "块"; + this.farm_info.num2_txt.text = _loc1_.getValue(2) + "块"; + this.farm_info.num3_txt.text = _loc1_.getValue(3) + "块"; + this.farm_info.num4_txt.text = _loc1_.getValue(4) + "块"; + ToolTipManager.getInstance().setToolTip(this.farm_info.name_txt,new TxtTooltip("开工地块数:" + GameData.userFarmPlantDataList.getUserFarmPlantDataValues().length + "\n粮食地块数:" + _loc1_.getValue(1) + "\n木头地块数:" + _loc1_.getValue(2) + "\n石头地块数:" + _loc1_.getValue(3) + "\n青铜地块数:" + _loc1_.getValue(4))); + } + + private function showAndHide(param1:Boolean) : void + { + if(param1) + { + this.farm_info.name2_txt.visible = false; + this.farm_info.other_bg.visible = false; + this.farm_info.Own_bg.visible = true; + this.farm_info.name_txt.visible = true; + this.farm_info.num_txt.visible = true; + this.farm_info.peopleNum_txt.visible = true; + this.farm_info.xingdongli_txt.visible = true; + this.farm_info.num0_txt.visible = true; + this.farm_info.num1_txt.visible = true; + this.farm_info.num2_txt.visible = true; + this.farm_info.num3_txt.visible = true; + this.farm_info.num4_txt.visible = true; + this.farm_control.touqu_btn.visible = false; + this.farm_control.quantou_btn.visible = false; + this.farm_control.kaigong_btn.visible = true; + this.farm_control.lidi_btn.visible = true; + this.farm_control.zhengshou_btn.visible = true; + this.farm_control.qiangzheng_btn.visible = true; + this.farm_control.quanzheng_btn.visible = true; + this.farm_control.xingdongli_bg.visible = false; + this.farm_control.xingdongli2_txt.visible = false; + } + else + { + this.farm_info.name2_txt.visible = true; + this.farm_info.other_bg.visible = true; + this.farm_info.Own_bg.visible = false; + this.farm_info.name_txt.visible = false; + this.farm_info.num_txt.visible = false; + this.farm_info.peopleNum_txt.visible = false; + this.farm_info.xingdongli_txt.visible = false; + this.farm_info.num0_txt.visible = false; + this.farm_info.num1_txt.visible = false; + this.farm_info.num2_txt.visible = false; + this.farm_info.num3_txt.visible = false; + this.farm_info.num4_txt.visible = false; + this.farm_control.touqu_btn.visible = true; + this.farm_control.quantou_btn.visible = true; + this.farm_control.kaigong_btn.visible = false; + this.farm_control.lidi_btn.visible = false; + this.farm_control.zhengshou_btn.visible = false; + this.farm_control.qiangzheng_btn.visible = false; + this.farm_control.quanzheng_btn.visible = false; + this.farm_control.xingdongli_bg.visible = true; + this.farm_control.xingdongli2_txt.visible = true; + } + } + + private function changeUser(param1:int) : void + { + this.lastUserId = this.currentUserId; + this.currentUserId = param1; + this.update(this.currentUserId,false,false); + } + + private function getPlantsNum() : HashMap + { + var _loc1_:UserFarmPlantData = null; + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc10_:int = 0; + var _loc4_:* = GameData.userFarmPlantDataList.getUserFarmPlantDataValues(); + var _loc9_:* = new HashMap(); + _loc9_.put(1,_loc5_); + _loc9_.put(2,_loc6_); + _loc9_.put(3,_loc7_); + _loc9_.put(4,_loc8_); + while(_loc10_ < _loc4_.length) + { + _loc1_ = UserFarmPlantData(_loc4_[_loc10_]); + _loc2_ = getSeedById(_loc1_.farmTypeId).resType; + _loc3_ = int(_loc9_.getValue(_loc2_)); + _loc3_ += 1; + _loc9_.put(_loc2_,_loc3_); + _loc10_ += 1; + } + return _loc9_; + } + + public function showFarm(param1:Array, param2:int) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:* = undefined; + var _loc6_:* = undefined; + var _loc7_:FarmPlot = null; + var _loc8_:Object = null; + var _loc9_:Object = null; + var _loc10_:UserFarmAreaData = null; + var _loc11_:int = 0; + var _loc12_:int = 0; + var _loc13_:int = 0; + var _loc14_:FarmPlot = null; + var _loc15_:Sprite = null; + this.mycontainer.clear(); + var _loc16_:Boolean = false; + var _loc17_:* = 0; + while(_loc17_ <= param2) + { + if(_loc17_ == 16) + { + break; + } + if(_loc17_ == param2 && param2 != 16) + { + if(this.currentUserId != 0 && this.currentUserId != getUser().userId) + { + break; + } + _loc16_ = true; + } + _loc5_ = 0; + while(_loc5_ < param1[_loc17_].length) + { + _loc6_ = param1[_loc17_][_loc5_]; + _loc8_ = getPix(_loc6_[0],_loc6_[1]); + if(_loc16_ && this.plantMap.getValue(_loc6_[0] + "_" + _loc6_[1]) == null) + { + _loc7_ = new FarmPlot(2); + _loc7_.isNext = true; + } + else + { + _loc9_ = this.plantMap.getValue(_loc6_[0] + "_" + _loc6_[1]); + if(_loc9_ == null && this.areaMap.getValue(_loc6_[0] + "_" + _loc6_[1]) != null) + { + _loc10_ = this.areaMap.getValue(_loc6_[0] + "_" + _loc6_[1]); + if(_loc10_) + { + if(_loc10_.state == 0) + { + _loc7_ = new FarmPlot(0); + } + else if(_loc10_.state == 1) + { + _loc7_ = new FarmPlot(1); + } + } + } + else if(_loc9_ == null && this.areaMap.getValue(_loc6_[0] + "_" + _loc6_[1]) == null) + { + _loc7_ = new FarmPlot(1); + } + else if(_loc9_ != null) + { + _loc11_ = 0; + switch(_loc9_.resType) + { + case 1: + if(_loc9_.status == 0) + { + _loc11_ = 3; + break; + } + if(_loc9_.status == 1 || _loc9_.status == 2) + { + _loc11_ = 4; + break; + } + if(_loc9_.status == 3) + { + _loc11_ = 13; + } + break; + case 2: + if(_loc9_.status == 0) + { + _loc11_ = 5; + break; + } + if(_loc9_.status == 1 || _loc9_.status == 2) + { + _loc11_ = 6; + break; + } + if(_loc9_.status == 3) + { + _loc11_ = 14; + } + break; + case 3: + if(_loc9_.status == 0) + { + _loc11_ = 7; + break; + } + if(_loc9_.status == 1 || _loc9_.status == 2) + { + _loc11_ = 8; + break; + } + if(_loc9_.status == 3) + { + _loc11_ = 12; + } + break; + case 4: + if(_loc9_.status == 0) + { + _loc11_ = 9; + break; + } + if(_loc9_.status == 1 || _loc9_.status == 2) + { + _loc11_ = 10; + break; + } + if(_loc9_.status == 3) + { + _loc11_ = 11; + } + } + _loc7_ = new FarmPlot(_loc11_); + if(_loc9_.needTime) + { + _loc7_.needTime = _loc9_.needTime; + } + _loc7_.resType = _loc9_.plantObj; + _loc7_.isEmpty = _loc9_.isEmpty; + _loc7_.status = _loc9_.status; + _loc7_.standYeild = _loc9_.standYeild; + _loc7_.remainTime = _loc9_.remainTime; + _loc7_.nowYeild = _loc9_.nowYeild; + _loc7_.curYeild = _loc9_.curYeild; + } + } + _loc7_.posX = _loc6_[0]; + _loc7_.posY = _loc6_[1]; + _loc7_.selfPosX = _loc8_.x; + _loc7_.selfPosY = _loc8_.y; + _loc7_.tooltipStr = this.getPlantTip(_loc7_,param2); + this.farmHash.put(_loc6_[0] + "_" + _loc6_[1],_loc7_); + _loc5_ += 1; + } + _loc17_ += 1; + } + var _loc18_:int = -6; + while(_loc18_ <= 6) + { + _loc12_ = _loc18_ < 0 ? int(6 + _loc18_) : int(6 - _loc18_); + _loc13_ = -1 * _loc12_; + while(_loc13_ <= _loc12_) + { + if(this.farmHash.getValue(_loc13_ + "_" + _loc18_) != null) + { + _loc14_ = this.farmHash.getValue(_loc13_ + "_" + _loc18_) as FarmPlot; + _loc15_ = new Sprite(); + _loc15_.addChild(_loc14_); + this.mycontainer.addChild(_loc15_); + _loc15_.x = _loc14_.selfPosX; + _loc15_.y = _loc14_.selfPosY - _loc14_.height + 58; + this.farmPlotMcMap.put(_loc13_ + "_" + _loc18_,_loc15_); + } + _loc13_++; + } + _loc18_++; + } + } + + private function getPlantTip(param1:FarmPlot, param2:int) : String + { + var _loc3_:Boolean = false; + if(this.currentUserId == 0 || this.currentUserId == getUser().userId) + { + _loc3_ = true; + } + else + { + _loc3_ = false; + } + var _loc4_:String = ""; + switch(param1.getStatusType()) + { + case 0: + if(_loc3_) + { + _loc4_ = "种植类型未确定,请进行开工操作"; + break; + } + _loc4_ = "空地"; + break; + case 1: + _loc4_ = "此块区域与其它势力冲突,无法生产资源"; + break; + case 2: + _loc4_ = "城池等级达到" + (param2 + 1) + "级时此块地可用"; + break; + case 3: + _loc4_ = "粮食" + PublicMethod.formatSecond(param1.remainTime) + "后完工"; + if(_loc3_) + { + if(param1.needTime != 0) + { + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (" + int((1 - param1.remainTime / param1.needTime) * (1 - param1.remainTime / param1.needTime) * 80) + "%)"; + break; + } + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (0%)"; + } + break; + case 4: + _loc4_ = "粮食 剩余产量/标准产量:" + param1.curYeild + "/" + param1.standYeild; + break; + case 5: + _loc4_ = "木材" + PublicMethod.formatSecond(param1.remainTime) + "后完工"; + if(_loc3_) + { + if(param1.needTime != 0) + { + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (" + int((1 - param1.remainTime / param1.needTime) * (1 - param1.remainTime / param1.needTime) * 80) + "%)"; + break; + } + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (0%)"; + } + break; + case 6: + _loc4_ = "木材 剩余产量/标准产量:" + param1.curYeild + "/" + param1.standYeild; + break; + case 7: + _loc4_ = "石料" + PublicMethod.formatSecond(param1.remainTime) + "后完工"; + if(_loc3_) + { + if(param1.needTime != 0) + { + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (" + int((1 - param1.remainTime / param1.needTime) * (1 - param1.remainTime / param1.needTime) * 80) + "%)"; + break; + } + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (0%)"; + } + break; + case 8: + _loc4_ = "石料 剩余产量/标准产量:" + param1.curYeild + "/" + param1.standYeild; + break; + case 9: + _loc4_ = "青铜" + PublicMethod.formatSecond(param1.remainTime) + "后完工"; + if(_loc3_) + { + if(param1.needTime != 0) + { + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (" + int((1 - param1.remainTime / param1.needTime) * (1 - param1.remainTime / param1.needTime) * 80) + "%)"; + break; + } + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (0%)"; + } + break; + case 10: + _loc4_ = "青铜 剩余产量/标准产量:" + param1.curYeild + "/" + param1.standYeild; + break; + case 11: + _loc4_ = "青铜" + PublicMethod.formatSecond(param1.remainTime) + "后完工"; + if(_loc3_) + { + if(param1.needTime != 0) + { + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (" + int((1 - param1.remainTime / param1.needTime) * (1 - param1.remainTime / param1.needTime) * 80) + "%)"; + break; + } + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (0%)"; + } + break; + case 12: + _loc4_ = "石料" + PublicMethod.formatSecond(param1.remainTime) + "后完工"; + if(_loc3_) + { + if(param1.needTime != 0) + { + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (" + int((1 - param1.remainTime / param1.needTime) * (1 - param1.remainTime / param1.needTime) * 80) + "%)"; + break; + } + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (0%)"; + } + break; + case 13: + _loc4_ = "粮食" + PublicMethod.formatSecond(param1.remainTime) + "后完工"; + if(_loc3_) + { + if(param1.needTime != 0) + { + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (" + int((1 - param1.remainTime / param1.needTime) * (1 - param1.remainTime / param1.needTime) * 80) + "%)"; + break; + } + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (0%)"; + } + break; + case 14: + _loc4_ = "木材" + PublicMethod.formatSecond(param1.remainTime) + "后完工"; + if(_loc3_) + { + if(param1.needTime != 0) + { + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (" + int((1 - param1.remainTime / param1.needTime) * (1 - param1.remainTime / param1.needTime) * 80) + "%)"; + break; + } + _loc4_ += "\n提前征收只能收得资源:" + param1.nowYeild + " (0%)"; + } + } + return _loc4_; + } + + private function doMouseOver(param1:Event) : void + { + var _loc2_:* = param1.currentTarget.mouseX; + var _loc3_:* = param1.currentTarget.mouseY; + var _loc4_:* = getGlobalXY(_loc2_,_loc3_); + var _loc5_:* = this.farmHash.getValue(_loc4_.relX + "_" + _loc4_.relY); + if(this.farmHash.getValue(_loc4_.relX + "_" + _loc4_.relY) != null) + { + this.plantTip.visible = true; + this.plantTip.clear(); + this.plantTip.addRow(_loc5_.tooltipStr); + this.plantTip.draw(); + if(this.lastFarmPlot != null) + { + PublicMethod.applyDefault(this.lastFarmPlot); + } + PublicMethod.applyHighlight(this.farmHash.getValue(_loc4_.relX + "_" + _loc4_.relY)); + this.lastFarmPlot = this.farmHash.getValue(_loc4_.relX + "_" + _loc4_.relY); + } + else if(this.lastFarmPlot != null) + { + PublicMethod.applyDefault(this.lastFarmPlot); + this.plantTip.visible = false; + } + } + + private function kaiGong(param1:MouseEvent) : void + { + if(param1.currentTarget is EmptyContainer && this.package_mc.visible) + { + return; + } + this.package_mc.visible = !this.package_mc.visible; + if(this.package_mc.visible) + { + this.package_mc.x = 35; + this.package_mc.y = 185; + this.package_mc.puTong(param1); + this.package_mc.addEventListener(MouseEvent.MOUSE_DOWN,this.__down,false,0,true); + this.package_mc.addEventListener(MouseEvent.MOUSE_UP,this.__up,false,0,true); + } + else + { + this.package_mc.removeEventListener(MouseEvent.MOUSE_DOWN,this.__down); + this.package_mc.removeEventListener(MouseEvent.MOUSE_UP,this.__up); + } + } + + private function __down(param1:Event) : void + { + this.package_mc.startDrag(); + } + + private function __up(param1:Event) : void + { + this.package_mc.stopDrag(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.package_mc.visible = false; + this.clear(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + } + + public function showMouse(param1:MovieClip, param2:Boolean = false, param3:MovieClip = null) : void + { + PublicMethod.removeAll(this.mouseContainer); + if(param2) + { + if(this.lastTypeBtn == param3) + { + stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.move); + this.mouseContainer.visible = false; + Mouse.show(); + this.lastTypeBtn = null; + return; + } + this.lastTypeBtn = param3; + } + this.mouseContainer.visible = true; + this.mouseContainer.addChild(param1); + Mouse.hide(); + this.mouseContainer.x = mouseX - this.mouseContainer.width / 2; + this.mouseContainer.y = mouseY - this.mouseContainer.width / 2; + stage.addEventListener(MouseEvent.MOUSE_MOVE,this.move,false,0,true); + } + + private function move(param1:MouseEvent) : void + { + var _loc3_:MovieClip = null; + var _loc2_:Boolean = hitTestPoint(mouseX,mouseY,true); + for each(_loc3_ in this.btnArr) + { + if(_loc3_.hitTestPoint(mouseX,mouseY,true)) + { + _loc2_ = false; + break; + } + } + if(this.package_mc.packMc.puTong_btn.hitTestPoint(mouseX,mouseY,true)) + { + _loc2_ = false; + } + if(this.package_mc.packMc.gaoJi_btn.hitTestPoint(mouseX,mouseY,true)) + { + _loc2_ = false; + } + if(_loc2_) + { + Mouse.hide(); + this.mouseContainer.x = mouseX - this.mouseContainer.width / 2; + this.mouseContainer.y = mouseY - this.mouseContainer.width / 2; + this.mouseContainer.visible = true; + } + else + { + this.mouseContainer.visible = false; + Mouse.show(); + } + } + + private function selectBtn() : void + { + this.mouseShow(); + } + + public function mouseShow() : void + { + stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.move); + this.mouseContainer.visible = false; + Mouse.show(); + } + + override public function getAlertResult(param1:DevEvent) : void + { + this.mouseShow(); + this.lastTypeBtn = null; + } + + private function typeShow(param1:MouseEvent) : void + { + var _loc2_:MovieClip = null; + var _loc3_:MovieClip = MovieClip(param1.currentTarget); + if(this.lastTypeBtn != null) + { + if(this.mouseContainer.numChildren != 0) + { + PublicMethod.removeAll(this.mouseContainer); + } + if(this.lastTypeBtn == _loc3_) + { + stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.move); + this.mouseContainer.visible = false; + Mouse.show(); + this.lastTypeBtn = null; + return; + } + } + this.lastTypeBtn = _loc3_; + switch(_loc3_.name) + { + case "zhengshou_btn": + _loc2_ = getMovieClip(ClassConfig.farm_zhengshou); + _loc2_.gotoAndStop(1); + this.showMouse(_loc2_); + break; + case "touqu_btn": + _loc2_ = getMovieClip(ClassConfig.farm_touqu); + _loc2_.gotoAndStop(1); + this.showMouse(_loc2_); + break; + case "qiangzheng_btn": + _loc2_ = getMovieClip(ClassConfig.farm_qiangshou); + _loc2_.gotoAndStop(1); + this.showMouse(_loc2_); + break; + case "lidi_btn": + _loc2_ = getMovieClip(ClassConfig.farm_lidi); + _loc2_.gotoAndStop(1); + this.showMouse(_loc2_); + } + } + + private function down(param1:MouseEvent) : void + { + if(this.mouseContainer.numChildren == 0) + { + return; + } + if(this.lastTypeBtn != null && this.lastTypeBtn.name != "zhengshou_btn" && this.lastTypeBtn.name != "qiangzheng_btn" && this.lastTypeBtn.name != "lidi_btn" && this.lastTypeBtn.name != "touqu_btn") + { + return; + } + var _loc2_:MovieClip = this.mouseContainer.getChildAt(0) as MovieClip; + _loc2_.gotoAndStop(2); + } + + private function up(param1:MouseEvent) : void + { + if(this.mouseContainer.numChildren == 0) + { + return; + } + if(this.lastTypeBtn != null && this.lastTypeBtn.name != "zhengshou_btn" && this.lastTypeBtn.name != "qiangzheng_btn" && this.lastTypeBtn.name != "lidi_btn" && this.lastTypeBtn.name != "touqu_btn") + { + return; + } + var _loc2_:MovieClip = this.mouseContainer.getChildAt(0) as MovieClip; + _loc2_.gotoAndStop(1); + } + + private function doSth(param1:MouseEvent) : void + { + var _loc2_:FarmPlot = null; + var _loc3_:* = param1.currentTarget.mouseX; + var _loc4_:* = param1.currentTarget.mouseY; + var _loc5_:* = PublicMethod.getGlobalXY(_loc3_,_loc4_); + _loc2_ = this.farmHash.getValue(_loc5_.relX + "_" + _loc5_.relY); + if(_loc2_ == null) + { + return; + } + if(_loc2_.isNext) + { + return; + } + if(_loc2_.flag == 1) + { + return; + } + if(_loc2_.isEmpty == 0 && this.lastTypeBtn == null && (this.currentUserId == 0 || this.currentUserId == getUser().userId)) + { + this.kaiGong(param1); + } + if(this.lastTypeBtn is FarmPackageItem) + { + if(!this.isLianXu) + { + this.mouseShow(); + } + if(_loc2_.flag != 0) + { + this.onfail(FarmAlertMessage.NOTNULLEARE,_loc2_.selfPosX,_loc2_.selfPosY); + if(!this.isLianXu) + { + this.lastTypeBtn = null; + } + return; + } + if(getPopulation().idlePop < 400) + { + this.onfail(FarmAlertMessage.KAIGONGSHIBAI,_loc2_.selfPosX,_loc2_.selfPosY); + if(!this.isLianXu) + { + this.lastTypeBtn = null; + } + return; + } + startPlantOnFarmArea(_loc2_.posX,_loc2_.posY,(this.lastTypeBtn as FarmPackageItem).typeId); + if(!this.isLianXu) + { + this.lastTypeBtn = null; + } + } + else if(this.lastTypeBtn == this.farm_control.zhengshou_btn) + { + if(_loc2_.status == 1 || _loc2_.status == 2) + { + harvestPlantOnFarmArea(_loc2_.posX.toString(),_loc2_.posY.toString()); + } + else + { + this.onfail(FarmAlertMessage.ZHENGSHOUSHIBAI,_loc2_.selfPosX,_loc2_.selfPosY); + } + } + else if(this.lastTypeBtn == this.farm_control.qiangzheng_btn) + { + harvestCompulsory(_loc2_.posX.toString(),_loc2_.posY.toString()); + } + else if(this.lastTypeBtn == this.farm_control.lidi_btn) + { + clearFarmArea(_loc2_.posX,_loc2_.posY); + } + else if(this.lastTypeBtn == this.farm_control.touqu_btn) + { + stealAreaOfOtherFarm(this.currentUserId,_loc2_.posX,_loc2_.posY); + } + } + + private function quantou(param1:MouseEvent) : void + { + harvestPlantOthers(this.currentUserId); + this.farm_friend.delStealIcon(); + } + + private function showMessage() : void + { + if(this.farmMessage == null) + { + this.farmMessage = new FarmMessage(); + this.farmMessage.x = int(500 - this.farmMessage.width / 2); + this.farmMessage.y = int(275 - this.farmMessage.height / 2); + } + if(!contains(this.farmMessage)) + { + this.controlMc.addChild(this.farmMessage); + this.farmMessage.getMessList(); + } + this.mouseShow(); + this.lastTypeBtn = null; + } + + private function quanzheng(param1:MouseEvent) : void + { + var _loc2_:Boolean = GameData.userFarmPlantDataList.isHaveHaRipePlant(); + if(!_loc2_) + { + MessageBoxUI.getInstance().addMessage(FarmAlertMessage.QUANSHOUSHIBAI); + return; + } + harvestPlantOnFarmAreaAll(); + } + + override public function onfail(param1:String, param2:int, param3:int, param4:Boolean = false) : void + { + var warn:FarmWarn = null; + var code:* = param1; + var x:* = param2; + var y:* = param3; + var flag:* = param4; + warn = new FarmWarn(code); + if(flag) + { + this.treeContainerMc.addChild(warn); + } + else + { + this.mycontainer.addChild(warn); + } + warn.x = x + 27; + warn.y = y - 29; + if(flag) + { + setTimeout(function():* + { + treeContainerMc.removeChild(warn); + },2000); + } + else + { + setTimeout(function():* + { + if(mycontainer.contains(warn)) + { + mycontainer.removeChild(warn); + } + },2000); + } + } + + override public function rushSucc(param1:Object) : void + { + var _loc2_:int = 0; + var _loc3_:UserFarmAreaData = null; + var _loc4_:UserFarmPlantData = null; + var _loc5_:FarmPlot = null; + var _loc6_:Array = null; + var _loc7_:int = 0; + var _loc8_:* = param1; + if(this.farm_control.xingdongli2_txt) + { + this.farm_control.xingdongli2_txt.text = "我的君主行动力:" + getUser().leaveActPoint; + } + if(_loc8_.areaMap) + { + _loc2_ = 0; + while(_loc2_ < (_loc8_.areaMap as Array).length) + { + _loc3_ = new UserFarmAreaData(); + _loc3_.readObject(_loc8_.areaMap[_loc2_]); + GameData.userFarmAreaDataList.putFarmAreaData(_loc3_); + _loc2_++; + } + } + if(_loc8_.plantMap) + { + _loc2_ = 0; + while(_loc2_ < (_loc8_.plantMap as Array).length) + { + _loc4_ = new UserFarmPlantData(); + _loc4_.readObject(_loc8_.plantMap[_loc2_]); + GameData.userFarmPlantDataList.putUserFarmPlantData(_loc4_); + _loc2_++; + } + } + if(!_loc8_.pop) + { + } + var _loc9_:* = this.farmHash.getValue(_loc8_.posX + "_" + _loc8_.posY); + var _loc10_:* = this.farmPlotMcMap.getValue(_loc8_.posX + "_" + _loc8_.posY); + var _loc11_:* = getPix(_loc8_.posX,_loc8_.posY); + this.makeMessage(_loc8_.resource,_loc11_.x,_loc11_.y); + var _loc12_:* = GameData.userFarmPlantDataList.getUserFarmPlantDataValues(); + if(_loc9_ != null) + { + Utils.removeAll(_loc10_); + if(_loc8_.isEmpty == 0) + { + if(Boolean(_loc8_.plantId) && _loc8_.plantId != 0) + { + GameData.userFarmPlantDataList.removeUserFarmPlantData(int(_loc8_.plantId)); + } + _loc5_ = new FarmPlot(0); + } + else if(_loc8_.isEmpty == 1) + { + _loc7_ = 0; + switch(_loc8_.resType) + { + case 1: + if(_loc8_.status == 0) + { + _loc7_ = 3; + break; + } + if(_loc8_.status == 1 || _loc8_.status == 2) + { + _loc7_ = 4; + break; + } + if(_loc8_.status == 3) + { + _loc7_ = 13; + } + break; + case 2: + if(_loc8_.status == 0) + { + _loc7_ = 5; + break; + } + if(_loc8_.status == 1 || _loc8_.status == 2) + { + _loc7_ = 6; + break; + } + if(_loc8_.status == 3) + { + _loc7_ = 14; + } + break; + case 3: + if(_loc8_.status == 0) + { + _loc7_ = 7; + break; + } + if(_loc8_.status == 1 || _loc8_.status == 2) + { + _loc7_ = 8; + break; + } + if(_loc8_.status == 3) + { + _loc7_ = 12; + } + break; + case 4: + if(_loc8_.status == 0) + { + _loc7_ = 9; + break; + } + if(_loc8_.status == 1 || _loc8_.status == 2) + { + _loc7_ = 10; + break; + } + if(_loc8_.status == 3) + { + _loc7_ = 11; + } + } + _loc5_ = new FarmPlot(_loc7_); + } + _loc6_ = GameData.userFarmPlantDataList.getUserFarmPlantDataValues(); + _loc5_.posX = _loc8_.posX; + _loc5_.posY = _loc8_.posY; + _loc5_.remainTime = _loc8_.remainTime; + _loc5_.nowYeild = _loc8_.nowYeild; + _loc5_.curYeild = _loc8_.curYeild; + _loc5_.standYeild = _loc8_.standYeild; + _loc5_.status = _loc8_.status; + _loc5_.resType = _loc8_.resType; + _loc5_.isEmpty = _loc8_.isEmpty; + _loc5_.tooltipStr = this.getPlantTip(_loc5_,0); + _loc10_.addChild(_loc5_); + _loc10_.x = _loc11_.x; + _loc10_.y = _loc11_.y - _loc5_.height + 58; + _loc5_.selfPosX = _loc11_.x; + _loc5_.selfPosY = _loc11_.y; + this.farmHash.put(_loc8_.posX + "_" + _loc8_.posY,_loc5_); + if(this.currentUserId == 0 || this.currentUserId == getUser().userId) + { + this.showUserMessage(); + } + } + } + + override public function fresh() : void + { + this.refreshAll(new Object(),0,true); + this.mouseShow(); + } + + override public function refreshAll(param1:Object, param2:int = 0, param3:Boolean = false) : void + { + var _loc4_:Array = null; + var _loc5_:int = 0; + var _loc6_:int = 0; + ToolTipManager.getInstance().disposeToolTip(this.farm_info.name_txt); + this.treeMc.clear(); + this.package_mc.visible = false; + this.areaMap.clear(); + this.plantMap.clear(); + this.farmPlotMcMap.clear(); + this.farmHash.clear(); + this.mycontainer.clear(); + if(param2 == 0) + { + if(this.currentUserId != 0) + { + if(this.currentUserId == getUser().userId) + { + this.update(this.currentUserId,param3); + } + else + { + this.update(this.currentUserId); + } + } + else + { + this.update(getUser().userId,true); + } + } + else + { + this.currentUserId = param2; + this.update(this.currentUserId); + } + if(param1.data != null && param1.data.length != 0) + { + this.resourceMessageArr = param1.data; + if(param3 && Boolean(this.resourceMessageArr)) + { + _loc4_ = new Array(); + _loc5_ = 0; + while(_loc5_ < this.resourceMessageArr.length) + { + if(this.resourceMessageArr[_loc5_].resType == -1) + { + _loc4_ = this.resourceMessageArr[_loc5_].resNum; + } + _loc5_++; + } + _loc6_ = 0; + while(_loc6_ < _loc4_.length) + { + GameData.userFarmPlantDataList.removeUserFarmPlantData(int(_loc4_[_loc6_])); + _loc6_++; + } + } + } + } + + private function makeMessage(param1:Array, param2:int, param3:int) : void + { + var _loc4_:Object = null; + var _loc5_:Bitmap = null; + var _loc6_:String = null; + var _loc7_:BitmapData = undefined; + var _loc8_:int = 0; + loop0: + while(true) + { + if(_loc8_ >= param1.length) + { + return; + } + _loc4_ = param1[_loc8_]; + _loc5_ = new Bitmap(); + _loc6_ = ""; + switch(_loc4_.resType) + { + case 1: + _loc6_ = "liangshiZi"; + break; + case 2: + _loc6_ = "mucaiZi"; + break; + case 3: + _loc6_ = "shiliaoZi"; + break; + case 4: + _loc6_ = "qingtongZi"; + break; + default: + break loop0; + } + _loc7_ = getPng(_loc6_); + _loc5_.bitmapData = _loc7_; + this.subBlood(_loc5_,_loc4_.resNum,param2,param3); + param3 += 35; + _loc8_++; + } + } + + public function subBlood(param1:Bitmap, param2:int, param3:int, param4:int, param5:Boolean = false) : void + { + var cbmp2:*; + var mc:NumberMC; + var container:EmptyContainer = null; + var valid:* = undefined; + var n:int = 0; + var cbmp:Bitmap = param1; + var num:int = param2; + var x:int = param3; + var y:int = param4; + var isTree:Boolean = param5; + container = new EmptyContainer(); + container.addChild(cbmp); + cbmp.x = -2; + cbmp.y = 0; + cbmp2 = new Bitmap(); + cbmp2.bitmapData = face.getPng(ClassConfig.lib_num_10); + container.addChild(cbmp2); + cbmp2.x = 50; + cbmp2.y = -6; + mc = new NumberMC(2); + mc.setValue(num); + container.addChild(mc); + mc.x = 108 + mc.width / 2; + mc.y = -6; + container.x = x; + container.y = y; + if(isTree) + { + this.treeContainerMc.addChild(container); + } + else + { + this.mycontainer.addChild(container); + } + n = 0; + valid = setInterval(function():* + { + var _loc1_:* = n + 1; + n = _loc1_; + container.y -= 3; + if(n > 10) + { + clearInterval(valid); + if(isTree) + { + treeContainerMc.removeChild(container); + } + else if(mycontainer.contains(container)) + { + mycontainer.removeChild(container); + } + } + },140); + } + + private function updateTree() : void + { + if(userFarmTreeData.remainTime == -2) + { + this.treeMc.firstStep(); + } + else if(userFarmTreeData.remainTime == -1) + { + this.treeMc.secondStep(); + } + else if(userFarmTreeData.remainTime > 0) + { + this.treeMc.threeStep(); + } + else if(userFarmTreeData.remainTime == 0) + { + this.treeMc.fourStep(); + } + } + + private function shouhuo() : void + { + harvestUserFarmTree(); + } + + public function clear() : void + { + Utils.removeAll(this.mycontainer); + this.areaMap.clear(); + this.plantMap.clear(); + this.farmPlotMcMap.clear(); + this.farmHash.clear(); + this.lastFarmPlot = null; + this.resourceMessageArr = null; + this.lastUserId = -1; + if(Boolean(this.farm_rule) && this.controlMc.contains(this.farm_rule)) + { + this.controlMc.removeChild(this.farm_rule); + } + if(Boolean(this.farmMessage) && this.controlMc.contains(this.farmMessage)) + { + this.controlMc.removeChild(this.farmMessage); + } + GC.clear(); + } + + override public function treeMessageSucc(param1:Object) : void + { + var _loc2_:Bitmap = null; + var _loc3_:* = undefined; + if(param1.data.resNum != 0) + { + _loc2_ = new Bitmap(); + _loc3_ = getPng(ClassConfig.dianjuanZi); + _loc2_.bitmapData = _loc3_; + this.subBlood(_loc2_,param1.data.resNum,112,455,true); + } + if(param1.data.treeStats <= 1) + { + if(param1.data.treeStats == 0) + { + this.treeMc.firstStep(); + } + else if(param1.data.treeStats == 1) + { + this.treeMc.secondStep(param1.data); + } + else + { + this.treeMc.treeMc.time_mc.visible = false; + this.treeMc.jiaoshuiBtn.visible = false; + this.treeMc.treeMc.water_mc.visible = false; + } + this.treeMc.shouhuoBtn.visible = false; + } + else if(param1.data.treeStats == 2) + { + userFarmTreeData.remainTime = param1.data.remainTime; + this.treeMc.threeStep(); + } + else + { + this.treeMc.fourStep(); + } + } + + private function jiaoshui() : void + { + var _loc1_:* = this.currentUserId == 0 ? getUser().userId : this.currentUserId; + waterFarmTree(_loc1_); + if(_loc1_ != getUser().userId) + { + this.farm_friend.delWaterIcon(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FarmWarn.as b/flash_decompiled/com/view/ui/farm/FarmWarn.as new file mode 100644 index 0000000..3f4828e --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FarmWarn.as @@ -0,0 +1,29 @@ +package com.view.ui.farm +{ + import com.comfig.ClassConfig; + import flash.display.MovieClip; + import flash.text.TextField; + + public class FarmWarn extends MovieClip + { + + private var warnTxt:TextField; + + private var farm:FarmView = FarmView.getInstance(); + + public function FarmWarn(param1:String) + { + super(); + var _loc2_:MovieClip = this.farm.getMovieClip(ClassConfig.farm_warn); + addChild(_loc2_); + this.warnTxt = _loc2_.warn_txt as TextField; + this.warnTxt.wordWrap = true; + this.warnTxt.multiline = true; + this.warnTxt.height = 40; + this.warnTxt.width = 135; + this.warnTxt.text = param1; + this.warnTxt.selectable = false; + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/FriendListItem.as b/flash_decompiled/com/view/ui/farm/FriendListItem.as new file mode 100644 index 0000000..ebddd9f --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/FriendListItem.as @@ -0,0 +1,133 @@ +package com.view.ui.farm +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class FriendListItem extends Sprite + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var mc:MovieClip; + + private var farm:FarmView = FarmView.getInstance(); + + private var _friendId:int; + + private var isSelect:Boolean; + + public function FriendListItem() + { + super(); + this.bg1 = PublicMethod.createShape(16777215,159,24); + this.bg1.alpha = 0.3; + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(3692628,159,24); + this.bg2.alpha = 0.7; + this.bg2.visible = false; + addChild(this.bg1); + addChild(this.bg2); + this.mc = this.farm.getMovieClip(ClassConfig.farm_FriendListItem); + addChild(this.mc); + this.mc.name_txt.mouseEnabled = false; + this.mc.shui_mc.mouseEnabled = false; + this.mc.shou_mc.mouseEnabled = false; + this.mc.shui_mc.visible = false; + this.mc.shou_mc.visible = false; + buttonMode = true; + this.mc.name_txt.text = ""; + 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.isSelect && this._friendId > 0) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(!this.isSelect && this._friendId > 0) + { + this.bg1.visible = true; + } + } + + public function setSelect() : void + { + this.isSelect = true; + if(this.bg1.visible) + { + this.bg1.visible = false; + } + this.bg2.visible = true; + } + + public function hiddenStealIcon() : void + { + this.mc.shou_mc.visible = false; + } + + public function hiddenWaterIcon() : void + { + this.mc.shui_mc.visible = false; + } + + public function setUnSelect() : void + { + this.isSelect = false; + this.bg2.visible = false; + } + + public function update(param1:Object) : void + { + if(param1 == null) + { + this._friendId = 0; + this.mc.name_txt.text = ""; + this.mc.shui_mc.visible = false; + this.mc.shou_mc.visible = false; + } + else + { + this._friendId = param1.friendId; + this.mc.name_txt.text = param1.friendName; + this.updatePic(param1.canSteal,param1.canWater); + } + } + + public function get friendId() : int + { + return this._friendId; + } + + public function updatePic(param1:int, param2:int) : void + { + if(param1 == 1) + { + this.mc.shou_mc.visible = true; + } + else + { + this.mc.shou_mc.visible = false; + } + if(param2 == 1) + { + this.mc.shui_mc.visible = true; + } + else + { + this.mc.shui_mc.visible = false; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/NumberMC.as b/flash_decompiled/com/view/ui/farm/NumberMC.as new file mode 100644 index 0000000..fa69b7c --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/NumberMC.as @@ -0,0 +1,97 @@ +package com.view.ui.farm +{ + import com.InstallFace; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class NumberMC extends Sprite + { + + private var valid:Object; + + private var _auto:Boolean = false; + + private var _value:int; + + private var mc:Sprite; + + private var type:int = 0; + + public function NumberMC(param1:int = 0) + { + super(); + this.type = param1; + if(this.numChildren > 0) + { + this.removeChildAt(0); + } + } + + public function set value(param1:int) : * + { + } + + public function clear() : * + { + var _loc1_:* = 0; + while(_loc1_ < this.numChildren) + { + this.removeChildAt(0); + _loc1_ += 1; + } + } + + public function set autoPlay(param1:Boolean) : void + { + this._auto = param1; + } + + private function e_added(param1:Event) : * + { + } + + public function setValue(param1:int) : * + { + var _loc2_:String = null; + var _loc3_:Bitmap = null; + this._value = param1; + if(this.mc) + { + if(this.contains(this.mc)) + { + this.removeChild(this.mc); + } + } + this.mc = new Sprite(); + this.addChild(this.mc); + var _loc4_:* = this._value.toString(); + var _loc5_:int = 0; + var _loc6_:int = 0; + while(_loc6_ < _loc4_.length) + { + _loc2_ = _loc4_.charAt(_loc6_); + try + { + _loc3_ = new Bitmap(); + _loc3_.bitmapData = InstallFace.getInstance().getPng("lib_num_" + _loc2_); + _loc3_.x = _loc5_; + _loc5_ += _loc3_.width; + _loc3_.y = 0; + this.mc.addChild(_loc3_); + } + catch(e:*) + { + } + _loc6_ += 1; + } + this.mc.x = -this.mc.width / 2; + } + + public function get value() : int + { + return this._value; + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/PackageList.as b/flash_decompiled/com/view/ui/farm/PackageList.as new file mode 100644 index 0000000..d56e401 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/PackageList.as @@ -0,0 +1,259 @@ +package com.view.ui.farm +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.PublicMethod; + import com.data.data.farm.UserFarmType; + import com.loader.CLoader; + import com.view.mc.sprite.CheckBoxMc; + import com.view.ui.farm.data.UserFarmAdditionData; + import com.view.world.EmptyContainer; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import com.view.world.ui.AbstractView; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.events.MouseEvent; + import flash.net.URLRequest; + + public class PackageList extends AbstractView + { + + private var farmView:FarmView = FarmView.getInstance(); + + public var packMc:MovieClip; + + private var changeIsLian:Function; + + private var closeMeF:Function; + + private var containerMc:EmptyContainer; + + private var isLian:CheckBoxMc; + + private var hasLoadPuTong:Boolean; + + private var isSelectLian:Boolean; + + public function PackageList() + { + super(); + this.packMc = this.farmView.getMovieClip(ClassConfig.farm_seed); + addChild(this.packMc); + this.packMc.puTong_label.mouseEnabled = false; + this.packMc.gaoJi_label.mouseEnabled = false; + var _loc1_:SimpleButton = face.getButton(ClassConfig.button_close); + addChild(_loc1_); + _loc1_.x = 265; + _loc1_.y = 28; + _loc1_.addEventListener(MouseEvent.CLICK,this.closeSeedUI); + this.packMc.puTong_btn.gotoAndStop(2); + this.packMc.gaoJi_btn.gotoAndStop(1); + this.containerMc = new EmptyContainer(); + addChild(this.containerMc); + this.packMc.puTong_btn.addEventListener(MouseEvent.CLICK,this.puTong,false,0,true); + this.packMc.gaoJi_btn.addEventListener(MouseEvent.CLICK,this.gaoJi,false,0,true); + this.isLian = new CheckBoxMc(); + addChild(this.isLian); + this.isLian.x = 178; + this.isLian.y = 30; + this.isLian.addEventListener(MouseEvent.CLICK,this.lianClick,false,0,true); + this.packMc.puTong_btn.buttonMode = true; + this.packMc.gaoJi_btn.buttonMode = true; + } + + private function click(param1:MouseEvent) : void + { + var _loc2_:FarmPackageItem = FarmPackageItem(param1.currentTarget); + var _loc3_:CLoader = new CLoader(); + var _loc4_:String = ServerConfig.IMG_SEED_URL + _loc2_.imgName; + _loc3_.load(new URLRequest(_loc4_)); + var _loc5_:MovieClip = new MovieClip(); + _loc5_.addChild(_loc3_); + this.farmView.showMouse(_loc5_,true,_loc2_); + } + + public function gaoJi(param1:MouseEvent) : void + { + this.packMc.puTong_btn.gotoAndStop(1); + this.packMc.gaoJi_btn.gotoAndStop(2); + this.showGaoJi(); + this.containerMc.visible = false; + } + + private function showGaoJi() : void + { + this.containerMc.clear(); + } + + public function puTong(param1:MouseEvent) : void + { + this.packMc.puTong_btn.gotoAndStop(2); + this.packMc.gaoJi_btn.gotoAndStop(1); + if(!this.hasLoadPuTong) + { + this.showPuTong(); + } + this.containerMc.visible = true; + } + + private function closeSeedUI(param1:MouseEvent) : void + { + if(Boolean(this.closeMeF)) + { + this.closeMeF(); + } + } + + public function set closeF(param1:Function) : void + { + this.closeMeF = param1; + } + + private function lianClick(param1:MouseEvent) : void + { + if(this.isSelectLian) + { + this.isSelectLian = false; + this.isLian.setUnSelect(); + } + else + { + this.isSelectLian = true; + this.isLian.setSelect(); + } + if(Boolean(this.changeIsLian)) + { + this.changeIsLian(this.isSelectLian); + } + } + + public function set changeLian(param1:Function) : void + { + this.changeIsLian = param1; + } + + private function showPuTong() : void + { + var _loc1_:int = 0; + var _loc2_:Object = null; + var _loc3_:int = 0; + var _loc4_:UserFarmAdditionData = null; + var _loc5_:Object = null; + var _loc6_:FarmPackageItem = null; + var _loc11_:int = 0; + var _loc12_:int = 0; + var _loc13_:int = 0; + var _loc14_:int = 0; + var _loc16_:UserFarmType = null; + this.containerMc.clear(); + var _loc7_:* = new Array(); + var _loc8_:* = new Array(); + var _loc9_:* = new Array(); + var _loc10_:* = new Array(); + var _loc15_:int = 1; + while(_loc15_ <= 16) + { + _loc2_ = new Object(); + _loc2_.typeId = _loc15_; + _loc16_ = this.farmView.getSeedById(_loc15_); + _loc2_.plantName = _loc16_.plantName; + _loc2_.popNum = _loc16_.popNum; + _loc2_.needTime = _loc16_.needTime; + _loc2_.outputNum = _loc16_.outputNum; + _loc3_ = _loc16_.resType; + _loc4_ = this.farmView.userFarmAdditionDataList.getUserFarmAdditionData(_loc3_); + if(_loc4_) + { + _loc2_.techEv = _loc4_.techEv; + _loc2_.buEv = _loc4_.buEv; + _loc2_.leaEv = _loc4_.leaEv; + _loc2_.userEv = _loc4_.userEv; + } + else + { + _loc2_.techEv = 0; + _loc2_.buEv = 0; + _loc2_.leaEv = 0; + _loc2_.userEv = 0; + } + switch(_loc3_) + { + case 1: + _loc8_[_loc11_] = _loc2_; + _loc11_ += 1; + break; + case 2: + _loc10_[_loc12_] = _loc2_; + _loc12_ += 1; + break; + case 3: + _loc9_[_loc13_] = _loc2_; + _loc13_ += 1; + break; + case 4: + _loc7_[_loc14_] = _loc2_; + _loc14_ += 1; + } + _loc15_ += 1; + } + _loc1_ = 0; + while(_loc1_ < _loc7_.length) + { + _loc5_ = _loc7_[_loc1_]; + _loc6_ = new FarmPackageItem(); + _loc6_.typeId = _loc5_.typeId; + _loc6_.upData("seed1" + (_loc1_ + 1)); + this.containerMc.addChild(_loc6_); + _loc6_.x = 217; + _loc6_.y = 49 + _loc1_ * 67; + _loc6_.addEventListener(MouseEvent.CLICK,this.click,false,0,true); + ToolTipManager.getInstance().setToolTip(_loc6_,new TxtTooltip(_loc5_.plantName + "\n占用" + _loc5_.popNum + "人口\n耗时" + PublicMethod.formatSecond(_loc5_.needTime) + "\n基础产量:" + _loc5_.outputNum + "\n科技加成:" + int(_loc5_.outputNum * _loc5_.techEv) + "\n工坊加成:" + int(_loc5_.outputNum * _loc5_.buEv) + "\n君主加成:" + int(_loc5_.outputNum * _loc5_.userEv) + "\n联盟加成:" + int(_loc5_.outputNum * _loc5_.leaEv) + "\n总产量:" + int(_loc5_.outputNum + _loc5_.outputNum * _loc5_.techEv + _loc5_.outputNum * _loc5_.buEv + _loc5_.outputNum * _loc5_.userEv + _loc5_.outputNum * _loc5_.leaEv))); + _loc1_ += 1; + } + _loc1_ = 0; + while(_loc1_ < _loc8_.length) + { + _loc5_ = _loc8_[_loc1_]; + _loc6_ = new FarmPackageItem(); + _loc6_.typeId = _loc5_.typeId; + _loc6_.upData("seed2" + (_loc1_ + 1)); + this.containerMc.addChild(_loc6_); + _loc6_.x = 13; + _loc6_.y = 49 + _loc1_ * 67; + _loc6_.addEventListener(MouseEvent.CLICK,this.click,false,0,true); + ToolTipManager.getInstance().setToolTip(_loc6_,new TxtTooltip(_loc5_.plantName + "\n占用" + _loc5_.popNum + "人口\n耗时" + PublicMethod.formatSecond(_loc5_.needTime) + "\n基础产量:" + _loc5_.outputNum + "\n科技加成:" + int(_loc5_.outputNum * _loc5_.techEv) + "\n工坊加成:" + int(_loc5_.outputNum * _loc5_.buEv) + "\n君主加成:" + int(_loc5_.outputNum * _loc5_.userEv) + "\n联盟加成:" + int(_loc5_.outputNum * _loc5_.leaEv) + "\n总产量:" + int(_loc5_.outputNum + _loc5_.outputNum * _loc5_.techEv + _loc5_.outputNum * _loc5_.buEv + _loc5_.outputNum * _loc5_.userEv + _loc5_.outputNum * _loc5_.leaEv))); + _loc1_ += 1; + } + _loc1_ = 0; + while(_loc1_ < _loc9_.length) + { + _loc5_ = _loc9_[_loc1_]; + _loc6_ = new FarmPackageItem(); + _loc6_.typeId = _loc5_.typeId; + _loc6_.upData("seed3" + (_loc1_ + 1)); + this.containerMc.addChild(_loc6_); + _loc6_.x = 149; + _loc6_.y = 49 + _loc1_ * 67; + _loc6_.addEventListener(MouseEvent.CLICK,this.click,false,0,true); + ToolTipManager.getInstance().setToolTip(_loc6_,new TxtTooltip(_loc5_.plantName + "\n占用" + _loc5_.popNum + "人口\n耗时" + PublicMethod.formatSecond(_loc5_.needTime) + "\n基础产量:" + _loc5_.outputNum + "\n科技加成:" + int(_loc5_.outputNum * _loc5_.techEv) + "\n工坊加成:" + int(_loc5_.outputNum * _loc5_.buEv) + "\n君主加成:" + int(_loc5_.outputNum * _loc5_.userEv) + "\n联盟加成:" + int(_loc5_.outputNum * _loc5_.leaEv) + "\n总产量:" + int(_loc5_.outputNum + _loc5_.outputNum * _loc5_.techEv + _loc5_.outputNum * _loc5_.buEv + _loc5_.outputNum * _loc5_.userEv + _loc5_.outputNum * _loc5_.leaEv))); + _loc1_ += 1; + } + _loc1_ = 0; + while(_loc1_ < _loc10_.length) + { + _loc5_ = _loc10_[_loc1_]; + _loc6_ = new FarmPackageItem(); + _loc6_.typeId = _loc5_.typeId; + _loc6_.upData("seed4" + (_loc1_ + 1)); + this.containerMc.addChild(_loc6_); + _loc6_.x = 81; + _loc6_.y = 49 + _loc1_ * 67; + _loc6_.addEventListener(MouseEvent.CLICK,this.click,false,0,true); + ToolTipManager.getInstance().setToolTip(_loc6_,new TxtTooltip(_loc5_.plantName + "\n占用" + _loc5_.popNum + "人口\n耗时" + PublicMethod.formatSecond(_loc5_.needTime) + "\n基础产量:" + _loc5_.outputNum + "\n科技加成:" + int(_loc5_.outputNum * _loc5_.techEv) + "\n工坊加成:" + int(_loc5_.outputNum * _loc5_.buEv) + "\n君主加成:" + int(_loc5_.outputNum * _loc5_.userEv) + "\n联盟加成:" + int(_loc5_.outputNum * _loc5_.leaEv) + "\n总产量:" + int(_loc5_.outputNum + _loc5_.outputNum * _loc5_.techEv + _loc5_.outputNum * _loc5_.buEv + _loc5_.outputNum * _loc5_.userEv + _loc5_.outputNum * _loc5_.leaEv))); + _loc1_ += 1; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/TreeMc.as b/flash_decompiled/com/view/ui/farm/TreeMc.as new file mode 100644 index 0000000..efe555f --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/TreeMc.as @@ -0,0 +1,158 @@ +package com.view.ui.farm +{ + import com.comfig.ClassConfig; + import com.utils.Utils; + import com.view.newui.UISmallBtn; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.utils.setTimeout; + + public class TreeMc extends Sprite + { + + private var farm:FarmView = FarmView.getInstance(); + + public var treeMc:MovieClip; + + public var jiaoshuiBtn:MovieClip; + + public var shouhuoBtn:UISmallBtn; + + private var canWater:int; + + public var shouhuoFunc:Function; + + public var jiaoshuiFunc:Function; + + public function TreeMc() + { + super(); + this.treeMc = this.farm.getMovieClip(ClassConfig.farm_tree); + addChild(this.treeMc); + this.treeMc.time_mc.visible = false; + this.treeMc.water_mc.visible = false; + this.treeMc.water_mc.gotoAndStop(1); + this.treeMc.treeMc.gotoAndStop(1); + this.jiaoshuiBtn = this.farm.getMovieClip(ClassConfig.farm_jiaoshui); + addChild(this.jiaoshuiBtn); + this.jiaoshuiBtn.gotoAndStop(1); + this.jiaoshuiBtn.addEventListener(MouseEvent.CLICK,this.jiaoshuiTree,false,0,true); + this.jiaoshuiBtn.x = 125; + this.jiaoshuiBtn.y = 110; + this.jiaoshuiBtn.buttonMode = true; + this.jiaoshuiBtn.visible = false; + this.treeMc.time_mc.time_txt.wordWrap = true; + this.treeMc.time_mc.time_txt.multiline = true; + this.shouhuoBtn = new UISmallBtn("收 获",2); + addChild(this.shouhuoBtn); + this.shouhuoBtn.visible = false; + this.shouhuoBtn.x = 170; + this.shouhuoBtn.y = 100; + this.shouhuoBtn.onClick = this.shouhuoTree; + } + + public function firstStep() : void + { + this.shouhuoBtn.visible = false; + this.treeMc.treeMc.gotoAndStop(1); + this.treeMc.time_mc.visible = false; + this.jiaoshuiBtn.visible = false; + this.treeMc.water_mc.visible = false; + ToolTipManager.getInstance().setToolTip(this.treeMc.treeMc,new TxtTooltip("当君主等级达到10级以后可浇水,\n浇水到一定次数后,摇钱树会开花\n,经过24小时的开花期后,摇钱树\n会结出果实,点击后将得到20点券\n。领取点券后可继续浇水让摇钱树\n进入下一个成熟期")); + } + + public function secondStep(param1:Object = null) : void + { + var waterNum:int = 0; + var obj:Object = param1; + this.shouhuoBtn.visible = false; + this.treeMc.treeMc.gotoAndStop(2); + this.treeMc.time_mc.visible = false; + if(obj == null) + { + this.canWater = this.farm.userFarmTreeData.checkCanWater(this.farm.getUser().userId) ? 1 : 0; + waterNum = this.farm.userFarmTreeData.waterNum; + } + else + { + this.canWater = int(obj.canWater); + waterNum = int(obj.waterNum); + } + this.jiaoshuiBtn.visible = true; + this.treeMc.water_mc.visible = true; + ToolTipManager.getInstance().setToolTip(this.treeMc.water_mc,new TxtTooltip("已浇水" + waterNum + "次,还需浇水" + String(10 - waterNum) + "次才可以开花")); + this.treeMc.water_mc.gotoAndStop(waterNum + 1); + if(this.canWater == 0) + { + setTimeout(function():* + { + Utils.applyGray(jiaoshuiBtn); + },500); + this.jiaoshuiBtn.mouseEnabled = false; + this.jiaoshuiBtn.mouseChildren = false; + } + else + { + Utils.applyDefault(this.jiaoshuiBtn); + this.jiaoshuiBtn.mouseEnabled = true; + this.jiaoshuiBtn.mouseChildren = true; + } + ToolTipManager.getInstance().setToolTip(this.treeMc.treeMc,new TxtTooltip("自己和好友每天可以对摇钱树浇1次水,浇满10次以后摇钱树会开花")); + } + + public function threeStep() : void + { + this.shouhuoBtn.visible = false; + this.treeMc.treeMc.gotoAndStop(3); + this.jiaoshuiBtn.visible = false; + this.treeMc.time_mc.visible = true; + this.treeMc.time_mc.time_txt.htmlText = Utils.formatSecond(this.farm.userFarmTreeData.remainTime) + "后可收获50000点券"; + (this.treeMc.time_mc.time_txt as TextField).selectable = false; + this.treeMc.water_mc.visible = false; + ToolTipManager.getInstance().setToolTip(this.treeMc.treeMc,new TxtTooltip("摇钱树开花中," + Utils.formatSecond(this.farm.userFarmTreeData.remainTime) + "后可摇出50000点券")); + } + + public function fourStep() : void + { + this.treeMc.treeMc.gotoAndStop(4); + if(this.farm.currentUserId == 0 || this.farm.currentUserId == this.farm.getUser().userId) + { + this.shouhuoBtn.visible = true; + } + else + { + this.shouhuoBtn.visible = false; + } + this.treeMc.water_mc.visible = false; + this.jiaoshuiBtn.visible = false; + this.treeMc.time_mc.visible = false; + } + + public function clear() : void + { + ToolTipManager.getInstance().disposeToolTip(this.treeMc.treeMc); + } + + private function shouhuoTree(param1:MouseEvent) : void + { + if(Boolean(this.shouhuoFunc)) + { + this.shouhuoFunc(); + } + } + + private function jiaoshuiTree(param1:MouseEvent) : void + { + this.jiaoshuiBtn.gotoAndPlay(2); + if(this.jiaoshuiFunc != null && this.canWater == 1) + { + this.jiaoshuiFunc(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/data/Data.as b/flash_decompiled/com/view/ui/farm/data/Data.as new file mode 100644 index 0000000..3bc7ff2 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/data/Data.as @@ -0,0 +1,72 @@ +package com.view.ui.farm.data +{ + public dynamic class Data + { + + public static const USER_FARM_AREA:int = 18; + + public static const USER_FARM_PLANT:int = 19; + + public static const USER_FARM_ADDITION:int = 21; + + public static const USER_FARM_TREE:int = 20; + + private var m_IExportType:int; + + private var m_IExportOpCode:int; + + protected var property:Array; + + public function Data() + { + super(); + } + + public function readObject(param1:Object) : void + { + var _loc2_:String = null; + if(!this.property) + { + throw new Error("property the Object is not the class obj"); + } + var _loc3_:* = new Array(); + var _loc4_:int = 0; + while(_loc4_ < this.property.length) + { + _loc3_[_loc4_] = this.property[_loc4_]; + _loc4_++; + } + _loc3_.push("IExportOpCode"); + if(this.IExportType == param1.IExportType) + { + for each(_loc2_ in _loc3_) + { + this[_loc2_] = param1[_loc2_]; + } + return; + } + throw new Error("IExportType the Object is not the class obj"); + } + + public function set IExportOpCode(param1:int) : void + { + this.m_IExportOpCode = param1; + } + + public function get IExportType() : int + { + return this.m_IExportType; + } + + public function get IExportOpCode() : int + { + return this.m_IExportOpCode; + } + + public function set IExportType(param1:int) : void + { + this.m_IExportType = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/data/UserFarmAdditionData.as b/flash_decompiled/com/view/ui/farm/data/UserFarmAdditionData.as new file mode 100644 index 0000000..a35fb5d --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/data/UserFarmAdditionData.as @@ -0,0 +1,110 @@ +package com.view.ui.farm.data +{ + public class UserFarmAdditionData extends Data + { + + private var m_leaEv:Number; + + private var m_taEv:Number; + + private var m_userId:int; + + private var m_resType:int; + + private var m_userEv:Number; + + private var m_itemEv:Number; + + private var m_techEv:Number; + + private var m_buEv:Number; + + public function UserFarmAdditionData() + { + super(); + this.IExportType = Data.USER_FARM_ADDITION; + this.property = ["userId","userEv","techEv","itemEv","leaEv","taEv","buEv","resType"]; + } + + public function set leaEv(param1:Number) : void + { + this.m_leaEv = param1; + } + + public function get userId() : int + { + return this.m_userId; + } + + public function set itemEv(param1:Number) : void + { + this.m_itemEv = param1; + } + + public function get resType() : int + { + return this.m_resType; + } + + public function set userId(param1:int) : void + { + this.m_userId = param1; + } + + public function set buEv(param1:Number) : void + { + this.m_buEv = param1; + } + + public function set techEv(param1:Number) : void + { + this.m_techEv = param1; + } + + public function get leaEv() : Number + { + return this.m_leaEv; + } + + public function get userEv() : Number + { + return this.m_userEv; + } + + public function get itemEv() : Number + { + return this.m_itemEv; + } + + public function get techEv() : Number + { + return this.m_techEv; + } + + public function get buEv() : Number + { + return this.m_buEv; + } + + public function set resType(param1:int) : void + { + this.m_resType = param1; + } + + public function set userEv(param1:Number) : void + { + this.m_userEv = param1; + } + + public function set taEv(param1:Number) : void + { + this.m_taEv = param1; + } + + public function get taEv() : Number + { + return this.m_taEv; + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/data/UserFarmAdditionDataList.as b/flash_decompiled/com/view/ui/farm/data/UserFarmAdditionDataList.as new file mode 100644 index 0000000..9426726 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/data/UserFarmAdditionDataList.as @@ -0,0 +1,47 @@ +package com.view.ui.farm.data +{ + import com.utils.HashMap; + + public class UserFarmAdditionDataList + { + + private var m_list:HashMap; + + public function UserFarmAdditionDataList() + { + super(); + this.m_list = new HashMap(); + } + + public function delUserFarmAdditionData(param1:int) : void + { + this.m_list.remove(param1); + } + + public function getUserFarmAdditionValues() : Array + { + return this.m_list.values(); + } + + public function putUserFarmAdditionData(param1:UserFarmAdditionData) : void + { + this.m_list.put(param1.resType,param1); + } + + public function getUserFarmAdditionData(param1:int) : UserFarmAdditionData + { + var _loc2_:int = 0; + while(_loc2_ < this.m_list.keys().length) + { + _loc2_++; + } + return this.m_list.getValue(param1); + } + + public function getMap() : HashMap + { + return this.m_list; + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/data/UserFarmAreaData.as b/flash_decompiled/com/view/ui/farm/data/UserFarmAreaData.as new file mode 100644 index 0000000..545e2fb --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/data/UserFarmAreaData.as @@ -0,0 +1,97 @@ +package com.view.ui.farm.data +{ + public class UserFarmAreaData extends Data + { + + public static const AREA_STATE_NORMAL:int = 0; + + public static const AREA_STATE_WAR:int = 1; + + public static const AREA_STATE_UNUSE:int = 2; + + private var m_posX:int; + + private var m_posY:int; + + private var m_userId:int; + + private var m_stealUserId:int; + + private var m_id:int; + + private var m_state:int; + + public function UserFarmAreaData() + { + super(); + this.IExportType = Data.USER_FARM_AREA; + this.property = ["id","userId","posX","posY","state"]; + } + + public function get posX() : int + { + return this.m_posX; + } + + public function get posY() : int + { + return this.m_posY; + } + + public function set posX(param1:int) : void + { + this.m_posX = param1; + } + + public function set posY(param1:int) : void + { + this.m_posY = param1; + } + + public function set userId(param1:int) : void + { + this.m_userId = param1; + } + + public function get userId() : int + { + return this.m_userId; + } + + public function get state() : int + { + return this.m_state; + } + + public function get id() : int + { + return this.m_id; + } + + public function set state(param1:int) : void + { + this.m_state = param1; + } + + public function set stealUserId(param1:int) : void + { + this.m_stealUserId = param1; + } + + public function get stealUserId() : int + { + return this.m_stealUserId; + } + + public function set id(param1:int) : void + { + this.m_id = param1; + } + + public function toString() : String + { + return "posX:" + this.m_posX + ", posY:" + this.m_posY; + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/data/UserFarmAreaDataList.as b/flash_decompiled/com/view/ui/farm/data/UserFarmAreaDataList.as new file mode 100644 index 0000000..b19aa84 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/data/UserFarmAreaDataList.as @@ -0,0 +1,37 @@ +package com.view.ui.farm.data +{ + import com.utils.HashMap; + + public class UserFarmAreaDataList + { + + private var m_list:HashMap; + + public function UserFarmAreaDataList() + { + super(); + this.m_list = new HashMap(); + } + + public function getFarmAreaDataValues() : Array + { + return this.m_list.values(); + } + + public function delFarmAreaData(param1:int) : void + { + this.m_list.remove(param1); + } + + public function getFarmAreaData(param1:int) : UserFarmAreaData + { + return this.m_list.getValue(param1); + } + + public function putFarmAreaData(param1:UserFarmAreaData) : void + { + this.m_list.put(param1.id,param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/data/UserFarmPlantData.as b/flash_decompiled/com/view/ui/farm/data/UserFarmPlantData.as new file mode 100644 index 0000000..b13a16e --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/data/UserFarmPlantData.as @@ -0,0 +1,192 @@ +package com.view.ui.farm.data +{ + public class UserFarmPlantData extends Data + { + + public static const PLANT_STATUS_END:int = 1; + + public static const PLANT_STATUS_PROTECT:int = 2; + + public static const PLANT_STATUS_WORKING:int = 0; + + public static const PLANT_STATUS_SEED:int = 3; + + private var m_harviestTime:Date; + + private var m_status:int; + + private var m_stealUserId:int; + + private var m_id:int; + + private var m_yeild:int; + + private var m_userId:int; + + private var m_farmTypeId:int; + + private var m_remainTime:Number; + + private var m_farmAreaId:int; + + private var m_standYeild:int; + + private var m_endTime:Number = 0; + + private var m_startTime:Date; + + public function UserFarmPlantData() + { + super(); + this.IExportType = Data.USER_FARM_PLANT; + this.property = ["id","userId","farmTypeId","status","farmAreaId","startTime","remainTime","yeild","standYeild","stealUserId"]; + } + + public function set userId(param1:int) : void + { + this.m_userId = param1; + } + + public function get yeild() : int + { + return this.m_yeild; + } + + public function set farmTypeId(param1:int) : void + { + this.m_farmTypeId = param1; + } + + public function get id() : int + { + return this.m_id; + } + + public function set startTime(param1:Date) : void + { + this.m_startTime = new Date(); + } + + public function set yeild(param1:int) : void + { + this.m_yeild = param1; + } + + public function set remainTime(param1:Number) : void + { + this.m_endTime = param1 == 0 ? param1 : new Date().time + param1 * 1000; + this.m_remainTime = param1 * 1000; + } + + public function get curYeild() : int + { + return this.yeild; + } + + public function set id(param1:int) : void + { + this.m_id = param1; + } + + public function isTimeOut() : Boolean + { + if(this.m_endTime == 0) + { + return false; + } + var _loc1_:* = new Date().time - this.m_endTime; + if(new Date().time - this.m_endTime >= 0) + { + return true; + } + return false; + } + + public function set farmAreaId(param1:int) : * + { + this.m_farmAreaId = param1; + } + + public function set standYeild(param1:int) : void + { + this.m_standYeild = param1; + } + + public function get farmTypeId() : int + { + return this.m_farmTypeId; + } + + public function get userId() : int + { + return this.m_userId; + } + + public function set harviestTime(param1:Date) : void + { + this.m_harviestTime = param1; + } + + public function get startTime() : Date + { + return this.m_startTime; + } + + public function getNowYeild() : Number + { + return 0; + } + + public function get remainTime() : Number + { + var _loc1_:* = new Date().time; + return Math.max(0,int((this.m_endTime - _loc1_) / 1000)); + } + + public function get farmAreaId() : int + { + return this.m_farmAreaId; + } + + public function get standYeild() : int + { + return this.m_standYeild; + } + + public function set status(param1:int) : void + { + this.m_status = param1; + } + + public function get harviestTime() : Date + { + return this.m_harviestTime; + } + + public function set stealUserId(param1:int) : void + { + this.m_stealUserId = param1; + } + + public function advanceStartTime(param1:int) : void + { + this.m_startTime.setTime(this.m_startTime.getTime() - param1 * 1000); + } + + public function get status() : int + { + return this.m_status; + } + + public function toString() : String + { + return "m_areaId:" + this.m_farmAreaId + ", m_type:" + this.m_farmTypeId; + } + + public function get stealUserId() : int + { + return this.m_stealUserId; + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/data/UserFarmPlantDataList.as b/flash_decompiled/com/view/ui/farm/data/UserFarmPlantDataList.as new file mode 100644 index 0000000..dfcf399 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/data/UserFarmPlantDataList.as @@ -0,0 +1,54 @@ +package com.view.ui.farm.data +{ + import com.utils.HashMap; + + public class UserFarmPlantDataList + { + + private var m_list:HashMap; + + public function UserFarmPlantDataList() + { + super(); + this.m_list = new HashMap(); + } + + public function isHaveHaRipePlant() : Boolean + { + var _loc1_:UserFarmPlantData = null; + var _loc2_:* = this.m_list.values(); + var _loc3_:int = 0; + while(_loc3_ < _loc2_.length) + { + _loc1_ = _loc2_[_loc3_]; + if(_loc1_.status == 1 || _loc1_.status == 2) + { + return true; + } + _loc3_++; + } + return false; + } + + public function putUserFarmPlantData(param1:UserFarmPlantData) : void + { + this.m_list.put(param1.id,param1); + } + + public function removeUserFarmPlantData(param1:int) : void + { + this.m_list.remove(param1); + } + + public function getUserFarmPlantDataValues() : Array + { + return this.m_list.values(); + } + + public function getUserFarmPlantData(param1:int) : UserFarmPlantData + { + return this.m_list.getValue(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/farm/data/UserFarmTreeData.as b/flash_decompiled/com/view/ui/farm/data/UserFarmTreeData.as new file mode 100644 index 0000000..022e992 --- /dev/null +++ b/flash_decompiled/com/view/ui/farm/data/UserFarmTreeData.as @@ -0,0 +1,148 @@ +package com.view.ui.farm.data +{ + import com.common.DateUtil; + + public class UserFarmTreeData extends Data + { + + public static const TREE_WATER_MAX_TIME:int = 10; + + public static const TREE_MATURN_TIME:int = 18000; + + private var m_waterNum:int; + + private var m_maturnTime:Date; + + private var m_userId:int; + + private var m_remainTime:int = -2; + + private var m_waterUser:String = ""; + + private var m_endTime:Number; + + public function UserFarmTreeData() + { + super(); + this.IExportType = Data.USER_FARM_TREE; + this.property = ["userId","maturnTime","waterNum","waterUser","remainTime"]; + } + + public function checkTreeHarvest() : Boolean + { + return DateUtil.distance(new Date(),this.getHarvestTime()) >= 0; + } + + public function set waterUser(param1:String) : void + { + this.m_waterUser = param1; + } + + public function get userId() : int + { + return this.m_userId; + } + + public function getSecond2Harvest() : Number + { + var _loc1_:Number = new Date().getTime() - this.m_maturnTime.getTime(); + return TREE_MATURN_TIME - _loc1_ / 1000; + } + + public function get waterUser() : String + { + return this.m_waterUser; + } + + public function set userId(param1:int) : void + { + this.m_userId = param1; + } + + public function checkCanWater(param1:int) : Boolean + { + var _loc2_:* = this.m_waterUser.split(","); + var _loc3_:int = 0; + while(_loc3_ < _loc2_.length) + { + if(param1 + "" == _loc2_[_loc3_]) + { + return false; + } + _loc3_++; + } + return true; + } + + public function get remainTime() : int + { + if(this.m_remainTime <= 0) + { + return this.m_remainTime; + } + return Math.max(0,int((this.m_endTime - new Date().time) / 1000)); + } + + public function set waterNum(param1:int) : void + { + this.m_waterNum = param1; + } + + public function getHarvestTime() : Date + { + var _loc1_:* = new Date(); + _loc1_.setTime(this.m_maturnTime.getTime() + TREE_MATURN_TIME * 1000); + return _loc1_; + } + + public function addWaterNum() : void + { + if(this.waterNum >= TREE_WATER_MAX_TIME) + { + return; + } + this.waterNum + 1; + if(this.waterNum == TREE_WATER_MAX_TIME) + { + this.maturnTime = new Date(); + } + } + + public function set remainTime(param1:int) : void + { + var _loc2_:* = new Date().time; + this.m_endTime = _loc2_ + param1 * 1000; + this.m_remainTime = param1; + } + + public function get waterNum() : int + { + return this.m_waterNum; + } + + public function checkUserCanWater(param1:int) : Boolean + { + var _loc2_:String = null; + var _loc3_:* = this.waterUser.split(","); + for each(_loc2_ in _loc3_) + { + if(_loc2_ == param1 + "") + { + return false; + } + } + return true; + } + + public function set maturnTime(param1:Date) : void + { + this.m_maturnTime = param1; + } + + public function get maturnTime() : Date + { + return this.m_maturnTime; + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/ExchangeFishItem.as b/flash_decompiled/com/view/ui/fish/ExchangeFishItem.as new file mode 100644 index 0000000..9277bd9 --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/ExchangeFishItem.as @@ -0,0 +1,50 @@ +package com.view.ui.fish +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.text.TextField; + + public class ExchangeFishItem extends Sprite + { + + private var text1:TextField; + + private var text2:TextField; + + public function ExchangeFishItem() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(242); + addChild(_loc1_); + this.text1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + addChild(this.text1); + this.text1.y = 4; + this.text1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.text2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + addChild(this.text2); + this.text2.x = this.text1.x + this.text1.width; + this.text2.y = this.text1.y; + this.text2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + } + + public function setValue(param1:Object, param2:Object = null) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + if(param1 == null) + { + this.text1.text = ""; + this.text2.text = ""; + } + else if(param2) + { + _loc3_ = int(param1.num); + _loc4_ = int(param2.num); + this.text2.text = String(_loc3_ * _loc4_); + this.text1.htmlText = "" + param2.box + ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/ExchangeFishView.as b/flash_decompiled/com/view/ui/fish/ExchangeFishView.as new file mode 100644 index 0000000..0252008 --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/ExchangeFishView.as @@ -0,0 +1,164 @@ +package com.view.ui.fish +{ + 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 fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.MovieClip; + import flash.display.Sprite; + + public class ExchangeFishView extends UIWindowBg + { + + private var bg:Sprite; + + private var titleMc:MovieClip; + + private var tableMc:UITable; + + private var fishView:FishBuildUI; + + private var itemScrollPane:ScrollPane; + + private var itemListMc:Sprite; + + private var itemVec:Vector.; + + private var exitBtn:UIButton; + + private var itemDir:HashMap; + + public function ExchangeFishView(param1:FishBuildUI) + { + var _loc3_:Array = null; + var _loc5_:ExchangeFishItem = null; + super(); + initSize(65,290); + loadTitle(UITitleConfig.title_duihuanjieguo); + addCloseBtn(); + initBg(); + var _loc2_:Array = ["恭喜您获得","数量"]; + _loc3_ = [150,100]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(10,_loc2_,_loc3_); + bg1.addChild(this.tableMc); + this.tableMc.x = 10; + this.tableMc.y = 10; + this.exitBtn = new UIButton("退 出",2,10); + addChild(this.exitBtn); + this.exitBtn.x = 115; + this.exitBtn.y = 331; + this.exitBtn.onClick = closeSelf; + this.itemScrollPane = new ScrollPane(); + this.itemScrollPane.setSize(246,250); + this.itemScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.itemScrollPane); + this.itemScrollPane.y = 25; + this.itemListMc = new Sprite(); + this.itemScrollPane.source = this.itemListMc; + this.itemVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 10) + { + _loc5_ = new ExchangeFishItem(); + this.itemListMc.addChild(_loc5_); + this.itemVec.push(_loc5_); + _loc5_.y = _loc4_ * 25; + _loc5_.x = 4; + _loc4_++; + } + this.itemScrollPane.update(); + this.fishView = param1; + if(this.fishView.xml == null) + { + this.fishView.loadXml(); + this.fishView.addEventListener(FishEvent.XMLLOADOVER,this.loadedXmlComplete); + } + else + { + this.loadXml(); + } + } + + private function loadedXmlComplete(param1:FishEvent) : void + { + this.fishView.removeEventListener(FishEvent.XMLLOADOVER,this.loadedXmlComplete); + this.loadXml(); + } + + private function loadXml() : void + { + var _loc3_:FishXmlData = null; + var _loc1_:XML = this.fishView.xml; + this.itemDir = new HashMap(); + var _loc2_:int = int(_loc1_.fish.length()); + var _loc4_:int = 0; + while(_loc4_ < _loc2_) + { + _loc3_ = new FishXmlData(_loc1_.fish[_loc4_]); + this.itemDir.put(_loc3_.entId,_loc3_); + _loc4_++; + } + this.initData(); + } + + public function initData() : void + { + var _loc3_:* = undefined; + var _loc4_:ExchangeFishItem = null; + if(this.itemDir == null) + { + return; + } + var _loc1_:FishModel = this.fishView.getFishModel(); + if(_loc1_ == null) + { + return; + } + var _loc2_:Array = _loc1_.exchangeArr; + this.clearList(); + if(_loc2_ == null || _loc2_.length == 0) + { + return; + } + for(_loc3_ in _loc2_) + { + if(_loc3_ > 9) + { + _loc4_ = new ExchangeFishItem(); + this.itemListMc.addChild(_loc4_); + this.itemVec.push(_loc4_); + _loc4_.y = _loc3_ * 25; + _loc4_.x = 4; + } + this.itemVec[_loc3_].setValue(_loc2_[_loc3_],this.itemDir.get(_loc2_[_loc3_].entId)); + } + this.itemScrollPane.update(); + } + + private function clearList() : void + { + var _loc1_:int = int(this.itemVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ < 10) + { + this.itemVec[_loc2_].setValue(null); + } + else + { + this.itemListMc.removeChild(this.itemVec[_loc2_]); + this.itemVec.splice(_loc2_,1); + } + _loc2_--; + } + this.itemScrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishBasketItem.as b/flash_decompiled/com/view/ui/fish/FishBasketItem.as new file mode 100644 index 0000000..6e58cb9 --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishBasketItem.as @@ -0,0 +1,82 @@ +package com.view.ui.fish +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class FishBasketItem extends Sprite + { + + private var text1:TextField; + + private var text2:TextField; + + private var text3:TextField; + + private var bg:Sprite; + + private var obj:Object; + + public function FishBasketItem() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,251,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); + var _loc1_:Sprite = PublicMethod.getTrLine(251); + addChild(_loc1_); + this.text1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,65); + addChild(this.text1); + this.text1.y = 4; + this.text1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.text2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,63); + addChild(this.text2); + this.text2.x = this.text1.x + this.text1.width; + this.text2.y = this.text1.y; + this.text2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,121); + addChild(this.text3); + this.text3.x = this.text2.x + this.text2.width + 10; + this.text3.y = this.text1.y; + } + + private function rollOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.alpha = 0; + } + } + + private function rollOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.alpha = 0.2; + } + } + + public function setValue(param1:Object, param2:Object = null) : void + { + this.obj = param1; + if(this.obj == null) + { + this.text1.text = ""; + this.text2.text = ""; + this.text3.text = ""; + } + else if(param2) + { + this.text2.text = this.obj.num; + this.text1.htmlText = "" + param2.fishName + ""; + this.text3.text = param2.box + "×" + param2.num; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishBasketView.as b/flash_decompiled/com/view/ui/fish/FishBasketView.as new file mode 100644 index 0000000..a5da9fb --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishBasketView.as @@ -0,0 +1,177 @@ +package com.view.ui.fish +{ + 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 fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class FishBasketView extends UIWindowBg + { + + private var bg:Sprite; + + private var itemScrollPane:ScrollPane; + + private var itemListMc:Sprite; + + private var itemVec:Vector.; + + private var fishView:FishBuildUI; + + private var exchangeBtn:UIButton; + + private var exitBtn:UIButton; + + private var tableMc:UITable; + + private var itemDir:HashMap; + + public function FishBasketView(param1:FishBuildUI) + { + var _loc3_:Array = null; + var _loc5_:FishBasketItem = null; + super(); + initSize(80,300); + loadTitle(UITitleConfig.title_wodeyulou); + addCloseBtn(); + initBg(); + var _loc2_:Array = ["鱼名","钓得数量","可兑换道具"]; + _loc3_ = [70,60,135]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(10,_loc2_,_loc3_); + bg1.addChild(this.tableMc); + this.tableMc.x = 10; + this.tableMc.y = 10; + this.exchangeBtn = new UIButton("兑换奖励",2,10); + addChild(this.exchangeBtn); + this.exchangeBtn.x = 90; + this.exchangeBtn.y = 333; + this.exchangeBtn.onClick = this.exchangeFish; + this.exitBtn = new UIButton("退 出",2,10); + addChild(this.exitBtn); + this.exitBtn.x = this.exchangeBtn.x + this.exchangeBtn.width + 10; + this.exitBtn.y = this.exchangeBtn.y; + this.exitBtn.onClick = closeSelf; + this.itemScrollPane = new ScrollPane(); + this.itemScrollPane.setSize(262,250); + this.itemScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.itemScrollPane); + this.itemScrollPane.y = 25; + this.itemListMc = new Sprite(); + this.itemScrollPane.source = this.itemListMc; + this.itemVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 10) + { + _loc5_ = new FishBasketItem(); + this.itemListMc.addChild(_loc5_); + this.itemVec.push(_loc5_); + _loc5_.y = _loc4_ * 25; + _loc5_.x = 4; + _loc4_++; + } + this.itemScrollPane.update(); + this.fishView = param1; + if(this.fishView.xml == null) + { + this.fishView.loadXml(); + this.fishView.addEventListener(FishEvent.XMLLOADOVER,this.loadedXmlComplete); + } + else + { + this.loadXml(); + } + } + + private function loadedXmlComplete(param1:FishEvent) : void + { + this.fishView.removeEventListener(FishEvent.XMLLOADOVER,this.loadedXmlComplete); + this.loadXml(); + } + + private function loadXml() : void + { + var _loc3_:FishXmlData = null; + var _loc1_:XML = this.fishView.xml; + this.itemDir = new HashMap(); + var _loc2_:int = int(_loc1_.fish.length()); + var _loc4_:int = 0; + while(_loc4_ < _loc2_) + { + _loc3_ = new FishXmlData(_loc1_.fish[_loc4_]); + this.itemDir.put(_loc3_.entId,_loc3_); + _loc4_++; + } + this.initData(); + } + + public function initData() : void + { + var _loc3_:* = undefined; + var _loc4_:FishBasketItem = null; + if(this.itemDir == null) + { + return; + } + this.exchangeBtn.setEnable(); + var _loc1_:FishModel = this.fishView.getFishModel(); + if(_loc1_ == null) + { + return; + } + var _loc2_:Array = _loc1_.yulouArr; + this.clearList(); + if(_loc2_ == null || _loc2_.length == 0) + { + this.exchangeBtn.setUnEnable(); + return; + } + for(_loc3_ in _loc2_) + { + if(_loc3_ > 9) + { + _loc4_ = new FishBasketItem(); + this.itemListMc.addChild(_loc4_); + this.itemVec.push(_loc4_); + _loc4_.y = _loc3_ * 25; + _loc4_.x = 4; + } + this.itemVec[_loc3_].setValue(_loc2_[_loc3_],this.itemDir.get(_loc2_[_loc3_].entId)); + } + this.itemScrollPane.update(); + } + + private function clearList() : void + { + var _loc1_:int = int(this.itemVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ < 10) + { + this.itemVec[_loc2_].setValue(null); + } + else + { + this.itemListMc.removeChild(this.itemVec[_loc2_]); + this.itemVec.splice(_loc2_,1); + } + _loc2_--; + } + this.itemScrollPane.update(); + } + + private function exchangeFish(param1:MouseEvent) : void + { + this.fishView.m_btnYuhuoduihuan.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishBuild.as b/flash_decompiled/com/view/ui/fish/FishBuild.as new file mode 100644 index 0000000..966545c --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishBuild.as @@ -0,0 +1,90 @@ +package com.view.ui.fish +{ + import com.comfig.CommonData; + import com.data.MemeberShip; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.events.MouseEvent; + + public class FishBuild extends BaseBuild + { + + private var tipStr:String; + + private var currLv:int; + + private var currUrl:String; + + public function FishBuild(param1:BuildData) + { + super(); + this.checkUrl(); + Utils.g_events.addEventListener(DevEvent.CASTLECHANGE,this.checkLvUp); + param1.swfUrl = this.currUrl; + super.buildData = param1; + super.loadSwfBg(); + super.addEvent(); + super.createNpcTip(); + this.buttonMode = true; + } + + private function checkLvUp(param1:DevEvent) : void + { + if(this.checkUrl()) + { + super.buildData.swfUrl = this.currUrl; + super.loadSwfBg(); + } + } + + private function checkUrl() : Boolean + { + if(this.currLv != 0 && this.currLv == MemeberShip.getMainCastle().rangeLv) + { + return false; + } + this.currLv = MemeberShip.getMainCastle().rangeLv; + var _loc1_:String = "pic/build/poollv1.swf"; + if(this.currLv >= CommonData.build_level_2) + { + _loc1_ = "pic/build/poollv3.swf"; + } + else if(this.currLv >= CommonData.build_level_1) + { + _loc1_ = "pic/build/poollv2.swf"; + } + else if(this.currLv >= 0) + { + _loc1_ = "pic/build/poollv1.swf"; + } + if(_loc1_ == this.currUrl) + { + return false; + } + this.currUrl = _loc1_; + return true; + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

钓鱼台

"; + npcTipStr += "钓到的鱼可兑换道具"; + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(buildUI == null) + { + buildUI = FishBuildUI.getInstance(); + } + buildUI.show(); + } + + override public function viewBuildInfo() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishBuildUI.as b/flash_decompiled/com/view/ui/fish/FishBuildUI.as new file mode 100644 index 0000000..f2c2221 --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishBuildUI.as @@ -0,0 +1,1039 @@ +package com.view.ui.fish +{ + import com.comfig.ClassConfig; + import com.comfig.PathConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.mc.button.EnterButton; + import com.view.mc.sprite.TextBar; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.tip.MulTipTitle; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tools.ToolView; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.net.URLLoader; + import flash.net.URLRequest; + import flash.text.TextField; + import flash.text.TextFormat; + + public class FishBuildUI extends BaseUI + { + + private static var instance:FishBuildUI; + + private var fishUrl:String = "pic/fish/fishing.swf"; + + public var gameRes:GameUIRes; + + public var fishPresenter:FishPresenter; + + private var bg:Sprite; + + private var bg1:Sprite; + + private var m_fishSwfContainer:Sprite; + + private var m_fishModel:FishModel; + + private var m_piaoPos:Array; + + private var DIRECTION_LEFT:int = 0; + + private var DIRECTION_RIGHT:int = 1; + + private var POWER_WEEK:int = 0; + + private var POWER_MEDIUN:int = 1; + + private var POWER_STRONG:int = 2; + + private var m_hero:MovieClip; + + private var m_piao:MovieClip; + + private var m_line:MovieClip; + + private var m_getFishMovieAry:Array; + + private var m_fishkuang0:MovieClip; + + private var m_fishkuang1:MovieClip; + + private var m_fishkuang2:MovieClip; + + private var m_fishkuang3:MovieClip; + + private var m_curDirection:int; + + private var m_curPower:int; + + private var m_curGetFishMovie:MovieClip; + + private var m_swfAry:Array; + + private var m_isChujiyuer:int = 0; + + private var bg3:UIWindowBg; + + private var bannerMc:Sprite; + + private var pointText:TextField; + + private var shanhu1:ShanhuItem; + + private var shanhu2:ShanhuItem; + + private var shanhu3:ShanhuItem; + + private var shanhu4:ShanhuItem; + + private var m_RadioBtnDirectionLeft:UIRadioBtn; + + private var m_RadioBtnDirectionRight:UIRadioBtn; + + private var m_RadioBtnPowerWeek:UIRadioBtn; + + private var m_RadioBtnPowerMediun:UIRadioBtn; + + private var m_RadioBtnPowerStrong:UIRadioBtn; + + private var m_btnFishing:UIButton; + + private var m_btnFishingMore:UIButton; + + private var m_btnFishingHalf:UIButton; + + private var m_aotuFish:UIButton; + + private var m_aotuFish1:UIButton; + + private var m_aotuFish2:UIButton; + + private var m_btn8:UIButton; + + private var m_btnOpenInfo:EnterButton; + + private var fishMess:TextBar; + + private var m_txtDangqianshiyong:TextField; + + private var m_radioBtnChuji:UIRadioBtn; + + private var m_radionBtnGaoji:UIRadioBtn; + + private var m_txtChuji:TextField; + + private var m_txtGaoji:TextField; + + private var m_txtDiaodeShuliang:TextField; + + public var m_btnYuhuoduihuan:UIButton; + + private var m_btnChakanyulou:UIButton; + + private var m_btnHuodeyuer:Button_9; + + private var m_fishingHalf:Boolean = false; + + private var m_fish8:Boolean = false; + + private var m_fishingOnce:Boolean = false; + + private var m_fishCount:int; + + private var m_fishBasket:FishBasketView; + + private var fishInfoView:FishInfoView; + + private var exchangeFishView:ExchangeFishView; + + public var m_isPlayingFishMovie:Boolean = true; + + private var isSelect:Boolean; + + private var xmlUrl:String = "config/fish.xml"; + + private var urlloader:URLLoader; + + public var xml:XML; + + public function FishBuildUI() + { + var _loc1_:URLRequest = null; + this.gameRes = GameUIRes.getInstance(); + super(); + if(this.gameRes.fishInfo == null) + { + _loc1_ = new URLRequest(PathConfig.getInstance().getVerStr(this.fishUrl)); + super.loadUIResource(_loc1_); + } + else + { + this.createUI(); + } + } + + public static function getInstance() : FishBuildUI + { + if(instance == null) + { + return instance = new FishBuildUI(); + } + return instance; + } + + override public function loadUiComplete(param1:Event) : void + { + super.loadUiComplete(param1); + this.gameRes.fishInfo = _loaderInfo; + this.createUI(); + } + + override public function createUI() : void + { + var _loc1_:UIWindowBg = null; + var _loc2_:UIWindowBg = null; + var _loc10_:TextField = null; + var _loc11_:Sprite = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_diaoyudao); + _loc1_ = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + _loc2_ = new UIWindowBg(); + _loc2_.initThirdPanel(448,392); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(160,392); + _loc1_.addChild(this.bg3); + this.bg3.x = _loc2_.x + _loc2_.width + 3; + this.bg3.y = _loc2_.y; + var _loc3_:UITitleBg = new UITitleBg("钓 鱼",_loc2_.width); + _loc2_.addChild(_loc3_); + _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2); + var _loc4_:UITitleBg = new UITitleBg("钓鱼说明",this.bg3.width); + this.bg3.addChild(_loc4_); + _loc4_.x = int(this.bg3.width / 2 - _loc4_.width / 2); + var _loc5_:TextFormat = new TextFormat(); + _loc5_.leading = 4; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,160); + _loc6_.wordWrap = true; + _loc6_.multiline = true; + _loc6_.height = 90; + this.bg3.addChild(_loc6_); + _loc6_.defaultTextFormat = _loc5_; + _loc6_.htmlText = "1、钓鱼需要消耗鱼饵,使用高级鱼饵更有机会获得惊喜奖励。\r2、通过鱼货兑换可以将鱼兑换成各种游戏实用高级道具。"; + _loc6_.x = 4; + _loc6_.y = 30; + var _loc7_:UITitleBg = new UITitleBg("钓鱼信息",this.bg3.width); + this.bg3.addChild(_loc7_); + _loc7_.x = int(this.bg3.width / 2 - _loc7_.width / 2); + _loc7_.y = 113; + var _loc8_:UITitleBg = new UITitleBg("钓鱼需求",this.bg3.width); + this.bg3.addChild(_loc8_); + _loc8_.x = int(this.bg3.width / 2 - _loc8_.width / 2); + _loc8_.y = 240; + this.m_fishSwfContainer = new Sprite(); + _loc2_.addChild(this.m_fishSwfContainer); + this.m_fishSwfContainer.x = 2; + this.m_fishSwfContainer.y = 26; + var _loc9_:Sprite = PublicMethod.getTrLine(447); + _loc2_.addChild(_loc9_); + _loc9_.x = 4; + _loc9_.y = 328; + this.initFish(); + this.bannerMc = new Sprite(); + _loc2_.addChild(this.bannerMc); + this.bannerMc.y = 335; + this.initFishControl(); + this.initFishMess(); + this.initFishFishItem(); + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,105); + _loc10_.htmlText = "什么是垂钓心得?"; + _loc11_ = new Sprite(); + _loc11_.buttonMode = true; + _loc2_.addChild(_loc11_); + _loc11_.x = 4; + _loc11_.addChild(_loc10_); + _loc11_.y = 60; + var _loc12_:String = "1.钓鱼可获垂钓心得,垂钓心得可兑换珊瑚,垂钓心得越多,兑换的珊瑚越好
2.初级鱼饵可获2点垂钓心得,高级鱼饵可获5点垂钓心得,赠品鱼饵不增加垂钓心得。"; + new MulTipTitle(_loc11_,face.stage,face.tip_bg,_loc12_,260); + this.setPosition(); + this.initBtn(); + this.fishPresenter = new FishPresenter(); + this.fishPresenter.m_fishView = this; + this.fishPresenter.initFishView(); + this.fishPresenter.initFishData(); + this.fishEnable = false; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + private function initFish() : void + { + this.m_getFishMovieAry = []; + this.m_swfAry = []; + this.m_piaoPos = [-5,150.6,73,150.6,263,151,361,134,-8.6,116,101.5,106.5,236,106.5,302.6,118.5,90,47.5,133.5,65,236.6,65,330,65]; + this.m_curDirection = this.DIRECTION_LEFT; + this.m_curPower = this.POWER_MEDIUN; + this.m_fishSwfContainer.addChild(this.gameRes.getMovieClip("mc_bg",this.gameRes.fishInfo)); + this.m_hero = this.gameRes.getMovieClip("mc_man",this.gameRes.fishInfo); + this.m_piao = this.gameRes.getMovieClip("mc_wave",this.gameRes.fishInfo); + this.m_line = this.gameRes.getMovieClip("mc_line",this.gameRes.fishInfo); + this.m_fishkuang0 = this.gameRes.getMovieClip("mc_fishkuang_0",this.gameRes.fishInfo); + this.m_fishkuang0.stop(); + this.m_fishkuang0.addFrameScript(this.m_fishkuang0.totalFrames - 1,this.onPlayGetFishCompleted); + this.m_fishkuang1 = this.gameRes.getMovieClip("mc_fishkuang_1",this.gameRes.fishInfo); + this.m_fishkuang1.stop(); + this.m_fishkuang1.addFrameScript(this.m_fishkuang1.totalFrames - 1,this.onPlayGetFishCompleted); + this.m_fishkuang2 = this.gameRes.getMovieClip("mc_fishkuang_2",this.gameRes.fishInfo); + this.m_fishkuang2.stop(); + this.m_fishkuang2.addFrameScript(this.m_fishkuang2.totalFrames - 1,this.onPlayGetFishCompleted); + this.m_fishkuang3 = this.gameRes.getMovieClip("mc_fishkuang_3",this.gameRes.fishInfo); + this.m_fishkuang3.stop(); + this.m_fishkuang3.addFrameScript(this.m_fishkuang3.totalFrames - 1,this.onPlayGetFishCompleted); + this.m_getFishMovieAry.push(this.m_fishkuang0); + this.m_getFishMovieAry.push(this.m_fishkuang1); + this.m_getFishMovieAry.push(this.m_fishkuang2); + this.m_getFishMovieAry.push(this.m_fishkuang3); + this.m_curGetFishMovie = new MovieClip(); + this.m_line.x = 243; + this.m_line.y = 60; + this.m_line.gotoAndStop(13); + this.m_fishSwfContainer.addChild(this.m_line); + this.m_piao.x = 0; + this.m_piao.y = 0; + this.m_piao.gotoAndStop(1); + this.m_fishSwfContainer.addChild(this.m_piao); + this.m_hero.x = 137; + this.m_hero.y = 95 - 35; + this.m_hero.gotoAndStop(1); + this.m_hero.addFrameScript(this.m_hero.totalFrames - 1,this.onFishComplete); + this.m_fishSwfContainer.addChild(this.m_hero); + this.m_btnOpenInfo = new EnterButton("兑换列表"); + this.m_fishSwfContainer.addChild(this.m_btnOpenInfo); + this.m_btnOpenInfo.x = 395; + this.m_btnOpenInfo.y = 247; + this.m_btnOpenInfo.onClick = this.openFishInfoView; + Utils.applyGlow(this.m_btnOpenInfo,50943); + var _loc1_:Sprite = new Sprite(); + this.m_fishSwfContainer.addChild(_loc1_); + var _loc2_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_ui_bg_4),60,14); + _loc1_.addChild(_loc2_); + this.pointText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc2_.addChild(this.pointText); + this.pointText.htmlText = "垂钓心得:0"; + this.pointText.x = 7; + this.pointText.y = 5; + this.shanhu1 = new ShanhuItem(1); + this.shanhu1.fishBuildUI = this; + _loc1_.addChild(this.shanhu1); + this.shanhu1.x = 120; + this.shanhu1.y = -15; + this.shanhu2 = new ShanhuItem(2); + _loc1_.addChild(this.shanhu2); + this.shanhu2.fishBuildUI = this; + this.shanhu2.x = this.shanhu1.x + 55; + this.shanhu2.y = this.shanhu1.y; + this.shanhu3 = new ShanhuItem(3); + _loc1_.addChild(this.shanhu3); + this.shanhu3.fishBuildUI = this; + this.shanhu3.x = this.shanhu2.x + 55; + this.shanhu3.y = this.shanhu1.y; + this.shanhu4 = new ShanhuItem(4); + _loc1_.addChild(this.shanhu4); + this.shanhu4.x = this.shanhu3.x + 55; + this.shanhu4.fishBuildUI = this; + this.shanhu4.y = this.shanhu1.y; + } + + private function initFishControl() : void + { + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,54); + _loc1_.text = "挥杆方向"; + this.bannerMc.addChild(_loc1_); + _loc1_.x = 5; + _loc1_.y = 7; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,54); + _loc2_.text = "点击选择"; + this.bannerMc.addChild(_loc2_); + _loc2_.x = _loc1_.x; + _loc2_.y = _loc1_.y + 25; + this.m_RadioBtnDirectionLeft = new UIRadioBtn(); + this.bannerMc.addChild(this.m_RadioBtnDirectionLeft); + this.m_RadioBtnDirectionLeft.x = 60; + this.m_RadioBtnDirectionLeft.y = _loc1_.y - 3; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + _loc3_.text = "左"; + this.bannerMc.addChild(_loc3_); + _loc3_.x = 62; + _loc3_.y = _loc2_.y; + this.m_RadioBtnDirectionRight = new UIRadioBtn(); + this.bannerMc.addChild(this.m_RadioBtnDirectionRight); + this.m_RadioBtnDirectionRight.x = 86; + this.m_RadioBtnDirectionRight.y = this.m_RadioBtnDirectionLeft.y; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + _loc4_.text = "右"; + this.bannerMc.addChild(_loc4_); + _loc4_.x = 88; + _loc4_.y = _loc2_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,54); + _loc5_.text = "挥杆力度"; + this.bannerMc.addChild(_loc5_); + _loc5_.x = 115; + _loc5_.y = _loc1_.y; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,54); + _loc6_.text = "点击选择"; + this.bannerMc.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 25; + this.m_RadioBtnPowerWeek = new UIRadioBtn(); + this.bannerMc.addChild(this.m_RadioBtnPowerWeek); + this.m_RadioBtnPowerWeek.x = 171; + this.m_RadioBtnPowerWeek.y = this.m_RadioBtnDirectionLeft.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + _loc7_.text = "低"; + this.bannerMc.addChild(_loc7_); + _loc7_.x = this.m_RadioBtnPowerWeek.x + 2; + _loc7_.y = _loc2_.y; + this.m_RadioBtnPowerMediun = new UIRadioBtn(); + this.bannerMc.addChild(this.m_RadioBtnPowerMediun); + this.m_RadioBtnPowerMediun.x = this.m_RadioBtnPowerWeek.x + 24; + this.m_RadioBtnPowerMediun.y = this.m_RadioBtnDirectionLeft.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + _loc8_.text = "中"; + this.bannerMc.addChild(_loc8_); + _loc8_.x = this.m_RadioBtnPowerMediun.x + 2; + _loc8_.y = _loc2_.y; + this.m_RadioBtnPowerStrong = new UIRadioBtn(); + this.bannerMc.addChild(this.m_RadioBtnPowerStrong); + this.m_RadioBtnPowerStrong.x = this.m_RadioBtnPowerMediun.x + 24; + this.m_RadioBtnPowerStrong.y = this.m_RadioBtnDirectionLeft.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + _loc9_.text = "高"; + this.bannerMc.addChild(_loc9_); + _loc9_.x = this.m_RadioBtnPowerStrong.x + 2; + _loc9_.y = _loc2_.y; + this.m_btnFishing = new UIButton("钓 鱼",2,10); + this.bannerMc.addChild(this.m_btnFishing); + this.m_btnFishing.x = this.m_RadioBtnPowerStrong.x + 25; + this.m_btnFishing.y = _loc1_.y - 5; + this.m_btnFishingMore = new UIButton("连钓10次",2,10); + this.bannerMc.addChild(this.m_btnFishingMore); + this.m_btnFishingMore.x = this.m_btnFishing.x + this.m_btnFishing.width + 4; + this.m_btnFishingMore.y = this.m_btnFishing.y; + this.m_btn8 = new UIButton("8折钓鱼",2,10); + this.bannerMc.addChild(this.m_btn8); + this.m_btn8.x = this.m_btnFishing.x; + this.m_btn8.y = this.m_btnFishing.y + 26; + this.m_btnFishingHalf = new UIButton("半价钓鱼",2,10); + this.bannerMc.addChild(this.m_btnFishingHalf); + this.m_btnFishingHalf.x = this.m_btn8.x; + this.m_btnFishingHalf.y = this.m_btn8.y; + this.m_aotuFish = new UIButton("钓100次",2,10); + this.bannerMc.addChild(this.m_aotuFish); + this.m_aotuFish.x = this.m_btnFishingMore.x; + this.m_aotuFish.y = this.m_btn8.y; + this.m_aotuFish1 = new UIButton("钓1000次",2,10); + this.bannerMc.addChild(this.m_aotuFish1); + this.m_aotuFish1.x = this.m_btnFishingMore.x + this.m_btnFishingMore.width + 4; + this.m_aotuFish1.y = this.m_btnFishing.y; + this.m_aotuFish2 = new UIButton("钓5000次",2,10); + this.bannerMc.addChild(this.m_aotuFish2); + this.m_aotuFish2.x = this.m_aotuFish1.x; + this.m_aotuFish2.y = this.m_btn8.y; + } + + private function initFishMess() : void + { + this.fishMess = new TextBar(); + this.fishMess.createTextField(152,105,6737151); + this.bg3.addChild(this.fishMess); + this.fishMess.x = 2; + this.fishMess.y = 136; + } + + private function initFishFishItem() : void + { + this.m_txtDangqianshiyong = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + this.m_txtDangqianshiyong.text = "当前使用:"; + this.m_radioBtnChuji = new UIRadioBtn(); + this.m_radionBtnGaoji = new UIRadioBtn(); + this.m_txtChuji = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110); + this.m_txtGaoji = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110); + this.m_txtChuji.text = "初级鱼饵" + "×" + "0"; + this.m_txtGaoji.text = "高级鱼饵" + "×" + "0"; + this.bg3.addChild(this.m_txtDangqianshiyong); + this.m_txtDangqianshiyong.x = 6; + this.m_txtDangqianshiyong.y = 270; + this.bg3.addChild(this.m_radioBtnChuji); + this.m_radioBtnChuji.x = 7; + this.m_radioBtnChuji.y = this.m_txtDangqianshiyong.y + 24; + this.bg3.addChild(this.m_txtChuji); + this.m_txtChuji.x = this.m_radioBtnChuji.x + 22; + this.m_txtChuji.y = this.m_radioBtnChuji.y + 2; + this.bg3.addChild(this.m_radionBtnGaoji); + this.m_radionBtnGaoji.x = 7; + this.m_radionBtnGaoji.y = this.m_radioBtnChuji.y + 22; + this.bg3.addChild(this.m_txtGaoji); + this.m_txtGaoji.x = this.m_radionBtnGaoji.x + 22; + this.m_txtGaoji.y = this.m_radionBtnGaoji.y + 2; + this.m_txtDiaodeShuliang = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + this.bg3.addChild(this.m_txtDiaodeShuliang); + this.m_txtDiaodeShuliang.x = this.m_txtDangqianshiyong.x; + this.m_txtDiaodeShuliang.y = this.m_radionBtnGaoji.y + 24; + this.m_txtDiaodeShuliang.text = "钓得鱼量:0"; + this.m_btnHuodeyuer = new Button_9("购买鱼饵"); + this.bg3.addChild(this.m_btnHuodeyuer); + this.m_btnHuodeyuer.buttonMode = true; + this.m_btnHuodeyuer.x = this.m_txtDiaodeShuliang.x + 110; + this.m_btnHuodeyuer.y = this.m_txtDiaodeShuliang.y; + this.m_btnHuodeyuer.buttonMode = true; + this.m_btnHuodeyuer.addEventListener(MouseEvent.CLICK,this.buyFishYuer); + this.m_btnYuhuoduihuan = new UIButton("兑换奖励",2,10); + this.bg3.addChild(this.m_btnYuhuoduihuan); + this.m_btnYuhuoduihuan.x = this.m_txtDangqianshiyong.x + 10; + this.m_btnYuhuoduihuan.y = this.m_txtDiaodeShuliang.y + 24; + this.m_btnChakanyulou = new UIButton("查看鱼篓",2,10); + this.bg3.addChild(this.m_btnChakanyulou); + this.m_btnChakanyulou.x = this.m_btnYuhuoduihuan.x + 75; + this.m_btnChakanyulou.y = this.m_btnYuhuoduihuan.y; + } + + private function buyFishYuer(param1:MouseEvent) : void + { + if(this.m_isPlayingFishMovie) + { + return; + } + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_YUER"); + _loc2_.onRefresh = this.fishPresenter.initFishData; + _loc2_.show(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(this.fishPresenter) + { + this.fishPresenter.initFishData(); + this.fishEnable = false; + } + } + + override public function removeFromStage(param1:Event) : void + { + if(Boolean(this.m_fishBasket) && contains(this.m_fishBasket)) + { + removeChild(this.m_fishBasket); + } + if(Boolean(this.fishInfoView) && contains(this.fishInfoView)) + { + removeChild(this.fishInfoView); + } + if(Boolean(this.exchangeFishView) && contains(this.exchangeFishView)) + { + removeChild(this.exchangeFishView); + } + } + + private function initBtn() : void + { + this.m_btnYuhuoduihuan.onClick = this.onMouseClick; + this.m_btnChakanyulou.onClick = this.onMouseClick; + this.m_btnFishing.onClick = this.onMouseClick; + this.m_btnFishingMore.onClick = this.onMouseClick; + this.m_btnFishingHalf.onClick = this.onMouseClick; + this.m_btn8.onClick = this.onMouseClick; + this.m_aotuFish.onClick = this.onMouseClick; + this.m_aotuFish1.onClick = this.onMouseClick; + this.m_aotuFish2.onClick = this.onMouseClick; + this.m_radioBtnChuji.onClick = this.onRadioBtnClick; + this.m_radionBtnGaoji.onClick = this.onRadioBtnClick; + this.m_RadioBtnDirectionLeft.onClick = this.onRadioBtnClick; + this.m_RadioBtnDirectionRight.onClick = this.onRadioBtnClick; + this.m_RadioBtnPowerWeek.onClick = this.onRadioBtnClick; + this.m_RadioBtnPowerMediun.onClick = this.onRadioBtnClick; + this.m_RadioBtnPowerStrong.onClick = this.onRadioBtnClick; + } + + private function onRadioBtnClick(param1:MouseEvent) : void + { + if(this.m_fishModel == null) + { + return; + } + if(this.m_isPlayingFishMovie) + { + return; + } + switch(param1.currentTarget) + { + case this.m_radioBtnChuji: + this.m_txtDangqianshiyong.htmlText = "当前使用:初级鱼饵"; + this.m_isChujiyuer = 1; + break; + case this.m_radionBtnGaoji: + this.m_txtDangqianshiyong.htmlText = "当前使用:高级鱼饵"; + this.m_isChujiyuer = 2; + break; + case this.m_RadioBtnDirectionLeft: + this.m_curDirection = this.DIRECTION_LEFT; + break; + case this.m_RadioBtnDirectionRight: + this.m_curDirection = this.DIRECTION_RIGHT; + break; + case this.m_RadioBtnPowerWeek: + this.m_curPower = this.POWER_WEEK; + break; + case this.m_RadioBtnPowerMediun: + this.m_curPower = this.POWER_MEDIUN; + break; + case this.m_RadioBtnPowerStrong: + this.m_curPower = this.POWER_STRONG; + } + this.updateRadioBtn(); + } + + private function updateRadioBtn() : void + { + this.m_RadioBtnDirectionLeft.setUnSelect(); + this.m_RadioBtnDirectionRight.setUnSelect(); + if(this.m_curDirection == this.DIRECTION_LEFT) + { + this.m_RadioBtnDirectionLeft.setSelect(); + } + else + { + this.m_RadioBtnDirectionRight.setSelect(); + } + this.m_RadioBtnPowerWeek.setUnSelect(); + this.m_RadioBtnPowerMediun.setUnSelect(); + this.m_RadioBtnPowerStrong.setUnSelect(); + if(this.m_curPower == this.POWER_WEEK) + { + this.m_RadioBtnPowerWeek.setSelect(); + } + else if(this.m_curPower == this.POWER_MEDIUN) + { + this.m_RadioBtnPowerMediun.setSelect(); + } + else + { + this.m_RadioBtnPowerStrong.setSelect(); + } + this.m_radioBtnChuji.setUnSelect(); + this.m_radionBtnGaoji.setUnSelect(); + if(this.m_isChujiyuer == 1) + { + this.m_radioBtnChuji.setSelect(); + } + else if(this.m_isChujiyuer == 2) + { + this.m_radionBtnGaoji.setSelect(); + } + } + + private function onMouseClick(param1:MouseEvent) : void + { + if(this.m_fishModel == null) + { + return; + } + var _loc2_:FishEvent = null; + switch(param1.currentTarget) + { + case this.m_btnHuodeyuer: + break; + case this.m_btnFishing: + if(!this.checkFishEnable(1)) + { + return; + } + this.m_fishingHalf = false; + this.m_fish8 = false; + this.m_fishingOnce = true; + this.m_fishCount = 1; + this.fishEnable = false; + this.gotoFishPos(this.getFishingPos(this.m_curPower,this.m_curDirection)); + break; + case this.m_btnFishingMore: + if(!this.checkFishEnable(10)) + { + return; + } + this.m_fish8 = false; + this.m_fishingHalf = false; + this.m_fishCount = 10; + this.fishEnable = false; + this.gotoFishPos(this.getFishingPos(this.m_curPower,this.m_curDirection)); + break; + case this.m_btnYuhuoduihuan: + if(this.m_fishModel.yulouArr.length <= 0) + { + MessageBoxUI.getInstance().addMessage("您的鱼篓里还没有鱼"); + return; + } + this.setEnable(false); + _loc2_ = new FishEvent(FishEvent.YUHUODUIHUAN); + dispatchEvent(_loc2_); + break; + case this.m_btnChakanyulou: + if(Boolean(this.m_fishBasket) && this.contains(this.m_fishBasket)) + { + return; + } + if(this.m_fishModel.yulouArr.length <= 0) + { + MessageBoxUI.getInstance().addMessage("您的鱼篓里还没有鱼"); + return; + } + this.openFishBasketView(); + break; + case this.m_btnFishingHalf: + if(this.m_isPlayingFishMovie) + { + return; + } + this.m_fish8 = false; + this.m_fishingHalf = true; + this.fishEnable = false; + this.gotoFishPos(this.getFishingPos(this.m_curPower,this.m_curDirection)); + break; + case this.m_btn8: + if(this.m_isPlayingFishMovie) + { + return; + } + this.m_fishingHalf = false; + this.m_fish8 = true; + this.fishEnable = false; + this.gotoFishPos(this.getFishingPos(this.m_curPower,this.m_curDirection)); + break; + case this.m_aotuFish: + if(!this.checkFishEnable(100)) + { + return; + } + this.m_fish8 = false; + this.m_fishingHalf = false; + this.m_fishingOnce = false; + this.m_fishCount = 100; + this.fishEnable = false; + this.gotoFishPos(this.getFishingPos(this.m_curPower,this.m_curDirection)); + break; + case this.m_aotuFish1: + if(!this.checkFishEnable(1000)) + { + return; + } + this.m_fish8 = false; + this.m_fishingHalf = false; + this.m_fishingOnce = false; + this.m_fishCount = 1000; + this.fishEnable = false; + this.gotoFishPos(this.getFishingPos(this.m_curPower,this.m_curDirection)); + break; + case this.m_aotuFish2: + if(!this.checkFishEnable(5000)) + { + return; + } + this.m_fish8 = false; + this.m_fishingHalf = false; + this.m_fishingOnce = false; + this.m_fishCount = 5000; + this.fishEnable = false; + this.gotoFishPos(this.getFishingPos(this.m_curPower,this.m_curDirection)); + } + } + + private function openFishInfoView() : void + { + if(this.fishInfoView == null) + { + this.fishInfoView = new FishInfoView(this); + this.fishInfoView.x = int(663 / 2 - this.fishInfoView.width / 2); + this.fishInfoView.y = int(459 / 2 - this.fishInfoView.height / 2); + } + addChild(this.fishInfoView); + } + + private function openFishBasketView() : void + { + if(this.m_fishBasket == null) + { + this.m_fishBasket = new FishBasketView(this); + this.m_fishBasket.x = int(663 / 2 - this.m_fishBasket.width / 2); + this.m_fishBasket.y = int(459 / 2 - this.m_fishBasket.height / 2); + } + addChild(this.m_fishBasket); + this.m_fishBasket.initData(); + } + + private function openExangeView() : void + { + if(this.exchangeFishView == null) + { + this.exchangeFishView = new ExchangeFishView(this); + this.exchangeFishView.x = int(663 / 2 - this.exchangeFishView.width / 2); + this.exchangeFishView.y = int(459 / 2 - this.exchangeFishView.height / 2); + } + addChild(this.exchangeFishView); + this.exchangeFishView.initData(); + } + + override public function show() : void + { + super.show(); + } + + private function onPlayGetFishCompleted() : void + { + this.m_curGetFishMovie.stop(); + if(this.m_fishSwfContainer.contains(this.m_curGetFishMovie)) + { + this.m_fishSwfContainer.removeChild(this.m_curGetFishMovie); + } + } + + public function onFishComplete() : void + { + var _loc1_:FishEvent = null; + this.m_hero.gotoAndStop(1); + this.m_line.gotoAndStop(13); + this.m_piao.gotoAndStop(1); + if(this.m_fishingHalf) + { + _loc1_ = new FishEvent(FishEvent.START_FISHING_HALF); + } + else if(this.m_fish8) + { + _loc1_ = new FishEvent(FishEvent.START_FISHING_8); + } + else + { + _loc1_ = new FishEvent(FishEvent.START_FISHING); + _loc1_.fishCount = this.m_fishCount; + _loc1_.yuerType = this.m_isChujiyuer; + } + dispatchEvent(_loc1_); + } + + private function getFishingPos(param1:int, param2:int) : int + { + if(param2 == this.DIRECTION_RIGHT) + { + this.m_hero.scaleX = -1; + this.m_hero.x = 137 + 55 + 157; + } + else + { + this.m_hero.scaleX = 1; + this.m_hero.x = 137; + } + if(param1 == this.POWER_WEEK) + { + if(param2 == this.DIRECTION_LEFT) + { + return Math.round(Math.random()) == 0 ? 1 : 2; + } + return Math.round(Math.random()) == 0 ? 3 : 4; + } + if(param1 == this.POWER_MEDIUN) + { + if(param2 == this.DIRECTION_LEFT) + { + return Math.round(Math.random()) == 0 ? 5 : 6; + } + return Math.round(Math.random()) == 0 ? 7 : 8; + } + if(param2 == this.DIRECTION_LEFT) + { + return Math.round(Math.random()) == 0 ? 9 : 10; + } + return Math.round(Math.random()) == 0 ? 11 : 12; + } + + private function gotoFishPos(param1:int) : void + { + this.m_isPlayingFishMovie = true; + if(param1 > 0 < 13) + { + this.m_hero.gotoAndPlay(param1); + this.m_line.gotoAndStop(param1); + this.m_piao.x = this.m_piaoPos[param1 * 2 - 2]; + this.m_piao.y = this.m_piaoPos[param1 * 2 - 1]; + this.m_piao.gotoAndPlay(1); + } + } + + private function checkFishEnable(param1:int) : Boolean + { + if(this.m_isPlayingFishMovie) + { + return false; + } + if(this.m_isChujiyuer == 0) + { + MessageBoxUI.getInstance().addMessage("请选择使用鱼饵的类型"); + return false; + } + if(this.m_isChujiyuer == 1) + { + if(this.m_fishModel.primaryBaitNum < param1) + { + MessageBoxUI.getInstance().addMessage("当前鱼饵不足,请选择更换或者购买鱼饵"); + return false; + } + } + else if(this.m_isChujiyuer == 2) + { + if(this.m_fishModel.seniorBaitNum < param1) + { + MessageBoxUI.getInstance().addMessage("当前鱼饵不足,请选择更换或者购买鱼饵"); + return false; + } + } + return true; + } + + private function set fishEnable(param1:Boolean) : void + { + } + + private function seRadioBtntEnable(param1:UIRadioBtn, param2:Boolean) : void + { + if(param2) + { + param1.setEnable(); + } + else + { + param1.setUnEnable(); + } + } + + public function updateData(param1:FishModel) : void + { + var _loc3_:String = null; + this.m_fishModel = param1; + this.m_isPlayingFishMovie = false; + this.m_btnFishingHalf.setEnable(); + this.m_btnFishingHalf.visible = true; + if(this.m_fishModel.hasHalfFishing == 1) + { + this.m_btnFishingHalf.setUnEnable(); + this.m_btnFishingHalf.visible = false; + } + this.m_btn8.setEnable(); + if(this.m_fishModel.eightPriceFish == 1) + { + this.m_btn8.setUnEnable(); + } + this.m_txtDiaodeShuliang.text = "钓得鱼量:" + this.m_fishModel.fishTotalNum.toString(); + this.m_txtChuji.text = "初级鱼饵" + "×" + this.m_fishModel.primaryBaitNum.toString(); + this.m_txtGaoji.text = "高级鱼饵" + "×" + this.m_fishModel.seniorBaitNum.toString(); + var _loc2_:String = ""; + if(this.m_fishModel.colorList.length > 0) + { + for each(_loc3_ in this.m_fishModel.colorList) + { + this.fishMess.print(_loc3_); + } + this.playGetFishMovie(); + } + if(this.m_fishModel.exchangeArr.length > 0) + { + this.openExangeView(); + } + this.pointText.htmlText = "垂钓心得:" + this.m_fishModel.fishValue; + this.shanhu1.setPoint(this.m_fishModel.fishValue); + this.shanhu2.setPoint(this.m_fishModel.fishValue); + this.shanhu3.setPoint(this.m_fishModel.fishValue); + this.shanhu4.setPoint(this.m_fishModel.fishValue); + this.fishEnable = true; + this.initBtnSelect(); + } + + public function setEnable(param1:Boolean = true) : void + { + this.m_isPlayingFishMovie = !param1; + this.fishEnable = param1; + } + + private function initBtnSelect() : void + { + if(!this.isSelect) + { + this.isSelect = true; + this.m_radioBtnChuji.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + this.m_RadioBtnDirectionLeft.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + this.m_RadioBtnPowerWeek.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + private function playGetFishMovie() : void + { + var _loc1_:int = 0; + if(this.m_fishModel.hasSenior == 1) + { + this.m_curGetFishMovie = this.m_getFishMovieAry[0] as MovieClip; + } + else + { + _loc1_ = Math.round(Math.random() * 2 + 1); + this.m_curGetFishMovie = this.m_getFishMovieAry[_loc1_] as MovieClip; + } + if(this.m_fishSwfContainer.contains(this.m_curGetFishMovie)) + { + this.m_fishSwfContainer.removeChild(this.m_curGetFishMovie); + } + this.m_curGetFishMovie.x = 85; + this.m_curGetFishMovie.y = 240; + this.m_fishSwfContainer.addChild(this.m_curGetFishMovie); + this.m_curGetFishMovie.gotoAndPlay(1); + } + + public function loadXml() : void + { + this.urlloader = new URLLoader(new URLRequest(PathConfig.getInstance().getVerStr(this.xmlUrl))); + this.urlloader.addEventListener(Event.COMPLETE,this.loadedXmlComplete); + } + + private function loadedXmlComplete(param1:Event) : void + { + this.urlloader.removeEventListener(Event.COMPLETE,this.loadedXmlComplete); + this.urlloader = null; + this.xml = XML(param1.target.data); + var _loc2_:FishEvent = new FishEvent(FishEvent.XMLLOADOVER); + dispatchEvent(_loc2_); + } + + public function getFishModel() : FishModel + { + return this.m_fishModel; + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishEvent.as b/flash_decompiled/com/view/ui/fish/FishEvent.as new file mode 100644 index 0000000..f90a34b --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishEvent.as @@ -0,0 +1,39 @@ +package com.view.ui.fish +{ + import flash.events.Event; + + public class FishEvent extends Event + { + + public static var START_FISHING_HALF:String = "startFishingHalf"; + + public static var START_FISHING_8:String = "startFishing8"; + + public static var HUODEYUER:String = "huodeyuer"; + + public static var START_FISHING:String = "startFishing"; + + public static var YUHUODUIHUAN:String = "yuhuoduihuan"; + + public static var FISH_BROADCAST:String = "fishBroadcast"; + + public static var FISHVIEWCLOSE:String = "fishViewClose"; + + public static var XMLLOADOVER:String = "XMLLOADOVER"; + + public var yuerType:int = 1; + + public var eventType:String; + + public var fishCount:int = 1; + + public var broadCastData:Object; + + public function FishEvent(param1:String, param2:Boolean = false, param3:Boolean = false) + { + this.eventType = param1; + super(param1,param2,param3); + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishInfoView.as b/flash_decompiled/com/view/ui/fish/FishInfoView.as new file mode 100644 index 0000000..bf61451 --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishInfoView.as @@ -0,0 +1,91 @@ +package com.view.ui.fish +{ + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + + public class FishInfoView extends UIWindowBg + { + + private var bg:Sprite; + + private var fishView:FishBuildUI; + + private var tableMc:UITable; + + public function FishInfoView(param1:FishBuildUI) + { + var _loc3_:Array = null; + super(); + initSize(166,330); + loadTitle(UITitleConfig.title_duihuanliebiao); + addCloseBtn(); + initBg(); + var _loc2_:Array = ["名称","可兑换道具","名称","可兑换道具"]; + _loc3_ = [60,120,60,120]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(13,_loc2_,_loc3_); + bg1.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.fishView = param1; + if(this.fishView.xml == null) + { + this.fishView.loadXml(); + this.fishView.addEventListener(FishEvent.XMLLOADOVER,this.loadedXmlComplete); + } + else + { + this.loadXml(); + } + } + + private function loadXml() : void + { + var _loc3_:int = 0; + var _loc10_:FishInfoViewItem = null; + var _loc1_:XML = this.fishView.xml; + var _loc2_:int = int(_loc1_.fish.length()); + _loc3_ = 0; + var _loc4_:int = 0; + var _loc5_:String = ""; + var _loc6_:String = ""; + var _loc7_:String = ""; + var _loc8_:String = ""; + var _loc9_:String = null; + while(_loc3_ < _loc2_) + { + _loc10_ = new FishInfoViewItem(); + _loc9_ = _loc1_.fish[_loc3_].@color; + _loc5_ = "

" + _loc1_.fish[_loc3_].@fishName + "

"; + _loc6_ = "" + _loc1_.fish[_loc3_].@box + "×" + _loc1_.fish[_loc3_].@num + ""; + _loc3_ += 1; + if(_loc1_.fish[_loc3_]) + { + _loc9_ = _loc1_.fish[_loc3_].@color; + _loc7_ = "

" + _loc1_.fish[_loc3_].@fishName + "

"; + _loc8_ = "" + _loc1_.fish[_loc3_].@box + "×" + _loc1_.fish[_loc3_].@num + ""; + } + else + { + _loc7_ = ""; + _loc8_ = ""; + } + _loc10_.setValue(_loc5_,_loc6_,_loc7_,_loc8_); + this.tableMc.addChild(_loc10_); + _loc10_.y = 25 + _loc4_ * 25; + _loc4_++; + _loc3_ += 1; + } + } + + private function loadedXmlComplete(param1:FishEvent) : void + { + this.fishView.removeEventListener(FishEvent.XMLLOADOVER,this.loadedXmlComplete); + this.loadXml(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishInfoViewItem.as b/flash_decompiled/com/view/ui/fish/FishInfoViewItem.as new file mode 100644 index 0000000..2e0c693 --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishInfoViewItem.as @@ -0,0 +1,48 @@ +package com.view.ui.fish +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.text.TextField; + + public class FishInfoViewItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + public function FishInfoViewItem() + { + super(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,115); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,115); + addChild(this.label1); + addChild(this.label2); + addChild(this.label3); + addChild(this.label4); + this.label1.y = 4; + this.label2.x = this.label1.x + this.label1.width + 5; + this.label2.y = this.label1.y; + this.label3.x = this.label2.x + this.label2.width; + this.label3.y = this.label1.y; + this.label4.x = this.label3.x + this.label3.width + 5; + this.label4.y = this.label1.y; + } + + public function setValue(param1:String, param2:String, param3:String, param4:String) : void + { + this.label1.htmlText = param1; + this.label2.htmlText = param2; + this.label3.htmlText = param3; + this.label4.htmlText = param4; + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishModel.as b/flash_decompiled/com/view/ui/fish/FishModel.as new file mode 100644 index 0000000..1389a09 --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishModel.as @@ -0,0 +1,88 @@ +package com.view.ui.fish +{ + public class FishModel + { + + public var fishValue:int = 0; + + public var primaryBaitNum:int = 0; + + public var colorList:Array; + + public var fishArr:Array; + + public var hasSenior:int = 0; + + public var yulouArr:Array; + + public var seniorBaitNum:int = 0; + + public var coral:Array; + + public var eightPriceFish:int; + + public var fishTotalNum:int = 0; + + public var hasHalfFishing:int; + + public var exchangeArr:Array; + + public function FishModel() + { + super(); + this.yulouArr = new Array(); + this.fishArr = new Array(); + this.colorList = new Array(); + this.coral = []; + this.exchangeArr = []; + } + + public function append(param1:Object) : void + { + this.fishArr = []; + this.yulouArr = []; + this.colorList = []; + this.hasSenior = 0; + this.exchangeArr = []; + this.eightPriceFish = param1.eightPriceFish; + var _loc2_:Array = param1.fishList as Array; + if(param1.fishCount) + { + this.fishTotalNum = param1.fishCount; + } + else + { + this.fishTotalNum = 0; + } + this.primaryBaitNum = param1.num1; + this.seniorBaitNum = param1.num2; + this.hasHalfFishing = param1.hasHalfFishing; + this.fishValue = param1.point; + if(_loc2_) + { + this.yulouArr = _loc2_; + } + if(param1.thisFishingNum) + { + this.fishArr = param1.thisFishingNum as Array; + } + if(param1.hasSenior) + { + this.hasSenior = param1.hasSenior; + } + if(param1.colorList) + { + this.colorList = param1.colorList as Array; + } + if(param1.coral) + { + this.coral = param1.coral as Array; + } + if(param1.exchangeList) + { + this.exchangeArr = param1.exchangeList as Array; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishPresenter.as b/flash_decompiled/com/view/ui/fish/FishPresenter.as new file mode 100644 index 0000000..54abb2c --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishPresenter.as @@ -0,0 +1,135 @@ +package com.view.ui.fish +{ + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.fish.Fish.FishsEvent; + import com.control.fish.FishService; + import com.view.ui.message.MessageBoxUI; + + public class FishPresenter + { + + private var m_fishServer:FishService; + + private var m_fishModel:FishModel; + + public var m_fishView:FishBuildUI; + + private var m_isShowBroadCost:Boolean; + + public function FishPresenter() + { + super(); + this.m_fishServer = ConnectService.getInstance().fishService; + this.m_fishModel = new FishModel(); + ConnectService.getInstance().addEventListener(FishsEvent.Fish_enterFishing,this.enterFishSucc); + ConnectService.getInstance().addEventListener(FishsEvent.Fish_userFishing,this.startFishSucc); + ConnectService.getInstance().addEventListener(FishsEvent.Fish_replaceItem,this.replaceItemSucc); + ConnectService.getInstance().addEventListener(FishsEvent.Fish_userFishingHalf,this.hasfFishSucc); + ConnectService.getInstance().addEventListener(FishsEvent.Fish_userFishing8,this.hasfFishSucc); + ConnectService.getInstance().addEventListener(FishsEvent.Fish_exchangePoint,this.exchangePointSucc); + } + + public function get isShowBroadCost() : Boolean + { + return this.m_isShowBroadCost; + } + + public function exchangePoint(param1:int) : void + { + this.m_fishServer.exchangePoint(param1); + } + + public function initFishData() : void + { + this.m_fishServer.enterFishing(); + } + + private function enterFishSucc(param1:FishsEvent) : void + { + var _loc2_:Object = param1.obj; + this.m_fishModel.append(_loc2_); + this.m_fishView.updateData(this.m_fishModel); + } + + private function startFishSucc(param1:FishsEvent) : void + { + var _loc2_:Object = param1.obj; + _loc2_.colorList = param1.list; + this.m_fishModel.append(_loc2_); + this.m_fishView.updateData(this.m_fishModel); + } + + private function hasfFishSucc(param1:FishsEvent) : void + { + var _loc2_:Object = param1.obj; + _loc2_.colorList = param1.list; + this.m_fishModel.append(_loc2_); + this.m_fishView.updateData(this.m_fishModel); + ConnectService.getInstance().castleService.getUserData(); + } + + private function replaceItemSucc(param1:FishsEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + this.m_fishView.setEnable(); + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + var _loc2_:Object = param1.obj; + _loc2_.exchangeList = param1.list; + this.m_fishModel.append(_loc2_); + this.m_fishView.updateData(this.m_fishModel); + } + + private function exchangePointSucc(param1:FishsEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + this.m_fishView.setEnable(); + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + MessageBoxUI.getInstance().addMessage(String(param1.obj1)); + var _loc2_:Object = param1.obj; + this.m_fishModel.append(_loc2_); + this.m_fishView.updateData(this.m_fishModel); + ConnectService.getInstance().castleService.getUserData(); + } + + public function initFishView() : void + { + this.m_fishView.addEventListener(FishEvent.START_FISHING,this.onViewRequest); + this.m_fishView.addEventListener(FishEvent.HUODEYUER,this.onViewRequest); + this.m_fishView.addEventListener(FishEvent.YUHUODUIHUAN,this.onViewRequest); + this.m_fishView.addEventListener(FishEvent.START_FISHING_HALF,this.onViewRequest); + this.m_fishView.addEventListener(FishEvent.START_FISHING_8,this.onViewRequest); + } + + private function onViewRequest(param1:FishEvent) : void + { + var _loc2_:int = 0; + switch(param1.eventType) + { + case FishEvent.START_FISHING: + this.m_fishServer.userFishing(param1.fishCount,param1.yuerType); + break; + case FishEvent.HUODEYUER: + break; + case FishEvent.YUHUODUIHUAN: + this.m_fishServer.replaceItem(); + break; + case FishEvent.FISHVIEWCLOSE: + this.m_isShowBroadCost = false; + break; + case FishEvent.START_FISHING_HALF: + this.m_fishServer.userFishingHalf(); + break; + case FishEvent.START_FISHING_8: + this.m_fishServer.userFishing8(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/FishXmlData.as b/flash_decompiled/com/view/ui/fish/FishXmlData.as new file mode 100644 index 0000000..fbb351a --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/FishXmlData.as @@ -0,0 +1,30 @@ +package com.view.ui.fish +{ + public class FishXmlData + { + + public var fishid:int; + + public var fishName:String; + + public var color:String; + + public var box:String; + + public var num:int; + + public var entId:int; + + public function FishXmlData(param1:*) + { + super(); + this.fishid = param1.@fishid; + this.fishName = param1.@fishName; + this.color = param1.@color; + this.box = param1.@box; + this.num = param1.@num; + this.entId = param1.@entId; + } + } +} + diff --git a/flash_decompiled/com/view/ui/fish/ShanhuItem.as b/flash_decompiled/com/view/ui/fish/ShanhuItem.as new file mode 100644 index 0000000..e4f0f53 --- /dev/null +++ b/flash_decompiled/com/view/ui/fish/ShanhuItem.as @@ -0,0 +1,109 @@ +package com.view.ui.fish +{ + import com.InstallFace; + import com.view.newui.UISmallBtn; + import com.view.tip.MulTipTitle; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class ShanhuItem extends Sprite + { + + public static var Point_1:int = 50; + + public static var Point_2:int = 350; + + public static var Point_3:int = 2500; + + public static var Point_4:int = 4500; + + private var face:InstallFace = InstallFace.getInstance(); + + private var mc:MovieClip; + + private var currI:int; + + private var maxPoint:int; + + private var exchangeBtn:UISmallBtn; + + private var currPoint:int; + + public var fishBuildUI:FishBuildUI; + + public function ShanhuItem(param1:int) + { + super(); + this.currI = param1; + this.mc = this.face.getMovieClip("LIB_UI_MC_FISH_1"); + addChild(this.mc); + this.mc.gotoAndStop(param1); + var _loc2_:String = ""; + switch(this.currI) + { + case 1: + this.maxPoint = Point_1; + _loc2_ = "

绿珊瑚

"; + _loc2_ = _loc2_ + "点击即可用" + this.maxPoint + "点垂钓心得兑换50点券"; + this.maxPoint = 50; + break; + case 2: + this.maxPoint = Point_2; + _loc2_ = "

蓝珊瑚

"; + _loc2_ = _loc2_ + "点击即可用" + this.maxPoint + "点垂钓心得兑换500点券"; + break; + case 3: + this.maxPoint = Point_3; + _loc2_ = "

紫珊瑚

"; + _loc2_ = _loc2_ + "点击即可用" + this.maxPoint + "点垂钓心得兑换5000点券"; + break; + case 4: + this.maxPoint = Point_4; + _loc2_ = "

金珊瑚

"; + _loc2_ = _loc2_ + "点击即可用" + this.maxPoint + "点垂钓心得兑换10000点券"; + } + new MulTipTitle(this.mc,this.face.stage,this.face.tip_bg,_loc2_,230); + this.exchangeBtn = new UISmallBtn("兑 换",2); + addChild(this.exchangeBtn); + this.exchangeBtn.x = 0; + this.exchangeBtn.y = 47; + this.exchangeBtn.onClick = this.exchangePoint; + } + + public function setPoint(param1:int) : void + { + this.currPoint = param1; + if(param1 >= this.maxPoint) + { + this.exchangeBtn.setEnable(); + } + else + { + this.exchangeBtn.setUnEnable(); + } + } + + public function setClick(param1:Boolean) : void + { + if(param1) + { + this.setPoint(this.currPoint); + } + else + { + this.exchangeBtn.setUnEnable(); + } + } + + private function exchangePoint(param1:MouseEvent) : void + { + if(Boolean(this.fishBuildUI) && Boolean(this.fishBuildUI.fishPresenter)) + { + this.exchangeBtn.setUnEnable(); + this.fishBuildUI.fishPresenter.exchangePoint(this.currI); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/friend/EnemyUI.as b/flash_decompiled/com/view/ui/friend/EnemyUI.as new file mode 100644 index 0000000..e9310d9 --- /dev/null +++ b/flash_decompiled/com/view/ui/friend/EnemyUI.as @@ -0,0 +1,275 @@ +package com.view.ui.friend +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.friend.event.FriendEvent; + import com.view.Control; + import com.view.UIListManage; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.friend.mc.EnemyMc; + import com.view.ui.mail.MailUI; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class EnemyUI extends BaseUI + { + + private var tableMc:UITable; + + private var enemyListVec:Vector.; + + private var pageMc:UIPageMc; + + private var inputText:UIInputText; + + private var currPage:int; + + private var currType:int = 1; + + public function EnemyUI() + { + var _loc1_:Array = null; + var _loc5_:TextField = null; + var _loc7_:EnemyMc = null; + super(); + _loc1_ = ["君主名","所在位置","攻击次数","摧毁令剩余时间","操作"]; + var _loc2_:Array = [150,100,70,130,185]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.enemyListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc7_ = new EnemyMc(); + this.enemyListVec.push(_loc7_); + this.tableMc.addChild(_loc7_); + _loc7_.y = 26 + 26 * _loc3_; + _loc7_.x = 4; + _loc7_.delBtn.addEventListener(MouseEvent.CLICK,this.delFriend,false,0,true); + _loc7_.farmBtn.addEventListener(MouseEvent.CLICK,this.enterFram,false,0,true); + _loc7_.viewBtn.addEventListener(MouseEvent.CLICK,this.viewInfo,false,0,true); + _loc7_.talkBtn.addEventListener(MouseEvent.CLICK,this.talkUser,false,0,true); + _loc7_.mailBtn.addEventListener(MouseEvent.CLICK,this.mailUser,false,0,true); + _loc3_++; + } + var _loc4_:Sprite = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 346; + _loc5_ = PublicMethod.getTextFieldWithFillter(11583207,100); + _loc5_.text = "请输入玩家名称:"; + _loc4_.addChild(_loc5_); + _loc5_.x = 120; + _loc5_.y = 8; + this.inputText = new UIInputText(100); + this.inputText.setMaxChars(50); + _loc4_.addChild(this.inputText); + this.inputText.x = _loc5_.x + _loc5_.width; + this.inputText.y = _loc5_.y - 2; + var _loc6_:UIButton = new UIButton("添加"); + _loc4_.addChild(_loc6_); + _loc6_.x = this.inputText.x + this.inputText.width + 4; + _loc6_.y = _loc5_.y - 3; + _loc6_.onClick = this.addFriend; + this.pageMc = new UIPageMc(); + _loc4_.addChild(this.pageMc); + this.pageMc.x = 520; + this.pageMc.y = _loc5_.y; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + } + + override public function setPosition() : void + { + } + + public function getFriendList() : void + { + ConnectService.getInstance().friendService.getFriendList(this.currPage,this.currType); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_getFriendList,this.getFriendListResult); + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_addEnemy,this.addFriendResult); + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_deleteFriend,this.delFriendResult); + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_useDestory,this.detoryResult); + } + + public function addEvent() : void + { + this.currPage = 1; + ConnectService.getInstance().addEventListener(FriendEvent.Friend_getFriendList,this.getFriendListResult); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_addEnemy,this.addFriendResult); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_deleteFriend,this.delFriendResult); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_useDestory,this.detoryResult); + this.getFriendList(); + } + + private function getFriendListResult(param1:FriendEvent) : void + { + var _loc7_:EnemyMc = null; + var _loc8_:int = 0; + var _loc2_:Object = param1.obj; + if(_loc2_.type != this.currType) + { + return; + } + var _loc3_:int = int(_loc2_.pageCount); + var _loc4_:int = int(_loc2_.pageNo); + var _loc5_:int = int(_loc2_.allCount); + this.pageMc.setPageCount(_loc3_); + this.pageMc.setPage(_loc4_); + var _loc6_:int = int(_loc2_.dataResult.length); + if(_loc6_ == 0) + { + for each(_loc7_ in this.enemyListVec) + { + _loc7_.setData(null); + } + } + else + { + _loc8_ = 0; + while(_loc8_ < 12) + { + if(_loc2_.dataResult[_loc8_]) + { + this.enemyListVec[_loc8_].setData(_loc2_.dataResult[_loc8_]); + } + else + { + this.enemyListVec[_loc8_].setData(null); + } + _loc8_++; + } + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + public function nextPage() : void + { + this.currPage += 1; + this.getFriendList(); + } + + public function prePage() : void + { + --this.currPage; + this.getFriendList(); + } + + private function addFriend(param1:MouseEvent) : void + { + var _loc2_:String = this.inputText.getText(); + if(_loc2_ == "") + { + return; + } + ConnectService.getInstance().friendService.addEnemy(_loc2_); + } + + private function addFriendResult(param1:FriendEvent) : void + { + MessageBoxUI.getInstance().addMessage("添加仇人成功"); + this.getFriendList(); + } + + private function delFriend(param1:MouseEvent) : void + { + var _loc3_:String = null; + var _loc4_:String = null; + var _loc2_:EnemyMc = param1.currentTarget.parent as EnemyMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = _loc2_.getFriendObj().friendUser.userName; + _loc4_ = "确认删除仇人 [" + _loc3_ + "] 吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc4_,this.confimDelFriend,_loc3_); + } + } + + private function confimDelFriend(param1:String) : void + { + ConnectService.getInstance().friendService.deleteUser(param1,1); + } + + private function delFriendResult(param1:FriendEvent) : void + { + this.getFriendList(); + } + + private function enterFram(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc2_:EnemyMc = param1.currentTarget.parent as EnemyMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = int(_loc2_.getFriendObj().friendUser.userId); + } + } + + private function viewInfo(param1:MouseEvent) : void + { + var _loc3_:String = null; + var _loc4_:CastleUserUI = null; + var _loc2_:EnemyMc = param1.currentTarget.parent as EnemyMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = _loc2_.getFriendObj().friendUser.userName; + _loc4_ = CastleUserUI.getInstance(); + _loc4_.show(); + _loc4_.updateByUserName(_loc3_); + } + } + + private function talkUser(param1:MouseEvent) : void + { + var _loc3_:String = null; + var _loc2_:EnemyMc = param1.currentTarget.parent as EnemyMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = _loc2_.getFriendObj().friendUser.userName; + Control.getInstance().chatMainUI.talkToUser(_loc3_); + UIListManage.getInstance().clearAll(); + } + } + + private function mailUser(param1:MouseEvent) : void + { + var _loc3_:String = null; + var _loc4_:MailUI = null; + var _loc2_:EnemyMc = param1.currentTarget.parent as EnemyMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = _loc2_.getFriendObj().friendUser.userName; + _loc4_ = MailUI.getInstance(); + _loc4_.setStartPage(2); + _loc4_.setReceiveName(_loc3_); + _loc4_.show(); + } + } + + private function detoryResult(param1:FriendEvent) : void + { + this.getFriendList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/friend/FriendApplyUI.as b/flash_decompiled/com/view/ui/friend/FriendApplyUI.as new file mode 100644 index 0000000..d6c44d1 --- /dev/null +++ b/flash_decompiled/com/view/ui/friend/FriendApplyUI.as @@ -0,0 +1,126 @@ +package com.view.ui.friend +{ + import com.control.ConnectService; + import com.control.friend.event.FriendEvent; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.friend.mc.ApplyFriendMc; + import flash.events.MouseEvent; + + public class FriendApplyUI extends UIWindowBg + { + + private var friendListVec:Vector.; + + private var currType:int = 0; + + public function FriendApplyUI() + { + var _loc1_:Array = null; + var _loc5_:ApplyFriendMc = null; + super(); + initSize(140,304); + loadTitle(UITitleConfig.title_shenqingxiaoxi); + addCloseBtn(); + initBg(); + _loc1_ = ["信息","操作"]; + var _loc2_:Array = [210,125]; + var _loc3_:UITable = new UITable(); + _loc3_.drawLine = true; + _loc3_.install(12,_loc1_,_loc2_); + bg1.addChild(_loc3_); + _loc3_.x = 4; + _loc3_.y = 4; + this.friendListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 12) + { + _loc5_ = new ApplyFriendMc(); + this.friendListVec.push(_loc5_); + _loc3_.addChild(_loc5_); + _loc5_.y = 25 + 25 * _loc4_; + _loc5_.x = 4; + _loc5_.agreeBtn.onClick = this.accFriend; + _loc5_.refuseBtn.onClick = this.refuseFriend; + _loc4_++; + } + ConnectService.getInstance().addEventListener(FriendEvent.Friend_getFriendList,this.getApplyListResult); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_accFriend,this.accFriendResult); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_refuseFriend,this.refuseFriendResult); + } + + public function getApplyFriendList() : void + { + ConnectService.getInstance().friendService.getFriendList(1,this.currType); + } + + private function getApplyListResult(param1:FriendEvent) : void + { + var _loc4_:int = 0; + var _loc5_:ApplyFriendMc = null; + var _loc2_:Object = param1.obj; + if(_loc2_.type != this.currType) + { + return; + } + if(parent == null) + { + return; + } + var _loc3_:Array = _loc2_.dataResult as Array; + if(Boolean(_loc3_) && _loc3_.length > 0) + { + _loc4_ = 0; + while(_loc4_ < this.friendListVec.length) + { + if(_loc3_[_loc4_]) + { + this.friendListVec[_loc4_].setData(_loc3_[_loc4_]); + } + else + { + this.friendListVec[_loc4_].setData(null); + } + _loc4_++; + } + } + else + { + for each(_loc5_ in this.friendListVec) + { + _loc5_.setData(null); + } + } + } + + private function accFriend(param1:MouseEvent) : void + { + var _loc2_:ApplyFriendMc = param1.currentTarget.parent as ApplyFriendMc; + if(_loc2_.getFriendObj() != null) + { + ConnectService.getInstance().friendService.accFriend(_loc2_.getFriendObj().userId); + } + } + + private function refuseFriend(param1:MouseEvent) : void + { + var _loc2_:ApplyFriendMc = param1.currentTarget.parent as ApplyFriendMc; + if(_loc2_.getFriendObj() != null) + { + ConnectService.getInstance().friendService.refuseFriend(_loc2_.getFriendObj().userId); + } + } + + private function accFriendResult(param1:FriendEvent) : void + { + this.getApplyFriendList(); + } + + private function refuseFriendResult(param1:FriendEvent) : void + { + this.getApplyFriendList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/friend/FriendMainUI.as b/flash_decompiled/com/view/ui/friend/FriendMainUI.as new file mode 100644 index 0000000..261a59c --- /dev/null +++ b/flash_decompiled/com/view/ui/friend/FriendMainUI.as @@ -0,0 +1,217 @@ +package com.view.ui.friend +{ + import com.view.UIListManage; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class FriendMainUI extends BaseUI + { + + private static var instance:FriendMainUI; + + private var startPage:int; + + private var btnArr:Array = new Array(); + + private var paneBg:UIWindowBg; + + public var showApply:Boolean; + + private var currPage:int = -1; + + public var friendUI:FriendUI; + + public var enemyUI:EnemyUI; + + public function FriendMainUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_haoyou); + this.setPosition(); + this.createUI(); + } + + public static function getInstance() : FriendMainUI + { + if(instance == null) + { + return instance = new FriendMainUI(); + } + return instance; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + public function setStartPage(param1:int) : void + { + this.startPage = param1; + } + + override public function createUI() : void + { + var _loc3_:int = 0; + var _loc4_:UITabBtn = null; + 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.changTab; + _loc3_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.setBtnSelect(this.btnArr[this.startPage]); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.removePage(this.currPage); + this.currPage = -1; + } + + private function changTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + this.setBtnSelect(_loc2_); + } + + private function setBtnSelect(param1:UITabBtn) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(param1 == _loc4_) + { + _loc4_.select = true; + _loc2_ = _loc3_; + } + else + { + _loc4_.select = false; + } + } + this.openPage(_loc2_); + } + + private function removePage(param1:int) : void + { + if(param1 >= 0) + { + switch(param1) + { + case 0: + if(Boolean(this.friendUI) && this.paneBg.contains(this.friendUI)) + { + this.paneBg.removeChild(this.friendUI); + this.friendUI.clearEvent(); + } + break; + case 1: + if(Boolean(this.enemyUI) && this.paneBg.contains(this.enemyUI)) + { + this.paneBg.removeChild(this.enemyUI); + this.enemyUI.clearEvent(); + } + } + } + } + + private function addPage(param1:int) : void + { + if(param1 >= 0) + { + switch(param1) + { + case 0: + this.createPage1(); + break; + case 1: + this.createPage2(); + } + } + } + + override public function show() : void + { + if(this.showApply) + { + if(!UIListManage.getInstance().containsUI(this)) + { + super.show(); + } + else + { + this.currPage = -1; + this.startPage = 0; + this.setBtnSelect(this.btnArr[this.startPage]); + } + } + else + { + super.show(); + } + } + + private function openPage(param1:int) : void + { + if(this.currPage == param1) + { + return; + } + this.removePage(this.currPage); + this.currPage = param1; + this.addPage(this.currPage); + } + + private function createPage1() : void + { + if(this.friendUI == null) + { + this.friendUI = new FriendUI(); + } + this.paneBg.addChild(this.friendUI); + this.friendUI.addEvent(); + if(this.showApply) + { + this.showApply = false; + this.friendUI.openApplyUI(null); + } + } + + private function createPage2() : void + { + if(this.enemyUI == null) + { + this.enemyUI = new EnemyUI(); + } + this.paneBg.addChild(this.enemyUI); + this.enemyUI.addEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/friend/FriendUI.as b/flash_decompiled/com/view/ui/friend/FriendUI.as new file mode 100644 index 0000000..f1e2cbe --- /dev/null +++ b/flash_decompiled/com/view/ui/friend/FriendUI.as @@ -0,0 +1,344 @@ +package com.view.ui.friend +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.friend.event.FriendEvent; + import com.events.DevEvent; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.view.Control; + import com.view.UIListManage; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.tip.TipTitle; + import com.view.ui.BaseUI; + import com.view.ui.friend.mc.FriendMc; + import com.view.ui.mail.MailUI; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ui.CastleUserUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class FriendUI extends BaseUI + { + + private var tableMc:UITable; + + private var ufriendListVec:Vector.; + + private var pageMc:UIPageMc; + + private var inputText:UIInputText; + + private var applyBtn:MovieClip; + + private var currPage:int; + + private var currType:int = 2; + + private var friendApplyUI:FriendApplyUI; + + public function FriendUI() + { + var _loc1_:Array = null; + var _loc4_:Sprite = null; + var _loc5_:TextField = null; + var _loc7_:FriendMc = null; + super(); + _loc1_ = ["君主名","所在位置","在线状态","操作"]; + var _loc2_:Array = [150,150,150,185]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.ufriendListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc7_ = new FriendMc(); + this.ufriendListVec.push(_loc7_); + this.tableMc.addChild(_loc7_); + _loc7_.y = 26 + 26 * _loc3_; + _loc7_.x = 4; + _loc7_.delBtn.addEventListener(MouseEvent.CLICK,this.delFriend,false,0,true); + _loc7_.farmBtn.addEventListener(MouseEvent.CLICK,this.enterFram,false,0,true); + _loc7_.viewBtn.addEventListener(MouseEvent.CLICK,this.viewInfo,false,0,true); + _loc7_.talkBtn.addEventListener(MouseEvent.CLICK,this.talkUser,false,0,true); + _loc7_.mailBtn.addEventListener(MouseEvent.CLICK,this.mailUser,false,0,true); + _loc3_++; + } + _loc4_ = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 346; + _loc5_ = PublicMethod.getTextFieldWithFillter(11583207,100); + _loc5_.text = "请输入玩家名称:"; + _loc4_.addChild(_loc5_); + _loc5_.x = 120; + _loc5_.y = 8; + this.inputText = new UIInputText(100); + this.inputText.setMaxChars(50); + _loc4_.addChild(this.inputText); + this.inputText.x = _loc5_.x + _loc5_.width; + this.inputText.y = _loc5_.y - 2; + var _loc6_:UIButton = new UIButton("添加"); + _loc4_.addChild(_loc6_); + _loc6_.x = this.inputText.x + this.inputText.width + 4; + _loc6_.y = _loc5_.y - 3; + _loc6_.onClick = this.addFriend; + this.applyBtn = face.getMovieClip(ClassConfig.lib_ui_friendapply); + _loc4_.addChild(this.applyBtn); + this.applyBtn.x = _loc6_.x + 63; + this.applyBtn.y = _loc5_.y; + this.applyBtn.gotoAndStop(1); + this.applyBtn.addEventListener(MouseEvent.CLICK,this.openApplyUI,false,0,true); + new TipTitle(this.applyBtn,face.stage,face.tip_bg,{"titletext":"查看好友申请消息"}); + this.applyBtn.buttonMode = true; + this.pageMc = new UIPageMc(); + _loc4_.addChild(this.pageMc); + this.pageMc.x = 520; + this.pageMc.y = _loc5_.y; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + } + + override public function setPosition() : void + { + } + + public function getFriendList() : void + { + ConnectService.getInstance().friendService.getFriendList(this.currPage,this.currType); + } + + public function getOnlineUser() : void + { + ConnectService.getInstance().friendService.getOnline(); + } + + private function getApplyFriendCount() : void + { + ConnectService.getInstance().friendService.getApplyFriendCount(); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_getFriendList,this.getFriendListResult); + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_addFriend,this.addFriendResult); + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_getApplyFriendCount,this.getApplyFriendResult); + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_accFriend,this.accFriendResult); + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_deleteFriend,this.delFriendResult); + if(Boolean(this.friendApplyUI) && contains(this.friendApplyUI)) + { + removeChild(this.friendApplyUI); + } + } + + public function addEvent() : void + { + this.currPage = 1; + ConnectService.getInstance().addEventListener(FriendEvent.Friend_getFriendList,this.getFriendListResult); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_addFriend,this.addFriendResult); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_getApplyFriendCount,this.getApplyFriendResult); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_accFriend,this.accFriendResult); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_deleteFriend,this.delFriendResult); + this.getFriendList(); + this.getApplyFriendCount(); + } + + private function getOnlineUserSucc(param1:DevEvent) : void + { + } + + private function getApplyFriendResult(param1:FriendEvent) : void + { + if(param1.count > 0) + { + this.applyBtn.gotoAndPlay(1); + } + else + { + this.applyBtn.gotoAndStop(1); + } + } + + private function getFriendListResult(param1:FriendEvent) : void + { + var _loc7_:FriendMc = null; + var _loc8_:int = 0; + var _loc2_:Object = param1.obj; + if(_loc2_.type != this.currType) + { + return; + } + var _loc3_:int = int(_loc2_.pageCount); + var _loc4_:int = int(_loc2_.pageNo); + var _loc5_:int = int(_loc2_.allCount); + this.pageMc.setPageCount(_loc3_); + this.pageMc.setPage(_loc4_); + var _loc6_:int = int(_loc2_.dataResult.length); + if(_loc6_ == 0) + { + for each(_loc7_ in this.ufriendListVec) + { + _loc7_.setData(null); + } + } + else + { + _loc8_ = 0; + while(_loc8_ < 12) + { + if(_loc2_.dataResult[_loc8_]) + { + this.ufriendListVec[_loc8_].setData(_loc2_.dataResult[_loc8_]); + } + else + { + this.ufriendListVec[_loc8_].setData(null); + } + _loc8_++; + } + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + public function nextPage() : void + { + this.currPage += 1; + this.getFriendList(); + } + + public function prePage() : void + { + --this.currPage; + this.getFriendList(); + } + + public function openApplyUI(param1:MouseEvent) : void + { + if(this.friendApplyUI == null) + { + this.friendApplyUI = new FriendApplyUI(); + this.friendApplyUI.x = int(width / 2 - this.friendApplyUI.width / 2); + this.friendApplyUI.y = int(height / 2 - this.friendApplyUI.height / 2); + } + addChild(this.friendApplyUI); + this.applyBtn.gotoAndStop(1); + this.friendApplyUI.getApplyFriendList(); + } + + private function addFriend(param1:MouseEvent) : void + { + var _loc2_:String = this.inputText.getText(); + if(_loc2_ == "") + { + return; + } + ConnectService.getInstance().friendService.addFriend(_loc2_); + } + + private function addFriendResult(param1:FriendEvent) : void + { + MessageBoxUI.getInstance().addMessage(param1.msg); + } + + private function accFriendResult(param1:FriendEvent) : void + { + this.getFriendList(); + } + + private function delFriend(param1:MouseEvent) : void + { + var _loc3_:String = null; + var _loc4_:String = null; + var _loc2_:FriendMc = param1.currentTarget.parent as FriendMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = _loc2_.getFriendObj().friendUser.userName; + _loc4_ = "确认删除好友 [" + _loc3_ + "] 吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc4_,this.confimDelFriend,_loc3_); + } + } + + private function confimDelFriend(param1:String) : void + { + ConnectService.getInstance().friendService.deleteUser(param1,2); + } + + private function delFriendResult(param1:FriendEvent) : void + { + this.getFriendList(); + } + + private function enterFram(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:LinkEvent = null; + var _loc2_:FriendMc = param1.currentTarget.parent as FriendMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = int(_loc2_.getFriendObj().friendUser.userId); + _loc4_ = new LinkEvent(); + _loc4_.id = _loc3_.toString(); + _loc4_.eventType = "enterFarm"; + EventUtils.getInstance().dispatchEvent(_loc4_); + } + } + + private function viewInfo(param1:MouseEvent) : void + { + var _loc3_:String = null; + var _loc4_:CastleUserUI = null; + var _loc2_:FriendMc = param1.currentTarget.parent as FriendMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = _loc2_.getFriendObj().friendUser.userName; + _loc4_ = CastleUserUI.getInstance(); + _loc4_.show(); + _loc4_.updateByUserName(_loc3_); + } + } + + private function talkUser(param1:MouseEvent) : void + { + var _loc3_:String = null; + var _loc2_:FriendMc = param1.currentTarget.parent as FriendMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = _loc2_.getFriendObj().friendUser.userName; + Control.getInstance().chatMainUI.talkToUser(_loc3_); + UIListManage.getInstance().clearAll(); + } + } + + private function mailUser(param1:MouseEvent) : void + { + var _loc3_:String = null; + var _loc4_:MailUI = null; + var _loc2_:FriendMc = param1.currentTarget.parent as FriendMc; + if(_loc2_.getFriendObj() != null) + { + _loc3_ = _loc2_.getFriendObj().friendUser.userName; + _loc4_ = MailUI.getInstance(); + _loc4_.setStartPage(2); + _loc4_.setReceiveName(_loc3_); + _loc4_.show(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/friend/OnlineUser.as b/flash_decompiled/com/view/ui/friend/OnlineUser.as new file mode 100644 index 0000000..c795516 --- /dev/null +++ b/flash_decompiled/com/view/ui/friend/OnlineUser.as @@ -0,0 +1,52 @@ +package com.view.ui.friend +{ + import com.events.DevEvent; + import com.utils.Utils; + + public class OnlineUser + { + + private var userIdList:Array; + + public function OnlineUser() + { + super(); + this.userIdList = new Array(); + } + + public function setOnlineUser(param1:String) : void + { + var _loc3_:int = 0; + var _loc4_:* = undefined; + this.userIdList.splice(0,this.userIdList.length); + var _loc2_:Array = param1.split(","); + for(_loc4_ in _loc2_) + { + _loc3_ = int(_loc2_[_loc4_]); + if(_loc3_ >= 88888888 || _loc3_ <= 0) + { + continue; + } + if(_loc3_ > 0) + { + this.userIdList.push(_loc3_); + } + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.ONLINEUSER)); + } + + public function isOnline(param1:int) : Boolean + { + var _loc2_:int = 0; + for each(_loc2_ in this.userIdList) + { + if(_loc2_ == param1) + { + return true; + } + } + return false; + } + } +} + diff --git a/flash_decompiled/com/view/ui/friend/mc/ApplyFriendMc.as b/flash_decompiled/com/view/ui/friend/mc/ApplyFriendMc.as new file mode 100644 index 0000000..8addf8a --- /dev/null +++ b/flash_decompiled/com/view/ui/friend/mc/ApplyFriendMc.as @@ -0,0 +1,108 @@ +package com.view.ui.friend.mc +{ + import com.common.CommonAPI; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ApplyFriendMc extends Sprite + { + + private var label:TextField; + + private var centerCss:TextFormat; + + public var agreeBtn:UISmallBtn; + + public var refuseBtn:UISmallBtn; + + private var bg:Sprite; + + private var friendObj:Object; + + public function ApplyFriendMc() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,322,24); + addChild(this.bg); + this.bg.alpha = 0; + this.label = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + addChild(this.label); + this.label.y = 4; + this.label.styleSheet = CommonAPI.getLinkStyle(); + this.label.htmlText = ""; + this.label.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.label.mouseEnabled = true; + this.label.x = 10; + this.agreeBtn = new UISmallBtn("同 意",2); + addChild(this.agreeBtn); + this.agreeBtn.x = this.label.x + this.label.width + 6; + this.agreeBtn.y = 3; + this.refuseBtn = new UISmallBtn("拒 绝",2); + addChild(this.refuseBtn); + this.refuseBtn.x = this.agreeBtn.x + this.agreeBtn.width + 6; + this.refuseBtn.y = 3; + this.agreeBtn.visible = false; + this.refuseBtn.visible = false; + 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.friendObj != null) + { + this.bg.alpha = 0; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.friendObj != null) + { + this.bg.alpha = 0.3; + } + } + + public function getFriendObj() : Object + { + return this.friendObj; + } + + public function setData(param1:Object) : void + { + this.friendObj = param1; + if(this.friendObj == null) + { + this.label.htmlText = ""; + this.bg.alpha = 0; + this.agreeBtn.visible = false; + this.refuseBtn.visible = false; + } + else + { + this.label.htmlText = "" + this.friendObj.appMemo + " 申请你为好友"; + this.agreeBtn.visible = true; + this.refuseBtn.visible = true; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:Array = _loc2_.split(":"); + var _loc4_:String = _loc3_[0]; + var _loc5_:String = _loc3_[1]; + var _loc6_:CastleUserUI = CastleUserUI.getInstance(); + _loc6_.show(); + _loc6_.updateByUserName(_loc5_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/friend/mc/EnemyMc.as b/flash_decompiled/com/view/ui/friend/mc/EnemyMc.as new file mode 100644 index 0000000..fe17fa5 --- /dev/null +++ b/flash_decompiled/com/view/ui/friend/mc/EnemyMc.as @@ -0,0 +1,251 @@ +package com.view.ui.friend.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.CommonAPI; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.tip.TipTitle; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class EnemyMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var nameText:TextField; + + private var posiText:TextField; + + private var onlineText:TextField; + + private var leftTimeText:TextField; + + public var farmBtn:SimpleButton; + + public var viewBtn:SimpleButton; + + public var talkBtn:SimpleButton; + + public var mailBtn:SimpleButton; + + public var delBtn:Sprite; + + private var centerCss:TextFormat; + + private var centerRedCss:TextFormat; + + private var useDestoryBtn:UISmallBtn; + + private var tiip1:TipTitle; + + private var tiip2:TipTitle; + + private var tiip3:TipTitle; + + private var tiip4:TipTitle; + + private var tiip5:TipTitle; + + private var bg:Sprite; + + private var friendObj:Object; + + private var leftTime:int; + + private var timer:Timer; + + public function EnemyMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.centerRedCss = PublicMethod.getCenterTextFormat(); + this.centerRedCss.color = 16711680; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,624,24); + addChild(this.bg); + this.bg.alpha = 0; + this.bg.x = 1; + this.bg.y = 1; + this.nameText = PublicMethod.getTextFieldWithFillter(16777215,148); + addChild(this.nameText); + this.nameText.y = 4; + this.posiText = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(this.posiText); + this.posiText.x = this.nameText.x + this.nameText.width; + this.posiText.y = this.nameText.y; + this.posiText.styleSheet = CommonAPI.getLinkStyle(); + this.posiText.htmlText = ""; + this.posiText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.posiText.mouseEnabled = true; + this.onlineText = PublicMethod.getTextFieldWithFillter(16777215,70); + addChild(this.onlineText); + this.onlineText.x = this.posiText.x + this.posiText.width; + this.onlineText.y = this.nameText.y; + this.leftTimeText = PublicMethod.getTextFieldWithFillter(16777215,130); + addChild(this.leftTimeText); + this.leftTimeText.x = this.onlineText.x + this.onlineText.width; + this.leftTimeText.y = this.nameText.y; + this.leftTimeText.defaultTextFormat = this.centerRedCss; + this.useDestoryBtn = new UISmallBtn("使用",2); + addChild(this.useDestoryBtn); + this.useDestoryBtn.x = this.onlineText.x + this.onlineText.width + 37; + --this.nameText.y; + this.useDestoryBtn.onClick = this.useDestory; + this.farmBtn = this.face.getButton(ClassConfig.lib_ui_farm); + this.viewBtn = this.face.getButton(ClassConfig.lib_ui_view); + this.talkBtn = this.face.getButton(ClassConfig.lib_ui_talk); + this.mailBtn = this.face.getButton(ClassConfig.lib_ui_mail); + this.delBtn = this.face.getSprite(ClassConfig.lib_ui_close); + addChild(this.farmBtn); + addChild(this.viewBtn); + addChild(this.talkBtn); + addChild(this.mailBtn); + addChild(this.delBtn); + this.farmBtn.x = 460; + this.farmBtn.y = 4; + this.viewBtn.x = this.farmBtn.x + 30; + this.viewBtn.y = this.farmBtn.y; + this.talkBtn.x = this.viewBtn.x + 30; + this.talkBtn.y = this.farmBtn.y; + this.mailBtn.x = this.talkBtn.x + 30; + this.mailBtn.y = this.farmBtn.y + 2; + this.delBtn.x = this.mailBtn.x + 30; + this.delBtn.y = 2; + this.delBtn.buttonMode = true; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.tiip1 = new TipTitle(this.farmBtn,this.face.stage,this.face.tip_bg,{"titletext":"进入农场"}); + this.tiip2 = new TipTitle(this.viewBtn,this.face.stage,this.face.tip_bg,{"titletext":"查看信息"}); + this.tiip3 = new TipTitle(this.talkBtn,this.face.stage,this.face.tip_bg,{"titletext":"私聊"}); + this.tiip4 = new TipTitle(this.mailBtn,this.face.stage,this.face.tip_bg,{"titletext":"发送邮件"}); + this.tiip5 = new TipTitle(this.delBtn,this.face.stage,this.face.tip_bg,{"titletext":"删除好友"}); + this.farmBtn.visible = false; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.delBtn.visible = false; + this.useDestoryBtn.visible = false; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.friendObj != null) + { + this.bg.alpha = 0; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.friendObj != null) + { + this.bg.alpha = 0.3; + } + } + + public function getFriendObj() : Object + { + return this.friendObj; + } + + public function setData(param1:Object) : void + { + this.useDestoryBtn.setEnable(); + this.friendObj = param1; + if(this.friendObj == null) + { + this.nameText.text = ""; + this.posiText.htmlText = ""; + this.onlineText.text = ""; + this.bg.alpha = 0; + this.farmBtn.visible = false; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.delBtn.visible = false; + this.leftTimeText.htmlText = ""; + this.useDestoryBtn.visible = false; + } + else + { + this.nameText.text = this.friendObj.friendUser.userName; + this.nameText.setTextFormat(this.centerCss); + this.posiText.htmlText = "

(" + this.friendObj.countryName + "" + this.friendObj.mainCasPosX + "," + this.friendObj.mainCasPosY + ")

"; + this.leftTime = int(this.friendObj.leftTime); + if(this.leftTime > 0) + { + this.startTime(); + this.useDestoryBtn.visible = false; + } + else + { + this.useDestoryBtn.visible = true; + } + this.onlineText.text = this.friendObj.appCount; + this.onlineText.setTextFormat(this.centerCss); + this.farmBtn.visible = true; + this.viewBtn.visible = true; + this.talkBtn.visible = true; + this.mailBtn.visible = true; + this.delBtn.visible = true; + } + } + + private function startTime() : void + { + if(this.leftTime > 0) + { + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.enterFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + } + + private function enterFrame(param1:TimerEvent) : void + { + --this.leftTime; + this.leftTimeText.text = PublicMethod.getTime(this.leftTime); + if(this.leftTime <= 0) + { + this.leftTimeText.text = ""; + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.enterFrame); + this.timer = null; + this.useDestoryBtn.visible = true; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:Array = param1.text.split(","); + var _loc3_:LinkEvent = new LinkEvent(); + _loc3_.id = "map"; + _loc3_.eventType = "map"; + _loc3_.data = _loc2_; + EventUtils.getInstance().dispatchEvent(_loc3_); + } + + private function useDestory(param1:MouseEvent) : void + { + ConnectService.getInstance().friendService.useDestory(this.friendObj.friendUserId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/friend/mc/FriendMc.as b/flash_decompiled/com/view/ui/friend/mc/FriendMc.as new file mode 100644 index 0000000..12d58a4 --- /dev/null +++ b/flash_decompiled/com/view/ui/friend/mc/FriendMc.as @@ -0,0 +1,179 @@ +package com.view.ui.friend.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.CommonAPI; + import com.common.PublicMethod; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.view.newui.UIConfig; + import com.view.tip.TipTitle; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class FriendMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var nameText:TextField; + + private var posiText:TextField; + + private var onlineText:TextField; + + public var farmBtn:SimpleButton; + + public var viewBtn:SimpleButton; + + public var talkBtn:SimpleButton; + + public var mailBtn:SimpleButton; + + public var delBtn:Sprite; + + private var centerCss:TextFormat; + + private var tiip1:TipTitle; + + private var tiip2:TipTitle; + + private var tiip3:TipTitle; + + private var tiip4:TipTitle; + + private var tiip5:TipTitle; + + private var bg:Sprite; + + private var friendObj:Object; + + public function FriendMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,624,24); + addChild(this.bg); + this.bg.alpha = 0.2; + this.bg.x = 1; + this.bg.y = 1; + this.bg.visible = false; + this.nameText = PublicMethod.getTextField(16777215,148); + addChild(this.nameText); + this.nameText.y = 4; + this.posiText = PublicMethod.getTextField(16777215,150); + addChild(this.posiText); + this.posiText.x = this.nameText.x + this.nameText.width; + this.posiText.y = this.nameText.y; + this.posiText.styleSheet = CommonAPI.getLinkStyle(); + this.posiText.htmlText = ""; + this.posiText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.posiText.mouseEnabled = true; + this.onlineText = PublicMethod.getTextField(16777215,150); + addChild(this.onlineText); + this.onlineText.x = this.posiText.x + this.posiText.width; + this.onlineText.y = this.nameText.y; + this.farmBtn = this.face.getButton(ClassConfig.lib_ui_farm); + this.viewBtn = this.face.getButton(ClassConfig.lib_ui_view); + this.talkBtn = this.face.getButton(ClassConfig.lib_ui_talk); + this.mailBtn = this.face.getButton(ClassConfig.lib_ui_mail); + this.delBtn = this.face.getSprite(ClassConfig.lib_ui_close); + addChild(this.farmBtn); + addChild(this.viewBtn); + addChild(this.talkBtn); + addChild(this.mailBtn); + addChild(this.delBtn); + this.farmBtn.x = 460; + this.farmBtn.y = 4; + this.viewBtn.x = this.farmBtn.x + 30; + this.viewBtn.y = this.farmBtn.y; + this.talkBtn.x = this.viewBtn.x + 30; + this.talkBtn.y = this.farmBtn.y; + this.mailBtn.x = this.talkBtn.x + 30; + this.mailBtn.y = this.farmBtn.y + 2; + this.delBtn.x = this.mailBtn.x + 30; + this.delBtn.y = 2; + this.delBtn.buttonMode = true; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.tiip1 = new TipTitle(this.farmBtn,this.face.stage,this.face.tip_bg,{"titletext":"进入农场"}); + this.tiip2 = new TipTitle(this.viewBtn,this.face.stage,this.face.tip_bg,{"titletext":"查看信息"}); + this.tiip3 = new TipTitle(this.talkBtn,this.face.stage,this.face.tip_bg,{"titletext":"私聊"}); + this.tiip4 = new TipTitle(this.mailBtn,this.face.stage,this.face.tip_bg,{"titletext":"发送邮件"}); + this.tiip5 = new TipTitle(this.delBtn,this.face.stage,this.face.tip_bg,{"titletext":"删除好友"}); + this.farmBtn.visible = false; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.delBtn.visible = false; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.friendObj != null) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.friendObj != null) + { + this.bg.visible = true; + } + } + + public function getFriendObj() : Object + { + return this.friendObj; + } + + public function setData(param1:Object) : void + { + var _loc2_:int = 0; + this.friendObj = param1; + if(this.friendObj == null) + { + this.nameText.text = ""; + this.posiText.htmlText = ""; + this.onlineText.text = ""; + this.bg.visible = false; + this.farmBtn.visible = false; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.delBtn.visible = false; + } + else + { + _loc2_ = int(this.friendObj.friendUserId); + this.nameText.text = this.friendObj.friendUser.userName; + this.nameText.setTextFormat(this.centerCss); + this.posiText.htmlText = "

(" + this.friendObj.countryName + "" + this.friendObj.mainCasPosX + "," + this.friendObj.mainCasPosY + ")

"; + this.onlineText.htmlText = "---"; + this.onlineText.setTextFormat(this.centerCss); + this.farmBtn.visible = true; + this.viewBtn.visible = true; + this.talkBtn.visible = true; + this.mailBtn.visible = true; + this.delBtn.visible = true; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:Array = param1.text.split(","); + var _loc3_:LinkEvent = new LinkEvent(); + _loc3_.id = "map"; + _loc3_.eventType = "map"; + _loc3_.data = _loc2_; + EventUtils.getInstance().dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/gift/GiftItem.as b/flash_decompiled/com/view/ui/gift/GiftItem.as new file mode 100644 index 0000000..f609e97 --- /dev/null +++ b/flash_decompiled/com/view/ui/gift/GiftItem.as @@ -0,0 +1,62 @@ +package com.view.ui.gift +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.data.data.items.Item; + import com.view.newui.UIConfig; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class GiftItem extends Sprite + { + + private var itemImg:Bitmap; + + private var itemName:TextField; + + private var obj:Item; + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemImgSp:Sprite; + + private var loader:LoadResource; + + public function GiftItem(param1:Item) + { + super(); + this.obj = param1; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,74); + addChild(this.itemName); + this.itemName.y = 60; + this.itemName.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemName.htmlText = this.obj.showName; + this.loadImg(); + this.itemImgSp = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),49,49); + addChild(this.itemImgSp); + this.itemImgSp.x = 4; + } + + private function loadImg() : void + { + this.loader = new LoadResource(ServerConfig.IMAGE_EQUIP_URL + this.obj.iconPath,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.itemImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.itemImgSp.addChild(this.itemImg); + this.itemImg.x = 3; + this.itemImg.y = 3; + this.itemImg.width = 53; + this.itemImg.height = 53; + } + } +} + diff --git a/flash_decompiled/com/view/ui/gift/GiftView.as b/flash_decompiled/com/view/ui/gift/GiftView.as new file mode 100644 index 0000000..184c63d --- /dev/null +++ b/flash_decompiled/com/view/ui/gift/GiftView.as @@ -0,0 +1,180 @@ +package com.view.ui.gift +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.utils.Utils; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.utils.Timer; + + public class GiftView extends Sprite + { + + private static var instance:GiftView; + + private var face:InstallFace = InstallFace.getInstance(); + + private var giftMc:MovieClip; + + private var timer:Timer; + + private var _timer:Timer; + + private var awardId:int; + + private var _seconds:int; + + private var canGet:Boolean = true; + + private var canFetch:Boolean; + + public function GiftView() + { + super(); + if(instance != null) + { + throw new Error("单例"); + } + this.init(); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_fetchOnlineTimeAward,this.balladSucc); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_getOnlineTimeAward,this.getAwardSucc); + } + + public static function getInstance() : GiftView + { + if(instance == null) + { + instance = new GiftView(); + } + return instance; + } + + private function init() : void + { + this.giftMc = this.face.getMovieClip(ClassConfig.ui_gift); + addChild(this.giftMc); + this.initGame(); + this.giftMc.gotoAndStop(1); + this.timer = new Timer(120000); + this._timer = new Timer(1000); + this.timer.start(); + this.giftMc.addEventListener(MouseEvent.CLICK,this._ballad); + this._timer.addEventListener(TimerEvent.TIMER,this._onTimer); + this.timer.addEventListener(TimerEvent.TIMER,this.onTimer); + } + + private function _onTimer(param1:TimerEvent) : void + { + --this._seconds; + this.giftMc.timer_txt.text = Utils.formatSeconds(this._seconds); + if(this._seconds <= 0) + { + this.giftMc.timer_txt.text = ""; + this._timer.stop(); + this.initGame(); + } + } + + private function onTimer(param1:TimerEvent) : void + { + this.initGame(); + } + + private function _ballad(param1:MouseEvent) : void + { + if(!this.canFetch) + { + return; + } + if(!this.canGet) + { + return; + } + this.canGet = false; + ConnectService.getInstance().castleService.fetchOnlineTimeAward(this.awardId); + } + + private function balladSucc(param1:CastleEvent) : void + { + var _loc3_:ShowGiftItem = null; + this.canGet = true; + var _loc2_:Object = param1.castleObj; + if(_loc2_.itemList) + { + _loc3_ = ShowGiftItem.getInstance(); + _loc3_.update(_loc2_); + _loc3_.show(); + } + if(_loc2_.isLast == true) + { + this.giftMc.removeEventListener(MouseEvent.CLICK,this._ballad); + this.clear(); + return; + } + this.initGame(); + } + + private function clear() : void + { + this.timer.stop(); + this.giftMc.removeEventListener(MouseEvent.CLICK,this._ballad); + this.timer.removeEventListener(TimerEvent.TIMER,this.onTimer); + ToolTipManager.getInstance().disposeToolTip(this); + Utils.removeAll(this); + instance = null; + } + + private function getAwardSucc(param1:CastleEvent) : void + { + var _loc2_:Object = param1.castleObj; + if(_loc2_.end == true || _loc2_ == null) + { + this.clear(); + return; + } + if(_loc2_.canFetch == true) + { + this.giftMc.gotoAndStop(2); + if(_loc2_.showDesc) + { + ToolTipManager.getInstance().setToolTip(this,new TxtTooltip(_loc2_.showDesc)); + } + } + this.canFetch = _loc2_.canFetch; + this.giftMc.buttonMode = this.canFetch; + if(_loc2_.canFetch == false) + { + this.giftMc.gotoAndStop(1); + if(_loc2_.showDesc) + { + ToolTipManager.getInstance().setToolTip(this,new TxtTooltip(_loc2_.showDesc)); + } + } + if(_loc2_.awardId) + { + this.awardId = _loc2_.awardId; + } + if(_loc2_.seconds) + { + this._seconds = _loc2_.seconds; + this.giftMc.timer_txt.text = Utils.formatSeconds(this._seconds); + if(!this._timer.running) + { + this._timer.start(); + } + } + } + + private function initGame() : void + { + ConnectService.getInstance().castleService.getOnlineTimeAward(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/gift/ShowGiftItem.as b/flash_decompiled/com/view/ui/gift/ShowGiftItem.as new file mode 100644 index 0000000..c7d8151 --- /dev/null +++ b/flash_decompiled/com/view/ui/gift/ShowGiftItem.as @@ -0,0 +1,156 @@ +package com.view.ui.gift +{ + import com.common.PublicMethod; + import com.data.data.items.Item; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + 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.MouseEvent; + import flash.text.TextField; + + public class ShowGiftItem extends BaseUI + { + + private static var instance:ShowGiftItem; + + private var bg:Sprite; + + private var label1:TextField; + + private var itemListVec:Vector.; + + private var itemListMc:Sprite; + + private var scrollPane:ScrollPane; + + public function ShowGiftItem() + { + super(); + if(instance != null) + { + throw Error("单例"); + } + addUIBg(); + loadTitle(UITitleConfig.title_libao); + this.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(375,95); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,310); + this.label1.multiline = true; + this.label1.wordWrap = true; + this.label1.height = 38; + this.label1.text = ""; + addChild(this.label1); + this.label1.x = 11; + this.label1.y = _loc1_.y + _loc1_.height + 5; + this.itemListMc = new Sprite(); + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(365,95); + this.scrollPane.verticalScrollPolicy = ScrollPolicy.OFF; + _loc1_.addChild(this.scrollPane); + this.scrollPane.x = 10; + this.scrollPane.y = 8; + this.scrollPane.source = this.itemListMc; + this.itemListVec = new Vector.(); + var _loc2_:UIButton = new UIButton("确 定",2,10); + addChild(_loc2_); + _loc2_.x = 333; + _loc2_.y = 150; + _loc2_.onClick = this.closeUI; + this.scrollPane.update(); + } + + public static function getInstance() : ShowGiftItem + { + if(instance == null) + { + instance = new ShowGiftItem(); + } + return instance; + } + + override public function show() : void + { + face.stage.addChild(this); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w - 255; + window_heihgt = 105; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 - 255; + ui_closeBtn.y = 10; + } + + override public function setPosition() : void + { + this.x = int(face.realWidth / 2 - width / 2); + this.y = 20; + } + + override public function closeUI(param1:MouseEvent) : void + { + if(face.stage.contains(this)) + { + face.stage.removeChild(this); + } + this.clear(); + } + + private function clear() : void + { + var _loc1_:int = int(this.itemListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.itemListMc.removeChild(this.itemListVec[_loc2_]); + this.itemListVec.splice(_loc2_,1); + _loc2_--; + } + this.scrollPane.update(); + } + + public function update(param1:Object) : void + { + var _loc4_:Item = null; + var _loc5_:GiftItem = null; + if(!param1.seconds) + { + this.label1.text = "成功打开礼包(宝箱)"; + } + else if(int(param1.seconds) > 0) + { + this.label1.text = "你获得了系统赠送的在线礼物," + Utils.formatSecond(param1.seconds) + "钟后送出下一份礼物!"; + } + else + { + this.label1.text = "恭喜!你获得了系统赠送的在线礼物"; + } + var _loc2_:Array = param1.itemList as Array; + var _loc3_:int = 0; + for each(_loc4_ in _loc2_) + { + _loc5_ = new GiftItem(_loc4_); + this.itemListMc.addChild(_loc5_); + this.itemListVec.push(_loc5_); + _loc5_.x = _loc3_ * 75; + _loc3_++; + } + this.scrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/ChangeGuildLeader.as b/flash_decompiled/com/view/ui/guild/ChangeGuildLeader.as new file mode 100644 index 0000000..bce3116 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/ChangeGuildLeader.as @@ -0,0 +1,94 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ChangeGuildLeader extends UIWindowBg + { + + private var newLeaderText:UIInputText; + + public function ChangeGuildLeader() + { + var _loc1_:TextField = null; + var _loc3_:TextField = null; + var _loc4_:TextField = null; + super(); + initSize(100,170); + loadTitle(UITitleConfig.title_mengzhushanrang); + addCloseBtn(); + initBg(); + _loc1_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,75); + _loc1_.text = "新盟主名称:"; + bg1.addChild(_loc1_); + _loc1_.x = 50; + _loc1_.y = 15; + this.newLeaderText = new UIInputText(100); + bg1.addChild(this.newLeaderText); + this.newLeaderText.x = _loc1_.x + 75; + this.newLeaderText.y = _loc1_.y - 3; + var _loc2_:Sprite = PublicMethod.getTrLine(270); + bg1.addChild(_loc2_); + _loc2_.x = 15; + _loc2_.y = _loc1_.y + 30; + _loc1_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + _loc1_.text = "1、只能把盟主禅让给本联盟成员"; + bg1.addChild(_loc1_); + _loc1_.x = 14; + _loc1_.y = _loc2_.y + 10; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + _loc3_.text = "2、转让后盟主成为普通成员"; + bg1.addChild(_loc3_); + _loc3_.x = _loc1_.x; + _loc3_.y = _loc1_.y + 20; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + _loc4_.text = "3、转让需要72小时完成,期间原盟主可以取消"; + bg1.addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = _loc3_.y + 20; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + _loc5_.text = "4、禅让盟主会中止联盟升级"; + bg1.addChild(_loc5_); + _loc5_.x = _loc1_.x; + _loc5_.y = _loc4_.y + 20; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + _loc6_.text = "5、请输入新盟主名字"; + bg1.addChild(_loc6_); + _loc6_.x = _loc1_.x; + _loc6_.y = _loc5_.y + 20; + var _loc7_:UIButton = new UIButton("确 认",2); + bg1.addChild(_loc7_); + _loc7_.x = 120; + _loc7_.y = 165; + _loc7_.onClick = this.submit; + ConnectService.getInstance().addEventListener(GuildEvent.Guild_changeLeader,this.changeResult); + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.newLeaderText.getText()); + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("新盟主名称不能为空"); + return; + } + ConnectService.getInstance().guildService.changeLeaderByName(_loc2_); + } + + private function changeResult(param1:GuildEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/DisolveGuildUI.as b/flash_decompiled/com/view/ui/guild/DisolveGuildUI.as new file mode 100644 index 0000000..ceec7f1 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/DisolveGuildUI.as @@ -0,0 +1,51 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + 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; + + public class DisolveGuildUI extends UIWindowBg + { + + public function DisolveGuildUI() + { + super(); + initSize(5,90); + loadTitle(UITitleConfig.title_jiesanlianmeng); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(173,40); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,150); + _loc2_.text = "确定要解散联盟吗?"; + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 10; + var _loc3_:UIButton = new UIButton("确认"); + bg1.addChild(_loc3_); + _loc3_.x = 140; + _loc3_.y = 100; + _loc3_.onClick = this.submit; + } + + private function submit(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.dismissGuild(); + } + + private function dismissResult(param1:GuildEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/EditGuildDescUI.as b/flash_decompiled/com/view/ui/guild/EditGuildDescUI.as new file mode 100644 index 0000000..699e939 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/EditGuildDescUI.as @@ -0,0 +1,74 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.mc.sprite.TextBar; + 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; + + public class EditGuildDescUI extends UIWindowBg + { + + private var inputBar:TextBar; + + public function EditGuildDescUI() + { + super(); + initSize(100,190); + loadTitle(UITitleConfig.title_lianmengjianjie); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,235); + _loc1_.text = "联盟简介和公告最多可输入200中文字符"; + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(273,140); + bg1.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 30; + this.inputBar = new TextBar(); + this.inputBar.createTextField(264,146); + this.inputBar.setTextType(); + this.inputBar.setEnabled(); + _loc2_.addChild(this.inputBar); + this.inputBar.x = 2; + this.inputBar.y = 2; + var _loc3_:UIButton = new UIButton("提 交",2); + bg1.addChild(_loc3_); + _loc3_.x = 111; + _loc3_.y = 186; + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Desc_Update,this.updateDescResult); + _loc3_.onClick = this.submit; + } + + public function setData(param1:String) : void + { + this.inputBar.traceMsg(param1); + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:String = this.inputBar.getText(); + if(_loc2_.length > 400) + { + MessageBoxUI.getInstance().addMessage("字符长度超出限制"); + return; + } + ConnectService.getInstance().guildService.changeGuildDesc(_loc2_); + } + + private function updateDescResult(param1:GuildEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/EditGuildNoticeUI.as b/flash_decompiled/com/view/ui/guild/EditGuildNoticeUI.as new file mode 100644 index 0000000..6514a91 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/EditGuildNoticeUI.as @@ -0,0 +1,74 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.mc.sprite.TextBar; + 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; + + public class EditGuildNoticeUI extends UIWindowBg + { + + private var inputBar:TextBar; + + public function EditGuildNoticeUI() + { + super(); + initSize(100,190); + loadTitle(UITitleConfig.title_lianmenggonggao); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,235); + _loc1_.text = "联盟简介和公告最多可输入200中文字符"; + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(273,140); + bg1.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 30; + this.inputBar = new TextBar(); + this.inputBar.createTextField(264,146); + this.inputBar.setTextType(); + this.inputBar.setEnabled(); + _loc2_.addChild(this.inputBar); + this.inputBar.x = 2; + this.inputBar.y = 2; + var _loc3_:UIButton = new UIButton("提 交",2); + bg1.addChild(_loc3_); + _loc3_.x = 111; + _loc3_.y = 186; + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Notice_Update,this.updateDescResult); + _loc3_.onClick = this.submit; + } + + public function setData(param1:String) : void + { + this.inputBar.traceMsg(param1); + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:String = this.inputBar.getText(); + if(_loc2_.length > 400) + { + MessageBoxUI.getInstance().addMessage("字符长度超出限制"); + return; + } + ConnectService.getInstance().guildService.changeGuildNotice(_loc2_); + } + + private function updateDescResult(param1:GuildEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/FightInfoView.as b/flash_decompiled/com/view/ui/guild/FightInfoView.as new file mode 100644 index 0000000..a34bb55 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/FightInfoView.as @@ -0,0 +1,325 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.province.event.ProvinceEvent; + import com.view.UIListManage; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.events.Event; + import flash.text.TextField; + import flash.text.TextFormat; + + public class FightInfoView extends BaseUI + { + + private static var _instance:FightInfoView; + + private var fightMc:MovieClip; + + public var gameRes:GameUIRes; + + private var centerCss:TextFormat; + + private var resulttxt:TextField; + + private var provinceNametxt:TextField; + + private var countryNametxt:TextField; + + private var provinceTypetxt:TextField; + + private var winFlagtxt:TextField; + + private var attGuildNametxt:TextField; + + private var defGuildNametxt:TextField; + + private var attGuildRanktxt:TextField; + + private var defGuildRanktxt:TextField; + + private var attGuileHonortxt:TextField; + + private var defGuileHonor:TextField; + + private var attGuildLeadertxt:TextField; + + private var defGuildLeader:TextField; + + private var awardtxt:TextField; + + private var citytypemc:MovieClip; + + private var _info:Object; + + public function FightInfoView() + { + var _loc2_:UIWindowBg = null; + var _loc3_:UIWindowBg = null; + var _loc11_:TextField = null; + var _loc12_:TextField = null; + this.gameRes = GameUIRes.getInstance(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_zhanbao); + super.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630 - 295,400 - 60); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.centerCss = PublicMethod.getCenterTextFormat(); + this.centerCss.size = 20; + this.centerCss.color = 16711680; + this.centerCss.bold = true; + this.resulttxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,327); + _loc1_.addChild(this.resulttxt); + this.resulttxt.x = 10; + this.resulttxt.y = 10; + this.resulttxt.height = 30; + this.resulttxt.defaultTextFormat = this.centerCss; + this.resulttxt.text = "进攻方胜利"; + _loc2_ = new UIWindowBg(); + _loc2_.initSecondPanel(315,70); + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 40; + this.fightMc = this.gameRes.getMovieClip(ClassConfig.pro_FightInfo,this.gameRes.getGuildInfo()); + _loc2_.addChild(this.fightMc); + this.fightMc.citytypemc.gotoAndStop(1); + this.fightMc.x = -10; + this.fightMc.y = -40; + _loc3_ = new UIWindowBg(); + _loc3_.initThirdPanel(150,120); + _loc1_.addChild(_loc3_); + _loc3_.x = 10; + _loc3_.y = _loc2_.y + _loc2_.height + 5; + var _loc4_:UIWindowBg = new UIWindowBg(); + _loc4_.initThirdPanel(150,120); + _loc1_.addChild(_loc4_); + _loc4_.x = _loc3_.x + _loc3_.width + 5; + _loc4_.y = _loc3_.y; + var _loc5_:UIWindowBg = new UIWindowBg(); + _loc5_.initThirdPanel(315,70); + _loc1_.addChild(_loc5_); + _loc5_.x = _loc3_.x; + _loc5_.y = _loc3_.y + _loc3_.height + 5; + var _loc6_:UITitleBg = new UITitleBg("进攻方",_loc3_.width); + _loc3_.addChild(_loc6_); + _loc6_.x = int(_loc3_.width / 2 - _loc6_.width / 2); + var _loc7_:UITitleBg = new UITitleBg("防守方",_loc4_.width); + _loc4_.addChild(_loc7_); + _loc7_.x = int(_loc4_.width / 2 - _loc7_.width / 2); + var _loc8_:UITitleBg = new UITitleBg("城池效果",_loc5_.width); + _loc5_.addChild(_loc8_); + _loc8_.x = int(_loc5_.width / 2 - _loc8_.width / 2); + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc9_.text = "城 池:"; + _loc2_.addChild(_loc9_); + _loc9_.x = 111; + _loc9_.y = 10; + this.provinceNametxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.provinceNametxt); + this.provinceNametxt.x = _loc9_.width + _loc9_.x; + this.provinceNametxt.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc10_.text = "国 家:"; + _loc2_.addChild(_loc10_); + _loc10_.x = _loc9_.x; + _loc10_.y = _loc9_.y + 20; + this.countryNametxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.countryNametxt); + this.countryNametxt.x = this.provinceNametxt.x; + this.countryNametxt.y = _loc10_.y; + _loc11_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + _loc11_.text = "规 模:"; + _loc2_.addChild(_loc11_); + _loc11_.x = _loc9_.x; + _loc11_.y = _loc10_.y + 20; + this.provinceTypetxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.provinceTypetxt); + this.provinceTypetxt.x = this.provinceNametxt.x; + this.provinceTypetxt.y = _loc11_.y; + _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc12_.text = "联盟旗号:"; + _loc2_.addChild(_loc12_); + _loc12_.x = 210; + _loc12_.y = _loc10_.y; + this.winFlagtxt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,40); + _loc2_.addChild(this.winFlagtxt); + this.winFlagtxt.x = _loc12_.x + _loc12_.width; + this.winFlagtxt.y = _loc12_.y; + this.winFlagtxt.text = "对"; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc13_.text = "联 盟:"; + _loc3_.addChild(_loc13_); + _loc13_.x = 10; + _loc13_.y = 31; + this.attGuildNametxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc3_.addChild(this.attGuildNametxt); + this.attGuildNametxt.x = _loc13_.x + _loc13_.width; + this.attGuildNametxt.y = _loc13_.y; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc14_.text = "排 名:"; + _loc3_.addChild(_loc14_); + _loc14_.x = _loc13_.x; + _loc14_.y = _loc13_.y + 25; + this.attGuildRanktxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc3_.addChild(this.attGuildRanktxt); + this.attGuildRanktxt.x = this.attGuildNametxt.x; + this.attGuildRanktxt.y = _loc14_.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc15_.text = "参战人数:"; + _loc3_.addChild(_loc15_); + _loc15_.x = _loc13_.x; + _loc15_.y = _loc14_.y + 25; + this.attGuileHonortxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc3_.addChild(this.attGuileHonortxt); + this.attGuileHonortxt.x = this.attGuildNametxt.x; + this.attGuileHonortxt.y = _loc15_.y; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc16_.text = "盟 主:"; + _loc3_.addChild(_loc16_); + _loc16_.x = _loc13_.x; + _loc16_.y = _loc15_.y + 25; + this.attGuildLeadertxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc3_.addChild(this.attGuildLeadertxt); + this.attGuildLeadertxt.x = this.attGuildNametxt.x; + this.attGuildLeadertxt.y = _loc16_.y; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc17_.text = "联 盟:"; + _loc4_.addChild(_loc17_); + _loc17_.x = 10; + _loc17_.y = _loc13_.y; + this.defGuildNametxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc4_.addChild(this.defGuildNametxt); + this.defGuildNametxt.x = _loc17_.x + _loc17_.width; + this.defGuildNametxt.y = _loc17_.y; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc18_.text = "排 名:"; + _loc4_.addChild(_loc18_); + _loc18_.x = _loc17_.x; + _loc18_.y = _loc17_.y + 25; + this.defGuildRanktxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc4_.addChild(this.defGuildRanktxt); + this.defGuildRanktxt.x = this.defGuildNametxt.x; + this.defGuildRanktxt.y = _loc18_.y; + var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc19_.text = "参战人数:"; + _loc4_.addChild(_loc19_); + _loc19_.x = _loc17_.x; + _loc19_.y = _loc18_.y + 25; + this.defGuileHonor = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc4_.addChild(this.defGuileHonor); + this.defGuileHonor.x = this.defGuildNametxt.x; + this.defGuileHonor.y = _loc19_.y; + var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc20_.text = "盟 主:"; + _loc4_.addChild(_loc20_); + _loc20_.x = _loc17_.x; + _loc20_.y = _loc19_.y + 25; + this.defGuildLeader = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc4_.addChild(this.defGuildLeader); + this.defGuildLeader.x = this.defGuildNametxt.x; + this.defGuildLeader.y = _loc20_.y; + this.awardtxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,310); + _loc5_.addChild(this.awardtxt); + this.awardtxt.x = 6; + this.awardtxt.y = 28; + this.awardtxt.multiline = true; + this.awardtxt.wordWrap = true; + this.awardtxt.height = 50; + } + + public static function getInstance() : FightInfoView + { + if(_instance == null) + { + _instance = new FightInfoView(); + } + return _instance; + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w - 295; + window_heihgt = UIWindowBg.normal_window_h - 60; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 - 295; + ui_closeBtn.y = 10; + } + + override public function show() : void + { + if(!UIListManage.getInstance().containsUI(this)) + { + UIListManage.getInstance().addUI(this); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getResultOfProvince,this.successhandler); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getResultOfProvince,this.successhandler); + } + + private function successhandler(param1:ProvinceEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + closeUI(null); + return; + } + this._info = param1.objData; + this.resulttxt.htmlText = String(this._info["result"]); + this.provinceNametxt.text = String(this._info["provinceName"]); + this.countryNametxt.text = String(this._info["countryName"]); + this.provinceTypetxt.text = String(this._info["provinceType"]); + this.winFlagtxt.text = String(this._info["winFlag"]); + this.attGuildNametxt.text = String(this._info["attGuildName"]); + this.attGuildRanktxt.text = String(this._info["attGuildRank"]); + this.attGuileHonortxt.text = String(this._info["attGuildMems"]); + this.attGuildLeadertxt.text = String(this._info["attGuildLeader"]); + this.defGuildNametxt.text = String(this._info["defGuildName"]); + this.defGuildRanktxt.text = String(this._info["defGuildRank"]); + this.defGuileHonor.text = String(this._info["defGuildMems"]); + this.defGuildLeader.text = String(this._info["defGuildLeader"]); + this.awardtxt.htmlText = String(this._info["award"]); + var _loc2_:* = this._info["provinceTypeNum"]; + if(_loc2_ == 0) + { + this.fightMc.citytypemc.visible = false; + } + else + { + this.fightMc.citytypemc.visible = true; + this.fightMc.citytypemc.gotoAndStop(_loc2_); + } + } + + public function getinfo(param1:int) : void + { + ConnectService.getInstance().provinceService.getResultOfProvince(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GlobalMainUI.as b/flash_decompiled/com/view/ui/guild/GlobalMainUI.as new file mode 100644 index 0000000..3b21eec --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GlobalMainUI.as @@ -0,0 +1,307 @@ +package com.view.ui.guild +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.LeagueDefEvent; + import com.view.newui.UIButton; + 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.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GlobalMainUI extends BaseUI + { + + private var url:String = "unioncombat.jpg"; + + private var resStrArr:Array; + + private var resColorArr:Array; + + private var bg2:UIWindowBg; + + private var label1:TextField; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var times:TextField; + + private var enterBtn:UIButton; + + private var getGiftBtn:UIButton; + + private var bgloader:LoadResource; + + private var bgImg:Bitmap; + + private var m_data:Object; + + private var enterDefF:Function; + + public function GlobalMainUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_tiaozhanxiongnu); + this.createUI(); + } + + override public function createUI() : void + { + var _loc4_:UITitleBg = null; + var _loc6_:TextField = null; + this.resStrArr = ["未开启","成功","失败","进行中"]; + this.resColorArr = [16777215,65280,16711680,65280]; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(374,392); + _loc1_.addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = 4; + this.loadImg(); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(235,392); + _loc1_.addChild(_loc2_); + _loc2_.x = 3 + this.bg2.width + this.bg2.x; + _loc2_.y = this.bg2.y; + var _loc3_:UITitleBg = new UITitleBg("活动介绍",_loc2_.width); + _loc2_.addChild(_loc3_); + _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2); + _loc4_ = new UITitleBg("挑战记录",_loc2_.width); + _loc2_.addChild(_loc4_); + _loc4_.x = int(_loc2_.width / 2 - _loc4_.width / 2); + _loc4_.y = 240; + var _loc5_:TextFormat = new TextFormat(); + _loc5_.leading = 6; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,235); + _loc6_.height = 220; + _loc2_.addChild(_loc6_); + _loc6_.defaultTextFormat = _loc5_; + _loc6_.textColor = 16777215; + _loc6_.x = 10; + _loc6_.wordWrap = true; + _loc6_.multiline = true; + _loc6_.y = 30; + var _loc7_:String = "模式:战略战
"; + _loc7_ = _loc7_ + "次数: (每日凌晨刷新)
"; + _loc7_ = _loc7_ + "奖励:联盟荣耀、声望、卡片、技能残页
"; + _loc7_ = _loc7_ + "介绍:
"; + _loc7_ = _loc7_ + "1、只能由盟主开启,每日仅可进行一次
"; + _loc7_ = _loc7_ + "2、除盟主设定的防守官外,其余盟员均可派兵支援
"; + _loc7_ = _loc7_ + "3、开启后匈奴大军将会陆续进攻防守乘此
"; + _loc7_ = _loc7_ + "4、成功抵挡每波匈奴的进攻时,当前军队可获得武将经验
"; + _loc6_.htmlText = _loc7_; + this.times = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + _loc2_.addChild(this.times); + this.times.x = 50; + this.times.y = 48; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.value1 = PublicMethod.getTextField(65280,100); + this.value2 = PublicMethod.getTextField(16777215,100); + this.value3 = PublicMethod.getTextField(16777215,100); + this.value4 = PublicMethod.getTextField(16711680,100); + _loc2_.addChild(this.label1); + _loc2_.addChild(_loc8_); + _loc2_.addChild(_loc9_); + this.label1.x = 10; + this.label1.y = _loc4_.y + 40; + _loc8_.x = this.label1.x; + _loc8_.y = this.label1.y + 30; + _loc9_.x = this.label1.x; + _loc9_.y = _loc8_.y + 30; + this.label1.text = "挑战结果:"; + _loc8_.text = "上次战绩:"; + _loc9_.text = "最高战绩:"; + _loc2_.addChild(this.value1); + _loc2_.addChild(this.value2); + _loc2_.addChild(this.value3); + _loc2_.addChild(this.value4); + this.value1.x = this.label1.x + 65; + this.value1.y = this.label1.y; + this.value2.x = this.value1.x; + this.value2.y = _loc8_.y; + this.value3.x = this.value1.x; + this.value3.y = _loc9_.y; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.x = this.value2.x + 80; + this.value4.y = this.value2.y; + this.getGiftBtn = new UIButton("领取奖励",2); + this.enterBtn = new UIButton("进入活动",2); + _loc2_.addChild(this.getGiftBtn); + this.getGiftBtn.x = 166; + this.getGiftBtn.y = 275; + _loc2_.addChild(this.enterBtn); + this.enterBtn.x = 85; + this.enterBtn.y = 368; + this.getGiftBtn.onClick = this.gainAward; + this.enterBtn.onClick = this.enterDef; + } + + private function loadImg() : void + { + if(Boolean(this.bgImg) && this.bg2.contains(this.bgImg)) + { + return; + } + this.bgloader = new LoadResource("pic/img/" + this.url,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.bgImg = Bitmap(param1.target.loader.content); + this.bgImg.width = 380; + this.bgImg.height = 398; + this.bgloader.clear(); + this.bg2.addChild(this.bgImg); + this.bgImg.x = 2; + this.bgImg.y = 2; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(LeagueDefEvent.LeagueDef_showDefView,this.showDefViewResult); + ConnectService.getInstance().addEventListener(LeagueDefEvent.LeagueDef_gainAward,this.gainAwardResult); + this.showDefView(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(LeagueDefEvent.LeagueDef_showDefView,this.showDefViewResult); + ConnectService.getInstance().removeEventListener(LeagueDefEvent.LeagueDef_gainAward,this.gainAwardResult); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function showDefView() : void + { + ConnectService.getInstance().guildService.showDefView(); + } + + private function showDefViewResult(param1:LeagueDefEvent) : void + { + this.m_data = param1.obj; + ToolTipManager.getInstance().disposeToolTip(this.getGiftBtn); + if(this.m_data.gainGift == "1") + { + this.getGiftBtn.setEnable(); + this.getGiftBtn.setText("领取奖励"); + ToolTipManager.getInstance().setToolTip(this.getGiftBtn,new TxtTooltip("奖励:" + this.m_data.userAward)); + } + else if(this.m_data.gainGift == "2") + { + this.getGiftBtn.setUnEnable(); + this.getGiftBtn.setText("奖励已领"); + } + else + { + this.getGiftBtn.setUnEnable(); + this.getGiftBtn.setText("没有奖励"); + } + var _loc2_:int = int(this.m_data.allNum); + var _loc3_:int = int(this.m_data.currNum); + this.times.text = _loc3_.toString() + "/" + _loc2_.toString(); + var _loc4_:int = int(this.m_data.result); + var _loc5_:String = this.m_data.npcName; + if(Boolean(_loc4_) && _loc4_ != 0) + { + this.value1.text = this.resStrArr[_loc4_]; + this.value1.textColor = this.resColorArr[_loc4_]; + this.value2.text = _loc5_; + } + else + { + this.value2.text = "无"; + this.value1.text = "无"; + } + var _loc6_:String = this.m_data.maxNpcName; + if(_loc6_) + { + this.value3.text = _loc6_; + } + else + { + this.value3.text = "无"; + } + if(this.m_data.type == 2) + { + this.value1.text = ""; + this.label1.visible = false; + this.getGiftBtn.visible = false; + this.value4.text = "正在挑战"; + this.enterBtn.setText("立即加入"); + this.value2.text = _loc5_; + } + else + { + this.label1.visible = true; + this.value4.text = ""; + this.getGiftBtn.visible = true; + this.enterBtn.setText("进入活动"); + } + } + + private function gainAward(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.gainAward(); + } + + private function gainAwardResult(param1:LeagueDefEvent) : void + { + MessageBoxUI.getInstance().addMessage("领取成功"); + this.getGiftBtn.setUnEnable(); + this.getGiftBtn.setText("奖励已领"); + ToolTipManager.getInstance().disposeToolTip(this.getGiftBtn); + } + + private function enterDef(param1:MouseEvent) : void + { + if(this.enterDefF != null) + { + this.enterDefF(); + this.closeUI(null); + } + } + + public function setDefFunc(param1:Function) : void + { + this.enterDefF = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildAnnounce.as b/flash_decompiled/com/view/ui/guild/GuildAnnounce.as new file mode 100644 index 0000000..f96fe32 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildAnnounce.as @@ -0,0 +1,51 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + import flash.text.TextField; + + public class GuildAnnounce extends UIWindowBg + { + + private var bg:Sprite; + + private var showContent:TextField; + + public function GuildAnnounce() + { + super(); + initSize(105,140); + loadTitle(UITitleConfig.title_lianmenggonggao); + addCloseBtn(); + initBg(); + this.showContent = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,280); + this.showContent.height = 130; + this.showContent.wordWrap = true; + this.showContent.multiline = true; + this.showContent.border = true; + this.showContent.borderColor = 16777215; + this.showContent.textColor = 16777215; + bg1.addChild(this.showContent); + this.showContent.x = 15; + this.showContent.y = 20; + ConnectService.getInstance().addEventListener(GuildEvent.Guild_GetGuildInfo,this.getAnnounceInfoSucc); + } + + public function getAnnounceInfo() : void + { + ConnectService.getInstance().guildService.viewGuildInfo(); + } + + private function getAnnounceInfoSucc(param1:GuildEvent) : void + { + var _loc2_:Object = param1.guildObj; + this.showContent.text = _loc2_.guild.guildNotice; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildApplyListUI.as b/flash_decompiled/com/view/ui/guild/GuildApplyListUI.as new file mode 100644 index 0000000..4337b68 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildApplyListUI.as @@ -0,0 +1,204 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.ApplyListMc; + import com.view.ui.message.MessageBoxUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GuildApplyListUI extends BaseUI + { + + private var tableMc:UITable; + + private var label3:TextField; + + private var applyListVec:Vector.; + + private var memListMc:Sprite; + + private var scrollPane:ScrollPane; + + public function GuildApplyListUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_pizhuanshenqing); + this.createUI(); + } + + override public function createUI() : void + { + var _loc5_:ApplyListMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["玩家","排名","等级","繁荣度","申请时间","操作"]; + var _loc3_:Array = [125,92,85,111,92,130]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(14,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(630,350); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.y = 25; + this.memListMc = new Sprite(); + this.scrollPane.source = this.memListMc; + this.applyListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 14) + { + _loc5_ = new ApplyListMc(); + this.memListMc.addChild(_loc5_); + this.applyListVec.push(_loc5_); + _loc5_.y = _loc4_ * 25; + _loc5_.x = 4; + _loc5_.permitBtn.onClick = this.permitInvite; + _loc5_.refuseBtn.onClick = this.refuseInvite; + _loc4_++; + } + this.scrollPane.update(); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.label3); + this.label3.text = "申请人数:0"; + this.label3.x = 11; + this.label3.y = 387; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.getApplyList(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_GetInviteList,this.getInviteListResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Apply_Permit,this.permitApplyResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Apply_Refuse,this.refuseApplyResult); + } + + private function getApplyList() : void + { + ConnectService.getInstance().guildService.getApplyUsersOfGuild(); + } + + override public function removeFromStage(param1:Event) : void + { + this.clear(); + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_GetInviteList,this.getInviteListResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Apply_Permit,this.permitApplyResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Apply_Refuse,this.refuseApplyResult); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function clear() : void + { + var _loc1_:int = int(this.applyListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ > 13) + { + this.memListMc.removeChild(this.applyListVec[_loc2_]); + this.applyListVec.splice(_loc2_,1); + } + else + { + this.applyListVec[_loc2_].setData(null); + } + _loc2_--; + } + this.scrollPane.update(); + this.label3.text = "申请人数:0"; + } + + private function getInviteListResult(param1:GuildEvent) : void + { + var _loc6_:ApplyListMc = null; + var _loc2_:Array = param1.memList; + var _loc3_:int = param1.totalNum; + this.clear(); + if(_loc2_ == null || _loc2_.length == 0) + { + this.label3.text = "申请人数:0"; + return; + } + var _loc4_:int = int(_loc2_.length); + this.label3.text = "申请人数:" + _loc4_; + var _loc5_:int = 0; + while(_loc5_ < _loc4_) + { + if(_loc5_ > 13) + { + _loc6_ = new ApplyListMc(); + this.memListMc.addChild(_loc6_); + this.applyListVec.push(_loc6_); + _loc6_.y = _loc5_ * 25; + _loc6_.x = 4; + _loc6_.permitBtn.onClick = this.permitInvite; + _loc6_.refuseBtn.onClick = this.refuseInvite; + } + this.applyListVec[_loc5_].setData(_loc2_[_loc5_]); + _loc5_++; + } + this.scrollPane.update(); + } + + private function permitInvite(param1:MouseEvent) : void + { + var _loc2_:ApplyListMc = param1.currentTarget.parent as ApplyListMc; + if(_loc2_.userObj != null) + { + ConnectService.getInstance().guildService.permitApply(_loc2_.userObj.userId); + } + } + + private function permitApplyResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("同意申请成功"); + this.getApplyList(); + } + + private function refuseInvite(param1:MouseEvent) : void + { + var _loc2_:ApplyListMc = param1.currentTarget.parent as ApplyListMc; + if(_loc2_.userObj != null) + { + ConnectService.getInstance().guildService.refuseApply(_loc2_.userObj.userId); + } + } + + private function refuseApplyResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("拒绝申请成功"); + this.getApplyList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildBasePage.as b/flash_decompiled/com/view/ui/guild/GuildBasePage.as new file mode 100644 index 0000000..a38bdd7 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildBasePage.as @@ -0,0 +1,41 @@ +package com.view.ui.guild +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.view.res.GameUIRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class GuildBasePage extends Sprite + { + + public var tab1:Sprite; + + public var tab2:Sprite; + + public var face:InstallFace = InstallFace.getInstance(); + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + public var guildMc:MovieClip; + + public function GuildBasePage() + { + super(); + this.tab1 = this.face.getSprite(ClassConfig.lib_ui_bg_6); + this.tab2 = this.face.getSprite(ClassConfig.lib_ui_bg_5); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + } + + public function addEvent(param1:Event) : void + { + } + + public function delEvent(param1:Event) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildBaseUI.as b/flash_decompiled/com/view/ui/guild/GuildBaseUI.as new file mode 100644 index 0000000..70c6490 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildBaseUI.as @@ -0,0 +1,49 @@ +package com.view.ui.guild +{ + import com.comfig.PathConfig; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import flash.display.MovieClip; + import flash.events.Event; + import flash.net.URLRequest; + + public class GuildBaseUI extends BaseUI + { + + private var guildUrl:String = "NewRanking.swf"; + + public var gameRes:GameUIRes; + + public var guildMc:MovieClip; + + public function GuildBaseUI() + { + var _loc1_:URLRequest = null; + this.gameRes = GameUIRes.getInstance(); + super(); + if(this.gameRes.getGuildInfo() == null) + { + _loc1_ = new URLRequest(PathConfig.getInstance().getVerStr(this.guildUrl)); + super.loadUIResource(_loc1_); + } + else + { + this.createUI(); + } + } + + override public function loadUiComplete(param1:Event) : void + { + super.loadUiComplete(param1); + this.gameRes.setGuildInfo(_loaderInfo); + this.createUI(); + } + + override public function createUI() : void + { + super.addUIBg(); + super.setPosition(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildBoxView.as b/flash_decompiled/com/view/ui/guild/GuildBoxView.as new file mode 100644 index 0000000..9c82fb6 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildBoxView.as @@ -0,0 +1,275 @@ +package com.view.ui.guild +{ + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIBigItem; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class GuildBoxView extends BaseUI + { + + private var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var oneKey:UIButton; + + private var tip_txt:TextField; + + private var txt_txt:TextField; + + private var bg2:UIWindowBg; + + private var url:String = "box.jpg"; + + private var bgloader:LoadResource; + + protected var posiVec:Vector.; + + private var playBtn:UIButton; + + private var timer:Timer; + + private var radomNums:int; + + private var runTimes:int; + + public function GuildBoxView() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_shejizongmiao); + this.createUI(); + } + + override public function createUI() : void + { + var _loc4_:UIBigItem = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(622,340); + _loc1_.addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = 4; + this.loadImg(); + this.txt_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,160); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + this.bg2.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = this.bg2.height + this.bg2.y + 10; + _loc2_.text = "联盟贡献度:"; + this.bg2.addChild(this.txt_txt); + this.txt_txt.x = _loc2_.x + 75; + this.txt_txt.y = _loc2_.y; + this.tip_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,550); + this.bg2.addChild(this.tip_txt); + this.tip_txt.x = 10; + this.tip_txt.y = this.txt_txt.y + 20; + this.playBtn = new UIButton("祈 福",2); + _loc1_.addChild(this.playBtn); + this.playBtn.x = 260; + this.playBtn.y = 360; + this.playBtn.onClick = this.playBox; + this.oneKey = new UIButton("一键祈福",2); + _loc1_.addChild(this.oneKey); + this.oneKey.x = this.playBtn.x + 100; + this.oneKey.y = this.playBtn.y; + this.oneKey.onClick = this.oneKeyPlay; + this.posiVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 10) + { + _loc4_ = new UIBigItem(); + _loc1_.addChild(_loc4_); + if(_loc3_ >= 5) + { + _loc4_.x = 580 - 90 - 100 * (_loc3_ % 5); + } + else + { + _loc4_.x = 90 + 100 * (_loc3_ % 5); + } + _loc4_.y = 90 + 120 * int(_loc3_ / 5); + this.posiVec.push(_loc4_); + _loc3_++; + } + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Build_BoxPlay_oneKey,this.openOneBoxResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Build_BoxPlay,this.openBoxResult); + } + + private function loadItemImg() : void + { + this.bgloader = new LoadResource("pic/bg/" + this.url,this.loadPngBack); + } + + private function loadPngBack(param1:Event) : void + { + var _loc4_:Bitmap = null; + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.bgloader.clear(); + var _loc3_:int = 0; + while(_loc3_ < 10) + { + _loc4_ = new Bitmap(_loc2_.bitmapData); + this.posiVec[_loc3_].addChild(_loc4_); + _loc4_.x = 3; + _loc4_.y = 3; + _loc4_.height = 53; + _loc4_.height = 53; + _loc3_++; + } + } + + private function loadImg() : void + { + this.bgloader = new LoadResource("pic/bg/" + UIConfig.bgUrl_qifu,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + _loc2_.width = 628; + _loc2_.height = 346; + this.bgloader.clear(); + this.bg2.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 2; + this.loadItemImg(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.getBoxView(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Build_BoxView,this.getBoxViewResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Build_BoxView,this.getBoxViewResult); + } + + private function getBoxView() : void + { + ConnectService.getInstance().guildService.getGuildBox(); + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function setPosition() : void + { + } + + private function getBoxViewResult(param1:GuildEvent) : void + { + var _loc2_:int = int(param1.buildObj.prayTimes); + var _loc3_:int = int(param1.buildObj.prayLv); + var _loc4_:int = int(param1.buildObj.needGuildPoint); + this.tip_txt.htmlText = "今天您总共还有 " + _loc2_ + " 次祈福机会,当前为 " + _loc3_ + " 级祈福,每次祈福消耗 " + _loc4_ + " 点联盟贡献值"; + this.txt_txt.text = param1.buildObj.pointOfGuild; + if(_loc2_ > 0) + { + this.playBtn.setEnable(); + this.oneKey.setEnable(); + } + else + { + this.playBtn.setUnEnable(); + this.oneKey.setUnEnable(); + } + } + + private function playBox(param1:MouseEvent) : void + { + this.playBtn.setUnEnable(); + this.startPlay(); + } + + public function oneKeyPlay(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.onekeyOpenBox(); + } + + private function startPlay() : void + { + if(this.timer == null) + { + this.timer = new Timer(100); + this.timer.addEventListener(TimerEvent.TIMER,this.enterFrame); + } + this.runTimes = 0; + if(!this.timer.running) + { + this.timer.start(); + this.playBtn.setUnEnable(); + } + } + + private function enterFrame(param1:TimerEvent) : void + { + this.posiVec[this.radomNums].filters = [PublicGlow.getInstance().yellowGlow1]; + if(this.radomNums == 0) + { + this.posiVec[9].filters = null; + } + else + { + this.posiVec[this.radomNums - 1].filters = null; + } + ++this.radomNums; + if(this.radomNums >= this.posiVec.length) + { + this.radomNums = 0; + } + ++this.runTimes; + if(this.runTimes > 11) + { + this.timer.stop(); + this.openBox(); + } + } + + private function openBox() : void + { + ConnectService.getInstance().guildService.openBox(); + } + + private function openBoxResult(param1:GuildEvent) : void + { + this.playBtn.setEnable(); + MessageBoxUI.getInstance().addMessage(param1.buildObj.award.awardName); + this.getBoxView(); + } + + private function openOneBoxResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("一键祈福成功"); + this.getBoxView(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildBuyItemUI.as b/flash_decompiled/com/view/ui/guild/GuildBuyItemUI.as new file mode 100644 index 0000000..bc1d600 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildBuyItemUI.as @@ -0,0 +1,138 @@ +package com.view.ui.guild +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildTransEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import flash.display.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GuildBuyItemUI extends UIWindowBg + { + + private var imgSp:UIWindowBg; + + private var info_txt:TextField; + + private var num_txt:UIInputText; + + private var share_txt:UIInputText; + + private var obj:Object; + + private var itemLoader:LoadResource; + + private var itemImg:Bitmap; + + public function GuildBuyItemUI() + { + var _loc3_:TextField = null; + var _loc4_:UIButton = null; + super(); + initSize(120,180); + loadTitle(UITitleConfig.title_lianmengxinxi); + addCloseBtn(); + initBg(); + this.imgSp = new UIWindowBg(); + this.imgSp.initSecondPanel(47,47); + bg1.addChild(this.imgSp); + this.imgSp.x = 30; + this.imgSp.y = 20; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(180,47); + bg1.addChild(_loc1_); + _loc1_.x = this.imgSp.x + this.imgSp.width + 10; + _loc1_.y = this.imgSp.y; + this.info_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,176); + this.info_txt.wordWrap = true; + this.info_txt.multiline = true; + this.info_txt.height = 50; + _loc1_.addChild(this.info_txt); + this.info_txt.x = 3; + this.info_txt.y = 3; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc2_.text = "购 买 数 量:"; + bg1.addChild(_loc2_); + _loc2_.x = 80; + _loc2_.y = 100; + this.num_txt = new UIInputText(100); + bg1.addChild(this.num_txt); + this.num_txt.x = 160; + this.num_txt.y = 100; + this.num_txt.readOnly(); + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc3_.text = "消耗贡献度:"; + bg1.addChild(_loc3_); + _loc3_.x = 80; + _loc3_.y = 130; + this.share_txt = new UIInputText(100); + bg1.addChild(this.share_txt); + this.share_txt.x = 160; + this.share_txt.y = 130; + this.share_txt.readOnly(); + _loc4_ = new UIButton("确 定",2); + var _loc5_:UIButton = new UIButton("取 消",2); + addChild(_loc4_); + _loc4_.x = 100; + _loc4_.y = 200; + addChild(_loc5_); + _loc5_.x = _loc4_.x + 80; + _loc5_.y = _loc4_.y; + _loc4_.onClick = this.buyItem; + _loc5_.onClick = this.closeF; + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_buyItem,this.buySucc); + } + + private function buyItem(param1:MouseEvent) : void + { + ConnectService.getInstance().guildTransService.buyItem(this.obj.guildTransId); + } + + public function setData(param1:Object) : void + { + this.obj = param1; + this.info_txt.text = this.obj.itemDesc; + this.num_txt.setText(this.obj.itemNum); + this.share_txt.setText(this.obj.price); + this.loadImg(); + } + + private function loadImg() : void + { + var _loc1_:String = ServerConfig.IMAGE_EQUIP_URL + this.obj.iconPath; + this.itemLoader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.itemImg) && this.imgSp.contains(this.itemImg)) + { + this.imgSp.removeChild(this.itemImg); + } + this.itemImg = Bitmap(param1.target.loader.content); + this.itemLoader.clear(); + this.imgSp.addChild(this.itemImg); + this.itemImg.x = 2; + this.itemImg.y = 2; + } + + private function closeF(param1:MouseEvent) : void + { + closeSelf(null); + } + + private function buySucc(param1:GuildTransEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildEventListUI.as b/flash_decompiled/com/view/ui/guild/GuildEventListUI.as new file mode 100644 index 0000000..798ff09 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildEventListUI.as @@ -0,0 +1,155 @@ +package com.view.ui.guild +{ + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.GuildEventMc; + import flash.events.Event; + import flash.events.MouseEvent; + + public class GuildEventListUI extends BaseUI + { + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var eventListVec:Vector.; + + private var eventList:Array = new Array(); + + private var currPage:int = 1; + + public function GuildEventListUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_lianmengshijian); + this.createUI(); + } + + override public function createUI() : void + { + var _loc5_:GuildEventMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["序号","联盟事件","发生时间"]; + var _loc3_:Array = [55,460,120]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(14,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.eventListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 14) + { + _loc5_ = new GuildEventMc(); + this.tableMc.addChild(_loc5_); + this.eventListVec.push(_loc5_); + _loc5_.y = 26 + _loc4_ * 25; + _loc5_.x = 4; + _loc4_++; + } + this.pageMc = new UIPageMc(); + _loc1_.addChild(this.pageMc); + this.pageMc.x = 530; + this.pageMc.y = 385; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.getEventList(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Event_List,this.getEventListResult); + } + + private function getEventList() : void + { + ConnectService.getInstance().guildService.getGuildEventList(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Event_List,this.getEventListResult); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function clear() : void + { + } + + private function getEventListResult(param1:GuildEvent) : void + { + this.eventList = param1.eventList; + if(this.eventList == null || this.eventList.length == 0) + { + this.eventList = new Array(); + this.pageMc.setPageCount(1); + } + else + { + this.pageMc.setPageCount(1 + this.eventList.length / 14); + } + this.getEventListByPage(); + } + + private function getEventListByPage() : void + { + this.clear(); + this.pageMc.setPage(this.currPage); + var _loc1_:int = (this.currPage - 1) * 14; + var _loc2_:int = this.currPage * 14; + var _loc3_:Array = this.eventList.slice(_loc1_,_loc2_); + this.pageMc.setPage(this.currPage); + var _loc4_:int = 0; + while(_loc4_ < 14) + { + if(_loc3_[_loc4_]) + { + this.eventListVec[_loc4_].setData(_loc3_[_loc4_],(this.currPage - 1) * 14 + _loc4_ + 1); + } + else + { + this.eventListVec[_loc4_].setData(null); + } + _loc4_++; + } + } + + public function nextPage() : void + { + this.currPage += 1; + this.getEventListByPage(); + } + + public function prePage() : void + { + --this.currPage; + this.getEventListByPage(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildInviteListUI.as b/flash_decompiled/com/view/ui/guild/GuildInviteListUI.as new file mode 100644 index 0000000..cfe196e --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildInviteListUI.as @@ -0,0 +1,223 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.InviteListMc; + import com.view.ui.message.MessageBoxUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GuildInviteListUI extends BaseUI + { + + private var tableMc:UITable; + + private var label3:TextField; + + private var inputText:UIInputText; + + private var applyListVec:Vector.; + + private var memListMc:Sprite; + + private var scrollPane:ScrollPane; + + public function GuildInviteListUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_yaoqingjiaru); + this.createUI(); + } + + override public function createUI() : void + { + var _loc5_:TextField = null; + var _loc7_:InviteListMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["玩家","排名","等级","繁荣度","邀请人","操作"]; + var _loc3_:Array = [125,92,85,111,112,110]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(14,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(630,350); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.y = 25; + this.memListMc = new Sprite(); + this.scrollPane.source = this.memListMc; + this.applyListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 14) + { + _loc7_ = new InviteListMc(); + this.memListMc.addChild(_loc7_); + this.applyListVec.push(_loc7_); + _loc7_.y = _loc4_ * 25; + _loc7_.x = 4; + _loc7_.cancelBtn.onClick = this.cancelInvite; + _loc4_++; + } + this.scrollPane.update(); + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.addChild(_loc5_); + _loc5_.text = "输入玩家:"; + _loc5_.x = 4; + _loc5_.y = 387; + this.inputText = new UIInputText(100); + _loc1_.addChild(this.inputText); + this.inputText.x = _loc5_.x + _loc5_.width; + this.inputText.y = _loc5_.y - 4; + this.inputText.setMaxChars(20); + var _loc6_:UIButton = new UIButton("邀请加入",2,10); + _loc1_.addChild(_loc6_); + _loc6_.x = this.inputText.x + this.inputText.width + 5; + _loc6_.y = this.inputText.y; + _loc6_.onClick = this.sendInviteToUser; + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.label3); + this.label3.text = "已邀请人数:0"; + this.label3.x = 261; + this.label3.y = _loc5_.y; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.getInviteList(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_GetInviteList,this.getInviteListResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Invitation_Delete,this.deleteInviteListResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_SendInvitation,this.sendInviteListResult); + } + + private function getInviteList() : void + { + ConnectService.getInstance().guildService.getInvitedUsersOfGuild(); + } + + override public function removeFromStage(param1:Event) : void + { + this.clear(); + this.inputText.setText(""); + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_GetInviteList,this.getInviteListResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Invitation_Delete,this.deleteInviteListResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_SendInvitation,this.sendInviteListResult); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function clear() : void + { + var _loc1_:int = int(this.applyListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ > 13) + { + this.memListMc.removeChild(this.applyListVec[_loc2_]); + this.applyListVec.splice(_loc2_,1); + } + else + { + this.applyListVec[_loc2_].setData(null); + } + _loc2_--; + } + this.scrollPane.update(); + } + + private function getInviteListResult(param1:GuildEvent) : void + { + var _loc6_:InviteListMc = null; + var _loc2_:Array = param1.memList; + var _loc3_:int = param1.totalNum; + this.clear(); + if(_loc2_ == null || _loc2_.length == 0) + { + this.label3.text = "邀请人数:0"; + return; + } + var _loc4_:int = int(_loc2_.length); + var _loc5_:int = 0; + while(_loc5_ < _loc4_) + { + if(_loc5_ > 13) + { + _loc6_ = new InviteListMc(); + this.memListMc.addChild(_loc6_); + this.applyListVec.push(_loc6_); + _loc6_.y = _loc5_ * 25; + _loc6_.x = 4; + _loc6_.cancelBtn.onClick = this.cancelInvite; + } + this.applyListVec[_loc5_].setData(_loc2_[_loc5_]); + _loc5_++; + } + this.label3.text = "邀请人数:" + _loc4_; + this.scrollPane.update(); + } + + private function cancelInvite(param1:MouseEvent) : void + { + var _loc2_:InviteListMc = param1.currentTarget.parent as InviteListMc; + if(_loc2_.userObj != null) + { + ConnectService.getInstance().guildService.deleteInvitationById(_loc2_.userObj.id); + } + } + + private function deleteInviteListResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("取消邀请的玩家成功"); + this.getInviteList(); + } + + private function sendInviteToUser(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.inputText.getText()); + if(_loc2_ != "" && _loc2_.length > 0) + { + ConnectService.getInstance().guildService.sendInvitation(_loc2_); + } + } + + private function sendInviteListResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("邀请成功。"); + this.getInviteList(); + this.inputText.setText(""); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildLevelUpUI.as b/flash_decompiled/com/view/ui/guild/GuildLevelUpUI.as new file mode 100644 index 0000000..4d36690 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildLevelUpUI.as @@ -0,0 +1,221 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + 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 flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GuildLevelUpUI extends UIWindowBg + { + + private var bg:Sprite; + + private var guildLevel:TextField; + + private var maxMemberNum:TextField; + + private var constructionText:TextField; + + private var itemText:TextField; + + private var upgradeCon:TextField; + + private var upgradeTime:TextField; + + private var label9:TextField; + + private var upBtn:UIButton; + + private var cancelBtn:UIButton; + + private var input:UINumInputText; + + private var upgradeObj:Object; + + private var items:int; + + private var construction:int; + + private var upconstruction:int; + + public function GuildLevelUpUI() + { + var _loc3_:TextField = null; + var _loc4_:TextField = null; + super(); + initSize(130,220); + loadTitle(UITitleConfig.title_lianmengshengji); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.text = "联盟等级:"; + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 15; + this.guildLevel = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + bg1.addChild(this.guildLevel); + this.guildLevel.x = _loc1_.x + 60; + this.guildLevel.y = _loc1_.y; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "成员上限:"; + bg1.addChild(_loc2_); + _loc2_.x = 160; + _loc2_.y = _loc1_.y; + this.maxMemberNum = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + bg1.addChild(this.maxMemberNum); + this.maxMemberNum.x = _loc2_.x + 60; + this.maxMemberNum.y = _loc1_.y; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc3_.text = "建设值:"; + bg1.addChild(_loc3_); + _loc3_.x = 10; + _loc3_.y = _loc1_.y + 30; + this.constructionText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + bg1.addChild(this.constructionText); + this.constructionText.x = _loc3_.x + 60; + this.constructionText.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc4_.text = "虎符数:"; + bg1.addChild(_loc4_); + _loc4_.x = 160; + _loc4_.y = _loc3_.y; + this.itemText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + bg1.addChild(this.itemText); + this.itemText.x = _loc4_.x + 60; + this.itemText.y = _loc3_.y; + var _loc5_:Sprite = PublicMethod.getTrLine(275); + bg1.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = _loc4_.y + 25; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc6_.text = "升级需求:"; + bg1.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = _loc5_.y + 10; + this.upgradeCon = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,160); + bg1.addChild(this.upgradeCon); + this.upgradeCon.x = _loc6_.x + 60; + this.upgradeCon.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc7_.text = "升级时间:"; + bg1.addChild(_loc7_); + _loc7_.x = 10; + _loc7_.y = _loc6_.y + 30; + this.upgradeTime = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + bg1.addChild(this.upgradeTime); + this.upgradeTime.x = _loc7_.x + 60; + this.upgradeTime.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc8_.text = "使用:"; + bg1.addChild(_loc8_); + _loc8_.x = 10; + _loc8_.y = _loc7_.y + 30; + this.input = new UINumInputText(50); + bg1.addChild(this.input); + this.input.x = 43; + this.input.y = _loc8_.y - 3; + this.input.hiddenBtn(); + this.input.setMaxChars(10); + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,225); + _loc9_.text = "个虎符进行升级(1个虎符代替10点建设值)"; + bg1.addChild(_loc9_); + _loc9_.x = this.input.x + this.input.width; + _loc9_.y = _loc8_.y; + this.label9 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,304); + this.label9.multiline = true; + this.label9.wordWrap = true; + this.label9.height = 36; + bg1.addChild(this.label9); + this.label9.x = 10; + this.label9.y = _loc8_.y + 30; + var _loc10_:TextFormat = new TextFormat(); + _loc10_.leading = 3; + this.label9.defaultTextFormat = _loc10_; + this.upBtn = new UIButton("升 级",2,10); + this.cancelBtn = new UIButton("取 消",2,10); + bg1.addChild(this.upBtn); + this.upBtn.x = 86; + this.upBtn.y = 210; + bg1.addChild(this.cancelBtn); + this.cancelBtn.x = this.upBtn.x + 80; + this.cancelBtn.y = this.upBtn.y; + this.input.setInputEvent(this.changeNums); + this.cancelBtn.onClick = closeSelf; + this.upBtn.onClick = this.upGrade; + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Upgrade_View,this.getUpgradeViewResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Upgrade_Result,this.upgradeResult); + } + + public function load() : void + { + this.getUpgradeView(); + } + + private function getUpgradeView() : void + { + ConnectService.getInstance().guildService.getUpgradeView(); + } + + private function getUpgradeViewResult(param1:GuildEvent) : void + { + this.upgradeObj = param1.guildObj; + this.guildLevel.text = this.upgradeObj.guildLv; + this.maxMemberNum.text = this.upgradeObj.maxMemberNum; + this.constructionText.text = this.upgradeObj.construction; + this.itemText.text = this.upgradeObj.item; + this.upgradeCon.htmlText = "建设值:" + this.upgradeObj.upgradeCon + ""; + this.upgradeTime.htmlText = "" + PublicMethod.getTimeStr1(60 * this.upgradeObj.upgradeTime) + ""; + var _loc2_:String = "升级结果:联盟升级至 " + (this.upgradeObj.guildLv + 1) + " 级,成员上限将提升为" + this.upgradeObj.upperMaxMemberNum + "
"; + _loc2_ = _loc2_ + "每日联盟奖励 " + this.upgradeObj.upperAwardExp + " 武将经验, " + this.upgradeObj.upperAwardSkill + " 技能点。"; + this.label9.htmlText = _loc2_; + this.input.visible = true; + this.items = this.upgradeObj.item; + this.construction = this.upgradeObj.construction; + this.upconstruction = this.upgradeObj.upgradeCon; + this.input.setMaxNum(this.items); + this.input.setTextNum(0); + this.cancelBtn.visible = true; + this.upBtn.visible = true; + if(this.construction < this.upconstruction) + { + this.upBtn.setUnEnable(); + } + else + { + this.upBtn.setEnable(); + } + } + + private function changeNums() : void + { + if(this.input.getTextNum() * 10 + this.construction < this.upconstruction) + { + this.upBtn.setUnEnable(); + } + else + { + this.upBtn.setEnable(); + } + } + + private function upGrade(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getTextNum(); + ConnectService.getInstance().guildService.upgradeGuild(this.construction,_loc2_); + } + + private function upgradeResult(param1:GuildEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildListUI.as b/flash_decompiled/com/view/ui/guild/GuildListUI.as new file mode 100644 index 0000000..427352c --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildListUI.as @@ -0,0 +1,315 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.GuildListMc; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GuildListUI extends BaseUI + { + + private static var instance:GuildListUI; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var inputText:UIInputText; + + private var guildListVec:Vector.; + + private var currPage:int; + + private var showInvite:Boolean; + + private var showWar:Boolean; + + public function GuildListUI() + { + super(); + if(instance != null) + { + throw Error("单例"); + } + super.addUIBg(); + super.loadTitle(UITitleConfig.title_lianmengliebiao); + this.createUI(); + } + + public static function getInstance() : GuildListUI + { + if(instance == null) + { + instance = new GuildListUI(); + } + return instance; + } + + override public function createUI() : void + { + var _loc1_:UIWindowBg = null; + var _loc5_:int = 0; + var _loc6_:TextField = null; + var _loc9_:GuildListMc = null; + _loc1_ = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc1_.addChild(_loc2_); + _loc2_.x = 11; + _loc2_.y = 10; + _loc2_.text = "当前所有联盟列表"; + var _loc3_:Array = ["排名","联盟名称","等级","盟主","人数","联盟荣誉","操作"]; + var _loc4_:Array = [50,140,60,110,50,90,135]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.lineHeight = 26; + this.tableMc.install(12,_loc3_,_loc4_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 35; + this.guildListVec = new Vector.(); + _loc5_ = 0; + while(_loc5_ < 12) + { + _loc9_ = new GuildListMc(); + this.tableMc.addChild(_loc9_); + this.guildListVec.push(_loc9_); + _loc9_.x = 4; + _loc9_.y = 26 + _loc5_ * 26; + _loc9_.viewBtn.onClick = this.viewGuild; + _loc5_++; + } + this.pageMc = new UIPageMc(); + _loc1_.addChild(this.pageMc); + this.pageMc.x = 530; + this.pageMc.y = 380; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.addChild(_loc6_); + _loc6_.text = "联盟名称"; + _loc6_.x = 10; + _loc6_.y = 380; + this.inputText = new UIInputText(80); + _loc1_.addChild(this.inputText); + this.inputText.x = _loc6_.x + _loc6_.width; + this.inputText.y = _loc6_.y - 3; + this.inputText.setMaxChars(20); + var _loc7_:UIButton = new UIButton("查 找",2); + var _loc8_:UIButton = new UIButton("全 部",2); + _loc1_.addChild(_loc7_); + _loc1_.addChild(_loc8_); + _loc7_.x = this.inputText.x + this.inputText.width + 5; + _loc7_.y = _loc6_.y - 3; + _loc8_.x = _loc7_.x + _loc7_.width + 5; + _loc8_.y = _loc6_.y - 3; + _loc8_.onClick = this.getAll; + _loc7_.onClick = this.searchGuildByName; + } + + public function nextPage() : void + { + this.currPage += 1; + this.getGuildList(); + } + + public function prePage() : void + { + --this.currPage; + this.getGuildList(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.currPage = 1; + this.getGuildList(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_List_Ranking,this.getRankList); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_GetByName,this.getRankListByGuildName); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_inviteCombine,this.questMergeSucc); + } + + public function setType(param1:int) : void + { + switch(param1) + { + case 0: + this.showInvite = false; + this.showWar = false; + break; + case 1: + this.showInvite = true; + this.showWar = false; + break; + case 2: + this.showInvite = false; + this.showWar = true; + } + } + + private function getGuildList() : void + { + var _loc1_:int = (this.currPage - 1) * 12 + 1; + ConnectService.getInstance().guildService.getGuildListFromCache(_loc1_); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(contains(GuildViewUI.getInstance())) + { + removeChild(GuildViewUI.getInstance()); + } + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_List_Ranking,this.getRankList); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_inviteCombine,this.questMergeSucc); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_GetByName,this.getRankListByGuildName); + this.clearList(); + } + + private function questMergeSucc(param1:GuildEvent) : void + { + this.closeUI(null); + } + + private function getRankList(param1:GuildEvent) : void + { + var _loc5_:* = undefined; + var _loc6_:GuildListMc = null; + var _loc2_:int = param1.rankCount; + var _loc3_:int = (this.currPage - 1) * 12 + 1; + if(_loc3_ != param1.rankPage) + { + return; + } + this.pageMc.setPageCount(1 + _loc2_ / 12); + this.pageMc.setPage(this.currPage); + var _loc4_:Array = param1.rankingArr; + if(_loc4_ == null) + { + for each(_loc6_ in this.guildListVec) + { + _loc6_.setData(null); + } + return; + } + for(_loc5_ in this.guildListVec) + { + if(_loc4_[_loc5_]) + { + this.guildListVec[_loc5_].setData(_loc4_[_loc5_],this.showInvite,this.showWar); + } + else + { + this.guildListVec[_loc5_].setData(null); + } + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + private function getAll(param1:MouseEvent) : void + { + this.currPage = 1; + this.getGuildList(); + } + + private function searchGuildByName(param1:MouseEvent) : void + { + var _loc2_:String = this.inputText.getText(); + if(PublicMethod.trim(_loc2_) != "") + { + this.currPage = 1; + ConnectService.getInstance().guildService.getGuildLikeNameView(_loc2_,1); + } + else + { + MessageBoxUI.getInstance().addMessage("请输入要查找的联盟名称"); + } + } + + private function clearList() : void + { + var _loc1_:GuildListMc = null; + for each(_loc1_ in this.guildListVec) + { + _loc1_.setData(null); + } + } + + private function getRankListByGuildName(param1:GuildEvent) : void + { + var _loc3_:* = undefined; + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + var _loc2_:Array = param1.rankingArr; + if(_loc2_ == null || _loc2_.length == 0) + { + this.clearList(); + return; + } + for(_loc3_ in this.guildListVec) + { + if(_loc2_[_loc3_]) + { + this.guildListVec[_loc3_].setData(_loc2_[_loc3_],this.showInvite,this.showWar); + } + else + { + this.guildListVec[_loc3_].setData(null); + } + } + } + + private function viewGuild(param1:MouseEvent) : void + { + var _loc2_:GuildListMc = param1.currentTarget.parent as GuildListMc; + if(_loc2_.guildObj == null) + { + return; + } + var _loc3_:GuildViewUI = GuildViewUI.getInstance(); + _loc3_.setGuildId(_loc2_.guildObj.guildId); + addChild(_loc3_); + _loc3_.x = 145; + _loc3_.y = 40; + } + + override public function closeUI(param1:MouseEvent) : void + { + if(parent == face.stage) + { + super.closeUI(param1); + } + else if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function setPosition() : void + { + if(parent == face.stage) + { + super.setPosition(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildMainUI.as b/flash_decompiled/com/view/ui/guild/GuildMainUI.as new file mode 100644 index 0000000..156c37a --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildMainUI.as @@ -0,0 +1,390 @@ +package com.view.ui.guild +{ + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.guild.event.GuildEvent; + import com.control.province.event.ProvinceEvent; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.temple.TempleEvent; + import flash.events.Event; + import flash.events.MouseEvent; + + public class GuildMainUI extends GuildBaseUI + { + + private static var instance:GuildMainUI; + + private var paneBg:UIWindowBg; + + private var initPage:int; + + private var btnArr:Array; + + private var currPage:int = -1; + + private var page1:GuildPage1; + + private var page2:GuildPage2; + + private var page3:GuildPage3; + + private var page4:GuildPage4; + + private var page5:GuildPage5; + + private var page6:GuildPage6; + + private var page7:GlobalMainUI; + + private var guildPage7:GuildPage7; + + public function GuildMainUI() + { + super(); + } + + public static function getInstance() : GuildMainUI + { + if(instance == null) + { + instance = new GuildMainUI(); + } + return instance; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc8_:int = 0; + var _loc9_:UITabBtn = null; + super.createUI(); + super.loadTitle(UITitleConfig.title_lianmeng); + this.btnArr = new Array(); + var _loc1_:UITabBtn = new UITabBtn("联盟信息",2); + var _loc2_:UITabBtn = new UITabBtn("联盟拍卖",2); + var _loc3_:UITabBtn = new UITabBtn("联盟福利",2); + var _loc4_:UITabBtn = new UITabBtn("联盟建筑",2); + var _loc5_:UITabBtn = new UITabBtn("联盟城池",2); + var _loc6_:UITabBtn = new UITabBtn("联盟讨伐",2); + var _loc7_:UITabBtn = new UITabBtn("抗击匈奴",2); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + this.btnArr.push(_loc7_); + for each(_loc9_ in this.btnArr) + { + addChild(_loc9_); + _loc9_.x = 25 + _loc8_ * 66; + _loc9_.y = 40; + _loc9_.onClick = this.clickTab; + _loc8_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + this.setBtnSelect(this.btnArr[this.initPage]); + } + + public function init(param1:int = 0) : void + { + if(param1 == 0 && this.currPage <= 0) + { + this.initPage = param1; + if(this.btnArr != null) + { + this.setBtnSelect(this.btnArr[this.initPage]); + } + } + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + this.setBtnSelect(_loc2_); + } + + private function setBtnSelect(param1:UITabBtn, param2:Boolean = false) : void + { + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + if(param1 == this.btnArr[6] && !param2) + { + if(this.currPage == 6) + { + return; + } + param1.select = false; + this.addPage7(); + return; + } + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(param1 == _loc4_) + { + _loc4_.select = true; + this.getPage(_loc3_); + } + else + { + _loc4_.select = false; + } + } + } + + private function getPage(param1:int) : void + { + if(this.currPage == param1) + { + return; + } + this.removePage(this.currPage); + this.currPage = param1; + this.addPage(param1); + } + + private function removePage(param1:int) : void + { + switch(param1) + { + case 0: + if(Boolean(this.page1) && this.paneBg.contains(this.page1)) + { + this.paneBg.removeChild(this.page1); + } + break; + case 1: + if(Boolean(this.page2) && this.paneBg.contains(this.page2)) + { + this.paneBg.removeChild(this.page2); + } + break; + case 2: + if(Boolean(this.page3) && this.paneBg.contains(this.page3)) + { + this.paneBg.removeChild(this.page3); + } + break; + case 3: + if(Boolean(this.page4) && this.paneBg.contains(this.page4)) + { + this.paneBg.removeChild(this.page4); + } + break; + case 4: + if(Boolean(this.page5) && this.paneBg.contains(this.page5)) + { + this.paneBg.removeChild(this.page5); + } + break; + case 5: + if(Boolean(this.page6) && this.paneBg.contains(this.page6)) + { + this.paneBg.removeChild(this.page6); + } + break; + case 6: + if(Boolean(this.guildPage7) && this.paneBg.contains(this.guildPage7)) + { + this.paneBg.removeChild(this.guildPage7); + } + } + } + + private function addPage(param1:int) : void + { + switch(param1) + { + case 0: + this.addPage1(); + break; + case 1: + this.addPage2(); + break; + case 2: + this.addPage3(); + break; + case 3: + this.addPage4(); + break; + case 4: + this.addPage5(); + break; + case 5: + this.addPage6(); + break; + case 6: + this.enterDefWar(); + } + } + + private function addPage1() : void + { + if(this.page1 == null) + { + this.page1 = new GuildPage1(); + this.page1.x = 4; + this.page1.y = 4; + } + this.paneBg.addChild(this.page1); + } + + private function addPage2() : void + { + if(this.page2 == null) + { + this.page2 = new GuildPage2(); + this.page2.x = 4; + this.page2.y = 4; + } + this.paneBg.addChild(this.page2); + } + + private function addPage3() : void + { + if(this.page3 == null) + { + this.page3 = new GuildPage3(); + this.page3.x = 4; + this.page3.y = 4; + } + this.paneBg.addChild(this.page3); + } + + private function addPage4() : void + { + if(this.page4 == null) + { + this.page4 = new GuildPage4(); + this.page4.x = 4; + this.page4.y = 4; + } + this.paneBg.addChild(this.page4); + } + + private function addPage5() : void + { + if(this.page5 == null) + { + this.page5 = new GuildPage5(); + this.page5.x = 4; + this.page5.y = 4; + } + this.paneBg.addChild(this.page5); + } + + private function addPage6() : void + { + if(this.page6 == null) + { + this.page6 = new GuildPage6(); + this.page6.x = 4; + this.page6.y = 4; + } + this.paneBg.addChild(this.page6); + } + + private function addPage7() : void + { + if(this.page7 == null) + { + this.page7 = new GlobalMainUI(); + this.page7.x = -11; + this.page7.y = -65; + this.page7.setDefFunc(this.toLeagueDefMain); + } + this.paneBg.addChild(this.page7); + } + + private function toLeagueDefMain() : void + { + this.setBtnSelect(this.btnArr[6],true); + } + + private function enterDefWar() : void + { + if(this.guildPage7 == null) + { + this.guildPage7 = new GuildPage7(); + this.guildPage7.x = 4; + this.guildPage7.y = 4; + } + this.paneBg.addChild(this.guildPage7); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_GetGuildInfo,this.getGuildInfo); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_quitGuild,this.quitGuildResult); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getProvinceEntryInfo,this.getProvinceInfo); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_GetGuildInfo,this.getGuildInfo); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_quitGuild,this.quitGuildResult); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getProvinceEntryInfo,this.getProvinceInfo); + } + + private function getGuildInfo(param1:GuildEvent) : void + { + if(param1.rankPage == ReturnBean.STATUS_4) + { + if(param1.guildObj.hasEmbassy == 0) + { + closeUI(null); + MessageBoxUI.getInstance().addMessage("请先建立自己的外使院,加入联盟"); + } + if(param1.guildObj.hasEmbassy == 1) + { + face.stage.dispatchEvent(new TempleEvent()); + MessageBoxUI.getInstance().addMessage("请在外使院里,创建或加入一个联盟"); + } + } + } + + private function getProvinceInfo(param1:ProvinceEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + if(param1.objData.hasEmbassy == 0) + { + closeUI(null); + MessageBoxUI.getInstance().addMessage("请先建立自己的外使院,加入联盟"); + } + if(param1.objData.hasEmbassy == 1) + { + face.stage.dispatchEvent(new TempleEvent()); + MessageBoxUI.getInstance().addMessage("请在外使院里,创建或加入一个联盟"); + } + } + } + + private function quitGuildResult(param1:GuildEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + MessageBoxUI.getInstance().addMessage("你已退出联盟"); + ConnectService.getInstance().castleService.getUserData(); + closeUI(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildMemListUI.as b/flash_decompiled/com/view/ui/guild/GuildMemListUI.as new file mode 100644 index 0000000..b3584c0 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildMemListUI.as @@ -0,0 +1,250 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.combat.event.CombatEvent; + import com.control.data.ReturnBean; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIConfig; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.GuildMemMc; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GuildMemListUI extends BaseUI + { + + private static var instance:GuildMemListUI; + + private var tableMc:UITable; + + private var memListVec:Vector.; + + private var pageMc:UIPageMc; + + private var currPage:int; + + private var currGuildId:int; + + private var viewMemUI:ViewMemberUI; + + private var warStatus:Boolean; + + public function GuildMemListUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_lianmengchengyuan); + this.createUI(); + } + + public static function getInstance() : GuildMemListUI + { + if(instance == null) + { + instance = new GuildMemListUI(); + } + return instance; + } + + override public function createUI() : void + { + var _loc1_:UIWindowBg = null; + var _loc6_:GuildMemMc = null; + _loc1_ = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["成员","职位","排名","等级","状态","坐标","路程","操作"]; + var _loc3_:Array = [125,60,55,51,102,85,75,82]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(14,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.memListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 14) + { + _loc6_ = new GuildMemMc(); + this.tableMc.addChild(_loc6_); + this.memListVec.push(_loc6_); + _loc6_.declareFunc = this.declareWar; + _loc6_.updateFunc = this.getMemListById; + _loc6_.x = 4; + _loc6_.y = 26 + _loc4_ * 25; + _loc6_.viewBtn.addEventListener(MouseEvent.CLICK,this.viewMemById,false,0,true); + _loc4_++; + } + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,280); + _loc1_.addChild(_loc5_); + _loc5_.text = "提示:攻破此联盟任意一座君主城池可摘掉白棋"; + _loc5_.x = 4; + _loc5_.y = 385; + this.pageMc = new UIPageMc(); + _loc1_.addChild(this.pageMc); + this.pageMc.x = 530; + this.pageMc.y = 385; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + } + + public function nextPage() : void + { + this.currPage += 1; + this.getMemListById(); + } + + public function prePage() : void + { + --this.currPage; + this.getMemListById(); + } + + public function setGuildId(param1:int) : void + { + this.currGuildId = param1; + } + + override public function addToStage(param1:Event) : void + { + this.warStatus = true; + this.currPage = 1; + super.addToStage(param1); + this.getMemListById(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_GetMemListByGuildId,this.getMemListResult); + ConnectService.getInstance().addEventListener(CombatEvent.Combat_declareWar,this.declareWarSucc); + } + + override public function removeFromStage(param1:Event) : void + { + if(Boolean(this.viewMemUI) && contains(this.viewMemUI)) + { + removeChild(this.viewMemUI); + } + this.clearList(); + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_GetMemListByGuildId,this.getMemListResult); + ConnectService.getInstance().removeEventListener(CombatEvent.Combat_declareWar,this.declareWarSucc); + } + + private function getMemListById() : void + { + var _loc1_:int = (this.currPage - 1) * 14 + 1; + var _loc2_:int = this.currPage * 14; + ConnectService.getInstance().guildService.getMembersByOthers(_loc1_,_loc2_,this.currGuildId); + } + + private function getMemListResult(param1:GuildEvent) : void + { + var _loc5_:Array = null; + var _loc6_:* = undefined; + var _loc2_:int = param1.guildId; + var _loc3_:int = param1.startNum; + var _loc4_:int = param1.totalNum; + if(_loc2_ == this.currGuildId && _loc3_ == (this.currPage - 1) * 14 + 1) + { + this.pageMc.setPageCount(1 + _loc4_ / 14); + this.pageMc.setPage(this.currPage); + _loc5_ = param1.memList; + if(_loc5_ == null) + { + this.clearList(); + return; + } + for(_loc6_ in this.memListVec) + { + if(_loc5_[_loc6_]) + { + this.memListVec[_loc6_].setData(_loc5_[_loc6_]); + } + else + { + this.memListVec[_loc6_].setData(null); + } + } + } + } + + private function clearList() : void + { + var _loc1_:GuildMemMc = null; + for each(_loc1_ in this.memListVec) + { + _loc1_.setData(null); + } + } + + override public function setPosition() : void + { + if(this.parent == face.stage) + { + super.setPosition(); + } + } + + override public function closeUI(param1:MouseEvent) : void + { + if(parent == face.stage) + { + super.closeUI(param1); + } + else if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + private function viewMemById(param1:MouseEvent) : void + { + var _loc2_:GuildMemMc = param1.currentTarget.parent as GuildMemMc; + if(_loc2_.memObj == null) + { + return; + } + if(this.viewMemUI == null) + { + this.viewMemUI = new ViewMemberUI(); + } + this.viewMemUI.setMemberId(_loc2_.memObj.userId); + addChild(this.viewMemUI); + this.viewMemUI.x = 170; + this.viewMemUI.y = 60; + } + + private function declareWar(param1:int) : void + { + if(!this.warStatus) + { + return; + } + this.warStatus = false; + ConnectService.getInstance().combatService.declareWar(param1); + } + + private function declareWarSucc(param1:CombatEvent) : void + { + this.warStatus = true; + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + MessageBoxUI.getInstance().addMessage("宣战成功"); + this.getMemListById(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildOfferUI.as b/flash_decompiled/com/view/ui/guild/GuildOfferUI.as new file mode 100644 index 0000000..e2619dc --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildOfferUI.as @@ -0,0 +1,630 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIConfig; + import com.view.newui.UINumInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UISmallBtn; + import com.view.newui.UITabBtn; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.GuildOfferMc; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GuildOfferUI extends BaseUI + { + + private var offerMc:MovieClip; + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var bg1:UIWindowBg; + + private var contributionValue_txt:TextField; + + private var food_txt:UINumInputText; + + private var wood_txt:UINumInputText; + + private var stone_txt:UINumInputText; + + private var bronze_txt:UINumInputText; + + private var hufu_txt:UINumInputText; + + private var food_cur_txt:TextField; + + private var wood_cur_txt:TextField; + + private var stone_cur_txt:TextField; + + private var bronze_cur_txt:TextField; + + private var hufu_cur_txt:TextField; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var tab1:UITabBtn; + + private var tab2:UITabBtn; + + private var mcVec:Vector.; + + private var currType:int; + + private var currPage:int; + + private var offerObj:Object; + + public function GuildOfferUI() + { + super(); + super.addUIBg(); + loadTitle(UITitleConfig.title_lianmengjuanxian); + this.createUI(); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function createUI() : void + { + var _loc1_:UIWindowBg = null; + var _loc6_:TextField = null; + var _loc14_:Sprite = null; + var _loc28_:TextField = null; + var _loc34_:GuildOfferMc = null; + _loc1_ = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(222,391); + _loc1_.addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc2_:UITitleBg = new UITitleBg("联盟捐献",200); + this.bg1.addChild(_loc2_); + _loc2_.x = int(this.bg1.width / 2 - _loc2_.width / 2); + this.tab1 = new UITabBtn("今日捐献排行",3); + this.tab2 = new UITabBtn("历史捐献排行",3); + _loc1_.addChild(this.tab1); + this.tab1.x = 250; + this.tab1.y = 5; + _loc1_.addChild(this.tab2); + this.tab2.x = 250 + 1 * 90; + this.tab2.y = this.tab1.y; + this.tab1.onClick = this.clickPage1; + this.tab2.onClick = this.clickPage2; + var _loc3_:Array = ["名次","玩家名","捐献资源","捐献虎符"]; + var _loc4_:Array = [40,110,130,120]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(13,_loc3_,_loc4_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = this.bg1.x + this.bg1.width + 3; + this.tableMc.y = 30; + this.pageMc = new UIPageMc(); + _loc1_.addChild(this.pageMc); + this.pageMc.x = 530; + this.pageMc.y = 385; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc5_.text = "捐献粮食:"; + this.bg1.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = 35; + this.food_txt = new UINumInputText(80); + this.bg1.addChild(this.food_txt); + this.food_txt.x = _loc5_.x + 61; + this.food_txt.y = _loc5_.y - 3; + this.food_txt.hiddenBtn(); + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc6_.text = "万"; + this.bg1.addChild(_loc6_); + _loc6_.x = this.food_txt.x + this.food_txt.width; + _loc6_.y = _loc5_.y; + var _loc7_:UISmallBtn = new UISmallBtn("捐 献",2); + this.bg1.addChild(_loc7_); + _loc7_.x = _loc6_.x + 20; + --_loc5_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc8_.text = "当前粮食:"; + this.bg1.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc5_.y + 25; + this.food_cur_txt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + this.bg1.addChild(this.food_cur_txt); + this.food_cur_txt.x = _loc8_.x + 61; + this.food_cur_txt.y = _loc8_.y; + var _loc9_:Sprite = PublicMethod.getTrLine(210); + this.bg1.addChild(_loc9_); + _loc9_.x = 10; + _loc9_.y = _loc8_.y + 25; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc10_.text = "捐献木材:"; + this.bg1.addChild(_loc10_); + _loc10_.x = _loc5_.x; + _loc10_.y = _loc9_.y + 10; + this.wood_txt = new UINumInputText(80); + this.bg1.addChild(this.wood_txt); + this.wood_txt.x = _loc10_.x + 61; + this.wood_txt.y = _loc10_.y - 3; + this.wood_txt.hiddenBtn(); + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc11_.text = "万"; + this.bg1.addChild(_loc11_); + _loc11_.x = this.wood_txt.x + this.wood_txt.width; + _loc11_.y = _loc10_.y; + var _loc12_:UISmallBtn = new UISmallBtn("捐 献",2); + this.bg1.addChild(_loc12_); + _loc12_.x = _loc11_.x + 20; + --_loc10_.y; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc13_.text = "当前木材:"; + this.bg1.addChild(_loc13_); + _loc13_.x = _loc10_.x; + _loc13_.y = _loc10_.y + 25; + this.wood_cur_txt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + this.bg1.addChild(this.wood_cur_txt); + this.wood_cur_txt.x = _loc13_.x + 61; + this.wood_cur_txt.y = _loc13_.y; + _loc14_ = PublicMethod.getTrLine(210); + this.bg1.addChild(_loc14_); + _loc14_.x = 10; + _loc14_.y = _loc13_.y + 25; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc15_.text = "捐献石料:"; + this.bg1.addChild(_loc15_); + _loc15_.x = _loc5_.x; + _loc15_.y = _loc14_.y + 10; + this.stone_txt = new UINumInputText(80); + this.bg1.addChild(this.stone_txt); + this.stone_txt.x = _loc15_.x + 61; + this.stone_txt.y = _loc15_.y - 3; + this.stone_txt.hiddenBtn(); + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc16_.text = "万"; + this.bg1.addChild(_loc16_); + _loc16_.x = this.stone_txt.x + this.stone_txt.width; + _loc16_.y = _loc15_.y; + var _loc17_:UISmallBtn = new UISmallBtn("捐 献",2); + this.bg1.addChild(_loc17_); + _loc17_.x = _loc16_.x + 20; + --_loc15_.y; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc18_.text = "当前石料:"; + this.bg1.addChild(_loc18_); + _loc18_.x = _loc15_.x; + _loc18_.y = _loc15_.y + 25; + this.stone_cur_txt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + this.bg1.addChild(this.stone_cur_txt); + this.stone_cur_txt.x = _loc18_.x + 61; + this.stone_cur_txt.y = _loc18_.y; + var _loc19_:Sprite = PublicMethod.getTrLine(210); + this.bg1.addChild(_loc19_); + _loc19_.x = 10; + _loc19_.y = _loc18_.y + 25; + var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc20_.text = "捐献青铜:"; + this.bg1.addChild(_loc20_); + _loc20_.x = _loc5_.x; + _loc20_.y = _loc19_.y + 10; + this.bronze_txt = new UINumInputText(80); + this.bg1.addChild(this.bronze_txt); + this.bronze_txt.x = _loc20_.x + 61; + this.bronze_txt.y = _loc20_.y - 3; + this.bronze_txt.hiddenBtn(); + var _loc21_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc21_.text = "万"; + this.bg1.addChild(_loc21_); + _loc21_.x = this.bronze_txt.x + this.bronze_txt.width; + _loc21_.y = _loc20_.y; + var _loc22_:UISmallBtn = new UISmallBtn("捐 献",2); + this.bg1.addChild(_loc22_); + _loc22_.x = _loc21_.x + 20; + --_loc20_.y; + var _loc23_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc23_.text = "当前青铜:"; + this.bg1.addChild(_loc23_); + _loc23_.x = _loc20_.x; + _loc23_.y = _loc20_.y + 25; + this.bronze_cur_txt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + this.bg1.addChild(this.bronze_cur_txt); + this.bronze_cur_txt.x = _loc23_.x + 61; + this.bronze_cur_txt.y = _loc23_.y; + var _loc24_:Sprite = PublicMethod.getTrLine(210); + this.bg1.addChild(_loc24_); + _loc24_.x = 10; + _loc24_.y = _loc23_.y + 25; + var _loc25_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc25_.text = "捐献虎符:"; + this.bg1.addChild(_loc25_); + _loc25_.x = _loc5_.x; + _loc25_.y = _loc24_.y + 10; + this.hufu_txt = new UINumInputText(80); + this.bg1.addChild(this.hufu_txt); + this.hufu_txt.x = _loc25_.x + 61; + this.hufu_txt.y = _loc25_.y - 3; + this.hufu_txt.hiddenBtn(); + var _loc26_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc26_.text = "个"; + this.bg1.addChild(_loc26_); + _loc26_.x = this.hufu_txt.x + this.hufu_txt.width; + _loc26_.y = _loc25_.y; + var _loc27_:UISmallBtn = new UISmallBtn("捐 献",2); + this.bg1.addChild(_loc27_); + _loc27_.x = _loc26_.x + 20; + --_loc25_.y; + _loc28_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc28_.text = "当前虎符:"; + this.bg1.addChild(_loc28_); + _loc28_.x = _loc25_.x; + _loc28_.y = _loc25_.y + 25; + this.hufu_cur_txt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + this.bg1.addChild(this.hufu_cur_txt); + this.hufu_cur_txt.x = _loc28_.x + 61; + this.hufu_cur_txt.y = _loc28_.y; + var _loc29_:Sprite = PublicMethod.getTrLine(210); + this.bg1.addChild(_loc29_); + _loc29_.x = 10; + _loc29_.y = _loc28_.y + 25; + var _loc30_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc30_.text = "联盟贡献度:"; + this.bg1.addChild(_loc30_); + _loc30_.x = 10; + _loc30_.y = _loc29_.y + 10; + this.contributionValue_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg1.addChild(this.contributionValue_txt); + this.contributionValue_txt.x = _loc30_.x + _loc30_.width; + this.contributionValue_txt.y = _loc30_.y; + var _loc31_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,210); + _loc31_.text = "1万资源=1点贡献度 1点建设值"; + this.bg1.addChild(_loc31_); + _loc31_.x = 10; + _loc31_.y = _loc30_.y + 25; + var _loc32_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,210); + _loc32_.text = "1个虎符=10贡献度"; + this.bg1.addChild(_loc32_); + _loc32_.x = 10; + _loc32_.y = _loc31_.y + 20; + _loc7_.onClick = this.donateFood; + _loc12_.onClick = this.donateWood; + _loc17_.onClick = this.donateStone; + _loc22_.onClick = this.donateBronze; + _loc27_.onClick = this.donateItem; + this.mcVec = new Vector.(); + var _loc33_:int = 0; + while(_loc33_ < 13) + { + _loc34_ = new GuildOfferMc(); + this.mcVec.push(_loc34_); + _loc34_.y = 26 + _loc33_ * 25; + _loc34_.x = 4; + this.tableMc.addChild(_loc34_); + _loc33_++; + } + this.tab1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Offer_View,this.getOfferInfoResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Offer_List_Today,this.getTodayOfferListResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Offer_List_All,this.getAllOfferListResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Offer_donate,this.donateResResult); + this.getOfferInfo(); + this.currType = 1; + this.currPage = 1; + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Offer_View,this.getOfferInfoResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Offer_List_Today,this.getTodayOfferListResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Offer_List_All,this.getAllOfferListResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Offer_donate,this.donateResResult); + } + + private function getTodayRankList() : void + { + ConnectService.getInstance().guildService.getTodayDonateRankList((this.currPage - 1) * 13 + 1,this.currPage * 13); + } + + private function getAllRankListResult() : void + { + ConnectService.getInstance().guildService.getDonateRankList((this.currPage - 1) * 13 + 1,this.currPage * 13); + } + + private function getOfferInfo() : void + { + ConnectService.getInstance().guildService.getGuildOfferView(); + } + + private function getOfferInfoResult(param1:GuildEvent) : void + { + this.offerObj = param1.guildObj; + this.contributionValue_txt.text = this.offerObj.pointOfOffer; + this.food_cur_txt.text = PublicMethod.getRes(this.offerObj.foodNum); + this.wood_cur_txt.text = PublicMethod.getRes(this.offerObj.woodNum); + this.stone_cur_txt.text = PublicMethod.getRes(this.offerObj.stoneNum); + this.bronze_cur_txt.text = PublicMethod.getRes(this.offerObj.bronzeNum); + this.hufu_cur_txt.text = this.offerObj.itemNum + "个"; + } + + private function getTodayOfferListResult(param1:GuildEvent) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:Array = null; + var _loc5_:* = undefined; + var _loc6_:GuildOfferMc = null; + if(this.currType == 1) + { + _loc2_ = (this.currPage - 1) * 13 + 1; + if(_loc2_ == param1.guildObj.start) + { + _loc3_ = int(param1.guildObj.totalNum); + this.pageMc.setPageCount(1 + _loc3_ / 13); + this.pageMc.setPage(this.currPage); + _loc4_ = param1.guildObj.memberList as Array; + if(_loc4_ == null || _loc4_.length == 0) + { + for each(_loc6_ in this.mcVec) + { + _loc6_.setData(null); + } + return; + } + for(_loc5_ in _loc4_) + { + if(_loc4_[_loc5_].todayDonateItem == 0 && _loc4_[_loc5_].todayDonateRes == 0) + { + this.mcVec[_loc5_].setData(null); + } + else + { + this.mcVec[_loc5_].setData(_loc4_[_loc5_],1); + if(this.currPage == 1) + { + if(_loc5_ <= 2) + { + this.mcVec[_loc5_].setStyle(_loc5_); + } + } + } + } + } + } + } + + private function getAllOfferListResult(param1:GuildEvent) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:Array = null; + var _loc5_:* = undefined; + var _loc6_:GuildOfferMc = null; + if(this.currType == 2) + { + _loc2_ = (this.currPage - 1) * 13 + 1; + if(_loc2_ == param1.guildObj.start) + { + _loc3_ = int(param1.guildObj.totalNum); + this.pageMc.setPageCount(1 + _loc3_ / 13); + this.pageMc.setPage(this.currPage); + _loc4_ = param1.guildObj.memberList as Array; + if(_loc4_ == null || _loc4_.length == 0) + { + for each(_loc6_ in this.mcVec) + { + _loc6_.setData(null); + } + return; + } + for(_loc5_ in this.mcVec) + { + if(_loc4_[_loc5_]) + { + this.mcVec[_loc5_].setData(_loc4_[_loc5_],2); + if(this.currPage == 1) + { + if(_loc5_ <= 2) + { + this.mcVec[_loc5_].setStyle(_loc5_); + } + } + } + else + { + this.mcVec[_loc5_].setData(null); + } + } + } + } + } + + private function clickPage1(param1:MouseEvent) : void + { + if(this.currType != 1) + { + this.currType = 1; + this.currPage = 1; + this.tab1.select = true; + this.tab2.select = false; + this.getTodayRankList(); + } + } + + private function clickPage2(param1:MouseEvent) : void + { + if(this.currType != 2) + { + this.currType = 2; + this.currPage = 1; + this.tab2.select = true; + this.tab1.select = false; + this.getAllRankListResult(); + } + } + + private function mouserOutBtn1(param1:MouseEvent) : void + { + if(this.currType != 1) + { + this.offerMc.btn1.gotoAndStop(1); + } + } + + private function mouserOverBtn1(param1:MouseEvent) : void + { + if(this.currType != 1) + { + this.offerMc.btn1.gotoAndStop(2); + } + } + + private function mouserOutBtn2(param1:MouseEvent) : void + { + if(this.currType != 2) + { + this.offerMc.btn2.gotoAndStop(1); + } + } + + private function mouserOverBtn2(param1:MouseEvent) : void + { + if(this.currType != 2) + { + this.offerMc.btn2.gotoAndStop(2); + } + } + + public function nextPage() : void + { + this.currPage += 1; + if(this.currType == 1) + { + this.getTodayRankList(); + } + else + { + this.getAllRankListResult(); + } + } + + public function prePage() : void + { + --this.currPage; + if(this.currType == 1) + { + this.getTodayRankList(); + } + else + { + this.getAllRankListResult(); + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + private function donateFood(param1:MouseEvent) : void + { + var _loc2_:int = this.food_txt.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("请输入资源数量"); + return; + } + var _loc3_:Object = new Object(); + _loc3_.foodNum = _loc2_.toString(); + ConnectService.getInstance().guildService.offerResAndItem(_loc3_); + } + + private function donateWood(param1:MouseEvent) : void + { + var _loc2_:int = this.wood_txt.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("请输入资源数量"); + return; + } + var _loc3_:Object = new Object(); + _loc3_.woodNum = _loc2_.toString(); + ConnectService.getInstance().guildService.offerResAndItem(_loc3_); + } + + private function donateStone(param1:MouseEvent) : void + { + var _loc2_:int = this.stone_txt.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("请输入资源数量"); + return; + } + var _loc3_:Object = new Object(); + _loc3_.stoneNum = _loc2_.toString(); + ConnectService.getInstance().guildService.offerResAndItem(_loc3_); + } + + private function donateBronze(param1:MouseEvent) : void + { + var _loc2_:int = this.bronze_txt.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("请输入资源数量"); + return; + } + var _loc3_:Object = new Object(); + _loc3_.bronzeNum = _loc2_.toString(); + ConnectService.getInstance().guildService.offerResAndItem(_loc3_); + } + + private function donateItem(param1:MouseEvent) : void + { + var _loc2_:int = this.hufu_txt.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("请输入虎符数量"); + return; + } + var _loc3_:Object = new Object(); + _loc3_.itemNum = _loc2_.toString(); + ConnectService.getInstance().guildService.offerResAndItem(_loc3_); + } + + private function donateResResult(param1:GuildEvent) : void + { + this.getTodayRankList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildPage1.as b/flash_decompiled/com/view/ui/guild/GuildPage1.as new file mode 100644 index 0000000..c388fc3 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildPage1.as @@ -0,0 +1,861 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.data.data.guild.GuildRight; + import com.view.mc.button.Button_9; + import com.view.mc.sprite.TextBar; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIExpBar; + import com.view.newui.UIInputText; + import com.view.newui.UISmallBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class GuildPage1 extends GuildBasePage + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var guildName:TextField; + + private var countryText:TextField; + + private var flagText:TextField; + + private var townNums:TextField; + + private var guildLevel:TextField; + + private var rankText:TextField; + + private var honorText:TextField; + + private var leaderName:TextField; + + private var guildMems:TextField; + + private var constru:TextField; + + private var propertyNum:TextField; + + private var qqQun:UIInputText; + + private var loadBar:UIExpBar; + + private var changeLeader_txt:TextField; + + private var changeLeader_time:TextField; + + private var dismiss_txt:TextField; + + private var dismisstime_txt:TextField; + + private var upName:UITitleBg; + + private var btn1:UIButton; + + private var btn2:UIButton; + + private var btn3:UIButton; + + private var btn4:UIButton; + + private var btn5:UIButton; + + private var btn6:UIButton; + + private var btn7:UISmallBtn; + + private var btn8:UISmallBtn; + + private var btn9:UISmallBtn; + + private var btn10:UISmallBtn; + + private var btn11:UISmallBtn; + + private var btn12:UISmallBtn; + + private var editDescBtn:Button_9; + + private var editNoticeBtn:Button_9; + + private var guildDesc:TextBar; + + private var guildNotice:TextBar; + + private var guild:Object; + + private var guildRight:GuildRight; + + private var isLeader:int; + + private var changeLeaderTime:int; + + private var dismissTime:int = -1; + + private var guildUpFullTime:int = -1; + + private var guildLeftUpTime:int = -1; + + private var timer:Timer; + + private var guildInviteList:GuildInviteListUI; + + private var guildApplyList:GuildApplyListUI; + + private var guildEventListUI:GuildEventListUI; + + private var unionMerge:UnionMerge; + + private var disolveGuildUI:DisolveGuildUI; + + private var guildLevelUpUI:GuildLevelUpUI; + + private var changeGuildLeaderUI:ChangeGuildLeader; + + private var myGuildMemListUI:MyGuildMemListUI; + + private var guildOfferUI:GuildOfferUI; + + private var editGuildDescUI:EditGuildDescUI; + + private var guildDescStr:String; + + private var editGuildNoticeUI:EditGuildNoticeUI; + + private var guildNoticeStr:String; + + public function GuildPage1() + { + var _loc4_:UITitleBg = null; + var _loc5_:int = 0; + var _loc6_:TextField = null; + var _loc8_:TextField = null; + var _loc13_:TextField = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(213,367); + addChild(this.bg1); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(396,367); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 3; + this.bg2.y = this.bg1.y; + var _loc1_:UITitleBg = new UITitleBg("联盟信息",200); + this.bg1.addChild(_loc1_); + _loc1_.x = int(this.bg1.width / 2 - _loc1_.width / 2); + var _loc2_:UITitleBg = new UITitleBg("联盟信息",240); + this.bg1.addChild(_loc2_); + _loc2_.x = int(this.bg1.width / 2 - _loc2_.width / 2); + _loc2_.y = 260; + var _loc3_:UITitleBg = new UITitleBg("联盟简介(全服可见)",404); + this.bg2.addChild(_loc3_); + _loc3_.x = int(this.bg2.width / 2 - _loc3_.width / 2); + _loc4_ = new UITitleBg("联盟公告(盟内可见)",404); + this.bg2.addChild(_loc4_); + _loc4_.x = int(this.bg2.width / 2 - _loc4_.width / 2); + _loc4_.y = 150; + this.upName = new UITitleBg("联盟升级",404); + this.bg2.addChild(this.upName); + this.upName.x = int(this.bg2.width / 2 - _loc4_.width / 2); + this.upName.y = 300; + _loc5_ = 18; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.guildName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = 30; + _loc6_.text = "联盟名:"; + this.bg1.addChild(this.guildName); + this.guildName.x = _loc6_.x + 60; + this.guildName.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.countryText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc7_); + _loc7_.x = _loc6_.x; + _loc7_.y = _loc6_.y + _loc5_; + _loc7_.text = "国 家:"; + this.bg1.addChild(this.countryText); + this.countryText.x = this.guildName.x; + this.countryText.y = _loc7_.y; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.flagText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc8_); + _loc8_.x = _loc6_.x; + _loc8_.y = _loc7_.y + _loc5_; + _loc8_.text = "旗 号:"; + this.bg1.addChild(this.flagText); + this.flagText.x = this.guildName.x; + this.flagText.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.townNums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc9_); + _loc9_.x = _loc6_.x; + _loc9_.y = _loc8_.y + _loc5_; + _loc9_.text = "名城数:"; + this.bg1.addChild(this.townNums); + this.townNums.x = this.guildName.x; + this.townNums.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.guildLevel = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc10_); + _loc10_.x = _loc6_.x; + _loc10_.y = _loc9_.y + _loc5_; + _loc10_.text = "等 级:"; + this.bg1.addChild(this.guildLevel); + this.guildLevel.x = this.guildName.x; + this.guildLevel.y = _loc10_.y; + this.btn7 = new UISmallBtn("升 级",2); + addChild(this.btn7); + this.btn7.x = this.guildLevel.x + 100; + this.btn7.y = this.guildLevel.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.rankText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc11_); + _loc11_.x = _loc6_.x; + _loc11_.y = _loc10_.y + _loc5_; + _loc11_.text = "排 名:"; + this.bg1.addChild(this.rankText); + this.rankText.x = this.guildName.x; + this.rankText.y = _loc11_.y; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.honorText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc12_); + _loc12_.x = _loc6_.x; + _loc12_.y = _loc11_.y + _loc5_; + _loc12_.text = "荣 耀:"; + this.bg1.addChild(this.honorText); + this.honorText.x = this.guildName.x; + this.honorText.y = _loc12_.y; + _loc13_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.leaderName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc13_); + _loc13_.x = _loc6_.x; + _loc13_.y = _loc12_.y + _loc5_; + _loc13_.text = "盟 主:"; + this.bg1.addChild(this.leaderName); + this.leaderName.x = this.guildName.x; + this.leaderName.y = _loc13_.y; + this.btn8 = new UISmallBtn("禅 让",2); + addChild(this.btn8); + this.btn8.x = this.leaderName.x + 100; + this.btn8.y = this.leaderName.y; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.guildMems = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc14_); + _loc14_.x = _loc6_.x; + _loc14_.y = _loc13_.y + _loc5_; + _loc14_.text = "人 数:"; + this.bg1.addChild(this.guildMems); + this.guildMems.x = this.guildName.x; + this.guildMems.y = _loc14_.y; + this.btn9 = new UISmallBtn("查 看",2); + addChild(this.btn9); + this.btn9.x = this.guildMems.x + 100; + this.btn9.y = this.guildMems.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.constru = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc15_); + _loc15_.x = _loc6_.x; + _loc15_.y = _loc14_.y + _loc5_; + _loc15_.text = "建 设:"; + this.bg1.addChild(this.constru); + this.constru.x = this.guildName.x; + this.constru.y = _loc15_.y; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.propertyNum = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.bg1.addChild(_loc16_); + _loc16_.x = _loc6_.x; + _loc16_.y = _loc15_.y + _loc5_; + _loc16_.text = "虎 符:"; + this.bg1.addChild(this.propertyNum); + this.propertyNum.x = this.guildName.x; + this.propertyNum.y = _loc16_.y; + this.btn10 = new UISmallBtn("捐 献",2); + addChild(this.btn10); + this.btn10.x = this.propertyNum.x + 100; + this.btn10.y = this.propertyNum.y; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.qqQun = new UIInputText(80); + this.bg1.addChild(_loc17_); + _loc17_.x = _loc6_.x; + _loc17_.y = _loc16_.y + _loc5_ + 5; + _loc17_.text = "QQ群号:"; + this.bg1.addChild(this.qqQun); + this.qqQun.x = this.guildName.x; + this.qqQun.y = _loc17_.y - 3; + this.qqQun.numOnly(); + this.qqQun.setMaxChars(12); + this.btn11 = new UISmallBtn("保 存",2); + addChild(this.btn11); + this.btn11.x = this.qqQun.x + 100; + this.btn11.y = _loc17_.y; + this.btn1 = new UIButton("邀请加盟",2); + this.btn2 = new UIButton("批准申请",2); + this.btn3 = new UIButton("联盟事件",2); + this.btn4 = new UIButton("联盟合并",2); + this.btn5 = new UIButton("解散联盟",2); + this.btn6 = new UIButton("退出联盟",2); + this.bg1.addChild(this.btn1); + this.bg1.addChild(this.btn2); + this.bg1.addChild(this.btn3); + this.bg1.addChild(this.btn4); + this.bg1.addChild(this.btn5); + this.bg1.addChild(this.btn6); + this.btn1.x = 5; + this.btn1.y = 300; + this.btn2.x = this.btn1.x + this.btn1.width + 8; + this.btn2.y = this.btn1.y; + this.btn3.x = this.btn2.x + this.btn2.width + 8; + this.btn3.y = this.btn1.y; + this.btn4.x = this.btn1.x; + this.btn4.y = this.btn1.y + this.btn1.height + 4; + this.btn5.x = this.btn4.x + this.btn4.width + 8; + this.btn5.y = this.btn4.y; + this.btn6.x = this.btn5.x + this.btn5.width + 8; + this.btn6.y = this.btn4.y; + this.btn1.onClick = this.openApplyList; + this.btn2.onClick = this.openInviteList; + this.btn3.onClick = this.openEventList; + this.btn4.onClick = this.mergeGuild; + this.btn5.onClick = this.dismissGuild; + this.btn6.onClick = this.confirmExit; + this.guildDesc = new TextBar(); + this.guildDesc.createTextField(380,115); + this.bg2.addChild(this.guildDesc); + this.guildDesc.x = 10; + this.guildDesc.y = 31; + this.guildNotice = new TextBar(); + this.guildNotice.createTextField(380,115); + this.bg2.addChild(this.guildNotice); + this.guildNotice.x = 10; + this.guildNotice.y = 180; + this.editDescBtn = new Button_9("修改"); + this.bg2.addChild(this.editDescBtn); + this.editDescBtn.x = 10; + this.editDescBtn.y = 130; + this.editNoticeBtn = new Button_9("修改"); + this.bg2.addChild(this.editNoticeBtn); + this.editNoticeBtn.x = 10; + this.editNoticeBtn.y = 280; + this.editDescBtn.addEventListener(MouseEvent.CLICK,this.editDescUI,false,0,true); + this.editNoticeBtn.addEventListener(MouseEvent.CLICK,this.editNoticeUI,false,0,true); + this.loadBar = new UIExpBar(); + this.loadBar.setWidth(320); + this.bg2.addChild(this.loadBar); + this.loadBar.x = 20; + this.loadBar.y = 345; + this.loadBar.visible = false; + this.loadBar.init(); + this.loadBar.setMaxValue(0); + this.loadBar.setCurValue(0); + this.btn12 = new UISmallBtn("取 消",2); + this.bg2.addChild(this.btn12); + this.btn12.x = 350; + this.btn12.y = 342; + this.btn7.onClick = this.upgradeGuild; + this.btn8.onClick = this.changeGuildLeader; + this.btn9.onClick = this.openGuildList; + this.btn10.onClick = this.openContributeUI; + this.btn11.onClick = this.saveGuildQQGroup; + this.btn12.onClick = this.cancelDismiss; + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + this.getGuildView(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_GetGuildInfo,this.getGuildInfo); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Desc_Update,this.updateDescResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Notice_Update,this.updateNoticeResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_ChangeQQGroup,this.changeQQGroupResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Upgrade_Result,this.upgradeGuildResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_cancelDismiss,this.cancelDismissResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_dismiss,this.dismissResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_changeLeader,this.changeLeaderResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_cancelChangeLeader,this.cancelChangeLeaderResult); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_GetGuildInfo,this.getGuildInfo); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Desc_Update,this.updateDescResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Notice_Update,this.updateNoticeResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_ChangeQQGroup,this.changeQQGroupResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Upgrade_Result,this.upgradeGuildResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_cancelDismiss,this.cancelDismissResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_dismiss,this.dismissResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_changeLeader,this.changeLeaderResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_cancelChangeLeader,this.cancelChangeLeaderResult); + if(Boolean(this.timer) && this.timer.running) + { + this.clearTimer(); + } + if(Boolean(this.guildEventListUI) && contains(this.guildEventListUI)) + { + removeChild(this.guildEventListUI); + } + if(Boolean(this.unionMerge) && contains(this.unionMerge)) + { + removeChild(this.unionMerge); + } + if(Boolean(this.myGuildMemListUI) && contains(this.myGuildMemListUI)) + { + removeChild(this.myGuildMemListUI); + } + if(Boolean(this.guildLevelUpUI) && contains(this.guildLevelUpUI)) + { + removeChild(this.guildLevelUpUI); + } + if(Boolean(this.guildOfferUI) && contains(this.guildOfferUI)) + { + removeChild(this.guildOfferUI); + } + } + + private function getGuildView() : void + { + ConnectService.getInstance().guildService.viewGuildInfo(); + } + + private function getGuildInfo(param1:GuildEvent) : void + { + if(param1.rankPage == 0) + { + this.guild = param1.guildObj.guild; + this.isLeader = int(param1.guildObj.isLeader); + this.guildRight = param1.guildObj.guildRight; + this.guildName.text = this.guild.name; + this.countryText.text = this.guild.countryName; + this.flagText.text = this.guild.flag; + this.townNums.text = this.guild.capital.toString(); + this.guildLevel.text = this.guild.level.toString(); + this.rankText.text = this.guild.ladder.toString(); + this.honorText.text = this.guild.honour.toString(); + this.leaderName.text = this.guild.leaderName.toString(); + this.guildMems.text = this.guild.memberCount + "/" + param1.guildObj.maxMemberNum; + this.constru.text = PublicMethod.getStr2(this.guild.construction); + this.propertyNum.text = this.guild.propertyNum.toString(); + if(this.guild.QQGroup) + { + this.qqQun.setText(this.guild.QQGroup.toString()); + } + this.guildDescStr = this.guild.guildDesc; + this.guildNoticeStr = this.guild.guildNotice; + this.guildDesc.setText(this.guild.guildDesc); + this.guildNotice.setText(this.guild.guildNotice); + this.updateRight(); + this.loadBar.visible = false; + this.btn12.visible = false; + this.btn12.setEnable(); + if(param1.guildObj.upgradeTimeLeft) + { + this.upName.setTitleName("联盟升级"); + this.loadBar.visible = true; + this.guildUpFullTime = param1.guildObj.upgradeFullTime; + this.guildLeftUpTime = param1.guildObj.upgradeTimeLeft; + this.loadBar.setMaxValue(this.guildUpFullTime); + this.btn7.setUnEnable(); + this.startTime(); + } + else + { + this.btn7.setEnable(); + } + if(this.guild.dismissState == 1) + { + this.loadBar.visible = true; + this.btn12.visible = true; + this.btn12.onClick = this.cancelDismiss; + this.upName.setTitleName("联盟解散"); + if(this.isLeader == 1) + { + this.btn12.setEnable(); + } + else + { + this.btn12.setUnEnable(); + } + this.dismissTime = this.guild.leftDismissTime; + this.loadBar.setMaxValue(this.dismissTime); + this.startTime(); + } + else + { + this.btn12.visible = false; + this.dismissTime = 0; + } + if(param1.guildObj.changeLeaderTimeLeft) + { + this.loadBar.visible = true; + this.btn12.visible = true; + this.upName.setTitleName("联盟禅让"); + this.btn12.onClick = this.cancelChangeLeader; + this.changeLeaderTime = int(param1.guildObj.changeLeaderTimeLeft); + if(this.isLeader == 1) + { + this.btn12.setEnable(); + } + else + { + this.btn12.setUnEnable(); + } + this.loadBar.setMaxValue(this.changeLeaderTime); + this.startTime(); + } + else + { + this.changeLeaderTime = 0; + } + } + } + + private function startTime() : void + { + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.enterFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function enterFrame(param1:TimerEvent) : void + { + if(this.dismissTime > 0) + { + this.loadBar.setCurTime(this.dismissTime); + --this.dismissTime; + if(this.dismissTime <= 0) + { + this.dismissTime = -1; + this.getGuildView(); + ConnectService.getInstance().castleService.getUserData(); + } + } + if(this.changeLeaderTime > 0) + { + this.loadBar.setCurTime(this.changeLeaderTime); + --this.changeLeaderTime; + if(this.changeLeaderTime <= 0) + { + this.changeLeaderTime = -1; + this.getGuildView(); + } + } + if(this.guildLeftUpTime > 0) + { + this.loadBar.setCurTime(this.guildLeftUpTime); + --this.guildLeftUpTime; + if(this.guildLeftUpTime <= 0) + { + this.guildLeftUpTime = -1; + this.getGuildView(); + } + } + if(this.dismissTime < 0 && this.changeLeaderTime < 0 && this.guildLeftUpTime < 0) + { + this.clearTimer(); + } + } + + private function clearTimer() : void + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.enterFrame); + this.timer = null; + } + + private function updateRight() : void + { + if(this.guildRight.upgradeGuild == 1) + { + this.btn7.setEnable(); + } + else + { + this.btn7.setUnEnable(); + } + if(this.guildRight.duty == 1) + { + this.btn11.setEnable(); + this.qqQun.setTextInput(true); + this.btn4.setEnable(); + this.btn5.setEnable(); + this.btn8.setEnable(); + this.btn6.setUnEnable(); + } + else + { + this.btn11.setUnEnable(); + this.qqQun.setTextInput(false); + this.btn4.setUnEnable(); + this.btn5.setUnEnable(); + this.btn8.setUnEnable(); + this.btn6.setEnable(); + } + if(this.guildRight.changeInfoNotice == 1) + { + this.editDescBtn.visible = true; + this.editNoticeBtn.visible = true; + } + else + { + this.editDescBtn.visible = false; + this.editNoticeBtn.visible = false; + } + if(this.guildRight.permitApply == 1) + { + this.btn1.setEnable(); + } + else + { + this.btn1.setUnEnable(); + } + if(this.guildRight.inviteMember == 1) + { + this.btn2.setEnable(); + } + else + { + this.btn2.setUnEnable(); + } + if(this.guildRight.duty == 1) + { + this.btn4.setEnable(); + } + else + { + this.btn4.setUnEnable(); + } + } + + private function openApplyList(param1:MouseEvent) : void + { + if(this.guildInviteList == null) + { + this.guildInviteList = new GuildInviteListUI(); + this.guildInviteList.x = -15; + this.guildInviteList.y = -69; + } + addChild(this.guildInviteList); + } + + private function openInviteList(param1:MouseEvent) : void + { + if(this.guildApplyList == null) + { + this.guildApplyList = new GuildApplyListUI(); + this.guildApplyList.x = -15; + this.guildApplyList.y = -69; + } + addChild(this.guildApplyList); + } + + private function openEventList(param1:MouseEvent) : void + { + if(this.guildEventListUI == null) + { + this.guildEventListUI = new GuildEventListUI(); + this.guildEventListUI.x = -15; + this.guildEventListUI.y = -69; + } + addChild(this.guildEventListUI); + } + + private function mergeGuild(param1:MouseEvent) : void + { + if(this.unionMerge == null) + { + this.unionMerge = new UnionMerge(); + this.unionMerge.x = -15; + this.unionMerge.y = -69; + } + addChild(this.unionMerge); + this.unionMerge.initData(); + } + + private function dismissGuild(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确定要解散联盟?",this.configDismissGuild); + } + + private function configDismissGuild() : void + { + ConnectService.getInstance().guildService.dismissGuild(); + } + + private function confirmExit(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确认退出该联盟?",this.exitGuild); + } + + private function exitGuild() : void + { + this.btn6.setUnEnable(); + ConnectService.getInstance().guildService.quitGuild(); + } + + private function upgradeGuild(param1:MouseEvent) : void + { + if(this.guild.level >= 10) + { + MessageBoxUI.getInstance().addMessage("联盟最高等级为10,不能再升级了。"); + return; + } + if(this.guildLevelUpUI == null) + { + this.guildLevelUpUI = new GuildLevelUpUI(); + this.guildLevelUpUI.x = int(width / 2 - this.guildLevelUpUI.width / 2); + this.guildLevelUpUI.y = int(height / 2 - this.guildLevelUpUI.height / 2); + } + addChild(this.guildLevelUpUI); + this.guildLevelUpUI.load(); + } + + private function changeGuildLeader(param1:MouseEvent) : void + { + if(this.changeGuildLeaderUI == null) + { + this.changeGuildLeaderUI = new ChangeGuildLeader(); + this.changeGuildLeaderUI.x = int(width / 2 - this.changeGuildLeaderUI.width / 2); + this.changeGuildLeaderUI.y = int(height / 2 - this.changeGuildLeaderUI.height / 2); + } + addChild(this.changeGuildLeaderUI); + } + + private function openGuildList(param1:MouseEvent) : void + { + if(this.myGuildMemListUI == null) + { + this.myGuildMemListUI = new MyGuildMemListUI(); + this.myGuildMemListUI.x = -15; + this.myGuildMemListUI.y = -69; + } + addChild(this.myGuildMemListUI); + } + + private function openContributeUI(param1:MouseEvent) : void + { + if(this.guildOfferUI == null) + { + this.guildOfferUI = new GuildOfferUI(); + this.guildOfferUI.x = -15; + this.guildOfferUI.y = -69; + } + addChild(this.guildOfferUI); + } + + private function saveGuildQQGroup(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.qqQun.getText()); + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("群号不能为空"); + return; + } + ConnectService.getInstance().guildService.changeQQGroup(_loc2_); + } + + private function cancelDismiss(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.resumeGuild(); + } + + private function cancelDismissResult(param1:GuildEvent) : void + { + this.getGuildView(); + } + + private function dismissResult(param1:GuildEvent) : void + { + this.getGuildView(); + } + + private function changeLeaderResult(param1:GuildEvent) : void + { + this.getGuildView(); + } + + private function cancelChangeLeader(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.cancelChangeLeader(); + } + + private function cancelChangeLeaderResult(param1:GuildEvent) : void + { + this.getGuildView(); + } + + private function editDescUI(param1:MouseEvent) : void + { + if(this.guild) + { + if(this.editGuildDescUI == null) + { + this.editGuildDescUI = new EditGuildDescUI(); + this.editGuildDescUI.x = int(width / 2 - this.editGuildDescUI.width / 2) + 30; + this.editGuildDescUI.y = int(height / 2 - this.editGuildDescUI.height / 2); + } + addChild(this.editGuildDescUI); + this.editGuildDescUI.setData(this.guildDescStr); + } + } + + private function updateDescResult(param1:GuildEvent) : void + { + this.guildDescStr = param1.str; + this.guildDesc.setText(this.guildDescStr); + } + + private function editNoticeUI(param1:MouseEvent) : void + { + if(this.guild) + { + if(this.editGuildNoticeUI == null) + { + this.editGuildNoticeUI = new EditGuildNoticeUI(); + this.editGuildNoticeUI.x = int(width / 2 - this.editGuildNoticeUI.width / 2) + 30; + this.editGuildNoticeUI.y = int(height / 2 - this.editGuildNoticeUI.height / 2); + } + addChild(this.editGuildNoticeUI); + this.editGuildNoticeUI.setData(this.guildNoticeStr); + } + } + + private function updateNoticeResult(param1:GuildEvent) : void + { + this.guildNoticeStr = param1.str; + this.guildNotice.setText(this.guildNoticeStr); + } + + private function changeQQGroupResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("修改成功"); + var _loc2_:String = param1.str; + this.qqQun.setText(_loc2_); + } + + private function upgradeGuildResult(param1:GuildEvent) : void + { + this.getGuildView(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildPage2.as b/flash_decompiled/com/view/ui/guild/GuildPage2.as new file mode 100644 index 0000000..6412db3 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildPage2.as @@ -0,0 +1,370 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildTransEvent; + import com.newdata.user.NewUserData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIPageMc; + import com.view.newui.UITabBtn; + import com.view.newui.UITable; + import com.view.newui.UIWindowBg; + import com.view.ui.guild.mc.GuidTradeMc; + import fl.containers.ScrollPane; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GuildPage2 extends GuildBasePage + { + + private var btnArr:Array; + + private var bg2:UIWindowBg; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var shareNum_txt:TextField; + + private var itemVec:Vector.; + + private var itemMc:Sprite; + + private var itemScrollPane:ScrollPane; + + private var currType:int = 99; + + private var allitemList:Array; + + private var currPage:int = 1; + + private var buyItemUI:GuildBuyItemUI; + + private var sellItemUI:GuildTradeUI; + + private var canDo:Boolean = true; + + public function GuildPage2() + { + var _loc5_:int = 0; + var _loc6_:UITabBtn = null; + var _loc7_:Array = null; + var _loc8_:Array = null; + var _loc9_:TextField = null; + var _loc10_:TextField = null; + var _loc11_:UIButton = null; + var _loc12_:int = 0; + var _loc13_:GuidTradeMc = null; + this.btnArr = new Array(); + this.allitemList = new Array(); + super(); + var _loc1_:UITabBtn = new UITabBtn("全 部",2); + var _loc2_:UITabBtn = new UITabBtn("装 备",2); + var _loc3_:UITabBtn = new UITabBtn("用 品",2); + var _loc4_:UITabBtn = new UITabBtn("其 他",2); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + for each(_loc6_ in this.btnArr) + { + addChild(_loc6_); + _loc6_.x = 11 + _loc5_ * 66; + _loc6_.onClick = this.clickTabBtn; + _loc5_++; + } + _loc7_ = ["物品名称","数量","所有者","总价","操 作"]; + _loc8_ = [137,110,130,120,136]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc7_,_loc8_); + addChild(this.tableMc); + this.tableMc.x = 1; + this.tableMc.y = 25; + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc9_.text = "当前联盟贡献度"; + addChild(_loc9_); + _loc9_.x = 310; + _loc9_.y = 5; + this.shareNum_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(this.shareNum_txt); + this.shareNum_txt.x = _loc9_.x + _loc9_.width; + this.shareNum_txt.y = _loc9_.y; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,350); + _loc10_.text = "玩家可用贡献度来购买道具,也可以通过拍卖道具获得贡献度。"; + addChild(_loc10_); + _loc10_.x = 5; + _loc10_.y = this.tableMc.y + this.tableMc.height + 5; + _loc11_ = new UIButton("我要卖",2); + addChild(_loc11_); + _loc11_.x = 420; + _loc11_.y = _loc10_.y - 4; + _loc11_.onClick = this.openSellUI; + this.pageMc = new UIPageMc(); + addChild(this.pageMc); + this.pageMc.x = 530; + this.pageMc.y = _loc10_.y; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.itemVec = new Vector.(); + _loc12_ = 0; + while(_loc12_ < 12) + { + _loc13_ = new GuidTradeMc(); + this.tableMc.addChild(_loc13_); + this.itemVec.push(_loc13_); + _loc13_.y = 25 + _loc12_ * 25; + _loc13_.x = 4; + _loc13_.buyBtn.onClick = this.openBuyUI; + _loc13_.cancelSellItemF = this.cancelSellItem; + _loc12_++; + } + _loc1_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_Items_list,this.getTransItemsList); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_Items_cacelTrade,this.refresh); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_Items_Trade,this.refresh); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_buyItem,this.refresh); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + this.getEquipList(); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + if(Boolean(this.buyItemUI) && contains(this.buyItemUI)) + { + removeChild(this.buyItemUI); + } + } + + private function clickTabBtn(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(_loc4_ != _loc2_) + { + _loc4_.select = false; + continue; + } + _loc4_.select = true; + switch(_loc3_) + { + case 0: + this.currPage = 1; + this.currType = 99; + break; + case 1: + this.currPage = 1; + this.currType = 6; + break; + case 2: + this.currPage = 1; + this.currType = 7; + break; + case 3: + this.currPage = 1; + this.currType = -100; + } + } + if(this.allitemList.length == 0) + { + this.getEquipList(); + } + else + { + this.getItemListByType(); + } + } + + private function refresh(param1:GuildTransEvent) : void + { + this.getEquipList(); + } + + private function getEquipList() : void + { + if(this.canDo) + { + this.canDo = false; + ConnectService.getInstance().guildTransService.getPaginationGuildTrans(this.currType); + } + } + + private function getTransItemsList(param1:GuildTransEvent) : void + { + this.canDo = true; + this.shareNum_txt.text = param1.itemObj.pointOfOffer; + this.allitemList = param1.itemObj.dataResult as Array; + if(this.allitemList == null) + { + this.allitemList = new Array(); + } + this.getItemListByType(); + } + + public function nextPage() : void + { + this.currPage += 1; + this.getItemListByType(); + } + + public function prePage() : void + { + --this.currPage; + this.getItemListByType(); + } + + private function getItemListByType() : void + { + var _loc4_:int = 0; + var _loc5_:Array = null; + var _loc6_:Object = null; + var _loc1_:Array = new Array(); + if(this.allitemList.length >= 0) + { + switch(this.currType) + { + case 99: + _loc4_ = 1 + (this.allitemList.length - 1) / 12; + if(_loc4_ <= 0) + { + _loc4_ = 1; + } + this.pageMc.setPageCount(_loc4_); + if(this.currPage > _loc4_) + { + this.currPage = _loc4_; + } + _loc1_ = this.allitemList.slice((this.currPage - 1) * 12,this.currPage * 12); + break; + case 6: + _loc5_ = new Array(); + for each(_loc6_ in this.allitemList) + { + if(_loc6_.itemType == 6) + { + _loc5_.push(_loc6_); + } + } + _loc4_ = 1 + (_loc5_.length - 1) / 12; + if(_loc4_ <= 0) + { + _loc4_ = 1; + } + this.pageMc.setPageCount(_loc4_); + if(this.currPage > _loc4_) + { + this.currPage = _loc4_; + } + _loc1_ = _loc5_.slice((this.currPage - 1) * 12,this.currPage * 12); + break; + case 7: + _loc5_ = new Array(); + for each(_loc6_ in this.allitemList) + { + if(_loc6_.itemType == 7) + { + _loc5_.push(_loc6_); + } + } + _loc4_ = 1 + (_loc5_.length - 1) / 12; + if(_loc4_ <= 0) + { + _loc4_ = 1; + } + this.pageMc.setPageCount(_loc4_); + if(this.currPage > _loc4_) + { + this.currPage = _loc4_; + } + _loc1_ = _loc5_.slice((this.currPage - 1) * 12,this.currPage * 12); + break; + case -100: + _loc5_ = new Array(); + for each(_loc6_ in this.allitemList) + { + if(_loc6_.itemType != 6 && _loc6_.itemType != 7) + { + _loc5_.push(_loc6_); + } + } + _loc4_ = 1 + (_loc5_.length - 1) / 12; + if(_loc4_ <= 0) + { + _loc4_ = 1; + } + this.pageMc.setPageCount(_loc4_); + if(this.currPage > _loc4_) + { + this.currPage = _loc4_; + } + _loc1_ = _loc5_.slice((this.currPage - 1) * 12,this.currPage * 12); + } + } + var _loc2_:int = NewUserData.getUser().userId; + this.pageMc.setPage(this.currPage); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + if(_loc1_[_loc3_]) + { + this.itemVec[_loc3_].setData(_loc1_[_loc3_],_loc2_); + } + else + { + this.itemVec[_loc3_].setData(null); + } + _loc3_++; + } + } + + private function openBuyUI(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().userId; + var _loc3_:GuidTradeMc = param1.currentTarget.parent as GuidTradeMc; + if(_loc3_.itemObj) + { + if(_loc3_.itemObj.sellerUserId != _loc2_) + { + if(this.buyItemUI == null) + { + this.buyItemUI = new GuildBuyItemUI(); + this.buyItemUI.x = int(width / 2 - this.buyItemUI.width / 2); + this.buyItemUI.y = int(height / 2 - this.buyItemUI.height / 2); + } + addChild(this.buyItemUI); + this.buyItemUI.setData(_loc3_.itemObj); + } + } + } + + private function cancelSellItem(param1:int) : void + { + ConnectService.getInstance().guildTransService.cacelTrade(param1,-1); + } + + private function openSellUI(param1:MouseEvent) : void + { + if(this.sellItemUI == null) + { + this.sellItemUI = new GuildTradeUI(); + this.sellItemUI.x = -11 - 4; + this.sellItemUI.y = -65 - 4; + } + addChild(this.sellItemUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildPage3.as b/flash_decompiled/com/view/ui/guild/GuildPage3.as new file mode 100644 index 0000000..ea06ed1 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildPage3.as @@ -0,0 +1,405 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.guild.event.GuildEvent; + import com.control.province.event.ProvinceEvent; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.guild.mc.GuildEffMc; + import com.view.ui.guild.mc.SpecialItem; + import com.view.ui.iron.mc.MarrowMc; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GuildPage3 extends GuildBasePage + { + + private var jlTxt:TextField; + + private var gxz1:TextField; + + private var gxz2:TextField; + + private var add1:TextField; + + private var add2:TextField; + + private var add3:TextField; + + private var add4:TextField; + + private var add5:TextField; + + private var getBtn1:UISmallBtn; + + private var getBtn2:UISmallBtn; + + private var getBtn3:UISmallBtn; + + private var marrowVec:Vector.; + + private var tableMc1:UITable; + + private var tableMc:UITable; + + private var getBtn:UISmallBtn; + + private var effVec:Vector.; + + private var specialVec:Vector.; + + private var getViewMap:Boolean; + + private var confirm:String; + + public function GuildPage3() + { + var _loc9_:TextField = null; + var _loc10_:int = 0; + var _loc12_:TextFormat = null; + var _loc19_:GuildEffMc = null; + var _loc20_:SpecialItem = null; + var _loc21_:MarrowMc = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(200,367); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(408,367); + addChild(_loc2_); + _loc2_.x = _loc1_.x + _loc1_.width + 3; + var _loc3_:UITitleBg = new UITitleBg("日常奖励",_loc1_.width); + _loc1_.addChild(_loc3_); + _loc3_.x = int(_loc1_.width / 2 - _loc3_.width / 2); + var _loc4_:UITitleBg = new UITitleBg("资源加成",_loc2_.width); + _loc2_.addChild(_loc4_); + _loc4_.x = int(_loc2_.width / 2 - _loc4_.width / 2); + var _loc5_:UITitleBg = new UITitleBg("特殊奖励",_loc2_.width); + var _loc6_:Array = ["分类","粮食产量","木材产量","石料产量","青铜产量","铜币产量"]; + var _loc7_:Array = [67,70,70,70,70,70]; + this.tableMc1 = new UITable(); + this.tableMc1.install(6,_loc6_,_loc7_); + _loc2_.addChild(this.tableMc1); + this.tableMc1.x = 2; + this.tableMc1.y = 25; + var _loc8_:TextFormat = PublicMethod.getCenterTextFormat(); + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,63); + this.tableMc1.addChild(_loc9_); + _loc9_.x = 4; + _loc9_.y = 28; + _loc9_.defaultTextFormat = _loc8_; + _loc9_.text = "联盟加成"; + this.add1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.tableMc1.addChild(this.add1); + this.add1.x = _loc9_.x + _loc9_.width; + this.add1.y = _loc9_.y; + this.add2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.tableMc1.addChild(this.add2); + this.add2.x = this.add1.x + this.add1.width; + this.add2.y = _loc9_.y; + this.add3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.tableMc1.addChild(this.add3); + this.add3.x = this.add2.x + this.add2.width; + this.add3.y = this.add1.y; + this.add4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.tableMc1.addChild(this.add4); + this.add4.x = this.add3.x + this.add3.width; + this.add4.y = this.add1.y; + this.add5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.tableMc1.addChild(this.add5); + this.add5.x = this.add4.x + this.add4.width; + this.add5.y = this.add1.y; + this.add1.defaultTextFormat = _loc8_; + this.add2.defaultTextFormat = _loc8_; + this.add3.defaultTextFormat = _loc8_; + this.add4.defaultTextFormat = _loc8_; + this.add5.defaultTextFormat = _loc8_; + this.effVec = new Vector.(); + _loc10_ = 0; + while(_loc10_ < 5) + { + _loc19_ = new GuildEffMc(); + this.effVec.push(_loc19_); + this.tableMc1.addChild(_loc19_); + _loc19_.x = 4; + _loc19_.y = 54 + _loc10_ * 25; + _loc10_++; + } + _loc2_.addChild(_loc5_); + _loc5_.x = int(_loc2_.width / 2 - _loc5_.width / 2); + _loc5_.y = 200; + _loc6_ = ["分类","效果","操作"]; + _loc7_ = [62,285,70]; + this.tableMc = new UITable(); + this.tableMc.install(5,_loc6_,_loc7_); + _loc2_.addChild(this.tableMc); + this.tableMc.x = 2; + this.tableMc.y = _loc5_.y + 24; + this.specialVec = new Vector.(); + var _loc11_:int = 0; + while(_loc11_ < 5) + { + _loc20_ = new SpecialItem(); + this.specialVec.push(_loc20_); + this.tableMc.addChild(_loc20_); + _loc20_.y = 28 + _loc11_ * 25; + _loc20_.x = 4; + _loc11_++; + } + _loc12_ = new TextFormat(); + _loc12_.leading = 4; + this.jlTxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,195); + this.jlTxt.height = 70; + this.jlTxt.wordWrap = true; + this.jlTxt.multiline = true; + _loc1_.addChild(this.jlTxt); + this.jlTxt.x = 10; + this.jlTxt.y = 30; + this.jlTxt.defaultTextFormat = _loc12_; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,88); + _loc1_.addChild(_loc13_); + _loc13_.x = 10; + _loc13_.y = 100; + _loc13_.text = "需耗费贡献值:"; + this.gxz1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + _loc1_.addChild(this.gxz1); + this.gxz1.x = _loc13_.x + _loc13_.width; + this.gxz1.y = _loc13_.y; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,88); + _loc1_.addChild(_loc14_); + _loc14_.x = _loc13_.x; + _loc14_.y = _loc13_.y + 25; + _loc14_.text = "拥有的贡献值:"; + this.gxz2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + _loc1_.addChild(this.gxz2); + this.gxz2.x = this.gxz1.x; + this.gxz2.y = _loc14_.y; + this.getBtn = new UISmallBtn("领 取",2); + _loc1_.addChild(this.getBtn); + this.getBtn.x = 72; + this.getBtn.y = 153; + this.getBtn.visible = false; + this.getBtn.onClick = this.giveGuildAward; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,190); + _loc15_.height = 70; + _loc15_.wordWrap = true; + _loc15_.multiline = true; + _loc1_.addChild(_loc15_); + _loc15_.x = 10; + _loc15_.y = 180; + _loc15_.defaultTextFormat = _loc12_; + _loc15_.text = "1.背包已满的时候领取福利,无法获得玉璧。2.联盟福利每天最多领取一次。"; + this.marrowVec = new Vector.(); + _loc10_ = 0; + while(_loc10_ < 3) + { + _loc21_ = new MarrowMc(); + _loc1_.addChild(_loc21_); + this.marrowVec.push(_loc21_); + _loc21_.x = 14; + _loc21_.y = 250 + _loc10_ * 38; + _loc10_++; + } + this.getBtn1 = new UISmallBtn("领 取",2); + this.getBtn1.x = 50; + this.getBtn1.y = 256; + this.getBtn2 = new UISmallBtn("领 取",2); + this.getBtn2.x = this.getBtn1.x; + this.getBtn2.y = this.getBtn1.y + 38; + this.getBtn3 = new UISmallBtn("领 取",2); + this.getBtn3.x = this.getBtn1.x; + this.getBtn3.y = this.getBtn2.y + 38; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(65280,90); + _loc16_.text = "需50万贡献值"; + _loc1_.addChild(_loc16_); + _loc16_.x = 102; + _loc16_.y = this.getBtn1.y + 3; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(65280,90); + _loc17_.text = "需100万贡献值"; + _loc1_.addChild(_loc17_); + _loc17_.x = _loc16_.x; + _loc17_.y = this.getBtn2.y + 3; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(65280,90); + _loc18_.text = "需150万贡献值"; + _loc1_.addChild(_loc18_); + _loc18_.x = _loc16_.x; + _loc18_.y = this.getBtn3.y + 3; + addChild(this.getBtn1); + addChild(this.getBtn2); + addChild(this.getBtn3); + this.getBtn1.onClick = this.getItem1; + this.getBtn2.onClick = this.getItem2; + this.getBtn3.onClick = this.getItem3; + } + + private function getItem1(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.giveGuildItem(1); + } + + private function getItem2(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.giveGuildItem(2); + } + + private function getItem3(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.giveGuildItem(3); + } + + private function getGuildItemEffResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("领取成功"); + this.getGuildEffect(); + } + + override public function addEvent(param1:Event) : void + { + this.confirm = ""; + super.addEvent(param1); + this.getGuildEffect(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Effect_View,this.getGuildEffView); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Effect_Give,this.giveGuildEffResult); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_receiveProvinceAward,this.receiveGuildEffResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Effect_GetItem,this.getGuildItemEffResult); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Effect_View,this.getGuildEffView); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Effect_Give,this.giveGuildEffResult); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_receiveProvinceAward,this.receiveGuildEffResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Effect_GetItem,this.getGuildItemEffResult); + } + + private function receiveGuildEffResult(param1:ProvinceEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + MessageBoxUI.getInstance().addMessage("领取成功"); + this.getGuildEffect(); + } + + private function getGuildEffView(param1:GuildEvent) : void + { + var _loc5_:GuildEffMc = null; + var _loc6_:SpecialItem = null; + var _loc8_:* = undefined; + var _loc9_:* = undefined; + if(this.getViewMap == false) + { + this.getViewMap = true; + this.marrowVec[0].setViewMap(param1.guildObj.viewMap.item1,true); + this.marrowVec[1].setViewMap(param1.guildObj.viewMap.item2,true); + this.marrowVec[2].setViewMap(param1.guildObj.viewMap.item3,true); + } + var _loc2_:int = int(param1.guildObj.guildLvNum.awardMoney); + var _loc3_:int = int(param1.guildObj.guildLvNum.awardExperience); + this.jlTxt.htmlText = "铜币:" + _loc2_ + "
武将经验池:" + _loc3_ + "
随机获取和氏左璧和氏右璧"; + this.confirm = param1.guildObj.confirmRes; + this.gxz1.text = param1.guildObj.guildLvNum.offerAward; + this.gxz2.text = param1.guildObj.guildOffer; + this.getBtn.visible = true; + if(param1.guildObj.awardAvail == 1) + { + this.getBtn.setEnable(); + } + else + { + this.getBtn.setUnEnable(); + } + this.add1.text = param1.guildObj.guildLvNum.affectFoodSpeed + "%"; + this.add2.text = param1.guildObj.guildLvNum.affectWoodSpeed + "%"; + this.add3.text = param1.guildObj.guildLvNum.affectStoneSpeed + "%"; + this.add4.text = param1.guildObj.guildLvNum.affectBronzeSpeed + "%"; + this.add5.text = param1.guildObj.guildLvNum.affectMoneySpeed + "%"; + var _loc4_:Array = param1.guildObj.provinceEffect as Array; + for each(_loc5_ in this.effVec) + { + _loc5_.setData(null); + } + for each(_loc6_ in this.specialVec) + { + _loc6_.setData(null); + } + if(_loc4_ == null || _loc4_.length == 0) + { + return; + } + var _loc7_:int = 0; + for(_loc8_ in _loc4_) + { + if(_loc4_[_loc8_].hasEffect == "0") + { + continue; + } + this.effVec[_loc7_].setData(_loc4_[_loc8_]); + if(++_loc7_ > 4) + { + break; + } + } + _loc7_ = 0; + for(_loc9_ in _loc4_) + { + if(_loc4_[_loc9_].hasAward == "0") + { + continue; + } + this.specialVec[_loc7_].setData(_loc4_[_loc9_]); + if(++_loc7_ > 3) + { + break; + } + } + } + + private function getGuildEffect() : void + { + if(this.getViewMap) + { + ConnectService.getInstance().guildService.getGuildEffect(0); + } + else + { + ConnectService.getInstance().guildService.getGuildEffect(1); + } + } + + private function giveGuildAward(param1:MouseEvent) : void + { + if(this.confirm != "" || this.confirm.length > 0) + { + MessageBoxUI.getInstance().confirmMsg(this.confirm,this.giveGuildAwardSubmit); + } + else + { + this.giveGuildAwardSubmit(); + } + } + + private function giveGuildAwardSubmit() : void + { + ConnectService.getInstance().guildService.giveGuildAward(); + } + + private function giveGuildEffResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("领取联盟福利成功"); + this.getGuildEffect(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildPage4.as b/flash_decompiled/com/view/ui/guild/GuildPage4.as new file mode 100644 index 0000000..f1fd1d8 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildPage4.as @@ -0,0 +1,373 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.tip.GuildBuiUpTip; + import com.view.tip.MulTipTitle; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class GuildPage4 extends GuildBasePage + { + + private var buiTip0:MulTipTitle; + + private var buiTip1:MulTipTitle; + + private var buiTip2:MulTipTitle; + + private var buiTip3:MulTipTitle; + + private var buiTip4:MulTipTitle; + + private var buiTip5:MulTipTitle; + + private var buiTip6:MulTipTitle; + + private var buiTip7:MulTipTitle; + + private var buiTip8:MulTipTitle; + + private var levelTip0:GuildBuiUpTip; + + private var levelTip1:GuildBuiUpTip; + + private var levelTip2:GuildBuiUpTip; + + private var levelTip3:GuildBuiUpTip; + + private var levelTip4:GuildBuiUpTip; + + private var levelTip5:GuildBuiUpTip; + + private var levelTip6:GuildBuiUpTip; + + private var levelTip7:GuildBuiUpTip; + + private var itemArr:Array; + + private var levelArr:Array; + + private var buildArr:Array; + + private var leftUpTime:int; + + private var timer:Timer; + + private var timerText:TextField; + + private var boxView:GuildBoxView; + + private var techView:GuildTechUI; + + private var unionArmy:UnionArmy; + + private var guildAnnounce:GuildAnnounce; + + public function GuildPage4() + { + var _loc1_:MovieClip = null; + var _loc2_:* = undefined; + super(); + guildMc = gameRes.getMovieClip(ClassConfig.guild_page_4,gameRes.getGuildInfo()); + addChild(guildMc); + this.itemArr = new Array(); + this.itemArr.push(guildMc.item_0); + this.itemArr.push(guildMc.item_1); + this.itemArr.push(guildMc.item_2); + this.itemArr.push(guildMc.item_3); + this.itemArr.push(guildMc.item_4); + this.itemArr.push(guildMc.item_5); + this.itemArr.push(guildMc.item_6); + this.itemArr.push(guildMc.item_7); + this.itemArr.push(guildMc.item_8); + this.itemArr.push(guildMc.item_10); + for each(_loc1_ in this.itemArr) + { + _loc1_.gotoAndStop(1); + _loc1_.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + _loc1_.addEventListener(MouseEvent.MOUSE_OVER,this.mouseOver); + _loc1_.addEventListener(MouseEvent.CLICK,this.clickBui); + } + this.levelArr = new Array(); + this.levelArr.push(guildMc.level_0); + this.levelArr.push(guildMc.level_1); + this.levelArr.push(guildMc.level_2); + this.levelArr.push(guildMc.level_3); + this.levelArr.push(guildMc.level_4); + this.levelArr.push(guildMc.level_5); + this.levelArr.push(guildMc.level_6); + this.levelArr.push(guildMc.level_7); + for(_loc2_ in this.levelArr) + { + this["levelTip" + _loc2_] = new GuildBuiUpTip(this.levelArr[_loc2_].lvup,face.stage,face.tip_bg); + this.levelArr[_loc2_].lvup.addEventListener(MouseEvent.CLICK,this.upgradeGuildBui); + } + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + this.getBuildView(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Build_View,this.getBuildViewResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Bui_Upgrade,this.upBuiResult); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Build_View,this.getBuildViewResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Bui_Upgrade,this.upBuiResult); + if(Boolean(this.unionArmy) && contains(this.unionArmy)) + { + removeChild(this.unionArmy); + } + } + + private function getBuildView() : void + { + ConnectService.getInstance().guildService.getGuildBuiInfo(); + } + + private function mouseOver(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + _loc2_.gotoAndStop(2); + } + + private function mouseOut(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + _loc2_.gotoAndStop(1); + } + + private function getBuildViewResult(param1:GuildEvent) : void + { + var _loc3_:Boolean = false; + var _loc4_:* = undefined; + var _loc5_:MulTipTitle = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc8_:int = 0; + var _loc9_:int = 0; + var _loc2_:int = int(param1.buildObj.dutyOfGuild); + this.buildArr = param1.buildObj.buiMapList; + for(_loc4_ in this.buildArr) + { + if(this.buildArr[_loc4_].state == 1) + { + this.leftUpTime = this.buildArr[_loc4_].timeLeft; + _loc3_ = true; + this.startTime(guildMc["level_" + _loc4_].lvupTime); + } + _loc5_ = this["buiTip" + _loc4_]; + if(_loc5_ == null) + { + _loc5_ = new MulTipTitle(guildMc["item_" + _loc4_],face.stage,face.tip_bg,this.buildArr[_loc4_].buildingDesc); + } + else + { + _loc5_.setValue(this.buildArr[0].buildingDesc); + } + _loc6_ = this.buildArr[_loc4_].bui.buiName; + _loc7_ = this.buildArr[_loc4_].bui.buiId; + if(guildMc["level_" + _loc4_] == null) + { + continue; + } + _loc8_ = int(this.buildArr[_loc4_].buiLv); + _loc9_ = int(this.buildArr[_loc4_].bui.maxLv); + if(_loc8_ >= _loc9_) + { + this["levelTip" + _loc4_].isLevelMax("已达最高等级" + _loc9_ + "级"); + } + else + { + this["levelTip" + _loc4_].setData(this.buildArr[_loc4_]); + } + if(_loc7_ == "10120010") + { + guildMc["level_" + _loc4_].nme.text = _loc6_; + } + else + { + guildMc["level_" + _loc4_].nme.text = _loc6_ + "(" + _loc8_ + "级)"; + } + } + if(_loc2_ >= 2) + { + this.hiddenUpBtn(false); + } + else if(!_loc3_) + { + this.hiddenUpBtn(true); + } + else + { + this.hiddenUpBtn(false); + } + } + + private function hiddenUpBtn(param1:Boolean) : void + { + var _loc2_:MovieClip = null; + for each(_loc2_ in this.levelArr) + { + _loc2_.lvup.visible = param1; + } + } + + private function startTime(param1:TextField) : void + { + this.timerText = param1; + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.enterFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function enterFrame(param1:TimerEvent) : void + { + --this.leftUpTime; + this.timerText.text = PublicMethod.getTime(this.leftUpTime); + if(this.leftUpTime <= 0) + { + this.timerText.text = ""; + this.timer.stop(); + this.getBuildView(); + } + } + + private function createBoxUI() : void + { + if(this.boxView == null) + { + this.boxView = new GuildBoxView(); + this.boxView.x = -15; + this.boxView.y = -69; + } + } + + private function createTechUI() : void + { + if(this.techView == null) + { + this.techView = new GuildTechUI(); + this.techView.x = -15; + this.techView.y = -69; + } + } + + private function clickBui(param1:MouseEvent) : void + { + var _loc7_:Object = null; + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + var _loc3_:int = int(_loc2_.name.substring(5)); + var _loc4_:String = ""; + var _loc5_:int = 0; + var _loc6_:int = 0; + if(_loc3_ < this.buildArr.length) + { + _loc7_ = this.buildArr[_loc3_].bui; + _loc4_ = _loc7_.buiName; + _loc5_ = int(_loc7_.buiId); + _loc6_ = int(this.buildArr[_loc3_].buiLv); + } + if(_loc2_ != guildMc.item_10 && _loc2_ != guildMc.item_8) + { + if(_loc6_ == 0) + { + MessageBoxUI.getInstance().addMessage(_loc4_ + "建筑等级为0级"); + return; + } + } + switch(_loc2_) + { + case guildMc.item_0: + this.createBoxUI(); + addChild(this.boxView); + break; + case guildMc.item_8: + this.createTechUI(); + addChild(this.techView); + break; + case guildMc.item_10: + this.viewGuildCon(); + break; + case guildMc.item_3: + case guildMc.item_4: + case guildMc.item_5: + case guildMc.item_6: + case guildMc.item_7: + this.unionArmy = UnionArmy.getInstance(); + addChild(this.unionArmy); + this.unionArmy.commonTitle = _loc4_; + this.unionArmy.currBuildId = _loc5_; + this.unionArmy.initData(); + this.unionArmy.x = -15; + this.unionArmy.y = -69; + break; + default: + MessageBoxUI.getInstance().addMessage("尚未开放"); + } + } + + private function upgradeGuildBui(param1:MouseEvent) : void + { + var _loc4_:* = undefined; + var _loc5_:String = null; + var _loc6_:String = null; + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + var _loc3_:int = -1; + for(_loc4_ in this.levelArr) + { + if(_loc2_ == this.levelArr[_loc4_].lvup) + { + _loc3_ = _loc4_; + break; + } + } + if(_loc3_ >= 0) + { + _loc5_ = this.buildArr[_loc3_].bui.buiId; + _loc6_ = "是否确定升级?"; + MessageBoxUI.getInstance().confirmMsg(_loc6_,this.confimUpBui,_loc5_); + } + } + + private function confimUpBui(param1:int) : void + { + ConnectService.getInstance().guildService.upgradeGuildBui(int(param1)); + } + + private function upBuiResult(param1:GuildEvent) : void + { + this.getBuildView(); + } + + private function viewGuildCon() : void + { + if(this.guildAnnounce == null) + { + this.guildAnnounce = new GuildAnnounce(); + this.guildAnnounce.x = int(width / 2 - this.guildAnnounce.width / 2); + this.guildAnnounce.y = 30; + } + addChild(this.guildAnnounce); + this.guildAnnounce.getAnnounceInfo(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildPage5.as b/flash_decompiled/com/view/ui/guild/GuildPage5.as new file mode 100644 index 0000000..a72a5c6 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildPage5.as @@ -0,0 +1,468 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.province.event.ProvinceEvent; + import com.view.Control; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class GuildPage5 extends GuildBasePage + { + + private var countryId:int; + + private var timeStatus:int; + + private var applyObj:Object; + + private var serverTimes:int; + + private var guildName:TextField; + + private var guildLevel:TextField; + + private var rank:TextField; + + private var guildHonor:TextField; + + private var occuProvince:TextField; + + private var otherAppProvince:TextField; + + private var appProvince:TextField; + + private var timetxt:TextField; + + private var applybtn:UIButton; + + private var joinbtn:UIButton; + + private var enterbtn:UIButton; + + private var currAppId:int; + + private var startx:int; + + private var w:int; + + private var passTime:int; + + private var timeCount:int; + + private var start1x:int = 5; + + private var start2x:int = 282; + + private var start3x:int = 466; + + private var start4x:int = 582; + + private var isUpdate:Boolean; + + private var timer:Timer; + + private var selectCityUI:ProSelectCityUI; + + private var proCasListUI:ProCasListUI; + + public function GuildPage5() + { + var _loc7_:int = 0; + var _loc8_:TextField = null; + var _loc10_:TextField = null; + var _loc13_:TextField = null; + var _loc14_:TextField = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(220,230); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(389,230); + addChild(_loc2_); + _loc2_.x = _loc1_.x + _loc1_.width + 3; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(622,124); + addChild(_loc3_); + _loc3_.y = _loc1_.y + _loc1_.height + 3; + var _loc4_:UITitleBg = new UITitleBg("联盟信息",_loc1_.width); + _loc1_.addChild(_loc4_); + _loc4_.x = int(_loc1_.width / 2 - _loc4_.width / 2); + var _loc5_:UITitleBg = new UITitleBg("联盟争夺战规则",_loc2_.width); + _loc2_.addChild(_loc5_); + _loc5_.x = int(_loc2_.width / 2 - _loc5_.width / 2); + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc6_.text = "联盟名称:"; + _loc1_.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = 30; + this.guildName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.guildName); + this.guildName.x = _loc6_.x + _loc6_.width; + this.guildName.y = _loc6_.y; + _loc7_ = 25; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc8_.text = "联盟等级:"; + _loc1_.addChild(_loc8_); + _loc8_.x = _loc6_.x; + _loc8_.y = _loc6_.y + _loc7_; + this.guildLevel = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.guildLevel); + this.guildLevel.x = this.guildName.x; + this.guildLevel.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc9_.text = "联盟排名:"; + _loc1_.addChild(_loc9_); + _loc9_.x = _loc6_.x; + _loc9_.y = _loc8_.y + _loc7_; + this.rank = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.rank); + this.rank.x = this.guildName.x; + this.rank.y = _loc9_.y; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc10_.text = "联盟荣誉:"; + _loc1_.addChild(_loc10_); + _loc10_.x = _loc6_.x; + _loc10_.y = _loc9_.y + _loc7_; + this.guildHonor = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.guildHonor); + this.guildHonor.x = this.guildName.x; + this.guildHonor.y = _loc10_.y; + var _loc11_:TextFormat = new TextFormat(); + _loc11_.leading = 4; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc12_.text = "联盟荣誉:"; + _loc1_.addChild(_loc12_); + _loc12_.x = _loc6_.x; + _loc12_.y = _loc10_.y + _loc7_; + this.occuProvince = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.occuProvince.height = 40; + this.occuProvince.wordWrap = true; + this.occuProvince.multiline = true; + _loc1_.addChild(this.occuProvince); + this.occuProvince.x = this.guildName.x; + this.occuProvince.y = _loc12_.y; + this.occuProvince.defaultTextFormat = _loc11_; + _loc13_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc13_.text = "被 挑 战:"; + _loc1_.addChild(_loc13_); + _loc13_.x = _loc6_.x; + _loc13_.y = _loc12_.y + _loc7_ + _loc7_; + this.otherAppProvince = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.otherAppProvince); + this.otherAppProvince.x = this.guildName.x; + this.otherAppProvince.y = _loc13_.y; + _loc14_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc14_.text = "当前挑战:"; + _loc1_.addChild(_loc14_); + _loc14_.x = _loc6_.x; + _loc14_.y = _loc13_.y + _loc7_; + this.appProvince = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.appProvince); + this.appProvince.x = this.guildName.x; + this.appProvince.y = _loc14_.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,380); + _loc2_.addChild(_loc15_); + _loc15_.wordWrap = true; + _loc15_.multiline = true; + _loc15_.height = 200; + _loc15_.x = 20; + _loc15_.y = 40; + _loc15_.defaultTextFormat = _loc11_; + var _loc16_:String = "活动时间:"; + _loc16_ = _loc16_ + "
盟主申请时间:每天05:00~18:00"; + _loc16_ = _loc16_ + "
成员报名时间:每天18:00~20:00"; + _loc16_ = _loc16_ + "
郡城开战时间:每天20:00~21:00"; + _loc16_ = _loc16_ + "
参与前提:"; + _loc16_ = _loc16_ + "
3级以上联盟。"; + _loc16_ = _loc16_ + "
活动规则:"; + _loc16_ = _loc16_ + "
1、联盟在郡城战中击败郡城占领者即可获得该郡城的占领权。"; + _loc16_ = _loc16_ + "
2、占领郡城后联盟成员每天都会获得丰厚的奖励。"; + _loc16_ = _loc16_ + "
3、联盟占领的郡城越多,每天获得的奖励也越多。"; + _loc16_ = _loc16_ + "
4、申请郡城战需要消耗一定数量的虎符。"; + _loc15_.htmlText = _loc16_; + this.timetxt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,200); + _loc3_.addChild(this.timetxt); + this.timetxt.x = 220; + this.timetxt.y = 10; + var _loc17_:UIWindowBg = new UIWindowBg(); + _loc17_.initSecondPanel(584,49); + _loc3_.addChild(_loc17_); + _loc17_.x = 20; + _loc17_.y = 30; + guildMc = gameRes.getMovieClip(ClassConfig.guild_page_5,gameRes.getGuildInfo()); + _loc17_.addChild(guildMc); + guildMc.x = 2; + guildMc.y = 2; + this.applybtn = new UIButton("盟主申请",2,10); + _loc3_.addChild(this.applybtn); + this.applybtn.x = 115; + this.applybtn.y = 100; + this.joinbtn = new UIButton("参战报名",2,10); + _loc3_.addChild(this.joinbtn); + this.joinbtn.x = 363; + this.joinbtn.y = this.applybtn.y; + this.joinbtn.onClick = this.joinCasWar; + this.enterbtn = new UIButton("参 战",2,10); + _loc3_.addChild(this.enterbtn); + this.enterbtn.x = 514; + this.enterbtn.y = this.applybtn.y; + this.enterbtn.onClick = this.joinWar; + this.applybtn.onClick = this.selectCity; + } + + private function joinWar(param1:MouseEvent) : void + { + ConnectService.getInstance().provinceService.getProvinceId(); + } + + override public function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_applyProvWar,this.applyWarSucc); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getProvinceEntryInfo,this.getProvinceEntryInfoResult); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getProvinceId,this.getProvinceIdResult); + this.getProvinceEntryInfo(); + } + + private function getProvinceIdResult(param1:ProvinceEvent) : void + { + this.enterbtn.setEnable(); + var _loc2_:Object = param1.objData; + this.currAppId = int(_loc2_.appProvinceId); + if(this.currAppId <= 0) + { + MessageBoxUI.getInstance().addMessage("未报名任何战场"); + return; + } + GuildMainUI.getInstance().closeUI(null); + Control.getInstance().showProvinceWar(this.currAppId); + } + + override public function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_applyProvWar,this.applyWarSucc); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getProvinceEntryInfo,this.getProvinceEntryInfoResult); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getProvinceId,this.getProvinceIdResult); + this.stopTime(); + this.timetxt.text = ""; + if(Boolean(this.proCasListUI) && contains(this.proCasListUI)) + { + removeChild(this.proCasListUI); + } + } + + private function stopTime() : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.timehandle); + this.timer = null; + } + } + + private function getProvinceEntryInfo() : void + { + ConnectService.getInstance().provinceService.getProvinceEntryInfo(); + this.applybtn.setUnEnable(); + this.joinbtn.setUnEnable(); + this.enterbtn.setUnEnable(); + } + + private function getProvinceEntryInfoResult(param1:ProvinceEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + return; + } + this.applyObj = param1.objData; + var _loc2_:Date = this.applyObj.serverTime; + this.serverTimes = 3600 * _loc2_.hours + 60 * _loc2_.minutes + _loc2_.seconds; + this.countryId = this.applyObj.guildCountryId; + this.guildName.text = String(this.applyObj["guildName"]); + this.guildHonor.text = String(this.applyObj["guildHonor"]); + this.guildLevel.text = String(this.applyObj["guildLevel"]); + this.rank.text = String(this.applyObj["guildRank"]); + this.appProvince.text = String(this.applyObj["appProvince"]); + var _loc3_:Array = this.applyObj["occuProvince"]; + var _loc4_:Array = this.applyObj["otherAppProvince"]; + this.currAppId = int(this.applyObj["appProvinceId"]); + if(_loc3_ == null || _loc3_.length == 0) + { + this.occuProvince.text = "无"; + } + else + { + this.occuProvince.wordWrap = true; + this.occuProvince.text = String(_loc3_.join("、")); + } + if(_loc4_ == null || _loc4_.length == 0) + { + this.otherAppProvince.text = "无"; + } + else + { + this.otherAppProvince.wordWrap = true; + this.otherAppProvince.text = String(_loc4_.join("、")); + } + if(this.applyObj["joinedProvinceId"] > 0) + { + } + this.timeStatus = this.applyObj["timeStatus"]; + if(this.timeStatus == 2) + { + this.startx = this.start2x; + this.w = this.start3x - this.start2x; + this.passTime = 3600 * (_loc2_.hours - 18) + 60 * _loc2_.minutes + _loc2_.seconds; + this.timeCount = 3600 * (20 - 18); + if(this.serverTimes > 18 * 3600 && this.serverTimes < 20 * 3600) + { + this.joinbtn.setEnable(); + } + this.joinbtn.setEnable(); + } + else if(this.applyObj.timeStatus == 3) + { + this.startx = this.start3x; + this.w = this.start4x - this.start3x; + this.passTime = 3600 * (_loc2_.hours - 20) + 60 * _loc2_.minutes + _loc2_.seconds; + this.timeCount = 3600 * (21 - 20); + this.enterbtn.setEnable(); + if(this.serverTimes > 20 * 3600 && this.serverTimes < 21 * 3600) + { + this.enterbtn.setEnable(); + } + } + else if(this.applyObj.timeStatus == 4) + { + this.startx = 0; + this.timeCount = 0; + guildMc.arrowmc.x = this.start1x; + } + else if(this.applyObj.timeStatus == 1) + { + this.startx = this.start1x; + this.w = this.start2x - this.start1x; + this.passTime = 3600 * (_loc2_.hours - 5) + 60 * _loc2_.minutes + _loc2_.seconds; + this.timeCount = 3600 * (18 - 5); + if(this.serverTimes > 5 * 3600 && this.serverTimes < 18 * 3600) + { + this.applybtn.setEnable(); + } + } + if(this.passTime < 0) + { + guildMc.arrowmc.x = this.start1x; + return; + } + if(this.serverTimes > 21 * 3600 || this.serverTimes < 4 * 3600) + { + if(this.serverTimes < 4 * 3600) + { + guildMc.arrowmc.x = this.start1x; + } + if(this.serverTimes > 21 * 3600) + { + guildMc.arrowmc.x = this.start4x; + } + this.isUpdate = false; + } + else + { + this.isUpdate = true; + } + this.startTime(); + } + + private function getGuildProvinceAppInfo() : void + { + } + + private function startTime() : void + { + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timehandle); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function timehandle(param1:TimerEvent) : void + { + var _loc2_:int = 0; + ++this.serverTimes; + this.timetxt.text = "当前服务器时间:" + PublicMethod.getTime(this.serverTimes); + if(this.timeCount > 0) + { + ++this.passTime; + if(this.isUpdate) + { + guildMc.arrowmc.x = this.startx + this.w * (this.passTime / this.timeCount); + if(this.passTime > this.timeCount) + { + this.stopTime(); + this.getProvinceEntryInfo(); + } + } + } + if(this.timeStatus == 4) + { + _loc2_ = this.serverTimes / 3600; + if(_loc2_ > 4 && this.isUpdate) + { + this.stopTime(); + this.getProvinceEntryInfo(); + } + } + } + + private function selectCity(param1:MouseEvent) : void + { + if(this.countryId == 0) + { + return; + } + if(this.selectCityUI == null) + { + this.selectCityUI = new ProSelectCityUI(); + this.selectCityUI.x = int(width / 2 - this.selectCityUI.width / 2); + this.selectCityUI.y = -105 + 36; + } + addChild(this.selectCityUI); + this.selectCityUI.setCountryId(this.countryId); + } + + private function applyWarSucc(param1:ProvinceEvent) : void + { + this.getProvinceEntryInfo(); + } + + private function joinCasWar(param1:MouseEvent) : void + { + if(this.proCasListUI == null) + { + this.proCasListUI = new ProCasListUI(); + this.proCasListUI.x = int(width / 2 - this.proCasListUI.width / 2); + this.proCasListUI.y = 11; + } + addChild(this.proCasListUI); + this.proCasListUI.setCountryId(this.countryId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildPage6.as b/flash_decompiled/com/view/ui/guild/GuildPage6.as new file mode 100644 index 0000000..6fe9ad4 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildPage6.as @@ -0,0 +1,320 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.guild.event.GuildEvent; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.buff.BuffManager; + import com.view.ui.guild.mc.UnionWarItem; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + 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.text.TextFormat; + import flash.utils.Timer; + + public class GuildPage6 extends GuildBasePage + { + + private var bg:Sprite; + + private var tableMc:UITable; + + private var unionArr:Vector.; + + private var currItems:TextField; + + private var selectUnion:UIButton; + + private var currGuildName:TextField; + + private var currTime:TextField; + + private var leftTime:int; + + private var defCountryMc:MovieClip; + + private var timer:Timer; + + private var guildListUI:GuildListUI; + + private var guildView:GuildViewUI; + + public function GuildPage6() + { + var _loc4_:TextField = null; + var _loc5_:TextField = null; + var _loc6_:TextField = null; + var _loc14_:UnionWarItem = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,367); + addChild(_loc1_); + var _loc2_:UITitleBg = new UITitleBg("宣战讨伐",_loc1_.width); + _loc1_.addChild(_loc2_); + _loc2_.x = int(_loc1_.width / 2 - _loc2_.width / 2); + var _loc3_:UITitleBg = new UITitleBg("历史讨伐",_loc1_.width); + _loc1_.addChild(_loc3_); + _loc3_.x = int(_loc1_.width / 2 - _loc3_.width / 2); + _loc3_.y = 150; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,85); + _loc1_.addChild(_loc4_); + _loc4_.x = 25; + _loc4_.y = 50; + _loc4_.text = "当前讨伐联盟"; + this.defCountryMc = face.getMovieClip(ClassConfig.lib_country); + _loc1_.addChild(this.defCountryMc); + this.defCountryMc.x = _loc4_.x + 80; + this.defCountryMc.y = _loc4_.y; + this.defCountryMc.gotoAndStop(8); + this.currGuildName = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + _loc1_.addChild(this.currGuildName); + this.currGuildName.x = this.defCountryMc.x + 30; + this.currGuildName.y = _loc4_.y; + this.currGuildName.text = ""; + this.currGuildName.addEventListener(TextEvent.LINK,this.linkeventhandler); + this.currGuildName.mouseEnabled = true; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,85); + _loc1_.addChild(_loc5_); + _loc5_.x = 258; + _loc5_.y = _loc4_.y; + _loc5_.text = "剩余时间"; + this.currTime = PublicMethod.getTextFieldWithFillter(16777215,72); + _loc1_.addChild(this.currTime); + this.currTime.x = _loc5_.x + 60; + this.currTime.y = _loc4_.y; + this.currTime.text = ""; + _loc6_ = PublicMethod.getTextFieldWithFillter(16763749,85); + _loc1_.addChild(_loc6_); + _loc6_.x = 425; + _loc6_.y = _loc4_.y; + _loc6_.text = "选择讨伐对象"; + this.selectUnion = new UIButton("讨伐对象",2,10); + _loc1_.addChild(this.selectUnion); + this.selectUnion.x = 518; + this.selectUnion.y = _loc4_.y - 3; + this.selectUnion.onClick = this.selectUnionList; + var _loc7_:Sprite = PublicMethod.getTrLine(614); + _loc1_.addChild(_loc7_); + _loc7_.x = 8; + _loc7_.y = 95; + var _loc8_:TextFormat = new TextFormat(); + _loc8_.leading = 4; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,596); + _loc1_.addChild(_loc9_); + _loc9_.defaultTextFormat = _loc8_; + _loc9_.x = 12; + _loc9_.y = _loc7_.y + 10; + _loc9_.multiline = true; + _loc9_.wordWrap = true; + _loc9_.height = 40; + _loc9_.htmlText = "3级以上联盟可以对另一个3级以上联盟进行讨伐,同时只能讨伐1个联盟。讨伐状态下,己方成员对对方所有成员的城池掠夺的出征时间最长为30分钟。(胜败将会影响双方联盟的荣誉得失)"; + var _loc10_:Array = ["联盟名","联盟等级","讨伐冷却","仇恨度","操作"]; + var _loc11_:Array = [170,90,90,90,150]; + this.tableMc = new UITable(); + this.tableMc.install(5,_loc10_,_loc11_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 20; + this.tableMc.y = _loc3_.y + 26; + this.unionArr = new Vector.(); + var _loc12_:int = 0; + while(_loc12_ < 5) + { + _loc14_ = new UnionWarItem(); + this.tableMc.addChild(_loc14_); + this.unionArr.push(_loc14_); + _loc14_.refresh = this.getUnionWarList; + _loc14_.y = 25 + _loc12_ * 25; + _loc14_.x = 4; + _loc12_++; + } + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(16777215,451); + _loc1_.addChild(_loc13_); + _loc13_.x = 15; + _loc13_.htmlText = "历史讨伐记录最多5个最近讨伐过的联盟 讨伐仇恨度为0的联盟需要消耗100个虎符"; + _loc13_.y = this.tableMc.y + this.tableMc.height + 10; + this.currItems = PublicMethod.getTextFieldWithFillter(16763749,120); + _loc1_.addChild(this.currItems); + this.currItems.x = 500; + this.currItems.y = _loc13_.y; + this.currItems.text = "当前虎符数:"; + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + this.getUnionWarList(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_initUnionWar,this.getUnionWarSucc); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_startWarToGuild,this.startUnionWarSucc); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_initUnionWar,this.getUnionWarSucc); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_startWarToGuild,this.startUnionWarSucc); + this.clearTime(); + if(Boolean(this.guildView) && contains(this.guildView)) + { + removeChild(this.guildView); + } + } + + private function getUnionWarList() : void + { + ConnectService.getInstance().guildService.initUnionWar(); + } + + private function startUnionWarSucc(param1:GuildEvent) : void + { + LoadingMc.getInstance().unShow(); + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + MessageBoxUI.getInstance().addMessage("讨伐成功"); + BuffManager.getInstance().refresh(); + this.getUnionWarList(); + } + + private function getUnionWarSucc(param1:GuildEvent) : void + { + var _loc2_:Object = param1.guildObj; + this.viewSucc(_loc2_); + } + + private function startTime() : void + { + if(this.leftTime <= 0) + { + return; + } + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function timerFrame(param1:TimerEvent) : void + { + --this.leftTime; + this.currTime.text = Utils.formatSeconds(this.leftTime); + if(this.leftTime < 0) + { + this.clearTime(); + this.getUnionWarList(); + } + } + + private function clearTime() : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame); + this.timer = null; + } + } + + private function viewSucc(param1:Object) : void + { + var _loc4_:int = 0; + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc8_:Array = null; + var _loc9_:int = 0; + this.defCountryMc.gotoAndStop(8); + var _loc2_:int = int(param1.isLeader); + var _loc3_:int = int(param1.propertyNum); + this.currItems.htmlText = "当前虎符数:" + _loc3_ + ""; + if(_loc2_ == 0) + { + this.selectUnion.setUnEnable(); + } + else + { + this.selectUnion.setEnable(); + } + if(Boolean(param1.warInfo) && Boolean(param1.warInfo.warNow)) + { + _loc5_ = param1.warInfo.warNow.defendGuildName; + _loc6_ = param1.warInfo.warNow.defendGuildId; + _loc7_ = "" + _loc5_ + ""; + this.currGuildName.htmlText = _loc7_; + this.leftTime = int(param1.warInfo.warNow.finishTime); + if(this.leftTime > 0) + { + this.currTime.text = Utils.formatSeconds(this.leftTime); + } + else + { + this.currTime.text = "0"; + } + _loc4_ = int(param1.warInfo.warNow.defendGuildCountry); + this.defCountryMc.gotoAndStop(_loc4_); + this.startTime(); + } + else + { + this.currGuildName.text = ""; + this.currTime.text = ""; + } + if(Boolean(param1.warInfo) && Boolean(param1.warInfo.warHistory)) + { + _loc8_ = param1.warInfo.warHistory; + _loc9_ = 0; + while(_loc9_ < 5) + { + if(_loc8_[_loc9_]) + { + this.unionArr[_loc9_].setData(_loc8_[_loc9_]); + this.unionArr[_loc9_].setIsLeader(_loc2_); + } + else + { + this.unionArr[_loc9_].setData(null); + } + _loc9_++; + } + } + } + + private function selectUnionList(param1:MouseEvent) : void + { + this.guildListUI = GuildListUI.getInstance(); + this.guildListUI.setType(2); + addChild(this.guildListUI); + this.guildListUI.x = -15; + this.guildListUI.y = -69; + } + + private function linkeventhandler(param1:TextEvent) : void + { + this.guildView = GuildViewUI.getInstance(); + this.guildView.setGuildId(int(param1.text)); + addChild(this.guildView); + this.guildView.x = 120; + this.guildView.y = 0; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildPage7.as b/flash_decompiled/com/view/ui/guild/GuildPage7.as new file mode 100644 index 0000000..966cee1 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildPage7.as @@ -0,0 +1,135 @@ +package com.view.ui.guild +{ + import com.control.ConnectService; + import com.control.guild.event.LeagueDefEvent; + import com.view.ui.BaseUI; + import flash.events.Event; + + public class GuildPage7 extends BaseUI + { + + private var unionCombatReady:UnionCombatReady; + + private var unionCombatOpen:UnionCombatOpen; + + private var m_ud:UnionAssistDefenders; + + public function GuildPage7() + { + super(); + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(LeagueDefEvent.LeagueDef_showDefView,this.showDefViewResult); + ConnectService.getInstance().addEventListener(LeagueDefEvent.LeagueDef_selectDefCastle,this.selectDefCasResult); + ConnectService.getInstance().addEventListener(LeagueDefEvent.LeagueDef_startAction,this.startDefWarResult); + this.showDefView(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(LeagueDefEvent.LeagueDef_showDefView,this.showDefViewResult); + ConnectService.getInstance().removeEventListener(LeagueDefEvent.LeagueDef_selectDefCastle,this.selectDefCasResult); + ConnectService.getInstance().removeEventListener(LeagueDefEvent.LeagueDef_startAction,this.startDefWarResult); + this.clearCombatReady(); + this.clearCombatOpen(); + this.clearDefCasUi(); + } + + private function showDefView() : void + { + ConnectService.getInstance().guildService.showDefView(); + } + + private function showDefViewResult(param1:LeagueDefEvent) : void + { + var _loc2_:Object = param1.obj; + if(_loc2_.type == 1) + { + this.clearCombatOpen(); + if(this.unionCombatReady == null) + { + this.unionCombatReady = new UnionCombatReady(); + } + if(!contains(this.unionCombatReady)) + { + addChild(this.unionCombatReady); + } + this.unionCombatReady.initData(_loc2_); + } + else if(_loc2_.type == 2) + { + this.clearCombatReady(); + if(this.unionCombatOpen == null) + { + this.unionCombatOpen = new UnionCombatOpen(this.showDefInfo); + } + if(!contains(this.unionCombatOpen)) + { + addChild(this.unionCombatOpen); + } + this.unionCombatOpen.initData(_loc2_); + } + } + + private function showDefInfo(param1:int) : void + { + if(this.m_ud == null) + { + this.m_ud = new UnionAssistDefenders(); + this.m_ud.x = int(width / 2 - this.m_ud.width / 2); + this.m_ud.y = int(height / 2 - this.m_ud.height / 2); + } + this.m_ud.setCasId(param1); + this.m_ud.loadList(); + if(!contains(this.m_ud)) + { + addChild(this.m_ud); + } + } + + private function clearDefCasUi() : void + { + if(Boolean(this.m_ud) && contains(this.m_ud)) + { + removeChild(this.m_ud); + } + } + + private function clearCombatReady() : void + { + if(Boolean(this.unionCombatReady) && contains(this.unionCombatReady)) + { + removeChild(this.unionCombatReady); + this.unionCombatReady.clear(); + } + } + + private function clearCombatOpen() : void + { + if(Boolean(this.unionCombatOpen) && contains(this.unionCombatOpen)) + { + removeChild(this.unionCombatOpen); + this.unionCombatOpen.clear(); + } + } + + private function selectDefCasResult(param1:LeagueDefEvent) : void + { + this.showDefView(); + } + + private function startDefWarResult(param1:LeagueDefEvent) : void + { + this.showDefView(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildTechUI.as b/flash_decompiled/com/view/ui/guild/GuildTechUI.as new file mode 100644 index 0000000..158d944 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildTechUI.as @@ -0,0 +1,118 @@ +package com.view.ui.guild +{ + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.TechMc; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class GuildTechUI extends BaseUI + { + + private var tradeMc:MovieClip; + + private var bg:Sprite; + + private var tech0:TechMc; + + private var tech1:TechMc; + + public function GuildTechUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_taixueyuan); + this.createUI(); + } + + override public function createUI() : void + { + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.tech1 = new TechMc(); + this.tech0 = new TechMc(); + _loc1_.addChild(this.tech0); + _loc1_.addChild(this.tech1); + this.tech0.x = 12; + this.tech0.y = 12; + this.tech1.x = 12; + this.tech1.y = 110; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.getTechView(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Tech_View,this.getTechResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Tech_Upgrade,this.upgradeTechResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Tech_View,this.getTechResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Tech_Upgrade,this.upgradeTechResult); + } + + private function getTechView() : void + { + ConnectService.getInstance().guildService.getGuildTechInfo(); + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function setPosition() : void + { + } + + private function getTechResult(param1:GuildEvent) : void + { + var _loc4_:Boolean = false; + var _loc5_:* = undefined; + var _loc2_:int = int(param1.buildObj.dutyOfGuild); + var _loc3_:Array = param1.buildObj.buiMapList as Array; + for(_loc5_ in _loc3_) + { + this["tech" + _loc5_].setData(_loc3_[_loc5_]); + if(_loc3_[_loc5_].timeLeft > 0) + { + _loc4_ = true; + } + } + if(_loc2_ == 1 && _loc4_ == false) + { + this.setUpBtnView(true); + } + else + { + this.setUpBtnView(false); + } + } + + private function setUpBtnView(param1:Boolean) : void + { + this.tech0.viewUpBtn(param1); + this.tech1.viewUpBtn(param1); + } + + private function upgradeTechResult(param1:GuildEvent) : void + { + this.getTechView(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildTradeUI.as b/flash_decompiled/com/view/ui/guild/GuildTradeUI.as new file mode 100644 index 0000000..c9f1378 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildTradeUI.as @@ -0,0 +1,549 @@ +package com.view.ui.guild +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildTransEvent; + import com.view.cache.ImgCache; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UINumInputText; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.TradeItem1; + import com.view.ui.guild.mc.TradeItem2; + import com.view.ui.message.MessageBoxUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + 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 GuildTradeUI extends BaseUI + { + + private var btnArr:Array = new Array(); + + private var bg1:UIWindowBg; + + private var sellItemSp:Sprite; + + private var itemDesc:TextField; + + private var itemName:TextField; + + private var itemNum:UINumInputText; + + private var itemPrice:UINumInputText; + + private var itemVec:Vector.; + + private var itemMc:Sprite; + + private var itemScrollPane:ScrollPane; + + private var sellBtn:UIButton; + + private var itemSellVec:Vector.; + + private var currType:int = 99; + + private var canDo:* = true; + + private var allitemList:Array = new Array(); + + private var viewItemImg:Bitmap; + + private var viewItemLoad:LoadResource; + + private var viewItemId:int; + + private var viewNumsMax:int; + + public function GuildTradeUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_paimaidaoju); + this.createUI(); + } + + override public function createUI() : void + { + var _loc5_:int = 0; + var _loc6_:UITabBtn = null; + var _loc7_:UIWindowBg = null; + var _loc9_:UIWindowBg = null; + var _loc10_:UITitleBg = null; + var _loc11_:TextField = null; + var _loc12_:TextFormat = null; + var _loc13_:UITitleBg = null; + var _loc14_:int = 0; + var _loc20_:TradeItem1 = null; + var _loc21_:TradeItem2 = null; + var _loc1_:UITabBtn = new UITabBtn("全 部",2); + var _loc2_:UITabBtn = new UITabBtn("装 备",2); + var _loc3_:UITabBtn = new UITabBtn("用 品",2); + var _loc4_:UITabBtn = new UITabBtn("其 他",2); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + for each(_loc6_ in this.btnArr) + { + addChild(_loc6_); + _loc6_.x = 15 + _loc5_ * 66; + _loc6_.y = 40; + _loc6_.onClick = this.clickTabBtn; + _loc5_++; + } + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(370,240); + addChild(this.bg1); + this.bg1.y = 65; + this.bg1.x = 11; + _loc7_ = new UIWindowBg(); + _loc7_.initSecondPanel(370,122); + addChild(_loc7_); + _loc7_.y = this.bg1.y + this.bg1.height + 3; + _loc7_.x = 11; + var _loc8_:UITitleBg = new UITitleBg("正在拍卖",_loc7_.width); + _loc7_.addChild(_loc8_); + _loc8_.x = int(_loc7_.width / 2 - _loc8_.width / 2); + _loc9_ = new UIWindowBg(); + _loc9_.initSecondPanel(247,375); + addChild(_loc9_); + _loc9_.y = 65; + _loc9_.x = this.bg1.x + this.bg1.width + 3; + _loc10_ = new UITitleBg("拍卖规则",_loc9_.width); + _loc9_.addChild(_loc10_); + _loc10_.x = int(_loc9_.width / 2 - _loc10_.width / 2); + _loc11_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,240); + _loc11_.wordWrap = true; + _loc11_.multiline = true; + _loc11_.height = 120; + _loc12_ = new TextFormat(); + _loc12_.leading = 4; + _loc11_.defaultTextFormat = _loc12_; + _loc9_.addChild(_loc11_); + _loc11_.x = 10; + _loc11_.y = 40; + _loc11_.htmlText = "1.点击选择左边的道具图片,可在下方的界面设定拍卖物品的数量和价格。

2.每个玩家最多同时拍卖5件装备。"; + _loc13_ = new UITitleBg("拍卖道具",_loc9_.width); + _loc9_.addChild(_loc13_); + _loc13_.x = int(_loc9_.width / 2 - _loc13_.width / 2); + _loc13_.y = 170; + this.itemScrollPane = new ScrollPane(); + this.itemScrollPane.setSize(370,204); + this.itemScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg1.addChild(this.itemScrollPane); + this.itemScrollPane.y = 28; + this.itemScrollPane.x = 14; + this.itemMc = new Sprite(); + this.itemScrollPane.source = this.itemMc; + this.itemVec = new Vector.(); + _loc14_ = 0; + while(_loc14_ < 36) + { + _loc20_ = new TradeItem1(); + _loc20_.addEventListener(MouseEvent.CLICK,this.clickItem); + this.bg1.addChild(_loc20_); + this.itemVec.push(_loc20_); + _loc20_.x = 5 + 60 * int(_loc14_ % 6); + _loc20_.y = 5 + 60 * int(_loc14_ / 6); + _loc14_++; + } + this.itemScrollPane.update(); + var _loc15_:Bitmap = new Bitmap(face.getPng(UIConfig.bigItem_lock_skin)); + _loc9_.addChild(_loc15_); + _loc15_.width = 59; + _loc15_.height = 59; + _loc15_.x = 20; + _loc15_.y = _loc13_.y + 40; + this.sellItemSp = new Sprite(); + _loc9_.addChild(this.sellItemSp); + this.sellItemSp.x = _loc15_.x + 3; + this.sellItemSp.y = _loc15_.y + 3; + this.itemDesc = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,160); + this.itemDesc.height = 50; + this.itemDesc.wordWrap = true; + this.itemDesc.multiline = true; + _loc9_.addChild(this.itemDesc); + this.itemDesc.x = _loc15_.x + _loc15_.width + 10; + this.itemDesc.y = _loc15_.y + 5; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc9_.addChild(_loc16_); + _loc16_.x = 20; + _loc16_.text = "道具名称:"; + _loc16_.y = _loc15_.y + _loc15_.height + 8; + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc9_.addChild(this.itemName); + this.itemName.x = _loc16_.x + 70; + this.itemName.y = _loc16_.y; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc9_.addChild(_loc17_); + _loc17_.x = _loc16_.x; + _loc17_.text = "卖出数量:"; + _loc17_.y = _loc16_.y + 25; + this.itemNum = new UINumInputText(100); + _loc9_.addChild(this.itemNum); + this.itemNum.x = _loc17_.x + 70; + this.itemNum.y = _loc17_.y - 2; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc9_.addChild(_loc18_); + _loc18_.x = _loc17_.x; + _loc18_.text = "卖出总价:"; + _loc18_.y = _loc17_.y + 25; + this.itemPrice = new UINumInputText(100); + _loc9_.addChild(this.itemPrice); + this.itemPrice.x = this.itemNum.x; + this.itemPrice.y = _loc18_.y - 2; + this.itemPrice.hiddenBtn(); + var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + _loc9_.addChild(_loc19_); + _loc19_.x = this.itemPrice.x + this.itemPrice.width; + _loc19_.text = "(贡献度)"; + _loc19_.y = _loc18_.y; + this.sellBtn = new UIButton("拍 卖",2); + _loc9_.addChild(this.sellBtn); + this.sellBtn.x = 110; + this.sellBtn.y = 354; + this.sellBtn.onClick = this.sellItems; + this.sellBtn.setUnEnable(); + this.itemSellVec = new Vector.(); + _loc5_ = 0; + while(_loc5_ < 5) + { + _loc21_ = new TradeItem2(); + _loc7_.addChild(_loc21_); + this.itemSellVec.push(_loc21_); + _loc21_.x = 14 + _loc5_ * 71; + _loc21_.y = 32; + _loc21_.cancelBtn.onClick = this.cancelItem; + _loc5_++; + } + _loc1_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function clickTabBtn(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(_loc4_ != _loc2_) + { + _loc4_.select = false; + continue; + } + _loc4_.select = true; + switch(_loc3_) + { + case 0: + this.currType = 99; + break; + case 1: + this.currType = 6; + break; + case 2: + this.currType = 7; + break; + case 3: + this.currType = 100; + } + } + if(this.allitemList.length == 0) + { + this.getSellItem(); + } + else + { + this.getItemListByType(); + } + } + + private function getSellItem() : void + { + if(this.canDo) + { + this.canDo = false; + ConnectService.getInstance().guildTransService.getTreasuryCanTransByUserId(this.currType); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_Items_mylist,this.getSellItemResult); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_Items_cacelTrade,this.getSellItemResult); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_Items_Trade,this.getSellItemResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildTransEvent.Trans_Items_mylist,this.getSellItemResult); + ConnectService.getInstance().removeEventListener(GuildTransEvent.Trans_Items_cacelTrade,this.getSellItemResult); + ConnectService.getInstance().removeEventListener(GuildTransEvent.Trans_Items_Trade,this.getSellItemResult); + } + + private function clearItems() : void + { + var _loc1_:int = int(this.itemVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ > 23) + { + this.itemVec[_loc2_].removeEventListener(MouseEvent.CLICK,this.clickItem); + this.itemVec[_loc2_].clear(); + this.bg1.removeChild(this.itemVec[_loc2_]); + this.itemVec.splice(_loc2_,1); + } + else + { + this.itemVec[_loc2_].setDate(null); + } + _loc2_--; + } + this.itemScrollPane.update(); + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function setPosition() : void + { + } + + private function getSellItemResult(param1:GuildTransEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:TradeItem2 = null; + this.canDo = true; + this.clearItems(); + this.allitemList = param1.itemObj.treasuryList as Array; + if(this.allitemList == null) + { + this.allitemList = new Array(); + } + this.getItemListByType(); + var _loc2_:Array = param1.itemObj.transList as Array; + if(_loc2_ == null || _loc2_.length == 0) + { + for each(_loc4_ in this.itemSellVec) + { + _loc4_.setData(null); + } + return; + } + for(_loc3_ in this.itemSellVec) + { + if(_loc2_[_loc3_]) + { + this.itemSellVec[_loc3_].setData(_loc2_[_loc3_]); + } + else + { + this.itemSellVec[_loc3_].setData(null); + } + } + } + + private function clickItem(param1:MouseEvent) : void + { + var _loc2_:TradeItem1 = param1.currentTarget as TradeItem1; + this.loadViewItem(_loc2_.itemObj); + } + + private function loadViewItem(param1:Object) : void + { + if(param1 != null) + { + this.viewItemId = param1.id; + if(ImgCache.getInstance().getImg("pic/equip/" + param1.item.iconPath)) + { + this.viewItemImg = new Bitmap(); + this.viewItemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + param1.item.iconPath).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.viewItemLoad = new LoadResource("pic/equip/" + param1.item.iconPath,this.loadBack); + } + this.itemDesc.htmlText = param1.item.itemDesc; + this.itemName.htmlText = param1.item.showName; + this.itemNum.setTextNum(param1.itemCount); + this.itemNum.setMaxNum(param1.itemCount); + this.itemPrice.setMaxChars(7); + this.itemPrice.setTextNum(1); + this.sellBtn.setEnable(); + this.viewNumsMax = param1.itemCount; + } + else + { + this.viewItemId = 0; + if(Boolean(this.viewItemImg) && this.sellItemSp.contains(this.viewItemImg)) + { + this.sellItemSp.removeChild(this.viewItemImg); + } + this.itemName.htmlText = ""; + this.itemDesc.text = ""; + this.itemNum.setTextNum(0); + this.itemPrice.setTextNum(0); + this.sellBtn.setUnEnable(); + this.viewNumsMax = 0; + } + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.viewItemImg) && this.sellItemSp.contains(this.viewItemImg)) + { + this.sellItemSp.removeChild(this.viewItemImg); + } + this.viewItemImg = Bitmap(param1.target.loader.content); + ImgCache.getInstance().setImg(this.viewItemLoad.url,this.viewItemImg); + if(this.viewItemId == 0) + { + this.viewItemLoad.clear(); + return; + } + this.viewItemLoad.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.sellItemSp.addChild(this.viewItemImg); + this.viewItemImg.width = 53; + this.viewItemImg.height = 53; + } + + private function cancelItem(param1:MouseEvent) : void + { + var _loc2_:TradeItem2 = param1.currentTarget.parent as TradeItem2; + if(_loc2_.itemObj) + { + ConnectService.getInstance().guildTransService.cacelTrade(_loc2_.itemObj.guildTransId,this.currType); + } + } + + private function sellItems(param1:MouseEvent) : void + { + var _loc2_:int = this.itemNum.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("请输入卖出数量."); + return; + } + var _loc3_:int = this.itemPrice.getTextNum(); + if(_loc3_ <= 0) + { + MessageBoxUI.getInstance().addMessage("请输入卖出价格."); + return; + } + if(this.viewItemId > 0) + { + ConnectService.getInstance().guildTransService.tradeItem(this.viewItemId,_loc2_,_loc3_,this.currType); + } + else + { + MessageBoxUI.getInstance().addMessage("请选择拍卖道具."); + } + } + + private function getItemListByType() : void + { + var _loc2_:int = 0; + var _loc3_:Array = null; + var _loc4_:Object = null; + var _loc5_:TradeItem1 = null; + this.loadViewItem(null); + var _loc1_:Array = new Array(); + if(this.allitemList.length >= 0) + { + switch(this.currType) + { + case 99: + _loc1_ = this.allitemList; + break; + case 6: + for each(_loc4_ in this.allitemList) + { + if(_loc4_.itemType == 6) + { + _loc1_.push(_loc4_); + } + } + break; + case 7: + _loc3_ = new Array(); + for each(_loc4_ in this.allitemList) + { + if(_loc4_.itemType == 7) + { + _loc1_.push(_loc4_); + } + } + break; + case 100: + _loc3_ = new Array(); + for each(_loc4_ in this.allitemList) + { + if(_loc4_.itemType != 6 && _loc4_.itemType != 7) + { + _loc1_.push(_loc4_); + } + } + } + } + this.clearItems(); + if(_loc1_.length < 25) + { + _loc2_ = 0; + while(_loc2_ < 24) + { + if(_loc1_[_loc2_]) + { + this.itemVec[_loc2_].setDate(_loc1_[_loc2_]); + } + else + { + this.itemVec[_loc2_].setDate(null); + } + _loc2_++; + } + return; + } + _loc2_ = 0; + while(_loc2_ < _loc1_.length) + { + if(_loc2_ > 23) + { + _loc5_ = new TradeItem1(); + this.bg1.addChild(_loc5_); + this.itemVec.push(_loc5_); + _loc5_.x = 5 + 60 * int(_loc2_ % 6); + _loc5_.y = 5 + 60 * int(_loc2_ / 6); + } + this.itemVec[_loc2_].setDate(_loc1_[_loc2_]); + _loc2_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/GuildViewUI.as b/flash_decompiled/com/view/ui/guild/GuildViewUI.as new file mode 100644 index 0000000..2fb004a --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/GuildViewUI.as @@ -0,0 +1,282 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.data.data.guild.Guild; + import com.view.mc.sprite.TextBar; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GuildViewUI extends UIWindowBg + { + + private static var instance:GuildViewUI; + + private var bg:UIWindowBg; + + private var guildId:int; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var label6:TextField; + + private var label7:TextField; + + private var label8:TextField; + + private var label9:TextField; + + private var label10:TextField; + + private var countryMc:MovieClip; + + private var guildContent:TextBar; + + private var memListUI:GuildMemListUI; + + public function GuildViewUI() + { + var _loc2_:TextField = null; + var _loc5_:TextField = null; + var _loc8_:TextField = null; + super(); + initSize(150,300); + loadTitle(UITitleConfig.title_lianmengxinxi); + addCloseBtn(); + initBg(); + this.bg = new UIWindowBg(); + this.bg.initSecondPanel(320,270); + bg1.addChild(this.bg); + this.bg.x = 10; + this.bg.y = 10; + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.text = "联盟名:"; + this.bg.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label1); + this.label1.x = 60; + this.label1.y = 10; + this.countryMc = face.getMovieClip(ClassConfig.lib_country); + this.bg.addChild(this.countryMc); + this.countryMc.x = _loc1_.x + 122; + this.countryMc.y = _loc1_.y; + this.countryMc.gotoAndStop(1); + _loc2_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "等 级:"; + this.bg.addChild(_loc2_); + _loc2_.x = _loc1_.x; + _loc2_.y = _loc1_.y + 25; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label2); + this.label2.x = this.label1.x; + this.label2.y = _loc2_.y; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc3_.text = "旗 号:"; + this.bg.addChild(_loc3_); + _loc3_.x = _loc1_.x; + _loc3_.y = _loc2_.y + 25; + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label3); + this.label3.x = this.label1.x; + this.label3.y = _loc3_.y; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc4_.text = "盟 主:"; + this.bg.addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = _loc3_.y + 25; + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label4); + this.label4.x = this.label1.x; + this.label4.y = _loc4_.y; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc5_.text = "创建者:"; + this.bg.addChild(_loc5_); + _loc5_.x = _loc1_.x; + _loc5_.y = _loc4_.y + 25; + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label5); + this.label5.x = this.label1.x; + this.label5.y = _loc5_.y; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc6_.text = "人 数:"; + this.bg.addChild(_loc6_); + _loc6_.x = _loc1_.x + 150; + _loc6_.y = _loc1_.y; + this.label6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label6); + this.label6.x = _loc6_.x + 50; + this.label6.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc7_.text = "建设值:"; + this.bg.addChild(_loc7_); + _loc7_.x = _loc6_.x; + _loc7_.y = _loc2_.y; + this.label7 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label7); + this.label7.x = this.label6.x; + this.label7.y = _loc7_.y; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc8_.text = "虎 符:"; + this.bg.addChild(_loc8_); + _loc8_.x = _loc6_.x; + _loc8_.y = _loc3_.y; + this.label8 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label8); + this.label8.x = this.label6.x; + this.label8.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc9_.text = "城 池:"; + this.bg.addChild(_loc9_); + _loc9_.x = _loc6_.x; + _loc9_.y = _loc4_.y; + this.label9 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label9); + this.label9.x = this.label6.x; + this.label9.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc10_.text = "荣 誉:"; + this.bg.addChild(_loc10_); + _loc10_.x = _loc6_.x; + _loc10_.y = _loc5_.y; + this.label10 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.bg.addChild(this.label10); + this.label10.x = this.label6.x; + this.label10.y = _loc10_.y; + var _loc11_:UITitleBg = new UITitleBg("联盟简介",this.bg.width); + this.bg.addChild(_loc11_); + _loc11_.x = int(this.bg.width / 2 - _loc11_.width / 2); + _loc11_.y = 140; + this.guildContent = new TextBar(); + this.guildContent.createTextField(300,112); + this.bg.addChild(this.guildContent); + this.guildContent.x = 10; + this.guildContent.y = _loc11_.y + 25; + var _loc12_:UIButton = new UIButton("申请加入",2); + var _loc13_:UIButton = new UIButton("联盟成员",2); + this.bg.addChild(_loc12_); + this.bg.addChild(_loc13_); + _loc12_.x = 80; + _loc12_.y = 285; + _loc13_.x = 190; + _loc13_.y = _loc12_.y; + _loc12_.onClick = this.applyJoinGuild; + _loc13_.onClick = this.viewGuildMems; + ConnectService.getInstance().addEventListener(GuildEvent.Guild_GetByGuildId,this.getGuildById); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_JoinGuild,this.joinGuildResult); + addEventListener(Event.REMOVED_FROM_STAGE,this.removeFromStage); + } + + public static function getInstance() : GuildViewUI + { + if(instance == null) + { + instance = new GuildViewUI(); + } + return instance; + } + + public function setGuildId(param1:int) : void + { + this.guildId = param1; + this.loadGuild(); + } + + private function loadGuild() : void + { + ConnectService.getInstance().guildService.getGuildById(this.guildId); + } + + public function removeFromStage(param1:Event) : void + { + this.clear(); + if(Boolean(this.memListUI) && contains(this.memListUI)) + { + removeChild(this.memListUI); + } + } + + private function applyJoinGuild(param1:MouseEvent) : void + { + if(this.guildId > 0) + { + ConnectService.getInstance().guildService.applyJoinGuildById(this.guildId); + } + } + + private function viewGuildMems(param1:MouseEvent) : void + { + if(this.guildId > 0) + { + this.memListUI = GuildMemListUI.getInstance(); + this.memListUI.setGuildId(this.guildId); + addChild(this.memListUI); + this.memListUI.x = int(373 / 2 - this.memListUI.width / 2); + this.memListUI.y = int(379 / 2 - this.memListUI.height / 2); + } + } + + private function getGuildById(param1:GuildEvent) : void + { + var _loc2_:Guild = param1.guild; + if(this.guildId == _loc2_.guildId) + { + this.label1.text = _loc2_.name; + this.countryMc.gotoAndStop(_loc2_.countryId); + this.label2.text = _loc2_.memberCount.toString(); + this.label3.text = _loc2_.level.toString(); + this.label4.text = _loc2_.construction.toString(); + this.label5.text = _loc2_.flag; + this.label6.text = _loc2_.propertyNum.toString(); + this.label7.text = _loc2_.leaderName; + this.label8.text = _loc2_.capital.toString(); + this.label9.text = _loc2_.creator; + this.label10.text = _loc2_.honour.toString(); + this.guildContent.traceMsg(_loc2_.guildDesc); + } + } + + private function clear() : void + { + this.label1.text = ""; + this.countryMc.gotoAndStop(1); + this.label2.text = ""; + this.label3.text = ""; + this.label4.text = ""; + this.label5.text = ""; + this.label6.text = ""; + this.label7.text = ""; + this.label8.text = ""; + this.label9.text = ""; + this.label10.text = ""; + this.guildContent.traceMsg(""); + this.guildId = 0; + } + + private function joinGuildResult(param1:GuildEvent) : void + { + closeSelf(null); + MessageBoxUI.getInstance().addMessage("申请联盟成功"); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/MyGuildMemListUI.as b/flash_decompiled/com/view/ui/guild/MyGuildMemListUI.as new file mode 100644 index 0000000..3a5976f --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/MyGuildMemListUI.as @@ -0,0 +1,222 @@ +package com.view.ui.guild +{ + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.events.DevEvent; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.MyGuildMemMc; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class MyGuildMemListUI extends BaseUI + { + + private var tableMc:UITable; + + private var memListVec:Vector.; + + private var pageMc:UIPageMc; + + private var currPage:int; + + private var currGuildId:int; + + private var viewMemUI:ViewMemberUI; + + public function MyGuildMemListUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_lianmengchengyuan); + this.createUI(); + } + + override public function createUI() : void + { + var _loc5_:MyGuildMemMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["成员","职位","排名","等级","繁荣度","贡献度","状态","查看"]; + var _loc3_:Array = [125,70,65,61,82,75,75,82]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(14,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.memListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 14) + { + _loc5_ = new MyGuildMemMc(); + this.tableMc.addChild(_loc5_); + this.memListVec.push(_loc5_); + _loc5_.x = 4; + _loc5_.y = 26 + _loc4_ * 25; + _loc5_.viewBtn.onClick = this.viewMemById; + _loc4_++; + } + this.pageMc = new UIPageMc(); + _loc1_.addChild(this.pageMc); + this.pageMc.x = 530; + this.pageMc.y = 385; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + } + + public function nextPage() : void + { + this.currPage += 1; + this.getMemListById(); + } + + public function prePage() : void + { + --this.currPage; + this.getMemListById(); + } + + public function setGuildId(param1:int) : void + { + this.currGuildId = param1; + } + + override public function addToStage(param1:Event) : void + { + this.currPage = 1; + super.addToStage(param1); + this.getMemListById(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_MemList_myGuild,this.getMemListResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_changeDuty,this.changeDutySucc); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_fireMember,this.fireMemSucc); + } + + public function getOnlineUser() : void + { + ConnectService.getInstance().friendService.getOnline(); + } + + private function getOnlineUserSucc(param1:DevEvent) : void + { + this.getMemListById(); + } + + override public function removeFromStage(param1:Event) : void + { + if(Boolean(this.viewMemUI) && contains(this.viewMemUI)) + { + removeChild(this.viewMemUI); + } + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_MemList_myGuild,this.getMemListResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_changeDuty,this.changeDutySucc); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_fireMember,this.fireMemSucc); + } + + private function getMemListById() : void + { + var _loc1_:int = (this.currPage - 1) * 14 + 1; + var _loc2_:int = this.currPage * 14; + ConnectService.getInstance().guildService.getMembersByGuildId(_loc1_,_loc2_); + } + + private function getMemListResult(param1:GuildEvent) : void + { + var _loc5_:Array = null; + var _loc6_:* = undefined; + var _loc7_:MyGuildMemMc = null; + var _loc2_:int = param1.canViewStatus; + var _loc3_:int = param1.startNum; + var _loc4_:int = param1.totalNum; + if(_loc3_ == (this.currPage - 1) * 14 + 1) + { + this.pageMc.setPageCount(1 + _loc4_ / 14); + this.pageMc.setPage(this.currPage); + _loc5_ = param1.memList; + if(_loc5_ == null) + { + for each(_loc7_ in this.memListVec) + { + _loc7_.setData(null); + } + return; + } + for(_loc6_ in this.memListVec) + { + if(_loc5_[_loc6_]) + { + this.memListVec[_loc6_].setData(_loc5_[_loc6_],_loc2_); + } + else + { + this.memListVec[_loc6_].setData(null); + } + } + } + } + + override public function setPosition() : void + { + if(this.parent == face.stage) + { + super.setPosition(); + } + } + + override public function closeUI(param1:MouseEvent) : void + { + if(parent == face.stage) + { + super.closeUI(param1); + } + else if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + private function viewMemById(param1:MouseEvent) : void + { + var _loc2_:MyGuildMemMc = param1.currentTarget.parent as MyGuildMemMc; + if(_loc2_.memObj == null) + { + return; + } + if(this.viewMemUI == null) + { + this.viewMemUI = new ViewMemberUI(); + this.viewMemUI.x = int(width / 2 - this.viewMemUI.width / 2); + this.viewMemUI.y = int(height / 2 - this.viewMemUI.height / 2); + } + this.viewMemUI.setMemberId(_loc2_.memObj.userId); + addChild(this.viewMemUI); + this.viewMemUI.x = 170; + this.viewMemUI.y = 60; + } + + private function changeDutySucc(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("修改成功"); + this.getMemListById(); + } + + private function fireMemSucc(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("已开除"); + this.getMemListById(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/ProCasListUI.as b/flash_decompiled/com/view/ui/guild/ProCasListUI.as new file mode 100644 index 0000000..cc06ca1 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/ProCasListUI.as @@ -0,0 +1,278 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.province.event.ProvinceEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.CasListMc; + 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.Timer; + + public class ProCasListUI extends BaseUI + { + + private var bg:Sprite; + + private var tableMc:UITable; + + public var gameRes:GameUIRes; + + private var casList:Vector.; + + private var btnArr:Array; + + private var timeText:TextField; + + private var countryId:int; + + private var lastmc:MovieClip; + + private var leftTime:int; + + private var timer:Timer; + + private var cityWarMemInfoUI:ProCityWarMemInfoUI; + + public function ProCasListUI() + { + var _loc3_:MovieClip = null; + var _loc9_:CasListMc = null; + this.gameRes = GameUIRes.getInstance(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_canzhan); + super.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,321); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:MovieClip = this.gameRes.getMovieClip(ClassConfig.guild_casList,this.gameRes.getGuildInfo()); + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 15; + this.btnArr = new Array(); + var _loc4_:int = 1; + while(_loc4_ < 8) + { + _loc3_ = _loc2_["mc" + _loc4_]; + this.btnArr.push(_loc3_); + _loc3_.addEventListener(MouseEvent.CLICK,this.mouseClick,false,0,true); + _loc3_.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + _loc3_.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + _loc3_.gotoAndStop(1); + _loc3_.buttonMode = true; + _loc4_++; + } + var _loc5_:Array = ["城池","类型","占据时间","占据方","挑战方","防守人数","参与人数","挑战人数","参与挑战"]; + var _loc6_:Array = [40,40,80,110,110,60,65,60,65]; + this.tableMc = new UITable(); + this.tableMc.install(8,_loc5_,_loc6_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 5; + this.tableMc.y = 60; + this.timeText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,150); + _loc1_.addChild(this.timeText); + this.timeText.x = 490; + this.timeText.y = 300; + this.timeText.text = "距离开战还剩:"; + this.casList = new Vector.(); + var _loc7_:int = 1; + while(_loc7_ < 9) + { + _loc9_ = new CasListMc(); + this.tableMc.addChild(_loc9_); + _loc9_.y = 25 * _loc7_; + _loc9_.x = 4; + this.casList.push(_loc9_); + _loc9_.setClick(this.enterWarMemUI); + _loc7_++; + } + var _loc8_:UIButton = new UIButton("关 闭",2,10); + _loc1_.addChild(_loc8_); + _loc8_.x = 280; + _loc8_.y = 292; + _loc8_.onClick = this.closeUI; + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w; + window_heihgt = 300; + } + + override public function closeUI(param1:MouseEvent) : void + { + if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getProCasListById,this.getCountryListInfoResult); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_joinBattle,this.joinBattleResult); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_leaveBattle,this.leaveBattleResult); + } + + override public function removeFromStage(param1:Event) : void + { + this.stopTime(); + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getProCasListById,this.getCountryListInfoResult); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_joinBattle,this.joinBattleResult); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_leaveBattle,this.leaveBattleResult); + } + + override public function setPosition() : void + { + } + + private function mouseClick(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ != this.lastmc) + { + _loc2_.gotoAndStop(3); + if(this.lastmc) + { + this.lastmc.gotoAndStop(1); + } + this.lastmc = _loc2_; + } + this.countryId = int(_loc2_.name.substring(2)); + this.getCountryListInfo(); + } + + private function mouseOut(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ != this.lastmc) + { + _loc2_.gotoAndStop(1); + } + } + + private function mouseOver(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ != this.lastmc) + { + _loc2_.gotoAndStop(2); + } + } + + public function setCountryId(param1:int) : void + { + this.countryId = param1; + if(this.lastmc) + { + this.lastmc.gotoAndStop(1); + } + this.lastmc = this.btnArr[this.countryId - 1]; + this.lastmc.gotoAndStop(3); + this.getCountryListInfo(); + } + + private function getCountryListInfo() : void + { + ConnectService.getInstance().provinceService.getProCasListById(this.countryId); + } + + private function getCountryListInfoResult(param1:ProvinceEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:Object = null; + var _loc5_:Date = null; + var _loc2_:Array = param1.listData; + for(_loc3_ in this.casList) + { + if(_loc2_[_loc3_]) + { + this.casList[_loc3_].setData(_loc2_[_loc3_]); + } + } + _loc4_ = param1.objData; + _loc5_ = _loc4_.serverTime as Date; + this.leftTime = 20 * 3600 - 3600 * _loc5_.hours - 60 * _loc5_.minutes - _loc5_.seconds; + this.startTime(); + } + + private function startTime() : void + { + if(this.leftTime <= 0) + { + return; + } + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timeFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function timeFrame(param1:TimerEvent) : void + { + --this.leftTime; + this.timeText.text = "距离开战还剩:" + PublicMethod.getTime(this.leftTime); + if(this.leftTime <= 0) + { + this.stopTime(); + this.timeText.text = ""; + } + } + + private function stopTime() : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.timeFrame); + this.timer = null; + } + } + + private function enterWarMemUI(param1:CasListMc, param2:int) : void + { + ConnectService.getInstance().provinceService.joinProvincWar(param1.getObj().provinceId,param2); + } + + private function joinBattleResult(param1:ProvinceEvent) : void + { + if(this.cityWarMemInfoUI == null) + { + this.cityWarMemInfoUI = new ProCityWarMemInfoUI(); + this.cityWarMemInfoUI.x = int(width / 2 - this.cityWarMemInfoUI.width / 2); + this.cityWarMemInfoUI.y = -80; + } + addChild(this.cityWarMemInfoUI); + var _loc2_:int = int(param1.objData.provinceId); + this.cityWarMemInfoUI.setProvinceId(_loc2_); + this.getCountryListInfo(); + } + + private function leaveBattleResult(param1:ProvinceEvent) : void + { + this.getCountryListInfo(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/ProCityWarMemInfoUI.as b/flash_decompiled/com/view/ui/guild/ProCityWarMemInfoUI.as new file mode 100644 index 0000000..1810a71 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/ProCityWarMemInfoUI.as @@ -0,0 +1,511 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.province.event.ProvinceEvent; + import com.data.data.hero.Hero; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.HeroItem; + import com.view.ui.guild.mc.Spate2View; + import com.view.ui.guild.mc.SpateView; + import com.view.ui.guild.mc.WarMemMc; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.message.MessageBoxUI; + import com.view.world.EmptyContainer; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class ProCityWarMemInfoUI extends BaseUI + { + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var bg:Sprite; + + private var heroItemVec:Vector.; + + private var selectHero_btn:UIButton; + + private var addArmy_btn:UIButton; + + private var leaveWar_btn:UIButton; + + private var time_txt:TextField; + + private var refreshBtn:UIButton; + + private var memVec:Vector.; + + private var memScrollPane:ScrollPane; + + private var memMc:Sprite; + + private var provinceId:int; + + private var _spateContainer:EmptyContainer; + + private var battleObj:Object; + + private var battleTime:int; + + private var m_heroList:Array; + + private var heroList:Array; + + private var allHeroList:Array; + + private var canKick:int; + + private var timer:Timer; + + private var module:SpateView; + + private var isfirstin:Boolean = true; + + private var heroIdList:Vector. = new Vector.(); + + public function ProCityWarMemInfoUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_junchengbaoming); + this.createUI(); + } + + override public function setPosition() : void + { + } + + override public function createUI() : void + { + var _loc5_:UITitleBg = null; + var _loc6_:UITitleBg = null; + var _loc9_:UITable = null; + var _loc15_:WarMemMc = null; + var _loc16_:HeroItem = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(280,392); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initSecondPanel(328,392); + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x + _loc2_.width + 4; + _loc3_.y = _loc2_.y; + var _loc4_:UITitleBg = new UITitleBg("参战成员",_loc2_.width); + _loc2_.addChild(_loc4_); + _loc4_.x = int(_loc2_.width / 2 - _loc4_.width / 2); + _loc5_ = new UITitleBg("战场地图",_loc3_.width); + _loc3_.addChild(_loc5_); + _loc5_.x = int(_loc3_.width / 2 - _loc5_.width / 2); + _loc6_ = new UITitleBg("武将选择",_loc3_.width); + _loc3_.addChild(_loc6_); + _loc6_.x = int(_loc3_.width / 2 - _loc5_.width / 2); + _loc6_.y = 210; + var _loc7_:Array = ["君主","所在据点","操作"]; + var _loc8_:Array = [110,80,95]; + _loc9_ = new UITable(); + _loc9_.drawLine = false; + _loc9_.install(12,_loc7_,_loc8_); + _loc2_.addChild(_loc9_); + _loc9_.x = 4; + _loc9_.y = 26; + this.time_txt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,180); + _loc2_.addChild(this.time_txt); + this.time_txt.x = 25; + this.time_txt.y = _loc9_.y + _loc9_.height + 18; + this.time_txt.text = "战争开始倒计时:"; + this.refreshBtn = new UIButton("刷 新",2,10); + _loc2_.addChild(this.refreshBtn); + this.refreshBtn.x = 205; + this.refreshBtn.y = this.time_txt.y - 3; + this.refreshBtn.onClick = this.refresh; + this.memScrollPane = new ScrollPane(); + this.memScrollPane.setSize(281,301); + this.memScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc9_.addChild(this.memScrollPane); + this.memScrollPane.y = 25; + this.memMc = new Sprite(); + this.memScrollPane.source = this.memMc; + this.memVec = new Vector.(); + var _loc10_:int = 0; + while(_loc10_ < 12) + { + _loc15_ = new WarMemMc(); + this.memVec.push(_loc15_); + this.memMc.addChild(_loc15_); + _loc15_.y = 25 * _loc10_; + _loc15_.x = 4; + _loc10_++; + } + this.memScrollPane.update(); + var _loc11_:Sprite = this.gameRes.getSprite(ClassConfig.pro_warbg,this.gameRes.getGuildInfo()); + _loc3_.addChild(_loc11_); + _loc11_.x = 2; + _loc11_.y = 25; + _loc11_.width = 334; + _loc11_.height = 184; + this.selectHero_btn = new UIButton("武将选择",2,10); + _loc3_.addChild(this.selectHero_btn); + this.selectHero_btn.x = 15; + this.selectHero_btn.y = 335; + this.selectHero_btn.onClick = this.selectHero; + this.addArmy_btn = new UIButton("补充兵力",2,10); + _loc3_.addChild(this.addArmy_btn); + this.addArmy_btn.x = 15; + this.addArmy_btn.y = 365; + this.leaveWar_btn = new UIButton("离开战场",2,10); + _loc3_.addChild(this.leaveWar_btn); + this.leaveWar_btn.x = 260; + this.leaveWar_btn.y = 365; + this.leaveWar_btn.onClick = this.leaveWar; + this.heroItemVec = new Vector.(); + var _loc12_:int = 0; + while(_loc12_ < 5) + { + _loc16_ = new HeroItem(); + _loc3_.addChild(_loc16_); + _loc16_.x = 8 + _loc12_ * _loc16_.width; + _loc16_.y = _loc6_.y + 28; + this.heroItemVec.push(_loc16_); + _loc12_++; + } + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(16764260,170); + _loc13_.text = "至少选择一名武将加入战场"; + _loc3_.addChild(_loc13_); + _loc13_.x = 85; + _loc13_.y = 338; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(16711680,170); + _loc14_.text = "战斗开始后不能更换武将"; + _loc3_.addChild(_loc14_); + _loc14_.x = 85; + _loc14_.y = 368; + this.refreshBtn.setUnEnable(); + this._spateContainer = new EmptyContainer(); + _loc11_.addChild(this._spateContainer); + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function setProvinceId(param1:int) : void + { + this.provinceId = param1; + this.getBattleUserInfo(); + } + + private function refresh(param1:MouseEvent) : void + { + this.refreshBtn.setUnEnable(); + this.getBattleUserInfo(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getBattleUserInfo,this.getBattleUserInfoResult); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_leaveBattle,this.leaveWarResult); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_kickUser,this.kickUserResult); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_changeHeros,this.changeHeroResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getBattleUserInfo,this.getBattleUserInfoResult); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_leaveBattle,this.leaveWarResult); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_kickUser,this.kickUserResult); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_changeHeros,this.changeHeroResult); + this.stopTime(); + if(contains(HeroListSelectUI.getInstance())) + { + removeChild(HeroListSelectUI.getInstance()); + } + } + + private function getBattleUserInfo() : void + { + ConnectService.getInstance().provinceService.getBattleUserInfo(this.provinceId); + } + + private function getBattleUserInfoResult(param1:ProvinceEvent) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + this.refreshBtn.setEnable(); + this.battleObj = param1.objData; + if(this.battleObj.kickMes != "") + { + MessageBoxUI.getInstance().addMessage(this.battleObj.kickMes); + this.closeUI(null); + return; + } + if(this.battleObj.time > 0) + { + this.battleTime = this.battleObj.time; + this.startTime(); + this.showSpate(this.battleObj.formationInfo); + this.selectHero_btn.setEnable(); + this.addArmy_btn.setEnable(); + this.showList(this.battleObj.userInfo); + this.canKick = this.battleObj.canKick; + if(this.battleObj.isWatch == 1) + { + this.selectHero_btn.setUnEnable(); + this.addArmy_btn.setUnEnable(); + return; + } + this.m_heroList = new Array(); + while(_loc3_ < this.battleObj.heroList.length) + { + if(this.battleObj.heroList[_loc3_] is Object) + { + this.m_heroList.push(this.battleObj.heroList[_loc3_].heroId); + } + _loc3_ += 1; + } + this.heroList = this.battleObj.heroList; + if(this.heroList.length == 0) + { + this.selectHero(null); + return; + } + this.showHero(); + return; + } + this.__enter(); + } + + private function startTime() : void + { + if(this.battleTime <= 0) + { + return; + } + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timeFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function timeFrame(param1:TimerEvent) : void + { + --this.battleTime; + this.time_txt.text = "战争开始倒计时:" + PublicMethod.getTime(this.battleTime); + if(this.battleTime <= 0) + { + this.stopTime(); + this.time_txt.text = ""; + this.refresh(null); + } + } + + private function stopTime() : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.timeFrame); + this.timer = null; + } + } + + private function __enter() : void + { + } + + private function showSpate(param1:Object) : void + { + this._spateContainer.clear(); + switch(param1.formationId) + { + case 1: + this.module = new Spate2View(param1.pointList); + break; + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + } + if(this.module != null) + { + this._spateContainer.addChild(this.module); + } + } + + private function showList(param1:Array) : void + { + var _loc2_:* = undefined; + var _loc3_:WarMemMc = null; + this.clearUserList(); + for(_loc2_ in param1) + { + if(_loc2_ > 11) + { + _loc3_ = new WarMemMc(); + this.memVec.push(_loc3_); + this.memMc.addChild(_loc3_); + _loc3_.y = 24 * _loc2_; + } + this.memVec[_loc2_].provinceId = this.provinceId; + this.memVec[_loc2_].setData(param1[_loc2_],this.canKick); + } + } + + private function clearUserList() : void + { + var _loc1_:int = int(this.memVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ < 12) + { + this.memVec[_loc2_].setData(null,this.canKick); + } + else + { + this.memVec[_loc2_].clear(); + this.memMc.removeChild(this.memVec[_loc2_]); + this.memVec.splice(_loc2_,1); + } + _loc2_--; + } + this.memScrollPane.update(); + } + + private function showHero() : void + { + var _loc1_:int = 0; + if(this.heroList.length == 0) + { + _loc1_ = 0; + while(_loc1_ < this.heroItemVec.length) + { + this.heroItemVec[_loc1_].update(null); + _loc1_++; + } + this.heroIdList = new Vector.(); + return; + } + if(this.isfirstin) + { + this.isfirstin = false; + MessageBoxUI.getInstance().addMessage("你成功加入战场"); + } + var _loc2_:int = 0; + while(_loc2_ < this.heroItemVec.length) + { + if(this.heroList[_loc2_]) + { + this.heroIdList.push(this.heroList[_loc2_].heroId); + this.heroItemVec[_loc2_].update(this.heroList[_loc2_]); + } + else + { + this.heroItemVec[_loc2_].update(null); + } + _loc2_++; + } + } + + private function getSpHero(param1:Array) : Array + { + return null; + } + + private function leaveWar(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("您确定要离开战场吗?",this.confirmLeave); + } + + private function confirmLeave() : void + { + ConnectService.getInstance().provinceService.userLeave(this.provinceId); + } + + private function leaveWarResult(param1:ProvinceEvent) : void + { + this.clearUserList(); + this._spateContainer.clear(); + this.closeUI(null); + } + + private function kickUserResult(param1:ProvinceEvent) : void + { + this.refresh(null); + } + + private function changePlayHeros(param1:*) : void + { + this.refresh(null); + } + + 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().provinceService.changePlayHeros(this.provinceId,_loc2_); + } + + private function changeHeroResult(param1:ProvinceEvent) : void + { + this.refresh(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/ProSelectCityUI.as b/flash_decompiled/com/view/ui/guild/ProSelectCityUI.as new file mode 100644 index 0000000..470f8f1 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/ProSelectCityUI.as @@ -0,0 +1,639 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.province.event.ProvinceEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.CityListMc; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ProSelectCityUI extends BaseUI + { + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var tableMc:UITable; + + private var provinceNametxt:TextField; + + private var provinceEffecttxt:TextField; + + private var countryNametxt:TextField; + + private var needLeveltxt:TextField; + + private var needPrestigetxt:TextField; + + private var levelNametxt:TextField; + + private var provinceAwardtxt:TextField; + + private var guildCountrytxt:TextField; + + private var guildLeveltxt:TextField; + + private var guildPrestigetxt:TextField; + + private var needtxt:TextField; + + private var addtiptxt:TextField; + + private var btnArr:Array; + + private var cityListVec:Vector.; + + private var btn_add1:UIButton; + + private var btn_add2:UIButton; + + private var btn_add3:UIButton; + + private var btn_redu1:UIButton; + + private var btn_redu2:UIButton; + + private var btn_redu3:UIButton; + + private var appBtn:UIButton; + + private var countryId:int; + + private var lastmc:MovieClip; + + private var _myinfo:Object; + + private var _usenum:int; + + private var _act:int = 0; + + private var lastItem:CityListMc; + + public function ProSelectCityUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_chengchixuanze); + super.setPosition(); + this.createUI(); + } + + override public function setPosition() : void + { + } + + override public function createUI() : void + { + var _loc6_:int = 0; + var _loc7_:TextField = null; + var _loc9_:TextField = null; + var _loc12_:TextField = null; + var _loc19_:MovieClip = null; + var _loc22_:CityListMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:MovieClip = this.gameRes.getMovieClip(ClassConfig.guild_casList,this.gameRes.getGuildInfo()); + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 5; + var _loc3_:Array = ["类型","城池名","占据联盟","挑战联盟","等级需求","荣誉需求","操作"]; + var _loc4_:Array = [53,76,103,110,96,95,90]; + this.tableMc = new UITable(); + this.tableMc.install(8,_loc3_,_loc4_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 10; + this.tableMc.y = 45; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc5_.text = "城 池 名:"; + _loc1_.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = 275; + this.provinceNametxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.provinceNametxt); + this.provinceNametxt.x = _loc5_.x + _loc5_.width; + this.provinceNametxt.y = _loc5_.y; + _loc6_ = 18; + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc7_.text = "资源加成:"; + _loc1_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc5_.y + _loc6_; + this.provinceEffecttxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.provinceEffecttxt); + this.provinceEffecttxt.x = _loc7_.x + _loc7_.width; + this.provinceEffecttxt.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,84); + _loc8_.text = "申请联盟国家:"; + _loc1_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + _loc6_; + this.countryNametxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + _loc1_.addChild(this.countryNametxt); + this.countryNametxt.x = _loc8_.x + _loc8_.width; + this.countryNametxt.y = _loc8_.y; + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,84); + _loc9_.text = "申请等级需求:"; + _loc1_.addChild(_loc9_); + _loc9_.x = _loc5_.x; + _loc9_.y = _loc8_.y + _loc6_; + this.needLeveltxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + _loc1_.addChild(this.needLeveltxt); + this.needLeveltxt.x = _loc9_.x + _loc9_.width; + this.needLeveltxt.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,84); + _loc10_.text = "申请荣誉需求:"; + _loc1_.addChild(_loc10_); + _loc10_.x = _loc5_.x; + _loc10_.y = _loc9_.y + _loc6_; + this.needPrestigetxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + _loc1_.addChild(this.needPrestigetxt); + this.needPrestigetxt.x = _loc10_.x + _loc10_.width; + this.needPrestigetxt.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc11_.text = "城池类型:"; + _loc1_.addChild(_loc11_); + _loc11_.x = 170; + _loc11_.y = _loc5_.y; + this.levelNametxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(this.levelNametxt); + this.levelNametxt.x = _loc11_.x + _loc11_.width; + this.levelNametxt.y = _loc11_.y; + _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc12_.text = "特殊奖励:"; + _loc1_.addChild(_loc12_); + _loc12_.x = _loc11_.x; + _loc12_.y = _loc7_.y; + this.provinceAwardtxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(this.provinceAwardtxt); + this.provinceAwardtxt.x = _loc12_.x + _loc12_.width; + this.provinceAwardtxt.y = _loc12_.y; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,84); + _loc13_.text = "当前联盟国家:"; + _loc1_.addChild(_loc13_); + _loc13_.x = _loc11_.x; + _loc13_.y = _loc8_.y; + this.guildCountrytxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + _loc1_.addChild(this.guildCountrytxt); + this.guildCountrytxt.x = _loc13_.x + _loc13_.width; + this.guildCountrytxt.y = _loc13_.y; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,84); + _loc14_.text = "当前联盟等级:"; + _loc1_.addChild(_loc14_); + _loc14_.x = _loc11_.x; + _loc14_.y = _loc9_.y; + this.guildLeveltxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + _loc1_.addChild(this.guildLeveltxt); + this.guildLeveltxt.x = _loc14_.x + _loc14_.width; + this.guildLeveltxt.y = _loc14_.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,84); + _loc15_.text = "当前联盟荣誉:"; + _loc1_.addChild(_loc15_); + _loc15_.x = _loc11_.x; + _loc15_.y = _loc10_.y; + this.guildPrestigetxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + _loc1_.addChild(this.guildPrestigetxt); + this.guildPrestigetxt.x = _loc15_.x + _loc15_.width; + this.guildPrestigetxt.y = _loc15_.y; + this.needtxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,220); + _loc1_.addChild(this.needtxt); + this.needtxt.x = 350; + this.needtxt.y = _loc5_.y; + this.addtiptxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,220); + _loc1_.addChild(this.addtiptxt); + this.addtiptxt.x = 350; + this.addtiptxt.y = _loc10_.y; + this.btn_add1 = new UIButton("+200",1,10); + this.btn_add2 = new UIButton("+500",1,10); + this.btn_add3 = new UIButton("+1000",1,10); + this.btn_redu1 = new UIButton("-200",1,10); + this.btn_redu2 = new UIButton("-500",1,10); + this.btn_redu3 = new UIButton("-1000",1,10); + this.btn_add1.onClick = this.addclickhandler; + this.btn_add2.onClick = this.addclickhandler; + this.btn_add3.onClick = this.addclickhandler; + this.btn_redu1.onClick = this.addclickhandler; + this.btn_redu2.onClick = this.addclickhandler; + this.btn_redu3.onClick = this.addclickhandler; + this.appBtn = new UIButton("申请",1,10); + this.appBtn.onClick = this.joinclickhandler; + _loc1_.addChild(this.btn_add1); + _loc1_.addChild(this.btn_add2); + _loc1_.addChild(this.btn_add3); + _loc1_.addChild(this.btn_redu1); + _loc1_.addChild(this.btn_redu2); + _loc1_.addChild(this.btn_redu3); + _loc1_.addChild(this.appBtn); + this.btn_add1.x = 350; + this.btn_add1.y = _loc7_.y + 3; + this.btn_add2.x = this.btn_add1.x + 60; + this.btn_add2.y = this.btn_add1.y; + this.btn_add3.x = this.btn_add2.x + 60; + this.btn_add3.y = this.btn_add2.y; + this.btn_redu1.x = this.btn_add1.x; + this.btn_redu1.y = this.btn_add1.y + 26; + this.btn_redu2.x = this.btn_redu1.x + 60; + this.btn_redu2.y = this.btn_redu1.y; + this.btn_redu3.x = this.btn_redu2.x + 60; + this.btn_redu3.y = this.btn_redu2.y; + this.appBtn.x = 540; + this.appBtn.y = this.btn_add1.y + 10; + var _loc16_:Sprite = PublicMethod.getTrLine(620); + _loc1_.addChild(_loc16_); + _loc16_.x = 10; + _loc16_.y = _loc15_.y + 20; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,620); + _loc17_.height = 34; + _loc17_.wordWrap = true; + _loc17_.multiline = true; + var _loc18_:TextFormat = new TextFormat(); + _loc18_.leading = 4; + _loc17_.defaultTextFormat = _loc18_; + _loc1_.addChild(_loc17_); + _loc17_.x = 10; + _loc17_.y = _loc16_.y + 5; + _loc17_.htmlText = "1、只能申请挑战本国城池,挑战城池需要联盟等级和荣誉达到挑战需求
2、需要付出超过当前挑战联盟至少1个虎符,才能取代对方的挑战资格。系统会返还被取代方申请消耗的虎符"; + this.btnArr = new Array(); + var _loc20_:int = 1; + while(_loc20_ < 8) + { + _loc19_ = _loc2_["mc" + _loc20_]; + this.btnArr.push(_loc19_); + _loc19_.addEventListener(MouseEvent.CLICK,this.mouseClick,false,0,true); + _loc19_.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + _loc19_.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + _loc19_.gotoAndStop(1); + _loc19_.buttonMode = true; + _loc20_++; + } + this.cityListVec = new Vector.(); + var _loc21_:int = 1; + while(_loc21_ < 9) + { + _loc22_ = new CityListMc(); + _loc22_.y = 25 * _loc21_; + _loc22_.x = 4; + this.tableMc.addChild(_loc22_); + _loc22_.setClickF(this.clickCity); + this.cityListVec.push(_loc22_); + _loc21_++; + } + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getAllProvInfoByCountryId,this.getCountryListInfoResult); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_applyProvWar,this.applyWarSucc); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_addAppItem,this.applyWarSucc); + this.addtiptxt.visible = false; + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getAllProvInfoByCountryId,this.getCountryListInfoResult); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_applyProvWar,this.applyWarSucc); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_addAppItem,this.applyWarSucc); + } + + private function getCountryListInfo() : void + { + ConnectService.getInstance().provinceService.getAllProvInfoByCountryId(this.countryId); + } + + private function getCountryListInfoResult(param1:ProvinceEvent) : void + { + var _loc4_:Object = null; + if(param1.objData != this.countryId) + { + return; + } + var _loc2_:Array = param1.listData; + if(_loc2_ == null || _loc2_.length == 0) + { + return; + } + var _loc3_:* = _loc2_[0]; + if(_loc3_["canSelect"] != 1) + { + this.appBtn.setUnEnable(); + } + else + { + this.appBtn.setEnable(); + } + this._myinfo = _loc2_[1]; + var _loc5_:int = 0; + while(_loc5_ < _loc2_.length - 2) + { + _loc4_ = _loc2_[_loc5_ + 2]; + if(_loc4_) + { + this.cityListVec[_loc5_].setData(_loc4_); + } + _loc5_ += 1; + } + this.clickCity(this.cityListVec[0]); + } + + public function setCountryId(param1:int) : void + { + this.countryId = param1; + if(this.lastmc) + { + this.lastmc.gotoAndStop(1); + } + this.lastmc = this.btnArr[this.countryId - 1]; + this.lastmc.gotoAndStop(3); + this.getCountryListInfo(); + } + + private function mouseClick(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ != this.lastmc) + { + _loc2_.gotoAndStop(3); + if(this.lastmc) + { + this.lastmc.gotoAndStop(1); + } + this.lastmc = _loc2_; + } + this.countryId = int(_loc2_.name.substring(2)); + this.getCountryListInfo(); + } + + private function mouseOut(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ != this.lastmc) + { + _loc2_.gotoAndStop(1); + } + } + + private function mouseOver(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + if(_loc2_ != this.lastmc) + { + _loc2_.gotoAndStop(2); + } + } + + private function clickCity(param1:CityListMc) : void + { + if(param1.getObj() == null) + { + return; + } + if(this.lastItem) + { + this.lastItem.setSelect(false); + } + this.lastItem = param1; + this.lastItem.setSelect(true); + this.infoItem(this.lastItem); + } + + private function infoItem(param1:CityListMc) : void + { + var _loc2_:* = param1.getObj(); + if(_loc2_ == null) + { + return; + } + var _loc3_:* = _loc2_["countryName"]; + this.countryNametxt.text = String(_loc3_); + var _loc4_:* = this._myinfo["guildCountry"]; + this.guildCountrytxt.text = _loc4_; + this.provinceNametxt.htmlText = String(_loc2_["provinceName"]); + this.levelNametxt.htmlText = String(_loc2_["levelName"]); + this.provinceAwardtxt.htmlText = String(_loc2_["provinceAward"]); + this.provinceEffecttxt.htmlText = String(_loc2_["provinceEffect"]); + this.needLeveltxt.htmlText = String(_loc2_["needLevel"]) + "级"; + this.guildLeveltxt.htmlText = String(this._myinfo["guildLevel"]) + "级"; + this.needPrestigetxt.htmlText = String(_loc2_["needPrestige"]); + this.guildPrestigetxt.htmlText = String(this._myinfo["guildPrestige"]); + var _loc5_:Boolean = false; + var _loc6_:String = ""; + if(_loc2_["needPrestige"] > this._myinfo["guildPrestige"]) + { + if(_loc2_["isSelfGuild"] == 1 && this._myinfo["guildPrestige"] > 1) + { + this.setAddBtnEnabled(true); + } + else + { + _loc5_ = true; + this.guildPrestigetxt.htmlText = "" + String(this._myinfo["guildPrestige"]) + ""; + _loc6_ = "联盟荣誉不足"; + this.setAddBtnEnabled(false); + } + } + if(_loc2_["needLevel"] > this._myinfo["guildLevel"]) + { + _loc5_ = true; + this.guildLeveltxt.htmlText = "" + String(this._myinfo["guildLevel"]) + "级"; + _loc6_ = "联盟等级不足"; + this.setAddBtnEnabled(false); + } + if(_loc3_ != _loc4_) + { + _loc5_ = true; + this.guildCountrytxt.htmlText = "" + _loc4_ + ""; + _loc6_ = "不属于本国城池"; + this.setAddBtnEnabled(false); + } + if(this._myinfo["guildId"] == _loc2_["occuGuildId"]) + { + _loc5_ = true; + _loc6_ = "已占领该城池"; + this.setAddBtnEnabled(false); + } + this._usenum = _loc2_["needPrestige"]; + if(_loc2_["isSelfGuild"] == 1) + { + _loc5_ = true; + _loc6_ = "已申请挑战该城池"; + this.appBtn.setText("申请"); + this.setAddBtnEnabled(false); + } + else if(_loc2_["isSelfGuild"] == 2) + { + this.appBtn.setText("申请"); + this._act = 0; + } + if(_loc5_ == true) + { + this.needtxt.htmlText = _loc6_; + this.appBtn.setUnEnable(); + } + else + { + this.appBtn.setEnable(); + this.setAddBtnEnabled(true); + this.need(this._usenum); + } + } + + private function setAddBtnEnabled(param1:Boolean) : void + { + if(param1) + { + this.btn_add1.setEnable(); + this.btn_add2.setEnable(); + this.btn_add3.setEnable(); + this.btn_redu1.setEnable(); + this.btn_redu2.setEnable(); + this.btn_redu3.setEnable(); + } + else + { + this.btn_add1.setUnEnable(); + this.btn_add2.setUnEnable(); + this.btn_add3.setUnEnable(); + this.btn_redu1.setUnEnable(); + this.btn_redu2.setUnEnable(); + this.btn_redu3.setUnEnable(); + } + } + + private function need(param1:int) : void + { + if(param1 < 1) + { + this._usenum = 1; + param1 = 1; + } + if(this._act == 0) + { + this.needtxt.htmlText = "消耗 " + param1 + " 点荣誉申请挑战资格"; + this.addtiptxt.visible = false; + } + else + { + this.needtxt.htmlText = "追加 " + param1 + " 点荣誉申请挑战资格"; + this.addtiptxt.visible = true; + } + } + + private function joinclickhandler(param1:MouseEvent) : void + { + var _loc2_:String = null; + if(this.lastItem == null) + { + MessageBoxUI.getInstance().addMessage("请先选择一个城池"); + return; + } + if(this._usenum < 1) + { + this._usenum = 1; + } + if(this._act == 0) + { + _loc2_ = "您确定消耗" + this._usenum + "点荣誉申请挑战资格吗?"; + } + else + { + _loc2_ = "您确定追加" + this._usenum + "点荣誉申请挑战资格吗?"; + } + MessageBoxUI.getInstance().confirmMsg(_loc2_,this.onfichtsub); + } + + private function onfichtsub() : void + { + if(this.lastItem == null) + { + MessageBoxUI.getInstance().addMessage("请先选择一个城池"); + return; + } + ConnectService.getInstance().provinceService.applyProvWar(this.lastItem.getObj().provinceId,this._usenum); + } + + private function applyWarSucc(param1:ProvinceEvent) : void + { + if(this._act == 0) + { + MessageBoxUI.getInstance().addMessage("挑战成功"); + } + else + { + MessageBoxUI.getInstance().addMessage("追加成功"); + } + this.closeUI(null); + } + + private function addclickhandler(param1:MouseEvent) : void + { + var _loc2_:UIButton = param1.currentTarget as UIButton; + var _loc3_:int = 0; + switch(_loc2_) + { + case this.btn_add1: + _loc3_ = 200; + break; + case this.btn_add2: + _loc3_ = 500; + break; + case this.btn_add3: + _loc3_ = 1000; + break; + case this.btn_redu1: + _loc3_ = -200; + break; + case this.btn_redu2: + _loc3_ = -500; + break; + case this.btn_redu3: + _loc3_ = -1000; + } + if(_loc3_ < 0) + { + if(this._act == 0) + { + if(this._usenum + _loc3_ < this.lastItem.getObj()["needPrestige"]) + { + return; + } + } + else if(this._usenum + _loc3_ < 1) + { + return; + } + } + if(this._usenum + _loc3_ > this._myinfo["guildPrestige"]) + { + MessageBoxUI.getInstance().addMessage("联盟荣誉不足!"); + return; + } + this._usenum += _loc3_; + this.need(this._usenum); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/SelectDefCasUI.as b/flash_decompiled/com/view/ui/guild/SelectDefCasUI.as new file mode 100644 index 0000000..2fd269d --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/SelectDefCasUI.as @@ -0,0 +1,153 @@ +package com.view.ui.guild +{ + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.guild.event.LeagueDefEvent; + import com.view.newui.UIButton; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.guild.mc.DefCasItem; + import com.view.ui.message.MessageBoxUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class SelectDefCasUI extends UIWindowBg + { + + private var teamListVec:Vector.; + + private var teamListMc:Sprite; + + private var scrollPane:ScrollPane; + + private var currLevel:int; + + public function SelectDefCasUI() + { + var _loc2_:Array = null; + var _loc5_:UIButton = null; + var _loc6_:UIButton = null; + var _loc7_:DefCasItem = null; + super(); + initSize(300,290); + loadTitle(UITitleConfig.title_chengchixuanze); + addCloseBtn(); + initBg(); + var _loc1_:Array = ["选择","成员名称","职位","君主等级","城池等级","防守状态"]; + _loc2_ = [55,110,75,90,84,80]; + var _loc3_:UITable = new UITable(); + _loc3_.drawLine = false; + _loc3_.install(10,_loc1_,_loc2_); + bg1.addChild(_loc3_); + _loc3_.x = 4; + _loc3_.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(491,250); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.scrollPane.verticalPageScrollSize = 23; + _loc3_.addChild(this.scrollPane); + this.scrollPane.y = 25; + this.teamListMc = new Sprite(); + this.scrollPane.source = this.teamListMc; + this.teamListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 10) + { + _loc7_ = new DefCasItem(); + this.teamListMc.addChild(_loc7_); + this.teamListVec.push(_loc7_); + _loc7_.y = _loc4_ * 25; + _loc7_.x = 4; + _loc4_++; + } + this.scrollPane.update(); + _loc5_ = new UIButton("确 定",2,10); + _loc6_ = new UIButton("取 消",2,10); + bg1.addChild(_loc5_); + _loc5_.x = 355; + _loc5_.y = 285; + _loc5_.onClick = this.selectDefCastle; + bg1.addChild(_loc6_); + _loc6_.x = _loc5_.x + _loc5_.width + 5; + _loc6_.y = _loc5_.y; + _loc6_.onClick = closeSelf; + ConnectService.getInstance().addEventListener(LeagueDefEvent.LeagueDef_showLeagueDefCastle,this.showLeagueDefCastleSucc); + } + + private function selectDefCastle(param1:MouseEvent) : void + { + var _loc3_:DefCasItem = null; + var _loc2_:Array = new Array(); + for each(_loc3_ in this.teamListVec) + { + if(_loc3_.getObj() != null && _loc3_.hasSelect) + { + _loc2_.push(_loc3_.getObj().userId); + } + } + ConnectService.getInstance().guildService.selectDefCastle(this.currLevel,_loc2_); + closeSelf(null); + } + + private function clearMemList() : void + { + var _loc1_:int = int(this.teamListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.teamListVec[_loc2_].setData(null); + if(_loc2_ > 9) + { + this.teamListMc.removeChild(this.teamListVec[_loc2_]); + this.teamListVec.splice(_loc2_,1); + } + _loc2_--; + } + this.scrollPane.update(); + } + + public function setLevel(param1:int) : void + { + this.currLevel = param1; + } + + public function loadList() : void + { + ConnectService.getInstance().guildService.showLeagueDefCastle(); + } + + private function showLeagueDefCastleSucc(param1:LeagueDefEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:DefCasItem = null; + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + closeSelf(null); + return; + } + this.clearMemList(); + var _loc2_:Array = param1.listData; + if(!(_loc2_ == null || _loc2_.length == 0)) + { + for(_loc3_ in _loc2_) + { + if(_loc3_ > 9) + { + _loc4_ = new DefCasItem(); + this.teamListMc.addChild(_loc4_); + this.teamListVec.push(_loc4_); + _loc4_.y = _loc3_ * 25; + _loc4_.x = 4; + } + this.teamListVec[_loc3_].setData(_loc2_[_loc3_]); + } + this.scrollPane.update(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/UnionArmy.as b/flash_decompiled/com/view/ui/guild/UnionArmy.as new file mode 100644 index 0000000..999862e --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/UnionArmy.as @@ -0,0 +1,727 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.mc.sprite.PageInputMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.ArmyItem1; + import com.view.ui.guild.mc.UnionArmyIcon; + import com.view.ui.message.MessageBoxUI; + import flash.display.DisplayObject; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UnionArmy extends BaseUI + { + + private static var instance:UnionArmy; + + private var armyMc:MovieClip; + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + public var m_currentIcon:UnionArmyIcon; + + public var gradeIcon1:UnionArmyIcon; + + public var gradeIcon2:UnionArmyIcon; + + public var gradeIcon3:UnionArmyIcon; + + public var gradeIcon4:UnionArmyIcon; + + public var gradeIcon5:UnionArmyIcon; + + public var gradeIcon6:UnionArmyIcon; + + public var gradeIcon0:UnionArmyIcon; + + private var m_iconSet:Array; + + private var m_minValue:int; + + private var m_maxValue:int; + + private var m_glow:DisplayObject; + + private const UINT:int = 100; + + private var tableMc:UITable; + + private var info_txt:TextField; + + private var needMoney_txt:TextField; + + private var hadMoney_txt:TextField; + + private var needContribut_txt:TextField; + + private var hadContribut_txt:TextField; + + private var armyName_txt:TextField; + + private var needArmyNum_txt:TextField; + + private var hadArmyNum_txt:TextField; + + private var input:PageInputMc; + + private var leftBtn:SimpleButton; + + private var rightBtn:SimpleButton; + + private var m_choiceItem:ArmyItem1; + + private var m_choiceIcon:UnionArmyIcon; + + private var armyVec:Vector.; + + private var m_upgradeBtn:UIButton; + + private var m_buiName:String; + + private var _currBuildId:int; + + private var m_buiLv:int; + + private var m_armyLv:int; + + private var m_money:int; + + private var m_contribut:int; + + public function UnionArmy() + { + super(); + if(instance != null) + { + throw new Error("不能实例化"); + } + super.addUIBg(); + super.setPosition(); + this.createUI(); + } + + public static function getInstance() : UnionArmy + { + if(instance == null) + { + instance = new UnionArmy(); + } + return instance; + } + + override public function createUI() : void + { + var _loc9_:UITable = null; + var _loc14_:ArmyItem1 = null; + var _loc15_:Sprite = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["兵种","数量"]; + var _loc3_:Array = [110,80]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(15,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + var _loc4_:UIWindowBg = new UIWindowBg(); + _loc4_.initThirdPanel(430,250); + _loc1_.addChild(_loc4_); + _loc4_.x = this.tableMc.x + this.tableMc.width + 2; + _loc4_.y = this.tableMc.y; + var _loc5_:UITitleBg = new UITitleBg("士兵升阶",_loc4_.width); + _loc4_.addChild(_loc5_); + _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2); + this.info_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,400); + _loc4_.addChild(this.info_txt); + this.info_txt.x = 10; + this.info_txt.y = 30; + this.armyVec = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 15) + { + _loc14_ = new ArmyItem1(); + this.tableMc.addChild(_loc14_); + this.armyVec.push(_loc14_); + _loc14_.x = 4; + _loc14_.y = 26 + _loc6_ * 25; + _loc14_.onClick = this.onRadixClick; + _loc6_++; + } + this.m_currentIcon = new UnionArmyIcon(); + _loc4_.addChild(this.m_currentIcon); + this.m_currentIcon.x = 20; + this.m_currentIcon.y = 64; + var _loc7_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_ui_bg_9),30,11); + _loc4_.addChild(_loc7_); + _loc7_.x = 91; + _loc7_.y = 95; + this.m_iconSet = new Array(); + var _loc8_:int = 0; + while(_loc8_ < 7) + { + this["gradeIcon" + _loc8_] = new UnionArmyIcon(); + _loc15_ = this.gameRes.getMovieClip(ClassConfig.guild_armyIconBGBright,this.gameRes.getGuildInfo()); + this["gradeIcon" + _loc8_].setGlowBackground(_loc15_); + this["gradeIcon" + _loc8_].onClick = this.iconClickHandler; + this.m_iconSet.push(this["gradeIcon" + _loc8_]); + _loc4_.addChild(this["gradeIcon" + _loc8_]); + _loc8_ += 1; + } + this.gradeIcon0.x = this.m_currentIcon.x + 120; + this.gradeIcon0.y = this.m_currentIcon.y; + this.gradeIcon1.x = this.gradeIcon0.x + 71; + this.gradeIcon1.y = this.gradeIcon0.y; + this.gradeIcon2.x = this.gradeIcon1.x + 71; + this.gradeIcon2.y = this.gradeIcon0.y; + this.gradeIcon3.x = this.gradeIcon2.x + 71; + this.gradeIcon3.y = this.gradeIcon0.y; + this.gradeIcon4.x = this.gradeIcon0.x; + this.gradeIcon4.y = this.gradeIcon0.y + 87; + this.gradeIcon5.x = this.gradeIcon1.x; + this.gradeIcon5.y = this.gradeIcon4.y; + this.gradeIcon6.x = this.gradeIcon2.x; + this.gradeIcon6.y = this.gradeIcon4.y; + this.m_glow = this.gameRes.getMovieClip(ClassConfig.guild_armyIconGlow,this.gameRes.getGuildInfo()); + _loc4_.addChild(this.m_glow); + this.m_glow.visible = false; + _loc2_ = ["升阶需求","消耗数量","当前数量"]; + _loc3_ = [150,143,150]; + _loc9_ = new UITable(); + _loc9_.drawLine = true; + _loc9_.install(3,_loc2_,_loc3_); + _loc1_.addChild(_loc9_); + _loc9_.x = _loc4_.x; + _loc9_.y = _loc4_.y + _loc4_.height + 3; + var _loc10_:TextFormat = PublicMethod.getCenterTextFormat(); + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + _loc9_.addChild(_loc11_); + _loc11_.y = 30; + this.needMoney_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,143); + _loc9_.addChild(this.needMoney_txt); + this.needMoney_txt.y = _loc11_.y; + this.needMoney_txt.x = _loc11_.x + _loc11_.width; + this.hadMoney_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,143); + _loc9_.addChild(this.hadMoney_txt); + this.hadMoney_txt.y = _loc11_.y; + this.hadMoney_txt.x = this.needMoney_txt.x + this.needMoney_txt.width; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + _loc9_.addChild(_loc12_); + _loc12_.y = _loc11_.y + 25; + this.needContribut_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,143); + _loc9_.addChild(this.needContribut_txt); + this.needContribut_txt.y = _loc12_.y; + this.needContribut_txt.x = this.needMoney_txt.x; + this.hadContribut_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,143); + _loc9_.addChild(this.hadContribut_txt); + this.hadContribut_txt.y = _loc12_.y; + this.hadContribut_txt.x = this.hadMoney_txt.x; + this.armyName_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + _loc9_.addChild(this.armyName_txt); + this.armyName_txt.y = _loc12_.y + 25; + this.needArmyNum_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,143); + _loc9_.addChild(this.needArmyNum_txt); + this.needArmyNum_txt.y = this.armyName_txt.y; + this.needArmyNum_txt.x = this.needMoney_txt.x; + this.hadArmyNum_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,143); + _loc9_.addChild(this.hadArmyNum_txt); + this.hadArmyNum_txt.y = this.armyName_txt.y; + this.hadArmyNum_txt.x = this.hadMoney_txt.x; + _loc11_.defaultTextFormat = _loc10_; + _loc12_.defaultTextFormat = _loc10_; + this.needMoney_txt.defaultTextFormat = _loc10_; + this.hadMoney_txt.defaultTextFormat = _loc10_; + this.needContribut_txt.defaultTextFormat = _loc10_; + this.hadContribut_txt.defaultTextFormat = _loc10_; + this.armyName_txt.defaultTextFormat = _loc10_; + this.needArmyNum_txt.defaultTextFormat = _loc10_; + this.hadArmyNum_txt.defaultTextFormat = _loc10_; + _loc12_.text = "贡献度"; + _loc11_.text = "铜 币"; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + _loc1_.addChild(_loc13_); + _loc13_.x = _loc9_.x; + _loc13_.y = _loc9_.y + _loc9_.height + 10; + _loc13_.text = "升阶兵数(百个):"; + this.input = new PageInputMc(); + _loc1_.addChild(this.input); + this.input.x = _loc13_.x + _loc13_.width + 2; + this.input.y = _loc13_.y; + this.m_upgradeBtn = new UIButton("升 阶",2); + _loc1_.addChild(this.m_upgradeBtn); + this.m_upgradeBtn.x = this.input.x + this.input.width + 10; + this.m_upgradeBtn.y = _loc13_.y - 3; + this.m_upgradeBtn.onClick = this.upgradeClickHandler; + this.input.setMinNum(0); + this.input.setMaxLen(6); + this.input.setMaxNum(2); + this.input.getLeftBtn().addEventListener(MouseEvent.CLICK,this.minClickHandler); + this.input.getRightBtn().addEventListener(MouseEvent.CLICK,this.maxClickHandler); + this.input.getInputText().addEventListener(Event.CHANGE,this.changeHandler); + } + + private function onRadixClick(param1:ArmyItem1) : void + { + if(this.m_choiceItem != null) + { + this.m_choiceItem.setClick(false); + } + this.m_choiceItem = param1; + this.m_choiceItem.setClick(true); + this.setData(param1.getData()); + } + + private function upgradeClickHandler(param1:MouseEvent) : void + { + var _loc2_:* = this.input.getText(); + if(_loc2_ < 1) + { + MessageBoxUI.getInstance().addMessage("请输入要升阶的数量"); + return; + } + if(this.m_choiceIcon != null && this.m_choiceItem != null) + { + ConnectService.getInstance().guildService.trainArmy(this.m_choiceItem.id,this.m_choiceIcon.id,_loc2_ * this.UINT); + } + } + + private function upgradeSuccess(param1:GuildEvent) : void + { + this.initData(); + } + + private function setData(param1:Object) : void + { + if(param1 == null) + { + return; + } + var _loc2_:Boolean = false; + var _loc3_:int = 0; + var _loc4_:UnionArmyIcon = null; + var _loc5_:* = Math.floor(int(param1.armyHad) / this.UINT); + if(_loc5_ < this.m_minValue) + { + _loc5_ = this.m_minValue; + } + this.m_maxValue = _loc5_; + this.input.setText(this.m_maxValue); + this.input.setMaxNum(this.m_maxValue); + if(this.hadMoney_txt != null) + { + this.hadMoney_txt.text = String(this.m_money); + } + if(this.hadContribut_txt != null) + { + this.hadContribut_txt.text = String(this.m_contribut); + } + if(this.armyName_txt != null) + { + this.armyName_txt.text = param1.armyName; + } + if(this.hadArmyNum_txt != null) + { + this.hadArmyNum_txt.text = String(param1.armyHad); + } + if(this.info_txt != null) + { + this.info_txt.text = "当前" + param1.armyName + ",最高可将士兵升级到" + String(this.m_armyLv) + "阶。"; + } + if(this.m_currentIcon != null) + { + this.m_currentIcon.setShow(param1); + } + if(this.m_iconSet != null) + { + _loc2_ = true; + _loc3_ = 0; + while(_loc3_ < this.m_iconSet.length) + { + _loc4_ = this.m_iconSet[_loc3_] as UnionArmyIcon; + if(_loc4_ != null) + { + if(_loc4_.locked) + { + _loc4_.setEnable(true); + break; + } + if(int(param1.armyLevel) >= int(_loc4_.iconArmyLv)) + { + _loc4_.setEnable(false); + } + else + { + _loc4_.setEnable(true); + if(_loc2_) + { + _loc2_ = false; + this.onSelected(_loc4_); + } + } + } + _loc3_++; + } + if(_loc2_) + { + this.onSelected(null); + } + } + } + + private function onSelected(param1:UnionArmyIcon) : void + { + if(this.m_choiceIcon != null) + { + this.m_choiceIcon.glowBGVisible = false; + this.m_choiceIcon.mouseEnabled = true; + this.m_choiceIcon.buttonMode = true; + } + this.m_glow.visible = false; + this.m_choiceIcon = param1; + if(this.needMoney_txt) + { + this.needMoney_txt.text = String(0); + } + if(this.needContribut_txt != null) + { + this.needContribut_txt.text = String(0); + } + if(this.needArmyNum_txt != null) + { + this.needArmyNum_txt.text = String(int(this.input.getText()) * this.UINT); + } + this.m_upgradeBtn.setUnEnable(); + if(param1 != null && param1.enable) + { + param1.mouseEnabled = false; + param1.buttonMode = false; + param1.glowBGVisible = true; + if(this.m_glow != null) + { + this.m_glow.x = param1.x; + this.m_glow.y = param1.y; + this.m_glow.visible = true; + } + this.showConsume(this.input.getText()); + } + } + + private function showConsume(param1:int) : void + { + if(this.m_choiceIcon == null || this.m_choiceItem == null) + { + return; + } + var _loc2_:* = this.m_choiceIcon.money - this.m_choiceItem.money; + var _loc3_:* = this.m_choiceIcon.contribut - this.m_choiceItem.contribut; + if(_loc2_ < 1 || _loc3_ < 1) + { + return; + } + var _loc4_:* = _loc2_ * this.UINT * param1; + var _loc5_:* = _loc3_ * param1; + var _loc6_:* = this.UINT * param1; + if(_loc4_ <= this.m_money) + { + if(this.hadMoney_txt != null) + { + this.hadMoney_txt.setTextFormat(new TextFormat(null,null,16777215)); + } + } + else if(this.hadMoney_txt != null) + { + this.hadMoney_txt.setTextFormat(new TextFormat(null,null,16711680)); + } + if(this.needMoney_txt != null) + { + this.needMoney_txt.text = String(_loc4_); + } + if(_loc5_ <= this.m_contribut) + { + if(this.hadContribut_txt != null) + { + this.hadContribut_txt.setTextFormat(new TextFormat(null,null,16777215)); + } + } + else if(this.hadContribut_txt != null) + { + this.hadContribut_txt.setTextFormat(new TextFormat(null,null,16711680)); + } + if(this.needContribut_txt != null) + { + this.needContribut_txt.text = String(_loc5_); + } + if(this.m_choiceItem.armyCount >= _loc6_) + { + if(this.hadArmyNum_txt != null) + { + this.hadArmyNum_txt.setTextFormat(new TextFormat(null,null,16777215)); + } + } + else if(this.hadArmyNum_txt != null) + { + this.hadArmyNum_txt.setTextFormat(new TextFormat(null,null,16711680)); + } + if(this.needArmyNum_txt != null) + { + this.needArmyNum_txt.text = String(_loc6_); + } + if(this.m_upgradeBtn != null) + { + if(_loc4_ > 0 && _loc4_ <= this.m_money && _loc5_ > 0 && _loc5_ <= this.m_contribut && this.m_choiceItem != null && this.m_choiceItem.armyCount >= _loc6_) + { + this.m_upgradeBtn.setEnable(); + } + else + { + this.m_upgradeBtn.setUnEnable(); + } + } + } + + private function limit(param1:int) : int + { + var _loc2_:* = Math.min(this.m_minValue,this.m_maxValue); + var _loc3_:* = this.m_maxValue; + if(param1 > _loc3_) + { + return _loc3_; + } + if(param1 < _loc2_) + { + return _loc2_; + } + return param1; + } + + private function changeHandler(param1:Event) : void + { + var _loc2_:int = 0; + if(this.input != null) + { + _loc2_ = this.limit(this.input.getText()); + this.input.setText(_loc2_); + this.showConsume(_loc2_); + } + } + + private function minClickHandler(param1:MouseEvent) : void + { + if(this.input != null) + { + if(this.m_maxValue > this.m_minValue) + { + this.input.setText(this.m_minValue); + this.showConsume(this.m_minValue); + } + } + } + + private function maxClickHandler(param1:MouseEvent) : void + { + if(this.input != null) + { + if(this.m_maxValue > this.m_minValue) + { + this.input.setText(this.m_maxValue); + this.showConsume(this.m_maxValue); + } + } + } + + private function iconClickHandler(param1:MouseEvent) : void + { + this.onSelected(param1.currentTarget as UnionArmyIcon); + } + + override public function addToStage(param1:Event) : void + { + ConnectService.getInstance().addEventListener(GuildEvent.Guild_getBuildArmy,this.viewSucc); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_trainArmy,this.upgradeSuccess); + } + + override public function removeFromStage(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_getBuildArmy,this.viewSucc); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_trainArmy,this.upgradeSuccess); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + } + + public function set commonTitle(param1:String) : void + { + this.m_buiName = param1; + super.setTitle(this.m_buiName); + } + + public function get currBuildId() : int + { + return this._currBuildId; + } + + public function set currBuildId(param1:int) : void + { + this._currBuildId = param1; + } + + public function initData() : void + { + switch(this._currBuildId) + { + case 10120009: + super.loadTitle(UITitleConfig.title_baiqiaoge); + break; + case 10120008: + super.loadTitle(UITitleConfig.title_juchejun); + break; + case 10120005: + super.loadTitle(UITitleConfig.title_zhongbulv); + break; + case 10120006: + super.loadTitle(UITitleConfig.title_qianggongying); + break; + case 10120007: + super.loadTitle(UITitleConfig.title_feihutuan); + } + ConnectService.getInstance().guildService.getBuildArmy(this._currBuildId); + } + + private function viewSucc(param1:GuildEvent) : void + { + var _loc2_:Object = param1.buildObj; + this.m_buiLv = int(_loc2_["buiLv"]); + this.m_armyLv = int(_loc2_["armyLv"]); + this.m_money = int(_loc2_["moneyNum"]); + this.m_contribut = int(_loc2_["pointOfOffer"]); + this.addListIcon(_loc2_["relList"] as Array); + this.addListItem(_loc2_["casArmyList"] as Array); + } + + private function addListIcon(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:UnionArmyIcon = null; + var _loc4_:* = new Array(); + var _loc5_:int = 0; + while(_loc5_ < param1.length) + { + _loc4_.push(this.iconDataClone(param1[_loc5_])); + _loc5_++; + } + _loc4_.sortOn("armyLevel",Array.NUMERIC | Array.DESCENDING); + var _loc6_:* = Math.min(_loc4_.length,this.m_iconSet.length) - 1; + _loc5_ = 0; + while(_loc6_ > -1) + { + _loc2_ = _loc4_[_loc6_]; + _loc3_ = this.m_iconSet[_loc5_] as UnionArmyIcon; + if(_loc3_ != null) + { + _loc3_.setData(_loc2_); + } + _loc6_--; + _loc5_++; + } + } + + private function addListItem(param1:Array) : void + { + var _loc2_:Array = null; + var _loc4_:int = 0; + _loc2_ = null; + var _loc3_:int = 0; + if(param1 != null) + { + _loc2_ = new Array(); + _loc3_ = 0; + while(_loc3_ < param1.length) + { + _loc2_.push(this.cloneData(param1[_loc3_])); + _loc3_++; + } + _loc2_.sortOn("armyLevel",Array.NUMERIC | Array.DESCENDING); + _loc4_ = 0; + while(_loc4_ < this.armyVec.length) + { + if(_loc2_[_loc4_]) + { + this.armyVec[_loc4_].setArmyObj(_loc2_[_loc4_]); + } + else + { + this.armyVec[_loc4_].setArmyObj(null); + } + if(_loc4_ == 0 && Boolean(_loc2_[_loc4_])) + { + this.onRadixClick(this.armyVec[_loc4_]); + } + _loc4_++; + } + } + } + + private function iconDataClone(param1:Object) : Object + { + var _loc2_:* = new Object(); + var _loc3_:* = param1["army"]; + if(_loc3_ != null) + { + _loc2_.upgradeID = int(_loc3_["entId"]); + _loc2_.armyLevel = int(_loc3_["level"]); + _loc2_.armyName = String(_loc3_["armyName"]); + _loc2_.image = String(_loc3_["iconPath"]); + } + _loc2_.iconBuilLv = int(param1["needBuiLv"]); + _loc2_.curBuilLv = this.m_buiLv; + _loc2_.builName = this.m_buiName; + _loc2_.money = int(param1["needMoney"]); + _loc2_.contribut = int(param1["needOffer"]); + return _loc2_; + } + + private function cloneData(param1:Object) : Object + { + var _loc2_:* = new Object(); + var _loc3_:* = param1["army"]; + if(_loc3_ != null) + { + _loc2_.upgradeID = int(_loc3_["entId"]); + _loc2_.armyLevel = int(_loc3_["level"]); + _loc2_.armyName = String(_loc3_["armyName"]); + _loc2_.image = String(_loc3_["iconPath"]); + } + _loc2_.armyHad = int(param1["num"]); + _loc2_.money = int(param1["needMoney"]); + _loc2_.contribut = int(param1["needOffer"]); + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/UnionAssistDefenders.as b/flash_decompiled/com/view/ui/guild/UnionAssistDefenders.as new file mode 100644 index 0000000..4cbfa63 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/UnionAssistDefenders.as @@ -0,0 +1,132 @@ +package com.view.ui.guild +{ + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.control.guild.event.LeagueDefEvent; + import com.newdata.user.NewUserData; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.guild.mc.*; + import com.view.ui.message.MessageBoxUI; + + public class UnionAssistDefenders extends UIWindowBg + { + + private var tableMc:UITable; + + private var defAssisVec:Vector.; + + private var defCasId:int; + + public function UnionAssistDefenders() + { + var _loc2_:Array = null; + var _loc4_:UnionAssistDefendersItem = null; + super(); + initSize(296,154); + loadTitle(UITitleConfig.title_fangshouzhe); + addCloseBtn(); + initBg(); + var _loc1_:Array = ["身份","玩家","战斗力","操作"]; + _loc2_ = [120,120,120,131]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(6,_loc1_,_loc2_); + bg1.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.defAssisVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 6) + { + _loc4_ = new UnionAssistDefendersItem(); + this.defAssisVec.push(_loc4_); + this.tableMc.addChild(_loc4_); + _loc4_.y = 25 + 25 * _loc3_; + _loc4_.x = 4; + _loc3_++; + } + ConnectService.getInstance().addEventListener(LeagueDefEvent.LeagueDef_showLeagueDefCastleArmy,this.showLeagueDefCastleSucc); + ConnectService.getInstance().addEventListener(BattleEvent.B_callBackLeagueDefArmy,this.callBackLeagueDefArmySucc); + ConnectService.getInstance().addEventListener(BattleEvent.B_callBackOutArmy,this.callBackOutArmySucc); + } + + public function setCasId(param1:int) : void + { + this.defCasId = param1; + } + + public function loadList() : void + { + ConnectService.getInstance().guildService.showLeagueDefCastleArmy(this.defCasId); + } + + private function showLeagueDefCastleSucc(param1:LeagueDefEvent) : void + { + var _loc3_:Boolean = false; + var _loc4_:* = undefined; + var _loc2_:Array = param1.listData; + if(_loc2_ == null || _loc2_.length == 0) + { + this.clearMemList(); + } + else + { + _loc3_ = false; + if(_loc2_[0]) + { + if(_loc2_[0].userId == NewUserData.getUser().userId) + { + _loc3_ = true; + } + } + for(_loc4_ in this.defAssisVec) + { + if(_loc2_[_loc4_]) + { + if(_loc4_ == 0) + { + this.defAssisVec[_loc4_].setData(_loc2_[_loc4_]); + } + else + { + this.defAssisVec[_loc4_].setData(_loc2_[_loc4_],_loc3_); + } + } + else + { + this.defAssisVec[_loc4_].setData(null); + } + } + } + } + + private function clearMemList() : void + { + var _loc1_:* = undefined; + for(_loc1_ in this.defAssisVec) + { + this.defAssisVec[_loc1_].setData(null); + } + } + + private function callBackLeagueDefArmySucc(param1:BattleEvent) : void + { + MessageBoxUI.getInstance().addMessage("遣返成功"); + this.refresh(); + } + + private function callBackOutArmySucc(param1:BattleEvent) : void + { + MessageBoxUI.getInstance().addMessage("召回成功"); + this.refresh(); + } + + private function refresh() : void + { + this.loadList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/UnionCombatOpen.as b/flash_decompiled/com/view/ui/guild/UnionCombatOpen.as new file mode 100644 index 0000000..e81bdbc --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/UnionCombatOpen.as @@ -0,0 +1,182 @@ +package com.view.ui.guild +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.mc.sprite.TextBar; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.guild.mc.CombatOpenItem; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UnionCombatOpen extends Sprite + { + + private var bg:Sprite; + + private var css:TextFormat; + + private var gameRes:GameUIRes; + + private var m_data:Object; + + private var m_npcName:String; + + private var m_strRemainCount:String; + + private var fightInfo_txt:TextBar; + + private var battleUserVec:Vector.; + + private var currLeftNpc:TextField; + + private var timeMc:MovieClip; + + public function UnionCombatOpen(param1:Function) + { + var _loc11_:UIWindowBg = null; + var _loc14_:CombatOpenItem = null; + this.gameRes = GameUIRes.getInstance(); + super(); + this.css = PublicMethod.getCenterTextFormat(); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(330,209); + addChild(_loc2_); + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(279,209); + addChild(_loc3_); + _loc3_.x = _loc2_.width + _loc3_.x + 3; + _loc3_.y = _loc2_.y; + var _loc4_:UIWindowBg = new UIWindowBg(); + _loc4_.initThirdPanel(622,146); + addChild(_loc4_); + _loc4_.x = _loc2_.x; + _loc4_.y = _loc2_.y + _loc2_.height + 3; + var _loc5_:UITitleBg = new UITitleBg("进 度",_loc2_.width); + _loc2_.addChild(_loc5_); + _loc5_.x = int(_loc2_.width / 2 - _loc5_.width / 2); + var _loc6_:UITitleBg = new UITitleBg("战 况",_loc3_.width); + _loc3_.addChild(_loc6_); + _loc6_.x = int(_loc3_.width / 2 - _loc6_.width / 2); + var _loc7_:UITitleBg = new UITitleBg("守城情况",_loc4_.width); + _loc4_.addChild(_loc7_); + _loc7_.x = int(_loc4_.width / 2 - _loc7_.width / 2); + var _loc8_:Array = ["守城","敌军","敌军到达倒计时","援军","状态","操作"]; + var _loc9_:Array = [115,105,110,80,90,127]; + var _loc10_:UITable = new UITable(); + _loc10_.drawLine = true; + _loc10_.install(4,_loc8_,_loc9_); + _loc4_.addChild(_loc10_); + _loc10_.x = 4; + _loc10_.y = 26; + _loc11_ = new UIWindowBg(); + _loc11_.initSecondPanel(280,60); + _loc2_.addChild(_loc11_); + _loc11_.x = 30; + _loc11_.y = 40; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(6737151,180); + _loc11_.addChild(_loc12_); + _loc12_.x = int(_loc11_.width / 2 - _loc12_.width / 2); + _loc12_.y = 15; + _loc12_.defaultTextFormat = this.css; + _loc12_.text = "当前阶段"; + this.currLeftNpc = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,180); + _loc11_.addChild(this.currLeftNpc); + this.currLeftNpc.x = int(_loc11_.width / 2 - this.currLeftNpc.width / 2); + this.currLeftNpc.y = _loc12_.y + 25; + this.currLeftNpc.text = "剩余"; + this.timeMc = this.gameRes.getMovieClip(ClassConfig.guild_timeline,this.gameRes.getGuildInfo()); + _loc2_.addChild(this.timeMc); + this.timeMc.x = 15; + this.timeMc.y = 140; + this.timeMc.gotoAndStop(1); + this.fightInfo_txt = new TextBar(); + this.fightInfo_txt.createTextField(270,193); + _loc3_.addChild(this.fightInfo_txt); + this.fightInfo_txt.x = 3; + this.fightInfo_txt.y = 25; + this.battleUserVec = new Vector.(); + var _loc13_:int = 0; + while(_loc13_ < 4) + { + _loc14_ = new CombatOpenItem(); + _loc14_.showDefF = param1; + this.battleUserVec.push(_loc14_); + _loc10_.addChild(_loc14_); + _loc14_.x = 4; + _loc14_.y = 25 + _loc13_ * 25; + _loc13_++; + } + } + + public function initData(param1:Object) : void + { + this.m_data = param1; + var _loc2_:int = int(this.m_data.curr); + var _loc3_:int = int(this.m_data.all); + var _loc4_:Array = this.m_data.atkNpcList as Array; + var _loc5_:Array = this.m_data.defCastleList as Array; + if(this.m_data.npcName) + { + this.m_npcName = this.m_data.npcName; + } + if(_loc5_.length > 0) + { + this.initSCQKGrid(_loc5_); + } + this.m_strRemainCount = ""; + var _loc6_:int = _loc3_ - _loc2_; + this.m_strRemainCount = _loc6_.toString(); + this.setCurrNpcStr(); + var _loc7_:int = int(_loc2_ / _loc3_ * 100); + this.timeMc.gotoAndStop(_loc7_); + this.fightInfo_txt.print(""); + var _loc8_:int = 0; + while(_loc8_ < this.m_data.messageList.length) + { + this.fightInfo_txt.print(this.m_data.messageList[_loc8_].toString()); + _loc8_ += 1; + } + } + + private function setCurrNpcStr() : void + { + this.currLeftNpc.htmlText = "

" + this.m_npcName + " 还剩余" + "" + this.m_strRemainCount + "波" + "" + "匈奴" + "

"; + } + + private function initSCQKGrid(param1:Array) : void + { + var _loc2_:* = undefined; + if(param1 == null) + { + param1 = new Array(); + } + for(_loc2_ in this.battleUserVec) + { + if(param1[_loc2_] == null) + { + this.battleUserVec[_loc2_].setData(null); + } + else + { + this.battleUserVec[_loc2_].setData(param1[_loc2_]); + } + } + } + + public function clear() : void + { + var _loc1_:* = undefined; + for(_loc1_ in this.battleUserVec) + { + this.battleUserVec[_loc1_].setData(null); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/UnionCombatReady.as b/flash_decompiled/com/view/ui/guild/UnionCombatReady.as new file mode 100644 index 0000000..0dface2 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/UnionCombatReady.as @@ -0,0 +1,180 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.guild.mc.DefendCasItem; + import com.view.ui.guild.mc.DefendDifficultyItem; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UnionCombatReady extends Sprite + { + + private var bg:UIWindowBg; + + private var defenNpcVec:Vector.; + + private var defenCasVec:Vector.; + + private var warnText:TextField; + + private var startBtn:UIButton; + + private var currDefMc:DefendDifficultyItem; + + private var selectDefCasUI:SelectDefCasUI; + + private var m_data:Object; + + private var currLevel:int; + + public function UnionCombatReady() + { + var _loc3_:TextField = null; + var _loc4_:int = 0; + var _loc6_:DefendDifficultyItem = null; + var _loc7_:DefendCasItem = null; + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(621,366); + addChild(this.bg); + var _loc1_:UITitleBg = new UITitleBg("第一步(难度选择)",this.bg.width); + this.bg.addChild(_loc1_); + _loc1_.x = int(this.bg.width / 2 - _loc1_.width / 2); + var _loc2_:UITitleBg = new UITitleBg("第二步(防守设定)",this.bg.width); + this.bg.addChild(_loc2_); + _loc2_.x = int(this.bg.width / 2 - _loc2_.width / 2); + _loc2_.y = 220; + this.warnText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,210); + this.warnText.text = "至少选择1~4座盟友城池作为防守城池"; + this.bg.addChild(this.warnText); + this.warnText.x = 15; + this.warnText.y = 330; + this.startBtn = new UIButton("开始抗击",2,10); + this.bg.addChild(this.startBtn); + this.startBtn.x = 275; + this.startBtn.y = this.warnText.y; + this.startBtn.onClick = this.startDefBattle; + _loc3_ = PublicMethod.getTextFieldWithFillter(16777215,151); + _loc3_.htmlText = "点击图标更换防守城池"; + this.bg.addChild(_loc3_); + _loc3_.x = 465; + _loc3_.y = this.warnText.y; + this.defenNpcVec = new Vector.(); + while(_loc4_ < 10) + { + _loc6_ = new DefendDifficultyItem(_loc4_ + 1); + this.defenNpcVec.push(_loc6_); + this.bg.addChild(_loc6_); + _loc6_.x = 14 + 124 * int(_loc4_ % 5); + _loc6_.y = 28 + 93 * int(_loc4_ / 5); + _loc6_.onClick = this.setNpc; + _loc4_++; + } + this.defenCasVec = new Vector.(); + var _loc5_:int = 1; + while(_loc5_ < 5) + { + _loc7_ = new DefendCasItem(_loc5_); + this.defenCasVec.push(_loc7_); + this.bg.addChild(_loc7_); + _loc7_.x = 25 + 150 * (_loc5_ - 1); + _loc7_.y = 255; + _loc7_.onClick = this.selectDefCas; + _loc5_++; + } + } + + private function setNpc(param1:DefendDifficultyItem) : void + { + if(this.currDefMc) + { + this.currDefMc.setSelect(false); + } + this.currDefMc = param1; + this.currDefMc.setSelect(true); + } + + private function selectDefCas(param1:DefendCasItem) : void + { + if(this.currDefMc == null) + { + MessageBoxUI.getInstance().addMessage("请先选择挑战难度!"); + return; + } + if(this.selectDefCasUI == null) + { + this.selectDefCasUI = new SelectDefCasUI(); + this.selectDefCasUI.x = int(width / 2 - this.selectDefCasUI.width / 2); + this.selectDefCasUI.y = int(height / 2 - this.selectDefCasUI.height / 2); + } + addChild(this.selectDefCasUI); + this.selectDefCasUI.loadList(); + this.selectDefCasUI.setLevel(this.currDefMc.level); + } + + public function initData(param1:Object) : void + { + var _loc3_:int = 0; + var _loc5_:* = undefined; + var _loc6_:DefendDifficultyItem = null; + this.m_data = param1; + var _loc2_:Array = this.m_data.npcList; + this.currLevel = this.m_data.currLevel; + if(this.currDefMc == null) + { + for each(_loc6_ in this.defenNpcVec) + { + if(_loc2_[_loc3_]) + { + _loc6_.setDefData(_loc2_[_loc3_]); + } + if(this.currLevel == _loc2_[_loc3_].level) + { + this.currDefMc = _loc6_; + _loc6_.setSelect(true); + } + _loc3_++; + } + } + var _loc4_:Array = this.m_data.defList; + for(_loc5_ in this.defenCasVec) + { + if(_loc4_[_loc5_]) + { + this.defenCasVec[_loc5_].setData(_loc4_[_loc5_]); + } + else + { + this.defenCasVec[_loc5_].setData(null); + } + } + } + + private function startDefBattle(param1:MouseEvent) : void + { + if(this.currDefMc == null) + { + MessageBoxUI.getInstance().addMessage("请先选择挑战难度!"); + return; + } + MessageBoxUI.getInstance().confirmMsg("大批匈奴即将分波进攻贵联盟设定的防守城池,在此期间人员将不可变更。是否确定并立即开始?",this.confirmStart); + } + + private function confirmStart() : void + { + ConnectService.getInstance().guildService.startAction(); + } + + public function clear() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/UnionMerge.as b/flash_decompiled/com/view/ui/guild/UnionMerge.as new file mode 100644 index 0000000..d0e19a1 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/UnionMerge.as @@ -0,0 +1,364 @@ +package com.view.ui.guild +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UISmallBtn; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.guild.mc.UnionMergeItem; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class UnionMerge extends BaseUI + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var tableMc:UITable; + + private var unionMergeVec:Vector.; + + private var mergeBtn:UISmallBtn; + + private var cancelBtn:UISmallBtn; + + private var labelMc1:UIInputText; + + private var labelMc2:TextField; + + private var labelMc3:TextField; + + private var guildListUI:GuildListUI; + + private var mergeData:Object; + + private var timeLeft:int; + + private var _time:Timer; + + public function UnionMerge() + { + super(); + super.addUIBg(); + loadTitle(UITitleConfig.title_lianmenghebing); + this.createUI(); + } + + override public function createUI() : void + { + var _loc5_:UITitleBg = null; + var _loc6_:TextField = null; + var _loc10_:String = null; + var _loc12_:TextField = null; + var _loc15_:UnionMergeItem = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(242,391); + _loc1_.addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc2_:Array = ["联盟名称","联盟等级","成员数","操作"]; + var _loc3_:Array = [120,69,70,120]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(14,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = this.bg1.x + this.bg1.width + 3; + this.tableMc.y = 29; + var _loc4_:UITitleBg = new UITitleBg("邀请合并",this.bg1.width); + this.bg1.addChild(_loc4_); + _loc4_.x = int(this.bg1.width / 2 - _loc4_.width / 2); + _loc5_ = new UITitleBg("合并说明",this.bg1.width); + this.bg1.addChild(_loc5_); + _loc5_.x = int(this.bg1.width / 2 - _loc5_.width / 2); + _loc5_.y = 140; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc6_.text = "合并邀请:"; + this.bg1.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = 40; + this.labelMc1 = new UIInputText(75); + this.bg1.addChild(this.labelMc1); + this.labelMc1.x = _loc6_.x + 60; + this.labelMc1.y = _loc6_.y - 3; + var _loc7_:UISmallBtn = new UISmallBtn("联 盟",2); + this.mergeBtn = new UISmallBtn("邀 请",2); + this.bg1.addChild(_loc7_); + _loc7_.x = 151; + _loc7_.y = _loc6_.y; + this.bg1.addChild(this.mergeBtn); + this.mergeBtn.x = _loc7_.x + 50; + this.mergeBtn.y = _loc6_.y; + this.mergeBtn.onClick = this.questMerge; + _loc7_.onClick = this.showUnionList; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc8_.text = "邀 请 中:"; + this.bg1.addChild(_loc8_); + _loc8_.x = _loc6_.x; + _loc8_.y = _loc6_.y + 35; + this.labelMc2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + this.bg1.addChild(this.labelMc2); + this.labelMc2.x = this.labelMc1.x; + this.labelMc2.y = _loc8_.y; + this.cancelBtn = new UISmallBtn("取 消",2); + this.bg1.addChild(this.cancelBtn); + this.cancelBtn.x = _loc7_.x; + this.cancelBtn.y = _loc8_.y; + this.cancelBtn.onClick = this.cancelMerge; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc9_.text = "剩余时间:"; + this.bg1.addChild(_loc9_); + _loc9_.x = _loc6_.x; + _loc9_.y = _loc8_.y + 35; + this.labelMc3 = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,80); + this.bg1.addChild(this.labelMc3); + this.labelMc3.x = this.labelMc1.x; + this.labelMc3.y = _loc9_.y; + _loc10_ = "合并前提:
1、被邀请的副盟联盟等级和人数上限必须小于等于主盟。
"; + _loc10_ = _loc10_ + "2、发出合并邀请后,无法再被其他联盟邀请合并。
"; + _loc10_ = _loc10_ + "3、合并成功后新盟的名称、盟主、等级、创始人、旗号属性都依旧是主盟的 ,副盟的全部成员一律变成普通成员。
"; + _loc10_ = _loc10_ + "4、新盟的建设度,虎符数为合并前两盟之和。新盟建筑、新盟科技与主盟一致。主盟荣誉增加副盟人数×100。"; + var _loc11_:TextFormat = new TextFormat(); + _loc11_.leading = 4; + _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,235); + _loc12_.wordWrap = true; + _loc12_.multiline = true; + _loc12_.height = 200; + _loc12_.defaultTextFormat = _loc11_; + this.bg1.addChild(_loc12_); + _loc12_.x = 10; + _loc12_.y = _loc5_.y + 40; + _loc12_.htmlText = _loc10_; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,370); + _loc1_.addChild(_loc13_); + _loc13_.x = 270; + _loc13_.y = 10; + _loc13_.htmlText = "收到的合并邀请(所有成员加入他人联盟,现有联盟将不再存在!)"; + this.unionMergeVec = new Vector.(); + var _loc14_:int = 0; + while(_loc14_ < 14) + { + _loc15_ = new UnionMergeItem(); + this.unionMergeVec.push(_loc15_); + this.tableMc.addChild(_loc15_); + _loc15_.refuseUnionF = this.refuseUnion; + _loc15_.agreeUnionF = this.agreeUnion; + _loc15_.y = 25 + _loc14_ * 25; + _loc15_.x = 4; + _loc14_++; + } + } + + private function showUnionList(param1:MouseEvent) : void + { + this.guildListUI = GuildListUI.getInstance(); + if(this.timeLeft > 0) + { + this.guildListUI.setType(0); + } + else + { + this.guildListUI.setType(1); + } + addChild(this.guildListUI); + this.guildListUI.x = 0; + this.guildListUI.y = 0; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(Boolean(this.guildListUI) && contains(this.guildListUI)) + { + removeChild(this.guildListUI); + } + this.stopTime(); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_getCombineView,this.getCombineViewSucc); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_cancelCombine,this.submitSucc); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_inviteCombine,this.questMergeSucc); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_refuseCombine,this.refuseSucc); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_acceptCombine,this.approveSucc); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_getCombineView,this.getCombineViewSucc); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_cancelCombine,this.submitSucc); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_inviteCombine,this.questMergeSucc); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_refuseCombine,this.refuseSucc); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_acceptCombine,this.approveSucc); + } + + public function initData() : void + { + ConnectService.getInstance().guildService.getCombineView(); + } + + private function getCombineViewSucc(param1:GuildEvent) : void + { + this.timeLeft = 0; + this.mergeData = param1.guildObj; + this.labelMc3.text = ""; + if(this.mergeData.inviteGuildName != "") + { + this.timeLeft = int(this.mergeData.inviteTimeLeft); + this.startTime(); + this.labelMc2.text = this.mergeData.inviteGuildName; + this.cancelBtn.setEnable(); + this.mergeBtn.setUnEnable(); + this.labelMc3.text = Utils.formatSeconds(this.timeLeft); + } + else + { + this.labelMc2.text = ""; + this.cancelBtn.setUnEnable(); + this.mergeBtn.setEnable(); + } + this.initList(); + } + + private function initList() : void + { + var _loc2_:* = undefined; + var _loc1_:Array = this.mergeData.invitedList; + for(_loc2_ in this.unionMergeVec) + { + if(_loc1_[_loc2_]) + { + this.unionMergeVec[_loc2_].setUnionObj(_loc1_[_loc2_]); + } + else + { + this.unionMergeVec[_loc2_].setUnionObj(null); + } + } + } + + private function startTime() : void + { + if(this.timeLeft <= 0) + { + return; + } + if(this._time == null) + { + this._time = new Timer(1000); + this._time.addEventListener(TimerEvent.TIMER,this._timeFun); + } + if(!this._time.running) + { + this._time.start(); + } + } + + private function _timeFun(param1:TimerEvent) : void + { + --this.timeLeft; + this.labelMc3.text = Utils.formatSeconds(this.timeLeft); + if(this.timeLeft < 0) + { + this.stopTime(); + this.initData(); + } + } + + private function stopTime() : void + { + if(Boolean(this._time) && this._time.running) + { + this._time.stop(); + this._time.removeEventListener(TimerEvent.TIMER,this._timeFun); + this._time = null; + } + } + + private function cancelMerge(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.cancelCombine(int(this.mergeData.guildId)); + } + + private function submitSucc(param1:GuildEvent) : void + { + this.stopTime(); + MessageBoxUI.getInstance().addMessage("取消合并联盟成功"); + this.initData(); + } + + private function questMerge(param1:MouseEvent) : void + { + if(this.labelMc1.getText() != "") + { + ConnectService.getInstance().guildService.inviteCombineByName(this.labelMc1.getText()); + } + else + { + MessageBoxUI.getInstance().addMessage("请输入合法的联盟名称。"); + } + } + + private function questMergeSucc(param1:GuildEvent) : void + { + this.stopTime(); + MessageBoxUI.getInstance().addMessage("合并联盟邀请已发出"); + this.initData(); + } + + private function applyUnion(param1:String) : void + { + ConnectService.getInstance().guildService.inviteCombineByName(param1); + } + + private function refuseUnion(param1:int) : void + { + ConnectService.getInstance().guildService.refuseCombine(param1); + } + + private function refuseSucc(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("拒绝合并联盟成功"); + this.initData(); + } + + private function agreeUnion(param1:int) : void + { + ConnectService.getInstance().guildService.acceptCombine(param1); + } + + private function approveSucc(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().reLogin("合并成功,请重新登录游戏"); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/ViewMemberUI.as b/flash_decompiled/com/view/ui/guild/ViewMemberUI.as new file mode 100644 index 0000000..c7e60db --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/ViewMemberUI.as @@ -0,0 +1,363 @@ +package com.view.ui.guild +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.friend.event.FriendEvent; + import com.control.guild.event.GuildEvent; + import com.view.Control; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.mail.MailUI; + import com.view.ui.message.MessageBoxUI; + 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 ViewMemberUI extends UIWindowBg + { + + private var tab1:UIWindowBg; + + private var friendBtn:UIButton; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var label6:TextField; + + private var label7:TextField; + + private var editJobBtn:UIButton; + + private var fireBtn:UIButton; + + private var jobCombox:ComboBox; + + private var memberId:int; + + private var memObj:Object; + + private var canChangeDuty:Boolean; + + private var canFireMember:Boolean; + + private var loader:LoadResource; + + private var headImg:Bitmap; + + public function ViewMemberUI() + { + var _loc4_:TextField = null; + var _loc10_:TextField = null; + var _loc11_:UIButton = null; + super(); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + initSize(150,220); + loadTitle(UITitleConfig.title_chengyuanxinxi); + addCloseBtn(); + initBg(); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(321,182); + bg1.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 10; + this.tab1 = new UIWindowBg(); + this.tab1.initThirdPanel(88,88); + _loc2_.addChild(this.tab1); + this.tab1.x = 5; + this.tab1.y = 5; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc3_.text = "君主名:"; + _loc2_.addChild(_loc3_); + _loc3_.x = 120; + _loc3_.y = 10; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.label1); + this.label1.x = 170; + this.label1.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc4_.text = "联 盟:"; + _loc2_.addChild(_loc4_); + _loc4_.x = _loc3_.x; + _loc4_.y = _loc3_.y + 25; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.label2); + this.label2.x = this.label1.x; + this.label2.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc5_.text = "职 位:"; + _loc2_.addChild(_loc5_); + _loc5_.x = _loc3_.x; + _loc5_.y = _loc4_.y + 25; + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.label3); + this.label3.x = this.label1.x; + this.label3.y = _loc5_.y; + var _loc6_:Sprite = PublicMethod.getTrLine(310); + _loc2_.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = this.tab1.y + this.tab1.height + 10; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc7_.text = "等 级:"; + _loc2_.addChild(_loc7_); + _loc7_.x = 10; + _loc7_.y = _loc6_.y + 10; + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.label4); + this.label4.x = _loc7_.x + 50; + this.label4.y = _loc6_.y + 10; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc8_.text = "繁荣度:"; + _loc2_.addChild(_loc8_); + _loc8_.x = _loc7_.x + 150; + _loc8_.y = _loc7_.y; + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.label5); + this.label5.x = _loc8_.x + 50; + this.label5.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc9_.text = "排 名:"; + _loc2_.addChild(_loc9_); + _loc9_.x = _loc7_.x; + _loc9_.y = _loc7_.y + 30; + this.label6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.label6); + this.label6.x = _loc9_.x + 50; + this.label6.y = _loc9_.y; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc10_.text = "贡献度:"; + _loc2_.addChild(_loc10_); + _loc10_.x = _loc8_.x; + _loc10_.y = _loc9_.y; + this.label7 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.label7); + this.label7.x = _loc10_.x + 50; + this.label7.y = _loc10_.y; + _loc11_ = new UIButton("私 聊",1,10); + var _loc12_:UIButton = new UIButton("写 信",1,10); + this.friendBtn = new UIButton("好 友",1,10); + this.jobCombox = new ComboBox(); + this.jobCombox.width = 62; + this.jobCombox.addItem({ + "label":"副盟主", + "data":2 + }); + this.jobCombox.addItem({ + "label":"长老", + "data":3 + }); + this.jobCombox.addItem({ + "label":"成员", + "data":4 + }); + this.jobCombox.textField.setStyle("textFormat",_loc1_); + this.jobCombox.dropdown.setRendererStyle("textFormat",_loc1_); + this.editJobBtn = new UIButton("调整官职",2,10); + this.fireBtn = new UIButton("开 除",1,10); + _loc2_.addChild(_loc11_); + _loc11_.y = 200; + _loc11_.x = -5; + _loc2_.addChild(_loc12_); + _loc12_.x = _loc11_.x + _loc11_.width + 1; + _loc12_.y = _loc11_.y; + _loc2_.addChild(this.friendBtn); + this.friendBtn.x = _loc12_.x + _loc12_.width + 1; + this.friendBtn.y = _loc11_.y; + _loc2_.addChild(this.jobCombox); + this.jobCombox.x = this.friendBtn.x + this.friendBtn.width + 1; + this.jobCombox.y = _loc11_.y; + _loc2_.addChild(this.editJobBtn); + this.editJobBtn.x = this.jobCombox.x + this.jobCombox.width + 1; + this.editJobBtn.y = _loc11_.y; + this.editJobBtn.onClick = this.changeDuty; + _loc2_.addChild(this.fireBtn); + this.fireBtn.x = this.editJobBtn.x + this.editJobBtn.width + 1; + this.fireBtn.y = _loc11_.y; + this.fireBtn.onClick = this.fireMember; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + _loc11_.onClick = this.talk; + _loc12_.onClick = this.writeMess; + this.friendBtn.onClick = this.addFriend; + } + + public function setMemberId(param1:int) : void + { + this.memberId = param1; + } + + private function loadMemberInfo() : void + { + ConnectService.getInstance().guildService.viewMemberInfo(this.memberId); + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function addEvent(param1:Event) : void + { + this.loadMemberInfo(); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_GetMemInfoById,this.getMemberInfo); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_addFriend,this.addFriendSucc); + this.friendBtn.setEnable(); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_GetMemInfoById,this.getMemberInfo); + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_addFriend,this.addFriendSucc); + } + + private function getMemberInfo(param1:GuildEvent) : void + { + if(this.memberId == param1.memberObj.userId) + { + this.memObj = param1.memberObj; + this.loadUserImg(); + this.label1.text = this.memObj.name; + this.label2.text = this.memObj.guildName; + this.label3.text = this.memObj.dutyName; + this.label4.text = this.memObj.rankName; + this.label5.text = this.memObj.rangeValue; + this.label6.text = this.memObj.rank; + if(this.memObj.rank < 0) + { + this.label6.text = "未上榜"; + } + this.label7.text = this.memObj.pointOfOffer; + if(this.memObj.canChangeDuty == 1) + { + this.canChangeDuty = true; + } + else + { + this.canChangeDuty = false; + } + this.jobCombox.visible = this.canChangeDuty; + this.editJobBtn.visible = this.canChangeDuty; + if(this.memObj.canFireMember == 1) + { + this.canFireMember = true; + } + else + { + this.canFireMember = false; + } + this.fireBtn.visible = this.canFireMember; + if(this.memObj.dutyOfGuild) + { + this.jobCombox.selectedIndex = this.memObj.dutyOfGuild; + } + } + } + + private function loadUserImg() : void + { + var _loc1_:String = "pic/head/" + this.memObj.icon; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.tab1.contains(this.headImg)) + { + this.tab1.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.tab1.addChild(this.headImg); + this.headImg.x = 2; + this.headImg.y = 2; + } + + private function talk(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + if(this.memObj) + { + _loc2_ = this.memObj.name; + _loc3_ = int(this.memObj.userId); + Control.getInstance().chatMainUI.talkToUser(_loc2_); + } + } + + private function writeMess(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:MailUI = null; + if(this.memObj) + { + _loc2_ = this.memObj.name; + _loc3_ = MailUI.getInstance(); + _loc3_.setStartPage(2); + _loc3_.setReceiveName(_loc2_); + _loc3_.show(); + this.closeUI(null); + } + } + + private function addFriend(param1:MouseEvent) : void + { + if(this.memObj) + { + this.friendBtn.setUnEnable(); + ConnectService.getInstance().friendService.addFriend(this.memObj.name); + } + } + + private function addFriendSucc(param1:FriendEvent) : void + { + this.friendBtn.setEnable(); + MessageBoxUI.getInstance().addMessage(param1.msg); + } + + private function changeDuty(param1:MouseEvent) : void + { + var _loc2_:int = 0; + if(this.memObj) + { + _loc2_ = int(this.jobCombox.selectedItem.data); + ConnectService.getInstance().guildService.changeDuty(this.memObj.userId,_loc2_); + this.closeUI(null); + } + } + + private function fireMember(param1:MouseEvent) : void + { + if(this.memObj) + { + MessageBoxUI.getInstance().confirmMsg("确定开除该成员?",this.configFireMem); + } + } + + private function configFireMem() : void + { + ConnectService.getInstance().guildService.fireMember(this.memObj.userId); + this.closeUI(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/ApplyListMc.as b/flash_decompiled/com/view/ui/guild/mc/ApplyListMc.as new file mode 100644 index 0000000..b84e34c --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/ApplyListMc.as @@ -0,0 +1,135 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ApplyListMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var centerCss:TextFormat; + + private var nameText:TextField; + + private var rankText:TextField; + + private var levelText:TextField; + + private var honorText:TextField; + + private var applyTimeText:TextField; + + public var permitBtn:UISmallBtn; + + public var refuseBtn:UISmallBtn; + + private var bg:Sprite; + + public var userObj:Object; + + public function ApplyListMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,622,24); + addChild(this.bg); + this.bg.x = 1; + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + var _loc1_:Sprite = PublicMethod.getTrLine(622); + addChild(_loc1_); + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.nameText); + this.nameText.y = 3; + this.rankText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,92); + addChild(this.rankText); + this.rankText.x = this.nameText.x + this.nameText.width + 2; + this.rankText.y = this.nameText.y; + this.levelText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,85); + addChild(this.levelText); + this.levelText.x = this.rankText.x + this.rankText.width; + this.levelText.y = this.nameText.y; + this.honorText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,111); + addChild(this.honorText); + this.honorText.x = this.levelText.x + this.levelText.width; + this.honorText.y = this.nameText.y; + this.applyTimeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,92); + addChild(this.applyTimeText); + this.applyTimeText.x = this.honorText.x + this.honorText.width; + this.applyTimeText.y = this.nameText.y; + this.permitBtn = new UISmallBtn("同 意",2); + addChild(this.permitBtn); + this.permitBtn.x = this.applyTimeText.x + this.applyTimeText.width + 5; + this.permitBtn.y = this.nameText.y; + this.permitBtn.visible = false; + this.refuseBtn = new UISmallBtn("拒 绝",2); + addChild(this.refuseBtn); + this.refuseBtn.x = this.permitBtn.x + this.permitBtn.width + 5; + this.refuseBtn.y = this.nameText.y; + this.refuseBtn.visible = false; + } + + public function setData(param1:Object) : void + { + this.userObj = param1; + if(param1 == null) + { + this.nameText.visible = false; + this.rankText.visible = false; + this.levelText.visible = false; + this.honorText.visible = false; + this.applyTimeText.visible = false; + this.permitBtn.visible = false; + this.refuseBtn.visible = false; + this.bg.alpha = 0; + } + else + { + this.nameText.visible = true; + this.rankText.visible = true; + this.levelText.visible = true; + this.honorText.visible = true; + this.applyTimeText.visible = true; + this.permitBtn.visible = true; + this.refuseBtn.visible = true; + this.nameText.text = param1.name; + this.nameText.setTextFormat(this.centerCss); + this.rankText.text = param1.rank; + this.rankText.setTextFormat(this.centerCss); + this.levelText.text = param1.rankName; + this.levelText.setTextFormat(this.centerCss); + this.honorText.text = param1.rangeValue; + this.honorText.setTextFormat(this.centerCss); + this.applyTimeText.text = String(param1.applyTime).substring(0,10); + this.applyTimeText.setTextFormat(this.centerCss); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.userObj == null) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.userObj == null) + { + return; + } + this.bg.alpha = 0.3; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/ArmyItem1.as b/flash_decompiled/com/view/ui/guild/mc/ArmyItem1.as new file mode 100644 index 0000000..999d9c0 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/ArmyItem1.as @@ -0,0 +1,185 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ArmyItem1 extends Sprite + { + + private var checkBox:UICheckBtn; + + private var armyName:TextField; + + private var armyNum:TextField; + + private var bg:Sprite; + + private var selectBg:Sprite; + + private var selectStatus:Boolean; + + public var onClick:Function; + + private var armyObj:Object; + + public function ArmyItem1() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,178,24); + addChild(this.bg); + this.bg.x = 1; + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,178,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 4; + this.checkBox.y = 2; + this.checkBox.visible = false; + this.armyName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + addChild(this.armyName); + this.armyName.x = 26; + this.armyName.y = 3; + this.armyNum = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,65); + addChild(this.armyNum); + this.armyNum.x = this.armyName.x + this.armyName.width; + this.armyNum.y = 3; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + addEventListener(MouseEvent.CLICK,this.mouseClick,false,0,true); + } + + private function mouseClick(param1:MouseEvent) : void + { + if(this.armyObj == null || this.selectStatus) + { + return; + } + if(this.onClick != null) + { + this.onClick(this); + } + } + + public function setClick(param1:Boolean) : void + { + this.selectStatus = param1; + if(this.armyObj == null) + { + this.selectBg.visible = false; + this.checkBox.setUnSelect(); + return; + } + if(this.selectStatus) + { + this.selectBg.visible = true; + this.bg.visible = false; + this.checkBox.setSelect(); + } + else + { + this.selectBg.visible = false; + this.checkBox.setUnSelect(); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.armyObj == null) + { + return; + } + if(this.selectStatus) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.armyObj == null) + { + return; + } + if(this.selectStatus) + { + return; + } + this.bg.alpha = 0.3; + } + + public function setArmyObj(param1:Object) : void + { + this.armyObj = param1; + this.checkBox.setUnSelect(); + if(this.armyObj == null) + { + this.checkBox.visible = false; + this.selectBg.visible = false; + this.bg.visible = false; + this.armyName.text = ""; + this.armyNum.text = ""; + this.selectStatus = false; + } + else + { + this.bg.visible = true; + this.bg.alpha = 0; + this.checkBox.visible = true; + this.armyName.text = this.armyObj.armyName; + this.armyNum.text = this.armyObj.armyHad; + } + } + + public function getData() : Object + { + return this.armyObj; + } + + public function get money() : int + { + if(this.armyObj != null) + { + return this.armyObj.money; + } + return 0; + } + + public function get contribut() : int + { + if(this.armyObj != null) + { + return this.armyObj.contribut; + } + return 0; + } + + public function get armyCount() : int + { + if(this.armyObj != null) + { + return this.armyObj.armyHad; + } + return 0; + } + + public function get id() : int + { + if(this.armyObj != null) + { + return this.armyObj.upgradeID; + } + return 0; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/CasListMc.as b/flash_decompiled/com/view/ui/guild/mc/CasListMc.as new file mode 100644 index 0000000..a146a9b --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/CasListMc.as @@ -0,0 +1,197 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class CasListMc extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var label6:TextField; + + private var label8:TextField; + + private var joinBtn1:UISmallBtn; + + private var joinBtn2:UISmallBtn; + + private var bg:Sprite; + + private var css:TextFormat; + + private var obj:Object; + + private var clickF:Function; + + public function CasListMc() + { + super(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,36); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.label6 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.label8 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,618,24); + addChild(this.bg); + this.bg.alpha = 0.2; + this.bg.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + addChild(this.label1); + addChild(this.label2); + addChild(this.label3); + addChild(this.label4); + addChild(this.label5); + addChild(this.label6); + addChild(this.label8); + this.label1.y = 4; + this.label2.x = this.label1.x + this.label1.width; + this.label2.y = this.label1.y; + this.label3.x = this.label2.x + this.label2.width; + this.label3.y = this.label1.y; + this.label4.x = this.label3.x + this.label3.width; + this.label4.y = this.label1.y; + this.label5.x = this.label4.x + this.label4.width; + this.label5.y = this.label1.y; + this.label6.x = this.label5.x + this.label5.width; + this.label6.y = this.label1.y; + this.label8.x = this.label6.x + this.label6.width + 65; + this.label8.y = this.label1.y; + this.joinBtn1 = new UISmallBtn("进 入",2); + this.joinBtn2 = new UISmallBtn("进 入",2); + addChild(this.joinBtn1); + addChild(this.joinBtn2); + this.joinBtn1.y = 4; + this.joinBtn2.y = 4; + this.joinBtn1.x = this.label6.x + this.label6.width + 8; + this.joinBtn2.x = this.label8.x + this.label8.width + 8; + this.joinBtn1.visible = false; + this.joinBtn2.visible = false; + this.css = PublicMethod.getCenterTextFormat(); + this.label1.defaultTextFormat = this.css; + this.label2.defaultTextFormat = this.css; + this.label3.defaultTextFormat = this.css; + this.label4.defaultTextFormat = this.css; + this.label5.defaultTextFormat = this.css; + this.label6.defaultTextFormat = this.css; + this.label8.defaultTextFormat = this.css; + this.joinBtn1.onClick = this.enterDefRoom; + this.joinBtn2.onClick = this.enterAtkRoom; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = true; + } + } + + public function getObj() : Object + { + return this.obj; + } + + public function setData(param1:Object) : void + { + this.obj = param1; + if(this.obj == null) + { + return; + } + this.label1.text = this.obj.provinceName; + this.label2.text = this.obj.levelName; + this.label4.text = this.obj.occuGuild; + if(this.obj.occuGuild == "无") + { + this.label3.text = "---"; + } + else + { + this.label3.text = this.obj.occuTime + " 天"; + } + this.label5.text = this.obj.attGuild; + if(this.obj.status == 2) + { + if(this.obj.canJoin == 1 && this.obj.canWatch == 1) + { + this.joinBtn1.setEnable(); + this.joinBtn2.setEnable(); + this.joinBtn1.setText("报 名"); + this.joinBtn2.setText("报 名"); + } + else if(this.obj.canWatch == 1) + { + this.joinBtn1.setEnable(); + this.joinBtn2.setEnable(); + this.joinBtn1.setText("进 入"); + this.joinBtn2.setText("进 入"); + } + else + { + this.joinBtn1.setText("报 名"); + this.joinBtn2.setText("报 名"); + this.joinBtn1.setUnEnable(); + this.joinBtn2.setUnEnable(); + } + this.label6.text = this.obj.defUserNum + "/100"; + this.label8.text = this.obj.attUserNum + "/100"; + this.joinBtn1.visible = true; + this.joinBtn2.visible = true; + } + else + { + this.label6.text = ""; + this.label8.text = ""; + this.joinBtn1.visible = false; + this.joinBtn2.visible = false; + } + } + + public function setClick(param1:Function) : void + { + this.clickF = param1; + } + + public function enterDefRoom(param1:MouseEvent) : void + { + if(this.clickF != null) + { + this.clickF(this,1); + } + } + + public function enterAtkRoom(param1:MouseEvent) : void + { + if(this.clickF != null) + { + this.clickF(this,2); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/CityListMc.as b/flash_decompiled/com/view/ui/guild/mc/CityListMc.as new file mode 100644 index 0000000..d98d228 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/CityListMc.as @@ -0,0 +1,148 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class CityListMc extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var label6:TextField; + + private var label7:TextField; + + private var label8:TextField; + + private var bg:Sprite; + + private var centerCss:TextFormat; + + private var selectBg:Sprite; + + private var hasSelect:Boolean; + + private var clickFunc:Function; + + private var obj:Object; + + public function CityListMc() + { + super(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,53); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,76); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,103); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,96); + this.label6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,95); + this.label7 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,84); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,613,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,613,24); + addChild(this.bg); + this.bg.alpha = 0.2; + this.bg.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + addEventListener(MouseEvent.CLICK,this.mouseClick,false,0,true); + addChild(this.label1); + addChild(this.label2); + addChild(this.label3); + addChild(this.label4); + addChild(this.label5); + addChild(this.label6); + addChild(this.label7); + this.label1.y = 3; + this.label2.x = this.label1.x + this.label1.width; + this.label2.y = this.label1.y; + this.label3.x = this.label2.x + this.label2.width; + this.label3.y = this.label1.y; + this.label4.x = this.label3.x + this.label3.width; + this.label4.y = this.label1.y; + this.label5.x = this.label4.x + this.label4.width; + this.label5.y = this.label1.y; + this.label6.x = this.label5.x + this.label5.width; + this.label6.y = this.label1.y; + this.label7.x = this.label6.x + this.label6.width; + this.label7.y = this.label1.y; + this.centerCss = PublicMethod.getCenterTextFormat(); + buttonMode = true; + } + + public function setSelect(param1:Boolean) : void + { + this.hasSelect = param1; + this.selectBg.visible = this.hasSelect; + this.bg.visible = false; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(!this.hasSelect) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(!this.hasSelect) + { + this.bg.visible = true; + } + } + + private function mouseClick(param1:MouseEvent) : void + { + if(!this.hasSelect) + { + if(this.clickFunc != null) + { + this.clickFunc(this); + } + } + } + + public function setClickF(param1:Function) : void + { + this.clickFunc = param1; + } + + public function setData(param1:Object) : void + { + this.obj = param1; + this.label1.text = this.obj.levelName; + this.label1.setTextFormat(this.centerCss); + this.label2.text = this.obj.provinceName; + this.label2.setTextFormat(this.centerCss); + this.label3.text = this.obj.occuGuild; + this.label3.setTextFormat(this.centerCss); + this.label4.text = this.obj.appGuildName; + this.label4.setTextFormat(this.centerCss); + this.label5.text = this.obj.needLevel; + this.label5.setTextFormat(this.centerCss); + this.label6.text = this.obj.needPrestige; + this.label6.setTextFormat(this.centerCss); + } + + public function getObj() : Object + { + return this.obj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/CombatOpenItem.as b/flash_decompiled/com/view/ui/guild/mc/CombatOpenItem.as new file mode 100644 index 0000000..2bdb996 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/CombatOpenItem.as @@ -0,0 +1,224 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.newdata.user.NewUserData; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.training.SoldierFirstView; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class CombatOpenItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var viewBtn:UISmallBtn; + + private var helpBtn:UISmallBtn; + + private var css:TextFormat; + + private var bg:Sprite; + + public var showDefF:Function; + + private var m_data:Object; + + private var m_offtime:int; + + private var m_timer:Timer; + + private var m_maxAssiterNum:int = 5; + + public function CombatOpenItem() + { + super(); + this.css = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,616,24); + addChild(this.bg); + this.bg.alpha = 0.3; + this.bg.visible = false; + this.bg.y = 1; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,105); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + addChild(this.label1); + addChild(this.label2); + addChild(this.label3); + addChild(this.label4); + addChild(this.label5); + this.label1.y = 4; + this.label2.y = this.label1.y; + this.label3.y = this.label1.y; + this.label4.y = this.label1.y; + this.label5.y = this.label1.y; + this.label2.x = this.label1.x + this.label1.width; + this.label3.x = this.label2.x + this.label2.width; + this.label4.x = this.label3.x + this.label3.width; + this.label5.x = this.label4.x + this.label4.width; + this.viewBtn = new UISmallBtn("查 看",2); + this.helpBtn = new UISmallBtn("支 援",2); + addChild(this.viewBtn); + addChild(this.helpBtn); + this.helpBtn.onClick = this.zhiyuan; + this.viewBtn.x = 510; + this.viewBtn.y = 3; + this.helpBtn.x = this.viewBtn.x + this.viewBtn.width + 2; + this.helpBtn.y = 3; + this.viewBtn.onClick = this.showDefCasInfo; + this.viewBtn.visible = false; + this.helpBtn.visible = false; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.m_data) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.m_data) + { + this.bg.visible = true; + } + } + + private function showDefCasInfo(param1:MouseEvent) : void + { + if(this.showDefF != null) + { + this.showDefF(this.m_data.casId); + } + } + + private function zhiyuan(param1:MouseEvent) : void + { + var _loc2_:SoldierFirstView = SoldierFirstView.getInstance(); + _loc2_.sendArmy(this.m_data.userName,this.m_data.posX,this.m_data.posY); + _loc2_.show(); + } + + public function setData(param1:Object) : void + { + this.m_data = param1; + if(this.m_data == null) + { + this.label1.text = ""; + this.label2.text = ""; + this.label3.text = ""; + this.label4.text = ""; + this.label5.text = ""; + this.viewBtn.visible = false; + this.helpBtn.visible = false; + if(this.m_timer) + { + this.m_timer.removeEventListener(TimerEvent.TIMER,this.countDown); + if(this.m_timer.running) + { + this.m_timer.stop(); + } + this.m_timer = null; + this.m_offtime = 0; + } + } + else + { + this.viewBtn.visible = true; + this.helpBtn.visible = true; + this.label1.text = ""; + this.label2.text = ""; + this.label3.text = ""; + this.label4.text = ""; + this.label5.text = ""; + this.paint(); + } + } + + private function paint() : void + { + this.label1.text = this.m_data.userName; + this.m_offtime = int(this.m_data.atkTime); + var _loc1_:String = "已胜利"; + if(this.m_offtime > 0) + { + _loc1_ = "剩余" + this.m_data.atkNum + "波"; + this.label2.text = this.m_data.pveName; + this.label3.text = PublicMethod.getTime(this.m_offtime); + this.startTime(); + } + else + { + this.label3.text = ""; + } + this.label4.text = this.m_data.defNum + "/" + this.m_maxAssiterNum.toString(); + this.label5.text = _loc1_; + this.label1.setTextFormat(this.css); + this.label2.setTextFormat(this.css); + this.label3.setTextFormat(this.css); + this.label4.setTextFormat(this.css); + this.label5.setTextFormat(this.css); + this.initData(); + } + + private function startTime() : void + { + if(this.m_timer == null) + { + this.m_timer = new Timer(1000); + this.m_timer.addEventListener(TimerEvent.TIMER,this.countDown); + } + if(!this.m_timer.running) + { + this.m_timer.start(); + } + } + + private function initData() : void + { + if(NewUserData.getUser().userId == this.m_data.userId) + { + this.helpBtn.setUnEnable(); + } + if(this.m_data.defNum >= this.m_maxAssiterNum) + { + this.helpBtn.setUnEnable(); + } + } + + private function countDown(param1:TimerEvent) : void + { + --this.m_offtime; + this.label3.text = PublicMethod.getTime(this.m_offtime); + this.label3.setTextFormat(this.css); + if(this.m_offtime <= 0) + { + this.m_timer.stop(); + this.m_offtime = 0; + this.label3.text = ""; + ConnectService.getInstance().guildService.showDefView(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/DefCasItem.as b/flash_decompiled/com/view/ui/guild/mc/DefCasItem.as new file mode 100644 index 0000000..d9ab759 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/DefCasItem.as @@ -0,0 +1,173 @@ +package com.view.ui.guild.mc +{ + import com.comfig.DataConfig; + import com.common.PublicMethod; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class DefCasItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var bg:Sprite; + + private var centerCss:TextFormat; + + private var checkBox:UICheckBtn; + + private var selectBg:Sprite; + + public var hasSelect:Boolean; + + private var obj:Object; + + public function DefCasItem() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(490); + addChild(_loc1_); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,112); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,72); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,92); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,84); + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,489,24); + addChild(this.bg); + this.bg.alpha = 0.3; + this.bg.visible = false; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,489,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + addEventListener(MouseEvent.CLICK,this.mouseClick,false,0,true); + addChild(this.label1); + addChild(this.label2); + addChild(this.label3); + addChild(this.label4); + addChild(this.label5); + this.label1.x = 53; + this.label1.y = 4; + this.label2.x = this.label1.x + this.label1.width; + this.label2.y = this.label1.y; + this.label3.x = this.label2.x + this.label2.width; + this.label3.y = this.label1.y; + this.label4.x = this.label3.x + this.label3.width; + this.label4.y = this.label1.y; + this.label5.x = this.label4.x + this.label4.width; + this.label5.y = this.label1.y; + this.centerCss = PublicMethod.getCenterTextFormat(); + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 14; + this.checkBox.y = 4; + this.checkBox.visible = false; + this.checkBox.setUnSelect(); + addEventListener(MouseEvent.CLICK,this.clickBtn,false,0,true); + } + + private function clickBtn(param1:MouseEvent) : void + { + if(this.obj == null) + { + return; + } + this.hasSelect = !this.hasSelect; + this.setSelect(); + } + + private function setSelect() : void + { + if(this.hasSelect) + { + this.checkBox.setSelect(); + } + else + { + this.checkBox.setUnSelect(); + } + this.selectBg.visible = this.hasSelect; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.hasSelect) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.hasSelect) + { + this.bg.visible = true; + } + } + + private function mouseClick(param1:MouseEvent) : void + { + } + + public function getObj() : Object + { + return this.obj; + } + + public function setData(param1:Object) : void + { + var _loc2_:int = 0; + this.obj = param1; + if(param1 == null) + { + this.checkBox.visible = false; + this.label1.text = ""; + this.label2.text = ""; + this.label3.text = ""; + this.label4.text = ""; + this.label5.text = ""; + this.bg.visible = false; + } + else + { + this.checkBox.visible = true; + this.label1.text = this.obj.userName; + this.label2.text = DataConfig.m_dutyArr[this.obj.duty]; + this.label3.text = this.obj.rankId; + this.label4.text = this.obj.casLv; + _loc2_ = int(this.obj.def); + if(_loc2_ == 1) + { + this.label5.text = "是"; + this.hasSelect = true; + } + else + { + this.label5.text = "否"; + this.hasSelect = false; + } + this.setSelect(); + this.label1.setTextFormat(this.centerCss); + this.label2.setTextFormat(this.centerCss); + this.label3.setTextFormat(this.centerCss); + this.label4.setTextFormat(this.centerCss); + this.label5.setTextFormat(this.centerCss); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/DefendCasItem.as b/flash_decompiled/com/view/ui/guild/mc/DefendCasItem.as new file mode 100644 index 0000000..9625ecd --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/DefendCasItem.as @@ -0,0 +1,90 @@ +package com.view.ui.guild.mc +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class DefendCasItem extends Sprite + { + + private var m_dutyArr:Array; + + private var m_icon:Bitmap; + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var m_labTitle:TextField; + + private var m_txtName:TextField; + + private var m_txtPower:TextField; + + private var num:int; + + private var iconSp:Sprite; + + public var onClick:Function; + + public function DefendCasItem(param1:int) + { + super(); + this.num = param1; + this.m_dutyArr = ["","盟主","副盟主","长老","成员"]; + this.iconSp = new Sprite(); + addChild(this.iconSp); + this.m_icon = new Bitmap(); + this.m_icon.bitmapData = this.gameRes.getPng(ClassConfig.LIB_UI_IMG_xiongnu_guard,this.gameRes.getGuildInfo()); + this.iconSp.addChild(this.m_icon); + this.m_labTitle = PublicMethod.getTextField(16777215,80); + addChild(this.m_labTitle); + this.m_labTitle.x = 54; + this.m_txtName = PublicMethod.getTextField(16777215,80); + addChild(this.m_txtName); + this.m_txtName.x = this.m_labTitle.x; + this.m_txtName.y = 24; + this.m_txtPower = PublicMethod.getTextField(16777215,80); + addChild(this.m_txtPower); + this.m_txtPower.x = this.m_labTitle.x; + this.m_txtPower.y = 48; + this.iconSp.buttonMode = true; + this.iconSp.addEventListener(MouseEvent.CLICK,this.chooseDefCas); + } + + public function setData(param1:Object) : void + { + this.m_labTitle.text = "第" + this.num + "座城池"; + if(param1 == null) + { + this.m_txtName.text = "无人防守"; + this.m_txtPower.text = ""; + return; + } + if(param1.userName) + { + this.m_txtName.htmlText = "" + param1.userName.toString() + ""; + this.m_txtPower.text = this.m_dutyArr[param1.duty].toString(); + this.m_txtName.setTextFormat(new TextFormat("宋体",12,65280)); + } + else + { + this.m_txtName.text = "无人防守"; + this.m_txtPower.text = ""; + this.m_txtName.setTextFormat(new TextFormat("宋体",12,16777215)); + } + } + + private function chooseDefCas(param1:MouseEvent) : void + { + if(this.onClick != null) + { + this.onClick(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/DefendDifficultyItem.as b/flash_decompiled/com/view/ui/guild/mc/DefendDifficultyItem.as new file mode 100644 index 0000000..546e968 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/DefendDifficultyItem.as @@ -0,0 +1,155 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.res.GameUIRes; + import com.view.tip.MulTipTitle; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class DefendDifficultyItem extends Sprite + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var kulouSp:Sprite; + + private var nameText:TextField; + + private var centerCss:TextFormat; + + public var gameRes:GameUIRes; + + public var face:InstallFace; + + private var defObj:Object; + + private var npcImg:Bitmap; + + private var npcTip:MulTipTitle; + + public var level:int; + + public var onClick:Function; + + public function DefendDifficultyItem(param1:int) + { + var _loc7_:Bitmap = null; + this.gameRes = GameUIRes.getInstance(); + this.face = InstallFace.getInstance(); + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg1 = PublicMethod.createRectangle(8816262,3355443,106,89); + addChild(this.bg1); + this.bg2 = PublicMethod.createRectangle(6727605,2706773,106,89); + addChild(this.bg2); + this.bg2.visible = false; + this.kulouSp = new Sprite(); + this.nameText = PublicMethod.getTextField(16777215,106); + this.kulouSp.addChild(this.nameText); + addChild(this.kulouSp); + this.nameText.y = 6; + var _loc2_:Number = 0; + var _loc3_:Bitmap = null; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:Bitmap = null; + _loc7_ = null; + var _loc8_:* = new Sprite(); + if(param1 % 2 == 0) + { + _loc4_ = 0; + while(_loc4_ < param1 / 2) + { + _loc3_ = new Bitmap(this.gameRes.getPng(ClassConfig.LIB_UI_IMG_kulou1,this.gameRes.getGuildInfo())); + _loc3_.x = (_loc3_.width + _loc2_) * _loc4_; + _loc8_.addChild(_loc3_); + _loc4_++; + } + } + else + { + _loc5_ = 0; + while(_loc5_ < (param1 + 1) / 2 - 1) + { + _loc7_ = new Bitmap(this.gameRes.getPng(ClassConfig.LIB_UI_IMG_kulou1,this.gameRes.getGuildInfo())); + _loc7_.x = (_loc7_.width + _loc2_) * _loc5_; + _loc8_.addChild(_loc7_); + _loc5_++; + } + _loc6_ = new Bitmap(this.gameRes.getPng(ClassConfig.LIB_UI_IMG_kulou2,this.gameRes.getGuildInfo())); + _loc6_.x = _loc8_.width; + _loc8_.addChild(_loc6_); + } + _loc8_.y = 65; + _loc8_.x = this.width - _loc8_.width - 5; + this.kulouSp.addChild(_loc8_); + addEventListener(MouseEvent.CLICK,this.clickItem,false,0,true); + } + + public function setDefData(param1:Object) : void + { + var _loc3_:int = 0; + var _loc4_:String = null; + this.defObj = param1; + if(this.npcImg == null) + { + this.level = this.defObj.level; + _loc3_ = (this.level + 1) / 2; + switch(_loc3_) + { + case 1: + _loc4_ = ClassConfig.LIB_UI_IMG_xiongnu1; + break; + case 2: + _loc4_ = ClassConfig.LIB_UI_IMG_xiongnu2; + break; + case 3: + _loc4_ = ClassConfig.LIB_UI_IMG_xiongnu3; + break; + case 4: + _loc4_ = ClassConfig.LIB_UI_IMG_xiongnu4; + break; + case 5: + _loc4_ = ClassConfig.LIB_UI_IMG_xiongnu5; + } + this.npcImg = new Bitmap(this.gameRes.getPng(_loc4_,this.gameRes.getGuildInfo())); + addChildAt(this.npcImg,getChildIndex(this.kulouSp)); + this.npcImg.x = width / 2 - this.npcImg.width / 2; + this.npcImg.y = height / 2 - this.npcImg.height / 2; + } + var _loc2_:String = this.defObj.name.toString() + "
"; + _loc2_ = _loc2_ + "敌军数量:" + this.defObj.atkNum.toString() + "
"; + _loc2_ = _loc2_ + "开启消耗:" + this.defObj.counsume.toString() + "建设值
"; + _loc2_ = _loc2_ + "胜利奖励:" + this.defObj.leagueAward.toString() + "," + this.defObj.userAward.toString() + ""; + if(this.npcTip == null) + { + this.npcTip = new MulTipTitle(this,this.face.stage,this.face.tip_bg,_loc2_,180); + } + else + { + this.npcTip.setValue(_loc2_); + } + } + + private function clickItem(param1:MouseEvent) : void + { + if(Boolean(this.onClick)) + { + this.onClick(this); + } + } + + public function setSelect(param1:Boolean) : void + { + this.bg2.visible = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/GuidTradeMc.as b/flash_decompiled/com/view/ui/guild/mc/GuidTradeMc.as new file mode 100644 index 0000000..ebe8eee --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/GuidTradeMc.as @@ -0,0 +1,141 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GuidTradeMc extends Sprite + { + + private var itemName:TextField; + + private var itemNums:TextField; + + private var itemOwner:TextField; + + private var itemPrice:TextField; + + public var buyBtn:UISmallBtn; + + public var cancelBtn:UISmallBtn; + + private var centerCss:TextFormat; + + private var bg:Sprite; + + public var cancelSellItemF:Function; + + public var itemObj:Object; + + public function GuidTradeMc() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,620,24); + addChild(this.bg); + this.bg.y = 1; + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,137); + this.itemNums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.itemOwner = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.itemPrice = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.buyBtn = new UISmallBtn("购 买",2); + this.cancelBtn = new UISmallBtn("取 消",2); + this.cancelBtn.onClick = this.cancelSellItem; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.color = 1048560; + this.cancelBtn.setTextCss(_loc1_); + this.itemName.y = 4; + this.itemNums.y = this.itemName.y; + this.itemOwner.y = this.itemName.y; + this.itemPrice.y = this.itemOwner.y; + --this.itemOwner.y; + this.cancelBtn.y = this.buyBtn.y; + addChild(this.itemName); + addChild(this.itemNums); + addChild(this.itemOwner); + addChild(this.itemPrice); + addChild(this.buyBtn); + addChild(this.cancelBtn); + this.itemNums.x = this.itemName.width; + this.itemOwner.x = this.itemNums.x + this.itemNums.width; + this.itemPrice.x = this.itemOwner.x + this.itemOwner.width; + this.buyBtn.x = this.itemPrice.x + this.itemPrice.width + 30; + this.cancelBtn.x = this.buyBtn.x; + this.centerCss = PublicMethod.getCenterTextFormat(); + this.buyBtn.visible = false; + this.cancelBtn.visible = false; + } + + private function cancelSellItem(param1:MouseEvent) : void + { + if(this.itemObj == null) + { + return; + } + if(this.cancelSellItemF != null) + { + this.cancelSellItemF(this.itemObj.guildTransId); + } + } + + public function setData(param1:Object, param2:int = 0) : void + { + this.itemObj = param1; + if(this.itemObj) + { + this.itemName.text = this.itemObj.itemName; + this.itemName.setTextFormat(this.centerCss); + this.itemNums.text = this.itemObj.itemNum; + this.itemNums.setTextFormat(this.centerCss); + this.itemOwner.text = this.itemObj.sellerUserName; + this.itemOwner.setTextFormat(this.centerCss); + this.itemPrice.text = this.itemObj.price; + this.itemPrice.setTextFormat(this.centerCss); + if(this.itemObj.sellerUserId == param2) + { + this.cancelBtn.visible = true; + this.buyBtn.visible = false; + } + else + { + this.buyBtn.visible = true; + this.cancelBtn.visible = false; + } + } + else + { + this.buyBtn.visible = false; + this.cancelBtn.visible = false; + this.itemName.text = ""; + this.itemNums.text = ""; + this.itemOwner.text = ""; + this.itemPrice.text = ""; + } + } + + 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; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/GuildEffMc.as b/flash_decompiled/com/view/ui/guild/mc/GuildEffMc.as new file mode 100644 index 0000000..215991d --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/GuildEffMc.as @@ -0,0 +1,78 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GuildEffMc extends Sprite + { + + private var eff1:TextField; + + private var eff2:TextField; + + private var eff3:TextField; + + private var eff4:TextField; + + private var eff5:TextField; + + private var eff6:TextField; + + private var centerCss:TextFormat; + + public function GuildEffMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.eff1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,63); + this.eff2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.eff3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.eff4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.eff5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.eff6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.eff1); + addChild(this.eff2); + addChild(this.eff3); + addChild(this.eff4); + addChild(this.eff5); + addChild(this.eff6); + this.eff2.x = this.eff1.x + this.eff1.width; + this.eff3.x = this.eff2.x + this.eff2.width; + this.eff4.x = this.eff3.x + this.eff3.width; + this.eff5.x = this.eff4.x + this.eff4.width; + this.eff6.x = this.eff5.x + this.eff5.width; + this.eff1.defaultTextFormat = this.centerCss; + this.eff2.defaultTextFormat = this.centerCss; + this.eff3.defaultTextFormat = this.centerCss; + this.eff4.defaultTextFormat = this.centerCss; + this.eff5.defaultTextFormat = this.centerCss; + this.eff6.defaultTextFormat = this.centerCss; + } + + public function setData(param1:Object) : void + { + if(param1 == null) + { + this.eff1.text = ""; + this.eff2.text = ""; + this.eff3.text = ""; + this.eff4.text = ""; + this.eff5.text = ""; + this.eff6.text = ""; + } + else + { + this.eff1.text = param1.provinceName; + this.eff2.text = param1.effectPercent; + this.eff3.text = param1.effectPercent; + this.eff4.text = param1.effectPercent; + this.eff5.text = param1.effectPercent; + this.eff6.text = "0%"; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/GuildEventMc.as b/flash_decompiled/com/view/ui/guild/mc/GuildEventMc.as new file mode 100644 index 0000000..800d44d --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/GuildEventMc.as @@ -0,0 +1,86 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GuildEventMc extends Sprite + { + + private var title:TextField; + + private var timeText:TextField; + + private var numText:TextField; + + private var bg:Sprite; + + private var eventObj:Object; + + public function GuildEventMc() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,622,24); + addChild(this.bg); + this.bg.x = 1; + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.numText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(this.numText); + this.numText.y = 2; + this.numText.x = 10; + this.numText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.title = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,460); + addChild(this.title); + this.title.x = this.numText.x + this.numText.width + 20; + this.title.y = this.numText.y; + this.timeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + addChild(this.timeText); + this.timeText.x = this.title.x + this.title.width; + this.timeText.y = this.numText.y; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.eventObj == null) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.eventObj == null) + { + return; + } + this.bg.alpha = 0.3; + } + + public function setData(param1:Object, param2:int = 0) : void + { + this.eventObj = param1; + if(param1 == null) + { + this.bg.alpha = 0; + this.title.visible = false; + this.timeText.visible = false; + this.numText.visible = false; + } + else + { + this.title.visible = true; + this.timeText.visible = true; + this.numText.visible = true; + this.numText.htmlText = "" + param2 + ""; + this.title.htmlText = "" + param1.eventContent + ""; + this.timeText.htmlText = "" + param1.happenTime + ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/GuildListMc.as b/flash_decompiled/com/view/ui/guild/mc/GuildListMc.as new file mode 100644 index 0000000..6545a5c --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/GuildListMc.as @@ -0,0 +1,189 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.guild.GuildListUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GuildListMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var centerCss:TextFormat; + + private var inviteBtn:UISmallBtn; + + private var selectBtn:UISmallBtn; + + private var orderText:TextField; + + private var countryMc:MovieClip; + + private var guildNameText:TextField; + + private var guildLevelText:TextField; + + private var guildLeaderText:TextField; + + private var guildCountsText:TextField; + + private var guildReputeText:TextField; + + public var viewBtn:UISmallBtn; + + private var bg:Sprite; + + public var guildObj:Object; + + public function GuildListMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,622,25); + addChild(this.bg); + this.bg.x = 1; + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.orderText = PublicMethod.getTextFieldWithFillter(16777215,45); + addChild(this.orderText); + this.orderText.y = 5; + this.countryMc = this.face.getMovieClip(ClassConfig.lib_country); + addChild(this.countryMc); + this.countryMc.gotoAndStop(1); + this.countryMc.visible = false; + this.countryMc.x = this.orderText.x + this.orderText.width + 6; + this.countryMc.y = this.orderText.y; + this.guildNameText = PublicMethod.getTextFieldWithFillter(16777215,115); + addChild(this.guildNameText); + this.guildNameText.x = this.countryMc.x + this.countryMc.width + 2; + this.guildNameText.y = this.orderText.y; + this.guildLevelText = PublicMethod.getTextFieldWithFillter(16777215,60); + addChild(this.guildLevelText); + this.guildLevelText.x = this.guildNameText.x + this.guildNameText.width; + this.guildLevelText.y = this.orderText.y; + this.guildLeaderText = PublicMethod.getTextFieldWithFillter(16777215,110); + addChild(this.guildLeaderText); + this.guildLeaderText.x = this.guildLevelText.x + this.guildLevelText.width; + this.guildLeaderText.y = this.orderText.y; + this.guildCountsText = PublicMethod.getTextFieldWithFillter(16777215,50); + addChild(this.guildCountsText); + this.guildCountsText.x = this.guildLeaderText.x + this.guildLeaderText.width; + this.guildCountsText.y = this.orderText.y; + this.guildReputeText = PublicMethod.getTextFieldWithFillter(16777215,90); + addChild(this.guildReputeText); + this.guildReputeText.x = this.guildCountsText.x + this.guildCountsText.width; + this.guildReputeText.y = this.orderText.y; + this.viewBtn = new UISmallBtn("查 看",2); + addChild(this.viewBtn); + this.viewBtn.x = this.guildReputeText.x + this.guildReputeText.width + 10; + this.viewBtn.y = 3; + this.viewBtn.visible = false; + this.inviteBtn = new UISmallBtn("邀请",2); + addChild(this.inviteBtn); + this.inviteBtn.x = this.viewBtn.x + this.viewBtn.width + 5; + this.inviteBtn.y = 3; + this.inviteBtn.visible = false; + this.inviteBtn.onClick = this.inviteUnion; + this.selectBtn = new UISmallBtn("选择",2); + addChild(this.selectBtn); + this.selectBtn.x = this.inviteBtn.x; + this.selectBtn.y = this.inviteBtn.y; + this.selectBtn.visible = false; + this.selectBtn.onClick = this.startWarToUnion; + } + + public function setData(param1:Object, param2:Boolean = false, param3:Boolean = false) : void + { + this.guildObj = param1; + if(param1 == null) + { + this.orderText.visible = false; + this.countryMc.visible = false; + this.countryMc.gotoAndStop(1); + this.guildNameText.visible = false; + this.guildLevelText.visible = false; + this.guildLeaderText.visible = false; + this.guildLevelText.visible = false; + this.guildReputeText.visible = false; + this.guildCountsText.visible = false; + this.viewBtn.visible = false; + this.inviteBtn.visible = false; + this.bg.alpha = 0; + } + else + { + this.orderText.visible = true; + this.countryMc.visible = true; + this.countryMc.gotoAndStop(1); + this.guildNameText.visible = true; + this.guildLevelText.visible = true; + this.guildLeaderText.visible = true; + this.guildLevelText.visible = true; + this.guildReputeText.visible = true; + this.guildCountsText.visible = true; + this.viewBtn.visible = true; + this.orderText.text = param1.ladder; + this.orderText.setTextFormat(this.centerCss); + this.countryMc.gotoAndStop(param1.countryId); + this.guildNameText.text = param1.guildName; + this.guildNameText.setTextFormat(this.centerCss); + this.guildLevelText.text = param1.level; + this.guildLevelText.setTextFormat(this.centerCss); + this.guildLeaderText.text = param1.leader; + this.guildLeaderText.setTextFormat(this.centerCss); + this.guildCountsText.text = param1.memberNumber; + this.guildCountsText.setTextFormat(this.centerCss); + this.guildReputeText.text = param1.repute; + this.guildReputeText.setTextFormat(this.centerCss); + this.inviteBtn.visible = param2; + this.selectBtn.visible = param3; + this.selectBtn.setEnable(); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.guildObj == null) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.guildObj == null) + { + return; + } + this.bg.alpha = 0.3; + } + + private function inviteUnion(param1:MouseEvent) : void + { + if(this.guildObj) + { + ConnectService.getInstance().guildService.inviteCombineByName(this.guildObj.guildName); + } + } + + private function startWarToUnion(param1:MouseEvent) : void + { + this.selectBtn.setUnEnable(); + ConnectService.getInstance().guildService.startWarToGuild(this.guildObj.guildName); + var _loc2_:GuildListUI = GuildListUI.getInstance(); + _loc2_.closeUI(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/GuildMemMc.as b/flash_decompiled/com/view/ui/guild/mc/GuildMemMc.as new file mode 100644 index 0000000..9b2c105 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/GuildMemMc.as @@ -0,0 +1,270 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.CommonAPI; + import com.common.DateUtil; + import com.common.PublicMethod; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.ui.province.ITimeObject; + import com.view.ui.province.TimeType; + import com.view.ui.province.TimerManager; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GuildMemMc extends Sprite implements ITimeObject + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var centerCss:TextFormat; + + private var bg:Sprite; + + public var viewBtn:SimpleButton; + + private var bttleBtn:Sprite; + + private var memName:TextField; + + private var jobText:TextField; + + private var orderText:TextField; + + private var levelText:TextField; + + private var statusText:TextField; + + private var posiText:TextField; + + private var farText:TextField; + + public var memObj:Object; + + private var remainSeconds:int; + + private var colorFlag:Boolean; + + private var _endTime:Number; + + public var declareFunc:Function; + + private var colorStart:String = ""; + + private var colorEnd:String = ""; + + public var updateFunc:Function; + + public function GuildMemMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,622,24); + addChild(this.bg); + this.bg.x = 1; + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.memName = PublicMethod.getTextField(16777215,120); + addChild(this.memName); + this.memName.y = 2; + this.memName.defaultTextFormat = this.centerCss; + this.jobText = PublicMethod.getTextField(16777215,60); + addChild(this.jobText); + this.jobText.x = this.memName.x + this.memName.width + 2; + this.jobText.y = this.memName.y; + this.jobText.defaultTextFormat = this.centerCss; + this.orderText = PublicMethod.getTextField(16777215,55); + addChild(this.orderText); + this.orderText.x = this.jobText.x + this.jobText.width; + this.orderText.y = this.memName.y; + this.orderText.defaultTextFormat = this.centerCss; + this.levelText = PublicMethod.getTextField(16777215,51); + addChild(this.levelText); + this.levelText.x = this.orderText.x + this.orderText.width; + this.levelText.y = this.memName.y; + this.levelText.defaultTextFormat = this.centerCss; + this.statusText = PublicMethod.getTextField(16777215,102); + addChild(this.statusText); + this.statusText.x = this.levelText.x + this.levelText.width; + this.statusText.y = this.memName.y; + this.statusText.defaultTextFormat = this.centerCss; + this.posiText = PublicMethod.getTextField(16777215,85); + addChild(this.posiText); + this.posiText.x = this.statusText.x + this.statusText.width; + this.posiText.y = this.memName.y; + this.posiText.styleSheet = CommonAPI.getLinkStyle(); + this.posiText.htmlText = ""; + this.posiText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.posiText.mouseEnabled = true; + this.farText = PublicMethod.getTextField(16777215,75); + addChild(this.farText); + this.farText.x = this.posiText.x + this.posiText.width; + this.farText.y = this.memName.y; + this.farText.defaultTextFormat = this.centerCss; + this.viewBtn = this.face.getButton(ClassConfig.lib_ui_view); + addChild(this.viewBtn); + this.viewBtn.x = this.farText.x + this.farText.width + 15; + this.viewBtn.y = 3; + this.bttleBtn = this.face.getSprite(ClassConfig.lib_battle); + addChild(this.bttleBtn); + this.bttleBtn.x = this.viewBtn.x + this.viewBtn.width + 10; + this.bttleBtn.y = 3; + this.bttleBtn.buttonMode = true; + this.bttleBtn.addEventListener(MouseEvent.CLICK,this.declareWar,false,0,true); + this.viewBtn.visible = false; + this.bttleBtn.visible = false; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.memObj == null) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.memObj == null) + { + return; + } + this.bg.alpha = 0.3; + } + + public function setData(param1:Object) : void + { + this.memObj = param1; + this.bg.alpha = 0; + if(this.memObj == null) + { + this.memName.text = ""; + this.jobText.text = ""; + this.orderText.text = ""; + this.levelText.text = ""; + this.statusText.text = ""; + this.posiText.text = ""; + this.farText.text = ""; + this.viewBtn.visible = false; + this.bttleBtn.visible = false; + this.clear(); + return; + } + this.memName.text = this.memObj.name; + if(this.memObj.dutyOfGuild == 1) + { + this.jobText.text = "盟主"; + } + else if(this.memObj.dutyOfGuild == 2) + { + this.jobText.text = "副盟主"; + } + else if(this.memObj.dutyOfGuild == 3) + { + this.jobText.text = "长老"; + } + else + { + this.jobText.text = "成员"; + } + if(this.memObj.rank > 0) + { + this.orderText.text = this.memObj.rank; + } + else + { + this.orderText.text = "未上榜"; + } + this.levelText.text = this.memObj.userLv; + if(this.memObj.userRelDesc) + { + this.statusText.text = this.memObj.userRelDesc; + } + this.remainSeconds = this.memObj.remainSeconds; + this.posiText.htmlText = this.memObj.pos; + this.farText.htmlText = this.memObj.length; + this.viewBtn.visible = true; + this.bttleBtn.visible = true; + if(this.remainSeconds > 0) + { + this.colorFlag = true; + TimerManager.getInstance().addTime(this); + this._endTime = DateUtil.getEndTime(this.remainSeconds); + PublicMethod.setBlack(this.bttleBtn); + } + else + { + PublicMethod.setColor(this.bttleBtn); + this.colorFlag = false; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:Array = param1.text.split(","); + var _loc3_:LinkEvent = new LinkEvent(); + _loc3_.id = "map"; + _loc3_.eventType = "map"; + _loc3_.data = _loc2_; + EventUtils.getInstance().dispatchEvent(_loc3_); + } + + private function declareWar(param1:MouseEvent) : void + { + if(this.memObj == null) + { + return; + } + if(this.colorFlag) + { + return; + } + if(this.declareFunc != null) + { + this.declareFunc(this.memObj.casId); + } + } + + public function clear() : void + { + TimerManager.getInstance().removeTime(this); + } + + public function carryOut() : void + { + this.remainSeconds = DateUtil.distanceSeconds(this._endTime); + if(this.remainSeconds <= 0) + { + this.statusText.text = ""; + if(this.updateFunc != null) + { + this.updateFunc(); + } + } + else + { + this.statusText.htmlText = this.colorFlag ? this.colorStart + this.memObj.userRelDesc + " " + PublicMethod.getTime(this.remainSeconds) + this.colorEnd : Utils.formatSecond(this.remainSeconds); + } + } + + public function getTime() : int + { + return this.remainSeconds; + } + + public function getTimeType() : TimeType + { + return TimeType.COUNT_DOWN; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/GuildOfferMc.as b/flash_decompiled/com/view/ui/guild/mc/GuildOfferMc.as new file mode 100644 index 0000000..cb998ba --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/GuildOfferMc.as @@ -0,0 +1,116 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + + public class GuildOfferMc extends Sprite + { + + private var orderText:TextField; + + private var nameText:TextField; + + private var resText:TextField; + + private var itemText:TextField; + + private var bg1:Sprite; + + private var currObj:Object; + + public function GuildOfferMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,386,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.orderText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.resText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + this.itemText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.orderText); + addChild(this.nameText); + addChild(this.resText); + addChild(this.itemText); + this.nameText.x = this.orderText.width + 5; + this.nameText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.nameText.mouseEnabled = true; + this.resText.x = this.nameText.x + this.nameText.width; + this.itemText.x = this.resText.x + this.resText.width; + this.orderText.y = 3; + this.nameText.y = this.orderText.y; + this.resText.y = this.orderText.y; + this.itemText.y = this.orderText.y; + this.orderText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.nameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.resText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.currObj) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.currObj) + { + this.bg1.visible = true; + } + } + + public function setStyle(param1:int) : void + { + } + + public function setData(param1:Object, param2:int = 2) : void + { + this.currObj = param1; + if(param1 == null) + { + this.orderText.text = ""; + this.nameText.text = ""; + this.resText.text = ""; + this.itemText.text = ""; + this.bg1.visible = false; + } + else + { + this.orderText.text = " " + param1.rank; + this.nameText.text = param1.name; + this.nameText.htmlText = "" + param1.name + ""; + if(param2 == 2) + { + this.resText.text = param1.donateRes + "万资源"; + this.itemText.text = param1.donateItem + "个虎符"; + } + else + { + this.resText.text = param1.todayDonateRes + "万资源"; + this.itemText.text = param1.todayDonateItem + "个虎符"; + } + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/HeroItem.as b/flash_decompiled/com/view/ui/guild/mc/HeroItem.as new file mode 100644 index 0000000..877263e --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/HeroItem.as @@ -0,0 +1,78 @@ +package com.view.ui.guild.mc +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class HeroItem extends Sprite + { + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var heroMc:MovieClip; + + public var obj:Object; + + private var loader:LoadResource; + + private var url:String; + + private var headImg:Bitmap; + + public function HeroItem() + { + super(); + this.heroMc = this.gameRes.getMovieClip(ClassConfig.pro_warmembg,this.gameRes.getGuildInfo()); + addChild(this.heroMc); + } + + public function update(param1:Object) : void + { + this.obj = param1; + if(param1 == null) + { + this.heroMc.head_mc3.txt_name.htmlText = ""; + if(Boolean(this.headImg) && this.heroMc.contains(this.headImg)) + { + this.heroMc.removeChild(this.headImg); + } + } + else + { + this.loadHead(ServerConfig.IMAGE_HEAD_URL + this.obj.picPath); + this.heroMc.head_mc3.txt_name.htmlText = this.obj.showName; + } + } + + private function loadHead(param1:String) : void + { + if(this.url == param1) + { + return; + } + this.url = param1; + this.loader = new LoadResource(this.url,this.loadComplete); + } + + private function loadComplete(param1:Event) : void + { + if(Boolean(this.headImg) && this.heroMc.contains(this.headImg)) + { + this.heroMc.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.headImg.width = 52; + this.headImg.height = 65; + this.headImg.x = 6; + this.headImg.y = 6; + this.loader.clear(); + this.heroMc.addChildAt(this.headImg,this.heroMc.getChildIndex(this.heroMc.head_mc3)); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/InviteListMc.as b/flash_decompiled/com/view/ui/guild/mc/InviteListMc.as new file mode 100644 index 0000000..1210a9a --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/InviteListMc.as @@ -0,0 +1,131 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class InviteListMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var centerCss:TextFormat; + + private var nameText:TextField; + + private var rankText:TextField; + + private var levelText:TextField; + + private var honorText:TextField; + + private var applyUserText:TextField; + + public var cancelBtn:UISmallBtn; + + private var bg:Sprite; + + public var userObj:Object; + + public function InviteListMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,622,24); + addChild(this.bg); + this.bg.x = 1; + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + var _loc1_:Sprite = PublicMethod.getTrLine(624); + addChild(_loc1_); + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.nameText); + this.nameText.y = 3; + this.rankText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,92); + addChild(this.rankText); + this.rankText.x = this.nameText.x + this.nameText.width + 2; + this.rankText.y = this.nameText.y; + this.levelText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,85); + addChild(this.levelText); + this.levelText.x = this.rankText.x + this.rankText.width; + this.levelText.y = this.nameText.y; + this.honorText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,111); + addChild(this.honorText); + this.honorText.x = this.levelText.x + this.levelText.width; + this.honorText.y = this.nameText.y; + this.applyUserText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,112); + addChild(this.applyUserText); + this.applyUserText.x = this.honorText.x + this.honorText.width; + this.applyUserText.y = this.nameText.y; + this.cancelBtn = new UISmallBtn("取消邀请",3); + addChild(this.cancelBtn); + this.cancelBtn.x = this.applyUserText.x + this.applyUserText.width + 20; + this.cancelBtn.y = this.nameText.y; + this.cancelBtn.visible = false; + this.nameText.defaultTextFormat = this.centerCss; + this.rankText.defaultTextFormat = this.centerCss; + this.levelText.defaultTextFormat = this.centerCss; + this.honorText.defaultTextFormat = this.centerCss; + this.applyUserText.defaultTextFormat = this.centerCss; + } + + public function setData(param1:Object) : void + { + this.userObj = param1; + if(param1 == null) + { + this.nameText.visible = false; + this.rankText.visible = false; + this.levelText.visible = false; + this.honorText.visible = false; + this.applyUserText.visible = false; + this.cancelBtn.visible = false; + this.bg.alpha = 0; + } + else + { + this.nameText.visible = true; + this.rankText.visible = true; + this.levelText.visible = true; + this.honorText.visible = true; + this.applyUserText.visible = true; + this.cancelBtn.visible = true; + this.nameText.text = param1.name; + this.nameText.setTextFormat(this.centerCss); + this.rankText.text = param1.rank; + this.rankText.setTextFormat(this.centerCss); + this.levelText.text = param1.rankName; + this.levelText.setTextFormat(this.centerCss); + this.honorText.text = param1.rangeValue; + this.honorText.setTextFormat(this.centerCss); + this.applyUserText.text = param1.inviteUser; + this.applyUserText.setTextFormat(this.centerCss); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.userObj == null) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.userObj == null) + { + return; + } + this.bg.alpha = 0.3; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/MyGuildMemMc.as b/flash_decompiled/com/view/ui/guild/mc/MyGuildMemMc.as new file mode 100644 index 0000000..dff569c --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/MyGuildMemMc.as @@ -0,0 +1,163 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MyGuildMemMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var centerCss:TextFormat; + + private var bg:Sprite; + + public var viewBtn:UISmallBtn; + + private var memName:TextField; + + private var jobText:TextField; + + private var orderText:TextField; + + private var levelText:TextField; + + private var statusText:TextField; + + private var posiText:TextField; + + private var farText:TextField; + + public var memObj:Object; + + public function MyGuildMemMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,622,24); + addChild(this.bg); + this.bg.x = 1; + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.memName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,121); + this.memName.mouseEnabled = true; + addChild(this.memName); + this.memName.y = 2; + this.memName.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.jobText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.jobText); + this.jobText.x = this.memName.x + this.memName.width + 2; + this.jobText.y = this.memName.y; + this.orderText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,65); + addChild(this.orderText); + this.orderText.x = this.jobText.x + this.jobText.width; + this.orderText.y = this.memName.y; + this.levelText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,61); + addChild(this.levelText); + this.levelText.x = this.orderText.x + this.orderText.width; + this.levelText.y = this.memName.y; + this.statusText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,82); + addChild(this.statusText); + this.statusText.x = this.levelText.x + this.levelText.width; + this.statusText.y = this.memName.y; + this.statusText.defaultTextFormat = this.centerCss; + this.posiText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + addChild(this.posiText); + this.posiText.x = this.statusText.x + this.statusText.width; + this.posiText.y = this.memName.y; + this.farText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + addChild(this.farText); + this.farText.x = this.posiText.x + this.posiText.width; + this.farText.y = this.memName.y; + this.farText.defaultTextFormat = this.centerCss; + this.viewBtn = new UISmallBtn("查 看",2); + addChild(this.viewBtn); + this.viewBtn.x = this.farText.x + this.farText.width + 10; + this.viewBtn.y = 3; + this.viewBtn.visible = false; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.memObj == null) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.memObj == null) + { + return; + } + this.bg.alpha = 0.3; + } + + public function setData(param1:Object, param2:int = 0) : void + { + var _loc3_:int = 0; + this.memObj = param1; + if(this.memObj == null) + { + this.memName.text = ""; + this.jobText.text = ""; + this.orderText.text = ""; + this.levelText.text = ""; + this.statusText.text = ""; + this.posiText.text = ""; + this.farText.text = ""; + this.viewBtn.visible = false; + } + else + { + this.memName.htmlText = "

" + this.memObj.name + "

"; + this.jobText.text = this.memObj.dutyName; + this.jobText.setTextFormat(this.centerCss); + if(this.memObj.rank < 0) + { + this.orderText.text = "未上榜"; + } + else + { + this.orderText.text = this.memObj.rank; + } + this.orderText.setTextFormat(this.centerCss); + this.levelText.text = this.memObj.rankName; + this.levelText.setTextFormat(this.centerCss); + _loc3_ = int(this.memObj.userId); + this.statusText.htmlText = this.memObj.rangeValue; + this.posiText.text = this.memObj.pointOfOffer; + this.posiText.setTextFormat(this.centerCss); + if(param2 == 1) + { + this.farText.htmlText = this.memObj.status; + } + else + { + this.farText.htmlText = "--"; + } + this.viewBtn.visible = true; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/NodeTip.as b/flash_decompiled/com/view/ui/guild/mc/NodeTip.as new file mode 100644 index 0000000..f533378 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/NodeTip.as @@ -0,0 +1,85 @@ +package com.view.ui.guild.mc +{ + import com.view.world.AbstractToolTipCell; + import flash.text.TextField; + + public class NodeTip extends AbstractToolTipCell + { + + private var obj:Object; + + public function NodeTip(param1:Object) + { + super(); + MY_WIDTH = 230; + this.obj = param1; + } + + override protected function drawUI() : void + { + var _loc4_:TextField = null; + var _loc1_:TextField = null; + var _loc2_:TextField = null; + var _loc3_:TextField = null; + _loc4_ = null; + var _loc5_:TextField = null; + var _loc6_:* = this.getTextField(this.obj.pointName,16776960,12,true); + _loc6_.x = (MY_WIDTH - _loc6_.width) / 2; + _loc6_.y = 0; + this.mySprite.addChild(_loc6_); + var _loc7_:* = this.getTextField("阵点类型:"); + _loc7_.y = this.mySprite.height; + this.mySprite.addChild(_loc7_); + var _loc8_:* = this.getTextField(String(this.obj.pointType)); + _loc8_.x = 110; + _loc8_.y = _loc7_.y; + this.mySprite.addChild(_loc8_); + var _loc9_:* = this.getTextField("战斗类型:"); + _loc9_.y = this.mySprite.height; + this.mySprite.addChild(_loc9_); + var _loc10_:* = this.getTextField(String(this.obj.fightType)); + _loc10_.x = 110; + _loc10_.y = _loc9_.y; + this.mySprite.addChild(_loc10_); + var _loc11_:* = this.getTextField("攻方兵力恢复:"); + _loc11_.y = this.mySprite.height; + this.mySprite.addChild(_loc11_); + var _loc12_:* = this.getTextField(String(this.obj.attRecoverRate)); + _loc12_.x = 110; + _loc12_.y = _loc11_.y; + this.mySprite.addChild(_loc12_); + var _loc13_:* = this.getTextField("守方兵力恢复:"); + _loc13_.y = this.mySprite.height; + this.mySprite.addChild(_loc13_); + var _loc14_:* = this.getTextField(String(this.obj.defRecoverRate)); + _loc14_.x = 110; + _loc14_.y = _loc13_.y; + this.mySprite.addChild(_loc14_); + if(String(this.obj.attSupplyType) == "可" && String(this.obj.defSupplyType) == "可") + { + _loc1_ = this.getTextField("占领方可以进行补兵"); + _loc1_.y = this.mySprite.height; + this.mySprite.addChild(_loc1_); + } + else + { + _loc2_ = this.getTextField("进攻方可否补兵:"); + _loc2_.y = this.mySprite.height; + this.mySprite.addChild(_loc2_); + _loc3_ = this.getTextField(String(this.obj.attSupplyType)); + _loc3_.x = 110; + _loc3_.y = _loc2_.y; + this.mySprite.addChild(_loc3_); + _loc4_ = this.getTextField("防守方可否补兵:"); + _loc4_.y = this.mySprite.height; + this.mySprite.addChild(_loc4_); + _loc5_ = this.getTextField(String(this.obj.defSupplyType)); + _loc5_.x = 110; + _loc5_.y = _loc4_.y; + this.mySprite.addChild(_loc5_); + } + this.drawFrame(-5,-5,this.MY_WIDTH,this.mySprite.height); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/Spate2View.as b/flash_decompiled/com/view/ui/guild/mc/Spate2View.as new file mode 100644 index 0000000..9055b70 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/Spate2View.as @@ -0,0 +1,67 @@ +package com.view.ui.guild.mc +{ + import com.comfig.ClassConfig; + import com.view.world.ToolTipManager; + import flash.display.MovieClip; + import flash.text.TextField; + + public class Spate2View extends SpateView + { + + public var txt1:TextField; + + public var txt3:TextField; + + public var txt5:TextField; + + public var txt6:TextField; + + public var txt7:TextField; + + public var txt4:TextField; + + public var txt2:TextField; + + public var mc1:MovieClip; + + public var mc2:MovieClip; + + public var mc3:MovieClip; + + public var mc4:MovieClip; + + public var mc5:MovieClip; + + public var mc6:MovieClip; + + public var mc7:MovieClip; + + private var arr:Array; + + private var mc:MovieClip; + + public function Spate2View(param1:Array) + { + super(); + this.mc = gameRes.getMovieClip(ClassConfig.pro_Spate2View,gameRes.getGuildInfo()); + addChild(this.mc); + var _loc2_:Object = null; + var _loc3_:int = 0; + var _loc4_:MovieClip = null; + var _loc5_:TextField = null; + this.arr = param1; + var _loc6_:int = 0; + while(_loc6_ < 7) + { + _loc2_ = this.arr[_loc6_]; + _loc3_ = int(_loc2_["pointId"]); + this["mc" + _loc3_] = this.mc["mc" + _loc3_] as MovieClip; + this["txt" + _loc3_] = this.mc["txt" + _loc3_] as TextField; + this["txt" + _loc3_].text = _loc2_["pointName"]; + ToolTipManager.getInstance().setToolTip(this["mc" + _loc3_],new NodeTip(_loc2_)); + _loc6_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/SpateView.as b/flash_decompiled/com/view/ui/guild/mc/SpateView.as new file mode 100644 index 0000000..a1c1bad --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/SpateView.as @@ -0,0 +1,30 @@ +package com.view.ui.guild.mc +{ + import com.view.world.ui.AbstractView; + + public class SpateView extends AbstractView + { + + public function SpateView() + { + super(); + } + + public function getIndex(param1:int, param2:Array) : int + { + var _loc3_:int = 0; + var _loc4_:int = 0; + while(_loc4_ < param2.length) + { + if(param1 == param2[_loc4_].pointId) + { + _loc3_ = _loc4_; + break; + } + _loc4_++; + } + return _loc3_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/SpecialItem.as b/flash_decompiled/com/view/ui/guild/mc/SpecialItem.as new file mode 100644 index 0000000..ff41ef5 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/SpecialItem.as @@ -0,0 +1,88 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.province.event.ProvinceEvent; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class SpecialItem extends Sprite + { + + private var eff1:TextField; + + private var eff2:TextField; + + private var getBtn:UISmallBtn; + + private var obj:Object; + + public function SpecialItem() + { + super(); + this.eff1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.eff2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,282); + this.getBtn = new UISmallBtn("领 取",2); + addChild(this.eff1); + addChild(this.eff2); + this.eff1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.eff2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.eff1.y = 2; + this.eff2.x = this.eff1.x + this.eff1.width; + this.eff2.y = this.eff1.y; + addChild(this.getBtn); + this.getBtn.x = this.eff2.x + this.eff2.width + 18; + this.getBtn.y = 2; + this.getBtn.visible = false; + this.getBtn.onClick = this.onMouseClick; + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_receiveProvinceAward,this.receiveGuildEffResult); + } + + public function setData(param1:Object) : void + { + this.obj = param1; + if(this.obj == null) + { + this.eff1.text = ""; + this.eff2.text = ""; + this.getBtn.visible = false; + } + else + { + this.getBtn.visible = true; + this.eff1.text = this.obj.provinceName; + this.eff2.text = this.obj.awardDesc; + if(this.obj.canReceive == "2") + { + this.getBtn.visible = false; + } + else + { + this.getBtn.setUnEnable(); + if(this.obj.canReceive == "1") + { + this.getBtn.setEnable(); + } + } + } + } + + private function receiveGuildEffResult(param1:ProvinceEvent) : void + { + if(this.obj == null) + { + return; + } + this.getBtn.setUnEnable(); + } + + private function onMouseClick(param1:MouseEvent) : void + { + ConnectService.getInstance().provinceService.receiveProvinceAward(this.obj.provinceId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/TechMc.as b/flash_decompiled/com/view/ui/guild/mc/TechMc.as new file mode 100644 index 0000000..942bd3e --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/TechMc.as @@ -0,0 +1,168 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UISmallBtn; + import com.view.res.GameUIRes; + import com.view.tip.GuildTechUpTip; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.utils.Timer; + + public class TechMc extends Sprite + { + + private var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var face:InstallFace = InstallFace.getInstance(); + + private var tradeMc:MovieClip; + + private var upBtn:UISmallBtn; + + private var upTip:GuildTechUpTip; + + private var techObj:Object; + + private var timeLeft:int; + + private var techLv:int; + + private var techMaxLv:int; + + private var timer:Timer; + + private var loader:LoadResource; + + private var techImg:Bitmap; + + public function TechMc() + { + super(); + this.tradeMc = this.gameRes.getMovieClip(ClassConfig.guild_tech,this.gameRes.getGuildInfo()); + addChild(this.tradeMc); + this.upBtn = new UISmallBtn("升 级",2); + this.tradeMc.addChild(this.upBtn); + this.upBtn.onClick = this.upgradeTech; + this.upBtn.x = 550; + this.upBtn.y = 10; + this.upBtn.visible = false; + addEventListener(Event.REMOVED_FROM_STAGE,this.clear); + this.upTip = new GuildTechUpTip(this.upBtn,this.face.stage,this.face.tip_bg); + } + + public function setData(param1:Object) : void + { + this.techObj = param1; + this.techLv = this.techObj.techLv; + this.techMaxLv = this.techObj.tech.maxLv; + this.tradeMc.title.text = param1.tech.techName + "(" + param1.techLv + ")级"; + this.tradeMc.content.text = param1.tech.techDesc; + this.timeLeft = this.techObj.timeLeft; + if(this.timeLeft <= 0) + { + this.tradeMc.timeStr.text = ""; + this.tradeMc.time.text = ""; + } + else + { + this.tradeMc.timeStr.text = "正在升级,剩余时间:"; + this.tradeMc.time.text = PublicMethod.getTime(this.timeLeft); + } + if(this.timeLeft > 0) + { + this.startTime(); + } + this.loadImg(); + } + + private function startTime() : void + { + if(this.timeLeft == 0) + { + return; + } + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function clear(param1:Event) : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + } + this.upTip.destroyTip(); + } + + private function timerFrame(param1:TimerEvent) : void + { + --this.timeLeft; + this.tradeMc.time.text = PublicMethod.getTime(this.timeLeft); + if(this.timeLeft <= 0) + { + this.timer.stop(); + this.tradeMc.timeStr.text = ""; + this.tradeMc.time.text = ""; + } + } + + private function loadImg() : void + { + if(Boolean(this.techImg) && contains(this.techImg)) + { + return; + } + var _loc1_:String = this.techObj.tech.picPath; + this.loader = new LoadResource("pic/tech/" + _loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.techImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + addChild(this.techImg); + this.techImg.x = 31; + this.techImg.y = 21; + } + + public function viewUpBtn(param1:Boolean) : void + { + if(param1 && this.techLv >= this.techMaxLv) + { + this.upBtn.visible = false; + return; + } + this.upBtn.visible = param1; + if(param1) + { + this.upTip.setData(this.techObj); + } + } + + private function upgradeTech(param1:MouseEvent) : void + { + var _loc2_:int = 0; + if(this.techObj) + { + _loc2_ = int(this.techObj.tech.techId); + ConnectService.getInstance().guildService.upgradeGuildTech(_loc2_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/TradeItem1.as b/flash_decompiled/com/view/ui/guild/mc/TradeItem1.as new file mode 100644 index 0000000..e4a9706 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/TradeItem1.as @@ -0,0 +1,124 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicMethod; + 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 TradeItem1 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var itemObj:Object; + + private var imgSp:Sprite; + + private var num_txt:TextField; + + private var loader:LoadResource; + + private var itemTip:ItemTip; + + private var itemImg:Bitmap; + + public function TradeItem1(param1:Object = null) + { + super(); + var _loc2_:Bitmap = new Bitmap(this.face.getPng(UIConfig.bigItem_lock_skin)); + addChild(_loc2_); + _loc2_.width = 59; + _loc2_.height = 59; + this.imgSp = new Sprite(); + addChild(this.imgSp); + this.imgSp.x = 3; + this.imgSp.y = 3; + var _loc3_:TextFormat = PublicMethod.getRightTextFormat(); + this.num_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,35); + addChild(this.num_txt); + this.num_txt.x = 20; + this.num_txt.y = 40; + this.num_txt.defaultTextFormat = _loc3_; + } + + public function clear() : void + { + if(this.loader != null) + { + this.loader.clear(); + this.loader = null; + } + if(this.itemTip != null) + { + this.itemTip.destroyTip(); + this.itemTip = null; + } + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.itemImg) && this.imgSp.contains(this.itemImg)) + { + this.imgSp.removeChild(this.itemImg); + } + this.itemImg = Bitmap(param1.target.loader.content); + ImgCache.getInstance().setImg(this.loader.url,this.itemImg); + if(this.loader == null) + { + this.loader.clear(); + return; + } + this.loader.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.imgSp.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + } + + public function setDate(param1:Object) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + if(Boolean(this.itemImg) && this.imgSp.contains(this.itemImg)) + { + this.imgSp.removeChild(this.itemImg); + } + this.num_txt.text = ""; + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + this.buttonMode = false; + } + else + { + this.num_txt.text = this.itemObj.itemCount; + if(ImgCache.getInstance().getImg("pic/equip/" + this.itemObj.item.iconPath)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + this.itemObj.item.iconPath).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loader = new LoadResource("pic/equip/" + this.itemObj.item.iconPath,this.loadBack); + } + this.itemTip = new ItemTip(this.imgSp,this.face.stage,this.face.tip_bg,param1.viewMap); + this.buttonMode = true; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/TradeItem2.as b/flash_decompiled/com/view/ui/guild/mc/TradeItem2.as new file mode 100644 index 0000000..f20c701 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/TradeItem2.as @@ -0,0 +1,131 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.tip.ItemTip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class TradeItem2 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var cancelBtn:UISmallBtn; + + private var sellPrice:TextField; + + private var num_txt:TextField; + + private var itemSp:Sprite; + + private var bg1:Bitmap; + + private var label:TextField; + + public var itemObj:Object; + + private var loader:LoadResource; + + private var itemTip:ItemTip; + + private var itemImg:Bitmap; + + public function TradeItem2() + { + super(); + this.bg1 = new Bitmap(this.face.getPng(UIConfig.bigItem_lock_skin)); + addChild(this.bg1); + this.bg1.width = 59; + this.bg1.height = 59; + this.itemSp = new Sprite(); + addChild(this.itemSp); + this.itemSp.x = 3; + this.itemSp.y = 3; + this.num_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,20); + addChild(this.num_txt); + this.num_txt.x = 40; + this.num_txt.y = 40; + this.label = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + addChild(this.label); + this.label.x = -2; + this.label.y = 61; + this.label.text = "售价:"; + this.sellPrice = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.sellPrice); + this.sellPrice.x = this.label.x + this.label.width; + this.sellPrice.y = this.label.y; + this.cancelBtn = new UISmallBtn("取 消",2); + addChild(this.cancelBtn); + this.cancelBtn.x = 5; + this.cancelBtn.y = 77; + } + + public function setData(param1:Object) : void + { + this.itemObj = param1; + if(param1 == null) + { + this.sellPrice.visible = false; + this.num_txt.visible = false; + this.cancelBtn.visible = false; + this.itemSp.visible = false; + this.bg1.visible = false; + this.label.visible = false; + if(this.itemTip != null) + { + this.itemTip.destroyTip(); + this.itemTip = null; + } + } + else + { + this.sellPrice.visible = true; + this.num_txt.visible = true; + this.cancelBtn.visible = true; + this.itemSp.visible = true; + this.bg1.visible = true; + this.label.visible = true; + this.sellPrice.text = param1.price; + this.num_txt.text = param1.itemNum; + if(ImgCache.getInstance().getImg("pic/equip/" + param1.item.iconPath)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + param1.item.iconPath).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loader = new LoadResource("pic/equip/" + param1.item.iconPath,this.loadBack); + } + this.itemTip = new ItemTip(this.itemSp,this.face.stage,this.face.tip_bg,param1.viewMap); + } + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.itemImg) && this.itemSp.contains(this.itemImg)) + { + this.itemSp.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 + { + this.itemSp.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/UnionArmyIcon.as b/flash_decompiled/com/view/ui/guild/mc/UnionArmyIcon.as new file mode 100644 index 0000000..55edecf --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/UnionArmyIcon.as @@ -0,0 +1,313 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.view.res.GameUIRes; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.DisplayObject; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.filters.ColorMatrixFilter; + import flash.text.TextField; + + public class UnionArmyIcon extends Sprite + { + + private var armyIconMc:MovieClip; + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var m_background:DisplayObject; + + private var m_info:TextField; + + private var m_glowBackground:DisplayObject; + + private var m_enable:Boolean; + + private var m_locker:MovieClip; + + private var m_onClick:Function; + + private var m_id:int; + + private var m_tipData:String; + + private var m_money:int; + + private var m_iconArmyLv:int; + + private var m_contribut:int; + + private var m_image:String; + + private var loadRes:LoadResource; + + private var bgImg:Bitmap; + + public function UnionArmyIcon() + { + super(); + mouseChildren = false; + this.armyIconMc = this.gameRes.getMovieClip(ClassConfig.guild_armyicon,this.gameRes.getGuildInfo()); + addChild(this.armyIconMc); + this.m_background = this.armyIconMc.bg; + this.m_info = this.armyIconMc.info_txt; + } + + public function get glowBGVisible() : Boolean + { + if(this.m_glowBackground != null) + { + return this.m_glowBackground.visible; + } + return false; + } + + public function get enable() : Boolean + { + return this.m_enable; + } + + public function setEnable(param1:Boolean) : void + { + if(this.locked) + { + this.filters = null; + return; + } + if(param1) + { + this.setButton(true); + this.filters = null; + } + else + { + this.setButton(false); + this.filters = [new ColorMatrixFilter([0.33,0.33,0.33,0,0,0.33,0.33,0.33,0,0,0.33,0.33,0.33,0,0,0,0,0,1,0])]; + } + } + + public function get locked() : Boolean + { + return this.m_locker != null; + } + + public function set glowBGVisible(param1:Boolean) : void + { + if(this.m_glowBackground != null) + { + this.m_glowBackground.visible = param1; + } + } + + public function get id() : int + { + return this.m_id; + } + + private function clickHandler(param1:MouseEvent) : void + { + if(this.m_onClick != null) + { + this.m_onClick(param1); + } + } + + public function setGlowBackground(param1:DisplayObject) : void + { + this.m_glowBackground = param1; + if(this.m_glowBackground != null) + { + this.m_glowBackground.visible = false; + this.armyIconMc.addChildAt(this.m_glowBackground,0); + } + if(this.m_background != null) + { + this.armyIconMc.swapChildren(this.m_glowBackground,this.m_background); + } + } + + public function setData(param1:Object) : void + { + this.m_id = param1.upgradeID; + this.m_iconArmyLv = int(param1.armyLevel); + this.m_money = int(param1.money); + this.m_contribut = int(param1.contribut); + this.setShow(param1); + if(int(param1.curBuilLv) < int(param1.iconBuilLv)) + { + this.setLock(true); + this.tipData = param1.curBuilLv + "级" + param1.builName + "升级到" + param1.iconBuilLv + "级时可开启"; + } + else + { + this.setLock(false); + } + } + + public function setLock(param1:Boolean) : void + { + var lockerClass:Class = null; + var t_locker:DisplayObject = null; + var v:* = param1; + if(v) + { + if(this.m_locker == null) + { + this.setButton(false); + try + { + this.m_locker = InstallFace.getInstance().getMovieClip(ClassConfig.lib_ui_lock); + this.m_locker.bg.visible = false; + this.armyIconMc.addChild(this.m_locker); + this.m_locker.x = 8; + this.m_locker.y = 8; + } + catch(err:Error) + { + m_locker = null; + } + } + } + else if(this.m_locker != null) + { + t_locker = this.m_locker; + this.m_locker = null; + if(this.armyIconMc.contains(t_locker)) + { + this.armyIconMc.removeChild(t_locker); + } + this.setButton(true); + } + } + + public function setBackground(param1:DisplayObject) : void + { + if(this.m_background != null) + { + if(this.armyIconMc.contains(this.m_background)) + { + this.armyIconMc.removeChild(this.m_background); + } + } + this.m_background = param1; + if(this.m_background != null) + { + this.armyIconMc.addChildAt(this.m_background,0); + } + } + + public function setButton(param1:Boolean) : void + { + if(this.locked) + { + return; + } + this.m_enable = param1; + if(param1) + { + this.buttonMode = true; + if(!this.hasEventListener(MouseEvent.CLICK)) + { + this.addEventListener(MouseEvent.CLICK,this.clickHandler,false,0,true); + } + } + else + { + this.buttonMode = false; + if(this.hasEventListener(MouseEvent.CLICK)) + { + this.removeEventListener(MouseEvent.CLICK,this.clickHandler); + } + } + } + + public function set tipData(param1:Object) : void + { + this.m_tipData = param1 as String; + if(this.m_tipData != null) + { + ToolTipManager.getInstance().setToolTip(this,new TxtTooltip(String(this.m_tipData))); + } + } + + public function get money() : int + { + return this.m_money; + } + + public function set onClick(param1:Function) : void + { + this.m_onClick = param1; + } + + private function getChildObject(param1:String) : DisplayObject + { + var _loc2_:* = param1; + try + { + return this.getChildByName(_loc2_); + } + catch(err:Error) + { + } + return null; + } + + public function get iconArmyLv() : int + { + return this.m_iconArmyLv; + } + + private function removeFromStageHandler(param1:Event) : void + { + if(this.hasEventListener(MouseEvent.CLICK)) + { + this.removeEventListener(MouseEvent.CLICK,this.clickHandler); + } + if(this.m_tipData != null) + { + ToolTipManager.getInstance().disposeToolTip(this); + } + } + + public function get contribut() : int + { + return this.m_contribut; + } + + public function setShow(param1:Object) : void + { + if(this.m_image != param1.image) + { + this.m_image = param1.image; + this.loadRes = new LoadResource(ServerConfig.IMAGE_ARMY_URL + this.m_image,this.loadBack); + } + if(this.m_info != null) + { + this.m_info.text = param1.armyName; + } + } + + private function loadBack(param1:Event) : void + { + this.bgImg = Bitmap(param1.target.loader.content); + this.loadRes.clear(); + this.armyIconMc.addChild(this.bgImg); + this.bgImg.x = 8; + this.bgImg.y = 8; + if(Boolean(this.m_locker) && this.armyIconMc.contains(this.m_locker)) + { + this.armyIconMc.swapChildren(this.bgImg,this.m_locker); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/UnionAssistDefendersItem.as b/flash_decompiled/com/view/ui/guild/mc/UnionAssistDefendersItem.as new file mode 100644 index 0000000..2162392 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/UnionAssistDefendersItem.as @@ -0,0 +1,178 @@ +package com.view.ui.guild.mc +{ + import com.InstallFace; + 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.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UnionAssistDefendersItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var m_btnTiChu:UISmallBtn; + + private var m_ZhaoHui:UISmallBtn; + + private var m_btnTongTing:UISmallBtn; + + private var bg:Sprite; + + private var obj:Object; + + public function UnionAssistDefendersItem() + { + super(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,115); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,480,24); + addChild(this.bg); + this.bg.alpha = 0.3; + this.bg.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + addChild(this.label1); + addChild(this.label2); + addChild(this.label3); + this.label1.y = 4; + this.label2.x = this.label1.x + this.label1.width; + this.label2.y = this.label1.y; + this.label3.x = this.label2.x + this.label2.width; + this.label3.y = this.label1.y; + this.label1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label3.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.m_btnTiChu = new UISmallBtn("踢 出",2); + this.m_ZhaoHui = new UISmallBtn("召 回",2); + this.m_btnTongTing = new UISmallBtn("守 备",2); + addChild(this.m_btnTiChu); + addChild(this.m_ZhaoHui); + addChild(this.m_btnTongTing); + this.m_btnTiChu.x = 370; + this.m_btnTiChu.y = 3; + this.m_ZhaoHui.x = this.m_btnTiChu.x + this.m_btnTiChu.width + 5; + this.m_ZhaoHui.y = this.m_btnTiChu.y; + this.m_btnTongTing.x = 400; + this.m_btnTongTing.y = this.m_btnTiChu.y; + this.m_btnTiChu.visible = false; + this.m_ZhaoHui.visible = false; + this.m_btnTongTing.visible = false; + this.m_btnTiChu.onClick = this.qianFan; + this.m_ZhaoHui.onClick = this.callBack; + this.m_btnTongTing.onClick = this.shouBei; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = true; + } + } + + public function getObj() : Object + { + return this.obj; + } + + public function setData(param1:Object, param2:Boolean = false) : void + { + this.obj = param1; + if(this.obj == null) + { + this.m_btnTiChu.visible = false; + this.m_ZhaoHui.visible = false; + this.m_btnTongTing.visible = false; + this.label1.text = ""; + this.label2.text = ""; + this.label3.text = ""; + return; + } + this.label1.text = "支援者"; + if(this.obj.atkOutId == "-1") + { + this.label1.text = "城主"; + } + this.label2.text = this.obj.fromUserName; + this.label3.text = this.obj.power; + if(this.obj.atkOutId == "-1") + { + this.m_btnTiChu.visible = false; + this.m_ZhaoHui.visible = false; + this.m_btnTongTing.visible = true; + } + else + { + this.m_btnTiChu.visible = true; + this.m_ZhaoHui.visible = true; + this.m_btnTongTing.visible = false; + } + this.m_ZhaoHui.setUnEnable(); + if(this.obj.userId == NewUserData.getUser().userId) + { + this.m_ZhaoHui.setEnable(); + this.m_btnTongTing.setEnable(); + } + else + { + this.m_btnTongTing.setUnEnable(); + } + this.m_btnTiChu.setUnEnable(); + if(param2) + { + this.m_btnTiChu.setEnable(); + } + } + + private function qianFan(param1:MouseEvent) : * + { + ConnectService.getInstance().battleService.callBackLeagueDefArmy(this.obj.atkOutId); + } + + private function callBackOk() : * + { + ConnectService.getInstance().battleService.callBackOutArmy(this.obj.atkOutId); + } + + private function callBack(param1:MouseEvent) : * + { + MessageBoxUI.getInstance().confirmMsg("您确定要召回这只部队吗?",this.callBackOk); + } + + private function shouBei(param1:MouseEvent) : void + { + var _loc2_:int = InstallFace.getInstance().currStatus; + var _loc3_:String = InstallFace.getInstance()._castleType; + if(_loc2_ == 2 && _loc3_ == "main") + { + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.OPENWALL)); + } + else + { + MessageBoxUI.getInstance().addMessage("在主城中才能进入城池守备!"); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/UnionMergeItem.as b/flash_decompiled/com/view/ui/guild/mc/UnionMergeItem.as new file mode 100644 index 0000000..c6fe6f3 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/UnionMergeItem.as @@ -0,0 +1,133 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UnionMergeItem extends Sprite + { + + private var bg:Sprite; + + private var text1:TextField; + + private var text2:TextField; + + private var text3:TextField; + + private var agreeBtn:UISmallBtn; + + private var refuseBtn:UISmallBtn; + + public var refuseUnionF:Function; + + public var agreeUnionF:Function; + + private var unionObj:Object; + + public function UnionMergeItem() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,367,24); + addChild(this.bg); + this.bg.x = 1; + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.text1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,112); + addChild(this.text1); + this.text1.y = 4; + this.text1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.text2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.text2); + this.text2.x = this.text1.x + this.text1.width; + this.text2.y = this.text1.y; + this.text2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.text3); + this.text3.x = this.text2.x + this.text2.width; + this.text3.y = this.text1.y; + this.text3.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.agreeBtn = new UISmallBtn("同 意",2); + addChild(this.agreeBtn); + this.agreeBtn.x = this.text3.x + this.text3.width + 2; + this.agreeBtn.y = this.text1.y; + this.agreeBtn.onClick = this.configAgreeUnion; + this.refuseBtn = new UISmallBtn("拒 绝",2); + addChild(this.refuseBtn); + this.refuseBtn.x = this.agreeBtn.x + this.agreeBtn.width + 10; + this.refuseBtn.y = this.text1.y; + this.refuseBtn.onClick = this.refuseUnion; + this.agreeBtn.visible = false; + this.refuseBtn.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + } + + private function refuseUnion(param1:MouseEvent) : void + { + if(Boolean(this.unionObj) && this.refuseUnionF != null) + { + this.refuseUnionF(this.unionObj.guildId); + } + } + + private function configAgreeUnion(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确认同意该联盟合并邀请吗?\n合并后需要重新登录游戏",this.agreeUnion); + } + + private function agreeUnion() : void + { + if(Boolean(this.unionObj) && this.agreeUnionF != null) + { + this.agreeUnionF(this.unionObj.guildId); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.unionObj == null) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.unionObj == null) + { + return; + } + this.bg.alpha = 0.3; + } + + public function setUnionObj(param1:Object) : void + { + this.unionObj = param1; + if(this.unionObj == null) + { + this.text1.text = ""; + this.text2.text = ""; + this.text3.text = ""; + this.agreeBtn.visible = false; + this.refuseBtn.visible = false; + this.bg.alpha = 0; + } + else + { + this.text1.text = this.unionObj.name; + this.text2.text = this.unionObj.level; + this.text3.text = this.unionObj.memberCount; + this.agreeBtn.visible = true; + this.refuseBtn.visible = true; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/UnionWarItem.as b/flash_decompiled/com/view/ui/guild/mc/UnionWarItem.as new file mode 100644 index 0000000..7051c28 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/UnionWarItem.as @@ -0,0 +1,179 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class UnionWarItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var warBtn:UISmallBtn; + + private var bg:Sprite; + + private var obj:Object; + + public var refresh:Function; + + private var timer:Timer; + + private var leftTime:int; + + public function UnionWarItem() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,578,23); + addChild(this.bg); + this.bg.alpha = 0.3; + this.bg.visible = false; + this.bg.y = 1; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,170); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,89); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,88); + addChild(this.label1); + addChild(this.label2); + addChild(this.label3); + addChild(this.label4); + this.label1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label3.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label4.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label1.y = 4; + this.label2.x = this.label1.width; + this.label2.y = this.label1.y; + this.label3.x = this.label2.x + this.label2.width; + this.label3.y = this.label1.y; + this.label4.x = this.label3.x + this.label3.width; + this.label4.y = this.label1.y; + this.warBtn = new UISmallBtn("再次讨伐",3); + addChild(this.warBtn); + this.warBtn.x = this.label4.x + this.label4.width + 40; + this.warBtn.y = 2; + this.warBtn.visible = false; + this.warBtn.onClick = this.startUnionWar; + addEventListener(Event.REMOVED_FROM_STAGE,this.clear); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.visible = true; + } + } + + public function setData(param1:Object) : void + { + this.obj = param1; + if(this.obj) + { + this.label1.text = this.obj.defendGuildName; + this.label2.text = this.obj.defendGuildLevel; + this.leftTime = int(this.obj.coldingTime); + if(this.leftTime > 0) + { + this.label3.text = Utils.formatSeconds(this.leftTime); + this.warBtn.setUnEnable(); + this.startTime(); + } + else + { + this.label3.text = "0"; + this.warBtn.setEnable(); + } + this.label4.text = this.obj.guildRelation; + this.warBtn.visible = true; + } + else + { + this.bg.visible = false; + this.warBtn.visible = false; + this.label1.text = ""; + this.label2.text = ""; + this.label3.text = ""; + this.label4.text = ""; + } + } + + private function startUnionWar(param1:MouseEvent) : void + { + if(this.obj) + { + this.warBtn.setUnEnable(); + LoadingMc.getInstance().show(); + ConnectService.getInstance().guildService.startWarToGuild(this.obj.defendGuildName); + } + } + + private function startTime() : void + { + if(this.leftTime > 0) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.enterFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function enterFrame(param1:TimerEvent) : void + { + --this.leftTime; + this.label3.text = Utils.formatSeconds(this.leftTime); + if(this.leftTime < 0) + { + this.clear(null); + this.refresh(); + } + } + + private function clear(param1:Event) : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.enterFrame); + this.timer = null; + } + } + + public function setIsLeader(param1:int) : void + { + if(param1 == 0) + { + this.warBtn.setUnEnable(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/guild/mc/WarMemMc.as b/flash_decompiled/com/view/ui/guild/mc/WarMemMc.as new file mode 100644 index 0000000..f967bb4 --- /dev/null +++ b/flash_decompiled/com/view/ui/guild/mc/WarMemMc.as @@ -0,0 +1,128 @@ +package com.view.ui.guild.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.newdata.user.NewUserData; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class WarMemMc extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var kickBtn:UISmallBtn; + + private var css:TextFormat; + + private var bg1:Sprite; + + public var provinceId:int; + + private var obj:Object; + + private var cankick:int; + + public function WarMemMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,275,25); + this.bg1.alpha = 0; + addChild(this.bg1); + this.css = PublicMethod.getCenterTextFormat(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,105); + addChild(this.label1); + this.label1.y = 4; + this.label1.defaultTextFormat = this.css; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.label2); + this.label2.y = this.label1.y; + this.label2.x = this.label1.x + this.label1.width; + this.label2.defaultTextFormat = this.css; + this.kickBtn = new UISmallBtn("踢 除",2); + addChild(this.kickBtn); + this.kickBtn.y = 3; + this.kickBtn.x = this.label2.x + this.label2.width + 25; + this.kickBtn.visible = false; + this.kickBtn.onClick = this.kickUser; + var _loc1_:Sprite = PublicMethod.getTrLine(274); + addChild(_loc1_); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg1.alpha = 0; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg1.alpha = 0.3; + } + } + + public function setData(param1:Object, param2:int = 2) : void + { + this.obj = param1; + if(this.obj == null) + { + this.bg1.alpha = 0; + this.label1.text = ""; + this.label2.text = ""; + this.kickBtn.visible = false; + } + else + { + this.cankick = param2; + this.label1.htmlText = this.obj.userName; + this.label2.text = this.obj.pointName; + this.label1.setTextFormat(this.css); + this.label2.setTextFormat(this.css); + if(this.cankick == 1 && !this.isSelf()) + { + this.kickBtn.visible = true; + } + else + { + this.kickBtn.visible = false; + } + } + } + + private function isSelf() : Boolean + { + return NewUserData.getUser().userId == this.obj.userId; + } + + private function kickUser(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确认踢除该参战成员吗?",this.kickConfirm); + } + + private function kickConfirm() : void + { + if(Boolean(this.obj) && Boolean(this.cankick == 1) && !this.isSelf()) + { + ConnectService.getInstance().provinceService.kickUser(this.obj.userId,this.provinceId); + } + } + + public function clear() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/hebi/HebiBuild.as b/flash_decompiled/com/view/ui/hebi/HebiBuild.as new file mode 100644 index 0000000..fa34923 --- /dev/null +++ b/flash_decompiled/com/view/ui/hebi/HebiBuild.as @@ -0,0 +1,50 @@ +package com.view.ui.hebi +{ + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class HebiBuild extends BaseBuild + { + + public function HebiBuild(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/heshibi.swf"; + super.buildData = param1; + super.loadSwfBg(); + super.addEvent(); + super.createNpcTip(); + this.buttonMode = true; + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

天命合璧

"; + npcTipStr += "各国君主用来供奉和氏璧的祭礼之所,合璧成功可获大量奖励"; + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(buildUI == null) + { + buildUI = new HebiUI(); + } + 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/hebi/HebiEnterUI.as b/flash_decompiled/com/view/ui/hebi/HebiEnterUI.as new file mode 100644 index 0000000..6a56ba9 --- /dev/null +++ b/flash_decompiled/com/view/ui/hebi/HebiEnterUI.as @@ -0,0 +1,659 @@ +package com.view.ui.hebi +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.play.event.HexagramEvent; + import com.events.BroadEvent; + import com.events.BroadEventManage; + import com.view.mc.MyCellRenderer; + import com.view.mc.sprite.TextBar; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UINumInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.tip.HeroTip; + import com.view.ui.PlayUI; + import com.view.ui.hero.HeroConst; + import com.view.ui.message.MessageBoxUI; + import fl.controls.ComboBox; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class HebiEnterUI extends PlayUI + { + + private var hexagramObj:Object; + + private var roomVec:Vector.; + + private var peopleNumTxt:TextField; + + private var roomSearch_txt:UINumInputText; + + private var enterBtn:UIButton; + + private var heal_txt:TextField; + + private var fight_txt:TextField; + + private var level_txt:TextField; + + private var had_txt:TextField; + + private var heroName_txt:TextField; + + private var cur_txt:TextField; + + private var imgSp:Sprite; + + private var refreshBtn:UIButton; + + private var searchBtn:UIButton; + + private var pageMc:UIPageMc; + + private var heroCombox:ComboBox; + + private var tft:TextFormat; + + private var currPage:int; + + private var hallMess:TextBar; + + private var refreshTime:Timer; + + private var currTime:int; + + private var isInHall:Boolean; + + private var currHero:Object; + + private var currHeroId:int; + + private var headLoader:LoadResource; + + private var headImg:Bitmap; + + private var heroList:Array; + + private var heroTip:HeroTip; + + public function HebiEnterUI() + { + super(); + } + + public function setData(param1:Object) : void + { + this.hexagramObj = param1; + } + + override public function setPosition() : void + { + this.x = int(face.realWidth / 2 - width / 2); + this.y = int(face.realHeight / 2 - height / 2); + } + + override public function setWindowSize() : void + { + window_width = 715; + window_heihgt = 499; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 915; + ui_closeBtn.y = 10; + } + + override public function createUI() : void + { + var _loc5_:UITitleBg = null; + var _loc21_:HebiRoom = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_tianminghebi); + this.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(905,520); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(643,511); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(240,511); + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x + _loc2_.width + 4; + _loc3_.y = _loc2_.y; + var _loc4_:UITitleBg = new UITitleBg("大厅信息",_loc3_.width); + _loc3_.addChild(_loc4_); + _loc4_.x = int(_loc3_.width / 2 - _loc4_.width / 2); + _loc5_ = new UITitleBg("武将选择",_loc3_.width); + _loc3_.addChild(_loc5_); + _loc5_.x = int(_loc3_.width / 2 - _loc5_.width / 2); + _loc5_.y = 230; + _loc5_ = new UITitleBg("大厅房间",_loc2_.width); + _loc2_.addChild(_loc5_); + _loc5_.x = int(_loc2_.width / 2 - _loc5_.width / 2); + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,83); + _loc2_.addChild(_loc6_); + _loc6_.x = 20; + _loc6_.y = 30; + _loc6_.text = "当前大厅人数:"; + this.peopleNumTxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc2_.addChild(this.peopleNumTxt); + this.peopleNumTxt.x = _loc6_.x + _loc6_.width; + this.peopleNumTxt.y = _loc6_.y; + this.refreshBtn = new UIButton("刷 新",2,10); + _loc2_.addChild(this.refreshBtn); + this.refreshBtn.x = this.peopleNumTxt.x + 50; + this.refreshBtn.y = _loc6_.y - 3; + this.refreshBtn.onClick = this.refreshHall; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.addChild(_loc7_); + _loc7_.x = 400; + _loc7_.y = _loc6_.y; + _loc7_.text = "房间号:"; + this.roomSearch_txt = new UINumInputText(60); + this.roomSearch_txt.hiddenBtn(); + this.roomSearch_txt.setMaxChars(100); + _loc2_.addChild(this.roomSearch_txt); + this.roomSearch_txt.x = _loc7_.x + _loc7_.width; + this.roomSearch_txt.y = _loc6_.y - 2; + this.searchBtn = new UIButton("查找房间",2,10); + _loc2_.addChild(this.searchBtn); + this.searchBtn.x = this.roomSearch_txt.x + this.roomSearch_txt.width; + this.searchBtn.y = _loc6_.y - 3; + this.searchBtn.onClick = this.searchRoom; + var _loc8_:UIWindowBg = new UIWindowBg(); + _loc8_.initSecondPanel(635,424); + _loc2_.addChild(_loc8_); + _loc8_.x = 4; + _loc8_.y = 54; + this.roomVec = new Vector.(); + var _loc9_:int = 0; + while(_loc9_ < 9) + { + _loc21_ = new HebiRoom(); + this.roomVec.push(_loc21_); + _loc8_.addChild(_loc21_); + _loc21_.x = 4 + 213 * int(_loc9_ % 3); + _loc21_.y = 4 + 143 * int(_loc9_ / 3); + _loc21_.getLeftBtn().onClick = this.enterRoom; + _loc21_.getRightBtn().onClick = this.enterRoom; + _loc21_.getRobBtn().onClick = this.enterRoom; + _loc9_++; + } + this.pageMc = new UIPageMc(); + _loc2_.addChild(this.pageMc); + this.pageMc.x = 275; + this.pageMc.y = 495; + this.pageMc.setPageCount(11); + this.pageMc.setPage(1); + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.hallMess = new TextBar(); + this.hallMess.createTextField(230,205); + _loc3_.addChild(this.hallMess); + this.hallMess.x = 3; + this.hallMess.y = 25; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + var _loc10_:Sprite = face.getSprite(ClassConfig.lib_herobg); + _loc3_.addChild(_loc10_); + _loc10_.x = 9; + _loc10_.y = 270; + this.imgSp = new Sprite(); + _loc10_.addChild(this.imgSp); + this.imgSp.x = 4; + this.imgSp.y = 4; + this.heroTip = new HeroTip(this.imgSp,face.stage,face.tip_bg); + this.heroCombox = new ComboBox(); + this.heroCombox.width = 90; + _loc3_.addChild(this.heroCombox); + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.heroCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.heroCombox.x = 90; + this.heroCombox.y = 267; + this.heroCombox.addEventListener(Event.CHANGE,this.selectHero); + this.enterBtn = new UIButton("进入大厅",2); + _loc3_.addChild(this.enterBtn); + this.enterBtn.x = this.heroCombox.x + this.heroCombox.width + 2; + this.enterBtn.y = 267; + this.enterBtn.onClick = this.enterAndLeaveRoom; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc11_.text = "武将名称:"; + _loc3_.addChild(_loc11_); + _loc11_.x = 90; + _loc11_.y = 292; + this.heroName_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + _loc3_.addChild(this.heroName_txt); + this.heroName_txt.x = _loc11_.x + _loc11_.width; + this.heroName_txt.y = _loc11_.y; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc12_.text = "健 康 度:"; + _loc3_.addChild(_loc12_); + _loc12_.x = _loc11_.x; + _loc12_.y = _loc11_.y + 20; + this.heal_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + _loc3_.addChild(this.heal_txt); + this.heal_txt.x = _loc12_.x + _loc12_.width; + this.heal_txt.y = _loc12_.y; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc13_.text = "单 挑 力:"; + _loc3_.addChild(_loc13_); + _loc13_.x = _loc12_.x; + _loc13_.y = _loc12_.y + 20; + this.fight_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + _loc3_.addChild(this.fight_txt); + this.fight_txt.x = this.heal_txt.x; + this.fight_txt.y = _loc13_.y; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc14_.text = "武将等级:"; + _loc3_.addChild(_loc14_); + _loc14_.x = _loc12_.x; + _loc14_.y = _loc13_.y + 20; + this.level_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc3_.addChild(this.level_txt); + this.level_txt.x = this.heal_txt.x; + this.level_txt.y = _loc14_.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc15_.text = "拥有玉璧:"; + _loc3_.addChild(_loc15_); + _loc15_.x = 10; + _loc15_.y = _loc14_.y + 30; + this.had_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc3_.addChild(this.had_txt); + this.had_txt.x = _loc15_.x + _loc15_.width; + this.had_txt.y = _loc15_.y; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + _loc16_.text = "今日合璧次数:"; + _loc3_.addChild(_loc16_); + _loc16_.x = 120; + _loc16_.y = _loc15_.y; + this.cur_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + _loc3_.addChild(this.cur_txt); + this.cur_txt.x = _loc16_.x + _loc16_.width; + this.cur_txt.y = _loc16_.y; + var _loc17_:String = "规则:
1.只能同联盟进行合璧
2.只能抢夺房主玉璧,成功后清空房间
3.抢夺成功后,房间归属给抢夺成功玩家
4.每日0点清空所有房间一次
5.君主等级越高,合璧奖励越好"; + var _loc18_:Sprite = PublicMethod.getTrLine(233); + _loc3_.addChild(_loc18_); + _loc18_.x = 5; + _loc18_.y = _loc16_.y + 23; + var _loc19_:TextFormat = new TextFormat(); + _loc19_.leading = 4; + var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,235); + _loc20_.wordWrap = true; + _loc20_.multiline = true; + _loc20_.height = 90; + _loc3_.addChild(_loc20_); + _loc20_.x = 5; + _loc20_.defaultTextFormat = _loc19_; + _loc20_.y = _loc18_.y + 5; + _loc20_.htmlText = _loc17_; + this.initColdTime(); + } + + private function startRefresh() : void + { + if(this.refreshTime == null) + { + this.refreshTime = new Timer(1000); + this.refreshTime.addEventListener(TimerEvent.TIMER,this.enterFrame); + } + if(!this.refreshTime.running) + { + this.currTime = 0; + this.refreshTime.start(); + } + } + + private function enterFrame(param1:TimerEvent) : void + { + ++this.currTime; + if(this.currTime >= 5) + { + this.currTime = 0; + this.refreshTime.stop(); + this.getRoomByPage(); + } + } + + private function stopTime() : void + { + if(Boolean(this.refreshTime) && this.refreshTime.running) + { + this.refreshTime.stop(); + } + } + + private function initColdTime() : void + { + } + + private function initRoomNums() : void + { + var _loc4_:int = 0; + var _loc5_:Object = null; + var _loc1_:int = int(this.hexagramObj.userInfo.roomRum); + var _loc2_:int = int(this.hexagramObj.userInfo.roomMax); + this.peopleNumTxt.text = _loc1_ + "/" + _loc2_; + var _loc3_:Array = this.hexagramObj.roomInfo as Array; + for each(_loc5_ in _loc3_) + { + this.roomVec[_loc4_].setData(_loc5_); + _loc4_++; + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(this.hexagramObj) + { + this.initUserInfo(); + this.startRefresh(); + } + ConnectService.getInstance().addEventListener(HexagramEvent.ENTER_HEXAGRAM,this.enterHallResult); + ConnectService.getInstance().addEventListener(HexagramEvent.ENTER_LEAVEHALL,this.leaveHallResult); + ConnectService.getInstance().addEventListener(HexagramEvent.ENTER_REFRESH,this.refreshHallResult); + ConnectService.getInstance().addEventListener(HexagramEvent.ENTER_SEARCHROOM,this.searchHallResult); + ConnectService.getInstance().addEventListener(HexagramEvent.ENTER_JOINROOM,this.joinHallResult); + BroadEventManage.getInstance().addEventListener(BroadEvent.HEXAGRAM_EVENT,this.getHallMess); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(HexagramEvent.ENTER_HEXAGRAM,this.enterHallResult); + ConnectService.getInstance().removeEventListener(HexagramEvent.ENTER_LEAVEHALL,this.leaveHallResult); + ConnectService.getInstance().removeEventListener(HexagramEvent.ENTER_REFRESH,this.refreshHallResult); + ConnectService.getInstance().removeEventListener(HexagramEvent.ENTER_SEARCHROOM,this.searchHallResult); + ConnectService.getInstance().removeEventListener(HexagramEvent.ENTER_JOINROOM,this.joinHallResult); + BroadEventManage.getInstance().removeEventListener(BroadEvent.HEXAGRAM_EVENT,this.getHallMess); + this.hallMess.clear(); + if(this.refreshTime != null) + { + this.refreshTime.removeEventListener(TimerEvent.TIMER,this.enterFrame); + this.refreshTime = null; + } + this.heroCombox.removeAll(); + this.heroList = null; + } + + private function initUserInfo() : void + { + var _loc8_:Object = null; + var _loc1_:Object = this.hexagramObj.pageInfo; + this.currPage = _loc1_.curNum; + this.pageMc.setPage(this.currPage); + var _loc2_:Object = this.hexagramObj.userInfo; + var _loc3_:int = int(_loc2_.hexagram); + if(_loc3_ == 1) + { + this.had_txt.text = "左壁"; + } + else if(_loc3_ == 2) + { + this.had_txt.text = "右壁"; + } + else + { + this.had_txt.text = "无"; + } + var _loc4_:int = int(_loc2_.constituteNum); + var _loc5_:int = int(_loc2_.conNum); + var _loc6_:int = int(_loc2_.laveNum); + this.cur_txt.text = _loc6_ + "/" + _loc4_; + var _loc7_:int = int(_loc2_.roomNum); + this.currHeroId = _loc2_.heroId; + if(this.currHeroId > 0) + { + this.isInHall = true; + this.currHero = _loc2_.heroInfo; + this.heroCombox.visible = false; + this.level_txt.text = HeroConst.changeName(this.currHero.level,this.currHero.changeCount); + this.fight_txt.text = this.currHero.fightPower; + this.heal_txt.text = this.currHero.hpStatus; + this.heroName_txt.htmlText = this.currHero.showName; + this.heroTip.destroyTip(); + this.loadHeroHead(); + this.enterBtn.setText("离开大厅"); + } + else + { + this.isInHall = false; + this.heroCombox.visible = true; + if(this.heroList == null) + { + this.heroList = _loc2_.heroList; + for each(_loc8_ in this.heroList) + { + this.heroCombox.addItem({ + "label":_loc8_.name, + "data":_loc8_.heroId, + "color":"0x" + _loc8_.color + }); + this.heroCombox.dropdown.setStyle("cellRenderer",MyCellRenderer); + } + this.heroCombox.selectedIndex = 0; + this.currHero = this.heroList[0]; + this.currHeroId = this.currHero.heroId; + this.initHeroInfo(); + } + this.enterBtn.setText("进入大厅"); + } + this.initRoomNums(); + this.startRefresh(); + } + + private function initHeroInfo() : void + { + this.tft.color = this.heroCombox.selectedItem.color; + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.level_txt.text = HeroConst.changeName(this.currHero.level,this.currHero.changeCount); + this.fight_txt.text = this.currHero.fightPower; + this.heal_txt.text = this.currHero.hpStatus; + this.heroName_txt.htmlText = this.currHero.showName; + this.loadHeroHead(); + this.heroTip.setTipData(this.currHero); + } + + private function loadHeroHead() : void + { + var _loc1_:String = "pic/head/" + this.currHero.picPath; + this.headLoader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.headLoader.clear(); + this.imgSp.addChild(this.headImg); + } + + private function selectHero(param1:Event) : void + { + var _loc3_:Object = null; + var _loc2_:int = int(this.heroCombox.selectedItem.data); + if(_loc2_ == this.currHero.heroId) + { + return; + } + for each(_loc3_ in this.heroList) + { + if(_loc3_.heroId == _loc2_) + { + this.currHero = _loc3_; + this.currHeroId = _loc3_.heroId; + this.initHeroInfo(); + break; + } + } + } + + private function enterAndLeaveRoom(param1:MouseEvent) : void + { + if(this.currHero == null) + { + return; + } + this.stopTime(); + if(this.isInHall) + { + ConnectService.getInstance().hexagramService.leaveHall(); + } + else + { + ConnectService.getInstance().hexagramService.joinHall(this.currHeroId); + } + } + + private function enterHallResult(param1:HexagramEvent) : void + { + this.hexagramObj = param1.obj; + this.initUserInfo(); + } + + private function leaveHallResult(param1:HexagramEvent) : void + { + closeUI(null); + } + + private function refreshHall(param1:MouseEvent) : void + { + this.getRoomByPage(); + } + + private function getRoomByPage() : void + { + this.stopTime(); + ConnectService.getInstance().hexagramService.refreshHallInfo(this.currPage); + } + + private function refreshHallResult(param1:HexagramEvent) : void + { + this.startRefresh(); + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + closeUI(null); + return; + } + if(this.currPage != param1.obj.pageInfo.curNum) + { + return; + } + this.hexagramObj = param1.obj; + this.initUserInfo(); + } + + private function searchRoom(param1:MouseEvent) : void + { + var _loc2_:int = this.roomSearch_txt.getTextNum(); + if(_loc2_ <= 0 || _loc2_ > 99) + { + MessageBoxUI.getInstance().addMessage("请输入正确的房间号"); + return; + } + this.stopTime(); + ConnectService.getInstance().hexagramService.findPageByRoomNum(_loc2_); + } + + private function searchHallResult(param1:HexagramEvent) : void + { + this.hexagramObj = param1.obj; + this.initUserInfo(); + } + + public function nextPage() : void + { + this.currPage += 1; + this.getRoomByPage(); + } + + public function prePage() : void + { + --this.currPage; + this.getRoomByPage(); + } + + private function clickPage(param1:MouseEvent) : void + { + } + + private function enterRoom(param1:MouseEvent) : void + { + var _loc2_:HebiRoom = param1.currentTarget.parent as HebiRoom; + var _loc3_:int = _loc2_.getRoomNum(); + this.stopTime(); + if(this.currHeroId == 0) + { + MessageBoxUI.getInstance().addMessage("请先选择武将进入大厅"); + return; + } + if(_loc2_.getLeftBtn() == param1.currentTarget) + { + if(_loc2_.getData() == null || _loc2_.getData().yangUser == null) + { + ConnectService.getInstance().hexagramService.joinRoom(this.currHeroId,_loc3_); + } + else + { + ConnectService.getInstance().hexagramService.fight4Hex(this.currHeroId,_loc3_); + } + } + if(_loc2_.getRightBtn() == param1.currentTarget) + { + if(_loc2_.getData() == null || _loc2_.getData().yamUser == null) + { + ConnectService.getInstance().hexagramService.joinRoom(this.currHeroId,_loc3_); + } + else + { + ConnectService.getInstance().hexagramService.fight4Hex(this.currHeroId,_loc3_); + } + } + if(_loc2_.getRobBtn() == param1.currentTarget) + { + ConnectService.getInstance().hexagramService.fight4Hex(this.currHeroId,_loc3_); + } + } + + private function joinHallResult(param1:HexagramEvent) : void + { + this.hexagramObj = param1.obj; + this.initUserInfo(); + } + + private function getHallMess(param1:BroadEvent) : void + { + if(param1.msg != "") + { + this.hallMess.print(param1.msg); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hebi/HebiRoom.as b/flash_decompiled/com/view/ui/hebi/HebiRoom.as new file mode 100644 index 0000000..982ee09 --- /dev/null +++ b/flash_decompiled/com/view/ui/hebi/HebiRoom.as @@ -0,0 +1,485 @@ +package com.view.ui.hebi +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.greensock.TweenMax; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.PlayUIRes; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HebiRoom extends Sprite + { + + public var playUIRes:PlayUIRes; + + private var roomNum:int; + + private var joinBtn1:UISmallBtn; + + private var joinBtn2:UISmallBtn; + + private var robBtn:UISmallBtn; + + private var roomStatus:int; + + private var hebi1:Sprite; + + private var hebi2:Sprite; + + private var kingLeft_txt:TextField; + + private var kingRight_txt:TextField; + + private var levelLeft_txt:TextField; + + private var levelRight_txt:TextField; + + private var hostLeft_txt:TextField; + + private var hostRight_txt:TextField; + + private var leftHeroLev_txt:TextField; + + private var rightHeroLev_txt:TextField; + + private var leftHero_txt:TextField; + + private var rightHero_txt:TextField; + + private var wait_txt:TextField; + + private var power_txt:TextField; + + private var bar_mc:Sprite; + + private var imageSp1:UIWindowBg; + + private var imageSp2:UIWindowBg; + + private var hebiMc:MovieClip; + + private var title1:UITitleBg; + + private var roomObj:Object; + + private var preYangUserId:int; + + private var preYamUserId:int; + + private var preGuildId:int; + + private var leftLoader:LoadResource; + + private var leftImg:Bitmap; + + private var leftUrl:String; + + private var rightLoader:LoadResource; + + private var rightImg:Bitmap; + + private var rightUrl:String; + + public function HebiRoom() + { + var _loc3_:TextField = null; + var _loc4_:TextField = null; + this.playUIRes = PlayUIRes.getInstance(); + super(); + var _loc1_:TextFormat = PublicMethod.getRightTextFormat(); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(200,130); + addChild(_loc2_); + this.title1 = new UITitleBg("房间",_loc2_.width); + _loc2_.addChild(this.title1); + this.title1.x = int(_loc2_.width / 2 - this.title1.width / 2); + this.imageSp1 = new UIWindowBg(); + this.imageSp1.initThirdPanel(30,38); + _loc2_.addChild(this.imageSp1); + this.imageSp1.x = 25; + this.imageSp1.y = 45; + this.imageSp2 = new UIWindowBg(); + this.imageSp2.initThirdPanel(30,38); + _loc2_.addChild(this.imageSp2); + this.imageSp2.x = 146; + this.imageSp2.y = this.imageSp1.y; + this.hebiMc = this.playUIRes.getMovieClip(ClassConfig.hebi_1); + _loc2_.addChild(this.hebiMc); + this.hebiMc.x = 75; + this.hebiMc.y = 38; + this.hebi1 = new Sprite(); + this.hebi2 = new Sprite(); + _loc2_.addChild(this.hebi1); + _loc2_.addChild(this.hebi2); + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,33); + this.hebi1.addChild(_loc3_); + _loc3_.x = 30; + _loc3_.y = 61; + _loc3_.text = "左壁"; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,33); + this.hebi1.addChild(_loc4_); + _loc4_.x = 153; + _loc4_.y = _loc3_.y; + _loc4_.text = "右壁"; + this.kingLeft_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,97); + this.hebi2.addChild(this.kingLeft_txt); + this.kingLeft_txt.x = 8; + this.kingLeft_txt.y = 26; + this.kingRight_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,97); + this.hebi2.addChild(this.kingRight_txt); + this.kingRight_txt.x = this.kingLeft_txt.x + this.kingLeft_txt.width; + this.kingRight_txt.y = this.kingLeft_txt.y; + this.kingRight_txt.defaultTextFormat = _loc1_; + this.levelLeft_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,42); + this.hebi2.addChild(this.levelLeft_txt); + this.levelLeft_txt.x = 63; + this.levelLeft_txt.y = this.kingLeft_txt.y + 20; + this.levelRight_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,42); + this.hebi2.addChild(this.levelRight_txt); + this.levelRight_txt.x = this.levelLeft_txt.x + this.levelLeft_txt.width; + this.levelRight_txt.y = this.levelLeft_txt.y; + this.levelRight_txt.defaultTextFormat = _loc1_; + this.bar_mc = this.playUIRes.getMovieClip(ClassConfig.hebi_2); + this.hebi2.addChild(this.bar_mc); + this.bar_mc.x = 75; + this.bar_mc.y = 104; + this.hostLeft_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,18); + this.hebi2.addChild(this.hostLeft_txt); + this.hostLeft_txt.x = 5; + this.hostLeft_txt.y = this.kingLeft_txt.y + 18; + this.hostLeft_txt.wordWrap = true; + this.hostLeft_txt.multiline = true; + this.hostLeft_txt.height = 36; + this.hostRight_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,18); + this.hebi2.addChild(this.hostRight_txt); + this.hostRight_txt.x = 186; + this.hostRight_txt.y = this.hostLeft_txt.y; + this.hostRight_txt.wordWrap = true; + this.hostRight_txt.multiline = true; + this.hostRight_txt.height = 36; + this.leftHeroLev_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,32); + this.hebi2.addChild(this.leftHeroLev_txt); + this.leftHeroLev_txt.x = 30; + this.leftHeroLev_txt.y = 74; + this.rightHeroLev_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,32); + this.hebi2.addChild(this.rightHeroLev_txt); + this.rightHeroLev_txt.x = 150; + this.rightHeroLev_txt.y = this.leftHeroLev_txt.y; + this.leftHero_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,85); + this.hebi2.addChild(this.leftHero_txt); + this.leftHero_txt.x = 20; + this.leftHero_txt.y = 94; + this.rightHero_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,85); + this.hebi2.addChild(this.rightHero_txt); + this.rightHero_txt.x = this.leftHero_txt.x + this.leftHero_txt.width; + this.rightHero_txt.y = this.leftHero_txt.y; + this.rightHero_txt.defaultTextFormat = _loc1_; + this.power_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,105); + this.hebi2.addChild(this.power_txt); + this.power_txt.x = 56; + this.power_txt.y = 116; + this.hebi1.visible = false; + this.joinBtn1 = new UISmallBtn("加 入",2); + this.joinBtn2 = new UISmallBtn("加 入",2); + addChild(this.joinBtn1); + addChild(this.joinBtn2); + this.joinBtn1.x = 5; + this.joinBtn1.y = 114; + this.joinBtn2.x = 160; + this.joinBtn2.y = this.joinBtn1.y; + this.robBtn = new UISmallBtn("抢夺"); + addChild(this.robBtn); + this.robBtn.x = 89; + this.robBtn.y = 62; + Utils.applyGray(this.hebiMc.leftb); + Utils.applyGray(this.hebiMc.rightb); + } + + public function getLeftBtn() : UISmallBtn + { + return this.joinBtn1; + } + + public function getRightBtn() : UISmallBtn + { + return this.joinBtn2; + } + + public function getRobBtn() : UISmallBtn + { + return this.robBtn; + } + + public function setEmpty() : void + { + this.hebi1.visible = true; + this.hebi2.visible = false; + } + + public function getData() : Object + { + return this.roomObj; + } + + public function setData(param1:Object) : void + { + this.roomObj = param1; + this.init(); + } + + private function init() : void + { + this.roomNum = int(this.roomObj.num); + var _loc1_:String = "房间" + this.roomNum; + Utils.applyGray(this.hebiMc.leftb); + Utils.applyGray(this.hebiMc.rightb); + this.joinBtn1.setText(this.roomObj.left); + this.joinBtn2.setText(this.roomObj.right); + if(this.roomObj.yamUser == null && this.roomObj.yangUser == null) + { + this.hebi1.visible = true; + this.hebi2.visible = false; + } + else + { + this.hebi2.visible = true; + this.hebi1.visible = false; + this.setBiVisble(); + } + if(this.roomObj.yamUser) + { + if(this.preYamUserId != this.roomObj.yamUser.id) + { + this.preYamUserId = this.roomObj.yamUser.id; + this.setRightUserInfo(); + } + } + else + { + this.preYamUserId = 0; + if(Boolean(this.rightImg) && this.imageSp2.contains(this.rightImg)) + { + this.imageSp2.removeChild(this.rightImg); + } + this.setRightUserInfo(); + } + if(this.roomObj.yangUser) + { + if(this.preYangUserId != this.roomObj.yangUser.id) + { + this.preYangUserId = this.roomObj.yangUser.id; + this.setLeftUserInfo(); + } + } + else + { + this.preYangUserId = 0; + if(Boolean(this.leftImg) && this.imageSp1.contains(this.leftImg)) + { + this.imageSp1.removeChild(this.leftImg); + } + this.setLeftUserInfo(); + } + if(this.roomObj.guild) + { + if(this.preGuildId != this.roomObj.guild.guildId) + { + this.preGuildId = this.roomObj.guild.guildId; + _loc1_ = _loc1_ + "(" + this.roomObj.guild.showGuildName + ")"; + this.title1.setTitleName(_loc1_); + } + } + else + { + this.preGuildId = 0; + this.title1.setTitleName(_loc1_); + } + this.roomStatus = this.roomObj.statusNum; + if(this.roomStatus == 2) + { + this.robBtn.visible = true; + this.joinBtn1.visible = false; + this.joinBtn2.visible = false; + this.initTime(); + } + else + { + this.robBtn.visible = false; + this.joinBtn1.visible = true; + this.joinBtn2.visible = true; + } + } + + private function setBiVisble() : void + { + if(this.roomObj.yangUser) + { + TweenMax.to(this.hebiMc.leftb,0.1,{"colorMatrixFilter":{"saturation":1}}); + } + else + { + TweenMax.to(this.hebiMc.leftb,0.1,{"colorMatrixFilter":{"saturation":0}}); + } + if(this.roomObj.yamUser) + { + TweenMax.to(this.hebiMc.rightb,0.1,{"colorMatrixFilter":{"saturation":1}}); + } + else + { + TweenMax.to(this.hebiMc.rightb,0.1,{"colorMatrixFilter":{"saturation":0}}); + } + } + + private function setLeftUserInfo() : void + { + if(this.roomObj.yangUser) + { + this.kingLeft_txt.text = this.roomObj.yangUser.name; + this.leftHeroLev_txt.text = this.roomObj.yangUser.heroInfo.level; + this.leftHero_txt.htmlText = this.roomObj.yangUser.heroInfo.showName; + this.levelLeft_txt.text = "Lv." + this.roomObj.yangUser.rankId; + if(this.roomObj.host == 1) + { + this.hostLeft_txt.htmlText = "房主"; + this.power_txt.text = "护臂单挑力:" + this.roomObj.yangUser.heroInfo.fightPower; + } + this.loadLeftHead(this.roomObj.yangUser.heroInfo.picPath); + } + else if(this.kingLeft_txt) + { + this.kingLeft_txt.text = ""; + this.leftHeroLev_txt.text = ""; + this.leftHero_txt.htmlText = ""; + this.levelLeft_txt.text = ""; + this.hostLeft_txt.text = ""; + if(this.roomObj.yangUser == null && this.roomObj.yamUser == null) + { + this.power_txt.text = ""; + } + } + } + + private function setRightUserInfo() : void + { + if(this.roomObj.yamUser) + { + this.kingRight_txt.text = this.roomObj.yamUser.name; + this.rightHeroLev_txt.text = this.roomObj.yamUser.heroInfo.level; + this.rightHero_txt.htmlText = this.roomObj.yamUser.heroInfo.showName; + this.levelRight_txt.text = "Lv." + this.roomObj.yamUser.rankId; + if(this.roomObj.host == 2) + { + this.hostRight_txt.htmlText = "房主"; + this.power_txt.text = "护臂单挑力:" + this.roomObj.yamUser.heroInfo.fightPower; + } + this.loadRightHead(this.roomObj.yamUser.heroInfo.picPath); + } + else if(this.kingRight_txt) + { + this.kingRight_txt.text = ""; + this.rightHeroLev_txt.text = ""; + this.rightHero_txt.htmlText = ""; + this.levelRight_txt.text = ""; + this.hostRight_txt.text = ""; + if(this.roomObj.yangUser == null && this.roomObj.yamUser == null) + { + this.power_txt.text = ""; + } + } + } + + private function initTime() : void + { + var _loc1_:int = int(this.roomObj.resTime); + var _loc2_:int = int(this.roomObj.hexSec); + if(_loc1_ > 0 && _loc2_ > 0) + { + this.bar_mc.width = int(56 * _loc1_ / _loc2_); + } + } + + private function loadLeftHead(param1:String) : void + { + if(Boolean(this.leftImg) && param1 == this.leftUrl) + { + if(!this.imageSp1.contains(this.leftImg)) + { + this.imageSp1.addChild(this.leftImg); + } + return; + } + this.leftUrl = param1; + this.leftLoader = new LoadResource("pic/head/" + this.leftUrl,this.loadLeftBack); + } + + private function loadLeftBack(param1:Event) : void + { + if(this.roomObj.yangUser == null) + { + this.leftLoader.clear(); + return; + } + if(Boolean(this.leftImg) && this.imageSp1.contains(this.leftImg)) + { + this.imageSp1.removeChild(this.leftImg); + } + this.leftImg = Bitmap(param1.target.loader.content); + this.leftImg.width = 33; + this.leftImg.height = 40; + this.leftImg.x = 2; + this.leftImg.y = 2; + this.leftLoader.clear(); + this.imageSp1.addChild(this.leftImg); + } + + private function loadRightHead(param1:String) : void + { + if(Boolean(this.rightImg) && param1 == this.rightUrl) + { + if(!this.imageSp2.contains(this.rightImg)) + { + this.imageSp2.addChild(this.rightImg); + } + return; + } + this.rightUrl = param1; + this.rightLoader = new LoadResource("pic/head/" + this.rightUrl,this.loadRightBack); + } + + private function loadRightBack(param1:Event) : void + { + if(this.roomObj.yamUser == null) + { + this.rightLoader.clear(); + return; + } + if(Boolean(this.rightImg) && this.imageSp2.contains(this.rightImg)) + { + this.imageSp2.removeChild(this.rightImg); + } + this.rightImg = Bitmap(param1.target.loader.content); + this.rightImg.width = 33; + this.rightImg.height = 40; + this.rightImg.x = 2; + this.rightImg.y = 2; + this.rightLoader.clear(); + this.imageSp2.addChild(this.rightImg); + } + + public function getRoomNum() : int + { + return this.roomNum; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hebi/HebiUI.as b/flash_decompiled/com/view/ui/hebi/HebiUI.as new file mode 100644 index 0000000..05c4649 --- /dev/null +++ b/flash_decompiled/com/view/ui/hebi/HebiUI.as @@ -0,0 +1,174 @@ +package com.view.ui.hebi +{ + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.play.event.HexagramEvent; + import com.view.newui.UIButton; + 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.MovieClip; + import flash.events.Event; + import flash.events.MouseEvent; + + public class HebiUI extends PlayUI + { + + private var textMc:MovieClip; + + private var enterBtn:UIButton; + + private var isEnter:Boolean; + + private var hebiEnterUI:HebiEnterUI; + + private var hexagramObj:Object; + + public function HebiUI() + { + super(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + super.createUI(); + super.loadTitle(UITitleConfig.title_tianminghebi); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(400,391); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initSecondPanel(207,391); + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x + _loc2_.width + 4; + _loc3_.y = _loc2_.y; + playMc = playUIRes.getMovieClip(ClassConfig.province_mc); + _loc2_.addChild(playMc); + playMc.gotoAndStop(1); + playMc.x = 2 - 292; + playMc.y = 2 + 148; + var _loc4_:UITitleBg = new UITitleBg("活动介绍",_loc3_.width); + _loc3_.addChild(_loc4_); + _loc4_.x = int(_loc3_.width / 2 - _loc4_.width / 2); + this.textMc = playUIRes.getMovieClip(ClassConfig.province_3); + _loc3_.addChild(this.textMc); + this.textMc.x = 10; + this.textMc.y = 40; + this.textMc.explain.htmlText = "1、从联盟福利获得左壁或右壁后,可与玉璧类型相配的盟友合璧。
2、“天命右壁”,可追回被抢的奖励,“合璧分身”道具可支持与自己属性相同的分身进行合璧."; + this.enterBtn = new UIButton("进 入",2); + _loc3_.addChild(this.enterBtn); + this.enterBtn.x = 78; + this.enterBtn.y = 365; + this.enterBtn.onClick = this.enterHexagram; + this.enterBtn.setUnEnable(); + this.getEnterHall(); + } + + private function getEnterHall() : void + { + ConnectService.getInstance().hexagramService.enterHall(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(HexagramEvent.ENTER_HEXAGRAM,this.enterHallResult); + if(playMc) + { + this.getEnterHall(); + this.enterBtn.setUnEnable(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(HexagramEvent.ENTER_HEXAGRAM,this.enterHallResult); + this.isEnter = false; + playMc.gotoAndStop(1); + this.enterBtn.setEnable(); + this.hexagramObj = null; + } + + private function enterHallResult(param1:HexagramEvent) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + closeUI(null); + return; + } + this.hexagramObj = param1.obj; + if(param1.obj.userInfo.heroId > 0) + { + this.openHexagram(); + } + else + { + _loc2_ = int(this.hexagramObj.userInfo.roomRum); + _loc3_ = int(this.hexagramObj.userInfo.roomMax); + this.textMc.currNumText.text = _loc2_ + "/" + _loc3_; + _loc4_ = int(this.hexagramObj.userInfo.constituteNum); + _loc5_ = int(this.hexagramObj.userInfo.laveNum); + this.textMc.currText.text = _loc5_ + "/" + _loc4_; + this.textMc.hebiNum.text = _loc5_ + "/" + _loc4_; + this.enterBtn.setEnable(); + } + } + + private function enterHexagram(param1:MouseEvent) : void + { + if(this.hexagramObj == null) + { + return; + } + if(this.isEnter) + { + return; + } + this.enterBtn.setUnEnable(); + playMc.gotoAndPlay(1); + this.isEnter = true; + addEventListener(Event.ENTER_FRAME,this.enterFrame); + } + + private function enterFrame(param1:Event) : void + { + if(playMc.currentFrame >= 35) + { + removeEventListener(Event.ENTER_FRAME,this.enterFrame); + playMc.gotoAndStop(1); + this.openHexagram(); + } + } + + private function openHexagram() : void + { + if(this.hebiEnterUI == null) + { + this.hebiEnterUI = new HebiEnterUI(); + } + this.hebiEnterUI.setData(this.hexagramObj); + this.hebiEnterUI.show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage1.as b/flash_decompiled/com/view/ui/help/HelpPage1.as new file mode 100644 index 0000000..bb85e36 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage1.as @@ -0,0 +1,1252 @@ +package com.view.ui.help +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.help.event.HelpEvent; + import com.data.GameData; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.ui.help.data.HelpData; + import com.view.ui.help.data.StagePower; + import com.view.ui.help.mc.PowerMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage1 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var showStage1:int; + + private var showStage2:int; + + private var showStage3:int; + + private var showStage4:int; + + private var showStage5:int; + + private var showStage6:int; + + private var showStage7:int; + + private var showStage8:int; + + private var showStage9:int; + + private var showStage10:int; + + private var showStage11:int; + + private var showStage12:int; + + private var showStage13:int; + + private var showStage14:int; + + private var showStage15:int; + + private var tableMc1:UITable; + + private var tableMc2:UITable; + + private var tableMc3:UITable; + + private var tableMc4:UITable; + + private var tableMc5:UITable; + + private var tableMc6:UITable; + + private var tableMc7:UITable; + + private var tableMc8:UITable; + + private var tableMc9:UITable; + + private var tableMc10:UITable; + + private var tableMc11:UITable; + + private var tableMc12:UITable; + + private var tableMc13:UITable; + + private var tableMc14:UITable; + + private var tableMc15:UITable; + + private var tableMc16:UITable; + + private var tableMc17:UITable; + + private var tableMc18:UITable; + + private var tableMc19:UITable; + + private var tableMc20:UITable; + + private var tableMc21:UITable; + + private var tableMc22:UITable; + + private var tableMc23:UITable; + + private var tableMc24:UITable; + + private var tableMc25:UITable; + + public function HelpPage1() + { + var _loc5_:UITitleBg = null; + var _loc7_:UITitleBg = null; + var _loc8_:UITitleBg = null; + var _loc15_:UITitleBg = null; + super(); + this.showStage1 = int(GameData.getConfigMap().BABEL_OPEN_STAGE1); + this.showStage2 = int(GameData.getConfigMap().BABEL_OPEN_STAGE2); + this.showStage3 = int(GameData.getConfigMap().BABEL_OPEN_STAGE3); + this.showStage4 = int(GameData.getConfigMap().BABEL_OPEN_STAGE4); + this.showStage5 = int(GameData.getConfigMap().BABEL_OPEN_STAGE5); + this.showStage6 = int(GameData.getConfigMap().BABEL_OPEN_STAGE6); + this.showStage7 = int(GameData.getConfigMap().BABEL_OPEN_STAGE7); + this.showStage8 = int(GameData.getConfigMap().BABEL_OPEN_STAGE8); + this.showStage9 = int(GameData.getConfigMap().BABEL_OPEN_STAGE9); + this.showStage10 = int(GameData.getConfigMap().BABEL_OPEN_STAGE10); + this.showStage11 = int(GameData.getConfigMap().BABEL_OPEN_STAGE11); + this.showStage12 = int(GameData.getConfigMap().BABEL_OPEN_STAGE12); + this.showStage13 = int(GameData.getConfigMap().BABEL_OPEN_STAGE13); + this.showStage14 = int(GameData.getConfigMap().BABEL_OPEN_STAGE14); + this.showStage15 = int(GameData.getConfigMap().BABEL_OPEN_STAGE15); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(638,380); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + addChild(this.packScrollPane); + this.packScrollPane.y = 2; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + var _loc1_:UITitleBg = new UITitleBg(CommonData.babelNameArr[0] + "战力",300); + this.packMc.addChild(_loc1_); + _loc1_.x = int(640 / 2 - _loc1_.width / 2); + var _loc2_:Array = ["楼层","战力","楼层","战力","楼层","战力","楼层","战力"]; + var _loc3_:Array = [60,95,60,95,60,95,60,95]; + this.tableMc1 = new UITable(); + this.tableMc1.drawLine = true; + this.tableMc1.lineHeight = 24; + this.tableMc1.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc1); + this.tableMc1.x = 4; + this.tableMc1.y = 24; + var _loc4_:UITitleBg = new UITitleBg(CommonData.babelNameArr[1] + "战力",300); + this.packMc.addChild(_loc4_); + _loc4_.x = int(640 / 2 - _loc4_.width / 2); + _loc4_.y = this.tableMc1.y + this.tableMc1.height + 2; + this.tableMc2 = new UITable(); + this.tableMc2.drawLine = true; + this.tableMc2.lineHeight = 24; + this.tableMc2.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc2); + this.tableMc2.x = 4; + this.tableMc2.y = _loc4_.y + 24; + _loc5_ = new UITitleBg(CommonData.babelNameArr[2] + "战力",300); + this.packMc.addChild(_loc5_); + _loc5_.x = int(640 / 2 - _loc5_.width / 2); + _loc5_.y = this.tableMc2.y + this.tableMc2.height + 2; + this.tableMc3 = new UITable(); + this.tableMc3.drawLine = true; + this.tableMc3.lineHeight = 24; + this.tableMc3.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc3); + this.tableMc3.x = 4; + this.tableMc3.y = _loc5_.y + 24; + var _loc6_:UITitleBg = new UITitleBg(CommonData.babelNameArr[3] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = this.tableMc3.y + this.tableMc3.height + 2; + this.tableMc4 = new UITable(); + this.tableMc4.drawLine = true; + this.tableMc4.lineHeight = 24; + this.tableMc4.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc4); + this.tableMc4.x = 4; + this.tableMc4.y = _loc6_.y + 24; + _loc7_ = new UITitleBg(CommonData.babelNameArr[4] + "战力",300); + this.packMc.addChild(_loc7_); + _loc7_.x = int(640 / 2 - _loc7_.width / 2); + _loc7_.y = this.tableMc4.y + this.tableMc4.height + 2; + this.tableMc5 = new UITable(); + this.tableMc5.drawLine = true; + this.tableMc5.lineHeight = 24; + this.tableMc5.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc5); + this.tableMc5.x = 4; + this.tableMc5.y = _loc7_.y + 24; + _loc8_ = new UITitleBg(CommonData.babelNameArr[5] + "战力",300); + this.packMc.addChild(_loc8_); + _loc8_.x = int(640 / 2 - _loc8_.width / 2); + _loc8_.y = this.tableMc5.y + this.tableMc5.height + 2; + this.tableMc6 = new UITable(); + this.tableMc6.drawLine = true; + this.tableMc6.lineHeight = 24; + this.tableMc6.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc6); + this.tableMc6.x = 4; + this.tableMc6.y = _loc8_.y + 24; + var _loc9_:UITitleBg = new UITitleBg(CommonData.babelNameArr[6] + "战力",300); + this.packMc.addChild(_loc9_); + _loc9_.x = int(640 / 2 - _loc9_.width / 2); + _loc9_.y = this.tableMc6.y + this.tableMc6.height + 2; + this.tableMc7 = new UITable(); + this.tableMc7.drawLine = true; + this.tableMc7.lineHeight = 24; + this.tableMc7.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc7); + this.tableMc7.x = 4; + this.tableMc7.y = _loc9_.y + 24; + var _loc10_:UITitleBg = new UITitleBg(CommonData.babelNameArr[7] + "战力",300); + this.packMc.addChild(_loc10_); + _loc10_.x = int(640 / 2 - _loc10_.width / 2); + _loc10_.y = this.tableMc7.y + this.tableMc7.height + 2; + this.tableMc8 = new UITable(); + this.tableMc8.drawLine = true; + this.tableMc8.lineHeight = 24; + this.tableMc8.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc8); + this.tableMc8.x = 4; + this.tableMc8.y = _loc10_.y + 24; + var _loc11_:UITitleBg = new UITitleBg(CommonData.babelNameArr[8] + "战力",300); + this.packMc.addChild(_loc11_); + _loc11_.x = int(640 / 2 - _loc11_.width / 2); + _loc11_.y = this.tableMc8.y + this.tableMc8.height + 2; + this.tableMc9 = new UITable(); + this.tableMc9.drawLine = true; + this.tableMc9.lineHeight = 24; + this.tableMc9.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc9); + this.tableMc9.x = 4; + this.tableMc9.y = _loc11_.y + 24; + var _loc12_:UITitleBg = new UITitleBg(CommonData.babelNameArr[9] + "战力",300); + this.packMc.addChild(_loc12_); + _loc12_.x = int(640 / 2 - _loc12_.width / 2); + _loc12_.y = this.tableMc9.y + this.tableMc9.height + 2; + this.tableMc10 = new UITable(); + this.tableMc10.drawLine = true; + this.tableMc10.lineHeight = 24; + this.tableMc10.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc10); + this.tableMc10.x = 4; + this.tableMc10.y = _loc12_.y + 24; + var _loc13_:int = this.tableMc10.y + this.tableMc10.height; + if(this.showStage1 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[10] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = this.tableMc10.y + this.tableMc10.height + 2; + this.tableMc11 = new UITable(); + this.tableMc11.drawLine = true; + this.tableMc11.lineHeight = 24; + this.tableMc11.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc11); + this.tableMc11.x = 4; + this.tableMc11.y = _loc15_.y + 24; + _loc13_ = this.tableMc11.y + this.tableMc11.height; + } + if(this.showStage2 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[11] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc12 = new UITable(); + this.tableMc12.drawLine = true; + this.tableMc12.lineHeight = 24; + this.tableMc12.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc12); + this.tableMc12.x = 4; + this.tableMc12.y = _loc15_.y + 24; + _loc13_ = this.tableMc12.y + this.tableMc12.height; + } + if(this.showStage3 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[12] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc13 = new UITable(); + this.tableMc13.drawLine = true; + this.tableMc13.lineHeight = 24; + this.tableMc13.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc13); + this.tableMc13.x = 4; + this.tableMc13.y = _loc15_.y + 24; + _loc13_ = this.tableMc13.y + this.tableMc13.height; + } + if(this.showStage4 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[13] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc14 = new UITable(); + this.tableMc14.drawLine = true; + this.tableMc14.lineHeight = 24; + this.tableMc14.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc14); + this.tableMc14.x = 4; + this.tableMc14.y = _loc15_.y + 24; + _loc13_ = this.tableMc14.y + this.tableMc14.height; + } + if(this.showStage5 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[14] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc15 = new UITable(); + this.tableMc15.drawLine = true; + this.tableMc15.lineHeight = 24; + this.tableMc15.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc15); + this.tableMc15.x = 4; + this.tableMc15.y = _loc15_.y + 24; + _loc13_ = this.tableMc15.y + this.tableMc15.height; + } + if(this.showStage6 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[15] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc16 = new UITable(); + this.tableMc16.drawLine = true; + this.tableMc16.lineHeight = 24; + this.tableMc16.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc16); + this.tableMc16.x = 4; + this.tableMc16.y = _loc15_.y + 24; + _loc13_ = this.tableMc16.y + this.tableMc16.height; + } + if(this.showStage7 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[16] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc17 = new UITable(); + this.tableMc17.drawLine = true; + this.tableMc17.lineHeight = 24; + this.tableMc17.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc17); + this.tableMc17.x = 4; + this.tableMc17.y = _loc15_.y + 24; + _loc13_ = this.tableMc17.y + this.tableMc17.height; + } + if(this.showStage8 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[17] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc18 = new UITable(); + this.tableMc18.drawLine = true; + this.tableMc18.lineHeight = 24; + this.tableMc18.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc18); + this.tableMc18.x = 4; + this.tableMc18.y = _loc15_.y + 24; + _loc13_ = this.tableMc18.y + this.tableMc18.height; + } + if(this.showStage9 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[18] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc19 = new UITable(); + this.tableMc19.drawLine = true; + this.tableMc19.lineHeight = 24; + this.tableMc19.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc19); + this.tableMc19.x = 4; + this.tableMc19.y = _loc15_.y + 24; + _loc13_ = this.tableMc19.y + this.tableMc19.height; + } + if(this.showStage10 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[19] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc20 = new UITable(); + this.tableMc20.drawLine = true; + this.tableMc20.lineHeight = 24; + this.tableMc20.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc20); + this.tableMc20.x = 4; + this.tableMc20.y = _loc15_.y + 24; + _loc13_ = this.tableMc20.y + this.tableMc20.height; + } + if(this.showStage11 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[20] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc21 = new UITable(); + this.tableMc21.drawLine = true; + this.tableMc21.lineHeight = 24; + this.tableMc21.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc21); + this.tableMc21.x = 4; + this.tableMc21.y = _loc15_.y + 24; + _loc13_ = this.tableMc21.y + this.tableMc21.height; + } + if(this.showStage12 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[21] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc22 = new UITable(); + this.tableMc22.drawLine = true; + this.tableMc22.lineHeight = 24; + this.tableMc22.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc22); + this.tableMc22.x = 4; + this.tableMc22.y = _loc15_.y + 24; + _loc13_ = this.tableMc22.y + this.tableMc22.height; + } + if(this.showStage13 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[22] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc23 = new UITable(); + this.tableMc23.drawLine = true; + this.tableMc23.lineHeight = 24; + this.tableMc23.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc23); + this.tableMc23.x = 4; + this.tableMc23.y = _loc15_.y + 24; + _loc13_ = this.tableMc23.y + this.tableMc23.height; + } + if(this.showStage14 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[23] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc24 = new UITable(); + this.tableMc24.drawLine = true; + this.tableMc24.lineHeight = 24; + this.tableMc24.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc24); + this.tableMc24.x = 4; + this.tableMc24.y = _loc15_.y + 24; + _loc13_ = this.tableMc24.y + this.tableMc24.height; + } + if(this.showStage15 == 1) + { + _loc15_ = new UITitleBg(CommonData.babelNameArr[24] + "战力",300); + this.packMc.addChild(_loc15_); + _loc15_.x = int(640 / 2 - _loc15_.width / 2); + _loc15_.y = _loc13_ + 2; + this.tableMc25 = new UITable(); + this.tableMc25.drawLine = true; + this.tableMc25.lineHeight = 24; + this.tableMc25.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc25); + this.tableMc25.x = 4; + this.tableMc25.y = _loc15_.y + 24; + _loc13_ = this.tableMc25.y + this.tableMc25.height; + } + var _loc14_:Sprite = PublicMethod.createShape(16777215,10,2); + this.packMc.addChild(_loc14_); + _loc14_.x = 4; + _loc14_.y = _loc13_; + _loc14_.alpha = 0; + this.packScrollPane.update(); + ConnectService.getInstance().helpService.getBabelPower(1); + ConnectService.getInstance().addEventListener(HelpEvent.BABEL_POWER,this.getData); + } + + private function getData(param1:HelpEvent) : void + { + this.setData(); + } + + private function setData() : void + { + var _loc2_:int = 0; + var _loc12_:PowerMc = null; + var _loc13_:Vector. = null; + var _loc1_:Vector. = HelpData.getBabelPowerList(1); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc12_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc1.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + var _loc3_:Vector. = HelpData.getBabelPowerList(2); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc3_[4 * _loc2_]) + { + _loc12_.setData1(_loc3_[4 * _loc2_]); + } + if(_loc3_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc3_[4 * _loc2_ + 1]); + } + if(_loc3_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc3_[4 * _loc2_ + 2]); + } + if(_loc3_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc3_[4 * _loc2_ + 3]); + } + this.tableMc2.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + var _loc4_:Vector. = HelpData.getBabelPowerList(3); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc4_[4 * _loc2_]) + { + _loc12_.setData1(_loc4_[4 * _loc2_]); + } + if(_loc4_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc4_[4 * _loc2_ + 1]); + } + if(_loc4_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc4_[4 * _loc2_ + 2]); + } + if(_loc4_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc4_[4 * _loc2_ + 3]); + } + this.tableMc3.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + var _loc5_:Vector. = HelpData.getBabelPowerList(4); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc5_[4 * _loc2_]) + { + _loc12_.setData1(_loc5_[4 * _loc2_]); + } + if(_loc5_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc5_[4 * _loc2_ + 1]); + } + if(_loc5_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc5_[4 * _loc2_ + 2]); + } + if(_loc5_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc5_[4 * _loc2_ + 3]); + } + this.tableMc4.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + var _loc6_:Vector. = HelpData.getBabelPowerList(5); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc6_[4 * _loc2_]) + { + _loc12_.setData1(_loc6_[4 * _loc2_]); + } + if(_loc6_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc6_[4 * _loc2_ + 1]); + } + if(_loc6_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc6_[4 * _loc2_ + 2]); + } + if(_loc6_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc6_[4 * _loc2_ + 3]); + } + this.tableMc5.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + var _loc7_:Vector. = HelpData.getBabelPowerList(6); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc7_[4 * _loc2_]) + { + _loc12_.setData1(_loc7_[4 * _loc2_]); + } + if(_loc7_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc7_[4 * _loc2_ + 1]); + } + if(_loc7_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc7_[4 * _loc2_ + 2]); + } + if(_loc7_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc7_[4 * _loc2_ + 3]); + } + this.tableMc6.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + var _loc8_:Vector. = HelpData.getBabelPowerList(7); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc8_[4 * _loc2_]) + { + _loc12_.setData1(_loc8_[4 * _loc2_]); + } + if(_loc8_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc8_[4 * _loc2_ + 1]); + } + if(_loc8_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc8_[4 * _loc2_ + 2]); + } + if(_loc8_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc8_[4 * _loc2_ + 3]); + } + this.tableMc7.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + var _loc9_:Vector. = HelpData.getBabelPowerList(8); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc9_[4 * _loc2_]) + { + _loc12_.setData1(_loc9_[4 * _loc2_]); + } + if(_loc9_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc9_[4 * _loc2_ + 1]); + } + if(_loc9_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc9_[4 * _loc2_ + 2]); + } + if(_loc9_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc9_[4 * _loc2_ + 3]); + } + this.tableMc8.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + var _loc10_:Vector. = HelpData.getBabelPowerList(9); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc10_[4 * _loc2_]) + { + _loc12_.setData1(_loc10_[4 * _loc2_]); + } + if(_loc10_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc10_[4 * _loc2_ + 1]); + } + if(_loc10_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc10_[4 * _loc2_ + 2]); + } + if(_loc10_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc10_[4 * _loc2_ + 3]); + } + this.tableMc9.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + var _loc11_:Vector. = HelpData.getBabelPowerList(10); + if(_loc11_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc11_[4 * _loc2_]) + { + _loc12_.setData1(_loc11_[4 * _loc2_]); + } + if(_loc11_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc11_[4 * _loc2_ + 1]); + } + if(_loc11_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc11_[4 * _loc2_ + 2]); + } + if(_loc11_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc11_[4 * _loc2_ + 3]); + } + this.tableMc10.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + if(this.showStage1 == 1) + { + _loc13_ = HelpData.getBabelPowerList(11); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc11.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage2 == 1) + { + _loc13_ = HelpData.getBabelPowerList(12); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc12.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage3 == 1) + { + _loc13_ = HelpData.getBabelPowerList(13); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc13.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage4 == 1) + { + _loc13_ = HelpData.getBabelPowerList(14); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc14.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage5 == 1) + { + _loc13_ = HelpData.getBabelPowerList(15); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc15.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage6 == 1) + { + _loc13_ = HelpData.getBabelPowerList(16); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc16.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage7 == 1) + { + _loc13_ = HelpData.getBabelPowerList(17); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc17.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage8 == 1) + { + _loc13_ = HelpData.getBabelPowerList(18); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc18.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage9 == 1) + { + _loc13_ = HelpData.getBabelPowerList(19); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc19.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage10 == 1) + { + _loc13_ = HelpData.getBabelPowerList(20); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc20.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage11 == 1) + { + _loc13_ = HelpData.getBabelPowerList(21); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc21.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage12 == 1) + { + _loc13_ = HelpData.getBabelPowerList(22); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc22.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage13 == 1) + { + _loc13_ = HelpData.getBabelPowerList(23); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc23.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage14 == 1) + { + _loc13_ = HelpData.getBabelPowerList(24); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc24.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage15 == 1) + { + _loc13_ = HelpData.getBabelPowerList(25); + if(_loc13_.length == 0) + { + return; + } + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc12_ = new PowerMc(); + if(_loc13_[4 * _loc2_]) + { + _loc12_.setData1(_loc13_[4 * _loc2_]); + } + if(_loc13_[4 * _loc2_ + 1]) + { + _loc12_.setData2(_loc13_[4 * _loc2_ + 1]); + } + if(_loc13_[4 * _loc2_ + 2]) + { + _loc12_.setData3(_loc13_[4 * _loc2_ + 2]); + } + if(_loc13_[4 * _loc2_ + 3]) + { + _loc12_.setData4(_loc13_[4 * _loc2_ + 3]); + } + this.tableMc25.addChild(_loc12_); + _loc12_.x = 0; + _loc12_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage10.as b/flash_decompiled/com/view/ui/help/HelpPage10.as new file mode 100644 index 0000000..3ba8964 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage10.as @@ -0,0 +1,644 @@ +package com.view.ui.help +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.help.event.HelpEvent; + import com.data.GameData; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.ui.help.data.HelpData; + import com.view.ui.help.data.StagePower; + import com.view.ui.help.mc.PowerMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage10 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var showStage1:int; + + private var showStage2:int; + + private var showStage3:int; + + private var showStage4:int; + + private var showStage5:int; + + private var showStage6:int; + + private var showStage7:int; + + private var showStage8:int; + + private var showStage9:int; + + private var showStage10:int; + + private var showStage11:int; + + private var showStage12:int; + + private var tableMc11:UITable; + + private var tableMc12:UITable; + + private var tableMc13:UITable; + + private var tableMc14:UITable; + + private var tableMc15:UITable; + + private var tableMc16:UITable; + + private var tableMc17:UITable; + + private var tableMc18:UITable; + + private var tableMc19:UITable; + + private var tableMc20:UITable; + + private var tableMc21:UITable; + + private var tableMc1:UITable; + + public function HelpPage10() + { + var _loc2_:Array = null; + var _loc3_:Array = null; + var _loc6_:UITitleBg = null; + super(); + this.showStage1 = int(GameData.getConfigMap().BABEL_OPEN_STAGE71); + this.showStage2 = int(GameData.getConfigMap().BABEL_OPEN_STAGE72); + this.showStage3 = int(GameData.getConfigMap().BABEL_OPEN_STAGE73); + this.showStage4 = int(GameData.getConfigMap().BABEL_OPEN_STAGE74); + this.showStage5 = int(GameData.getConfigMap().BABEL_OPEN_STAGE75); + this.showStage6 = int(GameData.getConfigMap().BABEL_OPEN_STAGE76); + this.showStage7 = int(GameData.getConfigMap().BABEL_OPEN_STAGE77); + this.showStage8 = int(GameData.getConfigMap().BABEL_OPEN_STAGE78); + this.showStage9 = int(GameData.getConfigMap().BABEL_OPEN_STAGE79); + this.showStage10 = int(GameData.getConfigMap().BABEL_OPEN_STAGE80); + this.showStage11 = int(GameData.getConfigMap().BABEL_OPEN_STAGE81); + this.showStage12 = int(GameData.getConfigMap().BABEL_OPEN_STAGE82); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(638,380); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + addChild(this.packScrollPane); + this.packScrollPane.y = 2; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + var _loc1_:UITitleBg = new UITitleBg(CommonData.babelMoreNameArr3[0] + "战力",300); + this.packMc.addChild(_loc1_); + _loc1_.x = int(640 / 2 - _loc1_.width / 2); + _loc2_ = ["楼层","战力","楼层","战力","楼层","战力","楼层","战力"]; + _loc3_ = [60,95,60,95,60,95,60,95]; + this.tableMc1 = new UITable(); + this.tableMc1.drawLine = true; + this.tableMc1.lineHeight = 24; + this.tableMc1.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc1); + this.tableMc1.x = 4; + this.tableMc1.y = 24; + var _loc4_:int = this.tableMc1.y + this.tableMc1.height; + if(this.showStage2 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[1] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc11 = new UITable(); + this.tableMc11.drawLine = true; + this.tableMc11.lineHeight = 24; + this.tableMc11.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc11); + this.tableMc11.x = 4; + this.tableMc11.y = _loc6_.y + 24; + _loc4_ = this.tableMc11.y + this.tableMc11.height; + } + if(this.showStage3 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[2] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc12 = new UITable(); + this.tableMc12.drawLine = true; + this.tableMc12.lineHeight = 24; + this.tableMc12.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc12); + this.tableMc12.x = 4; + this.tableMc12.y = _loc6_.y + 24; + _loc4_ = this.tableMc12.y + this.tableMc12.height; + } + if(this.showStage4 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[3] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc13 = new UITable(); + this.tableMc13.drawLine = true; + this.tableMc13.lineHeight = 24; + this.tableMc13.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc13); + this.tableMc13.x = 4; + this.tableMc13.y = _loc6_.y + 24; + _loc4_ = this.tableMc13.y + this.tableMc13.height; + } + if(this.showStage5 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[4] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc14 = new UITable(); + this.tableMc14.drawLine = true; + this.tableMc14.lineHeight = 24; + this.tableMc14.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc14); + this.tableMc14.x = 4; + this.tableMc14.y = _loc6_.y + 24; + _loc4_ = this.tableMc14.y + this.tableMc14.height; + } + if(this.showStage6 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[5] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc15 = new UITable(); + this.tableMc15.drawLine = true; + this.tableMc15.lineHeight = 24; + this.tableMc15.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc15); + this.tableMc15.x = 4; + this.tableMc15.y = _loc6_.y + 24; + _loc4_ = this.tableMc15.y + this.tableMc15.height; + } + if(this.showStage7 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[6] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc16 = new UITable(); + this.tableMc16.drawLine = true; + this.tableMc16.lineHeight = 24; + this.tableMc16.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc16); + this.tableMc16.x = 4; + this.tableMc16.y = _loc6_.y + 24; + _loc4_ = this.tableMc16.y + this.tableMc16.height; + } + if(this.showStage8 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[7] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc17 = new UITable(); + this.tableMc17.drawLine = true; + this.tableMc17.lineHeight = 24; + this.tableMc17.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc17); + this.tableMc17.x = 4; + this.tableMc17.y = _loc6_.y + 24; + _loc4_ = this.tableMc17.y + this.tableMc17.height; + } + if(this.showStage9 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[8] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc18 = new UITable(); + this.tableMc18.drawLine = true; + this.tableMc18.lineHeight = 24; + this.tableMc18.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc18); + this.tableMc18.x = 4; + this.tableMc18.y = _loc6_.y + 24; + _loc4_ = this.tableMc18.y + this.tableMc18.height; + } + if(this.showStage10 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[9] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc19 = new UITable(); + this.tableMc19.drawLine = true; + this.tableMc19.lineHeight = 24; + this.tableMc19.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc19); + this.tableMc19.x = 4; + this.tableMc19.y = _loc6_.y + 24; + _loc4_ = this.tableMc19.y + this.tableMc19.height; + } + if(this.showStage11 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[10] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc20 = new UITable(); + this.tableMc20.drawLine = true; + this.tableMc20.lineHeight = 24; + this.tableMc20.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc20); + this.tableMc20.x = 4; + this.tableMc20.y = _loc6_.y + 24; + _loc4_ = this.tableMc20.y + this.tableMc20.height; + } + if(this.showStage12 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr3[11] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc21 = new UITable(); + this.tableMc21.drawLine = true; + this.tableMc21.lineHeight = 24; + this.tableMc21.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc21); + this.tableMc21.x = 4; + this.tableMc21.y = _loc6_.y + 24; + _loc4_ = this.tableMc21.y + this.tableMc21.height; + } + var _loc5_:Sprite = PublicMethod.createShape(16777215,10,2); + this.packMc.addChild(_loc5_); + _loc5_.x = 4; + _loc5_.y = _loc4_; + _loc5_.alpha = 0; + this.packScrollPane.update(); + this.setData(); + } + + private function getData(param1:HelpEvent) : void + { + this.setData(); + } + + private function setData() : void + { + var _loc1_:Vector. = null; + var _loc2_:int = 0; + var _loc3_:PowerMc = null; + if(this.showStage1 == 1) + { + _loc1_ = HelpData.getBabelPowerList(58); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc1.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage2 == 1) + { + _loc1_ = HelpData.getBabelPowerList(59); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],5700); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],5700); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],5700); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],5700); + } + this.tableMc11.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage3 == 1) + { + _loc1_ = HelpData.getBabelPowerList(60); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],5700); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],5700); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],5700); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],5700); + } + this.tableMc12.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage4 == 1) + { + _loc1_ = HelpData.getBabelPowerList(61); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc13.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage5 == 1) + { + _loc1_ = HelpData.getBabelPowerList(62); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],6000); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],6000); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],6000); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],6000); + } + this.tableMc14.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage6 == 1) + { + _loc1_ = HelpData.getBabelPowerList(63); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],6000); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],6000); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],6000); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],6000); + } + this.tableMc15.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage7 == 1) + { + _loc1_ = HelpData.getBabelPowerList(64); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc16.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage8 == 1) + { + _loc1_ = HelpData.getBabelPowerList(65); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],6300); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],6300); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],6300); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],6300); + } + this.tableMc17.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage9 == 1) + { + _loc1_ = HelpData.getBabelPowerList(66); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],6300); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],6300); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],6300); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],6300); + } + this.tableMc18.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage10 == 1) + { + _loc1_ = HelpData.getBabelPowerList(67); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc19.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage11 == 1) + { + _loc1_ = HelpData.getBabelPowerList(68); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],6600); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],6600); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],6600); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],6600); + } + this.tableMc20.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage12 == 1) + { + _loc1_ = HelpData.getBabelPowerList(69); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],6600); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],6600); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],6600); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],6600); + } + this.tableMc21.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage2.as b/flash_decompiled/com/view/ui/help/HelpPage2.as new file mode 100644 index 0000000..3e79856 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage2.as @@ -0,0 +1,363 @@ +package com.view.ui.help +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.help.event.HelpEvent; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.ui.help.data.HelpData; + import com.view.ui.help.data.StagePower; + import com.view.ui.help.mc.PowerMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage2 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var tableMc1:UITable; + + private var tableMc2:UITable; + + private var tableMc3:UITable; + + private var tableMc4:UITable; + + private var tableMc5:UITable; + + private var tableMc6:UITable; + + private var tableMc7:UITable; + + private var tableMc8:UITable; + + public function HelpPage2() + { + var _loc4_:UITitleBg = null; + var _loc9_:UITitleBg = null; + var _loc10_:UITitleBg = null; + super(); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(638,380); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + addChild(this.packScrollPane); + this.packScrollPane.y = 2; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + var _loc1_:UITitleBg = new UITitleBg("斜月山道战力",300); + this.packMc.addChild(_loc1_); + _loc1_.x = int(640 / 2 - _loc1_.width / 2); + var _loc2_:Array = ["楼层","战力","楼层","战力","楼层","战力","楼层","战力"]; + var _loc3_:Array = [60,95,60,95,60,95,60,95]; + this.tableMc1 = new UITable(); + this.tableMc1.drawLine = true; + this.tableMc1.lineHeight = 24; + this.tableMc1.install(8,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc1); + this.tableMc1.x = 4; + this.tableMc1.y = 24; + _loc4_ = new UITitleBg("流霸山道战力",300); + this.packMc.addChild(_loc4_); + _loc4_.x = int(640 / 2 - _loc4_.width / 2); + _loc4_.y = this.tableMc1.y + this.tableMc1.height + 2; + this.tableMc2 = new UITable(); + this.tableMc2.drawLine = true; + this.tableMc2.lineHeight = 24; + this.tableMc2.install(8,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc2); + this.tableMc2.x = 4; + this.tableMc2.y = _loc4_.y + 24; + var _loc5_:UITitleBg = new UITitleBg("青云山道战力",300); + this.packMc.addChild(_loc5_); + _loc5_.x = int(640 / 2 - _loc5_.width / 2); + _loc5_.y = this.tableMc2.y + this.tableMc2.height + 2; + this.tableMc3 = new UITable(); + this.tableMc3.drawLine = true; + this.tableMc3.lineHeight = 24; + this.tableMc3.install(8,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc3); + this.tableMc3.x = 4; + this.tableMc3.y = _loc5_.y + 24; + var _loc6_:UITitleBg = new UITitleBg("碎星峡战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = this.tableMc3.y + this.tableMc3.height + 2; + this.tableMc4 = new UITable(); + this.tableMc4.drawLine = true; + this.tableMc4.lineHeight = 24; + this.tableMc4.install(8,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc4); + this.tableMc4.x = 4; + this.tableMc4.y = _loc6_.y + 24; + var _loc7_:UITitleBg = new UITitleBg("珍珑小径战力",300); + this.packMc.addChild(_loc7_); + _loc7_.x = int(640 / 2 - _loc7_.width / 2); + _loc7_.y = this.tableMc4.y + this.tableMc4.height + 2; + this.tableMc5 = new UITable(); + this.tableMc5.drawLine = true; + this.tableMc5.lineHeight = 24; + this.tableMc5.install(8,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc5); + this.tableMc5.x = 4; + this.tableMc5.y = _loc7_.y + 24; + var _loc8_:UITitleBg = new UITitleBg("无忧山庄战力",300); + this.packMc.addChild(_loc8_); + _loc8_.x = int(640 / 2 - _loc8_.width / 2); + _loc8_.y = this.tableMc5.y + this.tableMc5.height + 2; + this.tableMc6 = new UITable(); + this.tableMc6.drawLine = true; + this.tableMc6.lineHeight = 24; + this.tableMc6.install(8,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc6); + this.tableMc6.x = 4; + this.tableMc6.y = _loc8_.y + 24; + _loc9_ = new UITitleBg("卧龙山庄战力",300); + this.packMc.addChild(_loc9_); + _loc9_.x = int(640 / 2 - _loc9_.width / 2); + _loc9_.y = this.tableMc6.y + this.tableMc6.height + 2; + this.tableMc7 = new UITable(); + this.tableMc7.drawLine = true; + this.tableMc7.lineHeight = 24; + this.tableMc7.install(8,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc7); + this.tableMc7.x = 4; + this.tableMc7.y = _loc9_.y + 24; + _loc10_ = new UITitleBg("珍珠泉战力",300); + this.packMc.addChild(_loc10_); + _loc10_.x = int(640 / 2 - _loc10_.width / 2); + _loc10_.y = this.tableMc7.y + this.tableMc7.height + 2; + this.tableMc8 = new UITable(); + this.tableMc8.drawLine = true; + this.tableMc8.lineHeight = 24; + this.tableMc8.install(8,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc8); + this.tableMc8.x = 4; + this.tableMc8.y = _loc10_.y + 24; + var _loc11_:Sprite = PublicMethod.createShape(16777215,10,2); + this.packMc.addChild(_loc11_); + _loc11_.x = 4; + _loc11_.y = this.tableMc7.y + this.tableMc7.height; + _loc11_.alpha = 0; + this.packScrollPane.update(); + ConnectService.getInstance().helpService.getRichesPower(); + ConnectService.getInstance().addEventListener(HelpEvent.RICHES_POWER,this.getData); + } + + private function getData(param1:HelpEvent) : void + { + this.setData(); + } + + private function setData() : void + { + var _loc2_:int = 0; + var _loc3_:PowerMc = null; + var _loc1_:Vector. = HelpData.getRichesPowerList(); + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(Boolean(_loc1_[4 * _loc2_ + 2]) && _loc2_ != 7) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(Boolean(_loc1_[4 * _loc2_ + 3]) && _loc2_ != 7) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc1.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_ + 30]) + { + _loc3_.setData1(_loc1_[4 * _loc2_ + 30]); + } + if(_loc1_[4 * _loc2_ + 1 + 30]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1 + 30]); + } + if(Boolean(_loc1_[4 * _loc2_ + 2 + 30]) && _loc2_ != 7) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2 + 30]); + } + if(Boolean(_loc1_[4 * _loc2_ + 3 + 30]) && _loc2_ != 7) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3 + 30]); + } + this.tableMc2.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_ + 60]) + { + _loc3_.setData1(_loc1_[4 * _loc2_ + 60]); + } + if(_loc1_[4 * _loc2_ + 1 + 60]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1 + 60]); + } + if(Boolean(_loc1_[4 * _loc2_ + 2 + 60]) && _loc2_ != 7) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2 + 60]); + } + if(Boolean(_loc1_[4 * _loc2_ + 3 + 60]) && _loc2_ != 7) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3 + 60]); + } + this.tableMc3.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_ + 90]) + { + _loc3_.setData1(_loc1_[4 * _loc2_ + 90]); + } + if(_loc1_[4 * _loc2_ + 1 + 90]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1 + 90]); + } + if(Boolean(_loc1_[4 * _loc2_ + 2 + 90]) && _loc2_ != 7) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2 + 90]); + } + if(Boolean(_loc1_[4 * _loc2_ + 3 + 90]) && _loc2_ != 7) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3 + 90]); + } + this.tableMc4.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_ + 120]) + { + _loc3_.setData1(_loc1_[4 * _loc2_ + 120]); + } + if(_loc1_[4 * _loc2_ + 1 + 120]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1 + 120]); + } + if(Boolean(_loc1_[4 * _loc2_ + 2 + 120]) && _loc2_ != 7) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2 + 120]); + } + if(Boolean(_loc1_[4 * _loc2_ + 3 + 120]) && _loc2_ != 7) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3 + 120]); + } + this.tableMc5.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_ + 150]) + { + _loc3_.setData1(_loc1_[4 * _loc2_ + 150]); + } + if(_loc1_[4 * _loc2_ + 1 + 150]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1 + 150]); + } + if(Boolean(_loc1_[4 * _loc2_ + 2 + 150]) && _loc2_ != 7) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2 + 150]); + } + if(Boolean(_loc1_[4 * _loc2_ + 3 + 150]) && _loc2_ != 7) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3 + 150]); + } + this.tableMc6.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_ + 180]) + { + _loc3_.setData1(_loc1_[4 * _loc2_ + 180]); + } + if(_loc1_[4 * _loc2_ + 1 + 180]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1 + 180]); + } + if(Boolean(_loc1_[4 * _loc2_ + 2 + 180]) && _loc2_ != 7) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2 + 180]); + } + if(Boolean(_loc1_[4 * _loc2_ + 3 + 180]) && _loc2_ != 7) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3 + 180]); + } + this.tableMc7.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_ + 210]) + { + _loc3_.setData1(_loc1_[4 * _loc2_ + 210]); + } + if(_loc1_[4 * _loc2_ + 1 + 210]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1 + 210]); + } + if(Boolean(4 * _loc2_ + 2 + 210 < 240) && Boolean(_loc1_[4 * _loc2_ + 2 + 210]) && _loc2_ != 7) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2 + 210]); + } + if(Boolean(4 * _loc2_ + 2 + 210 < 240) && Boolean(_loc1_[4 * _loc2_ + 3 + 210]) && _loc2_ != 7) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3 + 210]); + } + this.tableMc8.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage3.as b/flash_decompiled/com/view/ui/help/HelpPage3.as new file mode 100644 index 0000000..4b39163 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage3.as @@ -0,0 +1,86 @@ +package com.view.ui.help +{ + import com.common.PublicMethod; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UITable; + import com.view.ui.help.data.GameInfoData; + import com.view.ui.help.mc.GameInfoMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage3 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var tableMc:UITable; + + public function HelpPage3() + { + var _loc1_:Array = null; + var _loc2_:Array = null; + super(); + _loc1_ = ["序号","标题","说明"]; + _loc2_ = [50,100,484]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.lineHeight = 25; + this.tableMc.install(14,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(630,348); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.y = 26; + Utils.g_events.addEventListener(DevEvent.EVENT_GAMEINFO,this.getInfoResult); + this.getList(); + } + + private function getInfoResult(param1:DevEvent) : void + { + this.getList(); + } + + private function getList() : void + { + var _loc3_:Object = null; + var _loc4_:GameInfoMc = null; + var _loc5_:Sprite = null; + var _loc1_:Array = GameInfoData.getInfoList(); + if(_loc1_.length == 0) + { + return; + } + var _loc2_:int = 0; + for each(_loc3_ in _loc1_) + { + if(_loc3_.type == 1) + { + _loc2_++; + _loc4_ = new GameInfoMc(); + _loc4_.setObj(_loc2_,_loc3_); + this.packMc.addChild(_loc4_); + _loc4_.x = 1; + _loc4_.y = (_loc2_ - 1) * 25; + if(_loc2_ == _loc1_.length && _loc2_ != 14) + { + _loc5_ = PublicMethod.createShape(16777215,10,6); + this.packMc.addChild(_loc5_); + _loc5_.y = _loc4_.y + _loc4_.height; + _loc5_.alpha = 0; + } + } + } + this.packScrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage4.as b/flash_decompiled/com/view/ui/help/HelpPage4.as new file mode 100644 index 0000000..bfe3fb6 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage4.as @@ -0,0 +1,86 @@ +package com.view.ui.help +{ + import com.common.PublicMethod; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UITable; + import com.view.ui.help.data.GameInfoData; + import com.view.ui.help.mc.GameInfoMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage4 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var tableMc:UITable; + + public function HelpPage4() + { + var _loc1_:Array = null; + var _loc2_:Array = null; + super(); + _loc1_ = ["序号","标题","说明"]; + _loc2_ = [50,100,484]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.lineHeight = 25; + this.tableMc.install(14,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(630,348); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.y = 26; + Utils.g_events.addEventListener(DevEvent.EVENT_GAMEINFO,this.getInfoResult); + this.getList(); + } + + private function getInfoResult(param1:DevEvent) : void + { + this.getList(); + } + + private function getList() : void + { + var _loc3_:Object = null; + var _loc4_:GameInfoMc = null; + var _loc5_:Sprite = null; + var _loc1_:Array = GameInfoData.getInfoList(); + if(_loc1_.length == 0) + { + return; + } + var _loc2_:int = 0; + for each(_loc3_ in _loc1_) + { + if(_loc3_.type == 2) + { + _loc2_++; + _loc4_ = new GameInfoMc(); + _loc4_.setObj(_loc2_,_loc3_); + this.packMc.addChild(_loc4_); + _loc4_.x = 1; + _loc4_.y = (_loc2_ - 1) * 25; + if(_loc2_ == _loc1_.length && _loc2_ != 14) + { + _loc5_ = PublicMethod.createShape(16777215,10,6); + this.packMc.addChild(_loc5_); + _loc5_.y = _loc4_.y + _loc4_.height; + _loc5_.alpha = 0; + } + } + } + this.packScrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage5.as b/flash_decompiled/com/view/ui/help/HelpPage5.as new file mode 100644 index 0000000..c024cd1 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage5.as @@ -0,0 +1,86 @@ +package com.view.ui.help +{ + import com.common.PublicMethod; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UITable; + import com.view.ui.help.data.GameInfoData; + import com.view.ui.help.mc.GameInfoMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage5 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var tableMc:UITable; + + public function HelpPage5() + { + var _loc1_:Array = null; + var _loc2_:Array = null; + super(); + _loc1_ = ["序号","标题","说明"]; + _loc2_ = [50,100,484]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.lineHeight = 25; + this.tableMc.install(14,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(630,348); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.y = 26; + Utils.g_events.addEventListener(DevEvent.EVENT_GAMEINFO,this.getInfoResult); + this.getList(); + } + + private function getInfoResult(param1:DevEvent) : void + { + this.getList(); + } + + private function getList() : void + { + var _loc3_:Object = null; + var _loc4_:GameInfoMc = null; + var _loc5_:Sprite = null; + var _loc1_:Array = GameInfoData.getInfoList(); + if(_loc1_.length == 0) + { + return; + } + var _loc2_:int = 0; + for each(_loc3_ in _loc1_) + { + if(_loc3_.type == 3) + { + _loc2_++; + _loc4_ = new GameInfoMc(); + _loc4_.setObj(_loc2_,_loc3_); + this.packMc.addChild(_loc4_); + _loc4_.x = 1; + _loc4_.y = (_loc2_ - 1) * 25; + if(_loc2_ == _loc1_.length && _loc2_ != 14) + { + _loc5_ = PublicMethod.createShape(16777215,10,6); + this.packMc.addChild(_loc5_); + _loc5_.y = _loc4_.y + _loc4_.height; + _loc5_.alpha = 0; + } + } + } + this.packScrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage6.as b/flash_decompiled/com/view/ui/help/HelpPage6.as new file mode 100644 index 0000000..e486039 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage6.as @@ -0,0 +1,86 @@ +package com.view.ui.help +{ + import com.common.PublicMethod; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UITable; + import com.view.ui.help.data.GameInfoData; + import com.view.ui.help.mc.GameInfoMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage6 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var tableMc:UITable; + + public function HelpPage6() + { + var _loc1_:Array = null; + var _loc2_:Array = null; + super(); + _loc1_ = ["序号","标题","说明"]; + _loc2_ = [50,100,484]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.lineHeight = 25; + this.tableMc.install(14,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(630,348); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.y = 26; + Utils.g_events.addEventListener(DevEvent.EVENT_GAMEINFO,this.getInfoResult); + this.getList(); + } + + private function getInfoResult(param1:DevEvent) : void + { + this.getList(); + } + + private function getList() : void + { + var _loc3_:Object = null; + var _loc4_:GameInfoMc = null; + var _loc5_:Sprite = null; + var _loc1_:Array = GameInfoData.getInfoList(); + if(_loc1_.length == 0) + { + return; + } + var _loc2_:int = 0; + for each(_loc3_ in _loc1_) + { + if(_loc3_.type == 4) + { + _loc2_++; + _loc4_ = new GameInfoMc(); + _loc4_.setObj(_loc2_,_loc3_); + this.packMc.addChild(_loc4_); + _loc4_.x = 1; + _loc4_.y = (_loc2_ - 1) * 25; + if(_loc2_ == _loc1_.length && _loc2_ != 14) + { + _loc5_ = PublicMethod.createShape(16777215,10,6); + this.packMc.addChild(_loc5_); + _loc5_.y = _loc4_.y + _loc4_.height; + _loc5_.alpha = 0; + } + } + } + this.packScrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage7.as b/flash_decompiled/com/view/ui/help/HelpPage7.as new file mode 100644 index 0000000..e7915ae --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage7.as @@ -0,0 +1,462 @@ +package com.view.ui.help +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.help.event.HelpEvent; + import com.data.GameData; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.ui.help.data.HelpData; + import com.view.ui.help.data.StagePower; + import com.view.ui.help.mc.PowerMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage7 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var showStage1:int; + + private var showStage2:int; + + private var showStage3:int; + + private var showStage4:int; + + private var showStage5:int; + + private var showStage6:int; + + private var showStage7:int; + + private var showStage8:int; + + private var tableMc11:UITable; + + private var tableMc12:UITable; + + private var tableMc13:UITable; + + private var tableMc14:UITable; + + private var tableMc15:UITable; + + private var tableMc16:UITable; + + private var tableMc17:UITable; + + private var tableMc1:UITable; + + private var tableMc2:UITable; + + private var tableMc3:UITable; + + private var tableMc4:UITable; + + private var tableMc5:UITable; + + private var tableMc6:UITable; + + private var tableMc7:UITable; + + private var tableMc8:UITable; + + public function HelpPage7() + { + var _loc2_:Array = null; + var _loc3_:Array = null; + var _loc6_:UITitleBg = null; + super(); + this.showStage1 = int(GameData.getConfigMap().BABEL_OPEN_STAGE21); + this.showStage2 = int(GameData.getConfigMap().BABEL_OPEN_STAGE22); + this.showStage3 = int(GameData.getConfigMap().BABEL_OPEN_STAGE23); + this.showStage4 = int(GameData.getConfigMap().BABEL_OPEN_STAGE24); + this.showStage5 = int(GameData.getConfigMap().BABEL_OPEN_STAGE25); + this.showStage6 = int(GameData.getConfigMap().BABEL_OPEN_STAGE26); + this.showStage7 = int(GameData.getConfigMap().BABEL_OPEN_STAGE27); + this.showStage8 = int(GameData.getConfigMap().BABEL_OPEN_STAGE28); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(638,380); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + addChild(this.packScrollPane); + this.packScrollPane.y = 2; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + var _loc1_:UITitleBg = new UITitleBg(CommonData.babelMoreNameArr[0] + "战力",300); + this.packMc.addChild(_loc1_); + _loc1_.x = int(640 / 2 - _loc1_.width / 2); + _loc2_ = ["楼层","战力","楼层","战力","楼层","战力","楼层","战力"]; + _loc3_ = [60,95,60,95,60,95,60,95]; + this.tableMc1 = new UITable(); + this.tableMc1.drawLine = true; + this.tableMc1.lineHeight = 24; + this.tableMc1.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc1); + this.tableMc1.x = 4; + this.tableMc1.y = 24; + var _loc4_:int = this.tableMc1.y + this.tableMc1.height; + if(this.showStage2 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr[1] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc11 = new UITable(); + this.tableMc11.drawLine = true; + this.tableMc11.lineHeight = 24; + this.tableMc11.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc11); + this.tableMc11.x = 4; + this.tableMc11.y = _loc6_.y + 24; + _loc4_ = this.tableMc11.y + this.tableMc11.height; + } + if(this.showStage3 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr[2] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc12 = new UITable(); + this.tableMc12.drawLine = true; + this.tableMc12.lineHeight = 24; + this.tableMc12.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc12); + this.tableMc12.x = 4; + this.tableMc12.y = _loc6_.y + 24; + _loc4_ = this.tableMc12.y + this.tableMc12.height; + } + if(this.showStage4 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr[3] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc13 = new UITable(); + this.tableMc13.drawLine = true; + this.tableMc13.lineHeight = 24; + this.tableMc13.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc13); + this.tableMc13.x = 4; + this.tableMc13.y = _loc6_.y + 24; + _loc4_ = this.tableMc13.y + this.tableMc13.height; + } + if(this.showStage5 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr[4] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc14 = new UITable(); + this.tableMc14.drawLine = true; + this.tableMc14.lineHeight = 24; + this.tableMc14.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc14); + this.tableMc14.x = 4; + this.tableMc14.y = _loc6_.y + 24; + _loc4_ = this.tableMc14.y + this.tableMc14.height; + } + if(this.showStage6 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr[5] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc15 = new UITable(); + this.tableMc15.drawLine = true; + this.tableMc15.lineHeight = 24; + this.tableMc15.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc15); + this.tableMc15.x = 4; + this.tableMc15.y = _loc6_.y + 24; + _loc4_ = this.tableMc15.y + this.tableMc15.height; + } + if(this.showStage7 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr[6] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc16 = new UITable(); + this.tableMc16.drawLine = true; + this.tableMc16.lineHeight = 24; + this.tableMc16.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc16); + this.tableMc16.x = 4; + this.tableMc16.y = _loc6_.y + 24; + _loc4_ = this.tableMc16.y + this.tableMc16.height; + } + if(this.showStage8 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr[7] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc17 = new UITable(); + this.tableMc17.drawLine = true; + this.tableMc17.lineHeight = 24; + this.tableMc17.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc17); + this.tableMc17.x = 4; + this.tableMc17.y = _loc6_.y + 24; + _loc4_ = this.tableMc17.y + this.tableMc17.height; + } + var _loc5_:Sprite = PublicMethod.createShape(16777215,10,2); + this.packMc.addChild(_loc5_); + _loc5_.x = 4; + _loc5_.y = _loc4_; + _loc5_.alpha = 0; + this.packScrollPane.update(); + this.setData(); + } + + private function getData(param1:HelpEvent) : void + { + this.setData(); + } + + private function setData() : void + { + var _loc1_:Vector. = null; + var _loc2_:int = 0; + var _loc3_:PowerMc = null; + if(this.showStage1 == 1) + { + _loc1_ = HelpData.getBabelPowerList(26); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc1.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage2 == 1) + { + _loc1_ = HelpData.getBabelPowerList(27); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc11.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage3 == 1) + { + _loc1_ = HelpData.getBabelPowerList(28); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc12.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage4 == 1) + { + _loc1_ = HelpData.getBabelPowerList(29); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc13.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage5 == 1) + { + _loc1_ = HelpData.getBabelPowerList(30); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc14.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage6 == 1) + { + _loc1_ = HelpData.getBabelPowerList(31); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc15.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage7 == 1) + { + _loc1_ = HelpData.getBabelPowerList(32); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc16.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage8 == 1) + { + _loc1_ = HelpData.getBabelPowerList(33); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc17.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage8.as b/flash_decompiled/com/view/ui/help/HelpPage8.as new file mode 100644 index 0000000..8013322 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage8.as @@ -0,0 +1,644 @@ +package com.view.ui.help +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.help.event.HelpEvent; + import com.data.GameData; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.ui.help.data.HelpData; + import com.view.ui.help.data.StagePower; + import com.view.ui.help.mc.PowerMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage8 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var showStage1:int; + + private var showStage2:int; + + private var showStage3:int; + + private var showStage4:int; + + private var showStage5:int; + + private var showStage6:int; + + private var showStage7:int; + + private var showStage8:int; + + private var showStage9:int; + + private var showStage10:int; + + private var showStage11:int; + + private var showStage12:int; + + private var tableMc11:UITable; + + private var tableMc12:UITable; + + private var tableMc13:UITable; + + private var tableMc14:UITable; + + private var tableMc15:UITable; + + private var tableMc16:UITable; + + private var tableMc17:UITable; + + private var tableMc18:UITable; + + private var tableMc19:UITable; + + private var tableMc20:UITable; + + private var tableMc21:UITable; + + private var tableMc1:UITable; + + public function HelpPage8() + { + var _loc2_:Array = null; + var _loc3_:Array = null; + var _loc6_:UITitleBg = null; + super(); + this.showStage1 = int(GameData.getConfigMap().BABEL_OPEN_STAGE31); + this.showStage2 = int(GameData.getConfigMap().BABEL_OPEN_STAGE32); + this.showStage3 = int(GameData.getConfigMap().BABEL_OPEN_STAGE33); + this.showStage4 = int(GameData.getConfigMap().BABEL_OPEN_STAGE34); + this.showStage5 = int(GameData.getConfigMap().BABEL_OPEN_STAGE35); + this.showStage6 = int(GameData.getConfigMap().BABEL_OPEN_STAGE36); + this.showStage7 = int(GameData.getConfigMap().BABEL_OPEN_STAGE37); + this.showStage8 = int(GameData.getConfigMap().BABEL_OPEN_STAGE38); + this.showStage9 = int(GameData.getConfigMap().BABEL_OPEN_STAGE39); + this.showStage10 = int(GameData.getConfigMap().BABEL_OPEN_STAGE40); + this.showStage11 = int(GameData.getConfigMap().BABEL_OPEN_STAGE41); + this.showStage12 = int(GameData.getConfigMap().BABEL_OPEN_STAGE42); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(638,380); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + addChild(this.packScrollPane); + this.packScrollPane.y = 2; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + var _loc1_:UITitleBg = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[0] + "战力",300); + this.packMc.addChild(_loc1_); + _loc1_.x = int(640 / 2 - _loc1_.width / 2); + _loc2_ = ["楼层","战力","楼层","战力","楼层","战力","楼层","战力"]; + _loc3_ = [60,95,60,95,60,95,60,95]; + this.tableMc1 = new UITable(); + this.tableMc1.drawLine = true; + this.tableMc1.lineHeight = 24; + this.tableMc1.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc1); + this.tableMc1.x = 4; + this.tableMc1.y = 24; + var _loc4_:int = this.tableMc1.y + this.tableMc1.height; + if(this.showStage2 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[1] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc11 = new UITable(); + this.tableMc11.drawLine = true; + this.tableMc11.lineHeight = 24; + this.tableMc11.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc11); + this.tableMc11.x = 4; + this.tableMc11.y = _loc6_.y + 24; + _loc4_ = this.tableMc11.y + this.tableMc11.height; + } + if(this.showStage3 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[2] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc12 = new UITable(); + this.tableMc12.drawLine = true; + this.tableMc12.lineHeight = 24; + this.tableMc12.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc12); + this.tableMc12.x = 4; + this.tableMc12.y = _loc6_.y + 24; + _loc4_ = this.tableMc12.y + this.tableMc12.height; + } + if(this.showStage4 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[3] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc13 = new UITable(); + this.tableMc13.drawLine = true; + this.tableMc13.lineHeight = 24; + this.tableMc13.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc13); + this.tableMc13.x = 4; + this.tableMc13.y = _loc6_.y + 24; + _loc4_ = this.tableMc13.y + this.tableMc13.height; + } + if(this.showStage5 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[4] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc14 = new UITable(); + this.tableMc14.drawLine = true; + this.tableMc14.lineHeight = 24; + this.tableMc14.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc14); + this.tableMc14.x = 4; + this.tableMc14.y = _loc6_.y + 24; + _loc4_ = this.tableMc14.y + this.tableMc14.height; + } + if(this.showStage6 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[5] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc15 = new UITable(); + this.tableMc15.drawLine = true; + this.tableMc15.lineHeight = 24; + this.tableMc15.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc15); + this.tableMc15.x = 4; + this.tableMc15.y = _loc6_.y + 24; + _loc4_ = this.tableMc15.y + this.tableMc15.height; + } + if(this.showStage7 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[6] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc16 = new UITable(); + this.tableMc16.drawLine = true; + this.tableMc16.lineHeight = 24; + this.tableMc16.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc16); + this.tableMc16.x = 4; + this.tableMc16.y = _loc6_.y + 24; + _loc4_ = this.tableMc16.y + this.tableMc16.height; + } + if(this.showStage8 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[7] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc17 = new UITable(); + this.tableMc17.drawLine = true; + this.tableMc17.lineHeight = 24; + this.tableMc17.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc17); + this.tableMc17.x = 4; + this.tableMc17.y = _loc6_.y + 24; + _loc4_ = this.tableMc17.y + this.tableMc17.height; + } + if(this.showStage9 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[8] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc18 = new UITable(); + this.tableMc18.drawLine = true; + this.tableMc18.lineHeight = 24; + this.tableMc18.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc18); + this.tableMc18.x = 4; + this.tableMc18.y = _loc6_.y + 24; + _loc4_ = this.tableMc18.y + this.tableMc18.height; + } + if(this.showStage10 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[9] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc19 = new UITable(); + this.tableMc19.drawLine = true; + this.tableMc19.lineHeight = 24; + this.tableMc19.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc19); + this.tableMc19.x = 4; + this.tableMc19.y = _loc6_.y + 24; + _loc4_ = this.tableMc19.y + this.tableMc19.height; + } + if(this.showStage11 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[10] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc20 = new UITable(); + this.tableMc20.drawLine = true; + this.tableMc20.lineHeight = 24; + this.tableMc20.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc20); + this.tableMc20.x = 4; + this.tableMc20.y = _loc6_.y + 24; + _loc4_ = this.tableMc20.y + this.tableMc20.height; + } + if(this.showStage12 == 1) + { + _loc6_ = new UITitleBg("黄金第" + CommonData.babelMoreNameArr1[11] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc21 = new UITable(); + this.tableMc21.drawLine = true; + this.tableMc21.lineHeight = 24; + this.tableMc21.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc21); + this.tableMc21.x = 4; + this.tableMc21.y = _loc6_.y + 24; + _loc4_ = this.tableMc21.y + this.tableMc21.height; + } + var _loc5_:Sprite = PublicMethod.createShape(16777215,10,2); + this.packMc.addChild(_loc5_); + _loc5_.x = 4; + _loc5_.y = _loc4_; + _loc5_.alpha = 0; + this.packScrollPane.update(); + this.setData(); + } + + private function getData(param1:HelpEvent) : void + { + this.setData(); + } + + private function setData() : void + { + var _loc1_:Vector. = null; + var _loc2_:int = 0; + var _loc3_:PowerMc = null; + if(this.showStage1 == 1) + { + _loc1_ = HelpData.getBabelPowerList(34); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc1.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage2 == 1) + { + _loc1_ = HelpData.getBabelPowerList(35); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc11.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage3 == 1) + { + _loc1_ = HelpData.getBabelPowerList(36); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc12.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage4 == 1) + { + _loc1_ = HelpData.getBabelPowerList(37); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc13.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage5 == 1) + { + _loc1_ = HelpData.getBabelPowerList(38); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc14.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage6 == 1) + { + _loc1_ = HelpData.getBabelPowerList(39); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc15.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage7 == 1) + { + _loc1_ = HelpData.getBabelPowerList(40); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc16.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage8 == 1) + { + _loc1_ = HelpData.getBabelPowerList(41); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc17.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage9 == 1) + { + _loc1_ = HelpData.getBabelPowerList(42); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc18.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage10 == 1) + { + _loc1_ = HelpData.getBabelPowerList(43); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc19.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage11 == 1) + { + _loc1_ = HelpData.getBabelPowerList(44); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc20.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage12 == 1) + { + _loc1_ = HelpData.getBabelPowerList(45); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc21.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpPage9.as b/flash_decompiled/com/view/ui/help/HelpPage9.as new file mode 100644 index 0000000..9e88524 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpPage9.as @@ -0,0 +1,644 @@ +package com.view.ui.help +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.help.event.HelpEvent; + import com.data.GameData; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.ui.help.data.HelpData; + import com.view.ui.help.data.StagePower; + import com.view.ui.help.mc.PowerMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class HelpPage9 extends Sprite + { + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var showStage1:int; + + private var showStage2:int; + + private var showStage3:int; + + private var showStage4:int; + + private var showStage5:int; + + private var showStage6:int; + + private var showStage7:int; + + private var showStage8:int; + + private var showStage9:int; + + private var showStage10:int; + + private var showStage11:int; + + private var showStage12:int; + + private var tableMc11:UITable; + + private var tableMc12:UITable; + + private var tableMc13:UITable; + + private var tableMc14:UITable; + + private var tableMc15:UITable; + + private var tableMc16:UITable; + + private var tableMc17:UITable; + + private var tableMc18:UITable; + + private var tableMc19:UITable; + + private var tableMc20:UITable; + + private var tableMc21:UITable; + + private var tableMc1:UITable; + + public function HelpPage9() + { + var _loc2_:Array = null; + var _loc3_:Array = null; + var _loc6_:UITitleBg = null; + super(); + this.showStage1 = int(GameData.getConfigMap().BABEL_OPEN_STAGE51); + this.showStage2 = int(GameData.getConfigMap().BABEL_OPEN_STAGE52); + this.showStage3 = int(GameData.getConfigMap().BABEL_OPEN_STAGE53); + this.showStage4 = int(GameData.getConfigMap().BABEL_OPEN_STAGE54); + this.showStage5 = int(GameData.getConfigMap().BABEL_OPEN_STAGE55); + this.showStage6 = int(GameData.getConfigMap().BABEL_OPEN_STAGE56); + this.showStage7 = int(GameData.getConfigMap().BABEL_OPEN_STAGE57); + this.showStage8 = int(GameData.getConfigMap().BABEL_OPEN_STAGE58); + this.showStage9 = int(GameData.getConfigMap().BABEL_OPEN_STAGE59); + this.showStage10 = int(GameData.getConfigMap().BABEL_OPEN_STAGE60); + this.showStage11 = int(GameData.getConfigMap().BABEL_OPEN_STAGE61); + this.showStage12 = int(GameData.getConfigMap().BABEL_OPEN_STAGE62); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(638,380); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + addChild(this.packScrollPane); + this.packScrollPane.y = 2; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + var _loc1_:UITitleBg = new UITitleBg(CommonData.babelMoreNameArr2[0] + "战力",300); + this.packMc.addChild(_loc1_); + _loc1_.x = int(640 / 2 - _loc1_.width / 2); + _loc2_ = ["楼层","战力","楼层","战力","楼层","战力","楼层","战力"]; + _loc3_ = [60,95,60,95,60,95,60,95]; + this.tableMc1 = new UITable(); + this.tableMc1.drawLine = true; + this.tableMc1.lineHeight = 24; + this.tableMc1.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc1); + this.tableMc1.x = 4; + this.tableMc1.y = 24; + var _loc4_:int = this.tableMc1.y + this.tableMc1.height; + if(this.showStage2 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[1] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc11 = new UITable(); + this.tableMc11.drawLine = true; + this.tableMc11.lineHeight = 24; + this.tableMc11.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc11); + this.tableMc11.x = 4; + this.tableMc11.y = _loc6_.y + 24; + _loc4_ = this.tableMc11.y + this.tableMc11.height; + } + if(this.showStage3 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[2] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc12 = new UITable(); + this.tableMc12.drawLine = true; + this.tableMc12.lineHeight = 24; + this.tableMc12.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc12); + this.tableMc12.x = 4; + this.tableMc12.y = _loc6_.y + 24; + _loc4_ = this.tableMc12.y + this.tableMc12.height; + } + if(this.showStage4 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[3] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc13 = new UITable(); + this.tableMc13.drawLine = true; + this.tableMc13.lineHeight = 24; + this.tableMc13.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc13); + this.tableMc13.x = 4; + this.tableMc13.y = _loc6_.y + 24; + _loc4_ = this.tableMc13.y + this.tableMc13.height; + } + if(this.showStage5 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[4] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc14 = new UITable(); + this.tableMc14.drawLine = true; + this.tableMc14.lineHeight = 24; + this.tableMc14.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc14); + this.tableMc14.x = 4; + this.tableMc14.y = _loc6_.y + 24; + _loc4_ = this.tableMc14.y + this.tableMc14.height; + } + if(this.showStage6 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[5] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc15 = new UITable(); + this.tableMc15.drawLine = true; + this.tableMc15.lineHeight = 24; + this.tableMc15.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc15); + this.tableMc15.x = 4; + this.tableMc15.y = _loc6_.y + 24; + _loc4_ = this.tableMc15.y + this.tableMc15.height; + } + if(this.showStage7 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[6] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc16 = new UITable(); + this.tableMc16.drawLine = true; + this.tableMc16.lineHeight = 24; + this.tableMc16.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc16); + this.tableMc16.x = 4; + this.tableMc16.y = _loc6_.y + 24; + _loc4_ = this.tableMc16.y + this.tableMc16.height; + } + if(this.showStage8 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[7] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc17 = new UITable(); + this.tableMc17.drawLine = true; + this.tableMc17.lineHeight = 24; + this.tableMc17.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc17); + this.tableMc17.x = 4; + this.tableMc17.y = _loc6_.y + 24; + _loc4_ = this.tableMc17.y + this.tableMc17.height; + } + if(this.showStage9 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[8] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc18 = new UITable(); + this.tableMc18.drawLine = true; + this.tableMc18.lineHeight = 24; + this.tableMc18.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc18); + this.tableMc18.x = 4; + this.tableMc18.y = _loc6_.y + 24; + _loc4_ = this.tableMc18.y + this.tableMc18.height; + } + if(this.showStage10 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[9] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc19 = new UITable(); + this.tableMc19.drawLine = true; + this.tableMc19.lineHeight = 24; + this.tableMc19.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc19); + this.tableMc19.x = 4; + this.tableMc19.y = _loc6_.y + 24; + _loc4_ = this.tableMc19.y + this.tableMc19.height; + } + if(this.showStage11 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[10] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc20 = new UITable(); + this.tableMc20.drawLine = true; + this.tableMc20.lineHeight = 24; + this.tableMc20.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc20); + this.tableMc20.x = 4; + this.tableMc20.y = _loc6_.y + 24; + _loc4_ = this.tableMc20.y + this.tableMc20.height; + } + if(this.showStage12 == 1) + { + _loc6_ = new UITitleBg(CommonData.babelMoreNameArr2[11] + "战力",300); + this.packMc.addChild(_loc6_); + _loc6_.x = int(640 / 2 - _loc6_.width / 2); + _loc6_.y = _loc4_ + 2; + this.tableMc21 = new UITable(); + this.tableMc21.drawLine = true; + this.tableMc21.lineHeight = 24; + this.tableMc21.install(25,_loc2_,_loc3_); + this.packMc.addChild(this.tableMc21); + this.tableMc21.x = 4; + this.tableMc21.y = _loc6_.y + 24; + _loc4_ = this.tableMc21.y + this.tableMc21.height; + } + var _loc5_:Sprite = PublicMethod.createShape(16777215,10,2); + this.packMc.addChild(_loc5_); + _loc5_.x = 4; + _loc5_.y = _loc4_; + _loc5_.alpha = 0; + this.packScrollPane.update(); + this.setData(); + } + + private function getData(param1:HelpEvent) : void + { + this.setData(); + } + + private function setData() : void + { + var _loc1_:Vector. = null; + var _loc2_:int = 0; + var _loc3_:PowerMc = null; + if(this.showStage1 == 1) + { + _loc1_ = HelpData.getBabelPowerList(46); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc1.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage2 == 1) + { + _loc1_ = HelpData.getBabelPowerList(47); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],4500); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],4500); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],4500); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],4500); + } + this.tableMc11.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage3 == 1) + { + _loc1_ = HelpData.getBabelPowerList(48); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],4500); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],4500); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],4500); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],4500); + } + this.tableMc12.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage4 == 1) + { + _loc1_ = HelpData.getBabelPowerList(49); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc13.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage5 == 1) + { + _loc1_ = HelpData.getBabelPowerList(50); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],4800); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],4800); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],4800); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],4800); + } + this.tableMc14.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage6 == 1) + { + _loc1_ = HelpData.getBabelPowerList(51); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],4800); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],4800); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],4800); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],4800); + } + this.tableMc15.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage7 == 1) + { + _loc1_ = HelpData.getBabelPowerList(52); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc16.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage8 == 1) + { + _loc1_ = HelpData.getBabelPowerList(53); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],5100); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],5100); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],5100); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],5100); + } + this.tableMc17.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage9 == 1) + { + _loc1_ = HelpData.getBabelPowerList(54); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],5100); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],5100); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],5100); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],5100); + } + this.tableMc18.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage10 == 1) + { + _loc1_ = HelpData.getBabelPowerList(55); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setData1(_loc1_[4 * _loc2_]); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setData2(_loc1_[4 * _loc2_ + 1]); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setData3(_loc1_[4 * _loc2_ + 2]); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setData4(_loc1_[4 * _loc2_ + 3]); + } + this.tableMc19.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage11 == 1) + { + _loc1_ = HelpData.getBabelPowerList(56); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],5400); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],5400); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],5400); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],5400); + } + this.tableMc20.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + if(this.showStage12 == 1) + { + _loc1_ = HelpData.getBabelPowerList(57); + _loc2_ = 0; + while(_loc2_ < 25) + { + _loc3_ = new PowerMc(); + if(_loc1_[4 * _loc2_]) + { + _loc3_.setNewData1(_loc1_[4 * _loc2_],5400); + } + if(_loc1_[4 * _loc2_ + 1]) + { + _loc3_.setNewData2(_loc1_[4 * _loc2_ + 1],5400); + } + if(_loc1_[4 * _loc2_ + 2]) + { + _loc3_.setNewData3(_loc1_[4 * _loc2_ + 2],5400); + } + if(_loc1_[4 * _loc2_ + 3]) + { + _loc3_.setNewData4(_loc1_[4 * _loc2_ + 3],5400); + } + this.tableMc21.addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 27 + _loc2_ * 24; + _loc2_++; + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/HelpUI.as b/flash_decompiled/com/view/ui/help/HelpUI.as new file mode 100644 index 0000000..13d345b --- /dev/null +++ b/flash_decompiled/com/view/ui/help/HelpUI.as @@ -0,0 +1,153 @@ +package com.view.ui.help +{ + 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.MouseEvent; + + public class HelpUI extends BaseUI + { + + private var bg1:UIWindowBg; + + public var btnArr:Array; + + private var paneBg:UIWindowBg; + + private var page1:HelpPage1; + + private var page2:HelpPage2; + + private var page3:HelpPage3; + + private var page4:HelpPage4; + + private var page5:HelpPage5; + + private var page6:HelpPage6; + + private var page7:HelpPage7; + + private var page8:HelpPage8; + + private var page9:HelpPage9; + + private var page10:HelpPage10; + + private var prePage:Sprite; + + private var preBtn:UITabBtn; + + public function HelpUI() + { + var _loc11_:int = 0; + var _loc12_:UITabBtn = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_bangzhu); + super.setPosition(); + this.btnArr = new Array(); + var _loc1_:UITabBtn = new UITabBtn("重楼战力",2); + var _loc2_:UITabBtn = new UITabBtn("藏宝战力",2); + var _loc3_:UITabBtn = new UITabBtn("道具获得",2); + var _loc4_:UITabBtn = new UITabBtn("新手帮助",2); + var _loc5_:UITabBtn = new UITabBtn("重楼掉落",2); + var _loc6_:UITabBtn = new UITabBtn("藏宝掉落",2); + var _loc7_:UITabBtn = new UITabBtn("界楼战力",2); + var _loc8_:UITabBtn = new UITabBtn("宫楼战力",2); + var _loc9_:UITabBtn = new UITabBtn("四象战力",2); + var _loc10_:UITabBtn = new UITabBtn("倒四象战力",2); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc7_); + this.btnArr.push(_loc8_); + this.btnArr.push(_loc9_); + this.btnArr.push(_loc10_); + for each(_loc12_ in this.btnArr) + { + addChild(_loc12_); + _loc12_.x = 25 + _loc11_ * 66; + _loc12_.y = 40; + _loc12_.onClick = this.clickPage; + _loc11_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,374); + 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 HelpPage1(); + } + this.prePage = this.page1; + } + if(this.btnArr[1] == this.preBtn) + { + if(this.page2 == null) + { + this.page2 = new HelpPage2(); + } + this.prePage = this.page2; + } + if(this.btnArr[2] == this.preBtn) + { + if(this.page7 == null) + { + this.page7 = new HelpPage7(); + } + this.prePage = this.page7; + } + if(this.btnArr[3] == this.preBtn) + { + if(this.page8 == null) + { + this.page8 = new HelpPage8(); + } + this.prePage = this.page8; + } + if(this.btnArr[4] == this.preBtn) + { + if(this.page9 == null) + { + this.page9 = new HelpPage9(); + } + this.prePage = this.page9; + } + if(this.btnArr[5] == this.preBtn) + { + if(this.page10 == null) + { + this.page10 = new HelpPage10(); + } + this.prePage = this.page10; + } + this.paneBg.addChild(this.prePage); + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/data/DropData.as b/flash_decompiled/com/view/ui/help/data/DropData.as new file mode 100644 index 0000000..2c8b54f --- /dev/null +++ b/flash_decompiled/com/view/ui/help/data/DropData.as @@ -0,0 +1,36 @@ +package com.view.ui.help.data +{ + public class DropData + { + + public var itemName:String; + + public var npcName:String; + + public var maxValue:int; + + public var minValue:int; + + public var stageId:int; + + public function DropData(param1:Object) + { + super(); + this.itemName = param1.itemName; + this.npcName = param1.npcname; + this.maxValue = param1.maxValue; + this.minValue = param1.minValue; + this.stageId = param1.stageId; + } + + public function getItemStr() : String + { + if(this.maxValue == this.minValue) + { + return this.itemName + "(" + this.minValue + "个)"; + } + return this.itemName + "(" + this.minValue + "~" + this.maxValue + "个)"; + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/data/GameInfoData.as b/flash_decompiled/com/view/ui/help/data/GameInfoData.as new file mode 100644 index 0000000..fab3cc7 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/data/GameInfoData.as @@ -0,0 +1,34 @@ +package com.view.ui.help.data +{ + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + + public class GameInfoData + { + + private static var gameInfoList:Array = new Array(); + + public function GameInfoData() + { + super(); + } + + public static function getInfoList() : Array + { + if(gameInfoList.length == 0) + { + ConnectService.getInstance().activityService.getGameInfo(); + } + return gameInfoList; + } + + public static function setInfoList(param1:Array) : void + { + gameInfoList = param1; + var _loc2_:DevEvent = new DevEvent(DevEvent.EVENT_GAMEINFO); + Utils.g_events.dispatchEvent(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/data/HelpData.as b/flash_decompiled/com/view/ui/help/data/HelpData.as new file mode 100644 index 0000000..310cfca --- /dev/null +++ b/flash_decompiled/com/view/ui/help/data/HelpData.as @@ -0,0 +1,875 @@ +package com.view.ui.help.data +{ + public class HelpData + { + + private static var babelPowerList1:Vector. = new Vector.(); + + private static var babelPowerList2:Vector. = new Vector.(); + + private static var babelPowerList3:Vector. = new Vector.(); + + private static var babelPowerList4:Vector. = new Vector.(); + + private static var babelPowerList5:Vector. = new Vector.(); + + private static var babelPowerList6:Vector. = new Vector.(); + + private static var babelPowerList7:Vector. = new Vector.(); + + private static var babelPowerList8:Vector. = new Vector.(); + + private static var babelPowerList9:Vector. = new Vector.(); + + private static var babelPowerList10:Vector. = new Vector.(); + + private static var babelPowerList11:Vector. = new Vector.(); + + private static var babelPowerList12:Vector. = new Vector.(); + + private static var babelPowerList13:Vector. = new Vector.(); + + private static var babelPowerList14:Vector. = new Vector.(); + + private static var babelPowerList15:Vector. = new Vector.(); + + private static var babelPowerList16:Vector. = new Vector.(); + + private static var babelPowerList17:Vector. = new Vector.(); + + private static var babelPowerList18:Vector. = new Vector.(); + + private static var babelPowerList19:Vector. = new Vector.(); + + private static var babelPowerList20:Vector. = new Vector.(); + + private static var babelPowerList21:Vector. = new Vector.(); + + private static var babelPowerList22:Vector. = new Vector.(); + + private static var babelPowerList23:Vector. = new Vector.(); + + private static var babelPowerList24:Vector. = new Vector.(); + + private static var babelPowerList25:Vector. = new Vector.(); + + private static var babelPowerList31:Vector. = new Vector.(); + + private static var babelPowerList32:Vector. = new Vector.(); + + private static var babelPowerList33:Vector. = new Vector.(); + + private static var babelPowerList34:Vector. = new Vector.(); + + private static var babelPowerList35:Vector. = new Vector.(); + + private static var babelPowerList36:Vector. = new Vector.(); + + private static var babelPowerList37:Vector. = new Vector.(); + + private static var babelPowerList38:Vector. = new Vector.(); + + private static var babelPowerList41:Vector. = new Vector.(); + + private static var babelPowerList42:Vector. = new Vector.(); + + private static var babelPowerList43:Vector. = new Vector.(); + + private static var babelPowerList44:Vector. = new Vector.(); + + private static var babelPowerList45:Vector. = new Vector.(); + + private static var babelPowerList46:Vector. = new Vector.(); + + private static var babelPowerList47:Vector. = new Vector.(); + + private static var babelPowerList48:Vector. = new Vector.(); + + private static var babelPowerList49:Vector. = new Vector.(); + + private static var babelPowerList50:Vector. = new Vector.(); + + private static var babelPowerList51:Vector. = new Vector.(); + + private static var babelPowerList52:Vector. = new Vector.(); + + private static var babelPowerList61:Vector. = new Vector.(); + + private static var babelPowerList62:Vector. = new Vector.(); + + private static var babelPowerList63:Vector. = new Vector.(); + + private static var babelPowerList64:Vector. = new Vector.(); + + private static var babelPowerList65:Vector. = new Vector.(); + + private static var babelPowerList66:Vector. = new Vector.(); + + private static var babelPowerList67:Vector. = new Vector.(); + + private static var babelPowerList68:Vector. = new Vector.(); + + private static var babelPowerList69:Vector. = new Vector.(); + + private static var babelPowerList70:Vector. = new Vector.(); + + private static var babelPowerList71:Vector. = new Vector.(); + + private static var babelPowerList72:Vector. = new Vector.(); + + private static var babelPowerList81:Vector. = new Vector.(); + + private static var babelPowerList82:Vector. = new Vector.(); + + private static var babelPowerList83:Vector. = new Vector.(); + + private static var babelPowerList84:Vector. = new Vector.(); + + private static var babelPowerList85:Vector. = new Vector.(); + + private static var babelPowerList86:Vector. = new Vector.(); + + private static var babelPowerList87:Vector. = new Vector.(); + + private static var babelPowerList88:Vector. = new Vector.(); + + private static var babelPowerList89:Vector. = new Vector.(); + + private static var babelPowerList90:Vector. = new Vector.(); + + private static var babelPowerList91:Vector. = new Vector.(); + + private static var babelPowerList92:Vector. = new Vector.(); + + private static var richesPowerList:Vector. = new Vector.(); + + private static var babelStageDropList1:Vector. = new Vector.(); + + private static var babelStageDropList2:Vector. = new Vector.(); + + private static var babelStageDropList3:Vector. = new Vector.(); + + private static var babelStageDropList4:Vector. = new Vector.(); + + private static var babelStageDropList5:Vector. = new Vector.(); + + public function HelpData() + { + super(); + } + + public static function setStagePower(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:StagePower = null; + for each(_loc2_ in param1) + { + _loc3_ = new StagePower(_loc2_); + if(_loc3_.stageId < 101) + { + babelPowerList1.push(_loc3_); + } + if(_loc3_.stageId < 201 && _loc3_.stageId > 100) + { + babelPowerList2.push(_loc3_); + } + if(_loc3_.stageId < 301 && _loc3_.stageId > 200) + { + babelPowerList3.push(_loc3_); + } + if(_loc3_.stageId < 401 && _loc3_.stageId > 300) + { + babelPowerList4.push(_loc3_); + } + if(_loc3_.stageId < 501 && _loc3_.stageId > 400) + { + babelPowerList5.push(_loc3_); + } + if(_loc3_.stageId < 601 && _loc3_.stageId > 500) + { + babelPowerList6.push(_loc3_); + } + if(_loc3_.stageId < 701 && _loc3_.stageId > 600) + { + babelPowerList7.push(_loc3_); + } + if(_loc3_.stageId < 801 && _loc3_.stageId > 700) + { + babelPowerList8.push(_loc3_); + } + if(_loc3_.stageId < 901 && _loc3_.stageId > 800) + { + babelPowerList9.push(_loc3_); + } + if(_loc3_.stageId < 1001 && _loc3_.stageId > 900) + { + babelPowerList10.push(_loc3_); + } + if(_loc3_.stageId < 1101 && _loc3_.stageId > 1000) + { + babelPowerList11.push(_loc3_); + } + if(_loc3_.stageId < 1201 && _loc3_.stageId > 1100) + { + babelPowerList12.push(_loc3_); + } + if(_loc3_.stageId < 1301 && _loc3_.stageId > 1200) + { + babelPowerList13.push(_loc3_); + } + if(_loc3_.stageId < 1401 && _loc3_.stageId > 1300) + { + babelPowerList14.push(_loc3_); + } + if(_loc3_.stageId < 1501 && _loc3_.stageId > 1400) + { + babelPowerList15.push(_loc3_); + } + if(_loc3_.stageId < 1601 && _loc3_.stageId > 1500) + { + babelPowerList16.push(_loc3_); + } + if(_loc3_.stageId < 1701 && _loc3_.stageId > 1600) + { + babelPowerList17.push(_loc3_); + } + if(_loc3_.stageId < 1801 && _loc3_.stageId > 1700) + { + babelPowerList18.push(_loc3_); + } + if(_loc3_.stageId < 1901 && _loc3_.stageId > 1800) + { + babelPowerList19.push(_loc3_); + } + if(_loc3_.stageId < 2001 && _loc3_.stageId > 1900) + { + babelPowerList20.push(_loc3_); + } + if(_loc3_.stageId < 2101 && _loc3_.stageId > 2000) + { + babelPowerList21.push(_loc3_); + } + if(_loc3_.stageId < 2201 && _loc3_.stageId > 2100) + { + babelPowerList22.push(_loc3_); + } + if(_loc3_.stageId < 2301 && _loc3_.stageId > 2200) + { + babelPowerList23.push(_loc3_); + } + if(_loc3_.stageId < 2401 && _loc3_.stageId > 2300) + { + babelPowerList24.push(_loc3_); + } + if(_loc3_.stageId < 2501 && _loc3_.stageId > 2400) + { + babelPowerList25.push(_loc3_); + } + if(_loc3_.stageId < 2601 && _loc3_.stageId > 2500) + { + babelPowerList31.push(_loc3_); + } + if(_loc3_.stageId < 2701 && _loc3_.stageId > 2600) + { + babelPowerList32.push(_loc3_); + } + if(_loc3_.stageId < 2801 && _loc3_.stageId > 2700) + { + babelPowerList33.push(_loc3_); + } + if(_loc3_.stageId < 2901 && _loc3_.stageId > 2800) + { + babelPowerList34.push(_loc3_); + } + if(_loc3_.stageId < 3001 && _loc3_.stageId > 2900) + { + babelPowerList35.push(_loc3_); + } + if(_loc3_.stageId < 3101 && _loc3_.stageId > 3000) + { + babelPowerList36.push(_loc3_); + } + if(_loc3_.stageId < 3201 && _loc3_.stageId > 3100) + { + babelPowerList37.push(_loc3_); + } + if(_loc3_.stageId < 3301 && _loc3_.stageId > 3200) + { + babelPowerList38.push(_loc3_); + } + if(_loc3_.stageId < 3401 && _loc3_.stageId > 3300) + { + babelPowerList41.push(_loc3_); + } + if(_loc3_.stageId < 3501 && _loc3_.stageId > 3400) + { + babelPowerList42.push(_loc3_); + } + if(_loc3_.stageId < 3601 && _loc3_.stageId > 3500) + { + babelPowerList43.push(_loc3_); + } + if(_loc3_.stageId < 3701 && _loc3_.stageId > 3600) + { + babelPowerList44.push(_loc3_); + } + if(_loc3_.stageId < 3801 && _loc3_.stageId > 3700) + { + babelPowerList45.push(_loc3_); + } + if(_loc3_.stageId < 3901 && _loc3_.stageId > 3800) + { + babelPowerList46.push(_loc3_); + } + if(_loc3_.stageId < 4001 && _loc3_.stageId > 3900) + { + babelPowerList47.push(_loc3_); + } + if(_loc3_.stageId < 4101 && _loc3_.stageId > 4000) + { + babelPowerList48.push(_loc3_); + } + if(_loc3_.stageId < 4201 && _loc3_.stageId > 4100) + { + babelPowerList49.push(_loc3_); + } + if(_loc3_.stageId < 4301 && _loc3_.stageId > 4200) + { + babelPowerList50.push(_loc3_); + } + if(_loc3_.stageId < 4401 && _loc3_.stageId > 4300) + { + babelPowerList51.push(_loc3_); + } + if(_loc3_.stageId < 4501 && _loc3_.stageId > 4400) + { + babelPowerList52.push(_loc3_); + } + if(_loc3_.stageId < 4601 && _loc3_.stageId > 4500) + { + babelPowerList61.push(_loc3_); + } + if(_loc3_.stageId < 4701 && _loc3_.stageId > 4600) + { + babelPowerList62.push(_loc3_); + } + if(_loc3_.stageId < 4801 && _loc3_.stageId > 4700) + { + babelPowerList63.push(_loc3_); + } + if(_loc3_.stageId < 4901 && _loc3_.stageId > 4800) + { + babelPowerList64.push(_loc3_); + } + if(_loc3_.stageId < 5001 && _loc3_.stageId > 4900) + { + babelPowerList65.push(_loc3_); + } + if(_loc3_.stageId < 5101 && _loc3_.stageId > 5000) + { + babelPowerList66.push(_loc3_); + } + if(_loc3_.stageId < 5201 && _loc3_.stageId > 5100) + { + babelPowerList67.push(_loc3_); + } + if(_loc3_.stageId < 5301 && _loc3_.stageId > 5200) + { + babelPowerList68.push(_loc3_); + } + if(_loc3_.stageId < 5401 && _loc3_.stageId > 5300) + { + babelPowerList69.push(_loc3_); + } + if(_loc3_.stageId < 5501 && _loc3_.stageId > 5400) + { + babelPowerList70.push(_loc3_); + } + if(_loc3_.stageId < 5601 && _loc3_.stageId > 5500) + { + babelPowerList71.push(_loc3_); + } + if(_loc3_.stageId < 5701 && _loc3_.stageId > 5600) + { + babelPowerList72.push(_loc3_); + } + if(_loc3_.stageId < 5801 && _loc3_.stageId > 5700) + { + babelPowerList81.push(_loc3_); + } + if(_loc3_.stageId < 5901 && _loc3_.stageId > 5800) + { + babelPowerList82.push(_loc3_); + } + if(_loc3_.stageId < 6001 && _loc3_.stageId > 5900) + { + babelPowerList83.push(_loc3_); + } + if(_loc3_.stageId < 6101 && _loc3_.stageId > 6000) + { + babelPowerList84.push(_loc3_); + } + if(_loc3_.stageId < 6201 && _loc3_.stageId > 6100) + { + babelPowerList85.push(_loc3_); + } + if(_loc3_.stageId < 6301 && _loc3_.stageId > 6200) + { + babelPowerList86.push(_loc3_); + } + if(_loc3_.stageId < 6401 && _loc3_.stageId > 6300) + { + babelPowerList87.push(_loc3_); + } + if(_loc3_.stageId < 6501 && _loc3_.stageId > 6400) + { + babelPowerList88.push(_loc3_); + } + if(_loc3_.stageId < 6601 && _loc3_.stageId > 6500) + { + babelPowerList89.push(_loc3_); + } + if(_loc3_.stageId < 6701 && _loc3_.stageId > 6600) + { + babelPowerList90.push(_loc3_); + } + if(_loc3_.stageId < 6801 && _loc3_.stageId > 6700) + { + babelPowerList91.push(_loc3_); + } + if(_loc3_.stageId < 6901 && _loc3_.stageId > 6800) + { + babelPowerList92.push(_loc3_); + } + } + } + + public static function getBabelPowerList(param1:int) : Vector. + { + if(param1 == 1) + { + return babelPowerList1; + } + if(param1 == 2) + { + return babelPowerList2; + } + if(param1 == 3) + { + return babelPowerList3; + } + if(param1 == 4) + { + return babelPowerList4; + } + if(param1 == 5) + { + return babelPowerList5; + } + if(param1 == 6) + { + return babelPowerList6; + } + if(param1 == 7) + { + return babelPowerList7; + } + if(param1 == 8) + { + return babelPowerList8; + } + if(param1 == 9) + { + return babelPowerList9; + } + if(param1 == 10) + { + return babelPowerList10; + } + if(param1 == 11) + { + return babelPowerList11; + } + if(param1 == 12) + { + return babelPowerList12; + } + if(param1 == 13) + { + return babelPowerList13; + } + if(param1 == 14) + { + return babelPowerList14; + } + if(param1 == 15) + { + return babelPowerList15; + } + if(param1 == 16) + { + return babelPowerList16; + } + if(param1 == 17) + { + return babelPowerList17; + } + if(param1 == 18) + { + return babelPowerList18; + } + if(param1 == 19) + { + return babelPowerList19; + } + if(param1 == 20) + { + return babelPowerList20; + } + if(param1 == 21) + { + return babelPowerList21; + } + if(param1 == 22) + { + return babelPowerList22; + } + if(param1 == 23) + { + return babelPowerList23; + } + if(param1 == 24) + { + return babelPowerList24; + } + if(param1 == 25) + { + return babelPowerList25; + } + if(param1 == 26) + { + return babelPowerList31; + } + if(param1 == 27) + { + return babelPowerList32; + } + if(param1 == 28) + { + return babelPowerList33; + } + if(param1 == 29) + { + return babelPowerList34; + } + if(param1 == 30) + { + return babelPowerList35; + } + if(param1 == 31) + { + return babelPowerList36; + } + if(param1 == 32) + { + return babelPowerList37; + } + if(param1 == 33) + { + return babelPowerList38; + } + if(param1 == 34) + { + return babelPowerList41; + } + if(param1 == 35) + { + return babelPowerList42; + } + if(param1 == 36) + { + return babelPowerList43; + } + if(param1 == 37) + { + return babelPowerList44; + } + if(param1 == 38) + { + return babelPowerList45; + } + if(param1 == 39) + { + return babelPowerList46; + } + if(param1 == 40) + { + return babelPowerList47; + } + if(param1 == 41) + { + return babelPowerList48; + } + if(param1 == 42) + { + return babelPowerList49; + } + if(param1 == 43) + { + return babelPowerList50; + } + if(param1 == 44) + { + return babelPowerList51; + } + if(param1 == 45) + { + return babelPowerList52; + } + if(param1 == 46) + { + return babelPowerList61; + } + if(param1 == 47) + { + return babelPowerList62; + } + if(param1 == 48) + { + return babelPowerList63; + } + if(param1 == 49) + { + return babelPowerList64; + } + if(param1 == 50) + { + return babelPowerList65; + } + if(param1 == 51) + { + return babelPowerList66; + } + if(param1 == 52) + { + return babelPowerList67; + } + if(param1 == 53) + { + return babelPowerList68; + } + if(param1 == 54) + { + return babelPowerList69; + } + if(param1 == 55) + { + return babelPowerList70; + } + if(param1 == 56) + { + return babelPowerList71; + } + if(param1 == 57) + { + return babelPowerList72; + } + if(param1 == 58) + { + return babelPowerList81; + } + if(param1 == 59) + { + return babelPowerList82; + } + if(param1 == 60) + { + return babelPowerList83; + } + if(param1 == 61) + { + return babelPowerList84; + } + if(param1 == 62) + { + return babelPowerList85; + } + if(param1 == 63) + { + return babelPowerList86; + } + if(param1 == 64) + { + return babelPowerList87; + } + if(param1 == 65) + { + return babelPowerList88; + } + if(param1 == 66) + { + return babelPowerList89; + } + if(param1 == 67) + { + return babelPowerList90; + } + if(param1 == 68) + { + return babelPowerList91; + } + if(param1 == 69) + { + return babelPowerList92; + } + return null; + } + + public static function setRichesPower(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:StagePower = null; + for each(_loc2_ in param1) + { + _loc3_ = new StagePower(_loc2_); + richesPowerList.push(_loc3_); + } + } + + public static function getRichesPowerList() : Vector. + { + return richesPowerList; + } + + public static function setBabelDrop(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:DropData = null; + for each(_loc2_ in param1) + { + _loc3_ = new DropData(_loc2_); + if(_loc3_.stageId <= 100) + { + addToDropList1(_loc3_); + } + else if(_loc3_.stageId <= 200) + { + addToDropList2(_loc3_); + } + else if(_loc3_.stageId <= 300) + { + addToDropList3(_loc3_); + } + else if(_loc3_.stageId <= 400) + { + addToDropList4(_loc3_); + } + else + { + addToDropList5(_loc3_); + } + } + } + + private static function addToDropList1(param1:DropData) : void + { + var _loc2_:StageDropItem = null; + for each(_loc2_ in babelStageDropList1) + { + if(_loc2_.stageId == param1.stageId) + { + _loc2_.setDropData(param1); + return; + } + } + _loc2_ = new StageDropItem(param1); + babelStageDropList1.push(_loc2_); + } + + private static function addToDropList2(param1:DropData) : void + { + var _loc2_:StageDropItem = null; + for each(_loc2_ in babelStageDropList2) + { + if(_loc2_.stageId == param1.stageId) + { + _loc2_.setDropData(param1); + return; + } + } + _loc2_ = new StageDropItem(param1); + babelStageDropList2.push(_loc2_); + } + + private static function addToDropList3(param1:DropData) : void + { + var _loc2_:StageDropItem = null; + for each(_loc2_ in babelStageDropList3) + { + if(_loc2_.stageId == param1.stageId) + { + _loc2_.setDropData(param1); + return; + } + } + _loc2_ = new StageDropItem(param1); + babelStageDropList3.push(_loc2_); + } + + private static function addToDropList4(param1:DropData) : void + { + var _loc2_:StageDropItem = null; + for each(_loc2_ in babelStageDropList4) + { + if(_loc2_.stageId == param1.stageId) + { + _loc2_.setDropData(param1); + return; + } + } + _loc2_ = new StageDropItem(param1); + babelStageDropList4.push(_loc2_); + } + + private static function addToDropList5(param1:DropData) : void + { + var _loc2_:StageDropItem = null; + for each(_loc2_ in babelStageDropList5) + { + if(_loc2_.stageId == param1.stageId) + { + _loc2_.setDropData(param1); + return; + } + } + _loc2_ = new StageDropItem(param1); + babelStageDropList5.push(_loc2_); + } + + public static function getBabelDropList(param1:int) : Vector. + { + if(param1 == 1) + { + return babelStageDropList1; + } + if(param1 == 2) + { + return babelStageDropList2; + } + if(param1 == 3) + { + return babelStageDropList3; + } + if(param1 == 4) + { + return babelStageDropList4; + } + if(param1 == 5) + { + return babelStageDropList5; + } + return null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/data/StageDropItem.as b/flash_decompiled/com/view/ui/help/data/StageDropItem.as new file mode 100644 index 0000000..ab29442 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/data/StageDropItem.as @@ -0,0 +1,27 @@ +package com.view.ui.help.data +{ + public class StageDropItem + { + + public var stageId:int; + + public var npcName:String; + + public var list:Vector.; + + public function StageDropItem(param1:DropData) + { + super(); + this.list = new Vector.(); + this.npcName = param1.npcName; + this.stageId = param1.stageId; + this.setDropData(param1); + } + + public function setDropData(param1:DropData) : void + { + this.list.push(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/data/StagePower.as b/flash_decompiled/com/view/ui/help/data/StagePower.as new file mode 100644 index 0000000..ecc6aaa --- /dev/null +++ b/flash_decompiled/com/view/ui/help/data/StagePower.as @@ -0,0 +1,18 @@ +package com.view.ui.help.data +{ + public class StagePower + { + + public var stageId:int; + + public var stagePower:Number; + + public function StagePower(param1:Object) + { + super(); + this.stageId = param1.stageId; + this.stagePower = Math.round(param1.power); + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/mc/GameInfoMc.as b/flash_decompiled/com/view/ui/help/mc/GameInfoMc.as new file mode 100644 index 0000000..d021f4b --- /dev/null +++ b/flash_decompiled/com/view/ui/help/mc/GameInfoMc.as @@ -0,0 +1,54 @@ +package com.view.ui.help.mc +{ + import com.common.PublicMethod; + import flash.display.Sprite; + import flash.text.TextField; + + public class GameInfoMc extends Sprite + { + + private var flagText:TextField; + + private var titleText:TextField; + + private var contentText:TextField; + + public function GameInfoMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(625); + addChild(_loc1_); + _loc1_.y = 24; + this.flagText = PublicMethod.getTextFieldWithFillter(16773120,42); + this.titleText = PublicMethod.getTextFieldWithFillter(16777215,100); + this.contentText = PublicMethod.getTextFieldWithFillter(16773120,470); + addChild(this.flagText); + this.flagText.y = 4; + this.flagText.x = 5; + this.flagText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + addChild(this.titleText); + this.titleText.y = this.flagText.y; + this.titleText.x = this.flagText.x + this.flagText.width + 10; + addChild(this.contentText); + this.contentText.y = this.flagText.y; + this.contentText.x = this.titleText.x + this.titleText.width; + } + + public function setObj(param1:int, param2:Object) : void + { + if(param2 == null) + { + this.flagText.text = ""; + this.titleText.text = ""; + this.contentText.text = ""; + } + else + { + this.flagText.text = "" + param1; + this.titleText.htmlText = "" + param2.title; + this.contentText.text = "" + param2.content; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/help/mc/PowerMc.as b/flash_decompiled/com/view/ui/help/mc/PowerMc.as new file mode 100644 index 0000000..6be8182 --- /dev/null +++ b/flash_decompiled/com/view/ui/help/mc/PowerMc.as @@ -0,0 +1,145 @@ +package com.view.ui.help.mc +{ + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.ui.help.data.StagePower; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PowerMc extends Sprite + { + + private var stage1:TextField; + + private var power1:TextField; + + private var stage2:TextField; + + private var power2:TextField; + + private var stage3:TextField; + + private var power3:TextField; + + private var stage4:TextField; + + private var power4:TextField; + + private var bg1:Sprite; + + public function PowerMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,608,24); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg1.x = 4; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.stage1 = PublicMethod.getTextField(16777215,46); + this.power1 = PublicMethod.getTextField(16711680,85); + this.stage2 = PublicMethod.getTextField(16777215,46); + this.power2 = PublicMethod.getTextField(16711680,85); + this.stage3 = PublicMethod.getTextField(16777215,46); + this.power3 = PublicMethod.getTextField(16711680,85); + this.stage4 = PublicMethod.getTextField(16777215,46); + this.power4 = PublicMethod.getTextField(16711680,75); + addChild(this.stage1); + addChild(this.power1); + addChild(this.stage2); + addChild(this.power2); + addChild(this.stage3); + addChild(this.power3); + addChild(this.stage4); + addChild(this.power4); + this.stage1.x = 10; + this.stage1.y = 3; + this.power1.x = this.stage1.x + this.stage1.width + 10; + this.power1.y = this.stage1.y; + this.stage2.x = this.power1.x + this.power1.width + 15; + this.stage2.y = this.stage1.y; + this.power2.x = this.stage2.x + this.stage2.width + 10; + this.power2.y = this.stage1.y; + this.stage3.x = this.power2.x + this.power2.width + 15; + this.stage3.y = this.stage1.y; + this.power3.x = this.stage3.x + this.stage3.width + 10; + this.power3.y = this.stage1.y; + this.stage4.x = this.power3.x + this.power3.width + 15; + this.stage4.y = this.stage1.y; + this.power4.x = this.stage4.x + this.stage4.width + 10; + this.power4.y = this.stage1.y; + } + + private function mouseOut(param1:MouseEvent) : void + { + this.bg1.visible = false; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.bg1.visible = true; + } + + private function getStageId(param1:int) : String + { + var _loc2_:int = param1 % 100; + if(_loc2_ == 0) + { + _loc2_ = 100; + } + return "第" + _loc2_ + "层"; + } + + public function setData1(param1:StagePower) : void + { + this.stage1.text = this.getStageId(param1.stageId); + this.power1.text = Utils.getNewPower1(param1.stagePower) + ""; + } + + public function setData2(param1:StagePower) : void + { + this.stage2.text = this.getStageId(param1.stageId); + this.power2.text = Utils.getNewPower1(param1.stagePower) + ""; + } + + public function setData3(param1:StagePower) : void + { + this.stage3.text = this.getStageId(param1.stageId); + this.power3.text = Utils.getNewPower1(param1.stagePower) + ""; + } + + public function setData4(param1:StagePower) : void + { + this.stage4.text = this.getStageId(param1.stageId); + this.power4.text = Utils.getNewPower1(param1.stagePower) + ""; + } + + public function setNewData1(param1:StagePower, param2:int) : void + { + this.stage1.text = "第" + (param1.stageId - param2) + "层"; + this.power1.text = Utils.getNewPower1(param1.stagePower) + ""; + } + + public function setNewData2(param1:StagePower, param2:int) : void + { + this.stage2.text = "第" + (param1.stageId - param2) + "层"; + this.power2.text = Utils.getNewPower1(param1.stagePower) + ""; + } + + public function setNewData3(param1:StagePower, param2:int) : void + { + this.stage3.text = "第" + (param1.stageId - param2) + "层"; + this.power3.text = Utils.getNewPower1(param1.stagePower) + ""; + } + + public function setNewData4(param1:StagePower, param2:int) : void + { + this.stage4.text = "第" + (param1.stageId - param2) + "层"; + this.power4.text = Utils.getNewPower1(param1.stagePower) + ""; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/ChangeMiBaoUI.as b/flash_decompiled/com/view/ui/hero/ChangeMiBaoUI.as new file mode 100644 index 0000000..4ad4faf --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/ChangeMiBaoUI.as @@ -0,0 +1,311 @@ +package com.view.ui.hero +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.data.HeroSkillData; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ChangeMiBaoUI extends UIWindowBg + { + + private var bg2:UIWindowBg; + + private var bg3:UIWindowBg; + + private var currName:TextField; + + private var currEff:TextField; + + private var currBtn:Bitmap; + + private var btnArr:Vector.; + + private var toName:TextField; + + private var toEff:TextField; + + private var toBtn:Bitmap; + + private var mibaoObj:Object; + + private var isMain:int; + + private var currType:int; + + private var currLevel:int; + + private var preBtn:UIRadioBtn; + + private var toType:int; + + public function ChangeMiBaoUI() + { + var _loc6_:TextFormat = null; + var _loc7_:TextField = null; + var _loc11_:int = 0; + var _loc14_:UIButton = null; + var _loc15_:UIRadioBtn = null; + var _loc16_:TextField = null; + super(); + initSize(275,262); + loadTitle(UITitleConfig.title_mibaochongzhu); + addCloseBtn(); + initBg(); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(200,150); + bg1.addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = 4; + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(200,150); + bg1.addChild(this.bg3); + this.bg3.x = this.bg2.x + this.bg2.width + 50; + this.bg3.y = this.bg2.y; + var _loc1_:Bitmap = new Bitmap(face.getPng(ClassConfig.ui_toright)); + bg1.addChild(_loc1_); + _loc1_.x = this.bg2.x + this.bg2.width + 5; + _loc1_.y = this.bg2.y + 70; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(460,110); + bg1.addChild(_loc2_); + _loc2_.x = this.bg2.x; + _loc2_.y = this.bg2.y + this.bg2.height + 4; + var _loc3_:UITitleBg = new UITitleBg("目标密保",_loc2_.width); + _loc2_.addChild(_loc3_); + _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2); + var _loc4_:UITitleBg = new UITitleBg("当前效果",this.bg2.width); + this.bg2.addChild(_loc4_); + _loc4_.x = int(this.bg2.width / 2 - _loc4_.width / 2); + var _loc5_:UITitleBg = new UITitleBg("目标效果",this.bg3.width); + this.bg3.addChild(_loc5_); + _loc5_.x = int(this.bg3.width / 2 - _loc5_.width / 2); + _loc6_ = new TextFormat(); + _loc6_.leading = 6; + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.bg2.addChild(_loc7_); + _loc7_.text = "当前等级:"; + _loc7_.x = 15; + _loc7_.y = 65; + this.currName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg2.addChild(this.currName); + this.currName.x = _loc7_.x + _loc7_.width; + this.currName.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.bg2.addChild(_loc8_); + _loc8_.text = "当前效果:"; + _loc8_.x = _loc7_.x; + _loc8_.y = _loc7_.y + 20; + this.currEff = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + this.bg2.addChild(this.currEff); + this.currEff.wordWrap = true; + this.currEff.multiline = true; + this.currEff.height = 60; + this.currEff.x = this.currName.x; + this.currEff.y = _loc8_.y; + this.currEff.defaultTextFormat = _loc6_; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.bg3.addChild(_loc9_); + _loc9_.text = "目标等级:"; + _loc9_.x = 15; + _loc9_.y = 65; + this.toName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg3.addChild(this.toName); + this.toName.x = _loc9_.x + _loc9_.width; + this.toName.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.bg3.addChild(_loc10_); + _loc10_.text = "目标效果:"; + _loc10_.x = _loc9_.x; + _loc10_.y = _loc9_.y + 20; + this.toEff = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + this.bg3.addChild(this.toEff); + this.toEff.wordWrap = true; + this.toEff.multiline = true; + this.toEff.height = 60; + this.toEff.x = this.toName.x; + this.toEff.y = _loc10_.y; + this.toEff.defaultTextFormat = _loc6_; + this.btnArr = new Vector.(); + _loc11_ = 0; + while(_loc11_ < 8) + { + _loc15_ = new UIRadioBtn(); + this.btnArr.push(_loc15_); + _loc2_.addChild(_loc15_); + _loc15_.x = 25 + int(_loc11_ % 4) * 110; + _loc15_.y = 30 + int(_loc11_ / 4) * 24; + _loc15_.onClick = this.clickMiBao; + _loc16_ = PublicMethod.getTextFieldWithFillter(1048575,70); + _loc2_.addChild(_loc16_); + _loc16_.x = _loc15_.x + 20; + _loc16_.y = _loc15_.y + 2; + _loc16_.text = HeroSkillData.getMiBaoName(_loc11_ + 1); + _loc11_++; + } + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,400); + _loc12_.text = "消耗1个玄天焰可将当前秘宝无损失重铸,转换成同等级其他类型的秘宝。"; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(65280,400); + _loc13_.text = "重铸对象不能是已激活的秘宝。"; + _loc2_.addChild(_loc12_); + _loc2_.addChild(_loc13_); + _loc12_.x = 10; + _loc12_.y = 80; + _loc13_.x = 10; + _loc13_.y = _loc12_.y + 18; + _loc14_ = new UIButton("重 铸",2,10); + _loc2_.addChild(_loc14_); + _loc14_.x = 395; + _loc14_.y = 90; + _loc14_.onClick = this.changeMiBao; + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function setObj(param1:Object, param2:int) : void + { + this.mibaoObj = param1; + this.isMain = param2; + if(param2 == 1) + { + this.currType = this.mibaoObj.mb1; + this.currLevel = this.mibaoObj.mbl1; + } + else if(param2 == 2) + { + this.currType = this.mibaoObj.mb2; + this.currLevel = this.mibaoObj.mbl2; + } + else if(param2 == 3) + { + this.currType = this.mibaoObj.mb3; + this.currLevel = this.mibaoObj.mbl3; + } + else if(param2 == 4) + { + this.currType = this.mibaoObj.mb4; + this.currLevel = this.mibaoObj.mbl4; + } + this.setCurrEff(); + if(this.preBtn) + { + this.preBtn.setUnSelect(); + this.toType = 0; + } + } + + private function setCurrEff() : void + { + this.currName.htmlText = "当前等级:Lv" + this.currLevel + ""; + var _loc1_:Array = HeroSkillData.getEffValue(this.currType,this.currLevel,this.isMain).split(","); + var _loc2_:String = ""; + var _loc3_:int = 0; + while(_loc3_ < _loc1_.length) + { + _loc2_ = _loc2_ + _loc1_[_loc3_] + "
"; + _loc3_++; + } + this.currEff.htmlText = _loc2_; + this.addMiBaoPng(this.currType); + } + + private function setToEff() : void + { + this.toName.htmlText = "目标等级:Lv" + this.currLevel + ""; + var _loc1_:Array = HeroSkillData.getEffValue(this.toType,this.currLevel,this.isMain).split(","); + var _loc2_:String = ""; + var _loc3_:int = 0; + while(_loc3_ < _loc1_.length) + { + _loc2_ = _loc2_ + _loc1_[_loc3_] + "
"; + _loc3_++; + } + this.toEff.htmlText = _loc2_; + this.addToMiBaoPng(this.toType); + } + + private function addMiBaoPng(param1:int) : void + { + if(Boolean(this.currBtn) && this.bg2.contains(this.currBtn)) + { + this.bg2.removeChild(this.currBtn); + } + this.currBtn = new Bitmap(face.getPng("mibao_text_" + param1),"auto",true); + this.bg2.addChild(this.currBtn); + this.currBtn.x = 64; + this.currBtn.y = 35; + } + + private function addToMiBaoPng(param1:int) : void + { + if(Boolean(this.toBtn) && this.bg3.contains(this.toBtn)) + { + this.bg3.removeChild(this.toBtn); + } + this.toBtn = new Bitmap(face.getPng("mibao_text_" + param1),"auto",true); + this.bg3.addChild(this.toBtn); + this.toBtn.x = 64; + this.toBtn.y = 35; + } + + private function clickMiBao(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:* = undefined; + var _loc2_:UIRadioBtn = param1.currentTarget as UIRadioBtn; + for(_loc4_ in this.btnArr) + { + if(_loc2_ == this.btnArr[_loc4_]) + { + _loc3_ = int(_loc4_) + 1; + break; + } + } + if(_loc3_ == this.mibaoObj.mb1) + { + MessageBoxUI.getInstance().addMessage("重铸对象不能是已激活的秘宝。"); + return; + } + if(_loc3_ == this.mibaoObj.mb2) + { + MessageBoxUI.getInstance().addMessage("重铸对象不能是已激活的秘宝。"); + return; + } + this.toType = _loc3_; + if(this.preBtn) + { + this.preBtn.setUnSelect(); + } + this.preBtn = this.btnArr[this.toType - 1]; + this.preBtn.setSelect(); + this.setToEff(); + } + + private function changeMiBao(param1:MouseEvent) : void + { + if(this.toType == 0) + { + MessageBoxUI.getInstance().addMessage("请选择目标秘宝。"); + return; + } + ConnectService.getInstance().heroService.changeMiBao(this.mibaoObj.heroId,this.isMain,this.toType); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/Chaofu1.as b/flash_decompiled/com/view/ui/hero/Chaofu1.as new file mode 100644 index 0000000..e73c19d --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/Chaofu1.as @@ -0,0 +1,525 @@ +package com.view.ui.hero +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.utils.Utils; + import com.view.ui.hero.data.ChaoFuData; + import com.view.ui.hero.mc.ChaofuItem; + import com.view.ui.hero.mc.ChaofuItem1; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 Chaofu1 extends ChaofuBase + { + + private var loader:LoadResource; + + private var bg:Sprite; + + private var atkText:TextField; + + private var defText:TextField; + + private var hpText:TextField; + + private var aglText:TextField; + + private var leadText:TextField; + + private var packScrollPane:ScrollPane; + + private var packList:Vector.; + + private var packMc:Sprite; + + private var typeCombox:ComboBox; + + private var levelCombox:ComboBox; + + private var item1:ChaofuItem; + + private var item2:ChaofuItem; + + private var item3:ChaofuItem; + + private var item4:ChaofuItem; + + private var item5:ChaofuItem; + + private var item6:ChaofuItem; + + public function Chaofu1() + { + var _loc4_:ChaofuItem1 = null; + this.packMc = new Sprite(); + super(); + this.bg = new Sprite(); + addChild(this.bg); + this.loadBg(); + this.item1 = new ChaofuItem(1); + this.item2 = new ChaofuItem(2); + this.item3 = new ChaofuItem(3); + this.item4 = new ChaofuItem(4); + this.item5 = new ChaofuItem(5); + this.item6 = new ChaofuItem(6); + var _loc1_:int = 77; + addChild(this.item1); + this.item1.x = 10; + this.item1.y = 10; + addChild(this.item2); + this.item2.x = this.item1.x + _loc1_; + this.item2.y = this.item1.y; + addChild(this.item3); + this.item3.x = this.item1.x; + this.item3.y = this.item1.y + _loc1_; + addChild(this.item4); + this.item4.x = this.item2.x; + this.item4.y = this.item3.y; + addChild(this.item5); + this.item5.x = this.item1.x; + this.item5.y = this.item3.y + _loc1_; + addChild(this.item6); + this.item6.x = this.item2.x; + this.item6.y = this.item5.y; + this.atkText = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(this.atkText); + this.atkText.x = 10; + this.atkText.y = 235; + this.atkText.text = "攻击 +0"; + this.defText = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(this.defText); + this.defText.x = this.atkText.x; + this.defText.y = this.atkText.y + 18; + this.defText.text = "防御 +0"; + this.hpText = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(this.hpText); + this.hpText.x = this.atkText.x; + this.hpText.y = this.defText.y + 18; + this.hpText.text = "体力 +0"; + this.aglText = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(this.aglText); + this.aglText.x = this.atkText.x; + this.aglText.y = this.hpText.y + 18; + this.aglText.text = "敏捷 +0"; + this.leadText = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(this.leadText); + this.leadText.x = this.atkText.x; + this.leadText.y = this.aglText.y + 18; + this.leadText.text = "统率 +0"; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.align = "center"; + _loc2_.size = 12; + _loc2_.color = 16777215; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部类型", + "data":0 + }); + this.typeCombox.addItem({ + "label":"车撵", + "data":1 + }); + this.typeCombox.addItem({ + "label":"头冠", + "data":2 + }); + this.typeCombox.addItem({ + "label":"官服", + "data":3 + }); + this.typeCombox.addItem({ + "label":"绶带", + "data":4 + }); + this.typeCombox.addItem({ + "label":"朝板", + "data":5 + }); + this.typeCombox.addItem({ + "label":"官靴", + "data":6 + }); + addChild(this.typeCombox); + this.typeCombox.width = 80; + this.typeCombox.textField.setStyle("textFormat",_loc2_); + this.typeCombox.dropdown.setRendererStyle("textFormat",_loc2_); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + this.typeCombox.x = 165; + this.typeCombox.y = 10; + this.levelCombox = new ComboBox(); + this.levelCombox.addItem({ + "label":"全部品质", + "data":0 + }); + this.levelCombox.addItem({ + "label":"白色品质", + "data":1 + }); + this.levelCombox.addItem({ + "label":"绿色品质", + "data":2 + }); + this.levelCombox.addItem({ + "label":"蓝色品质", + "data":3 + }); + this.levelCombox.addItem({ + "label":"紫色品质", + "data":4 + }); + this.levelCombox.addItem({ + "label":"橙色品质", + "data":5 + }); + addChild(this.levelCombox); + this.levelCombox.width = 80; + this.levelCombox.textField.setStyle("textFormat",_loc2_); + this.levelCombox.dropdown.setRendererStyle("textFormat",_loc2_); + this.levelCombox.selectedItem = this.levelCombox.getItemAt(0); + this.levelCombox.x = 255; + this.levelCombox.y = this.typeCombox.y; + this.levelCombox.addEventListener(Event.CHANGE,this.selectColor); + this.typeCombox.addEventListener(Event.CHANGE,this.selectColor); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(365,298); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + addChild(this.packScrollPane); + this.packScrollPane.x = 164; + this.packScrollPane.y = 39; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 30) + { + _loc4_ = new ChaofuItem1(); + this.packList.push(_loc4_); + this.packMc.addChild(_loc4_); + _loc4_.x = (_loc4_.width - 2) * (_loc3_ % 6); + _loc4_.y = (_loc4_.height - 2) * int(_loc3_ / 6); + _loc3_++; + } + this.packScrollPane.update(); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOutTable); + addEventListener(MouseEvent.CLICK,this.mouseClickTable); + this.getPackItemList(); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_equChaofu,this.equResult); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_diuqiChaofu,this.equResult); + } + + private function mouseOutTable(param1:MouseEvent) : void + { + var _loc2_:ChaofuMenu = ChaofuMenu.instance; + if(_loc2_) + { + _loc2_.unShow(); + } + } + + private function mouseClickTable(param1:MouseEvent) : void + { + var _loc2_:ChaofuMenu = ChaofuMenu.instance; + if(_loc2_) + { + _loc2_.unShow(); + } + } + + private function itemChange(param1:DevEvent) : void + { + this.getPackItemList(); + this.loadEquItem(); + } + + private function equResult(param1:HeroEvent) : void + { + this.getPackItemList(); + } + + private function getPackItemList() : void + { + var _loc4_:* = undefined; + var _loc5_:ChaofuItem1 = null; + var _loc1_:int = int(this.typeCombox.selectedItem.data); + var _loc2_:int = int(this.levelCombox.selectedItem.data); + var _loc3_:Vector. = PakState.getALlChaofuItemList(_loc1_,_loc2_); + this.clearPackList(); + if(_loc3_ != null && _loc3_.length > 0) + { + for(_loc4_ in _loc3_) + { + if(_loc4_ > 29) + { + _loc5_ = new ChaofuItem1(); + this.packList.push(_loc5_); + this.packMc.addChild(_loc5_); + _loc5_.x = (_loc5_.width - 2) * (_loc4_ % 6); + _loc5_.y = (_loc5_.height - 2) * int(_loc4_ / 6); + } + this.packList[_loc4_].setItemObj(_loc3_[_loc4_]); + } + } + this.packScrollPane.update(); + } + + private function clearPackList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 29) + { + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function selectColor(param1:Event) : void + { + this.getPackItemList(); + } + + public function loadBg() : void + { + var _loc1_:String = "pic/bg/heroCourtDress.jpg"; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.bg.addChild(_loc2_); + _loc2_.x = 5; + _loc2_.y = 5; + _loc2_.height = 319 + 15; + _loc2_.width = 155; + } + + override public function setHero(param1:NewHero) : void + { + super.setHero(param1); + this.loadEquItem(); + } + + private function loadEquItem() : void + { + var _loc7_:int = 0; + var _loc8_:PackItem = null; + var _loc9_:int = 0; + var _loc10_:String = null; + var _loc11_:Array = null; + var _loc12_:String = null; + var _loc13_:Object = null; + var _loc14_:String = null; + var _loc15_:int = 0; + var _loc16_:int = 0; + var _loc17_:int = 0; + var _loc18_:int = 0; + var _loc19_:int = 0; + var _loc20_:int = 0; + var _loc21_:int = 0; + var _loc22_:int = 0; + var _loc1_:Number = 0; + var _loc2_:Number = 0; + var _loc3_:Number = 0; + var _loc4_:Number = 0; + var _loc5_:int = 0; + var _loc6_:int = 1; + while(_loc6_ < 7) + { + _loc7_ = int(heroObj["chaofu" + _loc6_]); + _loc8_ = PakState.getHeroEquipById(_loc7_); + this["item" + _loc6_].setItem(_loc8_); + if(_loc8_ != null) + { + _loc9_ = 0; + if(_loc8_.strongLevel > 100) + { + _loc9_ = _loc8_.strongLevel - 100; + } + _loc10_ = _loc8_.gemValue; + _loc11_ = _loc10_.split(";"); + for each(_loc12_ in _loc11_) + { + if(_loc12_.length > 0) + { + _loc14_ = _loc12_.split(",")[0]; + _loc15_ = int(_loc12_.split(",")[1]); + if(_loc14_ == "HERO_ATTACK") + { + if(_loc9_ > 0) + { + _loc1_ += _loc15_ * (_loc9_ + 1); + } + else + { + _loc1_ += _loc15_; + } + } + if(_loc14_ == "HERO_HP") + { + if(_loc9_ > 0) + { + _loc3_ += _loc15_ * (_loc9_ + 1); + } + else + { + _loc3_ += _loc15_; + } + } + if(_loc14_ == "HERO_DEFENCE") + { + if(_loc9_ > 0) + { + _loc2_ += _loc15_ * (_loc9_ + 1); + } + else + { + _loc2_ += _loc15_; + } + } + if(_loc14_ == "HERO_AGILE") + { + if(_loc9_ > 0) + { + _loc4_ += _loc15_ * (_loc9_ + 1); + } + else + { + _loc4_ += _loc15_; + } + } + if(_loc14_ == "HERO_LEAD") + { + if(_loc9_ > 0) + { + _loc5_ += _loc15_ * (_loc9_ + 1); + } + else + { + _loc5_ += _loc15_; + } + } + } + } + _loc13_ = _loc8_.chaofu; + if(_loc13_) + { + _loc16_ = int(_loc13_.level1); + _loc17_ = int(_loc13_.level2); + _loc18_ = int(_loc13_.level3); + _loc19_ = int(_loc13_.pro1); + _loc20_ = int(_loc13_.pro2); + _loc21_ = int(_loc13_.pro3); + _loc22_ = int(_loc13_.hpro); + if(_loc16_ > 0) + { + if(_loc19_ == 1) + { + _loc1_ += ChaoFuData.getXilianProperty(_loc16_); + } + if(_loc19_ == 2) + { + _loc2_ += ChaoFuData.getXilianProperty(_loc16_); + } + if(_loc19_ == 3) + { + _loc3_ += ChaoFuData.getXilianProperty(_loc16_); + } + if(_loc19_ == 4) + { + _loc4_ += ChaoFuData.getXilianProperty(_loc16_); + } + } + if(_loc17_ > 0) + { + if(_loc20_ == 1) + { + _loc1_ += ChaoFuData.getXilianProperty(_loc17_); + } + if(_loc20_ == 2) + { + _loc2_ += ChaoFuData.getXilianProperty(_loc17_); + } + if(_loc20_ == 3) + { + _loc3_ += ChaoFuData.getXilianProperty(_loc17_); + } + if(_loc20_ == 4) + { + _loc4_ += ChaoFuData.getXilianProperty(_loc17_); + } + } + if(_loc18_ > 0) + { + if(_loc21_ == 1) + { + _loc1_ += ChaoFuData.getXilianProperty(_loc18_); + } + if(_loc21_ == 2) + { + _loc2_ += ChaoFuData.getXilianProperty(_loc18_); + } + if(_loc21_ == 3) + { + _loc3_ += ChaoFuData.getXilianProperty(_loc18_); + } + if(_loc21_ == 4) + { + _loc4_ += ChaoFuData.getXilianProperty(_loc18_); + } + } + if(_loc22_ > 0) + { + if(_loc22_ == 1) + { + _loc1_ += ChaoFuData.getXilianProperty(_loc18_); + } + if(_loc22_ == 2) + { + _loc2_ += ChaoFuData.getXilianProperty(_loc18_); + } + if(_loc22_ == 3) + { + _loc3_ += ChaoFuData.getXilianProperty(_loc18_); + } + if(_loc22_ == 4) + { + _loc4_ += ChaoFuData.getXilianProperty(_loc18_); + } + } + } + } + _loc6_++; + } + this.atkText.text = "攻击 +" + _loc1_; + this.defText.text = "防御 +" + _loc2_; + this.hpText.text = "体力 +" + _loc3_; + this.aglText.text = "敏捷 +" + _loc4_; + this.leadText.text = "统率 +" + _loc5_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/Chaofu2.as b/flash_decompiled/com/view/ui/hero/Chaofu2.as new file mode 100644 index 0000000..bf75585 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/Chaofu2.as @@ -0,0 +1,817 @@ +package com.view.ui.hero +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.utils.Utils; + import com.view.cache.ImgCache; + import com.view.newui.UIButton; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.newui.UIExpBar; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.data.ChaoFuData; + import com.view.ui.hero.mc.ChaofuItem2; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 Chaofu2 extends ChaofuBase + { + + private var typeCombox:ComboBox; + + private var titleText1:TextField; + + private var strongLvText1:TextField; + + private var strongBtn:UIButton; + + private var strongBtn1:UIButton; + + private var strongBtn2:UIButton; + + private var strongBtn3:UIButton; + + private var strongBtn4:UIButton; + + private var mulStringBtn:UIButton; + + private var itemNameText:TextField; + + private var expBar:UIExpBar; + + private var itemImgMc:Sprite; + + private var currProText:TextField; + + private var nextProText:TextField; + + private var itemNumsText1:TextField; + + private var itemNumsText2:TextField; + + private var label2:TextField; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var showPackItem:UICheckBtn; + + private var showPackItemStatus:Boolean; + + private var preItemMc:ChaofuItem2; + + private var loadItemPng:LoadResource; + + private var itemImg:Bitmap; + + private var piliangUI:ChaofuStrongMc; + + public function Chaofu2() + { + var _loc6_:UIWindowBg = null; + var _loc10_:ChaofuItem2 = null; + super(); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部类型", + "data":0 + }); + this.typeCombox.addItem({ + "label":"车撵", + "data":1 + }); + this.typeCombox.addItem({ + "label":"头冠", + "data":2 + }); + this.typeCombox.addItem({ + "label":"官服", + "data":3 + }); + this.typeCombox.addItem({ + "label":"绶带", + "data":4 + }); + this.typeCombox.addItem({ + "label":"朝板", + "data":5 + }); + this.typeCombox.addItem({ + "label":"官靴", + "data":6 + }); + addChild(this.typeCombox); + this.typeCombox.width = 80; + this.typeCombox.textField.setStyle("textFormat",_loc1_); + this.typeCombox.dropdown.setRendererStyle("textFormat",_loc1_); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + this.typeCombox.x = 116; + this.typeCombox.y = 9; + this.typeCombox.addEventListener(Event.CHANGE,this.selectType); + var _loc2_:Array = ["朝服名称","强化次数"]; + var _loc3_:Array = [130,70]; + var _loc4_:UITable = new UITable(); + _loc4_.drawLine = false; + _loc4_.install(11,_loc2_,_loc3_); + addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 39; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(196,276); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc4_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 11) + { + _loc10_ = new ChaofuItem2(); + this.packMc.addChild(_loc10_); + this.packList.push(_loc10_); + _loc10_.y = _loc5_ * 25; + _loc10_.x = 3; + _loc10_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + this.packScrollPane.update(); + _loc6_ = new UIWindowBg(); + _loc6_.initThirdPanel(310,325); + addChild(_loc6_); + _loc6_.x = 205; + _loc6_.y = 5; + var _loc7_:UITitleBg = new UITitleBg("所选装备",_loc6_.width); + _loc6_.addChild(_loc7_); + _loc7_.x = int(_loc6_.width / 2 - _loc7_.width / 2); + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(16777215,90); + _loc8_.text = "显示背包朝服"; + addChild(_loc8_); + _loc8_.x = 27; + _loc8_.y = 12; + this.showPackItem = new UICheckBtn(); + addChild(this.showPackItem); + this.showPackItem.x = 4; + this.showPackItem.y = 12; + this.showPackItem.onClick = this.showPack; + this.showPackItem.buttonMode = true; + var _loc9_:Bitmap = new Bitmap(face.getPng(UIConfig.bigItem_lock_skin)); + _loc6_.addChild(_loc9_); + _loc9_.x = 130; + _loc9_.y = 34; + this.itemImgMc = new Sprite(); + _loc6_.addChild(this.itemImgMc); + this.itemImgMc.x = _loc9_.x + 6; + this.itemImgMc.y = _loc9_.y + 6; + this.itemNameText = PublicMethod.getTextFieldWithFillter(16777215,80); + _loc6_.addChild(this.itemNameText); + this.itemNameText.x = 120; + this.itemNameText.y = 106; + this.itemNameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemNameText.text = "道具名称"; + this.titleText1 = PublicMethod.getTextFieldWithFillter(16763749,80); + this.titleText1.text = "强化进度:"; + _loc6_.addChild(this.titleText1); + this.titleText1.x = 40; + this.titleText1.y = 130; + this.expBar = new UIExpBar(); + this.expBar.setWidth(150); + this.expBar.init(); + this.expBar.setMaxValue(10); + this.expBar.setCurValue(0); + _loc6_.addChild(this.expBar); + this.expBar.x = this.titleText1.x + this.titleText1.width; + this.expBar.y = this.titleText1.y + 3; + this.strongLvText1 = PublicMethod.getTextFieldWithFillter(16763749,65); + this.strongLvText1.text = ""; + _loc6_.addChild(this.strongLvText1); + this.strongLvText1.x = this.titleText1.x + this.titleText1.width + 15; + this.strongLvText1.y = this.titleText1.y; + this.currProText = PublicMethod.getTextFieldWithFillter(16763749,270); + this.currProText.text = "当前属性"; + _loc6_.addChild(this.currProText); + this.currProText.x = 40; + this.currProText.y = this.titleText1.y + 30; + this.nextProText = PublicMethod.getTextFieldWithFillter(16763749,270); + this.nextProText.text = "下一级属性"; + _loc6_.addChild(this.nextProText); + this.nextProText.x = 40; + this.nextProText.y = this.currProText.y + 30; + this.itemNumsText1 = PublicMethod.getTextFieldWithFillter(16777215,245); + this.itemNumsText1.text = "燎日雪雁:0"; + _loc6_.addChild(this.itemNumsText1); + this.itemNumsText1.x = 40; + this.itemNumsText1.y = this.nextProText.y + 30; + this.itemNumsText2 = PublicMethod.getTextFieldWithFillter(16777215,245); + this.itemNumsText2.text = "燎日雪雁:0"; + _loc6_.addChild(this.itemNumsText2); + this.itemNumsText2.x = this.itemNumsText1.x; + this.itemNumsText2.y = this.itemNumsText1.y; + this.label2 = PublicMethod.getTextFieldWithFillter(16777215,265); + this.label2.text = "每次强化需要消耗1个燎日雪雁"; + _loc6_.addChild(this.label2); + this.label2.x = 40; + this.label2.y = this.itemNumsText1.y + 30; + this.strongBtn = new UIButton("强 化",2); + _loc6_.addChild(this.strongBtn); + this.strongBtn.x = 100; + this.strongBtn.y = 280; + this.strongBtn.onClick = this.strongEqu; + this.strongBtn1 = new UIButton("强 化",2); + _loc6_.addChild(this.strongBtn1); + this.strongBtn1.x = 20; + this.strongBtn1.y = this.strongBtn.y; + this.strongBtn1.onClick = this.strongEqu1; + this.strongBtn2 = new UIButton("强50次",2); + _loc6_.addChild(this.strongBtn2); + this.strongBtn2.x = this.strongBtn1.x + 75; + this.strongBtn2.y = this.strongBtn.y; + this.strongBtn2.onClick = this.strongEqu2; + this.strongBtn3 = new UIButton("强200次",2); + _loc6_.addChild(this.strongBtn3); + this.strongBtn3.x = this.strongBtn2.x + 75; + this.strongBtn3.y = this.strongBtn.y; + this.strongBtn3.onClick = this.strongEqu3; + this.strongBtn4 = new UIButton("强500次",2); + _loc6_.addChild(this.strongBtn4); + this.strongBtn4.x = this.strongBtn3.x + 75; + this.strongBtn4.y = this.strongBtn.y; + this.strongBtn4.onClick = this.strongEqu4; + this.mulStringBtn = new UIButton("批量强化",2); + _loc6_.addChild(this.mulStringBtn); + this.mulStringBtn.x = this.strongBtn.x + 82; + this.mulStringBtn.y = this.strongBtn.y; + this.mulStringBtn.onClick = this.piliangStrong; + this.strongBtn2.visible = false; + this.strongBtn3.visible = false; + this.strongBtn4.visible = false; + this.mulStringBtn.visible = false; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_qianghuaChaofu,this.strongResult); + } + + private function showPack(param1:MouseEvent) : void + { + if(this.showPackItemStatus) + { + this.showPackItemStatus = false; + this.showPackItem.setUnSelect(); + } + else + { + this.showPackItemStatus = true; + this.showPackItem.setSelect(); + } + this.loadEquItem(); + } + + private function selectType(param1:Event) : void + { + this.loadEquItem(); + } + + private function setItemNums() : void + { + var _loc1_:int = PakState.getItemsByEntId(10372353); + var _loc2_:int = PakState.getItemsByEntId(20212325); + this.itemNumsText1.htmlText = "燎日雪雁:" + _loc1_ + ""; + this.itemNumsText2.htmlText = "高级燎日雪雁:" + _loc2_ + ""; + } + + override public function setHero(param1:NewHero) : void + { + super.setHero(param1); + this.loadEquItem(); + this.setItemNums(); + } + + private function loadEquItem() : void + { + var _loc3_:Vector. = null; + var _loc4_:* = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:PackItem = null; + var _loc8_:PackItem = null; + var _loc9_:ChaofuItem2 = null; + var _loc1_:Vector. = new Vector.(); + var _loc2_:int = int(this.typeCombox.selectedItem.data); + if(this.showPackItemStatus) + { + _loc3_ = PakState.getALlChaofuItemList(_loc2_,0); + _loc4_ = 1; + while(_loc4_ < 7) + { + _loc6_ = int(heroObj["chaofu" + _loc4_]); + if(_loc6_ > 0) + { + _loc7_ = PakState.getHeroEquipById(_loc6_); + _loc7_.heroId = heroObj.heroId; + _loc1_.push(_loc7_); + } + _loc4_++; + } + _loc5_ = 0; + while(_loc5_ < _loc3_.length) + { + _loc1_.push(_loc3_[_loc5_]); + _loc5_++; + } + } + else + { + _loc4_ = 1; + while(_loc4_ < 7) + { + _loc6_ = int(heroObj["chaofu" + _loc4_]); + _loc8_ = PakState.getHeroEquipById(_loc6_); + if(_loc8_ != null) + { + _loc8_.heroId = heroObj.heroId; + _loc1_.push(_loc8_); + } + _loc4_++; + } + } + this.clearPackList(); + if(_loc1_.length == 0) + { + this.preItemMc = null; + this.setSelectItem(null); + return; + } + if(_loc2_ > 0) + { + _loc4_ = int(_loc1_.length - 1); + while(_loc4_ >= 0) + { + if(_loc1_[_loc4_].childType != _loc2_) + { + _loc1_.splice(_loc4_,1); + } + _loc4_--; + } + } + if(_loc1_.length == 0) + { + this.preItemMc = null; + this.setSelectItem(null); + return; + } + if(_loc1_ != null && _loc1_.length > 0) + { + _loc5_ = 0; + while(_loc5_ < _loc1_.length) + { + if(_loc5_ > 10) + { + _loc9_ = new ChaofuItem2(); + this.packMc.addChild(_loc9_); + this.packList.push(_loc9_); + _loc9_.y = 25 * _loc5_; + _loc9_.x = 3; + _loc9_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + this.packList[_loc5_].setObj(_loc1_[_loc5_]); + _loc5_++; + } + } + this.packScrollPane.update(); + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + this.preItemMc = this.packList[0]; + } + this.preItemMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + + private function clearPackList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 10) + { + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:ChaofuItem2 = param1.currentTarget as ChaofuItem2; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.preItemMc) + { + this.preItemMc.setClick(false); + } + this.preItemMc = _loc2_; + this.preItemMc.setClick(true); + this.setSelectItem(_loc2_.getItemObj()); + } + + private function setSelectItem(param1:PackItem) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:Object = null; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:int = 0; + if(Boolean(this.itemImg) && this.itemImgMc.contains(this.itemImg)) + { + this.itemImgMc.removeChild(this.itemImg); + } + if(param1 != null) + { + _loc2_ = ServerConfig.IMAGE_ITEM_URL + param1.viewMap.iconPath; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(_loc2_,this.loadPngBack); + } + this.itemNameText.htmlText = param1.viewMap.showName; + _loc3_ = param1.itemId; + if(param1.strongLevel >= 100) + { + _loc4_ = param1.strongLevel - 100; + this.itemNumsText1.visible = false; + this.itemNumsText2.visible = true; + this.strongBtn.visible = false; + this.strongBtn1.visible = true; + this.titleText1.text = "高级强化等级:"; + this.strongLvText1.visible = true; + this.expBar.visible = false; + this.strongLvText1.text = _loc4_ + " 级"; + _loc5_ = ChaoFuData.getStrongItems(); + this.label2.text = "高级强化每级需要消耗" + _loc5_ + "个高级燎日雪雁"; + this.currProText.text = "当前属性:" + this.getProStrByLv(param1.gemValue,_loc4_ + 1); + this.nextProText.text = "下一级属性:" + this.getProStrByLv(param1.gemValue,_loc4_ + 2); + this.mulStringBtn.visible = false; + this.strongBtn2.visible = true; + this.strongBtn3.visible = true; + this.strongBtn4.visible = true; + } + else + { + this.label2.text = "每次强化需要消耗1个燎日雪雁"; + this.titleText1.text = "强化进度:"; + this.itemNumsText2.visible = false; + this.itemNumsText1.visible = true; + this.strongBtn.visible = true; + this.strongBtn1.visible = false; + this.strongLvText1.visible = false; + this.expBar.visible = true; + this.mulStringBtn.visible = true; + this.strongBtn2.visible = false; + this.strongBtn3.visible = false; + this.strongBtn4.visible = false; + _loc6_ = ChaoFuData.getObjByEntid(_loc3_ + 1); + this.currProText.text = "当前属性:" + this.getProStr(param1.gemValue); + if(_loc6_) + { + this.nextProText.text = "下一级属性:" + this.getProStr(_loc6_.gemValue); + } + else + { + this.nextProText.text = "下一级属性:已达顶级"; + } + _loc7_ = param1.strongLevel; + _loc8_ = 0; + _loc9_ = 0; + if(_loc7_ < 10) + { + _loc8_ = _loc7_; + _loc9_ = 10; + } + else if(_loc7_ < 30) + { + _loc8_ = _loc7_ - 10; + _loc9_ = 20; + } + else if(_loc7_ < 60) + { + _loc8_ = _loc7_ - 30; + _loc9_ = 30; + } + else if(_loc7_ < 100) + { + _loc8_ = _loc7_ - 60; + _loc9_ = 40; + } + else + { + _loc8_ = 0; + _loc9_ = 50; + } + this.expBar.setMaxValue(_loc9_); + this.expBar.setCurValue(_loc8_); + } + } + else + { + this.itemNameText.text = ""; + this.currProText.text = ""; + this.nextProText.text = ""; + this.expBar.setMaxValue(0); + this.expBar.setCurValue(0); + } + } + + private function getProStr(param1:String) : String + { + var _loc4_:String = null; + var _loc5_:String = null; + var _loc6_:int = 0; + var _loc2_:String = ""; + var _loc3_:Array = param1.split(";"); + for each(_loc4_ in _loc3_) + { + if(_loc4_.length > 0) + { + _loc5_ = _loc4_.split(",")[0]; + _loc6_ = int(_loc4_.split(",")[1]); + if(_loc5_ == "HERO_ATTACK") + { + _loc2_ = _loc2_ + "攻击 +" + _loc6_ + " "; + } + if(_loc5_ == "HERO_HP") + { + _loc2_ = _loc2_ + "体力 +" + _loc6_ + " "; + } + if(_loc5_ == "HERO_DEFENCE") + { + _loc2_ = _loc2_ + "防御 +" + _loc6_ + " "; + } + if(_loc5_ == "HERO_AGILE") + { + _loc2_ = _loc2_ + "敏捷 +" + _loc6_ + " "; + } + if(_loc5_ == "HERO_LEAD") + { + _loc2_ = _loc2_ + "统率 +" + _loc6_ + " "; + } + } + } + return _loc2_; + } + + private function getProStrByLv(param1:String, param2:int) : String + { + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:int = 0; + var _loc3_:String = ""; + var _loc4_:Array = param1.split(";"); + for each(_loc5_ in _loc4_) + { + if(_loc5_.length > 0) + { + _loc6_ = _loc5_.split(",")[0]; + _loc7_ = int(_loc5_.split(",")[1]); + if(_loc6_ == "HERO_ATTACK") + { + _loc3_ = _loc3_ + "攻击 +" + _loc7_ * param2 + " "; + } + if(_loc6_ == "HERO_HP") + { + _loc3_ = _loc3_ + "体力 +" + _loc7_ * param2 + " "; + } + if(_loc6_ == "HERO_DEFENCE") + { + _loc3_ = _loc3_ + "防御 +" + _loc7_ * param2 + " "; + } + if(_loc6_ == "HERO_AGILE") + { + _loc3_ = _loc3_ + "敏捷 +" + _loc7_ * param2 + " "; + } + if(_loc6_ == "HERO_LEAD") + { + _loc3_ = _loc3_ + "统率 +" + _loc7_ * param2 + " "; + } + } + } + return _loc3_; + } + + private function loadPngBack(param1:Event) : void + { + if(this.preItemMc.getItemObj() == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemImgMc.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + } + + private function piliangStrong(param1:MouseEvent) : void + { + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要强化的装备"); + return; + } + if(this.piliangUI == null) + { + this.piliangUI = new ChaofuStrongMc(); + this.piliangUI.x = int(this.width / 2 - this.piliangUI.width / 2); + this.piliangUI.y = int(this.height / 2 - this.piliangUI.height / 2); + } + addChild(this.piliangUI); + this.piliangUI.seItemId(this.preItemMc.getItemObj().id); + this.piliangUI.setHeroId(this.preItemMc.getItemObj().heroId); + } + + private function strongEqu(param1:MouseEvent) : void + { + if(this.preItemMc == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + var _loc2_:PackItem = this.preItemMc.getItemObj(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + if(_loc2_.color == 5) + { + MessageBoxUI.getInstance().addMessage("该朝服已强化到顶级,无法继续强化"); + return; + } + var _loc3_:int = PakState.getItemsByEntId(10372353); + if(_loc3_ == 0) + { + MessageBoxUI.getInstance().addMessage("燎日雪雁数量不足"); + return; + } + var _loc4_:int = _loc2_.id; + var _loc5_:int = _loc2_.heroId; + ConnectService.getInstance().heroService.qianghua(_loc4_,1,_loc5_); + } + + private function strongEqu1(param1:MouseEvent) : void + { + if(this.preItemMc == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + var _loc2_:PackItem = this.preItemMc.getItemObj(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + var _loc3_:int = PakState.getItemsByEntId(20212325); + var _loc4_:int = ChaoFuData.getStrongItems(); + if(_loc3_ < _loc4_) + { + MessageBoxUI.getInstance().addMessage("高级燎日雪雁数量不足"); + return; + } + var _loc5_:int = _loc2_.id; + var _loc6_:int = _loc2_.heroId; + ConnectService.getInstance().heroService.supqianghua(_loc5_,1,_loc6_); + } + + private function strongEqu2(param1:MouseEvent) : void + { + if(this.preItemMc == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + var _loc2_:PackItem = this.preItemMc.getItemObj(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + var _loc3_:int = PakState.getItemsByEntId(20212325); + var _loc4_:int = ChaoFuData.getStrongItems(); + if(_loc3_ < 50 * _loc4_) + { + MessageBoxUI.getInstance().addMessage("高级燎日雪雁数量不足"); + return; + } + var _loc5_:int = _loc2_.id; + var _loc6_:int = _loc2_.heroId; + ConnectService.getInstance().heroService.supqianghua(_loc5_,50,_loc6_); + } + + private function strongEqu3(param1:MouseEvent) : void + { + if(this.preItemMc == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + var _loc2_:PackItem = this.preItemMc.getItemObj(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + var _loc3_:int = PakState.getItemsByEntId(20212325); + var _loc4_:int = ChaoFuData.getStrongItems(); + if(_loc3_ < 200 * _loc4_) + { + MessageBoxUI.getInstance().addMessage("高级燎日雪雁数量不足"); + return; + } + var _loc5_:int = _loc2_.id; + var _loc6_:int = _loc2_.heroId; + ConnectService.getInstance().heroService.supqianghua(_loc5_,200,_loc6_); + } + + private function strongEqu4(param1:MouseEvent) : void + { + if(this.preItemMc == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + var _loc2_:PackItem = this.preItemMc.getItemObj(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请先选择需要强化的朝服"); + return; + } + var _loc3_:int = PakState.getItemsByEntId(20212325); + var _loc4_:int = ChaoFuData.getStrongItems(); + if(_loc3_ < 500 * _loc4_) + { + MessageBoxUI.getInstance().addMessage("高级燎日雪雁数量不足"); + return; + } + var _loc5_:int = _loc2_.id; + var _loc6_:int = _loc2_.heroId; + ConnectService.getInstance().heroService.supqianghua(_loc5_,500,_loc6_); + } + + private function itemChange(param1:DevEvent) : void + { + this.loadEquItem(); + this.setItemNums(); + } + + private function strongResult(param1:HeroEvent) : void + { + this.loadEquItem(); + this.setItemNums(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/Chaofu3.as b/flash_decompiled/com/view/ui/hero/Chaofu3.as new file mode 100644 index 0000000..0a6b84b --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/Chaofu3.as @@ -0,0 +1,319 @@ +package com.view.ui.hero +{ + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.mc.ChaofuItem3; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class Chaofu3 extends ChaofuBase + { + + private var levelCombox:ComboBox; + + private var selectAllItem:UICheckBtn; + + private var selectAllItemStatus:Boolean; + + private var itemText1:TextField; + + private var itemText2:TextField; + + private var itemText3:TextField; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + public function Chaofu3() + { + var _loc5_:UITable = null; + var _loc7_:UIWindowBg = null; + var _loc12_:TextField = null; + var _loc15_:ChaofuItem3 = null; + super(); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.levelCombox = new ComboBox(); + this.levelCombox.addItem({ + "label":"全部品质", + "data":0 + }); + this.levelCombox.addItem({ + "label":"白色品质", + "data":1 + }); + this.levelCombox.addItem({ + "label":"绿色品质", + "data":2 + }); + this.levelCombox.addItem({ + "label":"蓝色品质", + "data":3 + }); + this.levelCombox.addItem({ + "label":"紫色品质", + "data":4 + }); + this.levelCombox.addItem({ + "label":"橙色品质", + "data":5 + }); + addChild(this.levelCombox); + this.levelCombox.width = 80; + this.levelCombox.textField.setStyle("textFormat",_loc1_); + this.levelCombox.dropdown.setRendererStyle("textFormat",_loc1_); + this.levelCombox.selectedItem = this.levelCombox.getItemAt(0); + this.levelCombox.x = 5; + this.levelCombox.y = 9; + this.levelCombox.addEventListener(Event.CHANGE,this.selectColor); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + _loc2_.text = "选择所有"; + addChild(_loc2_); + _loc2_.x = 117; + _loc2_.y = 12; + this.selectAllItem = new UICheckBtn(); + addChild(this.selectAllItem); + this.selectAllItem.x = 97; + this.selectAllItem.y = 12; + this.selectAllItem.onClick = this.selectAll; + this.selectAllItem.buttonMode = true; + var _loc3_:Array = ["朝服名称","强化次数"]; + var _loc4_:Array = [130,70]; + _loc5_ = new UITable(); + _loc5_.drawLine = false; + _loc5_.install(11,_loc3_,_loc4_); + _loc5_.x = 4; + _loc5_.y = 39; + addChild(_loc5_); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(196,276); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc5_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 11) + { + _loc15_ = new ChaofuItem3(); + this.packMc.addChild(_loc15_); + this.packList.push(_loc15_); + _loc15_.y = _loc6_ * 25; + _loc15_.x = 3; + _loc6_++; + } + this.packScrollPane.update(); + _loc7_ = new UIWindowBg(); + _loc7_.initThirdPanel(310,325); + addChild(_loc7_); + _loc7_.x = 205; + _loc7_.y = 5; + var _loc8_:UITitleBg = new UITitleBg("分解规则",_loc7_.width); + _loc7_.addChild(_loc8_); + _loc8_.x = int(_loc7_.width / 2 - _loc8_.width / 2); + var _loc9_:String = "1、列表里仅显示未装备、未镶嵌的朝服。
"; + _loc9_ = _loc9_ + "2、分解朝服可获得锦缎,该材料可以洗练朝服。
"; + _loc9_ = _loc9_ + "3、分解强化的朝服会返还100%之前强化消耗的燎日雪雁。
"; + _loc9_ = _loc9_ + "4、已洗练的朝服会根据洗练的等级返还一定数量的锦缎。"; + var _loc10_:TextField = new TextField(); + _loc10_.width = 280; + _loc10_.height = 130; + _loc10_.wordWrap = true; + _loc10_.selectable = false; + _loc10_.multiline = true; + var _loc11_:TextFormat = new TextFormat(); + _loc11_.leading = 4; + _loc11_.font = "SimSun"; + _loc11_.color = 16777215; + _loc10_.defaultTextFormat = _loc11_; + _loc10_.htmlText = _loc9_; + _loc7_.addChild(_loc10_); + _loc10_.x = 20; + _loc10_.y = 35; + _loc10_.filters = [PublicGlow.getInstance().blackGlow]; + _loc2_ = PublicMethod.getTextFieldWithFillter(16777215,40); + _loc2_.text = "锦缎:"; + _loc12_ = PublicMethod.getTextFieldWithFillter(16777215,60); + _loc12_.text = "燎日雪雁:"; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(16777215,60); + _loc13_.text = "高级燎日雪雁:"; + addChild(_loc2_); + _loc2_.x = 230; + _loc2_.y = 255; + addChild(_loc12_); + _loc12_.x = 400; + _loc12_.y = _loc2_.y; + addChild(_loc13_); + _loc13_.x = _loc2_.x; + _loc13_.y = _loc2_.y + 20; + this.itemText1 = PublicMethod.getTextFieldWithFillter(65280,100); + addChild(this.itemText1); + this.itemText1.x = _loc2_.x + _loc2_.width; + this.itemText1.y = _loc2_.y; + this.itemText2 = PublicMethod.getTextFieldWithFillter(65280,100); + addChild(this.itemText2); + this.itemText2.x = _loc12_.x + _loc12_.width; + this.itemText2.y = _loc2_.y; + this.itemText1.text = "0"; + this.itemText2.text = "0"; + this.itemText3 = PublicMethod.getTextFieldWithFillter(65280,100); + addChild(this.itemText3); + this.itemText3.x = _loc13_.x + _loc13_.width; + this.itemText3.y = _loc13_.y; + this.itemText3.text = "0"; + var _loc14_:UIButton = new UIButton("分 解",2); + addChild(_loc14_); + _loc14_.x = 330; + _loc14_.y = 300; + _loc14_.onClick = this.fenjie; + this.getPackItemList(); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_fenjieChaofu,this.fenjieResult); + } + + private function selectAll(param1:MouseEvent) : void + { + if(this.selectAllItemStatus) + { + this.selectAllItemStatus = false; + this.selectAllItem.setUnSelect(); + } + else + { + this.selectAllItem.setSelect(); + this.selectAllItemStatus = true; + } + this.setAllSelect(); + } + + private function fenjie(param1:MouseEvent) : void + { + var _loc3_:ChaofuItem3 = null; + var _loc4_:Object = null; + var _loc2_:Array = new Array(); + for each(_loc3_ in this.packList) + { + if(_loc3_.getItemObj() != null && _loc3_.getSelectStatus()) + { + _loc2_.push(_loc3_.getItemObj().id); + } + } + if(_loc2_.length == 0) + { + MessageBoxUI.getInstance().addMessage("请选择要分解的装备"); + return; + } + if(_loc2_.length > 0) + { + _loc4_ = new Object(); + _loc4_.itemList = _loc2_; + ConnectService.getInstance().heroService.fenJie(_loc4_); + } + } + + private function itemChange(param1:DevEvent) : void + { + this.getPackItemList(); + } + + private function fenjieResult(param1:HeroEvent) : void + { + this.getPackItemList(); + } + + private function getPackItemList() : void + { + var _loc6_:* = undefined; + var _loc7_:ChaofuItem3 = null; + var _loc1_:int = int(this.levelCombox.selectedItem.data); + var _loc2_:Vector. = PakState.getALlChaofuItemList(0,_loc1_); + this.clearPackList(); + if(_loc2_ != null && _loc2_.length > 0) + { + for(_loc6_ in _loc2_) + { + if(_loc6_ > 10) + { + _loc7_ = new ChaofuItem3(); + this.packMc.addChild(_loc7_); + this.packList.push(_loc7_); + _loc7_.y = 25 * _loc6_; + _loc7_.x = 3; + } + this.packList[_loc6_].setObj(_loc2_[_loc6_]); + this.packList[_loc6_].setSelect(this.selectAllItemStatus); + } + } + this.packScrollPane.update(); + var _loc3_:int = PakState.getItemsByEntId(10361000); + var _loc4_:int = PakState.getItemsByEntId(10372353); + var _loc5_:int = PakState.getItemsByEntId(20212325); + this.itemText1.text = "" + _loc3_; + this.itemText2.text = "" + _loc4_; + this.itemText3.text = "" + _loc5_; + } + + private function setAllSelect() : void + { + var _loc1_:ChaofuItem3 = null; + for each(_loc1_ in this.packList) + { + if(_loc1_.getItemObj()) + { + _loc1_.setSelect(this.selectAllItemStatus); + } + } + } + + private function clearPackList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 10) + { + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function selectColor(param1:Event) : void + { + this.getPackItemList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/Chaofu4.as b/flash_decompiled/com/view/ui/hero/Chaofu4.as new file mode 100644 index 0000000..579bc0a --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/Chaofu4.as @@ -0,0 +1,572 @@ +package com.view.ui.hero +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.utils.Utils; + import com.view.mc.button.Button_32; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.mc.ChaofuItem4; + import com.view.ui.hero.mc.XiangqianMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 Chaofu4 extends ChaofuBase + { + + private var typeCombox:ComboBox; + + private var itemImgMc1:XiangqianMc; + + private var itemImgMc2:XiangqianMc; + + private var itemImgMc3:XiangqianMc; + + private var btn1:UISmallBtn; + + private var btn2:UISmallBtn; + + private var btn3:UISmallBtn; + + private var equBtn:Button_32; + + private var hasHole:TextField; + + private var proText:TextField; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var showPackItem:UICheckBtn; + + private var showPackItemStatus:Boolean; + + private var preItemMc:ChaofuItem4; + + private var img1:Bitmap; + + private var img2:Bitmap; + + private var img3:Bitmap; + + private var selectYubo:SelectYubo; + + public function Chaofu4() + { + var _loc6_:UIWindowBg = null; + var _loc10_:ChaofuItem4 = null; + super(); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部类型", + "data":0 + }); + this.typeCombox.addItem({ + "label":"车撵", + "data":1 + }); + this.typeCombox.addItem({ + "label":"头冠", + "data":2 + }); + this.typeCombox.addItem({ + "label":"官服", + "data":3 + }); + this.typeCombox.addItem({ + "label":"绶带", + "data":4 + }); + this.typeCombox.addItem({ + "label":"朝板", + "data":5 + }); + this.typeCombox.addItem({ + "label":"官靴", + "data":6 + }); + addChild(this.typeCombox); + this.typeCombox.width = 80; + this.typeCombox.textField.setStyle("textFormat",_loc1_); + this.typeCombox.dropdown.setRendererStyle("textFormat",_loc1_); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + this.typeCombox.x = 116; + this.typeCombox.y = 9; + this.typeCombox.addEventListener(Event.CHANGE,this.selectType); + var _loc2_:Array = ["朝服名称","已镶嵌"]; + var _loc3_:Array = [130,70]; + var _loc4_:UITable = new UITable(); + _loc4_.drawLine = false; + _loc4_.install(11,_loc2_,_loc3_); + addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 39; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(196,276); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc4_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 11) + { + _loc10_ = new ChaofuItem4(); + this.packMc.addChild(_loc10_); + this.packList.push(_loc10_); + _loc10_.y = _loc5_ * 25; + _loc10_.x = 3; + _loc10_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + this.packScrollPane.update(); + _loc6_ = new UIWindowBg(); + _loc6_.initThirdPanel(310,325); + addChild(_loc6_); + _loc6_.x = 205; + _loc6_.y = 5; + var _loc7_:UITitleBg = new UITitleBg("所选装备",_loc6_.width); + _loc6_.addChild(_loc7_); + _loc7_.x = int(_loc6_.width / 2 - _loc7_.width / 2); + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + _loc8_.text = "显示背包朝服"; + addChild(_loc8_); + _loc8_.x = 27; + _loc8_.y = 12; + this.showPackItem = new UICheckBtn(); + addChild(this.showPackItem); + this.showPackItem.x = 4; + this.showPackItem.y = 12; + this.showPackItem.onClick = this.showPack; + this.showPackItem.buttonMode = true; + this.itemImgMc1 = new XiangqianMc(1); + _loc6_.addChild(this.itemImgMc1); + this.itemImgMc1.x = 55; + this.itemImgMc1.y = 34; + this.itemImgMc2 = new XiangqianMc(2); + _loc6_.addChild(this.itemImgMc2); + this.itemImgMc2.x = this.itemImgMc1.x + 75; + this.itemImgMc2.y = this.itemImgMc1.y; + this.itemImgMc3 = new XiangqianMc(3); + _loc6_.addChild(this.itemImgMc3); + this.itemImgMc3.x = this.itemImgMc2.x + 75; + this.itemImgMc3.y = this.itemImgMc1.y; + this.btn1 = new UISmallBtn("镶 嵌",2); + this.btn2 = new UISmallBtn("镶 嵌",2); + this.btn3 = new UISmallBtn("镶 嵌",2); + _loc6_.addChild(this.btn1); + this.btn1.x = 65; + this.btn1.y = 110; + this.btn1.name = "1"; + _loc6_.addChild(this.btn2); + this.btn2.x = 138; + this.btn2.y = this.btn1.y; + _loc6_.addChild(this.btn3); + this.btn3.x = 213; + this.btn3.y = this.btn1.y; + this.btn2.name = "2"; + this.btn3.name = "3"; + this.equBtn = new Button_32("一键摘除"); + _loc6_.addChild(this.equBtn); + this.equBtn.x = 110; + this.equBtn.y = 140; + this.equBtn.onclick = this.oneKeyDel; + this.hasHole = PublicMethod.getTextFieldWithFillter(16777215,110); + this.hasHole.text = "已镶嵌:0/3"; + _loc6_.addChild(this.hasHole); + this.hasHole.x = 120; + this.hasHole.y = 200; + var _loc9_:TextFormat = new TextFormat(); + _loc9_.size = 12; + _loc9_.leading = 4; + this.proText = PublicMethod.getTextFieldWithFillter(16777215,210); + this.proText.defaultTextFormat = _loc9_; + this.proText.textColor = 16777215; + this.proText.height = 100; + this.proText.wordWrap = true; + this.proText.multiline = true; + _loc6_.addChild(this.proText); + this.proText.x = 90; + this.proText.y = 240; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_inholeChaofu,this.inholeChange); + } + + private function showPack(param1:MouseEvent) : void + { + if(this.showPackItemStatus) + { + this.showPackItemStatus = false; + this.showPackItem.setUnSelect(); + } + else + { + this.showPackItemStatus = true; + this.showPackItem.setSelect(); + } + this.loadEquItem(); + } + + private function selectType(param1:Event) : void + { + this.loadEquItem(); + } + + private function itemChange(param1:DevEvent) : void + { + this.loadEquItem(); + } + + private function inholeChange(param1:HeroEvent) : void + { + this.loadEquItem(); + } + + override public function setHero(param1:NewHero) : void + { + super.setHero(param1); + this.loadEquItem(); + } + + private function loadEquItem() : void + { + var _loc3_:Vector. = null; + var _loc4_:* = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:PackItem = null; + var _loc8_:PackItem = null; + var _loc9_:ChaofuItem4 = null; + var _loc1_:Vector. = new Vector.(); + var _loc2_:int = int(this.typeCombox.selectedItem.data); + if(this.showPackItemStatus) + { + _loc3_ = PakState.getALlChaofuItemList(_loc2_,0); + _loc4_ = 1; + while(_loc4_ < 7) + { + _loc6_ = int(heroObj["chaofu" + _loc4_]); + if(_loc6_ > 0) + { + _loc7_ = PakState.getHeroEquipById(_loc6_); + if(_loc7_) + { + _loc7_.heroId = heroObj.heroId; + _loc1_.push(_loc7_); + } + } + _loc4_++; + } + _loc5_ = 0; + while(_loc5_ < _loc3_.length) + { + _loc1_.push(_loc3_[_loc5_]); + _loc5_++; + } + } + else + { + _loc4_ = 1; + while(_loc4_ < 7) + { + _loc6_ = int(heroObj["chaofu" + _loc4_]); + _loc8_ = PakState.getHeroEquipById(_loc6_); + if(_loc8_ != null) + { + _loc8_.heroId = heroObj.heroId; + _loc1_.push(_loc8_); + } + _loc4_++; + } + } + this.clearPackList(); + if(_loc1_.length == 0) + { + this.preItemMc = null; + this.setSelectItem(null); + return; + } + if(_loc2_ > 0) + { + _loc4_ = int(_loc1_.length - 1); + while(_loc4_ >= 0) + { + if(_loc1_[_loc4_].childType != _loc2_) + { + _loc1_.splice(_loc4_,1); + } + _loc4_--; + } + } + if(_loc1_.length == 0) + { + this.preItemMc = null; + this.setSelectItem(null); + return; + } + if(_loc1_ != null && _loc1_.length > 0) + { + _loc5_ = 0; + while(_loc5_ < _loc1_.length) + { + if(_loc5_ > 10) + { + _loc9_ = new ChaofuItem4(); + this.packMc.addChild(_loc9_); + this.packList.push(_loc9_); + _loc9_.y = 25 * _loc5_; + _loc9_.x = 3; + _loc9_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + this.packList[_loc5_].setObj(_loc1_[_loc5_]); + _loc5_++; + } + } + this.packScrollPane.update(); + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + this.preItemMc = this.packList[0]; + } + this.preItemMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + + private function clearPackList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 10) + { + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:ChaofuItem4 = param1.currentTarget as ChaofuItem4; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.preItemMc) + { + this.preItemMc.setClick(false); + } + this.preItemMc = _loc2_; + this.preItemMc.setClick(true); + this.setSelectItem(_loc2_.getItemObj()); + } + + private function setSelectItem(param1:PackItem) : void + { + if(param1 == null) + { + this.btn1.setText("镶 嵌"); + this.btn2.setText("镶 嵌"); + this.btn3.setText("镶 嵌"); + this.preItemMc = null; + this.btn1.onClick = null; + this.btn2.onClick = null; + this.btn3.onClick = null; + this.itemImgMc1.loadObj(null); + this.itemImgMc2.loadObj(null); + this.itemImgMc3.loadObj(null); + this.proText.htmlText = ""; + this.hasHole.text = "已镶嵌:0/3"; + return; + } + if(param1.chaofu == null) + { + this.btn1.setText("镶 嵌"); + this.btn2.setText("镶 嵌"); + this.btn3.setText("镶 嵌"); + this.btn1.onClick = this.addGem1; + this.btn2.onClick = this.addGem2; + this.btn3.onClick = this.addGem3; + this.itemImgMc1.loadObj(null); + this.itemImgMc2.loadObj(null); + this.itemImgMc3.loadObj(null); + } + else + { + this.itemImgMc1.loadObj(param1.chaofu); + this.itemImgMc2.loadObj(param1.chaofu); + this.itemImgMc3.loadObj(param1.chaofu); + if(param1.chaofu.hole1 == 0) + { + this.btn1.onClick = this.addGem1; + this.btn1.setText("镶 嵌"); + } + else + { + this.btn1.onClick = this.delGem1; + this.btn1.setText("摘 除"); + } + if(param1.chaofu.hole2 == 0) + { + this.btn2.onClick = this.addGem2; + this.btn2.setText("镶 嵌"); + } + else + { + this.btn2.onClick = this.delGem2; + this.btn2.setText("摘 除"); + } + if(param1.chaofu.hole3 == 0) + { + this.btn3.onClick = this.addGem3; + this.btn3.setText("镶 嵌"); + } + else + { + this.btn3.onClick = this.delGem3; + this.btn3.setText("摘 除"); + } + } + var _loc2_:Object = this.itemImgMc1.getBaoShiObj(); + var _loc3_:Object = this.itemImgMc2.getBaoShiObj(); + var _loc4_:Object = this.itemImgMc3.getBaoShiObj(); + var _loc5_:String = ""; + var _loc6_:int = 0; + if(_loc2_) + { + _loc5_ = _loc5_ + _loc2_.showName + " " + Utils.getProperty(_loc2_.gemValue) + "
"; + _loc6_ += 1; + } + if(_loc3_) + { + _loc5_ = _loc5_ + _loc3_.showName + " " + Utils.getProperty(_loc3_.gemValue) + "
"; + _loc6_ += 1; + } + if(_loc4_) + { + _loc5_ = _loc5_ + _loc4_.showName + " " + Utils.getProperty(_loc4_.gemValue) + "
"; + _loc6_ += 1; + } + this.proText.htmlText = _loc5_; + this.hasHole.text = "已镶嵌:" + _loc6_ + "/3"; + } + + private function addGem1(param1:MouseEvent) : void + { + this.addGem(1); + } + + private function addGem2(param1:MouseEvent) : void + { + this.addGem(2); + } + + private function addGem3(param1:MouseEvent) : void + { + this.addGem(3); + } + + private function delGem1(param1:MouseEvent) : void + { + this.delGem(1); + } + + private function delGem2(param1:MouseEvent) : void + { + this.delGem(2); + } + + private function delGem3(param1:MouseEvent) : void + { + this.delGem(3); + } + + private function oneKeyDel() : void + { + MessageBoxUI.getInstance().confirmMsg("确定一键删除吗",this.configDelAll); + } + + private function configDelAll() : void + { + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要摘除的朝服"); + return; + } + ConnectService.getInstance().heroService.oneKeyOutHole(this.preItemMc.getItemObj().id,this.preItemMc.getItemObj().heroId); + } + + private function delGem(param1:int) : void + { + MessageBoxUI.getInstance().confirmMsg("确认摘除吗?",this.delGemConfig,param1); + } + + private function delGemConfig(param1:Object) : void + { + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要摘除的朝服"); + return; + } + var _loc2_:int = int(param1); + ConnectService.getInstance().heroService.delGem(this.preItemMc.getItemObj().id,_loc2_,this.preItemMc.getItemObj().heroId); + } + + private function addGem(param1:int) : void + { + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要镶嵌的朝服"); + return; + } + this.addSelectYuboUI(); + var _loc2_:Object = new Object(); + _loc2_.treasuryId = this.preItemMc.getItemObj().id; + _loc2_.holeNo = param1; + _loc2_.heroId = this.preItemMc.getItemObj().heroId; + this.selectYubo.setObj(_loc2_); + } + + private function addSelectYuboUI() : void + { + if(this.selectYubo == null) + { + this.selectYubo = new SelectYubo(); + this.selectYubo.x = int(width / 2 - this.selectYubo.width / 2); + this.selectYubo.y = int(height / 2 - this.selectYubo.height / 2); + } + addChild(this.selectYubo); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/Chaofu5.as b/flash_decompiled/com/view/ui/hero/Chaofu5.as new file mode 100644 index 0000000..d189183 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/Chaofu5.as @@ -0,0 +1,747 @@ +package com.view.ui.hero +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.utils.Utils; + import com.view.cache.ImgCache; + import com.view.mc.button.Button_9; + import com.view.newui.UIButton; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.data.ChaoFuData; + import com.view.ui.hero.mc.ChaofuItem5; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 Chaofu5 extends ChaofuBase + { + + private var typeCombox:ComboBox; + + private var xCombox:ComboBox; + + private var oneKeyBtn:UIButton; + + private var keyBtn:UIButton; + + private var helpBtn:Button_9; + + private var itemNameText:TextField; + + private var itemImgMc:Sprite; + + private var itemNumsText:TextField; + + private var proText1:TextField; + + private var proText2:TextField; + + private var proText3:TextField; + + private var hiddenText1:TextField; + + private var hiddenText2:TextField; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var showPackItem:UICheckBtn; + + private var showPackItemStatus:Boolean; + + private var preItemMc:ChaofuItem5; + + private var loadItemPng:LoadResource; + + private var itemImg:Bitmap; + + public function Chaofu5() + { + var _loc6_:UIWindowBg = null; + var _loc8_:TextField = null; + var _loc15_:ChaofuItem5 = null; + super(); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部类型", + "data":0 + }); + this.typeCombox.addItem({ + "label":"车撵", + "data":1 + }); + this.typeCombox.addItem({ + "label":"头冠", + "data":2 + }); + this.typeCombox.addItem({ + "label":"官服", + "data":3 + }); + this.typeCombox.addItem({ + "label":"绶带", + "data":4 + }); + this.typeCombox.addItem({ + "label":"朝板", + "data":5 + }); + this.typeCombox.addItem({ + "label":"官靴", + "data":6 + }); + addChild(this.typeCombox); + this.typeCombox.width = 80; + this.typeCombox.textField.setStyle("textFormat",_loc1_); + this.typeCombox.dropdown.setRendererStyle("textFormat",_loc1_); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + this.typeCombox.x = 116; + this.typeCombox.y = 9; + this.typeCombox.addEventListener(Event.CHANGE,this.selectType); + var _loc2_:Array = ["朝服名称","属性条数"]; + var _loc3_:Array = [130,70]; + var _loc4_:UITable = new UITable(); + _loc4_.drawLine = false; + _loc4_.install(11,_loc2_,_loc3_); + addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 39; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(196,276); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc4_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 11) + { + _loc15_ = new ChaofuItem5(); + this.packMc.addChild(_loc15_); + this.packList.push(_loc15_); + _loc15_.y = _loc5_ * 25; + _loc15_.x = 3; + _loc15_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + this.packScrollPane.update(); + _loc6_ = new UIWindowBg(); + _loc6_.initThirdPanel(310,325); + addChild(_loc6_); + _loc6_.x = 205; + _loc6_.y = 5; + var _loc7_:UITitleBg = new UITitleBg("所选装备",_loc6_.width); + _loc6_.addChild(_loc7_); + _loc7_.x = int(_loc6_.width / 2 - _loc7_.width / 2); + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + _loc8_.text = "显示背包朝服"; + addChild(_loc8_); + _loc8_.x = 27; + _loc8_.y = 12; + this.showPackItem = new UICheckBtn(); + addChild(this.showPackItem); + this.showPackItem.x = 4; + this.showPackItem.y = 12; + this.showPackItem.onClick = this.showPack; + this.showPackItem.buttonMode = true; + var _loc9_:Bitmap = new Bitmap(face.getPng(UIConfig.bigItem_lock_skin)); + _loc6_.addChild(_loc9_); + _loc9_.x = 130; + _loc9_.y = 34; + this.itemImgMc = new Sprite(); + _loc6_.addChild(this.itemImgMc); + this.itemImgMc.x = _loc9_.x + 6; + this.itemImgMc.y = _loc9_.y + 6; + this.itemNameText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + _loc6_.addChild(this.itemNameText); + this.itemNameText.x = 120; + this.itemNameText.y = 106; + this.itemNameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemNameText.text = "道具名称"; + this.helpBtn = new Button_9("洗练规则"); + this.helpBtn.setTextHeight(22); + this.helpBtn.buttonMode = true; + _loc6_.addChild(this.helpBtn); + this.helpBtn.x = 260; + this.helpBtn.y = 32; + var _loc10_:String = "1、每次洗练需要消耗大量锦缎
"; + _loc10_ = _loc10_ + "2、每次洗练属性的类型都有可能发生变化,属性的级别与洗练前级别一致
"; + _loc10_ = _loc10_ + "3、当洗练后属性与洗练前属性相同,则该属性会升一级,否则变为同等级其他属性,属性不会降级
"; + _loc10_ = _loc10_ + "4、朝服会有隐藏属性,朝服每条洗练属性都一样,且属性级别达到满级时,额外增加一条同类型且满级的隐藏属性。
"; + _loc10_ = _loc10_ + "5、例如:第一次洗练朝服时,朝服属性为1级攻击,1级防御,1级体力。第二次洗练后3个属性槽随机获得与之前同等级的属性,假如获得的是1级攻击,1级体力,1级敏捷,对比之前则最终属性为2级攻击,1级体力,1级敏捷。"; + ToolTipManager.getInstance().setToolTip(this.helpBtn,new TxtTooltip(_loc10_),false,-1,false); + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc6_.addChild(_loc8_); + _loc8_.x = 135; + _loc8_.y = 130; + _loc8_.text = "洗练属性"; + this.proText1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc6_.addChild(this.proText1); + this.proText1.x = 80; + this.proText1.y = 150; + this.proText2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc6_.addChild(this.proText2); + this.proText2.x = this.proText1.x; + this.proText2.y = this.proText1.y + 18; + this.proText3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc6_.addChild(this.proText3); + this.proText3.x = this.proText2.x; + this.proText3.y = this.proText2.y + 18; + this.hiddenText1 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,130); + _loc6_.addChild(this.hiddenText1); + this.hiddenText1.x = this.proText3.x; + this.hiddenText1.y = this.proText3.y + 18; + this.hiddenText1.text = "隐藏属性未激活"; + this.hiddenText2 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,220); + _loc6_.addChild(this.hiddenText2); + this.hiddenText2.x = this.proText1.x; + this.hiddenText2.y = this.hiddenText1.y + 18; + this.hiddenText2.text = "隐藏属性未激活"; + this.itemNumsText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,245); + this.itemNumsText.text = "当前拥有锦缎:0"; + _loc6_.addChild(this.itemNumsText); + this.itemNumsText.x = 100; + this.itemNumsText.y = this.hiddenText2.y + 20; + var _loc11_:UIButton = new UIButton("洗 练",2); + _loc6_.addChild(_loc11_); + _loc11_.x = 50; + _loc11_.y = this.itemNumsText.y + 24; + _loc11_.onClick = this.xilianChaofu; + var _loc12_:UIButton = new UIButton("洗20次",2); + _loc6_.addChild(_loc12_); + _loc12_.x = _loc11_.x + _loc11_.width + 15; + _loc12_.y = _loc11_.y; + _loc12_.onClick = this.xilianChaofu20; + var _loc13_:UIButton = new UIButton("洗50次",2); + _loc6_.addChild(_loc13_); + _loc13_.x = _loc12_.x + _loc12_.width + 15; + _loc13_.y = _loc12_.y; + _loc13_.onClick = this.xilianChaofu50; + this.oneKeyBtn = new UIButton("一键洗练",2); + _loc6_.addChild(this.oneKeyBtn); + this.oneKeyBtn.x = _loc11_.x + 65; + this.oneKeyBtn.y = _loc11_.y; + this.oneKeyBtn.onClick = this.xilianChaofuOneKey; + ToolTipManager.getInstance().setToolTip(this.oneKeyBtn,new TxtTooltip("一次使用200锦缎可将朝服洗练到20级"),false,-1,false); + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,180); + _loc14_.text = "每洗练一次需要消耗一个锦缎"; + _loc14_.x = 100; + _loc14_.y = _loc11_.y + 30; + this.xCombox = new ComboBox(); + this.xCombox.addItem({ + "label":"洗练类型", + "data":0 + }); + this.xCombox.addItem({ + "label":"攻击", + "data":1 + }); + this.xCombox.addItem({ + "label":"防御", + "data":2 + }); + this.xCombox.addItem({ + "label":"体力", + "data":3 + }); + this.xCombox.addItem({ + "label":"敏捷", + "data":4 + }); + _loc6_.addChild(this.xCombox); + this.xCombox.width = 80; + this.xCombox.textField.setStyle("textFormat",_loc1_); + this.xCombox.dropdown.setRendererStyle("textFormat",_loc1_); + this.xCombox.selectedItem = this.typeCombox.getItemAt(0); + this.xCombox.x = 95; + this.xCombox.y = _loc11_.y + 36; + this.keyBtn = new UIButton("一键洗练",2); + _loc6_.addChild(this.keyBtn); + this.keyBtn.x = this.xCombox.x + 90; + this.keyBtn.y = this.xCombox.y; + this.keyBtn.onClick = this.xilianChaofuOneKey1; + this.oneKeyBtn.visible = false; + ToolTipManager.getInstance().setToolTip(this.keyBtn,new TxtTooltip("快速洗出朝服隐藏属性,当锦缎数量不够时,本次洗练失败,20级朝服才能使用"),false,-1,false); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_xilianChaofu,this.xilianResult); + } + + private function xilianChaofu(param1:MouseEvent) : void + { + var _loc2_:int = ChaoFuData.getXilianItems(); + var _loc3_:int = PakState.getItemsByEntId(10361000); + if(_loc3_ < _loc2_) + { + MessageBoxUI.getInstance().addMessage("锦缎数量不够"); + return; + } + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要洗练的朝服"); + return; + } + var _loc4_:Object = this.preItemMc.getItemObj(); + ConnectService.getInstance().heroService.xilianChaofu(this.preItemMc.getItemObj().id,this.preItemMc.getItemObj().heroId,1); + } + + private function xilianChaofu20(param1:MouseEvent) : void + { + var _loc2_:int = ChaoFuData.getXilianItems(); + var _loc3_:int = PakState.getItemsByEntId(10361000); + if(_loc3_ < 20 * _loc2_) + { + MessageBoxUI.getInstance().addMessage("锦缎数量不够"); + return; + } + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要洗练的朝服"); + return; + } + var _loc4_:Object = this.preItemMc.getItemObj(); + ConnectService.getInstance().heroService.xilianChaofu(this.preItemMc.getItemObj().id,this.preItemMc.getItemObj().heroId,20); + } + + private function xilianChaofu50(param1:MouseEvent) : void + { + var _loc2_:int = ChaoFuData.getXilianItems(); + var _loc3_:int = PakState.getItemsByEntId(10361000); + if(_loc3_ < 50 * _loc2_) + { + MessageBoxUI.getInstance().addMessage("锦缎数量不够"); + return; + } + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要洗练的朝服"); + return; + } + var _loc4_:Object = this.preItemMc.getItemObj(); + ConnectService.getInstance().heroService.xilianChaofu(this.preItemMc.getItemObj().id,this.preItemMc.getItemObj().heroId,50); + } + + private function xilianChaofuOneKey(param1:MouseEvent) : void + { + var _loc2_:int = PakState.getItemsByEntId(10361000); + if(_loc2_ <= 200) + { + MessageBoxUI.getInstance().addMessage("锦缎数量至少要达到200才能使用此功能"); + return; + } + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要洗练的朝服"); + return; + } + var _loc3_:Object = this.preItemMc.getItemObj().chaofu; + if(_loc3_) + { + if(_loc3_.level1 == 20 && _loc3_.level2 == 20 && _loc3_.level3 == 20) + { + MessageBoxUI.getInstance().addMessage("朝服已满级,无法再一键洗练"); + return; + } + } + ConnectService.getInstance().heroService.xilianChaofuOneKey(this.preItemMc.getItemObj().id,this.preItemMc.getItemObj().heroId); + } + + private function xilianChaofuOneKey1(param1:MouseEvent) : void + { + var _loc4_:int = 0; + var _loc2_:int = int(this.xCombox.selectedItem.data); + if(_loc2_ == 0) + { + MessageBoxUI.getInstance().addMessage("请选择要洗练隐藏属性的类型"); + return; + } + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要洗练的朝服"); + return; + } + var _loc3_:Object = this.preItemMc.getItemObj().chaofu; + if(_loc3_ == null) + { + MessageBoxUI.getInstance().addMessage("请先将朝服洗练满级再使用此功能"); + return; + } + _loc4_ = ChaoFuData.getMaxXilianLv(); + if(_loc3_.level1 != _loc4_ || _loc3_.level2 != _loc4_ || _loc3_.level3 != _loc4_) + { + MessageBoxUI.getInstance().addMessage("朝服洗练满级,才能使用一键洗练"); + return; + } + ConnectService.getInstance().heroService.xilianChaofuOneKeyByType(this.preItemMc.getItemObj().id,this.preItemMc.getItemObj().heroId,_loc2_); + } + + private function showPack(param1:MouseEvent) : void + { + if(this.showPackItemStatus) + { + this.showPackItemStatus = false; + this.showPackItem.setUnSelect(); + } + else + { + this.showPackItemStatus = true; + this.showPackItem.setSelect(); + } + this.loadEquItem(); + } + + private function selectType(param1:Event) : void + { + this.loadEquItem(); + } + + private function setItemNums() : void + { + var _loc1_:int = PakState.getItemsByEntId(10361000); + this.itemNumsText.htmlText = "当前拥有锦缎:" + _loc1_ + ""; + } + + override public function setHero(param1:NewHero) : void + { + super.setHero(param1); + this.loadEquItem(); + this.setItemNums(); + } + + private function loadEquItem() : void + { + var _loc3_:Vector. = null; + var _loc4_:* = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:PackItem = null; + var _loc8_:PackItem = null; + var _loc9_:ChaofuItem5 = null; + var _loc1_:Vector. = new Vector.(); + var _loc2_:int = int(this.typeCombox.selectedItem.data); + if(this.showPackItemStatus) + { + _loc3_ = PakState.getALlChaofuItemList(_loc2_,0); + _loc4_ = 1; + while(_loc4_ < 7) + { + _loc6_ = int(heroObj["chaofu" + _loc4_]); + if(_loc6_ > 0) + { + _loc7_ = PakState.getHeroEquipById(_loc6_); + if(_loc7_ != null) + { + _loc7_.heroId = heroObj.heroId; + _loc1_.push(_loc7_); + } + } + _loc4_++; + } + _loc5_ = 0; + while(_loc5_ < _loc3_.length) + { + _loc1_.push(_loc3_[_loc5_]); + _loc5_++; + } + } + else + { + _loc4_ = 1; + while(_loc4_ < 7) + { + _loc6_ = int(heroObj["chaofu" + _loc4_]); + _loc8_ = PakState.getHeroEquipById(_loc6_); + if(_loc8_ != null) + { + _loc8_.heroId = heroObj.heroId; + _loc1_.push(_loc8_); + } + _loc4_++; + } + } + this.clearPackList(); + if(_loc1_.length == 0) + { + this.preItemMc = null; + this.setSelectItem(null); + return; + } + if(_loc2_ > 0) + { + _loc4_ = int(_loc1_.length - 1); + while(_loc4_ >= 0) + { + if(_loc1_[_loc4_].childType != _loc2_) + { + _loc1_.splice(_loc4_,1); + } + _loc4_--; + } + } + if(_loc1_.length == 0) + { + this.preItemMc = null; + this.setSelectItem(null); + return; + } + if(_loc1_ != null && _loc1_.length > 0) + { + _loc5_ = 0; + while(_loc5_ < _loc1_.length) + { + if(_loc5_ > 10) + { + _loc9_ = new ChaofuItem5(); + this.packMc.addChild(_loc9_); + this.packList.push(_loc9_); + _loc9_.y = 25 * _loc5_; + _loc9_.x = 3; + _loc9_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + this.packList[_loc5_].setObj(_loc1_[_loc5_]); + _loc5_++; + } + } + this.packScrollPane.update(); + if(this.preItemMc == null || this.preItemMc.getItemObj() == null) + { + this.preItemMc = this.packList[0]; + } + this.preItemMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + + private function clearPackList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 10) + { + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:ChaofuItem5 = param1.currentTarget as ChaofuItem5; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.preItemMc) + { + this.preItemMc.setClick(false); + } + this.preItemMc = _loc2_; + this.preItemMc.setClick(true); + this.setSelectItem(_loc2_.getItemObj()); + } + + private function setSelectItem(param1:PackItem) : void + { + var _loc2_:Object = null; + var _loc3_:String = null; + var _loc4_:Boolean = false; + var _loc5_:int = 0; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc8_:String = null; + if(Boolean(this.itemImg) && this.itemImgMc.contains(this.itemImg)) + { + this.itemImgMc.removeChild(this.itemImg); + } + this.oneKeyBtn.visible = false; + this.xCombox.visible = false; + this.keyBtn.visible = false; + if(param1 != null) + { + _loc2_ = param1.chaofu; + _loc3_ = ServerConfig.IMAGE_ITEM_URL + param1.viewMap.iconPath; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(_loc3_,this.loadPngBack); + } + this.itemNameText.htmlText = param1.viewMap.showName; + _loc4_ = false; + if(_loc2_) + { + if(_loc2_.hpro > 0) + { + this.hiddenText1.text = "隐藏属性已激活"; + this.hiddenText2.text = ""; + } + else + { + this.hiddenText1.text = "隐藏属性未激活"; + this.hiddenText2.text = ""; + } + _loc5_ = ChaoFuData.getMaxXilianLv(); + _loc6_ = this.getXilianStr(_loc2_.pro1,_loc2_.level1,"#ff9900"); + _loc7_ = this.getXilianStr(_loc2_.pro2,_loc2_.level2,"#ff9900"); + _loc8_ = this.getXilianStr(_loc2_.pro3,_loc2_.level3,"#ff9900"); + if(_loc5_ == _loc2_.level1 && _loc2_.level2 == _loc5_ && _loc5_ == _loc2_.level3) + { + _loc4_ = true; + } + if(_loc2_.pro1 > 0) + { + this.proText1.htmlText = _loc6_; + this.proText2.htmlText = _loc7_; + this.proText3.htmlText = _loc8_; + } + else + { + this.proText1.htmlText = "洗练属性未激活"; + this.proText2.text = ""; + this.proText3.text = ""; + } + if(_loc2_.hpro > 0) + { + this.hiddenText1.text = "隐藏属性已激活"; + this.hiddenText2.htmlText = this.getXilianStr(_loc2_.pro3,_loc2_.level3,"#00ff00"); + } + else + { + this.hiddenText1.text = "隐藏属性未激活"; + this.hiddenText2.text = ""; + } + } + else + { + this.proText1.text = "洗练属性未激活"; + this.proText2.text = ""; + this.proText3.text = ""; + this.hiddenText1.text = "隐藏属性未激活"; + this.hiddenText2.text = ""; + } + if(_loc4_) + { + this.xCombox.visible = true; + this.keyBtn.visible = true; + } + } + else + { + this.itemNameText.text = ""; + this.proText1.text = ""; + this.proText2.text = ""; + this.proText3.text = ""; + this.hiddenText1.text = ""; + this.hiddenText2.text = ""; + this.oneKeyBtn.visible = false; + this.xCombox.visible = false; + this.keyBtn.visible = false; + } + } + + private function getXilianStr(param1:int, param2:int, param3:String) : String + { + var _loc4_:String = ""; + if(param1 == 1) + { + _loc4_ = " 攻击+"; + } + if(param1 == 2) + { + _loc4_ = " 防御+"; + } + if(param1 == 3) + { + _loc4_ = " 体力+"; + } + if(param1 == 4) + { + _loc4_ = " 敏捷+"; + } + if(param1 == 5) + { + _loc4_ = " 统率+"; + } + var _loc5_:* = "" + _loc4_ + "LV" + param2; + var _loc6_:int = ChaoFuData.getMaxXilianLv(); + if(param2 == _loc6_) + { + _loc5_ += "(满) "; + } + else + { + _loc5_ += "
"; + } + return _loc5_ + _loc4_ + ChaoFuData.getXilianProperty(param2); + } + + private function loadPngBack(param1:Event) : void + { + if(this.preItemMc.getItemObj() == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemImgMc.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + } + + private function itemChange(param1:DevEvent) : void + { + this.loadEquItem(); + this.setItemNums(); + } + + private function xilianResult(param1:HeroEvent) : void + { + this.loadEquItem(); + this.setItemNums(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/ChaofuBase.as b/flash_decompiled/com/view/ui/hero/ChaofuBase.as new file mode 100644 index 0000000..bf5bdf4 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/ChaofuBase.as @@ -0,0 +1,25 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.newdata.hero.NewHero; + import flash.display.Sprite; + + public class ChaofuBase extends Sprite + { + + public var face:InstallFace = InstallFace.getInstance(); + + public var heroObj:NewHero; + + public function ChaofuBase() + { + super(); + } + + public function setHero(param1:NewHero) : void + { + this.heroObj = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/ChaofuMenu.as b/flash_decompiled/com/view/ui/hero/ChaofuMenu.as new file mode 100644 index 0000000..daf7caa --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/ChaofuMenu.as @@ -0,0 +1,136 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.view.ui.hero.mc.ChaofuItem1; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class ChaofuMenu extends Sprite + { + + public static var instance:ChaofuMenu; + + private var face:InstallFace; + + private var btnArr:Array; + + public var status:int; + + private var _chaofuItem1:ChaofuItem1; + + public function ChaofuMenu() + { + var _loc3_:MovieClip = null; + this.face = InstallFace.getInstance(); + super(); + if(instance != null) + { + throw Error("单例"); + } + var _loc1_:MovieClip = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + var _loc2_:MovieClip = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + _loc1_.btnName.text = "装备道具"; + _loc2_.btnName.text = "丢弃道具"; + this.btnArr = new Array(); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + addChild(_loc1_); + addChild(_loc2_); + _loc2_.y = 20; + for each(_loc3_ in this.btnArr) + { + _loc3_.addEventListener(MouseEvent.CLICK,this.clickBtn); + _loc3_.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + _loc3_.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + _loc3_.bg1.visible = false; + } + } + + public static function getInstance() : ChaofuMenu + { + if(instance == null) + { + instance = new ChaofuMenu(); + } + return instance; + } + + private function clear() : void + { + if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function clickBtn(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + var _loc3_:HeroChaofu = this.parent.parent.parent.parent as HeroChaofu; + var _loc4_:int = _loc3_.getCurrHero().heroId; + var _loc5_:int = this._chaofuItem1.getItem().id; + this.unShow(); + if(_loc2_ == this.btnArr[0]) + { + ConnectService.getInstance().heroService.equChaofu(_loc4_,_loc5_); + } + else + { + MessageBoxUI.getInstance().confirmMsg("确定丢弃该道具吗?",this.onSubmit,this._chaofuItem1.getItem()); + } + } + + private function onSubmit(param1:Object) : void + { + var _loc2_:int = int(param1.id); + ConnectService.getInstance().heroService.throwItem(_loc2_); + } + + private function mouseOut(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + _loc2_.bg1.visible = false; + } + + private function mouseOver(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + _loc2_.bg1.visible = true; + } + + public function show(param1:Sprite) : void + { + if(param1) + { + param1.addChild(this); + if(this._chaofuItem1.x != 300) + { + this.x = param1.mouseX; + } + else + { + this.x = param1.mouseX - 70; + } + this.y = param1.mouseY; + } + } + + public function unShow() : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function set chaofuItem1(param1:ChaofuItem1) : void + { + this._chaofuItem1 = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/ChaofuStrongMc.as b/flash_decompiled/com/view/ui/hero/ChaofuStrongMc.as new file mode 100644 index 0000000..a2d2d38 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/ChaofuStrongMc.as @@ -0,0 +1,107 @@ +package com.view.ui.hero +{ + import com.common.PublicMethod; + import com.control.ConnectService; + 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 com.view.ui.pak.data.PakState; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ChaofuStrongMc extends UIWindowBg + { + + private var okBtn:UIButton; + + private var input:UINumInputText; + + private var itemId:int; + + private var itemNums:int; + + private var heroId:int; + + public function ChaofuStrongMc() + { + super(); + initSize(115,100); + loadTitle(UITitleConfig.title_piliangqianghua); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(285,65); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + _loc1_.addChild(_loc2_); + _loc2_.text = "请输入批量强化次数"; + _loc2_.x = 20; + _loc2_.y = 30; + this.input = new UINumInputText(80); + _loc1_.addChild(this.input); + this.input.x = _loc2_.x + _loc2_.width - 15; + this.input.y = _loc2_.y - 3; + this.input.setTextNum(1); + this.input.setMaxChars(5); + this.okBtn = new UIButton("确 定"); + var _loc3_:UIButton = new UIButton("取 消"); + bg1.addChild(this.okBtn); + bg1.addChild(_loc3_); + this.okBtn.x = 80; + this.okBtn.y = 95; + _loc3_.x = 170; + _loc3_.y = this.okBtn.y; + _loc3_.onClick = closeSelf; + this.okBtn.onClick = this.submit; + } + + public function seItemId(param1:int) : void + { + this.itemId = param1; + this.itemNums = PakState.getItemsByEntId(10372353); + this.input.setMaxNum(this.itemNums); + this.input.setTextNum(0); + } + + public function setHeroId(param1:int) : void + { + this.heroId = param1; + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("强化次数必须大于0"); + return; + } + if(this.itemId > 0) + { + ConnectService.getInstance().heroService.qianghua(this.itemId,_loc2_,this.heroId); + closeSelf(null); + } + } + + private function changeNums(param1:Event) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ > this.itemNums) + { + _loc2_ = this.itemNums; + } + if(_loc2_ <= 0) + { + _loc2_ = 1; + } + this.input.setTextNum(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/CombatSkillPage.as b/flash_decompiled/com/view/ui/hero/CombatSkillPage.as new file mode 100644 index 0000000..87d3464 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/CombatSkillPage.as @@ -0,0 +1,291 @@ +package com.view.ui.hero +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.view.mc.button.Button_13; + import com.view.newui.UITabBtn; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.data.HeroSkill; + import com.view.ui.hero.data.HeroSkillData; + import com.view.ui.hero.mc.EquipSkill; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class CombatSkillPage extends Sprite + { + + private var btnArr:Vector.; + + private var equipSkill1:EquipSkill; + + private var equipSkill2:EquipSkill; + + private var equipSkill3:EquipSkill; + + private var equipSkill4:EquipSkill; + + private var equipSkill5:EquipSkill; + + private var equipSkill6:EquipSkill; + + private var pointText:TextField; + + private var skillListMc:SkillListMc; + + private var getPoint:Button_13; + + private var lastTab:UITabBtn; + + private var currType:int; + + private var currHero:Object; + + public function CombatSkillPage() + { + var _loc7_:UITabBtn = null; + var _loc8_:UIWindowBg = null; + this.skillListMc = new SkillListMc(); + super(); + var _loc1_:UITabBtn = new UITabBtn("风系技能",2); + var _loc2_:UITabBtn = new UITabBtn("火系技能",2); + var _loc3_:UITabBtn = new UITabBtn("山系技能",2); + var _loc4_:UITabBtn = new UITabBtn("林系技能",2); + var _loc5_:UITabBtn = new UITabBtn("雷系技能",2); + this.btnArr = new Vector.(); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + var _loc6_:int = 0; + for each(_loc7_ in this.btnArr) + { + addChild(_loc7_); + _loc7_.x = 10 + _loc6_ * 66; + _loc7_.y = 4; + _loc7_.onClick = this.clickTab; + _loc6_++; + } + _loc8_ = new UIWindowBg(); + _loc8_.initThirdPanel(349,301); + addChild(_loc8_); + _loc8_.x = 4; + _loc8_.y = _loc1_.y + 25; + _loc8_.addChild(this.skillListMc); + this.skillListMc.x = 40; + this.skillListMc.y = 30; + this.equipSkill1 = new EquipSkill(1); + this.equipSkill2 = new EquipSkill(2); + this.equipSkill3 = new EquipSkill(3); + this.equipSkill4 = new EquipSkill(4); + this.equipSkill5 = new EquipSkill(5); + this.equipSkill6 = new EquipSkill(6); + addChild(this.equipSkill1); + this.equipSkill1.x = -150; + this.equipSkill1.y = 218; + addChild(this.equipSkill2); + this.equipSkill2.x = this.equipSkill1.x + 46; + this.equipSkill2.y = this.equipSkill1.y; + addChild(this.equipSkill3); + this.equipSkill3.x = this.equipSkill2.x + 46; + this.equipSkill3.y = this.equipSkill1.y; + addChild(this.equipSkill4); + this.equipSkill4.x = this.equipSkill1.x; + this.equipSkill4.y = this.equipSkill1.y + 45; + addChild(this.equipSkill5); + this.equipSkill5.x = this.equipSkill4.x + 46; + this.equipSkill5.y = this.equipSkill1.y + 45; + addChild(this.equipSkill6); + this.equipSkill6.x = this.equipSkill5.x + 46; + this.equipSkill6.y = this.equipSkill1.y + 45; + this.pointText = PublicMethod.getTextFieldWithFillter(16776960,250); + _loc8_.addChild(this.pointText); + this.pointText.x = 10; + this.pointText.y = 289; + } + + private function addSkillPoint() : void + { + this.getPoint.setUnEnable(); + ConnectService.getInstance().userService.addSkillPoint(this.addSkillBack); + } + + private function addSkillBack(param1:Object) : void + { + this.getPoint.setEnable(); + } + + private function clickTab(param1:MouseEvent) : void + { + if(this.lastTab) + { + this.lastTab.select = false; + } + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(_loc2_ == this.btnArr[0]) + { + this.currType = 1; + } + if(_loc2_ == this.btnArr[1]) + { + this.currType = 2; + } + if(_loc2_ == this.btnArr[2]) + { + this.currType = 3; + } + if(_loc2_ == this.btnArr[3]) + { + this.currType = 4; + } + if(_loc2_ == this.btnArr[4]) + { + this.currType = 5; + } + this.lastTab = _loc2_; + this.lastTab.select = true; + this.loadSkillByType(); + } + + public function loadData(param1:Object) : void + { + this.currHero = param1; + if(this.currType == 0) + { + this.btnArr[0].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + else + { + this.loadSkillByType(); + } + } + + private function loadSkillByType() : void + { + if(this.currType == 0) + { + return; + } + if(this.currHero == null) + { + return; + } + ConnectService.getInstance().heroService.getSkillByType(this.currHero.heroId,this.currType,this.isSkillNull()); + } + + private function isSkillNull() : int + { + switch(this.currType) + { + case 1: + return HeroSkillData.skillList1.length > 0 ? 0 : 1; + case 2: + return HeroSkillData.skillList2.length > 0 ? 0 : 1; + case 3: + return HeroSkillData.skillList3.length > 0 ? 0 : 1; + case 4: + return HeroSkillData.skillList4.length > 0 ? 0 : 1; + case 5: + return HeroSkillData.skillList5.length > 0 ? 0 : 1; + default: + return 0; + } + } + + public function addEvent() : void + { + ConnectService.getInstance().addEventListener(HeroEvent.HERO_getSkillByType,this.getSkillTypeResult); + } + + public function delEvent() : void + { + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_getSkillByType,this.getSkillTypeResult); + } + + private function getSkillTypeResult(param1:HeroEvent) : void + { + var _loc2_:Object = param1.heroObj; + this.initSkillList(_loc2_); + this.pointText.text = "当前拥有技能点:" + _loc2_.skillPoint; + this.equipSkill1.setHeroLevel(this.currHero.level,_loc2_.level_1); + this.equipSkill2.setHeroLevel(this.currHero.level,_loc2_.level_2); + this.equipSkill3.setHeroLevel(this.currHero.level,_loc2_.level_3); + this.equipSkill4.setHeroLevel(this.currHero.level,_loc2_.level_4); + this.equipSkill5.setHeroLevel(this.currHero.level,_loc2_.level_5); + this.equipSkill6.setHeroLevel(this.currHero.level,_loc2_.level_6); + this.skillListMc.skillattribute = this.currType; + HeroSkillData.bookList = _loc2_.booklist; + HeroSkillData.hasStudySkill = _loc2_.userHeroSkill; + HeroSkillData.userSkillPoint = _loc2_.skillPoint; + this.skillListMc.init(); + this.equipSkill1.setEquipSkill(_loc2_.equip_1); + this.equipSkill2.setEquipSkill(_loc2_.equip_2); + this.equipSkill3.setEquipSkill(_loc2_.equip_3); + this.equipSkill4.setEquipSkill(_loc2_.equip_4); + this.equipSkill5.setEquipSkill(_loc2_.equip_5); + this.equipSkill6.setEquipSkill(_loc2_.equip_6); + } + + private function initSkillList(param1:Object) : void + { + var _loc3_:Object = null; + var _loc4_:HeroSkill = null; + if(param1 == null) + { + return; + } + if(param1.skillList1 == null) + { + return; + } + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in param1.skillList1) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList1 = _loc2_; + _loc2_ = new Vector.(); + for each(_loc3_ in param1.skillList2) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList2 = _loc2_; + _loc2_ = new Vector.(); + for each(_loc3_ in param1.skillList3) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList3 = _loc2_; + _loc2_ = new Vector.(); + for each(_loc3_ in param1.skillList4) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList4 = _loc2_; + _loc2_ = new Vector.(); + for each(_loc3_ in param1.skillList5) + { + _loc4_ = new HeroSkill(_loc3_); + _loc2_.push(_loc4_); + } + HeroSkillData.skillList5 = _loc2_; + _loc2_ = null; + } + + public function hiddenMenu() : void + { + var _loc1_:SKillControlBar = SKillControlBar.instance; + if(_loc1_) + { + _loc1_.unShow(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/FightSkillMenu.as b/flash_decompiled/com/view/ui/hero/FightSkillMenu.as new file mode 100644 index 0000000..b85a67e --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/FightSkillMenu.as @@ -0,0 +1,257 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.newdata.hero.NewHero; + import com.view.ui.hero.data.FightSkillData; + import com.view.ui.hero.data.HeroSkillData; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class FightSkillMenu extends Sprite + { + + public static var instance:FightSkillMenu; + + private var equipBtn:MovieClip; + + private var unEquipBtn:MovieClip; + + private var studyBtn:MovieClip; + + private var upBtn:MovieClip; + + private var oneUpBtn:MovieClip; + + private var face:InstallFace; + + public var fightSkillData:FightSkillData; + + private var btnArr:Array; + + private var heroSkillUI:HeroSkillUI; + + public var status:int; + + private var newArr:Array; + + public function FightSkillMenu() + { + var _loc1_:MovieClip = null; + this.face = InstallFace.getInstance(); + this.heroSkillUI = HeroSkillUI.getInstance(); + this.newArr = new Array(); + super(); + this.equipBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.unEquipBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.upBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.oneUpBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.studyBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.equipBtn.btnName.text = "装备技能"; + this.unEquipBtn.btnName.text = "卸下技能"; + this.upBtn.btnName.text = "升级技能"; + this.oneUpBtn.btnName.text = "一键满级"; + this.studyBtn.btnName.text = "学习技能"; + this.btnArr = new Array(); + this.btnArr.push(this.equipBtn); + this.btnArr.push(this.unEquipBtn); + this.btnArr.push(this.upBtn); + this.btnArr.push(this.oneUpBtn); + this.btnArr.push(this.studyBtn); + for each(_loc1_ in this.btnArr) + { + _loc1_.addEventListener(MouseEvent.CLICK,this.clickBtn); + _loc1_.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + _loc1_.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + _loc1_.bg1.visible = false; + } + } + + public static function getInstance() : FightSkillMenu + { + if(instance == null) + { + instance = new FightSkillMenu(); + } + return instance; + } + + private function clickBtn(param1:MouseEvent) : void + { + var _loc4_:FightSkillData = null; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:FightSkillData = null; + var _loc8_:int = 0; + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + this.unShow(); + var _loc3_:NewHero = this.heroSkillUI.currHero; + if(_loc2_ == this.studyBtn) + { + _loc4_ = HeroSkillData.getUserSKillBySkillId(_loc3_.heroId,this.fightSkillData.skillId); + if(_loc4_ != null) + { + MessageBoxUI.getInstance().addMessage("已学习该技能"); + return; + } + ConnectService.getInstance().heroService.studyFightSkill(_loc3_.heroId,this.fightSkillData.skillId); + return; + } + if(_loc2_ == this.upBtn) + { + _loc4_ = HeroSkillData.getUserSKillBySkillId(_loc3_.heroId,this.fightSkillData.skillId); + if(_loc4_ == null) + { + MessageBoxUI.getInstance().addMessage("尚未学会该技能"); + return; + } + if(this.fightSkillData.skillLv >= 12) + { + MessageBoxUI.getInstance().addMessage("技能已升级到最高等级"); + return; + } + ConnectService.getInstance().heroService.upFightSkill(_loc3_.heroId,this.fightSkillData.skillId); + return; + } + if(_loc2_ == this.equipBtn) + { + _loc4_ = HeroSkillData.getUserSKillBySkillId(_loc3_.heroId,this.fightSkillData.skillId); + if(_loc4_ == null) + { + MessageBoxUI.getInstance().addMessage("尚未学会该技能"); + return; + } + if(_loc3_.fightSkill1 == this.fightSkillData.skillId || _loc3_.fightSkill2 == this.fightSkillData.skillId || _loc3_.fightSkill3 == this.fightSkillData.skillId) + { + MessageBoxUI.getInstance().addMessage("已装备该技能"); + return; + } + if(_loc3_.fightSkill1 > 0 && _loc3_.fightSkill2 > 0 && _loc3_.fightSkill3 > 0) + { + MessageBoxUI.getInstance().addMessage("没有空位装备技能"); + return; + } + ConnectService.getInstance().heroService.equHeroFightSkill(_loc3_.heroId,this.fightSkillData.skillId); + return; + } + if(_loc2_ == this.unEquipBtn) + { + _loc4_ = HeroSkillData.getUserSKillBySkillId(_loc3_.heroId,this.fightSkillData.skillId); + if(_loc4_ == null) + { + MessageBoxUI.getInstance().addMessage("尚未学会该技能"); + return; + } + if(_loc3_.fightSkill1 != this.fightSkillData.skillId && _loc3_.fightSkill2 != this.fightSkillData.skillId && _loc3_.fightSkill3 != this.fightSkillData.skillId) + { + MessageBoxUI.getInstance().addMessage("没有装备该技能"); + return; + } + ConnectService.getInstance().heroService.unEquHeroFightSkill(_loc3_.heroId,this.fightSkillData.skillId); + return; + } + if(_loc2_ == this.oneUpBtn) + { + _loc4_ = HeroSkillData.getUserSKillBySkillId(_loc3_.heroId,this.fightSkillData.skillId); + if(_loc4_ == null) + { + MessageBoxUI.getInstance().addMessage("尚未学会该技能"); + return; + } + if(this.fightSkillData.skillLv >= 12) + { + MessageBoxUI.getInstance().addMessage("技能已升级到最高等级"); + return; + } + _loc6_ = _loc3_.merit; + _loc7_ = null; + _loc8_ = _loc4_.skillId; + do + { + _loc8_ += 1; + _loc7_ = HeroSkillData.getFightSkillBySkillId(_loc8_); + _loc5_ += _loc7_.skillPoint; + } + while(_loc7_.skillLv != 12); + if(_loc5_ > _loc6_) + { + MessageBoxUI.getInstance().addMessage("一键满级所需功勋值为" + _loc5_ + ",武将功勋值不够"); + return; + } + ConnectService.getInstance().heroService.oneKeyUpHeroFightSkill(_loc3_.heroId,this.fightSkillData.skillId); + return; + } + } + + public function unShow() : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function show(param1:Sprite) : void + { + if(param1) + { + param1.addChild(this); + this.x = param1.mouseX; + this.y = param1.mouseY; + this.showAll(); + } + } + + private function showAll() : void + { + var _loc1_:MovieClip = null; + var _loc2_:int = 0; + for each(_loc1_ in this.newArr) + { + if(contains(_loc1_)) + { + removeChild(_loc1_); + } + } + this.newArr.splice(0,this.newArr.length); + switch(this.status) + { + case 0: + this.newArr.push(this.studyBtn); + break; + case 1: + this.newArr.push(this.upBtn); + this.newArr.push(this.oneUpBtn); + this.newArr.push(this.equipBtn); + break; + case 2: + this.newArr.push(this.equipBtn); + break; + case 3: + this.newArr.push(this.unEquipBtn); + } + for each(_loc1_ in this.newArr) + { + addChild(_loc1_); + _loc1_.y = _loc2_ * 20; + _loc2_++; + } + } + + private function mouseOut(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + _loc2_.bg1.visible = false; + } + + private function mouseOver(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + _loc2_.bg1.visible = true; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/FightSkillPage.as b/flash_decompiled/com/view/ui/hero/FightSkillPage.as new file mode 100644 index 0000000..3ca41c6 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/FightSkillPage.as @@ -0,0 +1,168 @@ +package com.view.ui.hero +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.ui.hero.data.FightSkillData; + import com.view.ui.hero.data.HeroSkillData; + import com.view.ui.hero.mc.FightEquipSkill; + import com.view.ui.hero.mc.FightSkillMc; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class FightSkillPage extends Sprite + { + + private var pointText:TextField; + + private var equipSkill1:FightEquipSkill; + + private var equipSkill2:FightEquipSkill; + + private var equipSkill3:FightEquipSkill; + + private var equipSkill4:FightEquipSkill; + + private var equipSkill5:FightEquipSkill; + + private var currHero:NewHero; + + private var skillMcVec:Vector.; + + public function FightSkillPage() + { + var _loc1_:Button_9 = null; + this.skillMcVec = new Vector.(); + super(); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + this.equipSkill1 = new FightEquipSkill(1); + this.equipSkill2 = new FightEquipSkill(2); + this.equipSkill3 = new FightEquipSkill(3); + this.equipSkill4 = new FightEquipSkill(4); + this.equipSkill5 = new FightEquipSkill(5); + addChild(this.equipSkill1); + this.equipSkill1.x = -150; + this.equipSkill1.y = 218; + addChild(this.equipSkill2); + this.equipSkill2.x = this.equipSkill1.x + 46; + this.equipSkill2.y = this.equipSkill1.y; + addChild(this.equipSkill3); + this.equipSkill3.x = this.equipSkill2.x + 46; + this.equipSkill3.y = this.equipSkill1.y; + addChild(this.equipSkill4); + this.equipSkill4.x = this.equipSkill1.x; + this.equipSkill4.y = this.equipSkill1.y + 45; + addChild(this.equipSkill5); + this.equipSkill5.x = this.equipSkill4.x + 46; + this.equipSkill5.y = this.equipSkill1.y + 45; + this.equipSkill4.setLock(true); + this.equipSkill5.setLock(true); + this.pointText = PublicMethod.getTextFieldWithFillter(16776960,250); + addChild(this.pointText); + this.pointText.x = 14; + this.pointText.y = 318; + _loc1_ = new Button_9("技能说明"); + _loc1_.buttonMode = true; + addChild(_loc1_); + _loc1_.x = 300; + _loc1_.y = this.pointText.y; + var _loc2_:String = "1、被动技能只在单挑开始时触发,产生的效果整个单挑过程中都会有效"; + _loc2_ += "
2、主动技能每回合开始时触发"; + _loc2_ += "
3、每个武将可带1个被动技能,2个主动技能"; + ToolTipManager.getInstance().setToolTip(_loc1_,new TxtTooltip(_loc2_),false,-1,false); + ConnectService.getInstance().heroService.getFightSkill(); + Utils.g_events.addEventListener(DevEvent.DATA_SKILL_FIGHT,this.getFightSKillDataResult); + } + + public function loadData(param1:NewHero) : void + { + this.currHero = param1; + this.showSkillByHero(); + } + + public function getFightSKillList() : void + { + ConnectService.getInstance().heroService.getUserFightSkill(); + } + + public function addEvent() : void + { + Utils.g_events.addEventListener(DevEvent.DATA_SKILL_USERLIST,this.getUserSKillResult); + } + + public function delEvent() : void + { + Utils.g_events.removeEventListener(DevEvent.DATA_SKILL_USERLIST,this.getUserSKillResult); + } + + private function getFightSKillDataResult(param1:DevEvent) : void + { + var _loc4_:int = 0; + var _loc5_:FightSkillData = null; + var _loc6_:FightSkillMc = null; + var _loc2_:Array = HeroSkillData.getFirstLevelFightSkillList(); + var _loc3_:int = 0; + for each(_loc4_ in _loc2_) + { + _loc5_ = HeroSkillData.getFightSkillBySkillId(_loc4_); + _loc6_ = new FightSkillMc(_loc5_); + addChild(_loc6_); + _loc6_.x = 45 + 79 * (_loc3_ % 4); + _loc6_.y = 59 + 50 * int(_loc3_ / 4); + this.skillMcVec.push(_loc6_); + _loc3_++; + } + this.getFightSKillList(); + } + + private function getUserSKillResult(param1:DevEvent) : void + { + this.showSkillByHero(); + } + + private function showSkillByHero() : void + { + var _loc4_:FightSkillMc = null; + var _loc1_:uint = this.currHero.fightSkill1; + var _loc2_:uint = this.currHero.fightSkill2; + var _loc3_:uint = this.currHero.fightSkill3; + this.equipSkill1.setEquipSkill(_loc1_); + this.equipSkill2.setEquipSkill(_loc2_); + this.equipSkill3.setEquipSkill(_loc3_); + this.pointText.text = "当前拥有功勋点:" + this.currHero.merit; + for each(_loc4_ in this.skillMcVec) + { + _loc4_.loadUserFightSkill(this.currHero.heroId); + } + } + + private function getHeroResult(param1:DevEvent) : void + { + if(param1.id == this.currHero.heroId) + { + this.showSkillByHero(); + } + } + + public function hiddenMenu() : void + { + var _loc1_:FightSkillMenu = FightSkillMenu.instance; + if(_loc1_) + { + _loc1_.unShow(); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + this.hiddenMenu(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroChaofu.as b/flash_decompiled/com/view/ui/hero/HeroChaofu.as new file mode 100644 index 0000000..cef9139 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroChaofu.as @@ -0,0 +1,173 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.newdata.hero.NewHero; + import com.view.newui.UITabBtn; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class HeroChaofu extends Sprite + { + + private var face:InstallFace; + + private var btnArr:Vector.; + + private var bg1:UIWindowBg; + + private var currHero:NewHero; + + private var prePage:ChaofuBase; + + private var preBtn:UITabBtn; + + private var page1:ChaofuBase; + + private var page2:ChaofuBase; + + private var page3:ChaofuBase; + + private var page4:ChaofuBase; + + private var page5:ChaofuBase; + + public function HeroChaofu() + { + var _loc8_:UITabBtn = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(359 + 170,367); + addChild(_loc1_); + this.btnArr = new Vector.(); + var _loc2_:UITabBtn = new UITabBtn("武将朝服",2); + var _loc3_:UITabBtn = new UITabBtn("朝服强化",2); + var _loc4_:UITabBtn = new UITabBtn("朝服分解",2); + var _loc5_:UITabBtn = new UITabBtn("朝服镶嵌",2); + var _loc6_:UITabBtn = new UITabBtn("朝服洗练",2); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + var _loc7_:int = 0; + for each(_loc8_ in this.btnArr) + { + _loc1_.addChild(_loc8_); + _loc8_.x = 10 + _loc7_ * 66; + _loc8_.y = 4; + _loc8_.onClick = this.clickPage; + _loc7_++; + } + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(520,334); + _loc1_.addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = _loc2_.y + 25; + _loc2_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + public function getInfo(param1:NewHero) : void + { + this.currHero = param1; + this.prePage.setHero(this.currHero); + } + + public function getCurrHero() : NewHero + { + return this.currHero; + } + + private function clickPage(param1:MouseEvent) : void + { + var _loc3_:ChaofuBase = null; + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.btnArr[0] == _loc2_) + { + _loc3_ = this.getPage1(); + } + if(this.btnArr[1] == _loc2_) + { + _loc3_ = this.getPage2(); + } + if(this.btnArr[2] == _loc2_) + { + _loc3_ = this.getPage3(); + } + if(this.btnArr[3] == _loc2_) + { + _loc3_ = this.getPage4(); + } + if(this.btnArr[4] == _loc2_) + { + _loc3_ = this.getPage5(); + } + if(_loc3_ != this.prePage) + { + if(this.preBtn) + { + this.preBtn.select = false; + } + this.preBtn = _loc2_; + this.preBtn.select = true; + if(Boolean(this.prePage) && this.bg1.contains(this.prePage)) + { + this.bg1.removeChild(this.prePage); + } + this.prePage = _loc3_; + this.bg1.addChild(this.prePage); + if(this.currHero) + { + this.prePage.setHero(this.currHero); + } + } + } + + private function getPage1() : ChaofuBase + { + if(this.page1 == null) + { + this.page1 = new Chaofu1(); + } + return this.page1; + } + + private function getPage2() : ChaofuBase + { + if(this.page2 == null) + { + this.page2 = new Chaofu2(); + } + return this.page2; + } + + private function getPage3() : ChaofuBase + { + if(this.page3 == null) + { + this.page3 = new Chaofu3(); + } + return this.page3; + } + + private function getPage4() : ChaofuBase + { + if(this.page4 == null) + { + this.page4 = new Chaofu4(); + } + return this.page4; + } + + private function getPage5() : ChaofuBase + { + if(this.page5 == null) + { + this.page5 = new Chaofu5(); + } + return this.page5; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroConst.as b/flash_decompiled/com/view/ui/hero/HeroConst.as new file mode 100644 index 0000000..868a83c --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroConst.as @@ -0,0 +1,464 @@ +package com.view.ui.hero +{ + import com.newdata.hero.NewHero; + import flash.display.Bitmap; + import flash.display.DisplayObjectContainer; + import flash.display.Sprite; + + public class HeroConst + { + + public static const C_KEEP:String = "keep"; + + public static const C_HP:int = 3; + + private static const startQualityNum:Array = [12,24,40,60,80,100,120,150]; + + public static const C_ADDPOINT:String = "addPoint"; + + public static const C_REGENER:String = "regener"; + + public static const C_WASH:String = "wash"; + + public static const C_REPLACE:String = "replace"; + + public static const C_DEF:int = 2; + + public static const C_BUY:String = "buy"; + + public static const C_SHOWRE:String = "showRegener"; + + public static const C_LOT_VIEW:String = "lotView"; + + public static const C_AGL:int = 4; + + public static const C_LOTPOINT:String = "lotPoint"; + + public static const C_REG:String = "reg"; + + public static const C_ATK:int = 1; + + public static const atkArr:Array = ["进攻入门","进攻小成","进攻大师","毁灭打击"]; + + public static const defArr:Array = ["防御入门","防御小成","防御大师","移动堡垒"]; + + public static const hpArr:Array = ["修身入门","修身小成","修身大师","不灭金身"]; + + public static const aglArr:Array = ["灵敏入门","灵敏小成","灵敏大师","天外飞仙"]; + + public function HeroConst() + { + super(); + } + + public static function getChenghao(param1:NewHero) : String + { + var _loc2_:String = null; + var _loc3_:String = null; + var _loc4_:* = String(param1.fen2 / 10); + var _loc5_:* = Number(_loc4_); + var _loc6_:* = String(param1.fen3 / 10); + var _loc7_:* = Number(_loc6_); + var _loc8_:* = String(param1.fen1 / 10); + var _loc9_:* = Number(_loc8_); + var _loc10_:* = String(param1.fen4 / 10); + var _loc11_:* = Number(_loc10_); + var _loc12_:Array = new Array(); + var _loc13_:Array = new Array(); + _loc13_.push(_loc5_,_loc7_,_loc9_,_loc11_); + _loc12_.push(_loc5_,_loc7_,_loc9_,_loc11_); + _loc12_.sort(Array.NUMERIC); + var _loc14_:* = _loc12_[_loc12_.length - 1]; + var _loc15_:* = _loc13_.indexOf(_loc14_); + if(_loc14_ < 39 && _loc14_ >= 35) + { + _loc2_ = officer(_loc15_,0); + _loc3_ = "#00FFFF"; + } + else if(_loc14_ < 43 && _loc14_ >= 39) + { + _loc2_ = officer(_loc15_,1); + _loc3_ = "#FF00FF"; + } + else if(_loc14_ < 47 && _loc14_ >= 43) + { + _loc2_ = officer(_loc15_,2); + _loc3_ = "#FF0000"; + } + else if(_loc14_ >= 47) + { + _loc2_ = officer(_loc15_,3); + _loc3_ = "#00FF00"; + } + else + { + _loc3_ = "#FFFFFF"; + _loc2_ = "平庸"; + } + if(param1.level < 60) + { + _loc3_ = "#FFFFFF"; + _loc2_ = "无"; + } + return "" + _loc2_ + ""; + } + + private static function officer(param1:int, param2:int) : String + { + var _loc3_:String = null; + switch(param1) + { + case 0: + _loc3_ = atkArr[param2]; + break; + case 1: + _loc3_ = defArr[param2]; + break; + case 2: + _loc3_ = hpArr[param2]; + break; + case 3: + _loc3_ = aglArr[param2]; + } + return _loc3_; + } + + public static function getFrameByCareerName(param1:String) : int + { + var _loc2_:int = 0; + if(param1 == "quanMian") + { + _loc2_ = 1; + } + if(param1 == "buBing") + { + _loc2_ = 2; + } + if(param1 == "gongBing") + { + _loc2_ = 3; + } + if(param1 == "qiBing") + { + _loc2_ = 4; + } + if(param1 == "cheBing") + { + _loc2_ = 5; + } + if(param1 == "qiXie") + { + _loc2_ = 6; + } + return _loc2_; + } + + public static function setHeroNameColor(param1:Number) : uint + { + var _loc2_:uint = 0; + if(param1 + 0.001 < 6) + { + _loc2_ = 16777215; + } + else if(param1 + 0.001 < 10) + { + _loc2_ = 65280; + } + else if(param1 + 0.001 < 16) + { + _loc2_ = 65535; + } + else if(param1 + 0.001 < 27) + { + _loc2_ = 13369599; + } + else if(param1 + 0.001 < 35) + { + _loc2_ = 16750693; + } + else + { + _loc2_ = 13369344; + } + return _loc2_; + } + + public static function addCountIcon(param1:int, param2:DisplayObjectContainer) : DisplayObjectContainer + { + var _loc3_:int = 0; + var _loc4_:Bitmap = null; + var _loc5_:int = 0; + var _loc6_:Bitmap = null; + if(param1 <= 0) + { + return param2; + } + return param2; + } + + public static function careerName(param1:int) : String + { + var _loc2_:String = ""; + var _loc3_:* = String(param1); + var _loc4_:* = int(_loc3_.substr(_loc3_.length - 1,1)); + switch(_loc4_) + { + case 0: + _loc2_ = "勇士"; + break; + case 1: + _loc2_ = "步兵"; + break; + case 2: + _loc2_ = "弓兵"; + break; + case 3: + _loc2_ = "骑兵"; + break; + case 4: + _loc2_ = "车兵"; + break; + case 5: + _loc2_ = "器械"; + } + return _loc2_; + } + + public static function careerId(param1:int) : String + { + var _loc2_:* = String(param1); + return _loc2_.substr(_loc2_.length - 1,1); + } + + public static function getHpStatus(param1:int) : String + { + var _loc2_:String = null; + if(Number(param1) >= 80) + { + _loc2_ = "" + "健康" + ""; + } + else if(Number(param1) > 39 && Number(param1) < 80) + { + _loc2_ = "" + "轻伤" + ""; + } + else if(Number(param1) <= 39) + { + _loc2_ = "" + "重伤" + ""; + } + return _loc2_; + } + + public static function bingzhongMap(param1:int, param2:String) : Sprite + { + var _loc3_:int = 0; + var _loc4_:Bitmap = null; + var _loc5_:String = ""; + switch(param2) + { + case "0.9": + _loc3_ = 1; + break; + case "1": + _loc3_ = 2; + break; + case "1.1": + _loc3_ = 3; + break; + case "1.2": + _loc3_ = 4; + break; + case "1.3": + _loc3_ = 5; + break; + case "1.4": + _loc3_ = 6; + break; + case "1.5": + _loc3_ = 7; + } + switch(param1) + { + case 1: + _loc5_ = "LIB_UI_IMG_bz_bu"; + break; + case 2: + _loc5_ = "LIB_UI_IMG_bz_gong"; + break; + case 3: + _loc5_ = "LIB_UI_IMG_bz_che"; + break; + case 4: + _loc5_ = "LIB_UI_IMG_bz_qi"; + break; + case 5: + _loc5_ = "LIB_UI_IMG_bz_xie"; + } + var _loc6_:* = new Sprite(); + var _loc7_:int = 0; + return _loc6_; + } + + public static function changeName(param1:int, param2:int = 3, param3:Boolean = false) : String + { + if(param2 > 7) + { + param2 = 6; + } + var _loc4_:* = "条件不对"; + if(param3) + { + if(param2 == 4) + { + _loc4_ = "" + (param1 - 120 * (param2 - 3) + ""); + } + else if(param2 == 5) + { + _loc4_ = "" + (param1 - 120 * (param2 - 3)) + ""; + } + else if(param2 == 6) + { + _loc4_ = "" + (param1 - 120 * (param2 - 3)) + ""; + } + else if(param2 > 6) + { + } + if(param2 <= 3) + { + _loc4_ = String(param1); + } + return _loc4_; + } + if(param2 == 4) + { + _loc4_ = "禁军" + (param1 - 120 * (param2 - 3)) + "级"; + } + if(param2 == 5) + { + _loc4_ = "御前" + (param1 - 120 * (param2 - 3)) + "级"; + } + if(param2 == 6) + { + _loc4_ = "皇家" + (param1 - 120 * (param2 - 3)) + "级"; + } + if(param2 > 6) + { + _loc4_ = "霸天" + (param1 - 120 * (param2 - 3)) + "级"; + } + if(param2 > 3) + { + return _loc4_; + } + return String(param1); + } + + public static function getChangeCountByLevel(param1:int) : int + { + var _loc2_:int = 0; + var _loc3_:int = 0; + if(param1 > 120) + { + _loc2_ = param1 % 120 == 0 ? 1 : 0; + _loc3_ = int(param1 / 120) - _loc2_ + 3; + } + else + { + _loc3_ = 3; + } + return _loc3_; + } + + public static function changeHeroPoint(param1:NewHero) : Array + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:Number = NaN; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc8_:* = new Array(); + var _loc9_:* = new Array(); + var _loc10_:* = new Array(); + _loc8_.push(param1.studyFen1); + _loc8_.push(param1.studyFen2); + _loc8_.push(param1.studyFen3); + _loc8_.push(param1.studyFen4); + var _loc11_:* = param1.changeCount <= 3 ? param1.level : 120; + _loc6_ = startQualityNum[param1.changeCount] + int(_loc11_ * param1.upCount); + _loc2_ = 0; + while(_loc2_ < _loc8_.length) + { + _loc3_ = _loc8_[_loc2_] * _loc6_ / 1000; + if(_loc3_ <= 0) + { + _loc3_ = 1; + } + _loc9_[_loc2_] = _loc3_; + _loc7_ += _loc3_; + _loc2_++; + } + var _loc12_:* = _loc6_ - _loc7_; + while(_loc12_ > 0) + { + _loc2_ = 0; + while(_loc2_ < _loc8_.length) + { + _loc4_ = Number(_loc8_[_loc2_] ^ 2 / (_loc9_[_loc2_] * (_loc9_[_loc2_] + 1))); + _loc10_.push(_loc4_); + _loc2_++; + } + _loc4_ = 0; + _loc2_ = 0; + while(_loc2_ < _loc10_.length) + { + if(_loc4_ < _loc10_[_loc2_]) + { + _loc4_ = Number(_loc10_[_loc2_]); + } + _loc2_++; + } + _loc5_ = int(_loc10_.indexOf(_loc4_)); + _loc9_[_loc5_] += 1; + _loc10_ = []; + _loc12_--; + } + return _loc9_; + } + + public static function bingzhong(param1:String) : String + { + var _loc2_:String = null; + switch(param1) + { + case "0.9": + _loc2_ = "C"; + break; + case "1": + _loc2_ = "B"; + break; + case "1.1": + _loc2_ = "A"; + break; + case "1.2": + _loc2_ = "S"; + break; + case "1.3": + _loc2_ = "SS"; + break; + case "1.4": + _loc2_ = "SSS"; + break; + case "1.5": + _loc2_ = "SSSS"; + } + return _loc2_; + } + + public static function career(param1:int) : Bitmap + { + var _loc2_:* = String(param1); + var _loc3_:* = int(_loc2_.substr(_loc2_.length - 1,1)); + return new Bitmap(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroEquUI.as b/flash_decompiled/com/view/ui/hero/HeroEquUI.as new file mode 100644 index 0000000..f364f93 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroEquUI.as @@ -0,0 +1,390 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.utils.Utils; + import com.view.newui.UIBigItem; + import com.view.newui.UIItem; + import com.view.newui.UITabBtn; + import com.view.newui.UIWindowBg; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class HeroEquUI extends Sprite + { + + private var face:InstallFace; + + private var bg:UIWindowBg; + + private var btnArr:Array; + + private var equItem1:UIItem; + + private var equItem2:UIItem; + + private var equItem3:UIItem; + + private var equItem4:UIItem; + + private var equItem5:UIItem; + + private var equItem6:UIItem; + + private var equItem7:UIItem; + + private var equItem8:UIItem; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var packEquipList:Vector.; + + private var heroEquVec:Vector.; + + private var equipType:int = 99; + + private var hero:NewHero; + + public function HeroEquUI() + { + var _loc13_:int = 0; + var _loc14_:UITabBtn = null; + var _loc15_:UIWindowBg = null; + var _loc16_:int = 0; + var _loc17_:UIBigItem = null; + this.face = InstallFace.getInstance(); + this.btnArr = new Array(); + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(528,204); + addChild(this.bg); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(140,195); + this.bg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:Sprite = this.face.getMovieClip(ClassConfig.ui_heropage2); + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 20; + this.equItem1 = new UIItem(); + _loc1_.addChild(this.equItem1); + this.equItem1.x = 51; + this.equItem1.y = 10; + this.equItem1.type = UIItem.TYPE_1; + this.equItem2 = new UIItem(); + _loc1_.addChild(this.equItem2); + this.equItem2.x = 100; + this.equItem2.y = 75; + this.equItem2.type = UIItem.TYPE_2; + this.equItem3 = new UIItem(); + _loc1_.addChild(this.equItem3); + this.equItem3.x = 3; + this.equItem3.y = 75; + this.equItem3.type = UIItem.TYPE_3; + this.equItem4 = new UIItem(); + _loc1_.addChild(this.equItem4); + this.equItem4.x = 3; + this.equItem4.y = 145; + this.equItem4.type = UIItem.TYPE_4; + this.equItem5 = new UIItem(); + _loc1_.addChild(this.equItem5); + this.equItem5.x = 100; + this.equItem5.y = 145; + this.equItem5.type = UIItem.TYPE_5; + this.equItem6 = new UIItem(); + _loc1_.addChild(this.equItem6); + this.equItem6.x = 3; + this.equItem6.y = 10; + this.equItem6.type = UIItem.TYPE_6; + this.equItem7 = new UIItem(); + _loc1_.addChild(this.equItem7); + this.equItem7.x = 100; + this.equItem7.y = 10; + this.equItem7.type = UIItem.TYPE_7; + this.equItem8 = new UIItem(); + _loc1_.addChild(this.equItem8); + this.equItem8.x = 51; + this.equItem8.y = 75; + this.equItem8.type = UIItem.TYPE_8; + var _loc3_:int = 1; + while(_loc3_ < 9) + { + this["equItem" + _loc3_].showTypeText(); + _loc3_++; + } + this.heroEquVec = new Vector.(); + this.heroEquVec.push(this.equItem1); + this.heroEquVec.push(this.equItem2); + this.heroEquVec.push(this.equItem3); + this.heroEquVec.push(this.equItem4); + this.heroEquVec.push(this.equItem5); + this.heroEquVec.push(this.equItem6); + this.heroEquVec.push(this.equItem7); + this.heroEquVec.push(this.equItem8); + this.equItem1.clickFunc = this.removeEqu; + this.equItem2.clickFunc = this.removeEqu; + this.equItem3.clickFunc = this.removeEqu; + this.equItem4.clickFunc = this.removeEqu; + this.equItem5.clickFunc = this.removeEqu; + this.equItem6.clickFunc = this.removeEqu; + this.equItem7.clickFunc = this.removeEqu; + this.equItem8.clickFunc = this.removeEqu; + var _loc4_:UITabBtn = new UITabBtn("全部",4); + var _loc5_:UITabBtn = new UITabBtn("武器",4); + var _loc6_:UITabBtn = new UITabBtn("铠甲",4); + var _loc7_:UITabBtn = new UITabBtn("护腿",4); + var _loc8_:UITabBtn = new UITabBtn("饰品",4); + var _loc9_:UITabBtn = new UITabBtn("头盔",4); + var _loc10_:UITabBtn = new UITabBtn("挂饰",4); + var _loc11_:UITabBtn = new UITabBtn("串珠",4); + var _loc12_:UITabBtn = new UITabBtn("护心",4); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + this.btnArr.push(_loc7_); + this.btnArr.push(_loc8_); + this.btnArr.push(_loc9_); + this.btnArr.push(_loc10_); + this.btnArr.push(_loc11_); + this.btnArr.push(_loc12_); + for each(_loc14_ in this.btnArr) + { + this.bg.addChild(_loc14_); + _loc14_.x = 158 + _loc13_ * 40; + _loc14_.y = 3; + _loc14_.onClick = this.clickTabBtn; + _loc13_++; + } + _loc4_.select = true; + _loc15_ = new UIWindowBg(); + _loc15_.initSecondPanel(364,171); + this.bg.addChild(_loc15_); + _loc15_.x = 159; + _loc15_.y = 28; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(372,176); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc15_.addChild(this.packScrollPane); + this.packScrollPane.x = 2; + this.packScrollPane.y = 2; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + _loc16_ = 0; + while(_loc16_ < 18) + { + _loc17_ = new UIBigItem(2); + this.packList.push(_loc17_); + this.packMc.addChild(_loc17_); + _loc17_.x = 1 + 60 * (_loc16_ % 6); + _loc17_.y = 1 + 59 * int(_loc16_ / 6); + _loc17_.clickFunc = this.setEqu; + _loc16_++; + } + this.packScrollPane.update(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + } + + private function clickTabBtn(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(_loc4_ != _loc2_) + { + _loc4_.select = false; + continue; + } + _loc4_.select = true; + switch(_loc3_) + { + case 0: + this.equipType = 99; + break; + case 1: + this.equipType = 63; + break; + case 2: + this.equipType = 62; + break; + case 3: + this.equipType = 64; + break; + case 4: + this.equipType = 65; + break; + case 5: + this.equipType = 61; + break; + case 6: + this.equipType = 67; + break; + case 7: + this.equipType = 68; + break; + case 8: + this.equipType = 69; + } + } + this.getEquipListResult(null); + } + + public function setHeroInfo(param1:NewHero) : void + { + this.hero = param1; + this.getEquipSetResult(null); + this.getEquipListResult(null); + } + + public function getAllEquipList() : void + { + this.getEquipListResult(null); + } + + public function equResult(param1:HeroEvent) : void + { + this.getEquipListResult(null); + } + + private function setEqu(param1:MouseEvent) : void + { + var _loc2_:UIBigItem = param1.currentTarget as UIBigItem; + if(_loc2_.getItem() != null && this.hero != null) + { + ConnectService.getInstance().heroService.setEqu(this.hero.heroId,_loc2_.getItem().id); + } + } + + private function removeEqu(param1:MouseEvent) : void + { + var _loc2_:UIItem = param1.currentTarget as UIItem; + if(_loc2_.getItemObj() != null && this.hero != null) + { + ConnectService.getInstance().heroService.removeEqu(this.hero.heroId,_loc2_.type - 60); + } + } + + private function addEvent(param1:Event) : void + { + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.getEquipListResult); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.getEquipSetResult); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_EQU_SET,this.equResult); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_EQU_REMOVE,this.equResult); + } + + private function delEvent(param1:Event) : void + { + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.getEquipListResult); + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.getEquipSetResult); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_EQU_SET,this.equResult); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_EQU_REMOVE,this.equResult); + } + + private function getEquipListResult(param1:DevEvent) : void + { + var _loc2_:* = undefined; + var _loc3_:UIBigItem = null; + var _loc4_:* = undefined; + this.packEquipList = PakState.getPakEquipListByChildType(this.equipType); + if(this.packEquipList == null || this.packEquipList.length == 0) + { + this.clearPackItem(); + return; + } + if(this.packEquipList.length > 18) + { + for(_loc2_ in this.packEquipList) + { + if(_loc2_ > 17) + { + _loc3_ = new UIBigItem(); + this.packList.push(_loc3_); + this.packMc.addChild(_loc3_); + _loc3_.x = 1 + 60 * (_loc2_ % 6); + _loc3_.y = 1 + 59 * int(_loc2_ / 6); + _loc3_.clickFunc = this.setEqu; + _loc3_.setItemObject(this.packEquipList[_loc2_]); + } + else + { + this.packList[_loc2_].setItemObject(this.packEquipList[_loc2_]); + } + } + } + else + { + for(_loc4_ in this.packList) + { + if(_loc4_ > 17) + { + this.packList[_loc4_].clear(); + this.packMc.removeChild(this.packList[_loc4_]); + this.packList.splice(_loc4_,1); + _loc4_--; + } + else if(_loc4_ < this.packEquipList.length) + { + this.packList[_loc4_].setItemObject(this.packEquipList[_loc4_]); + } + else + { + this.packList[_loc4_].setItemObject(null); + } + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + } + + private function getEquipSetResult(param1:DevEvent) : void + { + this.heroEquVec[0].setEquData(PakState.getHeroEquipById(this.hero.equ1)); + this.heroEquVec[1].setEquData(PakState.getHeroEquipById(this.hero.equ2)); + this.heroEquVec[2].setEquData(PakState.getHeroEquipById(this.hero.equ3)); + this.heroEquVec[4].setEquData(PakState.getHeroEquipById(this.hero.equ4)); + this.heroEquVec[3].setEquData(PakState.getHeroEquipById(this.hero.equ5)); + this.heroEquVec[5].setEquData(PakState.getHeroEquipById(this.hero.equ6)); + this.heroEquVec[6].setEquData(PakState.getHeroEquipById(this.hero.equ7)); + this.heroEquVec[7].setEquData(PakState.getHeroEquipById(this.hero.equ8)); + } + + private function clearPackItem() : void + { + var _loc1_:* = undefined; + for(_loc1_ in this.packList) + { + if(_loc1_ > 17) + { + this.packList[_loc1_].clear(); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + _loc1_--; + } + else + { + this.packList[_loc1_].setItemObject(null); + } + } + this.packScrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroFirstViewStar.as b/flash_decompiled/com/view/ui/hero/HeroFirstViewStar.as new file mode 100644 index 0000000..cc83768 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroFirstViewStar.as @@ -0,0 +1,129 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import flash.display.MovieClip; + import flash.display.Sprite; + + public class HeroFirstViewStar extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var starMc:MovieClip; + + private var markMc:MovieClip; + + private var yArr:Array; + + public var vLong:Number = 45; + + private var vNum:Number; + + private var endXyArr:Array; + + public function HeroFirstViewStar() + { + super(); + this.starMc = this.face.getMovieClip(ClassConfig.build_herostar); + addChild(this.starMc); + this.markMc = new MovieClip(); + addChild(this.markMc); + this.starMc.di.mask = this.markMc; + } + + public function showChart(param1:Array) : * + { + this.yArr = param1.slice(); + this.vNum = this.yArr.length; + this.endXyArr = new Array(); + var _loc2_:* = 0; + while(_loc2_ < this.yArr.length) + { + this.endXyArr.push(this.countXy(_loc2_,this.yArr[_loc2_])); + _loc2_ += 1; + } + this.markMc.graphics.clear(); + this.markMc.graphics.lineStyle(1,0,1); + this.markMc.graphics.beginFill(16777215); + this.markMc.graphics.moveTo(this.endXyArr[0][0],this.endXyArr[0][1]); + _loc2_ = 1; + while(_loc2_ < this.endXyArr.length) + { + this.markMc.graphics.lineTo(this.endXyArr[_loc2_][0],this.endXyArr[_loc2_][1]); + _loc2_ += 1; + } + this.markMc.graphics.lineTo(this.endXyArr[0][0],this.endXyArr[0][1]); + this.markMc.graphics.endFill(); + } + + private function countBl(param1:Number, param2:Number) : Number + { + return Math.log(param1) * param2 * Math.LOG10E; + } + + public function countXy(param1:Number, param2:Array) : Array + { + var _loc3_:Number = 0.15; + if(param2[1] == 10000) + { + if(param2[0] <= 10) + { + _loc3_ = 0.2; + } + if(param2[0] < 1000 && param2[0] > 10) + { + _loc3_ = 0.2 + this.countBl(Number(param2[0] / 10),0.1); + } + if(param2[0] >= 1000 && param2[0] < 3000) + { + _loc3_ = 0.4 + this.countBl(Number(param2[0] / 1000),0.419181); + } + if(param2[0] >= 3000 && param2[0] < 6000) + { + _loc3_ = 0.6 + this.countBl(Number(param2[0] / 3000),0.664386); + } + if(param2[0] >= 6000 && param2[0] < 10000) + { + _loc3_ = 0.8 + this.countBl(Number(param2[0] / 6000),0.664386); + } + _loc3_ = this.countBl(Number(param2[0]),0.2); + } + else + { + if(param2[0] <= 4) + { + _loc3_ = 0.15; + } + if(param2[0] < 500 && param2[0] > 4) + { + _loc3_ = 0.15 + this.countBl(Number(param2[0] / 4),0.119223); + } + if(param2[0] >= 500 && param2[0] < 2000) + { + _loc3_ = 0.4 + this.countBl(Number(param2[0] / 500),0.332193); + } + if(param2[0] >= 2000 && param2[0] < 4000) + { + _loc3_ = 0.6 + this.countBl(Number(param2[0] / 2000),0.664386); + } + if(param2[0] >= 4000) + { + _loc3_ = 0.8 + this.countBl(Number(param2[0] / 4000),0.664386); + } + } + var _loc4_:* = _loc3_ * this.vLong; + return this.getVbackSpeed(param1 * (360 / this.vNum) - 90,_loc4_); + } + + public function getVbackSpeed(param1:Number, param2:Number = 1) : Array + { + var _loc3_:* = new Array(); + var _loc4_:* = param1 / 180 * Math.PI; + _loc3_[0] = Math.cos(_loc4_) * param2; + _loc3_[1] = Math.sin(_loc4_) * param2; + return _loc3_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroGovPotUI.as b/flash_decompiled/com/view/ui/hero/HeroGovPotUI.as new file mode 100644 index 0000000..6c6409a --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroGovPotUI.as @@ -0,0 +1,182 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.view.newui.UIButton; + import com.view.newui.UITable; + import com.view.ui.hero.mc.GovPozMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tools.ToolView; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class HeroGovPotUI extends Sprite + { + + private var face:InstallFace; + + private var bg:Sprite; + + private var tableMc:UITable; + + private var hero:Object; + + private var govObj:Object; + + private var govMcVec:Vector.; + + private var govScrollPane:ScrollPane; + + private var govListMc:Sprite; + + public function HeroGovPotUI() + { + var _loc5_:GovPozMc = null; + this.face = InstallFace.getInstance(); + this.govMcVec = new Vector.(); + super(); + var _loc1_:Array = ["官职","官职数量","官职加成","册封需求","封官"]; + var _loc2_:Array = [80,70,120,171,100]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(6,_loc1_,_loc2_); + addChild(this.tableMc); + var _loc3_:UIButton = new UIButton("购买封印",2); + addChild(_loc3_); + _loc3_.x = 470; + _loc3_.y = 185; + _loc3_.onClick = this.shop; + this.govScrollPane = new ScrollPane(); + this.govScrollPane.setSize(535,150); + this.govScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.govScrollPane); + this.govScrollPane.x = 1; + this.govScrollPane.y = 25; + this.govListMc = new Sprite(); + this.govScrollPane.source = this.govListMc; + var _loc4_:int = 0; + while(_loc4_ < 6) + { + _loc5_ = new GovPozMc(); + this.govListMc.addChild(_loc5_); + this.govMcVec.push(_loc5_); + _loc5_.y = _loc4_ * 25; + _loc5_.x = 4; + _loc5_.cefengBtn.onClick = this.giveGovPoz; + _loc4_++; + } + this.govScrollPane.update(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + this.getGovPozList(); + } + + private function shop(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_HUFU"); + _loc2_.onRefresh = null; + _loc2_.show(); + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(HeroEvent.HERO_GOVPOZ_LIST,this.getGovPozListResult); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_GOVPOZ_GIVE,this.giveHeroGovResult); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_GOVPOZ_TAKEOFF,this.takeOffHeroGovResult); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_GOVPOZ_LIST,this.getGovPozListResult); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_GOVPOZ_GIVE,this.giveHeroGovResult); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_GOVPOZ_TAKEOFF,this.takeOffHeroGovResult); + } + + private function getGovPozList() : void + { + ConnectService.getInstance().heroService.getUserGovPotzList(); + } + + public function setHero(param1:Object) : void + { + this.hero = param1; + } + + private function getGovPozListResult(param1:HeroEvent) : void + { + var _loc4_:GovPozMc = null; + this.govObj = param1.govObj; + this.clearGovList(); + var _loc2_:Array = this.govObj.govList; + var _loc3_:int = 0; + while(_loc3_ < _loc2_.length) + { + if(_loc3_ > 5) + { + _loc4_ = new GovPozMc(); + this.govListMc.addChild(_loc4_); + this.govMcVec.push(_loc4_); + _loc4_.y = _loc3_ * 25; + _loc4_.x = 4; + _loc4_.cefengBtn.onClick = this.giveGovPoz; + } + this.govMcVec[_loc3_].setObj(_loc2_[_loc3_]); + _loc3_++; + } + this.govScrollPane.update(); + } + + private function clearGovList() : void + { + var _loc1_:int = int(this.govMcVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ < 6) + { + this.govMcVec[_loc2_].setObj(null); + } + else + { + this.govMcVec[_loc2_].clear(null); + this.govListMc.removeChild(this.govMcVec[_loc2_]); + this.govMcVec.splice(_loc2_,1); + } + _loc2_--; + } + this.govScrollPane.update(); + } + + private function giveGovPoz(param1:MouseEvent) : void + { + var _loc2_:GovPozMc = param1.currentTarget.parent as GovPozMc; + if(_loc2_.govObj == null) + { + return; + } + if(this.hero == null) + { + return; + } + ConnectService.getInstance().heroService.giveGovPotz(this.hero.heroId,_loc2_.govObj.govPotzId); + } + + private function giveHeroGovResult(param1:HeroEvent) : void + { + MessageBoxUI.getInstance().addMessage("修改成功"); + this.getGovPozList(); + } + + private function takeOffHeroGovResult(param1:HeroEvent) : void + { + MessageBoxUI.getInstance().addMessage("修改成功"); + this.getGovPozList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroHeadTip.as b/flash_decompiled/com/view/ui/hero/HeroHeadTip.as new file mode 100644 index 0000000..2d91a27 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroHeadTip.as @@ -0,0 +1,50 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class HeroHeadTip extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var headImg:Bitmap; + + private var loader:LoadResource; + + public function HeroHeadTip() + { + super(); + var _loc1_:Sprite = this.face.getSprite(ClassConfig.lib_herobg); + addChild(_loc1_); + } + + public function setHead(param1:String) : void + { + param1 = "pic/head/" + param1; + this.loader = new LoadResource(param1,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + addChild(this.headImg); + this.headImg.x = 5; + this.headImg.y = 5; + } + + public function destroy() : void + { + if(Boolean(this.headImg) && contains(this.headImg)) + { + removeChild(this.headImg); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroHeadUI.as b/flash_decompiled/com/view/ui/hero/HeroHeadUI.as new file mode 100644 index 0000000..0865039 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroHeadUI.as @@ -0,0 +1,210 @@ +package com.view.ui.hero +{ + import com.data.GameData; + import com.newdata.hero.NewHero; + import com.view.newui.UILabel; + import com.view.newui.UIPageMc; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.hero.mc.HeroImageItem; + import flash.events.MouseEvent; + + public class HeroHeadUI extends BaseUI + { + + private var currArr:Array; + + private var imgCounts:int; + + private var paneBg:UIWindowBg; + + private var pageMc:UIPageMc; + + private var itemVec:Vector.; + + private var currPage:int = 1; + + private var selectBackF:Function; + + public function HeroHeadUI() + { + var _loc2_:UILabel = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:HeroImageItem = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xuanzhehead); + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630 - 45,400 - 100); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 39; + this.itemVec = new Vector.(); + var _loc1_:int = 1; + while(_loc1_ < 4) + { + _loc3_ = 1; + while(_loc3_ < 9) + { + _loc4_ = (_loc1_ - 1) * 8 + _loc3_ - 1; + _loc5_ = new HeroImageItem(null); + this.paneBg.addChild(_loc5_); + _loc5_.x = 10 + (_loc3_ - 1) * 72; + _loc5_.y = 10 + (_loc1_ - 1) * 86; + _loc5_.addEventListener(MouseEvent.CLICK,this.selectHeadImg); + this.itemVec.push(_loc5_); + _loc3_++; + } + _loc1_++; + } + this.pageMc = new UIPageMc(); + this.paneBg.addChild(this.pageMc); + this.pageMc.x = 460; + this.pageMc.y = 282; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + _loc2_ = new UILabel(400,10852210); + _loc2_.setText("更改武将头像需要消耗一个改头换面卡,包裹中有兑换"); + this.paneBg.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 282; + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w - 45; + window_heihgt = UIWindowBg.normal_window_h - 100; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 - 45; + ui_closeBtn.y = 10; + } + + private function getNumStr(param1:int) : String + { + if(param1 < 10) + { + return "00" + param1; + } + if(param1 < 100) + { + return "0" + param1; + } + return "" + param1; + } + + public function setHero(param1:NewHero) : void + { + var _loc3_:int = 0; + if(param1.gen == 0) + { + this.currArr = new Array(); + this.imgCounts = GameData.getConfigMap()["HERO_HEAD_MALE_COUNT"]; + _loc3_ = 1; + while(_loc3_ <= this.imgCounts) + { + this.currArr.push("male" + this.getNumStr(_loc3_) + ".jpg"); + _loc3_++; + } + } + else + { + this.currArr = new Array(); + this.imgCounts = GameData.getConfigMap()["HERO_HEAD_REMALE_COUNT"]; + _loc3_ = 1; + while(_loc3_ <= this.imgCounts) + { + this.currArr.push("female" + this.getNumStr(_loc3_) + ".jpg"); + _loc3_++; + } + } + var _loc2_:int = 1 + (this.imgCounts - 1) / 24; + if(_loc2_ <= 0) + { + _loc2_ = 1; + } + if(this.currPage > _loc2_) + { + this.currPage = _loc2_; + } + this.pageMc.setPageCount(_loc2_); + this.pageMc.setPage(this.currPage); + this.getItemListByType(); + } + + override public function setPosition() : void + { + } + + public function nextPage() : void + { + this.currPage += 1; + this.getItemListByType(); + } + + public function prePage() : void + { + --this.currPage; + this.getItemListByType(); + } + + public function setCurrPage(param1:int) : void + { + this.currPage = param1; + } + + private function getItemListByType() : void + { + var _loc1_:int = 24 * (this.currPage - 1); + var _loc2_:int = 24 * this.currPage; + var _loc3_:int = 0; + var _loc4_:int = _loc1_; + while(_loc4_ < _loc2_) + { + if(_loc4_ < this.imgCounts) + { + this.itemVec[_loc3_].setUrl(this.currArr[_loc4_]); + this.itemVec[_loc3_].visible = true; + } + else + { + this.itemVec[_loc3_].setUrl(null); + this.itemVec[_loc3_].visible = false; + } + _loc3_++; + _loc4_++; + } + this.pageMc.setPage(this.currPage); + } + + private function selectHeadImg(param1:MouseEvent) : void + { + var _loc2_:HeroImageItem = param1.currentTarget as HeroImageItem; + var _loc3_:String = _loc2_.currUrl; + this.selectBackF(_loc3_); + this.closeUI(param1); + } + + public function selectImgFunc(param1:Function) : void + { + this.selectBackF = param1; + } + + public function clear() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroInfoPage1.as b/flash_decompiled/com/view/ui/hero/HeroInfoPage1.as new file mode 100644 index 0000000..e215a99 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroInfoPage1.as @@ -0,0 +1,508 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.newdata.hero.NewHero; + import com.view.mc.button.*; + import com.view.newui.UISmallBtn; + import com.view.newui.UIWindowBg; + import com.view.tip.HeroTip; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HeroInfoPage1 extends Sprite + { + + private var bg1:UIWindowBg; + + private var bg2:Sprite; + + private var hero:NewHero; + + private var face:InstallFace; + + private var careerImg:MovieClip; + + private var heroTip:HeroTip; + + private var imgSp:Sprite; + + public var starMap:HeroFirstViewStar; + + public var strongFunc:Function; + + public var fengguanFunc:Function; + + public var jinjieFunc:Function; + + private var leadText:TextField; + + private var atkText:TextField; + + private var defText:TextField; + + private var hpText:TextField; + + private var aglText:TextField; + + private var govPozMc:Sprite; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var mianzhiBtn:UISmallBtn; + + private var loader:LoadResource; + + private var heroInfo:HeroInfoUI; + + private var heroEqu:HeroEquUI; + + private var heroGov:HeroGovPotUI; + + private var headImg:Bitmap; + + public var btn6:UISmallBtn; + + public var btn1:UISmallBtn; + + private var currPage:int; + + private var heroHeadUI:HeroHeadUI; + + public function HeroInfoPage1() + { + var _loc4_:Sprite = null; + var _loc8_:TextField = null; + var _loc9_:TextField = null; + var _loc15_:TextField = null; + this.face = InstallFace.getInstance(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(528,150); + addChild(this.bg1); + var _loc1_:Sprite = new Scale9Grid(this.face.getSprite(ClassConfig.lib_img_border),52,70); + this.imgSp = this.face.getSprite(ClassConfig.lib_herobg); + this.bg1.addChild(_loc1_); + _loc1_.x = 20; + _loc1_.y = 20; + _loc1_.addChild(this.imgSp); + this.imgSp.x = 10; + this.imgSp.y = 10; + var _loc2_:UISmallBtn = new UISmallBtn("解雇武将",3); + this.bg1.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 133; + _loc2_.onClick = this.fireHero; + var _loc3_:UISmallBtn = new UISmallBtn("修改头像",3); + this.bg1.addChild(_loc3_); + _loc3_.x = _loc2_.x + _loc2_.width + 5; + _loc3_.y = 133; + _loc3_.onClick = this.openSelectImgUI; + _loc4_ = PublicMethod.getTdLine(150); + this.bg1.addChild(_loc4_); + _loc4_.x = 135; + _loc4_.y = 5; + this.starMap = new HeroFirstViewStar(); + this.bg1.addChild(this.starMap); + this.starMap.x = 238; + this.starMap.y = 82; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(10852210,40); + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(10852210,40); + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(10852210,40); + _loc8_ = PublicMethod.getTextFieldWithFillter(10852210,40); + _loc9_ = PublicMethod.getTextFieldWithFillter(10852210,40); + _loc5_.text = "统率"; + _loc6_.text = "攻击"; + _loc7_.text = "敏捷"; + _loc8_.text = "防御"; + _loc9_.text = "体力"; + this.bg1.addChild(_loc5_); + _loc5_.x = 224; + _loc5_.y = 8; + this.bg1.addChild(_loc6_); + _loc6_.x = 297; + _loc6_.y = 52; + this.bg1.addChild(_loc7_); + _loc7_.x = 270; + _loc7_.y = 124; + this.bg1.addChild(_loc8_); + _loc8_.x = 188; + _loc8_.y = 124; + this.bg1.addChild(_loc9_); + _loc9_.x = 158; + _loc9_.y = 52; + var _loc10_:Sprite = PublicMethod.getTdLine(150); + this.bg1.addChild(_loc10_); + _loc10_.x = 340; + _loc10_.y = 5; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc11_.text = "统 率:"; + this.bg1.addChild(_loc11_); + _loc11_.x = 360; + _loc11_.y = 20; + this.leadText = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.leadText); + this.leadText.x = _loc11_.x + 42; + this.leadText.y = _loc11_.y; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc12_.text = "攻 击:"; + this.bg1.addChild(_loc12_); + _loc12_.x = _loc11_.x; + _loc12_.y = _loc11_.y + 25; + this.atkText = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.atkText); + this.atkText.x = this.leadText.x; + this.atkText.y = _loc12_.y; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc13_.text = "防 御:"; + this.bg1.addChild(_loc13_); + _loc13_.x = _loc11_.x; + _loc13_.y = _loc12_.y + 25; + this.defText = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.defText); + this.defText.x = this.leadText.x; + this.defText.y = _loc13_.y; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc14_.text = "体 力:"; + this.bg1.addChild(_loc14_); + _loc14_.x = _loc11_.x; + _loc14_.y = _loc13_.y + 25; + this.hpText = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.hpText); + this.hpText.x = this.leadText.x; + this.hpText.y = _loc14_.y; + _loc15_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc15_.text = "敏 捷:"; + this.bg1.addChild(_loc15_); + _loc15_.x = _loc11_.x; + _loc15_.y = _loc14_.y + 25; + this.aglText = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.aglText); + this.aglText.x = this.leadText.x; + this.aglText.y = _loc15_.y; + this.careerImg = this.face.getMovieClip(ClassConfig.lib_hero_careerName); + _loc1_.addChild(this.careerImg); + this.careerImg.x = 68; + this.careerImg.y = 84; + this.careerImg.gotoAndStop(1); + this.btn1 = new UISmallBtn("改 名",2); + this.btn6 = new UISmallBtn("分 配",2); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + this.heroTip = new HeroTip(this.imgSp,this.face.stage,this.face.tip_bg); + this.createGivPozMc(); + } + + private function createGivPozMc() : void + { + this.govPozMc = PublicMethod.createShape(3090721,185,140); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc1_.text = "官 职:"; + this.govPozMc.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.label1 = PublicMethod.getTextFieldWithFillter(16640697,130); + this.govPozMc.addChild(this.label1); + this.label1.x = _loc1_.x + 42; + this.label1.y = _loc1_.y; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc2_.text = "等 级:"; + this.govPozMc.addChild(_loc2_); + _loc2_.x = _loc1_.x; + _loc2_.y = _loc1_.y + 25; + this.label2 = PublicMethod.getTextFieldWithFillter(16640697,130); + this.govPozMc.addChild(this.label2); + this.label2.x = _loc2_.x + 42; + this.label2.y = _loc2_.y; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc3_.text = "功 勋:"; + this.govPozMc.addChild(_loc3_); + _loc3_.x = _loc1_.x; + _loc3_.y = _loc2_.y + 25; + this.label3 = PublicMethod.getTextFieldWithFillter(16640697,130); + this.govPozMc.addChild(this.label3); + this.label3.x = _loc3_.x + 42; + this.label3.y = _loc3_.y; + var _loc4_:TextField = PublicMethod.getTextField(10852210,170); + _loc4_.height = 34; + _loc4_.multiline = true; + _loc4_.wordWrap = true; + var _loc5_:TextFormat = new TextFormat(); + _loc5_.leading = 4; + this.govPozMc.addChild(_loc4_); + _loc4_.defaultTextFormat = _loc5_; + _loc4_.text = "武将单挑,参加活动“过关斩将”可以得到大量功勋"; + _loc4_.y = 80; + _loc4_.x = 10; + this.mianzhiBtn = new UISmallBtn("免除官职",3); + this.govPozMc.addChild(this.mianzhiBtn); + this.mianzhiBtn.x = this.label1.x + 70; + this.mianzhiBtn.y = this.label1.y - 2; + this.mianzhiBtn.onClick = this.takeOffGov; + } + + private function setGivPozInfo() : void + { + if(!this.bg1.contains(this.govPozMc)) + { + this.bg1.addChild(this.govPozMc); + this.govPozMc.x = 350; + this.govPozMc.y = 10; + } + } + + private function delGivPozMc() : void + { + if(Boolean(this.govPozMc) && this.bg1.contains(this.govPozMc)) + { + this.bg1.removeChild(this.govPozMc); + } + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + if(Boolean(this.heroHeadUI) && contains(this.heroHeadUI)) + { + removeChild(this.heroHeadUI); + } + } + + private function loadHeroInfo() : void + { + var _loc1_:String = "pic/head/" + this.hero.picPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + this.careerImg.gotoAndStop(HeroConst.getFrameByCareerName(this.hero.careerEntName)); + var _loc2_:String = "" + this.hero.lead + ""; + var _loc3_:int = this.hero.finalLead - this.hero.lead; + if(_loc3_ > 0) + { + _loc2_ = _loc2_ + " [+" + _loc3_ + "]"; + } + this.leadText.htmlText = _loc2_; + var _loc4_:String = "" + this.hero.atk + ""; + var _loc5_:Number = this.hero.finalAtk - this.hero.atk; + if(_loc5_ > 0) + { + _loc4_ = _loc4_ + " [+" + _loc5_ + "]"; + } + this.atkText.htmlText = _loc4_; + var _loc6_:String = "" + this.hero.def + ""; + var _loc7_:Number = this.hero.finalDef - this.hero.def; + if(_loc7_ > 0) + { + _loc6_ = _loc6_ + " [+" + _loc7_ + "]"; + } + this.defText.htmlText = _loc6_; + var _loc8_:String = "" + this.hero.hp + ""; + var _loc9_:Number = this.hero.finalHp - this.hero.hp; + if(_loc9_ > 0) + { + _loc8_ = _loc8_ + " [+" + _loc9_ + "]"; + } + this.hpText.htmlText = _loc8_; + var _loc10_:String = "" + this.hero.agl + ""; + var _loc11_:Number = this.hero.finalAgl - this.hero.agl; + if(_loc11_ > 0) + { + _loc10_ = _loc10_ + " [+" + _loc11_ + "]"; + } + this.aglText.htmlText = _loc10_; + this.label1.text = this.hero.govPotzName; + this.label2.text = HeroConst.changeName(this.hero.level,this.hero.changeCount); + this.label3.text = this.hero.merit.toString(); + if(this.hero.govPotzName == "无") + { + this.mianzhiBtn.setUnEnable(); + } + else + { + this.mianzhiBtn.setEnable(); + } + this.starMap.showChart(new Array([this.hero.finalLead,10000],[this.hero.finalAtk,5000],[this.hero.finalAgl,5000],[this.hero.finalDef,5000],[this.hero.finalHp,5000])); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + this.headImg.x = 4; + this.headImg.y = 4; + } + + public function setHero(param1:NewHero) : void + { + this.hero = param1; + this.loadHeroInfo(); + if(this.currPage == 1) + { + if(this.heroInfo) + { + this.heroInfo.setHeroInfo(this.hero); + } + } + } + + private function getHeroImgTip() : void + { + this.heroTip.destroyTip(); + ConnectService.getInstance().heroService.getHeroPicView(this.hero.heroId); + } + + private function getHeroImgTipView(param1:HeroEvent) : void + { + this.heroTip.setTipData(param1.heroObj); + this.loadHeroInfo(); + if(this.currPage == 1) + { + } + } + + public function getHeroInfo() : void + { + if(this.heroInfo == null) + { + this.heroInfo = new HeroInfoUI(this.btn1,this.btn6); + this.heroInfo.y = 163; + this.heroInfo.strongF = this.strongFunc; + this.heroInfo.fengguanF = this.fengguanFunc; + this.heroInfo.jinjieF = this.jinjieFunc; + this.heroInfo.setHeroInfo(this.hero); + } + this.viewPage(1); + } + + public function getHeroEqu() : void + { + if(this.heroEqu == null) + { + this.heroEqu = new HeroEquUI(); + this.heroEqu.y = 163; + } + this.viewPage(2); + } + + public function getheroGov() : void + { + if(this.heroGov == null) + { + this.heroGov = new HeroGovPotUI(); + this.heroGov.y = 163; + } + this.viewPage(3); + } + + private function viewPage(param1:int) : void + { + if(Boolean(this.heroInfo) && Boolean(contains(this.heroInfo)) && param1 != 1) + { + removeChild(this.heroInfo); + } + if(Boolean(this.heroEqu) && Boolean(contains(this.heroEqu)) && param1 != 2) + { + removeChild(this.heroEqu); + } + if(Boolean(this.heroGov) && Boolean(contains(this.heroGov)) && param1 != 3) + { + removeChild(this.heroGov); + } + this.currPage = param1; + if(param1 == 1) + { + if(!contains(this.heroInfo)) + { + addChild(this.heroInfo); + } + this.delGivPozMc(); + } + if(param1 == 2) + { + if(!contains(this.heroEqu)) + { + addChild(this.heroEqu); + this.heroEqu.getAllEquipList(); + } + this.delGivPozMc(); + this.heroEqu.setHeroInfo(this.hero); + } + if(param1 == 3) + { + if(!contains(this.heroGov)) + { + addChild(this.heroGov); + } + this.setGivPozInfo(); + this.heroGov.setHero(this.hero); + } + } + + private function fireHero(param1:MouseEvent) : void + { + var _loc2_:String = null; + if(this.hero) + { + _loc2_ = "确定解雇武将【" + this.hero.name + "】吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc2_,this.configFireHero,this.hero); + } + } + + private function configFireHero(param1:NewHero) : void + { + ConnectService.getInstance().heroService.fireHero(param1.heroId); + } + + private function takeOffGov(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.takeOffGovPotz(this.hero.heroId); + } + + private function openSelectImgUI(param1:MouseEvent) : void + { + if(this.heroHeadUI == null) + { + this.heroHeadUI = new HeroHeadUI(); + this.heroHeadUI.selectImgFunc(this.loadHeadImg2); + } + addChild(this.heroHeadUI); + this.heroHeadUI.setCurrPage(1); + this.heroHeadUI.setHero(this.hero); + this.heroHeadUI.x = -90; + this.heroHeadUI.y = -30; + } + + private function loadHeadImg2(param1:String) : void + { + ConnectService.getInstance().heroService.changeHeroHead(this.hero.heroId,param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroInfoUI.as b/flash_decompiled/com/view/ui/hero/HeroInfoUI.as new file mode 100644 index 0000000..6decf8b --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroInfoUI.as @@ -0,0 +1,401 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.utils.Utils; + import com.view.TownInside; + import com.view.newui.UISmallBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HeroInfoUI extends Sprite + { + + private var face:InstallFace; + + private var careerArr:Array; + + private var bg:MovieClip; + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var heroName:TextField; + + private var upCount:TextField; + + private var guanzhi:TextField; + + private var careerName:TextField; + + private var hpStatus:TextField; + + private var level:TextField; + + private var exp:TextField; + + private var merit:TextField; + + private var chartr:TextField; + + private var dantiao:TextField; + + private var bubing:TextField; + + private var gongbing:TextField; + + private var qibing:TextField; + + private var chebing:TextField; + + private var qixie:TextField; + + public var strongF:Function; + + public var fengguanF:Function; + + public var jinjieF:Function; + + public function HeroInfoUI(param1:UISmallBtn, param2:UISmallBtn) + { + var _loc6_:TextField = null; + var _loc9_:TextField = null; + var _loc12_:TextField = null; + var _loc13_:TextField = null; + var _loc26_:MovieClip = null; + this.face = InstallFace.getInstance(); + this.careerArr = new Array(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(314,204); + addChild(this.bg1); + var _loc3_:UITitleBg = new UITitleBg("武将基本信息",301); + this.bg1.addChild(_loc3_); + _loc3_.x = int(this.bg1.width / 2 - _loc3_.width / 2); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(200,204); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 3; + var _loc4_:UITitleBg = new UITitleBg("带兵属性",186); + this.bg2.addChild(_loc4_); + _loc4_.x = int(this.bg2.width / 2 - _loc4_.width / 2); + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc5_.text = "姓 名:"; + this.bg1.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = 40; + this.heroName = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.heroName); + this.heroName.x = _loc5_.x + 42; + this.heroName.y = _loc5_.y; + _loc6_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc6_.text = "成 长:"; + this.bg1.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 34; + this.upCount = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.upCount); + this.upCount.x = this.heroName.x; + this.upCount.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc7_.text = "官 职:"; + this.bg1.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 34; + this.guanzhi = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.guanzhi); + this.guanzhi.x = this.heroName.x; + this.guanzhi.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc8_.text = "职 业:"; + this.bg1.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 34; + this.careerName = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.careerName); + this.careerName.x = this.heroName.x; + this.careerName.y = _loc8_.y; + _loc9_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc9_.text = "健 康:"; + this.bg1.addChild(_loc9_); + _loc9_.x = _loc5_.x; + _loc9_.y = _loc8_.y + 34; + this.hpStatus = PublicMethod.getTextFieldWithFillter(16640697,130); + this.bg1.addChild(this.hpStatus); + this.hpStatus.x = this.heroName.x; + this.hpStatus.y = _loc9_.y; + var _loc10_:Sprite = PublicMethod.getTdLine(178); + this.bg1.addChild(_loc10_); + _loc10_.x = 173; + _loc10_.y = 30; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc11_.text = "等 级:"; + this.bg1.addChild(_loc11_); + _loc11_.x = 180; + _loc11_.y = _loc5_.y; + this.level = PublicMethod.getTextFieldWithFillter(16640697,100); + this.bg1.addChild(this.level); + this.level.x = _loc11_.x + 45; + this.level.y = _loc11_.y; + _loc12_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc12_.text = "经 验:"; + this.bg1.addChild(_loc12_); + _loc12_.x = _loc11_.x; + _loc12_.y = _loc6_.y; + this.exp = PublicMethod.getTextFieldWithFillter(16640697,100); + this.bg1.addChild(this.exp); + this.exp.x = this.level.x; + this.exp.y = _loc12_.y; + _loc13_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc13_.text = "功 勋:"; + this.bg1.addChild(_loc13_); + _loc13_.x = _loc11_.x; + _loc13_.y = _loc7_.y; + this.merit = PublicMethod.getTextFieldWithFillter(16640697,100); + this.bg1.addChild(this.merit); + this.merit.x = this.level.x; + this.merit.y = _loc13_.y; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc14_.text = "性 格:"; + this.bg1.addChild(_loc14_); + _loc14_.x = _loc11_.x; + _loc14_.y = _loc8_.y; + this.chartr = PublicMethod.getTextFieldWithFillter(16640697,100); + this.bg1.addChild(this.chartr); + this.chartr.x = this.level.x; + this.chartr.y = _loc14_.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc15_.text = "单挑力:"; + this.bg1.addChild(_loc15_); + _loc15_.x = _loc11_.x; + _loc15_.y = _loc9_.y; + this.dantiao = PublicMethod.getTextFieldWithFillter(16640697,100); + this.bg1.addChild(this.dantiao); + this.dantiao.x = this.level.x; + this.dantiao.y = _loc15_.y; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc16_.text = "步兵"; + this.bg2.addChild(_loc16_); + _loc16_.x = 10; + _loc16_.y = 40; + this.bubing = PublicMethod.getTextFieldWithFillter(16640697,50); + this.bg2.addChild(this.bubing); + this.bubing.x = _loc16_.x + 30; + this.bubing.y = _loc16_.y; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc17_.text = "弓兵"; + this.bg2.addChild(_loc17_); + _loc17_.x = _loc16_.x; + _loc17_.y = _loc16_.y + 34; + this.gongbing = PublicMethod.getTextFieldWithFillter(16640697,50); + this.bg2.addChild(this.gongbing); + this.gongbing.x = this.bubing.x; + this.gongbing.y = _loc17_.y; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc18_.text = "骑兵"; + this.bg2.addChild(_loc18_); + _loc18_.x = _loc16_.x; + _loc18_.y = _loc17_.y + 34; + this.qibing = PublicMethod.getTextFieldWithFillter(16640697,50); + this.bg2.addChild(this.qibing); + this.qibing.x = this.bubing.x; + this.qibing.y = _loc18_.y; + var _loc19_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc19_.text = "车兵"; + this.bg2.addChild(_loc19_); + _loc19_.x = _loc16_.x; + _loc19_.y = _loc18_.y + 34; + this.chebing = PublicMethod.getTextFieldWithFillter(16640697,50); + this.bg2.addChild(this.chebing); + this.chebing.x = this.bubing.x; + this.chebing.y = _loc19_.y; + var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc20_.text = "器械"; + this.bg2.addChild(_loc20_); + _loc20_.x = _loc16_.x; + _loc20_.y = _loc19_.y + 34; + this.qixie = PublicMethod.getTextFieldWithFillter(16640697,50); + this.bg2.addChild(this.qixie); + this.qixie.x = this.bubing.x; + this.qixie.y = _loc20_.y; + var _loc21_:UISmallBtn = new UISmallBtn("强 化",2); + _loc21_.onClick = this.openStrongUI; + var _loc22_:UISmallBtn = new UISmallBtn("封 官",2); + _loc22_.onClick = this.openFengguanUI; + var _loc23_:UISmallBtn = new UISmallBtn("进 阶",2); + _loc23_.onClick = this.openJinjieUI; + var _loc24_:UISmallBtn = new UISmallBtn("医 疗",2); + _loc24_.onClick = this.openYiliao; + this.bg1.addChild(param1); + this.bg1.addChild(_loc21_); + this.bg1.addChild(_loc22_); + this.bg1.addChild(_loc23_); + this.bg1.addChild(_loc24_); + this.bg1.addChild(param2); + param1.x = 116; + _loc21_.x = param1.x; + _loc22_.x = param1.x; + _loc23_.x = param1.x; + _loc24_.x = param1.x; + param1.y = _loc5_.y - 2; + _loc21_.y = _loc6_.y - 2; + _loc22_.y = _loc7_.y - 2; + _loc23_.y = _loc8_.y - 2; + _loc24_.y = _loc9_.y - 2; + param2.x = 270; + param2.y = _loc6_.y - 2; + var _loc25_:int = 1; + while(_loc25_ < 6) + { + _loc26_ = this.face.getMovieClip("lib_ui_career" + _loc25_); + this.careerArr.push(_loc26_); + this.bg2.addChild(_loc26_); + _loc26_.x = 73; + _loc26_.y = 5 + _loc25_ * 34; + _loc26_.gotoAndStop(1); + _loc25_++; + } + ConnectService.getInstance().heroService.getChaofuMap(); + } + + private function openStrongUI(param1:MouseEvent) : void + { + if(this.strongF != null) + { + this.strongF(); + } + } + + private function openFengguanUI(param1:MouseEvent) : void + { + if(this.fengguanF != null) + { + this.fengguanF(); + } + } + + private function openJinjieUI(param1:MouseEvent) : void + { + if(this.jinjieF != null) + { + this.jinjieF(); + } + } + + private function openYiliao(param1:MouseEvent) : void + { + if(!TownInside.getInstance().hasHospital) + { + MessageBoxUI.getInstance().addMessage("你还没有建造医馆"); + return; + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.OPENHOSPITAL)); + } + + public function setHeroInfo(param1:NewHero) : void + { + this.heroName.htmlText = param1.showName; + this.upCount.text = param1.upCount + ""; + this.guanzhi.text = param1.govPotzName; + this.careerName.text = param1.careerName; + this.hpStatus.text = param1.hpStatus + ""; + this.level.text = HeroConst.changeName(param1.level,param1.changeCount); + var _loc2_:Number = param1.exp / param1.needExp; + this.exp.text = int(_loc2_ * 100) + "%"; + this.merit.text = param1.merit + ""; + this.chartr.text = param1.chartr; + this.dantiao.text = param1.fightPower + ""; + this.careerArr[0].gotoAndStop(this.getNum(Number(param1.career.buBing))); + this.careerArr[1].gotoAndStop(this.getNum(Number(param1.career.gongBing))); + this.careerArr[2].gotoAndStop(this.getNum(Number(param1.career.qiBing))); + this.careerArr[3].gotoAndStop(this.getNum(Number(param1.career.cheBing))); + this.careerArr[4].gotoAndStop(this.getNum(Number(param1.career.qiXie))); + this.setStr(this.getNum(Number(param1.career.buBing)),this.bubing); + this.setStr(this.getNum(Number(param1.career.gongBing)),this.gongbing); + this.setStr(this.getNum(Number(param1.career.qiBing)),this.qibing); + this.setStr(this.getNum(Number(param1.career.cheBing)),this.chebing); + this.setStr(this.getNum(Number(param1.career.qiXie)),this.qixie); + } + + private function getNum(param1:Number) : Number + { + var _loc2_:Number = NaN; + if(param1 < 1 && param1 >= 0.88) + { + _loc2_ = 1; + } + else if(param1 < 1.01 && param1 >= 1) + { + _loc2_ = 2; + } + else if(param1 < 1.11 && param1 >= 1.1) + { + _loc2_ = 3; + } + else if(param1 < 1.21 && param1 >= 1.2) + { + _loc2_ = 4; + } + else if(param1 > 1.2 && param1 <= 1.3) + { + _loc2_ = 5; + } + else if(param1 > 1.3 && param1 <= 1.4) + { + _loc2_ = 6; + } + else + { + _loc2_ = 7; + } + return _loc2_; + } + + private function setStr(param1:Number, param2:TextField) : * + { + if(param2 == null) + { + return; + } + param2.htmlText = ""; + if(param1 <= 1) + { + param2.htmlText = "C"; + } + else if(param1 <= 2) + { + param2.htmlText = "B"; + } + else if(param1 <= 3) + { + param2.htmlText = "A"; + } + else if(param1 <= 4) + { + param2.htmlText = "S"; + } + else if(param1 <= 5) + { + param2.htmlText = "SS"; + } + else if(param1 <= 6) + { + param2.htmlText = "SSS"; + } + else + { + param2.htmlText = "SSSS"; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroJinJieUI.as b/flash_decompiled/com/view/ui/hero/HeroJinJieUI.as new file mode 100644 index 0000000..142bff4 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroJinJieUI.as @@ -0,0 +1,593 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.newui.UITextBtn; + import com.view.newui.UIWindowBg; + import com.view.tip.HeroTip; + import com.view.tip.MulTipTitle; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tools.ToolView; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HeroJinJieUI extends Sprite + { + + private var face:InstallFace; + + private var mc:MovieClip; + + private var imgSp:Sprite; + + private var heroTip:HeroTip; + + private var nameText:TextField; + + private var levelText:TextField; + + private var upText:TextField; + + private var upMaxText:TextField; + + private var careerText:TextField; + + private var job1_txt:TextField; + + private var job2_txt:TextField; + + private var job3_txt:TextField; + + private var job4_txt:TextField; + + private var level1Bg:Sprite; + + private var level2Bg:Sprite; + + private var level3Bg:Sprite; + + private var level4Bg:Sprite; + + private var str1:String = "进阶需求"; + + private var str2:String = "武将成长:"; + + private var str3:String = "武将等级:"; + + private var str4:String = "进阶道具:"; + + private var dq_Txt:TextField; + + private var jinjieBtn1:UISmallBtn; + + private var jinjieBtn2:UISmallBtn; + + private var jinjieBtn3:UISmallBtn; + + private var jinjieTip1:MulTipTitle; + + private var jinjieTip2:MulTipTitle; + + private var jinjieTip3:MulTipTitle; + + private var jinjieTipStr1:String; + + private var jinjieTipStr2:String; + + private var jinjieTipStr3:String; + + private var reliveObj:Object; + + private var currHero:Object; + + private var loader:LoadResource; + + private var headImg:Bitmap; + + public function HeroJinJieUI() + { + var _loc5_:TextField = null; + var _loc6_:TextField = null; + var _loc16_:String = null; + var _loc17_:String = null; + var _loc18_:String = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(359 + 170,367); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(150,359); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(357,359); + _loc1_.addChild(_loc3_); + _loc3_.x = 3 + _loc2_.width + _loc2_.x; + _loc3_.y = _loc2_.y; + var _loc4_:Sprite = new Scale9Grid(this.face.getSprite(ClassConfig.lib_img_border),52,70); + this.imgSp = this.face.getSprite(ClassConfig.lib_herobg); + _loc2_.addChild(_loc4_); + _loc4_.x = 40; + _loc4_.y = 16; + _loc4_.addChild(this.imgSp); + this.imgSp.x = 10; + this.imgSp.y = 10; + _loc5_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc5_.text = "姓 名:"; + _loc2_.addChild(_loc5_); + _loc5_.x = 20; + _loc5_.y = 150; + this.nameText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.nameText); + this.nameText.x = _loc5_.x + 60; + this.nameText.y = _loc5_.y; + _loc6_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc6_.text = "等 级:"; + _loc2_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 30; + this.levelText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.levelText); + this.levelText.x = this.nameText.x; + this.levelText.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc7_.text = "成 长:"; + _loc2_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 30; + this.upText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.upText); + this.upText.x = this.nameText.x; + this.upText.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc8_.text = "成长上限:"; + _loc2_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 30; + this.upMaxText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.upMaxText); + this.upMaxText.x = this.nameText.x; + this.upMaxText.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc9_.text = "职 业:"; + _loc2_.addChild(_loc9_); + _loc9_.x = _loc5_.x; + _loc9_.y = _loc8_.y + 30; + this.careerText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.careerText); + this.careerText.x = this.nameText.x; + this.careerText.y = _loc9_.y; + this.heroTip = new HeroTip(this.imgSp,this.face.stage,this.face.tip_bg); + this.level1Bg = new Scale9Grid(this.face.getSprite(UIConfig.boxItem),60,60); + _loc3_.addChild(this.level1Bg); + this.level1Bg.x = 40; + this.level1Bg.y = 40; + this.job1_txt = PublicMethod.getTextFieldWithFillter(16763749,76); + this.level1Bg.addChild(this.job1_txt); + this.job1_txt.y = 30; + var _loc10_:MovieClip = this.face.getMovieClip(ClassConfig.ui_jiantou); + _loc3_.addChild(_loc10_); + _loc10_.x = this.level1Bg.x + 90; + _loc10_.y = this.level1Bg.y + 25; + _loc10_.gotoAndStop(1); + this.level2Bg = new Scale9Grid(this.face.getSprite(UIConfig.boxItem),60,60); + _loc3_.addChild(this.level2Bg); + this.level2Bg.x = this.level1Bg.x + 210; + this.level2Bg.y = this.level1Bg.y; + this.job2_txt = PublicMethod.getTextFieldWithFillter(16763749,76); + this.level2Bg.addChild(this.job2_txt); + this.job2_txt.y = 30; + var _loc11_:MovieClip = this.face.getMovieClip(ClassConfig.ui_jiantou); + _loc3_.addChild(_loc11_); + _loc11_.x = this.level2Bg.x + 20; + _loc11_.y = this.level2Bg.y + 90; + _loc11_.gotoAndStop(2); + this.level3Bg = new Scale9Grid(this.face.getSprite(UIConfig.boxItem),60,60); + _loc3_.addChild(this.level3Bg); + this.level3Bg.x = this.level2Bg.x; + this.level3Bg.y = this.level2Bg.y + 125 + this.level2Bg.height; + this.job3_txt = PublicMethod.getTextFieldWithFillter(16763749,76); + this.level3Bg.addChild(this.job3_txt); + this.job3_txt.y = 30; + var _loc12_:MovieClip = this.face.getMovieClip(ClassConfig.ui_jiantou); + _loc3_.addChild(_loc12_); + _loc12_.x = _loc10_.x; + _loc12_.y = this.level3Bg.y + 25; + _loc12_.gotoAndStop(3); + this.level4Bg = new Scale9Grid(this.face.getSprite(UIConfig.boxItem),60,60); + _loc3_.addChild(this.level4Bg); + this.level4Bg.x = this.level1Bg.x; + this.level4Bg.y = this.level3Bg.y; + this.job4_txt = PublicMethod.getTextFieldWithFillter(16763749,76); + this.level4Bg.addChild(this.job4_txt); + this.job4_txt.y = 30; + var _loc13_:TextFormat = PublicMethod.getCenterTextFormat(); + this.job1_txt.defaultTextFormat = _loc13_; + this.job2_txt.defaultTextFormat = _loc13_; + this.job3_txt.defaultTextFormat = _loc13_; + this.job4_txt.defaultTextFormat = _loc13_; + this.dq_Txt = PublicMethod.getTextFieldWithFillter(16776960,50); + _loc3_.addChild(this.dq_Txt); + this.dq_Txt.text = "当前"; + var _loc14_:UITextBtn = new UITextBtn("购买进阶符"); + _loc14_.onClick = this.buyItem; + _loc3_.addChild(_loc14_); + _loc14_.x = 150; + _loc14_.y = 176; + this.jinjieBtn1 = new UISmallBtn("进阶",2); + this.jinjieBtn2 = new UISmallBtn("进阶",2); + this.jinjieBtn3 = new UISmallBtn("进阶",2); + _loc3_.addChild(this.jinjieBtn1); + _loc3_.addChild(this.jinjieBtn2); + _loc3_.addChild(this.jinjieBtn3); + this.jinjieBtn1.onClick = this.reliveHero; + this.jinjieBtn2.onClick = this.reliveHero; + this.jinjieBtn3.onClick = this.reliveHero; + this.jinjieBtn1.x = 160; + this.jinjieBtn1.y = 106; + this.jinjieBtn2.x = 312; + this.jinjieBtn2.y = 156; + this.jinjieBtn3.x = 160; + this.jinjieBtn3.y = 308; + this.jinjieTipStr1 = this.str1 + "
" + _loc16_ + "
" + _loc17_ + "
" + _loc18_; + this.jinjieTipStr2 = this.str1 + "
" + _loc16_ + "
" + _loc17_ + "
" + _loc18_; + this.jinjieTipStr3 = this.str1 + "
" + _loc16_ + "
" + _loc17_ + "
" + _loc18_; + this.jinjieTip1 = new MulTipTitle(this.jinjieBtn1,this.face.stage,this.face.tip_bg,this.jinjieTipStr1); + this.jinjieTip2 = new MulTipTitle(this.jinjieBtn2,this.face.stage,this.face.tip_bg,this.jinjieTipStr2); + this.jinjieTip3 = new MulTipTitle(this.jinjieBtn3,this.face.stage,this.face.tip_bg,this.jinjieTipStr3); + this.jinjieTip1.destroyTip(); + this.jinjieTip2.destroyTip(); + this.jinjieTip3.destroyTip(); + var _loc15_:String = "武将最高等级60
武将最高成长9
单挑技1个,战略技1个"; + _loc16_ = "武将最高等级80
武将最高成长15
单挑技2个,战略技2个"; + _loc17_ = "武将最高等级100
武将最高成长25
单挑技3个,战略技3个"; + _loc18_ = "武将最高等级120
武将最高成长40
单挑技4个,战略技4个"; + new MulTipTitle(this.level1Bg,this.face.stage,this.face.tip_bg,_loc15_); + new MulTipTitle(this.level2Bg,this.face.stage,this.face.tip_bg,_loc16_); + new MulTipTitle(this.level3Bg,this.face.stage,this.face.tip_bg,_loc17_); + new MulTipTitle(this.level4Bg,this.face.stage,this.face.tip_bg,_loc18_); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(HeroEvent.HERO_RELIVE_VIEW,this.getReliveHeroViewResult); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_RELIVE_HERO,this.getReliveHeroResult); + this.getReliveView(); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_RELIVE_VIEW,this.getReliveHeroViewResult); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_RELIVE_HERO,this.getReliveHeroResult); + this.reliveObj = null; + this.currHero = null; + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + } + + private function buyItem(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_JINJIE"); + _loc2_.onRefresh = this.getReliveView; + _loc2_.show(); + } + + private function getReliveHeroViewResult(param1:HeroEvent) : void + { + this.reliveObj = param1.strongObj; + this.setValueByRelive(); + } + + public function getInfo(param1:Object) : void + { + var _loc2_:String = null; + var _loc3_:String = null; + var _loc4_:String = null; + var _loc5_:String = null; + this.currHero = param1; + this.setValueByHero(); + this.loadHeroHead(); + this.getHeroImgTip(); + this.nameText.htmlText = this.currHero.showName; + this.levelText.text = HeroConst.changeName(this.currHero.level,param1.changeCount); + this.careerText.text = this.currHero.careerName; + this.upText.text = this.currHero.upCount; + switch(this.currHero.changeCount) + { + case 0: + this.dq_Txt.x = 60; + this.dq_Txt.y = 20; + break; + case 1: + this.dq_Txt.x = 275; + this.dq_Txt.y = 20; + break; + case 2: + this.dq_Txt.x = 275; + this.dq_Txt.y = 325; + break; + case 3: + this.dq_Txt.x = 60; + this.dq_Txt.y = 325; + } + var _loc6_:int = this.currHero.careerId % 10; + switch(_loc6_) + { + case 0: + _loc2_ = "勇士"; + _loc3_ = "高级勇士"; + _loc4_ = "精锐勇士"; + _loc5_ = "武圣"; + break; + case 1: + _loc2_ = "步将"; + _loc3_ = "高级步将"; + _loc4_ = "精锐步将"; + _loc5_ = "战神"; + break; + case 2: + _loc2_ = "弓将"; + _loc3_ = "高级弓将"; + _loc4_ = "精锐弓将"; + _loc5_ = "神箭"; + break; + case 3: + _loc2_ = "骑将"; + _loc3_ = "高级骑将"; + _loc4_ = "精锐骑将"; + _loc5_ = "飞骑"; + break; + case 4: + _loc2_ = "车将"; + _loc3_ = "高级车将"; + _loc4_ = "精锐车将"; + _loc5_ = "车神"; + break; + case 5: + _loc2_ = "器械师"; + _loc3_ = "高级器械师"; + _loc4_ = "精锐器械师"; + _loc5_ = "工神"; + } + this.job1_txt.text = _loc2_; + this.job2_txt.text = _loc3_; + this.job3_txt.text = _loc4_; + this.job4_txt.text = _loc5_; + } + + private function getHeroImgTip() : void + { + this.heroTip.destroyTip(); + ConnectService.getInstance().heroService.getHeroPicView(this.currHero.heroId); + } + + private function loadHeroHead() : void + { + var _loc1_:String = "pic/head/" + this.currHero.picPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.headImg.x = 4; + this.headImg.y = 4; + this.loader.clear(); + this.imgSp.addChild(this.headImg); + } + + private function setValueByHero() : void + { + if(this.reliveObj != null) + { + this.setValue(); + } + } + + private function setValueByRelive() : void + { + if(this.currHero != null) + { + this.setValue(); + } + } + + private function setValue() : * + { + var _loc1_:String = null; + var _loc2_:String = null; + var _loc3_:String = null; + var _loc5_:Number = NaN; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc4_:Number = Number(this.currHero.upCount); + var _loc6_:int = int(this.currHero.level); + var _loc9_:int = 1; + switch(this.currHero.changeCount) + { + case 0: + _loc5_ = Number(this.reliveObj.reliveLimitList[1].reliveRequie); + if(_loc4_ < _loc5_) + { + _loc1_ = "ff0000"; + } + else + { + _loc1_ = "00ff00"; + } + this.jinjieTipStr1 = this.str1 + "
" + "" + this.str2 + _loc4_ + "/" + _loc5_ + "
"; + _loc7_ = 60; + if(_loc6_ < _loc7_) + { + _loc2_ = "ff0000"; + } + else + { + _loc2_ = "00ff00"; + } + this.jinjieTipStr1 = this.jinjieTipStr1 + "" + this.str3 + _loc6_ + "/" + _loc7_ + "
"; + _loc8_ = int(this.reliveObj.itemList[0].itemNum); + if(_loc8_ < _loc9_) + { + _loc3_ = "ff0000"; + } + else + { + _loc3_ = "00ff00"; + } + this.jinjieTipStr1 = this.jinjieTipStr1 + "" + this.str4 + this.reliveObj.itemList[0].itemName + " " + _loc8_ + "/" + _loc9_ + ""; + this.jinjieTip1.setValue(this.jinjieTipStr1); + this.jinjieTip2.destroyTip(); + this.jinjieTip3.destroyTip(); + this.jinjieBtn1.visible = true; + this.jinjieBtn2.visible = true; + this.jinjieBtn3.visible = true; + this.jinjieBtn2.setUnEnable(); + this.jinjieBtn3.setUnEnable(); + break; + case 1: + _loc5_ = Number(this.reliveObj.reliveLimitList[2].reliveRequie); + if(_loc4_ < _loc5_) + { + _loc1_ = "ff0000"; + } + else + { + _loc1_ = "00ff00"; + } + this.jinjieTipStr2 = this.str1 + "
" + "" + this.str2 + _loc4_ + "/" + _loc5_ + "
"; + _loc7_ = 80; + if(_loc6_ < _loc7_) + { + _loc2_ = "ff0000"; + } + else + { + _loc2_ = "00ff00"; + } + this.jinjieTipStr2 = this.jinjieTipStr2 + "" + this.str3 + _loc6_ + "/" + _loc7_ + "
"; + _loc8_ = int(this.reliveObj.itemList[1].itemNum); + if(_loc8_ < _loc9_) + { + _loc3_ = "ff0000"; + } + else + { + _loc3_ = "00ff00"; + } + this.jinjieTipStr2 = this.jinjieTipStr2 + "" + this.str4 + this.reliveObj.itemList[1].itemName + " " + _loc8_ + "/" + _loc9_ + ""; + this.jinjieTip2.setValue(this.jinjieTipStr2); + this.jinjieTip1.destroyTip(); + this.jinjieTip3.destroyTip(); + this.jinjieBtn1.visible = false; + this.jinjieBtn2.visible = true; + this.jinjieBtn3.visible = true; + this.jinjieBtn2.setEnable(); + this.jinjieBtn3.setUnEnable(); + break; + case 2: + _loc5_ = Number(this.reliveObj.reliveLimitList[3].reliveRequie); + if(_loc4_ < _loc5_) + { + _loc1_ = "ff0000"; + } + else + { + _loc1_ = "00ff00"; + } + this.jinjieTipStr3 = this.str1 + "
" + "" + this.str2 + _loc4_ + "/" + _loc5_ + "
"; + _loc7_ = 100; + if(_loc6_ < _loc7_) + { + _loc2_ = "ff0000"; + } + else + { + _loc2_ = "00ff00"; + } + this.jinjieTipStr3 = this.jinjieTipStr3 + "" + this.str3 + _loc6_ + "/" + _loc7_ + "
"; + _loc8_ = int(this.reliveObj.itemList[2].itemNum); + if(_loc8_ < _loc9_) + { + _loc3_ = "ff0000"; + } + else + { + _loc3_ = "00ff00"; + } + this.jinjieTipStr3 = this.jinjieTipStr3 + "" + this.str4 + this.reliveObj.itemList[2].itemName + " " + _loc8_ + "/" + _loc9_ + ""; + this.jinjieTip3.setValue(this.jinjieTipStr3); + this.jinjieTip2.destroyTip(); + this.jinjieTip1.destroyTip(); + this.jinjieBtn1.visible = false; + this.jinjieBtn2.visible = false; + this.jinjieBtn3.visible = true; + this.jinjieBtn3.setEnable(); + break; + case 3: + this.jinjieTip3.destroyTip(); + this.jinjieTip2.destroyTip(); + this.jinjieTip1.destroyTip(); + this.jinjieBtn1.visible = false; + this.jinjieBtn2.visible = false; + this.jinjieBtn3.visible = false; + break; + default: + this.jinjieTip3.destroyTip(); + this.jinjieTip2.destroyTip(); + this.jinjieTip1.destroyTip(); + this.jinjieBtn1.visible = false; + this.jinjieBtn2.visible = false; + this.jinjieBtn3.visible = false; + } + } + + private function getHeroImgTipView(param1:HeroEvent) : void + { + this.heroTip.setTipData(param1.heroObj); + this.upMaxText.text = param1.heroObj.upCountLimit; + } + + private function reliveHero(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.heroRelive(this.currHero.heroId); + } + + private function getReliveHeroResult(param1:HeroEvent) : void + { + MessageBoxUI.getInstance().addMessage("进阶成功"); + this.getReliveView(); + } + + private function getReliveView() : void + { + ConnectService.getInstance().heroService.getHeroReliveView(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroLineMc.as b/flash_decompiled/com/view/ui/hero/HeroLineMc.as new file mode 100644 index 0000000..8150008 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroLineMc.as @@ -0,0 +1,201 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.newdata.hero.NewHero; + import com.view.UIListManage; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.tip.MulTipTitle; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HeroLineMc extends Sprite + { + + private var bg:Sprite; + + private var centerCss:TextFormat; + + public var hero:NewHero; + + private var heroInfoBtn:UISmallBtn; + + private var expBtn:UISmallBtn; + + public var heroPro1Tip:MulTipTitle; + + public var face:InstallFace = InstallFace.getInstance(); + + private var heroName:TextField; + + private var hpStatus:TextField; + + private var level:TextField; + + private var atk:TextField; + + private var def:TextField; + + private var agl:TextField; + + private var hp:TextField; + + private var career:TextField; + + private var status:TextField; + + public function HeroLineMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,722,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); + this.heroInfoBtn = new UISmallBtn("详 情",2); + this.heroInfoBtn.onClick = this.clickHeroInfo; + this.expBtn = new UISmallBtn("经验分配",3); + addChild(this.heroInfoBtn); + this.heroInfoBtn.x = 664; + this.heroInfoBtn.y = 2; + this.heroName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,61); + addChild(this.heroName); + this.heroName.y = 2; + this.heroName.defaultTextFormat = this.centerCss; + this.hpStatus = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.hpStatus); + this.hpStatus.defaultTextFormat = this.centerCss; + this.hpStatus.x = this.heroName.x + this.heroName.width; + this.hpStatus.y = this.heroName.y; + this.level = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,64); + addChild(this.level); + this.level.defaultTextFormat = this.centerCss; + this.level.x = this.hpStatus.x + this.hpStatus.width; + this.level.y = this.heroName.y; + this.atk = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,89); + addChild(this.atk); + this.atk.defaultTextFormat = this.centerCss; + this.atk.x = this.level.x + this.level.width; + this.atk.y = this.heroName.y; + this.def = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,89); + addChild(this.def); + this.def.defaultTextFormat = this.centerCss; + this.def.x = this.atk.x + this.atk.width; + this.def.y = this.heroName.y; + this.agl = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,89); + addChild(this.agl); + this.agl.defaultTextFormat = this.centerCss; + this.agl.x = int(this.def.x + this.def.width); + this.agl.y = int(this.heroName.y); + this.hp = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + addChild(this.hp); + this.hp.x = int(this.agl.x + this.agl.width); + this.hp.y = int(this.heroName.y); + this.hp.defaultTextFormat = this.centerCss; + this.career = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.career); + this.career.x = this.hp.x + this.hp.width; + this.career.y = this.heroName.y; + this.career.defaultTextFormat = this.centerCss; + this.status = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.status); + this.status.defaultTextFormat = this.centerCss; + this.status.x = this.career.x + this.career.width; + this.status.y = this.heroName.y; + this.expBtn.x = this.heroInfoBtn.x + this.heroInfoBtn.width + 3; + this.expBtn.y = this.heroInfoBtn.y; + this.expBtn.onClick = this.giveExp; + this.heroInfoBtn.visible = false; + this.expBtn.visible = false; + } + + public function setHero(param1:NewHero) : void + { + this.hero = param1; + if(this.heroPro1Tip) + { + this.heroPro1Tip.destroyTip(); + } + if(this.hero) + { + this.heroName.htmlText = param1.showName; + this.hpStatus.htmlText = "" + this.hero.hpStatus + this.hero.hpStatusView + ""; + this.level.text = HeroConst.changeName(param1.level,param1.changeCount); + this.atk.text = param1.viewAtk.toString(); + this.def.text = param1.viewDef.toString(); + this.agl.text = param1.viewAgl.toString(); + this.hp.text = param1.viewHp.toString(); + this.career.text = param1.careerName; + this.status.text = param1.actionStatusChn; + this.heroInfoBtn.visible = true; + this.expBtn.visible = true; + this.heroPro1Tip = new MulTipTitle(this,this.face.stage,this.face.tip_bg,param1.strPro1); + } + else + { + this.heroName.htmlText = ""; + this.hpStatus.htmlText = ""; + this.level.text = ""; + this.atk.text = ""; + this.def.text = ""; + this.agl.text = ""; + this.hp.text = ""; + this.career.text = ""; + this.status.text = ""; + this.heroInfoBtn.visible = false; + this.expBtn.visible = false; + } + } + + private function rollOut(param1:MouseEvent) : void + { + if(this.hero) + { + this.bg.alpha = 0; + } + } + + private function rollOver(param1:MouseEvent) : void + { + if(this.hero) + { + this.bg.alpha = 0.3; + } + } + + public function clear() : void + { + this.bg.removeEventListener(MouseEvent.ROLL_OUT,this.rollOut); + this.bg.removeEventListener(MouseEvent.ROLL_OVER,this.rollOver); + } + + private function clickHeroInfo(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + var _loc2_:int = this.hero.heroId; + HeroListInfoUI.getInstance().showHeroById(_loc2_); + } + + private function giveExp(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + var _loc2_:MyHeroUI = UIListManage.getInstance().getClass(MyHeroUI) as MyHeroUI; + if(_loc2_) + { + _loc2_.giveHeroExp(this.hero.heroId); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroListInfoUI.as b/flash_decompiled/com/view/ui/hero/HeroListInfoUI.as new file mode 100644 index 0000000..4d4435c --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroListInfoUI.as @@ -0,0 +1,650 @@ +package com.view.ui.hero +{ + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.hero.mc.GiveHeroExpUI; + import com.view.ui.hero.mc.HeroNameEditMc; + import com.view.ui.hero.mc.HeroNameMc; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class HeroListInfoUI extends BaseUI + { + + private static var instance:HeroListInfoUI; + + private var bg1:UIWindowBg; + + private var btnArr:Vector.; + + private var curPage:int; + + private var curHero:NewHero; + + private var heroList:Array; + + private var heroMcVec:Vector.; + + private var page1:HeroInfoPage1; + + private var strongUI:HeroStrongUI; + + private var jinjieUI:HeroJinJieUI; + + private var mibaoUI:HeroMibaoUI; + + private var skillUI:HeroSkillUI; + + private var chaofuUI:HeroSkillUI; + + private var giveExpUI:GiveHeroExpUI; + + private var heroNameUI:HeroNameEditMc; + + private var chaofu:HeroChaofu; + + public function HeroListInfoUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_wujiangxiangqing); + setPosition(); + this.createUI(); + } + + public static function getInstance() : HeroListInfoUI + { + if(instance == null) + { + instance = new HeroListInfoUI(); + } + return instance; + } + + override public function createUI() : void + { + var _loc11_:int = 0; + var _loc12_:UITabBtn = null; + var _loc13_:HeroNameMc = null; + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630,400); + addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(79,392); + this.bg1.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:UITitleBg = new UITitleBg("武将列表",82); + _loc1_.addChild(_loc2_); + _loc2_.x = int(_loc1_.width / 2 - _loc2_.width / 2); + this.btnArr = new Vector.(); + var _loc3_:UITabBtn = new UITabBtn("个 人",2); + var _loc4_:UITabBtn = new UITabBtn("装 备",2); + var _loc5_:UITabBtn = new UITabBtn("技 能",2); + var _loc6_:UITabBtn = new UITabBtn("强 化",2); + var _loc7_:UITabBtn = new UITabBtn("进 阶",2); + var _loc8_:UITabBtn = new UITabBtn("封 官",2); + var _loc9_:UITabBtn = new UITabBtn("秘 宝",2); + var _loc10_:UITabBtn = new UITabBtn("朝 服",2); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + this.btnArr.push(_loc7_); + this.btnArr.push(_loc8_); + this.btnArr.push(_loc9_); + this.btnArr.push(_loc10_); + _loc11_ = 0; + _loc3_.select = true; + for each(_loc12_ in this.btnArr) + { + this.bg1.addChild(_loc12_); + _loc12_.x = 104 + _loc11_ * 66; + _loc12_.y = 4; + _loc12_.onClick = this.clickPage; + _loc11_++; + } + this.heroMcVec = new Vector.(); + _loc11_ = 0; + while(_loc11_ < 15) + { + _loc13_ = new HeroNameMc(); + _loc1_.addChild(_loc13_); + _loc13_.x = 2; + _loc13_.y = 25 + 25 * _loc11_; + this.heroMcVec.push(_loc13_); + _loc13_.addEventListener(MouseEvent.CLICK,this.clickHero,false,0,true); + _loc11_++; + } + } + + private function getHeroListResult(param1:DevEvent) : void + { + this.showALlHeroNameList(); + } + + private function showALlHeroNameList() : void + { + var _loc2_:* = undefined; + var _loc3_:NewHero = null; + var _loc1_:Vector. = NewHeroData.getAllHeroList(); + if(_loc1_.length == 0) + { + closeUI(null); + return; + } + for(_loc2_ in this.heroMcVec) + { + if(_loc2_ >= _loc1_.length) + { + this.heroMcVec[_loc2_].setHero(null); + } + else + { + this.heroMcVec[_loc2_].setHero(_loc1_[_loc2_]); + } + } + if(this.curHero) + { + _loc3_ = NewHeroData.getHeroByHeroId(this.curHero.heroId); + if(_loc3_ == null) + { + _loc3_ = NewHeroData.getAllHeroList()[0]; + if(_loc3_ != null) + { + this.viewHeroInfo(_loc3_.heroId); + } + } + else + { + this.viewHeroInfo(this.curHero.heroId); + } + } + } + + private function getHeroResult(param1:DevEvent) : void + { + var _loc3_:* = undefined; + var _loc2_:NewHero = NewHeroData.getHeroByHeroId(param1.id); + for(_loc3_ in this.heroMcVec) + { + if(Boolean(this.heroMcVec[_loc3_].hero) && this.heroMcVec[_loc3_].hero.heroId == _loc2_.heroId) + { + this.heroMcVec[_loc3_].setHero(_loc2_); + } + } + if(this.curHero.heroId == _loc2_.heroId) + { + this.showHeroById(this.curHero.heroId); + } + } + + public function showHeroById(param1:int) : void + { + this.show(); + this.viewHeroInfo(param1); + } + + public function viewHeroInfo(param1:int) : void + { + var _loc2_:HeroNameMc = null; + this.curHero = NewHeroData.getHeroByHeroId(param1); + for each(_loc2_ in this.heroMcVec) + { + _loc2_.setClick(false); + if(Boolean(_loc2_.hero) && _loc2_.hero.heroId == param1) + { + _loc2_.setClick(true); + if(this.curPage == 0 || this.curPage == 1 || this.curPage == 5) + { + this.createPage1(); + this.page1.setHero(this.curHero); + } + else if(this.curPage == 3) + { + this.createStrongUI(); + this.strongUI.getInfo(this.curHero); + } + else if(this.curPage == 4) + { + this.createJinjieUI(); + this.jinjieUI.getInfo(this.curHero); + } + else if(this.curPage == 6) + { + this.createMiBaoUI(); + this.mibaoUI.getInfo(this.curHero); + } + else if(this.curPage == 7) + { + this.createChaofuUI(); + this.chaofu.getInfo(this.curHero); + } + else + { + this.createSkillUI(); + this.skillUI.getInfo(this.curHero); + } + } + } + this.getPage(this.curPage); + } + + private function getPage(param1:int) : void + { + if(param1 == 2) + { + if(NewUserData.getUser().rankId < 50) + { + this.btnArr[2].select = false; + this.btnArr[this.curPage].select = true; + MessageBoxUI.getInstance().addMessage("君主等级50级才能开启武将技能"); + return; + } + } + this.curPage = param1; + switch(this.curPage + 1) + { + case 1: + this.getPage1(); + break; + case 2: + this.getPage2(); + break; + case 3: + this.getPage3(); + break; + case 4: + this.getPage4(); + break; + case 5: + this.getPage5(); + break; + case 6: + this.getPage6(); + break; + case 7: + this.getPage7(); + break; + case 8: + this.getPage8(); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListResult); + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETHEROBYID,this.getHeroResult); + this.showALlHeroNameList(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + Utils.g_events.removeEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListResult); + Utils.g_events.removeEventListener(DevEvent.DATA_HERO_GETHEROBYID,this.getHeroResult); + this.removeSonUI(); + } + + public function setHeroList(param1:Array) : void + { + var _loc2_:* = undefined; + this.heroList = param1; + for(_loc2_ in this.heroMcVec) + { + if(this.heroList[_loc2_]) + { + this.heroMcVec[_loc2_].setHero(this.heroList[_loc2_]); + } + else + { + this.heroMcVec[_loc2_].setHero(null); + } + } + } + + public function getUserList(param1:int) : void + { + if(param1 >= 0) + { + this.viewHeroInfo(param1); + } + } + + public function clickHero(param1:MouseEvent) : void + { + var _loc2_:HeroNameMc = param1.currentTarget as HeroNameMc; + if(_loc2_.hero) + { + this.viewHeroInfo(_loc2_.hero.heroId); + } + } + + private function clickPage(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:* = undefined; + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + for(_loc4_ in this.btnArr) + { + if(_loc2_ != this.btnArr[_loc4_]) + { + this.btnArr[_loc4_].select = false; + } + else + { + this.btnArr[_loc4_].select = true; + _loc3_ = int(_loc4_); + } + } + if(_loc3_ != 2) + { + if((_loc3_ == 0 || _loc3_ == 1 || _loc3_ == 5) && this.curPage != 0 && this.curPage != 1 && this.curPage != 5) + { + this.createPage1(); + this.page1.setHero(this.curHero); + } + if(_loc3_ == 3) + { + this.createStrongUI(); + this.strongUI.getInfo(this.curHero); + } + if(_loc3_ == 4) + { + this.createJinjieUI(); + this.jinjieUI.getInfo(this.curHero); + } + if(_loc3_ == 6) + { + this.createMiBaoUI(); + this.mibaoUI.getInfo(this.curHero); + } + if(_loc3_ == 7) + { + this.createChaofuUI(); + this.chaofu.getInfo(this.curHero); + } + } + else + { + this.createSkillUI(); + this.skillUI.getInfo(this.curHero); + } + this.getPage(_loc3_); + } + + private function createPage1() : void + { + if(this.page1 == null) + { + this.page1 = new HeroInfoPage1(); + this.page1.x = 97; + this.page1.y = 29; + this.page1.btn1.onClick = this.changeHeroName; + this.page1.btn6.onClick = this.giveHeroExp; + this.page1.strongFunc = this.openStrongUI; + this.page1.fengguanFunc = this.openFengGuanUI; + this.page1.jinjieFunc = this.openJinJieUI; + } + } + + private function createStrongUI() : void + { + if(this.strongUI == null) + { + this.strongUI = new HeroStrongUI(); + this.strongUI.x = 97; + this.strongUI.y = 29; + } + } + + private function createJinjieUI() : void + { + if(this.jinjieUI == null) + { + this.jinjieUI = new HeroJinJieUI(); + this.jinjieUI.x = 97; + this.jinjieUI.y = 29; + } + } + + private function createMiBaoUI() : void + { + if(this.mibaoUI == null) + { + this.mibaoUI = new HeroMibaoUI(); + this.mibaoUI.x = 97; + this.mibaoUI.y = 29; + } + } + + private function createSkillUI() : void + { + if(this.skillUI == null) + { + this.skillUI = HeroSkillUI.getInstance(); + this.skillUI.x = 97; + this.skillUI.y = 29; + } + } + + private function getPage1() : void + { + this.removePage(this.strongUI); + this.removePage(this.jinjieUI); + this.removePage(this.skillUI); + this.removePage(this.mibaoUI); + this.removePage(this.chaofu); + this.createPage1(); + if(!this.bg1.contains(this.page1)) + { + this.bg1.addChild(this.page1); + } + this.page1.getHeroInfo(); + } + + private function getPage2() : void + { + this.removePage(this.strongUI); + this.removePage(this.mibaoUI); + this.removePage(this.jinjieUI); + this.removePage(this.skillUI); + this.createPage1(); + this.removePage(this.chaofu); + if(!this.bg1.contains(this.page1)) + { + this.bg1.addChild(this.page1); + } + this.removeSonUI(); + this.page1.getHeroEqu(); + } + + private function getPage3() : void + { + this.removePage(this.page1); + this.removePage(this.mibaoUI); + this.removePage(this.jinjieUI); + this.removePage(this.strongUI); + this.createSkillUI(); + this.removeSonUI(); + this.removePage(this.chaofu); + if(!this.bg1.contains(this.skillUI)) + { + this.bg1.addChild(this.skillUI); + } + } + + private function getPage4() : void + { + this.removePage(this.page1); + this.removePage(this.jinjieUI); + this.removePage(this.skillUI); + this.createStrongUI(); + this.removePage(this.mibaoUI); + this.removeSonUI(); + this.removePage(this.chaofu); + if(!this.bg1.contains(this.strongUI)) + { + this.bg1.addChild(this.strongUI); + } + } + + private function getPage5() : void + { + this.removePage(this.page1); + this.removePage(this.strongUI); + this.removePage(this.skillUI); + this.removePage(this.mibaoUI); + this.removeSonUI(); + this.createJinjieUI(); + this.removePage(this.chaofu); + if(!this.bg1.contains(this.jinjieUI)) + { + this.bg1.addChild(this.jinjieUI); + } + } + + private function getPage6() : void + { + this.removePage(this.strongUI); + this.removePage(this.skillUI); + this.removePage(this.jinjieUI); + this.removePage(this.mibaoUI); + this.createPage1(); + this.removePage(this.chaofu); + if(!this.bg1.contains(this.page1)) + { + this.bg1.addChild(this.page1); + } + this.removeSonUI(); + this.page1.getheroGov(); + } + + private function getPage7() : void + { + this.removePage(this.page1); + this.removePage(this.strongUI); + this.removePage(this.skillUI); + this.removePage(this.jinjieUI); + this.removeSonUI(); + this.createMiBaoUI(); + this.removePage(this.chaofu); + if(!this.bg1.contains(this.mibaoUI)) + { + this.bg1.addChild(this.mibaoUI); + } + } + + private function getPage8() : void + { + this.removePage(this.page1); + this.removePage(this.strongUI); + this.removePage(this.skillUI); + this.removePage(this.jinjieUI); + this.removePage(this.mibaoUI); + this.removeSonUI(); + this.createChaofuUI(); + if(!this.bg1.contains(this.chaofu)) + { + this.bg1.addChild(this.chaofu); + } + } + + private function removePage(param1:Sprite) : void + { + if(Boolean(param1) && this.bg1.contains(param1)) + { + this.bg1.removeChild(param1); + } + } + + private function giveHeroExp(param1:MouseEvent) : void + { + if(this.curHero == null) + { + return; + } + if(this.giveExpUI == null) + { + this.giveExpUI = new GiveHeroExpUI(); + this.giveExpUI.x = int(width / 2 - this.giveExpUI.width / 2); + this.giveExpUI.y = int(height / 2 - this.giveExpUI.height / 2); + } + if(!contains(this.giveExpUI)) + { + addChild(this.giveExpUI); + } + this.giveExpUI.setHeroId(this.curHero.heroId,GiveHeroExpUI.GIVE_TYPE_2); + } + + private function changeHeroName(param1:MouseEvent) : void + { + if(this.curHero == null) + { + return; + } + if(this.heroNameUI == null) + { + this.heroNameUI = new HeroNameEditMc(); + this.heroNameUI.x = int(width / 2 - this.heroNameUI.width / 2); + this.heroNameUI.y = int(height / 2 - this.heroNameUI.height / 2); + } + if(!contains(this.heroNameUI)) + { + addChild(this.heroNameUI); + } + this.heroNameUI.setHeroId(this.curHero.heroId); + } + + private function removeSonUI() : void + { + if(Boolean(this.giveExpUI) && contains(this.giveExpUI)) + { + removeChild(this.giveExpUI); + } + if(Boolean(this.heroNameUI) && contains(this.heroNameUI)) + { + removeChild(this.heroNameUI); + } + } + + private function openStrongUI() : void + { + this.btnArr[3].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function openFengGuanUI() : void + { + this.btnArr[5].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function openJinJieUI() : void + { + this.btnArr[4].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function createChaofuUI() : void + { + if(this.chaofu == null) + { + this.chaofu = new HeroChaofu(); + this.chaofu.x = 97; + this.chaofu.y = 29; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroListSelectUI.as b/flash_decompiled/com/view/ui/hero/HeroListSelectUI.as new file mode 100644 index 0000000..96a8fed --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroListSelectUI.as @@ -0,0 +1,401 @@ +package com.view.ui.hero +{ + import com.data.data.hero.Hero; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + 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 com.view.ui.hero.mc.HeroSelectLineMc; + import com.view.ui.message.MessageBoxUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HeroListSelectUI extends BaseUI + { + + public static var instance:HeroListSelectUI; + + private var scrollPane:ScrollPane; + + private var heroListMc:Sprite; + + private var heroLineMc:Vector.; + + private var tableMc:UITable; + + private var heroList:Array; + + private var checkArmy:Boolean; + + private var selectHeroArr:Vector. = new Vector.(); + + private var hasSelectHeroVec:Vector. = new Vector.(); + + public var backFunc:Function; + + public function HeroListSelectUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xuanzhehero); + this.createUI(); + } + + public static function getInstance() : HeroListSelectUI + { + if(instance == null) + { + instance = new HeroListSelectUI(); + } + return instance; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function createUI() : void + { + var _loc4_:UIButton = null; + var _loc5_:UIButton = null; + var _loc10_:HeroSelectLineMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["出征顺序","武将名","健康度","职 业","等级","统 兵","统兵数量","官 职","状 态"]; + var _loc3_:Array = [64,67,65,70,60,80,65,70,94]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(13,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(631,325); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.x = 1; + this.scrollPane.y = 25; + this.heroListMc = new Sprite(); + this.scrollPane.source = this.heroListMc; + _loc4_ = new UIButton("自动选择",2); + _loc5_ = new UIButton("全部取消",2); + _loc1_.addChild(_loc4_); + _loc1_.addChild(_loc5_); + _loc4_.x = 5; + _loc4_.y = this.tableMc.height + 20; + _loc5_.x = _loc4_.x + _loc4_.width + 10; + _loc5_.y = _loc4_.y; + _loc4_.onClick = this.selectAuto; + _loc5_.onClick = this.cancelAll; + var _loc6_:TextField = new TextField(); + _loc6_.textColor = 16763749; + _loc6_.width = 335; + _loc6_.height = 46; + _loc6_.multiline = true; + _loc6_.wordWrap = true; + _loc6_.text = "提示:出征顺序为1的武将为队伍的主将,其他序号的武将为副将,武将出的顺序和序号有关,合理的安排武将的出征顺序可以得到意想不到的收获。"; + _loc1_.addChild(_loc6_); + _loc6_.x = _loc5_.x + _loc5_.width + 20; + _loc6_.y = this.tableMc.height + 8; + this.heroLineMc = new Vector.(); + var _loc7_:int = 0; + while(_loc7_ < 13) + { + _loc10_ = new HeroSelectLineMc(); + this.heroListMc.addChild(_loc10_); + _loc10_.y = 25 * _loc7_; + _loc10_.x = 3; + _loc10_.setHero(null); + this.heroLineMc.push(_loc10_); + _loc10_.addEventListener(MouseEvent.CLICK,this.selectHeroList,false,0,true); + _loc7_++; + } + var _loc8_:UIButton = new UIButton("确 认",2); + var _loc9_:UIButton = new UIButton("取 消",2); + _loc1_.addChild(_loc8_); + _loc8_.x = 502; + _loc8_.y = _loc4_.y; + _loc1_.addChild(_loc9_); + _loc9_.x = _loc8_.x + _loc8_.width + 8; + _loc9_.y = _loc8_.y; + _loc9_.onClick = this.closeUI; + _loc8_.onClick = this.saveSelect; + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListResult); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.listAllHeros(); + } + + private function listAllHeros() : void + { + var _loc3_:HeroSelectLineMc = null; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc1_:Vector. = NewHeroData.getAllHeroList(); + var _loc2_:int = int(_loc1_.length); + this.hasSelectHeroVec.splice(0,this.hasSelectHeroVec.length); + if(_loc2_ == 0) + { + this.clearheroList(); + } + else + { + _loc4_ = 0; + while(_loc4_ < _loc2_) + { + if(_loc4_ < this.heroLineMc.length) + { + this.heroLineMc[_loc4_].setHero(_loc1_[_loc4_]); + this.heroLineMc[_loc4_].setNums(0); + } + else + { + _loc3_ = new HeroSelectLineMc(); + _loc3_.addEventListener(MouseEvent.CLICK,this.selectHeroList,false,0,true); + this.heroListMc.addChild(_loc3_); + _loc3_.y = 25 * _loc4_; + _loc3_.x = 3; + _loc3_.setNums(0); + _loc3_.setHero(_loc1_[_loc4_]); + this.heroLineMc.push(_loc3_); + } + if(_loc1_[_loc4_]) + { + _loc5_ = this.getSelectHeroByHeroId(_loc1_[_loc4_].heroId); + if(_loc5_ > 0) + { + this.heroLineMc[_loc4_].setSelectd(true); + this.heroLineMc[_loc4_].setNums(_loc5_); + this.hasSelectHeroVec.push(_loc1_[_loc4_]); + } + } + _loc4_++; + } + } + this.scrollPane.update(); + } + + private function getHeroListResult(param1:DevEvent) : * + { + this.listAllHeros(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.hasSelectHeroVec = new Vector.(); + } + + private function clearheroList() : void + { + var _loc1_:int = int(this.heroLineMc.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ > 12) + { + this.heroListMc.removeChild(this.heroLineMc[_loc2_]); + this.heroLineMc.splice(_loc2_,1); + } + else + { + this.heroLineMc[_loc2_].setHero(null); + } + _loc2_--; + } + this.scrollPane.update(); + } + + public function setSelectheroArr(param1:Vector., param2:Boolean = true) : void + { + this.checkArmy = param2; + this.selectHeroArr = param1; + } + + private function getSelectHeroByHeroId(param1:int) : int + { + var _loc2_:* = undefined; + if(this.selectHeroArr.length == 0) + { + return 0; + } + for(_loc2_ in this.selectHeroArr) + { + if(this.selectHeroArr[_loc2_] == param1) + { + return _loc2_ + 1; + } + } + return 0; + } + + private function selectHeroList(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:* = undefined; + var _loc5_:HeroSelectLineMc = null; + var _loc2_:HeroSelectLineMc = param1.currentTarget as HeroSelectLineMc; + if(_loc2_.getHero() == null) + { + return; + } + if(this.checkArmy && _loc2_.getHero().armyNum == 0 && _loc2_.selected) + { + MessageBoxUI.getInstance().addMessage(_loc2_.getHero().name + "带兵数量为0"); + _loc2_.setSelectd(false); + return; + } + if(!_loc2_.selected) + { + this.delSelectHero(_loc2_.getHero()); + _loc2_.setNums(0); + for(_loc4_ in this.hasSelectHeroVec) + { + _loc5_ = this.getHeroLineMc(this.hasSelectHeroVec[_loc4_].heroId); + if(_loc5_) + { + _loc3_++; + _loc5_.setNums(_loc3_); + } + } + } + else + { + if(Boolean(this.hasSelectHeroVec) && this.hasSelectHeroVec.length >= 5) + { + _loc2_.setSelectd(false); + return; + } + this.hasSelectHeroVec.push(_loc2_.getHero()); + _loc2_.setNums(this.hasSelectHeroVec.length); + } + } + + private function getHeroLineMc(param1:int) : HeroSelectLineMc + { + var _loc2_:HeroSelectLineMc = null; + for each(_loc2_ in this.heroLineMc) + { + if(Boolean(_loc2_.getHero()) && _loc2_.getHero().heroId == param1) + { + return _loc2_; + } + } + return null; + } + + private function delSelectHero(param1:Object) : void + { + var _loc2_:* = undefined; + for(_loc2_ in this.hasSelectHeroVec) + { + if(this.hasSelectHeroVec[_loc2_].heroId == param1.heroId) + { + this.hasSelectHeroVec.splice(_loc2_,1); + break; + } + } + } + + private function saveSelect(param1:MouseEvent) : void + { + var _loc2_:Vector. = null; + var _loc3_:int = 0; + var _loc4_:Object = null; + var _loc5_:Hero = null; + if(Boolean(this.backFunc)) + { + _loc2_ = new Vector.(); + _loc3_ = 1; + while(_loc3_ < 6) + { + _loc4_ = this.getHeroFromMc(_loc3_); + if(_loc4_ == null) + { + break; + } + _loc5_ = new Hero(); + _loc5_.exect(_loc4_); + _loc2_.push(_loc5_); + _loc3_++; + } + this.backFunc(_loc2_); + this.closeUI(null); + } + } + + private function getHeroFromMc(param1:int) : Object + { + var _loc2_:HeroSelectLineMc = null; + for each(_loc2_ in this.heroLineMc) + { + if(Boolean(_loc2_.getHero()) && _loc2_.currNums == param1) + { + return _loc2_.getHero(); + } + } + return null; + } + + private function selectAuto(param1:MouseEvent) : void + { + var _loc2_:HeroSelectLineMc = null; + this.hasSelectHeroVec.splice(0,this.hasSelectHeroVec.length); + for each(_loc2_ in this.heroLineMc) + { + if(_loc2_.getHero()) + { + if(this.hasSelectHeroVec.length < 5) + { + _loc2_.setSelectd(true); + this.hasSelectHeroVec.push(_loc2_.getHero()); + _loc2_.setNums(this.hasSelectHeroVec.length); + } + else + { + _loc2_.setSelectd(false); + _loc2_.setNums(0); + } + } + } + } + + private function cancelAll(param1:MouseEvent) : void + { + var _loc2_:HeroSelectLineMc = null; + for each(_loc2_ in this.heroLineMc) + { + if(_loc2_.getHero()) + { + _loc2_.setSelectd(false); + _loc2_.setNums(0); + } + } + this.hasSelectHeroVec.splice(0,this.hasSelectHeroVec.length); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroMibaoUI.as b/flash_decompiled/com/view/ui/hero/HeroMibaoUI.as new file mode 100644 index 0000000..de6adc4 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroMibaoUI.as @@ -0,0 +1,461 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.control.hero.event.HeroUpEvent; + import com.utils.Utils; + import com.view.newui.UITabBtn; + import com.view.newui.UIWindowBg; + import com.view.tip.HeroTip; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HeroMibaoUI extends Sprite + { + + private var face:InstallFace; + + private var mc:MovieClip; + + private var imgSp:Sprite; + + private var heroTip:HeroTip; + + private var btnArr:Vector.; + + private var bg4:UIWindowBg; + + private var nameText:TextField; + + private var levelText:TextField; + + private var atkText:TextField; + + private var defText:TextField; + + private var hpText:TextField; + + private var aglText:TextField; + + private var mainPage:MibaoPage; + + private var secPage:MibaoPage; + + private var threePage:MibaoPage; + + private var fourPage:MibaoPage; + + private var preBtn:UITabBtn; + + private var btn_1:UITabBtn; + + private var btn_2:UITabBtn; + + private var btn_3:UITabBtn; + + private var btn_4:UITabBtn; + + private var currHero:Object; + + private var loader:LoadResource; + + private var headImg:Bitmap; + + private var mibaoObj:Object; + + private var changeMiBaoUI:ChangeMiBaoUI; + + public function HeroMibaoUI() + { + var _loc4_:UITabBtn = null; + var _loc5_:Sprite = null; + var _loc6_:TextField = null; + var _loc7_:TextField = null; + var _loc8_:TextField = null; + var _loc9_:TextField = null; + var _loc10_:TextField = null; + var _loc11_:TextField = null; + var _loc12_:TextField = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(359 + 170,367); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(150,359); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + this.btn_1 = new UITabBtn("主密保",2); + this.btn_2 = new UITabBtn("副密保",2); + this.btn_3 = new UITabBtn("密保神鉴",2); + this.btn_4 = new UITabBtn("密保魔鉴",2); + this.btnArr = new Vector.(); + this.btnArr.push(this.btn_1); + this.btnArr.push(this.btn_2); + this.btnArr.push(this.btn_3); + this.btnArr.push(this.btn_4); + var _loc3_:int = 0; + for each(_loc4_ in this.btnArr) + { + _loc1_.addChild(_loc4_); + _loc4_.x = _loc2_.x + _loc2_.width + 10 + _loc3_ * 66; + _loc4_.y = 4; + _loc4_.onClick = this.clickTab; + _loc3_++; + } + this.bg4 = new UIWindowBg(); + this.bg4.initThirdPanel(357,334); + _loc1_.addChild(this.bg4); + this.bg4.x = 3 + _loc2_.width + _loc2_.x; + this.bg4.y = this.btn_1.y + 25; + _loc5_ = new Scale9Grid(this.face.getSprite(ClassConfig.lib_img_border),52,70); + this.imgSp = this.face.getSprite(ClassConfig.lib_herobg); + _loc2_.addChild(_loc5_); + _loc5_.x = 40; + _loc5_.y = 16; + _loc5_.addChild(this.imgSp); + this.imgSp.x = 10; + this.imgSp.y = 10; + _loc6_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc6_.text = "姓 名:"; + _loc2_.addChild(_loc6_); + _loc6_.x = 20; + _loc6_.y = 150; + this.nameText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.nameText); + this.nameText.x = _loc6_.x + 40; + this.nameText.y = _loc6_.y; + _loc7_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc7_.text = "等 级:"; + _loc2_.addChild(_loc7_); + _loc7_.x = _loc6_.x; + _loc7_.y = _loc6_.y + 30; + this.levelText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.levelText); + this.levelText.x = this.nameText.x; + this.levelText.y = _loc7_.y; + _loc8_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc8_.text = "攻 击:"; + _loc2_.addChild(_loc8_); + _loc8_.x = _loc6_.x; + _loc8_.y = _loc7_.y + 30; + this.atkText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.atkText); + this.atkText.x = this.nameText.x; + this.atkText.y = _loc8_.y; + _loc9_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc9_.text = "防 御:"; + _loc2_.addChild(_loc9_); + _loc9_.x = _loc6_.x; + _loc9_.y = _loc8_.y + 30; + this.defText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.defText); + this.defText.x = this.nameText.x; + this.defText.y = _loc9_.y; + _loc10_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc10_.text = "敏 捷:"; + _loc2_.addChild(_loc10_); + _loc10_.x = _loc6_.x; + _loc10_.y = _loc9_.y + 30; + this.aglText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.aglText); + this.aglText.x = this.nameText.x; + this.aglText.y = _loc10_.y; + _loc11_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc11_.text = "体 力:"; + _loc2_.addChild(_loc11_); + _loc11_.x = _loc6_.x; + _loc11_.y = _loc10_.y + 30; + this.hpText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.hpText); + this.hpText.x = this.nameText.x; + this.hpText.y = _loc11_.y; + _loc12_ = PublicMethod.getTextFieldWithFillter(10852210,130); + _loc12_.text = "括号里为密保所加属性"; + _loc2_.addChild(_loc12_); + _loc12_.x = _loc6_.x; + _loc12_.y = _loc11_.y + 30; + this.heroTip = new HeroTip(this.imgSp,this.face.stage,this.face.tip_bg); + this.mainPage = new MibaoPage(1); + this.secPage = new MibaoPage(2); + this.threePage = new MibaoPage(3); + this.fourPage = new MibaoPage(4); + this.bg4.addChild(this.mainPage); + this.mainPage.changeMiBaoF = this.changeMiBao; + this.bg4.addChild(this.secPage); + this.secPage.changeMiBaoF = this.changeMiBao; + this.bg4.addChild(this.threePage); + this.threePage.changeMiBaoF = this.changeMiBao; + this.bg4.addChild(this.fourPage); + this.fourPage.changeMiBaoF = this.changeMiBao; + this.mainPage.clickItemFun = this.clickMiBao; + this.secPage.clickItemFun = this.clickMiBao; + this.threePage.clickItemFun = this.clickMiBao; + this.fourPage.clickItemFun = this.clickMiBao; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.preBtn) + { + this.preBtn.select = false; + } + this.preBtn = _loc2_; + this.preBtn.select = true; + if(this.preBtn == this.btn_1) + { + if(!this.bg4.contains(this.mainPage)) + { + this.bg4.addChild(this.mainPage); + } + if(this.bg4.contains(this.secPage)) + { + this.bg4.removeChild(this.secPage); + } + if(this.bg4.contains(this.threePage)) + { + this.bg4.removeChild(this.threePage); + } + if(this.bg4.contains(this.fourPage)) + { + this.bg4.removeChild(this.fourPage); + } + } + else if(this.preBtn == this.btn_2) + { + if(!this.bg4.contains(this.secPage)) + { + this.bg4.addChild(this.secPage); + } + if(this.bg4.contains(this.mainPage)) + { + this.bg4.removeChild(this.mainPage); + } + if(this.bg4.contains(this.threePage)) + { + this.bg4.removeChild(this.threePage); + } + if(this.bg4.contains(this.fourPage)) + { + this.bg4.removeChild(this.fourPage); + } + } + else if(this.preBtn == this.btn_3) + { + if(!this.bg4.contains(this.threePage)) + { + this.bg4.addChild(this.threePage); + } + if(this.bg4.contains(this.mainPage)) + { + this.bg4.removeChild(this.mainPage); + } + if(this.bg4.contains(this.secPage)) + { + this.bg4.removeChild(this.secPage); + } + if(this.bg4.contains(this.fourPage)) + { + this.bg4.removeChild(this.fourPage); + } + } + else if(this.preBtn == this.btn_4) + { + if(!this.bg4.contains(this.fourPage)) + { + this.bg4.addChild(this.fourPage); + } + if(this.bg4.contains(this.mainPage)) + { + this.bg4.removeChild(this.mainPage); + } + if(this.bg4.contains(this.secPage)) + { + this.bg4.removeChild(this.secPage); + } + if(this.bg4.contains(this.threePage)) + { + this.bg4.removeChild(this.threePage); + } + } + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().addEventListener(HeroUpEvent.Hero_mibaoView,this.loadMiBaoResult); + ConnectService.getInstance().addEventListener(HeroUpEvent.Hero_mibaoStudy,this.studyMiBaoResult); + ConnectService.getInstance().addEventListener(HeroUpEvent.Hero_mibaoUp,this.upMiBaoResult); + ConnectService.getInstance().addEventListener(HeroUpEvent.Hero_mibaoUp1,this.upMiBaoResult1); + ConnectService.getInstance().addEventListener(HeroUpEvent.Hero_mibaoChange,this.changeMiBaoResult); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().removeEventListener(HeroUpEvent.Hero_mibaoView,this.loadMiBaoResult); + ConnectService.getInstance().removeEventListener(HeroUpEvent.Hero_mibaoStudy,this.studyMiBaoResult); + ConnectService.getInstance().removeEventListener(HeroUpEvent.Hero_mibaoUp,this.upMiBaoResult); + ConnectService.getInstance().removeEventListener(HeroUpEvent.Hero_mibaoChange,this.changeMiBaoResult); + } + + public function getInfo(param1:Object) : void + { + this.currHero = param1; + this.loadHeroHead(); + this.getHeroImgTip(); + } + + private function loadHeroHead() : void + { + var _loc1_:String = "pic/head/" + this.currHero.picPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + this.headImg.x = 4; + this.headImg.y = 4; + } + + private function getHeroImgTip() : void + { + this.heroTip.destroyTip(); + ConnectService.getInstance().heroService.getHeroPicView(this.currHero.heroId); + } + + private function getHeroImgTipView(param1:HeroEvent) : void + { + this.heroTip.setTipData(param1.heroObj); + this.loadMiBao(); + } + + private function loadMiBao() : void + { + ConnectService.getInstance().heroService.getMiBaoView(this.currHero.heroId); + } + + private function loadMiBaoResult(param1:HeroUpEvent) : void + { + this.mibaoObj = param1.obj; + var _loc2_:int = int(this.mibaoObj.agl); + var _loc3_:int = int(this.mibaoObj.atk); + var _loc4_:int = int(this.mibaoObj.def); + var _loc5_:int = int(this.mibaoObj.hp); + this.nameText.htmlText = this.currHero.showName; + this.levelText.text = HeroConst.changeName(this.currHero.level,this.currHero.changeCount); + var _loc6_:Number = Number(this.currHero.viewAtk); + var _loc7_:Number = Number(this.currHero.viewDef); + var _loc8_:Number = Number(this.currHero.viewHp); + var _loc9_:Number = Number(this.currHero.viewAgl); + var _loc10_:String = Utils.getNewPower(_loc6_) + "(+" + _loc3_ + ")"; + var _loc11_:String = Utils.getNewPower(_loc7_) + "(+" + _loc4_ + ")"; + var _loc12_:String = Utils.getNewPower(_loc8_) + "(+" + _loc5_ + ")"; + var _loc13_:String = Utils.getNewPower(_loc9_) + "(+" + _loc2_ + ")"; + this.atkText.htmlText = _loc10_; + this.defText.htmlText = _loc11_; + this.hpText.htmlText = _loc12_; + this.aglText.htmlText = _loc13_; + var _loc14_:int = int(this.mibaoObj.mb1); + var _loc15_:int = int(this.mibaoObj.mb2); + var _loc16_:int = int(this.mibaoObj.mbl1); + var _loc17_:int = int(this.mibaoObj.mbl2); + this.mainPage.setMiBaoObj(this.mibaoObj); + this.secPage.setMiBaoObj(this.mibaoObj); + this.threePage.setMiBaoObj(this.mibaoObj); + this.fourPage.setMiBaoObj(this.mibaoObj); + if(Boolean(this.changeMiBaoUI) && contains(this.changeMiBaoUI)) + { + removeChild(this.changeMiBaoUI); + } + } + + private function clickMiBao(param1:int, param2:int) : void + { + if(this.currHero.level < 90) + { + MessageBoxUI.getInstance().addMessage("武将等级需达到90级"); + return; + } + if(param2 == 2) + { + if(this.mibaoObj.mbl1 > 0) + { + if(this.mibaoObj.mbl1 < 250) + { + MessageBoxUI.getInstance().addMessage("主秘宝达到250级才可以激活副秘宝"); + return; + } + } + } + var _loc3_:Object = new Object(); + _loc3_.heroId = this.currHero.heroId; + _loc3_.type = param1; + MessageBoxUI.getInstance().confirmMsg("确认激活该秘宝?",this.confirmStudy,_loc3_); + } + + private function confirmStudy(param1:Object) : void + { + ConnectService.getInstance().heroService.studyMiBao(param1.heroId,param1.type); + } + + private function studyMiBaoResult(param1:HeroUpEvent) : void + { + this.loadMiBao(); + } + + private function upMiBaoResult(param1:HeroUpEvent) : void + { + MessageBoxUI.getInstance().addMessage(param1.msg); + this.loadMiBao(); + } + + private function upMiBaoResult1(param1:HeroUpEvent) : void + { + this.loadMiBao(); + } + + private function changeMiBao(param1:int) : void + { + if(this.changeMiBaoUI == null) + { + this.changeMiBaoUI = new ChangeMiBaoUI(); + this.changeMiBaoUI.y = int(height / 2 - this.changeMiBaoUI.height / 2); + this.changeMiBaoUI.x = int(width / 2 - this.changeMiBaoUI.width / 2); + } + if(!contains(this.changeMiBaoUI)) + { + addChild(this.changeMiBaoUI); + } + this.changeMiBaoUI.setObj(this.mibaoObj,param1); + } + + private function changeMiBaoResult(param1:HeroUpEvent) : void + { + this.loadMiBao(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroPage.as b/flash_decompiled/com/view/ui/hero/HeroPage.as new file mode 100644 index 0000000..a105d1e --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroPage.as @@ -0,0 +1,196 @@ +package com.view.ui.hero +{ + import com.control.ConnectService; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIButton1; + import com.view.newui.UITable; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.mc.GiveHeroExpUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import fl.containers.ScrollPane; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HeroPage extends UIBase + { + + private var tableMc:UITable; + + private var btn:UIButton1; + + private var label1:TextField; + + private var heroScrollPane:ScrollPane; + + private var heroListMc:Sprite; + + private var heroListVec:Vector.; + + private var heroList:Array; + + private var heroHeadTip:HeroHeadTip; + + private var heroListInfoUI:HeroListInfoUI; + + private var giveExpUI:GiveHeroExpUI; + + public function HeroPage() + { + var _loc2_:Array = null; + var _loc5_:HeroLineMc = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630 + 100,400); + addChild(_loc1_); + _loc2_ = ["武将","健康度","等级","攻击","防御","敏捷","体力","职业","状态","操作"]; + var _loc3_:Array = [63,51,64,89,89,89,90,60,60,80]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(15,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.heroListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 15) + { + _loc5_ = new HeroLineMc(); + this.tableMc.addChild(_loc5_); + this.heroListVec.push(_loc5_); + _loc5_.y = 26 + _loc4_ * 25; + _loc5_.x = 4; + _loc5_.addEventListener(MouseEvent.ROLL_OUT,this.headRollOut); + _loc5_.addEventListener(MouseEvent.ROLL_OVER,this.headRollOver); + _loc4_++; + } + this.btn = new UIButton1("清理武将",1,12); + addChild(this.btn); + this.btn.x = 625; + this.btn.y = -28; + this.btn.onClick = this.refreshHero; + ToolTipManager.getInstance().setToolTip(this.btn,new TxtTooltip("武将属性显示不正确时,点击清理武将缓存后刷新游戏"),false,-1,false); + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListResult); + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETHEROBYID,this.getHeroResult); + } + + private function refreshHero(param1:MouseEvent) : void + { + this.btn.setUnEnable(); + ConnectService.getInstance().heroService.clearAllHero(); + } + + public function clear() : void + { + if(Boolean(this.giveExpUI) && contains(this.giveExpUI)) + { + removeChild(this.giveExpUI); + } + } + + private function getHeroListResult(param1:DevEvent) : void + { + this.getALlHeroList(); + } + + public function getALlHeroList() : void + { + var _loc2_:* = undefined; + var _loc1_:Vector. = NewHeroData.getAllHeroList(); + for(_loc2_ in this.heroListVec) + { + if(_loc2_ >= _loc1_.length) + { + this.heroListVec[_loc2_].setHero(null); + } + else + { + this.heroListVec[_loc2_].setHero(_loc1_[_loc2_]); + } + } + } + + private function getHeroResult(param1:DevEvent) : void + { + var _loc3_:* = undefined; + var _loc2_:NewHero = NewHeroData.getHeroByHeroId(param1.id); + for(_loc3_ in this.heroListVec) + { + if(Boolean(this.heroListVec[_loc3_].hero) && this.heroListVec[_loc3_].hero.heroId == _loc2_.heroId) + { + this.heroListVec[_loc3_].setHero(_loc2_); + } + } + } + + private function headRollOut(param1:MouseEvent) : void + { + if(this.heroHeadTip == null) + { + return; + } + this.heroHeadTip.destroy(); + if(Boolean(this.heroHeadTip) && this.tableMc.contains(this.heroHeadTip)) + { + this.tableMc.removeChild(this.heroHeadTip); + } + } + + private function headRollOver(param1:MouseEvent) : void + { + var _loc2_:HeroLineMc = null; + _loc2_ = param1.target as HeroLineMc; + if(_loc2_.hero == null) + { + return; + } + if(this.heroHeadTip == null) + { + this.heroHeadTip = new HeroHeadTip(); + } + if(!this.tableMc.contains(this.heroHeadTip)) + { + this.tableMc.addChild(this.heroHeadTip); + this.heroHeadTip.x = -this.heroHeadTip.width; + this.heroHeadTip.y = _loc2_.y; + } + this.heroHeadTip.setHead(_loc2_.hero.picPath); + } + + public function getHeroListInfoUI(param1:int) : void + { + if(this.heroListInfoUI == null) + { + this.heroListInfoUI = new HeroListInfoUI(); + this.heroListInfoUI.setHeroList(this.heroList); + } + if(!contains(this.heroListInfoUI)) + { + addChild(this.heroListInfoUI); + } + this.heroListInfoUI.getUserList(param1); + ConnectService.getInstance().heroService.getAllBaoshiList(); + } + + public function giveHeroExp(param1:int) : void + { + if(this.giveExpUI == null) + { + this.giveExpUI = new GiveHeroExpUI(); + } + if(!contains(this.giveExpUI)) + { + addChild(this.giveExpUI); + this.giveExpUI.x = int(width / 2 - this.giveExpUI.width / 2); + this.giveExpUI.y = int(height / 2 - this.giveExpUI.height / 2); + } + this.giveExpUI.setHeroId(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroSkillUI.as b/flash_decompiled/com/view/ui/hero/HeroSkillUI.as new file mode 100644 index 0000000..4989809 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroSkillUI.as @@ -0,0 +1,293 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.newdata.hero.NewHero; + import com.view.newui.UIButton; + import com.view.newui.UITabBtn; + import com.view.newui.UIWindowBg; + import com.view.tip.HeroTip; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HeroSkillUI extends Sprite + { + + private static var instance:HeroSkillUI; + + private var face:InstallFace; + + private var mc:MovieClip; + + private var btnArr:Vector.; + + private var type_1:UITabBtn; + + private var type_2:UITabBtn; + + private var bg5:UIWindowBg; + + private var combatSkill:CombatSkillPage; + + private var fightSkill:FightSkillPage; + + private var nameText:TextField; + + private var levelText:TextField; + + private var careerText:TextField; + + private var pointText:TextField; + + private var heroTip:HeroTip; + + public var currHero:NewHero; + + private var loader:LoadResource; + + private var imgSp:Sprite; + + private var headImg:Bitmap; + + private var preType:UITabBtn; + + public function HeroSkillUI() + { + var _loc3_:Sprite = null; + var _loc6_:TextField = null; + var _loc10_:UIButton = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(359 + 170,367); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(150,359); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + this.type_1 = new UITabBtn("战略技能",2); + this.type_2 = new UITabBtn("单挑技能",2); + _loc1_.addChild(this.type_1); + this.type_1.x = _loc2_.x + _loc2_.width + 13; + this.type_1.y = 4; + _loc1_.addChild(this.type_2); + this.type_2.x = this.type_1.x + 66; + this.type_2.y = 4; + this.bg5 = new UIWindowBg(); + this.bg5.initThirdPanel(357,334); + _loc1_.addChild(this.bg5); + this.bg5.x = 3 + _loc2_.width + _loc2_.x; + this.bg5.y = this.type_1.y + 25; + this.type_1.onClick = this.clickType; + this.type_2.onClick = this.clickType; + _loc3_ = new Scale9Grid(this.face.getSprite(ClassConfig.lib_img_border),52,70); + this.imgSp = this.face.getSprite(ClassConfig.lib_herobg); + _loc2_.addChild(_loc3_); + _loc3_.x = 40; + _loc3_.y = 16; + _loc3_.addChild(this.imgSp); + this.imgSp.x = 10; + this.imgSp.y = 10; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc4_.text = "姓 名:"; + _loc2_.addChild(_loc4_); + _loc4_.x = 26; + _loc4_.y = 134; + this.nameText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.nameText); + this.nameText.x = _loc4_.x + 50; + this.nameText.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc5_.text = "等 级:"; + _loc2_.addChild(_loc5_); + _loc5_.x = _loc4_.x; + _loc5_.y = _loc4_.y + 23; + this.levelText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.levelText); + this.levelText.x = this.nameText.x; + this.levelText.y = _loc5_.y; + _loc6_ = PublicMethod.getTextFieldWithFillter(10852210,50); + _loc6_.text = "职 业:"; + _loc2_.addChild(_loc6_); + _loc6_.x = _loc4_.x; + _loc6_.y = _loc5_.y + 23; + this.careerText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.careerText); + this.careerText.x = this.nameText.x; + this.careerText.y = _loc6_.y; + var _loc7_:Sprite = PublicMethod.getTrLine(150); + _loc2_.addChild(_loc7_); + _loc7_.x = 5; + _loc7_.y = this.careerText.y + 22; + var _loc8_:UITabBtn = new UITabBtn("装备技能",2); + _loc2_.addChild(_loc8_); + _loc8_.x = 15; + _loc8_.y = 210; + _loc8_.select = true; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initSecondPanel(140,90); + _loc2_.addChild(_loc9_); + _loc9_.x = 5; + _loc9_.y = _loc8_.y + 25; + _loc10_ = new UIButton("技能全卸",2); + _loc2_.addChild(_loc10_); + _loc10_.x = 50; + _loc10_.y = 338; + this.heroTip = new HeroTip(this.imgSp,this.face.stage,this.face.tip_bg); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + _loc9_.addEventListener(MouseEvent.ROLL_OUT,this.mouseOutTable); + this.combatSkill = new CombatSkillPage(); + this.fightSkill = new FightSkillPage(); + this.type_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + public static function getInstance() : HeroSkillUI + { + if(instance == null) + { + instance = new HeroSkillUI(); + } + return instance; + } + + public function getInfo(param1:NewHero) : void + { + this.currHero = param1; + this.nameText.htmlText = param1.showName; + this.levelText.htmlText = HeroConst.changeName(param1.level,param1.changeCount); + this.careerText.htmlText = param1.careerName; + this.loadHeroHead(); + this.getHeroImgTip(); + } + + private function getHeroImgTip() : void + { + this.heroTip.destroyTip(); + ConnectService.getInstance().heroService.getHeroPicView(this.currHero.heroId); + } + + private function getHeroImgTipView(param1:HeroEvent) : void + { + this.heroTip.setTipData(param1.heroObj); + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_styudySkill,this.studySkillResult); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_styudySkill,this.studySkillResult); + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + } + + private function loadHeroHead() : void + { + var _loc1_:String = "pic/head/" + this.currHero.picPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + this.headImg.x = 4; + this.headImg.y = 4; + if(this.preType == this.type_1) + { + this.combatSkill.loadData(this.currHero); + } + else + { + this.fightSkill.loadData(this.currHero); + } + } + + private function clickType(param1:MouseEvent) : void + { + if(this.preType) + { + this.preType.select = false; + } + this.preType = param1.currentTarget as UITabBtn; + if(this.preType == this.type_1) + { + this.type_1.select = true; + this.type_2.select = false; + if(this.bg5.contains(this.fightSkill)) + { + this.bg5.removeChild(this.fightSkill); + this.fightSkill.delEvent(); + } + if(!this.bg5.contains(this.combatSkill)) + { + this.bg5.addChild(this.combatSkill); + this.combatSkill.addEvent(); + } + } + else + { + this.type_1.select = false; + this.type_2.select = true; + if(!this.bg5.contains(this.fightSkill)) + { + this.bg5.addChild(this.fightSkill); + this.fightSkill.addEvent(); + this.fightSkill.loadData(this.currHero); + } + if(this.bg5.contains(this.combatSkill)) + { + this.bg5.removeChild(this.combatSkill); + this.combatSkill.delEvent(); + } + } + } + + private function studySkillResult(param1:HeroEvent) : void + { + if(this.preType == this.type_1) + { + this.combatSkill.loadData(this.currHero); + } + else + { + this.fightSkill.loadData(this.currHero); + } + } + + private function mouseOutTable(param1:MouseEvent) : void + { + if(this.preType == this.type_1) + { + this.combatSkill.hiddenMenu(); + } + else + { + this.fightSkill.hiddenMenu(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/HeroStrongUI.as b/flash_decompiled/com/view/ui/hero/HeroStrongUI.as new file mode 100644 index 0000000..e7dd0e4 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/HeroStrongUI.as @@ -0,0 +1,575 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.utils.Utils; + import com.view.mc.button.Button_16; + import com.view.mc.button.Button_2; + import com.view.newui.UIButton; + import com.view.newui.UINumInputText; + import com.view.newui.UIRadioBtn; + import com.view.newui.UITextBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.tip.HeroTip; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tools.ToolView; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HeroStrongUI extends Sprite + { + + private var face:InstallFace; + + private var mc:MovieClip; + + private var imgSp:Sprite; + + private var loader:LoadResource; + + private var strongBtn:Button_2; + + private var superBtn1:Button_16; + + private var superBtn2:Button_16; + + private var superBtn3:Button_16; + + private var buyBtn:UITextBtn; + + private var inputMc:UINumInputText; + + private var btn_1:UIRadioBtn; + + private var btn_2:UIRadioBtn; + + private var btn_3:UIRadioBtn; + + private var btn_4:UIRadioBtn; + + private var btn_5:UIRadioBtn; + + private var btn_6:UIRadioBtn; + + private var currNums1:TextField; + + private var currNums2:TextField; + + private var currNums3:TextField; + + private var currNums4:TextField; + + private var currNums5:TextField; + + private var currNums6:TextField; + + private var nameText:TextField; + + private var levelText:TextField; + + private var upText:TextField; + + private var upMaxText:TextField; + + private var careerText:TextField; + + private var currHero:Object; + + private var headImg:Bitmap; + + private var strongItemList:Array; + + private var strongerLevel:int; + + private var superItemNums:int; + + private var superItemNums1:int; + + private var maxHeroUpCount:int; + + private var preBtn:UIRadioBtn; + + private var heroObj:Object; + + private var heroTip:HeroTip; + + public function HeroStrongUI() + { + var _loc5_:TextField = null; + var _loc6_:TextField = null; + var _loc8_:TextField = null; + var _loc11_:TextField = null; + var _loc21_:TextField = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(359 + 170,367); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(150,359); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(357,359); + _loc1_.addChild(_loc3_); + _loc3_.x = 3 + _loc2_.width + _loc2_.x; + _loc3_.y = _loc2_.y; + var _loc4_:Sprite = new Scale9Grid(this.face.getSprite(ClassConfig.lib_img_border),52,70); + this.imgSp = this.face.getSprite(ClassConfig.lib_herobg); + _loc2_.addChild(_loc4_); + _loc4_.x = 40; + _loc4_.y = 16; + _loc4_.addChild(this.imgSp); + this.imgSp.x = 10; + this.imgSp.y = 10; + _loc5_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc5_.text = "姓 名:"; + _loc2_.addChild(_loc5_); + _loc5_.x = 20; + _loc5_.y = 150; + this.nameText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.nameText); + this.nameText.x = _loc5_.x + 60; + this.nameText.y = _loc5_.y; + _loc6_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc6_.text = "等 级:"; + _loc2_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 30; + this.levelText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.levelText); + this.levelText.x = this.nameText.x; + this.levelText.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc7_.text = "成 长:"; + _loc2_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 30; + this.upText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.upText); + this.upText.x = this.nameText.x; + this.upText.y = _loc7_.y; + _loc8_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc8_.text = "成长上限:"; + _loc2_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 30; + this.upMaxText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.upMaxText); + this.upMaxText.x = this.nameText.x; + this.upMaxText.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc9_.text = "职 业:"; + _loc2_.addChild(_loc9_); + _loc9_.x = _loc5_.x; + _loc9_.y = _loc8_.y + 30; + this.careerText = PublicMethod.getTextFieldWithFillter(16640697,130); + _loc2_.addChild(this.careerText); + this.careerText.x = this.nameText.x; + this.careerText.y = _loc9_.y; + var _loc10_:UITitleBg = new UITitleBg("强化类型",350); + _loc3_.addChild(_loc10_); + _loc10_.x = int(_loc3_.width / 2 - _loc10_.width / 2); + this.btn_1 = new UIRadioBtn(); + _loc3_.addChild(this.btn_1); + this.btn_1.x = 15; + this.btn_1.y = 35; + this.btn_1.onClick = this.clickRadioBtn; + _loc11_ = PublicMethod.getTextFieldWithFillter(16640697,100); + _loc3_.addChild(_loc11_); + _loc11_.x = this.btn_1.x + 30; + _loc11_.y = this.btn_1.y + 3; + this.currNums1 = PublicMethod.getTextFieldWithFillter(16776960,120); + _loc3_.addChild(this.currNums1); + this.currNums1.x = _loc11_.x + 120; + this.currNums1.y = _loc11_.y; + _loc11_.text = "1级武将强化符*1"; + this.currNums1.text = "当前拥有:"; + this.btn_2 = new UIRadioBtn(); + _loc3_.addChild(this.btn_2); + this.btn_2.x = this.btn_1.x; + this.btn_2.y = this.btn_1.y + 23; + this.btn_2.onClick = this.clickRadioBtn; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(16640697,100); + _loc3_.addChild(_loc12_); + _loc12_.x = _loc11_.x; + _loc12_.y = this.btn_2.y + 3; + this.currNums2 = PublicMethod.getTextFieldWithFillter(16776960,120); + _loc3_.addChild(this.currNums2); + this.currNums2.x = this.currNums1.x; + this.currNums2.y = _loc12_.y; + _loc12_.text = "2级武将强化符*1"; + this.currNums2.text = "当前拥有:"; + this.btn_3 = new UIRadioBtn(); + _loc3_.addChild(this.btn_3); + this.btn_3.x = this.btn_1.x; + this.btn_3.y = this.btn_2.y + 23; + this.btn_3.onClick = this.clickRadioBtn; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(16640697,100); + _loc3_.addChild(_loc13_); + _loc13_.x = _loc11_.x; + _loc13_.y = this.btn_3.y + 3; + this.currNums3 = PublicMethod.getTextFieldWithFillter(16776960,120); + _loc3_.addChild(this.currNums3); + this.currNums3.x = this.currNums1.x; + this.currNums3.y = _loc13_.y; + _loc13_.text = "3级武将强化符*1"; + this.currNums3.text = "当前拥有:"; + this.btn_4 = new UIRadioBtn(); + _loc3_.addChild(this.btn_4); + this.btn_4.x = this.btn_1.x; + this.btn_4.y = this.btn_3.y + 23; + this.btn_4.onClick = this.clickRadioBtn; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(16640697,100); + _loc3_.addChild(_loc14_); + _loc14_.x = _loc11_.x; + _loc14_.y = this.btn_4.y + 3; + this.currNums4 = PublicMethod.getTextFieldWithFillter(16776960,120); + _loc3_.addChild(this.currNums4); + this.currNums4.x = this.currNums1.x; + this.currNums4.y = _loc14_.y; + _loc14_.text = "4级武将强化符*1"; + this.currNums4.text = "当前拥有:"; + this.btn_5 = new UIRadioBtn(); + _loc3_.addChild(this.btn_5); + this.btn_5.x = this.btn_1.x; + this.btn_5.y = this.btn_4.y + 23; + this.btn_5.onClick = this.clickRadioBtn; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(16640697,100); + _loc3_.addChild(_loc15_); + _loc15_.x = _loc11_.x; + _loc15_.y = this.btn_5.y + 3; + this.currNums5 = PublicMethod.getTextFieldWithFillter(16776960,120); + _loc3_.addChild(this.currNums5); + this.currNums5.x = this.currNums1.x; + this.currNums5.y = _loc15_.y; + _loc15_.text = "超级强化符*1"; + this.currNums5.text = "当前拥有:"; + this.btn_6 = new UIRadioBtn(); + _loc3_.addChild(this.btn_6); + this.btn_6.x = this.btn_1.x; + this.btn_6.y = this.btn_5.y + 23; + this.btn_6.onClick = this.clickRadioBtn; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(16640697,100); + _loc3_.addChild(_loc16_); + _loc16_.x = _loc11_.x; + _loc16_.y = this.btn_6.y + 3; + this.currNums6 = PublicMethod.getTextFieldWithFillter(16776960,120); + _loc3_.addChild(this.currNums6); + this.currNums6.x = this.currNums1.x; + this.currNums6.y = _loc16_.y; + _loc16_.text = "终级强化符*1"; + this.currNums6.text = "当前拥有:"; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(16640697,100); + _loc3_.addChild(_loc17_); + _loc17_.text = "强化次数:"; + _loc17_.x = 30; + _loc17_.y = 185; + this.inputMc = new UINumInputText(65); + _loc3_.addChild(this.inputMc); + this.inputMc.x = 95; + this.inputMc.y = _loc17_.y - 3; + this.inputMc.setMaxNum(9000); + this.inputMc.setTextNum(1); + var _loc18_:UIButton = new UIButton("强 化",2,10); + _loc3_.addChild(_loc18_); + _loc18_.x = 170; + _loc18_.y = _loc17_.y - 4; + _loc18_.onClick = this.strongHero; + var _loc19_:UITitleBg = new UITitleBg("强化说明",350); + _loc3_.addChild(_loc19_); + _loc19_.x = int(_loc3_.width / 2 - _loc19_.width / 2); + _loc19_.y = 210; + var _loc20_:TextFormat = new TextFormat(); + _loc20_.leading = 3; + _loc21_ = PublicMethod.getTextFieldWithFillter(10852210,340); + _loc21_.wordWrap = true; + _loc21_.multiline = true; + _loc21_.height = 120; + _loc3_.addChild(_loc21_); + _loc21_.x = 10; + _loc21_.y = _loc19_.y + 30; + _loc21_.defaultTextFormat = _loc20_; + _loc21_.htmlText = "1.能够在一定范围内提高武将的成长值
2.强化符可以向下兼容
3.强化有一定几率失败
4.成长值越接近上限,越容易失败
"; + _loc21_.htmlText += "5.武将成长达到150时需要超级强化符才能继续强化。
6.武将成长达到300时需要终极强化符才能继续强化。
7.武将成长超过150时,每次强化可获得0.01-0.03点成长"; + this.buyBtn = new UITextBtn("购买强化符",true); + this.buyBtn.onClick = this.buyItem; + _loc3_.addChild(this.buyBtn); + this.buyBtn.x = 285; + this.buyBtn.y = 185; + this.heroTip = new HeroTip(this.imgSp,this.face.stage,this.face.tip_bg); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + } + + private function buyItem(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_QIANGHUA"); + _loc2_.onRefresh = this.refresh; + _loc2_.show(); + } + + public function getInfo(param1:Object) : void + { + this.currHero = param1; + this.nameText.htmlText = param1.showName; + this.levelText.text = HeroConst.changeName(param1.level,param1.changeCount); + this.upText.text = Utils.getUpCount(param1.upCount.toString()); + this.careerText.text = param1.careerName; + this.loadHeroHead(); + this.getHeroImgTip(); + this.initStrongUI(); + } + + private function getHeroImgTip() : void + { + this.heroTip.destroyTip(); + ConnectService.getInstance().heroService.getHeroPicView(this.currHero.heroId); + } + + private function loadHeroHead() : void + { + var _loc1_:String = "pic/head/" + this.currHero.picPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.headImg.x = 4; + this.headImg.y = 4; + this.loader.clear(); + this.imgSp.addChild(this.headImg); + } + + private function strongHero(param1:MouseEvent) : void + { + var _loc2_:int = this.inputMc.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("请输入强化次数"); + return; + } + if(this.preBtn == null) + { + MessageBoxUI.getInstance().addMessage("请选择强化类型"); + return; + } + if(this.preBtn == this.btn_1) + { + this.strongerLevel = 1; + } + else if(this.preBtn == this.btn_2) + { + this.strongerLevel = 2; + } + else if(this.preBtn == this.btn_3) + { + this.strongerLevel = 3; + } + else if(this.preBtn == this.btn_4) + { + this.strongerLevel = 4; + } + else if(this.preBtn == this.btn_5) + { + this.strongerLevel = 5; + } + else + { + if(this.preBtn != this.btn_6) + { + MessageBoxUI.getInstance().addMessage("请选择强化类型"); + return; + } + this.strongerLevel = 6; + } + if(this.strongerLevel < 5) + { + if(_loc2_ > this.strongItemList[this.strongerLevel - 1].num) + { + MessageBoxUI.getInstance().addMessage("强化符数量不足"); + return; + } + ConnectService.getInstance().heroService.strongHero(this.currHero.heroId,this.strongerLevel,this.inputMc.getTextNum()); + } + else + { + if(this.currHero.upCount < 300) + { + if(this.superItemNums < _loc2_) + { + MessageBoxUI.getInstance().addMessage("超级强化符数量不够"); + return; + } + } + else if(this.superItemNums1 < _loc2_) + { + MessageBoxUI.getInstance().addMessage("终极强化符数量不够"); + return; + } + ConnectService.getInstance().heroService.superStrongHero(this.currHero.heroId,_loc2_); + } + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(HeroEvent.HERO_STRONG_VIEW,this.getStringView); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_STRONG_HERO,this.getStrongHeroResult); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_SUPERSTRONG_HERO,this.superStrongResult); + this.refresh(); + } + + private function refresh() : void + { + ConnectService.getInstance().heroService.getHeroStrongerView(); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_STRONG_VIEW,this.getStringView); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_STRONG_HERO,this.getStrongHeroResult); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_SUPERSTRONG_HERO,this.superStrongResult); + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + } + + private function getStringView(param1:HeroEvent) : void + { + this.strongItemList = param1.strongObj.itemList; + if(this.maxHeroUpCount == 0) + { + this.maxHeroUpCount = param1.strongObj.maxUpCount; + if(this.currHero.upCount > 150) + { + this.upMaxText.text = this.maxHeroUpCount + ""; + } + } + this.superItemNums = param1.strongObj.superItemNums; + this.superItemNums1 = param1.strongObj.superItemNums1; + this.currNums1.text = "当前拥有:" + this.strongItemList[0].num; + this.currNums2.text = "当前拥有:" + this.strongItemList[1].num; + this.currNums3.text = "当前拥有:" + this.strongItemList[2].num; + this.currNums4.text = "当前拥有:" + this.strongItemList[3].num; + this.currNums5.text = "当前拥有:" + this.superItemNums; + this.currNums6.text = "当前拥有:" + this.superItemNums1; + this.initStrongUI(); + } + + private function initStrongUI() : void + { + this.btn_1.setUnEnable(); + this.btn_2.setUnEnable(); + this.btn_3.setUnEnable(); + this.btn_4.setUnEnable(); + this.btn_5.setUnEnable(); + this.btn_6.setUnEnable(); + if(this.currHero.upCount >= 150) + { + this.inputMc.setMaxNum(10000); + if(this.inputMc.getTextNum() > 1000) + { + this.inputMc.setTextNum(1); + } + if(this.preBtn) + { + this.preBtn.setUnSelect(); + this.preBtn = null; + } + if(this.currHero.upCount >= 300) + { + this.preBtn = this.btn_6; + this.strongerLevel == 6; + this.preBtn.setSelect(); + this.btn_6.setEnable(); + } + else + { + this.preBtn = this.btn_5; + this.strongerLevel == 5; + this.preBtn.setSelect(); + this.btn_5.setEnable(); + } + } + else + { + this.inputMc.setMaxNum(1000); + if(this.inputMc.getTextNum() > 50) + { + this.inputMc.setTextNum(1); + } + if(this.preBtn == this.btn_5 || this.preBtn == this.btn_6) + { + this.preBtn.setUnSelect(); + this.preBtn = null; + } + if(this.preBtn == null) + { + this.preBtn = this.btn_1; + this.preBtn.setSelect(); + } + this.btn_1.setEnable(); + this.btn_2.setEnable(); + this.btn_3.setEnable(); + this.btn_4.setEnable(); + } + } + + private function clickRadioBtn(param1:MouseEvent) : void + { + if(this.preBtn) + { + this.preBtn.setUnSelect(); + } + var _loc2_:UIRadioBtn = param1.currentTarget as UIRadioBtn; + _loc2_.setSelect(); + this.preBtn = _loc2_; + } + + private function getHeroImgTipView(param1:HeroEvent) : void + { + this.heroObj = param1.heroObj; + this.heroTip.setTipData(param1.heroObj); + if(this.currHero.upCount > 150) + { + this.upMaxText.text = this.maxHeroUpCount + ""; + } + else + { + this.upMaxText.text = this.heroObj.upCountLimit; + } + } + + private function getStrongHeroResult(param1:HeroEvent) : void + { + ConnectService.getInstance().heroService.getHeroStrongerView(); + } + + private function superStrongResult(param1:HeroEvent) : void + { + ConnectService.getInstance().heroService.getHeroStrongerView(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/MibaoPage.as b/flash_decompiled/com/view/ui/hero/MibaoPage.as new file mode 100644 index 0000000..d1ec59c --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/MibaoPage.as @@ -0,0 +1,338 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIButton; + import com.view.newui.UITitleBg; + import com.view.ui.hero.mc.MiBaoItem; + import com.view.ui.hero.mc.MibaoUpPage; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MibaoPage extends Sprite + { + + private var explainText:TextField; + + private var type:int; + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var face:InstallFace; + + private var mcArr:Array; + + private var studyBtn:UIButton; + + private var mibaoShuoming:TextField; + + private var mibaoTitle:UITitleBg; + + private var studyBg:MibaoUpPage; + + public var changeMiBaoF:Function; + + private var obj:Object; + + private var _clickItemFun:Function; + + private var preMibaoItem:MiBaoItem; + + public function MibaoPage(param1:int) + { + var _loc4_:Sprite = null; + var _loc5_:MiBaoItem = null; + this.face = InstallFace.getInstance(); + super(); + this.bg1 = new Sprite(); + addChild(this.bg1); + this.bg2 = new Sprite(); + addChild(this.bg2); + this.type = param1; + this.mcArr = new Array(); + var _loc2_:int = 0; + while(_loc2_ < 8) + { + _loc5_ = new MiBaoItem(_loc2_ + 1,this.type); + this.bg1.addChild(_loc5_); + _loc5_.x = 20 + int(_loc2_ % 4) * 85; + _loc5_.y = 20 + int(_loc2_ / 4) * 85; + this.mcArr.push(_loc5_); + _loc5_.addEventListener(MouseEvent.CLICK,this.clickMiBao); + _loc2_++; + } + this.mibaoTitle = new UITitleBg("密保类型",350); + this.bg1.addChild(this.mibaoTitle); + this.mibaoTitle.x = int(this.bg1.width / 2 - this.mibaoTitle.width / 2); + this.mibaoTitle.y = 185; + var _loc3_:TextFormat = new TextFormat(); + _loc3_.leading = 3; + this.mibaoShuoming = PublicMethod.getTextFieldWithFillter(10852210,340); + this.mibaoShuoming.height = 80; + this.mibaoShuoming.wordWrap = true; + this.mibaoShuoming.multiline = true; + this.bg1.addChild(this.mibaoShuoming); + this.mibaoShuoming.x = 10; + this.mibaoShuoming.y = this.mibaoTitle.y + 30; + this.mibaoShuoming.defaultTextFormat = _loc3_; + this.studyBtn = new UIButton("学 习",2); + this.bg1.addChild(this.studyBtn); + this.studyBtn.x = 290; + this.studyBtn.y = 280; + this.studyBtn.onClick = this.studyMibao; + _loc4_ = PublicMethod.getTrLine(340); + this.bg1.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 310; + this.explainText = PublicMethod.getTextField(65280,370); + this.bg1.addChild(this.explainText); + this.explainText.x = 10; + this.explainText.y = 317; + this.mcArr[0].dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + this.isMain(); + } + + private function createPage2() : void + { + if(this.studyBg) + { + return; + } + this.studyBg = new MibaoUpPage(this.type); + this.studyBg.changeMiBaoF = this.changeMiBaoF; + this.bg2.addChild(this.studyBg); + } + + private function isMain() : void + { + if(this.type == 2) + { + this.explainText.text = "主秘宝、副秘宝不能相同"; + } + if(this.type == 3) + { + this.explainText.text = "秘宝神鉴与主秘宝、副秘宝不能相同"; + } + if(this.type == 4) + { + this.explainText.text = "秘宝魔鉴与主秘宝、副秘宝、秘宝神鉴不能相同"; + } + } + + public function setMiBaoObj(param1:Object) : void + { + var _loc2_:MiBaoItem = null; + this.obj = param1; + if(this.type == 1) + { + if(this.obj.mb1 > 0) + { + if(Boolean(this.bg1) && contains(this.bg1)) + { + removeChild(this.bg1); + } + if(this.studyBg == null) + { + this.createPage2(); + } + if(!this.bg2.contains(this.studyBg)) + { + this.bg2.addChild(this.studyBg); + } + this.studyBg.setObj(this.obj); + } + else + { + if(!contains(this.bg1)) + { + addChild(this.bg1); + } + if(Boolean(this.studyBg) && this.bg2.contains(this.studyBg)) + { + this.bg2.removeChild(this.studyBg); + } + } + } + else if(this.type == 2) + { + if(this.obj.mb2 > 0) + { + if(Boolean(this.bg1) && contains(this.bg1)) + { + removeChild(this.bg1); + } + if(this.studyBg == null) + { + this.createPage2(); + } + if(!this.bg2.contains(this.studyBg)) + { + this.bg2.addChild(this.studyBg); + } + this.studyBg.setObj(this.obj); + } + else + { + if(!contains(this.bg1)) + { + addChild(this.bg1); + } + if(Boolean(this.studyBg) && this.bg2.contains(this.studyBg)) + { + this.bg2.removeChild(this.studyBg); + } + for each(_loc2_ in this.mcArr) + { + if(_loc2_.type == this.obj.mb1) + { + _loc2_.setHasDo(true); + } + else + { + _loc2_.setHasDo(false); + } + } + } + } + else if(this.type == 3) + { + if(this.obj.mb3 > 0) + { + if(Boolean(this.bg1) && contains(this.bg1)) + { + removeChild(this.bg1); + } + if(this.studyBg == null) + { + this.createPage2(); + } + if(!this.bg2.contains(this.studyBg)) + { + this.bg2.addChild(this.studyBg); + } + this.studyBg.setObj(this.obj); + } + else + { + if(!contains(this.bg1)) + { + addChild(this.bg1); + } + if(Boolean(this.studyBg) && this.bg2.contains(this.studyBg)) + { + this.bg2.removeChild(this.studyBg); + } + for each(_loc2_ in this.mcArr) + { + if(_loc2_.type == this.obj.mb1 || _loc2_.type == this.obj.mb2) + { + _loc2_.setHasDo(true); + } + else + { + _loc2_.setHasDo(false); + } + } + } + } + else if(this.type == 4) + { + if(this.obj.mb4 > 0) + { + if(Boolean(this.bg1) && contains(this.bg1)) + { + removeChild(this.bg1); + } + if(this.studyBg == null) + { + this.createPage2(); + } + if(!this.bg2.contains(this.studyBg)) + { + this.bg2.addChild(this.studyBg); + } + this.studyBg.setObj(this.obj); + } + else + { + if(!contains(this.bg1)) + { + addChild(this.bg1); + } + if(Boolean(this.studyBg) && this.bg2.contains(this.studyBg)) + { + this.bg2.removeChild(this.studyBg); + } + for each(_loc2_ in this.mcArr) + { + if(_loc2_.type == this.obj.mb1 || _loc2_.type == this.obj.mb2 || _loc2_.type == this.obj.mb3) + { + _loc2_.setHasDo(true); + } + else + { + _loc2_.setHasDo(false); + } + } + } + } + } + + private function clickMiBao(param1:MouseEvent) : void + { + if(this.preMibaoItem) + { + this.preMibaoItem.setSelect(false); + } + var _loc2_:MiBaoItem = param1.currentTarget as MiBaoItem; + this.preMibaoItem = _loc2_; + this.preMibaoItem.setSelect(true); + this.mibaoShuoming.htmlText = _loc2_.getTip(); + this.mibaoTitle.setTitleName(_loc2_.getMibaoName()); + if(_loc2_.hasStudy) + { + this.studyBtn.setUnEnable(); + this.studyBtn.setText("已学习"); + } + else + { + this.studyBtn.setEnable(); + this.studyBtn.setText("学 习"); + } + } + + private function studyMibao(param1:MouseEvent) : void + { + if(this.preMibaoItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要激活的密保!"); + return; + } + if(this.preMibaoItem.hasStudy) + { + MessageBoxUI.getInstance().addMessage("该秘宝已被激活"); + return; + } + if(Boolean(this._clickItemFun)) + { + this._clickItemFun(this.preMibaoItem.type,this.preMibaoItem.pageType); + } + } + + public function get clickItemFun() : Function + { + return this._clickItemFun; + } + + public function set clickItemFun(param1:Function) : void + { + this._clickItemFun = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/MyHeroUI.as b/flash_decompiled/com/view/ui/hero/MyHeroUI.as new file mode 100644 index 0000000..102619c --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/MyHeroUI.as @@ -0,0 +1,157 @@ +package com.view.ui.hero +{ + import com.view.newui.UIBase; + import com.view.newui.UITabBtn; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.user.JiangHunPage; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class MyHeroUI extends BaseUI + { + + private var btnArr:Array; + + private var tableMc:UITable; + + private var curPage:Sprite; + + private var page1:HeroPage; + + private var page2:JiangHunPage; + + public function MyHeroUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_wujiang); + super.setPosition(); + this.createUI(); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 100; + window_heihgt = UIWindowBg.normal_window_h + 30; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 100; + ui_closeBtn.y = 10; + } + + override public function createUI() : void + { + var _loc3_:int = 0; + var _loc4_:UITabBtn = null; + this.btnArr = new Array(); + var _loc1_:UITabBtn = new UITabBtn("武 将",2); + var _loc2_:UITabBtn = new UITabBtn("将 魂",2); + this.btnArr.push(_loc1_); + for each(_loc4_ in this.btnArr) + { + addChild(_loc4_); + _loc4_.x = 25 + _loc3_ * 66; + _loc4_.y = 40; + _loc4_.onClick = this.clickPage; + _loc3_++; + } + this.btnArr[0].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function clickPage(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + this.openPage(_loc2_); + } + + private function openPage(param1:UITabBtn) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + for(_loc3_ in this.btnArr) + { + if(param1 == this.btnArr[_loc3_]) + { + this.btnArr[_loc3_].select = true; + _loc2_ = _loc3_; + } + else + { + this.btnArr[_loc3_].select = false; + } + } + if(Boolean(this.curPage) && contains(this.curPage)) + { + removeChild(this.curPage); + } + switch(_loc2_) + { + case 0: + this.curPage = this.getPage1(); + break; + case 1: + this.curPage = this.getPage2(); + } + addChild(this.curPage); + this.curPage.x = 11; + this.curPage.y = 65; + } + + private function getPage1() : UIBase + { + if(this.page1 == null) + { + this.page1 = new HeroPage(); + } + return this.page1; + } + + private function getPage2() : UIBase + { + if(this.page2 == null) + { + this.page2 = new JiangHunPage(); + } + return this.page2; + } + + public function giveHeroExp(param1:int) : void + { + this.openPage(this.btnArr[0]); + this.page1.giveHeroExp(param1); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(Boolean(this.page1) && this.page1 == this.curPage) + { + this.page1.getALlHeroList(); + } + if(Boolean(this.page2) && this.page2 == this.curPage) + { + this.page2.getDate(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(Boolean(this.page1) && this.page1 == this.curPage) + { + this.page1.clear(); + } + if(Boolean(this.page2) && this.page2 == this.curPage) + { + this.page2.clearPage(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/SKillControlBar.as b/flash_decompiled/com/view/ui/hero/SKillControlBar.as new file mode 100644 index 0000000..7d7f926 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/SKillControlBar.as @@ -0,0 +1,302 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.view.ui.hero.data.HeroSkill; + import com.view.ui.hero.data.HeroSkillData; + import com.view.ui.message.MessageBoxUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class SKillControlBar extends Sprite + { + + public static var instance:SKillControlBar; + + private var equipBtn:MovieClip; + + private var unEquipBtn:MovieClip; + + private var forgetBtn:MovieClip; + + private var upBtn:MovieClip; + + private var oupBtn:MovieClip; + + private var studyBtn:MovieClip; + + private var heroSkillUI:HeroSkillUI; + + private var face:InstallFace; + + private var btnArr:Array; + + public var heroSkill:HeroSkill; + + public var nextSkillId:int; + + public var status:int; + + private var newArr:Array; + + public function SKillControlBar() + { + var _loc1_:MovieClip = null; + this.heroSkillUI = HeroSkillUI.getInstance(); + this.face = InstallFace.getInstance(); + this.newArr = new Array(); + super(); + this.equipBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.unEquipBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.forgetBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.upBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.oupBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.studyBtn = this.face.getMovieClip(ClassConfig.lib_skillcontrol); + this.equipBtn.btnName.text = "装备技能"; + this.unEquipBtn.btnName.text = "卸下技能"; + this.forgetBtn.btnName.text = "遗忘技能"; + this.upBtn.btnName.text = "升级技能"; + this.oupBtn.btnName.text = "一键满级"; + this.studyBtn.btnName.text = "学习技能"; + this.btnArr = new Array(); + this.btnArr.push(this.equipBtn); + this.btnArr.push(this.unEquipBtn); + this.btnArr.push(this.forgetBtn); + this.btnArr.push(this.upBtn); + this.btnArr.push(this.oupBtn); + this.btnArr.push(this.studyBtn); + for each(_loc1_ in this.btnArr) + { + _loc1_.addEventListener(MouseEvent.CLICK,this.clickBtn); + _loc1_.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + _loc1_.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + _loc1_.bg1.visible = false; + } + } + + public static function getInstance() : SKillControlBar + { + if(instance == null) + { + instance = new SKillControlBar(); + } + return instance; + } + + private function clickBtn(param1:MouseEvent) : void + { + var _loc3_:HeroSkill = null; + var _loc4_:HeroSkill = null; + var _loc5_:HeroSkill = null; + var _loc6_:String = null; + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + this.unShow(); + if(_loc2_ == this.studyBtn) + { + if(this.heroSkill.needtype == 70101) + { + if(!HeroSkillData.checkBook(this.heroSkill.neednum)) + { + MessageBoxUI.getInstance().addMessage("技能书不够,不能学习技能"); + return; + } + } + else if(this.heroSkill.needtype == 70102) + { + if(!HeroSkillData.checkUserSkillPoint(this.heroSkill.neednum)) + { + MessageBoxUI.getInstance().addMessage("技能点不够,不能学习技能"); + return; + } + } + _loc3_ = HeroSkillData.getNextSkill(this.heroSkill); + if(_loc3_ == null) + { + MessageBoxUI.getInstance().addMessage("已升级到最高等级"); + return; + } + ConnectService.getInstance().heroService.studySkill(this.heroSkillUI.currHero.heroId,this.heroSkill.skillid,_loc3_.skillid); + } + if(_loc2_ == this.upBtn) + { + _loc4_ = HeroSkillData.checkHasStudySkill(this.heroSkill); + if(_loc4_ == null) + { + MessageBoxUI.getInstance().addMessage("尚未学会该技能"); + return; + } + if(!HeroSkillData.checkUserSkillPoint(_loc4_.neednum)) + { + MessageBoxUI.getInstance().addMessage("技能点不够"); + return; + } + _loc3_ = HeroSkillData.getNextSkill(_loc4_); + if(_loc3_ == null) + { + MessageBoxUI.getInstance().addMessage("已升级到最高等级"); + return; + } + if(this.heroSkillUI.currHero.level < _loc4_.minherolv) + { + MessageBoxUI.getInstance().addMessage("武将等级未达到" + _loc4_.minherolv + "级"); + return; + } + ConnectService.getInstance().heroService.upSkill(this.heroSkillUI.currHero.heroId,_loc4_.skillid,_loc3_.skillid); + } + if(_loc2_ == this.oupBtn) + { + _loc4_ = HeroSkillData.checkHasStudySkill(this.heroSkill); + if(_loc4_ == null) + { + MessageBoxUI.getInstance().addMessage("尚未学会该技能"); + return; + } + if(!HeroSkillData.checkUserSkillPoint(_loc4_.neednum)) + { + MessageBoxUI.getInstance().addMessage("技能点不够"); + return; + } + _loc3_ = HeroSkillData.getNextSkill(_loc4_); + if(_loc3_ == null) + { + MessageBoxUI.getInstance().addMessage("已升级到最高等级"); + return; + } + if(this.heroSkillUI.currHero.level < _loc4_.minherolv) + { + MessageBoxUI.getInstance().addMessage("武将等级未达到" + _loc4_.minherolv + "级"); + return; + } + ConnectService.getInstance().heroService.upSkillOneKey(this.heroSkillUI.currHero.heroId,_loc4_.skillid,_loc3_.skillid); + } + if(_loc2_ == this.forgetBtn) + { + _loc5_ = HeroSkillData.checkHasStudySkill(this.heroSkill); + if(_loc5_ == null) + { + MessageBoxUI.getInstance().addMessage("你还没有学会该技能"); + return; + } + _loc6_ = "你确定要遗忘此技能么?
遗忘后技能将被重置为0级,返还90%的技能点。"; + MessageBoxUI.getInstance().confirmMsg(_loc6_,this.forgetSkill,_loc5_); + } + if(_loc2_ == this.equipBtn) + { + _loc5_ = HeroSkillData.checkHasStudySkill(this.heroSkill); + if(_loc5_ == null) + { + MessageBoxUI.getInstance().addMessage("你还没有学会该技能"); + return; + } + if(HeroSkillData.checkSkillIsEquip(_loc5_)) + { + MessageBoxUI.getInstance().addMessage("同系技能只能装备一个"); + return; + } + ConnectService.getInstance().heroService.equipSkill(this.heroSkillUI.currHero.heroId,_loc5_.skillid); + } + if(_loc2_ == this.unEquipBtn) + { + _loc5_ = HeroSkillData.checkHasStudySkill(this.heroSkill); + if(_loc5_ == null) + { + MessageBoxUI.getInstance().addMessage("你还没有学会该技能"); + return; + } + ConnectService.getInstance().heroService.unEquipSkill(this.heroSkillUI.currHero.heroId,_loc5_.skillid); + } + } + + private function forgetSkill(param1:HeroSkill) : void + { + ConnectService.getInstance().heroService.delSkill(this.heroSkillUI.currHero.heroId,param1.skillid); + } + + private function mouseOut(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + _loc2_.bg1.visible = false; + } + + private function mouseOver(param1:MouseEvent) : void + { + var _loc2_:MovieClip = param1.currentTarget as MovieClip; + _loc2_.bg1.visible = true; + } + + public function show(param1:Sprite) : void + { + if(param1) + { + param1.addChild(this); + this.x = param1.mouseX; + this.y = param1.mouseY; + this.showAll(); + } + } + + public function unShow() : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function showAll() : void + { + var _loc1_:MovieClip = null; + var _loc2_:int = 0; + for each(_loc1_ in this.newArr) + { + if(contains(_loc1_)) + { + removeChild(_loc1_); + } + } + this.newArr.splice(0,this.newArr.length); + switch(this.status) + { + case 0: + if(HeroSkillData.checkSkillIsEquip(this.heroSkill) == false) + { + this.newArr.push(this.equipBtn); + } + this.newArr.push(this.forgetBtn); + break; + case 1: + this.newArr.push(this.upBtn); + this.newArr.push(this.oupBtn); + if(HeroSkillData.checkSkillIsEquip(this.heroSkill) == false) + { + this.newArr.push(this.equipBtn); + } + this.newArr.push(this.forgetBtn); + break; + case 2: + if(HeroSkillData.checkSkillIsEquip(this.heroSkill) == false) + { + this.newArr.push(this.equipBtn); + } + this.newArr.push(this.forgetBtn); + break; + case 3: + this.newArr.push(this.studyBtn); + break; + case 4: + break; + case 5: + this.newArr.push(this.unEquipBtn); + } + for each(_loc1_ in this.newArr) + { + addChild(_loc1_); + _loc1_.y = _loc2_ * 20; + _loc2_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/SKillLineMc.as b/flash_decompiled/com/view/ui/hero/SKillLineMc.as new file mode 100644 index 0000000..0aa93a5 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/SKillLineMc.as @@ -0,0 +1,99 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.view.ui.hero.data.HeroSkill; + import com.view.ui.hero.data.HeroSkillData; + import flash.display.Bitmap; + import flash.display.Sprite; + + public class SKillLineMc extends Sprite + { + + private var skillMc1:SkillStudyMc; + + private var skillMc2:SkillStudyMc; + + private var skillMc3:SkillStudyMc; + + private var skillMc4:SkillStudyMc; + + private var recdit1:Bitmap; + + private var recdit2:Bitmap; + + private var recdit3:Bitmap; + + private var face:InstallFace = InstallFace.getInstance(); + + private var skill1:HeroSkill; + + private var skill2:HeroSkill; + + private var skill3:HeroSkill; + + private var skill4:HeroSkill; + + public function SKillLineMc(param1:HeroSkill) + { + super(); + this.skill1 = param1; + this.skillMc1 = new SkillStudyMc(this.skill1); + addChild(this.skillMc1); + if(param1.skillattribute == 5) + { + return; + } + this.recdit1 = new Bitmap(this.face.getPng(ClassConfig.IMG_DIRECT)); + addChild(this.recdit1); + this.recdit1.x = this.skillMc1.x + this.skillMc1.width + 4; + this.recdit1.y = 7; + this.skill2 = HeroSkillData.getNextSkill_0(this.skill1); + this.skill3 = HeroSkillData.getNextSkill_0(this.skill2); + this.skill4 = HeroSkillData.getNextSkill_0(this.skill3); + this.skillMc2 = new SkillStudyMc(this.skill2); + this.skillMc2.x = this.recdit1.x + this.recdit1.width + 5; + this.recdit2 = new Bitmap(this.face.getPng(ClassConfig.IMG_DIRECT)); + addChild(this.recdit2); + this.recdit2.x = this.skillMc2.x + this.skillMc2.width + 4; + this.recdit2.y = this.recdit1.y; + this.skillMc3 = new SkillStudyMc(this.skill3); + this.skillMc3.x = this.recdit2.x + this.recdit2.width + 5; + this.recdit3 = new Bitmap(this.face.getPng(ClassConfig.IMG_DIRECT)); + addChild(this.recdit3); + this.recdit3.x = this.skillMc3.x + this.skillMc3.width + 4; + this.recdit3.y = this.recdit1.y; + this.skillMc4 = new SkillStudyMc(this.skill4); + this.skillMc4.x = this.recdit3.x + this.recdit3.width + 5; + addChild(this.skillMc2); + addChild(this.skillMc3); + addChild(this.skillMc4); + } + + public function clear() : void + { + this.skillMc1.clear(); + this.skillMc1 = null; + this.skill1 = null; + if(this.skillMc2) + { + this.skillMc2.clear(); + this.skillMc3.clear(); + this.skillMc4.clear(); + this.skillMc2 = null; + this.skillMc3 = null; + this.skillMc4 = null; + this.skill2 = null; + this.skill3 = null; + this.skill4 = null; + } + if(this.recdit1) + { + this.recdit1 = null; + this.recdit2 = null; + this.recdit3 = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/SelectYubo.as b/flash_decompiled/com/view/ui/hero/SelectYubo.as new file mode 100644 index 0000000..d052ca2 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/SelectYubo.as @@ -0,0 +1,288 @@ +package com.view.ui.hero +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_2; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.mc.YuBoItem; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SelectYubo extends UIWindowBg + { + + private var tft:TextFormat; + + private var tableMc:UITable; + + private var okBtn:Button_2; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var typeCombox:ComboBox; + + private var levelCombox:ComboBox; + + private var addGemObj:Object; + + private var selectItem:Object; + + private var preGemMc:YuBoItem; + + public function SelectYubo() + { + var _loc6_:UIButton = null; + var _loc8_:YuBoItem = null; + super(); + initSize(100,270); + loadTitle(UITitleConfig.title_xuanzhebaoshi); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.text = "宝石类型:"; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "宝石等级:"; + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.typeCombox = new ComboBox(); + this.typeCombox.width = 80; + bg1.addChild(this.typeCombox); + this.typeCombox.x = _loc1_.x + 64; + this.typeCombox.y = _loc1_.y - 2; + this.typeCombox.addEventListener(Event.CHANGE,this.changeType,false,0,true); + this.typeCombox.addItem({ + "label":"全部类型", + "data":0 + }); + this.typeCombox.addItem({ + "label":"攻击玉帛", + "data":531 + }); + this.typeCombox.addItem({ + "label":"防御玉帛", + "data":532 + }); + this.typeCombox.addItem({ + "label":"敏捷玉帛", + "data":533 + }); + this.typeCombox.addItem({ + "label":"体力玉帛", + "data":534 + }); + this.typeCombox.addItem({ + "label":"统率玉帛", + "data":535 + }); + this.typeCombox.textField.setStyle("textFormat",this.tft); + this.typeCombox.dropdown.setRendererStyle("textFormat",this.tft); + bg1.addChild(_loc2_); + _loc2_.x = this.typeCombox.x + 93; + _loc2_.y = _loc1_.y; + this.levelCombox = new ComboBox(); + this.levelCombox.addItem({ + "label":"全部", + "data":0 + }); + var _loc3_:int = 1; + while(_loc3_ < 10) + { + this.levelCombox.addItem({ + "label":_loc3_ + "级", + "data":_loc3_ + }); + _loc3_++; + } + this.levelCombox.textField.setStyle("textFormat",this.tft); + this.levelCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.levelCombox.addEventListener(Event.CHANGE,this.changeLevel,false,0,true); + this.levelCombox.width = 60; + bg1.addChild(this.levelCombox); + this.levelCombox.x = _loc2_.x + 64; + this.levelCombox.y = this.typeCombox.y; + var _loc4_:Array = ["宝石名称","宝石数量"]; + var _loc5_:Array = [155,130]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 25; + this.tableMc.drawLine = false; + this.tableMc.install(8,_loc4_,_loc5_); + bg1.addChild(this.tableMc); + this.tableMc.x = 10; + this.tableMc.y = 34; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(280,208); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + _loc6_ = new UIButton("确 定",2,10); + bg1.addChild(_loc6_); + _loc6_.x = 120; + _loc6_.y = 270; + _loc6_.onClick = this.submit; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + var _loc7_:int = 0; + while(_loc7_ < 8) + { + _loc8_ = new YuBoItem(); + this.packMc.addChild(_loc8_); + this.packList.push(_loc8_); + _loc8_.y = 25 * _loc7_; + _loc8_.x = 4; + _loc8_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc7_++; + } + this.packScrollPane.update(); + this.levelCombox.selectedItem = this.levelCombox.getItemAt(0); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + } + + private function changeLevel(param1:Event) : void + { + this.getGemList(); + } + + private function changeType(param1:Event) : void + { + this.getGemList(); + } + + private function addEvent(param1:Event) : void + { + this.getGemList(); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + } + + private function delEvent(param1:Event) : void + { + this.clearGemList(); + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.itemChange); + this.addGemObj = null; + } + + private function itemChange(param1:DevEvent) : void + { + this.getGemList(); + } + + private function clearGemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 8) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObject(null); + this.packList[_loc1_].setSelect(false); + } + _loc1_--; + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + this.selectItem = null; + } + + private function getGemList() : void + { + var _loc2_:* = undefined; + var _loc3_:YuBoItem = null; + var _loc1_:Vector. = PakState.getYuBoList(this.typeCombox.selectedItem.data,this.levelCombox.selectedItem.data); + this.clearGemList(); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 7) + { + _loc3_ = new YuBoItem(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 24 * _loc2_; + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + this.packList[_loc2_].setItemObject(_loc1_[_loc2_]); + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + if(this.preGemMc) + { + this.preGemMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + private function submit(param1:MouseEvent) : void + { + if(this.selectItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择宝石"); + } + else + { + ConnectService.getInstance().heroService.addGem(this.addGemObj.treasuryId,this.selectItem.itemId,this.addGemObj.holeNo,this.addGemObj.heroId); + closeSelf(null); + } + } + + public function setObj(param1:Object) : void + { + this.addGemObj = param1; + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:YuBoItem = null; + this.preGemMc = param1.currentTarget as YuBoItem; + if(this.preGemMc.getItemObj() != null) + { + for each(_loc2_ in this.packList) + { + if(_loc2_ == this.preGemMc) + { + this.selectItem = this.preGemMc.getItemObj(); + _loc2_.setSelect(true); + } + else + { + _loc2_.setSelect(false); + } + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/SkillListMc.as b/flash_decompiled/com/view/ui/hero/SkillListMc.as new file mode 100644 index 0000000..a6f042e --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/SkillListMc.as @@ -0,0 +1,108 @@ +package com.view.ui.hero +{ + import com.utils.GC; + import com.view.ui.hero.data.HeroSkill; + import com.view.ui.hero.data.HeroSkillData; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class SkillListMc extends Sprite + { + + private var _skillattribute:int; + + private var sKillVecMc:Vector. = new Vector.(); + + private var sKillLineVecMc:Vector. = new Vector.(); + + private var heroSkillUI:HeroSkillUI; + + public function SkillListMc() + { + super(); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + } + + public function get skillattribute() : int + { + return this._skillattribute; + } + + public function set skillattribute(param1:int) : void + { + this._skillattribute = param1; + } + + private function clearList() : void + { + var _loc1_:SKillLineMc = null; + var _loc2_:SkillStudyMc = null; + if(this.sKillLineVecMc.length > 0) + { + for each(_loc1_ in this.sKillLineVecMc) + { + _loc1_.clear(); + removeChild(_loc1_); + } + this.sKillLineVecMc.splice(0,this.sKillLineVecMc.length); + } + if(this.sKillVecMc.length > 0) + { + for each(_loc2_ in this.sKillVecMc) + { + _loc2_.clear(); + removeChild(_loc2_); + } + this.sKillVecMc.splice(0,this.sKillVecMc.length); + } + GC.clear(); + } + + public function init() : void + { + var _loc2_:int = 0; + var _loc4_:HeroSkill = null; + var _loc5_:SKillLineMc = null; + if(this.heroSkillUI == null) + { + this.heroSkillUI = HeroSkillUI.getInstance(); + } + this.clearList(); + var _loc1_:Vector. = HeroSkillData.getSkillLine(this._skillattribute); + var _loc3_:int = this.heroSkillUI.currHero.careerId; + if(Boolean(_loc1_) && _loc1_.length > 0) + { + for each(_loc4_ in _loc1_) + { + if(_loc4_.skillcareer.indexOf(HeroConst.careerId(_loc3_)) < 0) + { + continue; + } + _loc5_ = new SKillLineMc(_loc4_); + this.sKillLineVecMc.push(_loc5_); + addChild(_loc5_); + if(this._skillattribute == 5) + { + _loc5_.x = 79 * (_loc2_ % 4); + _loc5_.y = 50 * int(_loc2_ / 4); + } + else + { + _loc5_.y = 52 * _loc2_; + } + _loc2_++; + } + } + } + + private function mouseOut(param1:MouseEvent) : void + { + var _loc2_:SKillControlBar = SKillControlBar.instance; + if(_loc2_) + { + _loc2_.unShow(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/SkillStudyMc.as b/flash_decompiled/com/view/ui/hero/SkillStudyMc.as new file mode 100644 index 0000000..ba2af1e --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/SkillStudyMc.as @@ -0,0 +1,273 @@ +package com.view.ui.hero +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.ui.hero.data.HeroSkill; + import com.view.ui.hero.data.HeroSkillData; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class SkillStudyMc extends Sprite + { + + private var bg:Sprite; + + private var face:InstallFace = InstallFace.getInstance(); + + private var levelText:TextField; + + private var skillLevel_0:HeroSkill; + + private var heroSkillUI:HeroSkillUI = HeroSkillUI.getInstance(); + + private var tipTitle:String; + + private var tipCon:String; + + private var currStatus:int; + + private var loader:LoadResource; + + private var imgSp:Sprite; + + private var headImg:Bitmap; + + private var lockImg:Bitmap; + + public function SkillStudyMc(param1:HeroSkill) + { + super(); + this.skillLevel_0 = param1; + this.bg = PublicMethod.createRectangle(7960953,0,40,40); + addChild(this.bg); + this.imgSp = new Sprite(); + addChild(this.imgSp); + this.levelText = PublicMethod.getTextFieldWithFillter(16777215,34); + addChild(this.levelText); + this.levelText.x = 6; + this.levelText.y = 24; + this.levelText.defaultTextFormat = PublicMethod.getRightTextFormat(); + this.loadPng(); + this.imgSp.addEventListener(MouseEvent.CLICK,this.clickSkill); + if(param1.skillattribute == 5) + { + this.checkSkill1(); + } + else + { + this.checkSkill(); + } + } + + private function checkSkill() : void + { + var _loc1_:int = this.heroSkillUI.currHero.level; + var _loc2_:HeroSkill = HeroSkillData.checkHasStudySkill(this.skillLevel_0); + if(_loc2_) + { + this.tipTitle = _loc2_.showname; + this.tipCon = _loc2_.skilldes2; + this.levelText.text = _loc2_.skilllevel + "/" + _loc2_.maxlevel; + if(_loc2_.maxlevel == _loc2_.skilllevel) + { + this.currStatus = 2; + } + else + { + if(HeroSkillData.checkUserSkillPoint(_loc2_.neednum)) + { + this.tipCon = this.tipCon + "" + _loc2_.needdes1 + "
"; + } + else + { + this.tipCon = this.tipCon + "" + _loc2_.needdes1 + "
"; + } + if(_loc1_ < _loc2_.minherolv) + { + this.tipCon = this.tipCon + "" + _loc2_.needdes2 + "
"; + this.currStatus = 0; + this.setLock(); + } + else + { + this.currStatus = 1; + this.tipCon = this.tipCon + "" + _loc2_.needdes2 + "
"; + } + } + this.tipCon += _loc2_.skilldes; + } + else + { + this.levelText.text = "0/" + this.skillLevel_0.maxlevel; + if(this.skillLevel_0.skillsystemtype == 1) + { + this.tipTitle = this.skillLevel_0.showname; + this.tipCon = this.skillLevel_0.skilldes2; + if(HeroSkillData.checkBook(this.skillLevel_0.neednum)) + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes1 + "
"; + } + else + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes1 + "
"; + } + if(_loc1_ < this.skillLevel_0.minherolv) + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes2 + "
"; + this.currStatus = 4; + this.setLock(); + } + else + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes2 + "
"; + this.currStatus = 3; + } + this.tipCon += this.skillLevel_0.skilldes; + } + else if(HeroSkillData.checkPreSkillMax(this.skillLevel_0) || this.skillLevel_0.skillattribute == 5) + { + this.tipCon = this.skillLevel_0.skilldes2; + if(HeroSkillData.checkUserSkillPoint(this.skillLevel_0.neednum)) + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes1 + "
"; + } + else + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes1 + "
"; + } + if(_loc1_ < this.skillLevel_0.minherolv) + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes2 + "
"; + this.currStatus = 4; + this.setLock(); + } + else + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes2 + "
"; + this.currStatus = 3; + } + this.tipTitle = this.skillLevel_0.showname; + this.tipCon += this.skillLevel_0.skilldes; + } + else + { + this.tipTitle = this.skillLevel_0.showname; + this.tipCon = this.skillLevel_0.needdes3; + this.setLock(); + this.currStatus = 4; + } + } + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip(this.tipCon,this.tipTitle),true,-1,false); + } + + private function checkSkill1() : void + { + var _loc1_:int = this.heroSkillUI.currHero.level; + var _loc2_:HeroSkill = HeroSkillData.checkHasStudySkill(this.skillLevel_0); + if(_loc2_) + { + this.tipTitle = _loc2_.showname; + this.tipCon = _loc2_.skilldes2; + this.levelText.text = _loc2_.skilllevel + "/" + _loc2_.maxlevel; + if(_loc2_.maxlevel == _loc2_.skilllevel) + { + this.currStatus = 2; + } + this.tipCon += this.skillLevel_0.skilldes; + } + else + { + this.levelText.text = "0/" + this.skillLevel_0.maxlevel; + if(this.skillLevel_0.needtype == 70101) + { + this.tipTitle = this.skillLevel_0.showname; + this.tipCon = this.skillLevel_0.skilldes2; + if(HeroSkillData.checkBook(this.skillLevel_0.neednum)) + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes1 + "
"; + } + else + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes1 + "
"; + } + if(_loc1_ < this.skillLevel_0.minherolv) + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes2 + "
"; + this.currStatus = 4; + this.setLock(); + } + else + { + this.tipCon = this.tipCon + "" + this.skillLevel_0.needdes2 + "
"; + this.currStatus = 3; + } + this.tipCon += this.skillLevel_0.skilldes; + } + } + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip(this.tipCon,this.tipTitle),true,-1,false); + } + + private function loadPng() : void + { + if(this.skillLevel_0 == null) + { + return; + } + var _loc1_:String = "pic/skill/" + this.skillLevel_0.imagepath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(this.skillLevel_0 == null) + { + this.loader.clear(); + return; + } + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + this.headImg.width = 41; + this.headImg.height = 41; + } + + private function clickSkill(param1:MouseEvent) : void + { + var _loc2_:Sprite = this.parent.parent as Sprite; + var _loc3_:SKillControlBar = SKillControlBar.getInstance(); + _loc3_.heroSkill = this.skillLevel_0; + _loc3_.status = this.currStatus; + _loc3_.show(_loc2_); + } + + public function clear() : void + { + this.skillLevel_0 = null; + this.imgSp.removeEventListener(MouseEvent.CLICK,this.clickSkill); + } + + private function setLock() : void + { + this.lockImg = new Bitmap(this.face.getPng(ClassConfig.IMG_LOCK)); + addChild(this.lockImg); + this.lockImg.x = 2; + this.lockImg.y = 2; + this.lockImg.width = 12; + this.lockImg.height = 16; + Utils.applyGray(this.imgSp); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/data/ChaoFuData.as b/flash_decompiled/com/view/ui/hero/data/ChaoFuData.as new file mode 100644 index 0000000..1d4ff32 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/data/ChaoFuData.as @@ -0,0 +1,241 @@ +package com.view.ui.hero.data +{ + import com.events.DevEvent; + import com.utils.Utils; + + public class ChaoFuData + { + + private static var packList:Array = new Array(); + + private static var equItemList:Array = new Array(); + + private static var allPackList:Array = new Array(); + + private static var itemNums1:int = 0; + + private static var itemNums2:int = 0; + + private static var chaofulist:Array = new Array(); + + private static var baoshilist:Array = new Array(); + + private static var xilian_firstpro:int = 0; + + private static var xilian_evepro:int = 0; + + private static var stronglv:int = 0; + + private static var xilianlv:int = 0; + + private static var xilianitems:int = 0; + + private static var Strongitems:int = 0; + + public function ChaoFuData() + { + super(); + } + + public static function getMaxXilianLv() : int + { + return xilianlv; + } + + public static function getXilianItems() : int + { + return xilianitems; + } + + public static function getStrongItems() : int + { + return Strongitems; + } + + public static function setPackList(param1:Array) : void + { + } + + public static function getPackList(param1:int, param2:int) : Array + { + var _loc5_:Object = null; + var _loc3_:Array = new Array(); + if(packList == null) + { + return _loc3_; + } + if(param1 == 0 && param2 == 0) + { + return packList; + } + var _loc4_:Array = new Array(); + if(param1 == 0) + { + _loc4_ = packList; + } + else + { + for each(_loc5_ in packList) + { + if(_loc5_.childType == param1) + { + _loc4_.push(_loc5_); + } + } + } + if(param2 == 0) + { + _loc3_ = _loc4_; + } + else + { + for each(_loc5_ in _loc4_) + { + if(_loc5_.color == param2) + { + _loc3_.push(_loc5_); + } + } + } + return _loc3_; + } + + public static function getItemListByItemId(param1:int) : Object + { + var _loc2_:Object = null; + if(param1 == 0) + { + return null; + } + for each(_loc2_ in equItemList) + { + if(_loc2_.id == param1) + { + return _loc2_; + } + } + return null; + } + + public static function getPackListByLevel(param1:int) : Array + { + var _loc3_:Object = null; + var _loc2_:Array = new Array(); + if(packList == null) + { + return _loc2_; + } + if(param1 == 0) + { + return packList; + } + for each(_loc3_ in packList) + { + if(_loc3_.color == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + + public static function setItemNums(param1:Object) : void + { + itemNums1 = param1.itemNums1; + itemNums2 = param1.itemNums2; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CHAOFU_ITEMNUMS)); + } + + public static function getItemNums1() : int + { + return itemNums1; + } + + public static function getItemNums2() : int + { + return itemNums2; + } + + public static function getAllItemList() : Array + { + return allPackList; + } + + public static function getObjByEntid(param1:int) : Object + { + var _loc2_:Object = null; + for each(_loc2_ in chaofulist) + { + if(_loc2_.id == param1) + { + return _loc2_; + } + } + return null; + } + + public static function setChaofuList(param1:Array) : void + { + chaofulist = param1; + } + + public static function setXiLianObj(param1:Object) : void + { + xilian_firstpro = int(param1.firstpro); + xilian_evepro = int(param1.evepro); + stronglv = int(param1.stronglv); + xilianlv = int(param1.xilianlv); + xilianitems = int(param1.xilianitems); + Strongitems = int(param1.Strongitems); + } + + public static function getXilianProperty(param1:int) : int + { + return xilian_firstpro + (param1 - 1) * xilian_evepro; + } + + public static function setBaoshiList(param1:Array) : void + { + baoshilist = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CHAOFU_BAOSHI)); + } + + public static function getBaoshiList(param1:int, param2:int) : Array + { + var _loc5_:Object = null; + var _loc3_:Array = new Array(); + if(baoshilist.length == 0) + { + return _loc3_; + } + var _loc4_:Array = new Array(); + for each(_loc5_ in baoshilist) + { + if(param1 > 0) + { + if(param1 == _loc5_.itemType) + { + _loc4_.push(_loc5_); + } + } + else + { + _loc4_.push(_loc5_); + } + } + for each(_loc5_ in _loc4_) + { + if(param2 == 0) + { + _loc3_.push(_loc5_); + } + else if(param2 == _loc5_.level) + { + _loc3_.push(_loc5_); + } + } + return _loc3_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/data/FightSkillData.as b/flash_decompiled/com/view/ui/hero/data/FightSkillData.as new file mode 100644 index 0000000..3721ee9 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/data/FightSkillData.as @@ -0,0 +1,79 @@ +package com.view.ui.hero.data +{ + public class FightSkillData + { + + private var _skillId:int; + + private var _skillName:String; + + private var _skillDesc:String; + + private var _skillLv:int; + + private var _iconPath:String; + + private var _parentId:int; + + private var _bookName:String; + + public var skillPoint:uint; + + public var cdRoundNum:uint; + + public var impact1Id:uint; + + public var impact2Id:uint; + + public function FightSkillData(param1:Object) + { + super(); + this._skillId = int(param1.skillId); + this._skillName = param1.skillName; + this._skillDesc = param1.skillDesc; + this._skillLv = int(param1.skillLv); + this._iconPath = param1.iconPath; + this._parentId = int(this._skillId.toString().substring(0,6)); + this.skillPoint = int(param1.skillPoint); + this.cdRoundNum = param1.cdRoundNum; + this.impact1Id = param1.impact1Id; + this.impact2Id = param1.impact2Id; + if(param1.bookName) + { + this._bookName = param1.bookName; + } + } + + public function get skillId() : int + { + return this._skillId; + } + + public function get skillName() : String + { + return this._skillName; + } + + public function get skillDesc() : String + { + var _loc1_:String = this._skillDesc.replace("{impact2Id}",this.impact2Id + ""); + return _loc1_.replace("{impact1Id}",this.impact1Id + ""); + } + + public function get skillLv() : int + { + return this._skillLv; + } + + public function get iconPath() : String + { + return this._iconPath; + } + + public function get bookName() : String + { + return this._bookName; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/data/HeroJiangHun.as b/flash_decompiled/com/view/ui/hero/data/HeroJiangHun.as new file mode 100644 index 0000000..24af5ec --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/data/HeroJiangHun.as @@ -0,0 +1,118 @@ +package com.view.ui.hero.data +{ + public class HeroJiangHun + { + + private var _id:int; + + private var _userId:int; + + private var _type:int; + + private var _level:int; + + private var _heroId:int; + + private var _name:String; + + private var _needItems:int; + + private var _needItems1:int; + + private var _heroName:String; + + private var _pro:int; + + private var _nextPro:int; + + private var _maxLevel:int; + + public function HeroJiangHun(param1:Object) + { + super(); + this._id = int(param1.id); + this._userId = param1.userId; + this._type = param1.type; + this._level = param1.level; + this._heroId = param1.heroId; + this._name = param1.name; + this._needItems = param1.needItems; + this._needItems1 = param1.needItems1; + this._heroName = param1.heroName; + this._pro = param1.pro; + this._nextPro = param1.nextPro; + this._maxLevel = param1.maxLevel; + } + + public function get type() : int + { + return this._type; + } + + public function get userId() : int + { + return this._userId; + } + + public function get id() : int + { + return this._id; + } + + public function get level() : int + { + return this._level; + } + + public function get heroId() : int + { + return this._heroId; + } + + public function get name() : String + { + return this._name; + } + + public function get needItems() : int + { + return this._needItems; + } + + public function get heroName() : String + { + return this._heroName; + } + + public function set heroName(param1:String) : void + { + this._heroName = param1; + } + + public function get pro() : int + { + return this._pro; + } + + public function get nextPro() : int + { + return this._nextPro; + } + + public function get maxLevel() : int + { + return this._maxLevel; + } + + public function get needItems1() : int + { + return this._needItems1; + } + + public function set needItems1(param1:int) : void + { + this._needItems1 = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/data/HeroSkill.as b/flash_decompiled/com/view/ui/hero/data/HeroSkill.as new file mode 100644 index 0000000..9511816 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/data/HeroSkill.as @@ -0,0 +1,81 @@ +package com.view.ui.hero.data +{ + public class HeroSkill + { + + public var skillid:int; + + public var showname:String; + + public var skilldes2:String; + + public var skillattribute:int; + + public var skilllevel:int; + + public var skilltype:int; + + public var skillsystemtype:int; + + public var maxlevel:int; + + public var minherolv:int; + + public var imagepath:String; + + public var iexporttype:int; + + public var last:int; + + public var needtype:int; + + public var neednum:int; + + public var bookname:String; + + public var shopid:int; + + public var itemnum:int; + + public var needskill:int; + + public var needdes1:String; + + public var needdes2:String; + + public var needdes3:String; + + public var skilldes:String; + + public var skillcareer:String; + + public function HeroSkill(param1:Object) + { + super(); + this.skillid = param1.skillid; + this.showname = param1.showname; + this.skilldes2 = param1.skilldes2; + this.skillattribute = param1.skillattribute; + this.skilllevel = param1.skilllevel; + this.skilltype = param1.skilltype; + this.skillsystemtype = param1.skillsystemtype; + this.maxlevel = param1.maxlevel; + this.minherolv = param1.minherolv; + this.imagepath = param1.imagepath; + this.iexporttype = param1.iexporttype; + this.last = param1.last; + this.needtype = param1.needtype; + this.neednum = param1.neednum; + this.bookname = param1.bookname; + this.shopid = param1.shopid; + this.itemnum = param1.itemnum; + this.needskill = param1.needskill; + this.needdes1 = param1.needdes1; + this.needdes2 = param1.needdes2; + this.needdes3 = param1.needdes3; + this.skilldes = param1.skilldes; + this.skillcareer = param1.skillcareer; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/data/HeroSkillData.as b/flash_decompiled/com/view/ui/hero/data/HeroSkillData.as new file mode 100644 index 0000000..95b96f4 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/data/HeroSkillData.as @@ -0,0 +1,651 @@ +package com.view.ui.hero.data +{ + import com.events.DevEvent; + import com.newdata.skill.StudySkill; + import com.utils.Utils; + import flash.utils.Dictionary; + + public class HeroSkillData + { + + public static var bookList:Array; + + public static var hasStudySkill:Array; + + public static var userSkillPoint:int; + + public static var equipSkill:Array; + + public static var skillList1:Vector. = new Vector.(); + + public static var skillList2:Vector. = new Vector.(); + + public static var skillList3:Vector. = new Vector.(); + + public static var skillList4:Vector. = new Vector.(); + + public static var skillList5:Vector. = new Vector.(); + + public static var fightSkillList:Dictionary = new Dictionary(); + + public static var fightSkillIdList:Array = new Array(); + + public static var heroSkillList:Vector. = new Vector.(); + + public function HeroSkillData() + { + super(); + } + + public static function checkSkillIsEquip(param1:HeroSkill) : Boolean + { + var _loc2_:Object = null; + if(hasStudySkill == null || hasStudySkill.length == 0) + { + return false; + } + for each(_loc2_ in hasStudySkill) + { + if(_loc2_.skilltype == param1.skilltype && _loc2_.skillsystemtype == param1.skillsystemtype) + { + if(_loc2_.isequip == 1) + { + return true; + } + } + } + return false; + } + + public static function checkHasStudySkill(param1:HeroSkill) : HeroSkill + { + var _loc2_:Object = null; + if(hasStudySkill == null || hasStudySkill.length == 0) + { + return null; + } + for each(_loc2_ in hasStudySkill) + { + if(_loc2_.skilltype == param1.skilltype && _loc2_.skillsystemtype == param1.skillsystemtype) + { + return getSkillBySkillId(_loc2_.skillid); + } + } + return null; + } + + public static function getSkillBySkillId(param1:int) : HeroSkill + { + var _loc2_:HeroSkill = null; + var _loc3_:HeroSkill = null; + var _loc4_:HeroSkill = null; + var _loc5_:HeroSkill = null; + var _loc6_:HeroSkill = null; + if(skillList1.length > 0) + { + for each(_loc2_ in skillList1) + { + if(_loc2_.skillid == param1) + { + return _loc2_; + } + } + } + if(skillList2.length > 0) + { + for each(_loc3_ in skillList2) + { + if(_loc3_.skillid == param1) + { + return _loc3_; + } + } + } + if(skillList3.length > 0) + { + for each(_loc4_ in skillList3) + { + if(_loc4_.skillid == param1) + { + return _loc4_; + } + } + } + if(skillList4.length > 0) + { + for each(_loc5_ in skillList4) + { + if(_loc5_.skillid == param1) + { + return _loc5_; + } + } + } + if(skillList5.length > 0) + { + for each(_loc6_ in skillList5) + { + if(_loc6_.skillid == param1) + { + return _loc6_; + } + } + } + return null; + } + + public static function checkPreSkillMax(param1:HeroSkill) : Boolean + { + var _loc2_:Object = null; + var _loc3_:HeroSkill = null; + if(hasStudySkill == null || hasStudySkill.length == 0) + { + return false; + } + for each(_loc2_ in hasStudySkill) + { + if(_loc2_.skilltype == param1.skilltype && _loc2_.skillsystemtype == param1.skillsystemtype - 1) + { + _loc3_ = getSkillBySkillId(_loc2_.skillid); + if(_loc3_.skilllevel == _loc3_.maxlevel) + { + return true; + } + return false; + } + } + return false; + } + + public static function checkBook(param1:int) : Boolean + { + var _loc2_:Object = null; + if(param1 == 0) + { + return true; + } + if(bookList == null || bookList.length == 0) + { + return false; + } + for each(_loc2_ in bookList) + { + if(_loc2_.itemId == param1) + { + return true; + } + } + return false; + } + + public static function checkUserSkillPoint(param1:int) : Boolean + { + return param1 > userSkillPoint ? false : true; + } + + public static function getSkillLine(param1:int) : Vector. + { + var _loc2_:Vector. = null; + var _loc4_:HeroSkill = null; + switch(param1) + { + case 1: + _loc2_ = skillList1; + break; + case 2: + _loc2_ = skillList2; + break; + case 3: + _loc2_ = skillList3; + break; + case 4: + _loc2_ = skillList4; + break; + case 5: + _loc2_ = skillList5; + break; + default: + return null; + } + if(_loc2_ == null || _loc2_.length == 0) + { + return null; + } + var _loc3_:Vector. = new Vector.(); + if(param1 == 5) + { + for each(_loc4_ in _loc2_) + { + if(_loc4_.skilllevel == 0) + { + _loc3_.push(_loc4_); + } + } + return _loc3_; + } + for each(_loc4_ in _loc2_) + { + if(_loc4_.skillattribute == param1 && _loc4_.skilllevel == 0 && _loc4_.skillsystemtype == 1) + { + _loc3_.push(_loc4_); + } + } + return _loc3_; + } + + public static function getNextSkill_0(param1:HeroSkill) : HeroSkill + { + var _loc2_:Vector. = null; + var _loc3_:HeroSkill = null; + switch(param1.skillattribute) + { + case 1: + _loc2_ = skillList1; + break; + case 2: + _loc2_ = skillList2; + break; + case 3: + _loc2_ = skillList3; + break; + case 4: + _loc2_ = skillList4; + break; + default: + return null; + } + if(_loc2_ == null || _loc2_.length == 0) + { + return null; + } + for each(_loc3_ in _loc2_) + { + if(_loc3_.skilllevel == 0 && _loc3_.skilltype == param1.skilltype && _loc3_.skillsystemtype == param1.skillsystemtype + 1) + { + return _loc3_; + } + } + return null; + } + + public static function getNextSkill(param1:HeroSkill) : HeroSkill + { + var _loc2_:Vector. = null; + var _loc3_:HeroSkill = null; + switch(param1.skillattribute) + { + case 1: + _loc2_ = skillList1; + break; + case 2: + _loc2_ = skillList2; + break; + case 3: + _loc2_ = skillList3; + break; + case 4: + _loc2_ = skillList4; + break; + case 5: + _loc2_ = skillList5; + } + if(_loc2_ == null || _loc2_.length == 0) + { + return null; + } + for each(_loc3_ in _loc2_) + { + if(_loc3_.skilltype == param1.skilltype && _loc3_.skillsystemtype == param1.skillsystemtype && param1.skilllevel == _loc3_.skilllevel - 1) + { + return _loc3_; + } + } + return null; + } + + public static function getEffValue(param1:int, param2:int, param3:int) : String + { + var _loc4_:int = getMibaoAdd(param1,param2,1); + var _loc5_:int = getMibaoAdd(param1,param2,2); + var _loc6_:int = getMibaoAdd(param1,param2,3); + var _loc7_:int = getMibaoAdd(param1,param2,4); + if(param3 >= 3) + { + _loc5_ = _loc4_ = getMibaoAddByLevel(param2); + _loc6_ = _loc4_; + _loc7_ = _loc4_; + } + if(_loc4_ == _loc5_ && _loc5_ == _loc6_ && _loc6_ == _loc7_) + { + return "四维+" + _loc4_ + ""; + } + var _loc8_:String = ""; + if(_loc4_ > 0) + { + _loc8_ = "攻击+" + _loc4_ + ""; + } + if(_loc5_ > 0) + { + if(_loc8_ != "") + { + _loc8_ += ","; + } + _loc8_ = _loc8_ + "防御+" + _loc5_ + ""; + } + if(_loc6_ > 0) + { + if(_loc8_ != "") + { + _loc8_ += ","; + } + _loc8_ = _loc8_ + "体力+" + _loc6_ + ""; + } + if(_loc7_ > 0) + { + if(_loc8_ != "") + { + _loc8_ += ","; + } + _loc8_ = _loc8_ + "敏捷+" + _loc7_ + ""; + } + return _loc8_; + } + + private static function getMibaoAdd(param1:int, param2:int, param3:int) : int + { + if(param1 == 0 || param1 > 8) + { + return 0; + } + if(param2 <= 0) + { + return 0; + } + var _loc4_:int = 200; + if(param2 > 250) + { + _loc4_ = 500; + } + var _loc5_:int = 2 * _loc4_; + if(param3 <= 0 || param3 > 4) + { + return 0; + } + switch(param1) + { + case 1: + if(param3 == 2 || param3 == 3) + { + return 0; + } + if(param3 == 1) + { + return _loc5_ * param2; + } + if(param3 == 4) + { + return _loc4_ * param2; + } + break; + case 2: + if(param3 == 2 || param3 == 3) + { + return 0; + } + if(param3 == 4) + { + return _loc5_ * param2; + } + if(param3 == 1) + { + return _loc4_ * param2; + } + break; + case 3: + if(param3 == 2 || param3 == 4) + { + return 0; + } + if(param3 == 1) + { + return _loc5_ * param2; + } + if(param3 == 3) + { + return _loc4_ * param2; + } + break; + case 4: + if(param3 == 2 || param3 == 4) + { + return 0; + } + if(param3 == 3) + { + return _loc5_ * param2; + } + if(param3 == 1) + { + return _loc4_ * param2; + } + break; + case 5: + if(param3 == 1 || param3 == 3) + { + return 0; + } + if(param3 == 2) + { + return _loc5_ * param2; + } + if(param3 == 4) + { + return _loc4_ * param2; + } + break; + case 6: + if(param3 == 1 || param3 == 3) + { + return 0; + } + if(param3 == 4) + { + return _loc5_ * param2; + } + if(param3 == 2) + { + return _loc4_ * param2; + } + break; + case 7: + if(param3 == 1 || param3 == 4) + { + return 0; + } + if(param3 == 2) + { + return _loc5_ * param2; + } + if(param3 == 3) + { + return _loc4_ * param2; + } + break; + case 8: + if(param3 == 1 || param3 == 4) + { + return 0; + } + if(param3 == 3) + { + return _loc5_ * param2; + } + if(param3 == 2) + { + return _loc4_ * param2; + } + } + return 0; + } + + public static function getNeedUpItems(param1:int, param2:int) : int + { + if(param2 >= 4) + { + return 200; + } + if(param2 >= 3) + { + return 100; + } + var _loc3_:int = param1 / 10; + return 10 + 2 * _loc3_; + } + + public static function getUpPercent(param1:int, param2:int) : int + { + if(param2 < 100) + { + return 100; + } + var _loc3_:int = 0; + if(param1 == 1) + { + _loc3_ = 75; + } + else if(param1 == 2) + { + _loc3_ = 80; + } + else if(param1 == 3) + { + _loc3_ = 85; + } + else if(param1 == 4) + { + _loc3_ = 90; + } + else + { + _loc3_ = 95; + } + return _loc3_; + } + + public static function getMiBaoName(param1:int) : String + { + var _loc2_:String = ""; + switch(param1) + { + case 1: + _loc2_ = "龙王鼎"; + break; + case 2: + _loc2_ = "雪凤鼎"; + break; + case 3: + _loc2_ = "麒麟鼎"; + break; + case 4: + _loc2_ = "神农鼎"; + break; + case 5: + _loc2_ = "昆仑镜"; + break; + case 6: + _loc2_ = "寒月镜"; + break; + case 7: + _loc2_ = "洞天镜"; + break; + case 8: + _loc2_ = "幽冥镜"; + } + return _loc2_; + } + + private static function getMibaoAddByLevel(param1:int) : int + { + if(param1 > 250) + { + return 250 * param1; + } + return 100 * param1; + } + + public static function setFirstLevelFightSkillList(param1:Array) : void + { + fightSkillIdList = param1; + } + + public static function setAllFightSkillList(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:FightSkillData = null; + for each(_loc2_ in param1) + { + _loc3_ = new FightSkillData(_loc2_); + fightSkillList[_loc3_.skillId] = _loc3_; + } + } + + public static function getFirstLevelFightSkillList() : Array + { + return fightSkillIdList; + } + + public static function getFightSkillBySkillId(param1:int) : FightSkillData + { + return fightSkillList[param1]; + } + + public static function setUserSkillList(param1:Array, param2:Boolean = true) : void + { + var _loc3_:Object = null; + var _loc4_:StudySkill = null; + heroSkillList.splice(0,heroSkillList.length); + if(param1 == null || param1.length == 0) + { + return; + } + for each(_loc3_ in param1) + { + _loc4_ = new StudySkill(_loc3_); + heroSkillList.push(_loc4_); + } + if(param2) + { + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.DATA_SKILL_USERLIST)); + } + } + + public static function getUserSkillList() : Vector. + { + return heroSkillList; + } + + public static function getUserSKillBySkillId(param1:int, param2:int) : FightSkillData + { + var _loc4_:StudySkill = null; + var _loc5_:int = 0; + if(heroSkillList.length == 0) + { + return null; + } + var _loc3_:int = int(param2.toString().substring(0,6)); + for each(_loc4_ in heroSkillList) + { + if(_loc4_.heroId == param1) + { + _loc5_ = int(_loc4_.skillId.toString().substring(0,6)); + if(_loc3_ == _loc5_) + { + return fightSkillList[_loc4_.skillId]; + } + } + } + return null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/ChaofuItem.as b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem.as new file mode 100644 index 0000000..ffbf7b3 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem.as @@ -0,0 +1,152 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.cache.ImgCache; + import com.view.tip.ChaofuTip; + import com.view.ui.hero.HeroChaofu; + import com.view.ui.pak.data.PackItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ChaofuItem extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var type:int; + + private var equipName:String; + + private var nameText:TextField; + + private var itemMc:Sprite; + + private var bg:Sprite; + + private var itemsTip:ChaofuTip; + + public var obj:PackItem; + + private var loadItemPng:LoadResource; + + private var url:String; + + private var itemImg:Bitmap; + + public function ChaofuItem(param1:int) + { + super(); + this.type = param1; + this.bg = new Sprite(); + this.bg.addChild(new Bitmap(this.face.getPng(ClassConfig.lib_exchange_4))); + addChild(this.bg); + switch(param1) + { + case 1: + this.equipName = "车撵"; + break; + case 2: + this.equipName = "头冠"; + break; + case 3: + this.equipName = "官服"; + break; + case 4: + this.equipName = "绶带"; + break; + case 5: + this.equipName = "朝板"; + break; + case 6: + this.equipName = "官靴"; + } + this.nameText = PublicMethod.getTextField(7895160,30); + this.nameText.text = this.equipName; + this.bg.addChild(this.nameText); + this.nameText.x = 18; + this.nameText.y = 20; + this.itemMc = new Sprite(); + this.bg.addChild(this.itemMc); + this.itemMc.x = 6; + this.itemMc.y = 6; + this.itemMc.addEventListener(MouseEvent.CLICK,this.clickItem); + } + + public function setItem(param1:PackItem) : void + { + if(Boolean(this.itemImg) && this.itemMc.contains(this.itemImg)) + { + this.itemMc.removeChild(this.itemImg); + } + this.obj = param1; + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + } + if(this.obj != null) + { + if(this.itemsTip == null) + { + this.itemsTip = new ChaofuTip(this.itemMc,this.face.stage,this.face.tip_bg,this.obj); + } + else + { + this.itemsTip.setTipData(this.obj); + } + this.url = ServerConfig.IMAGE_ITEM_URL + this.obj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(this.url,this.loadPngBack); + } + } + } + + private function loadPngBack(param1:Event) : void + { + if(this.obj == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemMc.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + } + + private function clickItem(param1:MouseEvent) : void + { + if(this.obj == null) + { + return; + } + var _loc2_:HeroChaofu = this.parent.parent.parent.parent as HeroChaofu; + if(_loc2_) + { + ConnectService.getInstance().heroService.unEquChaofu(_loc2_.getCurrHero().heroId,this.type); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/ChaofuItem1.as b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem1.as new file mode 100644 index 0000000..c8e238e --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem1.as @@ -0,0 +1,146 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.view.cache.ImgCache; + import com.view.tip.ChaofuTip; + import com.view.ui.hero.Chaofu1; + import com.view.ui.hero.ChaofuMenu; + import com.view.ui.pak.data.PackItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class ChaofuItem1 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var bg:Sprite; + + private var itemObject:PackItem; + + private var loadItemPng:LoadResource; + + private var itemsTip:ChaofuTip; + + private var itemSprite:Sprite; + + private var itemImg:Bitmap; + + public function ChaofuItem1() + { + super(); + this.bg = this.face.getMovieClip(ClassConfig.build_ironItem); + addChild(this.bg); + this.itemSprite = new Sprite(); + addChild(this.itemSprite); + this.itemSprite.x = 5; + this.itemSprite.y = 4; + this.itemSprite.addEventListener(MouseEvent.CLICK,this.clickSkill); + } + + public function setItemObj(param1:PackItem) : void + { + if(Boolean(this.itemObject) && Boolean(param1) && param1.id == this.itemObject.id) + { + return; + } + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + } + if(param1 == null) + { + this.itemObject = null; + if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg)) + { + this.itemSprite.removeChild(this.itemImg); + } + } + else + { + if(Boolean(this.itemObject) && param1.id == this.itemObject.id) + { + return; + } + this.itemObject = param1; + this.loadItemImg(); + } + } + + private function loadItemImg() : void + { + if(this.itemsTip == null) + { + this.itemsTip = new ChaofuTip(this.itemSprite,this.face.stage,this.face.tip_bg,this.itemObject); + } + else + { + this.itemsTip.setTipData(this.itemObject); + } + var _loc1_:String = ServerConfig.IMAGE_ITEM_URL + this.itemObject.viewMap.iconPath; + if(ImgCache.getInstance().getImg(_loc1_)) + { + if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg)) + { + this.itemSprite.removeChild(this.itemImg); + } + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc1_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(_loc1_,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + if(this.itemObject == null) + { + this.loadItemPng.clear(); + return; + } + if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg)) + { + this.itemSprite.removeChild(this.itemImg); + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSprite.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + } + + public function getItem() : PackItem + { + return this.itemObject; + } + + private function clickSkill(param1:MouseEvent) : void + { + if(this.itemObject == null) + { + return; + } + var _loc2_:Sprite = this.parent.parent as Sprite; + var _loc3_:ChaofuMenu = ChaofuMenu.getInstance(); + _loc3_.chaofuItem1 = this; + var _loc4_:Chaofu1 = this.parent.parent.parent.parent as Chaofu1; + _loc3_.show(_loc4_); + param1.stopImmediatePropagation(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/ChaofuItem2.as b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem2.as new file mode 100644 index 0000000..6d5646c --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem2.as @@ -0,0 +1,143 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.ChaofuTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.text.TextField; + + public class ChaofuItem2 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemName:TextField; + + private var levelText:TextField; + + private var radioBtn:UIRadioBtn; + + private var itemsTip:ChaofuTip; + + private var selectBg:Sprite; + + private var selectStatus:Boolean; + + private var currObj:PackItem; + + public function ChaofuItem2() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,190,25); + addChild(this.selectBg); + this.selectBg.alpha = 0; + var _loc1_:Sprite = PublicMethod.getTrLine(188); + addChild(_loc1_); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 0; + this.radioBtn.y = 2; + this.radioBtn.visible = false; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,120); + addChild(this.itemName); + this.levelText = PublicMethod.getTextFieldWithFillter(16777215,46); + addChild(this.levelText); + this.itemName.x = 20; + this.itemName.y = 4; + this.levelText.x = this.itemName.x + this.itemName.width; + this.levelText.y = this.itemName.y; + } + + public function setClick(param1:Boolean) : void + { + if(this.currObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.selectBg.alpha = 0.3; + } + else + { + this.selectBg.alpha = 0; + } + if(param1) + { + this.radioBtn.setSelect(); + } + else + { + this.radioBtn.setUnSelect(); + } + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + + private function setStatus() : void + { + if(this.selectStatus) + { + this.radioBtn.setSelect(); + this.selectBg.alpha = 0.3; + } + else + { + this.radioBtn.setUnSelect(); + this.selectBg.alpha = 0; + } + } + + public function setObj(param1:PackItem) : void + { + this.selectStatus = false; + this.setStatus(); + this.currObj = param1; + if(this.currObj) + { + this.radioBtn.visible = true; + if(this.currObj.equip == 1) + { + this.itemName.htmlText = param1.viewMap.showName + "(已装备)"; + } + else + { + this.itemName.htmlText = param1.viewMap.showName; + } + this.levelText.text = param1.strongLevel + ""; + if(this.itemsTip == null) + { + this.itemsTip = new ChaofuTip(this,this.face.stage,this.face.tip_bg,this.currObj); + } + else + { + this.itemsTip.setTipData(this.currObj); + } + } + else + { + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + } + this.radioBtn.visible = false; + this.itemName.text = ""; + this.levelText.text = ""; + } + } + + public function getItemObj() : PackItem + { + return this.currObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/ChaofuItem3.as b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem3.as new file mode 100644 index 0000000..bc64b7f --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem3.as @@ -0,0 +1,136 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.tip.ChaofuTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ChaofuItem3 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemName:TextField; + + private var levelText:TextField; + + private var checkBox:UICheckBtn; + + private var itemsTip:ChaofuTip; + + private var selectBg:Sprite; + + private var selectStatus:Boolean; + + private var currObj:PackItem; + + public function ChaofuItem3() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,190,25); + addChild(this.selectBg); + this.selectBg.alpha = 0; + var _loc1_:Sprite = PublicMethod.getTrLine(188); + addChild(_loc1_); + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 2; + this.checkBox.y = 4; + this.checkBox.visible = false; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,120); + addChild(this.itemName); + this.levelText = PublicMethod.getTextFieldWithFillter(16777215,46); + addChild(this.levelText); + this.itemName.x = 20; + this.itemName.y = 4; + this.levelText.x = this.itemName.x + this.itemName.width; + this.levelText.y = this.itemName.y; + addEventListener(MouseEvent.CLICK,this.clickThis); + } + + public function clickThis(param1:MouseEvent) : void + { + if(this.currObj == null) + { + return; + } + if(this.selectStatus) + { + this.selectStatus = false; + } + else + { + this.selectStatus = true; + } + this.setStatus(); + } + + public function setSelect(param1:Boolean) : void + { + this.selectStatus = param1; + this.setStatus(); + } + + private function setStatus() : void + { + if(this.selectStatus) + { + this.selectBg.alpha = 0.3; + this.checkBox.setSelect(); + } + else + { + this.selectBg.alpha = 0; + this.checkBox.setUnSelect(); + } + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + + public function setObj(param1:PackItem) : void + { + this.selectStatus = false; + this.setStatus(); + this.currObj = param1; + if(this.currObj) + { + this.checkBox.visible = true; + this.itemName.htmlText = param1.viewMap.showName; + this.levelText.text = param1.strongLevel + ""; + if(this.itemsTip == null) + { + this.itemsTip = new ChaofuTip(this,this.face.stage,this.face.tip_bg,this.currObj); + } + else + { + this.itemsTip.setTipData(this.currObj); + } + } + else + { + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + } + this.checkBox.visible = false; + this.itemName.text = ""; + this.levelText.text = ""; + } + } + + public function getItemObj() : Object + { + return this.currObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/ChaofuItem4.as b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem4.as new file mode 100644 index 0000000..551cfee --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem4.as @@ -0,0 +1,154 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.ChaofuTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.text.TextField; + + public class ChaofuItem4 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemName:TextField; + + private var levelText:TextField; + + private var radioBtn:UIRadioBtn; + + private var itemsTip:ChaofuTip; + + private var selectBg:Sprite; + + private var selectStatus:Boolean; + + private var currObj:PackItem; + + public function ChaofuItem4() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,190,25); + addChild(this.selectBg); + this.selectBg.alpha = 0; + var _loc1_:Sprite = PublicMethod.getTrLine(190); + addChild(_loc1_); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 0; + this.radioBtn.y = 2; + this.radioBtn.visible = false; + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,130); + addChild(this.itemName); + this.levelText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40); + addChild(this.levelText); + this.itemName.x = 20; + this.itemName.y = 4; + this.levelText.x = this.itemName.x + this.itemName.width; + this.levelText.y = this.itemName.y; + } + + public function setClick(param1:Boolean) : void + { + if(this.currObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.radioBtn.setSelect(); + this.selectBg.alpha = 0.3; + } + else + { + this.radioBtn.setUnSelect(); + this.selectBg.alpha = 0; + } + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + + private function setStatus() : void + { + if(this.selectStatus) + { + this.radioBtn.setSelect(); + this.selectBg.alpha = 0.3; + } + else + { + this.radioBtn.setUnSelect(); + this.selectBg.alpha = 0; + } + } + + public function setObj(param1:PackItem) : void + { + var _loc2_:Object = null; + var _loc3_:int = 0; + this.selectStatus = false; + this.setStatus(); + this.currObj = param1; + if(this.currObj) + { + this.radioBtn.visible = true; + if(this.currObj.equip == 1) + { + this.itemName.htmlText = param1.viewMap.showName + "(已装备)"; + } + else + { + this.itemName.htmlText = param1.viewMap.showName; + } + _loc2_ = this.currObj.chaofu; + this.levelText.text = "0"; + _loc3_ = 0; + if(Boolean(_loc2_) && _loc2_.hole1 > 0) + { + _loc3_ += 1; + } + if(Boolean(_loc2_) && _loc2_.hole2 > 0) + { + _loc3_ += 1; + } + if(Boolean(_loc2_) && _loc2_.hole3 > 0) + { + _loc3_ += 1; + } + this.levelText.text = "" + _loc3_; + if(this.itemsTip == null) + { + this.itemsTip = new ChaofuTip(this,this.face.stage,this.face.tip_bg,this.currObj); + } + else + { + this.itemsTip.setTipData(this.currObj); + } + } + else + { + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + } + this.radioBtn.visible = false; + this.itemName.text = ""; + this.levelText.text = ""; + } + } + + public function getItemObj() : PackItem + { + return this.currObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/ChaofuItem5.as b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem5.as new file mode 100644 index 0000000..bfe1f61 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/ChaofuItem5.as @@ -0,0 +1,141 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.ChaofuTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.text.TextField; + + public class ChaofuItem5 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemName:TextField; + + private var levelText:TextField; + + private var radioBtn:UIRadioBtn; + + private var itemsTip:ChaofuTip; + + private var selectBg:Sprite; + + private var selectStatus:Boolean; + + private var currObj:PackItem; + + public function ChaofuItem5() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,190,25); + addChild(this.selectBg); + this.selectBg.alpha = 0; + var _loc1_:Sprite = PublicMethod.getTrLine(190); + addChild(_loc1_); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 0; + this.radioBtn.y = 2; + this.radioBtn.visible = false; + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.itemName); + this.levelText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,46); + addChild(this.levelText); + this.itemName.x = 20; + this.itemName.y = 4; + this.levelText.x = this.itemName.x + this.itemName.width; + this.levelText.y = this.itemName.y; + } + + public function setClick(param1:Boolean) : void + { + if(this.currObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.radioBtn.setSelect(); + this.selectBg.alpha = 0.3; + } + else + { + this.radioBtn.setUnSelect(); + this.selectBg.alpha = 0; + } + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + + private function setStatus() : void + { + if(this.selectStatus) + { + this.radioBtn.setSelect(); + this.selectBg.alpha = 0.3; + } + else + { + this.radioBtn.setUnSelect(); + this.selectBg.alpha = 0; + } + } + + public function setObj(param1:PackItem) : void + { + this.selectStatus = false; + this.setStatus(); + this.currObj = param1; + if(this.currObj) + { + this.radioBtn.visible = true; + if(this.currObj.equip == 1) + { + this.itemName.htmlText = param1.viewMap.showName + "(已装备)"; + } + else + { + this.itemName.htmlText = param1.viewMap.showName; + } + this.levelText.text = "0"; + if(Boolean(this.currObj.chaofu) && this.currObj.chaofu.pro1 > 0) + { + this.levelText.text = "3"; + } + if(this.itemsTip == null) + { + this.itemsTip = new ChaofuTip(this,this.face.stage,this.face.tip_bg,this.currObj); + } + else + { + this.itemsTip.setTipData(this.currObj); + } + } + else + { + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + } + this.radioBtn.visible = false; + this.itemName.text = ""; + this.levelText.text = ""; + } + } + + public function getItemObj() : PackItem + { + return this.currObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/EquipSkill.as b/flash_decompiled/com/view/ui/hero/mc/EquipSkill.as new file mode 100644 index 0000000..250e5bc --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/EquipSkill.as @@ -0,0 +1,158 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.ui.hero.SKillControlBar; + import com.view.ui.hero.data.HeroSkill; + import com.view.ui.hero.data.HeroSkillData; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class EquipSkill extends Sprite + { + + private var currNum:int; + + private var face:InstallFace = InstallFace.getInstance(); + + private var imgSp:Sprite; + + private var lockImg:Bitmap; + + private var _heroLevel:int; + + private var levelText:TextField; + + private var loader:LoadResource; + + private var currSkill:HeroSkill; + + private var headImg:Bitmap; + + public function EquipSkill(param1:int) + { + super(); + this.currNum = param1; + var _loc2_:Sprite = PublicMethod.createRectangle(7960953,0,40,40); + addChild(_loc2_); + this.imgSp = new Sprite(); + addChild(this.imgSp); + this.levelText = PublicMethod.getTextFieldWithFillter(16777215,15); + addChild(this.levelText); + this.levelText.x = 24; + this.levelText.y = 24; + this.imgSp.addEventListener(MouseEvent.CLICK,this.clickSkill); + } + + public function setLock(param1:Boolean) : void + { + if(param1) + { + if(this.lockImg == null) + { + this.lockImg = new Bitmap(this.face.getPng(ClassConfig.IMG_LOCK)); + } + this.imgSp.addChild(this.lockImg); + this.lockImg.x = 10; + this.lockImg.y = 10; + } + else if(Boolean(this.lockImg) && this.imgSp.contains(this.lockImg)) + { + this.imgSp.removeChild(this.lockImg); + } + } + + public function setHeroLevel(param1:int, param2:int) : void + { + this._heroLevel = param1; + if(param1 < param2) + { + this.setLock(true); + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip("武将等级达到 " + param2 + " 级时开启此技能位"),true,-1,false); + } + else + { + this.setLock(false); + } + } + + public function setEquipSkill(param1:int) : void + { + if(param1 == 0) + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.levelText.text = ""; + this.currSkill = null; + return; + } + this.currSkill = HeroSkillData.getSkillBySkillId(param1); + this.loadPng(); + var _loc2_:String = this.currSkill.skilldes2; + if(this.currSkill.maxlevel > this.currSkill.skilllevel) + { + if(HeroSkillData.checkUserSkillPoint(this.currSkill.neednum)) + { + _loc2_ = _loc2_ + "" + this.currSkill.needdes1 + "
"; + } + else + { + _loc2_ = _loc2_ + "" + this.currSkill.needdes1 + "
"; + } + if(this._heroLevel < this.currSkill.minherolv) + { + _loc2_ = _loc2_ + "" + this.currSkill.needdes2 + "
"; + } + else + { + _loc2_ = _loc2_ + "" + this.currSkill.needdes2 + "
"; + } + } + _loc2_ += this.currSkill.skilldes; + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip(_loc2_,this.currSkill.showname),true,-1,false); + this.levelText.text = this.currSkill.skilllevel + ""; + } + + private function loadPng() : void + { + var _loc1_:String = "pic/skill/" + this.currSkill.imagepath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + this.headImg.width = 41; + this.headImg.height = 41; + } + + private function clickSkill(param1:MouseEvent) : void + { + if(this.currSkill == null) + { + return; + } + var _loc2_:Sprite = this.parent as Sprite; + var _loc3_:SKillControlBar = SKillControlBar.getInstance(); + _loc3_.heroSkill = this.currSkill; + _loc3_.status = 5; + _loc3_.show(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/FengHuangItem.as b/flash_decompiled/com/view/ui/hero/mc/FengHuangItem.as new file mode 100644 index 0000000..3d223fc --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/FengHuangItem.as @@ -0,0 +1,97 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.cache.ImgCache; + import com.view.mc.button.Button_15; + import com.view.tip.UserItemTip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class FengHuangItem extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var numsText:TextField; + + private var loadItemPng:LoadResource; + + private var itemSprite:Sprite; + + private var itemsTip:UserItemTip; + + private var radioBtn:Button_15; + + public var currItemNums:int; + + private var itemObject:Object; + + private var itemImg:Bitmap; + + public function FengHuangItem(param1:Object) + { + super(); + this.itemObject = param1; + this.radioBtn = new Button_15(); + addChild(this.radioBtn); + this.itemSprite = new Sprite(); + addChild(this.itemSprite); + this.itemSprite.x = 16; + this.itemSprite.y = -6; + this.numsText = PublicMethod.getTextField(16777215,50); + addChild(this.numsText); + this.numsText.x = 2; + this.numsText.y = 20; + this.loadItemImg(); + } + + public function setItemNums(param1:int) : void + { + this.currItemNums = param1; + this.numsText.text = Utils.getNewPower(param1); + } + + public function setSelect(param1:Boolean) : void + { + this.radioBtn.setClick(param1); + } + + private function loadItemImg() : void + { + if(ImgCache.getInstance().getImg("pic/equip/" + this.itemObject.iconPath)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + this.itemObject.iconPath).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource("pic/equip/" + this.itemObject.iconPath,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.loadItemPng.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSprite.addChild(this.itemImg); + this.itemImg.width = 28; + this.itemImg.height = 28; + var _loc1_:Bitmap = new Bitmap(); + _loc1_.bitmapData = this.itemImg.bitmapData.clone(); + this.itemsTip = new UserItemTip(this.itemSprite,this.face.stage,this.face.tip_bg,this.itemObject,_loc1_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/FightEquipSkill.as b/flash_decompiled/com/view/ui/hero/mc/FightEquipSkill.as new file mode 100644 index 0000000..7e38290 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/FightEquipSkill.as @@ -0,0 +1,170 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.ui.hero.FightSkillMenu; + import com.view.ui.hero.data.FightSkillData; + import com.view.ui.hero.data.HeroSkillData; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class FightEquipSkill extends Sprite + { + + private var currNum:int; + + private var face:InstallFace = InstallFace.getInstance(); + + private var imgSp:Sprite; + + private var lockImg:Bitmap; + + private var levelText:TextField; + + private var currSkill:FightSkillData; + + private var loader:LoadResource; + + private var headImg:Bitmap; + + private var currStatus:int; + + public function FightEquipSkill(param1:int) + { + super(); + this.currNum = param1; + this.imgSp = new Sprite(); + addChild(this.imgSp); + var _loc2_:Sprite = PublicMethod.createRectangle(7960953,0,40,40); + this.imgSp.addChild(_loc2_); + this.levelText = PublicMethod.getTextFieldWithFillter(16777215,15); + addChild(this.levelText); + this.levelText.x = 24; + this.levelText.y = 24; + this.levelText.defaultTextFormat = PublicMethod.getRightTextFormat(); + this.imgSp.addEventListener(MouseEvent.CLICK,this.clickSkill); + if(this.currNum == 1) + { + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip("该位置只能装备被动技能"),true,-1,false); + } + else if(this.currNum == 2 || this.currNum == 3) + { + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip("该位置只能可装备主动技能"),true,-1,false); + } + } + + public function setLock(param1:Boolean) : void + { + if(param1) + { + if(this.lockImg == null) + { + this.lockImg = new Bitmap(this.face.getPng(ClassConfig.IMG_LOCK)); + } + this.imgSp.addChild(this.lockImg); + this.lockImg.x = 10; + this.lockImg.y = 10; + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip("暂未开放"),true,-1,false); + } + else if(Boolean(this.lockImg) && this.imgSp.contains(this.lockImg)) + { + this.imgSp.removeChild(this.lockImg); + } + } + + private function clickSkill(param1:MouseEvent) : void + { + if(this.currSkill == null) + { + return; + } + var _loc2_:Sprite = this.parent as Sprite; + var _loc3_:FightSkillMenu = FightSkillMenu.getInstance(); + _loc3_.fightSkillData = this.currSkill; + _loc3_.status = this.currStatus; + _loc3_.show(_loc2_); + } + + public function setEquipSkill(param1:uint) : void + { + if(param1 == 0) + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.levelText.text = ""; + this.currSkill = null; + if(this.currNum == 1) + { + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip("该位置只能装备被动技能"),true,-1,false); + } + else if(this.currNum == 2 || this.currNum == 3) + { + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip("该位置只能装备主动技能"),true,-1,false); + } + this.currStatus = 0; + return; + } + this.currStatus = 3; + this.currSkill = HeroSkillData.getFightSkillBySkillId(param1); + this.loadPng(); + this.showTip(); + } + + private function loadPng() : void + { + var _loc1_:String = "pic/skill/" + this.currSkill.iconPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + this.headImg.width = 41; + this.headImg.height = 41; + } + + private function showTip() : void + { + var _loc1_:String = ""; + var _loc2_:FightSkillData = HeroSkillData.getFightSkillBySkillId(this.currSkill.skillId + 1); + this.levelText.text = this.currSkill.skillLv + ""; + _loc1_ = "技能等级:" + this.currSkill.skillLv + "级
"; + if(this.currSkill.cdRoundNum == 0) + { + _loc1_ = _loc1_ + "技能类型:被动" + "
"; + } + else + { + _loc1_ = _loc1_ + "技能类型:主动" + "
"; + } + if(this.currSkill.skillLv == 12) + { + _loc1_ = _loc1_ + "当前效果:
" + this.currSkill.skillDesc + ""; + } + else + { + _loc1_ = "升级需求:" + this.currSkill.skillPoint + " 功勋
"; + _loc1_ = _loc1_ + "当前效果:
" + this.currSkill.skillDesc + "
"; + _loc1_ = _loc1_ + "下级效果:
" + _loc2_.skillDesc + ""; + } + var _loc3_:String = this.currSkill.skillName; + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip(_loc1_,_loc3_),true,-1,false); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/FightSkillMc.as b/flash_decompiled/com/view/ui/hero/mc/FightSkillMc.as new file mode 100644 index 0000000..e25cb86 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/FightSkillMc.as @@ -0,0 +1,150 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.newdata.pack.NewPackData; + import com.utils.Utils; + import com.view.ui.hero.FightSkillMenu; + import com.view.ui.hero.data.FightSkillData; + import com.view.ui.hero.data.HeroSkillData; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class FightSkillMc extends Sprite + { + + private var bg:Sprite; + + private var face:InstallFace = InstallFace.getInstance(); + + private var levelText:TextField; + + private var imgSp:Sprite; + + private var fightSKill:FightSkillData; + + private var currSkillData:FightSkillData; + + private var loader:LoadResource; + + private var headImg:Bitmap; + + private var currStatus:int; + + public function FightSkillMc(param1:FightSkillData) + { + super(); + this.fightSKill = param1; + this.bg = PublicMethod.createRectangle(7960953,0,40,40); + addChild(this.bg); + this.imgSp = new Sprite(); + addChild(this.imgSp); + this.imgSp.addEventListener(MouseEvent.CLICK,this.clickSkill); + this.levelText = PublicMethod.getTextFieldWithFillter(16777215,34); + addChild(this.levelText); + this.levelText.x = 8; + this.levelText.y = 26; + this.levelText.defaultTextFormat = PublicMethod.getRightTextFormat(); + this.loadPng(); + } + + private function showTip() : void + { + var _loc3_:int = 0; + var _loc4_:FightSkillData = null; + var _loc1_:String = ""; + if(this.currSkillData == null) + { + this.currStatus = 0; + this.currSkillData = this.fightSKill; + this.levelText.text = "0/12"; + _loc3_ = NewPackData.getItemNumsByItemId(this.currSkillData.skillPoint); + _loc1_ = "技能等级:0级
"; + if(this.currSkillData.cdRoundNum == 0) + { + _loc1_ = _loc1_ + "技能类型:被动" + "
"; + } + else + { + _loc1_ = _loc1_ + "技能类型:主动" + "
"; + } + if(_loc3_ > 0) + { + _loc1_ = _loc1_ + "学习需求:" + this.currSkillData.bookName + "
"; + } + else + { + _loc1_ = _loc1_ + "学习需求:" + this.currSkillData.bookName + "
"; + } + _loc1_ = _loc1_ + "下级效果:
" + this.currSkillData.skillDesc + ""; + Utils.applyGray(this.imgSp); + } + else + { + _loc4_ = HeroSkillData.getFightSkillBySkillId(this.currSkillData.skillId + 1); + this.levelText.text = this.currSkillData.skillLv + "/12"; + _loc1_ = "技能等级:" + this.currSkillData.skillLv + "级
"; + if(this.currSkillData.cdRoundNum == 0) + { + _loc1_ = _loc1_ + "技能类型:被动" + "
"; + } + else + { + _loc1_ = _loc1_ + "技能类型:主动" + "
"; + } + if(this.currSkillData.skillLv == 12) + { + this.currStatus = 2; + _loc1_ = _loc1_ + "当前效果:
" + this.currSkillData.skillDesc + ""; + } + else + { + this.currStatus = 1; + _loc1_ = _loc1_ + "升级需求:" + _loc4_.skillPoint + " 功勋
"; + _loc1_ = _loc1_ + "当前效果:
" + this.currSkillData.skillDesc + "
"; + _loc1_ = _loc1_ + "下级效果:
" + _loc4_.skillDesc + ""; + } + Utils.applyDefault(this.imgSp); + } + var _loc2_:String = this.currSkillData.skillName; + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip(_loc1_,_loc2_),true,-1,false); + } + + public function loadUserFightSkill(param1:int) : void + { + this.currSkillData = HeroSkillData.getUserSKillBySkillId(param1,this.fightSKill.skillId); + this.showTip(); + } + + private function loadPng() : void + { + var _loc1_:String = "pic/skill/" + this.fightSKill.iconPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + this.headImg.width = 41; + this.headImg.height = 41; + } + + private function clickSkill(param1:MouseEvent) : void + { + var _loc2_:Sprite = this.parent as Sprite; + var _loc3_:FightSkillMenu = FightSkillMenu.getInstance(); + _loc3_.fightSkillData = this.currSkillData; + _loc3_.status = this.currStatus; + _loc3_.show(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/GiveHeroExpUI.as b/flash_decompiled/com/view/ui/hero/mc/GiveHeroExpUI.as new file mode 100644 index 0000000..63c454a --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/GiveHeroExpUI.as @@ -0,0 +1,165 @@ +package com.view.ui.hero.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIExpBar; + import com.view.newui.UINumInputText; + import com.view.newui.UISmallBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class GiveHeroExpUI extends UIWindowBg + { + + public static const GIVE_TYPE_1:int = 1; + + public static const GIVE_TYPE_2:int = 2; + + private var bg:Sprite; + + private var input:UINumInputText; + + private var heroExpBar:UIExpBar; + + private var userExpBar:UIExpBar; + + private var heroId:int; + + private var currExp:int; + + private var currExpMax:int; + + private var expPoint:int; + + private var type:int; + + public function GiveHeroExpUI() + { + var _loc5_:UISmallBtn = null; + var _loc8_:UIButton = null; + super(); + initSize(90,130); + loadTitle(UITitleConfig.title_jingyanfenpei); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(260,90); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 15; + _loc2_.text = "武将分配:"; + this.heroExpBar = new UIExpBar(); + this.heroExpBar.setWidth(170); + _loc1_.addChild(this.heroExpBar); + this.heroExpBar.init(); + this.heroExpBar.setMaxValue(100); + this.heroExpBar.setCurValue(0); + this.heroExpBar.x = 80; + this.heroExpBar.y = _loc2_.y; + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x; + _loc3_.y = _loc2_.y + 30; + _loc3_.text = "分配数量:"; + _loc1_.addChild(_loc4_); + _loc4_.x = _loc2_.x; + _loc4_.y = _loc3_.y + 30; + _loc4_.text = "经 验 池:"; + this.userExpBar = new UIExpBar(); + this.userExpBar.setWidth(170); + _loc1_.addChild(this.userExpBar); + this.userExpBar.init(); + this.userExpBar.setMaxValue(100); + this.userExpBar.setCurValue(0); + this.userExpBar.x = this.heroExpBar.x; + this.userExpBar.y = _loc4_.y; + this.input = new UINumInputText(80); + _loc1_.addChild(this.input); + this.input.x = _loc3_.x + _loc3_.width - 10; + this.input.y = _loc3_.y - 3; + this.input.hiddenBtn(); + _loc5_ = new UISmallBtn("升 级",2); + var _loc6_:UISmallBtn = new UISmallBtn("最 大",2); + _loc1_.addChild(_loc5_); + _loc1_.addChild(_loc6_); + _loc5_.x = int(this.input.x + this.input.width); + _loc5_.y = int(_loc3_.y); + _loc6_.x = int(_loc5_.x + _loc5_.width + 5); + _loc6_.y = int(_loc3_.y); + _loc5_.onClick = this.setExpUp; + _loc6_.onClick = this.setExpMax; + var _loc7_:UIButton = new UIButton("确 定",2,10); + _loc8_ = new UIButton("取 消",2,10); + bg1.addChild(_loc7_); + bg1.addChild(_loc8_); + _loc7_.x = 65; + _loc7_.y = 120; + _loc8_.x = _loc7_.x + 100; + _loc8_.y = _loc7_.y; + _loc8_.onClick = closeSelf; + _loc7_.onClick = this.giveSubmit; + } + + public function setHeroId(param1:int, param2:int = 1) : void + { + this.input.setTextNum(0); + this.type = param2; + this.heroId = param1; + var _loc3_:NewHero = NewHeroData.getHeroByHeroId(this.heroId); + var _loc4_:NewUser = NewUserData.getUser(); + this.input.setTextNum(0); + this.currExp = _loc3_.exp; + this.currExpMax = _loc3_.needExp; + this.expPoint = _loc4_.expPoint; + this.input.setMaxNum(this.expPoint); + this.heroExpBar.setMaxValue(this.currExpMax); + this.heroExpBar.setCurValue(this.currExp); + this.userExpBar.setMaxValue(_loc4_.expLimit); + this.userExpBar.setCurValue(this.expPoint); + } + + private function setExpUp(param1:MouseEvent) : void + { + this.input.setTextNum(this.currExpMax - this.currExp); + } + + private function setExpMax(param1:MouseEvent) : void + { + this.input.setTextNum(this.expPoint); + } + + private function giveSubmit(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ > this.expPoint) + { + MessageBoxUI.getInstance().addMessage("经验池经验不足。"); + } + else if(_loc2_ > 0) + { + ConnectService.getInstance().userService.giveExp(this.heroId,_loc2_); + } + else + { + MessageBoxUI.getInstance().addMessage("分配数量必须大于0"); + } + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/GovPozMc.as b/flash_decompiled/com/view/ui/hero/mc/GovPozMc.as new file mode 100644 index 0000000..f4dd6a6 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/GovPozMc.as @@ -0,0 +1,117 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GovPozMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var govObj:Object; + + private var css:TextFormat; + + private var bg:Sprite; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + public var cefengBtn:UISmallBtn; + + public function GovPozMc() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,528,24); + addChild(this.bg); + this.bg.alpha = 0.2; + this.bg.visible = false; + this.css = PublicMethod.getCenterTextFormat(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.label1); + this.label1.y = 3; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + addChild(this.label2); + this.label2.x = this.label1.x + this.label1.width; + this.label2.y = this.label1.y; + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + addChild(this.label3); + this.label3.x = this.label2.x + this.label2.width; + this.label3.y = this.label1.y; + this.label4 = PublicMethod.getTextField(UIConfig.textColor,171); + addChild(this.label4); + this.label4.x = this.label3.x + this.label3.width; + this.label4.y = this.label1.y; + this.cefengBtn = new UISmallBtn("册 封",2); + addChild(this.cefengBtn); + this.cefengBtn.x = this.label4.x + this.label4.width + 20; + this.cefengBtn.y = 2; + this.cefengBtn.visible = false; + var _loc1_:Sprite = PublicMethod.getTrLine(528); + addChild(_loc1_); + _loc1_.y = 24; + 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.govObj != null) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.govObj != null) + { + this.bg.visible = true; + } + } + + public function setObj(param1:Object) : void + { + var _loc2_:String = null; + this.govObj = param1; + if(this.govObj != null) + { + this.label1.text = param1.govPotz.name; + this.label1.setTextFormat(this.css); + this.label2.text = param1.giveNum + "/" + param1.allNum; + this.label2.setTextFormat(this.css); + this.label3.text = "增加统率" + param1.govPotz.addLead; + this.label3.setTextFormat(this.css); + _loc2_ = "需要:功勋" + param1.govPotz.merit + ",将印" + param1.govPotz.itemNum; + this.label4.text = _loc2_; + this.label4.setTextFormat(this.css); + this.cefengBtn.visible = true; + } + else + { + this.label1.text = ""; + this.label2.text = ""; + this.label3.text = ""; + this.label4.text = ""; + this.cefengBtn.visible = false; + } + } + + public function clear(param1:Event) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/HeroImageItem.as b/flash_decompiled/com/view/ui/hero/mc/HeroImageItem.as new file mode 100644 index 0000000..0deca23 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/HeroImageItem.as @@ -0,0 +1,83 @@ +package com.view.ui.hero.mc +{ + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class HeroImageItem extends Sprite + { + + private var bg:Sprite; + + public var currUrl:String; + + private var loadItemPng1:LoadResource; + + private var maleImg:Bitmap; + + public function HeroImageItem(param1:String) + { + super(); + this.currUrl = param1; + this.bg = PublicMethod.createRectangle(5794408,2040871,68,83); + addChild(this.bg); + this.bg.buttonMode = true; + this.loadHeadImg1(param1); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + } + + private function mouseOver(param1:MouseEvent) : void + { + this.filters = [PublicGlow.getInstance().lightFilter]; + } + + private function mouseOut(param1:MouseEvent) : void + { + this.filters = null; + } + + private function loadHeadImg1(param1:String) : void + { + if(param1 == null) + { + return; + } + this.loadItemPng1 = new LoadResource("pic/head/" + param1,this.loadPngBack1); + } + + private function loadPngBack1(param1:Event) : void + { + if(Boolean(this.maleImg) && this.bg.contains(this.maleImg)) + { + this.bg.removeChild(this.maleImg); + } + this.maleImg = param1.target.loader.content as Bitmap; + this.bg.addChild(this.maleImg); + this.maleImg.x = 2; + this.maleImg.y = 2; + this.maleImg.width = 65; + this.maleImg.height = 80; + this.loadItemPng1.clear(); + } + + public function setUrl(param1:String) : void + { + if(param1 == null) + { + if(Boolean(this.maleImg) && this.bg.contains(this.maleImg)) + { + this.bg.removeChild(this.maleImg); + } + return; + } + this.currUrl = param1; + this.loadHeadImg1(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/HeroJiangHunMc.as b/flash_decompiled/com/view/ui/hero/mc/HeroJiangHunMc.as new file mode 100644 index 0000000..5e1c13a --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/HeroJiangHunMc.as @@ -0,0 +1,67 @@ +package com.view.ui.hero.mc +{ + import com.view.newui.UIBase; + import com.view.newui.UINums; + import com.view.ui.hero.data.HeroJiangHun; + import flash.display.Bitmap; + + public class HeroJiangHunMc extends UIBase + { + + private var jianghun1:Bitmap; + + private var jianghun2:Bitmap; + + private var jianghun3:Bitmap; + + private var jianghun4:Bitmap; + + private var jianghun5:Bitmap; + + private var uINums:UINums; + + private var jianghun:HeroJiangHun; + + public function HeroJiangHunMc() + { + super(); + var _loc1_:int = 1; + while(_loc1_ < 6) + { + this["jianghun" + _loc1_] = face.getBitMap("jianghun" + _loc1_); + addChild(this["jianghun" + _loc1_]); + this["jianghun" + _loc1_].visible = false; + _loc1_++; + } + this.buttonMode = true; + } + + public function clear() : void + { + } + + public function setFilters(param1:Array) : void + { + this.filters = param1; + } + + public function setDate(param1:HeroJiangHun) : void + { + this.jianghun = param1; + var _loc2_:int = 1; + while(_loc2_ < 6) + { + this["jianghun" + _loc2_].visible = false; + _loc2_++; + } + var _loc3_:int = this.jianghun.type; + this["jianghun" + _loc3_].visible = true; + } + + public function getHeroJiangHun() : HeroJiangHun + { + return this.jianghun; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/HeroNameEditMc.as b/flash_decompiled/com/view/ui/hero/mc/HeroNameEditMc.as new file mode 100644 index 0000000..519b40b --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/HeroNameEditMc.as @@ -0,0 +1,84 @@ +package com.view.ui.hero.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HeroNameEditMc extends UIWindowBg + { + + private var inputText:UIInputText; + + private var heroId:int; + + public function HeroNameEditMc() + { + var _loc4_:TextField = null; + var _loc5_:UIButton = null; + var _loc6_:UIButton = null; + super(); + initSize(90,130); + loadTitle(UITitleConfig.title_wujianggaiming); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(260,90); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250); + _loc1_.addChild(_loc2_); + _loc2_.text = "请输入武将新的名称,支持1-4个字符长度"; + _loc2_.x = 10; + _loc2_.y = 10; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110); + _loc1_.addChild(_loc3_); + _loc3_.text = "请输入新的名称:"; + _loc3_.x = _loc2_.x; + _loc3_.y = _loc2_.y + 30; + this.inputText = new UIInputText(120); + _loc1_.addChild(this.inputText); + this.inputText.setMaxChars(10); + this.inputText.x = _loc3_.x + _loc3_.width; + this.inputText.y = _loc3_.y - 3; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + _loc1_.addChild(_loc4_); + _loc4_.htmlText = "修改名称需要 10 元宝"; + _loc4_.x = _loc2_.x; + _loc4_.y = _loc3_.y + 30; + _loc5_ = new UIButton("确 定",2,10); + _loc6_ = new UIButton("取 消",2,10); + bg1.addChild(_loc5_); + bg1.addChild(_loc6_); + _loc5_.x = 65; + _loc5_.y = 120; + _loc6_.x = _loc5_.x + 100; + _loc6_.y = _loc5_.y; + _loc6_.onClick = closeSelf; + _loc5_.onClick = this.editSubmit; + } + + private function editSubmit(param1:MouseEvent) : void + { + var _loc2_:String = this.inputText.getText(); + if(_loc2_ != "" && _loc2_.length > 0 && this.heroId > 0) + { + ConnectService.getInstance().heroService.changeHeroName(this.heroId,_loc2_); + closeSelf(null); + } + } + + public function setHeroId(param1:int) : void + { + this.heroId = param1; + this.inputText.setText(""); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/HeroNameMc.as b/flash_decompiled/com/view/ui/hero/mc/HeroNameMc.as new file mode 100644 index 0000000..a8fff1b --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/HeroNameMc.as @@ -0,0 +1,106 @@ +package com.view.ui.hero.mc +{ + import com.common.PublicMethod; + import com.newdata.hero.NewHero; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HeroNameMc extends Sprite + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var hasClick:Boolean; + + public var hero:NewHero; + + private var heroName:TextField; + + public function HeroNameMc() + { + super(); + this.hasClick = false; + this.bg1 = PublicMethod.createShape(UIConfig.selectBgColor,85,23); + this.bg2 = PublicMethod.createShape(UIConfig.overBgColor,85,23); + addChild(this.bg1); + addChild(this.bg2); + addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true); + this.bg2.alpha = 0; + this.bg1.alpha = 0; + this.heroName = PublicMethod.getTextFieldWithFillter(16777215,84); + addChild(this.heroName); + this.heroName.y = 4; + this.heroName.defaultTextFormat = PublicMethod.getCenterTextFormat(); + var _loc1_:Sprite = PublicMethod.getTrLine(84); + addChild(_loc1_); + _loc1_.y = 23; + } + + public function setHero(param1:NewHero) : void + { + this.hero = param1; + if(this.hero) + { + this.heroName.htmlText = param1.showName; + } + else + { + this.heroName.htmlText = ""; + } + } + + private function rollOut(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + if(!this.hasClick) + { + this.bg2.alpha = 0; + } + } + + private function rollOver(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + if(!this.hasClick) + { + this.bg2.alpha = 0.3; + } + } + + public function setClick(param1:Boolean) : void + { + this.hasClick = param1; + if(this.hasClick) + { + this.bg1.alpha = 0.3; + } + else + { + this.bg1.alpha = 0; + } + this.bg2.alpha = 0; + } + + public function clear() : void + { + removeEventListener(MouseEvent.ROLL_OUT,this.rollOut); + removeEventListener(MouseEvent.ROLL_OVER,this.rollOver); + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/HeroSelectLineMc.as b/flash_decompiled/com/view/ui/hero/mc/HeroSelectLineMc.as new file mode 100644 index 0000000..0e63806 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/HeroSelectLineMc.as @@ -0,0 +1,240 @@ +package com.view.ui.hero.mc +{ + import com.common.PublicMethod; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.ui.hero.HeroConst; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HeroSelectLineMc extends Sprite + { + + private var bg:Sprite; + + private var centerCss:TextFormat; + + public var hero:Object; + + private var checkBox:UICheckBtn; + + public var selected:Boolean; + + private var clickBg:Sprite; + + private var numsText:TextField; + + public var currNums:int; + + private var heroName:TextField; + + private var hpStatus:TextField; + + private var zhiye:TextField; + + private var level:TextField; + + private var tongbing:TextField; + + private var tongbingNums:TextField; + + private var guanzhi:TextField; + + private var status:TextField; + + public function HeroSelectLineMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(624); + this.clickBg = PublicMethod.createShape(UIConfig.selectBgColor,624,25); + addChild(this.clickBg); + this.clickBg.alpha = 0.3; + this.clickBg.visible = false; + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,624,25); + this.bg.alpha = 0.2; + addChild(this.bg); + this.bg.visible = false; + addChild(_loc1_); + _loc1_.y = 23; + addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true); + addEventListener(MouseEvent.CLICK,this.clickMc,false,0,true); + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 4; + this.checkBox.y = 2; + this.checkBox.visible = false; + this.checkBox.setUnSelect(); + this.numsText = PublicMethod.getTextFieldWithFillter(16640697,40); + addChild(this.numsText); + this.numsText.x = 26; + this.numsText.y = 3; + this.numsText.defaultTextFormat = this.centerCss; + this.heroName = PublicMethod.getTextFieldWithFillter(16640697,66); + addChild(this.heroName); + this.heroName.x = this.numsText.x + this.numsText.width; + this.heroName.y = 3; + this.heroName.defaultTextFormat = this.centerCss; + this.hpStatus = PublicMethod.getTextFieldWithFillter(16640697,65); + addChild(this.hpStatus); + this.hpStatus.x = this.heroName.x + this.heroName.width; + this.hpStatus.y = this.heroName.y; + this.hpStatus.defaultTextFormat = this.centerCss; + this.zhiye = PublicMethod.getTextFieldWithFillter(16640697,67); + addChild(this.zhiye); + this.zhiye.x = this.hpStatus.x + this.hpStatus.width; + this.zhiye.y = this.heroName.y; + this.zhiye.defaultTextFormat = this.centerCss; + this.level = PublicMethod.getTextFieldWithFillter(16640697,59); + addChild(this.level); + this.level.x = this.zhiye.x + this.zhiye.width; + this.level.y = this.heroName.y; + this.level.defaultTextFormat = this.centerCss; + this.tongbing = PublicMethod.getTextFieldWithFillter(16640697,83); + addChild(this.tongbing); + this.tongbing.x = this.level.x + this.level.width; + this.tongbing.y = this.heroName.y; + this.tongbing.defaultTextFormat = this.centerCss; + this.tongbingNums = PublicMethod.getTextFieldWithFillter(16640697,65); + addChild(this.tongbingNums); + this.tongbingNums.x = this.tongbing.x + this.tongbing.width; + this.tongbingNums.y = this.heroName.y; + this.tongbingNums.defaultTextFormat = this.centerCss; + this.guanzhi = PublicMethod.getTextFieldWithFillter(16640697,69); + addChild(this.guanzhi); + this.guanzhi.x = this.tongbingNums.x + this.tongbingNums.width; + this.guanzhi.y = this.heroName.y; + this.guanzhi.defaultTextFormat = this.centerCss; + this.status = PublicMethod.getTextFieldWithFillter(16640697,81); + addChild(this.status); + this.status.x = this.guanzhi.x + this.guanzhi.width; + this.status.y = this.heroName.y; + this.status.defaultTextFormat = this.centerCss; + } + + private function rollOut(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + if(!this.selected) + { + this.bg.visible = false; + } + } + + private function rollOver(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + if(!this.selected) + { + this.bg.visible = true; + } + } + + private function clickMc(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + if(this.selected) + { + this.selected = false; + this.checkBox.setUnSelect(); + } + else + { + this.selected = true; + this.checkBox.setSelect(); + } + this.clickBg.visible = this.selected; + this.bg.visible = !this.selected; + } + + public function setSelectd(param1:Boolean) : void + { + this.selected = param1; + if(this.selected) + { + this.checkBox.setSelect(); + } + else + { + this.checkBox.setUnSelect(); + } + this.clickBg.visible = this.selected; + this.bg.visible = false; + } + + public function setNums(param1:int) : void + { + this.currNums = param1; + if(param1 == 0) + { + this.numsText.text = ""; + } + else + { + this.numsText.text = param1.toString(); + this.numsText.setTextFormat(this.centerCss); + } + } + + public function setHero(param1:Object) : void + { + if(param1 == null && this.hero == null) + { + return; + } + this.hero = param1; + if(this.hero == null) + { + this.checkBox.visible = false; + this.checkBox.setUnSelect(); + this.selected = false; + this.clickBg.visible = this.selected; + this.bg.visible = false; + this.numsText.text = ""; + this.heroName.text = ""; + this.hpStatus.text = ""; + this.zhiye.text = ""; + this.level.text = ""; + this.tongbing.text = ""; + this.tongbingNums.text = ""; + this.guanzhi.text = ""; + this.status.text = ""; + this.currNums = 0; + } + else + { + this.checkBox.visible = true; + this.checkBox.setUnSelect(); + this.selected = false; + this.clickBg.visible = this.selected; + this.bg.visible = false; + this.heroName.htmlText = this.hero.showName; + this.hpStatus.htmlText = "" + this.hero.hpStatus.toString() + " " + this.hero.hpStatusView + ""; + this.zhiye.text = this.hero.careerName; + this.level.text = HeroConst.changeName(this.hero.level,this.hero.changeCount); + this.tongbing.text = this.hero.armyName; + this.tongbingNums.text = this.hero.armyNum.toString(); + this.guanzhi.text = this.hero.govPotzName; + this.status.text = this.hero.actionStatusChn; + } + } + + public function getHero() : Object + { + return this.hero; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/MiBaoItem.as b/flash_decompiled/com/view/ui/hero/mc/MiBaoItem.as new file mode 100644 index 0000000..7a1c45f --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/MiBaoItem.as @@ -0,0 +1,145 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.text.TextField; + + public class MiBaoItem extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var type:int; + + private var tipStr:String; + + private var mibaoName:String; + + private var hasDo:TextField; + + public var pageType:int; + + private var overBg:Bitmap; + + public var hasStudy:Boolean; + + public function MiBaoItem(param1:int, param2:int) + { + super(); + this.pageType = param2; + this.type = param1; + switch(this.type) + { + case 1: + this.mibaoName = "龙王鼎"; + this.tipStr = "汇神龙出渊之力,可大幅激发体内潜能。玄天秘宝之一,用乌金陨铁熔炼而成
"; + this.tipStr += "宝物升级可大幅提高攻击属性,小幅提高敏捷属性"; + break; + case 2: + this.mibaoName = "雪凤鼎"; + this.tipStr = "汇雪凤冰舞之力,可大幅激发体内潜能。玄天秘宝之一,用乌金陨铁熔炼而成
"; + this.tipStr += "宝物升级可小幅提高攻击属性,大幅提高敏捷属性"; + break; + case 3: + this.mibaoName = "麒麟鼎"; + this.tipStr = "汇麒麟神吼之力,可大幅激发体内潜能。玄天秘宝之一,用乌金陨铁熔炼而成
"; + this.tipStr += "宝物升级可大幅提高攻击属性,小幅提高体力属性"; + break; + case 4: + this.mibaoName = "神农鼎"; + this.tipStr = "汇神农百草之力,可大幅激发体内潜能。玄天秘宝之一,用乌金陨铁熔炼而成
"; + this.tipStr += "宝物升级可小幅提高攻击属性,大幅提高体力属性"; + break; + case 5: + this.mibaoName = "昆仑镜"; + this.tipStr = "汇昆仑太虚之力,可大幅激发体内潜能。玄天秘宝之一,用乌金陨铁熔炼而成
"; + this.tipStr += "宝物升级可大幅提高防御属性,小幅提高敏捷属性"; + break; + case 6: + this.mibaoName = "寒月镜"; + this.tipStr = "汇寒月霜华之力,可大幅激发体内潜能。玄天秘宝之一,用乌金陨铁熔炼而成
"; + this.tipStr += "宝物升级可小幅提高防御属性,大幅提高敏捷属性"; + break; + case 7: + this.mibaoName = "洞天镜"; + this.tipStr = "汇洞天乾坤之力,可大幅激发体内潜能。玄天秘宝之一,用乌金陨铁熔炼而成
"; + this.tipStr += "宝物升级可大幅提高防御属性,小幅提高体力属性"; + break; + case 8: + this.mibaoName = "幽冥镜"; + this.tipStr = "汇幽冥三界之力,可大幅激发体内潜能。玄天秘宝之一,用乌金陨铁熔炼而成
"; + this.tipStr += "宝物升级可小幅提高防御属性,大幅提高体力属性"; + } + if(this.pageType == 1) + { + this.tipStr += "
需求武将等级:90级"; + this.tipStr += "
需求道具:乌金陨铁"; + } + else if(this.pageType == 2) + { + this.tipStr += "
激活条件:主秘宝达到250级"; + } + else if(this.pageType == 3) + { + this.tipStr += "
激活条件:副秘宝达到250级"; + } + else if(this.pageType == 4) + { + this.tipStr += "
激活条件:秘宝神鉴达到250级"; + } + var _loc3_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.item_bg),"auto",true); + addChild(_loc3_); + _loc3_.width = 66; + _loc3_.height = 66; + this.overBg = new Bitmap(this.face.getPng(ClassConfig.item_hover),"auto",true); + addChild(this.overBg); + this.overBg.width = 73; + this.overBg.height = 73; + this.overBg.x = -3; + this.overBg.y = -3; + this.overBg.visible = false; + this.buttonMode = true; + var _loc4_:Bitmap = new Bitmap(this.face.getPng("mibao_text_" + param1),"auto",true); + addChild(_loc4_); + _loc4_.width = 62; + _loc4_.height = 21; + _loc4_.x = 2; + _loc4_.y = 23; + this.hasDo = PublicMethod.getTextField(65280,80); + addChild(this.hasDo); + this.hasDo.x = 10; + this.hasDo.y = 90; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.overBg.visible = true; + } + else + { + this.overBg.visible = false; + } + } + + public function getTip() : String + { + return this.tipStr; + } + + public function getMibaoName() : String + { + return this.mibaoName; + } + + public function setHasDo(param1:Boolean) : void + { + this.hasStudy = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/MibaoUpPage.as b/flash_decompiled/com/view/ui/hero/mc/MibaoUpPage.as new file mode 100644 index 0000000..09b8e65 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/MibaoUpPage.as @@ -0,0 +1,421 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import com.view.newui.UITitleBg; + import com.view.ui.hero.data.HeroSkillData; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MibaoUpPage extends Sprite + { + + private var face:InstallFace; + + private var bg:Sprite; + + private var type:int; + + private var upbtn1:UIButton; + + private var upbtn2:UIButton; + + private var upbtn3:UIButton; + + private var upbtn4:UIButton; + + private var upbtn5:UIButton; + + private var upbtn6:UIButton; + + private var upbtn7:UIButton; + + private var upbtn8:UIButton; + + private var levelText:TextField; + + private var itemVec:Vector.; + + private var percentText:TextField; + + private var valueText1:TextField; + + private var valueText2:TextField; + + private var valueText3:TextField; + + private var mibaoType:int; + + private var mibaoLevel:int; + + private var itemType:int; + + private var heroId:int; + + private var preType:int; + + private var preItem:FengHuangItem; + + public var changeMiBaoF:Function; + + public function MibaoUpPage(param1:int) + { + var _loc6_:TextField = null; + var _loc8_:TextField = null; + var _loc14_:Object = null; + var _loc15_:FengHuangItem = null; + this.face = InstallFace.getInstance(); + super(); + this.type = param1; + var _loc2_:String = "1、升级秘宝需要一定数量的凤凰晶,升级无论成功或者失败,都会消耗凤凰晶
"; + _loc2_ += "2、100级以下秘宝升级成功几率为100%。100级以上秘宝升级与凤凰晶品质有关。
"; + _loc2_ += "3、当前的秘宝可消耗玄天焰来重铸,直接转换成同类型其他秘宝。
"; + _loc2_ += "4、主密保升级所需凤凰初始为10个,每10级所需凤凰增加2个。副秘宝升级所需凤凰固定为60个
"; + _loc2_ += "5、秘宝神鉴升级所需凤凰固定为100个。秘宝魔鉴升级所需凤凰固定为200个"; + var _loc3_:UITitleBg = new UITitleBg("",350); + addChild(_loc3_); + _loc3_.x = 10; + var _loc4_:Bitmap = new Bitmap(this.face.getPng("mibao_text_1")); + _loc3_.addChild(_loc4_); + _loc4_.x = int(_loc3_.width / 2 - _loc4_.width / 2); + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc5_.text = "密保等级:"; + addChild(_loc5_); + _loc5_.x = 20; + _loc5_.y = 33; + this.levelText = PublicMethod.getTextFieldWithFillter(16640697,130); + addChild(this.levelText); + this.levelText.x = _loc5_.x + 60; + this.levelText.y = _loc5_.y; + _loc6_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc6_.text = "升级需求:"; + addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 25; + this.valueText1 = PublicMethod.getTextFieldWithFillter(16640697,160); + addChild(this.valueText1); + this.valueText1.x = this.levelText.x; + this.valueText1.y = _loc6_.y; + this.percentText = PublicMethod.getTextFieldWithFillter(10852210,100); + addChild(this.percentText); + this.percentText.x = 200; + this.percentText.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc7_.text = "当前效果:"; + addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 25; + this.valueText2 = PublicMethod.getTextFieldWithFillter(16640697,300); + addChild(this.valueText2); + this.valueText2.x = this.levelText.x; + this.valueText2.y = _loc7_.y; + _loc8_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc8_.text = "升级效果:"; + addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 25; + this.valueText3 = PublicMethod.getTextFieldWithFillter(16640697,300); + addChild(this.valueText3); + this.valueText3.x = this.levelText.x; + this.valueText3.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc9_.text = "升级道具:"; + addChild(_loc9_); + _loc9_.x = _loc5_.x; + _loc9_.y = _loc8_.y + 25; + this.upbtn1 = new UIButton("升1级",2,10); + addChild(this.upbtn1); + this.upbtn1.x = _loc5_.x; + this.upbtn1.y = _loc9_.y + 38; + this.upbtn1.onClick = this.upMibao; + this.upbtn2 = new UIButton("升50级",2,10); + addChild(this.upbtn2); + this.upbtn2.x = this.upbtn1.x + 80; + this.upbtn2.y = this.upbtn1.y; + this.upbtn2.onClick = this.upMibao10; + this.upbtn3 = new UIButton("升250级",2,10); + addChild(this.upbtn3); + this.upbtn3.x = this.upbtn2.x + 80; + this.upbtn3.y = this.upbtn1.y; + this.upbtn3.onClick = this.upMibao30; + this.upbtn5 = new UIButton("升10级",2,10); + addChild(this.upbtn5); + this.upbtn5.x = this.upbtn1.x - 10; + this.upbtn5.y = this.upbtn1.y; + this.upbtn5.onClick = this.upMibaoNew1; + this.upbtn6 = new UIButton("升100级",2,10); + addChild(this.upbtn6); + this.upbtn6.x = this.upbtn5.x + 70; + this.upbtn6.y = this.upbtn5.y; + this.upbtn6.onClick = this.upMibaoNew2; + this.upbtn7 = new UIButton("升1000级",2,10); + addChild(this.upbtn7); + this.upbtn7.x = this.upbtn6.x + 70; + this.upbtn7.y = this.upbtn5.y; + this.upbtn7.onClick = this.upMibaoNew3; + this.upbtn8 = new UIButton("升10000级",2,10); + addChild(this.upbtn8); + this.upbtn8.x = this.upbtn7.x + 70; + this.upbtn8.y = this.upbtn5.y; + this.upbtn8.onClick = this.upMibaoNew4; + this.upbtn4 = new UIButton("重 铸",2,10); + addChild(this.upbtn4); + this.upbtn4.x = this.upbtn3.x + 80; + this.upbtn4.y = this.upbtn1.y; + this.upbtn4.onClick = this.changeMibao; + var _loc10_:Sprite = PublicMethod.getTrLine(340); + addChild(_loc10_); + _loc10_.x = 10; + _loc10_.y = this.upbtn1.y + 28; + var _loc11_:TextFormat = new TextFormat(); + _loc11_.leading = 3; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(10852210,355); + addChild(_loc12_); + _loc12_.x = 10; + _loc12_.y = _loc10_.y + 5; + _loc12_.wordWrap = true; + _loc12_.multiline = true; + _loc12_.height = 140; + _loc12_.defaultTextFormat = _loc11_; + _loc12_.htmlText = _loc2_; + this.itemVec = new Vector.(); + var _loc13_:int = 1; + while(_loc13_ < 7) + { + _loc14_ = new Object(); + _loc14_.iconPath = "fenghuangjing" + _loc13_ + ".jpg"; + if(_loc13_ == 1) + { + _loc14_.showName = "凡品凤凰晶"; + } + else if(_loc13_ == 2) + { + _loc14_.showName = "上品凤凰晶"; + } + else if(_loc13_ == 3) + { + _loc14_.showName = "极品凤凰晶"; + } + else if(_loc13_ == 4) + { + _loc14_.showName = "绝品凤凰晶"; + } + else if(_loc13_ == 5) + { + _loc14_.showName = "仙品凤凰晶"; + } + else + { + _loc14_.showName = "灵品凤凰晶"; + } + _loc14_.desc = "神秘炎晶,光华四射,乃是升级玄天秘宝的必备材料,品质越高升级秘宝的成功率越高。"; + _loc15_ = new FengHuangItem(_loc14_); + addChild(_loc15_); + this.itemVec.push(_loc15_); + _loc15_.x = 22 + _loc13_ * 58; + if(_loc13_ == 6) + { + _loc15_.x = 80; + } + _loc15_.y = _loc9_.y; + _loc15_.addEventListener(MouseEvent.CLICK,this.clickItem); + _loc13_++; + } + } + + public function setObj(param1:Object) : void + { + this.heroId = param1.heroId; + if(this.type == 1) + { + this.mibaoType = param1.mb1; + this.mibaoLevel = param1.mbl1; + } + else if(this.type == 2) + { + this.mibaoType = param1.mb2; + this.mibaoLevel = param1.mbl2; + } + else if(this.type == 3) + { + this.mibaoType = param1.mb3; + this.mibaoLevel = param1.mbl3; + } + else if(this.type == 4) + { + this.mibaoType = param1.mb4; + this.mibaoLevel = param1.mbl4; + } + this.levelText.text = "Lv" + this.mibaoLevel.toString(); + this.valueText1.htmlText = "凤凰晶" + HeroSkillData.getNeedUpItems(this.mibaoLevel,this.type).toString() + "个"; + this.valueText2.htmlText = HeroSkillData.getEffValue(this.mibaoType,this.mibaoLevel,this.type); + this.valueText3.htmlText = HeroSkillData.getEffValue(this.mibaoType,this.mibaoLevel + 1,this.type); + this.itemVec[0].setItemNums(param1.itemNum1); + this.itemVec[1].setItemNums(param1.itemNum2); + this.itemVec[2].setItemNums(param1.itemNum3); + this.itemVec[3].setItemNums(param1.itemNum4); + this.itemVec[4].setItemNums(param1.itemNum5); + this.itemVec[5].setItemNums(param1.itemNum6); + if(this.preItem) + { + this.preItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + if(this.mibaoLevel > 249) + { + this.upbtn1.visible = false; + this.upbtn2.visible = false; + this.upbtn3.visible = false; + this.upbtn5.visible = true; + this.upbtn6.visible = true; + this.upbtn7.visible = true; + this.upbtn8.visible = true; + this.itemVec[0].visible = false; + this.itemVec[1].visible = false; + this.itemVec[2].visible = false; + this.itemVec[3].visible = false; + this.itemVec[4].visible = false; + this.itemVec[5].visible = true; + this.upbtn4.x = this.upbtn8.x + 70; + this.itemVec[5].dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + this.valueText1.htmlText = "灵品凤凰晶200个"; + } + else + { + this.itemVec[0].visible = true; + this.itemVec[1].visible = true; + this.itemVec[2].visible = true; + this.itemVec[3].visible = true; + this.itemVec[4].visible = true; + this.itemVec[5].visible = false; + this.upbtn1.visible = true; + this.upbtn2.visible = true; + this.upbtn3.visible = true; + this.upbtn5.visible = false; + this.upbtn6.visible = false; + this.upbtn7.visible = false; + this.upbtn8.visible = false; + this.upbtn4.x = this.upbtn3.x + 80; + } + } + + private function clickItem(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:int = 0; + var _loc2_:FengHuangItem = param1.currentTarget as FengHuangItem; + if(this.preItem) + { + this.preItem.setSelect(false); + } + for(_loc3_ in this.itemVec) + { + if(this.itemVec[_loc3_] == _loc2_) + { + this.itemType = int(_loc3_) + 1; + this.itemVec[_loc3_].setSelect(true); + this.preItem = this.itemVec[_loc3_]; + } + } + _loc4_ = HeroSkillData.getUpPercent(this.itemType,this.mibaoLevel); + this.percentText.htmlText = "成功率" + _loc4_ + "%"; + } + + private function upMibao(param1:MouseEvent) : void + { + if(this.preItem == null || this.itemType == 0) + { + MessageBoxUI.getInstance().addMessage("请选择学习所需的凤凰晶"); + return; + } + var _loc2_:int = HeroSkillData.getNeedUpItems(this.mibaoLevel,this.type); + if(this.preItem.currItemNums < _loc2_) + { + MessageBoxUI.getInstance().addMessage("所选择的凤凰晶数量不够升级"); + return; + } + if(this.mibaoLevel >= 250) + { + MessageBoxUI.getInstance().addMessage("当前秘宝已达顶级,无法再升级"); + return; + } + ConnectService.getInstance().heroService.upMiBao(this.heroId,this.type,this.itemType); + } + + private function upMibao10(param1:MouseEvent) : void + { + if(this.preItem == null || this.itemType == 0) + { + MessageBoxUI.getInstance().addMessage("请选择学习所需的凤凰晶"); + return; + } + var _loc2_:int = HeroSkillData.getNeedUpItems(this.mibaoLevel,this.type); + if(this.preItem.currItemNums < 10 * _loc2_) + { + MessageBoxUI.getInstance().addMessage("所选择的凤凰晶数量不够升级"); + return; + } + if(this.mibaoLevel >= 250) + { + MessageBoxUI.getInstance().addMessage("当前秘宝已达顶级,无法再升级"); + return; + } + ConnectService.getInstance().heroService.upMiBao10(this.heroId,this.type,this.itemType,50); + } + + private function upMibao30(param1:MouseEvent) : void + { + if(this.preItem == null || this.itemType == 0) + { + MessageBoxUI.getInstance().addMessage("请选择学习所需的凤凰晶"); + return; + } + var _loc2_:int = HeroSkillData.getNeedUpItems(this.mibaoLevel,this.type); + if(this.preItem.currItemNums < 30 * _loc2_) + { + MessageBoxUI.getInstance().addMessage("所选择的凤凰晶数量不够升级"); + return; + } + if(this.mibaoLevel >= 250) + { + MessageBoxUI.getInstance().addMessage("当前秘宝已达顶级,无法再升级"); + return; + } + ConnectService.getInstance().heroService.upMiBao10(this.heroId,this.type,this.itemType,250); + } + + private function upMibaoNew1(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.upMiBaoNew(this.heroId,this.type,10); + } + + private function upMibaoNew2(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.upMiBaoNew(this.heroId,this.type,100); + } + + private function upMibaoNew3(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.upMiBaoNew(this.heroId,this.type,1000); + } + + private function upMibaoNew4(param1:MouseEvent) : void + { + ConnectService.getInstance().heroService.upMiBaoNew(this.heroId,this.type,10000); + } + + private function changeMibao(param1:MouseEvent) : void + { + if(Boolean(this.changeMiBaoF)) + { + this.changeMiBaoF(this.type); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/XiangqianMc.as b/flash_decompiled/com/view/ui/hero/mc/XiangqianMc.as new file mode 100644 index 0000000..8cd4657 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/XiangqianMc.as @@ -0,0 +1,147 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.view.cache.ImgCache; + import com.view.tip.YuboTip; + import com.view.ui.hero.data.ChaoFuData; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class XiangqianMc extends Sprite + { + + private var itemImgMc:Sprite; + + private var face:InstallFace = InstallFace.getInstance(); + + private var type:int; + + public var tipTitle:YuboTip; + + private var obj:Object; + + private var baoshiObj:Object; + + private var itemImg:Bitmap; + + private var loadItemPng:LoadResource; + + public function XiangqianMc(param1:int) + { + super(); + this.type = param1; + var _loc2_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_exchange_4)); + addChild(_loc2_); + this.itemImgMc = new Sprite(); + addChild(this.itemImgMc); + this.itemImgMc.x = _loc2_.x + 6; + this.itemImgMc.y = _loc2_.y + 6; + } + + public function getBaoShiObj() : Object + { + return this.baoshiObj; + } + + public function loadObj(param1:Object) : void + { + var _loc2_:int = 0; + var _loc3_:Object = null; + var _loc4_:String = null; + this.obj = param1; + if(this.obj == null) + { + this.baoshiObj = null; + if(Boolean(this.itemImg) && this.itemImgMc.contains(this.itemImg)) + { + this.itemImgMc.removeChild(this.itemImg); + } + if(this.tipTitle) + { + this.tipTitle.destroyTip(); + this.tipTitle = null; + } + return; + } + if(this.type == 1) + { + _loc2_ = int(param1.hole1); + } + if(this.type == 2) + { + _loc2_ = int(param1.hole2); + } + if(this.type == 3) + { + _loc2_ = int(param1.hole3); + } + if(_loc2_ > 0) + { + this.baoshiObj = ChaoFuData.getObjByEntid(_loc2_); + } + else + { + this.baoshiObj = null; + } + if(this.baoshiObj == null) + { + if(this.tipTitle) + { + this.tipTitle.destroyTip(); + this.tipTitle = null; + } + } + else if(this.tipTitle == null) + { + _loc3_ = new Object(); + this.tipTitle = new YuboTip(this.itemImgMc,this.face.stage,this.face.tip_bg,this.baoshiObj); + } + else + { + this.tipTitle.setTipData(this.baoshiObj); + } + if(Boolean(this.itemImg) && this.itemImgMc.contains(this.itemImg)) + { + this.itemImgMc.removeChild(this.itemImg); + } + if(this.baoshiObj) + { + _loc4_ = ServerConfig.IMAGE_ITEM_URL + this.baoshiObj.iconPath; + if(ImgCache.getInstance().getImg(_loc4_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc4_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(_loc4_,this.loadPngBack); + } + } + } + + private function loadPngBack(param1:Event) : void + { + if(this.baoshiObj == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemImgMc.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + } + } +} + diff --git a/flash_decompiled/com/view/ui/hero/mc/YuBoItem.as b/flash_decompiled/com/view/ui/hero/mc/YuBoItem.as new file mode 100644 index 0000000..f1e2127 --- /dev/null +++ b/flash_decompiled/com/view/ui/hero/mc/YuBoItem.as @@ -0,0 +1,118 @@ +package com.view.ui.hero.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class YuBoItem extends Sprite + { + + private var itemName:TextField; + + private var itemNums:TextField; + + private var radioBtn:UIRadioBtn; + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var itemObj:PackItem; + + private var face:InstallFace = InstallFace.getInstance(); + + public function YuBoItem() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,272,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,272,25); + this.bg2.alpha = 0.3; + addChild(this.bg2); + this.bg2.visible = false; + var _loc1_:Sprite = PublicMethod.getTrLine(270); + addChild(_loc1_); + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,125); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 5; + this.radioBtn.y = 3; + this.radioBtn.visible = false; + addChild(this.itemName); + this.itemName.x = this.radioBtn.x + this.radioBtn.width + 2; + this.itemName.y = 4; + this.itemNums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + addChild(this.itemNums); + this.itemNums.x = this.itemName.x + this.itemName.width; + this.itemNums.y = 4; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.itemNums.defaultTextFormat = PublicMethod.getCenterTextFormat(); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.itemObj) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.itemObj) + { + this.bg1.visible = true; + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.radioBtn.setSelect(); + this.bg1.visible = false; + this.bg2.visible = true; + } + else + { + this.radioBtn.setUnSelect(); + this.bg2.visible = false; + } + } + + public function setItemObject(param1:PackItem) : void + { + if(this.itemObj == null && param1 == null) + { + return; + } + this.itemObj = param1; + if(this.itemObj) + { + this.radioBtn.visible = true; + this.itemName.htmlText = this.itemObj.viewMap.showName; + this.itemNums.text = this.itemObj.itemCount + ""; + } + else + { + this.radioBtn.visible = false; + this.itemName.text = ""; + this.itemNums.text = ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/herobattle/AutoBattleSetUI.as b/flash_decompiled/com/view/ui/herobattle/AutoBattleSetUI.as new file mode 100644 index 0000000..9d3c111 --- /dev/null +++ b/flash_decompiled/com/view/ui/herobattle/AutoBattleSetUI.as @@ -0,0 +1,163 @@ +package com.view.ui.herobattle +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.HeroBabelEvent; + 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; + + public class AutoBattleSetUI extends UIWindowBg + { + + private var bg:UIWindowBg; + + private var checkBox:UICheckBtn; + + private var input:UINumInputText; + + private var currBattleNums:int; + + private var currBattle:int; + + private var label5:TextField; + + private var isAutoTrea:Boolean; + + public function AutoBattleSetUI() + { + var _loc3_:TextField = null; + var _loc6_:UIButton = null; + var _loc7_:UIButton = null; + super(); + initSize(115,220); + loadTitle(UITitleConfig.title_tiaojianshezhi); + addCloseBtn(); + initBg(); + this.bg = new UIWindowBg(); + this.bg.initSecondPanel(266,170); + bg1.addChild(this.bg); + this.bg.x = 20; + this.bg.y = 20; + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc1_.text = "自动医疗:"; + this.bg.addChild(_loc1_); + _loc1_.x = 20; + _loc1_.y = 20; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc2_.text = "自动医疗受伤武将(健康幅度低于80时)"; + this.bg.addChild(_loc2_); + _loc2_.x = 45; + _loc2_.y = 45; + this.checkBox = new UICheckBtn(); + this.bg.addChild(this.checkBox); + this.checkBox.x = 20; + this.checkBox.y = 45; + this.checkBox.onClick = this.clickCheckBox; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc3_.text = "自动停止:"; + this.bg.addChild(_loc3_); + _loc3_.x = 30; + _loc3_.y = 80; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc4_.text = "打过第 关时自动停止"; + this.bg.addChild(_loc4_); + _loc4_.x = 30; + _loc4_.y = 106; + this.input = new UINumInputText(50); + this.input.hiddenBtn(); + this.bg.addChild(this.input); + this.input.x = 72; + this.input.y = 104; + this.input.hiddenBtn(); + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + this.bg.addChild(this.label5); + this.label5.x = 30; + this.label5.y = 130; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,150); + _loc5_.text = "注:失败时会自动停止"; + this.bg.addChild(_loc5_); + _loc5_.x = 30; + _loc5_.y = 150; + _loc6_ = new UIButton("确 定",2,10); + _loc7_ = new UIButton("取 消",2,10); + bg1.addChild(_loc6_); + bg1.addChild(_loc7_); + _loc6_.x = 80; + _loc6_.y = 210; + _loc7_.x = _loc6_.x + _loc6_.width + 30; + _loc7_.y = _loc6_.y; + _loc7_.onClick = closeSelf; + _loc6_.onClick = this.editEvent; + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_AUTOSET,this.saveAutoResult); + } + + public function setBattleNums(param1:int) : void + { + this.currBattleNums = param1; + this.input.setMaxChars(10); + this.input.setMaxNum(this.currBattleNums); + this.input.setTextNum(this.currBattleNums); + this.label5.text = "本战役有 " + this.currBattleNums + " 关"; + } + + public function setCurrBattle(param1:int) : void + { + this.currBattle = param1 + 1; + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function editEvent(param1:MouseEvent) : void + { + var _loc2_:int = 0; + if(this.isAutoTrea) + { + _loc2_ = 1; + } + var _loc3_:int = this.input.getTextNum(); + if(_loc3_ < this.currBattle) + { + MessageBoxUI.getInstance().addMessage("您已挑战过该楼层."); + return; + } + ConnectService.getInstance().playService.saveAutoConfig(_loc2_,_loc3_); + } + + public function setContent(param1:String) : void + { + } + + private function clickCheckBox(param1:MouseEvent) : void + { + if(this.isAutoTrea) + { + this.isAutoTrea = false; + this.checkBox.setUnSelect(); + } + else + { + this.isAutoTrea = true; + this.checkBox.setSelect(); + } + } + + private function saveAutoResult(param1:HeroBabelEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/herobattle/HeroBattleBuild.as b/flash_decompiled/com/view/ui/herobattle/HeroBattleBuild.as new file mode 100644 index 0000000..40cabe1 --- /dev/null +++ b/flash_decompiled/com/view/ui/herobattle/HeroBattleBuild.as @@ -0,0 +1,54 @@ +package com.view.ui.herobattle +{ + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import com.view.ui.lingyange.LingYanGeUI; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class HeroBattleBuild extends BaseBuild + { + + public function HeroBattleBuild(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/tianguan.swf"; + super.buildData = param1; + super.loadSwfBg(); + super.addEvent(); + super.createNpcTip(); + this.buttonMode = true; + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

凌烟阁

"; + npcTipStr += "大将出征前用以发布檄文和展示武勇的场所,得胜的武将获得功勋并有很大的几率领悟成长
"; + npcTipStr += "君主15级可参加"; + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(buildUI == null) + { + buildUI = new LingYanGeUI(); + } + UIListManage.getInstance().addUI(buildUI); + } + + override public function getBuildNameMc() : MovieClip + { + if(_nameMc == null) + { + _nameMc = getBuildNameSp("过关斩将"); + _nameMc.mouseEnabled = false; + _nameMc.mouseChildren = false; + _nameMc.x = 70; + _nameMc.y = 40; + } + return _nameMc; + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/BossResultUI.as b/flash_decompiled/com/view/ui/heroboss/BossResultUI.as new file mode 100644 index 0000000..af8a228 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/BossResultUI.as @@ -0,0 +1,58 @@ +package com.view.ui.heroboss +{ + import com.common.PublicMethod; + 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; + + public class BossResultUI extends UIWindowBg + { + + private var label2:TextField; + + public var closeF:Function; + + public function BossResultUI() + { + super(); + initSize(175,120); + loadTitle(UITitleConfig.title_zhandoujieguo); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,350); + bg1.addChild(_loc1_); + _loc1_.x = 35; + _loc1_.y = 20; + _loc1_.text = "你对征伐曜甲神将的事业做出了伟大的贡献,请再接再厉"; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(280,30); + bg1.addChild(_loc2_); + _loc2_.x = 40; + _loc2_.y = 54; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,280); + _loc2_.addChild(this.label2); + this.label2.x = 5; + this.label2.y = 8; + var _loc3_:UIButton = new UIButton("确 定",2,10); + bg1.addChild(_loc3_); + _loc3_.x = 140; + _loc3_.y = 110; + _loc3_.onClick = this.closeResult; + } + + public function setMsg(param1:String) : void + { + this.label2.htmlText = "伤害统计 本次对曜甲神将的伤害:" + param1 + ""; + } + + private function closeResult(param1:MouseEvent) : void + { + this.closeF(); + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/DamageRankMc.as b/flash_decompiled/com/view/ui/heroboss/DamageRankMc.as new file mode 100644 index 0000000..8025fe1 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/DamageRankMc.as @@ -0,0 +1,117 @@ +package com.view.ui.heroboss +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class DamageRankMc extends Sprite + { + + private var numText:TextField; + + private var nameText:TextField; + + private var damageText:TextField; + + private var css:TextFormat = new TextFormat(); + + private var bg1:Sprite; + + private var rankObj:Object; + + public function DamageRankMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(230); + addChild(_loc1_); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,230,23); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.numText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40); + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.damageText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.numText); + addChild(this.nameText); + addChild(this.damageText); + this.numText.x = 5; + this.numText.y = 4; + this.nameText.y = this.numText.y; + this.damageText.y = this.numText.y; + this.nameText.x = this.numText.width; + this.damageText.x = this.nameText.x + this.nameText.width; + this.nameText.mouseEnabled = true; + this.nameText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.rankObj) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.rankObj) + { + this.bg1.visible = true; + } + } + + public function setObj(param1:Object) : void + { + this.rankObj = param1; + var _loc2_:int = int(param1.rankId); + if(_loc2_ == 1) + { + this.css.color = 16750693; + } + else if(_loc2_ == 2) + { + this.css.color = 13369599; + } + else if(_loc2_ == 3) + { + this.css.color = 1048575; + } + else + { + this.css.color = UIConfig.textColor; + } + this.numText.text = param1.rankId; + var _loc3_:String = param1.rankId + "、"; + if(param1.userName) + { + _loc3_ = "" + param1.userName + ""; + this.damageText.htmlText = param1.damage; + } + else + { + _loc3_ = "无"; + this.damageText.htmlText = ""; + } + this.nameText.htmlText = _loc3_; + this.nameText.setTextFormat(this.css); + this.damageText.setTextFormat(this.css); + this.numText.setTextFormat(this.css); + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/HeroBoss.as b/flash_decompiled/com/view/ui/heroboss/HeroBoss.as new file mode 100644 index 0000000..1f1e8c7 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/HeroBoss.as @@ -0,0 +1,43 @@ +package com.view.ui.heroboss +{ + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class HeroBoss extends BaseBuild + { + + private var tipStr:String; + + public function HeroBoss(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/heroboss.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 HeroBossUI(); + } + buildUI.show(); + } + + override public function getBuildNameMc() : MovieClip + { + return null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/HeroBossFightUI.as b/flash_decompiled/com/view/ui/heroboss/HeroBossFightUI.as new file mode 100644 index 0000000..f961d53 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/HeroBossFightUI.as @@ -0,0 +1,407 @@ +package com.view.ui.heroboss +{ + import com.data.data.battleview.FightCode; + import com.data.data.battleview.FighterData; + import com.newdata.user.NewUserData; + import com.view.ui.battle.BattleUI; + import com.view.ui.battleview.AttackType; + import com.view.ui.battleview.Fighter; + import com.view.ui.battleview.charactor.Direction; + import com.view.ui.battleview.mc.BattleOver; + import com.view.ui.battleview.mc.BattleTextBar; + import com.view.ui.heroboss.mc.BeginFightMc; + import com.view.ui.heroboss.mc.LeftHeroMc; + import com.view.ui.heroboss.mc.RightHeroMc; + import com.view.ui.heroboss.mc.RoundMc; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.utils.setTimeout; + + public class HeroBossFightUI extends BattleUI + { + + private static var instance:HeroBossFightUI; + + private var fightBg:Sprite; + + private var leftHeroHead:LeftHeroMc; + + private var rightHeroHead:RightHeroMc; + + private var uiTextBar:BattleTextBar; + + private var bgWidth:int = 1440; + + private var bgHeight:int = 900; + + private var fightData:Object; + + private var heroList:Array; + + private var fightDfc:Fighter; + + private var fightAtk:Fighter; + + private var currRound:int; + + private var beginMc:BeginFightMc; + + private var roundMc:RoundMc; + + private var codesArr:Array; + + private var roundStep:int; + + private var roundAtkFight:Fighter; + + private var roundDfcFight:Fighter; + + private var battleOverMc:BattleOver; + + private var result:BossResultUI; + + public function HeroBossFightUI() + { + super(); + if(instance != null) + { + throw new Error("不能实例"); + } + } + + public static function getInstance() : HeroBossFightUI + { + if(instance == null) + { + instance = new HeroBossFightUI(); + } + return instance; + } + + override public function createUI() : void + { + this.fightBg = battleRes.getSprite("boss_bg"); + this.leftHeroHead = new LeftHeroMc(); + this.rightHeroHead = new RightHeroMc(); + this.uiTextBar = new BattleTextBar(270); + this.fightBg.addChild(this.leftHeroHead); + this.fightBg.addChild(this.rightHeroHead); + this.fightBg.addChild(this.uiTextBar); + this.setBattlePosi(); + this.initFight(); + this.beginMc = new BeginFightMc(); + this.fightBg.addChild(this.beginMc); + this.beginMc.x = 720; + this.beginMc.y = 450; + this.beginMc.backFun = this.playRoundMc; + this.roundMc = new RoundMc(); + this.fightBg.addChild(this.roundMc); + this.roundMc.x = 620; + this.roundMc.y = 350; + this.roundMc.backF = this.startFight; + this.beginRound(); + } + + override public function setPosition() : void + { + this.setBattlePosi(); + } + + private function setBattlePosi() : void + { + if(this.fightBg == null) + { + return; + } + this.fightBg.x = (face.realWidth - this.bgWidth) / 2; + this.fightBg.y = (face.realHeight - this.bgHeight) / 2; + this.leftHeroHead.x = -this.fightBg.x; + this.leftHeroHead.y = -this.fightBg.y; + this.rightHeroHead.x = this.leftHeroHead.x + face.realWidth; + this.rightHeroHead.y = this.leftHeroHead.y; + this.uiTextBar.x = this.rightHeroHead.x - 286; + this.uiTextBar.y = this.rightHeroHead.y + face.realHeight - 115; + } + + override public function closeUI(param1:MouseEvent) : void + { + if(face.stage.contains(this.fightBg)) + { + face.stage.removeChild(this.fightBg); + } + } + + public function setFightData(param1:Object) : void + { + this.fightData = param1; + if(this.fightBg == null) + { + return; + } + this.uiTextBar.clear(); + this.beginRound(); + } + + public function beginRound() : void + { + this.currRound = 1; + this.heroList = this.fightData.heroMapList as Array; + this.leftHeroHead.setHeroList(this.heroList); + this.initDfc(this.fightData.bossMap); + this.playBeginMc(); + face.stage.addChild(this.fightBg); + } + + private function initFight() : void + { + this.fightDfc = new Fighter(); + this.fightAtk = new Fighter(); + this.fightAtk.setDirection(Direction.RIGHT); + this.fightAtk.type = 1; + this.fightAtk.initLight(); + this.fightDfc.setDirection(Direction.LEFT); + this.fightDfc.type = 2; + this.fightDfc.initLight(); + this.fightBg.addChildAt(this.fightDfc,this.fightBg.getChildIndex(this.uiTextBar)); + this.fightBg.addChildAt(this.fightAtk,this.fightBg.getChildIndex(this.uiTextBar)); + } + + private function playBeginMc() : void + { + var _loc1_:int = 0; + this.fightDfc.x = 900; + this.fightDfc.y = 680; + if(this.currRound == 1) + { + this.initAtk(this.fightData.fight1.atkFight); + this.codesArr = this.fightData.fight1.codes; + _loc1_ = int(this.fightData.fight1.atkFight.initBloodNum); + } + else if(this.currRound == 2) + { + this.initAtk(this.fightData.fight2.atkFight); + this.codesArr = this.fightData.fight2.codes; + _loc1_ = int(this.fightData.fight2.atkFight.initBloodNum); + } + else + { + this.initAtk(this.fightData.fight3.atkFight); + this.codesArr = this.fightData.fight3.codes; + _loc1_ = int(this.fightData.fight3.atkFight.initBloodNum); + } + this.leftHeroHead.setCurrHero(this.currRound - 1); + this.leftHeroHead.setBloodMax(_loc1_); + this.beginMc.play(); + this.roundStep = 0; + } + + private function playRoundMc() : void + { + this.roundMc.playRound(this.currRound); + } + + private function startFight() : void + { + if(this.currRound == 1) + { + this.uiTextBar.print("- - - - - - - - - - - -第一回合- - - - - - - - - - - -"); + } + else if(this.currRound == 2) + { + this.uiTextBar.print("
- - - - - - - - - - - -第二回合- - - - - - - - - - - -"); + } + else + { + this.uiTextBar.print("
- - - - - - - - - - - -第三回合- - - - - - - - - - - -"); + } + this.fight(); + } + + public function initDfc(param1:FighterData) : void + { + this.fightDfc.sex = param1.hero.gen; + this.fightDfc.fighter = param1; + this.fightDfc.isBoss = true; + this.fightDfc.getImgData(); + this.fightDfc.x = 900; + this.fightDfc.y = 680; + } + + public function initAtk(param1:FighterData) : void + { + this.fightAtk.sex = param1.hero.gen; + this.fightAtk.fighter = param1; + this.fightAtk.getImgData(); + this.fightAtk.x = 600; + this.fightAtk.y = 680; + } + + private function fight() : void + { + var codes:FightCode; + if(this.roundStep >= this.codesArr.length) + { + return; + } + codes = new FightCode(this.codesArr[this.roundStep]); + if(codes.codeType == AttackType.RESULT) + { + this.battleOver(); + return; + } + if(codes.atkId == this.fightAtk.fighter.hero.heroId) + { + this.roundAtkFight = this.fightAtk; + this.roundDfcFight = this.fightDfc; + } + else + { + this.roundAtkFight = this.fightDfc; + this.roundDfcFight = this.fightAtk; + } + if(this.roundAtkFight.fighter.hero.heroId < 0) + { + this.roundAtkFight.currBlood = 99999999; + this.roundAtkFight.fighter.initBloodNum = 99999999; + } + if(this.roundDfcFight.fighter.hero.heroId < 0) + { + this.roundDfcFight.currBlood = 99999999; + this.roundDfcFight.fighter.initBloodNum = 99999999; + } + switch(codes.codeType) + { + case AttackType.KILL_NORMAL: + this.batAttack(this.roundAtkFight,this.roundDfcFight,codes.codeType,codes.paraNum1); + break; + case AttackType.KILL_CRITICAL: + this.batAttack(this.roundAtkFight,this.roundDfcFight,codes.codeType,codes.paraNum1); + break; + case AttackType.KILL_DODGE: + this.batAttack(this.roundAtkFight,this.roundDfcFight,codes.codeType,codes.paraNum1); + break; + case AttackType.KILL_GUARD: + this.batAttack(this.roundAtkFight,this.roundDfcFight,codes.codeType,codes.paraNum1); + break; + case AttackType.SKILL_SEND: + case AttackType.RESULT: + case AttackType.KILL_DOT: + } + ++this.roundStep; + setTimeout(function():void + { + fight(); + },2000); + } + + private function battleOver() : void + { + this.uiTextBar.print("本回合战况:【" + this.fightAtk.fighter.hero.showName + "】失败,【曜甲神将】胜利"); + if(this.currRound < this.heroList.length) + { + this.playOverMc(); + } + else + { + this.uiTextBar.print("
- - - - - - - - - - - -最终战况- - - - - - - - - - - -"); + this.uiTextBar.print("君主【" + NewUserData.getUser().userName + "】完败,君主【曜甲神将】完胜"); + this.showResult(); + } + } + + private function playOverMc() : void + { + if(this.battleOverMc == null) + { + this.battleOverMc = new BattleOver(); + this.battleOverMc.x = 720; + this.battleOverMc.y = 340; + } + this.fightBg.addChild(this.battleOverMc); + this.battleOverMc.lost(); + setTimeout(function():void + { + ++currRound; + playBeginMc(); + },3000); + } + + private function showResult() : void + { + if(this.result == null) + { + this.result = new BossResultUI(); + this.result.closeF = this.closeFightUI; + this.result.x = int(this.bgWidth / 2 - this.result.width / 2); + this.result.y = int(this.bgHeight / 2 - this.result.height / 2); + } + this.fightBg.addChild(this.result); + this.result.setMsg(this.fightData.damageBoss); + } + + public function closeFightUI() : void + { + this.closeUI(null); + } + + private function batAttack(param1:Fighter, param2:Fighter, param3:String, param4:int) : void + { + param1.attack(param2,param4,param3); + if(param2.fighter.hero.heroId > 0) + { + this.updataBlood(param2,param4); + } + var _loc5_:String = ""; + var _loc6_:String = ""; + if(param1.type == 1) + { + _loc5_ = "" + param1.fighter.hero.name + ""; + _loc6_ = "" + param2.fighter.hero.name + ""; + } + else + { + _loc5_ = "" + param1.fighter.hero.name + ""; + _loc6_ = "" + param2.fighter.hero.name + ""; + } + var _loc7_:String = "" + param4 + ""; + var _loc8_:String = ""; + switch(param3) + { + case AttackType.KILL_NORMAL: + _loc8_ = "【" + _loc5_ + "】攻击了【" + _loc6_ + "】造成了" + _loc7_ + "伤害"; + break; + case AttackType.KILL_CAROM: + _loc8_ = "【" + _loc5_ + "】连击了【" + _loc6_ + "】造成了" + _loc7_ + "伤害"; + break; + case AttackType.KILL_CRITICAL: + _loc8_ = "【" + _loc5_ + "】暴击了【" + _loc6_ + "】造成了" + _loc7_ + "伤害"; + break; + case AttackType.KILL_DODGE: + _loc8_ = "【" + _loc6_ + "】闪避了【" + _loc5_ + "】的进攻"; + break; + case AttackType.KILL_GUARD: + _loc8_ = "【" + _loc6_ + "】格挡了【" + _loc5_ + "】的进攻"; + break; + case AttackType.KILL_COUNTER: + _loc8_ = "【" + _loc5_ + "】反击了【" + _loc6_ + "】造成了" + _loc7_ + "伤害"; + } + this.uiTextBar.print(_loc8_); + } + + private function updataBlood(param1:Fighter, param2:int) : void + { + param1.currBlood -= param2; + if(param1.currBlood < 0) + { + param1.currBlood = 0; + } + if(param1.currBlood == 0) + { + this.leftHeroHead.setCurrBlood(); + this.leftHeroHead.setHeroDied(this.currRound - 1); + } + this.leftHeroHead.setCurrBlood(param1.currBlood); + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/HeroBossUI.as b/flash_decompiled/com/view/ui/heroboss/HeroBossUI.as new file mode 100644 index 0000000..68a825d --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/HeroBossUI.as @@ -0,0 +1,647 @@ +package com.view.ui.heroboss +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.play.event.HeroBabelEvent; + import com.data.data.hero.Hero; + import com.view.mc.button.Button_9; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + 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.hero.HeroListSelectUI; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import com.view.world.ui.CastleUserUI; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HeroBossUI extends PlayUI + { + + private var bg1:UIWindowBg; + + private var viewFight:ComboBox; + + private var tft:TextFormat; + + private var todayNumsText:TextField; + + private var heroMc1:MyHeroMc; + + private var heroMc2:MyHeroMc; + + private var heroMc3:MyHeroMc; + + private var getGift:UIButton; + + private var getDaily:UIButton; + + private var rankView:Button_9; + + private var ranklistMc:Vector. = new Vector.(); + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var rankList:Array; + + private var exchangeBtn:UIButton; + + private var rankAward:String = null; + + private var hasFightTimes:int = 1; + + private var topLog_1:TextField; + + private var topLog_2:TextField; + + private var topLog_3:TextField; + + private var topLog_4:TextField; + + private var topLog_5:TextField; + + private var heroIdList:Vector. = new Vector.(); + + public function HeroBossUI() + { + super(); + } + + override public function setPosition() : void + { + super.setPosition(); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 260; + window_heihgt = UIWindowBg.normal_window_h + 150; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 260; + ui_closeBtn.y = 10; + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg1.addChild(param1); + param1.x = 260; + param1.y = 20; + } + + override public function createUI() : void + { + var _loc2_:UIWindowBg = null; + var _loc4_:TextFormat = null; + var _loc5_:UIWindowBg = null; + var _loc24_:DamageRankMc = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_shenjiang); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + 260,400 + 150); + addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:String = "pic/bg/bg_shenjiang.png"; + loadBg(_loc1_); + _loc2_ = new UIWindowBg(); + _loc2_.initThirdPanel(230,300); + this.bg1.addChild(_loc2_); + _loc2_.x = 14; + _loc2_.y = 14; + var _loc3_:UITitleBg = new UITitleBg("历史战绩",_loc2_.width); + _loc2_.addChild(_loc3_); + _loc4_ = new TextFormat(); + _loc4_.leading = 4; + _loc5_ = new UIWindowBg(); + _loc5_.initThirdPanel(220,40); + _loc2_.addChild(_loc5_); + _loc5_.x = 5; + _loc5_.y = 30; + this.topLog_1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,220); + _loc5_.addChild(this.topLog_1); + this.topLog_1.wordWrap = true; + this.topLog_1.multiline = true; + this.topLog_1.height = 42; + this.topLog_1.x = 4; + this.topLog_1.y = 4; + this.topLog_1.defaultTextFormat = _loc4_; + var _loc6_:UIWindowBg = new UIWindowBg(); + _loc6_.initThirdPanel(220,40); + _loc2_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + _loc5_.height + 5; + this.topLog_2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,220); + _loc6_.addChild(this.topLog_2); + this.topLog_2.wordWrap = true; + this.topLog_2.multiline = true; + this.topLog_2.height = 42; + this.topLog_2.x = 4; + this.topLog_2.y = 4; + this.topLog_2.defaultTextFormat = _loc4_; + var _loc7_:UIWindowBg = new UIWindowBg(); + _loc7_.initThirdPanel(220,40); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + _loc6_.height + 5; + this.topLog_3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,220); + _loc7_.addChild(this.topLog_3); + this.topLog_3.wordWrap = true; + this.topLog_3.multiline = true; + this.topLog_3.height = 42; + this.topLog_3.x = 4; + this.topLog_3.y = 4; + this.topLog_3.defaultTextFormat = _loc4_; + var _loc8_:UIWindowBg = new UIWindowBg(); + _loc8_.initThirdPanel(220,40); + _loc2_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + _loc7_.height + 5; + this.topLog_4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,220); + _loc8_.addChild(this.topLog_4); + this.topLog_4.wordWrap = true; + this.topLog_4.multiline = true; + this.topLog_4.height = 42; + this.topLog_4.x = 4; + this.topLog_4.y = 4; + this.topLog_4.defaultTextFormat = _loc4_; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initThirdPanel(220,40); + _loc2_.addChild(_loc9_); + _loc9_.x = _loc5_.x; + _loc9_.y = _loc8_.y + _loc8_.height + 5; + this.topLog_5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,220); + _loc9_.addChild(this.topLog_5); + this.topLog_5.wordWrap = true; + this.topLog_5.multiline = true; + this.topLog_5.height = 42; + this.topLog_5.x = 4; + this.topLog_5.y = 4; + this.topLog_5.defaultTextFormat = _loc4_; + var _loc10_:UIWindowBg = new UIWindowBg(); + _loc10_.initSecondPanel(232,395); + this.bg1.addChild(_loc10_); + _loc10_.x = 645; + _loc10_.y = _loc2_.y; + var _loc11_:UITitleBg = new UITitleBg("伤害排行",_loc10_.width); + _loc10_.addChild(_loc11_); + var _loc12_:Array = ["名次","君主名称","伤害值"]; + var _loc13_:Array = [40,100,100]; + var _loc14_:UITable = new UITable(); + _loc14_.drawLine = true; + _loc14_.lineHeight = 24; + _loc14_.drawLine = false; + _loc14_.install(12,_loc12_,_loc13_); + _loc10_.addChild(_loc14_); + _loc14_.x = 2; + _loc14_.y = 26; + this.getGift = new UIButton("领取奖励",2,10); + _loc10_.addChild(this.getGift); + this.getGift.x = 89; + this.getGift.y = 352; + this.getGift.onClick = this.getRankGift; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,226); + _loc10_.addChild(_loc15_); + _loc15_.x = 5; + _loc15_.y = 380; + _loc15_.text = "当前为昨日排行。排行榜每天0点30分刷新"; + _loc4_ = new TextFormat(); + _loc4_.leading = 4; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,330); + _loc16_.height = 60; + _loc16_.wordWrap = true; + _loc16_.multiline = true; + this.bg1.addChild(_loc16_); + _loc16_.defaultTextFormat = _loc4_; + _loc16_.x = 315; + _loc16_.y = 265; + var _loc17_:String = "1、请在每天1:30-23:50之间进行挑战和领取奖励。
"; + _loc17_ = _loc17_ + "2、伤害排行记录所有武将对BOSS的伤害之和。
"; + _loc17_ = _loc17_ + "3、BOSS的伤害无法被闪避,玩家无法对其造成暴击。"; + _loc16_.htmlText = _loc17_; + this.todayNumsText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,140); + this.bg1.addChild(this.todayNumsText); + this.todayNumsText.x = _loc16_.x + 30; + this.todayNumsText.y = _loc16_.y + 65; + this.todayNumsText.text = "今日剩余挑战次数:0"; + this.getDaily = new UIButton("领取每日奖励",3,10); + this.bg1.addChild(this.getDaily); + this.getDaily.x = this.todayNumsText.x + this.todayNumsText.width; + this.getDaily.y = this.todayNumsText.y - 3; + this.getDaily.onClick = this.getDailyGift; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(65280,110); + _loc18_.text = "是否观看战斗动画:"; + this.bg1.addChild(_loc18_); + _loc18_.x = 300; + _loc18_.y = 380; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.viewFight = new ComboBox(); + this.viewFight.addItem({ + "label":"否", + "data":1 + }); + this.viewFight.addItem({ + "label":"是", + "data":2 + }); + this.viewFight.width = 60; + this.bg1.addChild(this.viewFight); + this.viewFight.textField.setStyle("textFormat",this.tft); + this.viewFight.dropdown.setRendererStyle("textFormat",this.tft); + this.viewFight.x = _loc18_.x + _loc18_.width; + this.viewFight.y = _loc18_.y - 3; + this.exchangeBtn = new UIButton("挑 战",2,10); + this.bg1.addChild(this.exchangeBtn); + this.exchangeBtn.x = this.viewFight.x + 70; + this.exchangeBtn.y = this.viewFight.y; + this.exchangeBtn.onClick = this.startFight; + var _loc19_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_img_border),849,86); + var _loc20_:Sprite = PublicMethod.createShape(2696479,int(_loc19_.width),int(_loc19_.height)); + _loc20_.addChild(_loc19_); + this.bg1.addChild(_loc20_); + _loc20_.x = 5; + _loc20_.y = 430; + var _loc21_:UIButton = new UIButton("选择武将",2,10); + var _loc22_:UIButton = new UIButton("医疗武将",2,10); + _loc20_.addChild(_loc21_); + _loc20_.addChild(_loc22_); + _loc21_.x = 45; + _loc21_.y = 28; + _loc22_.x = _loc21_.x; + _loc22_.y = 64; + _loc21_.onClick = this.selectHero; + _loc22_.onClick = this.treatHeroAllHero; + this.heroMc1 = new MyHeroMc(); + this.heroMc2 = new MyHeroMc(); + this.heroMc3 = new MyHeroMc(); + _loc20_.addChild(this.heroMc1); + _loc20_.addChild(this.heroMc2); + _loc20_.addChild(this.heroMc3); + this.heroMc1.x = 142; + this.heroMc1.y = 25; + this.heroMc2.x = this.heroMc1.x + 200; + this.heroMc2.y = this.heroMc1.y; + this.heroMc3.x = this.heroMc2.x + 200; + this.heroMc3.y = this.heroMc1.y; + this.heroMc1.setTitle("第一位武将"); + this.heroMc2.setTitle("第二位武将"); + this.heroMc3.setTitle("第三位武将"); + this.rankView = new Button_9("查看排行奖励"); + this.rankView.setTextHeight(22); + this.rankView.buttonMode = true; + this.bg1.addChild(this.rankView); + this.rankView.x = 10; + this.rankView.y = 345; + this.topLog_1.mouseEnabled = true; + this.topLog_1.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.topLog_2.mouseEnabled = true; + this.topLog_2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.topLog_3.mouseEnabled = true; + this.topLog_3.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.topLog_4.mouseEnabled = true; + this.topLog_4.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.topLog_5.mouseEnabled = true; + this.topLog_5.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(233,288); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc14_.addChild(this.packScrollPane); + this.packScrollPane.x = 4; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + var _loc23_:int = 0; + while(_loc23_ < 20) + { + _loc24_ = new DamageRankMc(); + this.ranklistMc.push(_loc24_); + this.packMc.addChild(_loc24_); + _loc24_.y = _loc23_ * 24; + _loc23_++; + } + this.packScrollPane.update(); + this.entryHeroBoss(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(this.rankView) + { + this.entryHeroBoss(); + } + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_HeroBoss_enter,this.enterResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_HeroBoss_changeHero,this.changeHeroResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_HeroBoss_startFight,this.fightResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_HeroBoss_treatHero,this.treatHeroResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_HeroBoss_getDailyGift,this.getDailyGiftResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_HeroBoss_getRankGift,this.getRankGiftResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_HeroBoss_enter,this.enterResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_HeroBoss_changeHero,this.changeHeroResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_HeroBoss_startFight,this.fightResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_HeroBoss_treatHero,this.treatHeroResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_HeroBoss_getDailyGift,this.getDailyGiftResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_HeroBoss_getRankGift,this.getRankGiftResult); + } + + private function entryHeroBoss() : void + { + var _loc1_:int = 0; + if(this.rankList == null || this.rankList.length <= 0) + { + _loc1_ = 1; + } + ConnectService.getInstance().playService.enterHeroBoss(_loc1_); + } + + private function enterResult(param1:HeroBabelEvent) : void + { + var _loc5_:* = undefined; + var _loc2_:Object = param1.obj; + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + closeUI(null); + return; + } + if(_loc2_.rankData) + { + this.rankList = _loc2_.rankData as Array; + this.initRankView(); + } + if(this.rankAward == null) + { + this.rankAward = _loc2_.rankAward; + ToolTipManager.getInstance().setToolTip(this.getDaily,new TxtTooltip("挑战1次后,点击领取每日参与奖:" + _loc2_.dailyAward + " *" + _loc2_.dailyAwardNum),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.rankView,new TxtTooltip(this.rankAward),false,-1,false); + } + if(_loc2_.canGet == 1) + { + this.getGift.setEnable(); + } + else + { + this.getGift.setUnEnable(); + } + this.hasFightTimes = _loc2_.heroBossData.fightTimes; + if(this.hasFightTimes >= 1) + { + this.exchangeBtn.setUnEnable(); + } + else + { + this.exchangeBtn.setEnable(); + } + if(_loc2_.heroBossData.getDaily == 0 && this.hasFightTimes == 1) + { + this.getDaily.setEnable(); + } + else + { + this.getDaily.setUnEnable(); + } + this.todayNumsText.text = "今日剩余挑战次数:" + (1 - this.hasFightTimes); + this.heroIdList.splice(0,this.heroIdList.length); + var _loc3_:Array = _loc2_.atkHeroList as Array; + if(_loc3_ != null && _loc3_.length > 0) + { + if(_loc3_[0]) + { + this.heroIdList.push(_loc3_[0].heroId); + this.heroMc1.setObj(_loc3_[0]); + } + else + { + this.heroMc1.setObj(null); + } + if(_loc3_[1]) + { + this.heroIdList.push(_loc3_[1].heroId); + this.heroMc2.setObj(_loc3_[1]); + } + else + { + this.heroMc2.setObj(null); + } + if(_loc3_[2]) + { + this.heroIdList.push(_loc3_[2].heroId); + this.heroMc3.setObj(_loc3_[2]); + } + else + { + this.heroMc3.setObj(null); + } + } + else + { + this.heroMc1.setObj(null); + this.heroMc2.setObj(null); + this.heroMc3.setObj(null); + } + this.topLog_1.text = ""; + this.topLog_3.text = ""; + this.topLog_4.text = ""; + this.topLog_5.text = ""; + this.topLog_2.text = ""; + var _loc4_:Array = _loc2_.top5Log as Array; + if(_loc4_ != null && _loc4_.length > 0) + { + for(_loc5_ in _loc4_) + { + if(_loc5_ == 0) + { + this.topLog_1.htmlText = this.getLogHtml(_loc4_[_loc5_]); + } + if(_loc5_ == 1) + { + this.topLog_2.htmlText = this.getLogHtml(_loc4_[_loc5_]); + } + if(_loc5_ == 2) + { + this.topLog_3.htmlText = this.getLogHtml(_loc4_[_loc5_]); + } + if(_loc5_ == 3) + { + this.topLog_4.htmlText = this.getLogHtml(_loc4_[_loc5_]); + } + if(_loc5_ == 4) + { + this.topLog_5.htmlText = this.getLogHtml(_loc4_[_loc5_]); + } + } + } + } + + private function getLogHtml(param1:Object) : String + { + return "" + param1.username + " 奋力挑战[曜甲神将],对其造成了" + param1.damage + "伤害," + param1.damagetime; + } + + private function initRankView() : void + { + var _loc1_:int = 0; + var _loc2_:DamageRankMc = null; + var _loc3_:Object = null; + if(this.rankList != null && this.rankList.length > 0) + { + _loc1_ = 0; + for each(_loc2_ in this.ranklistMc) + { + if(this.rankList[_loc1_]) + { + _loc2_.setObj(this.rankList[_loc1_]); + } + else + { + _loc3_ = new Object(); + _loc3_.rankId = _loc1_ + 1; + _loc2_.setObj(_loc3_); + } + _loc1_++; + } + } + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance(); + if(contains(_loc2_)) + { + return; + } + _loc2_.setSelectheroArr(this.heroIdList); + addChild(_loc2_); + _loc2_.x = 150; + _loc2_.y = 60; + _loc2_.backFunc = this.selectHeroList; + } + + private function selectHeroList(param1:Vector.) : void + { + var _loc3_:Hero = null; + if(param1.length == 0) + { + MessageBoxUI.getInstance().addMessage("未选择武将"); + return; + } + if(param1.length > 3) + { + MessageBoxUI.getInstance().addMessage("最多只能选择3个武将"); + return; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in param1) + { + _loc2_.push(_loc3_.heroId); + } + ConnectService.getInstance().playService.changeHeroBossHero(_loc2_); + } + + private function changeHeroResult(param1:HeroBabelEvent) : void + { + this.entryHeroBoss(); + } + + private function treatHeroAllHero(param1:MouseEvent) : void + { + if(this.heroIdList == null || this.heroIdList.length <= 0) + { + MessageBoxUI.getInstance().addMessage("未选择武将,无法医疗"); + return; + } + ConnectService.getInstance().playService.treatHeroBossHero(); + } + + private function startFight(param1:MouseEvent) : void + { + if(this.hasFightTimes >= 1) + { + MessageBoxUI.getInstance().addMessage("今天已经没有挑战次数"); + return; + } + if(this.heroIdList.length == 0) + { + MessageBoxUI.getInstance().addMessage("未选择武将"); + return; + } + ConnectService.getInstance().playService.startBossFight(); + } + + private function fightResult(param1:HeroBabelEvent) : void + { + var _loc4_:HeroBossFightUI = null; + var _loc2_:Object = param1.obj; + this.entryHeroBoss(); + var _loc3_:int = int(this.viewFight.selectedItem.data); + if(_loc3_ == 2) + { + _loc4_ = HeroBossFightUI.getInstance(); + _loc4_.setFightData(_loc2_); + } + } + + private function treatHeroResult(param1:HeroBabelEvent) : void + { + this.entryHeroBoss(); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + + private function getDailyGift(param1:MouseEvent) : void + { + ConnectService.getInstance().playService.getDailyGift(); + } + + private function getDailyGiftResult(param1:HeroBabelEvent) : void + { + this.entryHeroBoss(); + } + + private function getRankGift(param1:MouseEvent) : void + { + ConnectService.getInstance().playService.getRankGift(); + } + + private function getRankGiftResult(param1:HeroBabelEvent) : void + { + this.entryHeroBoss(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/MyHeroMc.as b/flash_decompiled/com/view/ui/heroboss/MyHeroMc.as new file mode 100644 index 0000000..3d12803 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/MyHeroMc.as @@ -0,0 +1,92 @@ +package com.view.ui.heroboss +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.view.ui.PlayUIRes; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class MyHeroMc extends Sprite + { + + public var playUIRes:PlayUIRes = PlayUIRes.getInstance(); + + private var heroMc:MovieClip; + + private var heroObj:Object; + + private var url:String; + + private var loadImg:LoadResource; + + private var headImg:Bitmap; + + public function MyHeroMc() + { + super(); + this.heroMc = this.playUIRes.getMovieClip(ClassConfig.heroboss_1); + addChild(this.heroMc); + } + + public function setObj(param1:Object) : void + { + this.heroObj = param1; + if(this.heroObj == null) + { + this.heroMc.heroname.text = ""; + this.heroMc.hp.text = "未选择武将"; + this.heroMc.fight.text = ""; + if(Boolean(this.headImg) && this.heroMc.contains(this.headImg)) + { + this.heroMc.removeChild(this.headImg); + } + } + else + { + this.heroMc.heroname.htmlText = this.heroObj.showName; + this.heroMc.hp.htmlText = "健康度:" + this.heroObj.hpStatus + ""; + this.heroMc.fight.text = "单挑力:" + this.heroObj.fightPower; + this.loadHeroImg(this.heroObj.picPath); + } + } + + public function setTitle(param1:String) : void + { + this.heroMc.times.htmlText = param1; + } + + private function loadHeroImg(param1:String) : void + { + if(this.url == param1 && Boolean(this.headImg)) + { + this.heroMc.addChild(this.headImg); + this.headImg.x = 7; + this.headImg.y = 7; + return; + } + this.url = param1; + this.loadImg = new LoadResource("pic/head/" + this.url,this.loadOver); + } + + private function loadOver(param1:Event) : void + { + if(this.heroObj == null) + { + this.loadImg.clear(); + return; + } + if(Boolean(this.headImg) && this.heroMc.contains(this.headImg)) + { + this.heroMc.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.heroMc.addChild(this.headImg); + this.headImg.x = 7; + this.headImg.y = 7; + this.loadImg.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/mc/BeginFightMc.as b/flash_decompiled/com/view/ui/heroboss/mc/BeginFightMc.as new file mode 100644 index 0000000..c494e0a --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/mc/BeginFightMc.as @@ -0,0 +1,50 @@ +package com.view.ui.heroboss.mc +{ + import com.view.ui.battle.BattleRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class BeginFightMc extends Sprite + { + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var mc:MovieClip; + + private var _backFun:Function; + + public function BeginFightMc() + { + super(); + this.mc = this.battleRes.getMovieClip("boss_movie"); + addChild(this.mc); + this.mc.gotoAndStop(1); + this.mc.visible = false; + } + + public function play() : void + { + this.mc.gotoAndPlay(1); + this.mc.visible = true; + addEventListener(Event.ENTER_FRAME,this.frameRate); + } + + private function frameRate(param1:Event) : void + { + if(this.mc.currentFrame == 12) + { + this.mc.gotoAndStop(1); + this.mc.visible = false; + removeEventListener(Event.ENTER_FRAME,this.frameRate); + this._backFun(); + } + } + + public function set backFun(param1:Function) : void + { + this._backFun = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/mc/HeadInfo.as b/flash_decompiled/com/view/ui/heroboss/mc/HeadInfo.as new file mode 100644 index 0000000..b2b18d6 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/mc/HeadInfo.as @@ -0,0 +1,70 @@ +package com.view.ui.heroboss.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + import flash.text.TextField; + + public class HeadInfo extends Sprite + { + + private var currType:int; + + private var heroName:TextField; + + private var heroLevel:TextField; + + public function HeadInfo(param1:int) + { + super(); + this.currType = param1; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(140,40); + addChild(_loc2_); + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,34); + _loc2_.addChild(_loc3_); + _loc3_.text = "武将:"; + _loc3_.y = 10; + var _loc4_:Sprite = PublicMethod.getTrLine(138); + _loc2_.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = _loc3_.y + 18; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,34); + _loc2_.addChild(_loc5_); + _loc5_.text = "等级:"; + _loc5_.y = _loc3_.y + 20; + this.heroName = PublicMethod.getTextFieldWithFillter(16773120,100); + _loc2_.addChild(this.heroName); + this.heroName.y = _loc3_.y; + this.heroLevel = PublicMethod.getTextFieldWithFillter(16773120,100); + _loc2_.addChild(this.heroLevel); + this.heroLevel.y = _loc5_.y; + if(this.currType == 1) + { + _loc3_.x = 18; + _loc5_.x = _loc3_.x; + this.heroName.x = _loc3_.x + _loc3_.width; + this.heroLevel.x = this.heroName.x; + } + else + { + _loc3_.x = 10; + _loc5_.x = _loc3_.x; + this.heroName.x = _loc3_.x + _loc3_.width; + this.heroLevel.x = this.heroName.x; + } + } + + public function setHeroName(param1:String) : void + { + this.heroName.htmlText = param1; + } + + public function setHeroLevel(param1:int) : void + { + this.heroLevel.text = param1 + ""; + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/mc/HeroBlood.as b/flash_decompiled/com/view/ui/heroboss/mc/HeroBlood.as new file mode 100644 index 0000000..0dca38f --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/mc/HeroBlood.as @@ -0,0 +1,70 @@ +package com.view.ui.heroboss.mc +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.ui.battle.BattleRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.text.TextField; + + public class HeroBlood extends Sprite + { + + private var currType:int; + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var bloodMc:MovieClip; + + private var bloodText:TextField; + + private var maxBlood:Number; + + private var currBlood:Number; + + public function HeroBlood(param1:int) + { + super(); + this.currType = param1; + this.bloodMc = this.battleRes.getMovieClip(ClassConfig.battle_blood); + addChild(this.bloodMc); + this.bloodText = PublicMethod.getTextFieldWithFillter(16773120,160); + this.bloodText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + addChild(this.bloodText); + this.bloodText.x = 70; + this.bloodText.y = 2; + } + + public function setMaxBlood(param1:Number) : void + { + this.maxBlood = Utils.getNumFun(param1,0); + } + + public function setCurrBlood(param1:int) : void + { + this.currBlood = Utils.getNumFun(param1,0); + this.bloodText.text = this.currBlood + "/" + this.maxBlood; + var _loc2_:Number = this.currBlood / this.maxBlood; + if(this.currType == 1) + { + this.bloodMc.blood2.x = 11; + this.bloodMc.blood2.width = int(280 * _loc2_); + this.bloodMc.blood3.x = int(this.bloodMc.blood2.x + this.bloodMc.blood2.width); + } + else + { + this.bloodMc.blood3.x = 291; + this.bloodMc.blood2.width = int(280 * _loc2_); + this.bloodMc.blood2.x = 11 + 280 - this.bloodMc.blood2.width; + this.bloodMc.blood1.x = 3 + 280 - this.bloodMc.blood2.width; + } + } + + public function getCurrBlood() : Number + { + return this.currBlood; + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/mc/HeroHead.as b/flash_decompiled/com/view/ui/heroboss/mc/HeroHead.as new file mode 100644 index 0000000..11df7c6 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/mc/HeroHead.as @@ -0,0 +1,73 @@ +package com.view.ui.heroboss.mc +{ + import com.common.LoadResource; + import com.common.PublicGlow; + import com.view.ui.battle.BattleRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class HeroHead extends Sprite + { + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var loadImg:LoadResource; + + private var headImg:Bitmap; + + private var died:Sprite; + + public function HeroHead() + { + super(); + } + + public function setData(param1:String) : void + { + if(Boolean(this.headImg) && contains(this.headImg)) + { + removeChild(this.headImg); + } + if(param1 == null && Boolean(this.died)) + { + this.died.alpha = 0; + return; + } + if(this.died == null) + { + this.died = this.battleRes.getSprite("boss_herodied"); + addChild(this.died); + } + this.died.alpha = 0; + this.loadImg = new LoadResource("pic/head/" + param1,this.loadImgBack); + } + + private function loadImgBack(param1:Event) : void + { + this.headImg = param1.target.loader.content; + addChildAt(this.headImg,getChildIndex(this.died)); + this.headImg.width = 38; + this.headImg.height = 50; + this.loadImg.clear(); + } + + public function setDied() : void + { + this.died.alpha = 1; + } + + public function setCurr(param1:Boolean) : void + { + if(param1) + { + this.filters = [PublicGlow.getInstance().yellowGlow1]; + } + else + { + this.filters = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/mc/LeftHeroMc.as b/flash_decompiled/com/view/ui/heroboss/mc/LeftHeroMc.as new file mode 100644 index 0000000..ffc81f5 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/mc/LeftHeroMc.as @@ -0,0 +1,143 @@ +package com.view.ui.heroboss.mc +{ + import com.common.LoadResource; + import com.view.ui.battle.BattleRes; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class LeftHeroMc extends Sprite + { + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var headMc:MovieClip; + + private var heroHead1:HeroHead; + + private var heroHead2:HeroHead; + + private var heroHead3:HeroHead; + + private var heroheadVec:Vector. = new Vector.(); + + private var heroList:Array; + + private var bloodMax:int; + + private var loadImg:LoadResource; + + private var headImg:Bitmap; + + public function LeftHeroMc() + { + super(); + this.headMc = this.battleRes.getMovieClip("boss_lefthero"); + addChild(this.headMc); + this.heroHead1 = new HeroHead(); + this.heroHead2 = new HeroHead(); + this.heroHead3 = new HeroHead(); + this.heroHead1.x = 240; + this.heroHead1.y = 30; + this.heroheadVec.push(this.heroHead1); + this.heroheadVec.push(this.heroHead2); + this.heroheadVec.push(this.heroHead3); + this.heroHead2.x = this.heroHead1.x + 47; + this.heroHead2.y = this.heroHead1.y; + this.heroHead3.x = this.heroHead2.x + 47; + this.heroHead3.y = this.heroHead1.y; + addChild(this.heroHead1); + addChild(this.heroHead2); + addChild(this.heroHead3); + } + + public function setHeroList(param1:Array) : void + { + this.heroList = param1; + var _loc2_:int = 0; + while(_loc2_ < 3) + { + if(this.heroList[_loc2_] == null) + { + this.heroheadVec[_loc2_].setData(null); + } + else + { + this.heroheadVec[_loc2_].setData(this.heroList[_loc2_].heroImg); + } + this.heroheadVec[_loc2_].setCurr(false); + _loc2_++; + } + } + + public function setHeroDied(param1:int) : void + { + switch(param1) + { + case 0: + this.heroHead1.setDied(); + break; + case 1: + this.heroHead2.setDied(); + break; + case 2: + this.heroHead3.setDied(); + } + } + + public function setCurrHero(param1:int) : void + { + var _loc2_:Object = this.heroList[param1]; + switch(param1) + { + case 0: + this.heroHead1.setCurr(true); + break; + case 1: + this.heroHead1.setCurr(false); + this.heroHead2.setCurr(true); + break; + case 2: + this.heroHead1.setCurr(false); + this.heroHead2.setCurr(false); + this.heroHead3.setCurr(true); + } + this.headMc.heroName.htmlText = _loc2_.heroName; + this.headMc.fight.htmlText = _loc2_.fightPower; + this.loadHeroHead(_loc2_.heroImg); + } + + public function setBloodMax(param1:int) : void + { + this.bloodMax = param1; + this.headMc.heroblood.text = param1 + "/" + param1; + this.headMc.bloodMc.smark.x = 0; + } + + public function setCurrBlood(param1:int = 0) : void + { + this.headMc.heroblood.text = param1 + "/" + this.bloodMax; + this.headMc.bloodMc.smark.x = 314 * param1 / this.bloodMax - 314; + } + + private function loadHeroHead(param1:String) : void + { + if(Boolean(this.headImg) && Boolean(this.headMc.atkHead.contains(this.headImg))) + { + this.headMc.atkHead.removeChild(this.headImg); + } + this.loadImg = new LoadResource("pic/head/" + param1,this.loadImgBack); + } + + private function loadImgBack(param1:Event) : void + { + this.headImg = param1.target.loader.content; + this.headMc.atkHead.addChild(this.headImg); + this.headImg.x = 14; + this.headImg.y = 10; + this.loadImg.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/mc/NewHeroHead.as b/flash_decompiled/com/view/ui/heroboss/mc/NewHeroHead.as new file mode 100644 index 0000000..d3ff6a4 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/mc/NewHeroHead.as @@ -0,0 +1,57 @@ +package com.view.ui.heroboss.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.view.ui.battle.BattleRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class NewHeroHead extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var headBg:Sprite; + + private var load:LoadResource; + + public function NewHeroHead() + { + super(); + var _loc1_:* = this.battleRes.getSprite(ClassConfig.battle_headbg); + addChild(_loc1_); + this.headBg = new Sprite(); + addChild(this.headBg); + } + + public function loadHead(param1:String) : void + { + var _loc2_:String = "pic/head/" + param1; + this.load = new LoadResource(_loc2_,this.loadHeadBack); + } + + private function loadHeadBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.load.clear(); + this.headBg.addChild(_loc2_); + _loc2_.x = 7; + _loc2_.width = 70; + _loc2_.height = 88; + var _loc3_:Sprite = this.battleRes.getSprite(ClassConfig.battle_headmask); + this.headBg.addChild(_loc3_); + _loc3_.x = 7; + _loc3_.y = 8; + this.headBg.mask = _loc3_; + } + + public function clear() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/mc/RightHeroMc.as b/flash_decompiled/com/view/ui/heroboss/mc/RightHeroMc.as new file mode 100644 index 0000000..08fc2fd --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/mc/RightHeroMc.as @@ -0,0 +1,55 @@ +package com.view.ui.heroboss.mc +{ + import com.common.LoadResource; + import com.view.ui.battle.BattleRes; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class RightHeroMc extends Sprite + { + + public var battleRes:BattleRes = BattleRes.getInstance(); + + private var headMc:MovieClip; + + private var bossHero:HeroHead; + + private var loadImg:LoadResource; + + private var headImg:Bitmap; + + public function RightHeroMc() + { + super(); + this.headMc = this.battleRes.getMovieClip("boss_righthero"); + addChild(this.headMc); + this.bossHero = new HeroHead(); + addChild(this.bossHero); + this.bossHero.x = -385; + this.bossHero.y = 30; + this.loadHeroHead(); + this.bossHero.setData("male011.jpg"); + this.bossHero.setCurr(true); + this.headMc.heroName.text = "曜甲神将"; + this.headMc.fight.text = "???"; + this.headMc.heroblood.text = "???"; + } + + private function loadHeroHead() : void + { + this.loadImg = new LoadResource("pic/head/male011.jpg",this.loadImgBack); + } + + private function loadImgBack(param1:Event) : void + { + this.headImg = param1.target.loader.content; + this.headMc.atkHead.addChild(this.headImg); + this.headImg.x = 12; + this.headImg.y = 10; + this.loadImg.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/heroboss/mc/RoundMc.as b/flash_decompiled/com/view/ui/heroboss/mc/RoundMc.as new file mode 100644 index 0000000..9ee1f35 --- /dev/null +++ b/flash_decompiled/com/view/ui/heroboss/mc/RoundMc.as @@ -0,0 +1,43 @@ +package com.view.ui.heroboss.mc +{ + import com.view.ui.battle.BattleRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class RoundMc extends Sprite + { + + private var roundMc:MovieClip; + + public var battleRes:BattleRes = BattleRes.getInstance(); + + public var backF:Function; + + public function RoundMc() + { + super(); + } + + public function playRound(param1:int) : void + { + this.roundMc = this.battleRes.getMovieClip("boss_round_" + param1); + addChild(this.roundMc); + this.roundMc.gotoAndPlay(1); + addEventListener(Event.ENTER_FRAME,this.frameTime); + } + + private function frameTime(param1:Event) : void + { + if(this.roundMc.currentFrame == 16) + { + this.roundMc.stop(); + removeChild(this.roundMc); + this.roundMc = null; + removeEventListener(Event.ENTER_FRAME,this.frameTime); + this.backF(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/AskUI.as b/flash_decompiled/com/view/ui/home/AskUI.as new file mode 100644 index 0000000..eab98ef --- /dev/null +++ b/flash_decompiled/com/view/ui/home/AskUI.as @@ -0,0 +1,431 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UILabel; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.AskLineMc; + import com.view.ui.home.mc.AskTitleMc; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class AskUI extends ActivityBase + { + + private var _width2:int = -102; + + private var _height2:int = -211; + + private var bg1:UIWindowBg; + + private var page1:Sprite; + + private var page2:Sprite; + + private var tableMc:UITable; + + private var label2:UILabel; + + private var type1:Button_9; + + private var type2:Button_9; + + private var type3:Button_9; + + private var titleLabel:TextField; + + private var titleLabel1:AskTitleMc; + + private var titleLabel2:AskTitleMc; + + private var titleLabel3:AskTitleMc; + + private var currLabel:UILabel; + + private var resultLabel:UILabel; + + private var nextBtn:Button_9; + + private var currAskCode:int; + + private var preTitleLabel:AskTitleMc; + + private var submitType:int; + + public function AskUI() + { + var _loc3_:TextFormat = null; + var _loc7_:AskLineMc = null; + var _loc8_:AskLineMc = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_ask); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:Bitmap = gameRes.getBitMap("ask_bg",gameRes.getApplication(GameUIRes.swfUrl_4)); + this.bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:Sprite = new Scale9Grid(face.getSprite("lib_img_border"),119,151); + this.bg1.addChild(_loc2_); + _loc2_.x = 5; + _loc2_.y = 5; + this.page1 = new Sprite(); + this.bg1.addChild(this.page1); + this.page1.x = 170; + this.page1.y = 10; + this.page2 = new Sprite(); + this.bg1.addChild(this.page2); + this.page2.x = 170; + this.page2.y = 10; + _loc3_ = new TextFormat(); + _loc3_.leading = 5; + this.titleLabel = PublicMethod.getMulTextField(16355072,330,40); + this.page2.addChild(this.titleLabel); + this.titleLabel.x = 5; + this.titleLabel.y = 0; + this.titleLabel.defaultTextFormat = _loc3_; + this.titleLabel1 = new AskTitleMc(); + this.page2.addChild(this.titleLabel1); + this.titleLabel1.x = 5; + this.titleLabel1.y = 50; + this.titleLabel1.addEventListener(MouseEvent.CLICK,this.mouseClick); + this.titleLabel2 = new AskTitleMc(); + this.page2.addChild(this.titleLabel2); + this.titleLabel2.x = this.titleLabel1.x; + this.titleLabel2.y = this.titleLabel1.y + 30; + this.titleLabel2.addEventListener(MouseEvent.CLICK,this.mouseClick); + this.titleLabel3 = new AskTitleMc(); + this.page2.addChild(this.titleLabel3); + this.titleLabel3.x = this.titleLabel1.x; + this.titleLabel3.y = this.titleLabel2.y + 30; + this.titleLabel3.addEventListener(MouseEvent.CLICK,this.mouseClick); + this.resultLabel = new UILabel(115); + this.page2.addChild(this.resultLabel); + this.resultLabel.x = 220; + this.resultLabel.y = this.titleLabel.y + 25; + this.currLabel = new UILabel(320); + this.page2.addChild(this.currLabel); + this.currLabel.x = 10; + this.currLabel.y = this.titleLabel3.y + 40; + this.nextBtn = new Button_9("下一题"); + this.nextBtn.buttonMode = true; + this.page2.addChild(this.nextBtn); + this.nextBtn.x = 290; + this.nextBtn.y = this.currLabel.y; + this.nextBtn.addEventListener(MouseEvent.CLICK,this.nextTitle); + var _loc4_:Array = ["难度","总题数","答对题数","奖励仁义"]; + var _loc5_:Array = [84,84,100,98]; + var _loc6_:UILabel = new UILabel(280); + _loc6_.setText("欢迎来到答题时间,答题可奖励仁义点"); + this.page1.addChild(_loc6_); + _loc6_.y = 5; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(3,_loc4_,_loc5_); + this.page1.addChild(this.tableMc); + this.tableMc.x = 0; + this.tableMc.y = 30; + _loc7_ = new AskLineMc("初级","5","4","500"); + this.tableMc.addChild(_loc7_); + _loc7_.y = 29; + _loc7_.x = 0; + _loc8_ = new AskLineMc("中级","8","6","750"); + this.tableMc.addChild(_loc8_); + _loc8_.y = 29 + 25; + _loc8_.x = 0; + var _loc9_:AskLineMc = new AskLineMc("高级","10","8","1000"); + this.tableMc.addChild(_loc9_); + _loc9_.y = 29 + 50; + _loc9_.x = 0; + this.label2 = new UILabel(280); + this.label2.setText("今日答题上限:2 当前剩余次数:2"); + this.page1.addChild(this.label2); + this.label2.y = 135; + var _loc10_:UILabel = new UILabel(280); + _loc10_.setText("选择答题难度:"); + this.page1.addChild(_loc10_); + _loc10_.y = 160; + this.type1 = new Button_9("初级"); + this.type1.buttonMode = true; + this.page1.addChild(this.type1); + this.type1.x = 105; + this.type1.y = _loc10_.y; + this.type1.addEventListener(MouseEvent.CLICK,this.chooseType1); + this.type2 = new Button_9("中级"); + this.type2.buttonMode = true; + this.page1.addChild(this.type2); + this.type2.x = this.type1.x + 50; + this.type2.y = _loc10_.y; + this.type2.addEventListener(MouseEvent.CLICK,this.chooseType2); + this.type3 = new Button_9("高级"); + this.type3.buttonMode = true; + this.page1.addChild(this.type3); + this.type3.x = this.type2.x + 50; + this.type3.y = _loc10_.y; + this.type3.addEventListener(MouseEvent.CLICK,this.chooseType3); + this.getUserAsk(); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERASK,this.getAskResult); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERASK_STARTRESULT,this.startAskResult); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERASK_SUBMITRESULT,this.submitAskResult); + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function getUserAsk() : void + { + ConnectService.getInstance().homeService.getUserAskMap(); + } + + private function getAskResult(param1:DevEvent) : void + { + var _loc2_:Object = HomeData.getUserAsk(); + if(_loc2_.status == 0) + { + this.label2.setText("今日答题上限:2 当前剩余次数:" + _loc2_.times + ""); + this.page2.visible = false; + this.page1.visible = true; + } + else + { + this.setAskAndAnswer(); + } + } + + private function chooseType1(param1:MouseEvent) : void + { + var _loc2_:Object = HomeData.getUserAsk(); + if(_loc2_.times == 0) + { + MessageBoxUI.getInstance().addMessage("今日次数已用完"); + return; + } + ConnectService.getInstance().homeService.startAsk(1); + } + + private function chooseType2(param1:MouseEvent) : void + { + var _loc2_:Object = HomeData.getUserAsk(); + if(_loc2_.times == 0) + { + MessageBoxUI.getInstance().addMessage("今日次数已用完"); + return; + } + ConnectService.getInstance().homeService.startAsk(2); + } + + private function chooseType3(param1:MouseEvent) : void + { + var _loc2_:Object = HomeData.getUserAsk(); + if(_loc2_.times == 0) + { + MessageBoxUI.getInstance().addMessage("今日次数已用完"); + return; + } + ConnectService.getInstance().homeService.startAsk(3); + } + + private function startAskResult(param1:DevEvent) : void + { + this.setAskAndAnswer(); + } + + private function setAskAndAnswer() : void + { + var _loc7_:int = 0; + var _loc1_:Object = HomeData.getUserAsk(); + this.page1.visible = false; + this.page2.visible = true; + var _loc2_:String = _loc1_.askstr; + var _loc3_:Array = _loc2_.split(","); + var _loc4_:Object = _loc1_.ask; + var _loc5_:int = int(_loc1_.askId); + var _loc6_:int = int(_loc1_.type); + if(_loc6_ == 1) + { + _loc7_ = 5; + } + else if(_loc6_ == 2) + { + _loc7_ = 8; + } + else + { + _loc7_ = 10; + } + if(_loc5_ == _loc7_) + { + this.submitType = 2; + this.titleLabel.htmlText = _loc5_ + "、" + _loc4_.subject; + this.nextBtn.setText("完 成"); + } + else if(_loc5_ == _loc7_ - 1) + { + this.nextBtn.setText("完 成"); + this.submitType = 2; + this.titleLabel.htmlText = _loc5_ + 1 + "、" + _loc4_.subject; + this.currAskCode = _loc3_[_loc5_]; + } + else + { + this.submitType = 1; + this.nextBtn.setText("下一题"); + this.titleLabel.htmlText = _loc5_ + 1 + "、" + _loc4_.subject; + this.currAskCode = _loc3_[_loc5_]; + } + this.titleLabel1.setText("A、" + _loc4_.option1); + this.titleLabel2.setText("B、" + _loc4_.option2); + this.titleLabel3.setText("C、" + _loc4_.option3); + this.resultLabel.setText(""); + var _loc8_:int = int(_loc1_.rightTimes); + if(_loc8_ > 0) + { + this.resultLabel.setText("当前答对题数为:" + _loc8_ + ""); + } + } + + private function mouseClick(param1:MouseEvent) : void + { + if(this.preTitleLabel) + { + MessageBoxUI.getInstance().addMessage("已经答过题了,请点击下一题"); + return; + } + var _loc2_:AskTitleMc = param1.currentTarget as AskTitleMc; + this.preTitleLabel = _loc2_; + this.preTitleLabel.setClick(true); + var _loc3_:int = 0; + if(this.preTitleLabel == this.titleLabel1) + { + _loc3_ = 1; + } + if(this.preTitleLabel == this.titleLabel2) + { + _loc3_ = 2; + } + if(this.preTitleLabel == this.titleLabel3) + { + _loc3_ = 3; + } + ConnectService.getInstance().homeService.submitAnswer(_loc3_,this.currAskCode); + } + + private function submitAskResult(param1:DevEvent) : void + { + var _loc3_:String = null; + var _loc4_:int = 0; + var _loc2_:Object = HomeData.getUserAsk(); + if(_loc2_.rightAnswerId) + { + _loc3_ = "回答错误,正确答案为:"; + if(_loc2_.rightAnswerId == 1) + { + _loc3_ += "A"; + } + if(_loc2_.rightAnswerId == 2) + { + _loc3_ += "B"; + } + if(_loc2_.rightAnswerId == 3) + { + _loc3_ += "C"; + } + this.currLabel.setText("" + _loc3_ + ""); + } + else + { + this.currLabel.setText("恭喜你答对了!"); + _loc4_ = int(_loc2_.rightTimes); + if(_loc4_ > 0) + { + this.resultLabel.setText("当前答对题数为:" + _loc4_ + ""); + } + } + } + + private function nextTitle(param1:MouseEvent) : void + { + var _loc2_:Object = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + if(this.submitType == 2) + { + _loc2_ = HomeData.getUserAsk(); + _loc3_ = int(_loc2_.askId); + _loc4_ = int(_loc2_.type); + if(_loc4_ == 1) + { + _loc5_ = 5; + } + else if(_loc4_ == 2) + { + _loc5_ = 8; + } + else + { + _loc5_ = 10; + } + if(_loc3_ != _loc5_) + { + MessageBoxUI.getInstance().addMessage("请选择一个答案"); + return; + } + this.currLabel.setText(""); + this.preTitleLabel.setClick(false); + this.preTitleLabel = null; + ConnectService.getInstance().homeService.doAnswer(); + return; + } + if(this.preTitleLabel) + { + this.preTitleLabel.setClick(false); + this.preTitleLabel = null; + this.currLabel.setText(""); + this.setAskAndAnswer(); + return; + } + MessageBoxUI.getInstance().addMessage("请选择一个答案"); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/DragonMainUI.as b/flash_decompiled/com/view/ui/home/DragonMainUI.as new file mode 100644 index 0000000..7047458 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/DragonMainUI.as @@ -0,0 +1,439 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + import com.greensock.TweenLite; + import com.utils.Utils; + import com.view.newui.UILabel; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.battleview.mc.BattleTextBar; + import com.view.ui.home.mc.DragMaskMc; + import com.view.ui.home.mc.DragUnitMc; + import com.view.ui.home.mc.XunBaoBox; + import com.view.ui.home.mc.XunBaoTextMC; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.setTimeout; + + public class DragonMainUI extends ActivityBase + { + + private var _width2:int = 62; + + private var _height2:int = 75; + + private var bg1:UIWindowBg; + + private var bg4:UIWindowBg; + + private var label2:UILabel; + + private var box1:XunBaoBox; + + private var box2:XunBaoBox; + + private var box3:XunBaoBox; + + private var box4:XunBaoBox; + + private var timesText:UILabel; + + private var xunBaoTextMC:XunBaoTextMC; + + private var itemMcVec:Vector.; + + private var uiTextBar:BattleTextBar; + + private var maskMc:DragMaskMc; + + public function DragonMainUI() + { + var _loc3_:UIWindowBg = null; + var _loc11_:DragUnitMc = null; + var _loc12_:int = 0; + var _loc13_:int = 0; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xunlongtanbao); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:Bitmap = gameRes.getBitMap("dragbg",gameRes.getApplication(GameUIRes.swfUrl_4)); + this.bg1.addChild(_loc1_); + _loc1_.x = 2; + _loc1_.y = 2; + _loc1_.width = 482; + _loc1_.height = 482; + this.itemMcVec = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 49) + { + _loc11_ = new DragUnitMc(_loc2_); + _loc12_ = _loc2_ % 7; + _loc13_ = _loc2_ / 7; + this.bg1.addChild(_loc11_); + _loc11_.x = 6 + 68 * _loc12_; + _loc11_.y = 6 + 68 * _loc13_; + this.itemMcVec.push(_loc11_); + _loc2_++; + } + _loc3_ = new UIWindowBg(); + _loc3_.initSecondPanel(200,180); + this.bg1.addChild(_loc3_); + _loc3_.x = _loc1_.x + _loc1_.width + 3; + _loc3_.y = 4; + var _loc4_:UITitleBg = new UITitleBg("寻龙探宝",_loc3_.width); + _loc3_.addChild(_loc4_); + _loc4_.x = int(_loc3_.width / 2 - _loc4_.width / 2); + var _loc5_:String = "1、地图中隐藏着3个宝箱."; + _loc5_ = _loc5_ + "
2、你有5次机会,每次单击可翻开一张卡牌,并探寻以其为中心的8张卡牌。"; + _loc5_ = _loc5_ + "
3、格子上的数字表示临近的宝箱数量。"; + _loc5_ = _loc5_ + "
4、翻开宝箱卡牌,获得奖励。"; + _loc5_ = _loc5_ + "
5、若5次机会后,未能打开任何宝箱,则获得低保包。"; + var _loc6_:TextFormat = new TextFormat(); + _loc6_.leading = 5; + var _loc7_:TextField = PublicMethod.getMulTextField(16355072,200,160); + _loc3_.addChild(_loc7_); + _loc7_.x = 5; + _loc7_.y = 28; + _loc7_.defaultTextFormat = _loc6_; + _loc7_.htmlText = _loc5_; + var _loc8_:UIWindowBg = new UIWindowBg(); + _loc8_.initSecondPanel(200,70); + this.bg1.addChild(_loc8_); + _loc8_.x = _loc3_.x; + _loc8_.y = _loc3_.y + _loc3_.height + 4; + var _loc9_:UITitleBg = new UITitleBg("奖励预览",_loc8_.width); + _loc8_.addChild(_loc9_); + _loc9_.x = int(_loc8_.width / 2 - _loc9_.width / 2); + this.box1 = new XunBaoBox(1); + _loc8_.addChild(this.box1); + this.box1.x = 2; + this.box1.y = 27; + this.box2 = new XunBaoBox(2); + _loc8_.addChild(this.box2); + this.box2.x = this.box1.x + 52; + this.box2.y = this.box1.y; + this.box3 = new XunBaoBox(3); + _loc8_.addChild(this.box3); + this.box3.x = this.box2.x + 52; + this.box3.y = this.box1.y; + this.box4 = new XunBaoBox(4); + _loc8_.addChild(this.box4); + this.box4.x = this.box3.x + 52; + this.box4.y = this.box1.y; + this.label2 = new UILabel(100); + this.bg1.addChild(this.label2); + this.label2.x = _loc3_.x; + this.label2.y = _loc8_.y + _loc8_.height + 5; + this.label2.setText("翻卡次数:0/5"); + this.timesText = new UILabel(100,65280); + this.bg1.addChild(this.timesText); + this.timesText.x = _loc3_.x + 110; + this.timesText.y = this.label2.y; + this.timesText.setTextForMat(PublicMethod.getRightTextFormat()); + this.timesText.setText("今日剩余次数:0"); + this.bg4 = new UIWindowBg(); + this.bg4.initSecondPanel(200,168); + this.bg1.addChild(this.bg4); + this.bg4.x = _loc3_.x; + this.bg4.y = _loc8_.y + _loc8_.height + 25; + var _loc10_:UITitleBg = new UITitleBg("探宝记录",this.bg4.width); + this.bg4.addChild(_loc10_); + _loc10_.x = int(this.bg4.width / 2 - _loc10_.width / 2); + this.getUserXunBaoMap(); + this.xunBaoTextMC = new XunBaoTextMC(); + this.bg1.addChild(this.xunBaoTextMC); + this.xunBaoTextMC.x = 240 - int(this.xunBaoTextMC.width / 2); + this.xunBaoTextMC.y = 200; + this.getDropItem(); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERXUNBAO,this.getUserXunbaoResult); + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function getUserXunBaoMap() : void + { + ConnectService.getInstance().homeService.getUserXunBaoMap(); + } + + private function getDropItem() : void + { + var _loc1_:Object = HomeData.getConfig(); + var _loc2_:int = int(_loc1_.POINT_CARD_1); + var _loc3_:int = int(_loc1_.POINT_CARD_2); + var _loc4_:int = int(_loc1_.POINT_CARD_3); + var _loc5_:int = int(_loc1_.POINT_CARD_4); + ToolTipManager.getInstance().setToolTip(this.box1,new TxtTooltip("可获得 1000 仁义点"),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.box2,new TxtTooltip("可获得 700 仁义点"),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.box3,new TxtTooltip("可获得 500 仁义点"),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.box4,new TxtTooltip("可获得 200 仁义点"),false,-1,false); + } + + private function getXunResult(param1:int, param2:Array) : String + { + var _loc6_:int = 0; + var _loc3_:Object = HomeData.getConfig(); + var _loc4_:int = int(param2[param1]); + var _loc5_:* = ""; + if(_loc4_ > 0) + { + if(_loc4_ == 1) + { + _loc5_ += "恭喜获得碧水箱
"; + _loc5_ = _loc5_ + "恭喜获得 " + _loc3_.POINT_CARD_1 + " 仁义点
"; + } + if(_loc4_ == 2) + { + _loc5_ += "恭喜获得神木箱
"; + _loc5_ = _loc5_ + "恭喜获得 " + _loc3_.POINT_CARD_2 + " 仁义点
"; + } + if(_loc4_ == 3) + { + _loc5_ += "恭喜获得赤炎箱
"; + _loc5_ = _loc5_ + "恭喜获得 " + _loc3_.POINT_CARD_3 + " 仁义点
"; + } + } + else + { + _loc6_ = Utils.searchBoxNums(param1); + if(_loc6_ > 0) + { + _loc5_ += "附近藏有宝箱,请仔细查探
"; + } + else + { + _loc5_ += "此区域内没有宝箱
"; + } + } + return _loc5_; + } + + private function getUserXunbaoResult(param1:DevEvent) : void + { + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:int = 0; + var _loc10_:int = 0; + var _loc11_:Array = null; + var _loc14_:DragUnitMc = null; + var _loc15_:int = 0; + var _loc16_:String = null; + var _loc17_:int = 0; + var _loc2_:Object = HomeData.getUserXunBao(); + var _loc3_:int = int(_loc2_.status); + var _loc4_:Object = HomeData.getConfig(); + if(_loc3_ == 0) + { + if(this.maskMc == null) + { + this.maskMc = new DragMaskMc(); + } + this.bg1.addChild(this.maskMc); + this.maskMc.x = 2 + 241 - int(this.maskMc.width / 2); + this.maskMc.y = 2; + this.maskMc.setStatus(0); + for each(_loc14_ in this.itemMcVec) + { + _loc14_.init(); + } + } + else if(_loc3_ == 2) + { + if(this.maskMc == null) + { + this.maskMc = new DragMaskMc(); + } + this.bg1.addChild(this.maskMc); + this.maskMc.x = 2 + 241 - int(this.maskMc.width / 2); + this.maskMc.y = 2; + this.maskMc.setStatus(2); + for each(_loc14_ in this.itemMcVec) + { + _loc14_.fresh(); + } + } + else + { + if(Boolean(this.maskMc) && this.bg1.contains(this.maskMc)) + { + this.bg1.removeChild(this.maskMc); + } + for each(_loc14_ in this.itemMcVec) + { + _loc14_.fresh(); + } + } + _loc5_ = int(_loc2_.step1); + _loc6_ = int(_loc2_.step2); + _loc7_ = int(_loc2_.step3); + _loc8_ = int(_loc2_.step4); + _loc9_ = int(_loc2_.step5); + _loc10_ = 0; + _loc11_ = null; + if(_loc2_.awardStr) + { + _loc11_ = _loc2_.awardStr.split(","); + } + var _loc12_:String = "1、第1次翻卡
"; + if(_loc5_ >= 0) + { + _loc10_ = 1; + _loc12_ += this.getXunResult(_loc5_,_loc11_); + } + else + { + _loc12_ += "尚未翻开
"; + } + _loc12_ += "2、第2次翻卡
"; + if(_loc6_ >= 0) + { + _loc10_ += 1; + _loc12_ += this.getXunResult(_loc6_,_loc11_); + } + else + { + _loc12_ += "尚未翻开
"; + } + _loc12_ += "3、第3次翻卡
"; + if(_loc7_ >= 0) + { + _loc10_ += 1; + _loc12_ += this.getXunResult(_loc7_,_loc11_); + } + else + { + _loc12_ += "尚未翻开
"; + } + _loc12_ += "4、第4次翻卡
"; + if(_loc8_ >= 0) + { + _loc10_ += 1; + _loc12_ += this.getXunResult(_loc8_,_loc11_); + } + else + { + _loc12_ += "尚未翻开
"; + } + _loc12_ += "5、第5次翻卡
"; + if(_loc9_ >= 0) + { + _loc10_ += 1; + _loc12_ += this.getXunResult(_loc9_,_loc11_); + } + else + { + _loc12_ += "尚未翻开"; + } + this.label2.setText("翻卡次数:" + _loc10_ + "/5"); + this.timesText.setText("今日剩余次数:" + _loc2_.times); + if(this.uiTextBar == null) + { + this.uiTextBar = new BattleTextBar(190,152); + this.bg4.addChild(this.uiTextBar); + this.uiTextBar.x = 4; + this.uiTextBar.y = 25; + } + this.uiTextBar.clear(); + this.uiTextBar.print(_loc12_); + var _loc13_:String = ""; + if(_loc2_.dibao) + { + _loc13_ = "次数用完,恭喜获得低保箱:" + _loc4_.POINT_CARD_4 + " 仁义点"; + } + else if(_loc2_.num) + { + _loc15_ = int(_loc11_[_loc2_.num]); + if(_loc15_ > 0) + { + _loc16_ = ""; + if(_loc15_ == 1) + { + _loc13_ = "恭喜获得碧水箱:" + _loc4_.POINT_CARD_1 + " 仁义点"; + } + if(_loc15_ == 2) + { + _loc13_ = "恭喜获得神木箱:" + _loc4_.POINT_CARD_2 + " 仁义点"; + } + if(_loc15_ == 3) + { + _loc13_ = "恭喜获得赤炎箱:" + _loc4_.POINT_CARD_3 + " 仁义点"; + } + } + else + { + _loc17_ = Utils.searchBoxNums(_loc2_.num); + if(_loc17_ > 0) + { + _loc13_ = "发现宝箱,请仔细查探"; + } + else + { + _loc13_ = "此区域内没有宝箱"; + } + } + } + if(_loc13_ != "") + { + this.setShowMess(_loc13_); + } + } + + private function setShowMess(param1:String) : void + { + this.xunBaoTextMC.visible = true; + this.xunBaoTextMC.y = 200; + this.xunBaoTextMC.setText(param1); + TweenLite.to(this.xunBaoTextMC,1,{ + "y":100, + "onComplete":this.hiddenText + }); + } + + private function hiddenText() : void + { + setTimeout(function():void + { + xunBaoTextMC.visible = false; + },1200); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/FairHomeUI.as b/flash_decompiled/com/view/ui/home/FairHomeUI.as new file mode 100644 index 0000000..70d576d --- /dev/null +++ b/flash_decompiled/com/view/ui/home/FairHomeUI.as @@ -0,0 +1,300 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeBuildData; + import com.data.HomeData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UIButton; + import com.view.newui.UIInputText; + import com.view.newui.UILabel; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.FairMc; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class FairHomeUI extends ActivityBase + { + + private static var instance:FairHomeUI; + + private var _width2:int = 0; + + private var _height2:int = -74; + + private var bg1:UIWindowBg; + + private var fairMcVec:Vector.; + + private var label1:UILabel; + + private var label2:UILabel; + + private var input:UIInputText; + + private var picBorder:Sprite; + + private var bg3:UIWindowBg; + + private var contentText:TextField; + + private var restopoint:int = 0; + + private var buildLevel:int; + + private var pointperlevel:int; + + private var preFairMc:FairMc; + + private var type:int = 0; + + public function FairHomeUI() + { + var _loc2_:Bitmap = null; + var _loc9_:UIButton = null; + var _loc12_:FairMc = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_shiji); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,71); + this.bg1.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 = 10; + _loc2_ = gameRes.getBitMap("build_2",gameRes.getApplication(GameUIRes.swfUrl_4)); + this.picBorder.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 2; + _loc2_.width = 99; + _loc2_.height = 57; + var _loc3_:Sprite = PublicMethod.createRectangle(4932907,3353894,window_width + 70,60); + _loc1_.addChild(_loc3_); + var _loc4_:TextFormat = new TextFormat(); + _loc4_.leading = 5; + _loc3_.x = this.picBorder.x + this.picBorder.width + 5; + _loc3_.y = 10; + this.contentText = PublicMethod.getTextFieldWithFillter(11583207,window_width + 68); + this.contentText.height = 52; + this.contentText.wordWrap = true; + this.contentText.multiline = true; + this.contentText.defaultTextFormat = _loc4_; + _loc1_.addChild(this.contentText); + this.contentText.x = _loc3_.x + 2; + this.contentText.y = _loc3_.y + 4; + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(622,308 + this._height2); + this.bg1.addChild(this.bg3); + this.bg3.x = 4; + this.bg3.y = 88; + var _loc5_:Bitmap = gameRes.getBitMap("fairbg",gameRes.getApplication(GameUIRes.swfUrl_4)); + this.bg3.addChild(_loc5_); + _loc5_.x = 4; + _loc5_.y = 4; + _loc5_.width = 624; + this.fairMcVec = new Vector.(); + var _loc6_:int = 1; + while(_loc6_ < 6) + { + _loc12_ = new FairMc(_loc6_); + this.bg3.addChild(_loc12_); + _loc12_.x = 35 + 116 * (_loc6_ - 1); + _loc12_.y = 20; + _loc12_.addEventListener(MouseEvent.CLICK,this.mouseClick); + this.fairMcVec.push(_loc12_); + _loc6_++; + } + var _loc7_:UIWindowBg = new UIWindowBg(); + _loc7_.initThirdPanel(614,152 + this._height2); + this.bg3.addChild(_loc7_); + _loc7_.x = 4; + _loc7_.y = 152; + this.label1 = new UILabel(200); + _loc7_.addChild(this.label1); + this.label1.x = int(_loc7_.width / 2 - this.label1.width / 2); + this.label1.setTextForMat(PublicMethod.getCenterTextFormat()); + this.label1.y = 20; + this.label2 = new UILabel(160); + _loc7_.addChild(this.label2); + this.label2.x = 100; + this.label2.y = 50; + this.label2.setTextForMat(PublicMethod.getRightTextFormat()); + this.input = new UIInputText(80); + _loc7_.addChild(this.input); + this.input.x = this.label2.x + this.label2.width + 4; + this.input.y = this.label2.y - 3; + this.input.setTextFormat(PublicMethod.getCenterTextFormat()); + this.input.numOnly(); + this.input.setMaxChars(5); + this.input.setInputEvent(this.inputText); + var _loc8_:UILabel = new UILabel(50); + _loc7_.addChild(_loc8_); + _loc8_.x = this.input.x + this.input.width + 5; + _loc8_.y = this.label2.y; + _loc8_.setText("点仁义值"); + _loc9_ = new UIButton("兑 换",2); + _loc7_.addChild(_loc9_); + _loc9_.x = _loc8_.x + _loc8_.width + 15; + _loc9_.y = this.label2.y - 4; + _loc9_.onClick = this.exchangeRes; + var _loc10_:Button_9 = new Button_9("规则说明"); + _loc10_.buttonMode = true; + _loc7_.addChild(_loc10_); + _loc10_.x = 565; + _loc10_.y = 10; + var _loc11_:String = "1、每天派发物资可获得仁义,用于府邸培育子嗣。
"; + _loc11_ = _loc11_ + "2、每日可获仁义有限,提升市集等级可扩大上限。"; + ToolTipManager.getInstance().setToolTip(_loc10_,new TxtTooltip(_loc11_),false,-1,false); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_BUILDDATA,this.homeBuildUpdateResult); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERHOME,this.getUserHomeTodayRes); + } + + public static function getInstance() : FairHomeUI + { + if(instance == null) + { + instance = new FairHomeUI(); + } + return instance; + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function homeBuildUpdateResult(param1:DevEvent) : void + { + if(param1.id == 10150003) + { + this.loadBuildData(); + } + } + + public function loadData() : void + { + this.loadBuildData(); + } + + private function loadBuildData() : void + { + var _loc1_:HomeBuildData = HomeData.getBuildByEntId(10150003); + var _loc2_:Object = HomeData.getBuildingByEntId(10150003); + this.buildLevel = _loc1_.level; + this.getUserHomeTodayRes(null); + var _loc3_:String = _loc2_.buiDesc; + _loc3_ = _loc3_ + this.buildLevel + "级市集每天最多可获得" + this.pointperlevel * this.buildLevel + "仁义。"; + this.contentText.htmlText = _loc3_; + } + + private function getUserHomeTodayRes(param1:DevEvent) : void + { + var _loc2_:Object = HomeData.getUserHome(); + this.restopoint = HomeData.getConfig().restopoint; + this.pointperlevel = HomeData.getConfig().pointperlevel; + this.label1.setText("今日已获得仁义值:" + _loc2_.resPoint + "/" + this.buildLevel * this.pointperlevel); + } + + private function inputText() : void + { + this.getData(); + } + + private function mouseClick(param1:MouseEvent) : void + { + var _loc2_:FairMc = param1.currentTarget as FairMc; + if(this.preFairMc) + { + this.preFairMc.setClickStatus(false); + } + this.preFairMc = _loc2_; + this.preFairMc.setClickStatus(true); + this.type = this.preFairMc.getType(); + this.getData(); + } + + private function exchangeRes(param1:MouseEvent) : void + { + var _loc2_:int = int(this.input.getText()); + if(_loc2_ == 0) + { + MessageBoxUI.getInstance().addMessage("请输入要兑换的仁义点"); + return; + } + if(this.type == 0) + { + MessageBoxUI.getInstance().addMessage("选择要兑换的资源"); + return; + } + ConnectService.getInstance().homeService.resToPoint(_loc2_,this.type); + } + + private function getData() : void + { + if(this.type == 0) + { + return; + } + var _loc1_:int = int(this.input.getText()); + var _loc2_:* = "派发 " + this.restopoint * _loc1_; + switch(this.type) + { + case 1: + _loc2_ += " 粮食获得"; + break; + case 2: + _loc2_ += " 木材获得"; + break; + case 3: + _loc2_ += " 石头获得"; + break; + case 4: + _loc2_ += " 青铜获得"; + break; + case 5: + _loc2_ += " 铜币获得"; + } + this.label2.setText(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/HomeBuildSpeedUI.as b/flash_decompiled/com/view/ui/home/HomeBuildSpeedUI.as new file mode 100644 index 0000000..6cce652 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/HomeBuildSpeedUI.as @@ -0,0 +1,185 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeBuildData; + import com.data.HomeData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.activity.ActivityBase; + import com.view.ui.message.MessageBoxUI; + import com.view.usertool.MedicineItem; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HomeBuildSpeedUI extends ActivityBase + { + + private var _width2:int = -352; + + private var _height2:int = -187; + + private var tableMc:UITable; + + private var bg1:UIWindowBg; + + private var title:TextField; + + private var addSpeedBtn:UIButton; + + private var fastTypeArr:Vector.; + + private var buildData:HomeBuildData; + + private var fastType:int = -1; + + public function HomeBuildSpeedUI() + { + var _loc9_:MedicineItem = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_jiasu); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:Array = [""]; + var _loc2_:Array = [270]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(6,_loc1_,_loc2_); + this.bg1.addChild(this.tableMc); + this.tableMc.x = 10; + this.tableMc.y = 10; + this.title = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,170); + this.title.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.tableMc.addChild(this.title); + this.title.x = 50; + this.title.y = 4; + this.fastTypeArr = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 6) + { + _loc9_ = new MedicineItem(); + this.fastTypeArr.push(_loc9_); + _loc9_.x = 4; + _loc9_.y = 25 + _loc3_ * 25; + this.tableMc.addChild(_loc9_); + _loc9_.addEventListener(MouseEvent.CLICK,this.selectFastType); + _loc3_++; + } + var _loc4_:Object = new Object(); + _loc4_.time = "10 仁义点"; + _loc4_.money = "10分钟"; + this.fastTypeArr[1].setObj(_loc4_); + var _loc5_:Object = new Object(); + _loc5_.time = "60 仁义点"; + _loc5_.money = "1小时"; + this.fastTypeArr[2].setObj(_loc5_); + var _loc6_:Object = new Object(); + _loc6_.time = "300 仁义点"; + _loc6_.money = "5小时"; + this.fastTypeArr[3].setObj(_loc6_); + var _loc7_:Object = new Object(); + _loc7_.time = "600 仁义点"; + _loc7_.money = "10小时"; + this.fastTypeArr[4].setObj(_loc7_); + var _loc8_:Object = new Object(); + _loc8_.time = "1440 仁义点"; + _loc8_.money = "24小时"; + this.fastTypeArr[5].setObj(_loc8_); + this.addSpeedBtn = new UIButton("加 速",2,10); + this.bg1.addChild(this.addSpeedBtn); + this.addSpeedBtn.x = 105; + this.addSpeedBtn.y = 190; + this.addSpeedBtn.onClick = this.addSpeedSubmit; + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function setBuildData(param1:HomeBuildData) : void + { + this.buildData = param1; + this.title.text = "剩余时间:" + PublicMethod.getTime(this.buildData.leftTime); + var _loc2_:Object = new Object(); + _loc2_.time = "" + this.getNeedPoint() + " 仁义点"; + _loc2_.money = "立刻完成"; + this.fastTypeArr[0].setObj(_loc2_); + } + + private function addSpeedSubmit(param1:MouseEvent) : void + { + if(this.fastType < 0) + { + MessageBoxUI.getInstance().addMessage("请选择加速类型"); + return; + } + if(this.buildData.status == 0) + { + MessageBoxUI.getInstance().addMessage("建造已完成,无需加速。"); + return; + } + var _loc2_:Object = HomeData.getUserHome(); + var _loc3_:Number = Number(_loc2_.point); + var _loc4_:int = this.getNeedPoint(); + if(_loc3_ < _loc4_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足,加速失败。"); + return; + } + this.closeUI(param1); + ConnectService.getInstance().homeService.addBuildSpeed(this.buildData.buildId,this.fastType); + } + + private function getNeedPoint() : int + { + return int(this.buildData.leftTime / 60); + } + + 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_; + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/HomeCardUI.as b/flash_decompiled/com/view/ui/home/HomeCardUI.as new file mode 100644 index 0000000..2d29eb7 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/HomeCardUI.as @@ -0,0 +1,489 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + import com.greensock.TweenLite; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UIIconBtn; + import com.view.newui.UILabel; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.HomeCardMc; + import com.view.ui.home.mc.XunBaoTextMC; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.events.MouseEvent; + import flash.utils.setTimeout; + + public class HomeCardUI extends ActivityBase + { + + private var _width2:int = 32; + + private var _height2:int = 57; + + private var bg1:UIWindowBg; + + private var tipView1:Button_9; + + private var tipView2:Button_9; + + private var label1:UILabel; + + private var label2:UILabel; + + private var label3:UILabel; + + private var addPointTextMC:XunBaoTextMC; + + private var beginBtn:UIIconBtn; + + private var endBtn:UIIconBtn; + + private var card1:HomeCardMc; + + private var card2:HomeCardMc; + + private var card3:HomeCardMc; + + private var card4:HomeCardMc; + + private var card5:HomeCardMc; + + private var firstIn:Boolean = true; + + private var num:int = 1; + + private var addPoint:int; + + public function HomeCardUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_tianshipaiju); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:Bitmap = gameRes.getBitMap("cardbg",gameRes.getApplication(GameUIRes.swfUrl_4)); + this.bg1.addChild(_loc1_); + _loc1_.x = 2; + _loc1_.y = 2; + this.label1 = new UILabel(110); + this.bg1.addChild(this.label1); + this.label1.x = 22; + this.label1.y = 42; + this.label2 = new UILabel(110); + this.bg1.addChild(this.label2); + this.label2.x = 22; + this.label2.y = 22; + this.tipView1 = new Button_9("规则说明"); + this.tipView1.buttonMode = true; + this.bg1.addChild(this.tipView1); + this.tipView1.x = 590; + this.tipView1.y = 15; + this.tipView2 = new Button_9("奖励说明"); + this.tipView2.buttonMode = true; + this.bg1.addChild(this.tipView2); + this.tipView2.x = 590; + this.tipView2.y = 45; + var _loc2_:String = "1、新开牌局后,随机翻出五张不同花色的卡牌。
"; + _loc2_ += "2、不同的花色组合可于结束此局时获得相应的仁义点。
"; + _loc2_ += "3、可点击任一卡牌进行逆天改命,重新翻牌。
"; + _loc2_ += "4、首次逆天改命所需仁义点为30,每次所需仁义点增加5点,最多50"; + ToolTipManager.getInstance().setToolTip(this.tipView1,new TxtTooltip(_loc2_),false,-1,false); + var _loc3_:String = "1、五张卡牌均相同时可获得1200仁义点。
"; + _loc3_ += "2、其中有四张卡牌相同时可获得600仁义点。
"; + _loc3_ += "3、其中三张卡牌相同时可获得200仁义点。
"; + _loc3_ += "4、五张卡牌均不相同时可获得500仁义点。
"; + _loc3_ += "5、除上以外的花色组合可获得50仁义点。"; + ToolTipManager.getInstance().setToolTip(this.tipView2,new TxtTooltip(_loc3_),false,-1,false); + var _loc4_:int = 1; + while(_loc4_ < 6) + { + this["card" + _loc4_] = new HomeCardMc(_loc4_); + this.bg1.addChild(this["card" + _loc4_]); + this["card" + _loc4_].x = 220 + _loc4_ * 20 + 57; + this["card" + _loc4_].y = 20; + this["card" + _loc4_].showType(6); + _loc4_++; + } + this.label3 = new UILabel(300); + this.bg1.addChild(this.label3); + this.label3.x = 180; + this.label3.y = 150; + this.label3.setTextForMat(PublicMethod.getCenterTextFormat()); + this.beginBtn = new UIIconBtn(gameRes.getBitMap("card_begin",gameRes.getApplication(GameUIRes.swfUrl_4))); + this.bg1.addChild(this.beginBtn); + this.beginBtn.x = 265; + this.beginBtn.y = 190; + this.beginBtn.addEventListener(MouseEvent.CLICK,this.beginCard); + this.endBtn = new UIIconBtn(gameRes.getBitMap("card_end",gameRes.getApplication(GameUIRes.swfUrl_4))); + this.bg1.addChild(this.endBtn); + this.endBtn.x = 265; + this.endBtn.y = 190; + this.endBtn.addEventListener(MouseEvent.CLICK,this.endCard); + this.endBtn.visible = false; + this.addPointTextMC = new XunBaoTextMC(); + this.bg1.addChild(this.addPointTextMC); + this.addPointTextMC.x = int(this.bg1.width / 2) - int(this.addPointTextMC.width / 2); + this.addPointTextMC.y = 140; + this.getUserCard(); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERCARD,this.getUserCardResult); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_CHANGECARD,this.changeCardResult); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_ENDCARD,this.endCardResult); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_STARTCARD,this.startCardResult); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERHOME,this.userHomeResult); + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function getUserCard() : void + { + ConnectService.getInstance().homeService.getUserCardMap(); + } + + private function getUserCardResult(param1:DevEvent) : void + { + var _loc2_:Object = HomeData.getUserCard(); + var _loc3_:int = int(_loc2_.times); + this.label2.setText("今日开局:" + (3 - _loc3_) + "/3"); + if(_loc2_.status == 0) + { + this.beginBtn.visible = true; + this.endBtn.visible = false; + this.label3.setText(""); + this.firstIn = false; + } + else + { + this.beginBtn.visible = false; + this.endBtn.visible = true; + if(this.firstIn) + { + this.firstIn = false; + this.beginMove(); + } + } + this.userHomeResult(param1); + } + + private function userHomeResult(param1:DevEvent) : void + { + var _loc2_:Object = HomeData.getUserHome(); + this.label1.setText("仁 义 点:" + _loc2_.point); + } + + private function beginCard(param1:MouseEvent) : void + { + ConnectService.getInstance().homeService.startUserCard(); + } + + private function startCardResult(param1:DevEvent) : void + { + this.beginMove(); + } + + private function changeCardResult(param1:DevEvent) : void + { + var _loc2_:Object = null; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:int = 0; + _loc2_ = HomeData.getUserCard(); + this.beginBtn.visible = false; + this.endBtn.visible = false; + var _loc3_:int = param1.para1; + switch(_loc3_) + { + case 1: + _loc5_ = int(_loc2_.card1); + this.card1.setType(_loc5_); + this.card1.trans1(this.transOver); + this.card1.setClickStatus(false); + break; + case 2: + _loc6_ = int(_loc2_.card2); + this.card2.setType(_loc6_); + this.card2.trans1(this.transOver); + this.card2.setClickStatus(false); + break; + case 3: + _loc7_ = int(_loc2_.card3); + this.card3.setType(_loc7_); + this.card3.trans1(this.transOver); + this.card3.setClickStatus(false); + break; + case 4: + _loc8_ = int(_loc2_.card4); + this.card4.setType(_loc8_); + this.card4.trans1(this.transOver); + this.card4.setClickStatus(false); + break; + case 5: + _loc9_ = int(_loc2_.card5); + this.card5.setType(_loc9_); + this.card5.trans1(this.transOver); + this.card5.setClickStatus(false); + } + var _loc4_:int = param1.id; + this.moveText(_loc4_); + } + + private function endCardResult(param1:DevEvent) : void + { + this.addPoint = param1.id; + this.fanpai1(); + this.card1.setClickStatus(false); + this.card2.setClickStatus(false); + this.card3.setClickStatus(false); + this.card4.setClickStatus(false); + this.card5.setClickStatus(false); + ToolTipManager.getInstance().disposeToolTip(this.card1); + ToolTipManager.getInstance().disposeToolTip(this.card2); + ToolTipManager.getInstance().disposeToolTip(this.card3); + ToolTipManager.getInstance().disposeToolTip(this.card4); + ToolTipManager.getInstance().disposeToolTip(this.card5); + } + + private function endCard(param1:MouseEvent) : void + { + ConnectService.getInstance().homeService.endCardGame(); + this.label3.setText(""); + } + + private function beginMove() : void + { + this.beginBtn.visible = false; + this.endBtn.visible = false; + if(this.num == 1) + { + TweenLite.to(this.card1,0.3,{ + "x":87, + "y":290, + "onComplete":this.moveCheck + }); + } + if(this.num == 2) + { + TweenLite.to(this.card2,0.25,{ + "x":212, + "y":290, + "onComplete":this.moveCheck + }); + } + if(this.num == 3) + { + TweenLite.to(this.card3,0.2,{ + "x":337, + "y":290, + "onComplete":this.moveCheck + }); + } + if(this.num == 4) + { + TweenLite.to(this.card4,0.25,{ + "x":462, + "y":290, + "onComplete":this.moveCheck + }); + } + if(this.num == 5) + { + TweenLite.to(this.card5,0.3,{ + "x":587, + "y":290, + "onComplete":this.moveCheck + }); + } + if(this.num == 6) + { + this.fanpai(); + } + } + + private function moveCheck() : void + { + ++this.num; + this.beginMove(); + } + + private function fanpai() : void + { + var _loc1_:Object = HomeData.getUserCard(); + var _loc2_:int = int(_loc1_.card1); + var _loc3_:int = int(_loc1_.card2); + var _loc4_:int = int(_loc1_.card3); + var _loc5_:int = int(_loc1_.card4); + var _loc6_:int = int(_loc1_.card5); + this.card1.setType(_loc2_); + this.card2.setType(_loc3_); + this.card3.setType(_loc4_); + this.card4.setType(_loc5_); + this.card5.setType(_loc6_); + this.card1.trans1(); + this.card2.trans1(); + this.card3.trans1(); + this.card4.trans1(); + this.card5.trans1(this.transOver); + } + + private function transOver() : void + { + this.beginBtn.visible = false; + this.endBtn.visible = true; + this.card1.setClickStatus(true); + this.card2.setClickStatus(true); + this.card3.setClickStatus(true); + this.card4.setClickStatus(true); + this.card5.setClickStatus(true); + var _loc1_:Object = HomeData.getUserCard(); + var _loc2_:int = int(_loc1_.changepoint); + var _loc3_:String = "可花" + _loc2_ + "仁义点进行逆天改命"; + ToolTipManager.getInstance().setToolTip(this.card1,new TxtTooltip(_loc3_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.card2,new TxtTooltip(_loc3_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.card3,new TxtTooltip(_loc3_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.card4,new TxtTooltip(_loc3_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.card5,new TxtTooltip(_loc3_),false,-1,false); + this.label3.setText("本次牌局可获得仁义点:" + _loc1_.addPoint + ""); + } + + private function fanpai1() : void + { + this.beginBtn.visible = false; + this.endBtn.visible = false; + this.card1.setType(6); + this.card2.setType(6); + this.card3.setType(6); + this.card4.setType(6); + this.card5.setType(6); + this.card1.trans1(); + this.card2.trans1(); + this.card3.trans1(); + this.card4.trans1(); + this.card5.trans1(this.moveback); + } + + private function moveback() : void + { + this.num = 5; + this.beginMoveBack(); + } + + private function beginMoveBack() : void + { + if(this.num == 1) + { + TweenLite.to(this.card1,0.3,{ + "x":297, + "y":20, + "onComplete":this.moveBackCheck + }); + } + if(this.num == 2) + { + TweenLite.to(this.card2,0.25,{ + "x":317, + "y":20, + "onComplete":this.moveBackCheck + }); + } + if(this.num == 3) + { + TweenLite.to(this.card3,0.2,{ + "x":337, + "y":20, + "onComplete":this.moveBackCheck + }); + } + if(this.num == 4) + { + TweenLite.to(this.card4,0.25,{ + "x":357, + "y":20, + "onComplete":this.moveBackCheck + }); + } + if(this.num == 5) + { + TweenLite.to(this.card5,0.3,{ + "x":377, + "y":20, + "onComplete":this.moveBackCheck + }); + } + if(this.num == 0) + { + this.num = 1; + this.beginBtn.visible = true; + this.endBtn.visible = false; + this.moveText(this.addPoint); + } + } + + private function moveBackCheck() : void + { + --this.num; + this.beginMoveBack(); + } + + private function moveText(param1:int) : void + { + this.addPointTextMC.visible = true; + this.addPointTextMC.y = 140; + if(param1 > 0) + { + this.addPointTextMC.setText("本次获得仁义点:" + param1); + } + else + { + this.addPointTextMC.setText("本次消耗仁义点:" + -param1 + ""); + } + TweenLite.to(this.addPointTextMC,1,{ + "y":50, + "onComplete":this.hiddenText + }); + } + + private function hiddenText() : void + { + setTimeout(function():void + { + addPointTextMC.visible = false; + },1200); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/HomeCityUI.as b/flash_decompiled/com/view/ui/home/HomeCityUI.as new file mode 100644 index 0000000..a21ee21 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/HomeCityUI.as @@ -0,0 +1,364 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.data.HomeBuildData; + import com.data.HomeData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UILabel; + import com.view.newui.UISmallBtn; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.HomeChildMc; + import com.view.ui.home.mc.HomeChildTip; + import com.view.ui.home.mc.HomeCityPage1; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HomeCityUI extends ActivityBase + { + + private static var instance:HomeCityUI; + + private var _width2:int = 0; + + private var _height2:int = 0; + + private var bg1:UIWindowBg; + + private var btnArr:Array; + + private var nameLabel:UILabel; + + private var sexLabel:UILabel; + + private var typeLabel:UILabel; + + private var bg3:UIWindowBg; + + private var bg4:UIWindowBg; + + private var childMc:HomeChildMc; + + private var contentText:TextField; + + private var upBtn:UIButton; + + private var picBorder:Sprite; + + private var preChildType:int; + + private var homeChildTip:HomeChildTip; + + private var changeNameUI:HomeNameEditUI; + + private var lastTab:UITabBtn; + + private var page1:HomeCityPage1; + + public function HomeCityUI() + { + var _loc2_:Bitmap = null; + var _loc3_:Sprite = null; + var _loc10_:int = 0; + var _loc11_:UITabBtn = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_fudi); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,71); + this.bg1.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 = 10; + _loc2_ = gameRes.getBitMap("build_1",gameRes.getApplication(GameUIRes.swfUrl_4)); + this.picBorder.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 2; + _loc2_.width = 99; + _loc2_.height = 57; + _loc3_ = PublicMethod.createRectangle(4932907,3353894,window_width + 70,60); + _loc1_.addChild(_loc3_); + var _loc4_:TextFormat = new TextFormat(); + _loc4_.leading = 5; + _loc3_.x = this.picBorder.x + this.picBorder.width + 5; + _loc3_.y = 10; + this.contentText = PublicMethod.getTextFieldWithFillter(11583207,window_width + 68); + this.contentText.height = 52; + this.contentText.wordWrap = true; + this.contentText.multiline = true; + this.contentText.defaultTextFormat = _loc4_; + _loc1_.addChild(this.contentText); + this.contentText.x = _loc3_.x + 2; + this.contentText.y = _loc3_.y + 4; + this.upBtn = new UIButton("升 级"); + this.upBtn.x = _loc3_.x + _loc3_.width + 4; + this.upBtn.y = _loc3_.y + 2; + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(622,308); + this.bg1.addChild(this.bg3); + this.bg3.x = 4; + this.bg3.y = 88; + this.bg4 = new UIWindowBg(); + this.bg4.initThirdPanel(322 - 143,299); + this.bg3.addChild(this.bg4); + this.bg4.x = 4; + this.bg4.y = 4; + var _loc5_:UILabel = new UILabel(45); + var _loc6_:UILabel = new UILabel(45); + var _loc7_:UILabel = new UILabel(45); + this.bg4.addChild(_loc5_); + _loc5_.setText("姓名:"); + _loc5_.x = 5; + _loc5_.y = 254; + var _loc8_:UISmallBtn = new UISmallBtn("改 名",2); + this.bg4.addChild(_loc8_); + _loc8_.x = 130; + _loc8_.y = 251; + _loc8_.onClick = this.changeName; + this.bg4.addChild(_loc6_); + _loc6_.setText("性别:"); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 24; + this.bg4.addChild(_loc7_); + _loc7_.setText("阶段:"); + _loc7_.x = _loc6_.x + 90; + _loc7_.y = _loc6_.y; + this.nameLabel = new UILabel(80,65280); + this.bg4.addChild(this.nameLabel); + this.nameLabel.setText(""); + this.nameLabel.x = _loc5_.x + _loc5_.width; + this.nameLabel.y = _loc5_.y; + this.sexLabel = new UILabel(30,65280); + this.bg4.addChild(this.sexLabel); + this.sexLabel.setText(""); + this.sexLabel.x = this.nameLabel.x; + this.sexLabel.y = _loc6_.y; + this.typeLabel = new UILabel(50,65280); + this.bg4.addChild(this.typeLabel); + this.typeLabel.setText(""); + this.typeLabel.x = 134; + this.typeLabel.y = _loc6_.y; + this.btnArr = new Array(); + var _loc9_:UITabBtn = new UITabBtn("技 艺",2); + this.btnArr.push(_loc9_); + for each(_loc11_ in this.btnArr) + { + this.bg3.addChild(_loc11_); + _loc11_.x = 210 + _loc10_ * 66; + _loc11_.y = 6; + _loc11_.onClick = this.clickTab; + _loc10_++; + } + _loc9_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERHOME,this.userHomeUpdateResult); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_BUILDDATA,this.homeBuildUpdateResult); + } + + public static function getInstance() : HomeCityUI + { + if(instance == null) + { + instance = new HomeCityUI(); + } + return instance; + } + + 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 loadData() : void + { + this.loadBuildData(); + this.getUserHomeData(); + } + + private function loadBuildData() : void + { + var _loc1_:HomeBuildData = HomeData.getBuildByEntId(10150001); + var _loc2_:Object = HomeData.getBuildingByEntId(10150001); + var _loc3_:String = _loc2_.buiDesc; + if(_loc1_.level < 10) + { + _loc3_ = _loc3_ + "" + _loc1_.level + "级府邸最多可提升至婴儿阶段,达到10级后可提升至幼儿阶段。"; + } + else if(_loc1_.level < 20) + { + _loc3_ = _loc3_ + "" + _loc1_.level + "级府邸最多可提升至幼儿阶段,达到20级后可提升至少儿阶段。"; + } + else if(_loc1_.level < 30) + { + _loc3_ = _loc3_ + "" + _loc1_.level + "级府邸最多可提升至少儿阶段,达到30级后可提升至少年阶段。"; + } + else if(_loc1_.level < 40) + { + _loc3_ = _loc3_ + "" + _loc1_.level + "级府邸最多可提升至少年阶段,达到40级后可提升至青年阶段。"; + } + else + { + _loc3_ = _loc3_ + "" + _loc1_.level + "级府邸最多可提升至青年阶段,达到50级后可提升至壮年阶段。"; + } + this.contentText.htmlText = _loc3_; + } + + private function homeBuildUpdateResult(param1:DevEvent) : void + { + if(param1.id == 10150001) + { + this.loadBuildData(); + } + } + + private function getUserHomeData() : void + { + var _loc1_:HomeBuildData = HomeData.getBuildByEntId(10150001); + var _loc2_:Object = HomeData.getUserHome(); + this.nameLabel.setText(_loc2_.name); + if(_loc2_.sex == 1) + { + this.sexLabel.setText("女"); + } + else + { + this.sexLabel.setText("男"); + } + var _loc3_:int = int(_loc2_.level); + switch(_loc3_) + { + case 1: + this.typeLabel.setText("婴儿"); + break; + case 2: + this.typeLabel.setText("幼儿"); + break; + case 3: + this.typeLabel.setText("少儿"); + break; + case 4: + this.typeLabel.setText("少年"); + break; + case 5: + this.typeLabel.setText("青年"); + break; + case 6: + this.typeLabel.setText("壮年"); + } + if(this.childMc == null) + { + this.childMc = new HomeChildMc(); + this.bg4.addChild(this.childMc); + this.childMc.x = 5; + this.childMc.y = 5; + } + if(this.homeChildTip == null) + { + this.homeChildTip = new HomeChildTip(this.childMc,face.stage,face.tip_bg); + } + this.homeChildTip.setTipData(_loc2_); + var _loc4_:int = int(_loc2_.level); + if(_loc4_ != this.preChildType) + { + this.preChildType = _loc4_; + this.childMc.loadBg(_loc2_.sex,this.preChildType); + } + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function userHomeUpdateResult(param1:DevEvent) : void + { + this.getUserHomeData(); + } + + private function changeName(param1:MouseEvent) : void + { + if(this.changeNameUI == null) + { + this.changeNameUI = new HomeNameEditUI(); + } + this.bg3.addChild(this.changeNameUI); + this.changeNameUI.x = int(this.bg3.width / 2 - this.changeNameUI.width / 2); + this.changeNameUI.y = 80; + this.changeNameUI.loadData(); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.lastTab) + { + if(_loc2_ == this.lastTab) + { + return; + } + if(_loc2_ == this.btnArr[1]) + { + MessageBoxUI.getInstance().addMessage("暂未开放"); + return; + } + this.lastTab.select = false; + if(this.lastTab == this.btnArr[0]) + { + this.bg3.removeChild(this.page1); + } + } + this.lastTab = _loc2_; + if(this.lastTab == this.btnArr[0]) + { + this.getPage1(); + } + this.lastTab.select = true; + } + + private function getPage1() : void + { + if(this.page1 == null) + { + this.page1 = new HomeCityPage1(); + this.page1.x = 198; + this.page1.y = 31; + } + if(!this.bg3.contains(this.page1)) + { + this.bg3.addChild(this.page1); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/HomeCreateUI.as b/flash_decompiled/com/view/ui/home/HomeCreateUI.as new file mode 100644 index 0000000..b7650f4 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/HomeCreateUI.as @@ -0,0 +1,171 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIInputText; + import com.view.newui.UILabel; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.HomeChildMc; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class HomeCreateUI extends ActivityBase + { + + private var _width2:int = -252; + + private var _height2:int = -87; + + private var bg1:UIWindowBg; + + public var maskBg:Sprite; + + private var female:HomeChildMc; + + private var male:HomeChildMc; + + private var uiname:UIInputText; + + private var label3:UILabel; + + private var sex:int; + + private var preChild:HomeChildMc; + + public function HomeCreateUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_homecreate); + super.setPosition(); + super.ui_closeBtn.visible = false; + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + this.maskBg = PublicMethod.createShape(16777215,954,558); + this.maskBg.x = int(this.width / 2 - this.maskBg.width / 2); + this.maskBg.y = int(this.height / 2 - this.maskBg.height / 2); + addChildAt(this.maskBg,0); + this.maskBg.alpha = 0.1; + this.female = new HomeChildMc(); + this.female.loadBg(1,1); + this.bg1.addChild(this.female); + this.female.addEvent(); + this.female.x = 10; + this.female.y = 10; + this.female.buttonMode = true; + this.female.addEventListener(MouseEvent.CLICK,this.selectSex); + this.male = new HomeChildMc(); + this.male.loadBg(2,1); + this.bg1.addChild(this.male); + this.male.addEvent(); + this.male.x = this.female.x + 188; + this.male.y = this.female.y; + this.male.buttonMode = true; + this.male.addEventListener(MouseEvent.CLICK,this.selectSex); + var _loc1_:UILabel = new UILabel(50); + _loc1_.setText("姓名:"); + this.bg1.addChild(_loc1_); + _loc1_.x = 15; + _loc1_.y = 265; + this.uiname = new UIInputText(100); + this.bg1.addChild(this.uiname); + this.uiname.x = 60; + this.uiname.y = 260; + this.uiname.setMaxChars(10); + this.uiname.setTextFormat(PublicMethod.getCenterTextFormat()); + var _loc2_:UILabel = new UILabel(50); + _loc2_.setText("性别:"); + this.bg1.addChild(_loc2_); + _loc2_.x = 180; + _loc2_.y = _loc1_.y; + this.label3 = new UILabel(50,65280); + this.label3.setText(""); + this.bg1.addChild(this.label3); + this.label3.x = 180 + 50; + this.label3.y = _loc1_.y; + var _loc3_:UIButton = new UIButton("创 建",2); + this.bg1.addChild(_loc3_); + _loc3_.x = 160; + _loc3_.y = _loc1_.y + 25; + _loc3_.onClick = this.addHomeChild; + } + + 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; + } + + private function selectSex(param1:MouseEvent) : void + { + var _loc2_:HomeChildMc = param1.currentTarget as HomeChildMc; + if(this.preChild) + { + this.preChild.setSelect(false); + } + this.preChild = _loc2_; + this.preChild.setSelect(true); + if(this.preChild == this.female) + { + this.sex = 1; + this.label3.setText("女"); + } + else + { + this.sex = 2; + this.label3.setText("男"); + } + } + + private function addHomeChild(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 50) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,君主等级必须达到50级。"); + return; + } + if(this.sex == 0) + { + MessageBoxUI.getInstance().addMessage("请选择性别"); + return; + } + var _loc3_:String = Utils.trim(this.uiname.getText()); + if(_loc3_.length > 10) + { + MessageBoxUI.getInstance().addMessage("姓名字数过长"); + return; + } + if(_loc3_ == "") + { + MessageBoxUI.getInstance().addMessage("请填写姓名"); + return; + } + ConnectService.getInstance().homeService.createUserHome(_loc3_,this.sex); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/HomeMainUI.as b/flash_decompiled/com/view/ui/home/HomeMainUI.as new file mode 100644 index 0000000..89ad35d --- /dev/null +++ b/flash_decompiled/com/view/ui/home/HomeMainUI.as @@ -0,0 +1,227 @@ +package com.view.ui.home +{ + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + import com.greensock.TweenLite; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.BeautyNpc; + import com.view.ui.home.mc.BirdNpc; + import com.view.ui.home.mc.FairHome; + import com.view.ui.home.mc.GirlNpc; + import com.view.ui.home.mc.HomeCardNPC; + import com.view.ui.home.mc.HomeDragonNPC; + import com.view.ui.home.mc.MansionHome; + import com.view.ui.home.mc.SchoolHome; + import com.view.ui.home.mc.WingRoom; + import com.view.ui.home.mc.XunBaoTextMC; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.utils.setTimeout; + + public class HomeMainUI extends ActivityBase + { + + private static var instance:HomeMainUI; + + private var bg:Sprite; + + private var msgBg:Sprite; + + private var xunBaoTextMC:XunBaoTextMC; + + private var mansionHome:MansionHome; + + private var schoolHome:SchoolHome; + + private var fairHome:FairHome; + + private var preShowUI:BaseUI; + + private var homeCreateUI:HomeCreateUI; + + public function HomeMainUI() + { + super(); + loadRes(GameUIRes.swfUrl_4); + } + + public static function getInstance() : HomeMainUI + { + if(instance == null) + { + return instance = new HomeMainUI(); + } + return instance; + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 32 + 286; + window_heihgt = UIWindowBg.normal_window_h - 49 + 201; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 32 + 286; + ui_closeBtn.y = 10; + } + + override public function createUI() : void + { + var _loc7_:GirlNpc = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_home); + super.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630 + 32 + 286,400 - 49 + 201); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.bg = new Sprite(); + _loc1_.addChild(this.bg); + this.bg.x = 2; + this.bg.y = 2; + this.msgBg = new Sprite(); + _loc1_.addChild(this.msgBg); + this.msgBg.x = 2; + this.msgBg.y = 2; + var _loc2_:Bitmap = gameRes.getBitMap("homebg",gameRes.getApplication(swfUrl)); + this.bg.addChild(_loc2_); + this.mansionHome = new MansionHome(); + this.bg.addChild(this.mansionHome); + this.mansionHome.x = 158; + this.mansionHome.y = 143; + this.fairHome = new FairHome(); + this.bg.addChild(this.fairHome); + this.fairHome.x = 323; + this.fairHome.y = 510; + this.schoolHome = new SchoolHome(); + this.bg.addChild(this.schoolHome); + this.schoolHome.x = 828; + this.schoolHome.y = 240; + var _loc3_:WingRoom = new WingRoom(); + this.bg.addChild(_loc3_); + _loc3_.x = 464; + _loc3_.y = 23; + var _loc4_:HomeCardNPC = new HomeCardNPC(); + this.bg.addChild(_loc4_); + _loc4_.x = 383; + _loc4_.y = 91; + var _loc5_:HomeDragonNPC = new HomeDragonNPC(); + this.bg.addChild(_loc5_); + _loc5_.x = 515; + _loc5_.y = 175; + var _loc6_:BeautyNpc = new BeautyNpc(); + this.bg.addChild(_loc6_); + _loc6_.x = -16; + _loc6_.y = -38; + _loc6_.setDirection(0); + _loc6_.beginPlay(); + _loc7_ = new GirlNpc(); + this.bg.addChild(_loc7_); + _loc7_.x = -12; + _loc7_.y = -34; + _loc7_.setDirection(0); + _loc7_.beginPlay(); + var _loc8_:BirdNpc = new BirdNpc(); + this.bg.addChild(_loc8_); + _loc8_.setDirection(0); + _loc8_.beginPlay(); + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initSecondPanel(630 + 32 + 286 - 4,400 - 49 + 201 - 4); + this.bg.addChild(_loc9_); + this.bg.mask = _loc9_; + this.xunBaoTextMC = new XunBaoTextMC(); + this.msgBg.addChild(this.xunBaoTextMC); + this.xunBaoTextMC.x = 480 - int(this.xunBaoTextMC.width / 2); + this.xunBaoTextMC.y = 200; + this.xunBaoTextMC.mouseChildren = false; + this.xunBaoTextMC.mouseEnabled = false; + this.msgBg.mouseChildren = false; + this.msgBg.mouseEnabled = false; + ConnectService.getInstance().homeService.getHomeBuildMap(); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_BUILDLIST,this.getBuildListResult); + } + + public function showMess(param1:String) : void + { + this.xunBaoTextMC.visible = true; + this.xunBaoTextMC.y = 200; + this.xunBaoTextMC.setText(param1); + TweenLite.to(this.xunBaoTextMC,1,{ + "y":100, + "onComplete":this.hiddenText + }); + } + + private function hiddenText() : void + { + setTimeout(function():void + { + xunBaoTextMC.visible = false; + },1200); + } + + public function addUI(param1:BaseUI) : void + { + if(Boolean(this.preShowUI) && this.bg.contains(this.preShowUI)) + { + this.bg.removeChild(this.preShowUI); + } + this.preShowUI = param1; + this.bg.addChild(param1); + this.preShowUI.x = int(960 / 2 - this.preShowUI.width / 2); + this.preShowUI.y = int(560 / 2 - this.preShowUI.height / 2); + } + + private function mouseDown(param1:MouseEvent) : void + { + param1.stopImmediatePropagation(); + var _loc2_:UIBase = param1.currentTarget as UIBase; + _loc2_.startDrag(); + } + + private function mouseUp(param1:MouseEvent) : void + { + var _loc2_:UIBase = param1.currentTarget as UIBase; + _loc2_.stopDrag(); + } + + public function mouseClick(param1:MouseEvent) : void + { + var _loc2_:UIBase = param1.currentTarget as UIBase; + } + + private function getBuildListResult(param1:DevEvent) : void + { + var _loc2_:Object = HomeData.getUserHome(); + if(_loc2_ == null) + { + if(this.homeCreateUI == null) + { + this.homeCreateUI = new HomeCreateUI(); + } + this.bg.addChild(this.homeCreateUI); + this.homeCreateUI.x = -this.homeCreateUI.maskBg.x; + this.homeCreateUI.y = -this.homeCreateUI.maskBg.y; + return; + } + if(Boolean(this.homeCreateUI) && this.bg.contains(this.homeCreateUI)) + { + this.bg.removeChild(this.homeCreateUI); + } + this.mansionHome.update(); + this.schoolHome.update(); + this.fairHome.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/HomeNameEditUI.as b/flash_decompiled/com/view/ui/home/HomeNameEditUI.as new file mode 100644 index 0000000..8fc3034 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/HomeNameEditUI.as @@ -0,0 +1,103 @@ +package com.view.ui.home +{ + import com.control.ConnectService; + import com.data.HomeData; + import com.view.newui.UIButton; + import com.view.newui.UIInputText; + import com.view.newui.UILabel; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.activity.ActivityBase; + import com.view.ui.message.MessageBoxUI; + import flash.events.MouseEvent; + + public class HomeNameEditUI extends ActivityBase + { + + private var _width2:int = -380; + + private var _height2:int = -310; + + private var bg1:UIWindowBg; + + private var nameText:UIInputText; + + public function HomeNameEditUI() + { + var _loc2_:UIButton = null; + var _loc3_:UIButton = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_homeanme); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UILabel = new UILabel(60); + this.bg1.addChild(_loc1_); + _loc1_.x = 50; + _loc1_.y = 20; + _loc1_.setText("子嗣名称:"); + this.nameText = new UIInputText(100); + this.bg1.addChild(this.nameText); + this.nameText.x = _loc1_.x + 65; + this.nameText.y = _loc1_.y - 3; + this.nameText.setMaxChars(10); + _loc2_ = new UIButton("提 交",2); + _loc3_ = new UIButton("取 消",2); + this.bg1.addChild(_loc2_); + _loc2_.x = 50; + _loc2_.y = _loc1_.y + 40; + this.bg1.addChild(_loc3_); + _loc3_.x = _loc2_.x + 100; + _loc3_.y = _loc2_.y; + _loc2_.onClick = this.submit; + _loc3_.onClick = this.closeUI; + } + + 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 loadData() : void + { + var _loc1_:Object = HomeData.getUserHome(); + this.nameText.setText(_loc1_.name); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:String = this.nameText.getText(); + if(_loc2_.length > 10) + { + MessageBoxUI.getInstance().addMessage("名称长度超出限制"); + return; + } + ConnectService.getInstance().homeService.changeChildName(_loc2_); + this.closeUI(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/RoomNpcEquUI1.as b/flash_decompiled/com/view/ui/home/RoomNpcEquUI1.as new file mode 100644 index 0000000..b68f213 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/RoomNpcEquUI1.as @@ -0,0 +1,490 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + 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.UILabel; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.NpcEquipBg1; + import com.view.ui.home.mc.RemaleItemMc; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class RoomNpcEquUI1 extends ActivityBase + { + + private var _width2:int = -28; + + private var _height2:int = -45; + + private var atkLabel:UILabel; + + private var defLabel:UILabel; + + private var hpLabel:UILabel; + + private var aglLabel:UILabel; + + private var upItemBtn:UIButton; + + private var upBtn:UIButton; + + private var up1Btn:UIButton; + + private var up2Btn:UIButton; + + private var up3Btn:UIButton; + + private var up4Btn:UIButton; + + private var itemVec:Vector.; + + private var value1:UILabel; + + private var value2:UILabel; + + private var value3:UILabel; + + private var value4:UILabel; + + private var value5:UILabel; + + private var preItem:NpcEquipBg1; + + private var currItem:RemaleItemMc; + + private var nextItem:RemaleItemMc; + + public function RoomNpcEquUI1() + { + var _loc5_:UILabel = null; + var _loc8_:UILabel = null; + var _loc12_:UILabel = null; + var _loc16_:int = 0; + var _loc23_:NpcEquipBg1 = null; + this.itemVec = new Vector.(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_shinv); + 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; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(310,347); + _loc1_.addChild(_loc2_); + _loc2_.y = 4; + _loc2_.x = 4; + var _loc3_:int = 1; + while(_loc3_ < 7) + { + _loc23_ = new NpcEquipBg1(_loc3_); + _loc2_.addChild(_loc23_); + this.itemVec.push(_loc23_); + _loc23_.addEventListener(MouseEvent.CLICK,this.clickSingleItem); + _loc3_++; + } + var _loc4_:Bitmap = gameRes.getBitMap("servantNPC_1",gameRes.getApplication(GameUIRes.swfUrl_4)); + _loc2_.addChild(_loc4_); + _loc4_.x = 75; + _loc4_.y = 5; + _loc5_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc5_); + _loc5_.x = 8; + _loc5_.y = 258; + _loc5_.setText("武将攻击:"); + this.atkLabel = new UILabel(244,65280); + _loc2_.addChild(this.atkLabel); + this.atkLabel.x = 70; + this.atkLabel.y = _loc5_.y; + var _loc6_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 25; + _loc6_.setText("武将防御:"); + this.defLabel = new UILabel(244,65280); + _loc2_.addChild(this.defLabel); + this.defLabel.x = this.atkLabel.x; + this.defLabel.y = _loc6_.y; + var _loc7_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 25; + _loc7_.setText("武将体力:"); + this.hpLabel = new UILabel(244,65280); + _loc2_.addChild(this.hpLabel); + this.hpLabel.x = this.atkLabel.x; + this.hpLabel.y = _loc7_.y; + _loc8_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 25; + _loc8_.setText("武将敏捷:"); + this.aglLabel = new UILabel(244,65280); + _loc2_.addChild(this.aglLabel); + this.aglLabel.x = this.atkLabel.x; + this.aglLabel.y = _loc8_.y; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initSecondPanel(267,347); + _loc1_.addChild(_loc9_); + _loc9_.x = _loc2_.width + 8; + _loc9_.y = _loc2_.y; + var _loc10_:UITitleBg = new UITitleBg("侍女升级",_loc9_.width); + _loc9_.addChild(_loc10_); + _loc10_.x = int(_loc9_.width / 2 - _loc10_.width / 2); + var _loc11_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc11_); + _loc11_.x = 10; + _loc11_.y = 35; + _loc11_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc11_.setText("侍女等级:"); + this.value4 = new UILabel(150); + _loc9_.addChild(this.value4); + this.value4.x = _loc11_.x + _loc11_.width + 5; + this.value4.y = _loc11_.y; + _loc12_ = new UILabel(100,16777215); + _loc9_.addChild(_loc12_); + _loc12_.x = 10; + _loc12_.y = _loc11_.y + 25; + _loc12_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc12_.setText("侍女当前属性:"); + this.value1 = new UILabel(150); + _loc9_.addChild(this.value1); + this.value1.x = _loc12_.x + _loc12_.width + 5; + this.value1.y = _loc12_.y; + var _loc13_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc13_); + _loc13_.x = _loc12_.x; + _loc13_.y = _loc12_.y + 25; + _loc13_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc13_.setText("侍女下级属性:"); + this.value2 = new UILabel(150); + _loc9_.addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc13_.y; + var _loc14_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc14_); + _loc14_.x = _loc12_.x; + _loc14_.y = _loc13_.y + 25; + _loc14_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc14_.setText("当前仁义点:"); + this.value3 = new UILabel(150); + _loc9_.addChild(this.value3); + this.value3.x = this.value1.x; + this.value3.y = _loc14_.y; + var _loc15_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc15_); + _loc15_.x = _loc12_.x; + _loc15_.y = _loc14_.y + 25; + _loc15_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc15_.setText("升级所需仁义:"); + _loc16_ = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + this.value5 = new UILabel(150,16711680); + _loc9_.addChild(this.value5); + this.value5.x = this.value1.x; + this.value5.y = _loc15_.y; + this.value5.setText(_loc16_ + ""); + this.upBtn = new UIButton("升 级",2); + _loc9_.addChild(this.upBtn); + this.upBtn.x = 10; + this.upBtn.y = _loc15_.y + 26; + this.upBtn.onClick = this.upFemale; + this.up1Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up1Btn); + this.up1Btn.x = this.upBtn.x + 70; + this.up1Btn.y = this.upBtn.y; + this.up1Btn.onClick = this.upFemale20; + this.up3Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up3Btn); + this.up3Btn.x = this.up1Btn.x + 70; + this.up3Btn.y = this.upBtn.y; + this.up3Btn.onClick = this.upFemale100; + var _loc17_:Button_9 = new Button_9("规则说明"); + _loc17_.buttonMode = true; + _loc9_.addChild(_loc17_); + _loc17_.x = 220; + _loc17_.y = this.upBtn.y + 4; + var _loc18_:String = "1、侍女可增加武将四维属性。
"; + _loc18_ = _loc18_ + "2、侍女可通过仁义点来升级侍女等级。
"; + _loc18_ = _loc18_ + "3、侍女等级不能大于官邸等级。"; + ToolTipManager.getInstance().setToolTip(_loc17_,new TxtTooltip(_loc18_),false,-1,false); + var _loc19_:UITitleBg = new UITitleBg("装备晋级",_loc9_.width); + _loc9_.addChild(_loc19_); + _loc19_.x = int(_loc9_.width / 2 - _loc19_.width / 2); + _loc19_.y = 198; + this.currItem = new RemaleItemMc(); + _loc9_.addChild(this.currItem); + this.currItem.x = 36; + this.currItem.y = 240; + var _loc20_:Sprite = face.getSprite("arrow_2"); + _loc9_.addChild(_loc20_); + _loc20_.x = 115; + _loc20_.y = 250; + this.nextItem = new RemaleItemMc(); + _loc9_.addChild(this.nextItem); + this.nextItem.x = this.currItem.x + 145; + this.nextItem.y = this.currItem.y; + this.upItemBtn = new UIButton("晋 升",2); + _loc9_.addChild(this.upItemBtn); + this.upItemBtn.x = 10; + this.upItemBtn.y = 321; + this.upItemBtn.onClick = this.upFemaleItem; + this.up2Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up2Btn); + this.up2Btn.x = this.upItemBtn.x + 70; + this.up2Btn.y = this.upItemBtn.y; + this.up2Btn.onClick = this.upFemaleItem20; + this.up4Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up4Btn); + this.up4Btn.x = this.up2Btn.x + 70; + this.up4Btn.y = this.upItemBtn.y; + this.up4Btn.onClick = this.upFemaleItem100; + var _loc21_:Button_9 = new Button_9("规则说明"); + _loc21_.buttonMode = true; + _loc9_.addChild(_loc21_); + _loc21_.x = _loc17_.x; + _loc21_.y = this.upItemBtn.y + 4; + var _loc22_:String = "1、侍女装备可通过仁义点来晋升等级。
"; + _loc22_ = _loc22_ + "2、通过晋升侍女装备等级可大幅提升武将四维属性。
"; + _loc22_ = _loc22_ + "3、侍女装备最大级为18级。"; + ToolTipManager.getInstance().setToolTip(_loc21_,new TxtTooltip(_loc22_),false,-1,false); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERHOME,this.gerUserHomeResult); + this.loadUserHome(); + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function loadUserHome() : void + { + var _loc9_:NpcEquipBg1 = null; + var _loc20_:int = 0; + var _loc21_:int = 0; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:Object = HomeData.getBuildingByEntId(10150001); + var _loc4_:int = int(_loc2_.PRO_PERLEVEL_REMALE); + var _loc5_:int = int(_loc2_.POINT_PERLEVEL_REMALE); + var _loc6_:int = int(_loc1_.remaleLv); + var _loc7_:int = _loc6_ * _loc4_; + this.value4.setText(_loc6_ + "级"); + this.value1.setText("武将四维 + " + _loc7_); + var _loc8_:int = int(HomeData.getConfig().LEVEL_MAX_1); + if(_loc6_ >= _loc8_) + { + this.value2.setText("武将四维 + " + (_loc6_ + 1) * _loc4_); + this.value2.setText("已满级"); + this.upBtn.setUnEnable(); + this.up1Btn.setUnEnable(); + this.up3Btn.setUnEnable(); + } + else + { + this.value2.setText("武将四维 + " + (_loc6_ + 1) * _loc4_); + this.upBtn.setEnable(); + this.up1Btn.setEnable(); + this.up3Btn.setEnable(); + } + this.value3.setText(_loc1_.point); + if(_loc8_ > 100) + { + if(_loc6_ >= 100) + { + _loc20_ = int(_loc2_.LEVEL_PER_1); + _loc21_ = _loc5_ + (_loc6_ - 99) * _loc20_; + this.value5.setText(_loc21_ + ""); + } + } + for each(_loc9_ in this.itemVec) + { + _loc9_.loadData(); + } + if(this.preItem) + { + this.preItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + var _loc10_:int = int(_loc2_.PRO_FEMALE_ITEM); + var _loc11_:int = int(_loc1_.remail1); + var _loc12_:int = int(_loc1_.remail2); + var _loc13_:int = int(_loc1_.remail3); + var _loc14_:int = int(_loc1_.remail4); + var _loc15_:int = int(_loc1_.remail5); + var _loc16_:int = int(_loc1_.remail6); + var _loc17_:int = _loc11_ + _loc12_ + _loc13_ + _loc14_ + _loc15_ + _loc16_; + var _loc18_:int = _loc10_ * _loc17_; + var _loc19_:String = _loc18_ + _loc7_ + " (侍女:" + _loc7_ + " + 装备:" + _loc18_ + ")"; + this.atkLabel.setText(_loc19_); + this.defLabel.setText(_loc19_); + this.hpLabel.setText(_loc19_); + this.aglLabel.setText(_loc19_); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:NpcEquipBg1 = param1.currentTarget as NpcEquipBg1; + if(this.preItem) + { + this.preItem.setSelect(false); + } + this.preItem = _loc2_; + this.preItem.setSelect(true); + this.setUpData(); + } + + private function setUpData() : void + { + var _loc9_:Object = null; + var _loc10_:int = 0; + var _loc11_:int = 0; + var _loc12_:String = null; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:int = this.preItem.getType(); + var _loc4_:int = int(_loc1_["remail" + _loc3_]); + var _loc5_:Object = HomeData.getFemaleItemByLvAndType(_loc3_,_loc4_); + this.currItem.loadItem(_loc5_); + var _loc6_:int = int(_loc2_.POINT_FEMALE_ITEM); + var _loc7_:int = int(HomeData.getConfig().LEVEL_MAX_2); + var _loc8_:int = int(HomeData.getConfig().LEVEL_PER_2); + if(_loc4_ < _loc7_) + { + _loc9_ = HomeData.getFemaleItemByLvAndType(_loc3_,_loc4_ + 1); + this.nextItem.loadItem(_loc9_); + this.upItemBtn.setEnable(); + this.up2Btn.setEnable(); + this.up4Btn.setEnable(); + _loc10_ = _loc4_ + 1; + _loc11_ = _loc10_ * _loc6_; + if(_loc10_ > 18) + { + _loc11_ = 18 * _loc6_; + } + if(_loc10_ > 36) + { + _loc11_ = 18 * _loc6_ + (_loc4_ - 35) * _loc8_; + } + _loc12_ = "本次晋级需消耗 " + _loc11_ + " 仁义点"; + ToolTipManager.getInstance().setToolTip(this.upItemBtn,new TxtTooltip(_loc12_),false,-1,false); + } + else + { + this.nextItem.setNull(); + this.upItemBtn.setUnEnable(); + this.up2Btn.setUnEnable(); + this.up4Btn.setUnEnable(); + ToolTipManager.getInstance().disposeToolTip(this.upItemBtn); + } + } + + private function gerUserHomeResult(param1:DevEvent) : void + { + this.loadUserHome(); + } + + private function upFemale(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upRemalePro(); + } + + private function upFemale20(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upRemalePro20(1); + } + + private function upFemale100(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upRemalePro20(2); + } + + private function upFemaleItem(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upRemaleItem(_loc2_); + } + + private function upFemaleItem20(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upRemaleItem20(_loc2_,1); + } + + private function upFemaleItem100(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upRemaleItem20(_loc2_,2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/RoomNpcEquUI2.as b/flash_decompiled/com/view/ui/home/RoomNpcEquUI2.as new file mode 100644 index 0000000..d789eda --- /dev/null +++ b/flash_decompiled/com/view/ui/home/RoomNpcEquUI2.as @@ -0,0 +1,489 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + 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.UILabel; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.NpcEquipBg2; + import com.view.ui.home.mc.RemaleItemMc; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class RoomNpcEquUI2 extends ActivityBase + { + + private var _width2:int = -28; + + private var _height2:int = -45; + + private var atkLabel:UILabel; + + private var defLabel:UILabel; + + private var hpLabel:UILabel; + + private var aglLabel:UILabel; + + private var upItemBtn:UIButton; + + private var upBtn:UIButton; + + private var itemVec:Vector.; + + private var value1:UILabel; + + private var value2:UILabel; + + private var value3:UILabel; + + private var value4:UILabel; + + private var value5:UILabel; + + private var up1Btn:UIButton; + + private var up2Btn:UIButton; + + private var up3Btn:UIButton; + + private var up4Btn:UIButton; + + private var preItem:NpcEquipBg2; + + private var currItem:RemaleItemMc; + + private var nextItem:RemaleItemMc; + + public function RoomNpcEquUI2() + { + var _loc5_:UILabel = null; + var _loc8_:UILabel = null; + var _loc12_:UILabel = null; + var _loc16_:int = 0; + var _loc23_:NpcEquipBg2 = null; + this.itemVec = new Vector.(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_shutong); + 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; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(310,347); + _loc1_.addChild(_loc2_); + _loc2_.y = 4; + _loc2_.x = 4; + var _loc3_:int = 1; + while(_loc3_ < 7) + { + _loc23_ = new NpcEquipBg2(_loc3_); + _loc2_.addChild(_loc23_); + this.itemVec.push(_loc23_); + _loc23_.addEventListener(MouseEvent.CLICK,this.clickSingleItem); + _loc3_++; + } + var _loc4_:Bitmap = gameRes.getBitMap("servantNPC_2",gameRes.getApplication(GameUIRes.swfUrl_4)); + _loc2_.addChild(_loc4_); + _loc4_.x = 75; + _loc4_.y = 5; + _loc5_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc5_); + _loc5_.x = 8; + _loc5_.y = 258; + _loc5_.setText("武将攻击:"); + this.atkLabel = new UILabel(244,65280); + _loc2_.addChild(this.atkLabel); + this.atkLabel.x = 70; + this.atkLabel.y = _loc5_.y; + var _loc6_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 25; + _loc6_.setText("武将防御:"); + this.defLabel = new UILabel(244,65280); + _loc2_.addChild(this.defLabel); + this.defLabel.x = this.atkLabel.x; + this.defLabel.y = _loc6_.y; + var _loc7_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 25; + _loc7_.setText("武将体力:"); + this.hpLabel = new UILabel(244,65280); + _loc2_.addChild(this.hpLabel); + this.hpLabel.x = this.atkLabel.x; + this.hpLabel.y = _loc7_.y; + _loc8_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 25; + _loc8_.setText("武将敏捷:"); + this.aglLabel = new UILabel(244,65280); + _loc2_.addChild(this.aglLabel); + this.aglLabel.x = this.atkLabel.x; + this.aglLabel.y = _loc8_.y; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initSecondPanel(267,347); + _loc1_.addChild(_loc9_); + _loc9_.x = _loc2_.width + 8; + _loc9_.y = _loc2_.y; + var _loc10_:UITitleBg = new UITitleBg("书童升级",_loc9_.width); + _loc9_.addChild(_loc10_); + _loc10_.x = int(_loc9_.width / 2 - _loc10_.width / 2); + var _loc11_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc11_); + _loc11_.x = 10; + _loc11_.y = 35; + _loc11_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc11_.setText("书童等级:"); + this.value4 = new UILabel(150); + _loc9_.addChild(this.value4); + this.value4.x = _loc11_.x + _loc11_.width + 5; + this.value4.y = _loc11_.y; + _loc12_ = new UILabel(100,16777215); + _loc9_.addChild(_loc12_); + _loc12_.x = 10; + _loc12_.y = _loc11_.y + 25; + _loc12_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc12_.setText("书童当前属性:"); + this.value1 = new UILabel(150); + _loc9_.addChild(this.value1); + this.value1.x = _loc12_.x + _loc12_.width + 5; + this.value1.y = _loc12_.y; + var _loc13_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc13_); + _loc13_.x = _loc12_.x; + _loc13_.y = _loc12_.y + 25; + _loc13_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc13_.setText("书童下级属性:"); + this.value2 = new UILabel(150); + _loc9_.addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc13_.y; + var _loc14_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc14_); + _loc14_.x = _loc12_.x; + _loc14_.y = _loc13_.y + 25; + _loc14_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc14_.setText("当前仁义点:"); + this.value3 = new UILabel(150); + _loc9_.addChild(this.value3); + this.value3.x = this.value1.x; + this.value3.y = _loc14_.y; + var _loc15_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc15_); + _loc15_.x = _loc12_.x; + _loc15_.y = _loc14_.y + 25; + _loc15_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc15_.setText("升级所需仁义:"); + _loc16_ = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + this.value5 = new UILabel(150,16711680); + _loc9_.addChild(this.value5); + this.value5.x = this.value1.x; + this.value5.y = _loc15_.y; + this.value5.setText(_loc16_ + ""); + this.upBtn = new UIButton("升 级",2); + _loc9_.addChild(this.upBtn); + this.upBtn.x = 10; + this.upBtn.y = _loc15_.y + 26; + this.upBtn.onClick = this.upFemale; + this.up1Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up1Btn); + this.up1Btn.x = this.upBtn.x + 75; + this.up1Btn.y = this.upBtn.y; + this.up1Btn.onClick = this.upFemale20; + this.up3Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up3Btn); + this.up3Btn.x = this.up1Btn.x + 70; + this.up3Btn.y = this.upBtn.y; + this.up3Btn.onClick = this.upFemale100; + var _loc17_:Button_9 = new Button_9("规则说明"); + _loc17_.buttonMode = true; + _loc9_.addChild(_loc17_); + _loc17_.x = 220; + _loc17_.y = this.upBtn.y + 4; + var _loc18_:String = "1、书童可增加武将四维属性。
"; + _loc18_ = _loc18_ + "2、书童可通过仁义点来升级侍女等级。
"; + _loc18_ = _loc18_ + "3、书童等级不能大于官邸等级。"; + ToolTipManager.getInstance().setToolTip(_loc17_,new TxtTooltip(_loc18_),false,-1,false); + var _loc19_:UITitleBg = new UITitleBg("装备晋级",_loc9_.width); + _loc9_.addChild(_loc19_); + _loc19_.x = int(_loc9_.width / 2 - _loc19_.width / 2); + _loc19_.y = 198; + this.currItem = new RemaleItemMc(); + _loc9_.addChild(this.currItem); + this.currItem.x = 36; + this.currItem.y = 240; + var _loc20_:Sprite = face.getSprite("arrow_2"); + _loc9_.addChild(_loc20_); + _loc20_.x = 115; + _loc20_.y = 250; + this.nextItem = new RemaleItemMc(); + _loc9_.addChild(this.nextItem); + this.nextItem.x = this.currItem.x + 145; + this.nextItem.y = this.currItem.y; + this.upItemBtn = new UIButton("晋 升",2); + _loc9_.addChild(this.upItemBtn); + this.upItemBtn.x = 10; + this.upItemBtn.y = 321; + this.upItemBtn.onClick = this.upFemaleItem; + this.up2Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up2Btn); + this.up2Btn.x = this.upItemBtn.x + 75; + this.up2Btn.y = this.upItemBtn.y; + this.up2Btn.onClick = this.upFemaleItem20; + this.up4Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up4Btn); + this.up4Btn.x = this.up2Btn.x + 70; + this.up4Btn.y = this.upItemBtn.y; + this.up4Btn.onClick = this.upFemaleItem100; + var _loc21_:Button_9 = new Button_9("规则说明"); + _loc21_.buttonMode = true; + _loc9_.addChild(_loc21_); + _loc21_.x = _loc17_.x; + _loc21_.y = this.upItemBtn.y + 4; + var _loc22_:String = "1、书童装备可通过仁义点来晋升等级。
"; + _loc22_ = _loc22_ + "2、通过晋升书童装备等级可大幅提升武将四维属性。
"; + _loc22_ = _loc22_ + "3、书童装备最大级为18级。"; + ToolTipManager.getInstance().setToolTip(_loc21_,new TxtTooltip(_loc22_),false,-1,false); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERHOME,this.gerUserHomeResult); + this.loadUserHome(); + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function loadUserHome() : void + { + var _loc9_:NpcEquipBg2 = null; + var _loc20_:int = 0; + var _loc21_:int = 0; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:Object = HomeData.getBuildingByEntId(10150001); + var _loc4_:int = int(_loc2_.PRO_PERLEVEL_REMALE); + var _loc5_:int = int(_loc2_.POINT_PERLEVEL_REMALE); + var _loc6_:int = int(_loc1_.boyLv); + var _loc7_:int = _loc6_ * _loc4_; + this.value4.setText(_loc6_ + "级"); + this.value1.setText("武将四维 + " + _loc7_); + var _loc8_:int = int(HomeData.getConfig().LEVEL_MAX_1); + if(_loc6_ >= _loc8_) + { + this.value2.setText("已满级"); + this.upBtn.setUnEnable(); + this.up1Btn.setUnEnable(); + this.up3Btn.setUnEnable(); + } + else + { + this.value2.setText("武将四维 + " + (_loc6_ + 1) * _loc4_); + this.upBtn.setEnable(); + this.up1Btn.setEnable(); + this.up3Btn.setEnable(); + } + this.value3.setText(_loc1_.point); + if(_loc8_ > 100) + { + if(_loc6_ >= 100) + { + _loc20_ = int(_loc2_.LEVEL_PER_1); + _loc21_ = _loc5_ + (_loc6_ - 99) * _loc20_; + this.value5.setText(_loc21_ + ""); + } + } + for each(_loc9_ in this.itemVec) + { + _loc9_.loadData(); + } + if(this.preItem) + { + this.preItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + var _loc10_:int = int(_loc2_.PRO_FEMALE_ITEM); + var _loc11_:int = int(_loc1_.boy1); + var _loc12_:int = int(_loc1_.boy2); + var _loc13_:int = int(_loc1_.boy3); + var _loc14_:int = int(_loc1_.boy4); + var _loc15_:int = int(_loc1_.boy5); + var _loc16_:int = int(_loc1_.boy6); + var _loc17_:int = _loc11_ + _loc12_ + _loc13_ + _loc14_ + _loc15_ + _loc16_; + var _loc18_:int = _loc10_ * _loc17_; + var _loc19_:String = _loc18_ + _loc7_ + " (书童:" + _loc7_ + " + 装备:" + _loc18_ + ")"; + this.atkLabel.setText(_loc19_); + this.defLabel.setText(_loc19_); + this.hpLabel.setText(_loc19_); + this.aglLabel.setText(_loc19_); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:NpcEquipBg2 = param1.currentTarget as NpcEquipBg2; + if(this.preItem) + { + this.preItem.setSelect(false); + } + this.preItem = _loc2_; + this.preItem.setSelect(true); + this.setUpData(); + } + + private function setUpData() : void + { + var _loc9_:Object = null; + var _loc10_:int = 0; + var _loc11_:int = 0; + var _loc12_:String = null; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:int = this.preItem.getType(); + var _loc4_:int = int(_loc1_["boy" + _loc3_]); + var _loc5_:Object = HomeData.getShutongItemByLvAndType(_loc3_,_loc4_); + this.currItem.loadItem(_loc5_); + var _loc6_:int = int(_loc2_.POINT_FEMALE_ITEM); + var _loc7_:int = int(HomeData.getConfig().LEVEL_MAX_2); + var _loc8_:int = int(HomeData.getConfig().LEVEL_PER_2); + if(_loc4_ < _loc7_) + { + _loc9_ = HomeData.getShutongItemByLvAndType(_loc3_,_loc4_ + 1); + this.nextItem.loadItem(_loc9_); + this.upItemBtn.setEnable(); + this.up2Btn.setEnable(); + this.up4Btn.setEnable(); + _loc10_ = _loc4_ + 1; + _loc11_ = _loc10_ * _loc6_; + if(_loc10_ > 18) + { + _loc11_ = 18 * _loc6_; + } + if(_loc10_ > 36) + { + _loc11_ = 18 * _loc6_ + (_loc4_ - 35) * _loc8_; + } + _loc12_ = "本次晋级需消耗 " + _loc11_ + " 仁义点"; + ToolTipManager.getInstance().setToolTip(this.upItemBtn,new TxtTooltip(_loc12_),false,-1,false); + } + else + { + this.nextItem.setNull(); + this.upItemBtn.setUnEnable(); + this.up2Btn.setUnEnable(); + this.up4Btn.setUnEnable(); + ToolTipManager.getInstance().disposeToolTip(this.upItemBtn); + } + } + + private function gerUserHomeResult(param1:DevEvent) : void + { + this.loadUserHome(); + } + + private function upFemale(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upBoyPro(); + } + + private function upFemale20(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upBoyPro20(1); + } + + private function upFemale100(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upBoyPro20(2); + } + + private function upFemaleItem(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upBoyItem(_loc2_); + } + + private function upFemaleItem20(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upBoyItem20(_loc2_,1); + } + + private function upFemaleItem100(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upBoyItem20(_loc2_,2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/RoomNpcEquUI3.as b/flash_decompiled/com/view/ui/home/RoomNpcEquUI3.as new file mode 100644 index 0000000..ba06b22 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/RoomNpcEquUI3.as @@ -0,0 +1,489 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + 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.UILabel; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.NpcEquipBg3; + import com.view.ui.home.mc.RemaleItemMc; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class RoomNpcEquUI3 extends ActivityBase + { + + private var _width2:int = -28; + + private var _height2:int = -45; + + private var atkLabel:UILabel; + + private var defLabel:UILabel; + + private var hpLabel:UILabel; + + private var aglLabel:UILabel; + + private var upItemBtn:UIButton; + + private var upBtn:UIButton; + + private var itemVec:Vector.; + + private var value1:UILabel; + + private var value2:UILabel; + + private var value3:UILabel; + + private var value4:UILabel; + + private var value5:UILabel; + + private var up1Btn:UIButton; + + private var up2Btn:UIButton; + + private var up3Btn:UIButton; + + private var up4Btn:UIButton; + + private var preItem:NpcEquipBg3; + + private var currItem:RemaleItemMc; + + private var nextItem:RemaleItemMc; + + public function RoomNpcEquUI3() + { + var _loc5_:UILabel = null; + var _loc8_:UILabel = null; + var _loc12_:UILabel = null; + var _loc16_:int = 0; + var _loc23_:NpcEquipBg3 = null; + this.itemVec = new Vector.(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_huwei); + 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; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(310,347); + _loc1_.addChild(_loc2_); + _loc2_.y = 4; + _loc2_.x = 4; + var _loc3_:int = 1; + while(_loc3_ < 7) + { + _loc23_ = new NpcEquipBg3(_loc3_); + _loc2_.addChild(_loc23_); + this.itemVec.push(_loc23_); + _loc23_.addEventListener(MouseEvent.CLICK,this.clickSingleItem); + _loc3_++; + } + var _loc4_:Bitmap = gameRes.getBitMap("servantNPC_3",gameRes.getApplication(GameUIRes.swfUrl_4)); + _loc2_.addChild(_loc4_); + _loc4_.x = 75; + _loc4_.y = 5; + _loc5_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc5_); + _loc5_.x = 8; + _loc5_.y = 258; + _loc5_.setText("武将攻击:"); + this.atkLabel = new UILabel(244,65280); + _loc2_.addChild(this.atkLabel); + this.atkLabel.x = 70; + this.atkLabel.y = _loc5_.y; + var _loc6_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 25; + _loc6_.setText("武将防御:"); + this.defLabel = new UILabel(244,65280); + _loc2_.addChild(this.defLabel); + this.defLabel.x = this.atkLabel.x; + this.defLabel.y = _loc6_.y; + var _loc7_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 25; + _loc7_.setText("武将体力:"); + this.hpLabel = new UILabel(244,65280); + _loc2_.addChild(this.hpLabel); + this.hpLabel.x = this.atkLabel.x; + this.hpLabel.y = _loc7_.y; + _loc8_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 25; + _loc8_.setText("武将敏捷:"); + this.aglLabel = new UILabel(244,65280); + _loc2_.addChild(this.aglLabel); + this.aglLabel.x = this.atkLabel.x; + this.aglLabel.y = _loc8_.y; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initSecondPanel(267,347); + _loc1_.addChild(_loc9_); + _loc9_.x = _loc2_.width + 8; + _loc9_.y = _loc2_.y; + var _loc10_:UITitleBg = new UITitleBg("护卫升级",_loc9_.width); + _loc9_.addChild(_loc10_); + _loc10_.x = int(_loc9_.width / 2 - _loc10_.width / 2); + var _loc11_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc11_); + _loc11_.x = 10; + _loc11_.y = 35; + _loc11_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc11_.setText("护卫等级:"); + this.value4 = new UILabel(150); + _loc9_.addChild(this.value4); + this.value4.x = _loc11_.x + _loc11_.width + 5; + this.value4.y = _loc11_.y; + _loc12_ = new UILabel(100,16777215); + _loc9_.addChild(_loc12_); + _loc12_.x = 10; + _loc12_.y = _loc11_.y + 25; + _loc12_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc12_.setText("护卫当前属性:"); + this.value1 = new UILabel(150); + _loc9_.addChild(this.value1); + this.value1.x = _loc12_.x + _loc12_.width + 5; + this.value1.y = _loc12_.y; + var _loc13_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc13_); + _loc13_.x = _loc12_.x; + _loc13_.y = _loc12_.y + 25; + _loc13_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc13_.setText("护卫下级属性:"); + this.value2 = new UILabel(150); + _loc9_.addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc13_.y; + var _loc14_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc14_); + _loc14_.x = _loc12_.x; + _loc14_.y = _loc13_.y + 25; + _loc14_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc14_.setText("当前仁义点:"); + this.value3 = new UILabel(150); + _loc9_.addChild(this.value3); + this.value3.x = this.value1.x; + this.value3.y = _loc14_.y; + var _loc15_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc15_); + _loc15_.x = _loc12_.x; + _loc15_.y = _loc14_.y + 25; + _loc15_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc15_.setText("升级所需仁义:"); + _loc16_ = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + this.value5 = new UILabel(150,16711680); + _loc9_.addChild(this.value5); + this.value5.x = this.value1.x; + this.value5.y = _loc15_.y; + this.value5.setText(_loc16_ + ""); + this.upBtn = new UIButton("升 级",2); + _loc9_.addChild(this.upBtn); + this.upBtn.x = 10; + this.upBtn.y = _loc15_.y + 26; + this.upBtn.onClick = this.upFemale; + this.up1Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up1Btn); + this.up1Btn.x = this.upBtn.x + 75; + this.up1Btn.y = this.upBtn.y; + this.up1Btn.onClick = this.upFemale20; + this.up3Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up3Btn); + this.up3Btn.x = this.up1Btn.x + 70; + this.up3Btn.y = this.upBtn.y; + this.up3Btn.onClick = this.upFemale100; + var _loc17_:Button_9 = new Button_9("规则说明"); + _loc17_.buttonMode = true; + _loc9_.addChild(_loc17_); + _loc17_.x = 220; + _loc17_.y = this.upBtn.y + 4; + var _loc18_:String = "1、护卫可增加武将四维属性。
"; + _loc18_ = _loc18_ + "2、护卫可通过仁义点来升级侍女等级。
"; + _loc18_ = _loc18_ + "3、护卫等级不能大于官邸等级。"; + ToolTipManager.getInstance().setToolTip(_loc17_,new TxtTooltip(_loc18_),false,-1,false); + var _loc19_:UITitleBg = new UITitleBg("装备晋级",_loc9_.width); + _loc9_.addChild(_loc19_); + _loc19_.x = int(_loc9_.width / 2 - _loc19_.width / 2); + _loc19_.y = 198; + this.currItem = new RemaleItemMc(); + _loc9_.addChild(this.currItem); + this.currItem.x = 36; + this.currItem.y = 240; + var _loc20_:Sprite = face.getSprite("arrow_2"); + _loc9_.addChild(_loc20_); + _loc20_.x = 115; + _loc20_.y = 250; + this.nextItem = new RemaleItemMc(); + _loc9_.addChild(this.nextItem); + this.nextItem.x = this.currItem.x + 145; + this.nextItem.y = this.currItem.y; + this.upItemBtn = new UIButton("晋 升",2); + _loc9_.addChild(this.upItemBtn); + this.upItemBtn.x = 10; + this.upItemBtn.y = 321; + this.upItemBtn.onClick = this.upFemaleItem; + this.up2Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up2Btn); + this.up2Btn.x = this.upItemBtn.x + 75; + this.up2Btn.y = this.upItemBtn.y; + this.up2Btn.onClick = this.upFemaleItem20; + this.up4Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up4Btn); + this.up4Btn.x = this.up2Btn.x + 70; + this.up4Btn.y = this.upItemBtn.y; + this.up4Btn.onClick = this.upFemaleItem100; + var _loc21_:Button_9 = new Button_9("规则说明"); + _loc21_.buttonMode = true; + _loc9_.addChild(_loc21_); + _loc21_.x = _loc17_.x; + _loc21_.y = this.upItemBtn.y + 4; + var _loc22_:String = "1、护卫装备可通过仁义点来晋升等级。
"; + _loc22_ = _loc22_ + "2、护卫晋升书童装备等级可大幅提升武将四维属性。
"; + _loc22_ = _loc22_ + "3、护卫装备最大级为18级。"; + ToolTipManager.getInstance().setToolTip(_loc21_,new TxtTooltip(_loc22_),false,-1,false); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERHOME,this.gerUserHomeResult); + this.loadUserHome(); + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function loadUserHome() : void + { + var _loc9_:NpcEquipBg3 = null; + var _loc20_:int = 0; + var _loc21_:int = 0; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:Object = HomeData.getBuildingByEntId(10150001); + var _loc4_:int = int(_loc2_.PRO_PERLEVEL_REMALE); + var _loc5_:int = int(_loc2_.POINT_PERLEVEL_REMALE); + var _loc6_:int = int(_loc1_.soldierLv); + var _loc7_:int = _loc6_ * _loc4_; + this.value4.setText(_loc6_ + "级"); + this.value1.setText("武将四维 + " + _loc7_); + var _loc8_:int = int(HomeData.getConfig().LEVEL_MAX_1); + if(_loc6_ >= _loc8_) + { + this.value2.setText("已满级"); + this.upBtn.setUnEnable(); + this.up1Btn.setUnEnable(); + this.up3Btn.setUnEnable(); + } + else + { + this.value2.setText("武将四维 + " + (_loc6_ + 1) * _loc4_); + this.upBtn.setEnable(); + this.up1Btn.setEnable(); + this.up3Btn.setEnable(); + } + this.value3.setText(_loc1_.point); + if(_loc8_ > 100) + { + if(_loc6_ >= 100) + { + _loc20_ = int(_loc2_.LEVEL_PER_1); + _loc21_ = _loc5_ + (_loc6_ - 99) * _loc20_; + this.value5.setText(_loc21_ + ""); + } + } + for each(_loc9_ in this.itemVec) + { + _loc9_.loadData(); + } + if(this.preItem) + { + this.preItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + var _loc10_:int = int(_loc2_.PRO_FEMALE_ITEM); + var _loc11_:int = int(_loc1_.soldier1); + var _loc12_:int = int(_loc1_.soldier2); + var _loc13_:int = int(_loc1_.soldier3); + var _loc14_:int = int(_loc1_.soldier4); + var _loc15_:int = int(_loc1_.soldier5); + var _loc16_:int = int(_loc1_.soldier6); + var _loc17_:int = _loc11_ + _loc12_ + _loc13_ + _loc14_ + _loc15_ + _loc16_; + var _loc18_:int = _loc10_ * _loc17_; + var _loc19_:String = _loc18_ + _loc7_ + " (护卫:" + _loc7_ + " + 装备:" + _loc18_ + ")"; + this.atkLabel.setText(_loc19_); + this.defLabel.setText(_loc19_); + this.hpLabel.setText(_loc19_); + this.aglLabel.setText(_loc19_); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:NpcEquipBg3 = param1.currentTarget as NpcEquipBg3; + if(this.preItem) + { + this.preItem.setSelect(false); + } + this.preItem = _loc2_; + this.preItem.setSelect(true); + this.setUpData(); + } + + private function setUpData() : void + { + var _loc9_:Object = null; + var _loc10_:int = 0; + var _loc11_:int = 0; + var _loc12_:String = null; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:int = this.preItem.getType(); + var _loc4_:int = int(_loc1_["soldier" + _loc3_]); + var _loc5_:Object = HomeData.getShiweiItemByLvAndType(_loc3_,_loc4_); + this.currItem.loadItem(_loc5_); + var _loc6_:int = int(_loc2_.POINT_FEMALE_ITEM); + var _loc7_:int = int(HomeData.getConfig().LEVEL_MAX_2); + var _loc8_:int = int(HomeData.getConfig().LEVEL_PER_2); + if(_loc4_ < _loc7_) + { + _loc9_ = HomeData.getShiweiItemByLvAndType(_loc3_,_loc4_ + 1); + this.nextItem.loadItem(_loc9_); + this.upItemBtn.setEnable(); + this.up2Btn.setEnable(); + this.up4Btn.setEnable(); + _loc10_ = _loc4_ + 1; + _loc11_ = _loc10_ * _loc6_; + if(_loc10_ > 18) + { + _loc11_ = 18 * _loc6_; + } + if(_loc10_ > 36) + { + _loc11_ = 18 * _loc6_ + (_loc4_ - 35) * _loc8_; + } + _loc12_ = "本次晋级需消耗 " + _loc11_ + " 仁义点"; + ToolTipManager.getInstance().setToolTip(this.upItemBtn,new TxtTooltip(_loc12_),false,-1,false); + } + else + { + this.nextItem.setNull(); + this.upItemBtn.setUnEnable(); + this.up2Btn.setUnEnable(); + this.up4Btn.setUnEnable(); + ToolTipManager.getInstance().disposeToolTip(this.upItemBtn); + } + } + + private function gerUserHomeResult(param1:DevEvent) : void + { + this.loadUserHome(); + } + + private function upFemale(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upSoldierPro(); + } + + private function upFemale20(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upSoldierPro20(1); + } + + private function upFemale100(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upSoldierPro20(2); + } + + private function upFemaleItem(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upSoldierItem(_loc2_); + } + + private function upFemaleItem20(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upSoldierItem20(_loc2_,1); + } + + private function upFemaleItem100(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upSoldierItem20(_loc2_,2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/RoomNpcEquUI4.as b/flash_decompiled/com/view/ui/home/RoomNpcEquUI4.as new file mode 100644 index 0000000..b343b53 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/RoomNpcEquUI4.as @@ -0,0 +1,489 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + 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.UILabel; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.NpcEquipBg4; + import com.view.ui.home.mc.RemaleItemMc; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class RoomNpcEquUI4 extends ActivityBase + { + + private var _width2:int = -28; + + private var _height2:int = -45; + + private var atkLabel:UILabel; + + private var defLabel:UILabel; + + private var hpLabel:UILabel; + + private var aglLabel:UILabel; + + private var upItemBtn:UIButton; + + private var upBtn:UIButton; + + private var up1Btn:UIButton; + + private var up2Btn:UIButton; + + private var up3Btn:UIButton; + + private var up4Btn:UIButton; + + private var itemVec:Vector.; + + private var value1:UILabel; + + private var value2:UILabel; + + private var value3:UILabel; + + private var value4:UILabel; + + private var value5:UILabel; + + private var preItem:NpcEquipBg4; + + private var currItem:RemaleItemMc; + + private var nextItem:RemaleItemMc; + + public function RoomNpcEquUI4() + { + var _loc5_:UILabel = null; + var _loc8_:UILabel = null; + var _loc12_:UILabel = null; + var _loc16_:int = 0; + var _loc23_:NpcEquipBg4 = null; + this.itemVec = new Vector.(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_sir); + 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; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(310,347); + _loc1_.addChild(_loc2_); + _loc2_.y = 4; + _loc2_.x = 4; + var _loc3_:int = 1; + while(_loc3_ < 7) + { + _loc23_ = new NpcEquipBg4(_loc3_); + _loc2_.addChild(_loc23_); + this.itemVec.push(_loc23_); + _loc23_.addEventListener(MouseEvent.CLICK,this.clickSingleItem); + _loc3_++; + } + var _loc4_:Bitmap = gameRes.getBitMap("servantNPC_4",gameRes.getApplication(GameUIRes.swfUrl_4)); + _loc2_.addChild(_loc4_); + _loc4_.x = 75; + _loc4_.y = 5; + _loc5_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc5_); + _loc5_.x = 8; + _loc5_.y = 258; + _loc5_.setText("武将攻击:"); + this.atkLabel = new UILabel(244,65280); + _loc2_.addChild(this.atkLabel); + this.atkLabel.x = 70; + this.atkLabel.y = _loc5_.y; + var _loc6_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 25; + _loc6_.setText("武将防御:"); + this.defLabel = new UILabel(244,65280); + _loc2_.addChild(this.defLabel); + this.defLabel.x = this.atkLabel.x; + this.defLabel.y = _loc6_.y; + var _loc7_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 25; + _loc7_.setText("武将体力:"); + this.hpLabel = new UILabel(244,65280); + _loc2_.addChild(this.hpLabel); + this.hpLabel.x = this.atkLabel.x; + this.hpLabel.y = _loc7_.y; + _loc8_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 25; + _loc8_.setText("武将敏捷:"); + this.aglLabel = new UILabel(244,65280); + _loc2_.addChild(this.aglLabel); + this.aglLabel.x = this.atkLabel.x; + this.aglLabel.y = _loc8_.y; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initSecondPanel(267,347); + _loc1_.addChild(_loc9_); + _loc9_.x = _loc2_.width + 8; + _loc9_.y = _loc2_.y; + var _loc10_:UITitleBg = new UITitleBg("先生升级",_loc9_.width); + _loc9_.addChild(_loc10_); + _loc10_.x = int(_loc9_.width / 2 - _loc10_.width / 2); + var _loc11_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc11_); + _loc11_.x = 10; + _loc11_.y = 35; + _loc11_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc11_.setText("先生等级:"); + this.value4 = new UILabel(150); + _loc9_.addChild(this.value4); + this.value4.x = _loc11_.x + _loc11_.width + 5; + this.value4.y = _loc11_.y; + _loc12_ = new UILabel(100,16777215); + _loc9_.addChild(_loc12_); + _loc12_.x = 10; + _loc12_.y = _loc11_.y + 25; + _loc12_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc12_.setText("先生当前属性:"); + this.value1 = new UILabel(150); + _loc9_.addChild(this.value1); + this.value1.x = _loc12_.x + _loc12_.width + 5; + this.value1.y = _loc12_.y; + var _loc13_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc13_); + _loc13_.x = _loc12_.x; + _loc13_.y = _loc12_.y + 25; + _loc13_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc13_.setText("先生下级属性:"); + this.value2 = new UILabel(150); + _loc9_.addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc13_.y; + var _loc14_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc14_); + _loc14_.x = _loc12_.x; + _loc14_.y = _loc13_.y + 25; + _loc14_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc14_.setText("当前仁义点:"); + this.value3 = new UILabel(150); + _loc9_.addChild(this.value3); + this.value3.x = this.value1.x; + this.value3.y = _loc14_.y; + var _loc15_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc15_); + _loc15_.x = _loc12_.x; + _loc15_.y = _loc14_.y + 25; + _loc15_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc15_.setText("升级所需仁义:"); + _loc16_ = int(HomeData.getConfig().POINT_PERLEVEL_SIR); + this.value5 = new UILabel(150,16711680); + _loc9_.addChild(this.value5); + this.value5.x = this.value1.x; + this.value5.y = _loc15_.y; + this.value5.setText(_loc16_ + ""); + this.upBtn = new UIButton("升 级",2); + _loc9_.addChild(this.upBtn); + this.upBtn.x = 10; + this.upBtn.y = _loc15_.y + 26; + this.upBtn.onClick = this.upFemale; + this.up1Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up1Btn); + this.up1Btn.x = this.upBtn.x + 75; + this.up1Btn.y = this.upBtn.y; + this.up1Btn.onClick = this.upFemale20; + this.up3Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up3Btn); + this.up3Btn.x = this.up1Btn.x + 70; + this.up3Btn.y = this.upBtn.y; + this.up3Btn.onClick = this.upFemale100; + var _loc17_:Button_9 = new Button_9("规则说明"); + _loc17_.buttonMode = true; + _loc9_.addChild(_loc17_); + _loc17_.x = 220; + _loc17_.y = this.upBtn.y + 4; + var _loc18_:String = "1、先生可增加武将四维属性。
"; + _loc18_ = _loc18_ + "2、可通过仁义点来升级先生等级。
"; + _loc18_ = _loc18_ + "3、侍卫等级达到50级后才能升级先生。"; + ToolTipManager.getInstance().setToolTip(_loc17_,new TxtTooltip(_loc18_),false,-1,false); + var _loc19_:UITitleBg = new UITitleBg("装备晋级",_loc9_.width); + _loc9_.addChild(_loc19_); + _loc19_.x = int(_loc9_.width / 2 - _loc19_.width / 2); + _loc19_.y = 198; + this.currItem = new RemaleItemMc(); + _loc9_.addChild(this.currItem); + this.currItem.x = 36; + this.currItem.y = 240; + var _loc20_:Sprite = face.getSprite("arrow_2"); + _loc9_.addChild(_loc20_); + _loc20_.x = 115; + _loc20_.y = 250; + this.nextItem = new RemaleItemMc(); + _loc9_.addChild(this.nextItem); + this.nextItem.x = this.currItem.x + 145; + this.nextItem.y = this.currItem.y; + this.upItemBtn = new UIButton("晋 升",2); + _loc9_.addChild(this.upItemBtn); + this.upItemBtn.x = 10; + this.upItemBtn.y = 321; + this.upItemBtn.onClick = this.upFemaleItem; + this.up2Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up2Btn); + this.up2Btn.x = this.upItemBtn.x + 75; + this.up2Btn.y = this.upItemBtn.y; + this.up2Btn.onClick = this.upFemaleItem20; + this.up4Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up4Btn); + this.up4Btn.x = this.up2Btn.x + 70; + this.up4Btn.y = this.upItemBtn.y; + this.up4Btn.onClick = this.upFemaleItem100; + var _loc21_:Button_9 = new Button_9("规则说明"); + _loc21_.buttonMode = true; + _loc9_.addChild(_loc21_); + _loc21_.x = _loc17_.x; + _loc21_.y = this.upItemBtn.y + 4; + var _loc22_:String = "1、先生装备可通过仁义点来晋升等级。
"; + _loc22_ = _loc22_ + "2、晋升先生装备等级可大幅提升武将四维属性。
"; + _loc22_ = _loc22_ + "3、先生装备最大级为18级。"; + ToolTipManager.getInstance().setToolTip(_loc21_,new TxtTooltip(_loc22_),false,-1,false); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERHOME,this.gerUserHomeResult); + this.loadUserHome(); + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function loadUserHome() : void + { + var _loc9_:NpcEquipBg4 = null; + var _loc20_:int = 0; + var _loc21_:int = 0; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:Object = HomeData.getBuildingByEntId(10150001); + var _loc4_:int = int(_loc2_.PRO_PERLEVEL_SIR); + var _loc5_:int = int(_loc2_.POINT_PERLEVEL_SIR); + var _loc6_:int = int(_loc1_.sirLv); + var _loc7_:int = _loc6_ * _loc4_; + this.value4.setText(_loc6_ + "级"); + this.value1.setText("武将四维 + " + _loc7_); + var _loc8_:int = int(HomeData.getConfig().LEVEL_MAX_1); + if(_loc6_ >= _loc8_) + { + this.value2.setText("已满级"); + this.upBtn.setUnEnable(); + this.up1Btn.setUnEnable(); + this.up3Btn.setUnEnable(); + } + else + { + this.value2.setText("武将四维 + " + (_loc6_ + 1) * _loc4_); + this.upBtn.setEnable(); + this.up1Btn.setEnable(); + this.up3Btn.setEnable(); + } + this.value3.setText(_loc1_.point); + if(_loc8_ > 100) + { + if(_loc6_ >= 100) + { + _loc20_ = int(_loc2_.LEVEL_PER_1); + _loc21_ = _loc5_ + (_loc6_ - 99) * _loc20_; + this.value5.setText(_loc21_ + ""); + } + } + for each(_loc9_ in this.itemVec) + { + _loc9_.loadData(); + } + if(this.preItem) + { + this.preItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + var _loc10_:int = int(_loc2_.PRO_SIR_ITEM); + var _loc11_:int = int(_loc1_.sir1); + var _loc12_:int = int(_loc1_.sir2); + var _loc13_:int = int(_loc1_.sir3); + var _loc14_:int = int(_loc1_.sir4); + var _loc15_:int = int(_loc1_.sir5); + var _loc16_:int = int(_loc1_.sir6); + var _loc17_:int = _loc11_ + _loc12_ + _loc13_ + _loc14_ + _loc15_ + _loc16_; + var _loc18_:int = _loc10_ * _loc17_; + var _loc19_:String = _loc18_ + _loc7_ + " (护卫:" + _loc7_ + " + 装备:" + _loc18_ + ")"; + this.atkLabel.setText(_loc19_); + this.defLabel.setText(_loc19_); + this.hpLabel.setText(_loc19_); + this.aglLabel.setText(_loc19_); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:NpcEquipBg4 = param1.currentTarget as NpcEquipBg4; + if(this.preItem) + { + this.preItem.setSelect(false); + } + this.preItem = _loc2_; + this.preItem.setSelect(true); + this.setUpData(); + } + + private function setUpData() : void + { + var _loc9_:Object = null; + var _loc10_:int = 0; + var _loc11_:int = 0; + var _loc12_:String = null; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:int = this.preItem.getType(); + var _loc4_:int = int(_loc1_["sir" + _loc3_]); + var _loc5_:Object = HomeData.getXianshengItemByLvAndType(_loc3_,_loc4_); + this.currItem.loadItem(_loc5_); + var _loc6_:int = int(_loc2_.POINT_SIR_ITEM); + var _loc7_:int = int(HomeData.getConfig().LEVEL_MAX_2); + var _loc8_:int = int(HomeData.getConfig().LEVEL_PER_2); + if(_loc4_ < _loc7_) + { + _loc9_ = HomeData.getXianshengItemByLvAndType(_loc3_,_loc4_ + 1); + this.nextItem.loadItem(_loc9_); + this.upItemBtn.setEnable(); + this.up2Btn.setEnable(); + this.up4Btn.setEnable(); + _loc10_ = _loc4_ + 1; + _loc11_ = _loc10_ * _loc6_; + if(_loc10_ > 18) + { + _loc11_ = 18 * _loc6_; + } + if(_loc10_ > 36) + { + _loc11_ = 18 * _loc6_ + (_loc4_ - 35) * _loc8_; + } + _loc12_ = "本次晋级需消耗 " + _loc11_ + " 仁义点"; + ToolTipManager.getInstance().setToolTip(this.upItemBtn,new TxtTooltip(_loc12_),false,-1,false); + } + else + { + this.nextItem.setNull(); + this.upItemBtn.setUnEnable(); + this.up2Btn.setUnEnable(); + this.up4Btn.setUnEnable(); + ToolTipManager.getInstance().disposeToolTip(this.upItemBtn); + } + } + + private function gerUserHomeResult(param1:DevEvent) : void + { + this.loadUserHome(); + } + + private function upFemale(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_SIR); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upSirPro(); + } + + private function upFemale20(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upSirPro20(1); + } + + private function upFemale100(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upSirPro20(2); + } + + private function upFemaleItem(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upSirItem(_loc2_); + } + + private function upFemaleItem20(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upSirItem20(_loc2_,1); + } + + private function upFemaleItem100(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upSirItem20(_loc2_,2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/RoomNpcEquUI5.as b/flash_decompiled/com/view/ui/home/RoomNpcEquUI5.as new file mode 100644 index 0000000..ba0c61c --- /dev/null +++ b/flash_decompiled/com/view/ui/home/RoomNpcEquUI5.as @@ -0,0 +1,489 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + 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.UILabel; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.NpcEquipBg5; + import com.view.ui.home.mc.RemaleItemMc; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class RoomNpcEquUI5 extends ActivityBase + { + + private var _width2:int = -28; + + private var _height2:int = -45; + + private var atkLabel:UILabel; + + private var defLabel:UILabel; + + private var hpLabel:UILabel; + + private var aglLabel:UILabel; + + private var upItemBtn:UIButton; + + private var upBtn:UIButton; + + private var up1Btn:UIButton; + + private var up2Btn:UIButton; + + private var up3Btn:UIButton; + + private var up4Btn:UIButton; + + private var itemVec:Vector.; + + private var value1:UILabel; + + private var value2:UILabel; + + private var value3:UILabel; + + private var value4:UILabel; + + private var value5:UILabel; + + private var preItem:NpcEquipBg5; + + private var currItem:RemaleItemMc; + + private var nextItem:RemaleItemMc; + + public function RoomNpcEquUI5() + { + var _loc5_:UILabel = null; + var _loc8_:UILabel = null; + var _loc12_:UILabel = null; + var _loc16_:int = 0; + var _loc23_:NpcEquipBg5 = null; + this.itemVec = new Vector.(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_guanjia); + 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; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(310,347); + _loc1_.addChild(_loc2_); + _loc2_.y = 4; + _loc2_.x = 4; + var _loc3_:int = 1; + while(_loc3_ < 7) + { + _loc23_ = new NpcEquipBg5(_loc3_); + _loc2_.addChild(_loc23_); + this.itemVec.push(_loc23_); + _loc23_.addEventListener(MouseEvent.CLICK,this.clickSingleItem); + _loc3_++; + } + var _loc4_:Bitmap = gameRes.getBitMap("servantNPC_5",gameRes.getApplication(GameUIRes.swfUrl_4)); + _loc2_.addChild(_loc4_); + _loc4_.x = 75; + _loc4_.y = 5; + _loc5_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc5_); + _loc5_.x = 8; + _loc5_.y = 258; + _loc5_.setText("武将攻击:"); + this.atkLabel = new UILabel(244,65280); + _loc2_.addChild(this.atkLabel); + this.atkLabel.x = 70; + this.atkLabel.y = _loc5_.y; + var _loc6_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 25; + _loc6_.setText("武将防御:"); + this.defLabel = new UILabel(244,65280); + _loc2_.addChild(this.defLabel); + this.defLabel.x = this.atkLabel.x; + this.defLabel.y = _loc6_.y; + var _loc7_:UILabel = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 25; + _loc7_.setText("武将体力:"); + this.hpLabel = new UILabel(244,65280); + _loc2_.addChild(this.hpLabel); + this.hpLabel.x = this.atkLabel.x; + this.hpLabel.y = _loc7_.y; + _loc8_ = new UILabel(65,UIConfig.labelColor); + _loc2_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 25; + _loc8_.setText("武将敏捷:"); + this.aglLabel = new UILabel(244,65280); + _loc2_.addChild(this.aglLabel); + this.aglLabel.x = this.atkLabel.x; + this.aglLabel.y = _loc8_.y; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initSecondPanel(267,347); + _loc1_.addChild(_loc9_); + _loc9_.x = _loc2_.width + 8; + _loc9_.y = _loc2_.y; + var _loc10_:UITitleBg = new UITitleBg("管家升级",_loc9_.width); + _loc9_.addChild(_loc10_); + _loc10_.x = int(_loc9_.width / 2 - _loc10_.width / 2); + var _loc11_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc11_); + _loc11_.x = 10; + _loc11_.y = 35; + _loc11_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc11_.setText("护卫等级:"); + this.value4 = new UILabel(150); + _loc9_.addChild(this.value4); + this.value4.x = _loc11_.x + _loc11_.width + 5; + this.value4.y = _loc11_.y; + _loc12_ = new UILabel(100,16777215); + _loc9_.addChild(_loc12_); + _loc12_.x = 10; + _loc12_.y = _loc11_.y + 25; + _loc12_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc12_.setText("护卫当前属性:"); + this.value1 = new UILabel(150); + _loc9_.addChild(this.value1); + this.value1.x = _loc12_.x + _loc12_.width + 5; + this.value1.y = _loc12_.y; + var _loc13_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc13_); + _loc13_.x = _loc12_.x; + _loc13_.y = _loc12_.y + 25; + _loc13_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc13_.setText("护卫下级属性:"); + this.value2 = new UILabel(150); + _loc9_.addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc13_.y; + var _loc14_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc14_); + _loc14_.x = _loc12_.x; + _loc14_.y = _loc13_.y + 25; + _loc14_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc14_.setText("当前仁义点:"); + this.value3 = new UILabel(150); + _loc9_.addChild(this.value3); + this.value3.x = this.value1.x; + this.value3.y = _loc14_.y; + var _loc15_:UILabel = new UILabel(100,16777215); + _loc9_.addChild(_loc15_); + _loc15_.x = _loc12_.x; + _loc15_.y = _loc14_.y + 25; + _loc15_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc15_.setText("升级所需仁义:"); + _loc16_ = int(HomeData.getConfig().POINT_PERLEVEL_GUANJIA); + this.value5 = new UILabel(150,16711680); + _loc9_.addChild(this.value5); + this.value5.x = this.value1.x; + this.value5.y = _loc15_.y; + this.value5.setText(_loc16_ + ""); + this.upBtn = new UIButton("升 级",2); + _loc9_.addChild(this.upBtn); + this.upBtn.x = 10; + this.upBtn.y = _loc15_.y + 26; + this.upBtn.onClick = this.upFemale; + this.up1Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up1Btn); + this.up1Btn.x = this.upBtn.x + 75; + this.up1Btn.y = this.upBtn.y; + this.up1Btn.onClick = this.upFemale20; + this.up3Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up3Btn); + this.up3Btn.x = this.up1Btn.x + 70; + this.up3Btn.y = this.upBtn.y; + this.up3Btn.onClick = this.upFemale100; + var _loc17_:Button_9 = new Button_9("规则说明"); + _loc17_.buttonMode = true; + _loc9_.addChild(_loc17_); + _loc17_.x = 220; + _loc17_.y = this.upBtn.y + 4; + var _loc18_:String = "1、护卫可增加武将四维属性。
"; + _loc18_ = _loc18_ + "2、护卫可通过仁义点来升级侍女等级。
"; + _loc18_ = _loc18_ + "3、护卫等级不能大于官邸等级。"; + ToolTipManager.getInstance().setToolTip(_loc17_,new TxtTooltip(_loc18_),false,-1,false); + var _loc19_:UITitleBg = new UITitleBg("装备晋级",_loc9_.width); + _loc9_.addChild(_loc19_); + _loc19_.x = int(_loc9_.width / 2 - _loc19_.width / 2); + _loc19_.y = 198; + this.currItem = new RemaleItemMc(); + _loc9_.addChild(this.currItem); + this.currItem.x = 36; + this.currItem.y = 240; + var _loc20_:Sprite = face.getSprite("arrow_2"); + _loc9_.addChild(_loc20_); + _loc20_.x = 115; + _loc20_.y = 250; + this.nextItem = new RemaleItemMc(); + _loc9_.addChild(this.nextItem); + this.nextItem.x = this.currItem.x + 145; + this.nextItem.y = this.currItem.y; + this.upItemBtn = new UIButton("晋 升",2); + _loc9_.addChild(this.upItemBtn); + this.upItemBtn.x = 10; + this.upItemBtn.y = 321; + this.upItemBtn.onClick = this.upFemaleItem; + this.up2Btn = new UIButton("升20级",2); + _loc9_.addChild(this.up2Btn); + this.up2Btn.x = this.upItemBtn.x + 75; + this.up2Btn.y = this.upItemBtn.y; + this.up2Btn.onClick = this.upFemaleItem20; + this.up4Btn = new UIButton("升100级",2); + _loc9_.addChild(this.up4Btn); + this.up4Btn.x = this.up2Btn.x + 70; + this.up4Btn.y = this.upItemBtn.y; + this.up4Btn.onClick = this.upFemaleItem100; + var _loc21_:Button_9 = new Button_9("规则说明"); + _loc21_.buttonMode = true; + _loc9_.addChild(_loc21_); + _loc21_.x = _loc17_.x; + _loc21_.y = this.upItemBtn.y + 4; + var _loc22_:String = "1、护卫装备可通过仁义点来晋升等级。
"; + _loc22_ = _loc22_ + "2、护卫晋升书童装备等级可大幅提升武将四维属性。
"; + _loc22_ = _loc22_ + "3、护卫装备最大级为18级。"; + ToolTipManager.getInstance().setToolTip(_loc21_,new TxtTooltip(_loc22_),false,-1,false); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERHOME,this.gerUserHomeResult); + this.loadUserHome(); + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function loadUserHome() : void + { + var _loc9_:NpcEquipBg5 = null; + var _loc20_:int = 0; + var _loc21_:int = 0; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:Object = HomeData.getBuildingByEntId(10150001); + var _loc4_:int = int(_loc2_.PRO_PERLEVEL_GUANJIA); + var _loc5_:int = int(_loc2_.POINT_PERLEVEL_GUANJIA); + var _loc6_:int = int(_loc1_.guanjiaLv); + var _loc7_:int = _loc6_ * _loc4_; + this.value4.setText(_loc6_ + "级"); + this.value1.setText("武将四维 + " + _loc7_); + var _loc8_:int = int(HomeData.getConfig().LEVEL_MAX_1); + if(_loc6_ >= _loc8_) + { + this.value2.setText("已满级"); + this.upBtn.setUnEnable(); + this.up1Btn.setUnEnable(); + this.up3Btn.setUnEnable(); + } + else + { + this.value2.setText("武将四维 + " + (_loc6_ + 1) * _loc4_); + this.upBtn.setEnable(); + this.up1Btn.setEnable(); + this.up3Btn.setEnable(); + } + this.value3.setText(_loc1_.point); + if(_loc8_ > 100) + { + if(_loc6_ >= 100) + { + _loc20_ = int(_loc2_.LEVEL_PER_1); + _loc21_ = _loc5_ + (_loc6_ - 99) * _loc20_; + this.value5.setText(_loc21_ + ""); + } + } + for each(_loc9_ in this.itemVec) + { + _loc9_.loadData(); + } + if(this.preItem) + { + this.preItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + var _loc10_:int = int(_loc2_.PRO_GUANJIA_ITEM); + var _loc11_:int = int(_loc1_.guanjia1); + var _loc12_:int = int(_loc1_.guanjia2); + var _loc13_:int = int(_loc1_.guanjia3); + var _loc14_:int = int(_loc1_.guanjia4); + var _loc15_:int = int(_loc1_.guanjia5); + var _loc16_:int = int(_loc1_.guanjia6); + var _loc17_:int = _loc11_ + _loc12_ + _loc13_ + _loc14_ + _loc15_ + _loc16_; + var _loc18_:int = _loc10_ * _loc17_; + var _loc19_:String = _loc18_ + _loc7_ + " (护卫:" + _loc7_ + " + 装备:" + _loc18_ + ")"; + this.atkLabel.setText(_loc19_); + this.defLabel.setText(_loc19_); + this.hpLabel.setText(_loc19_); + this.aglLabel.setText(_loc19_); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:NpcEquipBg5 = param1.currentTarget as NpcEquipBg5; + if(this.preItem) + { + this.preItem.setSelect(false); + } + this.preItem = _loc2_; + this.preItem.setSelect(true); + this.setUpData(); + } + + private function setUpData() : void + { + var _loc9_:Object = null; + var _loc10_:int = 0; + var _loc11_:int = 0; + var _loc12_:String = null; + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:Object = HomeData.getConfig(); + var _loc3_:int = this.preItem.getType(); + var _loc4_:int = int(_loc1_["guanjia" + _loc3_]); + var _loc5_:Object = HomeData.getGuanjiaItemByLvAndType(_loc3_,_loc4_); + this.currItem.loadItem(_loc5_); + var _loc6_:int = int(_loc2_.POINT_GUANJIA_ITEM); + var _loc7_:int = int(HomeData.getConfig().LEVEL_MAX_2); + var _loc8_:int = int(HomeData.getConfig().LEVEL_PER_2); + if(_loc4_ < _loc7_) + { + _loc9_ = HomeData.getGuanjiaItemByLvAndType(_loc3_,_loc4_ + 1); + this.nextItem.loadItem(_loc9_); + this.upItemBtn.setEnable(); + this.up2Btn.setEnable(); + this.up4Btn.setEnable(); + _loc10_ = _loc4_ + 1; + _loc11_ = _loc10_ * _loc6_; + if(_loc10_ > 18) + { + _loc11_ = 18 * _loc6_; + } + if(_loc10_ > 36) + { + _loc11_ = 18 * _loc6_ + (_loc4_ - 35) * _loc8_; + } + _loc12_ = "本次晋级需消耗 " + _loc11_ + " 仁义点"; + ToolTipManager.getInstance().setToolTip(this.upItemBtn,new TxtTooltip(_loc12_),false,-1,false); + } + else + { + this.nextItem.setNull(); + this.upItemBtn.setUnEnable(); + this.up2Btn.setUnEnable(); + this.up4Btn.setUnEnable(); + ToolTipManager.getInstance().disposeToolTip(this.upItemBtn); + } + } + + private function gerUserHomeResult(param1:DevEvent) : void + { + this.loadUserHome(); + } + + private function upFemale(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_GUANJIA); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upGuanjiaPro(); + } + + private function upFemale20(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upGuanjiaPro20(1); + } + + private function upFemale100(param1:MouseEvent) : void + { + var _loc2_:int = int(HomeData.getConfig().POINT_PERLEVEL_REMALE); + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.point < _loc2_) + { + MessageBoxUI.getInstance().addMessage("仁义点不足"); + return; + } + ConnectService.getInstance().homeService.upGuanjiaPro20(2); + } + + private function upFemaleItem(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upGuanjiaItem(_loc2_); + } + + private function upFemaleItem20(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upGuanjiaItem20(_loc2_,1); + } + + private function upFemaleItem100(param1:MouseEvent) : void + { + if(this.preItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择要晋级的装备"); + return; + } + var _loc2_:int = this.preItem.getType(); + ConnectService.getInstance().homeService.upGuanjiaItem20(_loc2_,2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/RoomNpcUI.as b/flash_decompiled/com/view/ui/home/RoomNpcUI.as new file mode 100644 index 0000000..eec16e8 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/RoomNpcUI.as @@ -0,0 +1,239 @@ +package com.view.ui.home +{ + import com.data.HomeData; + import com.newdata.user.NewUserData; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.RoomNpcMc; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class RoomNpcUI extends ActivityBase + { + + private var _width2:int = 4; + + private var _height2:int = -6; + + private var bg1:UIWindowBg; + + private var roomNpcEquUI1:RoomNpcEquUI1; + + private var prePage:ActivityBase; + + private var roomNpcEquUI2:RoomNpcEquUI2; + + private var roomNpcEquUI3:RoomNpcEquUI3; + + private var roomNpcEquUI4:RoomNpcEquUI4; + + private var roomNpcEquUI5:RoomNpcEquUI5; + + public function RoomNpcUI() + { + var _loc3_:RoomNpcMc = null; + var _loc4_:RoomNpcMc = null; + var _loc5_:RoomNpcMc = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xiangfang); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:Bitmap = gameRes.getBitMap("wingRoomBg",gameRes.getApplication(GameUIRes.swfUrl_4)); + this.bg1.addChild(_loc1_); + _loc1_.x = 2; + _loc1_.y = 2; + var _loc2_:RoomNpcMc = new RoomNpcMc(1); + this.bg1.addChild(_loc2_); + _loc2_.x = 290; + _loc2_.y = 66; + _loc3_ = new RoomNpcMc(4); + this.bg1.addChild(_loc3_); + _loc3_.x = 180; + _loc3_.y = 80; + _loc4_ = new RoomNpcMc(2); + this.bg1.addChild(_loc4_); + _loc4_.x = 415; + _loc4_.y = 82; + _loc5_ = new RoomNpcMc(3); + this.bg1.addChild(_loc5_); + _loc5_.x = 2; + _loc5_.y = 78; + var _loc6_:RoomNpcMc = new RoomNpcMc(5); + this.bg1.addChild(_loc6_); + _loc6_.x = 514; + _loc6_.y = 65; + _loc2_.addEventListener(MouseEvent.CLICK,this.openNpcEqu1); + _loc4_.addEventListener(MouseEvent.CLICK,this.openNpcEqu2); + _loc5_.addEventListener(MouseEvent.CLICK,this.openNpcEqu3); + _loc3_.addEventListener(MouseEvent.CLICK,this.openNpcEqu4); + _loc6_.addEventListener(MouseEvent.CLICK,this.openNpcEqu5); + } + + 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; + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function openNpcEqu1(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 300) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,君主等级必须达到300级。"); + return; + } + if(Boolean(this.prePage) && this.bg1.contains(this.prePage)) + { + this.bg1.removeChild(this.prePage); + } + if(this.roomNpcEquUI1 == null) + { + this.roomNpcEquUI1 = new RoomNpcEquUI1(); + } + this.prePage = this.roomNpcEquUI1; + this.bg1.addChild(this.roomNpcEquUI1); + this.roomNpcEquUI1.x = 5; + this.roomNpcEquUI1.y = -12; + } + + private function openNpcEqu2(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 500) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,君主等级必须达到500级。"); + return; + } + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.remaleLv < 20) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,侍女等级需达到20级。"); + return; + } + if(Boolean(this.prePage) && this.bg1.contains(this.prePage)) + { + this.bg1.removeChild(this.prePage); + } + if(this.roomNpcEquUI2 == null) + { + this.roomNpcEquUI2 = new RoomNpcEquUI2(); + } + this.prePage = this.roomNpcEquUI2; + this.bg1.addChild(this.roomNpcEquUI2); + this.roomNpcEquUI2.x = 5; + this.roomNpcEquUI2.y = -12; + } + + private function openNpcEqu3(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 800) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,君主等级必须达到800级。"); + return; + } + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.boyLv < 20) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,书童等级需达到20级。"); + return; + } + if(Boolean(this.prePage) && this.bg1.contains(this.prePage)) + { + this.bg1.removeChild(this.prePage); + } + if(this.roomNpcEquUI3 == null) + { + this.roomNpcEquUI3 = new RoomNpcEquUI3(); + } + this.prePage = this.roomNpcEquUI3; + this.bg1.addChild(this.roomNpcEquUI3); + this.roomNpcEquUI3.x = 5; + this.roomNpcEquUI3.y = -12; + } + + private function openNpcEqu4(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 1500) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,君主等级必须达到1500级。"); + return; + } + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.soldierLv < 50) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,侍卫等级需达到50级。"); + return; + } + if(Boolean(this.prePage) && this.bg1.contains(this.prePage)) + { + this.bg1.removeChild(this.prePage); + } + if(this.roomNpcEquUI4 == null) + { + this.roomNpcEquUI4 = new RoomNpcEquUI4(); + } + this.prePage = this.roomNpcEquUI4; + this.bg1.addChild(this.roomNpcEquUI4); + this.roomNpcEquUI4.x = 5; + this.roomNpcEquUI4.y = -12; + } + + private function openNpcEqu5(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 1500) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,君主等级必须达到1500级。"); + return; + } + var _loc3_:Object = HomeData.getUserHome(); + if(_loc3_.sirLv < 50) + { + MessageBoxUI.getInstance().addMessage("你还不能参加此活动,先生等级需达到50级。"); + return; + } + if(Boolean(this.prePage) && this.bg1.contains(this.prePage)) + { + this.bg1.removeChild(this.prePage); + } + if(this.roomNpcEquUI5 == null) + { + this.roomNpcEquUI5 = new RoomNpcEquUI5(); + } + this.prePage = this.roomNpcEquUI5; + this.bg1.addChild(this.roomNpcEquUI5); + this.roomNpcEquUI5.x = 5; + this.roomNpcEquUI5.y = -12; + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/SchoolHomeUI.as b/flash_decompiled/com/view/ui/home/SchoolHomeUI.as new file mode 100644 index 0000000..d1a99da --- /dev/null +++ b/flash_decompiled/com/view/ui/home/SchoolHomeUI.as @@ -0,0 +1,226 @@ +package com.view.ui.home +{ + import com.common.PublicMethod; + import com.data.HomeBuildData; + import com.data.HomeData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.home.mc.HomeSchoolPage1; + 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 SchoolHomeUI extends ActivityBase + { + + private static var instance:SchoolHomeUI; + + private var _width2:int = 0; + + private var _height2:int = 0; + + private var bg1:UIWindowBg; + + private var btnArr:Array; + + private var contentText:TextField; + + private var picBorder:Sprite; + + private var lastTab:UITabBtn; + + private var bg3:UIWindowBg; + + private var page1:HomeSchoolPage1; + + public function SchoolHomeUI() + { + var _loc2_:Bitmap = null; + var _loc3_:Sprite = null; + var _loc6_:int = 0; + var _loc7_:UITabBtn = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_sishu); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,71); + this.bg1.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 = 10; + _loc2_ = gameRes.getBitMap("build_3",gameRes.getApplication(GameUIRes.swfUrl_4)); + this.picBorder.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 2; + _loc2_.width = 99; + _loc2_.height = 57; + _loc3_ = PublicMethod.createRectangle(4932907,3353894,window_width + 70,60); + _loc1_.addChild(_loc3_); + var _loc4_:TextFormat = new TextFormat(); + _loc4_.leading = 5; + _loc3_.x = this.picBorder.x + this.picBorder.width + 5; + _loc3_.y = 10; + this.contentText = PublicMethod.getTextFieldWithFillter(11583207,window_width + 68); + this.contentText.height = 52; + this.contentText.wordWrap = true; + this.contentText.multiline = true; + this.contentText.defaultTextFormat = _loc4_; + _loc1_.addChild(this.contentText); + this.contentText.x = _loc3_.x + 2; + this.contentText.y = _loc3_.y + 4; + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(622,308); + this.bg1.addChild(this.bg3); + this.bg3.x = 4; + this.bg3.y = 88; + this.btnArr = new Array(); + var _loc5_:UITabBtn = new UITabBtn("学 堂",2); + this.btnArr.push(_loc5_); + for each(_loc7_ in this.btnArr) + { + this.bg3.addChild(_loc7_); + _loc7_.x = 15 + _loc6_ * 66; + _loc7_.y = 6; + _loc7_.onClick = this.clickTab; + _loc6_++; + } + _loc5_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_BUILDDATA,this.homeBuildUpdateResult); + } + + public static function getInstance() : SchoolHomeUI + { + if(instance == null) + { + instance = new SchoolHomeUI(); + } + return instance; + } + + 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 loadData() : void + { + this.loadBuildData(); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function loadBuildData() : void + { + var _loc1_:HomeBuildData = HomeData.getBuildByEntId(10150002); + var _loc2_:Object = HomeData.getBuildingByEntId(10150002); + var _loc3_:String = _loc2_.buiDesc; + _loc3_ += "私塾可开学堂,由盟主开课,成员加入听课可获得仁义点。私塾等级越高,获得的仁义点越多。"; + this.contentText.htmlText = _loc3_; + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.lastTab) + { + if(_loc2_ == this.lastTab) + { + return; + } + if(_loc2_ == this.btnArr[1]) + { + MessageBoxUI.getInstance().addMessage("暂未开放"); + return; + } + this.lastTab.select = false; + if(this.lastTab == this.btnArr[0]) + { + this.bg3.removeChild(this.page1); + } + } + this.lastTab = _loc2_; + if(this.lastTab == this.btnArr[0]) + { + this.getPage1(); + } + this.lastTab.select = true; + } + + private function getPage1() : void + { + if(this.page1 == null) + { + this.page1 = new HomeSchoolPage1(); + this.page1.x = 5; + this.page1.y = 31; + } + if(!this.bg3.contains(this.page1)) + { + this.bg3.addChild(this.page1); + } + this.page1.loadData(); + } + + private function homeBuildUpdateResult(param1:DevEvent) : void + { + if(param1.id == 10150002) + { + this.loadBuildData(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(Boolean(this.page1) && this.bg3.contains(this.page1)) + { + this.page1.setIsOnStage(false); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(Boolean(this.page1) && this.bg3.contains(this.page1)) + { + this.page1.setIsOnStage(true); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/AskLineMc.as b/flash_decompiled/com/view/ui/home/mc/AskLineMc.as new file mode 100644 index 0000000..6a879ed --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/AskLineMc.as @@ -0,0 +1,35 @@ +package com.view.ui.home.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + + public class AskLineMc extends UIBase + { + + public function AskLineMc(param1:String, param2:String, param3:String, param4:String) + { + super(); + var _loc5_:UILabel = new UILabel(84); + addChild(_loc5_); + _loc5_.setTextForMat(PublicMethod.getCenterTextFormat()); + _loc5_.setText(param1); + var _loc6_:UILabel = new UILabel(84); + addChild(_loc6_); + _loc6_.x = _loc5_.width; + _loc6_.setTextForMat(PublicMethod.getCenterTextFormat()); + _loc6_.setText(param2); + var _loc7_:UILabel = new UILabel(100); + addChild(_loc7_); + _loc7_.x = _loc6_.x + _loc6_.width; + _loc7_.setTextForMat(PublicMethod.getCenterTextFormat()); + _loc7_.setText(param3); + var _loc8_:UILabel = new UILabel(98); + addChild(_loc8_); + _loc8_.x = _loc7_.x + _loc7_.width; + _loc8_.setTextForMat(PublicMethod.getCenterTextFormat()); + _loc8_.setText(param4); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/AskTitleMc.as b/flash_decompiled/com/view/ui/home/mc/AskTitleMc.as new file mode 100644 index 0000000..59e6992 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/AskTitleMc.as @@ -0,0 +1,67 @@ +package com.view.ui.home.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class AskTitleMc extends UIBase + { + + private var label:UILabel; + + private var bg:Sprite; + + private var isSelect:Boolean; + + public function AskTitleMc() + { + super(); + this.bg = PublicMethod.createRectangle(16777215,65535,330,25); + addChild(this.bg); + this.bg.alpha = 0.2; + this.label = new UILabel(330); + addChild(this.label); + this.label.x = 5; + this.label.y = 4; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + public function setText(param1:String) : void + { + this.label.setText(param1); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(!this.isSelect) + { + this.bg.alpha = 0.2; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(!this.isSelect) + { + this.bg.alpha = 0.4; + } + } + + public function setClick(param1:Boolean) : void + { + this.isSelect = param1; + if(this.isSelect) + { + this.bg.alpha = 0.4; + } + else + { + this.bg.alpha = 0.2; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/BeautyNpc.as b/flash_decompiled/com/view/ui/home/mc/BeautyNpc.as new file mode 100644 index 0000000..a2abce5 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/BeautyNpc.as @@ -0,0 +1,184 @@ +package com.view.ui.home.mc +{ + import com.greensock.TweenMax; + import com.greensock.easing.Linear; + import com.newdata.user.NewUserData; + import com.view.res.GameUIRes; + import com.view.ui.battleview.charactor.ImgData; + import com.view.ui.home.AskUI; + import com.view.ui.home.HomeMainUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.geom.Point; + import flash.geom.Rectangle; + import flash.utils.getTimer; + + public class BeautyNpc extends HomeBaseBuild + { + + public var imgVec:Vector.; + + public var imgDataVec:Vector.; + + public var characBitMap:Bitmap; + + private var info:String = "430,518;511,476;588,518;698,453;534,372;437,430;316,363;166,435;120,380;88,366"; + + private var posiArr:Array; + + private var currTime:int; + + public var currFrame:int; + + private var direction:int; + + public var timer:int = 60; + + private var moveSpeed:int = 30; + + private var moveNum:int = 0; + + private var moveType:int = 1; + + private var askUI:AskUI; + + public function BeautyNpc() + { + var _loc2_:ImgData = null; + var _loc6_:ImgData = null; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:BitmapData = null; + super(); + var _loc1_:Bitmap = game.getBitMap("beauty",game.getApplication(GameUIRes.swfUrl_4)); + this.imgVec = new Vector.(); + this.imgDataVec = new Vector.(); + var _loc3_:int = _loc1_.width / 9; + var _loc4_:int = _loc1_.height / 4; + var _loc5_:int = 0; + while(_loc5_ < 36) + { + _loc7_ = _loc5_ % 9; + _loc8_ = _loc5_ / 9; + _loc2_ = new ImgData(_loc3_,_loc4_,_loc3_ * _loc7_,_loc4_ * _loc8_); + this.imgDataVec.push(_loc2_); + _loc5_++; + } + for each(_loc6_ in this.imgDataVec) + { + _loc9_ = new BitmapData(_loc6_._width,_loc6_._height); + _loc9_.copyPixels(_loc1_.bitmapData,new Rectangle(_loc6_._x,_loc6_._y,_loc6_._width,_loc6_._height),new Point(0,0)); + this.imgVec.push(_loc9_); + } + this.characBitMap = new Bitmap(); + buildSp.addChild(this.characBitMap); + this.posiArr = this.info.split(";"); + addEvent(); + } + + public function beginPlay() : void + { + face.stage.addEventListener(Event.ENTER_FRAME,this.frame); + this.moveNum = 0; + this.characBitMap.x = this.posiArr[this.moveNum].split(",")[0]; + this.characBitMap.y = this.posiArr[this.moveNum].split(",")[1]; + this.move(); + } + + private function frame(param1:Event) : void + { + if(getTimer() - this.currTime > this.timer) + { + this.currTime = getTimer(); + this.doAction(); + } + } + + public function doAction() : void + { + this.characBitMap.bitmapData = this.imgVec[this.currFrame + 9 * this.direction]; + ++this.currFrame; + if(this.currFrame > 8) + { + this.currFrame = 0; + } + } + + public function setDirection(param1:int) : void + { + this.direction = param1; + } + + private function move() : void + { + var _loc1_:int = int(this.posiArr[this.moveNum + 1].split(",")[0]); + var _loc2_:int = int(this.posiArr[this.moveNum + 1].split(",")[1]); + if(_loc1_ > this.characBitMap.x && _loc2_ > this.characBitMap.y) + { + this.direction = 1; + } + if(_loc1_ > this.characBitMap.x && _loc2_ < this.characBitMap.y) + { + this.direction = 0; + } + if(_loc1_ < this.characBitMap.x && _loc2_ > this.characBitMap.y) + { + this.direction = 2; + } + if(_loc1_ < this.characBitMap.x && _loc2_ < this.characBitMap.y) + { + this.direction = 3; + } + var _loc3_:Point = new Point(this.characBitMap.x,this.characBitMap.y); + var _loc4_:Point = new Point(_loc1_,_loc2_); + var _loc5_:Number = Point.distance(_loc3_,_loc4_); + var _loc6_:Number = _loc5_ / this.moveSpeed; + TweenMax.to(this.characBitMap,_loc6_,{ + "x":_loc1_, + "y":_loc2_, + "ease":Linear.easeNone, + "onComplete":this.moveOver + }); + } + + private function moveOver() : void + { + if(this.moveNum == this.posiArr.length - 2) + { + this.moveType = 2; + } + if(this.moveNum + 1 == 0) + { + this.moveType = 1; + } + if(this.moveType == 1) + { + ++this.moveNum; + } + else + { + --this.moveNum; + } + this.move(); + } + + override public function mouseClick(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 100) + { + MessageBoxUI.getInstance().addMessage("君主等级须达到100级"); + return; + } + if(this.askUI == null) + { + this.askUI = new AskUI(); + } + HomeMainUI.getInstance().addUI(this.askUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/BirdNpc.as b/flash_decompiled/com/view/ui/home/mc/BirdNpc.as new file mode 100644 index 0000000..4832852 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/BirdNpc.as @@ -0,0 +1,170 @@ +package com.view.ui.home.mc +{ + import com.greensock.TweenMax; + import com.greensock.easing.Linear; + import com.view.res.GameUIRes; + import com.view.ui.battleview.charactor.ImgData; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.events.Event; + import flash.geom.Point; + import flash.geom.Rectangle; + import flash.utils.getTimer; + + public class BirdNpc extends HomeBaseBuild + { + + public var imgVec:Vector.; + + public var imgDataVec:Vector.; + + public var characBitMap:Bitmap; + + private var info1:String = "953,346;530,561"; + + private var info2:String = "640,560;241,0"; + + private var info3:String = "0,483;954,5"; + + private var info4:String = "170,0;955,404"; + + private var posiArr:Array; + + private var preInfo:String; + + private var currTime:int; + + public var currFrame:int; + + private var direction:int; + + public var timer:int = 60; + + private var moveSpeed:int = 30; + + private var moveNum:int = 0; + + public function BirdNpc() + { + var _loc2_:ImgData = null; + var _loc6_:ImgData = null; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:BitmapData = null; + super(); + var _loc1_:Bitmap = game.getBitMap("bird",game.getApplication(GameUIRes.swfUrl_4)); + this.imgVec = new Vector.(); + this.imgDataVec = new Vector.(); + var _loc3_:int = _loc1_.width / 5; + var _loc4_:int = _loc1_.height / 4; + var _loc5_:int = 0; + while(_loc5_ < 20) + { + _loc7_ = _loc5_ % 5; + _loc8_ = _loc5_ / 5; + _loc2_ = new ImgData(_loc3_,_loc4_,_loc3_ * _loc7_,_loc4_ * _loc8_); + this.imgDataVec.push(_loc2_); + _loc5_++; + } + for each(_loc6_ in this.imgDataVec) + { + _loc9_ = new BitmapData(_loc6_._width,_loc6_._height); + _loc9_.copyPixels(_loc1_.bitmapData,new Rectangle(_loc6_._x,_loc6_._y,_loc6_._width,_loc6_._height),new Point(0,0)); + this.imgVec.push(_loc9_); + } + this.characBitMap = new Bitmap(); + addChild(this.characBitMap); + this.preInfo = this.info1; + this.posiArr = this.preInfo.split(";"); + addEvent(); + } + + public function beginPlay() : void + { + face.stage.addEventListener(Event.ENTER_FRAME,this.frame); + this.moveNum = 0; + this.move(); + } + + private function frame(param1:Event) : void + { + if(getTimer() - this.currTime > this.timer) + { + this.currTime = getTimer(); + this.doAction(); + } + } + + public function doAction() : void + { + this.characBitMap.bitmapData = this.imgVec[this.currFrame + 5 * this.direction]; + ++this.currFrame; + if(this.currFrame > 4) + { + this.currFrame = 0; + } + } + + public function setDirection(param1:int) : void + { + this.direction = param1; + } + + private function move() : void + { + this.characBitMap.x = this.posiArr[0].split(",")[0]; + this.characBitMap.y = this.posiArr[0].split(",")[1]; + var _loc1_:int = int(this.posiArr[1].split(",")[0]); + var _loc2_:int = int(this.posiArr[1].split(",")[1]); + if(_loc1_ > this.characBitMap.x && _loc2_ > this.characBitMap.y) + { + this.direction = 1; + } + if(_loc1_ > this.characBitMap.x && _loc2_ < this.characBitMap.y) + { + this.direction = 0; + } + if(_loc1_ < this.characBitMap.x && _loc2_ > this.characBitMap.y) + { + this.direction = 2; + } + if(_loc1_ < this.characBitMap.x && _loc2_ < this.characBitMap.y) + { + this.direction = 3; + } + var _loc3_:Point = new Point(this.characBitMap.x,this.characBitMap.y); + var _loc4_:Point = new Point(_loc1_,_loc2_); + var _loc5_:Number = Point.distance(_loc3_,_loc4_); + var _loc6_:Number = _loc5_ / this.moveSpeed; + TweenMax.to(this.characBitMap,_loc6_,{ + "x":_loc1_, + "y":_loc2_, + "ease":Linear.easeNone, + "onComplete":this.moveOver + }); + } + + private function moveOver() : void + { + if(this.preInfo == this.info1) + { + this.preInfo = this.info2; + } + else if(this.preInfo == this.info2) + { + this.preInfo = this.info3; + } + else if(this.preInfo == this.info3) + { + this.preInfo = this.info4; + } + else if(this.preInfo == this.info4) + { + this.preInfo = this.info1; + } + this.posiArr = this.preInfo.split(";"); + this.move(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/BuildMenu.as b/flash_decompiled/com/view/ui/home/mc/BuildMenu.as new file mode 100644 index 0000000..e6294f6 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/BuildMenu.as @@ -0,0 +1,146 @@ +package com.view.ui.home.mc +{ + import com.control.ConnectService; + import com.data.HomeBuildData; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import com.view.ui.home.FairHomeUI; + import com.view.ui.home.HomeBuildSpeedUI; + import com.view.ui.home.HomeCityUI; + import com.view.ui.home.HomeMainUI; + import com.view.ui.home.SchoolHomeUI; + import com.view.ui.pak.MenuButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class BuildMenu extends UIBase + { + + private static var instance:BuildMenu; + + private var itemArr:Array; + + private var mc:Sprite; + + private var enter_btn:MenuButton; + + private var up_btn:MenuButton; + + private var buildData:HomeBuildData; + + private var homeBuildSpeedUI:HomeBuildSpeedUI; + + public function BuildMenu() + { + super(); + if(instance != null) + { + throw Error("单例"); + } + this.mc = game.getSprite("bg3",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.mc); + this.enter_btn = new MenuButton("进 入"); + this.up_btn = new MenuButton("升 级"); + this.mc.addChild(this.enter_btn); + this.mc.addChild(this.up_btn); + this.enter_btn.x = -64; + this.enter_btn.y = 2; + this.up_btn.x = -64; + this.up_btn.y = 21; + this.init(); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + } + + public static function getInstance() : BuildMenu + { + if(instance == null) + { + instance = new BuildMenu(); + } + return instance; + } + + private function clear() : void + { + if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function init() : void + { + this.mouseEnabled = false; + this.enter_btn.onClick = this.enterBuildUI; + this.up_btn.onClick = this.updateBuild; + } + + public function update(param1:HomeBuildData) : void + { + this.buildData = param1; + this.enter_btn.setEnabled(true); + this.up_btn.setEnabled(true); + if(param1.status == 1) + { + this.up_btn.setText("加 速"); + } + else + { + this.up_btn.setText("升 级"); + } + } + + private function enterBuildUI() : void + { + var _loc1_:HomeCityUI = null; + var _loc2_:SchoolHomeUI = null; + var _loc3_:FairHomeUI = null; + if(this.buildData.buiEntId == 10150001) + { + _loc1_ = HomeCityUI.getInstance(); + _loc1_.loadData(); + HomeMainUI.getInstance().addUI(_loc1_); + } + if(this.buildData.buiEntId == 10150002) + { + _loc2_ = SchoolHomeUI.getInstance(); + _loc2_.loadData(); + HomeMainUI.getInstance().addUI(_loc2_); + } + if(this.buildData.buiEntId == 10150003) + { + _loc3_ = FairHomeUI.getInstance(); + _loc3_.loadData(); + HomeMainUI.getInstance().addUI(_loc3_); + } + this.clear(); + } + + private function updateBuild() : void + { + if(this.buildData.status == 1) + { + if(this.homeBuildSpeedUI == null) + { + this.homeBuildSpeedUI = new HomeBuildSpeedUI(); + } + this.homeBuildSpeedUI.setBuildData(this.buildData); + HomeMainUI.getInstance().addUI(this.homeBuildSpeedUI); + } + else + { + ConnectService.getInstance().homeService.upHomeBuild(this.buildData.buildId); + } + this.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/DragMaskMc.as b/flash_decompiled/com/view/ui/home/mc/DragMaskMc.as new file mode 100644 index 0000000..73fca5e --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/DragMaskMc.as @@ -0,0 +1,76 @@ +package com.view.ui.home.mc +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.view.newui.UIBase; + import com.view.newui.UIButton; + import com.view.newui.UILabel; + import com.view.res.GameUIRes; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class DragMaskMc extends UIBase + { + + private var beginBtn:UIButton; + + private var textLabel:UILabel; + + private var resetBtn:UIButton; + + public function DragMaskMc() + { + super(); + var _loc1_:Sprite = PublicMethod.createShape(0,482,482); + addChild(_loc1_); + _loc1_.alpha = 0.1; + var _loc2_:Sprite = new Scale9Grid(game.getSprite("bg2",game.getApplication(GameUIRes.swfUrl_4)),140,45); + addChild(_loc2_); + _loc2_.x = int(width / 2 - _loc2_.width / 2); + _loc2_.y = 190; + this.beginBtn = new UIButton("开始寻宝",3,14); + addChild(this.beginBtn); + this.beginBtn.x = int(width / 2 - this.beginBtn.width / 2); + this.beginBtn.y = _loc2_.y + 35; + this.textLabel = new UILabel(100); + addChild(this.textLabel); + this.textLabel.x = int(width / 2 - this.textLabel.width / 2); + this.textLabel.y = _loc2_.y + 25; + this.textLabel.setTextForMat(PublicMethod.getCenterTextFormat()); + this.resetBtn = new UIButton("再来一次",3,14); + addChild(this.resetBtn); + this.resetBtn.x = int(width / 2 - this.resetBtn.width / 2); + this.resetBtn.y = this.textLabel.y + 25; + this.beginBtn.addEventListener(MouseEvent.MOUSE_UP,this.beginXunBao); + this.resetBtn.addEventListener(MouseEvent.MOUSE_UP,this.resetXunBao); + } + + public function setStatus(param1:int) : void + { + if(param1 == 0) + { + this.textLabel.setText(""); + this.beginBtn.visible = true; + this.resetBtn.visible = false; + } + if(param1 == 2) + { + this.textLabel.setText("本次探宝已完成"); + this.beginBtn.visible = false; + this.resetBtn.visible = true; + } + } + + private function beginXunBao(param1:MouseEvent) : void + { + ConnectService.getInstance().homeService.beginXunLong(); + } + + private function resetXunBao(param1:MouseEvent) : void + { + ConnectService.getInstance().homeService.resetXunLong(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/DragUnitMc.as b/flash_decompiled/com/view/ui/home/mc/DragUnitMc.as new file mode 100644 index 0000000..eaee98e --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/DragUnitMc.as @@ -0,0 +1,232 @@ +package com.view.ui.home.mc +{ + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class DragUnitMc extends UIBase + { + + private var png1:Bitmap; + + private var png2:Bitmap; + + private var num:int; + + private var labelText:UILabel; + + private var bg:Sprite; + + private var box1:Bitmap; + + private var box5:Bitmap; + + private var txtField:UILabel; + + private var canClick:Boolean = true; + + public function DragUnitMc(param1:int) + { + super(); + this.box1 = game.getBitMap("box1",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.box1); + this.box1.x = 7; + this.box1.y = 9; + this.box5 = game.getBitMap("box5",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.box5); + this.box5.x = 13; + this.box5.y = 13; + this.png1 = game.getBitMap("dragmc1",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.png1); + this.png1.x = 1; + this.png1.y = 1; + this.png1.width = 66; + this.png1.height = 66; + this.png2 = game.getBitMap("dragmc2",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.png2); + this.png2.x = 1; + this.png2.y = 1; + this.png2.width = 66; + this.png2.height = 66; + this.png2.visible = false; + this.num = param1; + this.labelText = new UILabel(66); + addChild(this.labelText); + this.labelText.x = 1; + this.labelText.y = 30; + this.labelText.setTextForMat(PublicMethod.getCenterTextFormat()); + this.txtField = new UILabel(66,16777215); + addChild(this.txtField); + this.txtField.y = 30; + this.txtField.setTextForMat(PublicMethod.getCenterTextFormat()); + buttonMode = true; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.CLICK,this.mouseClick); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(!this.canClick) + { + return; + } + this.filters = null; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(!this.canClick) + { + return; + } + this.filters = [PublicGlow.getInstance().yellowGlow1]; + } + + private function mouseClick(param1:MouseEvent) : void + { + if(!this.canClick) + { + return; + } + ConnectService.getInstance().homeService.xunLong(this.num); + } + + public function init() : void + { + this.box1.visible = false; + this.box5.visible = false; + this.png2.visible = false; + this.txtField.setText(""); + } + + public function fresh() : void + { + var _loc9_:int = 0; + var _loc10_:int = 0; + var _loc11_:Array = null; + var _loc1_:Object = HomeData.getUserXunBao(); + var _loc2_:String = _loc1_.awardStr; + var _loc3_:int = int(_loc1_.step1); + var _loc4_:int = int(_loc1_.step2); + var _loc5_:int = int(_loc1_.step3); + var _loc6_:int = int(_loc1_.step4); + var _loc7_:int = int(_loc1_.step5); + this.canClick = true; + if(this.num == _loc3_ || this.num == _loc4_ || this.num == _loc5_ || this.num == _loc6_ || this.num == _loc7_) + { + this.canClick = false; + _loc9_ = int(_loc2_.split(",")[this.num]); + if(_loc9_ > 0) + { + this.box1.visible = true; + this.box5.visible = false; + this.txtField.setText("已开启"); + } + else + { + this.box1.visible = false; + this.box5.visible = true; + _loc10_ = Utils.searchBoxNums(this.num); + this.txtField.setText(_loc10_ + ""); + } + this.png2.visible = true; + return; + } + var _loc8_:Boolean = false; + if(_loc3_ >= 0) + { + _loc11_ = Utils.getPointArr(_loc3_); + if(this.checkIsIn(_loc11_)) + { + _loc8_ = true; + } + } + if(_loc8_ == false && _loc4_ >= 0) + { + _loc11_ = Utils.getPointArr(_loc4_); + if(this.checkIsIn(_loc11_)) + { + _loc8_ = true; + } + } + if(_loc8_ == false && _loc5_ >= 0) + { + _loc11_ = Utils.getPointArr(_loc5_); + if(this.checkIsIn(_loc11_)) + { + _loc8_ = true; + } + } + if(_loc8_ == false && _loc6_ >= 0) + { + _loc11_ = Utils.getPointArr(_loc6_); + if(this.checkIsIn(_loc11_)) + { + _loc8_ = true; + } + } + if(_loc8_ == false && _loc7_ >= 0) + { + _loc11_ = Utils.getPointArr(_loc7_); + if(this.checkIsIn(_loc11_)) + { + _loc8_ = true; + } + } + if(_loc8_) + { + if(this.checkIsBox(_loc2_)) + { + this.box1.visible = true; + this.box5.visible = false; + this.txtField.setText("未开启"); + } + else + { + this.box1.visible = false; + this.box5.visible = true; + _loc10_ = Utils.searchBoxNums(this.num); + this.txtField.setText(_loc10_ + ""); + } + return; + } + this.box1.visible = false; + this.box5.visible = false; + this.txtField.setText(""); + this.canClick = true; + } + + private function checkIsBox(param1:String) : Boolean + { + var _loc2_:Array = param1.split(","); + if(_loc2_[this.num] > 0) + { + return true; + } + return false; + } + + private function checkIsIn(param1:Array) : Boolean + { + var _loc2_:int = 0; + for each(_loc2_ in param1) + { + if(_loc2_ == this.num) + { + return true; + } + } + return false; + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/FairHome.as b/flash_decompiled/com/view/ui/home/mc/FairHome.as new file mode 100644 index 0000000..f26778e --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/FairHome.as @@ -0,0 +1,48 @@ +package com.view.ui.home.mc +{ + import flash.events.MouseEvent; + + public class FairHome extends HomeBaseBuild + { + + private var url:String = "home/FairHome.swf"; + + public function FairHome() + { + super(); + loadSwf(this.url); + addEvent(); + buildEntId = 10150003; + } + + override public function setNameMcPosi() : void + { + _nameMc.x = 0; + _nameMc.y = -42; + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(!contains(BuildMenu.getInstance())) + { + addChild(BuildMenu.getInstance()); + } + BuildMenu.getInstance().x = mouseX; + BuildMenu.getInstance().y = mouseY; + BuildMenu.getInstance().update(buildData); + } + + override public function setUpingMcPosi() : void + { + _upingMc.x = -30; + _upingMc.y = -188; + } + + override public function setTimeMcPosi() : void + { + _timeMc.x = -34; + _timeMc.y = 10; + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/FairMc.as b/flash_decompiled/com/view/ui/home/mc/FairMc.as new file mode 100644 index 0000000..59e6071 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/FairMc.as @@ -0,0 +1,125 @@ +package com.view.ui.home.mc +{ + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.data.HomeData; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class FairMc extends UIBase + { + + private var type:int; + + private var bg:Bitmap; + + private var label1:UILabel; + + private var label2:UILabel; + + private var clickStatus:Boolean; + + public function FairMc(param1:int) + { + var _loc3_:Bitmap = null; + super(); + this.type = param1; + var _loc2_:Sprite = PublicMethod.createShape(0,92,108); + _loc2_.alpha = 0.4; + addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 2; + this.bg = game.getBitMap("res_bg",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.bg); + this.label1 = new UILabel(84); + this.label1.x = int(width / 2 - this.label1.width / 2); + this.label1.y = 70; + this.label1.setTextForMat(PublicMethod.getCenterTextFormat()); + switch(param1) + { + case 1: + _loc3_ = game.getBitMap("res_food",game.getApplication(GameUIRes.swfUrl_4)); + _loc3_.x = 26; + _loc3_.y = 22; + this.label1.setText("粮食"); + break; + case 2: + _loc3_ = game.getBitMap("res_wood",game.getApplication(GameUIRes.swfUrl_4)); + _loc3_.x = 10; + _loc3_.y = 25; + this.label1.setText("木材"); + break; + case 3: + _loc3_ = game.getBitMap("res_stone",game.getApplication(GameUIRes.swfUrl_4)); + _loc3_.x = 29; + _loc3_.y = 23; + this.label1.setText("石料"); + break; + case 4: + _loc3_ = game.getBitMap("res_bronze",game.getApplication(GameUIRes.swfUrl_4)); + _loc3_.x = 23; + _loc3_.y = 26; + this.label1.setText("青铜"); + break; + case 5: + _loc3_ = game.getBitMap("res_money",game.getApplication(GameUIRes.swfUrl_4)); + _loc3_.x = 21; + _loc3_.y = 21; + this.label1.setText("铜币"); + } + addChild(_loc3_); + addChild(this.label1); + this.label2 = new UILabel(84); + addChild(this.label2); + this.label2.x = int(width / 2 - this.label2.width / 2); + this.label2.y = this.label1.y + 18; + this.label2.setTextForMat(PublicMethod.getCenterTextFormat()); + var _loc4_:Object = HomeData.getUserHome(); + this.label2.setText(HomeData.getConfig().restopoint + ":1"); + buttonMode = true; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + public function getType() : int + { + return this.type; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.clickStatus) + { + return; + } + this.bg.filters = null; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.clickStatus) + { + return; + } + this.bg.filters = [PublicGlow.getInstance().yellowGlow1]; + } + + public function setClickStatus(param1:Boolean) : void + { + this.clickStatus = param1; + if(this.clickStatus) + { + this.bg.filters = [PublicGlow.getInstance().yellowGlow1]; + } + else + { + this.bg.filters = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/FemaleItemTip.as b/flash_decompiled/com/view/ui/home/mc/FemaleItemTip.as new file mode 100644 index 0000000..14e5ce1 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/FemaleItemTip.as @@ -0,0 +1,314 @@ +package com.view.ui.home.mc +{ + 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.newui.UIItem; + import com.view.res.GameUIRes; + 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 FemaleItemTip 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(); + + public var game:GameUIRes = GameUIRes.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 star1:Bitmap; + + private var star2:Bitmap; + + private var star3:Bitmap; + + private var itemContent:TextField; + + private var itemName:TextField; + + private var _table_bg:Sprite; + + private var isAddEvent:Boolean; + + public function FemaleItemTip(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 + { + var _loc1_:String = null; + if(this.oldUrl != this._dataObject.iconPath) + { + this.oldUrl = this._dataObject.iconPath; + _loc1_ = ServerConfig.IMG_HOME_URL + this.oldUrl; + if(ImgCache.getInstance().getImg(_loc1_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc1_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loader = new LoadResource(_loc1_,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 + { + this.pngBg = new UIItem(42,42); + this._Container.addChild(this.pngBg); + this.pngBg.x = 10; + this.pngBg.y = 10; + this.star1 = this.game.getBitMap("star",this.game.getApplication(GameUIRes.swfUrl_4)); + this.star2 = this.game.getBitMap("star",this.game.getApplication(GameUIRes.swfUrl_4)); + this.star3 = this.game.getBitMap("star",this.game.getApplication(GameUIRes.swfUrl_4)); + this._Container.addChild(this.star1); + this._Container.addChild(this.star2); + this._Container.addChild(this.star3); + this.star1.x = this.pngBg.x + 4; + this.star1.y = this.pngBg.y - 3; + this.star2.x = this.star1.x + 12; + this.star2.y = this.star1.y; + this.star3.x = this.star2.x + 12; + this.star3.y = this.star1.y; + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.size = 14; + _loc1_.bold = true; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,180); + this._Container.addChild(this.itemName); + this.itemName.x = 76; + this.itemName.y = 12; + this.itemName.height = 26; + this.itemName.defaultTextFormat = _loc1_; + 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.getMulTextField(UIConfig.labelColor,230,100); + this._Container.addChild(this.label3); + this.label3.defaultTextFormat = this.css; + this.label3.x = 10; + this.label3.y = this.line3.y + 5; + 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.name + ""; + this.loadImg(); + var _loc1_:String = ""; + _loc1_ = this._dataObject.content; + this.itemContent.htmlText = _loc1_; + this.itemContent.height = this.itemContent.textHeight + 10; + var _loc2_:int = this.itemContent.y + this.itemContent.height + 10; + this.line2.visible = false; + this.label2.visible = false; + var _loc3_:int = int(this._dataObject.itempro); + var _loc4_:int = _loc3_ * int(this._dataObject.lv); + this.line3.y = _loc2_; + var _loc5_:String = "装备属性:
"; + _loc5_ = _loc5_ + "武将攻击: " + _loc4_ + "
"; + _loc5_ = _loc5_ + "武将防御: " + _loc4_ + "
"; + _loc5_ = _loc5_ + "武将体力: " + _loc4_ + "
"; + _loc5_ = _loc5_ + "武将敏捷: " + _loc4_ + ""; + this.label3.htmlText = _loc5_; + this.label3.y = this.line3.y + 8; + _loc2_ += 85; + var _loc6_:int = int(this._dataObject.level); + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + if(_loc6_ == 1) + { + this.star1.visible = true; + } + if(_loc6_ == 2) + { + this.star1.visible = true; + this.star2.visible = true; + } + if(_loc6_ == 0 || this._dataObject.lv > 18) + { + this.star1.visible = true; + this.star2.visible = true; + this.star3.visible = true; + } + 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/ui/home/mc/GirlNpc.as b/flash_decompiled/com/view/ui/home/mc/GirlNpc.as new file mode 100644 index 0000000..c0bbd1d --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/GirlNpc.as @@ -0,0 +1,162 @@ +package com.view.ui.home.mc +{ + import com.greensock.TweenMax; + import com.greensock.easing.Linear; + import com.view.res.GameUIRes; + import com.view.ui.battleview.charactor.ImgData; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.events.Event; + import flash.geom.Point; + import flash.geom.Rectangle; + import flash.utils.getTimer; + + public class GirlNpc extends HomeBaseBuild + { + + public var imgVec:Vector.; + + public var imgDataVec:Vector.; + + public var characBitMap:Bitmap; + + private var info:String = "787,254;669,308;555,249;641,208;624,188;754,121;789,140;863,96;736,29;674,68;636,48"; + + private var posiArr:Array; + + private var currTime:int; + + public var currFrame:int; + + private var direction:int; + + public var timer:int = 60; + + private var moveSpeed:int = 30; + + private var moveNum:int = 0; + + private var moveType:int = 1; + + public function GirlNpc() + { + var _loc2_:ImgData = null; + var _loc6_:ImgData = null; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:BitmapData = null; + super(); + var _loc1_:Bitmap = game.getBitMap("girl",game.getApplication(GameUIRes.swfUrl_4)); + this.imgVec = new Vector.(); + this.imgDataVec = new Vector.(); + var _loc3_:int = _loc1_.width / 9; + var _loc4_:int = _loc1_.height / 4; + var _loc5_:int = 0; + while(_loc5_ < 36) + { + _loc7_ = _loc5_ % 9; + _loc8_ = _loc5_ / 9; + _loc2_ = new ImgData(_loc3_,_loc4_,_loc3_ * _loc7_,_loc4_ * _loc8_); + this.imgDataVec.push(_loc2_); + _loc5_++; + } + for each(_loc6_ in this.imgDataVec) + { + _loc9_ = new BitmapData(_loc6_._width,_loc6_._height); + _loc9_.copyPixels(_loc1_.bitmapData,new Rectangle(_loc6_._x,_loc6_._y,_loc6_._width,_loc6_._height),new Point(0,0)); + this.imgVec.push(_loc9_); + } + this.characBitMap = new Bitmap(); + buildSp.addChild(this.characBitMap); + this.posiArr = this.info.split(";"); + addEvent(); + } + + public function beginPlay() : void + { + face.stage.addEventListener(Event.ENTER_FRAME,this.frame); + this.moveNum = 0; + this.characBitMap.x = this.posiArr[this.moveNum].split(",")[0]; + this.characBitMap.y = this.posiArr[this.moveNum].split(",")[1]; + this.move(); + } + + private function frame(param1:Event) : void + { + if(getTimer() - this.currTime > this.timer) + { + this.currTime = getTimer(); + this.doAction(); + } + } + + public function doAction() : void + { + this.characBitMap.bitmapData = this.imgVec[this.currFrame + 9 * this.direction]; + ++this.currFrame; + if(this.currFrame > 8) + { + this.currFrame = 0; + } + } + + public function setDirection(param1:int) : void + { + this.direction = param1; + } + + private function move() : void + { + var _loc1_:int = int(this.posiArr[this.moveNum + 1].split(",")[0]); + var _loc2_:int = int(this.posiArr[this.moveNum + 1].split(",")[1]); + if(_loc1_ > this.characBitMap.x && _loc2_ > this.characBitMap.y) + { + this.direction = 1; + } + if(_loc1_ > this.characBitMap.x && _loc2_ < this.characBitMap.y) + { + this.direction = 0; + } + if(_loc1_ < this.characBitMap.x && _loc2_ > this.characBitMap.y) + { + this.direction = 2; + } + if(_loc1_ < this.characBitMap.x && _loc2_ < this.characBitMap.y) + { + this.direction = 3; + } + var _loc3_:Point = new Point(this.characBitMap.x,this.characBitMap.y); + var _loc4_:Point = new Point(_loc1_,_loc2_); + var _loc5_:Number = Point.distance(_loc3_,_loc4_); + var _loc6_:Number = _loc5_ / this.moveSpeed; + TweenMax.to(this.characBitMap,_loc6_,{ + "x":_loc1_, + "y":_loc2_, + "ease":Linear.easeNone, + "onComplete":this.moveOver + }); + } + + private function moveOver() : void + { + if(this.moveNum == this.posiArr.length - 2) + { + this.moveType = 2; + } + if(this.moveNum + 1 == 0) + { + this.moveType = 1; + } + if(this.moveType == 1) + { + ++this.moveNum; + } + else + { + --this.moveNum; + } + this.move(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/HomeBaseBuild.as b/flash_decompiled/com/view/ui/home/mc/HomeBaseBuild.as new file mode 100644 index 0000000..267b266 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/HomeBaseBuild.as @@ -0,0 +1,306 @@ +package com.view.ui.home.mc +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.data.HomeBuildData; + import com.data.HomeData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.tip.BuildTipTitle; + import com.view.tip.MulTipTitle; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class HomeBaseBuild extends UIBase + { + + public var buildSp:Sprite; + + public var buildSp1:Sprite; + + private var picload:LoadResource; + + private var buildMc:MovieClip; + + public var npcBuildTip:MulTipTitle; + + public var npcTipStr:String; + + private var _buildEntId:int; + + private var _buildData:HomeBuildData; + + public var tipTitle:BuildTipTitle; + + public var _upingMc:MovieClip; + + public var _timeMc:MovieClip; + + public var _nameMc:MovieClip; + + public function HomeBaseBuild() + { + super(); + this.buttonMode = true; + this.buildSp = new Sprite(); + addChild(this.buildSp); + this.buildSp1 = new Sprite(); + addChild(this.buildSp1); + } + + public function loadSwf(param1:String) : void + { + this.picload = new LoadResource(ServerConfig.IMAGE_URL + param1,this.loadPicBack); + } + + private function loadPicBack(param1:Event) : void + { + this.buildMc = MovieClip(param1.target.loader.content); + this.picload.clear(); + this.buildSp.addChild(this.buildMc); + this.checkBuildRes(); + if(this._buildData) + { + this.update(); + } + } + + public function addEvent() : void + { + addEventListener(MouseEvent.ROLL_OVER,this.mouseOverBuild); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOutBuild); + addEventListener(MouseEvent.CLICK,this.mouseClick); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_BUILDDATA,this.updateBuildResult); + } + + public function mouseOverBuild(param1:MouseEvent) : void + { + this.buildSp.filters = [PublicGlow.getInstance().lightFilter]; + this.clearMenu(); + } + + public function mouseOutBuild(param1:MouseEvent) : void + { + this.buildSp.filters = null; + } + + public function mouseClick(param1:MouseEvent) : void + { + } + + public function createNpcTip() : void + { + this.createNpcTipStr(); + this.npcBuildTip = new MulTipTitle(this,face.stage,face.tip_bg,this.npcTipStr); + } + + public function createNpcTipStr() : void + { + } + + public function get buildData() : HomeBuildData + { + return this._buildData; + } + + public function set buildData(param1:HomeBuildData) : void + { + this._buildData = param1; + } + + public function get buildEntId() : int + { + return this._buildEntId; + } + + public function set buildEntId(param1:int) : void + { + this._buildEntId = param1; + } + + public function update() : void + { + this._buildData = HomeData.getBuildByEntId(this._buildEntId); + this._buildData.setBuildBackF(this.processDo); + if(this.buildMc) + { + this.addBuildNameMc(); + this.setBuildLevel(); + this.setTipText(); + if(this._buildData.status == 1) + { + this.setUpStatus(); + } + else + { + this.setUpOkStatus(); + } + } + } + + public function setUpOkStatus() : void + { + if(contains(this.getBuildUpMc())) + { + removeChild(this.getBuildUpMc()); + } + if(contains(this.getBuildTimeMc())) + { + removeChild(this.getBuildTimeMc()); + } + this.checkBuildRes(); + } + + public function setTipText() : void + { + var _loc2_:Object = null; + var _loc1_:Object = new Object(); + if(this._buildData) + { + _loc2_ = HomeData.getBuildingByEntId(this._buildData.buiEntId); + _loc1_.title = _loc2_.buiName + this._buildData.level + "级"; + _loc1_.content = _loc2_.buiDesc; + _loc1_.titleColor = 16776960; + _loc1_.contentColor = 16777215; + this.setTipInfo(_loc1_); + } + } + + public function setTipInfo(param1:Object) : void + { + if(this.tipTitle == null) + { + this.tipTitle = new BuildTipTitle(this.buildSp,face.stage,face.tip_bg,param1); + } + else + { + this.tipTitle.infoObject = param1; + } + } + + public function setUpStatus() : void + { + addChild(this.getBuildUpMc()); + addChild(this.getBuildTimeMc()); + } + + public function getBuildUpMc() : MovieClip + { + if(this._upingMc == null) + { + this._upingMc = 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 = -20; + this._upingMc.y = -148; + } + + public function setTimeMcPosi() : void + { + this._timeMc.x = -24; + this._timeMc.y = 50; + } + + public function getBuildTimeMc() : MovieClip + { + if(this._timeMc == null) + { + this._timeMc = face.getMovieClip(ClassConfig.build_time); + this.setTimeMcPosi(); + } + return this._timeMc; + } + + public function processDo(param1:int) : void + { + this._timeMc.time_txt.text = PublicMethod.getTime(param1); + } + + public function addBuildNameMc() : void + { + var _loc1_:Object = null; + if(this._nameMc == null) + { + _loc1_ = HomeData.getBuildingByEntId(this._buildEntId); + this._nameMc = face.getMovieClip(ClassConfig.build_name); + this._nameMc.mouseEnabled = false; + this._nameMc.mouseChildren = false; + this._nameMc.name_txt.text = _loc1_.buiName; + addChild(this._nameMc); + this.setNameMcPosi(); + } + } + + private function setBuildLevel() : void + { + if(this._buildData) + { + this._nameMc.level_txt.text = this._buildData.level + ""; + } + else + { + this._nameMc.level_txt.text = ""; + } + } + + public function setNameMcPosi() : void + { + this._nameMc.x = 10; + this._nameMc.y = -57; + } + + private function clearMenu() : void + { + if(contains(BuildMenu.getInstance())) + { + removeChild(BuildMenu.getInstance()); + } + } + + private function updateBuildResult(param1:DevEvent) : void + { + if(param1.id == this._buildEntId) + { + this.update(); + } + } + + public function checkBuildRes() : void + { + if(this.buildMc == null) + { + return; + } + if(this._buildData == null) + { + return; + } + if(this._buildData.level < 20) + { + this.buildMc.gotoAndStop(1); + } + else if(this._buildData.level < 40) + { + this.buildMc.gotoAndStop(2); + } + else + { + this.buildMc.gotoAndStop(3); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/HomeCardMc.as b/flash_decompiled/com/view/ui/home/mc/HomeCardMc.as new file mode 100644 index 0000000..f0f9193 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/HomeCardMc.as @@ -0,0 +1,151 @@ +package com.view.ui.home.mc +{ + import com.common.PublicGlow; + import com.control.ConnectService; + import com.greensock.TweenLite; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class HomeCardMc extends UIBase + { + + private var card_6:Bitmap; + + private var card_1:Bitmap; + + private var card_2:Bitmap; + + private var card_3:Bitmap; + + private var card_4:Bitmap; + + private var card_5:Bitmap; + + private var type:int; + + private var toType:int = 1; + + private var clickStatus:Boolean; + + private var currType:int; + + private var preShow:Bitmap; + + private var backF:Function; + + public function HomeCardMc(param1:int) + { + super(); + this.type = param1; + var _loc2_:int = 1; + while(_loc2_ < 7) + { + this["card_" + _loc2_] = game.getBitMap("card_" + _loc2_,game.getApplication(GameUIRes.swfUrl_4)); + addChild(this["card_" + _loc2_]); + this["card_" + _loc2_].x = -int(this["card_" + _loc2_].width / 2); + this["card_" + _loc2_].visible = false; + _loc2_++; + } + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.CLICK,this.mouseClick); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.filters = null; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.clickStatus) + { + this.filters = [PublicGlow.getInstance().yellowGlow1]; + } + } + + private function mouseClick(param1:MouseEvent) : void + { + if(this.clickStatus) + { + ConnectService.getInstance().homeService.changeCard(this.type); + } + } + + public function setClickStatus(param1:Boolean) : void + { + this.clickStatus = param1; + this.buttonMode = this.clickStatus; + } + + public function setType(param1:int) : void + { + this.currType = param1; + } + + public function showType(param1:int) : void + { + var _loc2_:int = 1; + while(_loc2_ < 7) + { + if(param1 == _loc2_) + { + this["card_" + _loc2_].visible = true; + this.preShow = this["card_" + _loc2_]; + } + else + { + this["card_" + _loc2_].visible = false; + } + _loc2_++; + } + } + + public function trans1(param1:Function = null) : void + { + this.backF = param1; + this.scaleX = 1; + TweenLite.to(this,1,{ + "scaleX":0, + "onComplete":this.moveOver + }); + } + + private function moveOver() : void + { + if(this.preShow) + { + this.preShow.visible = false; + } + this.scaleX = 0; + this["card_" + this.currType].visible = true; + this.preShow = this["card_" + this.currType]; + TweenLite.to(this,1,{ + "scaleX":1, + "onComplete":this.moveEnd + }); + } + + private function moveEnd() : void + { + if(Boolean(this.backF)) + { + this.backF(); + } + } + + public function test() : void + { + this.scaleX = 0; + TweenLite.to(this,1,{"scaleX":1}); + } + + public function showBlack(param1:Function) : void + { + TweenLite.to(this,1,{"scaleX":0}); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/HomeCardNPC.as b/flash_decompiled/com/view/ui/home/mc/HomeCardNPC.as new file mode 100644 index 0000000..7590ac6 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/HomeCardNPC.as @@ -0,0 +1,47 @@ +package com.view.ui.home.mc +{ + import com.newdata.user.NewUserData; + import com.view.res.GameUIRes; + import com.view.ui.home.HomeCardUI; + import com.view.ui.home.HomeMainUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class HomeCardNPC extends HomeBaseBuild + { + + private var cardcUI:HomeCardUI; + + public function HomeCardNPC() + { + super(); + var _loc1_:Bitmap = game.getBitMap("homeCardNPC",game.getApplication(GameUIRes.swfUrl_4)); + buildSp.addChild(_loc1_); + addEvent(); + super.createNpcTip(); + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

天时牌局

"; + npcTipStr += "君主等级达到100级以上可以参加,每天有3次机会"; + } + + override public function mouseClick(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 100) + { + MessageBoxUI.getInstance().addMessage("君主等级须达到100级"); + return; + } + if(this.cardcUI == null) + { + this.cardcUI = new HomeCardUI(); + } + HomeMainUI.getInstance().addUI(this.cardcUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/HomeChildMc.as b/flash_decompiled/com/view/ui/home/mc/HomeChildMc.as new file mode 100644 index 0000000..fd5e826 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/HomeChildMc.as @@ -0,0 +1,88 @@ +package com.view.ui.home.mc +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.view.newui.UIBase; + import flash.display.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + + public class HomeChildMc extends UIBase + { + + private var bg:Bitmap; + + private var picload:LoadResource; + + private var selectStatus:Boolean; + + public function HomeChildMc() + { + super(); + } + + public function addEvent() : void + { + addEventListener(MouseEvent.ROLL_OVER,this.mouseOverBuild); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOutBuild); + } + + public function mouseOverBuild(param1:MouseEvent) : void + { + if(this.selectStatus == false) + { + filters = [PublicGlow.getInstance().yellowGlow1]; + } + } + + public function mouseOutBuild(param1:MouseEvent) : void + { + if(this.selectStatus == false) + { + filters = null; + } + } + + public function loadBg(param1:int, param2:int) : void + { + var _loc3_:String = ""; + if(param1 == 1) + { + _loc3_ = "female_" + param2; + } + else + { + _loc3_ = "male_" + param2; + } + _loc3_ += ".jpg"; + this.loadSwf(_loc3_); + } + + public function loadSwf(param1:String) : void + { + this.picload = new LoadResource(ServerConfig.IMG_HOME_URL + param1,this.loadPicBack); + } + + private function loadPicBack(param1:Event) : void + { + this.bg = Bitmap(param1.target.loader.content); + this.picload.clear(); + addChild(this.bg); + } + + public function setSelect(param1:Boolean) : void + { + this.selectStatus = param1; + if(this.selectStatus) + { + filters = [PublicGlow.getInstance().yellowGlow1]; + } + else + { + filters = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/HomeChildTip.as b/flash_decompiled/com/view/ui/home/mc/HomeChildTip.as new file mode 100644 index 0000000..67a0a81 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/HomeChildTip.as @@ -0,0 +1,198 @@ +package com.view.ui.home.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.view.newui.UIConfig; + import flash.display.Bitmap; + 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 HomeChildTip 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 itemName:TextField; + + private var line1:Sprite; + + private var itemContent:TextField; + + private var starVec:Vector.; + + private var css:TextFormat; + + private var _table_bg:Sprite; + + private var isAddEvent:Boolean; + + public function HomeChildTip(param1:DisplayObject, param2:Stage, param3:Sprite) + { + super(); + this._bgSprite = param3; + this._displayObject = param1; + this._range = param2; + this.init(); + } + + public function setTipData(param1:Object) : void + { + this._dataObject = param1; + this.setValue(); + } + + private function init() : void + { + var _loc3_:Bitmap = null; + var _loc4_:Bitmap = null; + this._table_bg = new Scale9Grid(this._bgSprite,185,100); + this._Container.addChild(this._table_bg); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.size = 14; + _loc1_.bold = true; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,180); + this._Container.addChild(this.itemName); + this.itemName.x = 10; + this.itemName.y = 10; + this.itemName.height = 26; + this.itemName.defaultTextFormat = _loc1_; + this.starVec = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + _loc3_ = this.face.getBitMap(ClassConfig.lib_star_1); + this._Container.addChild(_loc3_); + _loc3_.x = 100 + 18 * _loc2_; + _loc3_.y = 10; + _loc4_ = this.face.getBitMap(ClassConfig.lib_star_5); + this._Container.addChild(_loc4_); + _loc4_.x = _loc3_.x; + _loc4_.y = _loc3_.y; + _loc4_.visible = false; + this.starVec.push(_loc4_); + _loc2_++; + } + this.line1 = PublicMethod.getTrLine(175); + this._Container.addChild(this.line1); + this.line1.x = 10; + this.line1.y = 35; + this.itemContent = PublicMethod.getTextFieldWithFillter(16777215,240); + this.itemContent.x = 10; + this.itemContent.y = this.line1.y + 10; + 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 = 5; + this.css.align = "left"; + this.itemContent.defaultTextFormat = this.css; + this._Container.addChild(this.itemContent); + } + + 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.name; + var _loc1_:String = ""; + var _loc2_:int = int(this._dataObject.level); + _loc1_ = "武将攻击 +" + PublicMethod.getHomePro(_loc2_,this._dataObject.addAtk) + "
"; + _loc1_ = _loc1_ + "武将防御 +" + PublicMethod.getHomePro(_loc2_,this._dataObject.addDef) + "
"; + _loc1_ = _loc1_ + "武将体力 +" + PublicMethod.getHomePro(_loc2_,this._dataObject.addHp) + "
"; + _loc1_ = _loc1_ + "武将敏捷 +" + PublicMethod.getHomePro(_loc2_,this._dataObject.addAgl) + "
"; + this.itemContent.htmlText = _loc1_; + var _loc3_:int = 0; + while(_loc3_ < this.starVec.length) + { + if(_loc3_ < _loc2_ - 1) + { + this.starVec[_loc3_].visible = true; + } + else + { + this.starVec[_loc3_].visible = false; + } + _loc3_++; + } + } + + 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/ui/home/mc/HomeCityMc1.as b/flash_decompiled/com/view/ui/home/mc/HomeCityMc1.as new file mode 100644 index 0000000..7899259 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/HomeCityMc1.as @@ -0,0 +1,241 @@ +package com.view.ui.home.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIBase; + import com.view.newui.UIButton; + import com.view.newui.UIExpBar; + import com.view.newui.UILabel; + import com.view.res.GameUIRes; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class HomeCityMc1 extends UIBase + { + + private var bg:Bitmap; + + private var type:int; + + private var btn:UIButton; + + private var btn1:UIButton; + + private var expBar:UIExpBar; + + private var label1:UILabel; + + private var label2:UILabel; + + public function HomeCityMc1(param1:int) + { + super(); + this.type = param1; + this.bg = game.getBitMap("city_" + this.type,game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.bg); + this.bg.width = 411; + switch(param1) + { + case 1: + this.btn = new UIButton("弹 琴",1,10); + break; + case 2: + this.btn = new UIButton("弈 棋",1,10); + break; + case 3: + this.btn = new UIButton("书 法",1,10); + break; + case 4: + this.btn = new UIButton("绘 画",1,10); + } + addChild(this.btn); + this.btn.x = 145; + this.btn.y = 26; + this.btn.onClick = this.upHomeChild; + this.btn1 = new UIButton("升10次",1,10); + addChild(this.btn1); + this.btn1.x = this.btn.x + 65; + this.btn1.y = this.btn.y; + this.btn1.onClick = this.upHomeChild10; + this.expBar = new UIExpBar(); + this.expBar.setWidth(380); + this.expBar.init(); + this.expBar.setMaxValue(100); + this.expBar.setCurValue(50); + addChild(this.expBar); + this.expBar.x = int(width / 2 - this.expBar.width / 2); + this.expBar.y = 8; + this.label1 = new UILabel(150); + addChild(this.label1); + this.label1.x = 2; + this.label1.y = 30; + this.label2 = new UILabel(150); + addChild(this.label2); + this.label2.x = 252; + this.label2.y = this.label1.y; + this.label2.setTextForMat(PublicMethod.getRightTextFormat()); + switch(param1) + { + case 1: + this.label1.setText("当前武将攻击 +1000"); + this.label2.setText("下次武将攻击 +2000"); + break; + case 2: + this.label1.setText("当前武将防御 +1000"); + this.label2.setText("当前武将防御 +2000"); + break; + case 3: + this.label1.setText("当前武将体力 +1000"); + this.label2.setText("当前武将体力 +2000"); + break; + case 4: + this.label1.setText("当前武将敏捷 +1000"); + this.label2.setText("当前武将敏捷 +2000"); + } + } + + public function setData(param1:Object) : void + { + var _loc6_:String = null; + var _loc7_:String = null; + var _loc2_:int = int(param1.level); + var _loc3_:String = "需要消耗仁义点:" + this.getUpPoint(_loc2_,1); + var _loc4_:String = "需要消耗仁义点:" + this.getUpPoint(_loc2_,10); + var _loc5_:String = "1、新开牌局后,随机翻出五张不同花色的卡牌。
"; + _loc5_ = _loc5_ + "2、不同的花色组合可于结束此局时获得相应的特质点。
"; + _loc5_ = _loc5_ + "3、可点击任一卡牌进行逆天改命,重新翻牌。
"; + _loc5_ = _loc5_ + "4、首次逆天改命所需特质点为30,每次所需特质点增加5点,最多50"; + switch(this.type) + { + case 1: + _loc6_ = "当前武将攻击 +" + this.getAddPro(_loc2_,param1.addAtk) + ""; + if(param1.addAtk == 100) + { + _loc3_ = "需提升子嗣阶段才可再次提升"; + _loc4_ = "需提升子嗣阶段才可再次提升"; + if(_loc2_ == 6) + { + _loc7_ = "已达顶级"; + } + else + { + _loc7_ = "需提升子嗣阶段"; + } + this.btn.setUnEnable(); + this.btn1.setUnEnable(); + } + else + { + _loc7_ = "下次武将攻击 +" + this.getAddPro(_loc2_,param1.addAtk + 1) + ""; + this.btn.setEnable(); + this.btn1.setEnable(); + } + this.expBar.setCurValue(param1.addAtk); + break; + case 2: + _loc6_ = "当前武将防御 +" + this.getAddPro(_loc2_,param1.addDef) + ""; + if(param1.addDef == 100) + { + _loc3_ = "需提升子嗣阶段才可再次提升"; + _loc4_ = "需提升子嗣阶段才可再次提升"; + if(_loc2_ == 6) + { + _loc7_ = "已达顶级"; + } + else + { + _loc7_ = "需提升子嗣阶段"; + } + this.btn.setUnEnable(); + this.btn1.setUnEnable(); + } + else + { + _loc7_ = "下次武将防御 +" + this.getAddPro(_loc2_,param1.addDef + 1) + ""; + this.btn.setEnable(); + this.btn1.setEnable(); + } + this.expBar.setCurValue(param1.addDef); + break; + case 3: + _loc6_ = "当前武将体力 +" + this.getAddPro(_loc2_,param1.addHp) + ""; + if(param1.addHp == 100) + { + _loc3_ = "需提升子嗣阶段才可再次提升"; + _loc4_ = "需提升子嗣阶段才可再次提升"; + if(_loc2_ == 6) + { + _loc7_ = "已达顶级"; + } + else + { + _loc7_ = "需提升子嗣阶段"; + } + this.btn.setUnEnable(); + this.btn1.setUnEnable(); + } + else + { + _loc7_ = "下次武将体力 +" + this.getAddPro(_loc2_,param1.addHp + 1) + ""; + this.btn.setEnable(); + this.btn1.setEnable(); + } + this.expBar.setCurValue(param1.addHp); + break; + case 4: + _loc6_ = "当前武将敏捷 +" + this.getAddPro(_loc2_,param1.addAgl) + ""; + if(param1.addAgl == 100) + { + _loc3_ = "需提升子嗣阶段才可再次提升"; + _loc4_ = "需提升子嗣阶段才可再次提升"; + if(_loc2_ == 6) + { + _loc7_ = "已达顶级"; + } + else + { + _loc7_ = "需提升子嗣阶段"; + } + this.btn.setUnEnable(); + this.btn1.setUnEnable(); + } + else + { + _loc7_ = "下次武将敏捷 +" + this.getAddPro(_loc2_,param1.addAgl + 1) + ""; + this.btn.setEnable(); + this.btn1.setEnable(); + } + this.expBar.setCurValue(param1.addAgl); + } + this.label1.setText(_loc6_); + this.label2.setText(_loc7_); + ToolTipManager.getInstance().setToolTip(this.btn,new TxtTooltip(_loc3_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.btn1,new TxtTooltip(_loc4_),false,-1,false); + } + + private function getUpPoint(param1:int, param2:int) : int + { + var _loc3_:int = 300; + return int(_loc3_ * param2 + param2 * _loc3_ * (param1 - 1) / 10); + } + + private function getAddPro(param1:int, param2:int) : int + { + var _loc3_:int = 10000; + return int(_loc3_ * param2 + param2 * _loc3_ * (param1 - 1) / 10); + } + + private function upHomeChild(param1:MouseEvent) : void + { + ConnectService.getInstance().homeService.upUserHomePro(this.type,1); + } + + private function upHomeChild10(param1:MouseEvent) : void + { + ConnectService.getInstance().homeService.upUserHomePro(this.type,10); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/HomeCityPage1.as b/flash_decompiled/com/view/ui/home/mc/HomeCityPage1.as new file mode 100644 index 0000000..a1d9724 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/HomeCityPage1.as @@ -0,0 +1,194 @@ +package com.view.ui.home.mc +{ + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UIBase; + import com.view.newui.UIButton; + import com.view.newui.UILabel; + import com.view.newui.UIWindowBg; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class HomeCityPage1 extends UIBase + { + + private var bg1:UIWindowBg; + + private var starBg:Sprite; + + private var starVec:Vector.; + + private var pointLabel:UILabel; + + private var cityMcVec:Vector.; + + private var upLvBtn:UIButton; + + public function HomeCityPage1() + { + var _loc2_:Button_9 = null; + var _loc7_:HomeCityMc1 = null; + var _loc8_:Bitmap = null; + var _loc9_:Bitmap = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(419,272); + addChild(this.bg1); + this.cityMcVec = new Vector.(); + var _loc1_:int = 0; + while(_loc1_ < 4) + { + _loc7_ = new HomeCityMc1(_loc1_ + 1); + this.bg1.addChild(_loc7_); + _loc7_.x = 8; + _loc7_.y = 62 * _loc1_ + 5; + this.cityMcVec.push(_loc7_); + _loc1_++; + } + this.pointLabel = new UILabel(120); + addChild(this.pointLabel); + this.pointLabel.x = 10; + this.pointLabel.y = 258; + this.pointLabel.setText("仁义点:100"); + _loc2_ = new Button_9("获取"); + _loc2_.buttonMode = true; + addChild(_loc2_); + _loc2_.x = 141; + _loc2_.y = this.pointLabel.y; + var _loc3_:String = "1、可通过市集、私塾学堂、家园问答、天时牌局、寻龙探宝等系统获得。"; + ToolTipManager.getInstance().setToolTip(_loc2_,new TxtTooltip(_loc3_),false,-1,false); + this.upLvBtn = new UIButton("子嗣升星",3); + addChild(this.upLvBtn); + this.upLvBtn.x = 170; + this.upLvBtn.y = this.pointLabel.y - 8; + this.upLvBtn.onClick = this.upUserHome; + this.starBg = new Sprite(); + addChild(this.starBg); + this.starBg.x = this.upLvBtn.x + 92; + this.starBg.y = this.upLvBtn.y; + this.starVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 5) + { + _loc8_ = face.getBitMap(ClassConfig.lib_star_1); + this.starBg.addChild(_loc8_); + _loc8_.x = 18 * _loc4_; + _loc8_.y = 4; + _loc9_ = face.getBitMap(ClassConfig.lib_star_5); + this.starBg.addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y; + _loc9_.visible = false; + this.starVec.push(_loc9_); + _loc4_++; + } + var _loc5_:Button_9 = new Button_9("规则说明"); + _loc5_.buttonMode = true; + addChild(_loc5_); + _loc5_.x = 370; + _loc5_.y = this.pointLabel.y; + var _loc6_:String = "1、消耗仁义对子嗣进行技艺培养以获得大量武将属性。
"; + _loc6_ = _loc6_ + "2、分别修满琴棋书画技艺后可提升子嗣阶段。
"; + _loc6_ = _loc6_ + "3、提升阶段的同时提升星级,使所得属性成倍增长。
"; + _loc6_ = _loc6_ + "4、阶段受府邸等级影响,后期需要提高府邸等级才可提升。"; + ToolTipManager.getInstance().setToolTip(_loc5_,new TxtTooltip(_loc6_),false,-1,false); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_USERHOME,this.getUserHomeData); + this.loadData(); + } + + private function getUserHomeData(param1:DevEvent) : void + { + this.loadData(); + } + + private function loadData() : void + { + var _loc2_:HomeCityMc1 = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc1_:Object = HomeData.getUserHome(); + this.pointLabel.setText("仁义点:" + _loc1_.point + ""); + for each(_loc2_ in this.cityMcVec) + { + _loc2_.setData(_loc1_); + } + _loc3_ = int(_loc1_.level); + _loc4_ = 0; + while(_loc4_ < this.starVec.length) + { + if(_loc4_ < _loc3_ - 1) + { + this.starVec[_loc4_].visible = true; + } + else + { + this.starVec[_loc4_].visible = false; + } + _loc4_++; + } + var _loc5_:String = ""; + if(_loc3_ == 2) + { + _loc5_ = "★:所得属性增加10%
"; + } + else + { + _loc5_ = "★:所得属性增加10%
"; + } + if(_loc3_ == 3) + { + _loc5_ += "★★、所得属性增加20%
"; + } + else + { + _loc5_ += "★★、所得属性增加20%
"; + } + if(_loc3_ == 4) + { + _loc5_ += "★★★、所得属性增加30%
"; + } + else + { + _loc5_ += "★★★、所得属性增加30%
"; + } + if(_loc3_ == 5) + { + _loc5_ += "★★★★、所得属性增加40%
"; + } + else + { + _loc5_ += "★★★★、所得属性增加40%
"; + } + if(_loc3_ == 6) + { + _loc5_ += "★★★★★、所得属性增加50%
"; + } + else + { + _loc5_ += "★★★★★、所得属性增加50%
"; + } + ToolTipManager.getInstance().setToolTip(this.starBg,new TxtTooltip(_loc5_),false,-1,false); + this.upLvBtn.setUnEnable(); + if(_loc1_.addAtk == 100 && _loc1_.addDef == 100 && _loc1_.addHp == 100 && _loc1_.addAgl == 100) + { + if(_loc3_ < 6) + { + this.upLvBtn.setEnable(); + } + } + } + + private function upUserHome(param1:MouseEvent) : void + { + ConnectService.getInstance().homeService.upUserHome(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/HomeDragonNPC.as b/flash_decompiled/com/view/ui/home/mc/HomeDragonNPC.as new file mode 100644 index 0000000..b5dae60 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/HomeDragonNPC.as @@ -0,0 +1,47 @@ +package com.view.ui.home.mc +{ + import com.newdata.user.NewUserData; + import com.view.res.GameUIRes; + import com.view.ui.home.DragonMainUI; + import com.view.ui.home.HomeMainUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class HomeDragonNPC extends HomeBaseBuild + { + + private var roomNpcUI:DragonMainUI; + + public function HomeDragonNPC() + { + super(); + var _loc1_:Bitmap = game.getBitMap("homeNPC_xunlong2",game.getApplication(GameUIRes.swfUrl_4)); + buildSp.addChild(_loc1_); + addEvent(); + super.createNpcTip(); + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

寻龙探宝

"; + npcTipStr += "君主等级达到100级以上可以参加,每天有3次机会"; + } + + override public function mouseClick(param1:MouseEvent) : void + { + var _loc2_:int = NewUserData.getUser().rankId; + if(_loc2_ < 100) + { + MessageBoxUI.getInstance().addMessage("君主等级须达到100级"); + return; + } + if(this.roomNpcUI == null) + { + this.roomNpcUI = new DragonMainUI(); + } + HomeMainUI.getInstance().addUI(this.roomNpcUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/HomeSchoolPage1.as b/flash_decompiled/com/view/ui/home/mc/HomeSchoolPage1.as new file mode 100644 index 0000000..1c075c6 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/HomeSchoolPage1.as @@ -0,0 +1,261 @@ +package com.view.ui.home.mc +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UIBase; + import com.view.newui.UIButton; + import com.view.newui.UILabel; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.utils.Timer; + + public class HomeSchoolPage1 extends UIBase + { + + private var bg1:UIWindowBg; + + private var preText:UILabel; + + private var label1:UILabel; + + private var tipView1:Button_9; + + private var bg2:Sprite; + + private var timeLabel:UILabel; + + private var startBtn:UIButton; + + private var leftTimeLabel:UILabel; + + private var schoolMcVec:Vector.; + + private var picload:LoadResource; + + private var refreshTime:int = 30; + + private var leftTime:int; + + private var schoolTimer:Timer; + + private var isOnStage:Boolean = true; + + public function HomeSchoolPage1() + { + var _loc3_:UIButton = null; + var _loc4_:SchoolMc = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(418 + 194,272); + addChild(this.bg1); + this.loadSwf(); + this.bg2 = new Sprite(); + addChild(this.bg2); + this.timeLabel = new UILabel(150); + this.bg2.addChild(this.timeLabel); + this.timeLabel.x = 50; + this.timeLabel.y = 50; + this.leftTimeLabel = new UILabel(110); + this.bg2.addChild(this.leftTimeLabel); + this.leftTimeLabel.x = 38; + this.leftTimeLabel.y = 30; + this.schoolMcVec = new Vector.(); + var _loc1_:int = 0; + while(_loc1_ < 20) + { + _loc4_ = new SchoolMc(_loc1_ % 2); + this.bg2.addChild(_loc4_); + _loc4_.x = 99 + 108 * (_loc1_ % 5); + _loc4_.y = 82 + 37 * int(_loc1_ / 5); + this.schoolMcVec.push(_loc4_); + _loc1_++; + } + this.preText = new UILabel(150); + this.bg2.addChild(this.preText); + this.preText.x = 10; + this.preText.y = 252; + this.preText.setText("上堂获得仁义:100"); + this.label1 = new UILabel(250); + this.bg2.addChild(this.label1); + this.label1.x = 180; + this.label1.y = this.preText.y; + this.label1.setTextForMat(PublicMethod.getCenterTextFormat()); + this.label1.setText("等待盟主开课!"); + this.startBtn = new UIButton("开 课",2); + this.bg2.addChild(this.startBtn); + this.startBtn.x = 280; + this.startBtn.y = this.preText.y - 3; + this.startBtn.onClick = this.startSchool; + this.tipView1 = new Button_9("规则说明"); + this.tipView1.buttonMode = true; + this.bg2.addChild(this.tipView1); + this.tipView1.x = 550; + this.tipView1.y = this.preText.y; + var _loc2_:* = "1、每日盟主可开课2次,所有成员开课期间携带子嗣进入私塾即可参与。
"; + _loc2_ += "2、讲课时间持续1小时,参与者每分钟可获得一定数量的仁义值。
"; + _loc2_ += "3、仁义值在下课后统一发放。每天开课时间为7:00-22:00。
"; + _loc2_ += "4、盟主获得仁义值计算方式为:60*(50+私塾等级)。
"; + _loc2_ += "5、成员获得仁义值计算方式为:参与分钟*(50+私塾等级)。
"; + _loc2_ += "6、盟主不能参与听课。"; + ToolTipManager.getInstance().setToolTip(this.tipView1,new TxtTooltip(_loc2_),false,-1,false); + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_SCHOOL,this.getSchoolDataResult); + _loc3_ = new UIButton("刷 新",2); + this.bg2.addChild(_loc3_); + _loc3_.x = 545; + _loc3_.y = 10; + _loc3_.onClick = this.freshSchool; + } + + public function loadSwf() : void + { + this.picload = new LoadResource(ServerConfig.IMG_HOME_URL + "class.jpg",this.loadPicBack); + } + + private function loadPicBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.picload.clear(); + this.bg1.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 2; + var _loc3_:Bitmap = game.getBitMap("school_master",game.getApplication(GameUIRes.swfUrl_4)); + this.bg1.addChild(_loc3_); + _loc3_.x = 2 + 260; + } + + private function getSchoolDataResult(param1:DevEvent) : void + { + this.loadData(); + } + + public function loadData() : void + { + var _loc3_:SchoolMc = null; + var _loc4_:SchoolMc = null; + var _loc5_:Array = null; + var _loc6_:int = 0; + var _loc1_:Object = HomeData.getSchoolMap(); + if(_loc1_ == null) + { + this.preText.setText("上堂获得仁义:0"); + for each(_loc4_ in this.schoolMcVec) + { + _loc4_.hiddenAll(); + } + return; + } + var _loc2_:Object = HomeData.getUserHome(); + if(_loc1_.isLeader == 1) + { + this.startBtn.visible = true; + this.leftTimeLabel.setText("今日剩余次数:" + _loc1_.times + ""); + this.label1.setText(""); + } + else + { + this.startBtn.visible = false; + this.leftTimeLabel.setText(""); + this.label1.setText("等待盟主开课!"); + } + this.preText.setText("上堂获得仁义:" + _loc2_.schoolPoint + ""); + if(_loc1_.status == 1) + { + this.startBtn.visible = false; + this.label1.setText("正在开课,听课时间越久收获越多!"); + _loc5_ = _loc1_.childList; + _loc6_ = 0; + while(_loc6_ < this.schoolMcVec.length) + { + if(_loc5_[_loc6_]) + { + this.schoolMcVec[_loc6_].setData(_loc5_[_loc6_],_loc2_.userId); + } + else + { + this.schoolMcVec[_loc6_].setData(null); + } + _loc6_++; + } + if(Boolean(this.schoolTimer) && this.schoolTimer.running) + { + return; + } + this.timeLabel.setText("讲课倒计时:" + PublicMethod.getTime(this.leftTime) + ""); + this.leftTime = _loc1_.leftTime; + if(this.leftTime < 0) + { + return; + } + this.startSchoolTime(); + return; + } + this.timeLabel.setText(""); + for each(_loc3_ in this.schoolMcVec) + { + _loc3_.hiddenAll(); + } + } + + private function startSchoolTime() : void + { + if(this.schoolTimer == null) + { + this.schoolTimer = new Timer(1000,0); + this.schoolTimer.addEventListener(TimerEvent.TIMER,this._buildTime); + } + if(this.schoolTimer.running == false) + { + this.schoolTimer.start(); + } + } + + private function _buildTime(param1:TimerEvent) : void + { + --this.leftTime; + --this.refreshTime; + if(this.refreshTime == 0) + { + this.refreshTime = 30; + if(this.isOnStage) + { + ConnectService.getInstance().homeService.getGuildSchool(); + } + } + this.timeLabel.setText("讲课倒计时:" + PublicMethod.getTime(this.leftTime) + ""); + if(this.leftTime == 0) + { + this.schoolTimer.stop(); + ConnectService.getInstance().homeService.getGuildSchool(); + } + } + + private function startSchool(param1:MouseEvent) : void + { + ConnectService.getInstance().homeService.startSchool(); + } + + private function freshSchool(param1:MouseEvent) : void + { + ConnectService.getInstance().homeService.getGuildSchool(); + } + + public function setIsOnStage(param1:Boolean) : void + { + this.isOnStage = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/MansionHome.as b/flash_decompiled/com/view/ui/home/mc/MansionHome.as new file mode 100644 index 0000000..9b97097 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/MansionHome.as @@ -0,0 +1,30 @@ +package com.view.ui.home.mc +{ + import flash.events.MouseEvent; + + public class MansionHome extends HomeBaseBuild + { + + private var url:String = "home/MansionHome.swf"; + + public function MansionHome() + { + super(); + loadSwf(this.url); + addEvent(); + buildEntId = 10150001; + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(!contains(BuildMenu.getInstance())) + { + addChild(BuildMenu.getInstance()); + } + BuildMenu.getInstance().x = mouseX; + BuildMenu.getInstance().y = mouseY; + BuildMenu.getInstance().update(buildData); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/NpcEquipBg1.as b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg1.as new file mode 100644 index 0000000..a3b24c2 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg1.as @@ -0,0 +1,218 @@ +package com.view.ui.home.mc +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.data.HomeData; + import com.view.cache.ImgCache; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class NpcEquipBg1 extends UIBase + { + + private var type:int; + + private var equipName:String; + + private var bgClass:String; + + private var bg:Sprite; + + private var nameText:TextField; + + private var itemSp:Sprite; + + private var star1:Bitmap; + + private var star2:Bitmap; + + private var star3:Bitmap; + + private var itemTip:FemaleItemTip; + + private var preLv:int; + + private var itemLoad:LoadResource; + + private var preUrl:String; + + private var itemImg:Bitmap; + + public function NpcEquipBg1(param1:int) + { + var _loc4_:int = 0; + super(); + this.type = param1; + this.bgClass = "lib_eq_" + this.type; + var _loc2_:Bitmap = new Bitmap(face.getPng(ClassConfig.lib_exchange_4)); + this.bg = new Sprite(); + this.bg.addChild(_loc2_); + addChild(this.bg); + this.itemSp = new Sprite(); + addChild(this.itemSp); + switch(this.type) + { + case 1: + this.equipName = "长衫"; + break; + case 3: + this.equipName = "长笛"; + break; + case 5: + this.equipName = "发梳"; + break; + case 2: + this.equipName = "古筝"; + break; + case 4: + this.equipName = "妆镜"; + break; + case 6: + this.equipName = "茶具"; + } + this.nameText = PublicMethod.getTextFieldWithFillter(7895160,30); + this.nameText.text = this.equipName; + this.bg.addChild(this.nameText); + this.nameText.x = 18; + this.nameText.y = 23; + var _loc3_:int = this.type % 2; + _loc4_ = this.type / 2; + if(_loc3_ == 1) + { + this.bg.x = 5; + this.bg.y = 5 + _loc4_ * 88; + } + else + { + this.bg.x = 250; + this.bg.y = 5 + _loc4_ * 88 - 88; + } + this.itemSp.x = this.bg.x; + this.itemSp.y = this.bg.y; + this.star1 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star2 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star3 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.star1); + addChild(this.star2); + addChild(this.star3); + this.star1.x = this.itemSp.x + 4; + this.star1.y = this.itemSp.y; + this.star2.x = this.star1.x + 12; + this.star2.y = this.star1.y; + this.star3.x = this.star2.x + 12; + this.star3.y = this.star1.y; + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + } + + public function getType() : int + { + return this.type; + } + + public function loadData() : void + { + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:int = int(_loc1_["remail" + this.type]); + this.loadItem(_loc2_); + } + + private function loadItem(param1:int) : void + { + if(this.preLv == param1) + { + return; + } + this.preLv = param1; + var _loc2_:Object = HomeData.getFemaleItemByLvAndType(this.type,param1); + this.loadUrl(_loc2_.iconPath); + var _loc3_:int = int(_loc2_.level); + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + if(_loc3_ == 1) + { + this.star1.visible = true; + } + if(_loc3_ == 2) + { + this.star1.visible = true; + this.star2.visible = true; + } + if(_loc3_ == 0 || _loc2_.lv > 18) + { + this.star1.visible = true; + this.star2.visible = true; + this.star3.visible = true; + } + if(this.itemTip) + { + this.itemTip.setTipData(_loc2_); + } + else + { + this.itemTip = new FemaleItemTip(this.itemSp,face.stage,face.tip_bg,_loc2_); + } + } + + private function loadUrl(param1:String) : void + { + if(this.preUrl == param1) + { + return; + } + if(Boolean(this.itemImg) && this.itemSp.contains(this.itemImg)) + { + this.itemSp.removeChild(this.itemImg); + } + this.preUrl = param1; + var _loc2_:String = ServerConfig.IMG_HOME_URL + this.preUrl; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.itemLoad = new LoadResource(_loc2_,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.itemLoad.url,this.itemImg); + this.itemLoad.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSp.addChild(this.itemImg); + this.itemImg.x = 6; + this.itemImg.y = 6; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.itemSp.filters = [PublicGlow.getInstance().yellowGlow2]; + } + else + { + this.itemSp.filters = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/NpcEquipBg2.as b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg2.as new file mode 100644 index 0000000..359e883 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg2.as @@ -0,0 +1,218 @@ +package com.view.ui.home.mc +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.data.HomeData; + import com.view.cache.ImgCache; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class NpcEquipBg2 extends UIBase + { + + private var type:int; + + private var equipName:String; + + private var bgClass:String; + + private var bg:Sprite; + + private var nameText:TextField; + + private var itemSp:Sprite; + + private var star1:Bitmap; + + private var star2:Bitmap; + + private var star3:Bitmap; + + private var itemTip:FemaleItemTip; + + private var preLv:int; + + private var itemLoad:LoadResource; + + private var preUrl:String; + + private var itemImg:Bitmap; + + public function NpcEquipBg2(param1:int) + { + var _loc4_:int = 0; + super(); + this.type = param1; + this.bgClass = "lib_eq_" + this.type; + var _loc2_:Bitmap = new Bitmap(face.getPng(ClassConfig.lib_exchange_4)); + this.bg = new Sprite(); + this.bg.addChild(_loc2_); + addChild(this.bg); + this.itemSp = new Sprite(); + addChild(this.itemSp); + switch(this.type) + { + case 1: + this.equipName = "毫笔"; + break; + case 3: + this.equipName = "黑墨"; + break; + case 5: + this.equipName = "宣纸"; + break; + case 2: + this.equipName = "砚台"; + break; + case 4: + this.equipName = "经书"; + break; + case 6: + this.equipName = "棋盘"; + } + this.nameText = PublicMethod.getTextFieldWithFillter(7895160,30); + this.nameText.text = this.equipName; + this.bg.addChild(this.nameText); + this.nameText.x = 18; + this.nameText.y = 23; + var _loc3_:int = this.type % 2; + _loc4_ = this.type / 2; + if(_loc3_ == 1) + { + this.bg.x = 5; + this.bg.y = 5 + _loc4_ * 88; + } + else + { + this.bg.x = 250; + this.bg.y = 5 + _loc4_ * 88 - 88; + } + this.itemSp.x = this.bg.x; + this.itemSp.y = this.bg.y; + this.star1 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star2 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star3 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.star1); + addChild(this.star2); + addChild(this.star3); + this.star1.x = this.itemSp.x + 4; + this.star1.y = this.itemSp.y; + this.star2.x = this.star1.x + 12; + this.star2.y = this.star1.y; + this.star3.x = this.star2.x + 12; + this.star3.y = this.star1.y; + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + } + + public function getType() : int + { + return this.type; + } + + public function loadData() : void + { + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:int = int(_loc1_["boy" + this.type]); + this.loadItem(_loc2_); + } + + private function loadItem(param1:int) : void + { + if(this.preLv == param1) + { + return; + } + this.preLv = param1; + var _loc2_:Object = HomeData.getShutongItemByLvAndType(this.type,param1); + this.loadUrl(_loc2_.iconPath); + var _loc3_:int = int(_loc2_.level); + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + if(_loc3_ == 1) + { + this.star1.visible = true; + } + if(_loc3_ == 2) + { + this.star1.visible = true; + this.star2.visible = true; + } + if(_loc3_ == 0 || _loc2_.lv > 18) + { + this.star1.visible = true; + this.star2.visible = true; + this.star3.visible = true; + } + if(this.itemTip) + { + this.itemTip.setTipData(_loc2_); + } + else + { + this.itemTip = new FemaleItemTip(this.itemSp,face.stage,face.tip_bg,_loc2_); + } + } + + private function loadUrl(param1:String) : void + { + if(this.preUrl == param1) + { + return; + } + if(Boolean(this.itemImg) && this.itemSp.contains(this.itemImg)) + { + this.itemSp.removeChild(this.itemImg); + } + this.preUrl = param1; + var _loc2_:String = ServerConfig.IMG_HOME_URL + this.preUrl; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.itemLoad = new LoadResource(_loc2_,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.itemLoad.url,this.itemImg); + this.itemLoad.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSp.addChild(this.itemImg); + this.itemImg.x = 6; + this.itemImg.y = 6; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.itemSp.filters = [PublicGlow.getInstance().yellowGlow2]; + } + else + { + this.itemSp.filters = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/NpcEquipBg3.as b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg3.as new file mode 100644 index 0000000..9860f81 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg3.as @@ -0,0 +1,218 @@ +package com.view.ui.home.mc +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.data.HomeData; + import com.view.cache.ImgCache; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class NpcEquipBg3 extends UIBase + { + + private var type:int; + + private var equipName:String; + + private var bgClass:String; + + private var bg:Sprite; + + private var nameText:TextField; + + private var itemSp:Sprite; + + private var star1:Bitmap; + + private var star2:Bitmap; + + private var star3:Bitmap; + + private var itemTip:FemaleItemTip; + + private var preLv:int; + + private var itemLoad:LoadResource; + + private var preUrl:String; + + private var itemImg:Bitmap; + + public function NpcEquipBg3(param1:int) + { + var _loc4_:int = 0; + super(); + this.type = param1; + this.bgClass = "lib_eq_" + this.type; + var _loc2_:Bitmap = new Bitmap(face.getPng(ClassConfig.lib_exchange_4)); + this.bg = new Sprite(); + this.bg.addChild(_loc2_); + addChild(this.bg); + this.itemSp = new Sprite(); + addChild(this.itemSp); + switch(this.type) + { + case 1: + this.equipName = "头巾"; + break; + case 3: + this.equipName = "武器"; + break; + case 5: + this.equipName = "护胸"; + break; + case 2: + this.equipName = "护腕"; + break; + case 4: + this.equipName = "护膝"; + break; + case 6: + this.equipName = "腰牌"; + } + this.nameText = PublicMethod.getTextFieldWithFillter(7895160,30); + this.nameText.text = this.equipName; + this.bg.addChild(this.nameText); + this.nameText.x = 18; + this.nameText.y = 23; + var _loc3_:int = this.type % 2; + _loc4_ = this.type / 2; + if(_loc3_ == 1) + { + this.bg.x = 5; + this.bg.y = 5 + _loc4_ * 88; + } + else + { + this.bg.x = 250; + this.bg.y = 5 + _loc4_ * 88 - 88; + } + this.itemSp.x = this.bg.x; + this.itemSp.y = this.bg.y; + this.star1 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star2 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star3 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.star1); + addChild(this.star2); + addChild(this.star3); + this.star1.x = this.itemSp.x + 4; + this.star1.y = this.itemSp.y; + this.star2.x = this.star1.x + 12; + this.star2.y = this.star1.y; + this.star3.x = this.star2.x + 12; + this.star3.y = this.star1.y; + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + } + + public function getType() : int + { + return this.type; + } + + public function loadData() : void + { + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:int = int(_loc1_["soldier" + this.type]); + this.loadItem(_loc2_); + } + + private function loadItem(param1:int) : void + { + if(this.preLv == param1) + { + return; + } + this.preLv = param1; + var _loc2_:Object = HomeData.getShiweiItemByLvAndType(this.type,param1); + this.loadUrl(_loc2_.iconPath); + var _loc3_:int = int(_loc2_.level); + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + if(_loc3_ == 1) + { + this.star1.visible = true; + } + if(_loc3_ == 2) + { + this.star1.visible = true; + this.star2.visible = true; + } + if(_loc3_ == 0 || _loc2_.lv > 18) + { + this.star1.visible = true; + this.star2.visible = true; + this.star3.visible = true; + } + if(this.itemTip) + { + this.itemTip.setTipData(_loc2_); + } + else + { + this.itemTip = new FemaleItemTip(this.itemSp,face.stage,face.tip_bg,_loc2_); + } + } + + private function loadUrl(param1:String) : void + { + if(this.preUrl == param1) + { + return; + } + if(Boolean(this.itemImg) && this.itemSp.contains(this.itemImg)) + { + this.itemSp.removeChild(this.itemImg); + } + this.preUrl = param1; + var _loc2_:String = ServerConfig.IMG_HOME_URL + this.preUrl; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.itemLoad = new LoadResource(_loc2_,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.itemLoad.url,this.itemImg); + this.itemLoad.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSp.addChild(this.itemImg); + this.itemImg.x = 6; + this.itemImg.y = 6; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.itemSp.filters = [PublicGlow.getInstance().yellowGlow2]; + } + else + { + this.itemSp.filters = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/NpcEquipBg4.as b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg4.as new file mode 100644 index 0000000..27fe528 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg4.as @@ -0,0 +1,231 @@ +package com.view.ui.home.mc +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.data.HomeData; + import com.view.cache.ImgCache; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class NpcEquipBg4 extends UIBase + { + + private var type:int; + + private var equipName:String; + + private var bgClass:String; + + private var bg:Sprite; + + private var nameText:TextField; + + private var itemSp:Sprite; + + private var star1:Bitmap; + + private var star2:Bitmap; + + private var star3:Bitmap; + + private var itemTip:FemaleItemTip; + + private var preLv:int = -1; + + private var itemLoad:LoadResource; + + private var preUrl:String; + + private var itemImg:Bitmap; + + public function NpcEquipBg4(param1:int) + { + super(); + this.type = param1; + this.bgClass = "lib_eq_" + this.type; + var _loc2_:Bitmap = new Bitmap(face.getPng(ClassConfig.lib_exchange_4)); + this.bg = new Sprite(); + this.bg.addChild(_loc2_); + addChild(this.bg); + this.itemSp = new Sprite(); + addChild(this.itemSp); + switch(this.type) + { + case 1: + this.equipName = "发冠"; + break; + case 3: + this.equipName = "戒尺"; + break; + case 5: + this.equipName = "教籍"; + break; + case 2: + this.equipName = "衣衫"; + break; + case 4: + this.equipName = "折扇"; + break; + case 6: + this.equipName = "布鞋"; + } + this.nameText = PublicMethod.getTextFieldWithFillter(7895160,30); + this.nameText.text = this.equipName; + this.bg.addChild(this.nameText); + this.nameText.x = 18; + this.nameText.y = 23; + var _loc3_:int = this.type % 2; + var _loc4_:int = this.type / 2; + if(_loc3_ == 1) + { + this.bg.x = 5; + this.bg.y = 5 + _loc4_ * 88; + } + else + { + this.bg.x = 250; + this.bg.y = 5 + _loc4_ * 88 - 88; + } + this.itemSp.x = this.bg.x; + this.itemSp.y = this.bg.y; + this.star1 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star2 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star3 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.star1); + addChild(this.star2); + addChild(this.star3); + this.star1.x = this.itemSp.x + 4; + this.star1.y = this.itemSp.y; + this.star2.x = this.star1.x + 12; + this.star2.y = this.star1.y; + this.star3.x = this.star2.x + 12; + this.star3.y = this.star1.y; + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + } + + public function getType() : int + { + return this.type; + } + + public function loadData() : void + { + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:int = int(_loc1_["sir" + this.type]); + this.loadItem(_loc2_); + } + + public function getPreLv() : int + { + return this.preLv; + } + + private function loadItem(param1:int) : void + { + if(this.preLv == param1) + { + return; + } + this.preLv = param1; + var _loc2_:Object = HomeData.getXianshengItemByLvAndType(this.type,param1); + this.loadUrl(_loc2_.iconPath); + var _loc3_:int = int(_loc2_.level); + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + if(_loc3_ == 1) + { + this.star1.visible = true; + } + if(_loc3_ == 2) + { + this.star1.visible = true; + this.star2.visible = true; + } + if(_loc3_ == 0 || _loc2_.lv > 18) + { + this.star1.visible = true; + this.star2.visible = true; + this.star3.visible = true; + } + if(param1 > 0) + { + if(this.itemTip) + { + this.itemTip.setTipData(_loc2_); + } + else + { + this.itemTip = new FemaleItemTip(this.itemSp,face.stage,face.tip_bg,_loc2_); + } + } + else + { + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + } + } + + private function loadUrl(param1:String) : void + { + if(this.preUrl == param1) + { + return; + } + if(Boolean(this.itemImg) && this.itemSp.contains(this.itemImg)) + { + this.itemSp.removeChild(this.itemImg); + } + this.preUrl = param1; + var _loc2_:String = ServerConfig.IMG_HOME_URL + this.preUrl; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.itemLoad = new LoadResource(_loc2_,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.itemLoad.url,this.itemImg); + this.itemLoad.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSp.addChild(this.itemImg); + this.itemImg.x = 6; + this.itemImg.y = 6; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.itemSp.filters = [PublicGlow.getInstance().yellowGlow2]; + } + else + { + this.itemSp.filters = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/NpcEquipBg5.as b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg5.as new file mode 100644 index 0000000..175e45d --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/NpcEquipBg5.as @@ -0,0 +1,226 @@ +package com.view.ui.home.mc +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.data.HomeData; + import com.view.cache.ImgCache; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class NpcEquipBg5 extends UIBase + { + + private var type:int; + + private var equipName:String; + + private var bgClass:String; + + private var bg:Sprite; + + private var nameText:TextField; + + private var itemSp:Sprite; + + private var star1:Bitmap; + + private var star2:Bitmap; + + private var star3:Bitmap; + + private var itemTip:FemaleItemTip; + + private var preLv:int = -1; + + private var itemLoad:LoadResource; + + private var preUrl:String; + + private var itemImg:Bitmap; + + public function NpcEquipBg5(param1:int) + { + super(); + this.type = param1; + this.bgClass = "lib_eq_" + this.type; + var _loc2_:Bitmap = new Bitmap(face.getPng(ClassConfig.lib_exchange_4)); + this.bg = new Sprite(); + this.bg.addChild(_loc2_); + addChild(this.bg); + this.itemSp = new Sprite(); + addChild(this.itemSp); + switch(this.type) + { + case 1: + this.equipName = "腰带"; + break; + case 3: + this.equipName = "算盘"; + break; + case 5: + this.equipName = "帐薄"; + break; + case 2: + this.equipName = "丝衣"; + break; + case 4: + this.equipName = "印章"; + break; + case 6: + this.equipName = "皮鞋"; + } + this.nameText = PublicMethod.getTextFieldWithFillter(7895160,30); + this.nameText.text = this.equipName; + this.bg.addChild(this.nameText); + this.nameText.x = 18; + this.nameText.y = 23; + var _loc3_:int = this.type % 2; + var _loc4_:int = this.type / 2; + if(_loc3_ == 1) + { + this.bg.x = 5; + this.bg.y = 5 + _loc4_ * 88; + } + else + { + this.bg.x = 250; + this.bg.y = 5 + _loc4_ * 88 - 88; + } + this.itemSp.x = this.bg.x; + this.itemSp.y = this.bg.y; + this.star1 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star2 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star3 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.star1); + addChild(this.star2); + addChild(this.star3); + this.star1.x = this.itemSp.x + 4; + this.star1.y = this.itemSp.y; + this.star2.x = this.star1.x + 12; + this.star2.y = this.star1.y; + this.star3.x = this.star2.x + 12; + this.star3.y = this.star1.y; + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + } + + public function getType() : int + { + return this.type; + } + + public function loadData() : void + { + var _loc1_:Object = HomeData.getUserHome(); + var _loc2_:int = int(_loc1_["guanjia" + this.type]); + this.loadItem(_loc2_); + } + + private function loadItem(param1:int) : void + { + if(this.preLv == param1) + { + return; + } + this.preLv = param1; + var _loc2_:Object = HomeData.getGuanjiaItemByLvAndType(this.type,param1); + this.loadUrl(_loc2_.iconPath); + var _loc3_:int = int(_loc2_.level); + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + if(_loc3_ == 1) + { + this.star1.visible = true; + } + if(_loc3_ == 2) + { + this.star1.visible = true; + this.star2.visible = true; + } + if(_loc3_ == 0 || _loc2_.lv > 18) + { + this.star1.visible = true; + this.star2.visible = true; + this.star3.visible = true; + } + if(param1 > 0) + { + if(this.itemTip) + { + this.itemTip.setTipData(_loc2_); + } + else + { + this.itemTip = new FemaleItemTip(this.itemSp,face.stage,face.tip_bg,_loc2_); + } + } + else + { + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + } + } + + private function loadUrl(param1:String) : void + { + if(this.preUrl == param1) + { + return; + } + if(Boolean(this.itemImg) && this.itemSp.contains(this.itemImg)) + { + this.itemSp.removeChild(this.itemImg); + } + this.preUrl = param1; + var _loc2_:String = ServerConfig.IMG_HOME_URL + this.preUrl; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.itemLoad = new LoadResource(_loc2_,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.itemLoad.url,this.itemImg); + this.itemLoad.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSp.addChild(this.itemImg); + this.itemImg.x = 6; + this.itemImg.y = 6; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.itemSp.filters = [PublicGlow.getInstance().yellowGlow2]; + } + else + { + this.itemSp.filters = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/RemaleItemMc.as b/flash_decompiled/com/view/ui/home/mc/RemaleItemMc.as new file mode 100644 index 0000000..08e4d10 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/RemaleItemMc.as @@ -0,0 +1,147 @@ +package com.view.ui.home.mc +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.data.HomeData; + import com.view.cache.ImgCache; + import com.view.newui.UIBase; + import com.view.newui.UIConfig; + import com.view.newui.UILabel; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class RemaleItemMc extends UIBase + { + + private var itemSp:Sprite; + + private var star1:Bitmap; + + private var star2:Bitmap; + + private var star3:Bitmap; + + private var label:UILabel; + + private var itemTip:FemaleItemTip; + + private var itemLoad:LoadResource; + + private var preUrl:String; + + private var itemImg:Bitmap; + + public function RemaleItemMc() + { + super(); + this.itemSp = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + addChild(this.itemSp); + this.star1 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star2 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + this.star3 = game.getBitMap("star",game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.star1); + addChild(this.star2); + addChild(this.star3); + this.star1.x = this.itemSp.x + 4; + this.star1.y = this.itemSp.y - 3; + this.star2.x = this.star1.x + 12; + this.star2.y = this.star1.y; + this.star3.x = this.star2.x + 12; + this.star3.y = this.star1.y; + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + this.label = new UILabel(58); + addChild(this.label); + this.label.y = 60; + this.label.setTextForMat(PublicMethod.getCenterTextFormat()); + } + + public function loadItem(param1:Object) : void + { + this.itemSp.visible = true; + var _loc2_:String = param1.iconPath; + this.preUrl = _loc2_; + if(Boolean(this.itemImg) && this.itemSp.contains(this.itemImg)) + { + this.itemSp.removeChild(this.itemImg); + } + if(this.itemTip) + { + this.itemTip.setTipData(param1); + } + else + { + this.itemTip = new FemaleItemTip(this.itemSp,face.stage,face.tip_bg,param1); + } + this.label.setText("第 " + param1.lv + " 级"); + var _loc3_:int = int(HomeData.getConfig().LEVEL_MAX_2); + var _loc4_:int = int(param1.level); + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + if(_loc4_ == 1) + { + this.star1.visible = true; + } + if(_loc4_ == 2) + { + this.star1.visible = true; + this.star2.visible = true; + } + if(_loc4_ == 0 || param1.lv > 18) + { + this.star1.visible = true; + this.star2.visible = true; + this.star3.visible = true; + } + if(param1.lv == 0) + { + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + } + var _loc5_:String = ServerConfig.IMG_HOME_URL + this.preUrl; + if(ImgCache.getInstance().getImg(_loc5_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc5_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.itemLoad = new LoadResource(_loc5_,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.itemLoad.url,this.itemImg); + this.itemLoad.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSp.addChild(this.itemImg); + this.itemImg.x = 3; + this.itemImg.y = 3; + } + + public function setNull() : void + { + this.star1.visible = false; + this.star2.visible = false; + this.star3.visible = false; + this.itemSp.visible = false; + this.preUrl = ""; + this.label.setText(""); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/RoomNpcMc.as b/flash_decompiled/com/view/ui/home/mc/RoomNpcMc.as new file mode 100644 index 0000000..04c5d56 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/RoomNpcMc.as @@ -0,0 +1,38 @@ +package com.view.ui.home.mc +{ + import com.common.PublicGlow; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class RoomNpcMc extends UIBase + { + + private var type:int; + + private var bitmap:Bitmap; + + public function RoomNpcMc(param1:int) + { + super(); + this.type = param1; + this.bitmap = game.getBitMap("wingRoom_" + this.type,game.getApplication(GameUIRes.swfUrl_4)); + addChild(this.bitmap); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + buttonMode = true; + } + + private function mouseOut(param1:MouseEvent) : void + { + this.filters = null; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.filters = [PublicGlow.getInstance().yellowGlow1]; + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/SchoolHome.as b/flash_decompiled/com/view/ui/home/mc/SchoolHome.as new file mode 100644 index 0000000..c713a57 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/SchoolHome.as @@ -0,0 +1,89 @@ +package com.view.ui.home.mc +{ + import com.data.HomeData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.res.GameUIRes; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class SchoolHome extends HomeBaseBuild + { + + private var url:String = "home/SchoolHome.swf"; + + private var _beginMc:MovieClip; + + public function SchoolHome() + { + super(); + loadSwf(this.url); + addEvent(); + buildEntId = 10150002; + Utils.g_events.addEventListener(DevEvent.EVENT_HOME_SCHOOL,this.getSchoolResult); + this.checkSchoolStatus(); + } + + override public function setNameMcPosi() : void + { + _nameMc.x = 0; + _nameMc.y = -37; + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(!contains(BuildMenu.getInstance())) + { + addChild(BuildMenu.getInstance()); + } + BuildMenu.getInstance().x = mouseX; + BuildMenu.getInstance().y = mouseY; + BuildMenu.getInstance().update(buildData); + } + + override public function setUpingMcPosi() : void + { + _upingMc.x = -30; + _upingMc.y = -188; + } + + override public function setTimeMcPosi() : void + { + _timeMc.x = -34; + _timeMc.y = 10; + } + + private function getSchoolResult(param1:DevEvent) : void + { + this.checkSchoolStatus(); + } + + private function checkSchoolStatus() : void + { + var _loc1_:Object = HomeData.getSchoolMap(); + if(Boolean(_loc1_) && _loc1_.status == 1) + { + if(buildSp1.contains(this.getBeginClass()) == false) + { + buildSp1.addChild(this.getBeginClass()); + } + } + else if(buildSp1.contains(this.getBeginClass())) + { + buildSp1.removeChild(this.getBeginClass()); + } + } + + public function getBeginClass() : MovieClip + { + if(this._beginMc == null) + { + this._beginMc = game.getMovieClip("beginClass",game.getApplication(GameUIRes.swfUrl_4)); + this._beginMc.y = -50; + this._beginMc.x = -30; + } + return this._beginMc; + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/SchoolMc.as b/flash_decompiled/com/view/ui/home/mc/SchoolMc.as new file mode 100644 index 0000000..bf0f16a --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/SchoolMc.as @@ -0,0 +1,130 @@ +package com.view.ui.home.mc +{ + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.HomeData; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + import com.view.newui.UISmallBtn; + import com.view.res.GameUIRes; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class SchoolMc extends UIBase + { + + private var bg:Bitmap; + + private var childName:UILabel; + + private var btn:UISmallBtn; + + private var sexSp:Sprite; + + private var preSex:int; + + public function SchoolMc(param1:int) + { + super(); + this.sexSp = new Sprite(); + addChild(this.sexSp); + this.btn = new UISmallBtn("抢 座",2); + addChild(this.btn); + this.btn.x = -int(this.btn.width / 2); + this.btn.y = 8; + this.btn.onClick = this.enterRoom; + this.btn.visible = false; + this.childName = new UILabel(65,16777215); + addChild(this.childName); + this.childName.x = -int(this.childName.width / 2); + this.childName.y = -10; + this.childName.setText("九尾妖狐是"); + this.childName.visible = false; + this.childName.setTextForMat(PublicMethod.getCenterTextFormat()); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.sexSp.filters = null; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.sexSp.filters = [PublicGlow.getInstance().yellowGlow1]; + } + + public function hiddenAll() : void + { + this.btn.visible = false; + this.sexSp.visible = false; + this.childName.visible = false; + } + + public function setData(param1:Object, param2:int = 0) : void + { + var _loc3_:int = 0; + var _loc4_:String = null; + if(param1 == null) + { + this.btn.visible = true; + this.sexSp.visible = false; + this.childName.visible = false; + } + else + { + this.btn.visible = false; + this.sexSp.visible = true; + this.childName.visible = true; + _loc3_ = int(param1.sex); + _loc4_ = param1.name; + if(this.preSex != _loc3_) + { + this.preSex = _loc3_; + if(Boolean(this.bg) && this.sexSp.contains(this.bg)) + { + this.sexSp.removeChild(this.bg); + } + if(this.preSex == 1) + { + this.bg = game.getBitMap("school_girl",game.getApplication(GameUIRes.swfUrl_4)); + this.bg.x = -21; + } + else + { + this.bg = game.getBitMap("school_boy",game.getApplication(GameUIRes.swfUrl_4)); + this.bg.x = -16; + } + this.sexSp.addChild(this.bg); + } + if(param1.userId == param2) + { + this.childName.setText("" + _loc4_ + ""); + } + else + { + this.childName.setText("" + _loc4_ + ""); + } + } + } + + private function enterRoom(param1:MouseEvent) : void + { + var _loc2_:Object = HomeData.getSchoolMap(); + var _loc3_:NewUser = NewUserData.getUser(); + if(_loc2_.leadId == _loc3_.userId) + { + MessageBoxUI.getInstance().addMessage("盟主不能加入课堂"); + return; + } + ConnectService.getInstance().homeService.enterSchool(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/WingRoom.as b/flash_decompiled/com/view/ui/home/mc/WingRoom.as new file mode 100644 index 0000000..f24a788 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/WingRoom.as @@ -0,0 +1,32 @@ +package com.view.ui.home.mc +{ + import com.view.res.GameUIRes; + import com.view.ui.home.HomeMainUI; + import com.view.ui.home.RoomNpcUI; + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class WingRoom extends HomeBaseBuild + { + + private var roomNpcUI:RoomNpcUI; + + public function WingRoom() + { + super(); + var _loc1_:Bitmap = game.getBitMap("roomNpc",game.getApplication(GameUIRes.swfUrl_4)); + buildSp.addChild(_loc1_); + addEvent(); + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(this.roomNpcUI == null) + { + this.roomNpcUI = new RoomNpcUI(); + } + HomeMainUI.getInstance().addUI(this.roomNpcUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/XunBaoBox.as b/flash_decompiled/com/view/ui/home/mc/XunBaoBox.as new file mode 100644 index 0000000..fce5a58 --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/XunBaoBox.as @@ -0,0 +1,54 @@ +package com.view.ui.home.mc +{ + import com.common.PublicGlow; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class XunBaoBox extends UIBase + { + + public function XunBaoBox(param1:int) + { + super(); + var _loc2_:Bitmap = game.getBitMap("box" + param1,game.getApplication(GameUIRes.swfUrl_4)); + addChild(_loc2_); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + buttonMode = true; + var _loc3_:UILabel = new UILabel(40,16777215); + var _loc4_:String = ""; + switch(param1) + { + case 1: + _loc4_ = "碧水箱"; + break; + case 2: + _loc4_ = "神木箱"; + break; + case 3: + _loc4_ = "赤焰箱"; + break; + case 4: + _loc4_ = "低保包"; + } + _loc3_.setText(_loc4_); + addChild(_loc3_); + _loc3_.x = 5; + _loc3_.y = 30; + } + + private function mouseOut(param1:MouseEvent) : void + { + this.filters = null; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.filters = [PublicGlow.getInstance().yellowGlow1]; + } + } +} + diff --git a/flash_decompiled/com/view/ui/home/mc/XunBaoTextMC.as b/flash_decompiled/com/view/ui/home/mc/XunBaoTextMC.as new file mode 100644 index 0000000..f3aa66c --- /dev/null +++ b/flash_decompiled/com/view/ui/home/mc/XunBaoTextMC.as @@ -0,0 +1,34 @@ +package com.view.ui.home.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIBase; + import flash.text.TextField; + import flash.text.TextFormat; + + public class XunBaoTextMC extends UIBase + { + + private var textLabel:TextField; + + public function XunBaoTextMC() + { + super(); + var _loc1_:TextFormat = new TextFormat(); + _loc1_.size = 14; + _loc1_.align = "center"; + _loc1_.color = 16748288; + this.textLabel = PublicMethod.getTextFieldWithFillter(16355072,480); + this.textLabel.mouseEnabled = false; + this.mouseChildren = false; + this.mouseEnabled = false; + addChild(this.textLabel); + this.textLabel.defaultTextFormat = _loc1_; + } + + public function setText(param1:String) : void + { + this.textLabel.htmlText = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/BoxMc.as b/flash_decompiled/com/view/ui/horse/BoxMc.as new file mode 100644 index 0000000..9c50d5b --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/BoxMc.as @@ -0,0 +1,119 @@ +package com.view.ui.horse +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.tip.UserItemTip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class BoxMc extends Sprite + { + + private var itemSprite:Sprite; + + public var itemObject:Object; + + private var itemImg:Bitmap; + + private var loadItemPng:LoadResource; + + private var itemsTip:UserItemTip; + + private var face:InstallFace = InstallFace.getInstance(); + + public function BoxMc() + { + super(); + } + + public function setItemData(param1:Object, param2:int) : void + { + var _loc3_:TextField = null; + this.itemObject = param1; + if(this.itemObject != null) + { + this.itemSprite = new Sprite(); + addChild(this.itemSprite); + _loc3_ = PublicMethod.getTextField(16777215,20); + addChild(_loc3_); + _loc3_.filters = [PublicGlow.getInstance().blackGlow]; + _loc3_.x = 30; + _loc3_.y = 30; + _loc3_.text = this.itemObject.itemNums; + switch(param2) + { + case 0: + this.x = 204; + this.y = 65 + 10; + break; + case 1: + this.x = 264; + this.y = 123 + 10; + break; + case 2: + this.x = 264; + this.y = 196 + 10; + break; + case 3: + this.x = 204; + this.y = 256 + 10; + break; + case 4: + this.x = 137; + this.y = 256 + 10; + break; + case 5: + this.x = 74; + this.y = 200 + 10; + break; + case 6: + this.x = 74; + this.y = 125 + 10; + break; + case 7: + this.x = 134; + this.y = 65 + 10; + } + this.loadItemImg(); + } + } + + private function loadItemImg() : void + { + if(ImgCache.getInstance().getImg("pic/equip/" + this.itemObject.iconPath)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + this.itemObject.iconPath).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource("pic/equip/" + this.itemObject.iconPath,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.loadItemPng.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSprite.addChild(this.itemImg); + this.itemImg.width = 48; + this.itemImg.height = 48; + var _loc1_:Bitmap = new Bitmap(); + _loc1_.bitmapData = this.itemImg.bitmapData.clone(); + this.itemsTip = new UserItemTip(this.itemSprite,this.face.stage,this.face.tip_bg,this.itemObject,_loc1_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/ExchangePointMc.as b/flash_decompiled/com/view/ui/horse/ExchangePointMc.as new file mode 100644 index 0000000..ffd6100 --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/ExchangePointMc.as @@ -0,0 +1,50 @@ +package com.view.ui.horse +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.text.TextField; + + public class ExchangePointMc extends Sprite + { + + private var nameText:TextField; + + private var pointText:TextField; + + public var itemObj:Object; + + public function ExchangePointMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(212); + addChild(_loc1_); + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,122); + addChild(this.nameText); + this.nameText.x = 0; + this.nameText.y = 4; + this.nameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.pointText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + addChild(this.pointText); + this.pointText.x = 122; + this.pointText.y = 4; + this.pointText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + } + + public function setItemObject(param1:Object) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + this.nameText.text = ""; + this.pointText.text = ""; + } + else + { + this.nameText.htmlText = this.itemObj.itemName; + this.pointText.text = this.itemObj.point; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/ExchangeUI.as b/flash_decompiled/com/view/ui/horse/ExchangeUI.as new file mode 100644 index 0000000..9f595d7 --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/ExchangeUI.as @@ -0,0 +1,72 @@ +package com.view.ui.horse +{ + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.horse.data.BoxData; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class ExchangeUI extends UIWindowBg + { + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + public function ExchangeUI() + { + var _loc2_:Array = null; + var _loc5_:int = 0; + var _loc6_:ExchangePointMc = null; + super(); + initSize(35,310); + loadTitle(UITitleConfig.title_duihuanliebiao); + addCloseBtn(); + initBg(); + var _loc1_:Array = ["道具名称","兑换活力值"]; + _loc2_ = [122,100]; + var _loc3_:UITable = new UITable(); + _loc3_.drawLine = false; + _loc3_.install(12,_loc1_,_loc2_); + bg1.addChild(_loc3_); + _loc3_.x = 8; + _loc3_.y = 6; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(218,300); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc3_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc4_:Array = BoxData.pointArray; + _loc5_ = 0; + while(_loc5_ < _loc4_.length) + { + _loc6_ = new ExchangePointMc(); + this.packMc.addChild(_loc6_); + this.packList.push(_loc6_); + _loc6_.y = 25 * _loc5_; + _loc6_.x = 4; + _loc6_.setItemObject(_loc4_[_loc5_]); + _loc5_++; + } + this.packScrollPane.update(); + } + + public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/Horse.as b/flash_decompiled/com/view/ui/horse/Horse.as new file mode 100644 index 0000000..6fb0ce1 --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/Horse.as @@ -0,0 +1,41 @@ +package com.view.ui.horse +{ + import com.events.DevEvent; + import com.utils.Utils; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class Horse extends BaseBuild + { + + private var tipStr:String; + + public function Horse(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/horse.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); + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.OPENHORSE)); + } + + override public function getBuildNameMc() : MovieClip + { + return null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/HorseEqUI.as b/flash_decompiled/com/view/ui/horse/HorseEqUI.as new file mode 100644 index 0000000..24d2bbd --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/HorseEqUI.as @@ -0,0 +1,464 @@ +package com.view.ui.horse +{ + import com.common.LoadResource; + 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.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tools.ToolView; + import com.view.ui.user.data.UserHorseData; + import com.view.ui.user.mc.EquHorseMc; + import com.view.ui.user.mc.HorseItemMc; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 HorseEqUI extends UIWindowBg + { + + private var bgStr:String = "pic/bg/bg_horse.jpg"; + + private var bgSp:UIWindowBg; + + private var bgload:LoadResource; + + private var upNeedPoint:TextField; + + private var upType:ComboBox; + + private var equItem1:EquHorseMc; + + private var equItem2:EquHorseMc; + + private var equItem3:EquHorseMc; + + private var equItem4:EquHorseMc; + + private var equItem5:EquHorseMc; + + private var lastItem:HorseItemMc; + + private var preEquItem:EquHorseMc; + + private var currObj:Object; + + private var combox:ComboBox; + + private var equBtn:UIButton; + + private var upBtn:UIButton; + + private var wuliText:TextField; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + public function HorseEqUI() + { + var _loc5_:UITable = null; + var _loc9_:HorseItemMc = null; + super(); + initSize(305,270); + loadTitle(UITitleConfig.title_shiju); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + _loc1_.text = "部件"; + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.align = "center"; + _loc2_.size = 12; + _loc2_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部", + "data":0 + }); + this.combox.addItem({ + "label":"盔具", + "data":1 + }); + this.combox.addItem({ + "label":"鞍具", + "data":3 + }); + this.combox.addItem({ + "label":"蹄具", + "data":5 + }); + this.combox.addItem({ + "label":"项具", + "data":2 + }); + this.combox.addItem({ + "label":"挂饰", + "data":4 + }); + bg1.addChild(this.combox); + this.combox.x = 45; + this.combox.y = 9; + this.combox.textField.setStyle("textFormat",_loc2_); + this.combox.dropdown.setRendererStyle("textFormat",_loc2_); + this.combox.selectedItem = this.combox.getItemAt(0); + this.combox.addEventListener(Event.CHANGE,this.selectColor); + var _loc3_:Array = ["饰具","数量"]; + var _loc4_:Array = [135,80]; + _loc5_ = new UITable(); + _loc5_.drawLine = false; + _loc5_.install(9,_loc3_,_loc4_); + bg1.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = 40; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(210,225); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc5_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 9) + { + _loc9_ = new HorseItemMc(); + this.packMc.addChild(_loc9_); + this.packList.push(_loc9_); + _loc9_.y = 25 * _loc6_; + _loc9_.x = 4; + _loc9_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc6_++; + } + this.packScrollPane.update(); + this.bgSp = new UIWindowBg(); + this.bgSp.initThirdPanel(245,199); + bg1.addChild(this.bgSp); + this.bgSp.x = 235; + this.bgSp.y = 18; + this.loadBg(this.bgStr); + var _loc7_:Sprite = new Sprite(); + bg1.addChild(_loc7_); + _loc7_.x = 235; + _loc7_.y = 18; + this.equItem1 = new EquHorseMc(1); + this.equItem2 = new EquHorseMc(2); + this.equItem3 = new EquHorseMc(3); + this.equItem4 = new EquHorseMc(4); + this.equItem5 = new EquHorseMc(5); + _loc7_.addChild(this.equItem1); + _loc7_.addChild(this.equItem2); + _loc7_.addChild(this.equItem3); + _loc7_.addChild(this.equItem4); + _loc7_.addChild(this.equItem5); + this.equItem1.x = 8; + this.equItem1.y = 6; + this.equItem3.x = 105; + this.equItem3.y = 10; + this.equItem4.x = 182; + this.equItem4.y = 7; + this.equItem2.x = 44; + this.equItem2.y = 79; + this.equItem5.x = 128; + this.equItem5.y = 123; + this.equItem1.addEventListener(MouseEvent.CLICK,this.clickEquItem); + this.equItem2.addEventListener(MouseEvent.CLICK,this.clickEquItem); + this.equItem3.addEventListener(MouseEvent.CLICK,this.clickEquItem); + this.equItem4.addEventListener(MouseEvent.CLICK,this.clickEquItem); + this.equItem5.addEventListener(MouseEvent.CLICK,this.clickEquItem); + this.equBtn = new UIButton("装 备",2,10); + this.upBtn = new UIButton("提 升",2,10); + bg1.addChild(this.equBtn); + this.equBtn.x = 231; + this.equBtn.y = 240; + this.upBtn.onClick = this.upHorseItem; + bg1.addChild(this.upBtn); + this.upBtn.x = this.equBtn.x; + this.upBtn.y = this.equBtn.y + 30; + this.wuliText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,120); + bg1.addChild(this.wuliText); + this.wuliText.x = 301; + this.wuliText.y = this.equBtn.y + 2; + this.wuliText.text = "君主武力点:"; + var _loc8_:Button_9 = new Button_9("购买饰具"); + _loc8_.addEventListener(MouseEvent.CLICK,this.buyItem); + bg1.addChild(_loc8_); + _loc8_.x = this.wuliText.x + 130; + _loc8_.y = this.wuliText.y; + this.upNeedPoint = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + bg1.addChild(this.upNeedPoint); + this.upNeedPoint.x = 383; + this.upNeedPoint.y = this.upBtn.y; + this.upNeedPoint.htmlText = "升级所需:" + UserHorseData.getUpHorseItemNeedPoint() + ""; + this.upType = new ComboBox(); + this.upType.width = 80; + this.upType.addItem({ + "label":"提升方式", + "data":0 + }); + this.upType.addItem({ + "label":"元宝提升", + "data":1 + }); + this.upType.addItem({ + "label":"点券提升", + "data":2 + }); + bg1.addChild(this.upType); + this.upType.x = this.wuliText.x; + this.upType.y = this.upNeedPoint.y; + this.upType.textField.setStyle("textFormat",_loc2_); + this.upType.dropdown.setRendererStyle("textFormat",_loc2_); + this.upType.selectedItem = this.upType.getItemAt(0); + Utils.g_events.addEventListener(DevEvent.WULICHANGE,this.getWuliResult); + this.initItem(); + } + + 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.bgSp.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 2; + _loc2_.width = 251; + _loc2_.height = 205; + } + + private function getWuliResult(param1:DevEvent) : void + { + this.initItem(); + } + + private function initItem() : void + { + this.wuliText.htmlText = "君主武力点:" + UserHorseData.getWuliCount() + ""; + var _loc1_:Array = UserHorseData.getNoEquipList(); + this.initNoEqList(_loc1_); + this.equItem1.getData(); + this.equItem2.getData(); + this.equItem3.getData(); + this.equItem4.getData(); + this.equItem5.getData(); + } + + private function initNoEqList(param1:Array) : void + { + var _loc2_:* = undefined; + var _loc3_:HorseItemMc = null; + this.clearItemList(); + if(param1 != null && param1.length > 0) + { + for(_loc2_ in param1) + { + if(_loc2_ > 8) + { + _loc3_ = new HorseItemMc(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 25 * _loc2_; + _loc3_.x = 4; + _loc3_.setItemObj(param1[_loc2_]); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc2_].setItemObj(param1[_loc2_]); + this.packList[_loc2_].setClick(false); + } + } + } + this.packScrollPane.update(); + if(this.preEquItem) + { + this.preEquItem.setClick(false); + this.preEquItem = null; + } + if(this.lastItem) + { + this.lastItem.setClick(false); + this.lastItem = null; + } + this.currObj = null; + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 8) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:HorseItemMc = param1.currentTarget as HorseItemMc; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.lastItem) + { + this.lastItem.setClick(false); + } + this.lastItem = _loc2_; + this.lastItem.setClick(true); + if(this.preEquItem) + { + this.preEquItem.setClick(false); + this.preEquItem = null; + } + this.currObj = this.lastItem.getItemObj(); + if(this.currObj == null) + { + return; + } + this.setEquBtn(1); + } + + private function clickEquItem(param1:MouseEvent) : void + { + var _loc2_:EquHorseMc = param1.currentTarget as EquHorseMc; + if(this.preEquItem) + { + this.preEquItem.setClick(false); + } + this.preEquItem = _loc2_; + this.preEquItem.setClick(true); + this.currObj = this.preEquItem.getObj(); + if(this.lastItem) + { + this.lastItem.setClick(false); + this.lastItem = null; + } + if(this.currObj == null) + { + return; + } + this.setEquBtn(2); + } + + private function setEquBtn(param1:int) : void + { + if(param1 == 1) + { + this.equBtn.setText("装 备"); + this.equBtn.onClick = this.equHorseItem; + } + else + { + this.equBtn.setText("卸 下"); + this.equBtn.onClick = this.unEquHorseItem; + } + } + + private function upHorseItem(param1:MouseEvent) : void + { + if(this.currObj == null) + { + MessageBoxUI.getInstance().addMessage("请先选择要提升的饰具"); + return; + } + var _loc2_:int = int(this.upType.selectedItem.data); + if(_loc2_ == 0) + { + MessageBoxUI.getInstance().addMessage("请先选择提升方式"); + return; + } + if(_loc2_ == 1 && UserHorseData.checkCashCanUp() == false) + { + MessageBoxUI.getInstance().addMessage("元宝不足,无法提升"); + return; + } + if(_loc2_ == 2 && UserHorseData.checkPointCanUp() == false) + { + MessageBoxUI.getInstance().addMessage("点券不足,无法提升"); + return; + } + ConnectService.getInstance().userService.levelUpHorseEqu(this.currObj.id,_loc2_); + } + + private function equHorseItem(param1:MouseEvent) : void + { + if(this.currObj == null) + { + MessageBoxUI.getInstance().addMessage("请先选择要装备的饰具"); + return; + } + ConnectService.getInstance().userService.equHorseItem(this.currObj.id); + } + + private function unEquHorseItem(param1:MouseEvent) : void + { + if(this.currObj == null) + { + MessageBoxUI.getInstance().addMessage("请先选择要卸下的饰具"); + return; + } + ConnectService.getInstance().userService.unEquHorseItem(this.currObj.id); + } + + private function selectColor(param1:Event) : void + { + var _loc2_:int = int(this.combox.selectedItem.data); + var _loc3_:Array = UserHorseData.getNoEquipList(_loc2_); + this.initNoEqList(_loc3_); + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function buyItem(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_HORSEEQU"); + _loc2_.onRefresh = this.getHorseList; + _loc2_.show(); + } + + private function getHorseList() : void + { + ConnectService.getInstance().userService.getHorseItemList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/PointMc.as b/flash_decompiled/com/view/ui/horse/PointMc.as new file mode 100644 index 0000000..1ff9e43 --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/PointMc.as @@ -0,0 +1,134 @@ +package com.view.ui.horse +{ + import com.common.PublicMethod; + import com.view.mc.sprite.PageInputMc; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PointMc extends Sprite + { + + public var checkBox:UICheckBtn; + + private var nameText:TextField; + + public var numInput:PageInputMc; + + private var pointText:TextField; + + private var bg:Sprite; + + public var itemObj:Object; + + private var point:int; + + private var itemNums:int; + + private var isSelect:Boolean; + + public function PointMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(311); + addChild(_loc1_); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,311,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); + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 2; + this.checkBox.y = 4; + this.checkBox.onClick = this.clickBox; + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(this.nameText); + this.nameText.x = 22; + this.nameText.y = 4; + this.numInput = new PageInputMc(); + addChild(this.numInput); + this.numInput.x = 130; + this.numInput.y = 4; + this.numInput.backF = this.setPoint; + this.pointText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.pointText); + this.pointText.x = 225; + this.pointText.y = 4; + this.pointText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.checkBox.visible = false; + this.nameText.text = ""; + this.numInput.visible = false; + this.pointText.text = ""; + } + + public function setItemObject(param1:Object) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + this.checkBox.visible = false; + this.nameText.text = ""; + this.numInput.visible = false; + this.pointText.text = ""; + this.bg.alpha = 0; + } + else + { + this.checkBox.visible = true; + this.numInput.visible = true; + this.point = this.itemObj.point; + this.nameText.htmlText = this.itemObj.itemName; + this.pointText.text = "" + this.point; + this.itemNums = this.itemObj.itemNums; + this.numInput.setText(1); + this.numInput.setMaxNum(this.itemNums); + this.numInput.setMinNum(0); + } + } + + private function setPoint() : void + { + this.pointText.text = this.numInput.getText() * this.point + ""; + } + + private function clickBox(param1:MouseEvent) : void + { + if(this.isSelect) + { + this.isSelect = false; + this.checkBox.setUnSelect(); + } + else + { + this.isSelect = true; + this.checkBox.setSelect(); + } + } + + public function getSelect() : Boolean + { + return this.isSelect; + } + + 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; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/PointUI.as b/flash_decompiled/com/view/ui/horse/PointUI.as new file mode 100644 index 0000000..9c41e37 --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/PointUI.as @@ -0,0 +1,164 @@ +package com.view.ui.horse +{ + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.horse.data.BoxData; + import com.view.ui.message.MessageBoxUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class PointUI extends UIWindowBg + { + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var backF:Function; + + public function PointUI() + { + var _loc2_:Array = null; + var _loc5_:UIButton = null; + var _loc6_:PointMc = null; + super(); + initSize(125,290); + loadTitle(UITitleConfig.title_tianchonghuoli); + addCloseBtn(); + initBg(); + var _loc1_:Array = ["宝石名称","数量","活力值"]; + _loc2_ = [122,100,98]; + var _loc3_:UITable = new UITable(); + _loc3_.drawLine = false; + _loc3_.install(10,_loc1_,_loc2_); + bg1.addChild(_loc3_); + _loc3_.x = 4; + _loc3_.y = 4; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(315,250); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc3_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 10) + { + _loc6_ = new PointMc(); + this.packMc.addChild(_loc6_); + this.packList.push(_loc6_); + _loc6_.y = 25 * _loc4_; + _loc6_.x = 4; + _loc4_++; + } + this.packScrollPane.update(); + _loc5_ = new UIButton("填充活力",2); + bg1.addChild(_loc5_); + _loc5_.x = 130; + _loc5_.y = 285; + _loc5_.onClick = this.exchangePoint; + Utils.g_events.addEventListener(DevEvent.BOX_ITEMLIST,this.getItemResult); + } + + public function getUserItemList() : void + { + ConnectService.getInstance().fishService.getExcangeMap(); + } + + private function getItemResult(param1:DevEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:PointMc = null; + var _loc2_:Array = BoxData.itemList; + this.clearGemList(); + if(_loc2_ != null && _loc2_.length > 0) + { + for(_loc3_ in _loc2_) + { + if(_loc3_ > 9) + { + _loc4_ = new PointMc(); + this.packMc.addChild(_loc4_); + this.packList.push(_loc4_); + _loc4_.y = 25 * _loc3_; + _loc4_.x = 4; + } + this.packList[_loc3_].setItemObject(_loc2_[_loc3_]); + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + } + + private function exchangePoint(param1:MouseEvent) : void + { + var _loc4_:PointMc = null; + var _loc5_:Object = null; + var _loc2_:Object = new Object(); + var _loc3_:Array = new Array(); + for each(_loc4_ in this.packList) + { + if(_loc4_.itemObj != null) + { + if(_loc4_.getSelect()) + { + if(_loc4_.numInput.getText() > 0) + { + _loc5_ = new Object(); + _loc5_.id = _loc4_.itemObj.id + ""; + _loc5_.nums = _loc4_.numInput.getText() + ""; + _loc3_.push(_loc5_); + } + } + } + } + if(_loc3_.length > 0) + { + _loc2_.itemList = _loc3_; + ConnectService.getInstance().fishService.exPoint(_loc2_); + closeSelf(null); + } + else + { + MessageBoxUI.getInstance().addMessage("请至少选中一个道具"); + } + } + + private function clearGemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObject(null); + } + _loc1_--; + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + } + + public function setBackFunc(param1:Function) : void + { + this.backF = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/RadomBox.as b/flash_decompiled/com/view/ui/horse/RadomBox.as new file mode 100644 index 0000000..8005d62 --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/RadomBox.as @@ -0,0 +1,43 @@ +package com.view.ui.horse +{ + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class RadomBox extends BaseBuild + { + + private var tipStr:String; + + public function RadomBox(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/radomBox.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 RadomBoxUI(); + } + buildUI.show(); + } + + override public function getBuildNameMc() : MovieClip + { + return null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/RadomBoxUI.as b/flash_decompiled/com/view/ui/horse/RadomBoxUI.as new file mode 100644 index 0000000..6f3433c --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/RadomBoxUI.as @@ -0,0 +1,311 @@ +package com.view.ui.horse +{ + import com.comfig.ClassConfig; + 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.UIButton; + 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.horse.data.BoxData; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import fl.controls.ComboBox; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class RadomBoxUI extends BaseUI + { + + private var imgSp:Sprite; + + private var pointText:TextField; + + private var upType:ComboBox; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var bg:Sprite; + + private var isFirst:Boolean; + + private var boxVec:Vector.; + + private var pointUI:PointUI; + + private var exchangeUI:ExchangeUI; + + private var totalExchangeUI:TotalExchangeUI; + + public function RadomBoxUI() + { + var _loc3_:UIWindowBg = null; + var _loc5_:TextField = null; + var _loc9_:Button_9 = null; + var _loc13_:Button_32 = null; + var _loc14_:Button_9 = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xunbaozhuanpan); + 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(375,392); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + _loc3_ = new UIWindowBg(); + _loc3_.initSecondPanel(232,392); + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x + _loc2_.width + 4; + _loc3_.y = _loc2_.y; + var _loc4_:UITitleBg = new UITitleBg("寻宝转盘",_loc3_.width); + _loc3_.addChild(_loc4_); + _loc4_.x = int(_loc3_.width / 2 - _loc4_.width / 2); + this.imgSp = face.getSprite(ClassConfig.lib_boxBg); + _loc2_.addChild(this.imgSp); + this.imgSp.x = 3; + this.imgSp.y = 3; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230); + _loc5_.height = 180; + _loc5_.wordWrap = true; + _loc5_.multiline = true; + _loc5_.textColor = 1048575; + _loc5_.selectable = false; + var _loc6_:String = "活动说明:
"; + _loc6_ = _loc6_ + "1、每天有一定次数参与活动,活动次数=vip等级*10。
"; + _loc6_ = _loc6_ + "2、每次活动消耗一定数量活力值。
"; + _loc6_ = _loc6_ + "3、活力值可由其他道具填充。
"; + var _loc7_:TextFormat = new TextFormat(); + _loc7_.leading = 4; + _loc5_.defaultTextFormat = _loc7_; + _loc3_.addChild(_loc5_); + _loc5_.htmlText = _loc6_; + _loc5_.x = 8; + _loc5_.y = 30; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc3_.addChild(_loc8_); + _loc8_.x = 10; + _loc8_.y = 190; + _loc8_.text = "当前活力值:"; + this.pointText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,70); + _loc3_.addChild(this.pointText); + this.pointText.x = _loc8_.x + _loc8_.width; + this.pointText.y = _loc8_.y; + _loc9_ = new Button_9("如何获得活力"); + _loc9_.buttonMode = true; + _loc3_.addChild(_loc9_); + _loc9_.x = 155; + _loc9_.y = _loc8_.y; + ToolTipManager.getInstance().setToolTip(_loc9_,new TxtTooltip("点击填充活力,可将部分道具兑换成活力"),false,-1,false); + var _loc10_:UIButton = new UIButton("填充活力",2,10); + _loc3_.addChild(_loc10_); + _loc10_.x = 15; + _loc10_.y = 220; + _loc10_.onClick = this.openPointUI; + var _loc11_:UIButton = new UIButton("兑换查看",2,10); + _loc3_.addChild(_loc11_); + _loc11_.x = _loc10_.x + 75; + _loc11_.y = _loc10_.y; + _loc11_.onClick = this.openExchangeUI; + var _loc12_:UIButton = new UIButton("今日收获",2,10); + _loc3_.addChild(_loc12_); + _loc12_.x = _loc11_.x + 75; + _loc12_.y = _loc10_.y; + _loc12_.onClick = this.openTotalExchangeUI; + _loc13_ = new Button_32("开始寻宝"); + _loc3_.addChild(_loc13_); + _loc13_.x = 5; + _loc13_.y = 260; + _loc13_.onclick = this.startFight; + _loc14_ = new Button_9("寻宝次数"); + _loc14_.buttonMode = true; + _loc3_.addChild(_loc14_); + _loc14_.x = 110; + _loc14_.y = 270; + ToolTipManager.getInstance().setToolTip(_loc14_,new TxtTooltip("选择多倍投注,可获得更多收益,同时消耗多倍的活力值或元宝"),false,-1,false); + this.upType = new ComboBox(); + this.upType.width = 60; + this.upType.addItem({ + "label":"所有次数", + "data":0 + }); + this.upType.addItem({ + "label":"1次", + "data":1 + }); + this.upType.addItem({ + "label":"5次", + "data":5 + }); + this.upType.addItem({ + "label":"10次", + "data":10 + }); + _loc3_.addChild(this.upType); + this.upType.x = 170; + this.upType.y = 265; + var _loc15_:TextFormat = new TextFormat(); + _loc15_.align = "center"; + _loc15_.size = 12; + _loc15_.color = 16777215; + this.upType.textField.setStyle("textFormat",_loc15_); + this.upType.dropdown.setRendererStyle("textFormat",_loc15_); + this.upType.selectedItem = this.upType.getItemAt(0); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,130); + _loc3_.addChild(this.label1); + this.label1.x = 10; + this.label1.y = 310; + this.label1.text = "开始寻宝需 0 点活力"; + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,130); + _loc3_.addChild(this.label4); + this.label4.x = this.label1.x; + this.label4.y = this.label1.y + 20; + this.label4.text = "今日已寻宝"; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110); + _loc3_.addChild(this.label2); + this.label2.x = this.label1.x; + this.label2.y = this.label4.y + 20; + this.label2.text = "今日剩余次数:0"; + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110); + this.label3.x = this.label1.x; + this.label3.y = this.label2.y + 20; + this.label3.text = "寻宝令:0"; + Utils.g_events.addEventListener(DevEvent.BOX_ENTER,this.getUserDataResult); + this.getUserData(); + } + + 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); + if(Boolean(this.pointUI) && contains(this.pointUI)) + { + removeChild(this.pointUI); + } + if(Boolean(this.exchangeUI) && contains(this.exchangeUI)) + { + removeChild(this.exchangeUI); + } + } + + private function getUserData() : void + { + if(this.isFirst == false) + { + ConnectService.getInstance().fishService.getUserBox(1); + } + else + { + ConnectService.getInstance().fishService.getUserBox(0); + } + } + + private function getUserDataResult(param1:DevEvent) : void + { + var _loc3_:Array = null; + var _loc4_:int = 0; + var _loc5_:BoxMc = null; + if(!this.isFirst) + { + this.isFirst = true; + this.boxVec = new Vector.(); + _loc3_ = BoxData.getItemArray(); + _loc4_ = 0; + while(_loc4_ < 8) + { + _loc5_ = new BoxMc(); + _loc5_.setItemData(_loc3_[_loc4_],_loc4_); + this.boxVec.push(_loc5_); + this.imgSp.addChild(_loc5_); + _loc4_++; + } + } + this.pointText.htmlText = BoxData.userPoint + ""; + this.label1.htmlText = BoxData.needPoint; + this.label2.htmlText = "今日剩余次数:" + BoxData.freeTimes + ""; + this.label3.htmlText = "寻宝令:" + BoxData.userItemNums + ""; + this.label4.htmlText = "今日已寻宝" + BoxData.times + "次"; + var _loc2_:String = BoxData.itemIdStr; + } + + private function startFight() : void + { + var _loc1_:int = int(this.upType.selectedItem.data); + BoxData.play(_loc1_); + } + + private function resetPlay(param1:MouseEvent) : void + { + } + + private function confimReset() : void + { + ConnectService.getInstance().fishService.resetBox(); + } + + private function openPointUI(param1:MouseEvent) : void + { + if(this.pointUI == null) + { + this.pointUI = new PointUI(); + } + addChild(this.pointUI); + this.pointUI.x = 160; + this.pointUI.y = 70; + this.pointUI.getUserItemList(); + } + + private function openExchangeUI(param1:MouseEvent) : void + { + if(this.exchangeUI == null) + { + this.exchangeUI = new ExchangeUI(); + } + addChild(this.exchangeUI); + this.exchangeUI.x = 210; + this.exchangeUI.y = 50; + } + + private function openTotalExchangeUI(param1:MouseEvent) : void + { + if(this.totalExchangeUI == null) + { + this.totalExchangeUI = new TotalExchangeUI(); + } + addChild(this.totalExchangeUI); + this.totalExchangeUI.x = 210; + this.totalExchangeUI.y = 80; + this.totalExchangeUI.getData(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/TotalExchangeUI.as b/flash_decompiled/com/view/ui/horse/TotalExchangeUI.as new file mode 100644 index 0000000..f2dafa9 --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/TotalExchangeUI.as @@ -0,0 +1,91 @@ +package com.view.ui.horse +{ + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.horse.data.BoxData; + import flash.events.MouseEvent; + + public class TotalExchangeUI extends UIWindowBg + { + + private var packList:Vector.; + + public function TotalExchangeUI() + { + var _loc2_:Array = null; + var _loc6_:ExchangePointMc = null; + super(); + initSize(35,208); + loadTitle(UITitleConfig.title_duihuanliebiao); + addCloseBtn(); + initBg(); + var _loc1_:Array = ["道具名称","数量"]; + _loc2_ = [122,100]; + var _loc3_:UITable = new UITable(); + _loc3_.drawLine = false; + _loc3_.install(8,_loc1_,_loc2_); + bg1.addChild(_loc3_); + _loc3_.x = 8; + _loc3_.y = 6; + this.packList = new Vector.(); + var _loc4_:Array = BoxData.pointArray; + var _loc5_:int = 0; + while(_loc5_ < 8) + { + _loc6_ = new ExchangePointMc(); + _loc3_.addChild(_loc6_); + this.packList.push(_loc6_); + _loc6_.y = 25 + 25 * _loc5_; + _loc6_.x = 4; + _loc6_.setItemObject(null); + _loc5_++; + } + } + + public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function getData() : void + { + var _loc2_:ExchangePointMc = null; + var _loc3_:Array = null; + var _loc4_:int = 0; + var _loc5_:Object = null; + var _loc1_:String = BoxData.itemIdStr; + if(_loc1_ == null || _loc1_ == "") + { + for each(_loc2_ in this.packList) + { + _loc2_.setItemObject(null); + } + } + else + { + _loc3_ = _loc1_.split(";"); + _loc4_ = 0; + while(_loc4_ < 8) + { + if(_loc3_[_loc4_]) + { + _loc5_ = new Object(); + _loc5_.itemName = BoxData.getItemNameByEntid(_loc3_[_loc4_].split(",")[0]); + _loc5_.point = _loc3_[_loc4_].split(",")[1]; + this.packList[_loc4_].setItemObject(_loc5_); + } + else + { + this.packList[_loc4_].setItemObject(null); + } + _loc4_++; + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/horse/data/BoxData.as b/flash_decompiled/com/view/ui/horse/data/BoxData.as new file mode 100644 index 0000000..52977a8 --- /dev/null +++ b/flash_decompiled/com/view/ui/horse/data/BoxData.as @@ -0,0 +1,88 @@ +package com.view.ui.horse.data +{ + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + + public class BoxData + { + + public static var times:int; + + private static var cash_1:int; + + private static var cash_2:int; + + public static var firstPoint:int; + + public static var itemList:Array; + + private static var itemArray:Array = null; + + public static var pointArray:Array = null; + + public static var freeTimes:int = 0; + + public static var userPoint:int = 0; + + public static var userItemNums:int = 0; + + public static var itemIdStr:String = null; + + public static var needPoint:String = ""; + + public function BoxData() + { + super(); + } + + public static function getItemArray() : Array + { + return itemArray; + } + + public static function setUserData(param1:Object) : void + { + freeTimes = param1.freeTimes; + userPoint = param1.userPoint; + userItemNums = param1.userItemNums; + itemIdStr = param1.itemIdStr; + if(itemArray == null) + { + itemArray = param1.itemMap; + pointArray = param1.pointMap; + cash_1 = param1.cash_1; + cash_2 = param1.cash_2; + firstPoint = int(param1.firstPoint); + } + times = param1.times; + needPoint = "每次寻宝需" + firstPoint + "点活力"; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.BOX_ENTER)); + } + + public static function play(param1:int) : void + { + ConnectService.getInstance().fishService.startBox(param1); + } + + public static function getItemNameByEntid(param1:String) : String + { + var _loc2_:Object = null; + for each(_loc2_ in itemArray) + { + if(_loc2_.itemId == param1) + { + return _loc2_.showName; + } + } + return ""; + } + + public static function setExchangeList(param1:Array) : void + { + itemList = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.BOX_ITEMLIST)); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hospital/HospitalBuild.as b/flash_decompiled/com/view/ui/hospital/HospitalBuild.as new file mode 100644 index 0000000..3a681d0 --- /dev/null +++ b/flash_decompiled/com/view/ui/hospital/HospitalBuild.as @@ -0,0 +1,71 @@ +package com.view.ui.hospital +{ + import com.comfig.CommonData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class HospitalBuild extends BaseBuild + { + + public function HospitalBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/HospitalView1.swf"; + super.loadSwfBg(); + } + else + { + Utils.g_events.addEventListener(DevEvent.OPENHOSPITAL,this.openHospitalUI); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/HospitalView3.swf"; + buildData.picUrl = "pic/build/HospitalView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/HospitalView2.swf"; + buildData.picUrl = "pic/build/HospitalView2.png"; + } + else + { + buildData.swfUrl = "pic/build/HospitalView1.swf"; + buildData.picUrl = "pic/build/HospitalView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new HospitalBuildUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + + private function openHospitalUI(param1:DevEvent) : void + { + this.openBuildUI(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hospital/HospitalBuildUI.as b/flash_decompiled/com/view/ui/hospital/HospitalBuildUI.as new file mode 100644 index 0000000..7bc2d89 --- /dev/null +++ b/flash_decompiled/com/view/ui/hospital/HospitalBuildUI.as @@ -0,0 +1,229 @@ +package com.view.ui.hospital +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.HospitalEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.usertool.MedicineView; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HospitalBuildUI extends BaseUI + { + + private var tableMc:UITable; + + private var scrollPane:ScrollPane; + + private var heroListMc:Sprite; + + private var heroList:Vector.; + + private var medicalNums:TextField; + + private var allNeedPointNum:TextField; + + private var allNeedPoint:int; + + private var currMeNums:int; + + private var maxMeNums:int; + + public function HospitalBuildUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_yiguan); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc5_:TextField = null; + var _loc6_:UIButton = null; + var _loc9_:HospitalLineMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + var _loc2_:Array = ["受伤武将","等级","健康度","需要膏药数量","操作"]; + var _loc3_:Array = [122,124,124,127,130]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(10,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(623,250); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.x = 1; + this.scrollPane.y = 25; + this.heroListMc = new Sprite(); + this.scrollPane.source = this.heroListMc; + this.heroList = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 10) + { + _loc9_ = new HospitalLineMc(); + this.heroList.push(_loc9_); + this.heroListMc.addChild(_loc9_); + _loc9_.y = _loc4_ * 25; + _loc4_++; + } + this.scrollPane.update(); + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc5_.text = "膏药数量:"; + this.medicalNums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(_loc5_); + _loc1_.addChild(this.medicalNums); + _loc5_.x = 5; + _loc5_.y = 284; + this.medicalNums.x = _loc5_.x + 60; + this.medicalNums.y = _loc5_.y; + _loc6_ = new UIButton("购买膏药",2,10); + _loc1_.addChild(_loc6_); + _loc6_.x = 160; + _loc6_.y = _loc5_.y - 3; + _loc6_.onClick = this.buyItem; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc7_.x = 330; + _loc7_.y = _loc5_.y; + _loc7_.text = "全部医治武将需要膏药数量:"; + _loc1_.addChild(_loc7_); + this.allNeedPointNum = PublicMethod.getTextField(UIConfig.textColor,50); + this.allNeedPointNum.x = 490; + this.allNeedPointNum.y = _loc5_.y; + this.allNeedPointNum.text = ""; + _loc1_.addChild(this.allNeedPointNum); + var _loc8_:UIButton = new UIButton("全部医疗",2,10); + _loc1_.addChild(_loc8_); + _loc8_.x = 560; + _loc8_.y = _loc6_.y; + _loc8_.onClick = this.medicalAll; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(HospitalEvent.GET_HOSPITAL_VIEW,this.getHospitalDataResult); + ConnectService.getInstance().addEventListener(HospitalEvent.TREAT_HERO,this.treatHeroResult); + ConnectService.getInstance().addEventListener(HospitalEvent.TREAT_HERO_ALL,this.treatHeroResult); + this.getHospitalData(); + super.addBuildEvent(); + } + + private function getHospitalData() : void + { + ConnectService.getInstance().castleService.getHospital(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(HospitalEvent.GET_HOSPITAL_VIEW,this.getHospitalDataResult); + ConnectService.getInstance().removeEventListener(HospitalEvent.TREAT_HERO,this.treatHeroResult); + ConnectService.getInstance().removeEventListener(HospitalEvent.TREAT_HERO_ALL,this.treatHeroResult); + this.clearHeroList(); + super.delBuildEvent(); + } + + private function clearHeroList() : void + { + var _loc1_:int = int(this.heroList.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.heroList[_loc2_].setObj(null); + if(_loc2_ > 9) + { + this.heroListMc.removeChild(this.heroList[_loc2_]); + this.heroList.splice(_loc2_,1); + } + _loc2_--; + } + this.scrollPane.update(); + } + + private function getHospitalDataResult(param1:HospitalEvent) : void + { + var _loc5_:HospitalLineMc = null; + var _loc2_:Object = param1.hospitalObject; + this.currMeNums = _loc2_.hosPoint; + this.maxMeNums = _loc2_.maxPoint; + this.medicalNums.text = _loc2_.hosPoint + "/" + _loc2_.maxPoint; + this.allNeedPoint = _loc2_.allNeedPoint; + this.allNeedPointNum.text = _loc2_.allNeedPoint; + var _loc3_:Array = _loc2_.heroList; + if(_loc3_ == null || _loc3_.length == 0) + { + this.clearHeroList(); + return; + } + var _loc4_:int = 0; + while(_loc4_ < _loc3_.length) + { + if(_loc4_ > 9) + { + _loc5_ = new HospitalLineMc(); + this.heroListMc.addChild(_loc5_); + this.heroList.push(_loc5_); + _loc5_.x = 1; + _loc5_.y = _loc4_ * 24; + } + this.heroList[_loc4_].setObj(_loc3_[_loc4_]); + _loc4_++; + } + this.scrollPane.update(); + } + + private function treatHeroResult(param1:HospitalEvent) : void + { + this.getHospitalData(); + } + + private function medicalAll(param1:MouseEvent) : void + { + if(this.allNeedPoint <= 0) + { + return; + } + ConnectService.getInstance().castleService.treatHeroList(); + } + + private function buyItem(param1:MouseEvent) : void + { + if(this.currMeNums == this.maxMeNums) + { + MessageBoxUI.getInstance().addMessage("医馆膏药已满。"); + return; + } + var _loc2_:MedicineView = MedicineView.getInstance(); + _loc2_.refreshF = this.getHospitalData; + _loc2_.list(); + _loc2_.show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hospital/HospitalLineMc.as b/flash_decompiled/com/view/ui/hospital/HospitalLineMc.as new file mode 100644 index 0000000..5bda8af --- /dev/null +++ b/flash_decompiled/com/view/ui/hospital/HospitalLineMc.as @@ -0,0 +1,121 @@ +package com.view.ui.hospital +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.data.hero.Hero; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.hero.HeroConst; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HospitalLineMc extends Sprite + { + + private var bg:Sprite; + + private var hero:Hero; + + private var heroName:TextField; + + private var heroLevel:TextField; + + private var heroHp:TextField; + + private var needMes:TextField; + + private var medBtn:UISmallBtn; + + public function HospitalLineMc() + { + var _loc2_:TextFormat = null; + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(614); + addChild(_loc1_); + _loc1_.x = 3; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,614,23); + addChild(this.bg); + this.bg.y = 1; + this.bg.x = 3; + this.bg.alpha = 0; + _loc2_ = PublicMethod.getCenterTextFormat(); + this.heroName = PublicMethod.getTextFieldWithFillter(16777215,122); + addChild(this.heroName); + this.heroName.y = 2; + this.heroName.defaultTextFormat = _loc2_; + this.heroLevel = PublicMethod.getTextFieldWithFillter(16777215,124); + addChild(this.heroLevel); + this.heroLevel.x = 122; + this.heroLevel.y = this.heroName.y; + this.heroLevel.defaultTextFormat = _loc2_; + this.heroHp = PublicMethod.getTextFieldWithFillter(65280,124); + addChild(this.heroHp); + this.heroHp.x = this.heroLevel.x + this.heroLevel.width; + this.heroHp.y = this.heroName.y; + this.heroHp.defaultTextFormat = _loc2_; + this.needMes = PublicMethod.getTextFieldWithFillter(16777215,127); + addChild(this.needMes); + this.needMes.x = this.heroHp.x + this.heroHp.width; + this.needMes.y = this.heroName.y; + this.needMes.defaultTextFormat = _loc2_; + this.medBtn = new UISmallBtn("医 疗",2); + addChild(this.medBtn); + this.medBtn.x = this.needMes.x + this.needMes.width + 45; + this.medBtn.y = this.heroName.y; + this.medBtn.onClick = this.treatHero; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.medBtn.visible = false; + } + + public function setObj(param1:Hero) : void + { + this.hero = param1; + if(this.hero == null) + { + this.heroName.text = ""; + this.heroLevel.text = ""; + this.heroHp.text = ""; + this.needMes.text = ""; + this.medBtn.visible = false; + this.bg.alpha = 0; + return; + } + this.heroName.text = this.hero.name; + this.needMes.text = this.hero.hospitalPoint.toString(); + this.heroLevel.text = HeroConst.changeName(this.hero.level,this.hero.changeCount); + this.heroHp.text = this.hero.hpStatus.toString(); + this.medBtn.visible = true; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + this.bg.alpha = 0.2; + } + + private function treatHero(param1:MouseEvent) : void + { + if(this.hero.heroId <= 0) + { + return; + } + ConnectService.getInstance().castleService.treatHero(this.hero.heroId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hotel/HotelBuild.as b/flash_decompiled/com/view/ui/hotel/HotelBuild.as new file mode 100644 index 0000000..63d8095 --- /dev/null +++ b/flash_decompiled/com/view/ui/hotel/HotelBuild.as @@ -0,0 +1,60 @@ +package com.view.ui.hotel +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class HotelBuild extends BaseBuild + { + + public function HotelBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/HotelView1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/HotelView3.swf"; + buildData.picUrl = "pic/build/HotelView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/HotelView2.swf"; + buildData.picUrl = "pic/build/HotelView2.png"; + } + else + { + buildData.swfUrl = "pic/build/HotelView1.swf"; + buildData.picUrl = "pic/build/HotelView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new HotelBuildUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hotel/HotelBuildUI.as b/flash_decompiled/com/view/ui/hotel/HotelBuildUI.as new file mode 100644 index 0000000..88bd0ee --- /dev/null +++ b/flash_decompiled/com/view/ui/hotel/HotelBuildUI.as @@ -0,0 +1,288 @@ +package com.view.ui.hotel +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.control.hero.event.HeroHotelEvent; + import com.view.Control; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tools.ToolView; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class HotelBuildUI extends BaseUI + { + + private var heroNumText:TextField; + + private var leftTimeText:TextField; + + private var heroArr:Vector.; + + private var _curLevel:int; + + private var _canHero:Boolean; + + private var _Level:int; + + private var leftTime:int; + + private var timer:Timer; + + public function HotelBuildUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_jiuguan); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc4_:TextField = null; + var _loc6_:UIButton = null; + var _loc7_:HotelMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + this.heroArr = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 6) + { + _loc7_ = new HotelMc(_loc2_); + _loc1_.addChild(_loc7_); + _loc7_.x = 5 + 104 * _loc2_; + _loc7_.y = 5; + this.heroArr.push(_loc7_); + _loc2_++; + } + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,85); + _loc3_.text = "当前武将数量:"; + _loc1_.addChild(_loc3_); + _loc3_.x = 5; + _loc3_.y = 275; + _loc3_.addEventListener(MouseEvent.CLICK,this.getMyHero); + this.heroNumText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + _loc1_.addChild(this.heroNumText); + this.heroNumText.x = 90; + this.heroNumText.y = 275; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,115); + _loc1_.addChild(_loc4_); + _loc4_.x = 210; + _loc4_.y = 275; + _loc4_.text = "距离下次刷新时间:"; + this.leftTimeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc1_.addChild(this.leftTimeText); + this.leftTimeText.x = _loc4_.x + _loc4_.width; + this.leftTimeText.y = 275; + var _loc5_:UIButton = new UIButton("立即刷新",2); + _loc1_.addChild(_loc5_); + _loc5_.x = 480; + _loc5_.y = _loc3_.y; + _loc5_.onClick = this.freshConfirm; + _loc6_ = new UIButton("购 买",2); + _loc1_.addChild(_loc6_); + _loc6_.x = _loc5_.x + 80; + _loc6_.y = _loc3_.y; + _loc6_.onClick = this.buyItem; + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + ConnectService.getInstance().heroService.getHotelHero(); + } + + private function getHotelHeroListResult(param1:HeroHotelEvent) : void + { + var _loc6_:HotelMc = null; + this.stopTime(); + var _loc2_:int = param1.heroHotel.currHeroNum; + var _loc3_:int = param1.heroHotel.allHeroNum; + this.heroNumText.text = _loc2_ + "/" + _loc3_; + this.leftTime = param1.heroHotel.remainTime; + this.getLeftTime(); + var _loc4_:Array = param1.heroHotel.heroList; + if(_loc4_ == null || _loc4_.length == 0) + { + for each(_loc6_ in this.heroArr) + { + _loc6_.setData(null); + } + return; + } + this._curLevel = param1.heroHotel.level; + var _loc5_:int = 0; + while(_loc5_ < 6) + { + if(_loc4_[_loc5_]) + { + this.heroArr[_loc5_].setData(_loc4_[_loc5_]); + } + else + { + this.heroArr[_loc5_].setData(null); + } + _loc5_++; + } + this._canHero = true; + if(_loc2_ >= _loc3_) + { + this._Level = param1.heroHotel.nextLv; + this._canHero = false; + } + this.showBtn(); + } + + private function showBtn() : void + { + var _loc1_:int = 0; + var _loc2_:int = 0; + while(_loc2_ < this.heroArr.length) + { + if(this.heroArr[_loc2_].hero != null) + { + if(!this._canHero) + { + this.heroArr[_loc2_].hireBtn.visible = false; + this.heroArr[_loc2_].h_text1.textColor = 16711680; + if(this._Level == -1) + { + this.heroArr[_loc2_].h_text1.text = "武将已达上限"; + } + else + { + this.heroArr[_loc2_].h_text1.text = "武将已达上限\n君主" + this._Level + "级可招募"; + } + } + } + _loc2_++; + } + if(this._curLevel >= 3) + { + return; + } + var _loc3_:* = this._curLevel; + while(_loc3_ < 6) + { + this.heroArr[_loc3_].hireBtn.visible = false; + this.heroArr[_loc3_].h_text1.textColor = 65280; + this.heroArr[_loc3_].h_text1.text = "3级酒馆可开启"; + _loc3_++; + } + if(this._curLevel == 1) + { + this.heroArr[this._curLevel].h_text1.text = "2级酒馆可开启"; + } + } + + private function getLeftTime() : void + { + if(this.leftTime <= 0) + { + return; + } + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timerFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function timerFrame(param1:TimerEvent) : void + { + --this.leftTime; + this.leftTimeText.text = PublicMethod.getTimeStr(this.leftTime); + if(this.leftTime <= 0) + { + this.stopTime(); + this.loadLocalData(); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_useItemFreshHotelHeroList,this.useItemSucc); + ConnectService.getInstance().addEventListener(HeroHotelEvent.getHotelHeroList,this.getHotelHeroListResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + ConnectService.getInstance().removeEventListener(HeroHotelEvent.getHotelHeroList,this.getHotelHeroListResult); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_useItemFreshHotelHeroList,this.useItemSucc); + this.stopTime(); + } + + private function stopTime() : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.timerFrame); + this.timer = null; + } + this.leftTimeText.text = ""; + } + + private function freshConfirm(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("使用武将刷新卡刷新武将列表吗?",this.useSumbit); + } + + private function useSumbit() : void + { + ConnectService.getInstance().heroService.useItemFreshHotelHeroList(); + } + + private function useItemSucc(param1:HeroEvent) : void + { + this.loadLocalData(); + } + + private function buyItem(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_SHUAXIN"); + _loc2_.onRefresh = null; + _loc2_.show(); + } + + private function getMyHero(param1:MouseEvent) : void + { + Control.getInstance().centerMenu.getUserHero(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/hotel/HotelMc.as b/flash_decompiled/com/view/ui/hotel/HotelMc.as new file mode 100644 index 0000000..ab401c2 --- /dev/null +++ b/flash_decompiled/com/view/ui/hotel/HotelMc.as @@ -0,0 +1,237 @@ +package com.view.ui.hotel +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.data.hero.Hero; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class HotelMc extends Sprite + { + + private var face:InstallFace; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var bg3:UIWindowBg; + + public var hireBtn:UISmallBtn; + + public var hero:Hero; + + private var loader:LoadResource; + + private var headImg:Bitmap; + + private var num:int; + + public var h_text1:TextField; + + private var imgSp:Sprite; + + public function HotelMc(param1:int) + { + var _loc4_:TextField = null; + this.face = InstallFace.getInstance(); + super(); + this.num = param1; + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(91,250); + addChild(this.bg3); + this.bg3.alpha = 0.7; + var _loc2_:Sprite = this.face.getSprite(ClassConfig.lib_herobg); + addChild(_loc2_); + _loc2_.x = 14; + _loc2_.y = 14; + this.imgSp = new Sprite(); + _loc2_.addChild(this.imgSp); + this.imgSp.x = 4; + this.imgSp.y = 4; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + _loc3_.text = "姓名:"; + addChild(_loc3_); + _loc3_.x = 15; + _loc3_.y = 110; + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.value1); + this.value1.x = _loc3_.x + 35; + this.value1.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + _loc4_.text = "职业:"; + addChild(_loc4_); + _loc4_.x = _loc3_.x; + _loc4_.y = _loc3_.y + 25; + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + _loc5_.text = "擅长:"; + addChild(_loc5_); + _loc5_.x = _loc3_.x; + _loc5_.y = _loc4_.y + 25; + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.value3); + this.value3.x = this.value1.x; + this.value3.y = _loc5_.y; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,35); + _loc6_.text = "性格:"; + addChild(_loc6_); + _loc6_.x = _loc3_.x; + _loc6_.y = _loc5_.y + 25; + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.value4); + this.value4.x = this.value1.x; + this.value4.y = _loc6_.y; + this.hireBtn = new UISmallBtn("招 募",2); + addChild(this.hireBtn); + this.hireBtn.x = 30; + this.hireBtn.y = 220; + this.hireBtn.onClick = this.hireConfirm; + this.h_text1 = PublicMethod.getTextField(16711680,90); + addChild(this.h_text1); + this.h_text1.x = 15; + this.h_text1.y = 220; + this.h_text1.wordWrap = true; + this.h_text1.multiline = true; + this.h_text1.height = 40; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.MOUSE_OVER,this.mouseOver); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.bg3.alpha = 0.7; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.bg3.alpha = 1; + } + + public function setData(param1:Hero) : void + { + this.hero = param1; + this.h_text1.text = ""; + if(this.hero) + { + this.loadHeroHead(); + this.value1.htmlText = this.hero.showName; + this.value2.text = this.hero.careerName; + if(this.hero.careerName == "勇士") + { + this.value3.text = "均衡"; + } + if(this.hero.careerName == "步将") + { + this.value3.text = "步兵"; + } + if(this.hero.careerName == "弓将") + { + this.value3.text = "弓兵"; + } + if(this.hero.careerName == "骑将") + { + this.value3.text = "骑兵"; + } + if(this.hero.careerName == "车将") + { + this.value3.text = "车兵"; + } + if(this.hero.careerName == "器械师") + { + this.value3.text = "器械"; + } + this.value4.text = this.getChartr(this.hero.chartr); + this.hireBtn.visible = true; + } + else + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.value1.htmlText = ""; + this.value2.text = ""; + this.value3.htmlText = ""; + this.value4.text = ""; + this.hireBtn.visible = false; + } + } + + public function loadHeroHead() : void + { + ToolTipManager.getInstance().disposeToolTip(this.imgSp); + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + var _loc1_:String = ServerConfig.IMAGE_HEAD_URL + this.hero.picPath; + this.loader = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(this.hero == null) + { + this.loader.clear(); + return; + } + this.headImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.imgSp.addChild(this.headImg); + ToolTipManager.getInstance().setToolTip(this.imgSp,new TxtTooltip("攻击:" + this.hero.atk + "
" + "防御:" + this.hero.def + "
" + "敏捷:" + this.hero.agl + "
" + "体力:" + this.hero.hp)); + } + + private function hireConfirm(param1:MouseEvent) : void + { + var _loc2_:String = "你确定招募【" + this.hero.name + "】吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc2_,this.hireHero); + } + + private function hireHero() : void + { + ConnectService.getInstance().heroService.hireHero(this.num + 1); + } + + private function getChartr(param1:int) : String + { + var _loc2_:String = ""; + switch(param1) + { + case 0: + _loc2_ = "谨慎"; + break; + case 1: + _loc2_ = "冷静"; + break; + case 2: + _loc2_ = "果敢"; + break; + case 3: + _loc2_ = "勇猛"; + } + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/house/HouseBuild.as b/flash_decompiled/com/view/ui/house/HouseBuild.as new file mode 100644 index 0000000..2607a36 --- /dev/null +++ b/flash_decompiled/com/view/ui/house/HouseBuild.as @@ -0,0 +1,60 @@ +package com.view.ui.house +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class HouseBuild extends BaseBuild + { + + public function HouseBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/ResidenceView1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/ResidenceView3.swf"; + buildData.picUrl = "pic/build/ResidenceView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/ResidenceView2.swf"; + buildData.picUrl = "pic/build/ResidenceView2.png"; + } + else if(castleBuild.level >= 0) + { + buildData.swfUrl = "pic/build/ResidenceView1.swf"; + buildData.picUrl = "pic/build/ResidenceView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new HouseBuildUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/house/HouseBuildUI.as b/flash_decompiled/com/view/ui/house/HouseBuildUI.as new file mode 100644 index 0000000..eca6491 --- /dev/null +++ b/flash_decompiled/com/view/ui/house/HouseBuildUI.as @@ -0,0 +1,79 @@ +package com.view.ui.house +{ + import com.comfig.ClassConfig; + import com.newdata.user.NewPop; + import com.newdata.user.NewUserData; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.display.MovieClip; + import flash.events.Event; + + public class HouseBuildUI extends BaseUI + { + + private var ui_house:MovieClip; + + public function HouseBuildUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_minju); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + + public function createCurUI() : void + { + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + this.ui_house = face.getMovieClip(ClassConfig.ui_house); + _loc1_.addChild(this.ui_house); + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + var _loc1_:NewPop = NewUserData.getNewPop(); + this.ui_house.idlePop_mc.num_txt.text = _loc1_.idlePop + ""; + this.ui_house.workPop_mc.num_txt.text = _loc1_.foodPop + ""; + this.ui_house.currPop_txt.text = _loc1_.currPop + ""; + this.ui_house.maxPop_txt.text = _loc1_.currPop + ""; + this.ui_house.qushi_mc.gotoAndStop(1); + this.ui_house.idle_mc.width = int(403 * _loc1_.idlePop / _loc1_.currPop); + this.ui_house.work_mc.width = 403 - this.ui_house.idle_mc.width; + this.ui_house.work_mc.x = this.ui_house.idle_mc.x + this.ui_house.idle_mc.width; + this.ui_house.idlePop_mc.x = this.ui_house.idle_mc.x + this.ui_house.idle_mc.width / 2 - this.ui_house.idlePop_mc.width / 2; + this.ui_house.workPop_mc.x = this.ui_house.work_mc.x + this.ui_house.work_mc.width / 2 - this.ui_house.workPop_mc.width / 2; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronBuild.as b/flash_decompiled/com/view/ui/iron/IronBuild.as new file mode 100644 index 0000000..c2e1816 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronBuild.as @@ -0,0 +1,62 @@ +package com.view.ui.iron +{ + import com.comfig.CommonData; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class IronBuild extends BaseBuild + { + + public function IronBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/IronFactory1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/IronFactory3.swf"; + buildData.picUrl = "pic/build/IronFactory3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/IronFactory2.swf"; + buildData.picUrl = "pic/build/IronFactory2.png"; + } + else + { + buildData.swfUrl = "pic/build/IronFactory1.swf"; + buildData.picUrl = "pic/build/IronFactory1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = IronUI.getInstance(); + } + else + { + buildUI.loadUiData(); + } + IronUI.getInstance().open(this); + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronItem1.as b/flash_decompiled/com/view/ui/iron/IronItem1.as new file mode 100644 index 0000000..3116a81 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronItem1.as @@ -0,0 +1,174 @@ +package com.view.ui.iron +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.newui.UIConfig; + import com.view.tip.ShopItemTip; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class IronItem1 extends Sprite + { + + private var type:int; + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemObject:Object; + + private var loadItemPng:LoadResource; + + private var itemsTip:ShopItemTip; + + private var itemNumsText:TextField; + + private var css:TextFormat; + + private var itemSprite:Sprite; + + private var itemImg:Bitmap; + + private var buyItemImg:BitmapData; + + public function IronItem1(param1:int) + { + super(); + this.type = param1; + var _loc2_:Bitmap = new Bitmap(this.face.getPng(UIConfig.bigItem_lock_skin)); + addChild(_loc2_); + _loc2_.width = 59; + _loc2_.height = 59; + this.itemNumsText = PublicMethod.getTextField(16777215,40); + this.itemNumsText.filters = [PublicGlow.getInstance().blackGlow]; + this.itemNumsText.x = 14; + this.itemNumsText.y = 36; + this.css = new TextFormat(); + this.css.align = "right"; + this.itemSprite = new Sprite(); + addChild(this.itemSprite); + this.itemSprite.x = 3; + this.itemSprite.y = 3; + this.addEvent(); + } + + public function setItemObject(param1:Object) : void + { + if(Boolean(this.itemObject) && Boolean(param1) && param1.id == this.itemObject.id) + { + return; + } + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + this.itemsTip = null; + } + if(param1 == null) + { + if(contains(this.itemNumsText)) + { + removeChild(this.itemNumsText); + } + this.itemObject = null; + if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg)) + { + this.itemSprite.removeChild(this.itemImg); + } + } + else + { + if(Boolean(this.itemObject) && param1.id == this.itemObject.id) + { + return; + } + this.itemObject = param1; + this.loadItemImg(); + } + } + + private function loadItemImg() : void + { + var _loc1_:String = "pic/equip/" + this.itemObject.iconPath; + if(ImgCache.getInstance().getImg(_loc1_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc1_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(_loc1_,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + if(this.itemObject == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemSprite.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + var _loc1_:Bitmap = new Bitmap(); + _loc1_.bitmapData = this.itemImg.bitmapData.clone(); + this.buyItemImg = this.itemImg.bitmapData.clone(); + this.itemsTip = new ShopItemTip(this.itemSprite,this.face.stage,this.face.tip_bg,this.itemObject.viewMap,_loc1_); + if(this.itemObject.itemCount > 1) + { + addChild(this.itemNumsText); + this.itemNumsText.text = this.itemObject.itemCount; + this.itemNumsText.setTextFormat(this.css); + } + else if(contains(this.itemNumsText)) + { + removeChild(this.itemNumsText); + } + } + + private function addEvent() : void + { + } + + private function mouseOut(param1:MouseEvent) : void + { + this.itemSprite.filters = null; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.itemSprite.filters = [PublicGlow.getInstance().qingGlow]; + } + + public function getItem() : Object + { + return this.itemObject; + } + + public function getType() : int + { + return this.type; + } + + public function getImg() : BitmapData + { + return this.buyItemImg; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronItem2.as b/flash_decompiled/com/view/ui/iron/IronItem2.as new file mode 100644 index 0000000..75670b9 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronItem2.as @@ -0,0 +1,151 @@ +package com.view.ui.iron +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class IronItem2 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var checkBox:UICheckBtn; + + private var itemName:TextField; + + private var bg:Sprite; + + private var selectBg:Sprite; + + private var selectStatus:Boolean; + + private var itemTip:ItemTip; + + private var itemObj:PackItem; + + public function IronItem2() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,191,24); + addChild(this.selectBg); + this.selectBg.alpha = 0; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,191,24); + addChild(this.bg); + var _loc1_:Sprite = PublicMethod.getTrLine(191); + addChild(_loc1_); + this.bg.alpha = 0; + this.itemName = PublicMethod.getTextField(16777215,120); + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 7; + this.checkBox.y = 2; + this.checkBox.visible = false; + addChild(this.itemName); + this.itemName.x = 30; + this.itemName.y = 3; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + } + + public function setClick(param1:Boolean) : void + { + this.selectStatus = param1; + if(this.selectStatus) + { + this.selectBg.alpha = 0.3; + this.checkBox.setSelect(); + } + else + { + this.selectBg.alpha = 0; + this.checkBox.setUnSelect(); + } + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.itemObj == null) + { + return; + } + if(this.selectStatus) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.itemObj == null) + { + return; + } + if(this.selectStatus) + { + return; + } + this.bg.alpha = 0.3; + } + + public function mouseClick() : void + { + if(this.itemObj == null) + { + return; + } + if(this.selectStatus) + { + this.selectStatus = false; + this.selectBg.alpha = 0; + this.checkBox.setUnSelect(); + } + else + { + this.selectStatus = true; + this.selectBg.alpha = 0.3; + this.checkBox.setSelect(); + } + this.bg.alpha = 0; + } + + public function setItemObj(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + this.checkBox.visible = false; + this.selectBg.alpha = 0; + this.bg.alpha = 0; + this.itemName.text = ""; + } + else + { + this.checkBox.setUnSelect(); + this.checkBox.visible = true; + this.itemName.htmlText = this.itemObj.viewMap.showName; + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronItem3.as b/flash_decompiled/com/view/ui/iron/IronItem3.as new file mode 100644 index 0000000..fd6887d --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronItem3.as @@ -0,0 +1,147 @@ +package com.view.ui.iron +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class IronItem3 extends Sprite + { + + private var itemTip:ItemTip; + + private var radioBtn:UIRadioBtn; + + private var bg:Sprite; + + private var itemName:TextField; + + private var itemNums:TextField; + + private var face:InstallFace = InstallFace.getInstance(); + + private var selectBg:Sprite; + + private var itemObj:PackItem; + + public function IronItem3() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,201,24); + addChild(this.selectBg); + this.selectBg.alpha = 0; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,201,24); + addChild(this.bg); + this.bg.alpha = 0; + var _loc1_:Sprite = PublicMethod.getTrLine(201); + addChild(_loc1_); + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 1; + this.radioBtn.y = 2; + this.radioBtn.visible = false; + addChild(this.itemName); + this.itemName.x = this.radioBtn.x + this.radioBtn.width + 3; + this.itemName.y = 4; + this.itemNums = PublicMethod.getTextFieldWithFillter(11583207,70); + addChild(this.itemNums); + this.itemNums.x = this.itemName.x + this.itemName.width; + this.itemNums.y = this.itemName.y; + 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 setItemObj(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + this.radioBtn.visible = false; + this.bg.alpha = 0; + this.selectBg.alpha = 0; + this.itemNums.text = ""; + this.itemName.text = ""; + } + else + { + this.radioBtn.setUnSelect(); + this.radioBtn.visible = true; + this.itemName.htmlText = this.itemObj.viewMap.showName; + if(this.itemObj.viewMap.upLevel) + { + this.itemNums.text = this.itemObj.viewMap.upLevel + "级强化"; + } + else + { + this.itemNums.text = ""; + } + if(this.itemTip == null) + { + this.itemTip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj.viewMap); + } + else + { + this.itemTip.setTipData(this.itemObj.viewMap); + } + } + } + + private function changeNumAndTip(param1:Object) : void + { + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function setClick(param1:Boolean) : void + { + if(param1) + { + this.bg.alpha = 0; + this.radioBtn.setSelect(); + this.selectBg.alpha = 0.3; + } + else + { + this.radioBtn.setUnSelect(); + this.selectBg.alpha = 0; + } + } + + public function getSelectStatus() : Boolean + { + return this.radioBtn.getSelect(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronItem4.as b/flash_decompiled/com/view/ui/iron/IronItem4.as new file mode 100644 index 0000000..be4f32e --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronItem4.as @@ -0,0 +1,131 @@ +package com.view.ui.iron +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class IronItem4 extends Sprite + { + + private var itemTip:ItemTip; + + private var radioBtn:UIRadioBtn; + + private var bg:Sprite; + + private var itemName:TextField; + + private var itemNums:TextField; + + private var face:InstallFace = InstallFace.getInstance(); + + private var selectBg:Sprite; + + private var itemObj:PackItem; + + public function IronItem4() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,201,24); + addChild(this.selectBg); + this.selectBg.alpha = 0; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,201,24); + addChild(this.bg); + this.bg.alpha = 0; + var _loc1_:Sprite = PublicMethod.getTrLine(201); + addChild(_loc1_); + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 2; + this.radioBtn.y = 3; + this.radioBtn.visible = false; + addChild(this.itemName); + this.itemName.x = this.radioBtn.x + this.radioBtn.width + 3; + this.itemName.y = 4; + this.itemNums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40); + addChild(this.itemNums); + this.itemNums.x = this.itemName.x + this.itemName.width; + this.itemNums.y = 3; + 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 setItemObj(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + this.radioBtn.visible = false; + this.bg.alpha = 0; + this.selectBg.alpha = 0; + this.itemNums.text = ""; + this.itemName.text = ""; + } + else + { + this.radioBtn.setUnSelect(); + this.radioBtn.visible = true; + this.itemName.htmlText = this.itemObj.viewMap.showName; + this.itemNums.text = this.itemObj.itemCount + ""; + if(this.itemTip == null) + { + this.itemTip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj.viewMap); + } + else + { + this.itemTip.setTipData(this.itemObj.viewMap); + } + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function setClick(param1:Boolean) : void + { + if(param1) + { + this.bg.alpha = 0; + this.radioBtn.setSelect(); + this.selectBg.alpha = 0.3; + } + else + { + this.radioBtn.setUnSelect(); + this.selectBg.alpha = 0; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronItem5.as b/flash_decompiled/com/view/ui/iron/IronItem5.as new file mode 100644 index 0000000..873f3d3 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronItem5.as @@ -0,0 +1,134 @@ +package com.view.ui.iron +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class IronItem5 extends Sprite + { + + private var itemTip:ItemTip; + + private var radioBtn:UIRadioBtn; + + private var bg:Sprite; + + private var itemName:TextField; + + private var itemNums:TextField; + + private var face:InstallFace = InstallFace.getInstance(); + + private var selectBg:Sprite; + + private var itemObj:PackItem; + + public function IronItem5() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,201,24); + addChild(this.selectBg); + this.selectBg.alpha = 0; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,201,24); + addChild(this.bg); + this.bg.alpha = 0; + var _loc1_:Sprite = PublicMethod.getTrLine(201); + addChild(_loc1_); + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,118); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 2; + this.radioBtn.y = 3; + this.radioBtn.visible = false; + addChild(this.itemName); + this.itemName.x = this.radioBtn.x + this.radioBtn.width + 3; + this.itemName.y = 4; + this.itemNums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + addChild(this.itemNums); + this.itemNums.x = this.itemName.x + this.itemName.width; + this.itemNums.y = this.itemName.y; + 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 setItemObj(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + this.radioBtn.visible = false; + this.bg.alpha = 0; + this.itemNums.text = ""; + this.itemName.text = ""; + } + else + { + this.radioBtn.setUnSelect(); + this.radioBtn.visible = true; + this.itemName.htmlText = this.itemObj.viewMap.showName; + this.itemNums.text = this.itemObj.viewMap.currHole; + if(this.itemTip == null) + { + this.itemTip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj.viewMap); + } + else + { + this.itemTip.setTipData(this.itemObj.viewMap); + } + } + } + + private function changeNumAndTip(param1:Object) : void + { + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function setClick(param1:Boolean) : void + { + if(param1) + { + this.bg.alpha = 0; + this.radioBtn.setSelect(); + this.selectBg.alpha = 0.3; + } + else + { + this.radioBtn.setUnSelect(); + this.selectBg.alpha = 0; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronItem7.as b/flash_decompiled/com/view/ui/iron/IronItem7.as new file mode 100644 index 0000000..b123b61 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronItem7.as @@ -0,0 +1,142 @@ +package com.view.ui.iron +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class IronItem7 extends Sprite + { + + private var radioBtn:UICheckBtn; + + private var bg:Sprite; + + private var itemName:TextField; + + private var itemNums:TextField; + + private var face:InstallFace = InstallFace.getInstance(); + + private var selectBg:Sprite; + + private var itemObj:PackItem; + + private var select:Boolean; + + public function IronItem7() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,213,24); + addChild(this.selectBg); + this.selectBg.alpha = 0; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,213,24); + addChild(this.bg); + this.bg.alpha = 0; + var _loc1_:Sprite = PublicMethod.getTrLine(213); + addChild(_loc1_); + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.radioBtn = new UICheckBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 1; + this.radioBtn.y = 2; + this.radioBtn.visible = false; + addChild(this.itemName); + this.itemName.x = this.radioBtn.x + this.radioBtn.width + 3; + this.itemName.y = 4; + this.itemNums = PublicMethod.getTextFieldWithFillter(11583207,70); + addChild(this.itemNums); + this.itemNums.x = this.itemName.x + this.itemName.width; + this.itemNums.y = this.itemName.y; + 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 setItemObj(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + this.radioBtn.visible = false; + this.bg.alpha = 0; + this.selectBg.alpha = 0; + this.itemNums.text = ""; + this.itemName.text = ""; + } + else + { + this.radioBtn.setUnSelect(); + this.radioBtn.visible = true; + this.itemName.htmlText = this.itemObj.viewMap.showName; + if(this.itemObj.viewMap.upLevel) + { + this.itemNums.text = this.itemObj.viewMap.upLevel + "级强化"; + } + else + { + this.itemNums.text = ""; + } + } + } + + private function changeNumAndTip(param1:Object) : void + { + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function setClick() : void + { + if(this.select == false) + { + this.select = true; + this.bg.alpha = 0; + this.radioBtn.setSelect(); + this.selectBg.alpha = 0.3; + } + else + { + this.select = false; + this.radioBtn.setUnSelect(); + this.selectBg.alpha = 0; + } + } + + public function setUnSelect() : void + { + this.select = true; + this.setClick(); + } + + public function getSelectStatus() : Boolean + { + return this.select; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronPage.as b/flash_decompiled/com/view/ui/iron/IronPage.as new file mode 100644 index 0000000..278f8c7 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronPage.as @@ -0,0 +1,39 @@ +package com.view.ui.iron +{ + import com.InstallFace; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class IronPage extends Sprite + { + + private var iron:IronUI = IronUI.getInstance(); + + public var ironMc:MovieClip; + + public var face:InstallFace = InstallFace.getInstance(); + + public function IronPage(param1:String = "") + { + super(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + if(param1 == null || param1 == "") + { + return; + } + this.ironMc = this.iron.getMovieClip(param1); + addChild(this.ironMc); + } + + public function addEvent(param1:Event) : void + { + } + + public function delEvent(param1:Event) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronPage_1.as b/flash_decompiled/com/view/ui/iron/IronPage_1.as new file mode 100644 index 0000000..86a99ef --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronPage_1.as @@ -0,0 +1,279 @@ +package com.view.ui.iron +{ + import com.control.ConnectService; + import com.control.iron.event.IronEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class IronPage_1 extends IronPage + { + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var shopList:Vector.; + + private var shopScrollPane:ScrollPane; + + private var shopMc:Sprite; + + private var sellAndBuyUI:ItemSellUI; + + public function IronPage_1() + { + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:IronItem1 = null; + var _loc8_:IronItem1 = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(299,266); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(359,266); + addChild(_loc2_); + _loc2_.x = _loc1_.x + _loc1_.width + 3; + var _loc3_:UITitleBg = new UITitleBg("购买装备",_loc1_.width); + _loc1_.addChild(_loc3_); + _loc3_.x = int(_loc1_.width / 2 - _loc3_.width / 2); + var _loc4_:UITitleBg = new UITitleBg("出售装备",_loc2_.width); + _loc2_.addChild(_loc4_); + _loc4_.x = int(_loc2_.width / 2 - _loc4_.width / 2); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(365,248); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc2_.addChild(this.packScrollPane); + this.packScrollPane.x = 4; + this.packScrollPane.y = 26; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + _loc5_ = 0; + while(_loc5_ < 24) + { + _loc7_ = new IronItem1(2); + this.packList.push(_loc7_); + this.packMc.addChild(_loc7_); + _loc7_.x = _loc7_.width * (_loc5_ % 6); + _loc7_.y = _loc7_.height * int(_loc5_ / 6); + _loc7_.addEventListener(MouseEvent.CLICK,this.sellAndBuyItems,false,0,true); + _loc5_++; + } + this.packScrollPane.update(); + this.shopScrollPane = new ScrollPane(); + this.shopScrollPane.setSize(304,248); + this.shopScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc1_.addChild(this.shopScrollPane); + this.shopScrollPane.x = 4; + this.shopScrollPane.y = 26; + this.shopMc = new Sprite(); + this.shopScrollPane.source = this.shopMc; + this.shopList = new Vector.(); + _loc6_ = 0; + while(_loc6_ < 20) + { + _loc8_ = new IronItem1(1); + this.shopList.push(_loc8_); + this.shopMc.addChild(_loc8_); + _loc8_.x = _loc8_.width * (_loc6_ % 5); + _loc8_.y = _loc8_.height * int(_loc6_ / 5); + _loc8_.addEventListener(MouseEvent.CLICK,this.sellAndBuyItems,false,0,true); + _loc6_++; + } + this.shopScrollPane.update(); + ConnectService.getInstance().ironService.getItemCanBuyList(); + Utils.g_events.addEventListener(IronEvent.PAGE1_CANBUYLIST,this.getCanBuyItemResult); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.getCanSellItemResult); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + ConnectService.getInstance().addEventListener(IronEvent.PAGE1_BUYITEM,this.buyItemResult); + ConnectService.getInstance().addEventListener(IronEvent.PAGE1_SELLITEM,this.sellItemResult); + if(this.shopList) + { + this.getCanSellItemResult(null); + } + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE1_BUYITEM,this.buyItemResult); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE1_SELLITEM,this.sellItemResult); + this.delBuyItemUI(); + } + + private function clearBuyList() : void + { + var _loc1_:int = int(this.shopList.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ > 19) + { + this.shopList.splice(_loc2_,1); + } + else + { + this.shopList[_loc2_].setItemObject(null); + } + _loc2_--; + } + } + + private function clearSellList() : void + { + var _loc1_:int = int(this.packList.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ > 23) + { + this.packMc.removeChild(this.packList[_loc2_]); + this.packList.splice(_loc2_,1); + } + else + { + this.packList[_loc2_].setItemObject(null); + } + _loc2_--; + } + } + + private function getCanBuyItemResult(param1:IronEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:IronItem1 = null; + this.clearBuyList(); + var _loc2_:Array = PakState.getIronSellList(); + if(_loc2_ == null || _loc2_.length == 0) + { + return; + } + for(_loc3_ in _loc2_) + { + if(_loc3_ < 20) + { + this.shopList[_loc3_].setItemObject(_loc2_[_loc3_]); + } + else + { + _loc4_ = new IronItem1(1); + this.shopList.push(_loc4_); + _loc4_.setItemObject(_loc2_[_loc3_]); + this.shopMc.addChild(_loc4_); + _loc4_.x = _loc4_.width * (_loc3_ % 5); + _loc4_.y = _loc4_.height * int(_loc3_ / 5); + _loc4_.addEventListener(MouseEvent.CLICK,this.sellAndBuyItems,false,0,true); + } + } + this.shopScrollPane.verticalScrollPosition = 0; + this.shopScrollPane.update(); + } + + private function getCanSellItemResult(param1:DevEvent) : void + { + var _loc4_:* = undefined; + var _loc5_:IronItem1 = null; + this.clearSellList(); + var _loc2_:Vector. = PakState.getEquipCanSellList(); + if(_loc2_ == null || _loc2_.length == 0) + { + return; + } + var _loc3_:* = int(_loc2_.length - 1); + while(_loc3_ >= 0) + { + if(_loc2_[_loc3_].viewMap.currHole > 0) + { + _loc2_.splice(_loc3_,1); + } + _loc3_--; + } + for(_loc4_ in _loc2_) + { + if(_loc4_ < 24) + { + this.packList[_loc4_].setItemObject(this.getItemObj(_loc2_[_loc4_])); + } + else + { + _loc5_ = new IronItem1(2); + this.packList.push(_loc5_); + _loc5_.setItemObject(this.getItemObj(_loc2_[_loc4_])); + this.packMc.addChild(_loc5_); + _loc5_.x = _loc5_.width * (_loc4_ % 6); + _loc5_.y = _loc5_.height * int(_loc4_ / 6); + _loc5_.addEventListener(MouseEvent.CLICK,this.sellAndBuyItems,false,0,true); + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + } + + private function getItemObj(param1:PackItem) : Object + { + var _loc2_:Object = new Object(); + _loc2_.id = param1.id; + _loc2_.iconPath = param1.viewMap.iconPath; + _loc2_.viewMap = param1.viewMap; + _loc2_.itemCount = param1.itemCount; + _loc2_.sellPrice = param1.sellPrice; + _loc2_.itemName = param1.viewMap.showName; + return _loc2_; + } + + private function sellAndBuyItems(param1:MouseEvent) : void + { + if(this.sellAndBuyUI == null) + { + this.sellAndBuyUI = new ItemSellUI(); + } + var _loc2_:IronItem1 = param1.currentTarget as IronItem1; + if(_loc2_.getItem() == null) + { + return; + } + if(!contains(this.sellAndBuyUI)) + { + addChild(this.sellAndBuyUI); + this.sellAndBuyUI.x = int(width / 2 - this.sellAndBuyUI.width / 2); + this.sellAndBuyUI.y = -20; + } + this.sellAndBuyUI.setItemData(_loc2_.getItem(),_loc2_.getType(),_loc2_.getImg()); + } + + private function delBuyItemUI() : void + { + if(Boolean(this.sellAndBuyUI) && contains(this.sellAndBuyUI)) + { + removeChild(this.sellAndBuyUI); + } + } + + private function buyItemResult(param1:IronEvent) : void + { + this.getCanSellItemResult(null); + } + + private function sellItemResult(param1:IronEvent) : void + { + this.getCanSellItemResult(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronPage_2.as b/flash_decompiled/com/view/ui/iron/IronPage_2.as new file mode 100644 index 0000000..19856ee --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronPage_2.as @@ -0,0 +1,407 @@ +package com.view.ui.iron +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.iron.event.IronEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class IronPage_2 extends IronPage + { + + private static const color_all:int = 99; + + private static const color_1:int = 1; + + private static const color_2:int = 2; + + private static const color_3:int = 3; + + private static const color_4:int = 4; + + private static const color_5:int = 5; + + private var allCheckBox:UICheckBtn; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var combox:ComboBox; + + private var destoryBtn:UIButton; + + private var money_txt:TextField; + + private var info_txt:TextField; + + private var item1Nums:TextField; + + private var item2Nums:TextField; + + private var item3Nums:TextField; + + private var item4Nums:TextField; + + private var item5Nums:TextField; + + private var destoryItemList:Array; + + private var currColor:int = 99; + + public function IronPage_2() + { + var _loc8_:TextField = null; + var _loc12_:IronItem2 = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(189,266); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(469,266); + addChild(_loc2_); + _loc2_.x = _loc1_.x + _loc1_.width + 3; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc3_.text = "品质选择"; + _loc1_.addChild(_loc3_); + _loc3_.x = 10; + _loc3_.y = 9; + var _loc4_:TextFormat = new TextFormat(); + _loc4_.align = "center"; + _loc4_.size = 12; + _loc4_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部", + "data":color_all + }); + this.combox.addItem({ + "label":"白色品质", + "data":color_1 + }); + this.combox.addItem({ + "label":"绿色品质", + "data":color_2 + }); + this.combox.addItem({ + "label":"蓝色品质", + "data":color_3 + }); + this.combox.addItem({ + "label":"紫色品质", + "data":color_4 + }); + this.combox.addItem({ + "label":"橙色品质", + "data":color_5 + }); + _loc1_.addChild(this.combox); + this.combox.textField.setStyle("textFormat",_loc4_); + this.combox.dropdown.setRendererStyle("textFormat",_loc4_); + this.combox.x = _loc3_.x + 55; + this.combox.y = _loc3_.y - 3; + this.combox.addEventListener(Event.CHANGE,this.selectColor); + var _loc5_:UITitleBg = new UITitleBg("分解信息",_loc2_.width); + _loc2_.addChild(_loc5_); + _loc5_.x = int(_loc2_.width / 2 - _loc5_.width / 2); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(193,217); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc1_.addChild(this.packScrollPane); + this.packScrollPane.x = 4; + this.packScrollPane.y = 32; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 9) + { + _loc12_ = new IronItem2(); + this.packMc.addChild(_loc12_); + this.packList.push(_loc12_); + _loc12_.y = 24 * _loc6_; + _loc12_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc6_++; + } + this.packScrollPane.update(); + var _loc7_:Sprite = PublicMethod.getTrLine(192); + _loc1_.addChild(_loc7_); + _loc7_.x = 5; + _loc7_.y = 248; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc8_.text = "全选"; + _loc1_.addChild(_loc8_); + _loc8_.x = 20; + _loc8_.y = _loc7_.y + 5; + this.allCheckBox = new UICheckBtn(); + _loc1_.addChild(this.allCheckBox); + this.allCheckBox.x = _loc8_.x + 38; + this.allCheckBox.y = _loc8_.y; + this.allCheckBox.onClick = this.selectAll; + this.destoryBtn = new UIButton("分 解",2); + _loc2_.addChild(this.destoryBtn); + this.destoryBtn.x = 16; + this.destoryBtn.y = 200; + this.destoryBtn.setUnEnable(); + this.destoryBtn.onClick = this.destoryItem; + var _loc9_:Sprite = PublicMethod.getTrLine(462); + _loc2_.addChild(_loc9_); + _loc9_.x = 4; + _loc9_.y = this.destoryBtn.y + 30; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc10_.x = 15; + _loc10_.y = _loc9_.y + 15; + this.item1Nums = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,92); + this.item2Nums = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,92); + this.item3Nums = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,92); + this.item4Nums = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,92); + this.item5Nums = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,92); + _loc2_.addChild(this.item1Nums); + this.item1Nums.x = 5; + this.item1Nums.y = _loc10_.y; + _loc2_.addChild(this.item2Nums); + this.item2Nums.x = this.item1Nums.x + this.item1Nums.width; + this.item2Nums.y = _loc10_.y; + _loc2_.addChild(this.item3Nums); + this.item3Nums.x = this.item2Nums.x + this.item2Nums.width; + this.item3Nums.y = _loc10_.y; + _loc2_.addChild(this.item4Nums); + this.item4Nums.x = this.item3Nums.x + this.item3Nums.width; + this.item4Nums.y = _loc10_.y; + _loc2_.addChild(this.item5Nums); + this.item5Nums.x = this.item4Nums.x + this.item4Nums.width; + this.item5Nums.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc11_.text = "消耗铜币:"; + _loc2_.addChild(_loc11_); + _loc11_.x = this.destoryBtn.x + 80; + _loc11_.y = this.destoryBtn.y + 5; + this.money_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.money_txt.text = "0"; + _loc2_.addChild(this.money_txt); + this.money_txt.x = _loc11_.x + 75; + this.money_txt.y = _loc11_.y; + this.info_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,380); + this.info_txt.height = 150; + _loc2_.addChild(this.info_txt); + this.info_txt.x = 25; + this.info_txt.y = 35; + this.info_txt.wordWrap = true; + this.info_txt.multiline = true; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + } + + private function selectAll(param1:MouseEvent) : void + { + var _loc2_:IronItem2 = null; + if(this.allCheckBox.getSelect()) + { + this.allCheckBox.setSelect(); + } + else + { + this.allCheckBox.setUnSelect(); + } + for each(_loc2_ in this.packList) + { + if(_loc2_.getItemObj()) + { + _loc2_.setClick(this.allCheckBox.getSelect()); + } + } + this.getCountMoney(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:IronItem2 = param1.currentTarget as IronItem2; + if(_loc2_.getItemObj() != null) + { + _loc2_.mouseClick(); + } + this.getCountMoney(); + } + + private function getCountMoney() : void + { + var _loc1_:int = 0; + var _loc2_:IronItem2 = null; + var _loc3_:int = 0; + for each(_loc2_ in this.packList) + { + if(Boolean(_loc2_.getItemObj()) && _loc2_.getSelectStatus()) + { + _loc3_ = _loc2_.getItemObj().needMoney; + _loc1_ += _loc3_; + } + } + this.money_txt.text = _loc1_.toString(); + if(_loc1_ > 0) + { + this.destoryBtn.setEnable(); + } + else + { + this.destoryBtn.setUnEnable(); + } + } + + private function selectColor(param1:Event) : void + { + this.allCheckBox.setUnSelect(); + this.destoryBtn.setUnEnable(); + this.currColor = this.combox.selectedItem.data; + this.getCanDestroyTresuryView(null); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + ConnectService.getInstance().addEventListener(IronEvent.PAGE2_ITEM_FENJIE,this.getFenjieTresuryView); + this.allCheckBox.setUnSelect(); + this.getMarrowTresuryView(null); + this.getCanDestroyTresuryView(null); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE2_ITEM_FENJIE,this.getFenjieTresuryView); + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 8) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + } + + private function itemChange(param1:DevEvent) : void + { + this.getMarrowTresuryView(null); + this.getCanDestroyTresuryView(null); + } + + private function getMarrowTresuryView(param1:DevEvent) : void + { + var _loc2_:int = PakState.getItemsByEntId(10380101); + var _loc3_:int = PakState.getItemsByEntId(10380102); + var _loc4_:int = PakState.getItemsByEntId(10380103); + var _loc5_:int = PakState.getItemsByEntId(10380104); + var _loc6_:int = PakState.getItemsByEntId(10380105); + this.item1Nums.htmlText = "白色精华:" + _loc2_ + ""; + this.item2Nums.htmlText = "绿色精华:" + _loc3_ + ""; + this.item3Nums.htmlText = "蓝色精华:" + _loc4_ + ""; + this.item4Nums.htmlText = "紫色精华:" + _loc5_ + ""; + this.item5Nums.htmlText = "金色精华:" + _loc6_ + ""; + } + + private function getCanDestroyTresuryView(param1:IronEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:IronItem2 = null; + this.clearItemList(); + var _loc2_:Vector. = PakState.getEquipCanFenjieList(this.currColor); + if(_loc2_ == null || _loc2_.length == 0) + { + return; + } + for(_loc3_ in _loc2_) + { + if(_loc3_ > 8) + { + _loc4_ = new IronItem2(); + this.packMc.addChild(_loc4_); + this.packList.push(_loc4_); + _loc4_.y = 24 * _loc3_; + _loc4_.setItemObj(_loc2_[_loc3_]); + _loc4_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc3_].setItemObj(_loc2_[_loc3_]); + this.packList[_loc3_].setClick(false); + } + } + this.packScrollPane.update(); + } + + private function destoryItem(param1:MouseEvent) : void + { + var _loc2_:IronItem2 = null; + this.destoryItemList = new Array(); + for each(_loc2_ in this.packList) + { + if(Boolean(_loc2_.getItemObj()) && _loc2_.getSelectStatus()) + { + this.destoryItemList.push(_loc2_.getItemObj()); + } + } + if(this.destoryItemList.length > 0) + { + this.info_txt.text = ""; + this.destoryItemToserver(); + } + else + { + MessageBoxUI.getInstance().addMessage("请选择要分解的装备"); + } + } + + private function destoryItemToserver() : void + { + var _loc3_:Object = null; + var _loc1_:Object = new Object(); + var _loc2_:Array = new Array(); + for each(_loc3_ in this.destoryItemList) + { + _loc2_.push(_loc3_.id); + } + if(_loc2_.length > 0) + { + _loc1_.itemList = _loc2_; + ConnectService.getInstance().ironService.fenJie(_loc1_); + } + } + + private function getFenjieTresuryView(param1:IronEvent) : void + { + var _loc2_:String = param1.itemObj.resWord; + this.info_txt.htmlText = _loc2_; + this.currColor = this.combox.selectedItem.data; + this.allCheckBox.setUnSelect(); + this.itemChange(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronPage_3.as b/flash_decompiled/com/view/ui/iron/IronPage_3.as new file mode 100644 index 0000000..f4a75d7 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronPage_3.as @@ -0,0 +1,744 @@ +package com.view.ui.iron +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.iron.event.IronEvent; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.cache.ImgCache; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.tip.ItemTip; + import com.view.ui.iron.mc.GemItemMc; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.tools.ToolView; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 IronPage_3 extends IronPage + { + + private var tft:TextFormat; + + private var itemImgSp:Sprite; + + private var name_txt:TextField; + + private var attack_txt:TextField; + + private var thew_txt:TextField; + + private var defence_txt:TextField; + + private var agility_txt:TextField; + + private var _txt4:TextField; + + private var _txt5:TextField; + + private var txt1:TextField; + + private var txt11:TextField; + + private var txt2:TextField; + + private var txt22:TextField; + + private var txt3:TextField; + + private var succ_txt:TextField; + + private var exchangeNums:ComboBox; + + private var buyItemBtn1:Sprite; + + private var buyItemBtn2:Sprite; + + private var qianghuaBtn:UIButton; + + private var heroCombox:ComboBox; + + private var typeCombox:ComboBox; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var selectItemGem:GemItemMc; + + private var currChildType:int = 99; + + private var itemTip:ItemTip; + + private var currSelectItem:PackItem; + + private var currItem:IronItem3; + + private var itemImg:Bitmap; + + private var loader:LoadResource; + + public function IronPage_3() + { + var _loc6_:TextField = null; + var _loc12_:TextField = null; + var _loc18_:IronItem3 = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(199,266); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(215,160); + addChild(_loc2_); + _loc2_.x = _loc1_.x + _loc1_.width + 3; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(231,160); + addChild(_loc3_); + _loc3_.x = _loc2_.x + _loc2_.width + 3; + var _loc4_:UIWindowBg = new UIWindowBg(); + _loc4_.initThirdPanel(459,93); + addChild(_loc4_); + _loc4_.x = _loc2_.x; + _loc4_.y = _loc2_.y + _loc2_.height + 3; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc5_.text = "武将"; + _loc1_.addChild(_loc5_); + _loc5_.x = 5; + _loc5_.y = 9; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.heroCombox = new ComboBox(); + this.heroCombox.addItem({ + "label":"全部", + "data":-1 + }); + _loc1_.addChild(this.heroCombox); + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.heroCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.heroCombox.x = _loc5_.x + 30; + this.heroCombox.y = _loc5_.y - 3; + this.heroCombox.addEventListener(Event.CHANGE,this.changeHero,false,0,true); + this.heroCombox.width = 70; + this.heroCombox.selectedItem = this.heroCombox.getItemAt(0); + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc6_.text = "类型"; + _loc1_.addChild(_loc6_); + _loc6_.x = 110; + _loc6_.y = 9; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部", + "data":IronPage_5.type_all + }); + this.typeCombox.addItem({ + "label":"头盔", + "data":IronPage_5.type_1 + }); + this.typeCombox.addItem({ + "label":"铠甲", + "data":IronPage_5.type_2 + }); + this.typeCombox.addItem({ + "label":"武器", + "data":IronPage_5.type_3 + }); + this.typeCombox.addItem({ + "label":"护腿", + "data":IronPage_5.type_4 + }); + this.typeCombox.addItem({ + "label":"饰品", + "data":IronPage_5.type_5 + }); + this.typeCombox.addItem({ + "label":"挂饰", + "data":IronPage_5.type_6 + }); + this.typeCombox.addItem({ + "label":"串珠", + "data":IronPage_5.type_7 + }); + this.typeCombox.addItem({ + "label":"护心镜", + "data":IronPage_5.type_8 + }); + this.typeCombox.width = 60; + _loc1_.addChild(this.typeCombox); + this.typeCombox.textField.setStyle("textFormat",this.tft); + this.typeCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.typeCombox.x = _loc6_.x + 30; + this.typeCombox.y = _loc6_.y - 3; + this.typeCombox.addEventListener(Event.CHANGE,this.changeType,false,0,true); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(203,242); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc1_.addChild(this.packScrollPane); + this.packScrollPane.x = 4; + this.packScrollPane.y = 32; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc7_:int = 0; + while(_loc7_ < 10) + { + _loc18_ = new IronItem3(); + this.packMc.addChild(_loc18_); + this.packList.push(_loc18_); + _loc18_.y = 24 * _loc7_; + _loc18_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc7_++; + } + this.packScrollPane.update(); + var _loc8_:TextFormat = PublicMethod.getCenterTextFormat(); + var _loc9_:UITitleBg = new UITitleBg("所选装备",_loc2_.width); + _loc2_.addChild(_loc9_); + _loc9_.x = int(_loc2_.width / 2 - _loc9_.width / 2); + this.itemImgSp = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + _loc2_.addChild(this.itemImgSp); + this.itemImgSp.x = 15; + this.itemImgSp.y = 35; + this.name_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,86); + _loc2_.addChild(this.name_txt); + this.name_txt.defaultTextFormat = _loc8_; + this.name_txt.x = 3; + this.name_txt.y = this.itemImgSp.y + this.itemImgSp.height + 5; + this.name_txt.text = "道具名称"; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + _loc6_.text = "攻击:"; + _loc2_.addChild(_loc6_); + _loc6_.x = 92; + _loc6_.y = this.itemImgSp.y; + this.attack_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc2_.addChild(this.attack_txt); + this.attack_txt.x = _loc6_.x + 38; + this.attack_txt.y = _loc6_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + _loc10_.text = "体力:"; + _loc2_.addChild(_loc10_); + _loc10_.x = _loc6_.x; + _loc10_.y = _loc6_.y + 30; + this.thew_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc2_.addChild(this.thew_txt); + this.thew_txt.x = this.attack_txt.x; + this.thew_txt.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + _loc11_.text = "防御:"; + _loc2_.addChild(_loc11_); + _loc11_.x = _loc6_.x; + _loc11_.y = _loc10_.y + 30; + this.defence_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc2_.addChild(this.defence_txt); + this.defence_txt.x = this.attack_txt.x; + this.defence_txt.y = _loc11_.y; + _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + _loc12_.text = "敏捷:"; + _loc2_.addChild(_loc12_); + _loc12_.x = _loc6_.x; + _loc12_.y = _loc11_.y + 30; + this.agility_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc2_.addChild(this.agility_txt); + this.agility_txt.x = this.attack_txt.x; + this.agility_txt.y = _loc12_.y; + var _loc13_:UITitleBg = new UITitleBg("强化详情",_loc3_.width); + _loc3_.addChild(_loc13_); + _loc13_.x = int(_loc3_.width / 2 - _loc13_.width / 2); + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc14_.text = "强化等级:"; + _loc3_.addChild(_loc14_); + _loc14_.x = 15; + _loc14_.y = 35; + this._txt4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc3_.addChild(this._txt4); + this._txt4.x = _loc14_.x + 64; + this._txt4.y = _loc14_.y; + this._txt5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc3_.addChild(this._txt5); + this._txt5.x = _loc14_.x; + this._txt5.y = _loc14_.y + 20; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc15_.text = "强化需求"; + _loc3_.addChild(_loc15_); + _loc15_.x = 90; + _loc15_.y = this._txt5.y + 30; + this.txt1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc3_.addChild(this.txt1); + this.txt1.x = _loc14_.x; + this.txt1.y = _loc15_.y + 20; + this.txt11 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc3_.addChild(this.txt11); + this.txt11.x = this.txt1.x + 100; + this.txt11.y = this.txt1.y; + this.txt2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc3_.addChild(this.txt2); + this.txt2.x = _loc14_.x; + this.txt2.y = this.txt1.y + 20; + this.txt22 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc3_.addChild(this.txt22); + this.txt22.x = this.txt2.x + 100; + this.txt22.y = this.txt2.y; + this.txt3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc3_.addChild(this.txt3); + this.txt3.x = this.txt1.x; + this.txt3.y = this.txt2.y + 20; + var _loc16_:UITitleBg = new UITitleBg("强化信息",_loc4_.width); + _loc4_.addChild(_loc16_); + _loc16_.x = int(_loc4_.width / 2 - _loc16_.width / 2); + this.succ_txt = PublicMethod.getTextFieldWithFillter(UIConfig.succColor,300); + _loc4_.addChild(this.succ_txt); + this.succ_txt.x = 20; + this.succ_txt.y = 35; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc17_.text = "强化次数:"; + _loc4_.addChild(_loc17_); + _loc17_.x = 120; + _loc17_.y = 75; + this.exchangeNums = new ComboBox(); + this.exchangeNums.addItem({ + "label":"1次", + "data":1 + }); + this.exchangeNums.addItem({ + "label":"10次", + "data":10 + }); + this.exchangeNums.addItem({ + "label":"20次", + "data":20 + }); + this.exchangeNums.addItem({ + "label":"50次", + "data":50 + }); + this.exchangeNums.addItem({ + "label":"100次", + "data":100 + }); + this.exchangeNums.addItem({ + "label":"300次", + "data":300 + }); + this.exchangeNums.addItem({ + "label":"500次", + "data":500 + }); + this.exchangeNums.addItem({ + "label":"600次", + "data":600 + }); + this.exchangeNums.width = 60; + _loc4_.addChild(this.exchangeNums); + this.exchangeNums.textField.setStyle("textFormat",this.tft); + this.exchangeNums.dropdown.setRendererStyle("textFormat",this.tft); + this.exchangeNums.x = _loc17_.x + 70; + this.exchangeNums.y = _loc17_.y - 2; + this.qianghuaBtn = new UIButton("强 化",2,10); + _loc4_.addChild(this.qianghuaBtn); + this.qianghuaBtn.x = this.exchangeNums.x + 80; + this.qianghuaBtn.y = _loc17_.y - 3; + this.qianghuaBtn.onClick = this.qianghuaItem; + this.buyItemBtn1 = face.getSprite(ClassConfig.ui_btn_add); + _loc3_.addChild(this.buyItemBtn1); + this.buyItemBtn1.x = 216; + this.buyItemBtn1.y = 107; + this.buyItemBtn2 = face.getSprite(ClassConfig.ui_btn_add); + _loc3_.addChild(this.buyItemBtn2); + this.buyItemBtn2.x = 216; + this.buyItemBtn2.y = 131; + this.buyItemBtn1.addEventListener(MouseEvent.CLICK,this.shop1); + this.buyItemBtn2.addEventListener(MouseEvent.CLICK,this.shop2); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.getHeroItemListResult); + } + + private function clearHeroList() : void + { + var _loc2_:Object = null; + var _loc1_:* = int(this.heroCombox.length - 1); + while(_loc1_ >= 0) + { + _loc2_ = this.heroCombox.getItemAt(_loc1_); + if(_loc2_.data > 0) + { + this.heroCombox.removeItemAt(_loc1_); + } + _loc1_--; + } + } + + private function getHeroListRes(param1:DevEvent) : void + { + var _loc3_:NewHero = null; + var _loc2_:Vector. = NewHeroData.getAllHeroList(); + if(_loc2_.length == 0) + { + return; + } + this.clearHeroList(); + for each(_loc3_ in _loc2_) + { + this.heroCombox.addItem({ + "label":_loc3_.name, + "data":_loc3_.heroId + }); + } + this.heroCombox.selectedItem = this.heroCombox.getItemAt(0); + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.heroCombox.dropdown.setRendererStyle("textFormat",this.tft); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + ConnectService.getInstance().addEventListener(IronEvent.PAGE_QIANGHUA_VIEW,this.getQiangHuaViewResult); + ConnectService.getInstance().addEventListener(IronEvent.PAGE_QIANGHUA,this.getQiangHuaResult); + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListRes); + this.getHeroListRes(null); + this.getHeroItemListResult(null); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE_QIANGHUA_VIEW,this.getQiangHuaViewResult); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE_QIANGHUA,this.getQiangHuaResult); + Utils.g_events.removeEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListRes); + this.clearHeroList(); + this.clearItemList(); + this.currSelectItem = null; + this.setQianghuaView(null); + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + } + + private function changeHero(param1:Event) : void + { + this.getHeroItemListResult(null); + } + + private function changeType(param1:Event) : void + { + this.currChildType = this.typeCombox.selectedItem.data; + this.currItem = null; + this.getHeroItemListResult(null); + } + + private function getHeroItemListResult(param1:DevEvent) : void + { + var _loc5_:NewHero = null; + var _loc6_:PackItem = null; + var _loc7_:* = undefined; + var _loc8_:IronItem3 = null; + if(PakState.getGetPackListStatus()) + { + PakState.getEquipListByChildType(this.currChildType); + return; + } + this.clearItemList(); + var _loc2_:int = int(this.heroCombox.selectedItem.data); + var _loc3_:Vector. = PakState.getEquipListByChildType(this.currChildType); + var _loc4_:Vector. = new Vector.(); + if(_loc2_ > 0) + { + _loc5_ = NewHeroData.getHeroByHeroId(_loc2_); + for each(_loc6_ in _loc3_) + { + if(_loc6_.id == _loc5_.equ1 || _loc6_.id == _loc5_.equ2 || _loc6_.id == _loc5_.equ3 || _loc6_.id == _loc5_.equ4 || _loc6_.id == _loc5_.equ5 || _loc6_.id == _loc5_.equ6 || _loc6_.id == _loc5_.equ7 || _loc6_.id == _loc5_.equ8) + { + _loc4_.push(_loc6_); + } + } + } + else + { + _loc4_ = _loc3_; + } + if(_loc4_ != null && _loc4_.length > 0) + { + for(_loc7_ in _loc4_) + { + if(_loc7_ > 9) + { + _loc8_ = new IronItem3(); + this.packMc.addChild(_loc8_); + this.packList.push(_loc8_); + _loc8_.y = 24 * _loc7_; + _loc8_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc8_.setItemObj(_loc4_[_loc7_]); + } + else + { + this.packList[_loc7_].setItemObj(_loc4_[_loc7_]); + } + } + } + if(this.currItem == null) + { + this.currItem = this.packList[0]; + } + this.currItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + } + + private function getQianghuaById(param1:int) : void + { + ConnectService.getInstance().ironService.getQiangHuaView(param1); + } + + private function getQiangHuaViewResult(param1:IronEvent) : void + { + var _loc2_:Object = param1.itemObj; + if(Boolean(this.currSelectItem) && _loc2_.id == this.currSelectItem.id) + { + this.setQianghuaView(_loc2_); + } + } + + public function setItem(param1:Object) : void + { + var _loc2_:* = undefined; + if(param1) + { + _loc2_ = "pic/equip/" + param1.iconPath; + this.loadImg(_loc2_); + if(this.itemTip) + { + this.itemTip.setTipData(param1); + } + else + { + this.itemTip = new ItemTip(this.itemImgSp,face.stage,face.tip_bg,param1); + } + } + else + { + if(Boolean(this.itemImg) && this.itemImgSp.contains(this.itemImg)) + { + this.itemImgSp.removeChild(this.itemImg); + } + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + } + } + + private function setQianghuaView(param1:Object) : void + { + if(param1 == null) + { + this._txt4.text = ""; + this._txt5.text = ""; + this.txt1.text = ""; + this.txt2.text = ""; + this.txt3.text = ""; + this.succ_txt.text = ""; + this.agility_txt.text = ""; + this.thew_txt.text = ""; + this.attack_txt.text = ""; + this.defence_txt.text = ""; + this.txt11.text = ""; + this.txt22.text = ""; + this.setItem(null); + this.name_txt.htmlText = ""; + } + else + { + this.setItem(this.currSelectItem.viewMap); + this.name_txt.htmlText = this.currSelectItem.viewMap.showName; + if(param1.isLevelUpMax == "false") + { + this._txt4.text = param1.nextLevel + "级强化"; + this._txt5.text = param1.nextLevlDesc; + this.txt1.text = param1.itemName + "*" + param1.itemNum; + this.txt2.text = param1.jingHuaName + "*" + param1.jingHuaNum; + this.txt11.htmlText = "当前:" + param1.haveItemNum + ""; + this.txt22.htmlText = "当前:" + param1.haveJingHuaNum + ""; + this.txt3.htmlText = "成功率:" + param1.winPercent + "%"; + } + else + { + this._txt4.text = ""; + this._txt5.text = ""; + this.txt1.text = ""; + this.txt11.text = ""; + this.txt22.text = ""; + this.txt2.text = "此装备已强化至顶级"; + this.txt3.text = ""; + } + if(this.currSelectItem.viewMap.propertyMap.HERO_AGILE) + { + this.agility_txt.text = this.currSelectItem.viewMap.propertyMap.HERO_AGILE; + } + else + { + this.agility_txt.text = "0"; + } + if(this.currSelectItem.viewMap.propertyMap.HERO_HP) + { + this.thew_txt.text = this.currSelectItem.viewMap.propertyMap.HERO_HP; + } + else + { + this.thew_txt.text = "0"; + } + if(this.currSelectItem.viewMap.propertyMap.HERO_ATTACK) + { + this.attack_txt.text = this.currSelectItem.viewMap.propertyMap.HERO_ATTACK; + } + else + { + this.attack_txt.text = "0"; + } + if(this.currSelectItem.viewMap.propertyMap.HERO_DEFENCE) + { + this.defence_txt.text = this.currSelectItem.viewMap.propertyMap.HERO_DEFENCE; + } + else + { + this.defence_txt.text = "0"; + } + } + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:IronItem3 = param1.currentTarget as IronItem3; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.currItem) + { + this.currItem.setClick(false); + } + this.currItem = _loc2_; + this.currItem.setClick(true); + this.currSelectItem = this.currItem.getItemObj(); + this.refreshCurrItem(); + } + + private function refreshCurrItem() : void + { + this.getQianghuaById(this.currSelectItem.id); + } + + private function qianghuaItem(param1:MouseEvent) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:NewHero = null; + if(this.currSelectItem != null) + { + _loc2_ = int(this.exchangeNums.selectedItem.data); + this.succ_txt.text = ""; + _loc3_ = 0; + if(this.currSelectItem.equip == 1) + { + _loc4_ = NewHeroData.getHeroByTid(this.currSelectItem.id); + if(_loc4_) + { + _loc3_ = _loc4_.heroId; + } + } + ConnectService.getInstance().ironService.qiangHua(this.currSelectItem.id,_loc2_,_loc3_); + } + } + + private function getQiangHuaResult(param1:IronEvent) : void + { + var _loc2_:String = param1.itemObj.resWord; + this.succ_txt.text = _loc2_; + this.getHeroItemListResult(null); + } + + private function shop1(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_NANHAI"); + _loc2_.onRefresh = this.refreshCurrItem; + _loc2_.show(); + } + + private function shop2(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_JINGHUA"); + _loc2_.onRefresh = this.refreshCurrItem; + _loc2_.show(); + } + + private function loadImg(param1:String) : void + { + if(Boolean(this.itemImg) && this.itemImgSp.contains(this.itemImg)) + { + this.itemImgSp.removeChild(this.itemImg); + } + var _loc2_:Bitmap = ImgCache.getInstance().getImg(param1); + if(_loc2_) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = _loc2_.bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loader = new LoadResource(param1,this.loadBack); + } + } + + private function loadBack(param1:Event) : void + { + this.itemImg = Bitmap(param1.target.loader.content); + ImgCache.getInstance().setImg(this.loader.url,this.itemImg); + this.loader.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemImg.width = 53; + this.itemImg.height = 53; + this.itemImgSp.addChild(this.itemImg); + this.itemImg.x = 3; + this.itemImg.y = 3; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronPage_4.as b/flash_decompiled/com/view/ui/iron/IronPage_4.as new file mode 100644 index 0000000..c6cb1ee --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronPage_4.as @@ -0,0 +1,441 @@ +package com.view.ui.iron +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.iron.event.IronEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.iron.mc.JewMc; + import com.view.ui.iron.mc.PiliangBijouUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class IronPage_4 extends IronPage + { + + public static const type_all:int = 4; + + public static const type_all1:int = 5; + + public static const type_all2:int = 3; + + public static const type_all3:int = 6; + + public static const type_1:int = 501; + + public static const type_2:int = 502; + + public static const type_3:int = 503; + + public static const type_4:int = 504; + + public static const type_5:int = 512; + + public static const type_6:int = 531; + + public static const type_7:int = 532; + + public static const type_8:int = 534; + + public static const type_9:int = 533; + + public static const type_10:int = 535; + + public static const type_11:int = 521; + + public static const type_12:int = 522; + + public static const type_13:int = 524; + + public static const type_14:int = 523; + + public static const type_21:int = 601; + + public static const type_22:int = 602; + + public static const type_23:int = 603; + + public static const type_24:int = 604; + + private var bg2:UIWindowBg; + + private var typeCombox:ComboBox; + + private var itemImgSp1:Sprite; + + private var itemImgSp2:Sprite; + + private var itemImgSp3:Sprite; + + private var itemImgSp4:Sprite; + + private var itemImgSp5:Sprite; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var currType:int = 4; + + private var jewVec:Vector.; + + private var bijiuObj:PackItem; + + private var composeBijouObj:Object; + + private var composeItem:JewMc; + + private var piliangUI:PiliangBijouUI; + + public function IronPage_4() + { + var _loc2_:TextField = null; + var _loc9_:IronItem4 = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(199,266); + addChild(_loc1_); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(459,266); + addChild(this.bg2); + this.bg2.x = _loc1_.x + _loc1_.width + 3; + _loc2_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc2_.text = "类型选择"; + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 9; + var _loc3_:TextFormat = new TextFormat(); + _loc3_.align = "center"; + _loc3_.size = 12; + _loc3_.color = 16777215; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部", + "data":type_all + }); + this.typeCombox.addItem({ + "label":"攻击武魂", + "data":type_1 + }); + this.typeCombox.addItem({ + "label":"防御武魂", + "data":type_2 + }); + this.typeCombox.addItem({ + "label":"体力武魂", + "data":type_3 + }); + this.typeCombox.addItem({ + "label":"敏捷武魂", + "data":type_4 + }); + this.typeCombox.addItem({ + "label":"统率武魂", + "data":type_5 + }); + this.typeCombox.addItem({ + "label":"攻击玉帛", + "data":type_6 + }); + this.typeCombox.addItem({ + "label":"防御玉帛", + "data":type_7 + }); + this.typeCombox.addItem({ + "label":"体力玉帛", + "data":type_8 + }); + this.typeCombox.addItem({ + "label":"敏捷玉帛", + "data":type_9 + }); + this.typeCombox.addItem({ + "label":"统率玉帛", + "data":type_10 + }); + this.typeCombox.addItem({ + "label":"攻击琉玉", + "data":type_11 + }); + this.typeCombox.addItem({ + "label":"防御琉玉", + "data":type_12 + }); + this.typeCombox.addItem({ + "label":"体力琉玉", + "data":type_13 + }); + this.typeCombox.addItem({ + "label":"敏捷琉玉", + "data":type_14 + }); + this.typeCombox.addEventListener(Event.CHANGE,this.changeComBox,false,0,true); + _loc1_.addChild(this.typeCombox); + this.typeCombox.textField.setStyle("textFormat",_loc3_); + this.typeCombox.dropdown.setRendererStyle("textFormat",_loc3_); + this.typeCombox.x = _loc2_.x + 55; + this.typeCombox.y = _loc2_.y - 3; + var _loc4_:UITitleBg = new UITitleBg("宝石合成",this.bg2.width); + this.bg2.addChild(_loc4_); + _loc4_.x = int(this.bg2.width / 2 - _loc4_.width / 2); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(203,242); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc1_.addChild(this.packScrollPane); + this.packScrollPane.x = 4; + this.packScrollPane.y = 32; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 10) + { + _loc9_ = new IronItem4(); + this.packMc.addChild(_loc9_); + this.packList.push(_loc9_); + _loc9_.y = 24 * _loc5_; + _loc9_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + this.packScrollPane.update(); + this.itemImgSp1 = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp1); + this.itemImgSp1.x = 60; + this.itemImgSp1.y = 35; + this.itemImgSp2 = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp2); + this.itemImgSp2.x = this.itemImgSp1.x + 100; + this.itemImgSp2.y = this.itemImgSp1.y; + this.itemImgSp3 = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp3); + this.itemImgSp3.x = this.itemImgSp2.x + 100; + this.itemImgSp3.y = this.itemImgSp1.y; + this.itemImgSp4 = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp4); + this.itemImgSp4.x = this.itemImgSp3.x + 100; + this.itemImgSp4.y = this.itemImgSp1.y; + this.itemImgSp5 = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp5); + this.itemImgSp5.x = 212; + this.itemImgSp5.y = 180; + var _loc6_:Sprite = face.getSprite(UIConfig.arrow_1); + _loc6_.rotation = 180; + this.bg2.addChild(_loc6_); + _loc6_.x = 270; + _loc6_.y = 180; + var _loc7_:UIButton = new UIButton("合 成",2); + var _loc8_:UIButton = new UIButton("批量合成",2); + this.bg2.addChild(_loc7_); + _loc7_.x = 140; + _loc7_.y = 240; + this.bg2.addChild(_loc8_); + _loc8_.x = 280; + _loc8_.y = _loc7_.y; + _loc7_.onClick = this.hecheng; + _loc8_.onClick = this.hecheng2; + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + ConnectService.getInstance().addEventListener(IronEvent.PAGE4_ITEM_COMPOSE_Bijou,this.getComposeBijouRestlt); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.getBiJiuView); + this.addJewMc(null); + this.getBijousByType(); + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + } + + private function changeComBox(param1:Event) : void + { + this.currType = this.typeCombox.selectedItem.data; + this.getBijousByType(); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + if(Boolean(this.piliangUI) && contains(this.piliangUI)) + { + removeChild(this.piliangUI); + } + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.getBiJiuView); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE4_ITEM_COMPOSE_Bijou,this.getComposeBijouRestlt); + } + + private function getBijousByType() : void + { + var _loc2_:* = undefined; + var _loc3_:IronItem4 = null; + this.clearItemList(); + var _loc1_:Vector. = PakState.getBaoshiList(this.currType,-1); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 9) + { + _loc3_ = new IronItem4(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 24 * _loc2_; + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc3_.setItemObj(_loc1_[_loc2_]); + } + else + { + this.packList[_loc2_].setItemObj(_loc1_[_loc2_]); + } + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + } + + private function getBiJiuView(param1:DevEvent) : void + { + this.getBijousByType(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc3_:IronItem4 = null; + if(Boolean(this.composeItem) && this.itemImgSp5.contains(this.composeItem)) + { + this.itemImgSp5.removeChild(this.composeItem); + this.composeItem.setItemObj(null); + } + var _loc2_:IronItem4 = param1.currentTarget as IronItem4; + if(_loc2_.getItemObj() == null) + { + return; + } + for each(_loc3_ in this.packList) + { + if(_loc3_.getItemObj()) + { + _loc3_.setClick(false); + } + } + if(_loc2_.getItemObj()) + { + if(_loc2_.getItemObj().itemCount > 3) + { + _loc2_.setClick(true); + this.addJewMc(_loc2_.getItemObj()); + } + else + { + this.addJewMc(null); + MessageBoxUI.getInstance().addMessage("所选宝石的数量不足,至少需要4颗才能合成"); + } + } + } + + private function addJewMc(param1:PackItem) : void + { + var _loc2_:JewMc = null; + var _loc3_:int = 0; + this.bijiuObj = param1; + if(this.jewVec == null) + { + this.jewVec = new Vector.(); + _loc3_ = 1; + while(_loc3_ < 5) + { + _loc2_ = new JewMc(); + this.jewVec.push(_loc2_); + this["itemImgSp" + _loc3_].addChild(_loc2_); + _loc2_.x = 3; + _loc2_.y = 3; + _loc3_++; + } + } + for each(_loc2_ in this.jewVec) + { + _loc2_.setItemObj(param1); + } + } + + private function getComposeBijouRestlt(param1:IronEvent) : void + { + this.getBijousByType(); + this.addJewMc(null); + } + + private function hecheng(param1:MouseEvent) : void + { + if(this.bijiuObj == null) + { + MessageBoxUI.getInstance().addMessage("请选择宝石"); + } + else + { + ConnectService.getInstance().ironService.composeBijou(4,this.bijiuObj.itemId); + } + } + + private function viewComposeResult() : void + { + this.addJewMc(null); + if(this.composeItem == null) + { + this.composeItem = new JewMc(); + this.composeItem.x = 3; + this.composeItem.y = 3; + } + this.itemImgSp5.addChild(this.composeItem); + } + + private function hecheng2(param1:MouseEvent) : void + { + if(this.bijiuObj == null) + { + MessageBoxUI.getInstance().addMessage("请选择宝石"); + return; + } + if(this.piliangUI == null) + { + this.piliangUI = new PiliangBijouUI(); + this.piliangUI.x = int(width / 2 - this.piliangUI.width / 2); + this.piliangUI.y = int(height / 2 - this.piliangUI.height / 2); + } + addChild(this.piliangUI); + this.piliangUI.seItemId(this.bijiuObj.itemId,this.bijiuObj.itemCount); + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronPage_5.as b/flash_decompiled/com/view/ui/iron/IronPage_5.as new file mode 100644 index 0000000..c66e1b4 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronPage_5.as @@ -0,0 +1,704 @@ +package com.view.ui.iron +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.iron.event.IronEvent; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.iron.mc.GemItemMc; + import com.view.ui.iron.mc.GemJewMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class IronPage_5 extends IronPage + { + + public static const type_all:int = 99; + + public static const type_1:int = 61; + + public static const type_2:int = 62; + + public static const type_3:int = 63; + + public static const type_4:int = 64; + + public static const type_5:int = 65; + + public static const type_6:int = 67; + + public static const type_7:int = 68; + + public static const type_8:int = 69; + + private var heroCombox:ComboBox; + + private var typeCombox:ComboBox; + + private var tft:TextFormat; + + private var bg2:UIWindowBg; + + private var bg3:UIWindowBg; + + private var bg4:UIWindowBg; + + private var itemNameText:TextField; + + private var hole1Text:TextField; + + private var hole2Text:TextField; + + private var hole3Text:TextField; + + private var stage_txt:TextField; + + private var itemImgSp1:Sprite; + + private var itemImgSp2:Sprite; + + private var itemImgSp3:Sprite; + + private var itemImgSp4:Sprite; + + private var del_all:UIButton; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var gemResult:Object; + + private var currSelectObj:PackItem; + + private var selectItemGemVew:Vector.; + + private var selectItemGem:GemItemMc; + + private var preItem:IronItem5; + + private var selectJewUI:SelectJewUI; + + private var currHoleNo:int; + + private var selectZhuUI:SelectZhuUI; + + public function IronPage_5() + { + var _loc2_:TextField = null; + var _loc8_:TextField = null; + var _loc12_:IronItem5 = null; + var _loc13_:GemJewMc = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(199,266); + addChild(_loc1_); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(139,136); + addChild(this.bg2); + this.bg2.x = _loc1_.x + _loc1_.width + 3; + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(307,136); + addChild(this.bg3); + this.bg3.x = this.bg2.x + this.bg2.width + 3; + this.bg4 = new UIWindowBg(); + this.bg4.initThirdPanel(459,117); + addChild(this.bg4); + this.bg4.x = this.bg2.x; + this.bg4.y = this.bg2.y + this.bg2.height + 3; + _loc2_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc2_.text = "武将选择"; + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 9; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.heroCombox = new ComboBox(); + this.heroCombox.addItem({ + "label":"全部", + "data":-2 + }); + this.heroCombox.addItem({ + "label":"背包", + "data":-1 + }); + _loc1_.addChild(this.heroCombox); + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.heroCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.heroCombox.x = _loc2_.x + 55; + this.heroCombox.y = _loc2_.y - 3; + this.heroCombox.addEventListener(Event.CHANGE,this.changeHero,false,0,true); + var _loc3_:UITitleBg = new UITitleBg("选中装备",this.bg2.width); + this.bg2.addChild(_loc3_); + _loc3_.x = int(this.bg2.width / 2 - _loc3_.width / 2); + var _loc4_:UITitleBg = new UITitleBg("已镶嵌宝石",this.bg3.width); + this.bg3.addChild(_loc4_); + _loc4_.x = int(this.bg3.width / 2 - _loc4_.width / 2); + var _loc5_:UITitleBg = new UITitleBg("装备属性",this.bg4.width); + this.bg4.addChild(_loc5_); + _loc5_.x = int(this.bg4.width / 2 - _loc5_.width / 2); + this.itemImgSp1 = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp1); + this.itemImgSp1.x = 45; + this.itemImgSp1.y = 50; + this.itemImgSp2 = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg3.addChild(this.itemImgSp2); + this.itemImgSp2.x = 20; + this.itemImgSp2.y = this.itemImgSp1.y; + this.itemImgSp3 = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg3.addChild(this.itemImgSp3); + this.itemImgSp3.x = this.itemImgSp2.x + 100; + this.itemImgSp3.y = this.itemImgSp2.y; + this.itemImgSp4 = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg3.addChild(this.itemImgSp4); + this.itemImgSp4.x = this.itemImgSp3.x + 100; + this.itemImgSp4.y = this.itemImgSp2.y; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(203,242); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc1_.addChild(this.packScrollPane); + this.packScrollPane.x = 4; + this.packScrollPane.y = 32; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 10) + { + _loc12_ = new IronItem5(); + this.packMc.addChild(_loc12_); + this.packList.push(_loc12_); + _loc12_.y = 24 * _loc6_; + _loc12_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc6_++; + } + this.packScrollPane.update(); + this.del_all = new UIButton("全部摘除",2,10); + this.bg3.addChild(this.del_all); + this.del_all.x = 220; + this.del_all.y = 115; + this.del_all.onClick = this.delAllGem; + this.selectItemGemVew = new Vector.(); + var _loc7_:int = 1; + while(_loc7_ < 4) + { + _loc13_ = new GemJewMc(_loc7_); + this.selectItemGemVew.push(_loc13_); + switch(_loc7_) + { + case 1: + this.itemImgSp2.addChild(_loc13_); + break; + case 2: + this.itemImgSp3.addChild(_loc13_); + break; + case 3: + this.itemImgSp4.addChild(_loc13_); + } + _loc13_.x = 3; + _loc13_.y = 3; + _loc13_.addBtn.onClick = this.addGem; + _loc13_.delBtn.onClick = this.delGem; + _loc7_++; + } + this.selectItemGem = new GemItemMc(); + this.itemImgSp1.addChild(this.selectItemGem); + this.selectItemGem.x = 3; + this.selectItemGem.y = 3; + this.itemNameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg2.addChild(this.itemNameText); + this.itemNameText.x = 15; + this.itemNameText.y = 110; + this.itemNameText.defaultTextFormat = this.tft; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc8_.text = "已镶嵌:"; + this.bg4.addChild(_loc8_); + _loc8_.x = 20; + _loc8_.y = 30; + this.stage_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg4.addChild(this.stage_txt); + this.stage_txt.x = _loc8_.x + 50; + this.stage_txt.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc9_.text = "孔 1:"; + this.bg4.addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y + 25; + this.hole1Text = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg4.addChild(this.hole1Text); + this.hole1Text.x = this.stage_txt.x; + this.hole1Text.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc10_.text = "孔 2:"; + this.bg4.addChild(_loc10_); + _loc10_.x = _loc8_.x; + _loc10_.y = _loc9_.y + 25; + this.hole2Text = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg4.addChild(this.hole2Text); + this.hole2Text.x = this.stage_txt.x; + this.hole2Text.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc11_.text = "孔 3:"; + this.bg4.addChild(_loc11_); + _loc11_.x = _loc8_.x; + _loc11_.y = _loc10_.y + 25; + this.hole3Text = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg4.addChild(this.hole3Text); + this.hole3Text.x = this.stage_txt.x; + this.hole3Text.y = _loc11_.y; + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListRes); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + ConnectService.getInstance().addEventListener(IronEvent.PAGE_HERO_GEM_DELALL,this.removeAllGemResult); + ConnectService.getInstance().addEventListener(IronEvent.PAGE_HERO_GEM_ADD,this.addGemResult); + ConnectService.getInstance().addEventListener(IronEvent.PAGE_HERO_GEM_DEL,this.delGemResult); + this.getHeroListRes(null); + this.del_all.setEnable(); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + Utils.g_events.removeEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListRes); + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE_HERO_GEM_DELALL,this.removeAllGemResult); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE_HERO_GEM_ADD,this.addGemResult); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE_HERO_GEM_DEL,this.delGemResult); + if(Boolean(this.selectJewUI) && contains(this.selectJewUI)) + { + removeChild(this.selectJewUI); + } + if(Boolean(this.selectZhuUI) && contains(this.selectZhuUI)) + { + removeChild(this.selectZhuUI); + } + if(this.preItem) + { + this.preItem.setClick(false); + } + } + + private function clearHeroList() : void + { + var _loc2_:Object = null; + var _loc1_:* = int(this.heroCombox.length - 1); + while(_loc1_ >= 0) + { + _loc2_ = this.heroCombox.getItemAt(_loc1_); + if(_loc2_.data > 0) + { + this.heroCombox.removeItemAt(_loc1_); + } + _loc1_--; + } + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + } + + private function getHeroListRes(param1:DevEvent) : void + { + var _loc3_:NewHero = null; + var _loc2_:Vector. = NewHeroData.getAllHeroList(); + if(_loc2_.length == 0) + { + return; + } + this.clearHeroList(); + for each(_loc3_ in _loc2_) + { + this.heroCombox.addItem({ + "label":_loc3_.name, + "data":_loc3_.heroId + }); + } + this.heroCombox.selectedItem = this.heroCombox.getItemAt(0); + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.heroCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.getItemsByHeroAndType(this.heroCombox.selectedItem.data,99); + } + + private function changeHero(param1:Event) : void + { + if(this.preItem) + { + this.preItem.setClick(false); + this.preItem = null; + } + this.getItemsByHeroAndType(this.heroCombox.selectedItem.data,99); + } + + private function changeType(param1:Event) : void + { + this.getItemsByHeroAndType(this.heroCombox.selectedItem.data,99); + } + + private function itemChangeResult(param1:DevEvent) : void + { + this.getItemsByHeroAndType(this.heroCombox.selectedItem.data,99); + } + + private function getItemsByHeroAndType(param1:int, param2:int) : void + { + var _loc4_:NewHero = null; + var _loc5_:PackItem = null; + var _loc6_:PackItem = null; + var _loc7_:PackItem = null; + var _loc8_:PackItem = null; + var _loc9_:PackItem = null; + var _loc10_:PackItem = null; + var _loc11_:PackItem = null; + var _loc12_:PackItem = null; + var _loc13_:* = undefined; + var _loc14_:IronItem5 = null; + var _loc3_:Vector. = new Vector.(); + if(PakState.getGetPackListStatus()) + { + PakState.getAllPackList(); + return; + } + this.clearItemList(); + if(param1 == -2) + { + _loc3_ = PakState.getEquipListByChildType(param2); + } + else if(param1 == -1) + { + _loc3_ = PakState.getPakEquipListByChildType(param2); + } + else + { + _loc4_ = NewHeroData.getHeroByHeroId(param1); + if(_loc4_.equ1 > 0) + { + _loc5_ = PakState.getHeroEquipById(_loc4_.equ1); + _loc3_.push(_loc5_); + } + if(_loc4_.equ2 > 0) + { + _loc6_ = PakState.getHeroEquipById(_loc4_.equ2); + _loc3_.push(_loc6_); + } + if(_loc4_.equ3 > 0) + { + _loc7_ = PakState.getHeroEquipById(_loc4_.equ3); + _loc3_.push(_loc7_); + } + if(_loc4_.equ4 > 0) + { + _loc8_ = PakState.getHeroEquipById(_loc4_.equ4); + _loc3_.push(_loc8_); + } + if(_loc4_.equ5 > 0) + { + _loc9_ = PakState.getHeroEquipById(_loc4_.equ5); + _loc3_.push(_loc9_); + } + if(_loc4_.equ6 > 0) + { + _loc10_ = PakState.getHeroEquipById(_loc4_.equ6); + _loc3_.push(_loc10_); + } + if(_loc4_.equ7 > 0) + { + _loc11_ = PakState.getHeroEquipById(_loc4_.equ7); + _loc3_.push(_loc11_); + } + if(_loc4_.equ8 > 0) + { + _loc12_ = PakState.getHeroEquipById(_loc4_.equ8); + _loc3_.push(_loc12_); + } + } + if(_loc3_ != null && _loc3_.length > 0) + { + for(_loc13_ in _loc3_) + { + if(_loc13_ > 9) + { + _loc14_ = new IronItem5(); + this.packMc.addChild(_loc14_); + this.packList.push(_loc14_); + _loc14_.y = 24 * _loc13_; + _loc14_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc14_.setItemObj(_loc3_[_loc13_]); + } + else + { + this.packList[_loc13_].setItemObj(_loc3_[_loc13_]); + } + } + } + this.packScrollPane.update(); + if(this.preItem == null) + { + this.preItem = this.packList[0]; + } + this.packScrollPane.verticalScrollPosition = this.preItem.y - 20; + this.setItemSelect(this.preItem); + } + + public function removeAllGemResult(param1:IronEvent) : void + { + this.itemChangeResult(null); + } + + private function addGemResult(param1:IronEvent) : void + { + this.itemChangeResult(null); + } + + private function delGemResult(param1:IronEvent) : void + { + this.itemChangeResult(null); + } + + private function viewComposeResult() : void + { + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:IronItem5 = param1.currentTarget as IronItem5; + this.setItemSelect(_loc2_); + } + + private function setItemSelect(param1:IronItem5) : void + { + if(param1.getItemObj() == null) + { + this.getItemGemView(null); + return; + } + if(this.preItem) + { + this.preItem.setClick(false); + } + this.preItem = param1; + this.preItem.setClick(true); + this.getItemGemView(this.preItem.getItemObj()); + } + + private function getItemGemView(param1:PackItem) : void + { + var _loc2_:GemJewMc = null; + this.currSelectObj = param1; + if(this.currSelectObj) + { + this.itemNameText.htmlText = param1.viewMap.showName; + this.stage_txt.text = param1.viewMap.currHole + "/3"; + if(param1.viewMap.gemList) + { + if(param1.viewMap.gemList[0]) + { + this.hole1Text.htmlText = param1.viewMap.gemList[0].name; + this.selectItemGemVew[0].setGemView(param1.viewMap.gemList[0]); + } + else + { + this.hole1Text.text = "无"; + this.selectItemGemVew[0].setGemView(null); + } + if(param1.viewMap.gemList[1]) + { + this.hole2Text.htmlText = param1.viewMap.gemList[1].name; + this.selectItemGemVew[1].setGemView(param1.viewMap.gemList[1]); + } + else + { + this.hole2Text.text = "无"; + this.selectItemGemVew[1].setGemView(null); + } + if(param1.viewMap.gemList[2]) + { + this.hole3Text.htmlText = param1.viewMap.gemList[2].name; + this.selectItemGemVew[2].setGemView(param1.viewMap.gemList[2]); + } + else + { + this.hole3Text.text = "无"; + this.selectItemGemVew[2].setGemView(null); + } + } + this.selectItemGem.setItem(param1); + } + else + { + this.itemNameText.htmlText = ""; + this.stage_txt.text = "0/3"; + this.hole1Text.text = "无"; + this.hole2Text.text = "无"; + this.hole3Text.text = "无"; + this.selectItemGem.setItem(null); + for each(_loc2_ in this.selectItemGemVew) + { + _loc2_.setGemView(null); + } + } + } + + private function delGem(param1:MouseEvent) : void + { + if(this.currSelectObj == null) + { + MessageBoxUI.getInstance().addMessage("请选择装备"); + return; + } + var _loc2_:GemJewMc = param1.currentTarget.parent as GemJewMc; + if(_loc2_.getgemObj() == null) + { + return; + } + this.currHoleNo = _loc2_.holeNo; + var _loc3_:String = "你确定摘除吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc3_,this.confimDelJew); + } + + private function confimDelJew() : void + { + var _loc1_:int = 0; + var _loc2_:NewHero = NewHeroData.getHeroByTid(this.currSelectObj.id); + if(_loc2_) + { + _loc1_ = _loc2_.heroId; + } + ConnectService.getInstance().ironService.removeGem(this.currSelectObj.id,this.currHoleNo,_loc1_); + } + + private function addSelectJewUI() : void + { + if(this.selectJewUI == null) + { + this.selectJewUI = new SelectJewUI(); + this.selectJewUI.x = int(width / 2 - this.selectJewUI.width / 2); + this.selectJewUI.y = int(height / 2 - this.selectJewUI.height / 2) - 70; + } + addChild(this.selectJewUI); + } + + private function addSelectZhuUI() : void + { + if(this.selectZhuUI == null) + { + this.selectZhuUI = new SelectZhuUI(); + this.selectZhuUI.x = int(width / 2 - this.selectZhuUI.width / 2); + this.selectZhuUI.y = int(height / 2 - this.selectZhuUI.height / 2) - 70; + } + addChild(this.selectZhuUI); + } + + private function addGem(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:NewHero = null; + var _loc5_:Object = null; + if(this.currSelectObj == null) + { + MessageBoxUI.getInstance().addMessage("请选择装备"); + return; + } + var _loc2_:GemJewMc = param1.currentTarget.parent as GemJewMc; + if(_loc2_.getgemObj() != null) + { + return; + } + if(this.currSelectObj.childType < 67) + { + _loc3_ = 0; + _loc4_ = NewHeroData.getHeroByTid(this.currSelectObj.id); + if(_loc4_) + { + _loc3_ = _loc4_.heroId; + } + this.addSelectJewUI(); + _loc5_ = new Object(); + _loc5_.treasuryId = this.currSelectObj.id; + _loc5_.holeNo = _loc2_.holeNo; + _loc5_.heroId = _loc3_; + this.selectJewUI.setObj(_loc5_); + } + else + { + _loc3_ = 0; + _loc4_ = NewHeroData.getHeroByTid(this.currSelectObj.id); + if(_loc4_) + { + _loc3_ = _loc4_.heroId; + } + this.addSelectZhuUI(); + _loc5_ = new Object(); + _loc5_.treasuryId = this.currSelectObj.id; + _loc5_.holeNo = _loc2_.holeNo; + _loc5_.heroId = _loc3_; + this.selectZhuUI.setObj(_loc5_); + } + } + + private function delAllGem(param1:MouseEvent) : void + { + if(this.currSelectObj == null) + { + MessageBoxUI.getInstance().addMessage("请选择装备"); + return; + } + if(this.currSelectObj.viewMap.currHole == 0) + { + MessageBoxUI.getInstance().addMessage("该装备没有镶嵌宝石"); + return; + } + MessageBoxUI.getInstance().confirmMsg("确定摘除该道具所有宝石?",this.confimDelAll); + } + + private function confimDelAll() : void + { + var _loc1_:int = 0; + var _loc2_:NewHero = NewHeroData.getHeroByTid(this.currSelectObj.id); + if(_loc2_) + { + _loc1_ = _loc2_.heroId; + } + ConnectService.getInstance().ironService.removeAllGem(this.currSelectObj.id,_loc1_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronPage_6.as b/flash_decompiled/com/view/ui/iron/IronPage_6.as new file mode 100644 index 0000000..d3763f7 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronPage_6.as @@ -0,0 +1,246 @@ +package com.view.ui.iron +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.iron.event.IronEvent; + import com.view.mc.button.Button_32; + import com.view.newui.UIButton; + import com.view.newui.UIWindowBg; + import com.view.ui.iron.mc.BaoShiItem; + import com.view.ui.iron.mc.SelectBaosUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class IronPage_6 extends IronPage + { + + private var selectBaosUI:SelectBaosUI; + + private var userItem:BaoShiItem; + + private var toItem:BaoShiItem; + + private var numsText:TextField; + + private var numsText1:TextField; + + private var exchangNums:TextField; + + private var toList:Array; + + private var currI:int; + + private var toEntId:int; + + private var toNums:int; + + private var currEntid:int; + + public function IronPage_6() + { + var _loc4_:Sprite = null; + var _loc7_:Sprite = null; + var _loc9_:Button_32 = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(671,265); + addChild(_loc1_); + var _loc2_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_img_border),55,65); + addChild(_loc2_); + _loc2_.x = 155; + _loc2_.y = 55; + this.userItem = new BaoShiItem(); + _loc2_.addChild(this.userItem); + this.userItem.x = 14; + this.userItem.y = 14; + this.numsText1 = PublicMethod.getTextFieldWithFillter(16777215,30); + _loc2_.addChild(this.numsText1); + this.numsText1.x = 35; + this.numsText1.y = 82; + var _loc3_:UIButton = new UIButton("放 入",2); + addChild(_loc3_); + _loc3_.x = _loc2_.x + 18; + _loc3_.y = _loc2_.y + _loc2_.height + 10; + _loc3_.onClick = this.openSelectUI; + _loc4_ = new Scale9Grid(face.getSprite(ClassConfig.lib_img_border),55,65); + addChild(_loc4_); + _loc4_.y = _loc2_.y; + _loc4_.x = 470; + this.toItem = new BaoShiItem(); + _loc4_.addChild(this.toItem); + this.toItem.x = 14; + this.toItem.y = 14; + this.numsText = PublicMethod.getTextFieldWithFillter(16777215,30); + _loc4_.addChild(this.numsText); + this.numsText.x = 35; + this.numsText.y = 82; + var _loc5_:SimpleButton = face.getButton(ClassConfig.button_head_pre); + var _loc6_:SimpleButton = face.getButton(ClassConfig.button_head_next); + _loc7_ = new Scale9Grid(face.getSprite(ClassConfig.lib_ui_bg_9),160,12); + addChild(_loc7_); + _loc7_.x = _loc2_.x + _loc2_.width + 15; + _loc7_.y = _loc2_.y + 40; + addChild(_loc5_); + _loc5_.x = _loc4_.x - 25; + _loc5_.y = _loc4_.y + 30; + addChild(_loc6_); + _loc6_.x = _loc4_.x + _loc4_.width + 5; + _loc6_.y = _loc4_.y + 30; + _loc5_.addEventListener(MouseEvent.CLICK,this.changPre); + _loc6_.addEventListener(MouseEvent.CLICK,this.changNext); + this.exchangNums = PublicMethod.getTextFieldWithFillter(16777215,95); + addChild(this.exchangNums); + this.exchangNums.x = 472; + this.exchangNums.y = 160; + var _loc8_:TextFormat = PublicMethod.getCenterTextFormat(); + this.exchangNums.defaultTextFormat = _loc8_; + _loc9_ = new Button_32("转换武魄"); + addChild(_loc9_); + _loc9_.x = 298; + _loc9_.y = 210; + _loc9_.onclick = this.exchangeItem; + } + + override public function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(IronEvent.PAGE_EXCHANGE_VIEW,this.getBaoshiView); + ConnectService.getInstance().addEventListener(IronEvent.PAGE_EXCHANGE_OK,this.exchangeResult); + } + + override public function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(IronEvent.PAGE_EXCHANGE_VIEW,this.getBaoshiView); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE_EXCHANGE_OK,this.exchangeResult); + if(this.selectBaosUI != null && contains(this.selectBaosUI)) + { + removeChild(this.selectBaosUI); + } + } + + private function openSelectUI(param1:MouseEvent) : void + { + if(this.selectBaosUI == null) + { + this.selectBaosUI = new SelectBaosUI(); + this.selectBaosUI.setBackFunc(this.selectObj); + } + addChild(this.selectBaosUI); + this.selectBaosUI.x = 160; + this.selectBaosUI.y = -80; + this.selectBaosUI.initList(); + } + + private function selectObj(param1:int, param2:int) : void + { + ConnectService.getInstance().ironService.exchangeBijiuView(param1,param2); + } + + private function getBaoshiView(param1:IronEvent) : void + { + var _loc3_:Object = null; + var _loc4_:* = undefined; + var _loc2_:Object = param1.itemObj; + this.toList = _loc2_.itemList; + for(_loc4_ in this.toList) + { + if(this.toList[_loc4_].entId == _loc2_.itemId) + { + _loc3_ = this.toList[_loc4_]; + this.toList.splice(_loc4_,1); + break; + } + } + this.currEntid = _loc3_.entId; + this.toNums = _loc2_.nums; + this.userItem.setItemObj(_loc3_); + this.numsText.text = _loc2_.nums; + this.numsText1.text = _loc2_.nums; + this.initToItem(); + } + + public function initToItem() : void + { + this.currI = 0; + this.initToList(); + } + + private function initToList() : void + { + if(this.toList == null) + { + return; + } + if(this.toList.length == 0) + { + return; + } + var _loc1_:Object = this.toList[this.currI]; + this.toItem.setItemObj(_loc1_); + this.exchangNums.htmlText = _loc1_.showName; + this.toEntId = _loc1_.entId; + } + + private function changNext(param1:MouseEvent) : void + { + this.currI += 1; + if(this.toList == null) + { + return; + } + if(this.currI > this.toList.length - 1) + { + this.currI = this.toList.length - 1; + } + if(this.currI < 0) + { + this.currI = 0; + } + this.initToList(); + } + + private function changPre(param1:MouseEvent) : void + { + --this.currI; + if(this.currI < 0) + { + this.currI = 0; + } + this.initToList(); + } + + private function exchangeItem() : void + { + if(this.currEntid == 0 || this.toNums == 0 || this.toEntId == 0) + { + MessageBoxUI.getInstance().addMessage("请先选择要转换的宝石"); + return; + } + ConnectService.getInstance().ironService.exchangeBijiu(this.currEntid,this.toNums,this.toEntId); + } + + private function exchangeResult(param1:IronEvent) : void + { + MessageBoxUI.getInstance().addMessage("转换成功"); + this.clear(); + } + + private function clear() : void + { + this.currEntid = 0; + this.toNums = 0; + this.userItem.setItemObj(null); + this.toItem.setItemObj(null); + this.numsText.text = ""; + this.numsText1.text = ""; + this.exchangNums.text = ""; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronPage_7.as b/flash_decompiled/com/view/ui/iron/IronPage_7.as new file mode 100644 index 0000000..a0839ed --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronPage_7.as @@ -0,0 +1,659 @@ +package com.view.ui.iron +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.iron.event.IronEvent; + import com.events.DevEvent; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.iron.mc.IronPage7Mc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class IronPage_7 extends IronPage + { + + private var bg2:UIWindowBg; + + private var heroCombox:ComboBox; + + private var typeCombox:ComboBox; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var packList:Vector.; + + private var tft:TextFormat; + + private var strongList:Vector.; + + private var strongScrollPane:ScrollPane; + + private var strongMc:Sprite; + + private var needFresh:Boolean; + + private var strongText1:TextField; + + private var loadBtn1:UIButton; + + private var loadBtn2:UIButton; + + private var loadBtn3:UIButton; + + private var strongBtn1:UIButton; + + private var strongBtn2:UIButton; + + private var strongBtn3:UIButton; + + private var contentText1:TextField; + + private var tableMc:UITable; + + private var idArr:Array; + + private var currChildType:int = 99; + + public function IronPage_7() + { + var _loc3_:TextField = null; + var _loc4_:int = 0; + var _loc9_:IronItem7 = null; + var _loc10_:IronPage7Mc = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(209,266); + addChild(_loc1_); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc2_.text = "武将"; + _loc1_.addChild(_loc2_); + _loc2_.x = 5; + _loc2_.y = 9; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.heroCombox = new ComboBox(); + this.heroCombox.addItem({ + "label":"全部", + "data":-1 + }); + _loc1_.addChild(this.heroCombox); + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.heroCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.heroCombox.x = _loc2_.x + 30; + this.heroCombox.y = _loc2_.y - 3; + this.heroCombox.addEventListener(Event.CHANGE,this.changeHero,false,0,true); + this.heroCombox.width = 75; + this.heroCombox.selectedItem = this.heroCombox.getItemAt(0); + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc3_.text = "类型"; + _loc1_.addChild(_loc3_); + _loc3_.x = 120; + _loc3_.y = 9; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部", + "data":IronPage_5.type_all + }); + this.typeCombox.addItem({ + "label":"头盔", + "data":IronPage_5.type_1 + }); + this.typeCombox.addItem({ + "label":"铠甲", + "data":IronPage_5.type_2 + }); + this.typeCombox.addItem({ + "label":"武器", + "data":IronPage_5.type_3 + }); + this.typeCombox.addItem({ + "label":"护腿", + "data":IronPage_5.type_4 + }); + this.typeCombox.addItem({ + "label":"饰品", + "data":IronPage_5.type_5 + }); + this.typeCombox.addItem({ + "label":"挂饰", + "data":IronPage_5.type_6 + }); + this.typeCombox.addItem({ + "label":"串珠", + "data":IronPage_5.type_7 + }); + this.typeCombox.addItem({ + "label":"护心镜", + "data":IronPage_5.type_8 + }); + this.typeCombox.width = 60; + _loc1_.addChild(this.typeCombox); + this.typeCombox.textField.setStyle("textFormat",this.tft); + this.typeCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.typeCombox.x = _loc3_.x + 35; + this.typeCombox.y = _loc3_.y - 3; + this.typeCombox.addEventListener(Event.CHANGE,this.changeType,false,0,true); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(213,242); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc1_.addChild(this.packScrollPane); + this.packScrollPane.x = 4; + this.packScrollPane.y = 32; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + _loc4_ = 0; + while(_loc4_ < 10) + { + _loc9_ = new IronItem7(); + this.packMc.addChild(_loc9_); + this.packList.push(_loc9_); + _loc9_.y = 24 * _loc4_; + _loc9_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc4_++; + } + this.packScrollPane.update(); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(450,266); + addChild(this.bg2); + this.bg2.x = _loc1_.x + 222; + var _loc5_:UITitleBg = new UITitleBg("批量强化信息",this.bg2.width); + this.bg2.addChild(_loc5_); + _loc5_.x = int(this.bg2.width / 2 - _loc5_.width / 2); + this.contentText1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,435); + this.contentText1.wordWrap = true; + this.contentText1.multiline = true; + this.contentText1.height = 200; + this.bg2.addChild(this.contentText1); + this.contentText1.x = 15; + this.contentText1.y = 35; + var _loc6_:TextFormat = new TextFormat(); + _loc6_.leading = 8; + this.contentText1.defaultTextFormat = _loc6_; + var _loc7_:Array = ["序列","所需道具名称","所需道具数量","当前拥有数量","是否满足强化条件"]; + var _loc8_:Array = [50,119,90,90,114]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.lineHeight = 24; + this.tableMc.install(8,_loc7_,_loc8_); + this.bg2.addChild(this.tableMc); + this.tableMc.x = 0; + this.tableMc.y = 23; + this.strongScrollPane = new ScrollPane(); + this.strongScrollPane.setSize(454,194); + this.strongScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg2.addChild(this.strongScrollPane); + this.strongScrollPane.x = 5; + this.strongScrollPane.y = 47; + this.strongMc = new Sprite(); + this.strongScrollPane.source = this.strongMc; + this.strongList = new Vector.(); + _loc4_ = 0; + while(_loc4_ < 8) + { + _loc10_ = new IronPage7Mc(); + this.strongMc.addChild(_loc10_); + this.strongList.push(_loc10_); + _loc10_.y = 24 * _loc4_; + _loc4_++; + } + this.strongScrollPane.update(); + this.loadBtn3 = new UIButton("加载强化到300级信息",5); + this.bg2.addChild(this.loadBtn3); + this.loadBtn3.x = 20; + this.loadBtn3.y = 245; + this.loadBtn3.onClick = this.loadStrong3; + this.strongBtn3 = new UIButton("一键升到300级",5); + this.bg2.addChild(this.strongBtn3); + this.strongBtn3.x = this.loadBtn3.x; + this.strongBtn3.y = this.loadBtn3.y; + this.strongBtn3.onClick = this.strongItem3; + this.loadBtn1 = new UIButton("加载强化到500级信息",5); + this.bg2.addChild(this.loadBtn1); + this.loadBtn1.x = this.loadBtn3.x + 150; + this.loadBtn1.y = 245; + this.loadBtn1.onClick = this.loadStrong1; + this.strongBtn1 = new UIButton("一键升到500级",5); + this.bg2.addChild(this.strongBtn1); + this.strongBtn1.x = this.loadBtn1.x; + this.strongBtn1.y = this.loadBtn1.y; + this.strongBtn1.onClick = this.strongItem1; + this.loadBtn2 = new UIButton("加载强化到1000级信息",5); + this.bg2.addChild(this.loadBtn2); + this.loadBtn2.x = this.loadBtn1.x + 150; + this.loadBtn2.y = 245; + this.loadBtn2.onClick = this.loadStrong2; + this.strongBtn2 = new UIButton("一键升到1000级",5); + this.bg2.addChild(this.strongBtn2); + this.strongBtn2.x = this.loadBtn2.x; + this.strongBtn2.y = this.loadBtn2.y; + this.strongBtn2.onClick = this.strongItem2; + ConnectService.getInstance().addEventListener(IronEvent.PAGE_STRONG_VIEW1,this.getQiangHuaViewResult1); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListRes); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.getHeroItemListResult); + ConnectService.getInstance().addEventListener(IronEvent.PAGE_STRONG_PILIANG,this.piliangQianghuaResult); + this.getHeroListRes(null); + this.getHeroItemListResult(null); + this.needFresh = true; + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + Utils.g_events.removeEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getHeroListRes); + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.getHeroItemListResult); + ConnectService.getInstance().removeEventListener(IronEvent.PAGE_STRONG_PILIANG,this.piliangQianghuaResult); + this.clearHeroList(); + this.clearItemList(); + this.showStrongItem(); + this.needFresh = false; + } + + private function getHeroListRes(param1:DevEvent) : void + { + var _loc3_:NewHero = null; + var _loc2_:Vector. = NewHeroData.getAllHeroList(); + if(_loc2_.length == 0) + { + return; + } + this.clearHeroList(); + for each(_loc3_ in _loc2_) + { + this.heroCombox.addItem({ + "label":_loc3_.name, + "data":_loc3_.heroId + }); + } + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.heroCombox.dropdown.setRendererStyle("textFormat",this.tft); + } + + private function clearHeroList() : void + { + var _loc2_:Object = null; + var _loc1_:* = int(this.heroCombox.length - 1); + while(_loc1_ >= 0) + { + _loc2_ = this.heroCombox.getItemAt(_loc1_); + if(_loc2_.data > 0) + { + this.heroCombox.removeItemAt(_loc1_); + } + _loc1_--; + } + } + + private function getHeroItemListResult(param1:DevEvent) : void + { + var _loc5_:NewHero = null; + var _loc6_:PackItem = null; + var _loc7_:* = undefined; + var _loc8_:IronItem7 = null; + if(PakState.getGetPackListStatus()) + { + PakState.getEquipListByChildType(this.currChildType); + return; + } + this.clearItemList(); + var _loc2_:int = int(this.heroCombox.selectedItem.data); + var _loc3_:Vector. = PakState.getEquipListByChildType(this.currChildType); + var _loc4_:Vector. = new Vector.(); + if(_loc2_ > 0) + { + _loc5_ = NewHeroData.getHeroByHeroId(_loc2_); + for each(_loc6_ in _loc3_) + { + if(_loc6_.id == _loc5_.equ1 || _loc6_.id == _loc5_.equ2 || _loc6_.id == _loc5_.equ3 || _loc6_.id == _loc5_.equ4 || _loc6_.id == _loc5_.equ5 || _loc6_.id == _loc5_.equ6 || _loc6_.id == _loc5_.equ7 || _loc6_.id == _loc5_.equ8) + { + _loc4_.push(_loc6_); + } + } + } + else + { + _loc4_ = _loc3_; + } + if(_loc4_ != null && _loc4_.length > 0) + { + for(_loc7_ in _loc4_) + { + if(_loc7_ > 9) + { + _loc8_ = new IronItem7(); + this.packMc.addChild(_loc8_); + this.packList.push(_loc8_); + _loc8_.y = 24 * _loc7_; + _loc8_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc8_.setItemObj(_loc4_[_loc7_]); + } + else + { + this.packList[_loc7_].setItemObj(_loc4_[_loc7_]); + this.packList[_loc7_].setUnSelect(); + } + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + this.showStrongItem(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc4_:IronItem7 = null; + this.tableMc.visible = false; + this.strongMc.visible = false; + this.strongBtn1.visible = false; + this.strongBtn2.visible = false; + this.strongBtn3.visible = false; + this.strongScrollPane.visible = false; + var _loc2_:IronItem7 = param1.currentTarget as IronItem7; + if(_loc2_.getItemObj() == null) + { + return; + } + _loc2_.setClick(); + var _loc3_:int = 0; + for each(_loc4_ in this.packList) + { + if(_loc4_.getSelectStatus()) + { + _loc3_++; + } + } + if(_loc3_ == 9) + { + MessageBoxUI.getInstance().addMessage("单次最多只能强化8件装备"); + _loc2_.setClick(); + } + this.showStrongItem(); + } + + private function showStrongItem() : void + { + var _loc2_:IronItem7 = null; + var _loc3_:PackItem = null; + var _loc4_:int = 0; + this.tableMc.visible = false; + this.strongMc.visible = false; + this.strongBtn1.visible = false; + this.strongBtn3.visible = false; + this.strongBtn2.visible = false; + this.strongScrollPane.visible = false; + this.idArr = new Array(); + var _loc1_:* = ""; + for each(_loc2_ in this.packList) + { + if(_loc2_.getSelectStatus()) + { + _loc3_ = _loc2_.getItemObj(); + if(_loc3_ == null) + { + continue; + } + this.idArr.push(_loc3_.id); + _loc1_ = _loc1_ + _loc3_.viewMap.showName + "-----"; + _loc4_ = 0; + if(_loc3_.viewMap.upLevel) + { + _loc4_ = int(_loc3_.viewMap.upLevel); + } + _loc1_ = _loc1_ + _loc4_ + "级强化
"; + } + } + this.contentText1.htmlText = _loc1_; + } + + private function changeHero(param1:Event) : void + { + this.getHeroItemListResult(null); + } + + private function changeType(param1:Event) : void + { + this.currChildType = this.typeCombox.selectedItem.data; + this.getHeroItemListResult(null); + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + } + + private function loadStrong1(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:Object = null; + if(this.idArr.length == 0) + { + MessageBoxUI.getInstance().addMessage("至少要选中1件装备"); + return; + } + this.clearStrongItemList(); + var _loc2_:Array = new Array(); + for each(_loc3_ in this.idArr) + { + _loc2_.push(_loc3_); + } + if(_loc2_.length > 0) + { + _loc4_ = new Object(); + _loc4_.idList = _loc2_; + ConnectService.getInstance().ironService.getPiLiangQiangHuaView1(_loc4_,500); + } + } + + private function loadStrong2(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:Object = null; + if(this.idArr.length == 0) + { + MessageBoxUI.getInstance().addMessage("至少要选中1件装备"); + return; + } + this.clearStrongItemList(); + var _loc2_:Array = new Array(); + for each(_loc3_ in this.idArr) + { + _loc2_.push(_loc3_); + } + if(_loc2_.length > 0) + { + _loc4_ = new Object(); + _loc4_.idList = _loc2_; + ConnectService.getInstance().ironService.getPiLiangQiangHuaView1(_loc4_,1000); + } + } + + private function loadStrong3(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:Object = null; + if(this.idArr.length == 0) + { + MessageBoxUI.getInstance().addMessage("至少要选中1件装备"); + return; + } + this.clearStrongItemList(); + var _loc2_:Array = new Array(); + for each(_loc3_ in this.idArr) + { + _loc2_.push(_loc3_); + } + if(_loc2_.length > 0) + { + _loc4_ = new Object(); + _loc4_.idList = _loc2_; + ConnectService.getInstance().ironService.getPiLiangQiangHuaView1(_loc4_,300); + } + } + + private function strongItem1(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:Object = null; + if(this.idArr.length == 0) + { + MessageBoxUI.getInstance().addMessage("至少要选中1件装备"); + return; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in this.idArr) + { + _loc2_.push(_loc3_); + } + if(_loc2_.length > 0) + { + _loc4_ = new Object(); + _loc4_.idList = _loc2_; + ConnectService.getInstance().ironService.piLiangQiangHua(_loc4_,500); + } + } + + private function strongItem2(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:Object = null; + if(this.idArr.length == 0) + { + MessageBoxUI.getInstance().addMessage("至少要选中1件装备"); + return; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in this.idArr) + { + _loc2_.push(_loc3_); + } + if(_loc2_.length > 0) + { + _loc4_ = new Object(); + _loc4_.idList = _loc2_; + ConnectService.getInstance().ironService.piLiangQiangHua(_loc4_,1000); + } + } + + private function strongItem3(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:Object = null; + if(this.idArr.length == 0) + { + MessageBoxUI.getInstance().addMessage("至少要选中1件装备"); + return; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in this.idArr) + { + _loc2_.push(_loc3_); + } + if(_loc2_.length > 0) + { + _loc4_ = new Object(); + _loc4_.idList = _loc2_; + ConnectService.getInstance().ironService.piLiangQiangHua(_loc4_,300); + } + } + + private function piliangQianghuaResult(param1:IronEvent) : void + { + MessageBoxUI.getInstance().addMessage("强化成功"); + this.getHeroItemListResult(null); + } + + private function getQiangHuaViewResult1(param1:IronEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:IronPage7Mc = null; + var _loc2_:Array = param1.itemList; + if(_loc2_ != null && _loc2_.length > 0) + { + for(_loc3_ in _loc2_) + { + if(_loc3_ > 7) + { + _loc4_ = new IronPage7Mc(); + this.strongMc.addChild(_loc4_); + this.strongList.push(_loc4_); + _loc4_.y = 24 * _loc3_; + _loc4_.setObj(_loc2_[_loc3_]); + _loc4_.setIndex(_loc3_); + } + else + { + this.strongList[_loc3_].setObj(_loc2_[_loc3_]); + this.strongList[_loc3_].setIndex(_loc3_); + } + } + } + this.strongScrollPane.verticalScrollPosition = 0; + this.strongScrollPane.update(); + this.tableMc.visible = true; + this.strongMc.visible = true; + this.strongScrollPane.visible = true; + this.strongBtn1.visible = true; + this.strongBtn2.visible = true; + this.strongBtn3.visible = true; + } + + private function clearStrongItemList() : void + { + var _loc1_:* = int(this.strongList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 7) + { + this.strongMc.removeChild(this.strongList[_loc1_]); + this.strongList.splice(_loc1_,1); + } + else + { + this.strongList[_loc1_].setObj(null); + } + _loc1_--; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/IronUI.as b/flash_decompiled/com/view/ui/iron/IronUI.as new file mode 100644 index 0000000..6f66322 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/IronUI.as @@ -0,0 +1,290 @@ +package com.view.ui.iron +{ + import com.view.UIListManage; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class IronUI extends BaseUI + { + + private static var instance:IronUI; + + private var _ironUrl:String = "Iron.swf"; + + private var build:BaseBuild; + + private var btnArr:Array; + + private var paneBg:UIWindowBg; + + private var currentPage:IronPage; + + private var ironPage_1:IronPage_1; + + private var ironPage_2:IronPage_2; + + private var ironPage_3:IronPage_3; + + private var ironPage_4:IronPage_4; + + private var ironPage_5:IronPage_5; + + private var ironPage_6:IronPage_6; + + private var ironPage_7:IronPage_7; + + public function IronUI() + { + super(); + } + + public static function getInstance() : IronUI + { + if(instance == null) + { + return instance = new IronUI(); + } + return instance; + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 57; + window_heihgt = UIWindowBg.normal_window_h; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 57; + ui_closeBtn.y = 10; + } + + public function open(param1:BaseBuild) : void + { + this.build = param1; + if(_loaderInfo == null) + { + this.createUI(); + } + else + { + this.addUIToStage(); + } + } + + private function addUIToStage() : void + { + if(!UIListManage.getInstance().containsUI(this)) + { + UIListManage.getInstance().addUI(this); + this.getPage(this.btnArr[0]); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + if(Boolean(this.currentPage) && this.paneBg.contains(this.currentPage)) + { + this.paneBg.removeChild(this.currentPage); + } + super.removeFromStage(param1); + super.delBuildEvent(); + } + + override public function loadUiComplete(param1:Event) : void + { + super.loadUiComplete(param1); + this.createUI(); + } + + override public function createUI() : void + { + var _loc8_:int = 0; + var _loc9_:UITabBtn = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_tiejiangpu); + super.setPosition(); + super.setBuild(this.build); + super.createUI(); + super.loadUiData(); + this.btnArr = new Array(); + var _loc1_:UITabBtn = new UITabBtn("装备购买",2); + var _loc2_:UITabBtn = new UITabBtn("装备分解",2); + var _loc3_:UITabBtn = new UITabBtn("装备强化",2); + var _loc4_:UITabBtn = new UITabBtn("宝石合成",2); + var _loc5_:UITabBtn = new UITabBtn("宝石镶嵌",2); + var _loc6_:UITabBtn = new UITabBtn("宝石转换",2); + var _loc7_:UITabBtn = new UITabBtn("装备批量强化",3); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + this.btnArr.push(_loc7_); + for each(_loc9_ in this.btnArr) + { + bigBg.addChild(_loc9_); + _loc9_.x = 15 + _loc8_ * 66; + _loc9_.y = 98; + _loc9_.onClick = this.clickTab; + _loc8_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(679,273); + bigBg.addChild(this.paneBg); + this.paneBg.y = 123; + this.paneBg.x = 4; + this.addUIToStage(); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + this.getPage(_loc2_); + } + + private function createPage1() : void + { + if(this.ironPage_1 == null) + { + this.ironPage_1 = new IronPage_1(); + this.ironPage_1.x = 4; + this.ironPage_1.y = 4; + } + } + + private function createPage2() : void + { + if(this.ironPage_2 == null) + { + this.ironPage_2 = new IronPage_2(); + this.ironPage_2.x = 4; + this.ironPage_2.y = 4; + } + } + + private function createPage3() : void + { + if(this.ironPage_3 == null) + { + this.ironPage_3 = new IronPage_3(); + this.ironPage_3.x = 4; + this.ironPage_3.y = 4; + } + } + + private function createPage4() : void + { + if(this.ironPage_4 == null) + { + this.ironPage_4 = new IronPage_4(); + this.ironPage_4.x = 4; + this.ironPage_4.y = 4; + } + } + + private function createPage5() : void + { + if(this.ironPage_5 == null) + { + this.ironPage_5 = new IronPage_5(); + this.ironPage_5.x = 4; + this.ironPage_5.y = 4; + } + } + + private function createPage6() : void + { + if(this.ironPage_6 == null) + { + this.ironPage_6 = new IronPage_6(); + this.ironPage_6.x = 4; + this.ironPage_6.y = 4; + } + } + + private function createPage7() : void + { + if(this.ironPage_7 == null) + { + this.ironPage_7 = new IronPage_7(); + this.ironPage_7.x = 4; + this.ironPage_7.y = 4; + } + } + + private function getPage(param1:UITabBtn) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(param1 == _loc4_) + { + _loc4_.select = true; + _loc2_ = _loc3_; + } + else + { + _loc4_.select = false; + } + } + if(Boolean(this.currentPage) && this.paneBg.contains(this.currentPage)) + { + this.paneBg.removeChild(this.currentPage); + } + switch(_loc2_ + 1) + { + case 1: + this.createPage1(); + this.currentPage = this.ironPage_1; + this.paneBg.addChild(this.currentPage); + break; + case 2: + this.createPage2(); + this.currentPage = this.ironPage_2; + this.paneBg.addChild(this.currentPage); + break; + case 3: + this.createPage3(); + this.currentPage = this.ironPage_3; + this.paneBg.addChild(this.currentPage); + break; + case 4: + this.createPage4(); + this.currentPage = this.ironPage_4; + this.paneBg.addChild(this.currentPage); + break; + case 5: + this.createPage5(); + this.currentPage = this.ironPage_5; + this.paneBg.addChild(this.currentPage); + break; + case 6: + this.createPage6(); + this.currentPage = this.ironPage_6; + this.paneBg.addChild(this.currentPage); + break; + case 7: + this.createPage7(); + this.currentPage = this.ironPage_7; + this.paneBg.addChild(this.currentPage); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/ItemSellUI.as b/flash_decompiled/com/view/ui/iron/ItemSellUI.as new file mode 100644 index 0000000..3e81e42 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/ItemSellUI.as @@ -0,0 +1,180 @@ +package com.view.ui.iron +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.view.mc.button.*; + 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 flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ItemSellUI extends UIWindowBg + { + + private static var instance:ItemSellUI; + + private var iron:IronUI = IronUI.getInstance(); + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var itemNameText:TextField; + + private var inputUI:UINumInputText; + + private var countText:TextField; + + private var itemImg:Bitmap; + + private var type:int; + + private var currId:int; + + private var price:int; + + public function ItemSellUI() + { + super(); + initSize(100,140); + loadTitle(UITitleConfig.title_chushoudaoju); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(250,90); + bg1.addChild(_loc1_); + _loc1_.x = 20; + _loc1_.y = 20; + var _loc2_:UIButton = new UIButton("确 定",2,10); + var _loc3_:UIButton = new UIButton("取 消",2,10); + bg1.addChild(_loc2_); + _loc2_.x = 80; + _loc2_.y = _loc1_.y + _loc1_.height + 10; + bg1.addChild(_loc3_); + _loc3_.x = _loc2_.x + 80; + _loc3_.y = _loc2_.y; + var _loc4_:Sprite = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + _loc1_.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 10; + this.itemImg = new Bitmap(); + _loc4_.addChild(this.itemImg); + this.itemImg.x = 3; + this.itemImg.y = 3; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.addChild(this.label1); + this.label1.x = 80; + this.label1.y = 10; + this.itemNameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.itemNameText); + this.itemNameText.x = this.label1.x + 65; + this.itemNameText.y = this.label1.y; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.addChild(this.label2); + this.label2.x = this.label1.x; + this.label2.y = this.label1.y + 30; + this.inputUI = new UINumInputText(80); + _loc1_.addChild(this.inputUI); + this.inputUI.x = this.itemNameText.x; + this.inputUI.y = this.label2.y - 2; + this.inputUI.setInputEvent(this.changePrice); + this.inputUI.setMaxNum(10000); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.addChild(this.label3); + this.label3.x = this.label1.x; + this.label3.y = this.label2.y + 30; + this.countText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(this.countText); + this.countText.x = this.itemNameText.x; + this.countText.y = this.label3.y; + _loc2_.onClick = this.OkToServer; + _loc3_.onClick = this.cancelEvent; + } + + public static function getInstance() : ItemSellUI + { + if(instance == null) + { + instance = new ItemSellUI(); + } + return instance; + } + + public function setItemData(param1:Object, param2:int, param3:BitmapData) : void + { + this.type = param2; + this.currId = param1.id; + if(this.type == 1) + { + loadTitle(UITitleConfig.title_goumaidaoju); + this.label1.text = "购买道具:"; + this.label2.text = "购买数量:"; + this.label3.text = "购买总价:"; + this.price = param1.buyPrice; + } + else + { + loadTitle(UITitleConfig.title_chushoudaoju); + this.label1.text = "出售道具:"; + this.label2.text = "出售数量:"; + this.label3.text = "出售总价:"; + this.price = param1.sellPrice; + } + if(param3) + { + this.itemImg.bitmapData = param3; + this.itemImg.width = 53; + this.itemImg.height = 53; + } + this.itemNameText.htmlText = param1.itemName; + this.inputUI.setTextNum(1); + this.countText.text = this.price.toString(); + } + + private function changePrice() : void + { + var _loc1_:int = this.inputUI.getTextNum(); + this.countText.text = String(_loc1_ * this.price); + } + + private function OkToServer(param1:MouseEvent) : void + { + var _loc2_:int = 0; + if(this.itemImg) + { + _loc2_ = this.inputUI.getTextNum(); + if(_loc2_ <= 0) + { + return; + } + if(this.type == 1) + { + ConnectService.getInstance().ironService.buyItem(this.currId,_loc2_); + } + else + { + ConnectService.getInstance().ironService.sellItem(this.currId,_loc2_); + } + this.cancelEvent(null); + } + } + + private function cancelEvent(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/SelectJewUI.as b/flash_decompiled/com/view/ui/iron/SelectJewUI.as new file mode 100644 index 0000000..1ca565e --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/SelectJewUI.as @@ -0,0 +1,300 @@ +package com.view.ui.iron +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_2; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.iron.mc.SelectGemMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SelectJewUI extends UIWindowBg + { + + private var tft:TextFormat; + + private var costMoney:TextField; + + private var tableMc:UITable; + + private var okBtn:Button_2; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var typeCombox:ComboBox; + + private var levelCombox:ComboBox; + + private var addGemObj:Object; + + private var selectItem:Object; + + private var preGemMc:SelectGemMc; + + public function SelectJewUI() + { + var _loc7_:UIButton = null; + var _loc9_:SelectGemMc = null; + super(); + initSize(100,270); + loadTitle(UITitleConfig.title_xuanzhebaoshi); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.text = "宝石类型:"; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "宝石等级:"; + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部", + "data":IronPage_4.type_all1 + }); + this.typeCombox.addItem({ + "label":"攻击武魂", + "data":IronPage_4.type_1 + }); + this.typeCombox.addItem({ + "label":"防御武魂", + "data":IronPage_4.type_2 + }); + this.typeCombox.addItem({ + "label":"体力武魂", + "data":IronPage_4.type_3 + }); + this.typeCombox.addItem({ + "label":"敏捷武魂", + "data":IronPage_4.type_4 + }); + this.typeCombox.addItem({ + "label":"统率武魂", + "data":IronPage_4.type_5 + }); + this.typeCombox.width = 80; + bg1.addChild(this.typeCombox); + this.typeCombox.x = _loc1_.x + 60; + this.typeCombox.y = _loc1_.y - 2; + this.typeCombox.addEventListener(Event.CHANGE,this.changeType,false,0,true); + this.typeCombox.textField.setStyle("textFormat",this.tft); + this.typeCombox.dropdown.setRendererStyle("textFormat",this.tft); + bg1.addChild(_loc2_); + _loc2_.x = this.typeCombox.x + 86; + _loc2_.y = _loc1_.y; + this.levelCombox = new ComboBox(); + this.levelCombox.addItem({ + "label":"全部", + "data":-1 + }); + var _loc3_:int = 1; + while(_loc3_ < 18) + { + this.levelCombox.addItem({ + "label":_loc3_ + "级", + "data":_loc3_ + }); + _loc3_++; + } + this.levelCombox.textField.setStyle("textFormat",this.tft); + this.levelCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.levelCombox.addEventListener(Event.CHANGE,this.changeLevel,false,0,true); + this.levelCombox.width = 80; + bg1.addChild(this.levelCombox); + this.levelCombox.x = _loc2_.x + 60; + this.levelCombox.y = this.typeCombox.y; + var _loc4_:Array = ["宝石名称","宝石数量"]; + var _loc5_:Array = [155,130]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 25; + this.tableMc.drawLine = false; + this.tableMc.install(8,_loc4_,_loc5_); + bg1.addChild(this.tableMc); + this.tableMc.x = 10; + this.tableMc.y = 34; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc6_.text = "消耗铜币:"; + bg1.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = 273; + this.costMoney = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + bg1.addChild(this.costMoney); + this.costMoney.x = _loc6_.x + 60; + this.costMoney.y = _loc6_.y; + _loc7_ = new UIButton("确 定",2,10); + bg1.addChild(_loc7_); + _loc7_.x = 150; + _loc7_.y = 270; + _loc7_.onClick = this.submit; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(280,201); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + var _loc8_:int = 0; + while(_loc8_ < 8) + { + _loc9_ = new SelectGemMc(); + this.packMc.addChild(_loc9_); + this.packList.push(_loc9_); + _loc9_.y = 25 * _loc8_; + _loc9_.x = 4; + _loc9_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc8_++; + } + this.packScrollPane.update(); + this.levelCombox.selectedItem = this.levelCombox.getItemAt(0); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + } + + private function changeLevel(param1:Event) : void + { + this.getGemList(); + } + + private function changeType(param1:Event) : void + { + this.getGemList(); + } + + private function addEvent(param1:Event) : void + { + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + this.getGemList(); + } + + private function delEvent(param1:Event) : void + { + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + } + + private function itemChangeResult(param1:DevEvent) : void + { + this.getGemList(); + } + + private function clearGemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 7) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObject(null); + this.packList[_loc1_].setSelect(false); + } + _loc1_--; + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + this.selectItem = null; + this.costMoney.text = ""; + } + + private function getGemList() : void + { + var _loc2_:* = undefined; + var _loc3_:SelectGemMc = null; + var _loc1_:Vector. = PakState.getBaoshiList(this.typeCombox.selectedItem.data,this.levelCombox.selectedItem.data); + this.clearGemList(); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 7) + { + _loc3_ = new SelectGemMc(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 25 * _loc2_; + _loc3_.x = 4; + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + this.packList[_loc2_].setItemObject(_loc1_[_loc2_]); + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + if(this.preGemMc) + { + this.preGemMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + private function submit(param1:MouseEvent) : void + { + if(this.selectItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择宝石"); + } + else + { + ConnectService.getInstance().ironService.actAddGem(this.addGemObj.treasuryId,this.selectItem.itemId,this.addGemObj.holeNo,this.addGemObj.heroId); + closeSelf(null); + } + } + + public function setObj(param1:Object) : void + { + this.addGemObj = param1; + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:SelectGemMc = null; + this.preGemMc = param1.currentTarget as SelectGemMc; + if(this.preGemMc.getItemObj() != null) + { + for each(_loc2_ in this.packList) + { + if(_loc2_ == this.preGemMc) + { + this.selectItem = this.preGemMc.getItemObj(); + _loc2_.setSelect(true); + this.costMoney.text = this.preGemMc.getItemObj().needCopper + ""; + } + else + { + _loc2_.setSelect(false); + } + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/SelectZhuUI.as b/flash_decompiled/com/view/ui/iron/SelectZhuUI.as new file mode 100644 index 0000000..f2606a3 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/SelectZhuUI.as @@ -0,0 +1,296 @@ +package com.view.ui.iron +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_2; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.iron.mc.SelectGemMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SelectZhuUI extends UIWindowBg + { + + private var tft:TextFormat; + + private var costMoney:TextField; + + private var tableMc:UITable; + + private var okBtn:Button_2; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var typeCombox:ComboBox; + + private var levelCombox:ComboBox; + + private var addGemObj:Object; + + private var selectItem:Object; + + private var preGemMc:SelectGemMc; + + public function SelectZhuUI() + { + var _loc7_:UIButton = null; + var _loc9_:SelectGemMc = null; + super(); + initSize(100,270); + loadTitle(UITitleConfig.title_xuanzhebaoshi); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.text = "龙珠类型:"; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "龙珠等级:"; + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部龙珠", + "data":IronPage_4.type_all3 + }); + this.typeCombox.addItem({ + "label":"攻击龙珠", + "data":IronPage_4.type_21 + }); + this.typeCombox.addItem({ + "label":"防御龙珠", + "data":IronPage_4.type_22 + }); + this.typeCombox.addItem({ + "label":"体力龙珠", + "data":IronPage_4.type_23 + }); + this.typeCombox.addItem({ + "label":"敏捷龙珠", + "data":IronPage_4.type_24 + }); + this.typeCombox.width = 80; + bg1.addChild(this.typeCombox); + this.typeCombox.x = _loc1_.x + 60; + this.typeCombox.y = _loc1_.y - 2; + this.typeCombox.addEventListener(Event.CHANGE,this.changeType,false,0,true); + this.typeCombox.textField.setStyle("textFormat",this.tft); + this.typeCombox.dropdown.setRendererStyle("textFormat",this.tft); + bg1.addChild(_loc2_); + _loc2_.x = this.typeCombox.x + 86; + _loc2_.y = _loc1_.y; + this.levelCombox = new ComboBox(); + this.levelCombox.addItem({ + "label":"全部", + "data":-1 + }); + var _loc3_:int = 5; + while(_loc3_ < 11) + { + this.levelCombox.addItem({ + "label":_loc3_ + "级", + "data":_loc3_ + }); + _loc3_++; + } + this.levelCombox.textField.setStyle("textFormat",this.tft); + this.levelCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.levelCombox.addEventListener(Event.CHANGE,this.changeLevel,false,0,true); + this.levelCombox.width = 80; + bg1.addChild(this.levelCombox); + this.levelCombox.x = _loc2_.x + 60; + this.levelCombox.y = this.typeCombox.y; + var _loc4_:Array = ["龙珠名称","龙珠数量"]; + var _loc5_:Array = [155,130]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 25; + this.tableMc.drawLine = false; + this.tableMc.install(8,_loc4_,_loc5_); + bg1.addChild(this.tableMc); + this.tableMc.x = 10; + this.tableMc.y = 34; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc6_.text = "消耗铜币:"; + bg1.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = 273; + this.costMoney = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + bg1.addChild(this.costMoney); + this.costMoney.x = _loc6_.x + 60; + this.costMoney.y = _loc6_.y; + _loc7_ = new UIButton("确 定",2,10); + bg1.addChild(_loc7_); + _loc7_.x = 150; + _loc7_.y = 270; + _loc7_.onClick = this.submit; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(280,201); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + var _loc8_:int = 0; + while(_loc8_ < 8) + { + _loc9_ = new SelectGemMc(); + this.packMc.addChild(_loc9_); + this.packList.push(_loc9_); + _loc9_.y = 25 * _loc8_; + _loc9_.x = 4; + _loc9_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc8_++; + } + this.packScrollPane.update(); + this.levelCombox.selectedItem = this.levelCombox.getItemAt(0); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + } + + private function changeLevel(param1:Event) : void + { + this.getGemList(); + } + + private function changeType(param1:Event) : void + { + this.getGemList(); + } + + private function addEvent(param1:Event) : void + { + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + this.getGemList(); + } + + private function delEvent(param1:Event) : void + { + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + } + + private function itemChangeResult(param1:DevEvent) : void + { + this.getGemList(); + } + + private function clearGemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 7) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObject(null); + this.packList[_loc1_].setSelect(false); + } + _loc1_--; + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + this.selectItem = null; + this.costMoney.text = ""; + } + + private function getGemList() : void + { + var _loc2_:* = undefined; + var _loc3_:SelectGemMc = null; + var _loc1_:Vector. = PakState.getBaoshiList(this.typeCombox.selectedItem.data,this.levelCombox.selectedItem.data); + this.clearGemList(); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 7) + { + _loc3_ = new SelectGemMc(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 25 * _loc2_; + _loc3_.x = 4; + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + this.packList[_loc2_].setItemObject(_loc1_[_loc2_]); + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + if(this.preGemMc) + { + this.preGemMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + private function submit(param1:MouseEvent) : void + { + if(this.selectItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择龙珠"); + } + else + { + ConnectService.getInstance().ironService.actAddGem(this.addGemObj.treasuryId,this.selectItem.itemId,this.addGemObj.holeNo,this.addGemObj.heroId); + closeSelf(null); + } + } + + public function setObj(param1:Object) : void + { + this.addGemObj = param1; + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:SelectGemMc = null; + this.preGemMc = param1.currentTarget as SelectGemMc; + if(this.preGemMc.getItemObj() != null) + { + for each(_loc2_ in this.packList) + { + if(_loc2_ == this.preGemMc) + { + this.selectItem = this.preGemMc.getItemObj(); + _loc2_.setSelect(true); + this.costMoney.text = this.preGemMc.getItemObj().needCopper + ""; + } + else + { + _loc2_.setSelect(false); + } + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/data/ItemData.as b/flash_decompiled/com/view/ui/iron/data/ItemData.as new file mode 100644 index 0000000..6b45a94 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/data/ItemData.as @@ -0,0 +1,91 @@ +package com.view.ui.iron.data +{ + import com.control.iron.event.IronEvent; + import com.events.DevEvent; + import com.utils.Utils; + + public class ItemData + { + + private static var _ironBuildLevel:int; + + private static var baoshiList:Array = new Array(); + + private static var sellItemList:Array = new Array(); + + public function ItemData() + { + super(); + } + + public static function setBaoshiData(param1:Array) : void + { + baoshiList.splice(0,baoshiList.length); + baoshiList = param1; + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.BAOSHICHANGE)); + } + + public static function getBaoshiByType(param1:int) : Array + { + var _loc3_:Object = null; + if(param1 == 1) + { + return baoshiList; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in baoshiList) + { + if(_loc3_.type == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + + public static function getBaoshiByTypeAndLevel(param1:int, param2:int) : Array + { + var _loc5_:Object = null; + var _loc3_:Array = getBaoshiByType(param1); + if(param2 == -1) + { + return _loc3_; + } + var _loc4_:Array = new Array(); + for each(_loc5_ in _loc3_) + { + if(_loc5_.level == param2) + { + _loc4_.push(_loc5_); + } + } + return _loc4_; + } + + public static function get ironBuildLevel() : int + { + return _ironBuildLevel; + } + + public static function set ironBuildLevel(param1:int) : void + { + _ironBuildLevel = param1; + } + + public static function setSellItemList(param1:Array, param2:int) : void + { + if(ironBuildLevel != param2) + { + ironBuildLevel = param2; + sellItemList = param1; + Utils.g_events.dispatchEvent(new IronEvent(IronEvent.PAGE1_CANBUYLIST)); + } + } + + public static function getSellItemList() : Array + { + return sellItemList; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/BaoShiItem.as b/flash_decompiled/com/view/ui/iron/mc/BaoShiItem.as new file mode 100644 index 0000000..4798545 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/BaoShiItem.as @@ -0,0 +1,102 @@ +package com.view.ui.iron.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.view.cache.ImgCache; + import com.view.tip.ItemTip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class BaoShiItem extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemMc:Sprite; + + private var obj:Object; + + private var url:String; + + private var loadItemPng:LoadResource; + + private var itemImg:Bitmap; + + private var itemTip:ItemTip; + + public function BaoShiItem() + { + super(); + var _loc1_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_exchange_4)); + addChild(_loc1_); + this.itemMc = new Sprite(); + addChild(this.itemMc); + this.itemMc.x = 6; + this.itemMc.y = 6; + } + + public function getObj() : Object + { + return this.obj; + } + + public function setItemObj(param1:Object) : void + { + this.obj = param1; + if(Boolean(this.itemImg) && this.itemMc.contains(this.itemImg)) + { + this.itemMc.removeChild(this.itemImg); + } + if(this.obj == null) + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + return; + } + this.url = ServerConfig.IMAGE_ITEM_URL + this.obj.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(this.url,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + if(this.obj == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemMc.addChild(this.itemImg); + this.itemImg.width = 52; + this.itemImg.height = 52; + if(this.itemTip == null) + { + this.itemTip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.obj); + } + else + { + this.itemTip.setTipData(this.obj); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/GemItemMc.as b/flash_decompiled/com/view/ui/iron/mc/GemItemMc.as new file mode 100644 index 0000000..51f476f --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/GemItemMc.as @@ -0,0 +1,119 @@ +package com.view.ui.iron.mc +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class GemItemMc extends Sprite + { + + private var itemObj:PackItem; + + private var bg:Sprite; + + private var itemImg:Bitmap; + + private var itemTip:ItemTip; + + private var face:InstallFace = InstallFace.getInstance(); + + private var loader:LoadResource; + + private var url:String; + + public function GemItemMc() + { + super(); + this.bg = PublicMethod.createShape(16777215,52,52); + addChild(this.bg); + this.bg.alpha = 0; + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function setItem(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj) + { + this.loadImg(); + if(this.itemTip) + { + this.itemTip.setTipData(this.itemObj.viewMap); + } + else + { + this.itemTip = new ItemTip(this.bg,this.face.stage,this.face.tip_bg,this.itemObj.viewMap); + } + } + else + { + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + } + } + + private function loadImg() : void + { + if(this.url != this.itemObj.viewMap.iconPath || this.itemImg == null) + { + this.url = this.itemObj.viewMap.iconPath; + if(ImgCache.getInstance().getImg("pic/equip/" + this.url)) + { + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loader = new LoadResource("pic/equip/" + this.url,this.loadBack); + } + } + else if(!contains(this.itemImg)) + { + addChildAt(this.itemImg,0); + } + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + 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 + { + this.itemImg.width = 53; + this.itemImg.height = 53; + addChildAt(this.itemImg,0); + this.itemImg.x = 0; + this.itemImg.y = 0; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/GemJewMc.as b/flash_decompiled/com/view/ui/iron/mc/GemJewMc.as new file mode 100644 index 0000000..06e4e2f --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/GemJewMc.as @@ -0,0 +1,177 @@ +package com.view.ui.iron.mc +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.newui.UISmallBtn; + import com.view.tip.JewTip; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class GemJewMc extends Sprite + { + + public var holeNo:int; + + public var addBtn:UISmallBtn; + + public var delBtn:UISmallBtn; + + private var bg:Sprite; + + private var gemView:Object; + + private var jewTip:JewTip; + + private var loader:LoadResource; + + private var url:String; + + private var itemImg:Bitmap; + + private var face:InstallFace = InstallFace.getInstance(); + + public function GemJewMc(param1:int) + { + super(); + this.holeNo = param1; + this.addBtn = new UISmallBtn("镶 嵌",2); + this.delBtn = new UISmallBtn("摘 除",2); + addChild(this.addBtn); + addChild(this.delBtn); + this.addBtn.x = 2; + this.addBtn.y = -25; + this.delBtn.x = 2; + this.delBtn.y = -25; + this.bg = PublicMethod.createShape(16777215,52,52); + addChild(this.bg); + this.bg.alpha = 0; + this.delBtn.visible = false; + } + + public function setEnable(param1:Boolean) : void + { + if(param1) + { + this.addBtn.setEnable(); + this.delBtn.setEnable(); + } + else + { + this.addBtn.setUnEnable(); + this.delBtn.setUnEnable(); + } + } + + public function getgemObj() : Object + { + return this.gemView; + } + + public function setGemView(param1:Object) : void + { + if(this.gemView == null && param1 == null) + { + return; + } + this.gemView = param1; + if(this.gemView == null) + { + this.addBtn.visible = true; + this.delBtn.visible = false; + if(this.jewTip) + { + this.jewTip.destroyTip(); + } + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + } + else + { + this.delBtn.visible = true; + this.addBtn.visible = false; + if(this.jewTip == null) + { + this.jewTip = new JewTip(this.bg,this.face.stage,this.face.tip_bg,this.gemView.toolTip); + } + else + { + this.jewTip.setTipData(this.gemView.toolTip); + } + this.loadImg(); + } + } + + private function loadImg() : void + { + if(this.url != this.gemView.toolTip.iconPath || this.itemImg == null) + { + this.url = this.gemView.toolTip.iconPath; + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + if(ImgCache.getInstance().getImg("pic/equip/" + this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loader = new LoadResource("pic/equip/" + this.url,this.loadBack); + } + } + else if(!contains(this.itemImg)) + { + addChildAt(this.itemImg,0); + } + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + 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 + { + addChildAt(this.itemImg,0); + this.itemImg.width = 53; + this.itemImg.height = 53; + this.itemImg.x = 0; + this.itemImg.y = 0; + } + + private function addGem(param1:MouseEvent) : void + { + } + + private function delGem(param1:MouseEvent) : void + { + if(this.gemView == null) + { + return; + } + var _loc2_:String = "你确定摘除吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc2_,this.confimDelgem); + } + + private function confimDelgem() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/IronPage7Mc.as b/flash_decompiled/com/view/ui/iron/mc/IronPage7Mc.as new file mode 100644 index 0000000..0f95847 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/IronPage7Mc.as @@ -0,0 +1,133 @@ +package com.view.ui.iron.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIBase; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class IronPage7Mc extends UIBase + { + + 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 css:TextFormat; + + private var _obj:Object; + + public function IronPage7Mc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,455,24); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,455,24); + this.bg2.alpha = 0.3; + addChild(this.bg2); + this.bg2.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + var _loc1_:Sprite = PublicMethod.getTrLine(455); + addChild(_loc1_); + _loc1_.y = 24; + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,45); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,119); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(this.value1); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + this.value1.y = 4; + this.value2.x = this.value1.width; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value2.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + } + + 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 setObj(param1:Object) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:String = null; + this._obj = param1; + if(param1 == null) + { + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + } + else + { + _loc2_ = int(param1.itemId); + _loc3_ = int(param1.itemNums); + _loc4_ = int(param1.userItems); + _loc5_ = param1.itemName; + this.value1.text = _loc2_ + ""; + this.value2.htmlText = _loc5_; + this.value3.text = _loc3_ + ""; + this.value4.text = _loc4_ + ""; + if(_loc4_ >= _loc3_) + { + this.value5.htmlText = "已满足"; + } + else + { + this.value5.htmlText = "还需:" + (_loc3_ - _loc4_) + ""; + } + } + } + + public function setIndex(param1:int) : void + { + this.value1.text = param1 + 1 + ""; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/JewMc.as b/flash_decompiled/com/view/ui/iron/mc/JewMc.as new file mode 100644 index 0000000..6e008d2 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/JewMc.as @@ -0,0 +1,110 @@ +package com.view.ui.iron.mc +{ + import com.InstallFace; + import com.comfig.CommonData; + import com.common.LoadResource; + import com.view.cache.ImgCache; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class JewMc extends Sprite + { + + private var bg:Sprite; + + private var itemObj:PackItem; + + private var itemTip:ItemTip; + + private var itemImg:Bitmap; + + private var face:InstallFace = InstallFace.getInstance(); + + private var loader:LoadResource; + + private var url:String; + + public function JewMc() + { + super(); + } + + public function setItemObj(param1:PackItem) : void + { + var _loc2_:String = ""; + if(this.itemObj) + { + _loc2_ = this.itemObj.viewMap.iconPath; + } + this.itemObj = param1; + if(param1 == null) + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + } + else + { + this.loadImg(); + if(this.itemTip == null) + { + this.itemTip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj.viewMap); + } + else + { + this.itemTip.setTipData(this.itemObj.viewMap); + } + } + } + + private function loadImg() : void + { + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + if(this.url != this.itemObj.viewMap.iconPath || this.itemImg == null) + { + this.url = this.itemObj.viewMap.iconPath; + if(ImgCache.getInstance().getImg("pic/equip/" + this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loader = new LoadResource("pic/equip/" + this.url,this.loadBack); + } + } + else if(!contains(this.itemImg)) + { + addChild(this.itemImg); + } + } + + private function loadBack(param1:Event) : void + { + this.itemImg = Bitmap(param1.target.loader.content); + ImgCache.getInstance().setImg(this.loader.url,this.itemImg); + this.loader.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + addChild(this.itemImg); + this.itemImg.width = CommonData.EQUIP_WIDTH; + this.itemImg.height = CommonData.EQUIP_HEIGHT; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/MarrowMc.as b/flash_decompiled/com/view/ui/iron/mc/MarrowMc.as new file mode 100644 index 0000000..8b93e59 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/MarrowMc.as @@ -0,0 +1,100 @@ +package com.view.ui.iron.mc +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.tip.UserItemTip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class MarrowMc extends Sprite + { + + private var marrowNums:TextField; + + private var loadItemPng:LoadResource; + + private var itemSprite:Sprite; + + private var itemsTip:UserItemTip; + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemObject:Object; + + private var itemImg:Bitmap; + + public function MarrowMc() + { + super(); + this.itemSprite = new Sprite(); + addChild(this.itemSprite); + this.marrowNums = PublicMethod.getTextField(16777215,40); + addChild(this.marrowNums); + this.marrowNums.x = 30; + this.marrowNums.y = 6; + } + + public function setViewMap(param1:Object, param2:Boolean = false) : void + { + this.itemObject = param1; + if(param2) + { + this.loadImg(); + } + } + + private function loadImg() : void + { + if(this.itemImg == null) + { + this.loadItemImg(); + } + } + + public function setMarrowInfo(param1:int) : void + { + this.marrowNums.text = "*" + param1; + if(this.itemImg == null) + { + this.loadItemImg(); + } + } + + private function loadItemImg() : void + { + if(ImgCache.getInstance().getImg("pic/equip/" + this.itemObject.iconPath)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg("pic/equip/" + this.itemObject.iconPath).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource("pic/equip/" + this.itemObject.iconPath,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.loadItemPng.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + this.itemSprite.addChild(this.itemImg); + this.itemImg.width = 30; + this.itemImg.height = 30; + var _loc1_:Bitmap = new Bitmap(); + _loc1_.bitmapData = this.itemImg.bitmapData.clone(); + this.itemsTip = new UserItemTip(this.itemSprite,this.face.stage,this.face.tip_bg,this.itemObject,_loc1_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/PiliangBijouUI.as b/flash_decompiled/com/view/ui/iron/mc/PiliangBijouUI.as new file mode 100644 index 0000000..4cee872 --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/PiliangBijouUI.as @@ -0,0 +1,129 @@ +package com.view.ui.iron.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.mc.button.Button_2; + import com.view.mc.sprite.PageInputMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PiliangBijouUI extends UIWindowBg + { + + private var bg:Sprite; + + private var mc:Sprite; + + private var okBtn:Button_2; + + private var input:PageInputMc; + + private var itemId:int; + + private var itemNums:int; + + public function PiliangBijouUI() + { + super(); + initSize(100,110); + loadTitle(UITitleConfig.title_pilianghecheng); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(250,50); + bg1.addChild(_loc1_); + _loc1_.x = 20; + _loc1_.y = 20; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + _loc1_.addChild(_loc2_); + _loc2_.text = "请输入批量合成次数:"; + _loc2_.x = 20; + _loc2_.y = 20; + this.input = new PageInputMc(); + _loc1_.addChild(this.input); + this.input.x = _loc2_.x + _loc2_.width; + this.input.y = _loc2_.y; + this.input.setText(1); + this.input.setMinNum(1); + this.input.setMaxLen(2); + this.input.getInputText().addEventListener(Event.CHANGE,this.changeNums); + var _loc3_:UIButton = new UIButton("确 定",2,10); + var _loc4_:UIButton = new UIButton("取 消",2,10); + bg1.addChild(_loc3_); + _loc3_.x = 80; + _loc3_.y = _loc1_.y + _loc1_.height + 16; + bg1.addChild(_loc4_); + _loc4_.x = _loc3_.x + 80; + _loc4_.y = _loc3_.y; + _loc4_.onClick = this.closeUI; + _loc3_.onClick = this.submit; + } + + private function resize(param1:Event) : void + { + x = face.realWidth / 2; + y = face.realHeight / 2; + } + + private function addEvent(param1:Event) : void + { + if(this.okBtn) + { + this.okBtn.setEnable(); + } + } + + private function delEvent(param1:Event) : void + { + this.itemId = 0; + this.itemNums = 0; + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function seItemId(param1:int, param2:int) : void + { + this.itemId = param1; + this.itemNums = param2 / 4; + this.input.setMaxNum(this.itemNums); + this.input.setText(1); + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getText(); + if(this.itemId > 0 && _loc2_ > 0) + { + ConnectService.getInstance().ironService.composeBijou(4 * _loc2_,this.itemId); + this.closeUI(null); + } + } + + private function changeNums(param1:Event) : void + { + var _loc2_:int = this.input.getText(); + if(_loc2_ > this.itemNums) + { + _loc2_ = this.itemNums; + } + if(_loc2_ <= 0) + { + _loc2_ = 1; + } + this.input.setText(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/SelectBaosUI.as b/flash_decompiled/com/view/ui/iron/mc/SelectBaosUI.as new file mode 100644 index 0000000..8483f9d --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/SelectBaosUI.as @@ -0,0 +1,142 @@ +package com.view.ui.iron.mc +{ + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.iron.IronPage_4; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class SelectBaosUI extends UIWindowBg + { + + private var tableMc:UITable; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var backF:Function; + + public function SelectBaosUI() + { + var _loc1_:Array = null; + var _loc2_:Array = null; + var _loc4_:SelectBaoshiMc = null; + super(); + initSize(116,266); + loadTitle(UITitleConfig.title_xuanzhebaoshi); + addCloseBtn(); + initBg(); + _loc1_ = ["宝石名称","选择数量","操 作"]; + _loc2_ = [100,100,100]; + 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 = 10; + this.tableMc.y = 10; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(295,251); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 10) + { + _loc4_ = new SelectBaoshiMc(); + this.packMc.addChild(_loc4_); + this.packList.push(_loc4_); + _loc4_.y = 25 * _loc3_; + _loc4_.x = 4; + _loc3_++; + } + this.packScrollPane.update(); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + } + + public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function itemChangeResult(param1:DevEvent) : void + { + this.initList(); + } + + public function initList() : void + { + var _loc2_:* = undefined; + var _loc3_:SelectBaoshiMc = null; + var _loc1_:Vector. = PakState.getBaoshiList(IronPage_4.type_all,-1); + this.clearGemList(); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 9) + { + _loc3_ = new SelectBaoshiMc(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 25 * _loc2_; + _loc3_.x = 4; + } + this.packList[_loc2_].setBack(this.setSelectBack); + this.packList[_loc2_].setItemObject(_loc1_[_loc2_]); + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + } + + private function clearGemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObject(null); + } + _loc1_--; + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + } + + public function setBackFunc(param1:Function) : void + { + this.backF = param1; + } + + public function setSelectBack(param1:int, param2:int) : void + { + this.backF(param1,param2); + this.closeUI(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/SelectBaoshiMc.as b/flash_decompiled/com/view/ui/iron/mc/SelectBaoshiMc.as new file mode 100644 index 0000000..923d97d --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/SelectBaoshiMc.as @@ -0,0 +1,114 @@ +package com.view.ui.iron.mc +{ + import com.common.PublicMethod; + import com.view.mc.sprite.PageInputMc; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class SelectBaoshiMc extends Sprite + { + + private var nameText:TextField; + + private var numText:PageInputMc; + + private var selectBtn:UISmallBtn; + + private var bg1:Sprite; + + private var itemObj:PackItem; + + private var backFun:Function; + + public function SelectBaoshiMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,288,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + var _loc1_:Sprite = PublicMethod.getTrLine(288); + addChild(_loc1_); + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(this.nameText); + this.nameText.y = 5; + this.nameText.x = 0; + this.numText = new PageInputMc(); + addChild(this.numText); + this.numText.x = 105; + this.numText.y = 4; + this.selectBtn = new UISmallBtn("选 择",2); + addChild(this.selectBtn); + this.selectBtn.x = 220; + this.selectBtn.y = 3; + this.selectBtn.onClick = this.selectBaoShi; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.itemObj) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.itemObj) + { + this.bg1.visible = true; + } + } + + public function setItemObject(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + this.nameText.text = ""; + this.numText.visible = false; + this.selectBtn.visible = false; + this.bg1.visible = false; + this.backFun = null; + } + else + { + this.nameText.htmlText = this.itemObj.viewMap.showName; + this.numText.visible = true; + this.numText.setMaxNum(this.itemObj.itemCount); + this.selectBtn.visible = true; + } + } + + public function getObj() : PackItem + { + return this.itemObj; + } + + private function selectBaoShi(param1:MouseEvent) : void + { + var _loc2_:int = this.numText.getText(); + if(_loc2_ > 0) + { + this.backFun(this.itemObj.itemId,_loc2_); + } + else + { + MessageBoxUI.getInstance().addMessage("数量必须大于0"); + } + } + + public function setBack(param1:Function) : void + { + this.backFun = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/iron/mc/SelectGemMc.as b/flash_decompiled/com/view/ui/iron/mc/SelectGemMc.as new file mode 100644 index 0000000..52f9cbd --- /dev/null +++ b/flash_decompiled/com/view/ui/iron/mc/SelectGemMc.as @@ -0,0 +1,133 @@ +package com.view.ui.iron.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class SelectGemMc extends Sprite + { + + private var itemName:TextField; + + private var itemNums:TextField; + + private var radioBtn:UIRadioBtn; + + private var tip:ItemTip; + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var itemObj:PackItem; + + private var face:InstallFace = InstallFace.getInstance(); + + public function SelectGemMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,272,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,272,25); + this.bg2.alpha = 0.3; + addChild(this.bg2); + this.bg2.visible = false; + var _loc1_:Sprite = PublicMethod.getTrLine(270); + addChild(_loc1_); + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,125); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 5; + this.radioBtn.y = 3; + this.radioBtn.visible = false; + addChild(this.itemName); + this.itemName.x = this.radioBtn.x + this.radioBtn.width + 2; + this.itemName.y = 4; + this.itemNums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + addChild(this.itemNums); + this.itemNums.x = this.itemName.x + this.itemName.width; + this.itemNums.y = 4; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.itemNums.defaultTextFormat = PublicMethod.getCenterTextFormat(); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.itemObj) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.itemObj) + { + this.bg1.visible = true; + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function setSelect(param1:Boolean) : void + { + if(param1) + { + this.radioBtn.setSelect(); + this.bg1.visible = false; + this.bg2.visible = true; + } + else + { + this.radioBtn.setUnSelect(); + this.bg2.visible = false; + } + } + + public function setItemObject(param1:PackItem) : void + { + if(this.itemObj == null && param1 == null) + { + return; + } + this.itemObj = param1; + if(this.itemObj) + { + this.radioBtn.visible = true; + this.itemName.htmlText = this.itemObj.viewMap.showName; + this.itemNums.text = this.itemObj.itemCount + ""; + if(this.tip) + { + this.tip.setTipData(this.itemObj.viewMap); + } + else + { + this.tip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj.viewMap); + } + } + else + { + if(this.tip) + { + this.tip.destroyTip(); + } + this.radioBtn.visible = false; + this.itemName.text = ""; + this.itemNums.text = ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/league/AddJunGongUI.as b/flash_decompiled/com/view/ui/league/AddJunGongUI.as new file mode 100644 index 0000000..405f769 --- /dev/null +++ b/flash_decompiled/com/view/ui/league/AddJunGongUI.as @@ -0,0 +1,74 @@ +package com.view.ui.league +{ + 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.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class AddJunGongUI extends UIWindowBg + { + + private var bg:Sprite; + + private var inputBar:TextField; + + public function AddJunGongUI() + { + var _loc4_:UIButton = null; + super(); + initSize(125,150); + loadTitle(UITitleConfig.title_zenjiajungong); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(287,100); + bg1.addChild(_loc1_); + _loc1_.x = 15; + _loc1_.y = 15; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.leading = 4; + this.inputBar = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,234); + this.inputBar.height = 58; + this.inputBar.multiline = true; + this.inputBar.wordWrap = true; + this.inputBar.textColor = 16777215; + _loc1_.addChild(this.inputBar); + this.inputBar.x = 2; + this.inputBar.y = 2; + this.inputBar.defaultTextFormat = _loc2_; + var _loc3_:UIButton = new UIButton("确 定",2); + bg1.addChild(_loc3_); + _loc3_.x = 80; + _loc3_.y = 137; + _loc4_ = new UIButton("取 消",2); + bg1.addChild(_loc4_); + _loc4_.x = 192; + _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 + { + ConnectService.getInstance().leagueService.addJunGong(); + this.closeThis(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/league/LeagueBattleUI.as b/flash_decompiled/com/view/ui/league/LeagueBattleUI.as new file mode 100644 index 0000000..899d400 --- /dev/null +++ b/flash_decompiled/com/view/ui/league/LeagueBattleUI.as @@ -0,0 +1,443 @@ +package com.view.ui.league +{ + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.play.event.LeagueEvent; + import com.newdata.user.NewUserData; + import com.view.UIListManage; + import com.view.mc.button.Button_9; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.tip.MulTipTitle; + import com.view.ui.PlayUI; + import com.view.ui.league.mc.LevelTip1; + import com.view.ui.league.mc.LevelTip2; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.RankingMainUI; + import com.view.ui.shop.ShopUI; + 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 LeagueBattleUI extends PlayUI + { + + private var bg2:UIWindowBg; + + private var bgSp:Sprite; + + private var league_sp8:Sprite; + + private var league_sp7:Sprite; + + private var league_sp6:Sprite; + + private var league_sp5:Sprite; + + private var league_sp4:Sprite; + + private var league_sp3:Sprite; + + private var league_sp2:Sprite; + + private var league_sp1:Sprite; + + private var level_txt:TextField; + + private var credit_txt:TextField; + + private var canPlay_txt:TextField; + + private var ranking_txt:TextField; + + private var jifen_txt:TextField; + + private var times_txt:TextField; + + private var tip1:Sprite; + + private var tip2:Sprite; + + private var addJungongBtn:Button_9; + + private var jungongeff:TextField; + + private var addJunGongUI:AddJunGongUI; + + private var enterBtn:UIButton; + + private var jungongShopBtn:UIButton; + + private var rankBtn:UIButton; + + private var needCash:int; + + private var levelMcArr:Vector. = new Vector.(); + + private var levelInfo:Array; + + private var leagueEnterUI:LeagueEnterUI; + + public function LeagueBattleUI() + { + super(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc5_:TextField = null; + var _loc8_:Sprite = null; + var _loc10_:TextField = null; + super.createUI(); + super.loadTitle(UITitleConfig.title_baizhanqianjun); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(372,391); + _loc1_.addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = 4; + this.bgSp = new Sprite(); + this.bg2.addChild(this.bgSp); + this.bgSp.x = 2; + this.bgSp.y = 2; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(235,391); + _loc1_.addChild(_loc2_); + _loc2_.x = this.bg2.x + this.bg2.width + 4; + _loc2_.y = this.bg2.y; + var _loc3_:UITitleBg = new UITitleBg("活动介绍",_loc2_.width); + _loc2_.addChild(_loc3_); + _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2); + var _loc4_:String = "pic/bg/bg_baizhan.jpg"; + loadBg(_loc4_); + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,232); + _loc2_.addChild(_loc5_); + _loc5_.x = 8; + _loc5_.y = 30; + _loc5_.wordWrap = true; + _loc5_.multiline = true; + _loc5_.height = 250; + var _loc6_:TextFormat = new TextFormat(); + _loc6_.leading = 4; + _loc5_.defaultTextFormat = _loc6_; + var _loc7_:String = "模式:战略战"; + _loc7_ = _loc7_ + "
时间:不同军衔活动时间不同 查看详情"; + _loc7_ = _loc7_ + "
次数: 次/天
"; + _loc7_ = _loc7_ + "
奖励:每日活动结束时参赛者获得军功。"; + _loc7_ = _loc7_ + "
规则:"; + _loc7_ = _loc7_ + "
1、每周一(按赛季积分-胜利数-失败数)进行升降阶排位"; + _loc7_ = _loc7_ + "
2、不同军衔房间人数上限不同。 查看详情"; + _loc7_ = _loc7_ + "
3、点击挑战的玩家每2分钟随机配对战斗,胜5分、负1分。"; + _loc7_ = _loc7_ + "
4、战斗后请再次点击挑战,轮空请不要退出,等待下一轮战斗。"; + _loc7_ = _loc7_ + "
5、活动内战斗所有武将不损兵力、健康度。"; + _loc5_.htmlText = _loc7_; + _loc8_ = PublicMethod.getTrLine(220); + _loc2_.addChild(_loc8_); + _loc8_.x = 4; + _loc8_.y = 274; + this.tip1 = PublicMethod.createRectangle(16777215,16777215,51,18); + _loc2_.addChild(this.tip1); + this.tip1.x = 175; + this.tip1.y = 46; + this.tip1.alpha = 0; + this.tip2 = PublicMethod.createRectangle(16777215,16777215,51,18); + _loc2_.addChild(this.tip2); + this.tip2.x = 187; + this.tip2.y = 157; + this.tip2.alpha = 0; + this.times_txt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,30); + _loc2_.addChild(this.times_txt); + this.times_txt.x = 50; + this.times_txt.y = 62; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,38); + _loc2_.addChild(_loc9_); + _loc9_.x = 10; + _loc9_.y = _loc8_.y + 6; + _loc9_.text = "级 别:"; + this.level_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,131); + _loc2_.addChild(this.level_txt); + this.level_txt.x = _loc9_.x + _loc9_.width; + this.level_txt.y = _loc8_.y + 5; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,38); + _loc2_.addChild(_loc10_); + _loc10_.x = _loc9_.x; + _loc10_.y = _loc9_.y + 20; + _loc10_.text = "军 工:"; + this.credit_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,131); + _loc2_.addChild(this.credit_txt); + this.credit_txt.x = this.level_txt.x; + this.credit_txt.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,38); + _loc2_.addChild(_loc11_); + _loc11_.x = _loc9_.x; + _loc11_.y = _loc10_.y + 20; + _loc11_.text = "次 数:"; + this.canPlay_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,131); + _loc2_.addChild(this.canPlay_txt); + this.canPlay_txt.x = this.level_txt.x; + this.canPlay_txt.y = _loc11_.y; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,38); + _loc2_.addChild(_loc12_); + _loc12_.x = _loc9_.x; + _loc12_.y = _loc11_.y + 20; + _loc12_.text = "排 名:"; + this.ranking_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,131); + _loc2_.addChild(this.ranking_txt); + this.ranking_txt.x = this.level_txt.x; + this.ranking_txt.y = _loc12_.y; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,38); + _loc2_.addChild(_loc13_); + _loc13_.x = _loc9_.x; + _loc13_.y = _loc12_.y + 20; + _loc13_.text = "积 分:"; + this.jifen_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,131); + _loc2_.addChild(this.jifen_txt); + this.jifen_txt.x = this.level_txt.x; + this.jifen_txt.y = _loc13_.y; + this.enterBtn = new UIButton("进 入",2,10); + _loc2_.addChild(this.enterBtn); + this.enterBtn.x = 170; + this.enterBtn.y = _loc9_.y; + this.enterBtn.onClick = this.enterHall; + this.jungongShopBtn = new UIButton("军工商店",2,10); + _loc2_.addChild(this.jungongShopBtn); + this.jungongShopBtn.x = this.enterBtn.x; + this.jungongShopBtn.y = this.enterBtn.y + 30; + this.jungongShopBtn.onClick = this.openJungongShop; + this.rankBtn = new UIButton("排行榜",2,10); + _loc2_.addChild(this.rankBtn); + this.rankBtn.x = this.enterBtn.x; + this.rankBtn.y = this.jungongShopBtn.y + 30; + this.rankBtn.onClick = this.openRank; + this.addJungongBtn = new Button_9("增加军工"); + _loc2_.addChild(this.addJungongBtn); + this.addJungongBtn.x = 10; + this.addJungongBtn.y = _loc13_.y + 22; + this.addJungongBtn.func = this.addJungong; + this.jungongeff = PublicMethod.getTextField(65280,80); + _loc2_.addChild(this.jungongeff); + this.jungongeff.x = this.addJungongBtn.x; + this.jungongeff.y = this.addJungongBtn.y; + this.league_sp1 = playUIRes.getSprite(ClassConfig.league_sp1); + this.bg2.addChild(this.league_sp1); + this.league_sp1.x = 279; + this.league_sp1.y = 323; + this.league_sp2 = playUIRes.getSprite(ClassConfig.league_sp2); + this.bg2.addChild(this.league_sp2); + this.league_sp2.x = 134; + this.league_sp2.y = 275; + this.league_sp3 = playUIRes.getSprite(ClassConfig.league_sp3); + this.bg2.addChild(this.league_sp3); + this.league_sp3.x = 1; + this.league_sp3.y = 245; + this.league_sp4 = playUIRes.getSprite(ClassConfig.league_sp4); + this.bg2.addChild(this.league_sp4); + this.league_sp4.x = 145; + this.league_sp4.y = 205; + this.league_sp5 = playUIRes.getSprite(ClassConfig.league_sp5); + this.bg2.addChild(this.league_sp5); + this.league_sp5.x = 320; + this.league_sp5.y = 183; + this.league_sp6 = playUIRes.getSprite(ClassConfig.league_sp6); + this.bg2.addChild(this.league_sp6); + this.league_sp6.x = 91; + this.league_sp6.y = 107; + this.league_sp7 = playUIRes.getSprite(ClassConfig.league_sp7); + this.bg2.addChild(this.league_sp7); + this.league_sp7.x = 277; + this.league_sp7.y = 45; + this.league_sp8 = playUIRes.getSprite(ClassConfig.league_sp8); + this.bg2.addChild(this.league_sp8); + this.league_sp8.x = 6; + this.league_sp8.y = 16; + this.enterLeague(); + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bgSp.addChild(param1); + param1.width = 378; + param1.height = 397; + } + + public function addJungong() : void + { + if(NewUserData.getUser().viplevel < 2) + { + MessageBoxUI.getInstance().addMessage("荣誉称号等级达到2级才可使用该功能"); + } + else + { + if(this.addJunGongUI == null) + { + this.addJunGongUI = new AddJunGongUI(); + this.addJunGongUI.x = int(this.width / 2 - this.addJunGongUI.width / 2); + this.addJunGongUI.y = int(this.height / 2 - this.addJunGongUI.height / 2); + } + addChild(this.addJunGongUI); + this.addJunGongUI.setData("是否花费" + this.needCash + "元宝增加100%的军工
提示:使用后百战千军获得军工增加100%,当天有效"); + } + } + + private function addJunGongResult(param1:LeagueEvent) : void + { + this.addJungongBtn.visible = false; + this.jungongeff.text = "军工+100%"; + this.jungongeff.visible = true; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(LeagueEvent.LEAGUE_INFO,this.getEnterLeagueView); + ConnectService.getInstance().addEventListener(LeagueEvent.LEAGUE_addJunGong,this.addJunGongResult); + ConnectService.getInstance().addEventListener(LeagueEvent.LEAGUE_EnterWithoutCommit,this.enterLeagueView); + if(this.league_sp8) + { + this.enterLeague(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(LeagueEvent.LEAGUE_INFO,this.getEnterLeagueView); + ConnectService.getInstance().removeEventListener(LeagueEvent.LEAGUE_addJunGong,this.addJunGongResult); + ConnectService.getInstance().removeEventListener(LeagueEvent.LEAGUE_EnterWithoutCommit,this.enterLeagueView); + if(Boolean(this.addJunGongUI) && contains(this.addJunGongUI)) + { + removeChild(this.addJunGongUI); + } + } + + private function enterLeague() : void + { + if(this.levelInfo == null) + { + ConnectService.getInstance().leagueService.getEntryInfo(1); + } + else + { + ConnectService.getInstance().leagueService.getEntryInfo(2); + } + } + + private function getEnterLeagueView(param1:LeagueEvent) : void + { + var _loc4_:String = null; + if(param1.result == ReturnBean.STATUS_4) + { + closeUI(null); + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + var _loc2_:Object = param1.obj; + if(_loc2_ == null) + { + if(this.leagueEnterUI == null) + { + this.leagueEnterUI = new LeagueEnterUI(); + } + this.leagueEnterUI.refreshHallInfo(); + this.leagueEnterUI.show(); + return; + } + this.needCash = _loc2_.needCash; + if(this.levelInfo == null) + { + this.levelInfo = _loc2_.levelInfo; + this.initLevelInfo(); + } + var _loc3_:Object = _loc2_.selfInfo; + if(_loc3_.addJunGong == 1) + { + this.addJunGongResult(null); + } + this.level_txt.text = _loc3_.selfLevel + "(每日" + _loc3_.dailyJunGong + "军工)"; + this.credit_txt.text = _loc3_.junGong; + this.canPlay_txt.text = _loc3_.joinTimes + "/" + _loc3_.maxJoin; + this.ranking_txt.text = _loc3_.selfRank; + this.jifen_txt.text = _loc3_.seasonIntegral; + this.times_txt.text = _loc3_.maxJoin; + for each(_loc4_ in this.levelMcArr) + { + if(_loc4_ == _loc3_.leagueLevel) + { + this["league_sp" + _loc4_].filters = [PublicGlow.getInstance().yellowGlow]; + } + else + { + this["league_sp" + _loc4_].filters = null; + } + } + } + + private function initLevelInfo() : void + { + var _loc1_:Object = null; + var _loc2_:LevelTip1 = null; + var _loc3_:LevelTip2 = null; + var _loc4_:String = null; + for each(_loc1_ in this.levelInfo) + { + _loc4_ = "进入级别:" + _loc1_.leagueName + "
"; + _loc4_ = _loc4_ + "开启时间:" + _loc1_.startTime + "
"; + _loc4_ = _loc4_ + "结束时间:" + _loc1_.endTime + "
"; + _loc4_ = _loc4_ + "升级人数:" + _loc1_.upgradeNum + "
"; + _loc4_ = _loc4_ + "降级人数:" + _loc1_.downgradeNum + "
"; + new MulTipTitle(this["league_sp" + _loc1_.leagueLevel],face.stage,face.tip_bg,_loc4_,150); + this.levelMcArr.push(_loc1_.leagueLevel); + } + _loc2_ = new LevelTip1(this.tip1,face.stage,face.tip_bg); + _loc2_.init(this.levelInfo); + _loc3_ = new LevelTip2(this.tip2,face.stage,face.tip_bg); + _loc3_.init(this.levelInfo); + } + + private function openJungongShop(param1:MouseEvent) : void + { + ShopUI.getInstance().open(4); + } + + private function openRank(param1:MouseEvent) : void + { + var _loc2_:RankingMainUI = RankingMainUI.getInstance(); + _loc2_.setStartPage(2); + UIListManage.getInstance().addUI(_loc2_); + } + + private function enterHall(param1:MouseEvent) : void + { + ConnectService.getInstance().leagueService.enterHall(); + } + + private function enterLeagueView(param1:LeagueEvent) : void + { + if(this.leagueEnterUI == null) + { + this.leagueEnterUI = new LeagueEnterUI(); + } + this.leagueEnterUI.setData(param1.obj); + this.leagueEnterUI.show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/league/LeagueBuild.as b/flash_decompiled/com/view/ui/league/LeagueBuild.as new file mode 100644 index 0000000..e229592 --- /dev/null +++ b/flash_decompiled/com/view/ui/league/LeagueBuild.as @@ -0,0 +1,53 @@ +package com.view.ui.league +{ + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class LeagueBuild extends BaseBuild + { + + private var tipStr:String; + + public function LeagueBuild(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/liansai.swf"; + super.buildData = param1; + super.loadSwfBg(); + super.addEvent(); + super.createNpcTip(); + this.buttonMode = true; + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

百战千军

"; + npcTipStr += "战国中用于各国军队比试和接受评议的机构,取得优异表现的君主可获得大量军工
"; + npcTipStr += "君主20级可参加"; + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(buildUI == null) + { + buildUI = new LeagueBattleUI(); + } + 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/league/LeagueEnterUI.as b/flash_decompiled/com/view/ui/league/LeagueEnterUI.as new file mode 100644 index 0000000..2cde05c --- /dev/null +++ b/flash_decompiled/com/view/ui/league/LeagueEnterUI.as @@ -0,0 +1,651 @@ +package com.view.ui.league +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.LeagueEvent; + import com.data.data.hero.Hero; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.sprite.MessListBar; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIHeroItem; + 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.battle.BattleViewUI; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.league.mc.JoinUserMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.RankingMainUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class LeagueEnterUI extends PlayUI + { + + private var leagueObj:Object; + + private var bgSp:Sprite; + + private var title1:UITitleBg; + + private var tableMc:UITable; + + private var bg2:UIWindowBg; + + private var ranking_btn:UIButton; + + private var changeHero_btn:UIButton; + + private var tongbing_btn:UIButton; + + private var txt_time:TextField; + + private var txt_level:TextField; + + private var txt_succ:TextField; + + private var txt_res:TextField; + + private var txt_stage:TextField; + + private var userListVec:Vector.; + + private var joinMc:Sprite; + + private var scrollPane:ScrollPane; + + private var allTextBar:MessListBar; + + private var btnArr:Array; + + private var leagueLevel:int; + + private var viewBattleBtn:UIButton; + + private var backBtn:UIButton; + + private var leaveBtn:UIButton; + + private var startBtn:UIButton; + + private var isInHall:int; + + private var lastFightId:String = ""; + + private var heroIdList:Vector. = new Vector.(); + + private var heroMcVec:Vector.; + + private var status:int; + + private var time:int; + + private var timeStr:String; + + private var timer:Timer; + + public function LeagueEnterUI() + { + super(); + super.addUIBg(); + this.setPosition(); + super.loadTitle(UITitleConfig.title_baizhanqianjun); + this.createUI(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + public function setData(param1:Object) : void + { + this.leagueObj = param1; + } + + override public function createUI() : void + { + var _loc5_:UIWindowBg = null; + var _loc9_:TextField = null; + var _loc10_:TextField = null; + var _loc12_:UIHeroItem = null; + var _loc13_:JoinUserMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["序号","玩家","胜","负","积分"]; + var _loc3_:Array = [40,100,45,45,60]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(10,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(330,266); + _loc1_.addChild(this.bg2); + this.bg2.x = this.tableMc.x + this.tableMc.width + 1; + this.bg2.y = this.tableMc.y; + this.title1 = new UITitleBg("参战信息",this.bg2.width); + this.bg2.addChild(this.title1); + this.title1.x = int(this.bg2.width / 2 - this.title1.width / 2); + this.bgSp = new Sprite(); + this.bg2.addChild(this.bgSp); + this.bgSp.x = 2; + this.bgSp.y = 25; + var _loc4_:String = "pic/bg/bg_baizhan1.jpg"; + loadBg(_loc4_); + _loc5_ = new UIWindowBg(); + _loc5_.initThirdPanel(621,113); + _loc1_.addChild(_loc5_); + _loc5_.x = 4; + _loc5_.y = this.tableMc.y + this.tableMc.height + 3; + this.heroMcVec = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 5) + { + _loc12_ = new UIHeroItem(); + _loc5_.addChild(_loc12_); + _loc12_.x = 5 + _loc6_ * 124; + _loc12_.y = 5; + this.heroMcVec.push(_loc12_); + _loc6_++; + } + this.ranking_btn = new UIButton("排 行",2,10); + _loc5_.addChild(this.ranking_btn); + this.ranking_btn.x = 10; + this.ranking_btn.y = 95; + this.changeHero_btn = new UIButton("更 换",2,10); + _loc5_.addChild(this.changeHero_btn); + this.changeHero_btn.x = this.ranking_btn.x + this.ranking_btn.width + 5; + this.changeHero_btn.y = this.ranking_btn.y; + this.tongbing_btn = new UIButton("配 兵",2,10); + _loc5_.addChild(this.tongbing_btn); + this.tongbing_btn.x = this.changeHero_btn.x + this.changeHero_btn.width + 5; + this.tongbing_btn.y = this.ranking_btn.y; + this.allTextBar = new MessListBar(); + this.allTextBar.setSize(320,143); + this.allTextBar.create(); + this.bg2.addChild(this.allTextBar); + this.allTextBar.x = 5; + this.allTextBar.y = 26; + var _loc7_:Sprite = PublicMethod.getTrLine(330); + this.bg2.addChild(_loc7_); + _loc7_.x = 5; + _loc7_.y = this.allTextBar.y + this.allTextBar.height + 3; + this.txt_time = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,200); + this.bg2.addChild(this.txt_time); + this.txt_time.x = 10; + this.txt_time.y = _loc7_.y + 8; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + this.bg2.addChild(_loc8_); + _loc8_.x = this.txt_time.x; + _loc8_.y = this.txt_time.y + 20; + _loc8_.text = "当前级别:"; + this.txt_level = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + this.bg2.addChild(this.txt_level); + this.txt_level.x = _loc8_.x + _loc8_.width; + this.txt_level.y = _loc8_.y; + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + this.bg2.addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y + 20; + _loc9_.text = "胜利次数:"; + this.txt_succ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + this.bg2.addChild(this.txt_succ); + this.txt_succ.x = _loc9_.x + _loc9_.width; + this.txt_succ.y = _loc9_.y; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + this.bg2.addChild(_loc10_); + _loc10_.x = _loc8_.x; + _loc10_.y = _loc9_.y + 20; + _loc10_.text = "挑战次数:"; + this.txt_res = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + this.bg2.addChild(this.txt_res); + this.txt_res.x = _loc10_.x + _loc10_.width; + this.txt_res.y = _loc10_.y; + this.viewBattleBtn = new UIButton("观 战",2,10); + _loc5_.addChild(this.viewBattleBtn); + this.viewBattleBtn.x = 485; + this.viewBattleBtn.y = this.ranking_btn.y; + this.backBtn = new UIButton("退 出",2,10); + _loc5_.addChild(this.backBtn); + this.backBtn.addEventListener(MouseEvent.CLICK,this.exitLeague,false,0,true); + this.backBtn.x = this.viewBattleBtn.x + this.viewBattleBtn.width + 5; + this.backBtn.y = this.ranking_btn.y; + this.leaveBtn = new UIButton("放 弃",2,10); + _loc5_.addChild(this.leaveBtn); + this.leaveBtn.x = this.backBtn.x; + this.leaveBtn.y = this.backBtn.y; + this.startBtn = new UIButton("挑 战",2,10); + _loc5_.addChild(this.startBtn); + this.startBtn.x = 275; + this.startBtn.y = this.leaveBtn.y; + this.startBtn.onClick = this.fight; + this.changeHero_btn.onClick = this.selectHero; + this.ranking_btn.onClick = this.openRanking; + this.tongbing_btn.onClick = this.openArmyUI; + this.viewBattleBtn.onClick = this.viewBattle; + this.backBtn.onClick = this.exitLeague; + this.leaveBtn.onClick = this.leaveLeague; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(285,251); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.x = 1; + this.scrollPane.y = 25; + this.joinMc = new Sprite(); + this.scrollPane.source = this.joinMc; + this.userListVec = new Vector.(); + var _loc11_:int = 0; + while(_loc11_ < 10) + { + _loc13_ = new JoinUserMc(); + this.userListVec.push(_loc13_); + this.joinMc.addChild(_loc13_); + _loc13_.setData(null,0); + _loc13_.y = 25 * _loc11_; + _loc13_.x = 3; + _loc11_++; + } + this.scrollPane.update(); + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bgSp.addChild(param1); + param1.width = 336; + param1.height = 144; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(this.userListVec) + { + this.init(); + } + ConnectService.getInstance().addEventListener(LeagueEvent.LEAGUE_CHANGEHERO,this.changeHeroListResult); + ConnectService.getInstance().addEventListener(LeagueEvent.LEAGUE_REFRESHHALLINFO,this.refreshHallInfoResult); + ConnectService.getInstance().addEventListener(LeagueEvent.LEAGUE_JOIN,this.joinResult); + ConnectService.getInstance().addEventListener(LeagueEvent.LEAGUE_LEAVE,this.leaveHallResult); + Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(LeagueEvent.LEAGUE_CHANGEHERO,this.changeHeroListResult); + ConnectService.getInstance().removeEventListener(LeagueEvent.LEAGUE_REFRESHHALLINFO,this.refreshHallInfoResult); + ConnectService.getInstance().removeEventListener(LeagueEvent.LEAGUE_JOIN,this.joinResult); + ConnectService.getInstance().removeEventListener(LeagueEvent.LEAGUE_LEAVE,this.leaveHallResult); + Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc); + this.stopTime(); + this.clearUserList(); + if(Boolean(ArmySetUI.instance) && contains(ArmySetUI.instance)) + { + removeChild(ArmySetUI.instance); + } + } + + private function changeArmySucc(param1:DevEvent) : void + { + this.refreshHallInfo(); + } + + private function initHeroView(param1:Array) : void + { + var _loc2_:* = undefined; + this.clearHeroIdList(); + for(_loc2_ in this.heroMcVec) + { + if(param1[_loc2_]) + { + this.heroIdList.push(param1[_loc2_].heroId); + this.heroMcVec[_loc2_].setData(param1[_loc2_]); + } + else + { + this.heroMcVec[_loc2_].setData(null); + } + } + } + + private function initSelfMesList(param1:Array) : void + { + } + + private function initAllMesList(param1:Array) : void + { + var _loc3_:String = null; + var _loc2_:String = ""; + if(param1 == null || param1.length == 0) + { + this.allTextBar.appendTxt(_loc2_); + return; + } + for each(_loc3_ in param1) + { + _loc2_ += _loc3_; + } + this.allTextBar.appendTxt(_loc2_); + } + + private function initUserList(param1:Array) : void + { + var _loc4_:JoinUserMc = null; + this.clearUserList(); + if(param1 == null || param1.length == 0) + { + return; + } + var _loc2_:int = int(param1.length); + var _loc3_:int = 0; + while(_loc3_ < _loc2_) + { + if(_loc3_ > 7) + { + _loc4_ = new JoinUserMc(); + this.userListVec.push(_loc4_); + this.joinMc.addChild(_loc4_); + _loc4_.y = 24 * _loc3_; + } + this.userListVec[_loc3_].setData(param1[_loc3_],_loc3_ + 1); + _loc3_++; + } + this.scrollPane.update(); + } + + private function clearUserList() : void + { + var _loc1_:int = int(this.userListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ > 9) + { + this.joinMc.removeChild(this.userListVec[_loc2_]); + this.userListVec.splice(_loc2_,1); + } + else + { + this.userListVec[_loc2_].setData(null,0); + } + _loc2_--; + } + this.scrollPane.update(); + } + + private function initBtnStatus() : void + { + if(this.isInHall == 1) + { + this.changeHero_btn.setUnEnable(); + this.tongbing_btn.setUnEnable(); + this.leaveBtn.visible = true; + this.backBtn.visible = false; + } + else + { + this.changeHero_btn.setEnable(); + this.tongbing_btn.setEnable(); + this.leaveBtn.visible = false; + this.backBtn.visible = true; + } + if(this.lastFightId == "") + { + this.viewBattleBtn.setUnEnable(); + } + else + { + this.viewBattleBtn.setEnable(); + } + if(this.status == 1) + { + this.startBtn.setUnEnable(); + } + else if(this.isInHall == 1) + { + this.startBtn.setUnEnable(); + } + else + { + this.startBtn.setEnable(); + } + } + + private function clearHeroIdList() : void + { + if(this.heroIdList.length > 0) + { + this.heroIdList = new Vector.(); + } + } + + private function init() : void + { + var _loc1_:Object = null; + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:Object = null; + var _loc5_:String = null; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:int = 0; + var _loc10_:int = 0; + var _loc11_:Array = null; + var _loc12_:Array = null; + var _loc13_:Array = null; + var _loc14_:Array = null; + if(this.leagueObj) + { + _loc1_ = this.leagueObj.hallInfo; + this.leagueLevel = _loc1_.leagueLevel; + _loc2_ = _loc1_.leagueName; + _loc3_ = int(_loc1_.timeInfo.time); + this.timeStr = _loc1_.timeInfo.timeStatus; + this.startTime(_loc3_); + this.status = _loc1_.status; + _loc4_ = this.leagueObj.selfInfo; + _loc5_ = _loc4_.selfLevel; + this.lastFightId = _loc4_.lastFightId; + _loc6_ = int(_loc4_.maxJoin); + _loc7_ = int(_loc4_.roundWinNum); + _loc8_ = int(_loc4_.winNum); + _loc9_ = int(_loc4_.inHall); + _loc10_ = int(_loc4_.joinTimes); + _loc11_ = _loc4_.heroList as Array; + this.initHeroView(_loc11_); + this.isInHall = _loc4_.inHall; + this.initBtnStatus(); + _loc12_ = this.leagueObj.otherMesList; + this.initAllMesList(_loc12_); + _loc13_ = this.leagueObj.rankInfo; + this.initUserList(_loc13_); + _loc14_ = this.leagueObj.selfMesList; + this.initAllMesList(_loc14_); + this.txt_level.text = _loc5_; + this.txt_succ.text = "" + _loc7_; + this.txt_res.text = _loc10_ + "/" + _loc6_; + } + } + + private function startTime(param1:int) : void + { + if(param1 <= 0) + { + return; + } + this.time = param1 + 1; + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.enterFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function enterFrame(param1:TimerEvent) : void + { + this.txt_time.text = this.timeStr + ":" + PublicMethod.getTime(this.time); + --this.time; + if(this.time <= 0) + { + this.stopTime(); + this.refreshHallInfo(); + } + } + + private function stopTime() : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.enterFrame); + this.timer = null; + this.txt_time.text = ""; + } + } + + private function exitLeague(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确认退出吗",this.configExit); + } + + private function configExit() : void + { + closeUI(null); + } + + private function viewBattle(param1:MouseEvent) : void + { + var _loc2_:BattleViewUI = BattleViewUI.getInstance(); + _loc2_.showUI(this.lastFightId); + } + + private function changeHeroList() : void + { + var _loc1_:HeroListSelectUI = HeroListSelectUI.getInstance(); + _loc1_.setSelectheroArr(this.heroIdList); + addChild(_loc1_); + _loc1_.x = 0; + _loc1_.y = 0; + _loc1_.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().leagueService.changeHeroList(_loc2_); + } + + public function refreshHallInfo() : void + { + ConnectService.getInstance().leagueService.refreshHallInfo(); + } + + private function changeHeroListResult(param1:LeagueEvent) : void + { + this.refreshHallInfo(); + } + + private function refreshHallInfoResult(param1:LeagueEvent) : void + { + this.leagueObj = param1.obj; + this.init(); + } + + private function joinLeague() : void + { + var _loc2_:int = 0; + var _loc1_:Array = new Array(); + for each(_loc2_ in this.heroIdList) + { + _loc1_.push(_loc2_); + } + ConnectService.getInstance().leagueService.joinLeague(this.leagueLevel,_loc1_); + } + + private function joinResult(param1:LeagueEvent) : void + { + this.leagueObj = param1.obj; + this.init(); + } + + private function selectHero(param1:MouseEvent) : void + { + this.changeHeroList(); + } + + private function leaveLeague(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确认放弃吗",this.configLeave); + } + + private function configLeave() : void + { + ConnectService.getInstance().leagueService.leaveHall(); + } + + private function leaveHallResult(param1:LeagueEvent) : void + { + closeUI(null); + } + + private function openRanking(param1:MouseEvent) : void + { + var _loc2_:RankingMainUI = RankingMainUI.getInstance(); + _loc2_.setStartPage(2); + _loc2_.show(); + } + + private function openArmyUI(param1:MouseEvent) : void + { + var _loc2_:ArmySetUI = ArmySetUI.getInstance(); + _loc2_.open(this); + _loc2_.x = 0; + _loc2_.y = 0; + } + + private function fight(param1:MouseEvent) : void + { + if(this.status == 2) + { + this.joinLeague(); + } + } + + private function refreshRoomUser() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/league/mc/JoinUserMc.as b/flash_decompiled/com/view/ui/league/mc/JoinUserMc.as new file mode 100644 index 0000000..1295036 --- /dev/null +++ b/flash_decompiled/com/view/ui/league/mc/JoinUserMc.as @@ -0,0 +1,119 @@ +package com.view.ui.league.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class JoinUserMc extends Sprite + { + + private var textField1:TextField; + + private var textField2:TextField; + + private var textField3:TextField; + + private var textField4:TextField; + + private var textField5:TextField; + + private var css:TextFormat; + + private var bg:Sprite; + + private var currDate:Object; + + public function JoinUserMc() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,276,25); + this.bg.alpha = 0.2; + addChild(this.bg); + this.bg.visible = false; + this.css = PublicMethod.getCenterTextFormat(); + this.textField1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,36); + this.textField2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.textField3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,45); + this.textField4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,45); + this.textField5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,54); + addChild(this.textField1); + addChild(this.textField2); + addChild(this.textField3); + addChild(this.textField4); + addChild(this.textField5); + this.textField1.y = 4; + this.textField2.y = this.textField1.y; + this.textField3.y = this.textField1.y; + this.textField4.y = this.textField1.y; + this.textField5.y = this.textField1.y; + this.textField2.mouseEnabled = true; + this.textField2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.textField2.x = this.textField1.width; + this.textField3.x = this.textField2.x + this.textField2.width; + this.textField4.x = this.textField3.x + this.textField3.width; + this.textField5.x = this.textField4.x + this.textField4.width; + var _loc1_:Sprite = PublicMethod.getTrLine(276); + addChild(_loc1_); + this.textField1.defaultTextFormat = this.css; + this.textField2.defaultTextFormat = this.css; + this.textField3.defaultTextFormat = this.css; + this.textField4.defaultTextFormat = this.css; + this.textField5.defaultTextFormat = this.css; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.currDate) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.currDate) + { + this.bg.visible = true; + } + } + + public function setData(param1:Object, param2:int) : void + { + this.currDate = param1; + if(param1 == null) + { + this.textField1.text = ""; + this.textField2.text = ""; + this.textField3.text = ""; + this.textField4.text = ""; + this.textField5.text = ""; + this.bg.visible = false; + } + else + { + this.bg.visible = false; + this.textField1.text = param2.toString(); + this.textField2.htmlText = "" + param1.userName + ""; + this.textField3.text = param1.winNum; + this.textField4.text = param1.loseNum; + this.textField5.text = param1.integral; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/league/mc/LevelTip1.as b/flash_decompiled/com/view/ui/league/mc/LevelTip1.as new file mode 100644 index 0000000..870f417 --- /dev/null +++ b/flash_decompiled/com/view/ui/league/mc/LevelTip1.as @@ -0,0 +1,158 @@ +package com.view.ui.league.mc +{ + 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 LevelTip1 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 css:TextFormat; + + public function LevelTip1(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); + } + + public function init(param1:Array) : void + { + var _loc6_:Shape = null; + var _loc8_:* = undefined; + var _loc9_:Shape = null; + var _loc10_:Sprite = null; + this.css = PublicMethod.getCenterTextFormat(); + var _loc2_:int = 0; + while(_loc2_ < 10) + { + _loc9_ = this.getTd(); + this._Container.addChild(_loc9_); + _loc9_.x = 15; + _loc9_.y = 10 + _loc2_ * 25; + _loc2_++; + } + var _loc3_:Shape = this.getTr(); + this._Container.addChild(_loc3_); + _loc3_.x = 15; + _loc3_.y = 10; + var _loc4_:Shape = this.getTr(); + this._Container.addChild(_loc4_); + _loc4_.x = 70; + _loc4_.y = _loc3_.y; + var _loc5_:Shape = this.getTr(); + this._Container.addChild(_loc5_); + _loc5_.x = 165; + _loc5_.y = _loc3_.y; + _loc6_ = this.getTr(); + this._Container.addChild(_loc6_); + _loc6_.x = 260; + _loc6_.y = _loc3_.y; + var _loc7_:Sprite = this.getMc("军衔","开启时间","结束时间",16777215); + this._Container.addChild(_loc7_); + for(_loc8_ in param1) + { + _loc10_ = this.getMc(param1[_loc8_].leagueName,param1[_loc8_].startTime,param1[_loc8_].endTime); + this._Container.addChild(_loc10_); + _loc10_.x = 15; + _loc10_.y = 37 + _loc8_ * 25; + } + _loc7_.x = 15; + _loc7_.y = 12; + this._table_bg = new Scale9Grid(this._bgSprite,255,224); + this._Container.addChildAt(this._table_bg,0); + } + + private function getMc(param1:String, param2:String, param3:String, param4:uint = 6029147) : Sprite + { + var _loc5_:Sprite = new Sprite(); + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(param4,55); + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(param4,95); + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(param4,95); + _loc5_.addChild(_loc6_); + _loc6_.text = param1; + _loc5_.addChild(_loc7_); + _loc7_.text = param2; + _loc7_.x = _loc6_.width; + _loc5_.addChild(_loc8_); + _loc8_.text = param3; + _loc8_.x = _loc7_.x + _loc7_.width; + _loc6_.setTextFormat(this.css); + _loc7_.setTextFormat(this.css); + _loc8_.setTextFormat(this.css); + return _loc5_; + } + + private function getTd() : Shape + { + return PublicMethod.drawLine(0,0,245,0,10852210); + } + + private function getTr() : Shape + { + return PublicMethod.drawLine(0,0,0,226,10852210); + } + + 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/ui/league/mc/LevelTip2.as b/flash_decompiled/com/view/ui/league/mc/LevelTip2.as new file mode 100644 index 0000000..2320c5f --- /dev/null +++ b/flash_decompiled/com/view/ui/league/mc/LevelTip2.as @@ -0,0 +1,149 @@ +package com.view.ui.league.mc +{ + 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 LevelTip2 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 css:TextFormat; + + public function LevelTip2(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); + } + + public function init(param1:Array) : void + { + var _loc6_:Sprite = null; + var _loc7_:* = undefined; + var _loc8_:Shape = null; + var _loc9_:Sprite = null; + this.css = PublicMethod.getCenterTextFormat(); + var _loc2_:int = 0; + while(_loc2_ < 10) + { + _loc8_ = this.getTd(); + this._Container.addChild(_loc8_); + _loc8_.x = 15; + _loc8_.y = 10 + _loc2_ * 25; + _loc2_++; + } + var _loc3_:Shape = this.getTr(); + this._Container.addChild(_loc3_); + _loc3_.x = 15; + _loc3_.y = 10; + var _loc4_:Shape = this.getTr(); + this._Container.addChild(_loc4_); + _loc4_.x = 70; + _loc4_.y = _loc3_.y; + var _loc5_:Shape = this.getTr(); + this._Container.addChild(_loc5_); + _loc5_.x = 165; + _loc5_.y = _loc3_.y; + _loc6_ = this.getMc("军衔","人数上限",16777215); + this._Container.addChild(_loc6_); + for(_loc7_ in param1) + { + _loc9_ = this.getMc(param1[_loc7_].leagueName,param1[_loc7_].num); + this._Container.addChild(_loc9_); + _loc9_.x = 15; + _loc9_.y = 37 + _loc7_ * 25; + } + _loc6_.x = 15; + _loc6_.y = 12; + this._table_bg = new Scale9Grid(this._bgSprite,160,224); + this._Container.addChildAt(this._table_bg,0); + } + + private function getMc(param1:String, param2:String, param3:uint = 6029147) : Sprite + { + var _loc4_:Sprite = new Sprite(); + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(param3,55); + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(param3,95); + _loc4_.addChild(_loc5_); + _loc5_.text = param1; + _loc4_.addChild(_loc6_); + _loc6_.text = param2; + _loc6_.x = _loc5_.width; + _loc5_.setTextFormat(this.css); + _loc6_.setTextFormat(this.css); + return _loc4_; + } + + private function getTd() : Shape + { + return PublicMethod.drawLine(0,0,150,0,10852210); + } + + private function getTr() : Shape + { + return PublicMethod.drawLine(0,0,0,225,10852210); + } + + 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/ui/leitai/GoldUI.as b/flash_decompiled/com/view/ui/leitai/GoldUI.as new file mode 100644 index 0000000..5b8f076 --- /dev/null +++ b/flash_decompiled/com/view/ui/leitai/GoldUI.as @@ -0,0 +1,114 @@ +package com.view.ui.leitai +{ + 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.MouseEvent; + + public class GoldUI extends BaseUI + { + + private static var instance:GoldUI; + + private var leitaiBuildUI:LeitaiBuildUI; + + private var btnArr:Array = new Array(); + + private var btn_1:UITabBtn; + + private var paneBg:UIWindowBg; + + private var lastbtn:UITabBtn; + + private var page1:Sprite; + + public function GoldUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_huangjintai); + super.setPosition(); + this.createUI(); + } + + public static function getInstance() : GoldUI + { + if(instance == null) + { + return instance = new GoldUI(); + } + return instance; + } + + override public function createUI() : void + { + var _loc1_:int = 0; + var _loc2_:UITabBtn = null; + this.btn_1 = new UITabBtn("聆听传道",2); + this.btnArr.push(this.btn_1); + for each(_loc2_ in this.btnArr) + { + addChild(_loc2_); + _loc2_.x = 25 + _loc1_ * 66; + _loc2_.y = 40; + _loc2_.onClick = this.clickTab; + _loc1_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + this.setBtnSelect(_loc2_); + } + + private function setBtnSelect(param1:UITabBtn) : void + { + var _loc2_:* = undefined; + var _loc3_:UITabBtn = null; + if(this.lastbtn) + { + this.lastbtn.select = false; + } + this.lastbtn = param1; + this.lastbtn.select = true; + for(_loc2_ in this.btnArr) + { + _loc3_ = this.btnArr[_loc2_] as UITabBtn; + if(param1 == _loc3_) + { + this.getPage(_loc2_); + break; + } + } + } + + private function getPage(param1:int) : void + { + if(param1 == 0) + { + this.getPage1(); + } + } + + private function getPage1() : void + { + if(this.page1 == null) + { + this.page1 = new LeitaiBuildUI(); + this.page1.x = 4; + this.page1.y = 4; + } + this.paneBg.addChild(this.page1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/leitai/LeitaiBuild.as b/flash_decompiled/com/view/ui/leitai/LeitaiBuild.as new file mode 100644 index 0000000..fcdc0cf --- /dev/null +++ b/flash_decompiled/com/view/ui/leitai/LeitaiBuild.as @@ -0,0 +1,46 @@ +package com.view.ui.leitai +{ + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class LeitaiBuild extends BaseBuild + { + + public function LeitaiBuild(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/leitai.swf"; + super.buildData = param1; + super.loadSwfBg(); + super.addEvent(); + super.createNpcTip(); + this.buttonMode = true; + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

黄金台

"; + npcTipStr += "雄伟高台,以黄金修撤,习武者皆欲登之一观,轩辕会武及聆听传道活动入口"; + } + + override public function getBuildNameMc() : MovieClip + { + if(_nameMc == null) + { + _nameMc = getBuildNameSp("黄金台"); + _nameMc.mouseEnabled = false; + _nameMc.mouseChildren = false; + setNameMcPosi(); + } + return _nameMc; + } + + override public function mouseClick(param1:MouseEvent) : void + { + GoldUI.getInstance().show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/leitai/LeitaiBuildUI.as b/flash_decompiled/com/view/ui/leitai/LeitaiBuildUI.as new file mode 100644 index 0000000..dade1cd --- /dev/null +++ b/flash_decompiled/com/view/ui/leitai/LeitaiBuildUI.as @@ -0,0 +1,101 @@ +package com.view.ui.leitai +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + 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 LeitaiBuildUI extends Sprite + { + + private var bg2:UIWindowBg; + + private var bgSp:Sprite; + + private var enterBtn:UIButton; + + private var bgloader:LoadResource; + + private var bgImg:Bitmap; + + private var lingTingUI:LingTingUI; + + public function LeitaiBuildUI() + { + var _loc4_:String = null; + var _loc5_:TextField = null; + super(); + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(372,367); + addChild(this.bg2); + this.bgSp = new Sprite(); + this.bg2.addChild(this.bgSp); + this.bgSp.x = 2; + this.bgSp.y = 2; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(235,367); + addChild(_loc1_); + _loc1_.x = this.bg2.x + this.bg2.width + 4; + _loc1_.y = this.bg2.y; + var _loc2_:UITitleBg = new UITitleBg("活动介绍",_loc1_.width); + _loc1_.addChild(_loc2_); + _loc2_.x = int(_loc1_.width / 2 - _loc2_.width / 2); + var _loc3_:String = "pic/bg/bg_lingting.jpg"; + this.loadBg(_loc3_); + _loc4_ = "1、消耗元宝可让武将聆听传道,获得武将经验。
"; + _loc4_ = _loc4_ + "2、聆听传道可获得的经验由当前武将等级与传道类型共同决定。
"; + _loc4_ = _loc4_ + "3、花费少量元宝聆听高级传道可获得大量经验,特级传道可获得海量经验
"; + _loc4_ = _loc4_ + "4、若可获得经验显示为0,请查看该武将是否应该进阶或晋封。
"; + _loc4_ = _loc4_ + "5、每位武将每日只能聆听一次任意类型的传道。"; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230); + _loc5_.height = 310; + _loc5_.wordWrap = true; + _loc5_.multiline = true; + _loc5_.selectable = false; + _loc1_.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = 30; + var _loc6_:TextFormat = new TextFormat(); + _loc6_.leading = 5; + _loc5_.defaultTextFormat = _loc6_; + _loc5_.htmlText = _loc4_; + this.enterBtn = new UIButton("聆听传道",3); + _loc1_.addChild(this.enterBtn); + this.enterBtn.x = 90; + this.enterBtn.y = 324; + this.enterBtn.onClick = this.openLingTing; + } + + private function loadBg(param1:String) : void + { + this.bgloader = new LoadResource(param1,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.bgImg = Bitmap(param1.target.loader.content); + this.bgSp.addChild(this.bgImg); + this.bgImg.width = 378; + this.bgImg.height = 373; + this.bgloader.clear(); + } + + private function openLingTing(param1:MouseEvent) : void + { + if(this.lingTingUI == null) + { + this.lingTingUI = new LingTingUI(); + } + this.lingTingUI.show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/leitai/LingTingUI.as b/flash_decompiled/com/view/ui/leitai/LingTingUI.as new file mode 100644 index 0000000..9240555 --- /dev/null +++ b/flash_decompiled/com/view/ui/leitai/LingTingUI.as @@ -0,0 +1,228 @@ +package com.view.ui.leitai +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.view.newui.UIConfig; + import com.view.newui.UITabBtn; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.leitai.mc.LeitaiMc; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class LingTingUI extends BaseUI + { + + private var tableMc:UITable; + + private var btnArr:Array; + + private var paneBg:UIWindowBg; + + private var btn_1:UITabBtn; + + private var btn_2:UITabBtn; + + private var btn_3:UITabBtn; + + private var btn_4:UITabBtn; + + private var label1:TextField; + + private var heroListVec:Vector.; + + private var heroList:Array; + + private var preBtn:UITabBtn; + + private var currType:int; + + public function LingTingUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_lingtingchuandao); + super.setPosition(); + this.createUI(); + } + + override public function createUI() : void + { + var _loc1_:int = 0; + var _loc2_:UITabBtn = null; + var _loc3_:Array = null; + var _loc4_:Array = null; + var _loc6_:LeitaiMc = null; + this.btnArr = new Array(); + this.btn_1 = new UITabBtn("高级传道",2); + this.btn_2 = new UITabBtn("特级传道",2); + this.btn_3 = new UITabBtn("高级领悟",2); + this.btn_4 = new UITabBtn("特级领悟",2); + this.btnArr.push(this.btn_1); + this.btnArr.push(this.btn_2); + this.btnArr.push(this.btn_3); + this.btnArr.push(this.btn_4); + for each(_loc2_ in this.btnArr) + { + addChild(_loc2_); + _loc2_.x = 25 + _loc1_ * 66; + _loc2_.y = 39; + _loc2_.onClick = this.clickTab; + _loc1_++; + } + _loc3_ = ["武将","等级","状态","当前经验","可获得经验","消耗元宝","剩余聆听次数","操作"]; + _loc4_ = [80,90,80,60,90,80,85,78]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 24; + this.tableMc.drawLine = true; + this.tableMc.install(15,_loc3_,_loc4_); + addChild(this.tableMc); + this.tableMc.x = 11; + this.tableMc.y = 64; + this.heroListVec = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 15) + { + _loc6_ = new LeitaiMc(); + this.tableMc.addChild(_loc6_); + this.heroListVec.push(_loc6_); + _loc6_.y = 25 + _loc5_ * 24; + _loc6_.x = 4; + _loc5_++; + } + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,335); + addChild(this.label1); + this.label1.x = 300; + this.label1.y = 43; + this.label1.text = "传道级别越高,所获得经验越多,特级传道可获得海量经验。"; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_getLingTingHeroList,this.getHeroResult); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_lingTingHero,this.lingTingHeroResult); + this.getAllHero(); + } + + private function getAllHero() : void + { + ConnectService.getInstance().heroService.getLingTingHeroList(); + } + + private function getHeroResult(param1:HeroEvent) : void + { + this.heroList = param1.heroList; + this.showHeroList(); + if(this.currType == 4) + { + this.btn_4.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + else if(this.currType == 3) + { + this.btn_3.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + else if(this.currType == 2) + { + this.btn_2.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + else + { + this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + } + + private function clickTab(param1:MouseEvent) : void + { + if(this.preBtn) + { + this.preBtn.select = false; + } + this.preBtn = param1.currentTarget as UITabBtn; + this.preBtn.select = true; + if(param1.currentTarget == this.btn_1) + { + this.setCurrType(1); + } + else if(param1.currentTarget == this.btn_2) + { + this.setCurrType(2); + } + else if(param1.currentTarget == this.btn_3) + { + this.setCurrType(3); + } + else + { + this.setCurrType(4); + } + } + + private function setCurrType(param1:int) : void + { + var _loc2_:LeitaiMc = null; + var _loc3_:Array = null; + this.currType = param1; + if(this.currType > 2) + { + _loc3_ = ["武将","等级","状态","当前功勋","可获得功勋","消耗元宝","剩余领悟次数","操作"]; + this.tableMc.setTitleList(_loc3_); + } + else + { + _loc3_ = ["武将","等级","状态","当前经验","可获得经验","消耗元宝","剩余聆听次数","操作"]; + this.tableMc.setTitleList(_loc3_); + } + for each(_loc2_ in this.heroListVec) + { + _loc2_.setLingTingType(param1); + } + } + + private function showHeroList() : void + { + var _loc2_:Object = null; + if(this.heroList == null || this.heroList.length == 0) + { + this.clearHero(); + return; + } + var _loc1_:int = 0; + while(_loc1_ < this.heroList.length) + { + _loc2_ = this.heroList[_loc1_] as Object; + this.heroListVec[_loc1_].setHero(_loc2_); + _loc1_++; + } + } + + private function clearHero() : void + { + var _loc1_:int = int(this.heroListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.heroListVec[_loc2_].setHero(null); + _loc2_--; + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_getLingTingHeroList,this.getHeroResult); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_lingTingHero,this.lingTingHeroResult); + this.clearHero(); + } + + private function lingTingHeroResult(param1:HeroEvent) : void + { + this.getAllHero(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/leitai/mc/LeitaiMc.as b/flash_decompiled/com/view/ui/leitai/mc/LeitaiMc.as new file mode 100644 index 0000000..88330d6 --- /dev/null +++ b/flash_decompiled/com/view/ui/leitai/mc/LeitaiMc.as @@ -0,0 +1,261 @@ +package com.view.ui.leitai.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.tip.TipTitle; + import com.view.ui.hero.HeroConst; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class LeitaiMc extends Sprite + { + + private var bg:Sprite; + + private var centerCss:TextFormat; + + public var hero:Object; + + private var lingtingBtn:UISmallBtn; + + private var text1:TextField; + + private var text2:TextField; + + private var text3:TextField; + + private var text4:TextField; + + private var text5:TextField; + + private var text6:TextField; + + private var text7:TextField; + + private var text8:TextField; + + private var heroExpSp:Sprite; + + private var expTip:TipTitle; + + private var type:int; + + public function LeitaiMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(630); + addChild(_loc1_); + _loc1_.y = 24; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,630,23); + addChild(this.bg); + this.bg.y = 1; + this.bg.alpha = 0; + this.centerCss = PublicMethod.getCenterTextFormat(); + addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true); + this.lingtingBtn = new UISmallBtn("传 道",2); + this.lingtingBtn.onClick = this.giveExp; + addChild(this.lingtingBtn); + this.text1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,76); + addChild(this.text1); + this.text1.y = 4; + this.text1.defaultTextFormat = this.centerCss; + this.text2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + addChild(this.text2); + this.text2.defaultTextFormat = this.centerCss; + this.text2.x = this.text1.x + this.text1.width; + this.text2.y = this.text1.y; + this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.text3); + this.text3.defaultTextFormat = this.centerCss; + this.text3.x = this.text2.x + this.text2.width; + this.text3.y = this.text1.y; + this.text4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.text4); + this.text4.defaultTextFormat = this.centerCss; + this.text4.x = this.text3.x + this.text3.width; + this.text4.y = this.text1.y; + this.text8 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.text8); + this.text8.defaultTextFormat = this.centerCss; + this.text8.x = this.text4.x; + this.text8.y = this.text4.y; + this.text8.visible = false; + this.heroExpSp = PublicMethod.createShape(16777215,60,18); + addChild(this.heroExpSp); + this.heroExpSp.x = this.text4.x; + this.heroExpSp.y = this.text4.y; + this.heroExpSp.alpha = 0; + this.expTip = new TipTitle(this.heroExpSp,InstallFace.getInstance().stage,InstallFace.getInstance().tip_bg,{"titletext":"经验"}); + this.text5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + addChild(this.text5); + this.text5.defaultTextFormat = this.centerCss; + this.text5.x = this.text4.x + this.text4.width; + this.text5.y = this.text1.y; + this.text6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.text6); + this.text6.defaultTextFormat = this.centerCss; + this.text6.x = int(this.text5.x + this.text5.width); + this.text6.y = int(this.text1.y); + this.text7 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,85); + addChild(this.text7); + this.text7.defaultTextFormat = this.centerCss; + this.text7.x = int(this.text6.x + this.text6.width); + this.text7.y = int(this.text1.y); + this.lingtingBtn.x = this.text7.x + this.text7.width + 12; + this.lingtingBtn.y = 2; + this.lingtingBtn.visible = false; + } + + public function setHero(param1:Object) : void + { + var _loc2_:int = 0; + this.hero = param1; + if(this.hero == null) + { + this.lingtingBtn.visible = false; + this.text1.text = ""; + this.text2.text = ""; + this.text3.text = ""; + this.text4.text = ""; + this.text5.text = ""; + this.text6.text = ""; + this.text7.text = ""; + this.text8.text = ""; + this.expTip.destroyTip(); + } + else + { + this.lingtingBtn.visible = true; + this.text1.htmlText = param1.showName; + this.text2.text = HeroConst.changeName(param1.level,param1.changeCount); + this.text3.text = param1.actionStatusChn; + _loc2_ = param1.currexp * 100 / param1.mapexp; + this.text4.text = _loc2_ + "%"; + this.text5.text = param1.mapexp; + this.text6.text = param1.getHightCash; + this.text8.text = param1.merit; + this.expTip.infoObject = {"titletext":"当前经验:" + param1.currexp + "/" + param1.mapexp + " 还需 " + (param1.mapexp - param1.currexp) + " 经验升级"}; + } + this.setLingTingType(this.type); + } + + public function setLingTingType(param1:int) : void + { + this.type = param1; + if(this.hero) + { + if(param1 == 1) + { + this.text6.text = this.hero.getHightCash; + this.text5.text = this.hero.getHightExp; + this.text7.text = this.hero.canGetExp1; + if(this.hero.canGetExp1 > 0) + { + this.lingtingBtn.setEnable(); + } + else + { + this.lingtingBtn.setUnEnable(); + } + this.lingtingBtn.setText("传 道"); + this.text8.visible = false; + this.text4.visible = true; + this.heroExpSp.visible = true; + } + else if(param1 == 2) + { + this.text6.text = this.hero.getSuperCash; + this.text5.text = this.hero.getSuperExp; + this.text7.text = this.hero.canGetExp2; + if(this.hero.canGetExp2 > 0) + { + this.lingtingBtn.setEnable(); + } + else + { + this.lingtingBtn.setUnEnable(); + } + this.lingtingBtn.setText("传 道"); + this.text8.visible = false; + this.text4.visible = true; + this.heroExpSp.visible = true; + } + else if(param1 == 3) + { + this.text5.text = this.hero.Lingwu_addMert; + this.text6.text = this.hero.LingwuCash; + this.text7.text = this.hero.Lingwutimes; + this.text4.visible = false; + this.text8.visible = true; + this.heroExpSp.visible = false; + this.lingtingBtn.setText("领 悟"); + if(this.hero.Lingwutimes > 0) + { + this.lingtingBtn.setEnable(); + } + else + { + this.lingtingBtn.setUnEnable(); + } + } + else + { + this.text5.text = this.hero.SuperLingwu_addMert; + this.text6.text = this.hero.SuperLingwuCash; + this.text7.text = this.hero.SuperLingwutimes; + this.text4.visible = false; + this.text8.visible = true; + this.heroExpSp.visible = false; + this.lingtingBtn.setText("领 悟"); + if(this.hero.SuperLingwutimes > 0) + { + this.lingtingBtn.setEnable(); + } + else + { + this.lingtingBtn.setUnEnable(); + } + } + } + } + + private function rollOut(param1:MouseEvent) : void + { + if(this.hero) + { + this.bg.alpha = 0; + } + } + + private function rollOver(param1:MouseEvent) : void + { + if(this.hero) + { + this.bg.alpha = 0.2; + } + } + + private function giveExp(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + if(this.type > 2) + { + ConnectService.getInstance().heroService.addHeroMerit(int(this.hero.heroId),this.type - 2); + } + else + { + ConnectService.getInstance().heroService.lingTing(int(this.hero.heroId),this.type); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/lingyange/LingYanGeEnter.as b/flash_decompiled/com/view/ui/lingyange/LingYanGeEnter.as new file mode 100644 index 0000000..a108b61 --- /dev/null +++ b/flash_decompiled/com/view/ui/lingyange/LingYanGeEnter.as @@ -0,0 +1,631 @@ +package com.view.ui.lingyange +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.play.event.HeroBabelEvent; + import com.view.mc.MyCellRenderer; + import com.view.newui.UIBigButton; + import com.view.newui.UIBorderMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.battle.HeroBattleViewUI; + import com.view.ui.herobattle.AutoBattleSetUI; + import com.view.ui.message.MessageBoxUI; + 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; + import flash.utils.setTimeout; + + public class LingYanGeEnter extends BaseUI + { + + private var paneBg:UIWindowBg; + + private var bg1:UIWindowBg; + + private var heroCombox:ComboBox; + + private var tft:TextFormat; + + private var imgSp:Sprite; + + private var helth:TextField; + + private var gongxun:TextField; + + private var dantiao:TextField; + + private var leftTimeText:TextField; + + private var fightBtn:UIBigButton; + + private var autnBtn:UIBigButton; + + private var medicalBtn:UIButton; + + private var viewBtn:UIButton; + + private var backBtn:UIButton; + + private var itemVec:Vector.; + + private var preItem:LingYanItem; + + private var battleName:String; + + private var topBattleId:int; + + private var topStageId:int; + + private var currbattleId:int; + + private var currStageId:int; + + private var loadHead:LoadResource; + + private var headImg:Bitmap; + + private var currHeroId:int; + + private var currHeroHp:int; + + private var allHeroList:Array; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var allStageList:Array; + + private var battleId:String; + + private var leftTime:int; + + private var battleTimeText:TextField; + + private var autoSetUI:AutoBattleSetUI; + + public function LingYanGeEnter() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_lingyange); + setPosition(); + this.createUI(); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 125; + window_heihgt = UIWindowBg.normal_window_h - 49; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 125; + ui_closeBtn.y = 10; + } + + override public function createUI() : void + { + var _loc1_:UIWindowBg = null; + var _loc2_:UIBorderMc = null; + var _loc3_:Sprite = null; + var _loc10_:int = 0; + var _loc11_:int = 0; + var _loc12_:LingYanItem = null; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(755,352); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 39; + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(536,340); + this.paneBg.addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + _loc1_ = new UIWindowBg(); + _loc1_.initThirdPanel(197,180); + this.paneBg.addChild(_loc1_); + _loc1_.x = this.bg1.x + this.bg1.width + 4; + _loc1_.y = this.bg1.y; + _loc2_ = new UIBorderMc(126); + _loc1_.addChild(_loc2_); + _loc2_.x = 0; + _loc2_.y = 1; + _loc2_.loadTitle(1); + _loc3_ = face.getSprite(ClassConfig.lib_herobg); + _loc1_.addChild(_loc3_); + _loc3_.x = 12; + _loc3_.y = 40; + this.imgSp = new Sprite(); + _loc3_.addChild(this.imgSp); + this.imgSp.x = 4; + this.imgSp.y = 4; + this.heroCombox = new ComboBox(); + _loc1_.addChild(this.heroCombox); + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.heroCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.heroCombox.x = _loc3_.x + _loc3_.width + 10; + this.heroCombox.y = 40; + this.heroCombox.addEventListener(Event.CHANGE,this.selectHero); + this.helth = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.gongxun = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.dantiao = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.leftTimeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + _loc1_.addChild(this.helth); + _loc1_.addChild(this.gongxun); + _loc1_.addChild(this.dantiao); + _loc1_.addChild(this.leftTimeText); + this.helth.x = this.heroCombox.x; + this.helth.y = 70; + this.gongxun.x = this.helth.x; + this.gongxun.y = this.helth.y + 20; + this.dantiao.x = this.helth.x; + this.dantiao.y = this.gongxun.y + 20; + this.leftTimeText.x = this.helth.x; + this.leftTimeText.y = this.dantiao.y + 20; + this.helth.text = ""; + this.gongxun.text = ""; + this.dantiao.text = ""; + this.leftTimeText.text = "剩余挑战机会:"; + this.medicalBtn = new UIButton("医 疗",2,10); + _loc1_.addChild(this.medicalBtn); + this.medicalBtn.x = this.helth.x; + this.medicalBtn.y = this.leftTimeText.y + 25; + this.medicalBtn.onClick = this.treatHero; + var _loc4_:UIWindowBg = new UIWindowBg(); + _loc4_.initThirdPanel(197,150); + this.paneBg.addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = _loc1_.y + _loc1_.height + 4; + var _loc5_:UIBorderMc = new UIBorderMc(126); + _loc4_.addChild(_loc5_); + _loc5_.x = 0; + _loc5_.y = 1; + _loc5_.loadTitle(2); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,188); + _loc4_.addChild(this.label1); + this.label1.x = 10; + this.label1.y = 40; + this.label1.text = "关卡名称:"; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,188); + _loc4_.addChild(this.label2); + this.label2.x = this.label1.x; + this.label2.y = this.label1.y + 20; + this.label2.text = "守关武将:"; + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,188); + _loc4_.addChild(this.label3); + this.label3.x = this.label1.x; + this.label3.y = this.label2.y + 20; + this.label3.text = "单 挑 力:"; + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,188); + _loc4_.addChild(this.label4); + this.label4.x = this.label1.x; + this.label4.y = this.label3.y + 20; + this.label4.text = "是否闯关:"; + this.viewBtn = new UIButton("观 战",2,10); + _loc4_.addChild(this.viewBtn); + this.viewBtn.x = 25; + this.viewBtn.y = this.label4.y + 25; + this.viewBtn.onClick = this.viewBattle; + this.backBtn = new UIButton("退出关卡",2,10); + _loc4_.addChild(this.backBtn); + this.backBtn.x = this.viewBtn.x + 90; + this.backBtn.y = this.viewBtn.y; + this.backBtn.onClick = this.backBattle; + var _loc6_:String = "bg_lingyange.jpg"; + loadBg(ServerConfig.IMG_BG_URL + _loc6_); + this.itemVec = new Vector.(); + var _loc7_:int = 0; + while(_loc7_ < 10) + { + _loc10_ = _loc7_ % 5; + _loc11_ = _loc7_ / 5; + _loc12_ = new LingYanItem(_loc7_ + 1); + this.paneBg.addChild(_loc12_); + _loc12_.x = 30 + 100 * _loc10_; + _loc12_.y = 30 + 100 * _loc11_; + _loc12_.addEventListener(MouseEvent.CLICK,this.clickItem); + _loc12_.buttonMode = true; + this.itemVec.push(_loc12_); + _loc7_++; + } + this.battleTimeText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,250); + this.battleTimeText.x = 210; + this.battleTimeText.y = 240; + this.paneBg.addChild(this.battleTimeText); + var _loc8_:Sprite = new Scale9Grid(face.getSprite(UIConfig.enter_bg),521,50); + this.paneBg.addChild(_loc8_); + _loc8_.x = 10; + _loc8_.y = 265; + this.fightBtn = new UIBigButton(1); + this.paneBg.addChild(this.fightBtn); + this.fightBtn.x = 165; + this.fightBtn.y = 280; + this.fightBtn.onClick = this.startFight; + this.autnBtn = new UIBigButton(2); + this.paneBg.addChild(this.autnBtn); + this.autnBtn.x = this.fightBtn.x + 120; + this.autnBtn.y = this.fightBtn.y; + this.autnBtn.onClick = this.autoSet; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,350); + _loc9_.text = "温馨提示:通过上一关才能挑战下一关"; + this.paneBg.addChild(_loc9_); + _loc9_.x = 150; + _loc9_.y = 320; + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg1.addChild(param1); + param1.width = 546; + param1.height = 354; + } + + private function clickItem(param1:MouseEvent) : void + { + if(this.preItem == param1.currentTarget) + { + return; + } + if(this.preItem) + { + this.preItem.setUnSelect(); + } + this.preItem = param1.currentTarget as LingYanItem; + this.preItem.setSelect(); + var _loc2_:int = 0; + while(_loc2_ < this.itemVec.length) + { + if(this.itemVec[_loc2_] == this.preItem) + { + this.showStageInfo(_loc2_); + break; + } + _loc2_++; + } + } + + public function setEnterData(param1:Object) : void + { + var _loc2_:int = 0; + var _loc3_:LingYanItem = null; + var _loc4_:String = null; + var _loc5_:int = 0; + var _loc6_:Object = null; + this.battleName = param1.battleStageInfo.battleName; + this.topBattleId = param1.battleStageInfo.topBattleId; + this.topStageId = param1.battleStageInfo.topStageId; + this.currbattleId = param1.battleStageInfo.battleId; + if(this.currbattleId < this.topBattleId) + { + for each(_loc3_ in this.itemVec) + { + _loc3_.setUnLock(); + } + } + else + { + for each(_loc3_ in this.itemVec) + { + if(_loc3_.getStageId() > this.topStageId) + { + _loc3_.setLock(); + } + else + { + _loc3_.setUnLock(); + } + } + } + this.allStageList = param1.battleStageInfo.stageInfo as Array; + this.currStageId = param1.battleStageInfo.nowStageOrder; + this.itemVec[this.currStageId - 1].dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + _loc2_ = int(param1.battleStageInfo.reliveTimes); + if(_loc2_ == 0) + { + _loc4_ = "你的复活次数已用尽,请返回战役重新挑战"; + MessageBoxUI.getInstance().confirmMsg(_loc4_,this.confirmBackBattle); + return; + } + this.leftTimeText.text = "剩余复活次数:" + _loc2_; + if(param1.battleStageInfo.allHeroList) + { + for each(_loc6_ in param1.battleStageInfo.allHeroList) + { + this.heroCombox.addItem({ + "label":_loc6_.name, + "data":_loc6_.heroId, + "color":"0x" + _loc6_.color + }); + this.heroCombox.dropdown.setStyle("cellRenderer",MyCellRenderer); + if(Boolean(param1.battleStageInfo.atkHero) && param1.battleStageInfo.atkHero.heroId == _loc6_.heroId) + { + this.heroCombox.selectedIndex = _loc5_; + } + _loc5_++; + } + } + this.allHeroList = param1.battleStageInfo.allHeroList as Array; + if(param1.battleStageInfo.atkHero == null) + { + this.heroCombox.selectedIndex = 0; + this.tft.color = this.heroCombox.selectedItem.color; + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.selectHeroById(param1.battleStageInfo.allHeroList[0].heroId); + } + else + { + this.tft.color = "0x" + param1.battleStageInfo.atkHero.color; + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.selectHeroById(param1.battleStageInfo.atkHero.heroId); + } + } + + private function loadHeroHead(param1:String) : void + { + param1 = "pic/head/" + param1; + this.loadHead = new LoadResource(param1,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.headImg.width = 65; + this.headImg.height = 80; + this.loadHead.clear(); + this.imgSp.addChild(this.headImg); + } + + private function confirmBackBattle() : void + { + ConnectService.getInstance().playService.stopChallenge(); + } + + private function selectHero(param1:Event) : void + { + var _loc2_:int = int(this.heroCombox.selectedItem.data); + if(_loc2_ == this.currHeroId) + { + return; + } + this.tft.color = this.heroCombox.selectedItem.color; + this.heroCombox.textField.setStyle("textFormat",this.tft); + this.selectHeroById(_loc2_); + } + + private function selectHeroById(param1:int) : void + { + var _loc2_:Object = null; + if(this.allHeroList == null) + { + return; + } + for each(_loc2_ in this.allHeroList) + { + if(_loc2_.heroId == param1) + { + this.currHeroId = param1; + this.helth.text = "健康度:" + _loc2_.hpStatus; + this.gongxun.text = "功勋值:" + _loc2_.merit; + this.dantiao.text = "单挑力:" + _loc2_.fightPower; + this.loadHeroHead(_loc2_.picPath); + this.currHeroId = _loc2_.heroId; + this.currHeroHp = _loc2_.hpStatus; + return; + } + } + } + + private function showStageInfo(param1:int) : void + { + var _loc2_:Object = this.allStageList[param1]; + this.label1.htmlText = "关卡名称:" + this.battleName + " 第" + _loc2_.stageOrder + "关"; + this.label2.htmlText = "守关武将:" + _loc2_.stageNpcName + ""; + this.label3.htmlText = "单 挑 力:" + _loc2_.power + ""; + this.label4.text = "是否闯关:是"; + } + + private function startFight(param1:MouseEvent) : void + { + if(this.currHeroId > 0) + { + ConnectService.getInstance().playService.startCombat(this.currHeroId); + } + else + { + MessageBoxUI.getInstance().addMessage("请先选择武将"); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_START,this.startCombatResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_REFRESH,this.refreshBattleResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_TREATHERO,this.treatHeroBack); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_BACK,this.backBabelResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_AUTOSET,this.saveAutoResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_AUTOSET_RESULT,this.autoBattleResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_START,this.startCombatResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_REFRESH,this.refreshBattleResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_TREATHERO,this.treatHeroBack); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_BACK,this.backBabelResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_AUTOSET,this.saveAutoResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_AUTOSET_RESULT,this.autoBattleResult); + } + + private function startCombatResult(param1:HeroBabelEvent) : void + { + this.battleId = param1.obj.fightId; + this.leftTime = int(param1.obj.combatFinishSeconds); + this.countBattleSec(); + this.viewBattleByFight(); + } + + private function viewBattleByFight() : void + { + var _loc1_:HeroBattleViewUI = null; + if(this.battleId != null && this.battleId != "") + { + _loc1_ = HeroBattleViewUI.getInstance(); + _loc1_.showUI(this.battleId); + } + else + { + MessageBoxUI.getInstance().addMessage("战斗已结束!"); + } + } + + private function countBattleSec() : void + { + this.battleTimeText.htmlText = "距离本关结束还有:" + this.leftTime + "秒"; + --this.leftTime; + if(this.leftTime >= 0) + { + setTimeout(this.countBattleSec,1000); + } + else + { + setTimeout(function():void + { + refreshBattle(); + battleTimeText.htmlText = ""; + },1000); + } + } + + private function refreshBattle() : void + { + ConnectService.getInstance().playService.refreshBattle(); + } + + private function refreshBattleResult(param1:HeroBabelEvent) : void + { + this.setEnterData(param1.obj); + } + + private function treatHero(param1:MouseEvent) : void + { + if(this.currHeroId <= 0) + { + return; + } + if(this.currHeroHp == 100) + { + MessageBoxUI.getInstance().addMessage("武将健康度已满,不用医疗"); + } + else + { + ConnectService.getInstance().playService.treatHero(this.currHeroId); + } + } + + private function treatHeroBack(param1:HeroBabelEvent) : void + { + this.helth.text = "健康度:100"; + this.currHeroHp = 100; + } + + private function backBattle(param1:MouseEvent) : void + { + var _loc2_:String = "是否退出关卡?退出将结束本次挑战."; + MessageBoxUI.getInstance().confirmMsg(_loc2_,this.confirmBackBattle); + } + + private function backBabelResult(param1:HeroBabelEvent) : void + { + closeUI(null); + } + + private function viewBattle(param1:MouseEvent) : void + { + this.viewBattleByFight(); + } + + private function autoSet(param1:MouseEvent) : void + { + if(this.autoSetUI == null) + { + this.autoSetUI = new AutoBattleSetUI(); + this.autoSetUI.x = 165; + this.autoSetUI.y = 40; + } + if(contains(this.autoSetUI)) + { + removeChild(this.autoSetUI); + } + else + { + addChild(this.autoSetUI); + this.autoSetUI.setBattleNums(10); + this.autoSetUI.setCurrBattle(this.currStageId); + } + } + + private function saveAutoResult(param1:HeroBabelEvent) : void + { + this.startCombatAuto(); + } + + private function startCombatAuto() : void + { + ConnectService.getInstance().playService.startCombatAuto(this.currHeroId); + } + + private function autoBattleResult(param1:HeroBabelEvent) : void + { + this.battleId = param1.obj.fightId; + this.leftTime = int(param1.obj.combatFinishSeconds); + this.countBattleSec(); + } + + private function setButtonStatus(param1:Boolean) : void + { + if(param1) + { + this.fightBtn.setUnEnable(); + this.autnBtn.setUnEnable(); + this.backBtn.setUnEnable(); + this.medicalBtn.setUnEnable(); + } + else + { + this.fightBtn.setEnable(); + this.autnBtn.setEnable(); + this.backBtn.setEnable(); + this.medicalBtn.setEnable(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/lingyange/LingYanGeUI.as b/flash_decompiled/com/view/ui/lingyange/LingYanGeUI.as new file mode 100644 index 0000000..d210f42 --- /dev/null +++ b/flash_decompiled/com/view/ui/lingyange/LingYanGeUI.as @@ -0,0 +1,309 @@ +package com.view.ui.lingyange +{ + import com.comfig.ServerConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.play.event.HeroBabelEvent; + import com.view.newui.UIBigButton; + import com.view.newui.UIConfig; + 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.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class LingYanGeUI extends PlayUI + { + + private var btnArr:Array; + + private var tab1:UITabBtn; + + private var tab2:UITabBtn; + + private var tab3:UITabBtn; + + private var tab4:UITabBtn; + + private var tab5:UITabBtn; + + private var tab6:UITabBtn; + + private var tab7:UITabBtn; + + private var paneBg:UIWindowBg; + + private var bg1:UIWindowBg; + + private var url:String = "lingyange.jpg"; + + private var maxFreeTimeText:TextField; + + private var maxItemTimeText:TextField; + + private var enterBtn:UIBigButton; + + private var currBattleId:int; + + private var preBtn:UITabBtn; + + private var babelObj:Object; + + private var lingYanGeEnter:LingYanGeEnter; + + public function LingYanGeUI() + { + super(); + } + + override public function setPosition() : void + { + this.x = int(face.realWidth / 2 - 730 / 2); + this.y = int(face.realHeight / 2 - 492 / 2); + } + + override public function createUI() : void + { + var _loc1_:int = 0; + var _loc2_:UITabBtn = null; + var _loc3_:UIWindowBg = null; + var _loc4_:UITitleBg = null; + var _loc5_:int = 0; + var _loc6_:TextField = null; + var _loc7_:TextField = null; + var _loc8_:TextField = null; + var _loc9_:TextField = null; + var _loc10_:TextField = null; + var _loc11_:TextField = null; + var _loc12_:TextField = null; + var _loc13_:TextField = null; + var _loc14_:TextField = null; + super.createUI(); + super.loadTitle(UITitleConfig.title_lingyange); + this.btnArr = new Array(); + this.tab1 = new UITabBtn("禁军",2); + this.tab2 = new UITabBtn("御前",2); + this.tab3 = new UITabBtn("皇家",2); + this.tab4 = new UITabBtn("霸天",2); + this.tab5 = new UITabBtn("诛仙",2); + this.tab6 = new UITabBtn("戳神",2); + this.tab7 = new UITabBtn("灭世",2); + this.btnArr.push(this.tab1); + this.btnArr.push(this.tab2); + this.btnArr.push(this.tab3); + this.btnArr.push(this.tab4); + this.btnArr.push(this.tab5); + this.btnArr.push(this.tab6); + this.btnArr.push(this.tab7); + for each(_loc2_ in this.btnArr) + { + addChild(_loc2_); + _loc2_.x = 25 + _loc1_ * 66; + _loc2_.y = 40; + _loc2_.onClick = this.clickTab; + _loc1_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(629,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(422,367); + this.paneBg.addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + _loc3_ = new UIWindowBg(); + _loc3_.initThirdPanel(185,367); + this.paneBg.addChild(_loc3_); + _loc3_.x = this.bg1.x + this.bg1.width + 3; + _loc3_.y = this.bg1.y; + _loc4_ = new UITitleBg("活动介绍",_loc3_.width); + _loc3_.addChild(_loc4_); + _loc4_.x = int(_loc3_.width / 2 - _loc4_.width / 2); + _loc5_ = 18; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,190); + _loc6_.x = 10; + _loc6_.y = 30; + _loc6_.htmlText = "模式:单挑战"; + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,190); + _loc7_.x = _loc6_.x; + _loc7_.y = _loc6_.y + _loc5_; + _loc7_.htmlText = "次数: 次/天(免费进入)"; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + _loc8_.x = 52; + _loc8_.y = _loc7_.y + _loc5_; + _loc8_.htmlText = " 次/天(道具进入)"; + this.maxFreeTimeText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,30); + this.maxItemTimeText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,30); + _loc3_.addChild(this.maxFreeTimeText); + this.maxFreeTimeText.x = 50; + this.maxFreeTimeText.y = _loc7_.y; + _loc3_.addChild(this.maxItemTimeText); + this.maxItemTimeText.x = 50; + this.maxItemTimeText.y = _loc8_.y; + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,190); + _loc9_.x = _loc6_.x; + _loc9_.y = _loc8_.y + _loc5_; + _loc9_.htmlText = "奖励:丰富武将功勋"; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,190); + _loc10_.x = 45; + _loc10_.y = _loc9_.y + _loc5_; + _loc10_.htmlText = "很大机会武将领悟成长"; + _loc11_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + _loc11_.x = _loc6_.x; + _loc11_.y = _loc10_.y + _loc5_; + _loc11_.htmlText = "规则:"; + _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,190); + _loc12_.x = _loc6_.x; + _loc12_.y = _loc11_.y + _loc5_; + _loc12_.htmlText = "1.派出一名武将参与知名战役"; + _loc13_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,190); + _loc13_.x = _loc6_.x; + _loc13_.y = _loc12_.y + _loc5_; + _loc13_.htmlText = "2.通过前一关才能继续下一关"; + _loc14_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,190); + _loc14_.x = _loc6_.x; + _loc14_.y = _loc13_.y + _loc5_; + _loc14_.htmlText = "3.通过战役所有关卡后开启下战役"; + _loc3_.addChild(_loc6_); + _loc3_.addChild(_loc7_); + _loc3_.addChild(_loc8_); + _loc3_.addChild(_loc9_); + _loc3_.addChild(_loc10_); + _loc3_.addChild(_loc11_); + _loc3_.addChild(_loc12_); + _loc3_.addChild(_loc13_); + _loc3_.addChild(_loc14_); + this.enterBtn = new UIBigButton(1); + _loc3_.addChild(this.enterBtn); + this.enterBtn.x = 50; + this.enterBtn.y = 300; + this.enterBtn.onClick = this.enterbattle; + loadBg(ServerConfig.IMG_BG_URL + this.url); + this.btnArr[0].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + this.entryBabel(); + } + + private function enterbattle(param1:MouseEvent) : void + { + var _loc2_:int = int(this.babelObj.maxFreeBabelTimes); + var _loc3_:int = int(this.babelObj.maxItemBabelTimes); + var _loc4_:int = int(this.babelObj.freeBabelTimes); + var _loc5_:int = int(this.babelObj.itemBabelTimes); + if(_loc4_ >= _loc2_) + { + if(_loc5_ >= _loc3_) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + MessageBoxUI.getInstance().confirmMsg("是否消耗一个【鲁班令】进入?",this.confirmEnterBattle); + return; + } + this.confirmEnterBattle(); + } + + private function confirmEnterBattle() : void + { + ConnectService.getInstance().playService.joinBattle(this.currBattleId); + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg1.addChild(param1); + param1.x = 2; + param1.y = 2; + param1.width = 428; + param1.height = 373; + } + + private function clickTab(param1:MouseEvent) : void + { + if(this.preBtn) + { + this.preBtn.select = false; + } + this.preBtn = param1.currentTarget as UITabBtn; + this.preBtn.select = true; + var _loc2_:int = 0; + while(_loc2_ < this.btnArr.length) + { + if(this.btnArr[_loc2_] == this.preBtn) + { + this.currBattleId = _loc2_ + 1; + break; + } + _loc2_++; + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(HeroBabelEvent.BATTLE_JOIN,this.joinBabelResult); + ConnectService.getInstance().addEventListener(HeroBabelEvent.ENTER_BABEL,this.enterBabelResult); + if(this.enterBtn) + { + this.entryBabel(); + } + } + + private function entryBabel() : void + { + ConnectService.getInstance().playService.entryBabel(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.BATTLE_JOIN,this.joinBabelResult); + ConnectService.getInstance().removeEventListener(HeroBabelEvent.ENTER_BABEL,this.enterBabelResult); + } + + private function enterBabelResult(param1:HeroBabelEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + closeUI(null); + return; + } + this.babelObj = param1.obj; + var _loc2_:int = int(this.babelObj.needRestart); + if(_loc2_ == 2) + { + this.createEnterPage(this.babelObj); + return; + } + var _loc3_:int = int(this.babelObj.maxFreeBabelTimes); + var _loc4_:int = int(this.babelObj.maxItemBabelTimes); + var _loc5_:int = int(this.babelObj.freeBabelTimes); + var _loc6_:int = int(this.babelObj.itemBabelTimes); + this.maxFreeTimeText.text = _loc5_ + "/" + _loc3_; + this.maxItemTimeText.text = _loc6_ + "/" + _loc4_; + } + + private function joinBabelResult(param1:HeroBabelEvent) : void + { + this.createEnterPage(param1.obj); + } + + private function createEnterPage(param1:Object) : void + { + if(this.lingYanGeEnter == null) + { + this.lingYanGeEnter = new LingYanGeEnter(); + } + this.lingYanGeEnter.show(); + this.lingYanGeEnter.setEnterData(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/lingyange/LingYanItem.as b/flash_decompiled/com/view/ui/lingyange/LingYanItem.as new file mode 100644 index 0000000..bb88f9e --- /dev/null +++ b/flash_decompiled/com/view/ui/lingyange/LingYanItem.as @@ -0,0 +1,81 @@ +package com.view.ui.lingyange +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.text.TextField; + + public class LingYanItem extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var bg:Bitmap; + + private var lockbg:Bitmap; + + private var overBg:Bitmap; + + private var label1:TextField; + + private var label2:TextField; + + private var currStageId:int; + + public function LingYanItem(param1:int) + { + super(); + this.currStageId = param1; + this.bg = new Bitmap(this.face.getPng(ClassConfig.item_bg),"auto",true); + addChild(this.bg); + this.lockbg = new Bitmap(this.face.getPng(ClassConfig.item_lock),"auto",true); + addChild(this.lockbg); + this.overBg = new Bitmap(this.face.getPng(ClassConfig.item_hover),"auto",true); + addChild(this.overBg); + this.overBg.x = -5; + this.overBg.y = -5; + this.overBg.visible = false; + this.label1 = PublicMethod.getTextFieldWithFillter(16762880,60); + addChild(this.label1); + this.label1.x = 20; + this.label1.y = 50; + this.label1.text = "第 " + param1 + " 关"; + this.label2 = PublicMethod.getTextFieldWithFillter(16762880,60); + addChild(this.label2); + this.label2.x = 25; + this.label2.y = this.label1.y + 16; + } + + public function getStageId() : int + { + return this.currStageId; + } + + public function setSelect() : void + { + this.overBg.visible = true; + } + + public function setUnSelect() : void + { + this.overBg.visible = false; + } + + public function setLock() : void + { + this.bg.visible = false; + this.lockbg.visible = true; + this.label2.text = "未通过"; + } + + public function setUnLock() : void + { + this.bg.visible = true; + this.lockbg.visible = false; + this.label2.text = "已通过"; + } + } +} + diff --git a/flash_decompiled/com/view/ui/load/LoadUI.as b/flash_decompiled/com/view/ui/load/LoadUI.as new file mode 100644 index 0000000..e231b6a --- /dev/null +++ b/flash_decompiled/com/view/ui/load/LoadUI.as @@ -0,0 +1,243 @@ +package com.view.ui.load +{ + import com.InstallFace; + import com.comfig.PathConfig; + import com.common.App; + import com.common.PublicMethod; + import com.view.ui.login.LoadProcessMc; + import flash.display.BitmapData; + import flash.display.Loader; + import flash.display.LoaderInfo; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.ProgressEvent; + import flash.net.URLRequest; + import flash.system.ApplicationDomain; + import flash.system.LoaderContext; + + public class LoadUI extends Sprite + { + + private var loadUrl:String = "Loading.swf"; + + private var loader:Loader; + + private var app:ApplicationDomain; + + private var face:InstallFace = InstallFace.getInstance(); + + private var bg:Sprite; + + private var loadMc:MovieClip; + + private var loadMc1:MovieClip; + + private var filmMc:MovieClip; + + private var loadProcess:LoadProcessMc; + + private var i:int; + + private var loadNum:int; + + private var countSize:Number = 0; + + private var hasLoadSize:Number = 0; + + private var gameApp:ApplicationDomain; + + private var cur_i:int; + + private var cur_num:int = 0; + + public function LoadUI() + { + super(); + this.beginLoad(); + this.bg = PublicMethod.createShape(0,1000,600); + addChild(this.bg); + this.setBgPosi(); + this.face.stage.addEventListener(Event.RESIZE,this.resize,false,0,true); + this.face.stage.addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + } + + private function resize(param1:Event) : void + { + this.setBgPosi(); + } + + private function setBgPosi() : void + { + this.bg.x = int(this.face.realWidth / 2 - 500); + this.bg.y = int(this.face.realHeight / 2 - 300); + } + + private function delEvent(param1:Event) : void + { + this.face.stage.removeEventListener(Event.RESIZE,this.resize); + } + + private function beginLoad() : void + { + this.app = new ApplicationDomain(); + var _loc1_:String = this.loadUrl; + this.loader = new Loader(); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadComplete); + this.loader.load(new URLRequest(_loc1_)); + } + + private function loadComplete(param1:Event) : void + { + this.loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.loadComplete); + this.app = LoaderInfo(param1.target).applicationDomain; + this.loader = null; + this.loadMc = this.createClip("Loading_1"); + this.bg.addChild(this.loadMc); + this.loadMc.x = int(this.bg.width / 2 - this.loadMc.width / 2); + this.loadMc.y = int(this.bg.height / 2 - this.loadMc.height / 2); + this.loadProcess = new LoadProcessMc(this.createClip("ui_loadbar")); + this.bg.addChild(this.loadProcess); + this.loadProcess.y = 500; + this.loadProcess.x = 270; + this.getLoadSize(); + } + + private function loadFilmSwf() : void + { + var _loc1_:String = ""; + this.loader = new Loader(); + this.loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,this.loadFilmProgress); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadFilmComplete); + this.loader.load(new URLRequest(_loc1_)); + } + + private function loadFilmProgress(param1:ProgressEvent) : void + { + this.i = int(param1.bytesLoaded / param1.bytesTotal * 100); + this.loadMc.loader_bar1.gotoAndStop(this.i); + this.loadMc.pesent.text = this.i + "%"; + } + + private function loadFilmComplete(param1:Event) : void + { + this.bg.removeChild(this.loadMc); + this.loadMc.loader_bar1.stop(); + this.loadMc = null; + this.loadMc1 = this.createClip("Loading_2"); + this.bg.addChild(this.loadMc1); + this.loadMc1.x = 3; + this.loadMc1.y = 22; + this.loadMc1.bar_mc.gotoAndStop(1); + this.filmMc = MovieClip(this.loader.content); + this.bg.addChild(this.filmMc); + this.loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,this.loadFilmProgress); + this.loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.loadFilmComplete); + this.loader = null; + this.getLoadSize(); + } + + private function getLoadSize() : void + { + this.loader = new Loader(); + this.loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,this.loadSizeProgress); + this.startLoadCount(); + } + + private function startLoadCount() : void + { + var _loc1_:String = PathConfig.getInstance().getUiPathArr()[this.loadNum].path; + var _loc2_:String = PathConfig.getInstance().getVerStr(_loc1_); + this.loader.load(new URLRequest(_loc2_)); + } + + private function loadSizeProgress(param1:ProgressEvent) : void + { + if(Boolean(param1.bytesTotal) && param1.bytesTotal > 0) + { + PathConfig.getInstance().setSize(this.loadNum,param1.bytesTotal); + this.countSize += param1.bytesTotal; + ++this.loadNum; + this.loader.close(); + if(this.loadNum < PathConfig.getInstance().getUiPathArr().length) + { + this.startLoadCount(); + } + else + { + this.loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,this.loadSizeProgress); + this.loader = null; + this.loadNum = 0; + this.gameApp = new ApplicationDomain(); + this.loader = new Loader(); + this.loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,this.skinLoadProgress); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.skinLoadComplete); + this.startLoadUi(); + } + } + } + + private function startLoadUi() : void + { + var _loc1_:String = PathConfig.getInstance().getUiPathArr()[this.loadNum].path; + this.loader.load(new URLRequest(_loc1_),new LoaderContext(false,this.gameApp)); + } + + private function skinLoadProgress(param1:ProgressEvent) : void + { + if(this.cur_num != this.loadNum) + { + this.cur_num = this.loadNum; + this.hasLoadSize += PathConfig.getInstance().getSize(this.cur_num - 1); + } + this.cur_i = int((this.hasLoadSize + param1.bytesLoaded) / this.countSize * 100); + this.loadProcess.setLen(this.cur_i); + this.loadMc.pesent.text = this.cur_i + "%"; + } + + private function skinLoadComplete(param1:Event) : void + { + ++this.loadNum; + if(this.loadNum < PathConfig.getInstance().getUiPathArr().length) + { + this.startLoadUi(); + } + else + { + this.loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.skinLoadComplete); + this.loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,this.skinLoadProgress); + this.face.loaderInfo = this.gameApp; + this.gameApp = null; + this.loader = null; + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + this.face.enterGameCheck(); + } + } + + public function createClip(param1:String) : MovieClip + { + var _loc2_:MovieClip = null; + _loc2_ = App.createMc(param1,this.app); + if(_loc2_ == null) + { + _loc2_ = null; + } + return _loc2_; + } + + public function getPng(param1:String) : BitmapData + { + var _loc2_:BitmapData = null; + _loc2_ = App.createPng(param1,this.app); + if(_loc2_ == null) + { + _loc2_ = null; + } + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/load/LoadUIData.as b/flash_decompiled/com/view/ui/load/LoadUIData.as new file mode 100644 index 0000000..a74ab57 --- /dev/null +++ b/flash_decompiled/com/view/ui/load/LoadUIData.as @@ -0,0 +1,23 @@ +package com.view.ui.load +{ + public class LoadUIData + { + + public var path:String; + + public var name:String; + + public var ver:String; + + public var type:String; + + public var size:Number; + + public function LoadUIData() + { + super(); + this.size = 0; + } + } +} + diff --git a/flash_decompiled/com/view/ui/load/LoadUIMc.as b/flash_decompiled/com/view/ui/load/LoadUIMc.as new file mode 100644 index 0000000..a7c6bcb --- /dev/null +++ b/flash_decompiled/com/view/ui/load/LoadUIMc.as @@ -0,0 +1,58 @@ +package com.view.ui.load +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class LoadUIMc extends Sprite + { + + private var maskBg:Sprite; + + private var loadMc:MovieClip; + + private var face:InstallFace = InstallFace.getInstance(); + + public function LoadUIMc() + { + super(); + this.loadMc = this.face.getMovieClip(ClassConfig.lib_load_progress); + this.maskBg = PublicMethod.createShape(0,this.face.realWidth,this.face.realHeight); + addChild(this.maskBg); + this.maskBg.alpha = 0.1; + addChild(this.loadMc); + this.setLoadMcPosi(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + addEventListener(Event.RESIZE,this.resizeWin); + } + + private function addEvent(param1:Event) : void + { + } + + private function delEvent(param1:Event) : void + { + } + + private function resizeWin(param1:Event) : void + { + this.setLoadMcPosi(); + } + + public function setLoadMcPosi() : void + { + this.loadMc.x = this.face.realWidth / 2 - this.loadMc.width / 2; + this.loadMc.y = this.face.realHeight / 2 - this.loadMc.height / 2; + } + + public function getLoadMc() : MovieClip + { + return this.loadMc; + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/EnterGameBtn.as b/flash_decompiled/com/view/ui/login/EnterGameBtn.as new file mode 100644 index 0000000..98406fd --- /dev/null +++ b/flash_decompiled/com/view/ui/login/EnterGameBtn.as @@ -0,0 +1,26 @@ +package com.view.ui.login +{ + import com.common.Scale9Grid; + import com.view.newui.UIBaseBtn; + import flash.display.Bitmap; + + public class EnterGameBtn extends UIBaseBtn + { + + public function EnterGameBtn() + { + super(); + normal_skin = new Scale9Grid(face.getSprite("recharge_up"),60,19); + over_skin = new Scale9Grid(face.getSprite("recharge_hover"),60,19); + down_skin = new Scale9Grid(face.getSprite("recharge_down"),60,19); + var _loc1_:Bitmap = new Bitmap(face.getPng("title_enter")); + addChild(_loc1_); + _loc1_.y = 5; + _loc1_.x = int(normal_skin.width / 2 - _loc1_.width / 2); + setButtonMode(); + addEvent(); + init(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/ImageItem.as b/flash_decompiled/com/view/ui/login/ImageItem.as new file mode 100644 index 0000000..3c5addf --- /dev/null +++ b/flash_decompiled/com/view/ui/login/ImageItem.as @@ -0,0 +1,79 @@ +package com.view.ui.login +{ + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class ImageItem extends Sprite + { + + private var bg:Sprite; + + public var currUrl:String; + + private var loadItemPng1:LoadResource; + + private var maleImg:Bitmap; + + public function ImageItem(param1:String) + { + super(); + this.currUrl = param1; + this.bg = PublicMethod.createRectangle(5794408,2040871,98,98); + addChild(this.bg); + this.bg.buttonMode = true; + this.loadHeadImg1(param1); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + } + + private function mouseOver(param1:MouseEvent) : void + { + this.filters = [PublicGlow.getInstance().lightFilter]; + } + + private function mouseOut(param1:MouseEvent) : void + { + this.filters = null; + } + + private function loadHeadImg1(param1:String) : void + { + this.loadItemPng1 = new LoadResource("pic/head/" + param1,this.loadPngBack1); + } + + private function loadPngBack1(param1:Event) : void + { + if(Boolean(this.maleImg) && this.bg.contains(this.maleImg)) + { + this.bg.removeChild(this.maleImg); + } + this.maleImg = param1.target.loader.content as Bitmap; + this.bg.addChild(this.maleImg); + this.maleImg.x = 2; + this.maleImg.y = 2; + this.maleImg.width = 95; + this.maleImg.height = 95; + this.loadItemPng1.clear(); + } + + public function setUrl(param1:String) : void + { + if(param1 == null) + { + if(Boolean(this.maleImg) && this.bg.contains(this.maleImg)) + { + this.bg.removeChild(this.maleImg); + } + return; + } + this.currUrl = param1; + this.loadHeadImg1(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/LoadProcessMc.as b/flash_decompiled/com/view/ui/login/LoadProcessMc.as new file mode 100644 index 0000000..fa04349 --- /dev/null +++ b/flash_decompiled/com/view/ui/login/LoadProcessMc.as @@ -0,0 +1,24 @@ +package com.view.ui.login +{ + import flash.display.MovieClip; + import flash.display.Sprite; + + public class LoadProcessMc extends Sprite + { + + private var ui_loadbar:MovieClip; + + public function LoadProcessMc(param1:MovieClip) + { + super(); + this.ui_loadbar = param1; + addChild(this.ui_loadbar); + } + + public function setLen(param1:int) : void + { + this.ui_loadbar.bar.x = -443 + int(param1 * 463 / 100); + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/LoginBtn.as b/flash_decompiled/com/view/ui/login/LoginBtn.as new file mode 100644 index 0000000..3ef46ff --- /dev/null +++ b/flash_decompiled/com/view/ui/login/LoginBtn.as @@ -0,0 +1,26 @@ +package com.view.ui.login +{ + import com.common.Scale9Grid; + import com.view.newui.UIBaseBtn; + import flash.display.Bitmap; + + public class LoginBtn extends UIBaseBtn + { + + public function LoginBtn(param1:LoginUI) + { + super(); + normal_skin = new Scale9Grid(param1.getSprite("recharge_up"),37,14); + over_skin = new Scale9Grid(param1.getSprite("recharge_hover"),37,14); + down_skin = new Scale9Grid(param1.getSprite("recharge_down"),37,14); + var _loc2_:Bitmap = new Bitmap(param1.getPng("ui_title_7")); + addChild(_loc2_); + _loc2_.y = 4; + _loc2_.x = int(normal_skin.width / 2 - _loc2_.width / 2); + setButtonMode(); + addEvent(); + init(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/LoginUI.as b/flash_decompiled/com/view/ui/login/LoginUI.as new file mode 100644 index 0000000..78815ba --- /dev/null +++ b/flash_decompiled/com/view/ui/login/LoginUI.as @@ -0,0 +1,573 @@ +package com.view.ui.login +{ + import com.InstallFace; + import com.comfig.CommonData; + import com.comfig.PathConfig; + import com.common.App; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.login.event.LoginEvent; + import com.data.data.account.Account; + import com.events.DevEvent; + import com.greensock.TweenMax; + import com.net.event.ChatEvent; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.newui.UILabel; + import com.view.ui.load.LoadUI; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Loader; + import flash.display.LoaderInfo; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.net.SharedObject; + import flash.net.URLRequest; + import flash.system.ApplicationDomain; + import flash.text.TextField; + import flash.text.TextFieldType; + + public class LoginUI extends Sprite + { + + private var swfUrl:String = "LoginNew.swf"; + + private var loginMc:Sprite; + + private var app:ApplicationDomain; + + private var loader:Loader; + + private var loginBtn:LoginBtn; + + private var loginTxt:MovieClip; + + private var face:InstallFace = InstallFace.getInstance(); + + private var so:SharedObject; + + private var loginBg:Sprite; + + private var userIdText:TextField; + + private var userPwdText:TextField; + + private var msgText:TextField; + + private var regBtn:RegBtn; + + private var loginUserId:String; + + private var loginPwd:String; + + private var msg:String; + + private var account:Account; + + private var regMc:Sprite; + + private var regMsgText:TextField; + + private var regUserText:TextField; + + private var regPwdText:TextField; + + private var regPwdText1:TextField; + + private var mailText:TextField; + + private var regBtn1:RegBtn1; + + private var backBtn:RegBtn2; + + public function LoginUI() + { + super(); + this.so = SharedObject.getLocal("Wz7x","/"); + ConnectService.getInstance().addEventListener(LoginEvent.Login,this.loginResult); + this.app = new ApplicationDomain(); + this.loader = new Loader(); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadComplete); + this.loader.load(new URLRequest(PathConfig.getInstance().getVerStr(this.swfUrl))); + this.face.stage.addEventListener(KeyboardEvent.KEY_UP,this.keyLogin); + } + + private function loadComplete(param1:Event) : void + { + var _loc3_:Bitmap = null; + var _loc4_:Sprite = null; + var _loc5_:Bitmap = null; + var _loc7_:Object = null; + this.loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.loadComplete); + this.app = LoaderInfo(param1.target).applicationDomain; + this.loader = null; + this.loginBg = this.createClip("login_bg"); + addChild(this.loginBg); + this.loginBg.x = -int(this.loginBg.width / 2); + this.loginBg.y = -int(this.loginBg.height / 2); + this.loginMc = new Scale9Grid(this.getSprite("firstPanel_skin"),120,160); + this.loginBg.addChild(this.loginMc); + var _loc2_:Bitmap = new Bitmap(this.getPng("ui_title_7")); + this.loginMc.addChild(_loc2_); + _loc2_.x = int(this.loginMc.width / 2 - _loc2_.width / 2); + _loc2_.y = 4; + _loc3_ = new Bitmap(this.getPng("ui_title_1")); + this.loginMc.addChild(_loc3_); + _loc3_.x = 30; + _loc3_.y = 70; + _loc4_ = new Scale9Grid(this.getSprite("secondPanel_skin"),150,16); + this.loginMc.addChild(_loc4_); + _loc4_.x = int(_loc3_.x + 120); + _loc4_.y = int(_loc3_.y); + this.userIdText = PublicMethod.getTextFieldWithFillter(16777215,120); + _loc4_.addChild(this.userIdText); + this.userIdText.x = 4; + this.userIdText.y = 4; + this.userIdText.mouseEnabled = true; + this.userIdText.type = TextFieldType.INPUT; + this.userIdText.maxChars = 15; + _loc5_ = new Bitmap(this.getPng("ui_title_2")); + this.loginMc.addChild(_loc5_); + _loc5_.x = _loc3_.x; + _loc5_.y = _loc3_.y + 50; + var _loc6_:Sprite = new Scale9Grid(this.getSprite("secondPanel_skin"),150,16); + this.loginMc.addChild(_loc6_); + _loc6_.x = int(_loc4_.x); + _loc6_.y = int(_loc5_.y); + this.userPwdText = PublicMethod.getTextFieldWithFillter(16777215,120); + _loc6_.addChild(this.userPwdText); + this.userPwdText.x = 4; + this.userPwdText.y = 4; + this.userPwdText.mouseEnabled = true; + this.userPwdText.type = TextFieldType.INPUT; + this.userPwdText.maxChars = 15; + this.userPwdText.displayAsPassword = true; + this.loginBtn = new LoginBtn(this); + this.loginMc.addChild(this.loginBtn); + this.loginBtn.x = 60; + this.loginBtn.y = 180; + this.regBtn = new RegBtn(this); + this.loginMc.addChild(this.regBtn); + this.regBtn.x = this.loginBtn.x + 120; + this.regBtn.y = this.loginBtn.y; + this.msgText = PublicMethod.getTextFieldWithFillter(16711680,230); + this.loginMc.addChild(this.msgText); + this.msgText.x = this.loginBtn.x; + this.msgText.y = 155; + this.msgText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + if(this.so.data.user != undefined) + { + this.userIdText.text = this.so.data.user.userid; + this.userPwdText.text = this.so.data.user.pwd; + } + else + { + _loc7_ = new Object(); + _loc7_.userid = ""; + _loc7_.pwd = ""; + this.so.data.user = _loc7_; + this.so.flush(); + } + Utils.g_events.addEventListener(DevEvent.UNCONNSERVER,this.connFail); + this.loginBtn.onClick = this.mouse_click; + this.regBtn.onClick = this.toReg; + this.face.stage.addEventListener(Event.RESIZE,this.reSizeWindow); + this.showLogin(); + } + + public function showLogin() : void + { + if(this.regMc) + { + this.regMc.visible = false; + } + this.loginMc.x = 330; + this.loginMc.y = 174; + this.loginMc.alpha = 0; + TweenMax.to(this.loginMc,0.3,{ + "alpha":1, + "y":194 + }); + } + + public function hiddenLogin() : void + { + TweenMax.to(this.loginMc,0.5,{ + "alpha":0, + "y":174, + "onComplete":this.showReg + }); + } + + public function hiddenLogin1() : void + { + TweenMax.to(this.loginMc,0.5,{ + "alpha":0, + "y":174, + "onComplete":this.loginOk + }); + } + + private function reSizeWindow(param1:Event) : void + { + x = int(InstallFace.getInstance().realWidth / 2); + y = int(InstallFace.getInstance().realHeight / 2); + } + + private function mouse_click(param1:MouseEvent) : void + { + this.msgText.text = ""; + this.loginUserId = Utils.trim(this.userIdText.text); + this.loginPwd = Utils.trim(this.userPwdText.text); + if(this.loginUserId.length == 0 || this.loginUserId == "") + { + this.msg = "请输入账号"; + this.msgText.text = this.msg; + return; + } + if(this.loginPwd.length == 0 || this.loginPwd == "") + { + this.msg = "请输入密码"; + this.msgText.text = this.msg; + return; + } + this.msg = "正在登录..."; + this.msgText.text = this.msg; + this.regBtn.setUnEnable(); + this.loginBtn.setUnEnable(); + this.account = new Account(); + this.account.accName = this.loginUserId; + this.account.accPwd = this.loginPwd; + ConnectService.getInstance().loginService.login(this.account); + } + + private function loginResult(param1:LoginEvent) : void + { + switch(param1.status) + { + case ReturnBean.STATUS_0: + this.connectToChat(); + break; + case ReturnBean.STATUS_1: + this.loginBtn.setEnable(); + this.regBtn.setEnable(); + if(param1.msg == null) + { + this.msgText.text = "系统错误"; + break; + } + this.msgText.text = param1.msg; + } + } + + private function connFail(param1:DevEvent) : void + { + this.loginBtn.setEnable(); + this.regBtn.setEnable(); + } + + private function connectToChat() : void + { + if(!CommonData.checkServerIp(PathConfig.getInstance().getServerIp())) + { + this.msgText.text = "未授权的客户端"; + this.loginBtn.setEnable(); + this.regBtn.setEnable(); + return; + } + this.face.connectToserver(); + this.face.getChatConnect().addEventListener(ChatEvent.CONN_SUCCESS,this.loginSucc); + this.face.getChatConnect().addEventListener(ChatEvent.CONN_ERROR,this.loginErr); + this.face.stage.removeEventListener(KeyboardEvent.KEY_UP,this.keyLogin); + } + + private function loginErr(param1:ChatEvent) : void + { + this.loginBtn.setEnable(); + this.regBtn.setEnable(); + this.msgText.text = "连接异常,服务器尚未开启"; + } + + private function loginSucc(param1:ChatEvent) : void + { + this.face.getChatConnect().removeEventListener(ChatEvent.CONN_SUCCESS,this.loginSucc); + this.face.getChatConnect().removeEventListener(ChatEvent.CONN_ERROR,this.loginErr); + this.face.stage.removeEventListener(Event.RESIZE,this.reSizeWindow); + this.face.loginByUserId(); + this.hiddenLogin1(); + } + + private function loginOk() : void + { + this.so.data.user.userid = this.account.accName; + this.so.data.user.pwd = this.account.accPwd; + this.so.flush(); + if(NewUserData.getAccount().userId > 0) + { + PathConfig.getInstance().getUiPathArr().shift(); + } + this.loginMc = null; + this.regMc = null; + this.app = null; + InstallFace.getInstance().removeMc(this); + InstallFace.getInstance().addMc(new LoadUI()); + } + + private function toReg(param1:MouseEvent) : void + { + var _loc2_:Bitmap = null; + var _loc3_:Bitmap = null; + var _loc4_:Sprite = null; + var _loc5_:Bitmap = null; + var _loc6_:Sprite = null; + var _loc7_:Bitmap = null; + var _loc8_:Sprite = null; + var _loc9_:Bitmap = null; + var _loc10_:Sprite = null; + var _loc11_:UILabel = null; + if(PathConfig.getInstance().getViewReg() == 1) + { + ConnectService.getInstance().userService.openPayhttp(); + return; + } + this.hiddenLogin(); + if(this.regMc == null) + { + this.regMc = new Scale9Grid(this.getSprite("firstPanel_skin"),120,190); + this.loginBg.addChild(this.regMc); + _loc2_ = new Bitmap(this.getPng("ui_title_10")); + this.regMc.addChild(_loc2_); + _loc2_.x = int(this.regMc.width / 2 - _loc2_.width / 2); + _loc2_.y = 4; + _loc3_ = new Bitmap(this.getPng("ui_title_3")); + this.regMc.addChild(_loc3_); + _loc3_.x = 30; + _loc3_.y = 55; + _loc4_ = new Scale9Grid(this.getSprite("secondPanel_skin"),150,16); + this.regMc.addChild(_loc4_); + _loc4_.x = _loc3_.x + 120; + _loc4_.y = _loc3_.y; + this.regUserText = PublicMethod.getTextFieldWithFillter(16777215,120); + _loc4_.addChild(this.regUserText); + this.regUserText.x = 4; + this.regUserText.y = 4; + this.regUserText.mouseEnabled = true; + this.regUserText.type = TextFieldType.INPUT; + this.regUserText.maxChars = 15; + _loc5_ = new Bitmap(this.getPng("ui_title_4")); + this.regMc.addChild(_loc5_); + _loc5_.x = _loc3_.x; + _loc5_.y = _loc3_.y + 36; + _loc6_ = new Scale9Grid(this.getSprite("secondPanel_skin"),150,16); + this.regMc.addChild(_loc6_); + _loc6_.x = _loc4_.x; + _loc6_.y = _loc5_.y; + this.regPwdText = PublicMethod.getTextFieldWithFillter(16777215,120); + _loc6_.addChild(this.regPwdText); + this.regPwdText.x = 4; + this.regPwdText.y = 4; + this.regPwdText.mouseEnabled = true; + this.regPwdText.type = TextFieldType.INPUT; + this.regPwdText.maxChars = 15; + this.regPwdText.displayAsPassword = true; + _loc7_ = new Bitmap(this.getPng("ui_title_5")); + this.regMc.addChild(_loc7_); + _loc7_.x = _loc3_.x; + _loc7_.y = _loc5_.y + 36; + _loc8_ = new Scale9Grid(this.getSprite("secondPanel_skin"),150,16); + this.regMc.addChild(_loc8_); + _loc8_.x = _loc4_.x; + _loc8_.y = _loc7_.y; + this.regPwdText1 = PublicMethod.getTextFieldWithFillter(16777215,120); + _loc8_.addChild(this.regPwdText1); + this.regPwdText1.x = 4; + this.regPwdText1.y = 4; + this.regPwdText1.mouseEnabled = true; + this.regPwdText1.type = TextFieldType.INPUT; + this.regPwdText1.maxChars = 15; + this.regPwdText1.displayAsPassword = true; + _loc9_ = new Bitmap(this.getPng("ui_title_6")); + this.regMc.addChild(_loc9_); + _loc9_.x = _loc3_.x; + _loc9_.y = _loc7_.y + 36; + _loc10_ = new Scale9Grid(this.getSprite("secondPanel_skin"),150,16); + this.regMc.addChild(_loc10_); + _loc10_.x = _loc4_.x; + _loc10_.y = _loc9_.y; + this.mailText = PublicMethod.getTextFieldWithFillter(16777215,120); + _loc10_.addChild(this.mailText); + this.mailText.x = 4; + this.mailText.y = 4; + this.mailText.mouseEnabled = true; + this.mailText.type = TextFieldType.INPUT; + this.mailText.maxChars = 20; + _loc11_ = new UILabel(320,16711680); + _loc11_.setText("邮箱是转区或找回密码唯一信息,请不要随意填写"); + _loc11_.x = 49; + _loc11_.y = _loc10_.y + 33; + this.regMsgText = PublicMethod.getTextFieldWithFillter(16711680,300); + this.regMc.addChild(this.regMsgText); + this.regMsgText.x = 24; + this.regMsgText.y = 198; + this.regMsgText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.regMsgText.text = "邮箱是转区或找回密码唯一信息,请不要随意填写"; + this.regBtn1 = new RegBtn1(this); + this.regMc.addChild(this.regBtn1); + this.regBtn1.x = 60; + this.regBtn1.y = 220; + this.backBtn = new RegBtn2(this); + this.regMc.addChild(this.backBtn); + this.backBtn.x = this.regBtn1.x + 120; + this.backBtn.y = this.regBtn1.y; + this.regBtn1.onClick = this.regAccount; + this.backBtn.onClick = this.toLogin; + this.regMc.x = int(width / 2 - this.regMc.width / 2); + this.regMc.y = int(height / 2 - this.regMc.height / 2); + this.regMc.alpha = 0; + } + this.regBtn1.setEnable(); + this.backBtn.setEnable(); + this.regMc.visible = true; + this.regUserText.tabIndex = 1; + this.regPwdText.tabIndex = 2; + this.regPwdText1.tabIndex = 3; + this.mailText.tabIndex = 4; + } + + public function showReg() : void + { + this.regMc.x = 330; + this.regMc.y = 159; + this.regMc.visible = true; + this.regMc.alpha = 0; + TweenMax.to(this.regMc,0.5,{ + "alpha":1, + "y":179 + }); + } + + public function hiddenReg() : void + { + TweenMax.to(this.regMc,0.5,{ + "alpha":0, + "y":159, + "onComplete":this.showLogin + }); + } + + private function regAccount(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.regUserText.text); + var _loc3_:String = PublicMethod.trim(this.regPwdText.text); + var _loc4_:String = PublicMethod.trim(this.regPwdText1.text); + var _loc5_:String = PublicMethod.trim(this.mailText.text); + if(_loc2_ == "") + { + this.regMsgText.text = "用户名不能为空"; + return; + } + if(_loc3_ == "" || _loc4_ == "") + { + this.regMsgText.text = "密码不能为空"; + return; + } + if(_loc3_ != _loc4_) + { + this.regMsgText.text = "2次输入的密码不一致"; + return; + } + if(_loc5_ == "") + { + this.regMsgText.text = "请输入邮箱,邮箱是作为修改密码的条件"; + return; + } + this.regMsgText.text = "正在注册"; + this.regBtn1.setUnEnable(); + this.backBtn.setUnEnable(); + ConnectService.getInstance().loginService.reg(_loc2_,_loc3_,_loc5_,this.regResult); + } + + private function regResult(param1:Object) : void + { + var _loc2_:ReturnBean = param1 as ReturnBean; + this.regBtn1.setEnable(); + this.backBtn.setEnable(); + if(_loc2_.result == ReturnBean.STATUS_1) + { + this.regMsgText.text = _loc2_.msg; + return; + } + this.regMsgText.text = ""; + this.msgText.htmlText = "注册成功,请重新登录游戏"; + this.regUserText.text = ""; + this.regPwdText.text = ""; + this.regPwdText1.text = ""; + this.mailText.text = ""; + this.toLogin(null); + } + + private function toLogin(param1:MouseEvent) : void + { + this.hiddenReg(); + } + + public function createClip(param1:String) : MovieClip + { + var _loc2_:MovieClip = null; + _loc2_ = App.createMc(param1,this.app); + if(_loc2_ == null) + { + _loc2_ = null; + } + return _loc2_; + } + + public function getSprite(param1:String) : Sprite + { + var _loc2_:Sprite = null; + _loc2_ = App.createSprite(param1,this.app); + if(_loc2_ == null) + { + _loc2_ = null; + } + return _loc2_; + } + + public function getPng(param1:String) : BitmapData + { + var _loc2_:BitmapData = null; + _loc2_ = App.createPng(param1,this.app); + if(_loc2_ == null) + { + _loc2_ = null; + } + return _loc2_; + } + + private function keyLogin(param1:KeyboardEvent) : void + { + if(param1.keyCode == 13) + { + this.mouse_click(null); + } + } + + public function getButton(param1:String) : SimpleButton + { + var _loc2_:SimpleButton = null; + _loc2_ = App.createButton(param1,this.app); + if(_loc2_ == null) + { + _loc2_ = null; + } + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/NewRoleUI.as b/flash_decompiled/com/view/ui/login/NewRoleUI.as new file mode 100644 index 0000000..fc79939 --- /dev/null +++ b/flash_decompiled/com/view/ui/login/NewRoleUI.as @@ -0,0 +1,382 @@ +package com.view.ui.login +{ + import com.InstallFace; + import com.comfig.CommonData; + import com.comfig.PathConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.login.event.CreateUserEvent; + import com.data.data.account.User; + import com.newdata.user.NewAccount; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.mc.sprite.LoadingMc; + import com.view.newui.UIButton; + import com.view.newui.UIInputText; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class NewRoleUI extends Sprite + { + + private var face:InstallFace; + + private var maleHeadImg:Array; + + private var femaleHeadImg:Array; + + private var bg:Sprite; + + private var mc_male:Sprite; + + private var mc_female:Sprite; + + private var enterBtn:EnterGameBtn; + + private var btnArr:Array; + + private var input:UIInputText; + + private var changImg1:UIButton; + + private var changImg2:UIButton; + + private var lastCountryMc:MovieClip; + + private var currSex:int; + + private var headUrl1:String; + + private var headUrl2:String; + + private var countryId:int; + + private var loadItemPng1:LoadResource; + + private var loadItemPng2:LoadResource; + + private var maleImg:Bitmap; + + private var femaleImg:Bitmap; + + private var maleImgUI:SelectHeadUI; + + private var femaleImgUI:SelectHeadUI; + + public function NewRoleUI() + { + var _loc4_:UIWindowBg = null; + var _loc13_:* = undefined; + var _loc14_:MovieClip = null; + var _loc15_:int = 0; + var _loc16_:int = 0; + var _loc17_:int = 0; + this.face = InstallFace.getInstance(); + this.btnArr = new Array(); + super(); + this.maleHeadImg = new Array(); + this.femaleHeadImg = new Array(); + var _loc1_:int = 1; + while(_loc1_ < 22) + { + this.maleHeadImg.push("user1_" + _loc1_ + ".jpg"); + this.femaleHeadImg.push("user2_" + _loc1_ + ".jpg"); + _loc1_++; + } + this.bg = PublicMethod.createShape(0,1000,600); + addChild(this.bg); + var _loc2_:Bitmap = new Bitmap(this.face.getPng("role_bg")); + this.bg.addChild(_loc2_); + this.face.stage.addEventListener(Event.RESIZE,this.resizeWind); + this.mc_male = new Sprite(); + this.mc_female = new Sprite(); + this.mc_male.buttonMode = true; + this.mc_female.buttonMode = true; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initSecondPanel(89,89); + this.bg.addChild(_loc3_); + _loc3_.x = 375; + _loc3_.y = 204; + this.bg.addChild(_loc3_); + _loc3_.addChild(this.mc_male); + this.mc_male.x = 1; + this.mc_male.y = 1; + _loc4_ = new UIWindowBg(); + _loc4_.initSecondPanel(89,89); + this.bg.addChild(_loc4_); + _loc4_.x = _loc3_.x + 180; + _loc4_.y = _loc3_.y; + this.bg.addChild(_loc4_); + _loc4_.addChild(this.mc_female); + this.mc_female.x = 1; + this.mc_female.y = 1; + this.enterBtn = new EnterGameBtn(); + this.bg.addChild(this.enterBtn); + this.enterBtn.x = 450; + this.enterBtn.y = 480; + this.enterBtn.onClick = this.enterGame; + this.mc_male.addEventListener(MouseEvent.CLICK,this.selectMale); + this.mc_female.addEventListener(MouseEvent.CLICK,this.selectReMale); + this.changImg1 = new UIButton("更改头像",2); + this.bg.addChild(this.changImg1); + this.changImg1.x = 390; + this.changImg1.y = 165; + this.changImg1.onClick = this.selectMaleImg; + this.changImg2 = new UIButton("更改头像",2); + this.bg.addChild(this.changImg2); + this.changImg2.x = 575; + this.changImg2.y = this.changImg1.y; + this.changImg2.onClick = this.selectFeMaleImg; + this.loadHeadImg1(this.maleHeadImg[0]); + this.loadHeadImg2(this.femaleHeadImg[0]); + var _loc5_:Bitmap = new Bitmap(this.face.getPng("title_junzhuming")); + this.bg.addChild(_loc5_); + _loc5_.x = 356; + _loc5_.y = 335; + this.input = new UIInputText(120); + this.bg.addChild(this.input); + this.input.x = _loc5_.x + 110; + this.input.y = _loc5_.y; + this.input.setMaxChars(16); + var _loc6_:MovieClip = this.face.getMovieClip("country_btn_1"); + var _loc7_:MovieClip = this.face.getMovieClip("country_btn_2"); + var _loc8_:MovieClip = this.face.getMovieClip("country_btn_3"); + var _loc9_:MovieClip = this.face.getMovieClip("country_btn_4"); + var _loc10_:MovieClip = this.face.getMovieClip("country_btn_5"); + var _loc11_:MovieClip = this.face.getMovieClip("country_btn_6"); + var _loc12_:MovieClip = this.face.getMovieClip("country_btn_7"); + this.btnArr.push(_loc6_); + this.btnArr.push(_loc7_); + this.btnArr.push(_loc8_); + this.btnArr.push(_loc9_); + this.btnArr.push(_loc10_); + this.btnArr.push(_loc11_); + this.btnArr.push(_loc12_); + for each(_loc13_ in this.btnArr) + { + _loc13_.visible = false; + _loc13_.buttonMode = true; + } + for each(_loc14_ in this.btnArr) + { + _loc14_.gotoAndStop(1); + _loc14_.addEventListener(MouseEvent.CLICK,this.mouse_click); + } + _loc15_ = 0; + _loc16_ = 1; + while(_loc16_ < 8) + { + if(CommonData.isCountryOpen(_loc16_)) + { + _loc17_ = _loc16_ - 1; + this.btnArr[_loc17_].visible = true; + if(_loc15_ == 0) + { + this.btnArr[_loc17_].dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + this.bg.addChild(this.btnArr[_loc17_]); + this.btnArr[_loc17_].x = 465 + 37 * _loc15_; + this.btnArr[_loc17_].y = 370; + _loc15_++; + } + _loc16_++; + } + this.mc_male.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + this.setPosi(); + ConnectService.getInstance().addEventListener(CreateUserEvent.CreateUser,this.createUserResult); + } + + private function resizeWind(param1:Event) : void + { + this.setPosi(); + } + + private function setPosi() : void + { + x = int(this.face.realWidth / 2 - width / 2); + y = int(this.face.realHeight / 2 - height / 2); + } + + private function enterGame(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.input.getText()); + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("君主名不能为空"); + return; + } + var _loc3_:User = new User(); + _loc3_.accId = NewUserData.getAccount().accId; + _loc3_.sex = this.currSex; + if(this.currSex == 1) + { + _loc3_.icon = this.headUrl1; + } + else + { + _loc3_.icon = this.headUrl2; + } + _loc3_.userName = _loc2_; + _loc3_.countryId = this.countryId; + ConnectService.getInstance().loginService.createUser(_loc3_,this.createUserResult); + } + + private function createUserResult(param1:Object) : void + { + var _loc3_:NewAccount = null; + LoadingMc.getInstance().unShow(); + if(!Utils.isCanSee(PathConfig.getInstance().getServerIp(),BaseBuild._arr)) + { + return; + } + var _loc2_:ReturnBean = param1 as ReturnBean; + if(_loc2_.result == ReturnBean.STATUS_0) + { + _loc3_ = new NewAccount(_loc2_.returnObj1); + NewUserData.setAccount(_loc3_); + ConnectService.getInstance().removeEventListener(CreateUserEvent.CreateUser,this.createUserResult); + InstallFace.getInstance().stage.removeEventListener(Event.RESIZE,this.resizeWind); + Utils.removeAll(this); + this.face.loginByUserId(); + this.face.enterGameCheck(); + return; + } + if(_loc2_.result == ReturnBean.STATUS_1) + { + MessageBoxUI.getInstance().addMessage(_loc2_.msg); + return; + } + } + + private function mouse_click(param1:MouseEvent) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + var _loc4_:int = 0; + if(this.lastCountryMc) + { + this.lastCountryMc.gotoAndStop(1); + } + this.lastCountryMc = param1.currentTarget as MovieClip; + this.lastCountryMc.gotoAndStop(3); + for(_loc3_ in this.btnArr) + { + if(param1.target == this.btnArr[_loc3_]) + { + _loc2_ = _loc3_; + break; + } + } + _loc4_ = CommonData.countryArr.indexOf(_loc2_ + 1); + if(_loc4_ < 0) + { + return; + } + this.countryId = _loc2_ + 1; + } + + private function loadHeadImg1(param1:String) : void + { + this.headUrl1 = param1; + this.loadItemPng1 = new LoadResource("pic/head/" + param1,this.loadPngBack1); + } + + private function loadPngBack1(param1:Event) : void + { + if(Boolean(this.maleImg) && this.mc_male.contains(this.maleImg)) + { + this.mc_male.removeChild(this.maleImg); + } + this.maleImg = param1.target.loader.content as Bitmap; + this.mc_male.addChild(this.maleImg); + this.maleImg.x = 2; + this.maleImg.y = 2; + this.maleImg.width = 94; + this.maleImg.height = 94; + this.loadItemPng1.clear(); + } + + private function loadHeadImg2(param1:String) : void + { + this.headUrl2 = param1; + this.loadItemPng2 = new LoadResource("pic/head/" + param1,this.loadPngBack2); + } + + private function loadPngBack2(param1:Event) : void + { + if(Boolean(this.femaleImg) && this.mc_female.contains(this.femaleImg)) + { + this.mc_female.removeChild(this.femaleImg); + } + this.femaleImg = param1.target.loader.content as Bitmap; + this.mc_female.addChild(this.femaleImg); + this.femaleImg.x = 2; + this.femaleImg.y = 2; + this.femaleImg.width = 94; + this.femaleImg.height = 94; + this.loadItemPng2.clear(); + } + + private function selectMale(param1:MouseEvent) : void + { + this.changImg1.visible = true; + this.changImg2.visible = false; + this.currSex = 1; + this.mc_male.filters = [PublicGlow.getInstance().yellowGlow1]; + this.mc_female.filters = null; + } + + private function selectReMale(param1:MouseEvent) : void + { + this.changImg1.visible = false; + this.changImg2.visible = true; + this.currSex = 2; + this.mc_male.filters = null; + this.mc_female.filters = [PublicGlow.getInstance().yellowGlow1]; + } + + private function selectMaleImg(param1:MouseEvent) : void + { + if(this.maleImgUI == null) + { + this.maleImgUI = new SelectHeadUI(this.maleHeadImg); + this.maleImgUI.selectImgFunc(this.loadHeadImg1); + } + if(!this.bg.contains(this.maleImgUI)) + { + this.bg.addChild(this.maleImgUI); + } + this.maleImgUI.x = int(this.bg.width / 2 - this.maleImgUI.width / 2); + this.maleImgUI.y = int(this.bg.height / 2 - this.maleImgUI.height / 2); + } + + private function selectFeMaleImg(param1:MouseEvent) : void + { + if(this.femaleImgUI == null) + { + this.femaleImgUI = new SelectHeadUI(this.femaleHeadImg); + this.femaleImgUI.selectImgFunc(this.loadHeadImg2); + } + if(!this.bg.contains(this.femaleImgUI)) + { + this.bg.addChild(this.femaleImgUI); + } + this.femaleImgUI.x = int(this.bg.width / 2 - this.femaleImgUI.width / 2); + this.femaleImgUI.y = int(this.bg.height / 2 - this.femaleImgUI.height / 2); + } + + private function clear() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/RegBtn.as b/flash_decompiled/com/view/ui/login/RegBtn.as new file mode 100644 index 0000000..6421be4 --- /dev/null +++ b/flash_decompiled/com/view/ui/login/RegBtn.as @@ -0,0 +1,26 @@ +package com.view.ui.login +{ + import com.common.Scale9Grid; + import com.view.newui.UIBaseBtn; + import flash.display.Bitmap; + + public class RegBtn extends UIBaseBtn + { + + public function RegBtn(param1:LoginUI) + { + super(); + normal_skin = new Scale9Grid(param1.getSprite("recharge_up"),37,14); + over_skin = new Scale9Grid(param1.getSprite("recharge_hover"),37,14); + down_skin = new Scale9Grid(param1.getSprite("recharge_down"),37,14); + var _loc2_:Bitmap = new Bitmap(param1.getPng("ui_title_11")); + addChild(_loc2_); + _loc2_.y = 4; + _loc2_.x = int(normal_skin.width / 2 - _loc2_.width / 2); + setButtonMode(); + addEvent(); + init(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/RegBtn1.as b/flash_decompiled/com/view/ui/login/RegBtn1.as new file mode 100644 index 0000000..f1ab7c4 --- /dev/null +++ b/flash_decompiled/com/view/ui/login/RegBtn1.as @@ -0,0 +1,26 @@ +package com.view.ui.login +{ + import com.common.Scale9Grid; + import com.view.newui.UIBaseBtn; + import flash.display.Bitmap; + + public class RegBtn1 extends UIBaseBtn + { + + public function RegBtn1(param1:LoginUI) + { + super(); + normal_skin = new Scale9Grid(param1.getSprite("recharge_up"),37,14); + over_skin = new Scale9Grid(param1.getSprite("recharge_hover"),37,14); + down_skin = new Scale9Grid(param1.getSprite("recharge_down"),37,14); + var _loc2_:Bitmap = new Bitmap(param1.getPng("ui_title_10")); + addChild(_loc2_); + _loc2_.y = 4; + _loc2_.x = int(normal_skin.width / 2 - _loc2_.width / 2); + setButtonMode(); + addEvent(); + init(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/RegBtn2.as b/flash_decompiled/com/view/ui/login/RegBtn2.as new file mode 100644 index 0000000..faf7abd --- /dev/null +++ b/flash_decompiled/com/view/ui/login/RegBtn2.as @@ -0,0 +1,26 @@ +package com.view.ui.login +{ + import com.common.Scale9Grid; + import com.view.newui.UIBaseBtn; + import flash.display.Bitmap; + + public class RegBtn2 extends UIBaseBtn + { + + public function RegBtn2(param1:LoginUI) + { + super(); + normal_skin = new Scale9Grid(param1.getSprite("recharge_up"),37,14); + over_skin = new Scale9Grid(param1.getSprite("recharge_hover"),37,14); + down_skin = new Scale9Grid(param1.getSprite("recharge_down"),37,14); + var _loc2_:Bitmap = new Bitmap(param1.getPng("ui_title_8")); + addChild(_loc2_); + _loc2_.y = 4; + _loc2_.x = int(normal_skin.width / 2 - _loc2_.width / 2); + setButtonMode(); + addEvent(); + init(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/login/SelectHeadUI.as b/flash_decompiled/com/view/ui/login/SelectHeadUI.as new file mode 100644 index 0000000..9dbae22 --- /dev/null +++ b/flash_decompiled/com/view/ui/login/SelectHeadUI.as @@ -0,0 +1,82 @@ +package com.view.ui.login +{ + import com.view.newui.UITitleConfig; + import com.view.ui.BaseUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class SelectHeadUI extends BaseUI + { + + private var currArr:Array; + + private var selectBackF:Function; + + public function SelectHeadUI(param1:Array) + { + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:ImageItem = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xuanzhehead); + this.currArr = param1; + var _loc2_:Sprite = new Sprite(); + addChild(_loc2_); + var _loc3_:int = 1; + while(_loc3_ < 4) + { + _loc4_ = 1; + while(_loc4_ < 8) + { + _loc5_ = (_loc3_ - 1) * 7 + _loc4_ - 1; + _loc6_ = new ImageItem(this.currArr[_loc5_]); + _loc2_.addChild(_loc6_); + _loc6_.x = 20 + (_loc4_ - 1) * 102; + _loc6_.y = 48 + (_loc3_ - 1) * 102; + _loc6_.addEventListener(MouseEvent.CLICK,this.selectHeadImg); + _loc4_++; + } + _loc3_++; + } + } + + override public function setWindowSize() : void + { + window_width = 525; + window_heihgt = 290; + } + + private function selectHeadImg(param1:MouseEvent) : void + { + var _loc2_:ImageItem = param1.currentTarget as ImageItem; + var _loc3_:String = _loc2_.currUrl; + this.selectBackF(_loc3_); + this.closeUI(param1); + } + + public function selectImgFunc(param1:Function) : void + { + this.selectBackF = param1; + } + + public function clear() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 700; + ui_closeBtn.y = 10; + } + } +} + diff --git a/flash_decompiled/com/view/ui/mail/MailBattleView.as b/flash_decompiled/com/view/ui/mail/MailBattleView.as new file mode 100644 index 0000000..1bd6f83 --- /dev/null +++ b/flash_decompiled/com/view/ui/mail/MailBattleView.as @@ -0,0 +1,307 @@ +package com.view.ui.mail +{ + import com.common.CommonAPI; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.message.event.MessEvent; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.view.newui.UIButton; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + + public class MailBattleView extends BaseUI + { + + private var atkTable:Sprite; + + private var dfcTable:Sprite; + + private var label1:TextField; + + private var label2:TextField; + + private var currId:int; + + public function MailBattleView() + { + var _loc1_:UIWindowBg = null; + super(); + _loc1_ = new UIWindowBg(); + _loc1_.initSecondPanel(622,233); + addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:UITitleBg = new UITitleBg("战斗伤亡",600); + _loc1_.addChild(_loc2_); + _loc2_.x = int(_loc1_.width / 2 - _loc2_.width / 2); + this.label1 = PublicMethod.getTextFieldWithFillter(16640697,610); + _loc1_.addChild(this.label1); + this.label1.x = 15; + this.label1.y = 40; + this.label1.styleSheet = CommonAPI.getLinkStyle(); + this.label1.htmlText = ""; + this.label1.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.label1.mouseEnabled = true; + var _loc3_:Array = ["进攻武将","等级","军队","数量","伤亡","恢复"]; + var _loc4_:Array = [64,40,65,48,48,48]; + var _loc5_:UITable = new UITable(); + _loc5_.lineHeight = 26; + _loc5_.drawLine = true; + _loc5_.install(5,_loc3_,_loc4_); + _loc1_.addChild(_loc5_); + _loc5_.x = 4; + _loc5_.y = 82; + this.atkTable = this.getTable(); + _loc5_.addChild(this.atkTable); + this.atkTable.y = 26; + var _loc6_:Array = ["防守武将","等级","军队","数量","伤亡","恢复"]; + var _loc7_:Array = [64,40,65,48,48,48]; + var _loc8_:UITable = new UITable(); + _loc8_.lineHeight = 26; + _loc8_.drawLine = true; + _loc8_.install(5,_loc6_,_loc7_); + _loc1_.addChild(_loc8_); + _loc8_.x = _loc8_.x + _loc8_.width + 4; + _loc8_.y = _loc5_.y; + this.dfcTable = this.getTable(); + _loc8_.addChild(this.dfcTable); + this.dfcTable.y = 26; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initSecondPanel(622,120); + addChild(_loc9_); + _loc9_.x = 4; + _loc9_.y = 251; + var _loc10_:UITitleBg = new UITitleBg("战斗结果",600); + _loc9_.addChild(_loc10_); + _loc10_.x = int(_loc9_.width / 2 - _loc10_.width / 2); + this.label2 = PublicMethod.getTextFieldWithFillter(16640697,617); + this.label2.width = 617; + this.label2.height = 73; + this.label2.wordWrap = true; + this.label2.multiline = true; + this.label2.textColor = 16777215; + _loc9_.addChild(this.label2); + this.label2.x = 5; + this.label2.y = 30; + var _loc11_:UIButton = new UIButton("返 回",2,10); + _loc9_.addChild(_loc11_); + _loc11_.x = 558; + _loc11_.y = 102; + _loc11_.onClick = this.back; + } + + private function getTable() : Sprite + { + var _loc3_:TextField = null; + var _loc4_:TextField = null; + var _loc5_:TextField = null; + var _loc6_:TextField = null; + var _loc7_:TextField = null; + var _loc8_:TextField = null; + var _loc1_:Sprite = new Sprite(); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + _loc3_ = PublicMethod.getTextFieldWithFillter(16640697,64); + _loc4_ = PublicMethod.getTextFieldWithFillter(16640697,41); + _loc5_ = PublicMethod.getTextFieldWithFillter(16640697,66); + _loc6_ = PublicMethod.getTextFieldWithFillter(16640697,48); + _loc7_ = PublicMethod.getTextFieldWithFillter(16640697,46); + _loc8_ = PublicMethod.getTextFieldWithFillter(16640697,42); + _loc1_.addChild(_loc3_); + _loc1_.addChild(_loc4_); + _loc1_.addChild(_loc5_); + _loc1_.addChild(_loc6_); + _loc1_.addChild(_loc7_); + _loc1_.addChild(_loc8_); + _loc4_.x = _loc3_.x + _loc3_.width; + _loc5_.x = _loc4_.x + _loc4_.width; + _loc6_.x = _loc5_.x + _loc5_.width; + _loc7_.x = _loc6_.x + _loc6_.width; + _loc8_.x = _loc7_.x + _loc7_.width; + _loc3_.y = 4 + 26 * _loc2_; + _loc4_.y = _loc3_.y; + _loc5_.y = _loc3_.y; + _loc6_.y = _loc3_.y; + _loc7_.y = _loc3_.y; + _loc8_.y = _loc3_.y; + _loc3_.name = "t_" + _loc2_ + "_0"; + _loc4_.name = "t_" + _loc2_ + "_1"; + _loc5_.name = "t_" + _loc2_ + "_2"; + _loc6_.name = "t_" + _loc2_ + "_3"; + _loc7_.name = "t_" + _loc2_ + "_4"; + _loc8_.name = "t_" + _loc2_ + "_5"; + _loc2_++; + } + return _loc1_; + } + + public function addEvent() : void + { + ConnectService.getInstance().addEventListener(MessEvent.Mess_readBattleMessage,this.getMessViewResult); + } + + public function delEvent() : void + { + ConnectService.getInstance().removeEventListener(MessEvent.Mess_readBattleMessage,this.getMessViewResult); + this.clearValue(); + } + + private function clearValue() : void + { + this.currId = 0; + } + + public function getMessView(param1:int) : void + { + if(this.currId == param1) + { + return; + } + this.currId = param1; + ConnectService.getInstance().messageService.readBattleMessage(param1); + } + + private function getMessViewResult(param1:MessEvent) : void + { + var _loc2_:Object = param1.obj; + if(_loc2_.messageId != this.currId) + { + return; + } + this.label1.htmlText = _loc2_.title; + var _loc3_:String = ""; + if(_loc2_.type == "pve") + { + if(_loc2_.towerLost != "") + { + _loc3_ += _loc2_.towerLost + "
"; + } + if(_loc2_.honor != null) + { + _loc3_ += _loc2_.honor + "
"; + } + if(_loc2_.gainItem != null) + { + _loc3_ += _loc2_.gainItem; + } + this.label2.htmlText = _loc3_; + } + else if(_loc2_.type == "evp") + { + if(_loc2_.towerLost != "") + { + _loc3_ += _loc2_.towerLost + "
"; + } + if(_loc2_.otherMsg != null) + { + _loc3_ += _loc2_.otherMsg; + } + this.label2.htmlText = _loc3_; + } + else if(_loc2_.type == "pvp") + { + _loc3_ = ""; + if(_loc2_.towerLost != "") + { + _loc3_ += _loc2_.towerLost + "
"; + } + if(_loc2_.otherMsg != null) + { + _loc3_ += _loc2_.otherMsg; + } + this.label2.htmlText = _loc3_; + } + else if(_loc2_.type == "fight") + { + if(_loc2_.mainMessage != "") + { + _loc3_ += _loc2_.mainMessage + "
"; + } + if(_loc2_.childMessage != null) + { + _loc3_ += _loc2_.childMessage + "
"; + } + if(_loc2_.gainItem != null) + { + _loc3_ += _loc2_.gainItem; + } + this.label2.htmlText = _loc3_; + } + var _loc4_:Array = _loc2_.atkTeams; + var _loc5_:Array = _loc2_.dfcTeams; + var _loc6_:int = 0; + while(_loc6_ < 5) + { + if(_loc4_[_loc6_].teamName) + { + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_0")).htmlText = "

" + _loc4_[_loc6_].teamName + "

"; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_1")).htmlText = "

" + _loc4_[_loc6_].heroLv + "

"; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_2")).htmlText = "

" + _loc4_[_loc6_].armyName + "

"; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_3")).htmlText = "

" + _loc4_[_loc6_].initNum + "

"; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_4")).htmlText = "

" + _loc4_[_loc6_].loseNum + "

"; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_5")).htmlText = "

" + _loc4_[_loc6_].resumeNum + "

"; + } + else + { + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_0")).htmlText = ""; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_1")).htmlText = ""; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_2")).htmlText = ""; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_3")).htmlText = ""; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_4")).htmlText = ""; + TextField(this.atkTable.getChildByName("t_" + _loc6_ + "_5")).htmlText = ""; + } + if(_loc5_[_loc6_].teamName) + { + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_0")).htmlText = "

" + _loc5_[_loc6_].teamName + "

"; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_1")).htmlText = "

" + _loc5_[_loc6_].heroLv + "

"; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_2")).htmlText = "

" + _loc5_[_loc6_].armyName + "

"; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_3")).htmlText = "

" + _loc5_[_loc6_].initNum + "

"; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_4")).htmlText = "

" + _loc5_[_loc6_].loseNum + "

"; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_5")).htmlText = "

" + _loc5_[_loc6_].resumeNum + "

"; + } + else + { + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_0")).htmlText = ""; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_1")).htmlText = ""; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_2")).htmlText = ""; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_3")).htmlText = ""; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_4")).htmlText = ""; + TextField(this.dfcTable.getChildByName("t_" + _loc6_ + "_5")).htmlText = ""; + } + _loc6_++; + } + } + + private function back(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + this.delEvent(); + } + } + + override public function setPosition() : void + { + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:Array = param1.text.split(","); + var _loc3_:LinkEvent = new LinkEvent(); + _loc3_.id = "map"; + _loc3_.eventType = "map"; + _loc3_.data = _loc2_; + EventUtils.getInstance().dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mail/MailLineMc.as b/flash_decompiled/com/view/ui/mail/MailLineMc.as new file mode 100644 index 0000000..b077242 --- /dev/null +++ b/flash_decompiled/com/view/ui/mail/MailLineMc.as @@ -0,0 +1,264 @@ +package com.view.ui.mail +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MailLineMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var centerCss:TextFormat = PublicMethod.getCenterTextFormat(); + + private var bg:Sprite; + + public var clickBg:Sprite; + + private var selectCss:TextFormat; + + private var normalCss:TextFormat; + + private var fujianMc:Sprite; + + private var selectBg:Sprite; + + private var hasSelect:Boolean; + + private var readMc:Sprite; + + private var readText:TextField; + + private var checkBox:UICheckBtn; + + private var userText:TextField; + + private var titleText:TextField; + + private var timeText:TextField; + + private var mailObj:Object; + + public var type:int; + + public function MailLineMc() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.selectBgColor,623,25); + addChild(this.bg); + this.bg.alpha = 0.2; + this.bg.visible = false; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,623,25); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 4; + this.checkBox.y = 2; + this.checkBox.visible = false; + this.checkBox.setUnSelect(); + this.readMc = this.face.getSprite(ClassConfig.lib_ui_noreadmail); + addChild(this.readMc); + this.readMc.x = 25; + this.readMc.y = 5; + this.readMc.visible = false; + this.readText = PublicMethod.getTextFieldWithFillter(16777215,38); + addChild(this.readText); + this.readText.x = 44; + this.readText.y = this.checkBox.y + 2; + this.readText.mouseEnabled = false; + this.fujianMc = this.face.getSprite(ClassConfig.lib_biezhen); + addChild(this.fujianMc); + this.fujianMc.x = this.readText.x + this.readText.width - 2; + this.fujianMc.y = 6; + this.fujianMc.visible = false; + this.userText = PublicMethod.getTextFieldWithFillter(16777215,86); + addChild(this.userText); + this.userText.x = this.readText.x + this.readText.width; + this.userText.y = this.readText.y; + this.userText.mouseEnabled = false; + this.titleText = PublicMethod.getTextFieldWithFillter(16777215,335); + addChild(this.titleText); + this.titleText.x = this.userText.x + this.userText.width; + this.titleText.y = this.readText.y; + this.titleText.mouseEnabled = false; + this.timeText = PublicMethod.getTextFieldWithFillter(16777215,120); + addChild(this.timeText); + this.timeText.x = this.titleText.x + this.titleText.width + 2; + this.timeText.y = this.readText.y; + this.timeText.mouseEnabled = false; + this.clickBg = PublicMethod.createShape(16777215,410,24); + this.clickBg.alpha = 0; + addChild(this.clickBg); + this.clickBg.x = this.titleText.x; + this.clickBg.visible = false; + this.selectCss = new TextFormat(); + this.selectCss.color = 16773120; + this.normalCss = new TextFormat(); + this.normalCss.color = 16777215; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.checkBox.onClick = this.clickBox; + } + + public function getSelect() : Boolean + { + return this.hasSelect; + } + + private function clickBox(param1:MouseEvent) : void + { + this.hasSelect = !this.hasSelect; + this.setSelect(this.hasSelect); + } + + public function setSelect(param1:Boolean) : void + { + if(this.mailObj == null) + { + return; + } + this.hasSelect = param1; + if(!param1) + { + this.checkBox.setUnSelect(); + this.selectBg.visible = false; + } + else + { + this.bg.visible = false; + this.checkBox.setSelect(); + this.selectBg.visible = true; + } + } + + public function getMailObj() : Object + { + return this.mailObj; + } + + public function setData(param1:Object) : void + { + var _loc2_:String = null; + this.setSelect(false); + this.mailObj = param1; + if(this.mailObj == null) + { + this.checkBox.visible = false; + this.readMc.visible = false; + this.readText.text = ""; + this.userText.text = ""; + this.titleText.text = ""; + this.timeText.text = ""; + this.clickBg.visible = false; + this.fujianMc.visible = false; + this.selectBg.visible = false; + } + else + { + if(param1.appendixFlag == 1) + { + this.fujianMc.visible = true; + } + else + { + this.fujianMc.visible = false; + } + this.checkBox.visible = true; + this.clickBg.visible = true; + if(this.mailObj.messageReceiveType == 2) + { + this.readMc.visible = true; + this.readText.text = "未读"; + this.titleText.htmlText = this.mailObj.title; + this.readText.defaultTextFormat = this.selectCss; + this.userText.defaultTextFormat = this.selectCss; + this.titleText.defaultTextFormat = this.selectCss; + this.timeText.defaultTextFormat = this.selectCss; + } + else + { + this.readMc.visible = false; + this.readText.text = "已读"; + this.titleText.htmlText = this.mailObj.title; + this.readText.defaultTextFormat = this.normalCss; + this.userText.defaultTextFormat = this.normalCss; + this.titleText.defaultTextFormat = this.normalCss; + this.timeText.defaultTextFormat = this.normalCss; + } + this.titleText.setTextFormat(this.centerCss); + if(this.type == 1) + { + _loc2_ = this.mailObj.sendUserName; + if(_loc2_ == "system") + { + _loc2_ = "系统"; + } + } + if(this.type == 2) + { + if(this.mailObj.sendUserId < 0) + { + _loc2_ = "系统"; + } + else + { + _loc2_ = param1.sendUserName; + } + } + this.userText.text = _loc2_; + this.userText.setTextFormat(this.centerCss); + this.timeText.text = this.mailObj.sendDttmView; + this.timeText.setTextFormat(this.centerCss); + } + } + + public function setRead() : void + { + if(this.mailObj) + { + this.readMc.visible = false; + this.readText.text = "已读"; + this.titleText.htmlText = this.mailObj.title; + this.titleText.setTextFormat(this.centerCss); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.mailObj != null && !this.hasSelect) + { + this.bg.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.mailObj != null && !this.hasSelect) + { + this.bg.visible = true; + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:Array = param1.text.split(","); + var _loc3_:LinkEvent = new LinkEvent(); + _loc3_.id = "kingInfo"; + _loc3_.eventType = "kingInfo"; + _loc3_.data = _loc2_; + EventUtils.getInstance().dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mail/MailSysUI.as b/flash_decompiled/com/view/ui/mail/MailSysUI.as new file mode 100644 index 0000000..a715cb1 --- /dev/null +++ b/flash_decompiled/com/view/ui/mail/MailSysUI.as @@ -0,0 +1,440 @@ +package com.view.ui.mail +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.message.event.MessEvent; + import com.view.newui.UIButton; + import com.view.newui.UICheckBtn; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class MailSysUI extends BaseUI + { + + private var bg2:Sprite; + + private var tableMc:UITable; + + private var mailListVec:Vector.; + + private var pageMc:UIPageMc; + + private var checkBox:UICheckBtn; + + private var countText:TextField; + + private var oneKetGet:UIButton; + + private var readFlag:int = 0; + + private var pageNum:int; + + private var sendFlag:int; + + private var messageType:int; + + private var messList:Array; + + private var selectAllStatus:Boolean; + + private var messViewUI:MailViewUI; + + private var battleView:MailBattleView; + + private var showNoReadMail:Boolean; + + public function MailSysUI() + { + var _loc1_:Array = null; + var _loc4_:UIButton = null; + var _loc5_:UIButton = null; + var _loc6_:UIButton = null; + var _loc9_:MailLineMc = null; + super(); + _loc1_ = ["发件人","主题","日期"]; + var _loc2_:Array = [170,337,128]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.mailListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc9_ = new MailLineMc(); + this.mailListVec.push(_loc9_); + this.tableMc.addChild(_loc9_); + _loc9_.type = 2; + _loc9_.y = 26 + _loc3_ * 26; + _loc9_.x = 4; + _loc9_.clickBg.addEventListener(MouseEvent.CLICK,this.viewMail,false,0,true); + _loc3_++; + } + this.pageMc = new UIPageMc(); + addChild(this.pageMc); + this.pageMc.x = 530; + this.pageMc.y = 352; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + _loc4_ = new UIButton("全选",1); + _loc5_ = new UIButton("删除",1); + _loc6_ = new UIButton("删除已读",2); + addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = 350; + _loc4_.onClick = this.selectAll; + addChild(_loc5_); + _loc5_.x = _loc4_.x + _loc4_.width + 5; + _loc5_.y = _loc4_.y; + _loc5_.onClick = this.delSelect; + addChild(_loc6_); + _loc6_.x = _loc5_.x + _loc5_.width + 5; + _loc6_.y = _loc4_.y; + _loc6_.onClick = this.delReadMail; + this.oneKetGet = new UIButton("一键领取",2); + addChild(this.oneKetGet); + this.oneKetGet.x = _loc6_.x + _loc6_.width + 5; + this.oneKetGet.y = 350; + this.oneKetGet.onClick = this.oneKetGetMail; + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = this.oneKetGet.x + this.oneKetGet.width + 10; + this.checkBox.y = _loc4_.y + 3; + this.checkBox.onClick = this.showNoRead; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(_loc7_); + _loc7_.text = "只显示未读邮件"; + _loc7_.x = this.checkBox.x + 20; + _loc7_.y = this.checkBox.y + 1; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(16777215,45); + addChild(_loc8_); + _loc8_.text = "总条数:"; + _loc8_.x = 380; + _loc8_.y = this.checkBox.y; + this.countText = PublicMethod.getTextFieldWithFillter(16773120,45); + addChild(this.countText); + this.countText.x = 425; + this.countText.y = this.checkBox.y; + } + + override public function setPosition() : void + { + } + + public function nextPage() : void + { + this.pageNum += 1; + this.getMailList(); + } + + public function prePage() : void + { + --this.pageNum; + this.getMailList(); + } + + private function clickPage(param1:MouseEvent) : void + { + } + + public function getMailCount() : void + { + ConnectService.getInstance().messageService.readCount(this.readFlag,this.sendFlag,this.messageType); + } + + private function getMailList() : void + { + this.selectAllStatus = false; + ConnectService.getInstance().messageService.readMessageList(this.readFlag,this.pageNum,this.sendFlag,this.messageType); + } + + private function getMailListCountResult(param1:MessEvent) : void + { + var _loc4_:MailLineMc = null; + var _loc2_:int = param1.obj as int; + var _loc3_:int = int(_loc2_ / 12) + 1; + this.pageMc.setPageCount(_loc3_); + this.countText.text = _loc2_.toString(); + if(_loc2_ == 0) + { + for each(_loc4_ in this.mailListVec) + { + _loc4_.setData(null); + } + this.pageMc.setPage(1); + } + else + { + this.getMailList(); + } + } + + private function getMailListResult(param1:MessEvent) : void + { + var _loc2_:MailLineMc = null; + var _loc3_:int = 0; + this.messList = param1.list; + if(param1.obj.pageNo != this.pageNum) + { + return; + } + this.pageMc.setPage(this.pageNum); + if(this.messList == null || this.messList.length == 0) + { + for each(_loc2_ in this.mailListVec) + { + _loc2_.setData(null); + } + } + else + { + _loc3_ = 0; + while(_loc3_ < 12) + { + if(this.messList[_loc3_]) + { + this.mailListVec[_loc3_].setSelect(false); + this.mailListVec[_loc3_].setData(this.messList[_loc3_]); + } + else + { + this.mailListVec[_loc3_].setData(null); + } + _loc3_++; + } + } + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(MessEvent.Mess_getMessageByType,this.getMailListResult); + ConnectService.getInstance().removeEventListener(MessEvent.Mess_getMessageCount,this.getMailListCountResult); + ConnectService.getInstance().removeEventListener(MessEvent.Mess_delOneMessage,this.delOneMailResult); + ConnectService.getInstance().removeEventListener(MessEvent.Mess_delMessage,this.delMailResult); + ConnectService.getInstance().removeEventListener(MessEvent.Mess_delReadMessage,this.delReadMailResult); + if(Boolean(this.messViewUI) && contains(this.messViewUI)) + { + removeChild(this.messViewUI); + this.messViewUI.delEvent(); + } + if(Boolean(this.battleView) && contains(this.battleView)) + { + removeChild(this.battleView); + this.battleView.delEvent(); + } + } + + public function addEvent() : void + { + this.pageNum = 1; + this.getMailCount(); + if(this.messageType == 1) + { + this.oneKetGet.visible = true; + } + else + { + this.oneKetGet.visible = false; + } + ConnectService.getInstance().addEventListener(MessEvent.Mess_getMessageByType,this.getMailListResult); + ConnectService.getInstance().addEventListener(MessEvent.Mess_getMessageCount,this.getMailListCountResult); + ConnectService.getInstance().addEventListener(MessEvent.Mess_delOneMessage,this.delOneMailResult); + ConnectService.getInstance().addEventListener(MessEvent.Mess_delMessage,this.delMailResult); + ConnectService.getInstance().addEventListener(MessEvent.Mess_delReadMessage,this.delReadMailResult); + } + + public function set type(param1:int) : void + { + if(param1 == 1) + { + this.messageType = 0; + this.sendFlag = 1; + } + else if(param1 == 2) + { + this.messageType = 1; + this.sendFlag = 1; + } + else if(param1 == 3) + { + this.messageType = 0; + this.sendFlag = 0; + } + } + + private function selectAll(param1:MouseEvent) : void + { + var _loc2_:MailLineMc = null; + this.selectAllStatus = !this.selectAllStatus; + for each(_loc2_ in this.mailListVec) + { + _loc2_.setSelect(this.selectAllStatus); + } + } + + private function viewMail(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc2_:MailLineMc = param1.currentTarget.parent as MailLineMc; + if(_loc2_.getMailObj() != null) + { + _loc2_.setRead(); + _loc3_ = int(_loc2_.getMailObj().messageId); + _loc4_ = int(_loc2_.getMailObj().childType); + if(_loc4_ == 1 || _loc4_ == 2 || _loc4_ == 3) + { + this.showBattleView(_loc3_); + } + else + { + this.showMail(_loc3_); + } + } + } + + private function showMail(param1:int) : void + { + if(this.messViewUI == null) + { + this.messViewUI = new MailViewUI(); + } + if(!contains(this.messViewUI)) + { + addChild(this.messViewUI); + this.messViewUI.addEvent(); + } + this.messViewUI.getMessView(param1); + } + + private function showBattleView(param1:int) : void + { + if(this.battleView == null) + { + this.battleView = new MailBattleView(); + } + if(!contains(this.battleView)) + { + addChild(this.battleView); + this.battleView.addEvent(); + } + this.battleView.getMessView(param1); + } + + private function showNoRead(param1:MouseEvent) : void + { + if(!this.showNoReadMail) + { + this.showNoReadMail = true; + this.readFlag = 1; + this.checkBox.setSelect(); + } + else + { + this.showNoReadMail = false; + this.readFlag = 0; + this.checkBox.setUnSelect(); + } + this.getMailCount(); + } + + private function delMail(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:String = null; + var _loc2_:MailLineMc = param1.currentTarget.parent as MailLineMc; + if(_loc2_.getMailObj() != null) + { + _loc3_ = int(_loc2_.getMailObj().messageId); + _loc4_ = "确认删除吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc4_,this.confimDelOne,_loc3_); + } + } + + private function confimDelOne(param1:int) : void + { + ConnectService.getInstance().messageService.deleteMessageOne(param1); + } + + private function delOneMailResult(param1:MessEvent) : void + { + this.getMailCount(); + } + + private function delSelect(param1:MouseEvent) : void + { + var _loc3_:MailLineMc = null; + var _loc2_:Array = new Array(); + for each(_loc3_ in this.mailListVec) + { + if(Boolean(_loc3_.getMailObj()) && _loc3_.getSelect()) + { + _loc2_.push(_loc3_.getMailObj().messageId); + } + } + if(_loc2_.length == 0) + { + MessageBoxUI.getInstance().addMessage("请选择邮件"); + } + else + { + MessageBoxUI.getInstance().confirmMsg("确认删除吗?",this.confimDelSelect,_loc2_); + } + } + + private function oneKetGetMail(param1:MouseEvent) : void + { + var _loc3_:MailLineMc = null; + var _loc2_:Array = new Array(); + for each(_loc3_ in this.mailListVec) + { + if(Boolean(_loc3_.getMailObj()) && _loc3_.getSelect()) + { + _loc2_.push(_loc3_.getMailObj().messageId); + } + } + if(_loc2_.length == 0) + { + MessageBoxUI.getInstance().addMessage("请选择一键领取的邮件"); + } + else + { + ConnectService.getInstance().messageService.oneKeyGetMess(_loc2_); + } + } + + private function confimDelSelect(param1:Array) : void + { + ConnectService.getInstance().messageService.deleteMessage(param1); + } + + private function delMailResult(param1:MessEvent) : void + { + this.getMailCount(); + } + + private function delReadMail(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确认删除吗?",this.confimDelReadMail); + } + + private function confimDelReadMail() : void + { + ConnectService.getInstance().messageService.deleteReaded(this.messageType); + } + + private function delReadMailResult(param1:MessEvent) : void + { + this.getMailCount(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mail/MailUI.as b/flash_decompiled/com/view/ui/mail/MailUI.as new file mode 100644 index 0000000..7ebcc30 --- /dev/null +++ b/flash_decompiled/com/view/ui/mail/MailUI.as @@ -0,0 +1,212 @@ +package com.view.ui.mail +{ + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class MailUI extends BaseUI + { + + private static var instance:MailUI; + + private var startPage:int; + + private var receiveName:String = ""; + + private var btnArr:Array = new Array(); + + private var paneBg:UIWindowBg; + + public var showApply:Boolean; + + private var currPage:int = -1; + + public var mailSysUI:MailSysUI; + + private var writeUI:MailWriteUI; + + public function MailUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_youjian); + this.setPosition(); + this.createUI(); + } + + public static function getInstance() : MailUI + { + if(instance == null) + { + return instance = new MailUI(); + } + return instance; + } + + public function setStartPage(param1:int) : void + { + this.startPage = param1; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + public function setReceiveName(param1:String) : void + { + this.receiveName = param1; + } + + override public function createUI() : void + { + var _loc4_:int = 0; + var _loc5_:UITabBtn = null; + 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.changTab; + _loc4_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.setBtnSelect(this.btnArr[this.startPage]); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.removePage(this.currPage); + this.currPage = -1; + } + + private function changTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + this.setBtnSelect(_loc2_); + } + + private function setBtnSelect(param1:UITabBtn) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(param1 == _loc4_) + { + _loc4_.select = true; + _loc2_ = _loc3_; + } + else + { + _loc4_.select = false; + } + } + this.openPage(_loc2_); + } + + private function removePage(param1:int) : void + { + if(param1 == 2) + { + if(Boolean(this.writeUI) && this.paneBg.contains(this.writeUI)) + { + this.paneBg.removeChild(this.writeUI); + this.writeUI.clearEvent(); + } + } + else if(Boolean(this.mailSysUI) && this.paneBg.contains(this.mailSysUI)) + { + this.paneBg.removeChild(this.mailSysUI); + this.mailSysUI.clearEvent(); + } + } + + override public function show() : void + { + super.show(); + } + + private function openPage(param1:int) : void + { + if(this.currPage == param1) + { + return; + } + if(this.currPage == 2) + { + this.paneBg.removeChild(this.writeUI); + this.writeUI.clearEvent(); + } + else if(this.currPage != -1) + { + this.paneBg.removeChild(this.mailSysUI); + this.mailSysUI.clearEvent(); + } + this.currPage = param1; + if(this.currPage == 0 || this.currPage == 1) + { + this.createPage1(); + } + else + { + this.createPage3(); + } + } + + private function createPage1() : void + { + if(this.mailSysUI == null) + { + this.mailSysUI = new MailSysUI(); + } + this.paneBg.addChild(this.mailSysUI); + if(this.currPage == 0) + { + this.mailSysUI.type = 2; + } + else + { + this.mailSysUI.type = 1; + } + this.mailSysUI.addEvent(); + } + + private function createPage3() : void + { + if(this.writeUI == null) + { + this.writeUI = new MailWriteUI(); + } + this.paneBg.addChild(this.writeUI); + this.writeUI.addEvent(); + if(this.receiveName != "") + { + this.writeUI.setReveiceName(this.receiveName); + this.receiveName = ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/mail/MailViewUI.as b/flash_decompiled/com/view/ui/mail/MailViewUI.as new file mode 100644 index 0000000..2f9ce15 --- /dev/null +++ b/flash_decompiled/com/view/ui/mail/MailViewUI.as @@ -0,0 +1,269 @@ +package com.view.ui.mail +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.message.event.MessEvent; + import com.data.data.items.Item; + import com.view.mc.sprite.MessListBar; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.newui.UIWindowBg; + import com.view.tip.ItemTip; + import com.view.ui.BaseUI; + 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.text.TextField; + + public class MailViewUI extends BaseUI + { + + private var lingquBtn:UISmallBtn; + + private var fujianMc:Sprite; + + private var messBar:MessListBar; + + private var reveiceLabel:TextField; + + private var titleText:TextField; + + private var timeText:TextField; + + private var num_txt:TextField; + + private var currId:int; + + private var loadRes:LoadResource; + + private var itemImg:Bitmap; + + private var ImgSp:Sprite; + + private var itemsTip:ItemTip; + + public function MailViewUI() + { + var _loc4_:TextField = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622,367); + addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc2_.text = "发 件 人:"; + _loc1_.addChild(_loc2_); + _loc2_.x = 27; + _loc2_.y = 25; + this.reveiceLabel = PublicMethod.getTextFieldWithFillter(16640697,200); + _loc1_.addChild(this.reveiceLabel); + this.reveiceLabel.x = _loc2_.x + _loc2_.width + 10; + this.reveiceLabel.y = 25; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc3_.text = "发送时间:"; + _loc1_.addChild(_loc3_); + _loc3_.x = 27; + _loc3_.y = 50; + this.timeText = PublicMethod.getTextFieldWithFillter(16640697,190); + _loc1_.addChild(this.timeText); + this.timeText.x = _loc3_.x + _loc3_.width + 10; + this.timeText.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc4_.text = "主 题:"; + _loc1_.addChild(_loc4_); + _loc4_.x = 27; + _loc4_.y = 75; + this.titleText = PublicMethod.getTextFieldWithFillter(16640697,190); + _loc1_.addChild(this.titleText); + this.titleText.x = _loc4_.x + _loc4_.width + 10; + this.titleText.y = _loc4_.y; + this.fujianMc = new Sprite(); + _loc1_.addChild(this.fujianMc); + this.fujianMc.x = 550; + this.fujianMc.y = 12; + var _loc5_:Bitmap = new Bitmap(face.getPng(UIConfig.bigItem_lock_skin)); + this.fujianMc.addChild(_loc5_); + _loc5_.width = 59; + _loc5_.height = 59; + this.lingquBtn = new UISmallBtn("领 取",2); + this.fujianMc.addChild(this.lingquBtn); + this.lingquBtn.x = 4; + this.lingquBtn.y = 62; + this.lingquBtn.onClick = this.getItem; + this.ImgSp = new Sprite(); + this.fujianMc.addChild(this.ImgSp); + this.ImgSp.x = 3; + this.ImgSp.y = 3; + this.num_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,30); + this.fujianMc.addChild(this.num_txt); + this.num_txt.x = 25; + this.num_txt.y = 38; + this.num_txt.defaultTextFormat = PublicMethod.getRightTextFormat(); + var _loc6_:UIWindowBg = new UIWindowBg(); + _loc6_.initSecondPanel(572,221); + _loc1_.addChild(_loc6_); + _loc6_.x = 27; + _loc6_.y = 100; + this.messBar = new MessListBar(); + this.messBar.setSize(576,230); + this.messBar.create(); + _loc1_.addChild(this.messBar); + this.messBar.x = 30; + this.messBar.y = 102; + this.messBar.tf.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + var _loc7_:UIButton = new UIButton("返回"); + _loc1_.addChild(_loc7_); + _loc7_.x = 555; + _loc7_.y = 337; + _loc7_.onClick = this.back; + } + + override public function setPosition() : void + { + } + + public function addEvent() : void + { + ConnectService.getInstance().addEventListener(MessEvent.Mess_getMessageView,this.getMessViewResult); + ConnectService.getInstance().addEventListener(MessEvent.Mess_getDaoJun,this.getItemResult); + } + + public function delEvent() : void + { + ConnectService.getInstance().removeEventListener(MessEvent.Mess_getMessageView,this.getMessViewResult); + ConnectService.getInstance().removeEventListener(MessEvent.Mess_getDaoJun,this.getItemResult); + this.clearValue(); + } + + private function clearValue() : void + { + this.timeText.text = ""; + this.reveiceLabel.text = ""; + this.titleText.text = ""; + this.messBar.print(""); + this.currId = 0; + } + + public function getMessView(param1:int) : void + { + if(this.currId == param1) + { + return; + } + this.fujianMc.visible = false; + this.currId = param1; + ConnectService.getInstance().messageService.viewMessage(param1); + } + + private function getMessViewResult(param1:MessEvent) : void + { + var _loc4_:Item = null; + var _loc2_:Object = param1.obj; + if(_loc2_.messageId != this.currId) + { + return; + } + if(_loc2_.sendUserName == "SYSTEM") + { + this.reveiceLabel.text = "系统"; + } + else + { + this.reveiceLabel.text = _loc2_.sendUserName; + } + this.titleText.htmlText = _loc2_.title; + this.messBar.print(_loc2_.comment); + var _loc3_:Date = _loc2_.sendDttm as Date; + this.timeText.text = _loc2_.sendDttmView; + if(_loc2_.entityId > 0 && Boolean(_loc2_.item)) + { + _loc4_ = _loc2_.item as Item; + this.loadImg(_loc4_.iconPath); + this.num_txt.text = _loc2_.itemNum; + this.fujianMc.visible = true; + this.lingquBtn.setText("领 取"); + this.lingquBtn.setEnable(); + if(_loc2_.appendixFlag == 2) + { + this.lingquBtn.setText("已领取"); + this.lingquBtn.setUnEnable(); + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + } + PublicMethod.setBlack(this.ImgSp); + return; + } + PublicMethod.setColor(this.ImgSp); + if(this.itemsTip == null) + { + this.itemsTip = new ItemTip(this.ImgSp,face.stage,face.tip_bg,_loc4_.viewMap); + } + else + { + this.itemsTip.setTipData(_loc4_.viewMap); + } + } + else + { + this.fujianMc.visible = false; + } + } + + private function loadImg(param1:String) : void + { + this.loadRes = new LoadResource(ServerConfig.IMAGE_ITEM_URL + param1,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.itemImg) && this.ImgSp.contains(this.itemImg)) + { + this.ImgSp.removeChild(this.itemImg); + } + this.itemImg = Bitmap(param1.target.loader.content); + this.ImgSp.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + this.loadRes.clear(); + } + + private function back(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + this.delEvent(); + } + } + + private function getItem(param1:MouseEvent) : void + { + this.lingquBtn.setUnEnable(); + ConnectService.getInstance().messageService.getDaoJun(this.currId); + } + + private function getItemResult(param1:MessEvent) : void + { + MessageBoxUI.getInstance().addMessage("领取成功"); + ConnectService.getInstance().messageService.viewMessage(this.currId); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mail/MailWriteUI.as b/flash_decompiled/com/view/ui/mail/MailWriteUI.as new file mode 100644 index 0000000..a61a237 --- /dev/null +++ b/flash_decompiled/com/view/ui/mail/MailWriteUI.as @@ -0,0 +1,261 @@ +package com.view.ui.mail +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.friend.event.FriendEvent; + import com.control.message.event.MessEvent; + import com.view.mc.sprite.MessListBar; + import com.view.newui.UIButton; + import com.view.newui.UICheckBtn; + import com.view.newui.UIInputText; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import fl.controls.ComboBox; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MailWriteUI extends BaseUI + { + + private var tft:TextFormat; + + private var friendCombox:ComboBox; + + private var messBar:MessListBar; + + private var reveiceLabel:UIInputText; + + private var titleLabel:UIInputText; + + private var checkBox:UICheckBtn; + + private var allFriendCount:int; + + private var isToGuild:Boolean; + + public function MailWriteUI() + { + var _loc3_:TextField = null; + var _loc6_:UIWindowBg = null; + super(); + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622,367); + addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc2_.text = "收件人:"; + _loc1_.addChild(_loc2_); + _loc2_.x = 27; + _loc2_.y = 25; + this.reveiceLabel = new UIInputText(270); + addChild(this.reveiceLabel); + this.reveiceLabel.x = 80; + this.reveiceLabel.y = 25; + this.reveiceLabel.setMaxChars(15); + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 389; + this.checkBox.y = 27; + this.checkBox.onClick = this.sendToGuild; + _loc3_ = PublicMethod.getTextFieldWithFillter(16777215,80); + _loc3_.text = "盟内 好友"; + addChild(_loc3_); + _loc3_.x = 360; + _loc3_.y = 27; + this.friendCombox = new ComboBox(); + this.friendCombox.width = 110; + addChild(this.friendCombox); + this.friendCombox.textField.setStyle("textFormat",this.tft); + this.friendCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.friendCombox.x = 470; + this.friendCombox.y = 27; + this.friendCombox.addEventListener(Event.CHANGE,this.selectFriend); + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc4_.text = "主题:"; + _loc1_.addChild(_loc4_); + _loc4_.x = 27; + _loc4_.y = 53; + this.titleLabel = new UIInputText(270); + addChild(this.titleLabel); + this.titleLabel.x = this.reveiceLabel.x; + this.titleLabel.y = 55; + this.titleLabel.setMaxChars(20); + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(65280,100); + _loc5_.text = "(最多20个字符)"; + addChild(_loc5_); + _loc5_.x = 355; + _loc5_.y = 59; + _loc6_ = new UIWindowBg(); + _loc6_.initSecondPanel(574,230); + _loc1_.addChild(_loc6_); + _loc6_.x = 25; + _loc6_.y = 92; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(65280,100); + _loc7_.text = "(最多1000个字符)"; + addChild(_loc7_); + _loc7_.x = 515; + _loc7_.y = 72; + this.messBar = new MessListBar(); + this.messBar.setSize(566,236); + this.messBar.create(); + _loc6_.addChild(this.messBar); + this.messBar.x = 2; + this.messBar.y = 2; + this.messBar.input = true; + this.messBar.setMaxChar(1000); + var _loc8_:UIButton = new UIButton("清除"); + addChild(_loc8_); + _loc8_.x = 38; + _loc8_.y = 340; + _loc8_.onClick = this.clearContent; + var _loc9_:UIButton = new UIButton("发送"); + addChild(_loc9_); + _loc9_.x = 555; + _loc9_.y = _loc8_.y; + _loc9_.onClick = this.sendMess; + } + + override public function setPosition() : void + { + } + + public function addEvent() : void + { + ConnectService.getInstance().addEventListener(FriendEvent.Friend_getAllFriend,this.getFriendListResult); + ConnectService.getInstance().addEventListener(MessEvent.Mess_addMessage,this.addMessResult); + this.getFriendList(); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_getAllFriend,this.getFriendListResult); + ConnectService.getInstance().removeEventListener(MessEvent.Mess_addMessage,this.addMessResult); + this.clearValue(); + } + + private function getFriendList() : void + { + ConnectService.getInstance().friendService.getFriendListAll(); + } + + private function getFriendListResult(param1:FriendEvent) : void + { + var _loc3_:Object = null; + if(this.allFriendCount > 0) + { + this.friendCombox.removeAll(); + } + this.allFriendCount = param1.obj.allCount; + if(this.allFriendCount == 0) + { + return; + } + var _loc2_:Array = param1.obj.dataResult; + for each(_loc3_ in _loc2_) + { + this.friendCombox.addItem({ + "label":_loc3_.friendName, + "data":_loc3_.friendUserId + }); + } + this.friendCombox.selectedIndex = 0; + this.friendCombox.textField.setStyle("textFormat",this.tft); + } + + private function clearValue() : void + { + this.confimClearContent(); + if(this.allFriendCount > 0) + { + this.allFriendCount = 0; + this.friendCombox.removeAll(); + } + } + + private function selectFriend(param1:Event) : void + { + var _loc2_:String = this.friendCombox.selectedItem.label; + this.reveiceLabel.setText(_loc2_); + } + + public function setReveiceName(param1:String) : void + { + this.reveiceLabel.setText(param1); + } + + private function sendToGuild(param1:MouseEvent) : void + { + if(this.isToGuild) + { + this.checkBox.setUnSelect(); + this.isToGuild = false; + this.reveiceLabel.setText(""); + this.reveiceLabel.setTextInput(true); + } + else + { + this.checkBox.setSelect(); + this.isToGuild = true; + this.reveiceLabel.setText("盟内"); + this.reveiceLabel.setTextInput(false); + } + } + + private function clearContent(param1:MouseEvent) : void + { + var _loc2_:String = "确认清除吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc2_,this.confimClearContent); + } + + private function confimClearContent() : void + { + this.reveiceLabel.setText(""); + this.reveiceLabel.setTextInput(true); + this.titleLabel.setText(""); + this.titleLabel.setTextInput(true); + this.messBar.print(""); + this.isToGuild = false; + this.checkBox.setUnSelect(); + } + + private function sendMess(param1:MouseEvent) : void + { + var _loc2_:String = this.reveiceLabel.getText(); + var _loc3_:String = this.titleLabel.getText(); + var _loc4_:String = this.messBar.getValue(); + if(_loc2_ == "" || _loc4_ == "") + { + MessageBoxUI.getInstance().addMessage("发送失败,不能发送空信"); + return; + } + var _loc5_:Object = new Object(); + _loc5_.title = _loc3_; + _loc5_.toUserName = _loc2_; + _loc5_.context = _loc4_; + if(this.isToGuild) + { + _loc5_.sendType = "2"; + } + else + { + _loc5_.sendType = "1"; + } + ConnectService.getInstance().messageService.addMessage(_loc5_); + } + + private function addMessResult(param1:MessEvent) : void + { + MessageBoxUI.getInstance().addMessage("发送成功"); + this.confimClearContent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/market/MarketBuild.as b/flash_decompiled/com/view/ui/market/MarketBuild.as new file mode 100644 index 0000000..a7bb775 --- /dev/null +++ b/flash_decompiled/com/view/ui/market/MarketBuild.as @@ -0,0 +1,60 @@ +package com.view.ui.market +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class MarketBuild extends BaseBuild + { + + public function MarketBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/MarketView1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/MarketView3.swf"; + buildData.picUrl = "pic/build/MarketView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/MarketView2.swf"; + buildData.picUrl = "pic/build/MarketView2.png"; + } + else + { + buildData.swfUrl = "pic/build/MarketView1.swf"; + buildData.picUrl = "pic/build/MarketView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new MarketBuildUI(); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/market/MarketBuildUI.as b/flash_decompiled/com/view/ui/market/MarketBuildUI.as new file mode 100644 index 0000000..826ffac --- /dev/null +++ b/flash_decompiled/com/view/ui/market/MarketBuildUI.as @@ -0,0 +1,481 @@ +package com.view.ui.market +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.guild.event.GuildTradeEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.market.mc.MarketItem; + import com.view.ui.message.MessageBoxUI; + 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 MarketBuildUI extends BaseUI + { + + private var bg1:UIWindowBg; + + private var tableMc:UITable; + + private var itemVec:Vector.; + + private var btn1:UIButton; + + private var btn2:UIButton; + + private var input1:TextField; + + private var input2:TextField; + + private var input3:TextField; + + private var input4:TextField; + + private var input5:TextField; + + private var input6:TextField; + + private var timeLabel:TextField; + + private var leftTimeLabel:TextField; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var value6:TextField; + + private var m_choiceMap:Dictionary; + + private var m_counter:int; + + private var timer:Timer; + + private var marketTradeSetUI:MarketTradeSetUI; + + public function MarketBuildUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_shichang); + this.setPosition(); + this.createUI(); + } + + override public function createUI() : void + { + var _loc5_:TextField = null; + var _loc8_:TextField = null; + var _loc11_:TextField = null; + var _loc15_:TextField = null; + var _loc17_:MarketItem = null; + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630,400); + addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,68); + this.bg1.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:Array = ["编 号","商圈城池","坐 标","市场等级","路 程"]; + var _loc3_:Array = [120,120,120,120,155]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(8,_loc2_,_loc3_); + this.bg1.addChild(this.tableMc); + this.tableMc.x = _loc1_.x; + this.tableMc.y = _loc1_.y + _loc1_.height + 4; + var _loc4_:UIWindowBg = new UIWindowBg(); + _loc4_.initThirdPanel(622,80); + this.bg1.addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = this.tableMc.y + this.tableMc.height + 4; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + this.input1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(_loc5_); + _loc5_.x = 20; + _loc5_.y = 17; + _loc1_.addChild(this.input1); + this.input1.x = _loc5_.x + 65; + this.input1.y = _loc5_.y; + _loc5_.text = "所属联盟:"; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + this.input2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(_loc6_); + _loc6_.x = _loc5_.x + 200; + _loc6_.y = _loc5_.y; + _loc1_.addChild(this.input2); + this.input2.x = _loc6_.x + 90; + this.input2.y = _loc5_.y; + _loc6_.text = "商会中心等级:"; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + this.input3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(_loc7_); + _loc7_.x = _loc6_.x + 200; + _loc7_.y = _loc5_.y; + _loc1_.addChild(this.input3); + this.input3.x = _loc7_.x + 90; + this.input3.y = _loc5_.y; + _loc7_.text = "城市市场等级:"; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + this.input4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc5_.y + 30; + _loc1_.addChild(this.input4); + this.input4.x = this.input1.x; + this.input4.y = _loc8_.y; + _loc8_.text = "商队等级:"; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + this.input5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(_loc9_); + _loc9_.x = _loc6_.x; + _loc9_.y = _loc8_.y; + _loc1_.addChild(this.input5); + this.input5.x = this.input2.x; + this.input5.y = _loc8_.y; + _loc9_.text = "商圈城池上限:"; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + this.input6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(_loc10_); + _loc10_.x = _loc7_.x; + _loc10_.y = _loc8_.y; + _loc1_.addChild(this.input6); + this.input6.x = this.input3.x; + this.input6.y = _loc8_.y; + _loc10_.text = "商队运载上限:"; + _loc11_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,84); + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,84); + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,84); + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,64); + _loc15_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,64); + this.timeLabel = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + this.leftTimeLabel = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.leftTimeLabel.text = "剩余时间:"; + this.timeLabel.text = "每天23:40至24:00不能开启跑商"; + this.timeLabel.visible = false; + _loc4_.addChild(_loc11_); + _loc4_.addChild(_loc12_); + _loc4_.addChild(_loc13_); + _loc4_.addChild(_loc14_); + _loc4_.addChild(_loc15_); + _loc4_.addChild(this.timeLabel); + _loc4_.addChild(this.leftTimeLabel); + _loc11_.x = 20; + _loc11_.y = 12; + _loc12_.x = _loc11_.x; + _loc12_.y = _loc11_.y + 20; + _loc13_.x = _loc11_.x; + _loc13_.y = _loc12_.y + 20; + _loc14_.x = 200; + _loc14_.y = _loc11_.y; + _loc15_.x = _loc14_.x; + _loc15_.y = _loc12_.y; + this.timeLabel.x = _loc14_.x; + this.timeLabel.y = _loc13_.y; + this.leftTimeLabel.x = 400; + this.leftTimeLabel.y = _loc11_.y; + _loc11_.text = "商圈城池数量:"; + _loc12_.text = "跑 商 耗 时:"; + _loc13_.text = "今日跑商次数:"; + _loc14_.text = "总 路 程:"; + _loc15_.text = "当前利润:"; + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.value6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + _loc4_.addChild(this.value1); + _loc4_.addChild(this.value2); + _loc4_.addChild(this.value3); + _loc4_.addChild(this.value4); + _loc4_.addChild(this.value5); + _loc4_.addChild(this.value6); + this.value1.x = _loc11_.x + _loc11_.width; + this.value1.y = _loc11_.y; + this.value2.x = _loc12_.x + _loc12_.width; + this.value2.y = _loc12_.y; + this.value3.x = _loc13_.x + _loc13_.width; + this.value3.y = _loc13_.y; + this.value4.x = _loc14_.x + _loc14_.width; + this.value4.y = _loc14_.y; + this.value5.x = _loc15_.x + _loc15_.width; + this.value5.y = _loc15_.y; + this.value6.x = this.leftTimeLabel.x + this.leftTimeLabel.width; + this.value6.y = this.leftTimeLabel.y; + this.btn1 = new UIButton("设定商圈",2); + this.btn2 = new UIButton("开始跑商",2); + _loc4_.addChild(this.btn1); + _loc4_.addChild(this.btn2); + this.btn1.x = 478; + this.btn1.y = 52; + this.btn2.x = this.btn1.x + this.btn1.width + 10; + this.btn2.y = this.btn1.y; + this.btn1.onClick = this.onSettingClick; + this.btn2.onClick = this.onStartClick; + this.itemVec = new Vector.(); + var _loc16_:int = 0; + while(_loc16_ < 8) + { + _loc17_ = new MarketItem(); + this.itemVec.push(_loc17_); + _loc17_.y = 26 + _loc16_ * 25; + _loc17_.x = 4; + this.tableMc.addChild(_loc17_); + _loc16_++; + } + } + + override public function loadUiData() : void + { + } + + private function getViewData() : void + { + ConnectService.getInstance().guildService.getTradeData(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(GuildTradeEvent.Trade_getTradeData,this.onDataSuccess); + ConnectService.getInstance().addEventListener(GuildTradeEvent.Trade_sendTradeSave,this.onSaveSucc); + ConnectService.getInstance().addEventListener(GuildTradeEvent.Trade_sendTradeStart,this.onStartSuccess); + this.getViewData(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.stopTime(); + ConnectService.getInstance().removeEventListener(GuildTradeEvent.Trade_getTradeData,this.onDataSuccess); + ConnectService.getInstance().removeEventListener(GuildTradeEvent.Trade_sendTradeSave,this.onSaveSucc); + ConnectService.getInstance().removeEventListener(GuildTradeEvent.Trade_sendTradeStart,this.onStartSuccess); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + private function onDataSuccess(param1:GuildTradeEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + closeUI(null); + return; + } + var _loc2_:Object = param1.obj; + this.input1.text = _loc2_["guildName"]; + this.input2.text = _loc2_["centerLv"]; + var _loc3_:* = _loc2_["userTradeProperty"]; + if(_loc3_ != null) + { + this.input3.text = _loc3_["marketLv"]; + this.input4.text = _loc3_["tradeTroopLv"]; + this.input5.text = _loc3_["scopeMax"]; + this.input6.text = _loc3_["burdenMax"]; + this.value1.text = String(_loc2_["tradCasNum"]) + "/" + String(_loc3_["scopeMax"]); + } + this.value4.text = String(_loc2_["tatolDistance"]); + this.value2.text = Utils.formatSeconds(int(_loc2_["tatolSpendTime"])); + this.value5.text = String(_loc2_["tatolProfit"]); + this.value3.text = String(_loc2_["aleadyTradeTimes"]) + "/" + String(_loc2_["tatolTradeTimes"]); + var _loc4_:int = int(_loc2_["leftTime"]); + this.value6.text = Utils.formatSeconds(_loc4_); + this.addListData(_loc2_["selectedCasLst"] as Array); + if(this.checkTime(_loc4_)) + { + this.btn1.setUnEnable(); + this.btn2.setUnEnable(); + this.setRemainTimeVisivle(true); + } + else + { + this.btn1.setEnable(); + this.btn2.setEnable(); + this.setRemainTimeVisivle(false); + } + } + + public function containsItem(param1:int) : Boolean + { + if(this.m_choiceMap != null) + { + if(this.m_choiceMap[param1] != null) + { + return true; + } + } + return false; + } + + private function setRemainTimeVisivle(param1:Boolean) : void + { + if(param1) + { + this.leftTimeLabel.visible = true; + } + else + { + this.leftTimeLabel.visible = false; + this.value6.text = ""; + } + } + + private function cloneData(param1:Object) : Object + { + var _loc2_:Object = new Object(); + _loc2_.casId = int(param1["casId"]); + _loc2_.userName = String(param1["userName"]); + _loc2_.posX = String(param1["posX"]); + _loc2_.posY = String(param1["posY"]); + _loc2_.marketLv = String(param1["marketLv"]); + _loc2_.distance = String(param1["distance"]); + return _loc2_; + } + + private function clearList() : void + { + var _loc1_:MarketItem = null; + for each(_loc1_ in this.itemVec) + { + _loc1_.setData(null); + } + } + + private function addListData(param1:Array) : void + { + var _loc6_:int = 0; + this.clearList(); + var _loc2_:Array = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:Object = null; + if(param1 != null) + { + this.m_choiceMap = new Dictionary(); + _loc2_ = new Array(); + _loc3_ = 0; + while(_loc3_ < param1.length) + { + _loc2_.push(this.cloneData(param1[_loc3_])); + _loc3_++; + } + _loc2_.sortOn("distance",Array.NUMERIC | Array.DESCENDING); + _loc4_ = _loc2_.length - 1; + _loc6_ = 0; + while(_loc4_ > -1) + { + _loc5_ = _loc2_[_loc4_]; + this.itemVec[_loc6_].setData(_loc5_,_loc6_); + _loc4_--; + this.m_choiceMap[int(_loc5_.casId)] = this.itemVec[_loc6_]; + _loc6_++; + } + } + } + + private function checkTime(param1:int) : Boolean + { + if(param1 > 0) + { + this.m_counter = param1; + this.startTime(); + return true; + } + return false; + } + + private function startTime() : void + { + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.enterFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function enterFrame(param1:TimerEvent) : void + { + --this.m_counter; + this.value6.text = Utils.formatSeconds(this.m_counter); + if(this.m_counter <= 0) + { + this.getViewData(); + this.stopTime(); + } + } + + private function stopTime() : void + { + if(this.timer) + { + if(this.timer.running) + { + this.timer.stop(); + } + this.timer.removeEventListener(TimerEvent.TIMER,this.enterFrame); + this.timer = null; + this.m_counter = 0; + this.value6.text = ""; + this.leftTimeLabel.visible = false; + } + } + + private function onSettingClick(param1:MouseEvent) : void + { + if(this.marketTradeSetUI == null) + { + this.marketTradeSetUI = new MarketTradeSetUI(); + this.marketTradeSetUI.checkSelectF = this.containsItem; + } + addChild(this.marketTradeSetUI); + } + + private function onStartClick(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.sendTradeStart(); + } + + private function onSaveSucc(param1:GuildTradeEvent) : void + { + this.getViewData(); + } + + private function onStartSuccess(param1:GuildTradeEvent) : void + { + if(this.checkTime(int(param1.obj["leftTime"]))) + { + this.btn1.setUnEnable(); + this.btn2.setUnEnable(); + this.leftTimeLabel.visible = true; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/market/MarketTradeSetUI.as b/flash_decompiled/com/view/ui/market/MarketTradeSetUI.as new file mode 100644 index 0000000..6597183 --- /dev/null +++ b/flash_decompiled/com/view/ui/market/MarketTradeSetUI.as @@ -0,0 +1,490 @@ +package com.view.ui.market +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.guild.event.GuildTradeEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.market.mc.MarketSelectItem; + import com.view.ui.message.MessageBoxUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.utils.Dictionary; + + public class MarketTradeSetUI extends BaseUI + { + + public var checkSelectF:Function; + + private var bg1:UIWindowBg; + + private var tableMc:UITable; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var memListVec:Vector.; + + private var btn1:UIButton; + + private var btn2:UIButton; + + private var btn3:UIButton; + + private var m_data:Object; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var m_cityLimit:int; + + private var m_count:int; + + private var m_choiceMap:Dictionary; + + public function MarketTradeSetUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_chengchixuanzhe); + this.setPosition(); + this.createUI(); + } + + override public function setPosition() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + } + + override public function createUI() : void + { + var _loc5_:TextField = null; + var _loc6_:TextField = null; + var _loc7_:TextField = null; + var _loc8_:TextField = null; + var _loc10_:MarketSelectItem = 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 = [120,120,120,120,155]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.lineHeight = 25; + this.tableMc.install(12,_loc1_,_loc2_); + this.bg1.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(620,40); + this.bg1.addChild(_loc3_); + _loc3_.x = 4; + _loc3_.y = this.tableMc.y + this.tableMc.height + 4; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,500); + _loc4_.text = "市场等级越高利润越高,路程越远利润越低。请选择适当的盟友城池以获得较高的盈利。"; + this.bg1.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = _loc3_.y + _loc3_.height + 5; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + _loc3_.addChild(_loc5_); + _loc3_.addChild(_loc6_); + _loc3_.addChild(_loc7_); + _loc3_.addChild(_loc8_); + _loc5_.x = 10; + _loc5_.y = 5; + _loc5_.text = "商圈城池数量:"; + _loc6_.x = 200; + _loc6_.y = _loc5_.y; + _loc6_.text = "总路程:"; + _loc7_.x = _loc5_.x; + _loc7_.y = _loc5_.y + 20; + _loc7_.text = "跑 商 时 间:"; + _loc8_.x = _loc6_.x; + _loc8_.y = _loc7_.y; + _loc8_.text = "利 润:"; + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + _loc3_.addChild(this.value1); + _loc3_.addChild(this.value2); + _loc3_.addChild(this.value3); + _loc3_.addChild(this.value4); + this.value1.x = _loc5_.x + 85; + this.value1.y = _loc5_.y; + this.value2.x = _loc6_.x + 50; + this.value2.y = _loc5_.y; + this.value3.x = this.value1.x; + this.value3.y = _loc7_.y; + this.value4.x = this.value2.x; + this.value4.y = _loc7_.y; + this.btn1 = new UIButton("自动选择",2); + this.btn2 = new UIButton("全部取消",2); + this.btn3 = new UIButton("保存配置",2); + _loc3_.addChild(this.btn1); + _loc3_.addChild(this.btn2); + _loc3_.addChild(this.btn3); + this.btn1.x = 380; + this.btn1.y = 12; + this.btn2.x = this.btn1.x + 80; + this.btn2.y = this.btn1.y; + this.btn3.x = this.btn2.x + 80; + this.btn3.y = this.btn1.y; + this.btn1.onClick = this.onAutoSelect; + this.btn2.onClick = this.onCancel; + this.btn3.onClick = this.onSaveClick; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(628,300); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.memListVec = new Vector.(); + var _loc9_:int = 0; + while(_loc9_ < 12) + { + _loc10_ = new MarketSelectItem(); + this.packMc.addChild(_loc10_); + this.memListVec.push(_loc10_); + _loc10_.y = _loc9_ * 25; + _loc10_.x = 4; + _loc10_.onCheck = this.onSelect; + _loc9_++; + } + } + + private function clearMemList() : void + { + var _loc1_:int = int(this.memListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.memListVec[_loc2_].setData(null); + if(_loc2_ > 11) + { + this.packMc.removeChild(this.memListVec[_loc2_]); + this.memListVec[_loc2_].clear(); + this.memListVec.splice(_loc2_,1); + } + _loc2_--; + } + this.packScrollPane.update(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(GuildTradeEvent.Trade_getTradeSettingData,this.onSucc); + ConnectService.getInstance().addEventListener(GuildTradeEvent.Trade_sendTradeSave,this.onSaveSucc); + this.getTradeSettingData(); + this.m_choiceMap = new Dictionary(); + this.m_count = 0; + } + + private function getTradeSettingData() : void + { + ConnectService.getInstance().guildService.getTradeSettingData(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildTradeEvent.Trade_getTradeSettingData,this.onSucc); + ConnectService.getInstance().removeEventListener(GuildTradeEvent.Trade_sendTradeSave,this.onSaveSucc); + this.clearMemList(); + this.m_data = null; + } + + private function onSucc(param1:GuildTradeEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + this.closeUI(null); + return; + } + this.clearMemList(); + var _loc2_:Object = param1.obj; + this.m_cityLimit = int(_loc2_["tradeCasNumMax"]); + this.addListData(_loc2_["allTradeCas"] as Array); + } + + private function addListData(param1:Array) : void + { + var _loc7_:int = 0; + var _loc8_:MarketSelectItem = null; + this.m_count = 0; + var _loc2_:Array = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:Object = null; + if(param1 != null) + { + _loc2_ = new Array(); + _loc3_ = 0; + while(_loc3_ < param1.length) + { + _loc2_.push(this.cloneData(param1[_loc3_])); + _loc3_++; + } + _loc2_.sortOn("distance",Array.NUMERIC | Array.DESCENDING); + _loc5_ = _loc2_.length - 1; + _loc7_ = 0; + while(_loc5_ > -1) + { + _loc6_ = _loc2_[_loc5_]; + if(_loc7_ > 11) + { + _loc8_ = new MarketSelectItem(); + this.packMc.addChild(_loc8_); + this.memListVec.push(_loc8_); + _loc8_.y = _loc7_ * 25; + _loc8_.x = 4; + _loc8_.onCheck = this.onSelect; + } + this.memListVec[_loc7_].setData(_loc6_,_loc7_); + if(this.checkSelectF != null) + { + if(this.checkSelectF(_loc6_.cityID)) + { + this.m_count += 1; + this.memListVec[_loc7_].setSelect(true); + this.m_choiceMap[_loc6_.cityID] = this.memListVec[_loc7_]; + } + else + { + this.memListVec[_loc7_].setSelect(false); + } + } + if(this.memListVec[_loc7_].isSelf) + { + this.m_data = _loc6_; + } + this.memListVec[_loc7_].onCheck = this.onSelect; + _loc7_++; + _loc5_--; + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + this.showData(); + } + } + + private function onSaveClick(param1:MouseEvent) : void + { + var _loc4_:MarketSelectItem = null; + if(this.m_count == 1) + { + MessageBoxUI.getInstance().addMessage("此商圈跑商利润不大于0,请重新选择"); + return; + } + var _loc2_:Array = new Array(); + var _loc3_:String = null; + if(this.m_choiceMap != null && this.m_count > 0) + { + for(_loc3_ in this.m_choiceMap) + { + _loc4_ = this.m_choiceMap[_loc3_] as MarketSelectItem; + if(_loc4_ != null) + { + _loc2_.push(_loc3_); + } + } + ConnectService.getInstance().guildService.sendTradeSave(_loc2_); + } + } + + private function onSaveSucc(param1:GuildTradeEvent) : void + { + MessageBoxUI.getInstance().addMessage("保存设置成功"); + this.closeUI(null); + } + + private function onSelect(param1:MarketSelectItem) : void + { + var _loc2_:int = 0; + if(this.m_choiceMap != null && param1.data != null) + { + _loc2_ = int(param1.data.cityID); + if(this.m_choiceMap[_loc2_] != null) + { + param1.setSelect(false); + delete this.m_choiceMap[_loc2_]; + --this.m_count; + } + else + { + if(this.m_count >= this.m_cityLimit) + { + MessageBoxUI.getInstance().addMessage("商圈城池数量已达上限,联盟升级商会中心后可选择更多城池。"); + return; + } + param1.setSelect(true); + this.m_choiceMap[_loc2_] = param1; + this.m_count += 1; + } + this.showData(); + } + } + + private function onAutoSelect(param1:MouseEvent) : void + { + var _loc2_:MarketSelectItem = null; + var _loc3_:* = undefined; + var _loc4_:MarketSelectItem = null; + if(this.m_choiceMap != null && this.m_count > 0) + { + for(_loc3_ in this.m_choiceMap) + { + _loc4_ = this.m_choiceMap[_loc3_] as MarketSelectItem; + if(_loc4_ != null && !_loc4_.isSelf) + { + this.m_choiceMap[_loc3_] = null; + } + } + } + this.m_count = 1; + for each(_loc2_ in this.memListVec) + { + if(_loc2_.isSelf || _loc2_.data == null) + { + continue; + } + if(this.m_count < this.m_cityLimit && _loc2_.data.marketLv > 0) + { + _loc2_.setSelect(true); + this.m_choiceMap[_loc2_.data.cityID] = _loc2_; + ++this.m_count; + } + else + { + _loc2_.setSelect(false); + } + } + this.showData(); + } + + private function onCancel(param1:MouseEvent) : void + { + var _loc2_:MarketSelectItem = null; + var _loc3_:* = undefined; + var _loc4_:MarketSelectItem = null; + if(this.m_choiceMap != null && this.m_count > 0) + { + for(_loc3_ in this.m_choiceMap) + { + _loc4_ = this.m_choiceMap[_loc3_] as MarketSelectItem; + if(_loc4_ != null && !_loc4_.isSelf) + { + this.m_choiceMap[_loc3_] = null; + } + } + } + this.m_count = 1; + for each(_loc2_ in this.memListVec) + { + if(_loc2_.isSelf || _loc2_.data == null) + { + continue; + } + if(_loc2_.selectStatus) + { + _loc2_.setSelect(false); + } + } + this.showData(); + } + + private function showData() : void + { + var _loc1_:MarketSelectItem = null; + var _loc2_:int = 0; + var _loc3_:int = 0; + for each(_loc1_ in this.m_choiceMap) + { + if(_loc1_ != null && _loc1_.data != null) + { + if(!_loc1_.isSelf) + { + _loc2_ += this.calulateProfit(this.m_data.marketLv * 100,_loc1_.data.marketLv,_loc1_.data.distance); + _loc3_ += this.calculateDistance(this.m_data.posX,this.m_data.posY,_loc1_.data.posX,_loc1_.data.posY); + } + } + } + this.value4.text = String(_loc2_); + this.value2.text = String(_loc3_); + this.value1.text = String(this.m_count) + "/" + String(this.m_cityLimit); + this.value3.text = Utils.formatSeconds(this.calculateTime(this.m_count,_loc3_)); + } + + private function calculateDistance(param1:int, param2:int, param3:int, param4:int) : int + { + var _loc5_:* = Math.abs(param3 - param1); + var _loc6_:* = Math.abs(param4 - param2); + var _loc7_:* = Math.floor(Math.min(_loc5_,_loc6_) * 10 / 3 + Math.abs(_loc5_ - _loc6_) * 2.5); + return Math.floor(Math.min(_loc5_,_loc6_) * 10 / 3 + Math.abs(_loc5_ - _loc6_) * 2.5); + } + + private function calulateProfit(param1:int, param2:int, param3:int) : int + { + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + if(param1 != 0 && param2 != 0) + { + _loc4_ = param2 * 100; + _loc5_ = _loc4_ > param1 ? param1 : _loc4_; + _loc6_ = Math.round(_loc5_ * (10 - (Math.atan(param3 / 150 + 0.22) * 7.65 - 2))); + return int(_loc6_ * 2); + } + return 0; + } + + private function calculateTime(param1:uint, param2:uint) : int + { + return param1 * 600 + param2 * 15; + } + + private function cloneData(param1:Object) : Object + { + var _loc2_:* = new Object(); + _loc2_.cityID = int(param1["casId"]); + _loc2_.cityName = String(param1["userName"]); + _loc2_.distance = int(param1["distance"]); + _loc2_.marketLv = int(param1["marketLv"]); + _loc2_.posX = int(param1["posX"]); + _loc2_.posY = int(param1["posY"]); + _loc2_.userID = int(param1["userId"]); + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/market/mc/MarketItem.as b/flash_decompiled/com/view/ui/market/mc/MarketItem.as new file mode 100644 index 0000000..bad996b --- /dev/null +++ b/flash_decompiled/com/view/ui/market/mc/MarketItem.as @@ -0,0 +1,75 @@ +package com.view.ui.market.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MarketItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var css:TextFormat; + + public function MarketItem() + { + super(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,119); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,117); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,118); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,121); + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,142); + var _loc1_:int = 1; + while(_loc1_ < 6) + { + addChild(this["label" + _loc1_]); + this["label" + _loc1_].y = 2; + if(_loc1_ > 1) + { + this["label" + _loc1_].x = this["label" + (_loc1_ - 1)].x + this["label" + (_loc1_ - 1)].width; + } + _loc1_++; + } + this.css = PublicMethod.getCenterTextFormat(); + } + + public function setData(param1:Object, param2:int = 0) : void + { + var _loc3_:int = 0; + if(param1 == null) + { + param2 = 1; + while(param2 < 6) + { + this["label" + param2].text = ""; + param2++; + } + } + else + { + this.label1.text = param2.toString(); + this.label2.text = param1.userName; + this.label3.text = "{" + param1.posX + "," + param1.posY + "}"; + this.label4.text = param1.marketLv; + this.label5.text = param1.distance; + _loc3_ = 1; + while(_loc3_ < 6) + { + this["label" + _loc3_].setTextFormat(this.css); + _loc3_++; + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/market/mc/MarketSelectItem.as b/flash_decompiled/com/view/ui/market/mc/MarketSelectItem.as new file mode 100644 index 0000000..53831b9 --- /dev/null +++ b/flash_decompiled/com/view/ui/market/mc/MarketSelectItem.as @@ -0,0 +1,172 @@ +package com.view.ui.market.mc +{ + import com.common.PublicMethod; + import com.newdata.user.NewUserData; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MarketSelectItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var css:TextFormat; + + private var combox:UICheckBtn; + + private var bg1:Sprite; + + public var data:Object; + + public var isSelf:Boolean; + + public var selectStatus:Boolean; + + public var onCheck:Function; + + public function MarketSelectItem() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,628,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + var _loc1_:Sprite = PublicMethod.getTrLine(628); + addChild(_loc1_); + this.combox = new UICheckBtn(); + addChild(this.combox); + this.combox.x = 3; + this.combox.y = 4; + this.combox.addEventListener(MouseEvent.CLICK,this.clickBox); + this.combox.visible = false; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,98); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,117); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,129); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,116); + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,142); + var _loc2_:int = 1; + while(_loc2_ < 6) + { + addChild(this["label" + _loc2_]); + this["label" + _loc2_].y = 4; + if(_loc2_ > 1) + { + this["label" + _loc2_].x = this["label" + (_loc2_ - 1)].x + this["label" + (_loc2_ - 1)].width; + } + else + { + this["label" + _loc2_].x = 20; + } + _loc2_++; + } + this.css = PublicMethod.getCenterTextFormat(); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.data) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.data) + { + this.bg1.visible = true; + } + } + + public function setData(param1:Object, param2:int = 0) : void + { + var _loc3_:int = 0; + this.data = param1; + if(param1 == null) + { + param2 = 1; + while(param2 < 6) + { + this["label" + param2].text = ""; + param2++; + } + this.combox.setUnSelect(); + this.combox.visible = false; + } + else + { + this.combox.visible = true; + this.label1.text = param2.toString(); + this.label2.text = param1.cityName; + this.label3.text = "{" + param1.posX + "," + param1.posY + "}"; + this.label4.text = param1.marketLv; + this.label5.text = param1.distance; + _loc3_ = 1; + while(_loc3_ < 6) + { + this["label" + _loc3_].setTextFormat(this.css); + _loc3_++; + } + if(NewUserData.getUser().userId == param1.userID) + { + this.isSelf = true; + this.combox.setSelect(); + PublicMethod.setBlack(this.combox); + } + else + { + this.isSelf = false; + } + } + } + + public function setSelect(param1:Boolean) : void + { + if(!this.isSelf) + { + this.selectStatus = param1; + if(param1) + { + this.combox.setSelect(); + } + else + { + this.combox.setUnSelect(); + } + } + } + + private function clickBox(param1:MouseEvent) : void + { + if(!this.isSelf) + { + if(this.onCheck != null) + { + this.onCheck(this); + } + } + } + + public function clear() : void + { + this.onCheck = null; + this.combox.removeEventListener(MouseEvent.CLICK,this.clickBox); + this.combox = null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/match/MatchMc1.as b/flash_decompiled/com/view/ui/match/MatchMc1.as new file mode 100644 index 0000000..24468f0 --- /dev/null +++ b/flash_decompiled/com/view/ui/match/MatchMc1.as @@ -0,0 +1,177 @@ +package com.view.ui.match +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIConfig; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MatchMc1 extends UIBase + { + + 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 value6:TextField; + + private var css:TextFormat; + + private var vipMc:MovieClip; + + public var defaultRank:int; + + private var _obj:Object; + + public function MatchMc1() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,625,24); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,625,24); + this.bg2.alpha = 0.3; + addChild(this.bg2); + this.bg2.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + var _loc1_:Sprite = PublicMethod.getTrLine(625); + addChild(_loc1_); + _loc1_.y = 24; + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,112); + this.value6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.vipMc = face.getMovieClip(ClassConfig.lib_ui_vipmc); + this.vipMc.gotoAndStop(2); + this.vipMc.visible = false; + this.value2.mouseEnabled = true; + addChild(this.value1); + addChild(this.vipMc); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + addChild(this.value6); + this.value1.y = 4; + this.vipMc.x = 58; + this.vipMc.y = 6; + this.value2.x = 90; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.value6.x = this.value5.x + this.value5.width; + this.value6.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + this.value6.defaultTextFormat = this.css; + } + + 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 setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 1) + { + _loc2_.color = 16771584; + } + else if(param1 == 2) + { + _loc2_.color = 16743936; + } + else if(param1 == 3) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + this.value5.setTextFormat(_loc2_); + this.value6.setTextFormat(_loc2_); + } + + public function setObj(param1:Object) : void + { + var _loc2_:int = 0; + this._obj = param1; + if(param1 == null) + { + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.value6.text = ""; + this.vipMc.gotoAndStop(1); + this.vipMc.visible = false; + } + else + { + this.vipMc.visible = true; + _loc2_ = int(param1.vipLevel); + this.vipMc.gotoAndStop(_loc2_ + 1); + this.value1.text = param1.id; + this.value2.text = param1.userName; + this.value3.text = param1.rankId; + this.value4.text = Utils.getNewPower(param1.armyPower); + this.value5.text = param1.zoneName; + this.value6.text = param1.appDate; + } + } + + public function setRandId(param1:int) : void + { + if(param1 == 0) + { + this.value1.text = ""; + } + else + { + this.value1.text = "" + param1; + this.setStyle(param1); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/match/MatchMc2.as b/flash_decompiled/com/view/ui/match/MatchMc2.as new file mode 100644 index 0000000..5863345 --- /dev/null +++ b/flash_decompiled/com/view/ui/match/MatchMc2.as @@ -0,0 +1,97 @@ +package com.view.ui.match +{ + import com.common.PublicMethod; + import com.view.newui.UIBase; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MatchMc2 extends UIBase + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var css:TextFormat; + + private var _obj:Object; + + public function MatchMc2() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,290,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,290,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); + var _loc1_:Sprite = PublicMethod.getTrLine(625); + addChild(_loc1_); + _loc1_.y = 24; + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(this.value1); + addChild(this.value2); + addChild(this.value3); + this.value1.y = 4; + this.value2.x = this.value1.x + this.value1.width; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value2.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + } + + 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 setObj(param1:Object) : void + { + var _loc2_:String = null; + this._obj = param1; + if(param1 == null) + { + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + } + else + { + _loc2_ = "第" + param1.matchId + "届"; + this.value1.text = _loc2_; + this.value2.text = param1.fUserName; + this.value3.text = param1.sUserName; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/match/MatchMc3.as b/flash_decompiled/com/view/ui/match/MatchMc3.as new file mode 100644 index 0000000..090154e --- /dev/null +++ b/flash_decompiled/com/view/ui/match/MatchMc3.as @@ -0,0 +1,81 @@ +package com.view.ui.match +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.newui.UIBase; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class MatchMc3 extends UIBase + { + + private var bitmap1:Bitmap; + + private var bitmap2:Bitmap; + + private var nameText:TextField; + + private var zoneText:TextField; + + private var headbg:Sprite; + + private var headImg:Bitmap; + + private var loadImg:LoadResource; + + public function MatchMc3() + { + super(); + this.bitmap1 = face.getBitMap("match_1"); + addChild(this.bitmap1); + this.bitmap2 = face.getBitMap("match_2"); + addChild(this.bitmap2); + this.headbg = new Sprite(); + addChild(this.headbg); + this.nameText = PublicMethod.getTextFieldWithFillter(16733771,98); + this.zoneText = PublicMethod.getTextFieldWithFillter(16733771,98); + addChild(this.nameText); + addChild(this.zoneText); + this.nameText.y = 120; + this.zoneText.y = this.nameText.y + 20; + this.nameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.zoneText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + } + + public function setObj(param1:Object) : void + { + this.zoneText.text = param1.zoneName; + this.nameText.text = param1.userName; + this.bitmap1.visible = true; + this.bitmap2.visible = false; + this.loadImg = new LoadResource("pic/head/" + param1.userIcon,this.loadImgBack); + } + + private function loadImgBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.headbg.contains(this.headImg)) + { + this.headbg.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.headbg.addChild(this.headImg); + this.headImg.x = 7; + this.headImg.y = 28; + this.loadImg.clear(); + this.headImg.width = 85; + this.headImg.height = 85; + } + + public function setObj1(param1:Object) : void + { + this.zoneText.text = param1.zoneName; + this.nameText.text = param1.userName; + this.bitmap1.visible = false; + this.bitmap2.visible = true; + this.loadImg = new LoadResource("pic/head/" + param1.userIcon,this.loadImgBack); + } + } +} + diff --git a/flash_decompiled/com/view/ui/match/MatchPage1.as b/flash_decompiled/com/view/ui/match/MatchPage1.as new file mode 100644 index 0000000..f8e38f4 --- /dev/null +++ b/flash_decompiled/com/view/ui/match/MatchPage1.as @@ -0,0 +1,559 @@ +package com.view.ui.match +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.utils.Utils; + import com.view.newui.UINums; + import com.view.ui.BaseUI; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class MatchPage1 extends BaseUI + { + + private var bg1:Sprite; + + private var succLineColor:uint = 16711680; + + private var mc3:MatchMc3; + + private var mc4:MatchMc3; + + private var mc1:MatchUserMc; + + private var mc2:MatchUserMc; + + private var list16:Vector.; + + private var list8:Vector.; + + private var list4:Vector.; + + private var listData16:Array; + + private var rankImg:UINums; + + private var loadRes:LoadResource; + + public function MatchPage1() + { + var _loc2_:int = 0; + var _loc4_:Sprite = null; + var _loc7_:MatchUserMc = null; + var _loc8_:Sprite = null; + var _loc9_:Sprite = null; + var _loc10_:Sprite = null; + var _loc11_:Sprite = null; + var _loc12_:int = 0; + this.list16 = new Vector.(); + this.list8 = new Vector.(); + this.list4 = new Vector.(); + super(); + this.bg1 = new Sprite(); + addChild(this.bg1); + var _loc1_:String = "duizhanBg_1.jpg"; + this.loadBg(ServerConfig.IMG_BG_URL + _loc1_); + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc7_ = new MatchUserMc(); + addChild(_loc7_); + _loc7_.x = 9; + if(_loc2_ % 2 == 1) + { + _loc7_.y = 15 + 62 * _loc2_ - 10; + } + else + { + _loc7_.y = 15 + 62 * _loc2_; + } + _loc8_ = PublicMethod.getTrLine1(14); + addChild(_loc8_); + _loc8_.x = _loc7_.x + _loc7_.width + 1; + _loc8_.y = _loc7_.y + 22; + _loc9_ = PublicMethod.getTrLine1(14,this.succLineColor); + addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y; + _loc10_ = PublicMethod.getTdLine1(25); + addChild(_loc10_); + _loc10_.x = _loc8_.x + _loc8_.width; + if(_loc2_ % 2 == 1) + { + _loc10_.y = _loc8_.y - _loc10_.height + 2; + } + else + { + _loc10_.y = _loc8_.y; + } + _loc11_ = PublicMethod.getTdLine1(25,this.succLineColor); + addChild(_loc11_); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc10_.y; + _loc7_.tr = _loc9_; + _loc7_.td = _loc11_; + _loc12_ = 1 + _loc2_ / 2; + _loc7_.setZoneId1(_loc12_); + this.list16.push(_loc7_); + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 8) + { + _loc7_ = new MatchUserMc(); + addChild(_loc7_); + _loc7_.x = 825; + if(_loc2_ % 2 == 1) + { + _loc7_.y = 15 + 62 * _loc2_ - 10; + } + else + { + _loc7_.y = 15 + 62 * _loc2_; + } + _loc8_ = PublicMethod.getTrLine1(14); + addChild(_loc8_); + _loc8_.x = _loc7_.x - _loc8_.width - 1; + _loc8_.y = _loc7_.y + 22; + _loc9_ = PublicMethod.getTrLine1(14,this.succLineColor); + addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y; + _loc10_ = PublicMethod.getTdLine1(25); + addChild(_loc10_); + _loc10_.x = _loc8_.x; + if(_loc2_ % 2 == 1) + { + _loc10_.y = _loc8_.y - _loc10_.height + 2; + } + else + { + _loc10_.y = _loc8_.y; + } + _loc11_ = PublicMethod.getTdLine1(25,this.succLineColor); + addChild(_loc11_); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc10_.y; + _loc12_ = 5 + _loc2_ / 2; + _loc7_.setZoneId1(_loc12_); + _loc7_.tr = _loc9_; + _loc7_.td = _loc11_; + this.list16.push(_loc7_); + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 4) + { + _loc7_ = new MatchUserMc(); + addChild(_loc7_); + _loc7_.x = 149; + _loc7_.y = 40 + 124 * _loc2_; + _loc8_ = PublicMethod.getTrLine1(13); + addChild(_loc8_); + _loc8_.x = _loc7_.x - _loc8_.width; + _loc8_.y = _loc7_.y + 23; + _loc10_ = PublicMethod.getTdLine1(37); + addChild(_loc10_); + _loc10_.x = _loc7_.x + 50; + if(_loc2_ % 2 == 1) + { + _loc10_.y = _loc7_.y - _loc10_.height + 1; + } + else + { + _loc10_.y = _loc7_.y + _loc7_.height; + } + _loc9_ = PublicMethod.getTrLine1(13,this.succLineColor); + addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y; + _loc11_ = PublicMethod.getTdLine1(37,this.succLineColor); + addChild(_loc11_); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc10_.y; + _loc9_.visible = false; + _loc11_.visible = false; + _loc7_.tr = _loc9_; + _loc7_.td = _loc11_; + this.list8.push(_loc7_); + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 4) + { + _loc7_ = new MatchUserMc(); + addChild(_loc7_); + _loc7_.x = 683; + _loc7_.y = 40 + 124 * _loc2_; + _loc8_ = PublicMethod.getTrLine1(13); + addChild(_loc8_); + _loc8_.x = _loc7_.x + _loc7_.width + 2; + _loc8_.y = _loc7_.y + 23; + _loc10_ = PublicMethod.getTdLine1(37); + addChild(_loc10_); + _loc10_.x = _loc7_.x + 50; + if(_loc2_ % 2 == 1) + { + _loc10_.y = _loc7_.y - _loc10_.height + 1; + } + else + { + _loc10_.y = _loc7_.y + _loc7_.height; + } + _loc9_ = PublicMethod.getTrLine1(13,this.succLineColor); + addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y; + _loc11_ = PublicMethod.getTdLine1(37,this.succLineColor); + addChild(_loc11_); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc10_.y; + _loc9_.visible = false; + _loc11_.visible = false; + _loc7_.tr = _loc9_; + _loc7_.td = _loc11_; + this.list8.push(_loc7_); + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 2) + { + _loc7_ = new MatchUserMc(); + addChild(_loc7_); + _loc7_.x = 244; + _loc7_.y = 100 + 250 * _loc2_; + _loc8_ = PublicMethod.getTrLine1(43); + addChild(_loc8_); + _loc8_.x = _loc7_.x - _loc8_.width; + _loc8_.y = _loc7_.y + 23; + _loc10_ = PublicMethod.getTdLine1(102); + addChild(_loc10_); + _loc10_.x = _loc7_.x + 50; + if(_loc2_ % 2 == 1) + { + _loc10_.y = _loc7_.y - _loc10_.height + 1; + } + else + { + _loc10_.y = _loc7_.y + _loc7_.height; + } + _loc9_ = PublicMethod.getTrLine1(43,this.succLineColor); + addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y; + _loc11_ = PublicMethod.getTdLine1(102,this.succLineColor); + addChild(_loc11_); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc10_.y; + _loc9_.visible = false; + _loc11_.visible = false; + _loc7_.tr = _loc9_; + _loc7_.td = _loc11_; + this.list4.push(_loc7_); + _loc2_++; + } + _loc2_ = 0; + while(_loc2_ < 2) + { + _loc7_ = new MatchUserMc(); + addChild(_loc7_); + _loc7_.x = 579; + _loc7_.y = 100 + 250 * _loc2_; + _loc8_ = PublicMethod.getTrLine1(43); + addChild(_loc8_); + _loc8_.x = _loc7_.x + _loc7_.width + 2; + _loc8_.y = _loc7_.y + 23; + _loc10_ = PublicMethod.getTdLine1(102); + addChild(_loc10_); + _loc10_.x = _loc7_.x + 50; + if(_loc2_ % 2 == 1) + { + _loc10_.y = _loc7_.y - _loc10_.height + 1; + } + else + { + _loc10_.y = _loc7_.y + _loc7_.height; + } + _loc9_ = PublicMethod.getTrLine1(43,this.succLineColor); + addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc8_.y; + _loc11_ = PublicMethod.getTdLine1(102,this.succLineColor); + addChild(_loc11_); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc10_.y; + _loc9_.visible = false; + _loc11_.visible = false; + _loc7_.tr = _loc9_; + _loc7_.td = _loc11_; + this.list4.push(_loc7_); + _loc2_++; + } + this.mc1 = new MatchUserMc(); + addChild(this.mc1); + this.mc1.x = 344; + this.mc1.y = 220; + var _loc3_:Sprite = PublicMethod.getTrLine1(50); + addChild(_loc3_); + _loc3_.x = this.mc1.x - _loc3_.width + 2; + _loc3_.y = this.mc1.y + 27; + _loc4_ = PublicMethod.getTrLine1(50,this.succLineColor); + addChild(_loc4_); + _loc4_.x = _loc3_.x; + _loc4_.y = _loc3_.y; + _loc4_.visible = false; + this.mc1.tr = _loc4_; + this.mc2 = new MatchUserMc(); + addChild(this.mc2); + this.mc2.x = 477; + this.mc2.y = this.mc1.y; + var _loc5_:Sprite = PublicMethod.getTrLine1(43); + addChild(_loc5_); + _loc5_.x = this.mc2.x + this.mc2.width + 1; + _loc5_.y = _loc3_.y; + var _loc6_:Sprite = PublicMethod.getTrLine1(43,this.succLineColor); + addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y; + _loc6_.visible = false; + this.mc2.tr = _loc6_; + this.getMatchMap(); + this.mc3 = new MatchMc3(); + this.mc4 = new MatchMc3(); + addChild(this.mc3); + addChild(this.mc4); + this.mc3.x = 344; + this.mc3.y = 180; + this.mc4.x = 487; + this.mc4.y = this.mc3.y; + this.mc3.visible = false; + this.mc4.visible = false; + Utils.g_events.addEventListener(PlayEvent.MATCH_getMatchMap,this.getMatchMapResult); + this.loadImg1(); + this.rankImg = new UINums(1); + addChild(this.rankImg); + this.rankImg.x = 465; + this.rankImg.y = 14; + } + + private function getMatchMap() : void + { + ConnectService.getInstance().activityService.getMatchMap(); + } + + private function getMatchMapResult(param1:PlayEvent) : void + { + var _loc3_:int = 0; + var _loc10_:int = 0; + var _loc11_:int = 0; + var _loc12_:Object = null; + var _loc2_:Object = param1.obj; + this.listData16 = _loc2_.list; + _loc3_ = 0; + while(_loc3_ < this.list16.length) + { + _loc10_ = 1 + _loc3_ / 2; + _loc11_ = 1 + _loc3_ % 2; + _loc12_ = this.getMatchObjBy16Id(_loc10_,_loc11_); + this.list16[_loc3_].setObj16(_loc12_); + _loc3_++; + } + _loc3_ = 0; + while(_loc3_ < this.list8.length) + { + _loc12_ = this.getMatchObj8ByResult(_loc3_ + 1,1); + this.list8[_loc3_].setObj8(_loc12_); + _loc3_++; + } + _loc3_ = 0; + while(_loc3_ < this.list4.length) + { + _loc12_ = this.getMatchObj4ByResult(_loc3_ + 1,1); + this.list4[_loc3_].setObj4(_loc12_); + _loc3_++; + } + var _loc4_:Object = this.getMatchObj2ByResult(1,1); + var _loc5_:Object = this.getMatchObj2ByResult(2,1); + this.mc1.setObj2(_loc4_); + this.mc2.setObj2(_loc5_); + var _loc6_:Object = this.getMatchObj1ByResult(1,1); + var _loc7_:Object = this.getMatchObj1ByResult(2,1); + if(_loc6_ == null && _loc7_ == null) + { + this.mc1.visible = true; + this.mc2.visible = true; + this.mc3.visible = false; + this.mc4.visible = false; + } + else + { + this.mc1.visible = false; + this.mc2.visible = false; + this.mc3.visible = true; + this.mc4.visible = true; + if(_loc6_ != null) + { + this.mc3.setObj(_loc6_); + this.mc4.setObj1(_loc5_); + } + else + { + this.mc3.setObj1(_loc4_); + this.mc4.setObj(_loc7_); + } + } + var _loc8_:Object = _loc2_.matchMap; + var _loc9_:int = int(_loc8_.matchId); + if(_loc9_ == 0) + { + _loc9_ = 1; + } + this.rankImg.showNum(_loc9_); + if(_loc9_ > 9) + { + this.rankImg.x = 445; + } + else + { + this.rankImg.x = 455; + } + } + + private function getMatchObjBy16Id(param1:int, param2:int) : Object + { + var _loc3_:Object = null; + if(this.listData16 == null || this.listData16.length == 0) + { + return null; + } + for each(_loc3_ in this.listData16) + { + if(_loc3_.gId1 == param1 && _loc3_.id1 == param2) + { + return _loc3_; + } + } + return null; + } + + private function getMatchObj8ByResult(param1:int, param2:int) : Object + { + var _loc3_:Object = null; + if(this.listData16 == null || this.listData16.length == 0) + { + return null; + } + for each(_loc3_ in this.listData16) + { + if(_loc3_.gId1 == param1 && _loc3_.gRe1 == param2) + { + return _loc3_; + } + } + return null; + } + + private function getMatchObj4ByResult(param1:int, param2:int) : Object + { + var _loc3_:Object = null; + if(this.listData16 == null || this.listData16.length == 0) + { + return null; + } + for each(_loc3_ in this.listData16) + { + if(_loc3_.gId2 == param1 && _loc3_.gRe2 == param2) + { + return _loc3_; + } + } + return null; + } + + private function getMatchObj2ByResult(param1:int, param2:int) : Object + { + var _loc3_:Object = null; + if(this.listData16 == null || this.listData16.length == 0) + { + return null; + } + for each(_loc3_ in this.listData16) + { + if(_loc3_.gId3 == param1 && _loc3_.gRe3 == param2) + { + return _loc3_; + } + } + return null; + } + + private function getMatchObj1ByResult(param1:int, param2:int) : Object + { + var _loc3_:Object = null; + if(this.listData16 == null || this.listData16.length == 0) + { + return null; + } + for each(_loc3_ in this.listData16) + { + if(_loc3_.gId3 == param1 && _loc3_.gRe4 == param2) + { + return _loc3_; + } + } + return null; + } + + override public function loadBg(param1:String) : void + { + super.loadBg(param1); + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg1.addChild(param1); + param1.x = 2; + param1.y = 2; + param1.width = 940; + param1.height = 500; + } + + override public function reSizeWindow(param1:Event) : void + { + } + + private function loadImg1() : void + { + var _loc1_:String = "pic/title/match_7.png"; + this.loadRes = new LoadResource(_loc1_,this.loadBack1); + } + + private function loadBack1(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + addChild(_loc2_); + _loc2_.x = 397; + _loc2_.y = 10; + this.loadImg2(); + } + + private function loadImg2() : void + { + var _loc1_:String = "pic/title/match_8.png"; + this.loadRes = new LoadResource(_loc1_,this.loadBack2); + } + + private function loadBack2(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + addChild(_loc2_); + _loc2_.x = 380; + _loc2_.y = 50; + } + } +} + diff --git a/flash_decompiled/com/view/ui/match/MatchPage2.as b/flash_decompiled/com/view/ui/match/MatchPage2.as new file mode 100644 index 0000000..6461707 --- /dev/null +++ b/flash_decompiled/com/view/ui/match/MatchPage2.as @@ -0,0 +1,312 @@ +package com.view.ui.match +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.data.data.hero.Hero; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIBorderMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIHeroItem; + import com.view.newui.UITable; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.HeroListSelectUI; + 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 MatchPage2 extends UIBase + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var packList1:Vector.; + + private var packScrollPane1:ScrollPane; + + private var packMc1:Sprite; + + private var saveBtn:UIButton; + + private var heroMcVec:Vector.; + + private var powerText:TextField; + + private var heroIdList:Vector.; + + public function MatchPage2() + { + var _loc13_:MatchMc1 = null; + var _loc14_:UIHeroItem = null; + var _loc15_:MatchMc2 = null; + this.heroIdList = new Vector.(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(624,488); + addChild(this.bg1); + this.bg1.x = 3; + this.bg1.y = 3; + var _loc1_:UIBorderMc = new UIBorderMc(553); + this.bg1.addChild(_loc1_); + _loc1_.x = 0; + _loc1_.y = 1; + _loc1_.loadTitle(10); + var _loc2_:Array = ["排名","君主名称","君主等级","报名战力","所属分区","报名时间"]; + var _loc3_:Array = [50,150,100,100,112,120]; + var _loc4_:UITable = new UITable(); + _loc4_.drawLine = false; + _loc4_.lineHeight = 24; + _loc4_.install(13,_loc2_,_loc3_); + this.bg1.addChild(_loc4_); + _loc4_.x = 3; + _loc4_.y = 31; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(628,310); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg1.addChild(this.packScrollPane); + this.packScrollPane.x = 5; + this.packScrollPane.y = 58; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 13) + { + _loc13_ = new MatchMc1(); + this.packMc.addChild(_loc13_); + this.packList.push(_loc13_); + _loc13_.y = 24 * _loc5_; + _loc5_++; + } + this.packScrollPane.update(); + var _loc6_:UIWindowBg = new UIWindowBg(); + _loc6_.initThirdPanel(618,113); + this.bg1.addChild(_loc6_); + _loc6_.x = 3; + _loc6_.y = _loc4_.y + _loc4_.height + 3; + this.heroMcVec = new Vector.(); + var _loc7_:int = 0; + while(_loc7_ < 5) + { + _loc14_ = new UIHeroItem(); + _loc6_.addChild(_loc14_); + _loc14_.x = 5 + _loc7_ * 124; + _loc14_.y = 5; + this.heroMcVec.push(_loc14_); + _loc7_++; + } + var _loc8_:UIButton = new UIButton("武将选择",2,10); + _loc6_.addChild(_loc8_); + _loc8_.x = 10; + _loc8_.y = 95; + _loc8_.onClick = this.selectHero; + this.powerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,221); + _loc6_.addChild(this.powerText); + this.powerText.x = _loc8_.x + 100; + this.powerText.y = _loc8_.y + 3; + this.powerText.htmlText = "武将战斗力:0"; + this.saveBtn = new UIButton("报名参赛",2,10); + _loc6_.addChild(this.saveBtn); + this.saveBtn.x = 557; + this.saveBtn.y = 95; + this.saveBtn.onClick = this.saveHeroids; + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(290,488); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 2; + this.bg2.y = 3; + var _loc9_:UIBorderMc = new UIBorderMc(218); + this.bg2.addChild(_loc9_); + _loc9_.x = 0; + _loc9_.y = 1; + _loc9_.loadTitle(11); + var _loc10_:Array = ["排名","冠军","亚军"]; + var _loc11_:Array = [77,110,110]; + var _loc12_:UITable = new UITable(); + _loc12_.drawLine = false; + _loc12_.lineHeight = 24; + _loc12_.install(18,_loc10_,_loc11_); + this.bg2.addChild(_loc12_); + _loc12_.x = 3; + _loc12_.y = _loc9_.y + _loc9_.height + 1; + this.packScrollPane1 = new ScrollPane(); + this.packScrollPane1.setSize(290,434); + this.packScrollPane1.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg2.addChild(this.packScrollPane1); + this.packScrollPane1.x = 5; + this.packScrollPane1.y = 58; + this.packMc1 = new Sprite(); + this.packScrollPane1.source = this.packMc1; + this.packList1 = new Vector.(); + _loc5_ = 0; + while(_loc5_ < 18) + { + _loc15_ = new MatchMc2(); + this.packMc1.addChild(_loc15_); + this.packList1.push(_loc15_); + _loc15_.y = 24 * _loc5_; + _loc5_++; + } + this.packScrollPane1.update(); + Utils.g_events.addEventListener(PlayEvent.MATCH_enterMain,this.getMatchData); + this.enterMain(); + } + + private function enterMain() : void + { + ConnectService.getInstance().activityService.enterMain(); + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance(); + _loc2_.setSelectheroArr(this.heroIdList); + addChild(_loc2_); + _loc2_.x = 140; + _loc2_.y = 0; + _loc2_.backFunc = this.selectHeroList; + } + + private function clearHeroIdList() : void + { + if(this.heroIdList.length > 0) + { + this.heroIdList = new Vector.(); + } + } + + public function selectHeroList(param1:Vector.) : void + { + var _loc3_:* = undefined; + this.clearHeroIdList(); + var _loc2_:Number = 0; + for(_loc3_ in this.heroMcVec) + { + if(param1.length > 0 && param1.length > _loc3_) + { + this.heroIdList.push(param1[_loc3_].heroId); + this.heroMcVec[_loc3_].setData(param1[_loc3_]); + _loc2_ += param1[_loc3_].combatPower; + } + else + { + this.heroMcVec[_loc3_].setData(null); + } + } + _loc2_ = Math.round(_loc2_); + this.powerText.htmlText = "武将战斗力:" + _loc2_ + ""; + } + + private function saveHeroids(param1:MouseEvent) : void + { + var _loc3_:int = 0; + if(this.heroIdList.length == 0) + { + MessageBoxUI.getInstance().addMessage("请选择武将参与活动"); + return; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in this.heroIdList) + { + _loc2_.push(_loc3_); + } + ConnectService.getInstance().activityService.saveMatch(_loc2_); + } + + private function getMatchData(param1:PlayEvent) : void + { + var _loc5_:int = 0; + var _loc6_:MatchMc1 = null; + var _loc7_:MatchMc2 = null; + var _loc2_:Object = param1.obj; + var _loc3_:Array = _loc2_.appList; + this.clearMatchList(); + if(_loc3_ != null && _loc3_.length > 0) + { + _loc5_ = 0; + while(_loc5_ < _loc3_.length) + { + if(_loc5_ > 12) + { + _loc6_ = new MatchMc1(); + this.packMc.addChild(_loc6_); + this.packList.push(_loc6_); + _loc6_.y = 24 * _loc5_; + _loc6_.setObj(_loc3_[_loc5_]); + _loc6_.setRandId(_loc5_ + 1); + } + else + { + this.packList[_loc5_].setObj(_loc3_[_loc5_]); + this.packList[_loc5_].setRandId(_loc5_ + 1); + } + _loc5_++; + } + } + this.packScrollPane.verticalScrollPosition = 0; + if(Boolean(_loc3_) && _loc3_.length > 13) + { + this.packScrollPane.update(); + } + var _loc4_:Array = param1.list; + if(_loc4_ != null && _loc4_.length > 0) + { + _loc5_ = 0; + while(_loc5_ < _loc4_.length) + { + if(_loc5_ > 18) + { + _loc7_ = new MatchMc2(); + this.packMc1.addChild(_loc7_); + this.packList1.push(_loc7_); + _loc7_.y = 24 * _loc5_; + _loc7_.setObj(_loc4_[_loc5_]); + } + else + { + this.packList1[_loc5_].setObj(_loc4_[_loc5_]); + } + _loc5_++; + } + } + this.packScrollPane1.verticalScrollPosition = 0; + if(Boolean(_loc4_) && _loc4_.length > 18) + { + this.packScrollPane1.update(); + } + } + + private function clearMatchList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 12) + { + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setObj(null); + this.packList[_loc1_].setRandId(0); + } + _loc1_--; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/match/MatchPage3.as b/flash_decompiled/com/view/ui/match/MatchPage3.as new file mode 100644 index 0000000..922a864 --- /dev/null +++ b/flash_decompiled/com/view/ui/match/MatchPage3.as @@ -0,0 +1,339 @@ +package com.view.ui.match +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIBigButton; + import com.view.newui.UIBorderMc; + import com.view.newui.UIConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.activity.gift.NewItemMc; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MatchPage3 extends UIBase + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var getBtn1:UIBigButton; + + private var getBtn2:UIBigButton; + + private var hasGetBtn1:UIBigButton; + + private var hasGetBtn2:UIBigButton; + + private var border2:UIBorderMc; + + private var border3:UIBorderMc; + + private var border4:UIBorderMc; + + private var border5:UIBorderMc; + + private var border6:UIBorderMc; + + private var border7:UIBorderMc; + + public function MatchPage3() + { + var _loc2_:String = null; + var _loc3_:TextField = null; + var _loc8_:String = null; + var _loc9_:String = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(624,488); + addChild(this.bg1); + this.bg1.x = 3; + this.bg1.y = 3; + var _loc1_:UIBorderMc = new UIBorderMc(553); + this.bg1.addChild(_loc1_); + _loc1_.x = 0; + _loc1_.y = 1; + _loc1_.loadTitle(5); + _loc2_ = "1、所有区玩家均可参与活动报名,活动报名时间为周五、周六、周日
"; + _loc2_ += "2、玩家报名后即可领取参与报名奖励。
"; + _loc2_ += "3、系统将于每周一凌晨从所有报名数据中根据战斗力数值排行选取16名玩家进入16强名单,并随机抽取玩家进入八组小组赛。
"; + _loc2_ += "4、系统周二凌晨会对八组小组赛进行比赛,胜利者进入八强名单。
"; + _loc2_ += "5、系统周三凌晨进行四强选拔赛,胜利者进入四强名单。
"; + _loc2_ += "6、系统周四凌晨进行半决赛选拔赛,胜利者进入决赛名单。
"; + _loc2_ += "7、系统周五凌晨进行决赛,胜利者即为本届武道会冠军,失败者为本届武道会亚军。冠军亚军都会获得相应的奖励。
"; + _loc2_ += "8、周五开始下届武道会报名活动开启,报名时间为早上5点到晚上11点。报名截止到周日晚。
"; + _loc2_ += "9、报名期间可反复报名,以最后一次报名数据为准。
"; + _loc2_ += "10、进入16强的玩家都会获得相对应的奖励。
"; + _loc2_ += "11、每周一前必须由玩家主动领取对应奖励,否则周一新一轮武道会开始后前一轮所有奖励将不能领取。"; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,600); + _loc3_.wordWrap = true; + _loc3_.multiline = true; + _loc3_.height = 300; + this.bg1.addChild(_loc3_); + _loc3_.x = 15; + _loc3_.y = 45; + var _loc4_:TextFormat = new TextFormat(); + _loc4_.leading = 8; + _loc3_.defaultTextFormat = _loc4_; + _loc3_.htmlText = _loc2_; + var _loc5_:UIBorderMc = new UIBorderMc(553); + this.bg1.addChild(_loc5_); + _loc5_.x = 0; + _loc5_.y = 360; + _loc5_.loadTitle(19); + var _loc6_:UIWindowBg = new UIWindowBg(); + _loc6_.initThirdPanel(300,90); + this.bg1.addChild(_loc6_); + _loc6_.x = 5; + _loc6_.y = _loc5_.y + _loc5_.height + 4; + var _loc7_:UIWindowBg = new UIWindowBg(); + _loc7_.initThirdPanel(300,90); + this.bg1.addChild(_loc7_); + _loc7_.x = _loc6_.x + _loc6_.width + 5; + _loc7_.y = _loc6_.y; + _loc8_ = "活动报名即可领取,领取时间截止到周日晚。下次武道会16强名单出来后参与奖将不能领取。"; + _loc9_ = "该奖励为排名赛成绩最好的奖励,如是冠军,则给与冠军奖励,如是亚军,则给与亚军奖励,该奖励不叠加。"; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,300); + _loc10_.wordWrap = true; + _loc10_.multiline = true; + _loc10_.height = 36; + _loc6_.addChild(_loc10_); + _loc10_.x = 6; + _loc10_.y = 6; + _loc10_.defaultTextFormat = _loc4_; + _loc10_.htmlText = _loc8_; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,300); + _loc11_.wordWrap = true; + _loc11_.multiline = true; + _loc11_.height = 38; + _loc7_.addChild(_loc11_); + _loc11_.x = 6; + _loc11_.y = 6; + _loc11_.defaultTextFormat = _loc4_; + _loc11_.htmlText = _loc9_; + this.getBtn1 = new UIBigButton(3); + _loc6_.addChild(this.getBtn1); + this.getBtn1.x = 100; + this.getBtn1.y = 55; + this.getBtn1.onClick = this.getMatchJoinAward; + this.hasGetBtn1 = new UIBigButton(4); + _loc6_.addChild(this.hasGetBtn1); + this.hasGetBtn1.x = this.getBtn1.x; + this.hasGetBtn1.y = this.getBtn1.y; + this.hasGetBtn1.setUnEnable(); + this.hasGetBtn1.visible = false; + this.getBtn2 = new UIBigButton(3); + _loc7_.addChild(this.getBtn2); + this.getBtn2.x = 100; + this.getBtn2.y = 55; + this.getBtn2.onClick = this.getMatchRankAward; + this.hasGetBtn2 = new UIBigButton(4); + _loc7_.addChild(this.hasGetBtn2); + this.hasGetBtn2.x = this.getBtn2.x; + this.hasGetBtn2.y = this.getBtn2.y; + this.hasGetBtn2.setUnEnable(); + this.hasGetBtn2.visible = false; + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(290,488); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 2; + this.bg2.y = 3; + this.border2 = new UIBorderMc(218); + this.bg2.addChild(this.border2); + this.border2.x = 0; + this.border2.y = 1; + this.border2.loadTitle(13); + this.border3 = new UIBorderMc(218); + this.bg2.addChild(this.border3); + this.border3.x = 0; + this.border3.y = this.border2.y + 83; + this.border3.loadTitle(14); + this.border4 = new UIBorderMc(218); + this.bg2.addChild(this.border4); + this.border4.x = 0; + this.border4.y = this.border3.y + 83; + this.border4.loadTitle(15); + this.border5 = new UIBorderMc(218); + this.bg2.addChild(this.border5); + this.border5.x = 0; + this.border5.y = this.border4.y + 83; + this.border5.loadTitle(16); + this.border6 = new UIBorderMc(218); + this.bg2.addChild(this.border6); + this.border6.x = 0; + this.border6.y = this.border5.y + 83; + this.border6.loadTitle(17); + this.border7 = new UIBorderMc(218); + this.bg2.addChild(this.border7); + this.border7.x = 0; + this.border7.y = this.border6.y + 83; + this.border7.loadTitle(18); + Utils.g_events.addEventListener(PlayEvent.MATCH_getMatchReward,this.getMatchAwardResult); + Utils.g_events.addEventListener(PlayEvent.MATCH_getUserMatchReward,this.getUserMatchRewardRes); + this.getMatchAward(); + this.getUserMatchAward(); + } + + private function getMatchAward() : void + { + ConnectService.getInstance().activityService.getMatchReward(); + } + + private function getUserMatchAward() : void + { + ConnectService.getInstance().activityService.getUserMatch(); + } + + private function getUserMatchRewardRes(param1:PlayEvent) : void + { + var _loc2_:Object = param1.obj; + var _loc3_:int = int(_loc2_.matchId); + var _loc4_:int = int(_loc2_.matchRandId); + if(_loc3_ == 1) + { + this.getBtn1.visible = false; + this.hasGetBtn1.visible = true; + } + else + { + this.getBtn1.visible = true; + this.hasGetBtn1.visible = false; + } + if(_loc4_ == 1) + { + this.getBtn2.visible = false; + this.hasGetBtn2.visible = true; + } + else + { + this.getBtn2.visible = true; + this.hasGetBtn2.visible = false; + } + } + + private function getMatchJoinAward(param1:MouseEvent) : void + { + ConnectService.getInstance().activityService.getMatchJoinReward(); + } + + private function getMatchRankAward(param1:MouseEvent) : void + { + ConnectService.getInstance().activityService.getMatchRankReward(); + } + + private function getMatchAwardResult(param1:PlayEvent) : void + { + var _loc2_:Object = null; + var _loc9_:int = 0; + var _loc10_:NewItemMc = null; + _loc2_ = param1.obj; + var _loc3_:Array = _loc2_["1"]; + var _loc4_:Array = _loc2_["2"]; + var _loc5_:Array = _loc2_["4"]; + var _loc6_:Array = _loc2_["8"]; + var _loc7_:Array = _loc2_["16"]; + var _loc8_:Array = _loc2_["32"]; + _loc9_ = 0; + while(_loc9_ < _loc8_.length) + { + if(_loc9_ > 5) + { + break; + } + _loc2_ = _loc8_[_loc9_]; + _loc10_ = new NewItemMc(1); + this.bg2.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = this.border2.y + 38; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc7_.length) + { + if(_loc9_ > 5) + { + break; + } + _loc2_ = _loc7_[_loc9_]; + _loc10_ = new NewItemMc(1); + this.bg2.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = this.border3.y + 38; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc6_.length) + { + if(_loc9_ > 5) + { + break; + } + _loc2_ = _loc6_[_loc9_]; + _loc10_ = new NewItemMc(1); + this.bg2.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = this.border4.y + 38; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc5_.length) + { + if(_loc9_ > 5) + { + break; + } + _loc2_ = _loc5_[_loc9_]; + _loc10_ = new NewItemMc(1); + this.bg2.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = this.border5.y + 38; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc4_.length) + { + if(_loc9_ > 5) + { + break; + } + _loc2_ = _loc4_[_loc9_]; + _loc10_ = new NewItemMc(1); + this.bg2.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = this.border6.y + 38; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + _loc9_ = 0; + while(_loc9_ < _loc3_.length) + { + if(_loc9_ > 5) + { + break; + } + _loc2_ = _loc3_[_loc9_]; + _loc10_ = new NewItemMc(1); + this.bg2.addChild(_loc10_); + _loc10_.x = 10 + 50 * _loc9_; + _loc10_.y = this.border7.y + 38; + _loc10_.setObj(_loc2_); + _loc10_.loadTip(_loc2_); + _loc9_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/match/MatchUI.as b/flash_decompiled/com/view/ui/match/MatchUI.as new file mode 100644 index 0000000..fb6a58f --- /dev/null +++ b/flash_decompiled/com/view/ui/match/MatchUI.as @@ -0,0 +1,129 @@ +package com.view.ui.match +{ + 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 MatchUI extends BaseUI + { + + public var btnArr:Array; + + private var paneBg:UIWindowBg; + + private var page1:MatchPage1; + + private var page2:MatchPage2; + + private var page3:MatchPage3; + + private var prePage:Sprite; + + private var preBtn:UITabBtn; + + public function MatchUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_match); + super.setPosition(); + this.createUI(); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 340 - 37; + window_heihgt = UIWindowBg.normal_window_h + 95 + 26; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 340 - 37; + 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 UIWindowBg(); + this.paneBg.initSecondPanel(630 + 340 - 37,400 + 95); + 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 MatchPage1(); + } + this.prePage = this.page1; + } + if(this.btnArr[1] == this.preBtn) + { + if(this.page2 == null) + { + this.page2 = new MatchPage2(); + } + this.prePage = this.page2; + } + if(this.btnArr[2] == this.preBtn) + { + if(this.page3 == null) + { + this.page3 = new MatchPage3(); + } + this.prePage = this.page3; + } + this.paneBg.addChild(this.prePage); + } + + override public function addToStage(param1:Event) : void + { + } + + override public function removeFromStage(param1:Event) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/match/MatchUserMc.as b/flash_decompiled/com/view/ui/match/MatchUserMc.as new file mode 100644 index 0000000..ff3c3f7 --- /dev/null +++ b/flash_decompiled/com/view/ui/match/MatchUserMc.as @@ -0,0 +1,173 @@ +package com.view.ui.match +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.view.newui.UIBase; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MatchUserMc extends UIBase + { + + private var zoneId1:int; + + private var nameText:TextField; + + private var zoneText:TextField; + + private var _tr:Sprite; + + private var _td:Sprite; + + public function MatchUserMc() + { + super(); + var _loc1_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.window_border_bg),70,10); + addChild(_loc1_); + this.nameText = PublicMethod.getTextFieldWithFillter(3660765,100); + this.zoneText = PublicMethod.getTextFieldWithFillter(3660765,100); + addChild(this.nameText); + addChild(this.zoneText); + this.nameText.x = 4; + this.nameText.y = 4; + this.zoneText.x = this.nameText.x; + this.zoneText.y = this.nameText.y + 20; + this.nameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.zoneText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + } + + public function setZoneId1(param1:int) : void + { + this.zoneId1 = param1; + } + + public function setObj16(param1:Object) : void + { + if(param1 == null) + { + this.nameText.text = ""; + this.zoneText.text = ""; + } + else + { + this.nameText.text = param1.userName; + this.zoneText.text = param1.zoneName; + if(param1.gRe1 == 1) + { + this._tr.visible = true; + this._td.visible = true; + } + else + { + this._tr.visible = false; + this._td.visible = false; + } + } + } + + public function setObj8(param1:Object) : void + { + var _loc2_:TextFormat = null; + if(param1 == null) + { + this.nameText.text = ""; + this.zoneText.text = ""; + } + else + { + _loc2_ = new TextFormat(); + _loc2_.align = "center"; + _loc2_.font = "SimSun"; + _loc2_.color = 65280; + this.nameText.defaultTextFormat = _loc2_; + this.zoneText.defaultTextFormat = _loc2_; + this.nameText.text = param1.userName; + this.zoneText.text = param1.zoneName; + this._tr.visible = true; + if(param1.gRe2 == 1) + { + this._td.visible = true; + } + else + { + this._td.visible = false; + } + } + } + + public function setObj4(param1:Object) : void + { + var _loc2_:TextFormat = null; + if(param1 == null) + { + this.nameText.text = ""; + this.zoneText.text = ""; + } + else + { + _loc2_ = new TextFormat(); + _loc2_.align = "center"; + _loc2_.font = "SimSun"; + _loc2_.color = 16750693; + this.nameText.defaultTextFormat = _loc2_; + this.zoneText.defaultTextFormat = _loc2_; + this.nameText.text = param1.userName; + this.zoneText.text = param1.zoneName; + this._tr.visible = true; + if(param1.gRe3 == 1) + { + this._td.visible = true; + } + else + { + this._td.visible = false; + } + } + } + + public function setObj2(param1:Object) : void + { + var _loc2_:TextFormat = null; + if(param1 == null) + { + this.nameText.text = ""; + this.zoneText.text = ""; + } + else + { + _loc2_ = new TextFormat(); + _loc2_.align = "center"; + _loc2_.font = "SimSun"; + _loc2_.color = 16733771; + this.nameText.defaultTextFormat = _loc2_; + this.zoneText.defaultTextFormat = _loc2_; + this.nameText.text = param1.userName; + this.zoneText.text = param1.zoneName; + this._tr.visible = true; + } + } + + public function get tr() : Sprite + { + return this._tr; + } + + public function set tr(param1:Sprite) : void + { + this._tr = param1; + } + + public function get td() : Sprite + { + return this._td; + } + + public function set td(param1:Sprite) : void + { + this._td = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/menu/CenterMenu.as b/flash_decompiled/com/view/ui/menu/CenterMenu.as new file mode 100644 index 0000000..b0a2a47 --- /dev/null +++ b/flash_decompiled/com/view/ui/menu/CenterMenu.as @@ -0,0 +1,634 @@ +package com.view.ui.menu +{ + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.data.MemeberShip; + import com.data.data.city.Castle; + import com.events.DevEvent; + import com.greensock.TweenMax; + import com.newdata.user.NewPop; + import com.newdata.user.NewRes; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.mc.sprite.CloudMc; + import com.view.mc.sprite.UserRangeMc; + import com.view.newui.UISmallBtn; + import com.view.tip.PopTip; + import com.view.tip.RangeTip; + import com.view.tip.ResourceTip; + import com.view.tip.TipTitle; + import com.view.tip.data.PopTipData; + import com.view.tip.data.ResTipData; + import com.view.ui.BarFactory; + import com.view.ui.BaseUI; + import com.view.ui.army.ArmySetUI; + import com.view.ui.farm.FarmView; + import com.view.ui.guild.GuildMainUI; + import com.view.ui.hero.MyHeroUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.UserPackUI; + import com.view.ui.shop.ShopUI; + import com.view.ui.test.TestUI; + import com.view.ui.training.SoldierFirstView; + import com.view.ui.user.UserInfoUI; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class CenterMenu extends BaseUI + { + + private var btnArr:Vector.; + + public var bg:MovieClip; + + private var resourceBg:Sprite; + + private var casLvBtn:UISmallBtn; + + private var foodTip:ResourceTip; + + private var stoneTip:ResourceTip; + + private var woodTip:ResourceTip; + + private var bronzeTip:ResourceTip; + + private var foodValue:ResTipData; + + private var woodValue:ResTipData; + + private var stoneValue:ResTipData; + + private var bronzeValue:ResTipData; + + private var popTip:PopTip; + + private var popData:PopTipData; + + private var canUp:Boolean = false; + + private var lastRange:int; + + private var cloudMc:CloudMc; + + private var rangeMc:UserRangeMc; + + private var rangeTip:RangeTip; + + private var food_txt:TextField; + + private var wood_txt:TextField; + + private var stone_txt:TextField; + + private var bronze_txt:TextField; + + private var population_txt:TextField; + + private var gold_txt:TextField; + + private var gold2_txt:TextField; + + private var downicon:Sprite; + + private var upicon:Sprite; + + private var resourceShow:Boolean = true; + + private var userUI:UserInfoUI; + + private var userPack:UserPackUI; + + private var guildUI:GuildMainUI; + + private var myheroUI:MyHeroUI; + + private var test1:TestUI; + + public function CenterMenu() + { + var _loc1_:Sprite = null; + var _loc5_:MovieClip = null; + var _loc7_:Sprite = null; + this.foodValue = new ResTipData(); + this.woodValue = new ResTipData(); + this.stoneValue = new ResTipData(); + this.bronzeValue = new ResTipData(); + this.popData = new PopTipData(); + super(); + _loc1_ = new Sprite(); + addChild(_loc1_); + this.resourceBg = face.getSprite(ClassConfig.menu_sp8); + _loc1_.addChild(this.resourceBg); + var _loc2_:* = face.getSprite(ClassConfig.menu_sp8); + _loc1_.addChild(_loc2_); + this.resourceBg.mask = _loc2_; + this.bg = face.getMovieClip(ClassConfig.menu_toolbar); + addChild(this.bg); + this.bg.x = -int(this.bg.width); + this.bg.y = -int(this.bg.height); + _loc1_.x = this.bg.x + 88; + _loc1_.y = this.bg.y + 65; + this.btnArr = new Vector.(); + var _loc3_:int = 1; + while(_loc3_ < 8) + { + _loc7_ = face.getSprite("menu_" + _loc3_); + this.btnArr.push(_loc7_); + addChild(_loc7_); + _loc7_.x = _loc3_ * 60 - 560; + _loc7_.y = -86; + _loc7_.buttonMode = true; + _loc7_.addEventListener(MouseEvent.ROLL_OUT,this.rollOut); + _loc7_.addEventListener(MouseEvent.ROLL_OVER,this.rollOver); + _loc7_.addEventListener(MouseEvent.MOUSE_UP,this.clickMenu); + _loc3_++; + } + var _loc4_:SimpleButton = face.getButton(ClassConfig.menu_shop); + addChild(_loc4_); + _loc4_.y = -94; + _loc4_.x = -72; + _loc4_.addEventListener(MouseEvent.MOUSE_UP,this.openShop); + _loc5_ = face.getMovieClip(ClassConfig.menu_btn6); + this.bg.addChild(_loc5_); + _loc5_.mouseEnabled = false; + _loc5_.x = 445; + _loc5_.y = 63; + this.downicon = face.getSprite(ClassConfig.menu_btn7); + this.downicon.mouseChildren = false; + this.downicon.mouseEnabled = false; + _loc5_.addChild(this.downicon); + this.downicon.x = 6; + this.downicon.y = 8; + this.upicon = face.getSprite(ClassConfig.menu_btn8); + this.upicon.mouseChildren = false; + this.upicon.mouseEnabled = false; + _loc5_.addChild(this.upicon); + this.upicon.x = 6; + this.upicon.y = 8; + this.upicon.visible = false; + _loc5_.addEventListener(MouseEvent.CLICK,this.showResourceUI); + this.food_txt = PublicMethod.getTextFieldWithFillter(16355072,85); + this.resourceBg.addChild(this.food_txt); + this.food_txt.x = 5; + this.food_txt.y = 2; + this.food_txt.text = "粮食 1.5亿"; + this.wood_txt = PublicMethod.getTextFieldWithFillter(16355072,85); + this.resourceBg.addChild(this.wood_txt); + this.wood_txt.x = this.food_txt.x + this.food_txt.width; + this.wood_txt.y = 2; + this.wood_txt.text = "木材 1.5亿"; + this.stone_txt = PublicMethod.getTextFieldWithFillter(16355072,85); + this.resourceBg.addChild(this.stone_txt); + this.stone_txt.x = this.wood_txt.x + this.wood_txt.width; + this.stone_txt.y = 2; + this.stone_txt.text = "石料 1.5亿"; + this.bronze_txt = PublicMethod.getTextFieldWithFillter(16355072,85); + this.resourceBg.addChild(this.bronze_txt); + this.bronze_txt.x = this.stone_txt.x + this.stone_txt.width; + this.bronze_txt.y = 2; + this.bronze_txt.text = "青铜 1.5亿"; + this.population_txt = PublicMethod.getTextFieldWithFillter(16355072,170); + this.resourceBg.addChild(this.population_txt); + this.population_txt.x = this.food_txt.x; + this.population_txt.y = 18; + this.population_txt.text = "人口 30000/58000/96800"; + this.gold_txt = PublicMethod.getTextFieldWithFillter(16355072,100); + this.resourceBg.addChild(this.gold_txt); + this.gold_txt.x = this.stone_txt.x; + this.gold_txt.y = this.population_txt.y; + this.gold_txt.text = "铜币 2020000"; + this.gold2_txt = PublicMethod.getTextFieldWithFillter(16355072,70); + this.resourceBg.addChild(this.gold2_txt); + this.gold2_txt.x = this.gold_txt.x + this.gold_txt.width; + this.gold2_txt.y = this.population_txt.y; + this.gold2_txt.text = "17万/小时"; + this.food_txt.selectable = false; + this.wood_txt.selectable = false; + this.stone_txt.selectable = false; + this.bronze_txt.selectable = false; + this.food_txt.mouseEnabled = true; + this.wood_txt.mouseEnabled = true; + this.stone_txt.mouseEnabled = true; + this.bronze_txt.mouseEnabled = true; + this.population_txt.selectable = false; + this.population_txt.mouseEnabled = true; + this.gold_txt.selectable = false; + this.gold_txt.mouseEnabled = true; + this.gold2_txt.selectable = false; + this.gold2_txt.mouseEnabled = true; + new TipTitle(this.gold_txt,face.stage,face.tip_bg,{"titletext":"铜币储量"}); + new TipTitle(this.gold2_txt,face.stage,face.tip_bg,{"titletext":"铜币产量"}); + this.rangeMc = new UserRangeMc(); + addChild(this.rangeMc); + this.rangeMc.x = -800; + this.rangeMc.y = -50; + this.casLvBtn = new UISmallBtn("1级城池",3); + this.bg.addChild(this.casLvBtn); + this.casLvBtn.x = 896; + this.casLvBtn.y = 80; + this.casLvBtn.onClick = this.upCastle; + this.setPosition(); + this.setResourceData(); + this.setCastlePopData(); + this.setCastleData(); + var _loc6_:BarFactory = BarFactory.getInstance(); + addChild(_loc6_); + _loc6_.x = _loc1_.x - 20; + _loc6_.y = _loc1_.y - 70; + Utils.g_events.addEventListener(DevEvent.RESCHANGE,this.setResourceData); + Utils.g_events.addEventListener(DevEvent.POPCHANGE,this.setCastlePopData); + Utils.g_events.addEventListener(DevEvent.CASTLECHANGE,this.setCastleData); + Utils.g_events.addEventListener(DevEvent.OPENHORSE,this.openHorseUI); + } + + private function openHorseUI(param1:DevEvent) : void + { + var _loc2_:NewUser = NewUserData.getUser(); + var _loc3_:int = _loc2_.rankId; + if(_loc3_ < 30) + { + MessageBoxUI.getInstance().addMessage("君主等级达到30级才能进入"); + return; + } + if(this.userUI == null) + { + this.userUI = new UserInfoUI(); + } + this.userUI.openFirstPage(2); + this.userUI.show(); + } + + private function setResourceData(param1:DevEvent = null) : void + { + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc2_:NewRes = NewUserData.getRes(); + this.food_txt.text = "粮食 " + PublicMethod.getRes(_loc2_.foodNum); + this.wood_txt.text = "木材 " + PublicMethod.getRes(_loc2_.woodNum); + this.stone_txt.text = "石料 " + PublicMethod.getRes(_loc2_.stoneNum); + this.bronze_txt.text = "青铜 " + PublicMethod.getRes(_loc2_.bronzeNum); + var _loc3_:Object = MemeberShip.getFarmProductInfo(); + if(_loc3_) + { + if(_loc3_.food > 0) + { + _loc4_ = int(_loc3_.food); + } + else + { + _loc4_ = 0; + } + if(_loc3_.wood > 0) + { + _loc5_ = int(_loc3_.wood); + } + else + { + _loc5_ = 0; + } + if(_loc3_.stone > 0) + { + _loc6_ = int(_loc3_.stone); + } + else + { + _loc6_ = 0; + } + if(_loc3_.bronze > 0) + { + _loc7_ = int(_loc3_.bronze); + } + else + { + _loc7_ = 0; + } + } + this.foodValue.title = "粮食"; + this.foodValue.resName = "粮食储量"; + this.foodValue.value = _loc2_.foodNum; + this.foodValue.maxValue = _loc2_.wareCapacity; + this.foodValue.farmValue = _loc4_; + if(this.foodTip == null) + { + this.foodTip = new ResourceTip(this.food_txt,face.stage,face.tip_bg,this.foodValue); + } + else + { + this.foodTip.setValue(this.foodValue); + } + if(this.foodValue.getIsMax()) + { + this.food_txt.textColor = 16711680; + } + else + { + this.food_txt.textColor = 16355072; + } + this.woodValue.title = "木材"; + this.woodValue.resName = "木材储量"; + this.woodValue.value = _loc2_.woodNum; + this.woodValue.maxValue = _loc2_.wareCapacity; + this.woodValue.farmValue = _loc5_; + if(this.woodTip == null) + { + this.woodTip = new ResourceTip(this.wood_txt,face.stage,face.tip_bg,this.woodValue); + } + else + { + this.woodTip.setValue(this.woodValue); + } + if(this.woodValue.getIsMax()) + { + this.wood_txt.textColor = 16711680; + } + else + { + this.wood_txt.textColor = 16355072; + } + this.stoneValue.title = "石料"; + this.stoneValue.resName = "石料储量"; + this.stoneValue.value = _loc2_.stoneNum; + this.stoneValue.maxValue = _loc2_.wareCapacity; + this.stoneValue.farmValue = _loc6_; + if(this.stoneTip == null) + { + this.stoneTip = new ResourceTip(this.stone_txt,face.stage,face.tip_bg,this.stoneValue); + } + else + { + this.stoneTip.setValue(this.stoneValue); + } + if(this.stoneValue.getIsMax()) + { + this.stone_txt.textColor = 16711680; + } + else + { + this.stone_txt.textColor = 16355072; + } + this.bronzeValue.title = "青铜"; + this.bronzeValue.resName = "青铜储量"; + this.bronzeValue.value = _loc2_.bronzeNum; + this.bronzeValue.maxValue = _loc2_.wareCapacity; + this.bronzeValue.farmValue = _loc7_; + if(this.bronzeTip == null) + { + this.bronzeTip = new ResourceTip(this.bronze_txt,face.stage,face.tip_bg,this.bronzeValue); + } + else + { + this.bronzeTip.setValue(this.bronzeValue); + } + if(this.bronzeValue.getIsMax()) + { + this.bronze_txt.textColor = 16711680; + } + else + { + this.bronze_txt.textColor = 16355072; + } + this.gold_txt.text = "铜币 " + PublicMethod.getCoinStr(_loc2_.moneyNum); + } + + private function setCastlePopData(param1:DevEvent = null) : void + { + var _loc2_:NewPop = NewUserData.getNewPop(); + this.population_txt.htmlText = "人口

" + _loc2_.idlePop + "/" + _loc2_.foodPop + "/" + _loc2_.popCeil + "

"; + this.popData.idlePop = _loc2_.idlePop; + this.popData.foodPop = _loc2_.foodPop; + this.popData.currentPop = _loc2_.currPop; + this.popData.popMax = _loc2_.popCeil; + this.popData.popStr = _loc2_.popTrend; + if(this.popTip == null) + { + this.popTip = new PopTip(this.population_txt,face.stage,face.tip_bg,this.popData); + } + else + { + this.popTip.setValue(this.popData); + } + this.gold2_txt.text = _loc2_.getMoneySpeed() + "/小时"; + } + + private function setCastleData(param1:DevEvent = null) : void + { + var _loc2_:Castle = MemeberShip.getMainCastle(); + var _loc3_:int = _loc2_.rangeValue; + var _loc4_:int = _loc2_.rangeCeil; + var _loc5_:int = _loc2_.rangMax; + var _loc6_:int = _loc2_.rangeLv; + var _loc7_:int = _loc2_.rangeLow; + if(_loc3_ >= _loc5_ && _loc5_ > 0) + { + this.canUp = true; + } + else + { + this.canUp = false; + } + this.casLvBtn.setText(_loc6_ + "级城池"); + this.addBtnEff(); + var _loc8_:int = int(810 * (_loc3_ - _loc7_) / (_loc5_ - _loc7_)); + var _loc9_:int = int(810 * (_loc4_ - _loc7_) / (_loc5_ - _loc7_)); + if(_loc8_ > 810) + { + _loc8_ = 810; + } + if(_loc9_ > 810) + { + _loc9_ = 810; + } + if(_loc8_ <= 0) + { + _loc8_ = 0; + } + this.bg.rangeLow_mc.width = _loc8_; + this.bg.rangeHigh_mc.width = _loc9_; + var _loc10_:Object = new Object(); + _loc10_.rangeValue = _loc3_; + _loc10_.rangeInjured = _loc4_ - _loc3_; + _loc10_.rangeMax = _loc5_; + _loc10_.rangeLv = _loc6_; + _loc10_.rangeTree = _loc2_.rangeTree; + _loc10_.cells = _loc2_.cells; + if(this.rangeTip == null) + { + this.rangeTip = new RangeTip(this.bg.range_btn,face.stage,face.tip_bg,_loc10_); + } + else + { + this.rangeTip.setValue(_loc10_); + } + if(this.lastRange > 0) + { + this.rangeMc.addRange(_loc3_ - this.lastRange); + } + this.lastRange = _loc3_; + } + + private function addBtnEff() : void + { + if(this.canUp) + { + this.casLvBtn.startPlay(); + } + else + { + this.casLvBtn.stopPlay(); + } + } + + private function upCastle(param1:MouseEvent) : void + { + if(this.canUp) + { + this.canUp = false; + this.playCloud(); + } + } + + private function playCloud() : void + { + if(this.cloudMc == null) + { + this.cloudMc = new CloudMc(); + } + this.cloudMc.addCloudMc(); + } + + private function showResourceUI(param1:MouseEvent) : void + { + if(this.resourceShow) + { + this.resourceShow = false; + TweenMax.to(this.resourceBg,0.5,{"y":50}); + } + else + { + this.resourceShow = true; + TweenMax.to(this.resourceBg,0.5,{"y":0}); + } + this.upicon.visible = !this.resourceShow; + this.downicon.visible = this.resourceShow; + } + + override public function setPosition() : void + { + this.x = face.realWidth; + this.y = face.realHeight; + } + + private function rollOut(param1:MouseEvent) : void + { + var _loc2_:Sprite = param1.currentTarget as Sprite; + _loc2_.filters = null; + _loc2_.y = -86; + } + + private function rollOver(param1:MouseEvent) : void + { + var _loc2_:Sprite = param1.currentTarget as Sprite; + _loc2_.filters = [PublicGlow.getInstance().menuFillter]; + _loc2_.y = -84; + } + + private function clickMenu(param1:MouseEvent) : void + { + var _loc2_:Sprite = param1.currentTarget as Sprite; + if(_loc2_ == this.btnArr[0]) + { + this.getUserInfo(); + } + if(_loc2_ == this.btnArr[1]) + { + this.openUserPack(); + } + if(_loc2_ == this.btnArr[2]) + { + this.openGuildUI(); + } + if(_loc2_ == this.btnArr[3]) + { + this.getUserHero(); + } + if(_loc2_ == this.btnArr[4]) + { + this.shoeSoldierView(); + } + if(_loc2_ == this.btnArr[5]) + { + this.openArmySet(); + } + if(_loc2_ == this.btnArr[6]) + { + this.getFarmUI(); + } + } + + public function getUserInfo() : void + { + if(this.userUI == null) + { + this.userUI = new UserInfoUI(); + } + this.userUI.openFirstPage(); + this.userUI.show(); + } + + public function openUserPack() : void + { + this.userPack = UserPackUI.getInstance(); + this.userPack.show(); + } + + public function openGuildUI() : void + { + this.guildUI = GuildMainUI.getInstance(); + this.guildUI.show(); + this.guildUI.init(); + } + + public function getUserHero() : void + { + if(this.myheroUI == null) + { + this.myheroUI = new MyHeroUI(); + } + this.myheroUI.show(); + } + + public function shoeSoldierView() : void + { + var _loc1_:SoldierFirstView = SoldierFirstView.getInstance(); + _loc1_.show(); + } + + public function openArmySet() : void + { + var _loc1_:ArmySetUI = ArmySetUI.getInstance(); + _loc1_.show(); + _loc1_.setPosition(); + } + + private function getFarmUI() : void + { + var _loc1_:FarmView = FarmView.getInstance(); + _loc1_.enterFarmById(); + _loc1_.show(); + } + + private function openShop(param1:MouseEvent) : void + { + ShopUI.getInstance().open(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/menu/MenuBtn.as b/flash_decompiled/com/view/ui/menu/MenuBtn.as new file mode 100644 index 0000000..b1de5b4 --- /dev/null +++ b/flash_decompiled/com/view/ui/menu/MenuBtn.as @@ -0,0 +1,30 @@ +package com.view.ui.menu +{ + import com.view.newui.UIBaseBtn; + import flash.display.Sprite; + + public class MenuBtn extends UIBaseBtn + { + + public function MenuBtn(param1:String) + { + super(); + var _loc2_:Sprite = face.getSprite(param1); + addChild(_loc2_); + buttonMode = true; + } + + override public function getEffUrl() : String + { + return "messeff.swf"; + } + + override public function addEff() : void + { + super.addEff(); + swfLoad.y = 14; + swfLoad.x = 14; + } + } +} + diff --git a/flash_decompiled/com/view/ui/menu/RightTopMenu.as b/flash_decompiled/com/view/ui/menu/RightTopMenu.as new file mode 100644 index 0000000..766ff50 --- /dev/null +++ b/flash_decompiled/com/view/ui/menu/RightTopMenu.as @@ -0,0 +1,350 @@ +package com.view.ui.menu +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.DataModoule; + import com.data.GameData; + import com.events.DevEvent; + import com.greensock.TweenMax; + import com.newdata.user.NewAccount; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.EffectManager; + import com.view.mc.button.ButtonDown; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.tip.TipTitle; + import com.view.ui.BaseUI; + import com.view.ui.activity.ActivityUI; + import com.view.ui.activity.ZoneChooseUI; + import com.view.ui.battleview.mc.CopyResult; + import com.view.ui.countrygov.CountryGovUI; + import com.view.ui.friend.FriendMainUI; + import com.view.ui.help.HelpUI; + import com.view.ui.mail.MailUI; + import com.view.ui.menu.mc.ActivityMenu; + import com.view.ui.mission.MissionUI; + import com.view.ui.ranking.RankingMainUI; + import com.view.ui.user.WelcomeView; + import com.view.ui.warreport.MilitaryView; + import com.view.usertool.MainTool; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.utils.setTimeout; + + public class RightTopMenu extends BaseUI + { + + private var menu:MovieClip; + + private var cashText:TextField; + + private var paypointText:TextField; + + private var btn_up:ButtonDown; + + private var activityMenu:ActivityMenu; + + private var menuShow:Boolean; + + private var type:int = 1; + + private var countryGovUI:CountryGovUI; + + private var missionUI:MissionUI; + + private var helpUI:HelpUI; + + public var viewBuildName:Boolean; + + private var mainTool:MainTool; + + private var isInTown:Boolean; + + public function RightTopMenu() + { + var _loc3_:MenuBtn = null; + var _loc6_:UISmallBtn = null; + var _loc7_:UISmallBtn = null; + super(); + this.menu = face.getMovieClip(ClassConfig.menu_top); + addChild(this.menu); + this.menu.enterBtn.map_txt.mouseEnabled = false; + this.menu.enterBtn.develop_txt.mouseEnabled = false; + this.menu.enterBtn.develop_txt.visible = false; + var _loc1_:Sprite = face.getSprite(ClassConfig.lib_ui_cash); + this.menu.addChild(_loc1_); + _loc1_.x = 28 - 270; + _loc1_.y = 20; + _loc1_.width = 20; + _loc1_.height = 13; + this.cashText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,54); + this.menu.addChild(this.cashText); + this.cashText.x = _loc1_.x + 20; + this.cashText.y = 18; + var _loc2_:Sprite = face.getSprite(ClassConfig.lib_ui_point); + this.menu.addChild(_loc2_); + _loc2_.x = _loc1_.x + 70; + _loc2_.y = _loc1_.y - 2; + _loc2_.width = 20; + _loc2_.height = 15; + this.paypointText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,54); + this.menu.addChild(this.paypointText); + this.paypointText.x = _loc2_.x + 20; + this.paypointText.y = this.cashText.y; + this.paypointText.mouseEnabled = true; + this.cashText.mouseEnabled = true; + this.paypointText.selectable = false; + this.cashText.selectable = false; + new TipTitle(this.paypointText,face.stage,face.tip_bg,{"titletext":"点券"}); + new TipTitle(this.cashText,face.stage,face.tip_bg,{"titletext":"元宝"}); + this.menu.enterBtn.addEventListener(MouseEvent.CLICK,this.toWorldEvent); + this.isInTown = true; + _loc3_ = new MenuBtn("menu_sp1"); + this.menu.addChild(_loc3_); + _loc3_.x = -129; + _loc3_.y = 45; + var _loc4_:MenuBtn = new MenuBtn("menu_sp2"); + this.menu.addChild(_loc4_); + _loc4_.x = -112; + _loc4_.y = 73; + var _loc5_:MenuBtn = new MenuBtn("menu_sp6"); + this.menu.addChild(_loc5_); + _loc5_.x = -44; + _loc5_.y = 73; + _loc6_ = new UISmallBtn("充 值",2); + _loc7_ = new UISmallBtn("礼 包",2); + addChild(_loc6_); + _loc6_.x = -230; + _loc6_.y = 45; + addChild(_loc7_); + _loc7_.x = _loc6_.x + 50; + _loc7_.y = _loc6_.y; + var _loc8_:UISmallBtn = new UISmallBtn("登 录",2); + var _loc9_:UISmallBtn = new UISmallBtn("军 情",2); + addChild(_loc8_); + _loc8_.x = _loc6_.x; + _loc8_.y = _loc6_.y + 24; + addChild(_loc9_); + _loc9_.x = _loc7_.x; + _loc9_.y = _loc8_.y; + var _loc10_:UISmallBtn = new UISmallBtn("gm测试",2); + _loc10_.x = _loc9_.x; + _loc10_.y = _loc9_.y + 24; + _loc10_.onClick = this.Gm; + ToolTipManager.getInstance().setToolTip(this.menu.bang,new TxtTooltip("排行榜"),false,-1,false); + ToolTipManager.getInstance().setToolTip(_loc3_,new TxtTooltip("邮件"),false,-1,false); + ToolTipManager.getInstance().setToolTip(_loc4_,new TxtTooltip("好友"),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.menu.guo,new TxtTooltip("国家"),false,-1,false); + ToolTipManager.getInstance().setToolTip(_loc5_,new TxtTooltip("任务"),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.menu.help,new TxtTooltip("帮助"),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.menu.ji,new TxtTooltip("建筑等级"),false,-1,false); + ToolTipManager.getInstance().setToolTip(_loc6_,new TxtTooltip("充值"),false,-1,false); + ToolTipManager.getInstance().setToolTip(_loc7_,new TxtTooltip("礼包商城"),false,-1,false); + ToolTipManager.getInstance().setToolTip(_loc8_,new TxtTooltip("查看登录信息"),false,-1,false); + ToolTipManager.getInstance().setToolTip(_loc9_,new TxtTooltip("查看军情"),false,-1,false); + this.menu.bang.addEventListener(MouseEvent.MOUSE_UP,this.openRanking); + _loc3_.addEventListener(MouseEvent.MOUSE_UP,this.openMailUI); + _loc4_.addEventListener(MouseEvent.MOUSE_UP,this.openFriendUI); + this.menu.guo.addEventListener(MouseEvent.MOUSE_UP,this.openCountryUI); + _loc5_.addEventListener(MouseEvent.MOUSE_UP,this.openMissionUI); + this.menu.help.addEventListener(MouseEvent.MOUSE_UP,this.openHelpUI); + this.menu.ji.addEventListener(MouseEvent.MOUSE_UP,this.showBuildLevel); + _loc6_.onClick = this.showExchangeUI; + _loc7_.onClick = this.openActivity; + _loc9_.onClick = this.openMilitaryUI; + _loc8_.onClick = this.showWelcome; + EffectManager.getInstance().addBtn(EffectManager.BUTTON_REPORT,_loc3_); + EffectManager.getInstance().addBtn(EffectManager.BUTTON_MILITARY,_loc9_); + EffectManager.getInstance().addBtn(EffectManager.BUTTON_FRIEND,_loc4_); + EffectManager.getInstance().addBtn(EffectManager.BUTTON_MISSION,_loc5_); + this.viewBuildName = true; + this.setPosition(); + this.setUserData(); + this.btn_up = new ButtonDown(); + addChild(this.btn_up); + this.btn_up.x = -290; + this.btn_up.y = 2; + this.btn_up.addEventListener(MouseEvent.CLICK,this.menuManage); + this.activityMenu = new ActivityMenu(); + addChild(this.activityMenu); + this.activityMenu.x = -290; + this.activityMenu.y = 2; + Utils.g_events.addEventListener(DevEvent.USERCHANGE,this.setUserData); + if(DataModoule.getInstance().userMgr.castle.status != 1) + { + setTimeout(this.openWelCome,1000); + } + } + + private function menuManage(param1:MouseEvent) : void + { + if(this.menuShow) + { + this.menuShow = false; + TweenMax.to(this.activityMenu,0.5,{"y":2}); + } + else + { + this.menuShow = true; + TweenMax.to(this.activityMenu,0.5,{"y":-this.activityMenu.height}); + } + } + + private function Gm(param1:MouseEvent) : void + { + var _loc2_:CopyResult = new CopyResult(); + face.addMc(_loc2_); + _loc2_.x = 100; + _loc2_.y = 100; + } + + private function setUserData(param1:DevEvent = null) : void + { + this.cashText.text = NewUserData.getCash(); + this.paypointText.text = NewUserData.getPayPoint(); + } + + override public function setPosition() : void + { + if(this.type == 1) + { + this.x = face.realWidth; + this.y = 0; + } + else + { + this.x = face.realWidth - 170; + this.y = 0; + } + } + + 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(); + } + + private function openCountryUI(param1:MouseEvent) : void + { + if(this.countryGovUI == null) + { + this.countryGovUI = new CountryGovUI(); + } + this.countryGovUI.show(); + } + + public function openMissionUI(param1:MouseEvent) : void + { + this.missionUI = MissionUI.getInstance(); + this.missionUI.setStartPage(0); + this.missionUI.show(); + } + + private function openHelpUI(param1:MouseEvent) : void + { + if(this.helpUI == null) + { + this.helpUI = new HelpUI(); + } + this.helpUI.show(); + } + + private function showBuildLevel(param1:MouseEvent) : void + { + this.viewBuildName = !this.viewBuildName; + face.setBuildNameView(); + } + + public function showExchangeUI(param1:MouseEvent) : void + { + this.mainTool = new MainTool(); + this.mainTool.show(); + } + + private function openActivity(param1:MouseEvent) : void + { + var _loc2_:ActivityUI = ActivityUI.getInstance(); + _loc2_.show(); + } + + public function openMilitaryUI(param1:MouseEvent) : void + { + var _loc2_:MilitaryView = MilitaryView.getInstance(); + _loc2_.show(); + } + + public function showWelcome(param1:MouseEvent) : void + { + WelcomeView.getInstance().show(); + } + + public function openPayHttp() : void + { + ConnectService.getInstance().userService.openPayhttp(); + } + + private function openWelCome() : void + { + var _loc1_:NewAccount = NewUserData.getAccount(); + var _loc2_:int = int(GameData.getConfigMap().CONFIG_CHOOSEZONE); + if(_loc2_ == 1 && _loc1_.hestatus == 0) + { + ZoneChooseUI.getInstance().show(); + } + else + { + WelcomeView.getInstance().show(); + } + } + + private function toWorldEvent(param1:MouseEvent) : void + { + if(this.isInTown) + { + face.toWorld(); + } + else + { + face.toTown(); + } + } + + public function toWorld() : void + { + this.isInTown = false; + this.menu.enterBtn.develop_txt.visible = true; + this.menu.enterBtn.map_txt.visible = false; + this.type = 2; + this.setPosition(); + } + + public function toTown() : void + { + this.isInTown = true; + this.menu.enterBtn.develop_txt.visible = false; + this.menu.enterBtn.map_txt.visible = true; + this.type = 1; + this.setPosition(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/menu/UserFaceMenu.as b/flash_decompiled/com/view/ui/menu/UserFaceMenu.as new file mode 100644 index 0000000..aad0b6d --- /dev/null +++ b/flash_decompiled/com/view/ui/menu/UserFaceMenu.as @@ -0,0 +1,667 @@ +package com.view.ui.menu +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + 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.newui.UIConfig; + import com.view.tip.CastleTip; + import com.view.tip.TipTitle; + import com.view.ui.BaseUI; + import com.view.ui.activity.HolidayAwardMc; + 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; + import flash.text.TextField; + + public class UserFaceMenu extends BaseUI + { + + private var userFaceMc:MovieClip; + + private var userFaceUI:MovieClip; + + private var headSp:Sprite; + + private var levelBg:Sprite; + + private var vipBg:Sprite; + + private var vipBtn:MovieClip; + + private var levelMc:Sprite; + + private var userName:TextField; + + private var guildName:TextField; + + private var expMask:Sprite; + + private var vipUI:VipUI; + + private var honorMc:UserExpMc; + + private var lastHonor:int; + + private var lastCastleLevel:int; + + private var townTip1:TipTitle; + + private var townTip2:TipTitle; + + private var townTip3:TipTitle; + + private var townTip4:TipTitle; + + private var castleList:Array; + + private var btnArr:Array; + + private var currCaltBtn:MovieClip; + + private var casTip:CastleTip; + + private var lastVipLevel:int = -1; + + private var headUrl:String = ""; + + private var imgBitmap:Bitmap; + + private var loadHead:LoadResource; + + public function UserFaceMenu() + { + var _loc1_:Sprite = null; + var _loc2_:Sprite = null; + var _loc3_:HolidayAwardMc = null; + this.btnArr = new Array(); + super(); + this.userFaceMc = face.getMovieClip(ClassConfig.menu_user); + addChild(this.userFaceMc); + this.headSp = new Sprite(); + this.userFaceMc.addChild(this.headSp); + this.headSp.x = 10; + this.headSp.y = 10; + this.headSp.addEventListener(MouseEvent.CLICK,this.openUserUI); + this.headSp.buttonMode = true; + this.userName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.userFaceMc.addChild(this.userName); + this.userName.x = 130; + this.userName.y = 19; + this.guildName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.userFaceMc.addChild(this.guildName); + this.guildName.x = this.userName.x; + this.guildName.y = this.userName.y + 21; + _loc1_ = face.getSprite(ClassConfig.menu_mask); + this.userFaceMc.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.headSp.mask = _loc1_; + this.levelBg = face.getSprite(ClassConfig.menu_btnbg); + this.userFaceMc.addChild(this.levelBg); + this.levelBg.x = 27; + this.levelBg.y = 75; + _loc2_ = face.getSprite(ClassConfig.menu_sp7); + this.userFaceMc.addChild(_loc2_); + _loc2_.x = 67; + _loc2_.y = 8; + this.expMask = face.getSprite(ClassConfig.menu_sp7); + _loc2_.addChild(this.expMask); + _loc2_.mask = this.expMask; + this.expMask.x = -50; + this.userFaceUI = face.getMovieClip(ClassConfig.ui_head); + 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); + this.userFaceMc.addChild(this.userFaceUI); + this.userFaceUI.zhu0_mc.buttonMode = true; + this.userFaceUI.zhu0_mc.addEventListener(MouseEvent.CLICK,this.toMainCity); + this.userFaceUI.zhu0_mc.filters = [PublicGlow.getInstance().qingGlow]; + 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.honorMc = new UserExpMc(); + this.userFaceUI.addChild(this.honorMc); + this.honorMc.x = 180; + this.honorMc.y = 90; + this.vipBg = face.getSprite(ClassConfig.menu_btnbg); + this.userFaceMc.addChild(this.vipBg); + this.vipBg.x = 27; + this.vipBg.y = -5; + this.vipBtn = face.getMovieClip(ClassConfig.lib_ui_vip); + this.vipBtn.gotoAndStop(1); + this.vipBg.addChild(this.vipBtn); + this.vipBtn.x = -7; + this.vipBtn.y = 0; + this.vipBtn.buttonMode = true; + this.vipBg.buttonMode = true; + new TipTitle(this.vipBtn,face.stage,face.tip_bg,{"titletext":"查看vip等级"}); + this.vipBg.addEventListener(MouseEvent.CLICK,this.openVip,false,0,true); + _loc3_ = new HolidayAwardMc(); + addChild(_loc3_); + _loc3_.y = 240; + _loc3_.x = -10; + _loc3_.addEventListener(MouseEvent.ROLL_OVER,this.rollOver); + _loc3_.addEventListener(MouseEvent.ROLL_OUT,this.rollOut); + this.setPosition(); + this.setUserData(); + this.addEvent(); + this.getCastleList(); + this.setCastleData(); + var _loc4_:BuffManager = BuffManager.getInstance(); + _loc4_.refresh(); + addChild(_loc4_); + _loc4_.x = 290; + _loc4_.y = 10; + } + + private function rollOver(param1:MouseEvent) : void + { + var _loc2_:Sprite = param1.currentTarget as Sprite; + _loc2_.filters = [PublicGlow.getInstance().yellowGlow1]; + } + + private function rollOut(param1:MouseEvent) : void + { + var _loc2_:Sprite = param1.currentTarget as Sprite; + _loc2_.filters = null; + } + + private function openVip(param1:MouseEvent) : void + { + if(this.vipUI == null) + { + this.vipUI = new VipUI(); + } + this.vipUI.show(); + } + + 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 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 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 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 = 10; + this.y = 10; + } + + 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.userName.text = _loc2_.userName; + var _loc3_:NewGuild = NewUserData.getNewGuild(); + if(_loc3_) + { + this.guildName.text = _loc3_.name; + } + else + { + this.guildName.text = "无"; + } + var _loc4_:int = 148 * _loc2_.honor / _loc2_.nextLvHonor; + if(_loc4_ > 148) + { + _loc4_ = 148; + } + this.expMask.x = _loc4_ - 148; + this.userFaceUI.flg_mc.gotoAndStop(_loc2_.countryId); + if(Boolean(this.levelMc) && this.levelBg.contains(this.levelMc)) + { + this.levelBg.removeChild(this.levelMc); + } + var _loc5_:int = _loc2_.rankId; + this.levelMc = this.getPngNums(_loc5_); + this.levelBg.addChild(this.levelMc); + this.levelMc.x = 15; + this.levelMc.y = 5; + this.levelMc.mouseEnabled = false; + var _loc6_:Object = new Object(); + _loc6_.line1 = "君主等级:" + _loc2_.rankId; + _loc6_.line2 = "君主经验:" + _loc2_.honor + "/" + _loc2_.nextLvHonor; + _loc6_.line3 = "升级建筑、日常任务和攻击野外营寨可获得君主经验;拆除建筑或处理城内随即出现的运势差的事件,可能使君主经验降低,甚至为负值,但您不会因此降级。"; + if(this.casTip == null) + { + this.casTip = new CastleTip(this.levelBg,face.stage,face.tip_bg,_loc6_); + } + else + { + this.casTip.setValue(_loc6_); + } + if(_loc2_.viplevel != this.lastVipLevel) + { + this.lastVipLevel = _loc2_.viplevel; + this.vipBtn.gotoAndStop(this.lastVipLevel + 1); + } + } + + private function loadUserHead(param1:String) : void + { + if(this.headUrl == param1) + { + return; + } + if(Boolean(this.imgBitmap) && this.headSp.contains(this.imgBitmap)) + { + this.headSp.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.headSp.addChild(this.imgBitmap); + this.imgBitmap.width = 80; + this.imgBitmap.height = 80; + this.loadHead.clear(); + } + + 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 _loc11_:String = null; + var _loc12_:Bitmap = null; + var _loc2_:Sprite = new Sprite(); + if(param1 > 9999) + { + _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,4); + _loc10_ = new Bitmap(face.getPng("lib_level_" + _loc9_)); + _loc11_ = param1.toString().substring(4,5); + _loc12_ = new Bitmap(face.getPng("lib_level_" + _loc11_)); + _loc2_.addChild(_loc4_); + _loc4_.x = -15; + _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; + _loc2_.addChild(_loc12_); + _loc12_.x = _loc10_.x + _loc10_.width; + } + else 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 openUserUI(param1:MouseEvent) : void + { + Control.getInstance().centerMenu.getUserInfo(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/menu/mc/ActivityMc.as b/flash_decompiled/com/view/ui/menu/mc/ActivityMc.as new file mode 100644 index 0000000..b3e8eb5 --- /dev/null +++ b/flash_decompiled/com/view/ui/menu/mc/ActivityMc.as @@ -0,0 +1,110 @@ +package com.view.ui.menu.mc +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.view.newui.UISwfEff; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class ActivityMc extends Sprite + { + + private var picload:LoadResource; + + private var pic:Bitmap; + + private var picSp:Sprite; + + public var swfLoad:UISwfEff; + + public function ActivityMc(param1:int) + { + var _loc2_:String = null; + super(); + switch(param1) + { + case 1: + _loc2_ = "level_gift_dj.png"; + break; + case 2: + _loc2_ = "activity_huiwu.png"; + break; + case 3: + _loc2_ = "zhanqi.png"; + break; + case 4: + _loc2_ = "pay_activity.png"; + break; + case 5: + _loc2_ = "yabiao.png"; + break; + case 6: + _loc2_ = "firstRechargeIcon.png"; + break; + case 7: + _loc2_ = "BOSS.png"; + break; + case 8: + _loc2_ = "homeIcon.png"; + break; + case 9: + _loc2_ = "mine.png"; + break; + case 10: + _loc2_ = "mysticalBox.png"; + break; + case 11: + _loc2_ = "singlestage.png"; + break; + case 12: + _loc2_ = "crossRank.png"; + break; + case 13: + _loc2_ = "warshop.png"; + break; + case 14: + _loc2_ = "worldwar.png"; + } + this.picload = new LoadResource(ServerConfig.IMG_ACTIVITY_URL + _loc2_,this.loadPicBack); + this.picSp = new Sprite(); + addChild(this.picSp); + this.buttonMode = true; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function loadPicBack(param1:Event) : void + { + this.pic = Bitmap(param1.target.loader.content); + this.picload.clear(); + this.picSp.addChild(this.pic); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.picSp.filters = null; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.picSp.filters = [PublicGlow.getInstance().yellowGlow1]; + } + + public function getEffUrl() : String + { + return "icon_open.swf"; + } + + public function loadMc() : void + { + this.swfLoad = new UISwfEff(this.getEffUrl()); + addChild(this.swfLoad); + this.swfLoad.y = 25; + this.swfLoad.x = 25; + } + } +} + diff --git a/flash_decompiled/com/view/ui/menu/mc/ActivityMenu.as b/flash_decompiled/com/view/ui/menu/mc/ActivityMenu.as new file mode 100644 index 0000000..57d6956 --- /dev/null +++ b/flash_decompiled/com/view/ui/menu/mc/ActivityMenu.as @@ -0,0 +1,249 @@ +package com.view.ui.menu.mc +{ + import com.data.GameData; + import com.view.Control; + import com.view.ui.activity.UserBoxUI; + import com.view.ui.activity.dailypay.DailyPay; + import com.view.ui.activity.gift.LevelAwardUI; + import com.view.ui.activity.warshop.WarShopUI; + import com.view.ui.activity.yabiao.YabiaoUI; + import com.view.ui.boss.BossUI; + import com.view.ui.crossrank.CrossRank; + import com.view.ui.home.HomeMainUI; + import com.view.ui.match.MatchUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.mine.MineUI; + import com.view.ui.tianxia.TianxiaUI; + import com.view.ui.tower.TowerMainUI; + import com.view.ui.zhanqi.ZhanqiUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class ActivityMenu extends Sprite + { + + private var levelAwardUI:LevelAwardUI; + + private var tianxiaUI:TianxiaUI; + + private var zhanqiUI:ZhanqiUI; + + private var yabiaoUI:YabiaoUI; + + private var dailyPay:DailyPay; + + private var bossUI:BossUI; + + private var homeUI:HomeMainUI; + + private var mineUI:MineUI; + + private var userBoxUI:UserBoxUI; + + private var crossRank:CrossRank; + + private var matchUI:MatchUI; + + public function ActivityMenu() + { + var _loc6_:ActivityMc = null; + var _loc7_:ActivityMc = null; + var _loc8_:ActivityMc = null; + var _loc13_:ActivityMc = null; + super(); + var _loc1_:ActivityMc = new ActivityMc(4); + addChild(_loc1_); + _loc1_.x = -80; + _loc1_.y = 5; + var _loc2_:ActivityMc = new ActivityMc(1); + addChild(_loc2_); + _loc2_.x = _loc1_.x - 60; + _loc2_.y = 5; + var _loc3_:ActivityMc = new ActivityMc(2); + addChild(_loc3_); + _loc3_.x = _loc2_.x - 60; + _loc3_.y = _loc2_.y; + var _loc4_:ActivityMc = new ActivityMc(3); + addChild(_loc4_); + _loc4_.x = _loc3_.x - 60; + _loc4_.y = _loc2_.y; + var _loc5_:ActivityMc = new ActivityMc(5); + addChild(_loc5_); + _loc5_.x = _loc4_.x - 60; + _loc5_.y = _loc2_.y; + _loc6_ = new ActivityMc(11); + addChild(_loc6_); + _loc6_.x = _loc5_.x - 60; + _loc6_.y = _loc2_.y; + _loc7_ = new ActivityMc(6); + addChild(_loc7_); + _loc7_.x = _loc1_.x; + _loc7_.y = 65; + _loc8_ = new ActivityMc(7); + addChild(_loc8_); + _loc8_.x = _loc7_.x - 60; + _loc8_.y = _loc7_.y + 2; + var _loc9_:ActivityMc = new ActivityMc(8); + addChild(_loc9_); + _loc9_.x = _loc8_.x - 60; + --_loc7_.y; + var _loc10_:ActivityMc = new ActivityMc(9); + addChild(_loc10_); + _loc10_.x = _loc9_.x - 60; + _loc10_.y = _loc7_.y + 1; + var _loc11_:ActivityMc = new ActivityMc(10); + addChild(_loc11_); + _loc11_.x = _loc10_.x - 60; + --_loc7_.y; + var _loc12_:ActivityMc = new ActivityMc(12); + addChild(_loc12_); + _loc12_.x = _loc11_.x - 60; + --_loc7_.y; + _loc13_ = new ActivityMc(13); + addChild(_loc13_); + _loc13_.x = _loc6_.x - 60; + _loc13_.y = _loc6_.y; + var _loc14_:ActivityMc = new ActivityMc(14); + addChild(_loc14_); + _loc14_.x = _loc13_.x; + _loc14_.y = _loc12_.y; + ToolTipManager.getInstance().setToolTip(_loc2_,new TxtTooltip("君主等级达到级别即可领取超值礼包"),false,-1,false); + _loc2_.addEventListener(MouseEvent.CLICK,this.openLevelAward); + _loc3_.addEventListener(MouseEvent.CLICK,this.openTianxiaUI); + _loc4_.addEventListener(MouseEvent.CLICK,this.openZhanqiUI); + _loc1_.addEventListener(MouseEvent.CLICK,this.openPay); + _loc5_.addEventListener(MouseEvent.CLICK,this.openYabiao); + _loc7_.addEventListener(MouseEvent.CLICK,this.openDailyPay); + _loc8_.addEventListener(MouseEvent.CLICK,this.openBossUI); + _loc9_.addEventListener(MouseEvent.CLICK,this.openHomeUI); + _loc10_.addEventListener(MouseEvent.CLICK,this.openMineUI); + _loc11_.addEventListener(MouseEvent.CLICK,this.openUserBoxUI); + _loc6_.addEventListener(MouseEvent.CLICK,this.openSingleBabelUI); + _loc12_.addEventListener(MouseEvent.CLICK,this.openCrossRank); + _loc13_.addEventListener(MouseEvent.CLICK,this.openWarShopUI); + _loc14_.addEventListener(MouseEvent.CLICK,this.openMatchUI); + } + + private function openPay(param1:MouseEvent) : void + { + Control.getInstance().rightTopMenu.openPayHttp(); + } + + private function openLevelAward(param1:MouseEvent) : void + { + if(this.levelAwardUI == null) + { + this.levelAwardUI = new LevelAwardUI(); + } + this.levelAwardUI.show(); + } + + private function openTianxiaUI(param1:MouseEvent) : void + { + if(this.tianxiaUI == null) + { + this.tianxiaUI = new TianxiaUI(); + } + this.tianxiaUI.show(); + } + + private function openZhanqiUI(param1:MouseEvent) : void + { + if(this.zhanqiUI == null) + { + this.zhanqiUI = new ZhanqiUI(); + } + this.zhanqiUI.show(); + } + + private function openYabiao(param1:MouseEvent) : void + { + if(this.yabiaoUI == null) + { + this.yabiaoUI = new YabiaoUI(); + } + this.yabiaoUI.show(); + } + + private function openDailyPay(param1:MouseEvent) : void + { + if(this.dailyPay == null) + { + this.dailyPay = new DailyPay(); + } + this.dailyPay.show(); + } + + private function openBossUI(param1:MouseEvent) : void + { + if(this.bossUI == null) + { + this.bossUI = new BossUI(); + } + this.bossUI.show(); + } + + private function openHomeUI(param1:MouseEvent) : void + { + HomeMainUI.getInstance().show(); + } + + private function openMineUI(param1:MouseEvent) : void + { + if(this.mineUI == null) + { + this.mineUI = new MineUI(); + } + this.mineUI.show(); + } + + private function openUserBoxUI(param1:MouseEvent) : void + { + if(this.userBoxUI == null) + { + this.userBoxUI = new UserBoxUI(); + } + this.userBoxUI.show(); + } + + private function openSingleBabelUI(param1:MouseEvent) : void + { + var _loc2_:TowerMainUI = TowerMainUI.getInstance(); + _loc2_.show(); + _loc2_.getData(); + } + + private function openCrossRank(param1:MouseEvent) : void + { + if(this.crossRank == null) + { + this.crossRank = new CrossRank(); + } + this.crossRank.show(); + } + + private function openMatchUI(param1:MouseEvent) : void + { + if(this.matchUI == null) + { + this.matchUI = new MatchUI(); + } + this.matchUI.show(); + } + + private function openWarShopUI(param1:MouseEvent) : void + { + var _loc2_:int = int(GameData.getConfigMap().COINSHOP_STATUS); + if(_loc2_ == 0) + { + MessageBoxUI.getInstance().addMessage("该功能暂未开放"); + return; + } + var _loc3_:WarShopUI = WarShopUI.getInstance(); + _loc3_.show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/menu/mc/MenuLeftBtn.as b/flash_decompiled/com/view/ui/menu/mc/MenuLeftBtn.as new file mode 100644 index 0000000..70baa01 --- /dev/null +++ b/flash_decompiled/com/view/ui/menu/mc/MenuLeftBtn.as @@ -0,0 +1,26 @@ +package com.view.ui.menu.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import flash.display.Bitmap; + import flash.display.SimpleButton; + import flash.display.Sprite; + + public class MenuLeftBtn extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public function MenuLeftBtn() + { + super(); + var _loc1_:SimpleButton = this.face.getButton(ClassConfig.menu_hipeBtn); + addChild(_loc1_); + var _loc2_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.shrink_right)); + addChild(_loc2_); + _loc2_.x = 8; + _loc2_.y = 5; + } + } +} + diff --git a/flash_decompiled/com/view/ui/menu/mc/MenuRightBtn.as b/flash_decompiled/com/view/ui/menu/mc/MenuRightBtn.as new file mode 100644 index 0000000..281ac96 --- /dev/null +++ b/flash_decompiled/com/view/ui/menu/mc/MenuRightBtn.as @@ -0,0 +1,36 @@ +package com.view.ui.menu.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import flash.display.Bitmap; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.text.TextField; + + public class MenuRightBtn extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public function MenuRightBtn() + { + super(); + var _loc1_:SimpleButton = this.face.getButton(ClassConfig.menu_leftBtn); + addChild(_loc1_); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(16773120,16); + _loc2_.wordWrap = true; + _loc2_.multiline = true; + _loc2_.height = 55; + _loc2_.text = "城池动态"; + addChild(_loc2_); + _loc2_.y = 20; + _loc2_.x = 3; + var _loc3_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.shrink_left)); + addChild(_loc3_); + _loc3_.x = 8; + _loc3_.y = 8; + } + } +} + diff --git a/flash_decompiled/com/view/ui/message/MessageBoxUI.as b/flash_decompiled/com/view/ui/message/MessageBoxUI.as new file mode 100644 index 0000000..7239c4d --- /dev/null +++ b/flash_decompiled/com/view/ui/message/MessageBoxUI.as @@ -0,0 +1,249 @@ +package com.view.ui.message +{ + import com.comfig.CommonData; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.events.DevEvent; + import com.greensock.TweenMax; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.external.ExternalInterface; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MessageBoxUI extends BaseUI + { + + private static var instance:MessageBoxUI; + + private var messBg:Sprite; + + private var messUi:UIWindowBg; + + private var msgText:TextField; + + private var ok_btn:UIButton; + + private var bg1:UIWindowBg; + + private var titleloadPng:LoadResource; + + private var keyEvent:Boolean = false; + + private var confirm:Sprite; + + private var confirmMc:MovieClip; + + private var backFunction:Function; + + private var object:Object; + + private var cancelBtn:UIButton; + + public function MessageBoxUI() + { + super(); + this.init(); + } + + public static function getInstance() : MessageBoxUI + { + if(instance == null) + { + return instance = new MessageBoxUI(); + } + return instance; + } + + private function init() : void + { + this.messBg = new Sprite(); + this.messUi = new UIWindowBg(); + this.messUi.initSize(96,98); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(288,116); + this.messUi.addChild(this.bg1); + this.bg1.x = 10; + this.bg1.y = 40; + this.loadTitlePng(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(278,70); + this.bg1.addChild(_loc1_); + _loc1_.x = 5; + _loc1_.y = 5; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.leading = 4; + this.msgText = PublicMethod.getTextFieldWithFillter(16776960,270); + this.msgText.height = 65; + this.msgText.multiline = true; + this.msgText.wordWrap = true; + this.msgText.defaultTextFormat = _loc2_; + _loc1_.addChild(this.msgText); + this.msgText.x = 6; + this.msgText.y = 6; + this.ok_btn = new UIButton("确 定",2); + this.bg1.addChild(this.ok_btn); + this.ok_btn.x = 115; + this.ok_btn.y = 91; + var _loc3_:Sprite = PublicMethod.createShape(0,CommonData.MAX_WIDTH,CommonData.MAX_HEIGHT); + _loc3_.alpha = 0; + this.messBg.addChild(_loc3_); + this.messBg.addChild(this.messUi); + this.messUi.x = int(this.messBg.width / 2 - this.messUi.width / 2); + this.messUi.y = int(this.messBg.height / 2 - this.messUi.height / 2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickOther); + face.stage.addEventListener(KeyboardEvent.KEY_UP,this.keyLogin); + } + + private function keyLogin(param1:KeyboardEvent) : void + { + if(param1.keyCode == 13 && this.keyEvent) + { + this.closeBox(null); + } + } + + private function clickOther(param1:MouseEvent) : void + { + this.messUi.alpha = 0.6; + TweenMax.to(this.messUi,0.5,{"alpha":1}); + } + + public function loadTitlePng() : void + { + var _loc1_:String = "pic/title/tishi.png"; + this.titleloadPng = new LoadResource(_loc1_,this.loadTitlePngBack); + } + + private function loadTitlePngBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.titleloadPng.clear(); + this.messUi.addChild(_loc2_); + _loc2_.x = int(this.messUi.width / 2 - _loc2_.width / 2); + _loc2_.y = 4; + } + + public function addMessage(param1:String) : void + { + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.AlERT)); + if(param1 == null) + { + param1 = "系统错误"; + } + this.ok_btn.onClick = this.closeBox; + this.ok_btn.x = 115; + this.ok_btn.y = 91; + if(this.cancelBtn) + { + this.cancelBtn.visible = false; + } + this.msgText.htmlText = param1; + face.stage.addChild(this.messBg); + this.messBg.x = int(face.realWidth / 2 - this.messBg.width / 2); + this.messBg.y = int(face.realHeight / 2 - this.messBg.height / 2); + this.keyEvent = true; + face.stage.focus = this.messBg; + } + + private function closeBox(param1:MouseEvent) : void + { + this.keyEvent = false; + this.ok_btn.onClick = null; + face.stage.removeChild(this.messBg); + } + + public function reLogin(param1:String = "") : void + { + if(param1 == "") + { + this.msgText.htmlText = "登陆已失效,请重新登陆"; + } + else + { + this.msgText.htmlText = param1; + } + face.stage.addChild(this.messBg); + this.messBg.x = int(face.realWidth / 2 - this.messBg.width / 2); + this.messBg.y = int(face.realHeight / 2 - this.messBg.height / 2); + this.ok_btn.onClick = this.reFresh; + this.ok_btn.x = 115; + this.ok_btn.y = 91; + if(this.cancelBtn) + { + this.cancelBtn.visible = false; + } + } + + private function reFresh(param1:MouseEvent) : void + { + ExternalInterface.call("relogin"); + } + + public function confirmMsg(param1:String, param2:Function, param3:Object = null) : void + { + this.backFunction = param2; + this.object = param3; + this.ok_btn.onClick = this.closeBox; + this.ok_btn.x = 80; + this.ok_btn.y = 91; + if(this.cancelBtn == null) + { + this.cancelBtn = new UIButton("取 消",2); + this.cancelBtn.onClick = this.closeBox; + } + this.cancelBtn.visible = true; + this.bg1.addChild(this.cancelBtn); + this.cancelBtn.x = 155; + this.cancelBtn.y = 91; + this.ok_btn.onClick = this.confirmSubmit; + this.msgText.htmlText = param1; + face.stage.addChild(this.messBg); + this.messBg.x = int(face.realWidth / 2 - this.messBg.width / 2); + this.messBg.y = int(face.realHeight / 2 - this.messBg.height / 2); + } + + private function createConfirm() : void + { + } + + private function confirmSubmit(param1:MouseEvent) : void + { + this.closeBox(param1); + if(this.backFunction != null) + { + if(this.object != null) + { + this.backFunction(this.object); + } + else + { + this.backFunction(); + } + } + } + + override public function setPosition() : void + { + if(Boolean(this.messBg) && face.stage.contains(this.messBg)) + { + this.messBg.x = int(face.realWidth / 2 - this.messBg.width / 2); + this.messBg.y = int(face.realHeight / 2 - this.messBg.height / 2); + } + if(Boolean(this.confirm) && face.stage.contains(this.confirm)) + { + this.confirm.x = int(face.realWidth / 2 - this.confirm.width / 2); + this.confirm.y = int(face.realHeight / 2 - this.confirm.height / 2); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/message/RebuildCastle.as b/flash_decompiled/com/view/ui/message/RebuildCastle.as new file mode 100644 index 0000000..205db92 --- /dev/null +++ b/flash_decompiled/com/view/ui/message/RebuildCastle.as @@ -0,0 +1,164 @@ +package com.view.ui.message +{ + import com.comfig.CommonData; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.control.data.ReturnBean; + import com.greensock.TweenMax; + import com.view.newui.UIButton; + 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; + import flash.external.ExternalInterface; + import flash.text.TextField; + import flash.text.TextFormat; + + public class RebuildCastle extends BaseUI + { + + private static var instance:RebuildCastle; + + private var messBg:Sprite; + + private var messUi:UIWindowBg; + + private var bg1:UIWindowBg; + + private var msgText:TextField; + + private var reBtn:UIButton; + + private var rebuildUI:RebuildUI; + + private var titleloadPng:LoadResource; + + public function RebuildCastle() + { + super(); + this.initBg(); + } + + public static function getInstance() : RebuildCastle + { + if(instance == null) + { + return instance = new RebuildCastle(); + } + return instance; + } + + private function initBg() : void + { + this.messBg = new Sprite(); + this.messUi = new UIWindowBg(); + this.messUi.initSize(96,98); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(288,116); + this.messUi.addChild(this.bg1); + this.bg1.x = 10; + this.bg1.y = 40; + this.loadTitlePng(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(278,70); + this.bg1.addChild(_loc1_); + _loc1_.x = 5; + _loc1_.y = 5; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.leading = 4; + this.msgText = PublicMethod.getTextFieldWithFillter(16776960,270); + this.msgText.height = 65; + this.msgText.multiline = true; + this.msgText.wordWrap = true; + this.msgText.defaultTextFormat = _loc2_; + _loc1_.addChild(this.msgText); + this.msgText.x = 6; + this.msgText.y = 6; + this.reBtn = new UIButton("重 建",2,10); + this.reBtn.x = 115; + this.reBtn.y = 91; + if(CommonData.canRebuild) + { + this.bg1.addChild(this.reBtn); + this.reBtn.onClick = this.rebuildcastle; + } + var _loc3_:Sprite = PublicMethod.createShape(0,CommonData.MAX_WIDTH,CommonData.MAX_HEIGHT); + _loc3_.alpha = 0; + this.messBg.addChild(_loc3_); + this.messBg.addChild(this.messUi); + this.messUi.x = int(this.messBg.width / 2 - this.messUi.width / 2); + this.messUi.y = int(this.messBg.height / 2 - this.messUi.height / 2); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickOther); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_reBuildCastle,this.reBuildCastleResult); + } + + private function clickOther(param1:MouseEvent) : void + { + this.messUi.alpha = 0.6; + TweenMax.to(this.messUi,0.5,{"alpha":1}); + } + + public function addMessage(param1:String) : void + { + this.msgText.htmlText = param1; + face.stage.addChild(this.messBg); + this.messBg.x = int(face.realWidth / 2 - this.messBg.width / 2); + this.messBg.y = int(face.realHeight / 2 - this.messBg.height / 2); + } + + override public function setPosition() : void + { + if(Boolean(this.messBg) && face.stage.contains(this.messBg)) + { + this.messBg.x = int(face.realWidth / 2 - this.messBg.width / 2); + this.messBg.y = int(face.realHeight / 2 - this.messBg.height / 2); + } + } + + private function rebuildcastle(param1:MouseEvent) : void + { + if(this.rebuildUI == null) + { + this.rebuildUI = new RebuildUI(); + } + this.messBg.addChild(this.rebuildUI); + this.rebuildUI.x = int(this.messBg.width / 2 - this.rebuildUI.width / 2); + this.rebuildUI.y = int(this.messBg.height / 2 - this.rebuildUI.height / 2); + } + + private function reBuildCastleResult(param1:CastleEvent) : void + { + if(param1.result == ReturnBean.STATUS_0) + { + this.msgText.htmlText = "恭喜您,城池重建成功了
请重新登录游戏"; + this.reBtn.setText("确 定"); + this.reBtn.onClick = this.relogin; + } + } + + private function relogin(param1:MouseEvent) : void + { + ExternalInterface.call("relogin"); + } + + public function loadTitlePng() : void + { + var _loc1_:String = "pic/title/tishi.png"; + this.titleloadPng = new LoadResource(_loc1_,this.loadTitlePngBack); + } + + private function loadTitlePngBack(param1:Event) : void + { + var _loc2_:Bitmap = Bitmap(param1.target.loader.content); + this.titleloadPng.clear(); + this.messUi.addChild(_loc2_); + _loc2_.x = int(this.messUi.width / 2 - _loc2_.width / 2); + _loc2_.y = 4; + } + } +} + diff --git a/flash_decompiled/com/view/ui/message/RebuildUI.as b/flash_decompiled/com/view/ui/message/RebuildUI.as new file mode 100644 index 0000000..6592da7 --- /dev/null +++ b/flash_decompiled/com/view/ui/message/RebuildUI.as @@ -0,0 +1,126 @@ +package com.view.ui.message +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.control.data.ReturnBean; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class RebuildUI extends UIWindowBg + { + + private var bg:Sprite; + + private var posX:UIInputText; + + private var posY:UIInputText; + + private var okBtn:UIButton; + + private var buyMedicalBtn:UIButton; + + private var moveMmc:MovieClip; + + public function RebuildUI() + { + var _loc5_:TextField = null; + super(); + initSize(90,125); + loadTitle(UITitleConfig.title_chengchichongjian); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(260,90); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 10; + _loc2_.text = "您当前的城池处于流亡状态。"; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc1_.addChild(_loc3_); + _loc3_.x = 10; + _loc3_.y = 35; + _loc3_.text = "重建坐标:"; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,20); + _loc4_.text = "X:"; + _loc1_.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 60; + this.posX = new UIInputText(50); + _loc1_.addChild(this.posX); + this.posX.x = _loc4_.x + 20; + this.posX.y = _loc4_.y; + this.posX.numOnly(); + this.posX.setMaxChars(4); + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,20); + _loc5_.text = "Y:"; + _loc1_.addChild(_loc5_); + _loc5_.x = 100; + _loc5_.y = 60; + this.posY = new UIInputText(50); + _loc1_.addChild(this.posY); + this.posY.x = _loc5_.x + 20; + this.posY.y = _loc4_.y; + this.posY.numOnly(); + this.posY.setMaxChars(4); + this.buyMedicalBtn = new UIButton("推荐坐标",2,10); + _loc1_.addChild(this.buyMedicalBtn); + this.buyMedicalBtn.x = 190; + this.buyMedicalBtn.y = _loc4_.y; + this.buyMedicalBtn.onClick = this.getRadomPos; + this.okBtn = new UIButton("重 建",2,10); + bg1.addChild(this.okBtn); + this.okBtn.x = 110; + this.okBtn.y = 120; + this.okBtn.onClick = this.submit; + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_getSuggestPos,this.getSuggestPosResult); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_reBuildCastle,this.reBuildCastleResult); + } + + private function submit(param1:MouseEvent) : void + { + if(this.posX.getText() == "" || this.posY.getText() == "") + { + MessageBoxUI.getInstance().addMessage("请输入重建坐标"); + return; + } + ConnectService.getInstance().castleService.reBuildCastle(int(this.posX.getText()),int(this.posX.getText())); + } + + private function getRadomPos(param1:MouseEvent) : void + { + ConnectService.getInstance().castleService.getSuggestPos(); + } + + private function getSuggestPosResult(param1:CastleEvent) : void + { + var _loc2_:String = param1.msg; + this.posX.setText(_loc2_.split(",")[0]); + this.posY.setText(_loc2_.split(",")[1]); + } + + private function reBuildCastleResult(param1:CastleEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + } + else + { + closeSelf(null); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/Fort.as b/flash_decompiled/com/view/ui/military/Fort.as new file mode 100644 index 0000000..092ba1b --- /dev/null +++ b/flash_decompiled/com/view/ui/military/Fort.as @@ -0,0 +1,60 @@ +package com.view.ui.military +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class Fort extends BaseBuild + { + + public function Fort(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/Fort1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/Fort3.swf"; + buildData.picUrl = "pic/build/Fort3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/Fort2.swf"; + buildData.picUrl = "pic/build/Fort2.png"; + } + else + { + buildData.swfUrl = "pic/build/Fort1.swf"; + buildData.picUrl = "pic/build/Fort1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new FortUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/FortUI.as b/flash_decompiled/com/view/ui/military/FortUI.as new file mode 100644 index 0000000..6f399d5 --- /dev/null +++ b/flash_decompiled/com/view/ui/military/FortUI.as @@ -0,0 +1,67 @@ +package com.view.ui.military +{ + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.wall.WallPage3; + import flash.events.Event; + + public class FortUI extends BaseUI + { + + private var fortPage:WallPage3; + + public function FortUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_shaota); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + this.fortPage = new WallPage3(); + this.fortPage.x = 4; + this.fortPage.y = 4; + _loc1_.addChild(this.fortPage); + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/MilitaryMain.as b/flash_decompiled/com/view/ui/military/MilitaryMain.as new file mode 100644 index 0000000..a8fa683 --- /dev/null +++ b/flash_decompiled/com/view/ui/military/MilitaryMain.as @@ -0,0 +1,76 @@ +package com.view.ui.military +{ + import com.comfig.ClassConfig; + import com.view.UIListManage; + import com.view.tip.BuildTipTitle; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.events.MouseEvent; + + public class MilitaryMain extends BaseBuild + { + + public function MilitaryMain(param1:BuildData) + { + super(); + super.buildData = param1; + markMc = face.getSprite(ClassConfig.ui_military_bg); + addChild(markMc); + markMc.alpha = 0; + markMc.x = -36; + markMc.y = -94; + } + + override public function setBuildRes() : void + { + if(castleBuild.level >= 0) + { + buildData.swfUrl = "pic/build/ChiYou1.swf"; + buildData.picUrl = "pic/build/ChiYou1.png"; + } + super.loadSwfBg(); + this.addEvent(); + } + + override public function setSwfBgUnClick() : void + { + bgSwf.mouseEnabled = false; + } + + override public function addEvent() : void + { + markMc.addEventListener(MouseEvent.ROLL_OVER,mouseOverBuild); + markMc.addEventListener(MouseEvent.ROLL_OUT,mouseOutBuild); + markMc.addEventListener(MouseEvent.CLICK,mouseClick); + } + + override public function setTipInfo(param1:Object) : void + { + if(tipTitle == null) + { + tipTitle = new BuildTipTitle(markMc,face.stage,face.tip_bg,param1); + } + else + { + tipTitle.infoObject = param1; + } + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new MilitaryMainUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + + override public function setNameMcPosi() : void + { + _nameMc.x = 50 + 76; + _nameMc.y = -10; + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/MilitaryMainUI.as b/flash_decompiled/com/view/ui/military/MilitaryMainUI.as new file mode 100644 index 0000000..6206668 --- /dev/null +++ b/flash_decompiled/com/view/ui/military/MilitaryMainUI.as @@ -0,0 +1,219 @@ +package com.view.ui.military +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.view.mc.button.Button_9; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.shop.ShopUI; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MilitaryMainUI extends BaseUI + { + + private var reBuildBtn:UIButton; + + private var text3:TextField; + + private var label11:TextField; + + private var numText:TextField; + + public function MilitaryMainUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_simashu); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc7_:TextFormat = null; + var _loc9_:UIWindowBg = null; + var _loc12_:TextFormat = null; + var _loc16_:Sprite = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(202,290); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initSecondPanel(397,290); + _loc1_.addChild(_loc3_); + _loc3_.x = 4 + _loc2_.x + _loc2_.width; + _loc3_.y = 4; + var _loc4_:UITitleBg = new UITitleBg("说 明",_loc2_.width); + _loc2_.addChild(_loc4_); + _loc4_.x = int(_loc2_.width / 2 - _loc4_.width / 2); + var _loc5_:UITitleBg = new UITitleBg("改 建",_loc3_.width); + _loc3_.addChild(_loc5_); + _loc5_.x = int(_loc3_.width / 2 - _loc5_.width / 2); + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc6_.height = 250; + _loc6_.wordWrap = true; + _loc6_.multiline = true; + _loc7_ = new TextFormat(); + _loc7_.leading = 4; + _loc2_.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = 35; + _loc6_.defaultTextFormat = _loc7_; + var _loc8_:String = "1、改建开始后需要重新登录游戏。"; + _loc8_ = _loc8_ + "

2、改建过程中,该特区所有功能失效,并且不能中途取消。"; + _loc8_ = _loc8_ + "

3、改建完成后,所有特区建筑等级不变,转为另一种特区的相应建筑。司徒署将改建为司马署,民居将改建为军营,地窖将改建为操练场,工坊将改建为炼丹炉,祭坛将改建为行营。"; + _loc6_.htmlText = _loc8_; + _loc9_ = new UIWindowBg(); + _loc9_.initSecondPanel(88,85); + _loc3_.addChild(_loc9_); + _loc9_.x = 60; + _loc9_.y = 60; + var _loc10_:UIWindowBg = new UIWindowBg(); + _loc10_.initSecondPanel(88,85); + _loc3_.addChild(_loc10_); + _loc10_.x = _loc9_.x + 200; + _loc10_.y = _loc9_.y; + var _loc11_:Sprite = face.getSprite(ClassConfig.lib_ui_town_2); + _loc9_.addChild(_loc11_); + _loc11_.x = 2; + _loc11_.y = 2; + _loc12_ = new TextFormat(); + _loc12_.size = 24; + _loc12_.color = 16777215; + _loc12_.align = "center"; + var _loc13_:TextField = new TextField(); + _loc13_.width = 100; + _loc13_.height = 30; + _loc13_.text = "军镇"; + _loc13_.setTextFormat(_loc12_); + _loc3_.addChild(_loc13_); + _loc13_.x = 60; + _loc13_.y = 156; + var _loc14_:TextField = new TextField(); + _loc14_.width = 110; + _loc14_.height = 30; + _loc14_.text = "封邑"; + _loc14_.setTextFormat(_loc12_); + _loc3_.addChild(_loc14_); + _loc14_.x = 250; + _loc14_.y = 156; + var _loc15_:Sprite = face.getSprite(ClassConfig.lib_ui_town_1); + _loc10_.addChild(_loc15_); + _loc15_.x = 2; + _loc15_.y = 2; + _loc16_ = new Scale9Grid(face.getSprite(ClassConfig.lib_ui_bg_9),80,11); + _loc3_.addChild(_loc16_); + _loc16_.x = 160; + _loc16_.y = 90; + this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,300); + _loc3_.addChild(this.text3); + this.text3.y = 200; + this.text3.x = 80; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc17_.text = "消耗物品:"; + this.label11 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.label11.text = "天工图×2"; + _loc3_.addChild(_loc17_); + _loc17_.x = 20; + _loc17_.y = 250; + _loc3_.addChild(this.label11); + this.label11.x = _loc17_.x + _loc17_.width; + this.label11.y = _loc17_.y; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc18_.text = "当前拥有:"; + _loc3_.addChild(_loc18_); + _loc18_.x = 20; + _loc18_.y = _loc17_.y + 25; + this.numText = PublicMethod.getTextFieldWithFillter(16777215,60); + _loc3_.addChild(this.numText); + this.numText.x = this.label11.x; + this.numText.y = _loc18_.y; + var _loc19_:Button_9 = new Button_9("购买天工图"); + _loc3_.addChild(_loc19_); + _loc19_.x = this.numText.x + this.numText.width; + _loc19_.y = _loc18_.y; + _loc19_.addEventListener(MouseEvent.CLICK,this.buyitems); + this.reBuildBtn = new UIButton("改 建",2); + _loc3_.addChild(this.reBuildBtn); + this.reBuildBtn.x = 335; + this.reBuildBtn.y = 265; + this.reBuildBtn.onClick = this.reBuild; + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + ConnectService.getInstance().castleService.getTransInfo(face.currCasId); + } + + private function getTransSucc(param1:CastleEvent) : void + { + var _loc2_:Object = param1.castleObj; + this.text3.htmlText = "中心建筑" + _loc2_.level + "级,若改建为封邑,需要耗时" + PublicMethod.getTimeStr(_loc2_.time) + "."; + this.label11.text = _loc2_.itemName; + this.numText.text = _loc2_.num; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_getTransInfo,this.getTransSucc); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_getTransInfo,this.getTransSucc); + } + + private function reBuild(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("改建特区需要消耗天工图,确定改建吗?",this.onsubmit); + } + + private function onsubmit() : void + { + ConnectService.getInstance().castleService.changeBranchCastleType(face.currCasId,"economic"); + } + + private function buyitems(param1:MouseEvent) : void + { + var _loc2_:ShopUI = ShopUI.getInstance(); + _loc2_.open(2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/PracticeState.as b/flash_decompiled/com/view/ui/military/PracticeState.as new file mode 100644 index 0000000..8a3ac9b --- /dev/null +++ b/flash_decompiled/com/view/ui/military/PracticeState.as @@ -0,0 +1,60 @@ +package com.view.ui.military +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class PracticeState extends BaseBuild + { + + public function PracticeState(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/PracticeState1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/PracticeState3.swf"; + buildData.picUrl = "pic/build/PracticeState3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/PracticeState2.swf"; + buildData.picUrl = "pic/build/PracticeState2.png"; + } + else + { + buildData.swfUrl = "pic/build/PracticeState1.swf"; + buildData.picUrl = "pic/build/PracticeState1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new PracticeStateUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/PracticeStateUI.as b/flash_decompiled/com/view/ui/military/PracticeStateUI.as new file mode 100644 index 0000000..47eb5c8 --- /dev/null +++ b/flash_decompiled/com/view/ui/military/PracticeStateUI.as @@ -0,0 +1,57 @@ +package com.view.ui.military +{ + import com.view.newui.UICloseBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.events.Event; + + public class PracticeStateUI extends BaseUI + { + + public function PracticeStateUI(param1:BaseBuild) + { + super(); + this.addUIBg(); + super.loadTitle(UITitleConfig.title_caolianchang); + this.setPosition(); + super.setBuild(param1); + createUI(); + } + + override public function getUIHeight() : int + { + return 89; + } + + override public function addUIBg() : void + { + ui_bg = new UIWindowBg(); + ui_bg.initSize(UIWindowBg.normal_window_w,this.getUIHeight() - 20); + ui_closeBtn = new UICloseBtn(); + addChild(ui_bg); + addChild(ui_closeBtn); + ui_closeBtn.onClick = closeUI; + setCloseBtnPosi(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/RefineCamp.as b/flash_decompiled/com/view/ui/military/RefineCamp.as new file mode 100644 index 0000000..24ca08e --- /dev/null +++ b/flash_decompiled/com/view/ui/military/RefineCamp.as @@ -0,0 +1,60 @@ +package com.view.ui.military +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class RefineCamp extends BaseBuild + { + + public function RefineCamp(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/RefineCamp1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/RefineCamp3.swf"; + buildData.picUrl = "pic/build/RefineCamp3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/RefineCamp2.swf"; + buildData.picUrl = "pic/build/RefineCamp2.png"; + } + else + { + buildData.swfUrl = "pic/build/RefineCamp1.swf"; + buildData.picUrl = "pic/build/RefineCamp1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new RefineCampUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/RefineCampUI.as b/flash_decompiled/com/view/ui/military/RefineCampUI.as new file mode 100644 index 0000000..bb8b9a1 --- /dev/null +++ b/flash_decompiled/com/view/ui/military/RefineCampUI.as @@ -0,0 +1,57 @@ +package com.view.ui.military +{ + import com.view.newui.UICloseBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.events.Event; + + public class RefineCampUI extends BaseUI + { + + public function RefineCampUI(param1:BaseBuild) + { + super(); + this.addUIBg(); + super.loadTitle(UITitleConfig.title_liandanlu); + this.setPosition(); + super.setBuild(param1); + createUI(); + } + + override public function getUIHeight() : int + { + return 89; + } + + override public function addUIBg() : void + { + ui_bg = new UIWindowBg(); + ui_bg.initSize(UIWindowBg.normal_window_w,this.getUIHeight() - 20); + ui_closeBtn = new UICloseBtn(); + addChild(ui_bg); + addChild(ui_closeBtn); + ui_closeBtn.onClick = closeUI; + setCloseBtnPosi(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/StagingCamp.as b/flash_decompiled/com/view/ui/military/StagingCamp.as new file mode 100644 index 0000000..38a1b34 --- /dev/null +++ b/flash_decompiled/com/view/ui/military/StagingCamp.as @@ -0,0 +1,60 @@ +package com.view.ui.military +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class StagingCamp extends BaseBuild + { + + public function StagingCamp(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/StagingCamp1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/StagingCamp3.swf"; + buildData.picUrl = "pic/build/StagingCamp3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/StagingCamp2.swf"; + buildData.picUrl = "pic/build/StagingCamp2.png"; + } + else + { + buildData.swfUrl = "pic/build/StagingCamp1.swf"; + buildData.picUrl = "pic/build/StagingCamp1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new StagingCampUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/military/StagingCampUI.as b/flash_decompiled/com/view/ui/military/StagingCampUI.as new file mode 100644 index 0000000..4d4bbf9 --- /dev/null +++ b/flash_decompiled/com/view/ui/military/StagingCampUI.as @@ -0,0 +1,57 @@ +package com.view.ui.military +{ + import com.view.newui.UICloseBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.events.Event; + + public class StagingCampUI extends BaseUI + { + + public function StagingCampUI(param1:BaseBuild) + { + super(); + this.addUIBg(); + super.loadTitle(UITitleConfig.title_xingying); + this.setPosition(); + super.setBuild(param1); + createUI(); + } + + override public function getUIHeight() : int + { + return 89; + } + + override public function addUIBg() : void + { + ui_bg = new UIWindowBg(); + ui_bg.initSize(UIWindowBg.normal_window_w,this.getUIHeight() - 20); + ui_closeBtn = new UICloseBtn(); + addChild(ui_bg); + addChild(ui_closeBtn); + ui_closeBtn.onClick = closeUI; + setCloseBtnPosi(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mine/MineInfoUI.as b/flash_decompiled/com/view/ui/mine/MineInfoUI.as new file mode 100644 index 0000000..92c220a --- /dev/null +++ b/flash_decompiled/com/view/ui/mine/MineInfoUI.as @@ -0,0 +1,286 @@ +package com.view.ui.mine +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.data.hero.Hero; + import com.events.DevEvent; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIHeroItem; + import com.view.newui.UILabel; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.message.MessageBoxUI; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class MineInfoUI extends UIWindowBg + { + + private var label1:UILabel; + + private var label2:UILabel; + + private var label3:UILabel; + + private var label4:UILabel; + + private var label5:UILabel; + + private var label6:UILabel; + + private var okBtn:UIButton; + + private var getBtn:UIButton; + + private var changHeroBtn:UIButton; + + private var heroMcVec:Vector.; + + private var powerText:TextField; + + private var heroIdList:Vector.; + + private var mineObj:Object; + + public function MineInfoUI() + { + var _loc6_:UIHeroItem = null; + this.heroIdList = new Vector.(); + super(); + initSize(615 - 160,182); + loadTitle(UITitleConfig.title_mineinfo); + addCloseBtn(); + initBg1(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(285 + 352,65); + bg1.addChild(_loc1_); + _loc1_.x = 5; + _loc1_.y = 5; + this.label1 = new UILabel(220,UIConfig.textColor); + _loc1_.addChild(this.label1); + this.label1.x = 10; + this.label1.y = 10; + this.label2 = new UILabel(220,UIConfig.textColor); + _loc1_.addChild(this.label2); + this.label2.x = 250; + this.label2.y = this.label1.y; + this.label3 = new UILabel(220,UIConfig.textColor); + _loc1_.addChild(this.label3); + this.label3.x = this.label1.x; + this.label3.y = this.label1.y + 20; + this.label4 = new UILabel(220,UIConfig.textColor); + _loc1_.addChild(this.label4); + this.label4.x = this.label2.x; + this.label4.y = this.label3.y; + this.label5 = new UILabel(220,UIConfig.textColor); + _loc1_.addChild(this.label5); + this.label5.x = this.label1.x; + this.label5.y = this.label3.y + 20; + this.label6 = new UILabel(220,UIConfig.textColor); + _loc1_.addChild(this.label6); + this.label6.x = this.label2.x; + this.label6.y = this.label5.y; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(637,114); + bg1.addChild(_loc2_); + _loc2_.x = _loc1_.x; + _loc2_.y = _loc1_.y + _loc1_.height + 4; + this.heroMcVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 5) + { + _loc6_ = new UIHeroItem(); + _loc2_.addChild(_loc6_); + _loc6_.x = 8 + _loc3_ * 128; + _loc6_.y = 5; + this.heroMcVec.push(_loc6_); + _loc3_++; + } + var _loc4_:UIButton = new UIButton("武将设置",2,10); + _loc2_.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 95; + _loc4_.onClick = this.selectHero; + this.powerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc2_.addChild(this.powerText); + this.powerText.x = _loc4_.x + 100; + this.powerText.y = _loc4_.y + 3; + this.powerText.htmlText = "武将战斗力:0"; + this.getBtn = new UIButton("收 获",2,10); + _loc2_.addChild(this.getBtn); + this.getBtn.x = 416; + this.getBtn.y = _loc4_.y; + this.getBtn.onClick = this.getMineRes; + this.changHeroBtn = new UIButton("更换武将",2,10); + _loc2_.addChild(this.changHeroBtn); + this.changHeroBtn.x = 496; + this.changHeroBtn.y = _loc4_.y; + this.changHeroBtn.onClick = this.changeHeroList; + this.okBtn = new UIButton("抢 夺",2,10); + var _loc5_:UIButton = new UIButton("关 闭",2,10); + _loc2_.addChild(this.okBtn); + _loc2_.addChild(_loc5_); + this.okBtn.x = 496; + this.okBtn.y = _loc4_.y; + _loc5_.x = this.okBtn.x + 80; + _loc5_.y = _loc4_.y; + _loc5_.onClick = closeSelf; + this.okBtn.onClick = this.addPoint; + Utils.g_events.addEventListener(DevEvent.EVENT_MINE_INFO,this.getMineInfoResult); + Utils.g_events.addEventListener(DevEvent.EVENT_MINE_FIGHT,this.fightMineResult); + } + + public function getMineInfo(param1:int) : void + { + ConnectService.getInstance().playService.getMineInfo(param1); + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = null; + _loc2_ = HeroListSelectUI.getInstance(); + _loc2_.setSelectheroArr(this.heroIdList); + this.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = -100; + _loc2_.backFunc = this.selectHeroList; + } + + public function selectHeroList(param1:Vector.) : void + { + var _loc3_:* = undefined; + this.clearHeroIdList(); + var _loc2_:Number = 0; + for(_loc3_ in this.heroMcVec) + { + if(param1.length > 0 && param1.length > _loc3_) + { + this.heroIdList.push(param1[_loc3_].heroId); + this.heroMcVec[_loc3_].setData(param1[_loc3_]); + _loc2_ += param1[_loc3_].combatPower; + } + else + { + this.heroMcVec[_loc3_].setData(null); + } + } + _loc2_ = Math.round(_loc2_); + this.powerText.htmlText = "武将战斗力:" + _loc2_ + ""; + } + + private function clearHeroIdList() : void + { + if(this.heroIdList.length > 0) + { + this.heroIdList = new Vector.(); + } + } + + private function addPoint(param1:MouseEvent) : void + { + var _loc4_:int = 0; + if(this.heroIdList.length == 0) + { + MessageBoxUI.getInstance().addMessage("请先选择武将"); + return; + } + var _loc2_:int = NewUserData.getUser().userId; + if(_loc2_ == this.mineObj.userId) + { + MessageBoxUI.getInstance().addMessage("你已占领该矿,无法再次争夺"); + return; + } + var _loc3_:Array = new Array(); + for each(_loc4_ in this.heroIdList) + { + _loc3_.push(_loc4_); + } + ConnectService.getInstance().playService.startGrabMine(this.mineObj.id,_loc3_); + } + + private function fightMineResult(param1:DevEvent) : void + { + closeSelf(null); + } + + private function getMineInfoResult(param1:DevEvent) : void + { + var _loc3_:* = undefined; + this.mineObj = param1.obj; + this.label1.setText("矿场名称:" + this.mineObj.mineName) + ""; + this.label2.setText("矿场产量:" + this.mineObj.product + "/小时"); + if(this.mineObj.userId > 0) + { + this.label3.setText("矿 场 主:" + this.mineObj.userName) + ""; + this.label4.setText("驻守战力:" + Utils.getNewPower(this.mineObj.defPower)) + ""; + this.label5.setText("占领时间:" + this.mineObj.createDate) + ""; + this.label6.setText("上次收获时间:" + this.mineObj.beginDate) + ""; + } + else + { + this.label3.setText("矿 场 主:"); + this.label4.setText("驻守战力:" + Utils.getNewPower(this.mineObj.power)) + ""; + this.label5.setText("占领时间:"); + this.label6.setText("上次收获时间:"); + } + var _loc2_:int = NewUserData.getUser().userId; + if(this.mineObj.userId > 0 && _loc2_ == this.mineObj.userId) + { + this.okBtn.visible = false; + this.getBtn.visible = true; + this.changHeroBtn.visible = true; + } + else + { + this.okBtn.visible = true; + this.getBtn.visible = false; + this.changHeroBtn.visible = false; + } + this.clearHeroIdList(); + for(_loc3_ in this.heroMcVec) + { + this.heroMcVec[_loc3_].setData(null); + } + this.powerText.htmlText = "武将战斗力:0"; + } + + private function getMineRes(param1:MouseEvent) : void + { + ConnectService.getInstance().playService.getMineRes(this.mineObj.id); + } + + private function changeHeroList(param1:MouseEvent) : void + { + var _loc4_:int = 0; + if(this.heroIdList.length == 0) + { + MessageBoxUI.getInstance().confirmMsg("未选择武将提交会失去该矿场,确定要丢弃该矿吗?",this.configChange); + return; + } + var _loc2_:int = NewUserData.getUser().userId; + if(_loc2_ != this.mineObj.userId) + { + MessageBoxUI.getInstance().addMessage("这不是你的矿场,无法更换驻守武将"); + return; + } + var _loc3_:Array = new Array(); + for each(_loc4_ in this.heroIdList) + { + _loc3_.push(_loc4_); + } + ConnectService.getInstance().playService.changeMineHeroList(this.mineObj.id,_loc3_); + closeSelf(null); + } + + private function configChange() : void + { + ConnectService.getInstance().playService.changeMineHeroList(this.mineObj.id,new Array()); + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mine/MineUI.as b/flash_decompiled/com/view/ui/mine/MineUI.as new file mode 100644 index 0000000..8c13df9 --- /dev/null +++ b/flash_decompiled/com/view/ui/mine/MineUI.as @@ -0,0 +1,190 @@ +package com.view.ui.mine +{ + import com.common.PublicGlow; + import com.control.ConnectService; + import com.data.GameData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.mine.mc.MineMc; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.utils.setInterval; + + public class MineUI extends ActivityBase + { + + private var bg1:UIWindowBg; + + private var mcVec:Vector. = new Vector.(); + + private var hasLoad:Boolean = false; + + private var _status:Boolean = false; + + private var mineInfoUI:MineInfoUI; + + public function MineUI() + { + super(); + loadRes(GameUIRes.swfUrl_5); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 32 + 232; + window_heihgt = UIWindowBg.normal_window_h - 49 + 243; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 32 + 232; + ui_closeBtn.y = 10; + } + + override public function createUI() : void + { + var _loc2_:Button_9 = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_kuangchang); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + 32 + 232,400 - 49 + 243); + addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:Bitmap = gameRes.getBitMap("bg",gameRes.getApplication(swfUrl)); + this.bg1.addChild(_loc1_); + _loc1_.x = 2; + _loc1_.y = 2; + _loc2_ = new Button_9("矿场说明"); + this.bg1.addChild(_loc2_); + _loc2_.x = 845; + _loc2_.y = 10; + _loc2_.buttonMode = true; + _loc2_.filters = [PublicGlow.getInstance().blackGlow]; + var _loc3_:String = "1、矿场初始由npc驻守,战胜npc即可拥有该矿,成功占领矿场后进攻武将自动成为驻守武将,玩家可更换驻守武将 。
"; + _loc3_ += "2、占领矿场后,其他玩家可派兵争夺,若争夺成功,则守方该时间内产生收益以邮件方式发送,同时失去该矿,每个玩家每天有5次抢矿机会。
"; + _loc3_ += "3、守方驻守时间少于1小时不产生任何收益,驻守时间大于10小时可手动收获一次。
"; + _loc3_ += "4、每个君主只能占领2个矿场,每种矿场只能占领1个。
"; + _loc3_ += "5、矿场战斗损失兵力100%恢复,不损失武将健康度。
"; + _loc3_ += "6、矿场中飘蓝旗为自己所占领矿场,红旗为其他玩家所占领矿场,无旗为无人占领矿场。
"; + _loc3_ += "7、驻守过程中可更换驻守武将,如未选择武将提交则表示玩家主动丢弃该矿。
"; + _loc3_ += "8、主城如被流放,则将会失去野外所占领矿场,同时矿场产生收益超过12小时的收益部分将会被流放者所得,流放者单次最多能获得10小时资源。"; + ToolTipManager.getInstance().setToolTip(_loc2_,new TxtTooltip(_loc3_),false,-1,false); + if(this.hasLoad == false) + { + this.hasLoad = true; + Utils.g_events.addEventListener(DevEvent.EVENT_MINE_LIST,this.getMineListResult); + this.getConfigDate(); + } + setInterval(this.refresh,60000); + } + + override public function show() : void + { + super.show(); + if(this.hasLoad == true) + { + this.getConfigDate(); + } + } + + private function refresh() : void + { + if(getOpenStatus()) + { + this.getConfigDate(); + } + } + + private function getConfigDate() : void + { + ConnectService.getInstance().playService.enterMineMain(); + } + + private function getMineListResult(param1:DevEvent) : void + { + this.initMineList(); + } + + private function initMineList() : void + { + var _loc1_:MineMc = null; + var _loc2_:Array = null; + var _loc3_:int = 0; + if(this._status == false) + { + this._status = true; + _loc2_ = GameData.getMineList(); + _loc3_ = 0; + while(_loc3_ < _loc2_.length) + { + _loc1_ = new MineMc(_loc2_[_loc3_].id); + this.bg1.addChild(_loc1_); + this.mcVec.push(_loc1_); + _loc1_.addEventListener(MouseEvent.CLICK,this.openMineInfo); + _loc3_++; + } + } + for each(_loc1_ in this.mcVec) + { + _loc1_.loadMc(); + } + } + + public function mouseClick(param1:MouseEvent) : void + { + var _loc2_:MineMc = param1.currentTarget as MineMc; + } + + private function mouseDown(param1:MouseEvent) : void + { + param1.stopImmediatePropagation(); + var _loc2_:MineMc = param1.currentTarget as MineMc; + _loc2_.startDrag(); + } + + private function mouseUp(param1:MouseEvent) : void + { + var _loc2_:MineMc = param1.currentTarget as MineMc; + _loc2_.stopDrag(); + } + + private function openMineInfo(param1:MouseEvent) : void + { + var _loc2_:MineMc = null; + _loc2_ = param1.currentTarget as MineMc; + if(this.mineInfoUI == null) + { + this.mineInfoUI = new MineInfoUI(); + } + this.bg1.addChild(this.mineInfoUI); + this.mineInfoUI.x = int(this.bg1.width / 2 - this.mineInfoUI.width / 2); + this.mineInfoUI.y = int(this.bg1.height / 2 - this.mineInfoUI.height / 2); + this.mineInfoUI.getMineInfo(_loc2_.getId()); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(Boolean(this.mineInfoUI) && this.bg1.contains(this.mineInfoUI)) + { + this.bg1.removeChild(this.mineInfoUI); + if(Boolean(HeroListSelectUI.instance) && this.mineInfoUI.contains(HeroListSelectUI.instance)) + { + this.mineInfoUI.removeChild(HeroListSelectUI.instance); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/mine/mc/MineMc.as b/flash_decompiled/com/view/ui/mine/mc/MineMc.as new file mode 100644 index 0000000..09de9fd --- /dev/null +++ b/flash_decompiled/com/view/ui/mine/mc/MineMc.as @@ -0,0 +1,104 @@ +package com.view.ui.mine.mc +{ + import com.common.PublicGlow; + import com.data.GameData; + import com.newdata.user.NewUserData; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import com.view.tip.MineTip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class MineMc extends UIBase + { + + private var posX:int = -1; + + private var posY:int; + + private var id:int; + + private var type:int; + + private var bg:Sprite; + + private var flag1:Bitmap; + + private var flag2:Bitmap; + + private var mineTip:MineTip; + + public function MineMc(param1:int) + { + super(); + this.id = param1; + this.bg = new Sprite(); + addChild(this.bg); + this.mineTip = new MineTip(this.bg,face.stage,face.tip_bg); + } + + public function getId() : int + { + return this.id; + } + + public function loadMc() : void + { + var _loc3_:Bitmap = null; + var _loc1_:Object = GameData.getMineById(this.id); + if(this.posX == -1) + { + this.posX = _loc1_.posx; + this.posY = _loc1_.posy; + this.type = _loc1_.type; + _loc3_ = game.getBitMap("image" + _loc1_.iconType,game.getApplication(GameUIRes.swfUrl_5)); + this.bg.addChild(_loc3_); + this.x = this.posX; + this.y = this.posY; + this.bg.addEventListener(MouseEvent.ROLL_OVER,this.mouseover); + this.bg.addEventListener(MouseEvent.ROLL_OUT,this.mouseout); + this.flag1 = game.getBitMap("flag1",game.getApplication(GameUIRes.swfUrl_5)); + this.bg.addChild(this.flag1); + this.flag1.x = 40; + this.flag1.y = -30; + this.flag2 = game.getBitMap("flag2",game.getApplication(GameUIRes.swfUrl_5)); + this.bg.addChild(this.flag2); + this.flag2.x = this.flag1.x; + this.flag2.y = this.flag1.y; + this.buttonMode = true; + } + this.mineTip.setTipData(_loc1_); + var _loc2_:int = NewUserData.getUser().userId; + if(_loc1_.userId > 0) + { + if(_loc2_ != _loc1_.userId) + { + this.flag1.visible = true; + this.flag2.visible = false; + } + else + { + this.flag1.visible = false; + this.flag2.visible = true; + } + } + else + { + this.flag1.visible = false; + this.flag2.visible = false; + } + } + + private function mouseover(param1:MouseEvent) : void + { + this.bg.filters = [PublicGlow.getInstance().menuFillter]; + } + + private function mouseout(param1:MouseEvent) : void + { + this.bg.filters = null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/MissionPage1.as b/flash_decompiled/com/view/ui/mission/MissionPage1.as new file mode 100644 index 0000000..18368f4 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/MissionPage1.as @@ -0,0 +1,229 @@ +package com.view.ui.mission +{ + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.mission.event.MissionEvent; + import com.view.mc.sprite.LoadingMc; + import com.view.newui.UIButton; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.mission.mc.MissContent1; + import com.view.ui.mission.mc.MissItem; + import fl.containers.ScrollPane; + import flash.events.MouseEvent; + + public class MissionPage1 extends BaseUI + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var refreshBtn:UIButton; + + private var scrollPane:ScrollPane; + + private var contentMc:MissContent1; + + private var doBtn:UIButton; + + private var missListVec:Vector.; + + private var currItem:MissItem; + + public function MissionPage1() + { + var _loc5_:MissItem = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(212,367); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc1_:UITitleBg = new UITitleBg("主线任务",200); + this.bg1.addChild(_loc1_); + _loc1_.x = int(this.bg1.width / 2 - _loc1_.width / 2); + var _loc2_:UITitleBg = new UITitleBg("任务列表",200); + this.bg1.addChild(_loc2_); + _loc2_.x = int(this.bg1.width / 2 - _loc2_.width / 2); + _loc2_.y = 53; + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(396,367); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 4; + this.bg2.y = this.bg1.y; + var _loc3_:UITitleBg = new UITitleBg("任务说明",404); + this.bg2.addChild(_loc3_); + _loc3_.x = int(this.bg2.width / 2 - _loc3_.width / 2); + this.missListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 11) + { + _loc5_ = new MissItem(0); + this.bg1.addChild(_loc5_); + if(_loc4_ == 0) + { + _loc5_.y = 29; + } + else + { + _loc5_.y = 55 + 26 * _loc4_; + } + _loc5_.x = 4; + _loc5_.clickFunc = this.clickTitle; + this.missListVec.push(_loc5_); + _loc5_.getList = this.list; + _loc4_++; + } + this.refreshBtn = new UIButton("刷 新",2); + this.bg1.addChild(this.refreshBtn); + this.refreshBtn.x = 84; + this.refreshBtn.y = 345; + this.refreshBtn.onClick = this.refreshList; + this.contentMc = new MissContent1(); + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(398,320); + this.bg2.addChild(this.scrollPane); + this.scrollPane.x = 12; + this.scrollPane.y = 34; + this.scrollPane.source = this.contentMc; + this.doBtn = new UIButton("领取奖励",2); + this.bg2.addChild(this.doBtn); + this.doBtn.x = 330; + this.doBtn.y = 340; + this.doBtn.onClick = this.doMission; + } + + override public function setPosition() : void + { + } + + public function addEvent() : void + { + ConnectService.getInstance().addEventListener(MissionEvent.Miss_showUserMissionByType,this.getUserDailyMissionListSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_commitMission,this.commitMissionSucc); + this.list(); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_showUserMissionByType,this.getUserDailyMissionListSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_commitMission,this.commitMissionSucc); + } + + private function list() : void + { + LoadingMc.getInstance().show(); + ConnectService.getInstance().missionService.showUserMissionByType("QTYPE_MAIN"); + } + + private function getUserDailyMissionListSucc(param1:MissionEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:int = 0; + var _loc5_:Boolean = false; + var _loc6_:Object = null; + LoadingMc.getInstance().unShow(); + this.refreshBtn.setEnable(); + var _loc2_:Array = param1.list; + if(_loc2_ == null || _loc2_.length <= 0) + { + this.contentMc.visible = false; + this.currItem = null; + return; + } + this.contentMc.visible = true; + if(this.currItem) + { + this.currItem.setSelect(false); + } + for(_loc3_ in this.missListVec) + { + this.missListVec[_loc3_].setDate1(null); + } + _loc4_ = 1; + for each(_loc6_ in _loc2_) + { + if(_loc6_.missionHardLevel == 1) + { + this.missListVec[0].setDate1(_loc6_); + if(_loc6_.status == 1 && !_loc5_) + { + _loc5_ = true; + this.currItem = this.missListVec[0]; + } + } + else + { + this.missListVec[_loc4_].setDate1(_loc6_); + if(_loc6_.status == 1 && !_loc5_) + { + _loc5_ = true; + this.currItem = this.missListVec[_loc4_]; + } + _loc4_++; + } + } + if(this.currItem == null) + { + this.currItem = this.missListVec[0]; + } + if(this.currItem.obj == null) + { + this.currItem = this.missListVec[1]; + } + this.currItem.mouseClick(null); + } + + private function clickTitle(param1:MissItem) : void + { + if(this.currItem != param1) + { + this.currItem.setSelect(false); + this.currItem.setTimeFunc = null; + } + this.currItem = param1; + this.contentMc.setData(this.currItem.obj); + if(this.currItem.obj.status == 1) + { + this.doBtn.setEnable(); + } + else + { + this.doBtn.setUnEnable(); + } + } + + private function doMission(param1:MouseEvent) : void + { + if(this.currItem != null) + { + this.doBtn.setUnEnable(); + LoadingMc.getInstance().show(); + ConnectService.getInstance().missionService.commitMission(this.currItem.obj.userMissionId); + } + } + + private function commitMissionSucc(param1:MissionEvent) : void + { + this.doBtn.setEnable(); + if(param1.result != ReturnBean.STATUS_0) + { + LoadingMc.getInstance().unShow(); + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + this.list(); + } + + private function refreshList(param1:MouseEvent) : void + { + LoadingMc.getInstance().show(); + this.refreshBtn.setUnEnable(); + this.list(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/MissionPage2.as b/flash_decompiled/com/view/ui/mission/MissionPage2.as new file mode 100644 index 0000000..3618a8d --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/MissionPage2.as @@ -0,0 +1,352 @@ +package com.view.ui.mission +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.mission.event.MissionEvent; + import com.events.DevEvent; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.mission.data.DailyMissionData; + import com.view.ui.mission.data.MissionData; + import com.view.ui.mission.mc.MissContentMc; + import com.view.ui.mission.mc.MissItem; + import com.view.ui.tools.ToolView; + import fl.containers.ScrollPane; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class MissionPage2 extends BaseUI + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var addSpeed:UIButton; + + private var scrollPane:ScrollPane; + + private var contentMc:MissContentMc; + + private var xingdongliText:TextField; + + private var buyItem:UIButton; + + private var task_txt:TextField; + + private var time_txt:TextField; + + private var doBtn:UIButton; + + private var missListVec:Vector.; + + private var first:int = 1; + + private var currItem:MissItem; + + private var timeTitle:String; + + private var isCold:Boolean; + + private var timer:Timer; + + private var leftTime:int; + + public function MissionPage2() + { + var _loc4_:MissItem = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(212,367); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc1_:UITitleBg = new UITitleBg("任务列表",200); + this.bg1.addChild(_loc1_); + _loc1_.x = int(this.bg1.width / 2 - _loc1_.width / 2); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(396,367); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 4; + this.bg2.y = this.bg1.y; + var _loc2_:UITitleBg = new UITitleBg("任务说明",404); + this.bg2.addChild(_loc2_); + _loc2_.x = int(this.bg2.width / 2 - _loc2_.width / 2); + this.missListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc4_ = new MissItem(2); + this.bg1.addChild(_loc4_); + _loc4_.y = 26 + 26 * _loc3_; + _loc4_.x = 4; + _loc4_.clickFunc = this.clickTitle; + this.missListVec.push(_loc4_); + _loc4_.getList = this.list; + _loc3_++; + } + this.xingdongliText = PublicMethod.getTextFieldWithFillter(11647956,130); + this.bg1.addChild(this.xingdongliText); + this.xingdongliText.x = 7; + this.xingdongliText.y = 350; + this.buyItem = new UIButton("购买"); + this.bg1.addChild(this.buyItem); + this.buyItem.x = 157; + this.buyItem.y = 344; + this.buyItem.onClick = this.buyItemFunc; + this.contentMc = new MissContentMc(); + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(398,320); + this.bg2.addChild(this.scrollPane); + this.scrollPane.x = 12; + this.scrollPane.y = 34; + this.scrollPane.source = this.contentMc; + this.task_txt = PublicMethod.getTextFieldWithFillter(16777215,150); + this.bg2.addChild(this.task_txt); + this.task_txt.x = 15; + this.task_txt.y = 346; + this.time_txt = PublicMethod.getTextFieldWithFillter(16763904,150); + this.bg2.addChild(this.time_txt); + this.time_txt.x = this.task_txt.x + 130; + this.time_txt.y = this.task_txt.y; + this.doBtn = new UIButton("执 行",2); + this.bg2.addChild(this.doBtn); + this.doBtn.x = 340; + this.doBtn.y = 340; + this.doBtn.onClick = this.doMission; + this.addSpeed = new UIButton("加 速",2); + this.bg2.addChild(this.addSpeed); + this.addSpeed.x = 272; + this.addSpeed.y = this.doBtn.y; + this.addSpeed.visible = false; + this.addSpeed.onClick = this.addSpeedMiss; + } + + override public function setPosition() : void + { + } + + public function addEvent() : void + { + ConnectService.getInstance().addEventListener(MissionEvent.Miss_getUserDailyMissionList,this.getUserDailyMissionListSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_actDailyMission,this.actDailyMissionSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_addSpeed,this.addSpeedDailyMissionSucc); + Utils.g_events.addEventListener(DevEvent.USERCHANGE,this.userChange); + this.list(); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_getUserDailyMissionList,this.getUserDailyMissionListSucc); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_actDailyMission,this.actDailyMissionSucc); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_addSpeed,this.addSpeedDailyMissionSucc); + Utils.g_events.removeEventListener(DevEvent.USERCHANGE,this.userChange); + this.stopTime(); + } + + private function list() : void + { + this.task_txt.text = ""; + this.time_txt.text = ""; + this.timeTitle = ""; + ConnectService.getInstance().missionService.getUserDailyMissionList(this.first); + } + + private function getUserDailyMissionListSucc(param1:MissionEvent) : void + { + var _loc5_:DailyMissionData = null; + var _loc6_:Object = null; + var _loc2_:Array = param1.list; + if(this.first == 1) + { + this.first = 0; + MissionData.getInstance().initDailyMission(param1.list2); + } + this.leftTime = 0; + var _loc3_:Vector. = MissionData.getInstance().dailyMisArr; + var _loc4_:int = 0; + for each(_loc5_ in _loc3_) + { + _loc5_.status = ""; + _loc5_.time = 0; + if(_loc2_ != null && _loc2_.length > 0) + { + for each(_loc6_ in _loc2_) + { + if(_loc6_.dMId == _loc5_.m_dMId) + { + _loc5_.status = _loc6_.status; + _loc5_.time = int(_loc6_.timeDis); + if(_loc6_.status == DailyMissionData.PROCESSING) + { + this.leftTime = _loc5_.time; + if(this.leftTime > 0) + { + this.timeTitle = "当前正在 " + _loc5_.m_name + ""; + this.task_txt.htmlText = "当前正在 " + _loc5_.m_name + ""; + } + } + break; + } + } + } + _loc5_.getStatus(); + this.missListVec[_loc4_].setDate(_loc5_); + _loc4_++; + } + if(this.leftTime > 0) + { + this.addSpeed.visible = true; + this.startTime(); + } + else + { + this.addSpeed.visible = false; + this.task_txt.text = ""; + this.time_txt.text = ""; + } + if(this.currItem == null) + { + this.currItem = this.missListVec[0]; + } + this.currItem.mouseClick(null); + this.xingdongliText.text = "君主行动力:" + NewUserData.getUser().leaveActPoint; + } + + private function addSpeedMiss(param1:MouseEvent) : void + { + if(this.leftTime <= 0) + { + return; + } + ConnectService.getInstance().missionService.addSpeedActDailyMission(this.currItem.missData.m_dMId); + } + + private function addSpeedDailyMissionSucc(param1:MissionEvent) : void + { + this.list(); + } + + private function userChange(param1:DevEvent) : void + { + this.xingdongliText.text = "君主行动力:" + NewUserData.getUser().leaveActPoint; + } + + private function clickTitle(param1:MissItem) : void + { + if(this.currItem != param1) + { + this.currItem.setSelect(false); + this.currItem.setTimeFunc = null; + } + this.currItem = param1; + this.contentMc.setData(this.currItem.missData); + this.scrollPane.update(); + this.currItem.setTimeFunc = this.coldFunc; + if(param1.isCold) + { + this.isCold = true; + this.task_txt.htmlText = "任务冷却 " + param1.missData.m_name + ""; + } + else + { + this.isCold = false; + if(this.leftTime > 0) + { + this.task_txt.htmlText = this.timeTitle; + } + else + { + this.task_txt.text = ""; + this.time_txt.text = ""; + } + } + } + + private function coldFunc(param1:String) : void + { + this.time_txt.text = param1; + } + + public function startTime() : void + { + if(this.leftTime <= 0) + { + return; + } + 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.leftTime; + if(!this.isCold) + { + this.time_txt.text = "剩余时间:" + PublicMethod.getTimeStr(this.leftTime); + } + if(this.leftTime <= 0) + { + this.stopTime(); + this.list(); + } + } + + private function stopTime() : void + { + if(this.timer) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.startFrame); + this.timer = null; + this.leftTime = 0; + } + } + + private function doMission(param1:MouseEvent) : void + { + if(this.currItem != null) + { + ConnectService.getInstance().missionService.actDailyMission(this.currItem.missData.m_dMId); + } + else + { + MessageBoxUI.getInstance().addMessage("请选择执行的任务"); + } + } + + private function actDailyMissionSucc(param1:MissionEvent) : void + { + if(param1.result != ReturnBean.STATUS_0) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + this.list(); + } + + private function buyItemFunc(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_XINGDONG"); + _loc2_.onRefresh = null; + _loc2_.show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/MissionPage3.as b/flash_decompiled/com/view/ui/mission/MissionPage3.as new file mode 100644 index 0000000..8f7cc4f --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/MissionPage3.as @@ -0,0 +1,330 @@ +package com.view.ui.mission +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.mission.event.MissionEvent; + import com.events.DevEvent; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.mission.mc.MissContent3; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.MovieClip; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MissionPage3 extends BaseUI + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var num_txt:TextField; + + private var txt0:TextField; + + private var txt1:TextField; + + private var txt2:TextField; + + private var txt:TextField; + + private var getBtn1:UIButton; + + private var getBtn2:UIButton; + + private var getBtn0:UIButton; + + private var giveUpBtn:UIButton; + + private var doBtn:UIButton; + + private var contentMc:MissContent3; + + private var userMissionId:int; + + private var needCash:int; + + public function MissionPage3() + { + var _loc4_:UIWindowBg = null; + var _loc5_:TextFormat = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(212,367); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc1_:UITitleBg = new UITitleBg("每日声望任务",200); + this.bg1.addChild(_loc1_); + _loc1_.x = int(this.bg1.width / 2 - _loc1_.width / 2); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(396,367); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 4; + this.bg2.y = this.bg1.y; + var _loc2_:UITitleBg = new UITitleBg("任务说明",404); + this.bg2.addChild(_loc2_); + _loc2_.x = int(this.bg2.width / 2 - _loc2_.width / 2); + var _loc3_:MovieClip = face.getMovieClip(ClassConfig.ui_misscountry); + this.bg1.addChild(_loc3_); + _loc3_.x = 47; + _loc3_.y = 45; + _loc3_.banner.gotoAndStop(NewUserData.getUser().countryId); + this.txt = PublicMethod.getTextFieldWithFillter(16568101,140); + this.bg1.addChild(this.txt); + this.txt.x = 55; + this.txt.y = 180; + _loc4_ = new UIWindowBg(); + _loc4_.initSecondPanel(193,40); + this.bg1.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 208; + _loc5_ = new TextFormat(); + _loc5_.leading = 3; + this.txt0 = PublicMethod.getTextFieldWithFillter(10852210,140); + this.txt0.multiline = true; + this.txt0.wordWrap = true; + this.txt0.height = 40; + _loc4_.addChild(this.txt0); + this.txt0.x = 5; + this.txt0.y = 5; + this.txt0.defaultTextFormat = _loc5_; + var _loc6_:UIWindowBg = new UIWindowBg(); + _loc6_.initSecondPanel(193,40); + this.bg1.addChild(_loc6_); + _loc6_.x = 10; + _loc6_.y = _loc4_.y + _loc4_.height + 5; + this.txt1 = PublicMethod.getTextFieldWithFillter(10852210,140); + this.txt1.multiline = true; + this.txt1.wordWrap = true; + this.txt1.height = 40; + _loc6_.addChild(this.txt1); + this.txt1.x = 5; + this.txt1.y = 5; + this.txt1.defaultTextFormat = _loc5_; + var _loc7_:UIWindowBg = new UIWindowBg(); + _loc7_.initSecondPanel(193,40); + this.bg1.addChild(_loc7_); + _loc7_.x = 10; + _loc7_.y = _loc6_.y + _loc6_.height + 5; + this.txt2 = PublicMethod.getTextFieldWithFillter(10852210,140); + this.txt2.multiline = true; + this.txt2.wordWrap = true; + this.txt2.height = 40; + _loc7_.addChild(this.txt2); + this.txt2.x = 5; + this.txt2.y = 5; + this.txt2.defaultTextFormat = _loc5_; + this.getBtn0 = new UIButton("领取"); + this.bg1.addChild(this.getBtn0); + this.getBtn1 = new UIButton("领取"); + this.bg1.addChild(this.getBtn1); + this.getBtn2 = new UIButton("领取"); + this.bg1.addChild(this.getBtn2); + this.getBtn0.x = 149; + this.getBtn0.y = 220; + this.getBtn1.x = this.getBtn0.x; + this.getBtn1.y = 276; + this.getBtn2.x = this.getBtn1.x; + this.getBtn2.y = 330; + this.getBtn0.onClick = this.select; + this.getBtn1.onClick = this.select; + this.getBtn2.onClick = this.select; + var _loc8_:UIButton = new UIButton("立即完成",2); + this.bg2.addChild(_loc8_); + _loc8_.x = 206; + _loc8_.y = 340; + _loc8_.onClick = this.finishWithCash; + this.giveUpBtn = new UIButton("放弃"); + this.bg2.addChild(this.giveUpBtn); + this.giveUpBtn.x = _loc8_.x + 70; + this.giveUpBtn.y = _loc8_.y; + this.giveUpBtn.onClick = this.change; + this.doBtn = new UIButton("领取奖励",2); + this.bg2.addChild(this.doBtn); + this.doBtn.x = this.giveUpBtn.x + 60; + this.doBtn.y = _loc8_.y; + this.doBtn.onClick = this.finish; + this.contentMc = new MissContent3(); + this.bg2.addChild(this.contentMc); + this.contentMc.x = 12; + this.contentMc.y = 34; + ToolTipManager.getInstance().setToolTip(this.txt0,new TxtTooltip("需要声望达到1000"),true,1,false); + ToolTipManager.getInstance().setToolTip(this.txt1,new TxtTooltip("需要声望达到5000"),true,1,false); + ToolTipManager.getInstance().setToolTip(this.txt2,new TxtTooltip("需要声望达到20000"),true,1,false); + this.num_txt = PublicMethod.getTextFieldWithFillter(16568101,200); + this.bg2.addChild(this.num_txt); + this.num_txt.x = 20; + this.num_txt.y = 346; + this.num_txt.text = "今天还可以领取" + NewUserData.getHonorMissionNum() + "次声望任务"; + } + + override public function setPosition() : void + { + } + + public function addEvent() : void + { + this.list(); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_showUserMissionByType,this.showUpdate); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_showHonorGift,this.showHonorGiftSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_changeHonorMission,this.changeHonorMissionSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_commitMission,this.gainNewHonorMissionSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_commitMissionCash,this.gainNewHonorMissionSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_gainHonorGift,this.selectResult); + Utils.g_events.addEventListener(DevEvent.USERCHANGE,this.getTimes); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_showUserMissionByType,this.showUpdate); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_showHonorGift,this.showHonorGiftSucc); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_commitMissionCash,this.gainNewHonorMissionSucc); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_changeHonorMission,this.changeHonorMissionSucc); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_commitMission,this.gainNewHonorMissionSucc); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_gainHonorGift,this.selectResult); + Utils.g_events.removeEventListener(DevEvent.USERCHANGE,this.getTimes); + } + + private function getTimes(param1:DevEvent) : void + { + this.num_txt.text = "今天还可以领取" + NewUserData.getHonorMissionNum() + "次声望任务"; + } + + public function list() : void + { + ConnectService.getInstance().missionService.showUserMissionByType("QTYPE_HONOR"); + this.doBtn.setUnEnable(); + } + + private function showUpdate(param1:MissionEvent) : void + { + this.needCash = int(param1.obj); + var _loc2_:Array = param1.list; + var _loc3_:Object = _loc2_[0]; + if(_loc3_ == null) + { + this.giveUpBtn.setUnEnable(); + return; + } + this.contentMc.setData(_loc2_[0]); + this.userMissionId = _loc2_[0].userMissionId; + if(_loc3_.status == 1) + { + this.doBtn.setEnable(); + } + else + { + this.doBtn.setUnEnable(); + } + if(NewUserData.getHonorMissionNum() > 0) + { + this.giveUpBtn.setUnEnable(); + } + else + { + this.giveUpBtn.setEnable(); + } + this.showHonorGift(); + } + + private function showHonorGift() : void + { + ConnectService.getInstance().missionService.showHonorGift(); + } + + private function showHonorGiftSucc(param1:MissionEvent) : void + { + var _loc2_:Object = param1.obj; + this.txt.text = _loc2_.curr; + this.showGift(_loc2_.giftList); + } + + private function showGift(param1:Array) : void + { + var _loc2_:int = 0; + while(_loc2_ < param1.length) + { + if(param1[_loc2_].button == "can") + { + this["getBtn" + _loc2_].setEnable(); + } + else if(param1[_loc2_].button == "cannot") + { + this["getBtn" + _loc2_].setUnEnable(); + } + else if(param1[_loc2_].button == "has") + { + (this["getBtn" + _loc2_] as UIButton).setUnEnable(); + (this["getBtn" + _loc2_] as UIButton).setText("已领"); + } + (this["getBtn" + _loc2_] as UIButton).name = param1[_loc2_].level; + (this["txt" + _loc2_] as TextField).htmlText = "奖励:" + param1[_loc2_].gift + "" + "
声望达到" + "" + param1[_loc2_].relation + "" + "可领取"; + _loc2_++; + } + } + + private function change(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确认放弃此任务?\n(放弃会消耗声望任务次数)",this.onSubmit); + } + + private function onSubmit() : void + { + ConnectService.getInstance().missionService.changeHonorMission(this.userMissionId); + } + + private function changeHonorMissionSucc(param1:MissionEvent) : void + { + NewUserData.useHonorMission(); + this.list(); + } + + private function finish(param1:MouseEvent) : void + { + ConnectService.getInstance().missionService.commitMission(this.userMissionId); + } + + private function gainNewHonorMissionSucc(param1:MissionEvent) : void + { + if(param1.result != ReturnBean.STATUS_0) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + this.list(); + } + + private function select(param1:MouseEvent) : void + { + var _loc2_:int = int(param1.currentTarget.name); + ConnectService.getInstance().missionService.gainHonorGift(_loc2_); + } + + private function selectResult(param1:MissionEvent) : void + { + this.list(); + } + + private function finishWithCash(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确定花" + this.needCash + "元宝完成该声望任务吗",this.confirmDo); + } + + private function confirmDo() : void + { + ConnectService.getInstance().missionService.commitMissionWithCash(this.userMissionId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/MissionPage4.as b/flash_decompiled/com/view/ui/mission/MissionPage4.as new file mode 100644 index 0000000..7480cd0 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/MissionPage4.as @@ -0,0 +1,203 @@ +package com.view.ui.mission +{ + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.mission.event.MissionEvent; + import com.view.newui.UIButton; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.mission.mc.MissContent4; + import com.view.ui.mission.mc.MissItem; + import fl.containers.ScrollPane; + import flash.events.MouseEvent; + + public class MissionPage4 extends BaseUI + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var scrollPane:ScrollPane; + + private var refreshBtn:UIButton; + + private var doBtn:UIButton; + + private var contentMc:MissContent4; + + private var currItem:MissItem; + + private var missListVec:Vector.; + + public function MissionPage4() + { + var _loc4_:MissItem = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(212,367); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc1_:UITitleBg = new UITitleBg("任务列表",200); + this.bg1.addChild(_loc1_); + _loc1_.x = int(this.bg1.width / 2 - _loc1_.width / 2); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(396,367); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 4; + this.bg2.y = this.bg1.y; + var _loc2_:UITitleBg = new UITitleBg("任务说明",404); + this.bg2.addChild(_loc2_); + _loc2_.x = int(this.bg2.width / 2 - _loc2_.width / 2); + this.missListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc4_ = new MissItem(3); + this.bg1.addChild(_loc4_); + _loc4_.y = 26 + 26 * _loc3_; + _loc4_.x = 4; + _loc4_.clickFunc = this.clickTitle; + this.missListVec.push(_loc4_); + _loc4_.getList = this.list; + _loc3_++; + } + this.refreshBtn = new UIButton("刷 新",2); + this.bg1.addChild(this.refreshBtn); + this.refreshBtn.x = 84; + this.refreshBtn.y = 345; + this.refreshBtn.onClick = this.refresh; + this.doBtn = new UIButton("领取奖励",2); + this.bg2.addChild(this.doBtn); + this.doBtn.x = 330; + this.doBtn.y = 340; + this.doBtn.onClick = this.finisih; + this.contentMc = new MissContent4(); + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(398,320); + this.bg2.addChild(this.scrollPane); + this.scrollPane.x = 12; + this.scrollPane.y = 34; + this.scrollPane.source = this.contentMc; + } + + override public function setPosition() : void + { + } + + private function clickTitle(param1:MissItem) : void + { + if(param1.obj == null) + { + return; + } + if(this.currItem != param1) + { + this.currItem.setSelect(false); + } + this.currItem = param1; + if(this.currItem.obj.status == 1) + { + this.doBtn.setEnable(); + } + else + { + this.doBtn.setUnEnable(); + } + ConnectService.getInstance().missionService.showOneLeagueMission(this.currItem.obj.leagueId,this.currItem.obj.missionId); + } + + public function addEvent() : void + { + this.list(); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_showUserLeagueMissionByType,this.showUserLeagueMissionByTypeSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_showOneLeagueMission,this.showOneLeagueMissionSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_commitLeagueMission,this.commitLeagueMissionSucc); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_showUserLeagueMissionByType,this.showUserLeagueMissionByTypeSucc); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_showOneLeagueMission,this.showOneLeagueMissionSucc); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_commitLeagueMission,this.commitLeagueMissionSucc); + } + + private function list() : void + { + ConnectService.getInstance().missionService.showUserLeagueMissionByType(face.currCasId); + } + + private function showUserLeagueMissionByTypeSucc(param1:MissionEvent) : void + { + var _loc3_:* = undefined; + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + var _loc2_:Array = param1.list; + if(_loc2_ == null || _loc2_.length == 0) + { + this.currItem.visible = false; + return; + } + if(param1.list) + { + for(_loc3_ in this.missListVec) + { + if(_loc2_[_loc3_]) + { + this.missListVec[_loc3_].setDate1(_loc2_[_loc3_]); + } + else + { + this.missListVec[_loc3_].setDate1(null); + } + } + } + if(this.currItem != null) + { + this.currItem.setSelect(false); + } + if(this.currItem == null) + { + this.currItem = this.missListVec[0]; + } + this.currItem.visible = true; + this.currItem.mouseClick(null); + } + + private function refresh(param1:MouseEvent) : void + { + this.refreshBtn.setUnEnable(); + this.list(); + } + + private function showOneLeagueMissionSucc(param1:MissionEvent) : void + { + this.refreshBtn.setEnable(); + this.contentMc.setData(param1.obj); + } + + private function finisih(param1:MouseEvent) : void + { + this.doBtn.setUnEnable(); + ConnectService.getInstance().missionService.commitLeagueMission(this.currItem.obj.leagueId,this.currItem.obj.missionId); + } + + private function commitLeagueMissionSucc(param1:MissionEvent) : void + { + this.doBtn.setEnable(); + if(param1.result != ReturnBean.STATUS_0) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + this.list(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/MissionPage5.as b/flash_decompiled/com/view/ui/mission/MissionPage5.as new file mode 100644 index 0000000..67d5a85 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/MissionPage5.as @@ -0,0 +1,230 @@ +package com.view.ui.mission +{ + import com.control.ConnectService; + import com.control.mission.event.MissionEvent; + import com.view.newui.UIButton; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.mission.mc.MissContent5; + import com.view.ui.mission.mc.MissItem; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class MissionPage5 extends BaseUI + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var missListVec:Vector.; + + private var scrollPane:ScrollPane; + + private var contentMc:MissContent5; + + private var doBtn:UIButton; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var currItem:MissItem; + + public function MissionPage5() + { + var _loc4_:MissItem = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(212,367); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc1_:UITitleBg = new UITitleBg("任务列表",200); + this.bg1.addChild(_loc1_); + _loc1_.x = int(this.bg1.width / 2 - _loc1_.width / 2); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(396,367); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 4; + this.bg2.y = this.bg1.y; + var _loc2_:UITitleBg = new UITitleBg("任务说明",404); + this.bg2.addChild(_loc2_); + _loc2_.x = int(this.bg2.width / 2 - _loc2_.width / 2); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(218,347); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg1.addChild(this.packScrollPane); + this.packScrollPane.x = 3; + this.packScrollPane.y = 26; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.missListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc4_ = new MissItem(4); + this.packMc.addChild(_loc4_); + _loc4_.y = 26 * _loc3_; + _loc4_.clickFunc = this.clickTitle; + this.missListVec.push(_loc4_); + _loc4_.getList = this.list; + _loc3_++; + } + this.packScrollPane.update(); + this.contentMc = new MissContent5(); + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(398,320); + this.bg2.addChild(this.scrollPane); + this.scrollPane.x = 12; + this.scrollPane.y = 34; + this.scrollPane.source = this.contentMc; + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.doBtn = new UIButton("领取奖励",2); + this.bg2.addChild(this.doBtn); + this.doBtn.x = 330; + this.doBtn.y = 340; + this.doBtn.onClick = this.commitActionMission; + } + + public function addEvent() : void + { + ConnectService.getInstance().addEventListener(MissionEvent.Miss_listAllActionMission,this.showMissionSucc); + ConnectService.getInstance().addEventListener(MissionEvent.Miss_commitActionMission,this.commitMissionSucc); + this.list(); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_listAllActionMission,this.showMissionSucc); + ConnectService.getInstance().removeEventListener(MissionEvent.Miss_commitActionMission,this.commitMissionSucc); + } + + private function list() : void + { + ConnectService.getInstance().missionService.listAllActionMission(); + } + + private function showMissionSucc(param1:MissionEvent) : void + { + this.showMenu(param1.list); + } + + private function showMenu(param1:Array) : void + { + var _loc2_:Object = null; + var _loc4_:Array = null; + var _loc6_:Object = null; + var _loc7_:* = undefined; + var _loc8_:MissItem = null; + var _loc3_:* = param1; + if(param1 == null || param1.length == 0) + { + return; + } + _loc4_ = new Array(); + var _loc5_:Array = new Array(); + for each(_loc6_ in param1) + { + if(_loc6_.para3 == 1) + { + _loc4_.push(_loc6_); + } + else + { + _loc5_.push(_loc6_); + } + } + _loc4_.sortOn("para1",Array.NUMERIC); + _loc4_ = _loc4_.concat(_loc5_); + this.clearList(); + if(_loc4_ != null && _loc4_.length > 0) + { + for(_loc7_ in _loc4_) + { + _loc8_ = new MissItem(4); + this.packMc.addChild(_loc8_); + _loc8_.y = 26 * _loc7_; + _loc8_.clickFunc = this.clickTitle; + this.missListVec.push(_loc8_); + _loc8_.getList = this.list; + this.missListVec[_loc7_].setDate1(_loc4_[_loc7_]); + } + } + this.packScrollPane.update(); + if(this.missListVec.length == 0) + { + return; + } + this.currItem = this.missListVec[0]; + this.currItem.mouseClick(null); + } + + private function clickTitle(param1:MissItem) : void + { + if(param1.obj == null) + { + return; + } + if(this.currItem != param1) + { + this.currItem.setSelect(false); + } + this.currItem = param1; + this.contentMc.setData(this.currItem.obj); + this.scrollPane.update(); + if(this.currItem.obj.status == 4) + { + this.doBtn.setText("领取奖励"); + this.doBtn.setEnable(); + } + else if(this.currItem.obj.status == 5) + { + this.doBtn.setText("已领取"); + this.doBtn.setUnEnable(); + } + else + { + this.doBtn.setText("领 取"); + this.doBtn.setUnEnable(); + } + } + + private function commitActionMission(param1:MouseEvent) : void + { + if(this.currItem == null || this.currItem.obj == null) + { + return; + } + ConnectService.getInstance().missionService.commitActionMission(this.currItem.obj.missionId); + } + + private function commitMissionSucc(param1:MissionEvent) : void + { + this.clearList(); + this.list(); + } + + override public function setPosition() : void + { + } + + private function clearList() : void + { + var _loc1_:* = undefined; + for(_loc1_ in this.missListVec) + { + this.missListVec[_loc1_].setDate1(null); + if(Boolean(this.missListVec[_loc1_]) && this.packMc.contains(this.missListVec[_loc1_])) + { + this.packMc.removeChild(this.missListVec[_loc1_]); + } + } + this.missListVec = new Vector.(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/MissionUI.as b/flash_decompiled/com/view/ui/mission/MissionUI.as new file mode 100644 index 0000000..cc68878 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/MissionUI.as @@ -0,0 +1,283 @@ +package com.view.ui.mission +{ + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class MissionUI extends BaseUI + { + + private static var instance:MissionUI; + + private var startPage:int; + + private var btnArr:Array = new Array(); + + private var paneBg:UIWindowBg; + + private var currPage:int = -1; + + private var page1:MissionPage1; + + private var page2:MissionPage2; + + private var page3:MissionPage3; + + private var page4:MissionPage4; + + private var page5:MissionPage5; + + public function MissionUI() + { + super(); + if(instance != null) + { + throw Error("单例,无法实例化"); + } + super.addUIBg(); + super.loadTitle(UITitleConfig.title_renwu); + this.setPosition(); + this.createUI(); + } + + public static function getInstance() : MissionUI + { + if(instance == null) + { + return instance = new MissionUI(); + } + return instance; + } + + public function setStartPage(param1:int) : void + { + this.startPage = param1; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc6_:int = 0; + var _loc7_:UITabBtn = null; + var _loc1_:UITabBtn = new UITabBtn("活动任务",2); + var _loc2_:UITabBtn = new UITabBtn("成长任务",2); + var _loc3_:UITabBtn = new UITabBtn("君主任务",2); + var _loc4_:UITabBtn = new UITabBtn("声望任务",2); + var _loc5_:UITabBtn = new UITabBtn("联盟任务",2); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + for each(_loc7_ in this.btnArr) + { + addChild(_loc7_); + _loc7_.x = 25 + _loc6_ * 66; + _loc7_.y = 40; + _loc7_.onClick = this.changTab; + _loc6_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.setBtnSelect(this.btnArr[this.startPage]); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.currPage = -1; + this.removePage(); + } + + private function changTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = null; + if(param1.currentTarget is UITabBtn) + { + _loc2_ = param1.currentTarget as UITabBtn; + this.setBtnSelect(_loc2_); + } + else + { + this.setBtnSelect(null); + } + } + + private function setBtnSelect(param1:UITabBtn) : void + { + var _loc2_:UITabBtn = null; + var _loc3_:int = 0; + var _loc4_:* = undefined; + if(param1 == null) + { + this.openPage(4); + for each(_loc2_ in this.btnArr) + { + if(_loc2_ is UITabBtn) + { + _loc2_.select = false; + } + } + return; + } + for(_loc4_ in this.btnArr) + { + _loc2_ = this.btnArr[_loc4_] as UITabBtn; + if(param1 == _loc2_) + { + _loc2_.select = true; + _loc3_ = _loc4_; + } + else + { + _loc2_.select = false; + } + } + this.openPage(_loc3_); + } + + override public function show() : void + { + super.show(); + } + + private function openPage(param1:int) : void + { + if(this.currPage == param1) + { + return; + } + this.removePage(); + this.currPage = param1; + this.addPage(); + } + + private function removePage() : void + { + switch(this.currPage) + { + case 1: + if(Boolean(this.page1) && this.paneBg.contains(this.page1)) + { + this.paneBg.removeChild(this.page1); + this.page1.clearEvent(); + } + break; + case 2: + if(Boolean(this.page2) && this.paneBg.contains(this.page2)) + { + this.paneBg.removeChild(this.page2); + this.page2.clearEvent(); + } + break; + case 3: + if(Boolean(this.page3) && this.paneBg.contains(this.page3)) + { + this.paneBg.removeChild(this.page3); + this.page3.clearEvent(); + } + break; + case 4: + if(Boolean(this.page4) && this.paneBg.contains(this.page4)) + { + this.paneBg.removeChild(this.page4); + this.page4.clearEvent(); + } + break; + case 0: + if(Boolean(this.page5) && this.paneBg.contains(this.page5)) + { + this.paneBg.removeChild(this.page5); + this.page5.clearEvent(); + } + } + } + + private function addPage() : void + { + switch(this.currPage) + { + case 0: + this.createPage5(); + break; + case 1: + this.createPage1(); + break; + case 2: + this.createPage2(); + break; + case 3: + this.createPage3(); + break; + case 4: + this.createPage4(); + } + } + + private function createPage1() : void + { + if(this.page1 == null) + { + this.page1 = new MissionPage1(); + } + this.paneBg.addChild(this.page1); + this.page1.addEvent(); + } + + private function createPage2() : void + { + if(this.page2 == null) + { + this.page2 = new MissionPage2(); + } + this.paneBg.addChild(this.page2); + this.page2.addEvent(); + } + + private function createPage3() : void + { + if(this.page3 == null) + { + this.page3 = new MissionPage3(); + } + this.paneBg.addChild(this.page3); + this.page3.addEvent(); + } + + private function createPage4() : void + { + if(this.page4 == null) + { + this.page4 = new MissionPage4(); + } + this.paneBg.addChild(this.page4); + this.page4.addEvent(); + } + + private function createPage5() : void + { + if(this.page5 == null) + { + this.page5 = new MissionPage5(); + } + this.paneBg.addChild(this.page5); + this.page5.addEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/data/DailyMissionData.as b/flash_decompiled/com/view/ui/mission/data/DailyMissionData.as new file mode 100644 index 0000000..3f78adc --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/data/DailyMissionData.as @@ -0,0 +1,139 @@ +package com.view.ui.mission.data +{ + import com.newdata.user.NewUserData; + + public class DailyMissionData + { + + public static const PROCESSING:String = "processing"; + + public static const WAITINT:String = "waiting"; + + public static const FINISH:String = "finish"; + + public var m_dMId:int; + + public var m_iconPath:String; + + public var m_name:String; + + public var m_desc:String; + + public var m_detail:String; + + public var m_userProperty:String; + + public var m_userValue:int; + + public var m_requActPoint:int; + + public var m_actTime:int; + + public var m_addHonor:int; + + public var m_resultMin:String; + + public var m_resultMid:String; + + public var m_resultMax:String; + + public var m_coldDownTime:int; + + public var m_rankId:int; + + public var actPointIsRed:int; + + public var status:String; + + public var timeDis:int; + + public var time:int; + + public function DailyMissionData(param1:Object) + { + super(); + this.m_dMId = param1.dmId; + this.m_iconPath = param1.iconPath; + this.m_name = param1.name; + this.m_desc = param1.missionDesc; + this.m_detail = param1.detail; + this.m_userProperty = param1.reUserProperty; + this.m_userValue = param1.reUserValue; + this.m_requActPoint = param1.requireActPoint; + this.m_actTime = param1.missionActTime; + this.m_addHonor = param1.addUserHonor; + this.m_resultMin = param1.resultMin; + this.m_resultMid = param1.resultMid; + this.m_resultMax = param1.resultMax; + this.m_coldDownTime = param1.coldDownTime; + this.m_rankId = param1.rankId; + } + + public function getIsRed() : int + { + if(NewUserData.getUser().rankId < this.m_rankId) + { + return 1; + } + return 0; + } + + public function getCondition() : String + { + return "君主等级达到Lv." + this.m_rankId; + } + + public function getConditionColor() : String + { + if(this.m_rankId > NewUserData.getUser().rankId) + { + return "#ff0000"; + } + return "#B1BBD4"; + } + + public function getPointColor() : String + { + if(this.m_requActPoint > NewUserData.getUser().leaveActPoint) + { + return "#ff0000"; + } + return "#B1BBD4"; + } + + public function getAwardStr() : String + { + return "君主经验+" + int(this.m_addHonor); + } + + public function getStatus() : int + { + var _loc1_:int = 0; + if(this.status == PROCESSING) + { + _loc1_ = 3; + this.time = this.timeDis; + return _loc1_; + } + if(this.status == WAITINT) + { + return 4; + } + if(this.status == FINISH) + { + if(this.timeDis > 0) + { + _loc1_ = 5; + this.time = this.timeDis; + return _loc1_; + } + } + if(this.getIsRed() == 1) + { + return 1; + } + return 2; + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/data/MissionData.as b/flash_decompiled/com/view/ui/mission/data/MissionData.as new file mode 100644 index 0000000..5a20609 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/data/MissionData.as @@ -0,0 +1,45 @@ +package com.view.ui.mission.data +{ + public class MissionData + { + + private static var instance:MissionData; + + public var dailyMisArr:Vector.; + + public function MissionData() + { + super(); + } + + public static function getInstance() : MissionData + { + if(instance == null) + { + instance = new MissionData(); + } + return instance; + } + + public function initDailyMission(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:DailyMissionData = null; + if(this.dailyMisArr != null) + { + return; + } + if(param1 == null) + { + throw new Error("任务初始化错误"); + } + this.dailyMisArr = new Vector.(); + for each(_loc2_ in param1) + { + _loc3_ = new DailyMissionData(_loc2_); + this.dailyMisArr.push(_loc3_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/mc/MissContent1.as b/flash_decompiled/com/view/ui/mission/mc/MissContent1.as new file mode 100644 index 0000000..71ba9ef --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/mc/MissContent1.as @@ -0,0 +1,169 @@ +package com.view.ui.mission.mc +{ + import com.common.PublicMethod; + import com.utils.Utils; + import flash.display.Sprite; + import flash.text.TextField; + + public class MissContent1 extends Sprite + { + + private var missItemMc:MissItemMc; + + private var titleText1:TextField; + + private var valueText1:TextField; + + private var line1:Sprite; + + private var titleText2:TextField; + + private var valueText2:TextField; + + private var line2:Sprite; + + private var titleText3:TextField; + + private var valueText3:TextField; + + private var line3:Sprite; + + private var titleText4:TextField; + + private var valueText4:TextField; + + public function MissContent1() + { + super(); + this.titleText1 = PublicMethod.getTextField(16175250,60); + this.valueText1 = this.createText(310); + this.line1 = this.getLine(); + addChild(this.titleText1); + this.titleText1.text = "任务描述:"; + this.titleText1.x = 7; + addChild(this.valueText1); + this.valueText1.x = 70; + addChild(this.line1); + this.titleText2 = PublicMethod.getTextField(16175250,60); + this.valueText2 = this.createText(310); + this.line2 = this.getLine(); + addChild(this.titleText2); + this.titleText2.text = "任务指南:"; + this.titleText2.x = 7; + addChild(this.valueText2); + this.valueText2.x = 70; + addChild(this.line2); + this.titleText3 = PublicMethod.getTextField(16175250,60); + this.valueText3 = this.createText(310); + this.line3 = this.getLine(); + addChild(this.titleText3); + this.titleText3.text = "任务目标:"; + this.titleText3.x = 7; + addChild(this.valueText3); + this.valueText3.x = 70; + addChild(this.line3); + this.titleText4 = PublicMethod.getTextField(16175250,60); + this.valueText4 = PublicMethod.getTextField(16175250,300); + addChild(this.titleText4); + this.titleText4.text = "任务奖励:"; + this.titleText4.x = 7; + addChild(this.valueText4); + this.valueText4.x = 70; + this.missItemMc = new MissItemMc(); + addChild(this.missItemMc); + this.missItemMc.x = 70; + } + + private function getLine() : Sprite + { + return PublicMethod.getTrLine(380); + } + + public function setData(param1:Object) : void + { + var _loc4_:int = 0; + if(param1 == null) + { + return; + } + this.valueText1.htmlText = Utils.getHtmlText(param1.missionDesc,"#B1BBD4"); + this.valueText2.htmlText = Utils.getHtmlText(param1.missionGuidDesc,"#B1BBD4"); + var _loc2_:String = ""; + if(param1.completeCondition >= 2 && param1.completeCondition <= 20) + { + _loc4_ = 0; + while(_loc4_ < 5) + { + if(!(param1["missionCompleteDesc" + (_loc4_ + 1)] != "" && param1["missionCompleteDesc" + (_loc4_ + 1)] != null)) + { + break; + } + if(param1["num" + (_loc4_ + 1)] >= param1["reEntNum" + (_loc4_ + 1)]) + { + _loc2_ += Utils.getHtmlText(param1["missionCompleteDesc" + (_loc4_ + 1)] + " " + param1["reEntNum" + (_loc4_ + 1)] + "/" + param1["reEntNum" + (_loc4_ + 1)],"#B1BBD4") + Utils.getHtmlText(" (已完成)","#00FF00") + "\n"; + } + else + { + _loc2_ += Utils.getHtmlText(param1["missionCompleteDesc" + (_loc4_ + 1)] + " " + param1["num" + (_loc4_ + 1)] + "/" + param1["reEntNum" + (_loc4_ + 1)],"#B1BBD4") + Utils.getHtmlText(" (未完成)","#FFFF00") + "\n"; + } + _loc4_++; + } + } + else if(param1.completeCondition == 1 || param1.completeCondition == 21 || param1.completeCondition == 22) + { + if(param1.status == 0) + { + _loc2_ = Utils.getHtmlText(param1.missionCompleteDesc1,"#B1BBD4") + Utils.getHtmlText(" (未完成)","#FFFF00"); + } + else if(param1.status == 1) + { + _loc2_ = Utils.getHtmlText(param1.missionCompleteDesc1,"#B1BBD4") + Utils.getHtmlText(" (已完成)","#00FF00"); + } + else if(param1.status == 2) + { + } + } + else if(param1.completeCondition == 30) + { + _loc2_ = Utils.getHtmlText(param1.missionCompleteDesc1,"#B1BBD4") + Utils.getHtmlText(" (已完成)","#00FF00"); + } + this.valueText3.htmlText = _loc2_; + this.valueText4.htmlText = Utils.getHtmlText(param1.award,"#B1BBD4"); + var _loc3_:Array = param1.itemList; + this.missItemMc.clear(); + if(_loc3_ != null && _loc3_.length > 0) + { + this.missItemMc.init(param1.itemList,param1.missionId); + this.initSize(true); + } + this.initSize(false); + } + + private function initSize(param1:Boolean) : void + { + this.valueText1.height = this.valueText1.textHeight + 8; + this.line1.y = this.valueText1.height + 8; + this.titleText2.y = this.line1.y + 8; + this.valueText2.y = this.titleText2.y; + this.valueText2.height = this.valueText2.textHeight + 8; + this.line2.y = this.valueText2.y + this.valueText2.height + 8; + this.titleText3.y = this.line2.y + 8; + this.valueText3.y = this.titleText3.y; + this.valueText3.height = this.valueText3.textHeight + 8; + this.line3.y = this.valueText3.y + this.valueText3.textHeight + 8; + this.titleText4.y = this.line3.y + 8; + this.valueText4.y = this.titleText4.y; + this.missItemMc.y = this.titleText4.y + 5; + } + + private function createText(param1:int) : TextField + { + var _loc2_:TextField = new TextField(); + _loc2_.multiline = true; + _loc2_.wordWrap = true; + _loc2_.width = param1; + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/mc/MissContent3.as b/flash_decompiled/com/view/ui/mission/mc/MissContent3.as new file mode 100644 index 0000000..879b896 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/mc/MissContent3.as @@ -0,0 +1,220 @@ +package com.view.ui.mission.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.utils.Utils; + import flash.display.Sprite; + import flash.text.TextField; + + public class MissContent3 extends Sprite + { + + private var star1:Sprite; + + private var star2:Sprite; + + private var star3:Sprite; + + private var star4:Sprite; + + private var star5:Sprite; + + private var star6:Sprite; + + private var star7:Sprite; + + private var star8:Sprite; + + private var star9:Sprite; + + private var star0:Sprite; + + private var missItemMc:MissItemMc; + + private var titleText1:TextField; + + private var valueText1:TextField; + + private var line1:Sprite; + + private var titleText2:TextField; + + private var valueText2:TextField; + + private var line2:Sprite; + + private var titleText3:TextField; + + private var titleText4:TextField; + + private var valueText4:TextField; + + private var line4:Sprite; + + private var titleText5:TextField; + + private var valueText5:TextField; + + public function MissContent3() + { + super(); + this.titleText1 = PublicMethod.getTextField(63231,60); + this.valueText1 = this.createText(310); + this.line1 = this.getLine(); + addChild(this.titleText1); + this.titleText1.text = "任务描述:"; + this.titleText1.x = 7; + addChild(this.valueText1); + this.valueText1.x = 70; + addChild(this.line1); + this.titleText2 = PublicMethod.getTextField(63231,60); + this.valueText2 = this.createText(310); + this.line2 = this.getLine(); + addChild(this.titleText2); + this.titleText2.text = "任务指南:"; + this.titleText2.x = 7; + addChild(this.valueText2); + this.valueText2.x = 70; + addChild(this.line2); + this.titleText3 = PublicMethod.getTextField(62976,60); + addChild(this.titleText3); + this.titleText3.text = "任务难度:"; + this.titleText3.x = 7; + var _loc1_:int = 0; + while(_loc1_ < 10) + { + this["star" + _loc1_] = InstallFace.getInstance().getSprite(ClassConfig.ui_star); + addChild(this["star" + _loc1_]); + this["star" + _loc1_].x = 70 + 20 * _loc1_; + _loc1_++; + } + this.titleText4 = PublicMethod.getTextField(62976,60); + this.valueText4 = PublicMethod.getTextField(16777215,290); + this.line4 = this.getLine(); + addChild(this.titleText4); + this.titleText4.text = "任务目标:"; + this.titleText4.x = 7; + addChild(this.valueText4); + this.valueText4.x = 70; + addChild(this.line4); + this.titleText5 = PublicMethod.getTextField(16759296,60); + this.valueText5 = PublicMethod.getTextField(16175250,160); + addChild(this.titleText5); + this.titleText5.text = "任务奖励:"; + this.titleText5.x = 7; + addChild(this.valueText5); + this.valueText5.x = 70; + this.missItemMc = new MissItemMc(); + addChild(this.missItemMc); + this.missItemMc.x = 70; + } + + private function getLine() : Sprite + { + return PublicMethod.getTrLine(380); + } + + public function setData(param1:Object) : void + { + var _loc6_:int = 0; + this.valueText1.htmlText = Utils.getHtmlText(param1.missionDesc,"#B1BBD4"); + this.valueText2.htmlText = Utils.getHtmlText(param1.missionGuidDesc,"#B1BBD4"); + var _loc2_:String = ""; + if(param1.completeCondition >= 2 && param1.completeCondition <= 20) + { + _loc6_ = 0; + while(_loc6_ < 5) + { + if(!(param1["missionCompleteDesc" + (_loc6_ + 1)] != "" && param1["missionCompleteDesc" + (_loc6_ + 1)] != null)) + { + break; + } + if(param1["num" + (_loc6_ + 1)] >= param1["reEntNum" + (_loc6_ + 1)]) + { + _loc2_ += Utils.getHtmlText(param1["missionCompleteDesc" + (_loc6_ + 1)] + " " + param1["reEntNum" + (_loc6_ + 1)] + "/" + param1["reEntNum" + (_loc6_ + 1)],"#ffffff") + Utils.getHtmlText(" (已完成)","#00FF00") + "\n"; + } + else + { + _loc2_ += Utils.getHtmlText(param1["missionCompleteDesc" + (_loc6_ + 1)] + " " + param1["num" + (_loc6_ + 1)] + "/" + param1["reEntNum" + (_loc6_ + 1)],"#ffffff") + Utils.getHtmlText(" (未完成)","#FFFF00") + "\n"; + } + _loc6_++; + } + } + else if(param1.completeCondition == 1 || param1.completeCondition == 21) + { + if(param1.status == 0) + { + _loc2_ = Utils.getHtmlText(param1.missionCompleteDesc1,"#B1BBD4") + Utils.getHtmlText(" (未完成)","#FFFF00"); + } + else if(param1.status == 1) + { + _loc2_ = Utils.getHtmlText(param1.missionCompleteDesc1,"#B1BBD4") + Utils.getHtmlText(" (已完成)","#00FF00"); + } + else if(param1.status == 2) + { + } + } + else if(param1.completeCondition == 30) + { + _loc2_ = Utils.getHtmlText(param1.missionCompleteDesc1,"#B1BBD4") + Utils.getHtmlText(" (已完成)","#00FF00"); + } + var _loc3_:int = int(param1.missionHardLevel); + var _loc4_:int = 0; + while(_loc4_ < 10) + { + if(_loc4_ < _loc3_) + { + this["star" + _loc4_].visible = true; + } + else + { + this["star" + _loc4_].visible = false; + } + _loc4_++; + } + this.valueText4.htmlText = _loc2_; + this.valueText5.htmlText = Utils.getHtmlText(param1.award,"#B1BBD4"); + var _loc5_:Array = param1.itemList; + this.missItemMc.clear(); + if(_loc5_ != null && _loc5_.length > 0) + { + this.missItemMc.init(param1.itemList,param1.missionId); + } + this.initSize(); + } + + private function initSize() : void + { + this.valueText1.height = this.valueText1.textHeight + 8; + this.line1.y = this.valueText1.height; + this.titleText2.y = this.line1.y + 8; + this.valueText2.y = this.titleText2.y; + this.valueText2.height = this.valueText2.textHeight + 8; + this.line2.y = this.titleText2.y + this.titleText2.height + 8; + this.titleText3.y = this.line2.y + 8; + var _loc1_:int = 0; + while(_loc1_ < 10) + { + this["star" + _loc1_].y = this.titleText3.y; + _loc1_++; + } + this.titleText4.y = this.titleText3.y + 28; + this.valueText4.y = this.titleText4.y; + this.line4.y = this.titleText4.y + this.valueText4.textHeight + 8; + this.titleText5.y = this.line4.y + 8; + this.valueText5.y = this.titleText5.y; + this.missItemMc.y = this.titleText5.y + 30; + } + + private function createText(param1:int) : TextField + { + var _loc2_:TextField = new TextField(); + _loc2_.multiline = true; + _loc2_.wordWrap = true; + _loc2_.width = param1; + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/mc/MissContent4.as b/flash_decompiled/com/view/ui/mission/mc/MissContent4.as new file mode 100644 index 0000000..c035b42 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/mc/MissContent4.as @@ -0,0 +1,153 @@ +package com.view.ui.mission.mc +{ + import com.common.PublicMethod; + import com.utils.Utils; + import flash.display.Sprite; + import flash.text.TextField; + + public class MissContent4 extends Sprite + { + + private var titleText1:TextField; + + private var valueText1:TextField; + + private var line1:Sprite; + + private var titleText2:TextField; + + private var valueText2:TextField; + + private var line2:Sprite; + + private var titleText3:TextField; + + private var valueText3:TextField; + + private var line3:Sprite; + + private var titleText4:TextField; + + private var valueText4:TextField; + + private var line4:Sprite; + + private var titleText5:TextField; + + private var valueText5:TextField; + + public function MissContent4() + { + super(); + this.titleText1 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText1 = this.createText(310); + this.line1 = this.getLine(); + addChild(this.titleText1); + this.titleText1.text = "任务描述:"; + this.titleText1.x = 7; + addChild(this.valueText1); + this.valueText1.x = 70; + addChild(this.line1); + this.titleText2 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText2 = this.createText(310); + this.line2 = this.getLine(); + addChild(this.titleText2); + this.titleText2.text = "任务指南:"; + this.titleText2.x = 7; + addChild(this.valueText2); + this.valueText2.x = 70; + addChild(this.line2); + this.titleText3 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText3 = PublicMethod.getTextFieldWithFillter(16175250,300); + this.line3 = this.getLine(); + addChild(this.titleText3); + this.titleText3.text = "任务目标:"; + this.titleText3.x = 7; + addChild(this.valueText3); + this.valueText3.x = 70; + addChild(this.line3); + this.titleText4 = PublicMethod.getTextFieldWithFillter(16175250,80); + this.valueText4 = PublicMethod.getTextFieldWithFillter(16175250,260); + this.line4 = this.getLine(); + addChild(this.titleText4); + this.titleText4.text = "联盟完成次数:"; + this.titleText4.x = 7; + addChild(this.valueText4); + this.valueText4.x = 90; + addChild(this.line4); + this.titleText5 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText5 = this.createText(310); + addChild(this.titleText5); + this.titleText5.text = "任务奖励:"; + this.titleText5.x = 7; + addChild(this.valueText5); + this.valueText5.x = 70; + } + + private function getLine() : Sprite + { + return PublicMethod.getTrLine(380); + } + + public function setData(param1:Object) : void + { + this.valueText1.htmlText = Utils.getHtmlText(param1.missionDesc,"#B1BBD4"); + this.valueText1.height = this.valueText1.textHeight + 8; + this.line1.y = this.valueText1.height + 8; + this.valueText2.htmlText = Utils.getHtmlText(param1.guide,"#B1BBD4"); + this.titleText2.y = this.line1.y + 8; + this.valueText2.y = this.titleText2.y; + this.valueText2.height = this.valueText2.textHeight + 8; + this.line2.y = this.valueText2.y + this.valueText2.height + 8; + var _loc2_:String = ""; + if(param1.status == 0) + { + _loc2_ = Utils.getHtmlText(param1.missionDex,"#B1BBD4") + Utils.getHtmlText(" (未完成)","#FFFF00"); + } + else if(param1.status == 1) + { + _loc2_ = Utils.getHtmlText(param1.missionDex,"#B1BBD4") + Utils.getHtmlText(" (已完成)","#00FF00"); + } + else if(param1.status == 2) + { + _loc2_ = Utils.getHtmlText(param1.missionDex,"#B1BBD4") + " " + Utils.getHtmlText("等待刷新","#FFFF00"); + } + this.valueText3.htmlText = _loc2_; + this.titleText3.y = this.line2.y + 8; + this.valueText3.y = this.titleText3.y; + this.valueText3.height = this.valueText3.textHeight + 8; + this.line3.y = this.valueText3.y + this.valueText3.textHeight + 8; + if(param1.leagueDex != null) + { + this.titleText4.visible = true; + this.valueText4.visible = true; + this.line4.visible = true; + this.valueText4.htmlText = Utils.getHtmlText(param1.leagueDex,"#B1BBD4"); + this.titleText4.y = this.line3.y + 8; + this.valueText4.y = this.titleText4.y; + this.line4.y = this.valueText4.y + this.valueText4.textHeight + 8; + this.valueText5.htmlText = Utils.getHtmlText(param1.award,"#B1BBD4"); + this.titleText5.y = this.line4.y + 8; + this.valueText5.y = this.titleText5.y; + } + else + { + this.titleText4.visible = false; + this.valueText4.visible = false; + this.line4.visible = false; + this.valueText5.htmlText = Utils.getHtmlText(param1.award,"#B1BBD4"); + this.titleText5.y = this.line3.y + 8; + this.valueText5.y = this.titleText5.y; + } + } + + private function createText(param1:int) : TextField + { + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(16175250,param1); + _loc2_.multiline = true; + _loc2_.wordWrap = true; + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/mc/MissContent5.as b/flash_decompiled/com/view/ui/mission/mc/MissContent5.as new file mode 100644 index 0000000..8a17e59 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/mc/MissContent5.as @@ -0,0 +1,153 @@ +package com.view.ui.mission.mc +{ + import com.common.PublicMethod; + import com.utils.Utils; + import flash.display.Sprite; + import flash.text.TextField; + + public class MissContent5 extends Sprite + { + + private var missItemMc:MissItemMc; + + private var titleText1:TextField; + + private var valueText1:TextField; + + private var line1:Sprite; + + private var titleText2:TextField; + + private var valueText2:TextField; + + private var line2:Sprite; + + private var titleText3:TextField; + + private var valueText3:TextField; + + private var line3:Sprite; + + private var titleText4:TextField; + + private var valueText4:TextField; + + private var line4:Sprite; + + private var titleText5:TextField; + + private var valueText5:TextField; + + private var line5:Sprite; + + private var titleText6:TextField; + + public function MissContent5() + { + super(); + this.titleText1 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText1 = this.createText(310); + this.line1 = PublicMethod.getTrLine(380); + addChild(this.titleText1); + this.titleText1.text = "任务名称:"; + this.titleText1.x = 7; + addChild(this.valueText1); + this.valueText1.x = 70; + addChild(this.line1); + this.titleText2 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText2 = PublicMethod.getTextFieldWithFillter(16175250,260); + this.line2 = PublicMethod.getTrLine(380); + addChild(this.titleText2); + this.titleText2.text = "活动时间:"; + this.titleText2.x = 7; + addChild(this.valueText2); + this.valueText2.x = 70; + addChild(this.line2); + this.titleText3 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText3 = this.createText(310); + this.line3 = PublicMethod.getTrLine(380); + addChild(this.titleText3); + this.titleText3.text = "活动简介:"; + this.titleText3.x = 7; + addChild(this.valueText3); + this.valueText3.x = 70; + addChild(this.line3); + this.titleText4 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText4 = this.createText(310); + this.line4 = PublicMethod.getTrLine(380); + addChild(this.titleText4); + this.titleText4.text = "活动规则:"; + this.titleText4.x = 7; + addChild(this.valueText4); + this.valueText4.x = 70; + addChild(this.line4); + this.titleText5 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText5 = this.createText(310); + this.line5 = PublicMethod.getTrLine(380); + addChild(this.titleText5); + this.titleText5.text = "活动目标:"; + this.titleText5.x = 7; + addChild(this.valueText5); + this.valueText5.x = 70; + addChild(this.line5); + this.titleText6 = PublicMethod.getTextFieldWithFillter(16175250,60); + addChild(this.titleText6); + this.titleText6.text = "活动奖励:"; + this.titleText6.x = 7; + this.missItemMc = new MissItemMc(); + addChild(this.missItemMc); + this.missItemMc.x = 70; + } + + private function getLine() : Sprite + { + return PublicMethod.getTrLine(380); + } + + public function setData(param1:Object) : void + { + this.valueText1.htmlText = Utils.getHtmlText(param1.name2,"#B1BBD4"); + this.valueText2.htmlText = Utils.getHtmlText(param1.time,"#B1BBD4"); + this.valueText3.htmlText = Utils.getHtmlText(param1.desc,"#B1BBD4"); + this.valueText4.htmlText = Utils.getHtmlText(param1.guide,"#B1BBD4"); + this.valueText5.htmlText = Utils.getHtmlText(param1.dex,"#B1BBD4"); + var _loc2_:Array = param1.itemList; + this.missItemMc.clear(); + if(_loc2_ != null && _loc2_.length > 0) + { + this.missItemMc.init(param1.itemList,param1.missionId); + } + this.initSize(); + } + + private function initSize() : void + { + this.valueText1.height = this.valueText1.textHeight + 8; + this.line1.y = this.valueText1.height; + this.titleText2.y = this.line1.y + 8; + this.valueText2.y = this.titleText2.y; + this.line2.y = this.titleText2.y + this.titleText2.height + 8; + this.titleText3.y = this.line2.y + 8; + this.valueText3.y = this.titleText3.y; + this.line3.y = this.titleText3.y + this.valueText3.textHeight + 8; + this.titleText4.y = this.line3.y + 8; + this.valueText4.y = this.titleText4.y; + this.line4.y = this.titleText4.y + this.valueText4.textHeight + 8; + this.titleText5.y = this.line4.y + 8; + this.valueText5.y = this.titleText5.y; + this.line5.y = this.titleText5.y + this.valueText5.textHeight + 8; + this.titleText6.y = this.line5.y + 8; + this.missItemMc.y = this.titleText6.y + 5; + } + + private function createText(param1:int) : TextField + { + var _loc2_:TextField = new TextField(); + _loc2_.multiline = true; + _loc2_.wordWrap = true; + _loc2_.width = param1; + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/mc/MissContentMc.as b/flash_decompiled/com/view/ui/mission/mc/MissContentMc.as new file mode 100644 index 0000000..440ea0d --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/mc/MissContentMc.as @@ -0,0 +1,170 @@ +package com.view.ui.mission.mc +{ + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.ui.mission.data.DailyMissionData; + import com.view.world.EmptyContainer; + import flash.display.Sprite; + import flash.text.TextField; + + public class MissContentMc extends EmptyContainer + { + + private var titleText1:TextField; + + private var valueText1:TextField; + + private var line1:Sprite; + + private var titleText2:TextField; + + private var valueText2:TextField; + + private var line2:Sprite; + + private var titleText3:TextField; + + private var valueText3:TextField; + + private var line3:Sprite; + + private var titleText4:TextField; + + private var valueText4:TextField; + + private var line4:Sprite; + + private var titleText5:TextField; + + private var valueText5:TextField; + + private var line5:Sprite; + + private var titleText6:TextField; + + private var valueText6:TextField; + + private var line6:Sprite; + + private var titleText7:TextField; + + private var valueText7:TextField; + + public function MissContentMc() + { + super(); + this.titleText1 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText1 = this.createText(310); + this.line1 = this.getLine(); + addChild(this.titleText1); + this.titleText1.text = "任务描述:"; + this.titleText1.x = 7; + addChild(this.valueText1); + this.valueText1.x = 70; + addChild(this.line1); + this.titleText2 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText2 = PublicMethod.getTextFieldWithFillter(16175250,200); + this.line2 = this.getLine(); + addChild(this.titleText2); + this.titleText2.text = "任务前提:"; + this.titleText2.x = 7; + addChild(this.valueText2); + this.valueText2.x = 70; + addChild(this.line2); + this.titleText3 = PublicMethod.getTextFieldWithFillter(16175250,70); + this.valueText3 = PublicMethod.getTextFieldWithFillter(16175250,200); + this.line3 = this.getLine(); + addChild(this.titleText3); + this.titleText3.text = "消耗行动力:"; + this.titleText3.x = 7; + addChild(this.valueText3); + this.valueText3.x = 80; + addChild(this.line3); + this.titleText4 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText4 = PublicMethod.getTextFieldWithFillter(16175250,200); + this.line4 = this.getLine(); + addChild(this.titleText4); + this.titleText4.text = "任务时间:"; + this.titleText4.x = 7; + addChild(this.valueText4); + this.valueText4.x = 70; + addChild(this.line4); + this.titleText5 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText5 = PublicMethod.getTextFieldWithFillter(16175250,200); + this.line5 = this.getLine(); + addChild(this.titleText5); + this.titleText5.text = "冷却时间:"; + this.titleText5.x = 7; + addChild(this.valueText5); + this.valueText5.x = 70; + addChild(this.line5); + this.titleText6 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText6 = this.createText(310); + this.line6 = this.getLine(); + addChild(this.titleText6); + this.titleText6.text = "任务详情:"; + this.titleText6.x = 7; + addChild(this.valueText6); + this.valueText6.x = 70; + addChild(this.line6); + this.titleText7 = PublicMethod.getTextFieldWithFillter(16175250,60); + this.valueText7 = PublicMethod.getTextFieldWithFillter(16175250,200); + addChild(this.titleText7); + this.titleText7.text = "任务奖励:"; + this.titleText7.x = 7; + addChild(this.valueText7); + this.valueText7.x = 70; + } + + private function createText(param1:int) : TextField + { + var _loc2_:TextField = new TextField(); + _loc2_.multiline = true; + _loc2_.wordWrap = true; + _loc2_.width = param1; + return _loc2_; + } + + private function initSize() : void + { + this.valueText1.height = this.valueText1.textHeight + 8; + this.line1.y = this.valueText1.height; + this.titleText2.y = this.line1.y + 8; + this.valueText2.y = this.titleText2.y; + this.line2.y = this.titleText2.y + this.titleText2.height + 8; + this.titleText3.y = this.line2.y + 8; + this.valueText3.y = this.titleText3.y; + this.line3.y = this.titleText3.y + this.titleText3.height + 8; + this.titleText4.y = this.line3.y + 8; + this.valueText4.y = this.titleText4.y; + this.line4.y = this.titleText4.y + this.titleText4.height + 8; + this.titleText5.y = this.line4.y + 8; + this.valueText5.y = this.titleText5.y; + this.line5.y = this.titleText5.y + this.titleText5.height + 8; + this.titleText6.y = this.line5.y + 8; + this.valueText6.y = this.titleText6.y; + this.valueText6.height = this.valueText6.textHeight + 8; + this.line6.y = this.valueText6.y + this.valueText6.height + 8; + this.titleText7.y = this.line6.y + 8; + this.valueText7.y = this.titleText7.y; + } + + private function getLine() : Sprite + { + return PublicMethod.getTrLine(380); + } + + public function setData(param1:DailyMissionData) : void + { + this.valueText1.htmlText = Utils.getHtmlText(param1.m_desc,"#B1BBD4"); + this.valueText2.htmlText = Utils.getHtmlText(param1.getCondition(),param1.getConditionColor()); + this.valueText3.htmlText = Utils.getHtmlText(param1.m_requActPoint.toString(),param1.getPointColor()); + this.valueText4.htmlText = Utils.getHtmlText(PublicMethod.getTimeStr(param1.m_actTime),"#B1BBD4"); + this.valueText5.htmlText = Utils.getHtmlText(PublicMethod.getTimeStr(param1.m_coldDownTime),"#B1BBD4"); + this.valueText6.htmlText = Utils.getHtmlText(param1.m_detail,"#B1BBD4"); + this.valueText7.htmlText = Utils.getHtmlText(param1.getAwardStr(),"#B1BBD4"); + this.initSize(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/mc/MissItem.as b/flash_decompiled/com/view/ui/mission/mc/MissItem.as new file mode 100644 index 0000000..a0429f7 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/mc/MissItem.as @@ -0,0 +1,290 @@ +package com.view.ui.mission.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.ui.mission.data.DailyMissionData; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class MissItem extends Sprite + { + + private var _title_txt:TextField; + + private var _state_txt:TextField; + + private var type:int; + + private var playBar:MovieClip; + + private var face:InstallFace = InstallFace.getInstance(); + + private var bg1:Sprite; + + private var bg2:Sprite; + + public var obj:Object; + + public var missData:DailyMissionData; + + private var isSelect:Boolean; + + public var isCold:Boolean; + + private var coldTime:int; + + private var timer:Timer; + + public var getList:Function; + + public var setTimeFunc:Function; + + public var clickFunc:Function; + + public function MissItem(param1:int) + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,215,24); + this.bg1.alpha = 0.2; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,215,24); + this.bg2.alpha = 0.3; + addChild(this.bg1); + addChild(this.bg2); + this.bg1.visible = false; + this.bg2.visible = false; + this.type = param1; + this._title_txt = PublicMethod.getTextFieldWithFillter(16245593,152); + addChild(this._title_txt); + this._title_txt.x = 4; + this._state_txt = PublicMethod.getTextFieldWithFillter(16640697,62); + addChild(this._state_txt); + this._title_txt.y = 4; + this._state_txt.y = 4; + this._state_txt.x = this._title_txt.width; + this.playBar = this.face.getMovieClip(ClassConfig.playBar); + addChild(this.playBar); + this.playBar.gotoAndStop(1); + this.playBar.x = this._state_txt.x - 10; + this.playBar.y = this._state_txt.y; + this.playBar.visible = false; + var _loc2_:Sprite = PublicMethod.getTrLine(214); + addChild(_loc2_); + _loc2_.y = 25; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.CLICK,this.mouseClick); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.type == 4 || this.type == 0 || this.type == 3) + { + if(Boolean(this.obj) && !this.isSelect) + { + this.bg1.visible = false; + } + } + if(this.type == 2) + { + if(Boolean(this.missData) && !this.isSelect) + { + this.bg1.visible = false; + } + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.type == 4 || this.type == 0 || this.type == 3) + { + if(Boolean(this.obj) && !this.isSelect) + { + this.bg1.visible = true; + } + } + if(this.type == 2) + { + if(Boolean(this.missData) && !this.isSelect) + { + this.bg1.visible = true; + } + } + } + + public function setDate1(param1:Object) : void + { + this.obj = param1; + if(this.obj == null) + { + this._title_txt.text = ""; + this._state_txt.text = ""; + this.playBar.visible = false; + this.isSelect = false; + this.bg1.visible = false; + this.bg2.visible = false; + return; + } + this.initStatus(); + } + + public function setDate(param1:DailyMissionData) : void + { + this.missData = param1; + this.initStatus(); + this.isCold = false; + if(this.missData.status == DailyMissionData.WAITINT) + { + this.coldTime = this.missData.time; + this.startTime(); + } + } + + private function startTime() : void + { + if(this.coldTime <= 0) + { + return; + } + this.isCold = true; + 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.coldTime; + if(this.setTimeFunc != null) + { + this.setTimeFunc("剩余时间:" + PublicMethod.getTimeStr(this.coldTime)); + } + if(this.coldTime <= 0) + { + if(this.getList != null) + { + this.getList(); + } + this.stopTime(); + } + } + + private function stopTime() : void + { + if(this.timer) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.startFrame); + this.timer = null; + this.coldTime = 0; + } + } + + public function mouseClick(param1:MouseEvent) : void + { + if(this.obj == null && this.type == 0) + { + return; + } + if(this.type == 4 && this.obj == null) + { + return; + } + if(this.type == 3 && this.obj == null) + { + return; + } + this.setSelect(true); + if(this.clickFunc != null) + { + this.clickFunc(this); + } + } + + public function setSelect(param1:Boolean) : void + { + this.isSelect = param1; + this.bg1.visible = false; + this.bg2.visible = param1; + } + + private function initStatus() : void + { + if(this.type == 0) + { + this._title_txt.htmlText = String(this.obj.missionName); + if(this.obj.status == 0) + { + this._state_txt.htmlText = Utils.getHtmlText("未完成","#FFFF00","13"); + } + if(this.obj.status == 1) + { + this._state_txt.htmlText = Utils.getHtmlText("已完成","#00FF00","13"); + } + if(this.obj.status == 2) + { + this._state_txt.htmlText = Utils.getHtmlText("等待刷新","#FFFF00","13"); + } + } + else if(this.type != 1) + { + if(this.type == 2) + { + this._title_txt.htmlText = String(this.missData.m_name); + switch(this.missData.getStatus()) + { + case 1: + this._state_txt.htmlText = Utils.getHtmlText("不可执行","#FF3300","13"); + break; + case 2: + this._state_txt.htmlText = Utils.getHtmlText("可执行","#00FF00","13"); + break; + case 3: + this._state_txt.htmlText = Utils.getHtmlText("执行中","#FFFF00","13"); + break; + case 4: + this._state_txt.htmlText = Utils.getHtmlText("等待","#FFFF00","13"); + break; + case 5: + this._state_txt.htmlText = Utils.getHtmlText("冷却中","#FF3300","13"); + } + } + else if(this.type == 3) + { + this._title_txt.htmlText = String(this.obj.missionName); + if(this.obj.status == 0) + { + this._state_txt.htmlText = Utils.getHtmlText("未完成","#FFFF00","13"); + } + if(this.obj.status == 1) + { + this._state_txt.htmlText = Utils.getHtmlText("已完成","#00FF00","13"); + } + if(this.obj.status == 2) + { + this._state_txt.htmlText = Utils.getHtmlText("等待刷新","#FFFF00","13"); + } + } + else if(this.type == 4) + { + this._title_txt.htmlText = String(this.obj.name); + this.playBar.visible = true; + this.playBar.gotoAndStop(int(this.obj.status) + 1); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/mission/mc/MissItemMc.as b/flash_decompiled/com/view/ui/mission/mc/MissItemMc.as new file mode 100644 index 0000000..8490462 --- /dev/null +++ b/flash_decompiled/com/view/ui/mission/mc/MissItemMc.as @@ -0,0 +1,121 @@ +package com.view.ui.mission.mc +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.tip.ItemTip; + import com.view.ui.activity.gift.NewItemMc; + import com.view.world.EmptyContainer; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class MissItemMc extends EmptyContainer + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var count:int; + + private var currNum:int; + + private var itemArr:Array; + + private var currMissId:String; + + private var redLoad:LoadResource; + + private var tipVec:Vector.; + + public function MissItemMc() + { + super(); + this.tipVec = new Vector.(); + } + + public function init(param1:Array, param2:String) : void + { + var _loc5_:Object = null; + var _loc6_:NewItemMc = null; + this.itemArr = param1; + this.count = this.itemArr.length; + this.currMissId = param2; + var _loc3_:int = 0; + var _loc4_:int = 0; + for each(_loc5_ in this.itemArr) + { + _loc5_.missId = param2; + _loc6_ = new NewItemMc(1); + addChild(_loc6_); + if(_loc4_ == 6) + { + _loc3_ = 0; + } + if(_loc4_ > 5) + { + _loc6_.y = 50; + } + _loc6_.x = 50 * _loc3_; + this.tipVec.push(_loc6_); + _loc5_.itemNums = _loc5_.num; + _loc6_.setObj(_loc5_); + _loc6_.loadTip(_loc5_); + _loc3_++; + if(++_loc4_ > 11) + { + break; + } + } + } + + private function loadImg(param1:Object) : void + { + this.redLoad = new LoadResource(ServerConfig.IMAGE_EQUIP_URL + param1.iconPath,this.loadPngBack); + } + + private function loadPngBack(param1:Event) : void + { + var _loc3_:Sprite = null; + var _loc4_:TextField = null; + if(stage == null || this.currNum >= this.count || this.itemArr[this.currNum].missId != this.currMissId) + { + this.redLoad.clear(); + return; + } + var _loc2_:Bitmap = param1.target.loader.content as Bitmap; + _loc3_ = new Sprite(); + _loc3_.addChild(_loc2_); + addChild(_loc3_); + this.redLoad.clear(); + _loc3_.x = this.currNum * 90; + _loc4_ = PublicMethod.getTextFieldWithFillter(16777215,40); + addChild(_loc4_); + _loc4_.text = "*" + this.itemArr[this.currNum].num; + _loc4_.x = _loc3_.x + _loc3_.width + 4; + _loc4_.y = 35; + var _loc5_:ItemTip = new ItemTip(_loc3_,this.face.stage,this.face.tip_bg,this.itemArr[this.currNum]); + if(this.currNum < this.count - 1) + { + ++this.currNum; + this.loadImg(this.itemArr[this.currNum]); + } + this.tipVec.push(_loc5_); + } + + override public function clear() : void + { + super.clear(); + var _loc1_:int = int(this.tipVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.tipVec[_loc2_].destroyTip(); + this.tipVec.splice(_loc2_,1); + _loc2_--; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/office/CityBuildTime.as b/flash_decompiled/com/view/ui/office/CityBuildTime.as new file mode 100644 index 0000000..3e7d24d --- /dev/null +++ b/flash_decompiled/com/view/ui/office/CityBuildTime.as @@ -0,0 +1,135 @@ +package com.view.ui.office +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.data.data.items.AddSpeed; + import com.utils.TimerManager; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.addspeed.AddSpeedUI; + import com.view.ui.buildlist.TimerInfo; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class CityBuildTime extends Sprite + { + + private var face:InstallFace; + + private var textformat:TextFormat; + + private var buildTime:TextField; + + public var timeInfo:TimerInfo; + + private var bg:Sprite; + + public function CityBuildTime(param1:TimerInfo) + { + var _loc4_:TextField = null; + var _loc5_:TextField = null; + var _loc6_:UISmallBtn = null; + this.face = InstallFace.getInstance(); + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,614,23); + addChild(this.bg); + this.bg.y = 1; + this.bg.alpha = 0; + this.timeInfo = param1; + this.textformat = new TextFormat(); + this.textformat.align = "center"; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(_loc2_); + _loc2_.text = this.timeInfo.timerName; + _loc2_.setTextFormat(this.textformat); + _loc2_.y = 3; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(_loc3_); + _loc3_.x = _loc2_.width; + _loc3_.y = _loc2_.y; + _loc3_.text = this.timeInfo.upStr; + _loc3_.setTextFormat(this.textformat); + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(_loc4_); + _loc4_.x = _loc3_.x + _loc3_.width; + _loc4_.y = _loc2_.y; + _loc4_.text = this.timeInfo.timerLevel + " 级"; + _loc4_.setTextFormat(this.textformat); + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(_loc5_); + _loc5_.x = _loc4_.x + _loc4_.width; + _loc5_.y = _loc2_.y; + _loc5_.text = this.timeInfo.timerLevel + 1 + " 级"; + _loc5_.setTextFormat(this.textformat); + this.buildTime = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + addChild(this.buildTime); + this.buildTime.x = _loc5_.x + _loc5_.width; + this.buildTime.y = _loc2_.y; + this.buildTime.text = this.timeInfo.timerStr; + _loc5_.setTextFormat(this.textformat); + _loc6_ = new UISmallBtn("加 速",2); + addChild(_loc6_); + _loc6_.x = this.buildTime.x + this.buildTime.width + 25; + _loc6_.y = 2; + _loc6_.addEventListener(MouseEvent.CLICK,this.addSpeedBuild,false,0,true); + var _loc7_:UISmallBtn = new UISmallBtn("取 消",2); + addChild(_loc7_); + _loc7_.x = _loc6_.x + _loc6_.width + 10; + _loc7_.y = _loc6_.y; + _loc7_.addEventListener(MouseEvent.CLICK,this.cancelBuild,false,0,true); + addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true); + } + + public function getTimer(param1:TimerInfo) : void + { + this.buildTime.text = param1.timerStr; + this.buildTime.setTextFormat(this.textformat); + } + + private function addSpeedBuild(param1:MouseEvent) : void + { + var _loc2_:AddSpeed = new AddSpeed(); + _loc2_.id = this.timeInfo.queId; + _loc2_.fastQueType = this.timeInfo.timeType; + var _loc3_:AddSpeedUI = AddSpeedUI.getInstance(); + _loc3_.getFastInfo(_loc2_); + _loc3_.addToStage(); + } + + private function cancelBuild(param1:MouseEvent) : void + { + var _loc2_:int = this.timeInfo.queId; + switch(this.timeInfo.timeType) + { + case 1: + TimerManager.getInstance().cancelBuild(_loc2_); + break; + case 2: + TimerManager.getInstance().cancelTech(); + break; + case 3: + TimerManager.getInstance().cancelWall(_loc2_); + } + } + + private function rollOut(param1:MouseEvent) : void + { + this.bg.alpha = 0; + } + + private function rollOver(param1:MouseEvent) : void + { + this.bg.alpha = 0.2; + } + + public function clear() : void + { + removeEventListener(MouseEvent.ROLL_OUT,this.rollOut); + removeEventListener(MouseEvent.ROLL_OVER,this.rollOver); + } + } +} + diff --git a/flash_decompiled/com/view/ui/office/Emptyarea.as b/flash_decompiled/com/view/ui/office/Emptyarea.as new file mode 100644 index 0000000..610c9d2 --- /dev/null +++ b/flash_decompiled/com/view/ui/office/Emptyarea.as @@ -0,0 +1,65 @@ +package com.view.ui.office +{ + import com.comfig.ClassConfig; + import com.data.MemeberShip; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import com.view.ui.BuildListUI; + import flash.events.MouseEvent; + + public class Emptyarea extends BaseBuild + { + + private var buildType:int; + + private var lastCasLv:int; + + public function Emptyarea(param1:BuildData, param2:int = 1) + { + super(); + this.buildType = param2; + super.buildData = param1; + bgSwf = face.getMovieClip(ClassConfig.lib_emptyarea); + bgSwf.gotoAndStop(param2); + super.addSwfBg(); + super.addEvent(); + this.lastCasLv = MemeberShip.getMainCastle().rangeLv; + Utils.g_events.addEventListener(DevEvent.CASTLECHANGE,this.checkTip); + } + + private function checkTip(param1:DevEvent) : void + { + if(MemeberShip.getMainCastle().rangeLv != this.lastCasLv) + { + this.lastCasLv = MemeberShip.getMainCastle().rangeLv; + if(!canClick) + { + setTipText(); + } + } + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(!canClick) + { + return; + } + var _loc2_:BuildListUI = BuildListUI.getInstance(); + _loc2_.setClickArea(buildData.posNo,this.buildType); + _loc2_.addSelf(); + _loc2_.getBuildList(); + } + + private function getBuildList() : void + { + } + + override public function viewBuildInfo() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/office/MainCity.as b/flash_decompiled/com/view/ui/office/MainCity.as new file mode 100644 index 0000000..27c268b --- /dev/null +++ b/flash_decompiled/com/view/ui/office/MainCity.as @@ -0,0 +1,105 @@ +package com.view.ui.office +{ + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.tip.BuildTipTitle; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.events.MouseEvent; + + public class MainCity extends BaseBuild + { + + public function MainCity(param1:BuildData) + { + super(); + super.buildData = param1; + markMc = face.getSprite(ClassConfig.ui_economic_bg); + addChild(markMc); + markMc.alpha = 0; + markMc.x = -13; + markMc.y = -40; + } + + override public function setSwfBgUnClick() : void + { + bgSwf.mouseEnabled = false; + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/YamunView3.swf"; + buildData.picUrl = "pic/build/YamunView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/YamunView2.swf"; + buildData.picUrl = "pic/build/YamunView2.png"; + } + else + { + buildData.swfUrl = "pic/build/YamunView1.swf"; + buildData.picUrl = "pic/build/YamunView1.png"; + } + super.checkBuildRes(); + } + + override public function addEvent() : void + { + markMc.addEventListener(MouseEvent.ROLL_OVER,mouseOverBuild); + markMc.addEventListener(MouseEvent.ROLL_OUT,mouseOutBuild); + markMc.addEventListener(MouseEvent.CLICK,mouseClick); + } + + override public function setTipInfo(param1:Object) : void + { + if(tipTitle == null) + { + tipTitle = new BuildTipTitle(markMc,face.stage,face.tip_bg,param1); + } + else + { + tipTitle.infoObject = param1; + } + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = MainCityUI.getInstance(); + MainCityUI.getInstance().setData(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + + override public function setTimeMcPosi() : void + { + getBuildTimeMc().x = 126; + getBuildTimeMc().y = 20; + } + + override public function setNameMcPosi() : void + { + getBuildNameMc().x = 150; + getBuildNameMc().y = -10; + } + + override public function setUpingMcPosi() : void + { + getBuildUpMc().x = 130; + getBuildUpMc().y = -188; + } + } +} + diff --git a/flash_decompiled/com/view/ui/office/MainCityUI.as b/flash_decompiled/com/view/ui/office/MainCityUI.as new file mode 100644 index 0000000..fa15113 --- /dev/null +++ b/flash_decompiled/com/view/ui/office/MainCityUI.as @@ -0,0 +1,145 @@ +package com.view.ui.office +{ + import com.utils.TimerManager; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.buildlist.TimerInfo; + import flash.events.Event; + + public class MainCityUI extends BaseUI + { + + private static var instance:MainCityUI; + + private var tableMc:UITable; + + private var buildListArr:Array = new Array(); + + public function MainCityUI() + { + super(); + } + + public static function getInstance() : MainCityUI + { + if(instance == null) + { + instance = new MainCityUI(); + } + return instance; + } + + public function setData(param1:BaseBuild) : void + { + super.addUIBg(); + super.loadTitle(UITitleConfig.title_guanfu); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + var _loc2_:UITitleBg = new UITitleBg("城池动态",_loc1_.width); + _loc1_.addChild(_loc2_); + _loc2_.x = int(_loc1_.width / 2 - _loc2_.width / 2); + var _loc3_:Array = ["项 目","状 态","当前等级","目标等级","剩余时间","操 作"]; + var _loc4_:Array = [100,100,80,80,100,166]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(10,_loc3_,_loc4_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 27; + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + this.openBuildList(); + } + + public function openBuildList() : void + { + var _loc3_:int = 0; + var _loc4_:TimerInfo = null; + var _loc5_:CityBuildTime = null; + this.closeBuildList(); + var _loc1_:int = TimerManager.getInstance().getBuildTimerLength(); + var _loc2_:int = TimerManager.getInstance().getSkillTimerLength(); + if(_loc1_ > 0 || _loc2_ > 0) + { + _loc3_ = 0; + for each(_loc4_ in TimerManager.getInstance().getBuildTimeMap()) + { + _loc5_ = new CityBuildTime(_loc4_); + this.tableMc.addChild(_loc5_); + _loc5_.y = 26 + _loc3_ * 25; + _loc5_.x = 4; + _loc4_.process3 = _loc5_.getTimer; + _loc4_.finish3 = this.openBuildList; + this.buildListArr.push(_loc5_); + _loc3_++; + } + for each(_loc4_ in TimerManager.getInstance().getTechTimeMap()) + { + _loc5_ = new CityBuildTime(_loc4_); + this.tableMc.addChild(_loc5_); + _loc5_.y = 26 + _loc3_ * 25; + _loc5_.x = 4; + _loc4_.process3 = _loc5_.getTimer; + _loc4_.finish3 = this.openBuildList; + this.buildListArr.push(_loc5_); + _loc3_++; + } + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + this.closeBuildList(); + } + + private function closeBuildList() : void + { + var _loc1_:CityBuildTime = null; + for each(_loc1_ in this.buildListArr) + { + _loc1_.timeInfo.process3 = null; + _loc1_.timeInfo.finish3 = null; + _loc1_.clear(); + this.tableMc.removeChild(_loc1_); + } + this.buildListArr = new Array(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/BatchView.as b/flash_decompiled/com/view/ui/pak/BatchView.as new file mode 100644 index 0000000..f906798 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/BatchView.as @@ -0,0 +1,191 @@ +package com.view.ui.pak +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.MemeberShip; + import com.view.cache.ImgCache; + 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.tip.ItemTip; + 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 BatchView extends UIWindowBg + { + + private static var instance:BatchView; + + private var bg:Sprite; + + private var itemTip:ItemTip; + + private var itemBg:Sprite; + + private var okBtn:UIButton; + + public var inputMc:UINumInputText; + + private var label1:TextField; + + public var itemObject:Object; + + private var loadItemPng:LoadResource; + + private var url:String; + + private var itemImg:Bitmap; + + public function BatchView() + { + var _loc3_:TextField = null; + super(); + if(instance != null) + { + throw Error("单例"); + } + initSize(90,114); + loadTitle(UITitleConfig.title_piliangshiyong); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(260,80); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.leading = 4; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,180); + this.label1.wordWrap = true; + this.label1.multiline = true; + this.label1.height = 72; + this.label1.text = ""; + _loc1_.addChild(this.label1); + this.label1.x = 78; + this.label1.y = 10; + this.label1.defaultTextFormat = _loc2_; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc3_.text = "使用数量:"; + bg1.addChild(_loc3_); + _loc3_.x = 10; + _loc3_.y = _loc1_.y + _loc1_.height + 10; + this.inputMc = new UINumInputText(80); + bg1.addChild(this.inputMc); + this.inputMc.x = _loc3_.x + _loc3_.width; + this.inputMc.y = _loc3_.y - 3; + this.okBtn = new UIButton("确 定",2,10); + bg1.addChild(this.okBtn); + this.okBtn.x = this.inputMc.x + 90; + this.okBtn.y = this.inputMc.y; + this.okBtn.onClick = this.submit; + this.itemBg = face.getSprite(ClassConfig.build_ironItem); + _loc1_.addChild(this.itemBg); + this.itemBg.x = 10; + this.itemBg.y = 10; + } + + public static function getInstance() : BatchView + { + if(instance == null) + { + instance = new BatchView(); + } + return instance; + } + + public function update(param1:Object) : void + { + this.itemObject = param1; + if(this.itemObject == null) + { + return; + } + this.loadItemImg(); + this.label1.text = param1.viewMap.desc; + if(param1.itemCount) + { + this.inputMc.setMaxNum(param1.itemCount); + } + else + { + this.inputMc.setMaxNum(1); + } + this.inputMc.setTextNum(1); + } + + private function loadItemImg() : void + { + if(Boolean(this.itemImg) && this.itemBg.contains(this.itemImg)) + { + this.itemBg.removeChild(this.itemImg); + } + this.url = ServerConfig.IMAGE_ITEM_URL + this.itemObject.viewMap.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(this.url,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + if(this.itemObject == null) + { + this.loadItemPng.clear(); + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemBg.addChild(this.itemImg); + this.itemImg.x = 5; + this.itemImg.y = 4; + if(this.itemTip == null) + { + this.itemTip = new ItemTip(this.itemBg,face.stage,face.tip_bg,this.itemObject.viewMap); + } + else + { + this.itemTip.setTipData(this.itemObject.viewMap); + } + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:int = this.inputMc.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("输入数字不能为0"); + return; + } + if(_loc2_ > 500000) + { + MessageBoxUI.getInstance().addMessage("最多能批量使用500000个"); + return; + } + closeSelf(null); + ConnectService.getInstance().itemsService.useBatchItem(this.itemObject.id,MemeberShip.getMainCastle().casId,_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/CasMovePane.as b/flash_decompiled/com/view/ui/pak/CasMovePane.as new file mode 100644 index 0000000..00dabca --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/CasMovePane.as @@ -0,0 +1,84 @@ +package com.view.ui.pak +{ + 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.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class CasMovePane extends UIWindowBg + { + + private static var instance:CasMovePane; + + public function CasMovePane() + { + var _loc4_:UIButton = null; + super(); + if(instance != null) + { + throw Error("单例"); + } + initSize(125,90); + loadTitle(UITitleConfig.title_putongqiancheng); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(295,60); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.leading = 4; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,270); + _loc3_.wordWrap = true; + _loc3_.multiline = true; + _loc3_.height = 38; + _loc3_.text = ""; + _loc1_.addChild(_loc3_); + _loc3_.defaultTextFormat = _loc2_; + _loc3_.x = 20; + _loc3_.y = 20; + _loc3_.text = "您的城池将被系统随机的迁往本国的一个建城点。"; + _loc4_ = new UIButton("确 定",2,10); + bg1.addChild(_loc4_); + _loc4_.x = 130; + _loc4_.y = 88; + _loc4_.onClick = this.submit; + Utils.g_events.addEventListener(DevEvent.CASTLEMOVE,this.moveCastleSucc); + } + + public static function getInstance() : CasMovePane + { + if(instance == null) + { + instance = new CasMovePane(); + } + return instance; + } + + private function submit(param1:MouseEvent) : void + { + ConnectService.getInstance().castleService.moveCastle(); + } + + private function moveCastleSucc(param1:DevEvent) : void + { + closeSelf(null); + } + + public function showSelf(param1:*) : void + { + param1.addChild(this); + x = int(param1.width / 2 - width / 2); + y = int(param1.height / 2 - height / 2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/CasMoveSePane.as b/flash_decompiled/com/view/ui/pak/CasMoveSePane.as new file mode 100644 index 0000000..be60208 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/CasMoveSePane.as @@ -0,0 +1,131 @@ +package com.view.ui.pak +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.MemeberShip; + import com.events.DevEvent; + import com.utils.Utils; + 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.MovieClip; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class CasMoveSePane extends UIWindowBg + { + + private static var instance:CasMoveSePane; + + private var xy_txt:TextField; + + private var inputX:UINumInputText; + + private var inputY:UINumInputText; + + private var moveMmc:MovieClip; + + public function CasMoveSePane() + { + var _loc4_:TextField = null; + super(); + if(instance != null) + { + throw Error("单例"); + } + initSize(125,140); + loadTitle(UITitleConfig.title_gaojiqiancheng); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(295,110); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.leading = 4; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,270); + _loc3_.height = 38; + _loc3_.wordWrap = true; + _loc3_.multiline = true; + _loc3_.defaultTextFormat = _loc2_; + _loc1_.addChild(_loc3_); + _loc3_.x = 15; + _loc3_.y = 15; + _loc3_.text = "只能将城池迁往本国的空白建城点,点击小地图的建城点按钮可以查看所有空白建城点位置"; + this.xy_txt = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,170); + _loc1_.addChild(this.xy_txt); + this.xy_txt.x = 35; + this.xy_txt.y = 55; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,75); + _loc4_.text = "迁移坐标:X"; + _loc1_.addChild(_loc4_); + _loc4_.x = 15; + _loc4_.y = 80; + this.inputX = new UINumInputText(50); + this.inputX.hiddenBtn(); + _loc1_.addChild(this.inputX); + this.inputX.x = _loc4_.x + _loc4_.width; + this.inputX.y = _loc4_.y - 3; + this.inputX.setMaxChars(4); + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,20); + _loc5_.text = "Y"; + _loc1_.addChild(_loc5_); + _loc5_.x = this.inputX.x + this.inputX.width; + _loc5_.y = _loc4_.y; + this.inputY = new UINumInputText(50); + this.inputY.hiddenBtn(); + _loc1_.addChild(this.inputY); + this.inputY.x = _loc5_.x + 20; + this.inputY.y = this.inputX.y; + this.inputY.setMaxChars(4); + var _loc6_:UIButton = new UIButton("迁 城",2,10); + bg1.addChild(_loc6_); + _loc6_.x = 130; + _loc6_.y = 135; + _loc6_.onClick = this.submit; + Utils.g_events.addEventListener(DevEvent.CASTLEMOVE,this.moveCastleSucc); + } + + public static function getInstance() : CasMoveSePane + { + if(instance == null) + { + instance = new CasMoveSePane(); + } + return instance; + } + + private function submit(param1:MouseEvent) : void + { + if(this.inputX.getTextNum() == 0 || this.inputY.getTextNum() == 0) + { + MessageBoxUI.getInstance().addMessage("请输入迁移坐标"); + return; + } + ConnectService.getInstance().castleService.moveCastleSe(this.inputX.getTextNum(),this.inputY.getTextNum()); + } + + private function moveCastleSucc(param1:DevEvent) : void + { + closeSelf(null); + } + + public function update() : void + { + this.xy_txt.text = "当前坐标 X:" + MemeberShip.getMainCastle().posX + " Y:" + MemeberShip.getMainCastle().posY; + } + + public function showSelf(param1:*) : void + { + param1.addChild(this); + x = int(param1.width / 2 - width / 2); + y = int(param1.height / 2 - height / 2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/EditUserNameUI.as b/flash_decompiled/com/view/ui/pak/EditUserNameUI.as new file mode 100644 index 0000000..d5834d4 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/EditUserNameUI.as @@ -0,0 +1,87 @@ +package com.view.ui.pak +{ + 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.newui.UIInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class EditUserNameUI extends UIWindowBg + { + + private static var instance:EditUserNameUI; + + private var input1:UIInputText; + + public function EditUserNameUI() + { + super(); + initSize(80,90); + loadTitle(UITitleConfig.title_junzhugaiming); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(250,50); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,125); + _loc2_.text = "请输入新的君主名称:"; + _loc1_.addChild(_loc2_); + _loc2_.x = 15; + _loc2_.y = 25; + this.input1 = new UIInputText(100); + this.input1.setMaxChars(10); + _loc1_.addChild(this.input1); + this.input1.x = _loc2_.x + _loc2_.width; + this.input1.y = _loc2_.y - 3; + var _loc3_:UIButton = new UIButton("确 定",2,10); + addChild(_loc3_); + _loc3_.x = 130; + _loc3_.y = 120; + _loc3_.onClick = this.submit; + Utils.g_events.addEventListener(DevEvent.UPDATEUSERNAME,this.updateUserNameSucc); + } + + public static function getInstance() : EditUserNameUI + { + if(instance == null) + { + instance = new EditUserNameUI(); + } + return instance; + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.input1.getText()); + if(_loc2_ == "" || _loc2_.length < 3) + { + MessageBoxUI.getInstance().addMessage("君主名称长度最少大于3"); + return; + } + ConnectService.getInstance().castleService.updateUserName(_loc2_); + } + + private function updateUserNameSucc(param1:DevEvent) : void + { + MessageBoxUI.getInstance().addMessage("君主名称修改成功"); + closeSelf(null); + } + + public function showSelf(param1:*) : void + { + param1.addChild(this); + x = int(param1.width / 2 - width / 2); + y = int(param1.height / 2 - height / 2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/ExchangeItem.as b/flash_decompiled/com/view/ui/pak/ExchangeItem.as new file mode 100644 index 0000000..7672d88 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/ExchangeItem.as @@ -0,0 +1,83 @@ +package com.view.ui.pak +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.view.newui.UIWindowBg; + import com.view.tip.ItemTip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class ExchangeItem extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var loadItemPng:LoadResource; + + private var itemTip:ItemTip; + + public var itemObj:Object; + + private var itemImg:Bitmap; + + public function ExchangeItem() + { + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(47,47); + addChild(_loc1_); + } + + public function loadImg(param1:Object) : void + { + this.itemObj = param1; + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + this.loadItemPng = new LoadResource(ServerConfig.IMAGE_ITEM_URL + param1.img,this.loadPngBack); + } + + private function loadPngBack(param1:Event) : void + { + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + if(this.itemObj == null) + { + this.loadItemPng.clear(); + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + this.itemImg.width = 52; + this.itemImg.height = 52; + addChild(this.itemImg); + this.itemImg.x = 2; + this.itemImg.y = 2; + if(this.itemTip) + { + this.itemTip.destroyTip(); + this.itemTip = null; + } + this.itemTip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj.viewMap); + this.loadItemPng.clear(); + } + + public function clear() : void + { + this.itemObj = null; + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/ExchangePage.as b/flash_decompiled/com/view/ui/pak/ExchangePage.as new file mode 100644 index 0000000..14a5e28 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/ExchangePage.as @@ -0,0 +1,476 @@ +package com.view.ui.pak +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.pack.event.UserPackEvent; + import com.utils.Utils; + import com.view.mc.sprite.*; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.pak.data.PackExchangeItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.pak.mc.ExchangeMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Bitmap; + import flash.display.Shape; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class ExchangePage extends Sprite + { + + private var bg:UIWindowBg; + + private var face:InstallFace; + + private var tab1:UITabBtn; + + private var tab2:UITabBtn; + + private var tab3:UITabBtn; + + private var tab4:UITabBtn; + + private var tab5:UITabBtn; + + private var tab6:UITabBtn; + + private var tab7:UITabBtn; + + private var tab8:UITabBtn; + + private var tab9:UITabBtn; + + private var bg1:UIWindowBg; + + private var itemScroll:ScrollPane; + + private var itemSp:Sprite; + + private var itemList:Vector.; + + private var lastTab:UITabBtn; + + private var lastPage:Sprite; + + private var type:int; + + private var lastMc:ExchangeMc; + + private var page1:ExchangePage_1; + + private var page2:ExchangePage_2; + + public function ExchangePage() + { + var _loc5_:ExchangeMc = null; + this.face = InstallFace.getInstance(); + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + this.tab1 = new UITabBtn("道 具"); + this.tab2 = new UITabBtn("装 备"); + this.tab3 = new UITabBtn("材 料"); + this.tab4 = new UITabBtn("其 他"); + this.tab5 = new UITabBtn("玉 帛"); + this.tab6 = new UITabBtn("图 纸"); + this.tab7 = new UITabBtn("宠物宝石",2); + this.tab8 = new UITabBtn("琉 玉"); + this.tab9 = new UITabBtn("武 魂"); + this.tab1.buttonMode = true; + this.tab2.buttonMode = true; + this.tab3.buttonMode = true; + this.tab4.buttonMode = true; + this.tab5.buttonMode = true; + this.tab6.buttonMode = true; + this.tab7.buttonMode = true; + this.tab8.buttonMode = true; + this.tab9.buttonMode = true; + addChild(this.tab1); + this.tab1.x = 13; + this.tab1.y = 10; + addChild(this.tab2); + this.tab2.x = this.tab1.x + 56; + this.tab2.y = this.tab1.y; + addChild(this.tab3); + this.tab3.x = this.tab2.x + 56; + this.tab3.y = this.tab1.y; + addChild(this.tab4); + this.tab4.x = this.tab3.x + 56; + this.tab4.y = this.tab1.y; + addChild(this.tab5); + this.tab5.x = this.tab4.x + 56; + this.tab5.y = this.tab1.y; + addChild(this.tab6); + this.tab6.x = this.tab5.x + 56; + this.tab6.y = this.tab1.y; + addChild(this.tab7); + this.tab7.x = this.tab6.x + 56; + this.tab7.y = this.tab1.y; + addChild(this.tab8); + this.tab8.x = this.tab7.x + 65; + this.tab8.y = this.tab1.y; + addChild(this.tab9); + this.tab9.x = this.tab8.x + 56; + this.tab9.y = this.tab1.y; + this.tab1.onClick = this.changeType; + this.tab2.onClick = this.changeType; + this.tab3.onClick = this.changeType; + this.tab4.onClick = this.changeType; + this.tab5.onClick = this.changeType; + this.tab6.onClick = this.changeType; + this.tab7.onClick = this.changeType; + this.tab8.onClick = this.changeType; + this.tab9.onClick = this.changeType; + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(614,302); + addChild(this.bg1); + this.bg1.x = 8; + this.bg1.y = this.tab1.y + 25; + var _loc1_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_exchange_5)); + this.bg1.addChild(_loc1_); + _loc1_.x = 162; + _loc1_.y = 2; + _loc1_.width = 460; + _loc1_.height = 309; + var _loc2_:UITitleBg = new UITitleBg("兑换列表",160); + this.bg1.addChild(_loc2_); + var _loc3_:Shape = PublicMethod.drawLine(0,0,0,311,7759679); + this.bg1.addChild(_loc3_); + _loc3_.x = 160; + this.itemList = new Vector.(); + this.itemSp = new Sprite(); + var _loc4_:int = 0; + while(_loc4_ < 12) + { + _loc5_ = new ExchangeMc(); + this.itemSp.addChild(_loc5_); + this.itemList.push(_loc5_); + _loc5_.y = 23 * _loc4_; + _loc5_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc4_++; + } + this.itemScroll = new ScrollPane(); + this.itemScroll.setSize(159,277); + this.itemScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg1.addChild(this.itemScroll); + this.itemScroll.x = 1; + this.itemScroll.y = 24; + this.itemScroll.source = this.itemSp; + this.itemScroll.update(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + } + + private function changeType(param1:MouseEvent) : void + { + if(param1.currentTarget == this.lastTab) + { + return; + } + if(this.lastMc) + { + this.lastMc.setClick(false); + this.lastMc = null; + } + if(this.lastTab) + { + this.lastTab.select = false; + } + if(param1.currentTarget == this.tab1) + { + this.lastTab = this.tab1; + this.type = 1; + if(this.lastPage != this.getPage1()) + { + if(this.lastPage) + { + this.bg1.removeChild(this.lastPage); + } + this.lastPage = this.getPage1(); + this.bg1.addChild(this.lastPage); + } + } + else if(param1.currentTarget == this.tab2) + { + this.type = 2; + this.lastTab = this.tab2; + if(this.lastPage != this.getPage1()) + { + if(this.lastPage) + { + this.bg1.removeChild(this.lastPage); + } + this.lastPage = this.getPage1(); + this.bg1.addChild(this.lastPage); + } + } + else if(param1.currentTarget == this.tab3) + { + this.type = 3; + this.lastTab = this.tab3; + if(this.lastPage != this.getPage2()) + { + if(this.lastPage) + { + this.bg1.removeChild(this.lastPage); + } + this.lastPage = this.getPage2(); + this.bg1.addChild(this.lastPage); + } + } + else if(param1.currentTarget == this.tab4) + { + this.type = 4; + this.lastTab = this.tab4; + if(this.lastPage != this.getPage2()) + { + if(this.lastPage) + { + this.bg1.removeChild(this.lastPage); + } + this.lastPage = this.getPage2(); + this.bg1.addChild(this.lastPage); + } + } + else if(param1.currentTarget == this.tab5) + { + this.type = 5; + this.lastTab = this.tab5; + if(this.lastPage != this.getPage1()) + { + if(this.lastPage) + { + this.bg1.removeChild(this.lastPage); + } + this.lastPage = this.getPage1(); + this.bg1.addChild(this.lastPage); + } + } + else if(param1.currentTarget == this.tab6) + { + this.type = 6; + this.lastTab = this.tab6; + if(this.lastPage != this.getPage1()) + { + if(this.lastPage) + { + this.bg1.removeChild(this.lastPage); + } + this.lastPage = this.getPage1(); + this.bg1.addChild(this.lastPage); + } + } + else if(param1.currentTarget == this.tab7) + { + this.type = 7; + this.lastTab = this.tab7; + if(this.lastPage != this.getPage1()) + { + if(this.lastPage) + { + this.bg1.removeChild(this.lastPage); + } + this.lastPage = this.getPage1(); + this.bg1.addChild(this.lastPage); + } + } + else if(param1.currentTarget == this.tab8) + { + this.type = 8; + this.lastTab = this.tab8; + if(this.lastPage != this.getPage1()) + { + if(this.lastPage) + { + this.bg1.removeChild(this.lastPage); + } + this.lastPage = this.getPage1(); + this.bg1.addChild(this.lastPage); + } + } + else if(param1.currentTarget == this.tab9) + { + this.type = 9; + this.lastTab = this.tab9; + if(this.lastPage != this.getPage1()) + { + if(this.lastPage) + { + this.bg1.removeChild(this.lastPage); + } + this.lastPage = this.getPage1(); + this.bg1.addChild(this.lastPage); + } + } + if(this.page1) + { + this.page1.clear(); + } + if(this.page2) + { + this.page2.clear(); + } + this.lastTab.select = true; + this.getItemList(); + } + + private function addEvent(param1:Event) : void + { + Utils.g_events.addEventListener(UserPackEvent.Exchange_getItemList,this.getItemListResult); + ConnectService.getInstance().addEventListener(UserPackEvent.Exchange_getItemById,this.getItemViewResult); + ConnectService.getInstance().addEventListener(UserPackEvent.Exchange_exchangeItem,this.exchangeItemResult); + this.tab1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function clearEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(UserPackEvent.Exchange_getItemList,this.getItemListResult); + ConnectService.getInstance().removeEventListener(UserPackEvent.Exchange_getItemById,this.getItemViewResult); + ConnectService.getInstance().removeEventListener(UserPackEvent.Exchange_exchangeItem,this.exchangeItemResult); + } + + private function getItemListResult(param1:UserPackEvent) : void + { + if(this.type != param1._type) + { + return; + } + this.getItemList(); + } + + private function getItemList() : void + { + var _loc2_:* = undefined; + var _loc3_:ExchangeMc = null; + this.clearList(); + var _loc1_:Vector. = PakState.getExchangeListByType(this.type); + if(_loc1_ == null || _loc1_.length == 0) + { + return; + } + for(_loc2_ in _loc1_) + { + if(_loc2_ > 11) + { + _loc3_ = new ExchangeMc(); + this.itemSp.addChild(_loc3_); + this.itemList.push(_loc3_); + _loc3_.y = 23 * _loc2_; + _loc3_.setItem(_loc1_[_loc2_]); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.itemList[_loc2_].setItem(_loc1_[_loc2_]); + } + } + this.itemList[0].dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + this.itemScroll.update(); + } + + private function clearList() : void + { + var _loc1_:int = int(this.itemList.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ < 12) + { + this.itemList[_loc2_].setItem(null); + } + else + { + this.itemSp.removeChild(this.itemList[_loc2_]); + this.itemList[_loc2_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.itemList[_loc2_].clear(); + this.itemList.splice(_loc2_,1); + } + _loc2_--; + } + this.itemScroll.update(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:ExchangeMc = param1.currentTarget as ExchangeMc; + if(this.lastMc) + { + this.lastMc.setClick(false); + } + this.lastMc = _loc2_; + this.lastMc.setClick(true); + if(_loc2_.getItemObj()) + { + this.getItemById(_loc2_.getItemObj().id); + } + } + + private function getPage1() : ExchangePage_1 + { + if(this.page1 == null) + { + this.page1 = new ExchangePage_1(); + this.page1.x = 160; + } + return this.page1; + } + + private function getPage2() : ExchangePage_2 + { + if(this.page2 == null) + { + this.page2 = new ExchangePage_2(); + this.page2.x = 160; + } + return this.page2; + } + + private function getItemById(param1:int) : void + { + if(this.type == 3) + { + this.page2.clear(); + } + else + { + this.page1.clear(); + } + ConnectService.getInstance().packService.getExchangeItemById(param1); + } + + private function getItemViewResult(param1:UserPackEvent) : void + { + var _loc2_:Object = param1.packObject; + if(_loc2_.exchangeItem.type == 3 || _loc2_.exchangeItem.type == 4) + { + this.page2.setData(_loc2_); + } + else + { + this.page1.setData(_loc2_); + } + } + + private function exchangeItemResult(param1:UserPackEvent) : void + { + if(this.lastMc) + { + this.lastMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + else + { + this.itemList[0].dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/ExchangePage_1.as b/flash_decompiled/com/view/ui/pak/ExchangePage_1.as new file mode 100644 index 0000000..f9c9f65 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/ExchangePage_1.as @@ -0,0 +1,267 @@ +package com.view.ui.pak +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import fl.controls.ComboBox; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ExchangePage_1 extends Sprite + { + + private var face:InstallFace; + + private var btn:UIButton; + + private var itemName:TextField; + + private var itemName1:TextField; + + private var itemNum1:TextField; + + private var itemName2:TextField; + + private var itemNum2:TextField; + + private var itemName3:TextField; + + private var itemNum3:TextField; + + private var itemName4:TextField; + + private var itemNum4:TextField; + + private var exchangeNums:ComboBox; + + private var tft:TextFormat; + + private var imgSp1:ExchangeItem; + + private var imgSp2:ExchangeItem; + + private var imgSp3:ExchangeItem; + + private var imgSp4:ExchangeItem; + + private var imgSp5:ExchangeItem; + + private var itemObj:Object; + + public function ExchangePage_1() + { + var _loc1_:Bitmap = null; + this.face = InstallFace.getInstance(); + super(); + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.imgSp1 = new ExchangeItem(); + addChild(this.imgSp1); + this.imgSp1.x = 202; + this.imgSp1.y = 20; + this.imgSp2 = new ExchangeItem(); + addChild(this.imgSp2); + this.imgSp2.x = 35; + this.imgSp2.y = 153; + this.imgSp3 = new ExchangeItem(); + addChild(this.imgSp3); + this.imgSp3.x = 147; + this.imgSp3.y = this.imgSp2.y; + this.imgSp4 = new ExchangeItem(); + addChild(this.imgSp4); + this.imgSp4.x = 258; + this.imgSp4.y = this.imgSp2.y; + this.imgSp5 = new ExchangeItem(); + addChild(this.imgSp5); + this.imgSp5.x = 369; + this.imgSp5.y = this.imgSp2.y; + _loc1_ = new Bitmap(this.face.getPng(ClassConfig.lib_exchange_3)); + addChild(_loc1_); + _loc1_.x = 210; + _loc1_.y = 105; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(65280,100); + addChild(_loc2_); + _loc2_.x = 95; + _loc2_.y = 259; + _loc2_.text = "请选择兑换次数:"; + _loc2_.filters = [PublicGlow.getInstance().blackGlow]; + this.exchangeNums = new ComboBox(); + this.exchangeNums.addItem({ + "label":"1次", + "data":1 + }); + this.exchangeNums.addItem({ + "label":"5次", + "data":5 + }); + this.exchangeNums.addItem({ + "label":"10次", + "data":10 + }); + this.exchangeNums.addItem({ + "label":"50次", + "data":50 + }); + this.exchangeNums.addItem({ + "label":"100次", + "data":100 + }); + this.exchangeNums.addItem({ + "label":"500次", + "data":500 + }); + this.exchangeNums.addItem({ + "label":"1000次", + "data":1000 + }); + this.exchangeNums.addItem({ + "label":"5000次", + "data":5000 + }); + this.exchangeNums.width = 60; + addChild(this.exchangeNums); + this.exchangeNums.textField.setStyle("textFormat",this.tft); + this.exchangeNums.dropdown.setRendererStyle("textFormat",this.tft); + this.exchangeNums.x = _loc2_.x + 95; + this.exchangeNums.y = 257; + this.btn = new UIButton("兑 换"); + addChild(this.btn); + this.btn.x = this.exchangeNums.x + 70; + this.btn.y = 255; + this.btn.onClick = this.exchangeItem; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName.filters = [PublicGlow.getInstance().blackGlow]; + this.itemName1 = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemNum1 = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName2 = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemNum2 = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName3 = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemNum3 = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName4 = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemNum4 = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName1.filters = [PublicGlow.getInstance().blackGlow]; + this.itemNum1.filters = [PublicGlow.getInstance().blackGlow]; + this.itemName2.filters = [PublicGlow.getInstance().blackGlow]; + this.itemNum2.filters = [PublicGlow.getInstance().blackGlow]; + this.itemName3.filters = [PublicGlow.getInstance().blackGlow]; + this.itemNum3.filters = [PublicGlow.getInstance().blackGlow]; + this.itemName4.filters = [PublicGlow.getInstance().blackGlow]; + this.itemNum4.filters = [PublicGlow.getInstance().blackGlow]; + this.itemName.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemName1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemNum1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemName2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemNum2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemName3.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemNum3.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemName4.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemNum4.defaultTextFormat = PublicMethod.getCenterTextFormat(); + addChild(this.itemName); + this.itemName.x = this.imgSp1.x - 27; + this.itemName.y = this.imgSp1.y + 63; + addChild(this.itemName1); + this.itemName1.x = this.imgSp2.x - 31; + this.itemName1.y = this.imgSp2.y + 63; + addChild(this.itemNum1); + this.itemNum1.x = this.itemName1.x; + this.itemNum1.y = this.itemName1.y + 18; + addChild(this.itemName2); + this.itemName2.x = this.imgSp3.x - 31; + this.itemName2.y = this.imgSp3.y + 63; + addChild(this.itemNum2); + this.itemNum2.x = this.itemName2.x; + this.itemNum2.y = this.itemName2.y + 18; + addChild(this.itemName3); + this.itemName3.x = this.imgSp4.x - 31; + this.itemName3.y = this.imgSp4.y + 63; + addChild(this.itemNum3); + this.itemNum3.x = this.itemName3.x; + this.itemNum3.y = this.itemName3.y + 18; + addChild(this.itemName4); + this.itemName4.x = this.imgSp5.x - 31; + this.itemName4.y = this.imgSp5.y + 63; + addChild(this.itemNum4); + this.itemNum4.x = this.itemName4.x; + this.itemNum4.y = this.itemName4.y + 18; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(16750848,325); + _loc3_.text = "兑换前请先将装备放在包裹中并摘除装备上全部宝石"; + addChild(_loc3_); + _loc3_.x = 95; + _loc3_.y = 285; + } + + public function clear() : void + { + this.imgSp1.clear(); + this.imgSp2.clear(); + this.imgSp3.clear(); + this.imgSp4.clear(); + this.imgSp5.clear(); + this.itemName.text = ""; + this.itemName1.text = ""; + this.itemNum1.text = ""; + this.itemName2.text = ""; + this.itemNum2.text = ""; + this.itemName3.text = ""; + this.itemNum3.text = ""; + this.itemName4.text = ""; + this.itemNum4.text = ""; + this.btn.setUnEnable(); + } + + public function setData(param1:Object) : void + { + this.itemObj = param1; + this.imgSp1.loadImg(this.itemObj.exchangeItem); + this.itemName.htmlText = this.itemObj.exchangeItem.showName + "*" + this.itemObj.exchangeItem.num; + this.imgSp2.loadImg(this.itemObj.need1); + this.itemName1.htmlText = this.itemObj.need1.showName; + this.itemNum1.htmlText = "(" + this.itemObj.need1.currNum + "/" + this.itemObj.need1.needNum + ")"; + if(this.itemObj.need2) + { + this.imgSp3.loadImg(this.itemObj.need2); + this.itemName2.htmlText = this.itemObj.need2.showName; + this.itemNum2.htmlText = "(" + this.itemObj.need2.currNum + "/" + this.itemObj.need2.needNum + ")"; + } + if(this.itemObj.need3) + { + this.imgSp4.loadImg(this.itemObj.need3); + this.itemName3.htmlText = this.itemObj.need3.showName; + this.itemNum3.htmlText = "(" + this.itemObj.need3.currNum + "/" + this.itemObj.need3.needNum + ")"; + } + if(this.itemObj.need4) + { + this.imgSp5.loadImg(this.itemObj.need4); + this.itemName4.htmlText = this.itemObj.need4.showName; + this.itemNum4.htmlText = "(" + this.itemObj.need4.currNum + "/" + this.itemObj.need4.needNum + ")"; + } + if(this.itemObj.exchangeItem.canExchange == 1) + { + this.btn.setEnable(); + } + else + { + this.btn.setUnEnable(); + } + } + + public function exchangeItem(param1:MouseEvent) : void + { + if(this.itemObj == null || this.itemObj.exchangeItem == null) + { + return; + } + var _loc2_:int = int(this.exchangeNums.selectedItem.data); + ConnectService.getInstance().packService.exchangeItem(this.itemObj.exchangeItem.id,_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/ExchangePage_2.as b/flash_decompiled/com/view/ui/pak/ExchangePage_2.as new file mode 100644 index 0000000..08701cb --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/ExchangePage_2.as @@ -0,0 +1,169 @@ +package com.view.ui.pak +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import fl.controls.ComboBox; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ExchangePage_2 extends Sprite + { + + private var face:InstallFace; + + private var btn:UIButton; + + private var itemName:TextField; + + private var itemName1:TextField; + + private var imgSp1:ExchangeItem; + + private var imgSp2:ExchangeItem; + + private var itemObj:Object; + + private var exchangeNums:ComboBox; + + private var tft:TextFormat; + + public function ExchangePage_2() + { + var _loc2_:TextField = null; + this.face = InstallFace.getInstance(); + super(); + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.imgSp1 = new ExchangeItem(); + addChild(this.imgSp1); + this.imgSp1.x = 100; + this.imgSp1.y = 110; + this.imgSp2 = new ExchangeItem(); + addChild(this.imgSp2); + this.imgSp2.x = 295; + this.imgSp2.y = this.imgSp1.y; + var _loc1_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_exchange_2)); + addChild(_loc1_); + _loc1_.x = 210; + _loc1_.y = 121; + _loc2_ = PublicMethod.getTextField(65280,100); + addChild(_loc2_); + _loc2_.x = 95; + _loc2_.y = 259; + _loc2_.text = "请选择兑换次数:"; + _loc2_.filters = [PublicGlow.getInstance().blackGlow]; + this.exchangeNums = new ComboBox(); + this.exchangeNums.addItem({ + "label":"1次", + "data":1 + }); + this.exchangeNums.addItem({ + "label":"5次", + "data":5 + }); + this.exchangeNums.addItem({ + "label":"10次", + "data":10 + }); + this.exchangeNums.addItem({ + "label":"50次", + "data":50 + }); + this.exchangeNums.addItem({ + "label":"100次", + "data":100 + }); + this.exchangeNums.addItem({ + "label":"500次", + "data":500 + }); + this.exchangeNums.addItem({ + "label":"1000次", + "data":1000 + }); + this.exchangeNums.addItem({ + "label":"5000次", + "data":5000 + }); + this.exchangeNums.addItem({ + "label":"10000次", + "data":10000 + }); + this.exchangeNums.addItem({ + "label":"50000次", + "data":50000 + }); + this.exchangeNums.addItem({ + "label":"100000次", + "data":100000 + }); + this.exchangeNums.width = 90; + addChild(this.exchangeNums); + this.exchangeNums.textField.setStyle("textFormat",this.tft); + this.exchangeNums.dropdown.setRendererStyle("textFormat",this.tft); + this.exchangeNums.x = _loc2_.x + 95; + this.exchangeNums.y = 257; + this.btn = new UIButton("兑 换"); + addChild(this.btn); + this.btn.x = this.exchangeNums.x + 90; + this.btn.y = 255; + this.btn.onClick = this.exchangeItem; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,160); + this.itemName1 = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemName1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + addChild(this.itemName); + this.itemName.x = this.imgSp1.x - 51; + this.itemName.y = this.imgSp1.y + 63; + addChild(this.itemName1); + this.itemName1.x = this.imgSp2.x - 31; + this.itemName1.y = this.imgSp2.y + 63; + } + + public function clear() : void + { + this.imgSp1.clear(); + this.imgSp2.clear(); + this.itemName.text = ""; + this.itemName1.text = ""; + this.btn.setUnEnable(); + } + + public function setData(param1:Object) : void + { + this.itemObj = param1; + this.imgSp2.loadImg(this.itemObj.exchangeItem); + this.itemName1.htmlText = this.itemObj.exchangeItem.showName + "*" + this.itemObj.exchangeItem.num; + this.imgSp1.loadImg(this.itemObj.need1); + this.itemName.htmlText = this.itemObj.need1.showName + "(" + this.itemObj.need1.currNum + "/" + this.itemObj.need1.needNum + ")"; + if(this.itemObj.exchangeItem.canExchange == 1) + { + this.btn.setEnable(); + } + else + { + this.btn.setUnEnable(); + } + } + + public function exchangeItem(param1:MouseEvent) : void + { + if(this.itemObj == null || this.itemObj.exchangeItem == null) + { + return; + } + var _loc2_:int = int(this.exchangeNums.selectedItem.data); + ConnectService.getInstance().packService.exchangeItem(this.itemObj.exchangeItem.id,_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/Menu.as b/flash_decompiled/com/view/ui/pak/Menu.as new file mode 100644 index 0000000..7cb2391 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/Menu.as @@ -0,0 +1,210 @@ +package com.view.ui.pak +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.data.MemeberShip; + import com.newdata.user.NewUserData; + import com.view.ui.chat.mc.TitleInputMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class Menu extends Sprite + { + + private static var instance:Menu; + + private var itemArr:Array; + + private var face:InstallFace = InstallFace.getInstance(); + + private var mc:MovieClip; + + private var use_btn:MenuButton; + + private var throw_btn:MenuButton; + + private var batch_btn:MenuButton; + + private var obj:PackItem; + + public var batchFunc:Function; + + public function Menu() + { + super(); + if(instance != null) + { + throw Error("单例"); + } + this.mc = this.face.getMovieClip(ClassConfig.build_userToolsMenu); + addChild(this.mc); + this.use_btn = new MenuButton("使 用"); + this.batch_btn = new MenuButton("批量使用"); + this.throw_btn = new MenuButton("丢 弃"); + this.mc.addChild(this.use_btn); + this.mc.addChild(this.batch_btn); + this.mc.addChild(this.throw_btn); + this.use_btn.x = -64; + this.use_btn.y = 2; + this.batch_btn.x = -64; + this.batch_btn.y = 21; + this.throw_btn.x = -64; + this.throw_btn.y = 40; + this.init(); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + this.itemArr = [10379997,10479997,10379994,10479994,10379996,10479996,10379993,10479993,10379995,10479995]; + } + + public static function getInstance() : Menu + { + if(instance == null) + { + instance = new Menu(); + } + return instance; + } + + private function clear() : void + { + if(parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function init() : void + { + this.mouseEnabled = false; + this.use_btn.onClick = this.useItem; + this.throw_btn.onClick = this.throwItem; + this.batch_btn.onClick = this.batchItem; + } + + public function update(param1:PackItem) : void + { + this.obj = param1; + if(param1.useAble) + { + this.use_btn.setEnabled(true); + } + else + { + this.use_btn.setEnabled(false); + } + if(param1.throwAble) + { + this.throw_btn.setEnabled(true); + } + else + { + this.throw_btn.setEnabled(false); + } + if(param1.useMaxNum) + { + this.batch_btn.setEnabled(true); + } + else + { + this.batch_btn.setEnabled(false); + } + } + + private function useItem() : void + { + var _loc1_:CasMovePane = null; + var _loc2_:CasMoveSePane = null; + var _loc3_:EditUserNameUI = null; + var _loc4_:int = 0; + var _loc5_:TitleInputMc = null; + if(this.obj.itemId == 10371531 || this.obj.itemId == 10471531) + { + _loc1_ = CasMovePane.getInstance(); + _loc1_.showSelf(this.parent); + return; + } + if(this.obj.itemId == 10471532 || this.obj.itemId == 10371532) + { + _loc2_ = CasMoveSePane.getInstance(); + _loc2_.showSelf(this.parent); + _loc2_.update(); + return; + } + if(this.obj.itemId == 10372037) + { + _loc3_ = EditUserNameUI.getInstance(); + _loc3_.showSelf(this.parent); + return; + } + if(this.checkItem(this.obj.itemId)) + { + _loc4_ = NewUserData.getUser().rankId; + if(_loc4_ < 50) + { + MessageBoxUI.getInstance().addMessage("君主等级达到50级才可使用该功能"); + return; + } + _loc5_ = TitleInputMc.getInstance(); + _loc5_.showSelf(this.parent); + _loc5_.update(this.obj.itemId); + return; + } + this.clear(); + ConnectService.getInstance().itemsService.useItem(this.obj.id,MemeberShip.getMainCastle().casId,1); + } + + private function checkItem(param1:int) : Boolean + { + var _loc2_:int = 0; + for each(_loc2_ in this.itemArr) + { + if(param1 == _loc2_) + { + return true; + } + } + return false; + } + + private function throwItem() : void + { + this.clear(); + MessageBoxUI.getInstance().confirmMsg("丢弃" + this.obj.viewMap.name + "吗?\n注意:堆叠道具的丢弃为全部丢弃!",this.onSubmit); + } + + private function onSubmit() : void + { + ConnectService.getInstance().packService.throwItem(this.obj.id); + } + + private function batchItem() : void + { + if(Boolean(this.batchFunc)) + { + this.batchFunc(this.obj); + } + this.clear(); + } + + private function moveSucc() : void + { + } + + public function batch(param1:BatchView) : void + { + ConnectService.getInstance().itemsService.useBatchItem(param1.itemObject.id,MemeberShip.getMainCastle().casId,param1.inputMc.getTextNum()); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/MenuButton.as b/flash_decompiled/com/view/ui/pak/MenuButton.as new file mode 100644 index 0000000..8d1a823 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/MenuButton.as @@ -0,0 +1,88 @@ +package com.view.ui.pak +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextFormat; + + public class MenuButton extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var btn:MovieClip; + + private var css1:TextFormat; + + private var css2:TextFormat; + + private var canClick:Boolean; + + public var onClick:Function; + + public function MenuButton(param1:String) + { + super(); + this.btn = this.face.getMovieClip(ClassConfig.build_MenuButton); + addChild(this.btn); + this.btn.label.text = param1; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.CLICK,this.mouseClick); + this.css1 = new TextFormat(); + this.css1.color = 16764006; + this.css2 = new TextFormat(); + this.css2.color = 16777215; + } + + public function setText(param1:String) : void + { + this.btn.label.text = param1; + } + + public function setEnabled(param1:Boolean) : void + { + this.canClick = param1; + if(this.canClick) + { + this.btn.label.setTextFormat(this.css1); + } + else + { + this.btn.label.setTextFormat(this.css2); + } + this.btn.gotoAndStop(1); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.canClick) + { + this.btn.gotoAndStop(1); + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.canClick) + { + this.btn.gotoAndStop(2); + } + } + + private function mouseClick(param1:MouseEvent) : void + { + if(this.canClick) + { + if(this.onClick != null) + { + this.onClick(); + param1.stopImmediatePropagation(); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/PackItemMc.as b/flash_decompiled/com/view/ui/pak/PackItemMc.as new file mode 100644 index 0000000..2718e3f --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/PackItemMc.as @@ -0,0 +1,203 @@ +package com.view.ui.pak +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.newui.UICheckBtn; + import com.view.newui.UIWindowBg; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Bitmap; + import flash.display.Shape; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PackItemMc extends UIWindowBg + { + + private var loadItemPng:LoadResource; + + private var itemTip:ItemTip; + + public var obj:PackItem; + + private var itemNameText:TextField; + + private var itemOver:Sprite; + + private var itemSp:Sprite; + + private var num_txt:TextField; + + private var tipSp:Sprite; + + private var isSelect:Boolean; + + private var selectBtn:UICheckBtn; + + private var url:String; + + private var itemImg:Bitmap; + + public function PackItemMc(param1:PackItem = null) + { + super(); + initSecondPanel(72,87); + var _loc2_:Shape = PublicMethod.drawLine(0,0,81,0,7759679); + addChild(_loc2_); + _loc2_.y = 75; + var _loc3_:Sprite = face.getSprite(ClassConfig.build_ironItem); + addChild(_loc3_); + _loc3_.x = 10; + _loc3_.y = 8; + this.itemSp = new Sprite(); + _loc3_.addChild(this.itemSp); + this.itemSp.x = 5; + this.itemSp.y = 4; + this.num_txt = PublicMethod.getTextFieldWithFillter(16777215,52); + _loc3_.addChild(this.num_txt); + this.num_txt.y = 40; + this.num_txt.x = 5; + this.num_txt.defaultTextFormat = PublicMethod.getRightTextFormat(); + this.itemOver = face.getSprite(ClassConfig.build_Itemover); + _loc3_.addChild(this.itemOver); + this.itemOver.x = 5; + this.itemOver.y = 4; + this.itemOver.visible = false; + this.itemNameText = PublicMethod.getTextFieldWithFillter(16777215,82); + addChild(this.itemNameText); + this.itemNameText.y = 78; + this.itemNameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.tipSp = PublicMethod.createShape(16777215,52,52); + addChild(this.tipSp); + this.tipSp.x = 14; + this.tipSp.y = 12; + this.tipSp.alpha = 0; + this.obj = param1; + if(this.obj == null) + { + return; + } + this.tipSp.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + this.tipSp.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + var _loc4_:int = int(this.obj.itemCount); + if(_loc4_ > 1) + { + this.num_txt.text = _loc4_.toString(); + } + else + { + this.num_txt.text = ""; + } + this.itemNameText.htmlText = this.getItemsName(this.obj.viewMap.showName); + this.url = ServerConfig.IMAGE_ITEM_URL + this.obj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(this.url,this.loadPngBack); + } + this.itemTip = new ItemTip(this.tipSp,face.stage,face.tip_bg,this.obj.viewMap); + this.selectBtn = new UICheckBtn(); + addChild(this.selectBtn); + this.selectBtn.x = 5; + this.selectBtn.y = 55; + this.selectBtn.visible = false; + } + + public function getCheckBtnStatus() : Boolean + { + return this.selectBtn.visible; + } + + public function setCheckBtnStatus(param1:Boolean) : void + { + this.selectBtn.visible = param1; + } + + public function setBtnSelect() : void + { + if(this.isSelect) + { + this.selectBtn.setUnSelect(); + this.isSelect = false; + } + else + { + this.selectBtn.setSelect(); + this.isSelect = true; + } + } + + public function setSelectByStatus(param1:Boolean) : void + { + this.isSelect = param1; + if(this.isSelect) + { + this.selectBtn.setSelect(); + } + else + { + this.selectBtn.setUnSelect(); + } + } + + public function getIsSelect() : Boolean + { + return this.isSelect; + } + + private function mouseOut(param1:MouseEvent) : void + { + this.itemOver.visible = false; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.itemOver.visible = true; + } + + private function loadPngBack(param1:Event) : void + { + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemSp.addChild(this.itemImg); + this.itemImg.width = 52; + this.itemImg.height = 52; + } + + private function getItemsName(param1:String) : String + { + if(param1.indexOf("(") <= 0) + { + return param1; + } + var _loc2_:String = param1.substring(0,param1.indexOf("(")); + if(_loc2_.length <= 4) + { + return param1; + } + return _loc2_; + } + + public function clear() : void + { + this.itemTip.destroyTip(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/PackPage_1.as b/flash_decompiled/com/view/ui/pak/PackPage_1.as new file mode 100644 index 0000000..39536d8 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/PackPage_1.as @@ -0,0 +1,310 @@ +package com.view.ui.pak +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.chat.event.ChatMainEvent; + import com.control.data.ReturnBean; + import com.control.item.event.ItemEvent; + import com.control.pack.event.UserPackEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIWindowBg; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.geom.Point; + import flash.text.TextField; + + public class PackPage_1 extends Sprite + { + + private var bg:UIWindowBg; + + private var face:InstallFace = InstallFace.getInstance(); + + private var shopScroll:ScrollPane; + + private var itemListMc:Sprite; + + public var type:int = 99; + + private var userItemList:Vector.; + + private var lastText:TextField; + + private var initItemList:Vector. = new Vector.(); + + public function PackPage_1() + { + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + this.shopScroll = new ScrollPane(); + this.shopScroll.setSize(635,344); + this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + addChild(this.shopScroll); + this.shopScroll.x = 2; + this.shopScroll.y = 5; + this.itemListMc = new Sprite(); + this.shopScroll.source = this.itemListMc; + this.initItems(); + Menu.getInstance().batchFunc = this.batchItem; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.getItemList); + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(ItemEvent.Item_useItem,this.useItemResult); + ConnectService.getInstance().addEventListener(ChatMainEvent.Chat_userSendTitleMessage,this.sendTitleResult); + ConnectService.getInstance().addEventListener(ItemEvent.Item_useBatchItemResult,this.useBatchItemResult); + ConnectService.getInstance().addEventListener(UserPackEvent.PACK_throwItemResult,this.throwItemResult); + } + + private function useItemResult(param1:ItemEvent) : void + { + this.getItemsList(); + this.clearMenu(); + } + + private function sendTitleResult(param1:ChatMainEvent) : void + { + if(param1.result == ReturnBean.STATUS_0) + { + this.getItemsList(); + this.clearMenu(); + } + } + + private function useBatchItemResult(param1:ItemEvent) : void + { + this.getItemsList(); + this.clearBatchUI(); + } + + private function throwItemResult(param1:UserPackEvent) : void + { + this.getItemsList(); + this.clearMenu(); + } + + private function clearMenu() : void + { + if(contains(Menu.getInstance())) + { + removeChild(Menu.getInstance()); + } + } + + private function clearBatchUI() : void + { + if(contains(BatchView.getInstance())) + { + removeChild(BatchView.getInstance()); + } + } + + private function clearMoveCastleUI() : void + { + if(contains(CasMovePane.getInstance())) + { + removeChild(CasMovePane.getInstance()); + } + if(contains(CasMoveSePane.getInstance())) + { + removeChild(CasMoveSePane.getInstance()); + } + } + + public function getItemsList() : void + { + this.getItemList(null); + } + + private function clearEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(ItemEvent.Item_useItem,this.useItemResult); + ConnectService.getInstance().removeEventListener(ChatMainEvent.Chat_userSendTitleMessage,this.sendTitleResult); + ConnectService.getInstance().removeEventListener(ItemEvent.Item_useBatchItemResult,this.useBatchItemResult); + ConnectService.getInstance().removeEventListener(UserPackEvent.PACK_throwItemResult,this.throwItemResult); + this.clearMenu(); + this.clearBatchUI(); + this.clearMoveCastleUI(); + } + + private function clearItemList() : void + { + var _loc1_:* = undefined; + if(this.userItemList != null && this.userItemList.length > 0) + { + for(_loc1_ in this.userItemList) + { + this.userItemList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickItemMc); + this.userItemList[_loc1_].addEventListener(MouseEvent.ROLL_OVER,this.moveItemMc); + this.itemListMc.removeChild(this.userItemList[_loc1_]); + if(_loc1_ < 18) + { + this.initItemList[_loc1_].visible = true; + } + this.userItemList[_loc1_].clear(); + } + } + if(this.itemListMc.contains(this.getLastText())) + { + this.itemListMc.removeChild(this.getLastText()); + } + this.userItemList = null; + this.shopScroll.update(); + } + + private function getItemList(param1:DevEvent) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:PackItemMc = null; + this.clearItemList(); + var _loc2_:Vector. = PakState.getPackData(this.type); + if(_loc2_ == null || _loc2_.length == 0) + { + return; + } + this.userItemList = new Vector.(); + _loc4_ = 0; + while(_loc4_ < _loc2_.length) + { + _loc5_ = new PackItemMc(_loc2_[_loc4_]); + this.userItemList.push(_loc5_); + this.itemListMc.addChild(_loc5_); + _loc5_.x = 25 + 100 * (_loc4_ % 6); + _loc5_.y = 10 + 115 * int(_loc4_ / 6); + if(_loc4_ < 18) + { + this.initItemList[_loc4_].visible = false; + } + _loc5_.addEventListener(MouseEvent.CLICK,this.clickItemMc); + _loc5_.addEventListener(MouseEvent.ROLL_OVER,this.moveItemMc); + _loc3_ = _loc5_.y + _loc5_.height; + _loc4_++; + } + if(this.userItemList.length > 18) + { + this.itemListMc.addChild(this.getLastText()); + this.getLastText().y = _loc3_; + } + this.shopScroll.update(); + } + + private function clickItemMc(param1:MouseEvent) : void + { + var _loc2_:PackItemMc = null; + _loc2_ = param1.currentTarget as PackItemMc; + if(_loc2_.obj == null) + { + this.clearMenu(); + return; + } + if(_loc2_.getCheckBtnStatus()) + { + this.clickSelectBtn(_loc2_); + return; + } + if(!contains(Menu.getInstance())) + { + addChild(Menu.getInstance()); + } + var _loc3_:* = new Point(_loc2_.x,_loc2_.y); + _loc3_ = this.itemListMc.localToGlobal(_loc3_); + _loc3_ = this.globalToLocal(_loc3_); + Menu.getInstance().x = 24 + _loc3_.x; + Menu.getInstance().y = 30 + _loc3_.y; + Menu.getInstance().update(_loc2_.obj); + } + + private function clickSelectBtn(param1:PackItemMc) : void + { + var _loc3_:UserPackUI = null; + var _loc4_:Object = null; + param1.setBtnSelect(); + var _loc2_:Array = new Array(); + for each(param1 in this.userItemList) + { + if(param1.getIsSelect()) + { + _loc4_ = new Object(); + _loc4_.itemName = param1.obj.viewMap.showName; + _loc4_.itemCount = param1.obj.itemCount; + _loc4_.id = param1.obj.id; + _loc2_.push(_loc4_); + } + } + _loc3_ = UserPackUI.getInstance(); + _loc3_.showDelInfo(_loc2_); + } + + public function setCckShow(param1:Boolean) : void + { + var _loc2_:PackItemMc = null; + for each(_loc2_ in this.userItemList) + { + _loc2_.setCheckBtnStatus(param1); + } + } + + public function setAllSelect(param1:Boolean) : void + { + var _loc2_:PackItemMc = null; + for each(_loc2_ in this.userItemList) + { + _loc2_.setSelectByStatus(param1); + } + } + + private function moveItemMc(param1:MouseEvent) : void + { + this.clearMenu(); + } + + private function getLastText() : TextField + { + if(this.lastText == null) + { + this.lastText = PublicMethod.getTextField(16777215,20); + this.lastText.height = 30; + } + return this.lastText; + } + + private function initItems() : void + { + var _loc2_:PackItemMc = null; + var _loc1_:int = 0; + while(_loc1_ < 18) + { + _loc2_ = new PackItemMc(); + this.initItemList.push(_loc2_); + this.itemListMc.addChild(_loc2_); + _loc2_.x = 25 + 100 * (_loc1_ % 6); + _loc2_.y = 10 + 115 * int(_loc1_ / 6); + _loc1_++; + } + } + + private function batchItem(param1:Object) : void + { + BatchView.getInstance().update(param1); + addChild(BatchView.getInstance()); + BatchView.getInstance().x = int(320 - BatchView.getInstance().width / 2); + BatchView.getInstance().y = int(175 - BatchView.getInstance().height / 2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/UserPackUI.as b/flash_decompiled/com/view/ui/pak/UserPackUI.as new file mode 100644 index 0000000..a732158 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/UserPackUI.as @@ -0,0 +1,540 @@ +package com.view.ui.pak +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.item.event.ItemEvent; + import com.control.pack.event.UserPackEvent; + import com.events.DevEvent; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UILabel; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.buff.BuffManager; + import com.view.ui.gift.ShowGiftItem; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PakState; + import com.view.ui.pak.mc.PackDelItem; + import com.view.ui.shop.ShopUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UserPackUI extends BaseUI + { + + private static var instance:UserPackUI; + + private var delPage:Sprite; + + private var delScroll:ScrollPane; + + private var delSp:Sprite; + + private var paneBg:UIWindowBg; + + private var cashMc:Sprite; + + private var cashText:TextField; + + private var payPointText:TextField; + + private var packNums:TextField; + + private var btnArr:Array; + + private var lastbtn:UITabBtn; + + private var page1:PackPage_1; + + private var exchangePage:ExchangePage; + + private var prePage:int = -1; + + private var showDelPage:Boolean; + + private var delList:Vector.; + + private var idArr:Array; + + public function UserPackUI() + { + var _loc7_:int = 0; + var _loc8_:UITabBtn = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_beibao); + super.setPosition(); + this.btnArr = new Array(); + var _loc1_:UITabBtn = new UITabBtn("全 部",2); + var _loc2_:UITabBtn = new UITabBtn("装 备",2); + var _loc3_:UITabBtn = new UITabBtn("用 品",2); + var _loc4_:UITabBtn = new UITabBtn("任 务",2); + var _loc5_:UITabBtn = new UITabBtn("宝 石",2); + var _loc6_:UITabBtn = new UITabBtn("兑 换",2); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + for each(_loc8_ in this.btnArr) + { + addChild(_loc8_); + _loc8_.x = 25 + _loc7_ * 66; + _loc8_.y = 40; + _loc8_.onClick = this.clickTab; + _loc7_++; + } + this.packNums = PublicMethod.getTextFieldWithFillter(16773120,60); + addChild(this.packNums); + this.packNums.x = 600; + this.packNums.y = 43; + this.packNums.text = "0/400"; + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + this.createDelPage(); + this.createCashMc(); + this.paneBg.addChild(this.cashMc); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + } + + public static function getInstance() : UserPackUI + { + if(instance == null) + { + instance = new UserPackUI(); + } + return instance; + } + + private function createDelPage() : void + { + var _loc1_:UIWindowBg = null; + var _loc3_:UIWindowBg = null; + var _loc6_:PackDelItem = null; + this.delPage = new Sprite(); + _loc1_ = new UIWindowBg(); + _loc1_.initSecondPanel(150,400); + this.delPage.addChild(_loc1_); + _loc1_.y = 20; + var _loc2_:UITitleBg = new UITitleBg("已选删除道具",this.delPage.width); + _loc1_.addChild(_loc2_); + _loc2_.x = int(this.delPage.width / 2 - _loc2_.width / 2); + _loc3_ = new UIWindowBg(); + _loc3_.initSecondPanel(142,337); + _loc1_.addChild(_loc3_); + _loc3_.x = 4; + _loc3_.y = 24; + this.delScroll = new ScrollPane(); + this.delScroll.setSize(152,342); + this.delScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc3_.addChild(this.delScroll); + this.delScroll.x = 1; + this.delScroll.y = 1; + this.delSp = new Sprite(); + this.delScroll.source = this.delSp; + this.delList = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 14) + { + _loc6_ = new PackDelItem(); + this.delSp.addChild(_loc6_); + this.delList.push(_loc6_); + _loc6_.y = 24 * _loc4_; + _loc4_++; + } + this.delScroll.update(); + var _loc5_:UIButton = new UIButton("确定删除",2); + this.delPage.addChild(_loc5_); + _loc5_.x = 44; + _loc5_.y = 397; + _loc5_.onClick = this.clAll; + addChild(this.delPage); + this.delPage.x = 660; + this.delPage.y = 20; + this.delPage.visible = false; + } + + private function createCashMc() : void + { + this.cashMc = new Sprite(); + var _loc1_:Sprite = face.getSprite(ClassConfig.lib_ui_cash); + var _loc2_:Sprite = face.getSprite(ClassConfig.lib_ui_point); + this.cashMc.addChild(_loc1_); + this.cashMc.addChild(_loc2_); + this.cashText = PublicMethod.getTextFieldWithFillter(16773120,100); + this.cashMc.addChild(this.cashText); + this.payPointText = PublicMethod.getTextFieldWithFillter(16773120,100); + this.cashMc.addChild(this.payPointText); + _loc1_.x = 4; + _loc1_.y = 10; + this.cashText.x = _loc1_.x + _loc1_.width + 10; + this.cashText.y = 11; + _loc2_.x = 144; + _loc2_.y = _loc1_.y; + this.payPointText.x = _loc2_.x + _loc2_.width + 10; + this.payPointText.y = 11; + var _loc3_:UIButton = new UIButton("充 值"); + var _loc4_:UIButton = new UIButton("商 城"); + this.cashMc.addChild(_loc3_); + _loc3_.x = 516; + _loc3_.y = 7; + this.cashMc.addChild(_loc4_); + _loc4_.x = 580; + _loc4_.y = 7; + _loc4_.onClick = this.openShopUI; + _loc3_.onClick = this.openPayHttp; + var _loc5_:UILabel = new UILabel(210,UIConfig.labelColor); + _loc5_.setText("清理包裹能提高系统流畅度"); + this.cashMc.addChild(_loc5_); + _loc5_.x = 285; + _loc5_.y = 11; + var _loc6_:UIButton = new UIButton("批量删除",2); + this.cashMc.addChild(_loc6_); + _loc6_.x = 441; + _loc6_.y = 7; + _loc6_.onClick = this.delAll; + this.cashMc.y = 348; + this.cashMc.x = 0; + this.createPage1(); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.getItemList); + } + + public function openPayHttp(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.openPayhttp(); + } + + private function openShopUI(param1:MouseEvent) : void + { + ShopUI.getInstance().open(); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(ItemEvent.Item_useItem,this.useItemResult); + ConnectService.getInstance().removeEventListener(ItemEvent.Item_useBatchItemResult,this.useBatchItemResult); + ConnectService.getInstance().removeEventListener(UserPackEvent.PACK_throwItemResult,this.throwItemResult); + ConnectService.getInstance().removeEventListener(UserPackEvent.PACK_throwItemAllResult,this.throwItemAllResult); + Utils.g_events.removeEventListener(DevEvent.CASTLEMOVE,this.moveCastleSucc); + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(ItemEvent.Item_useItem,this.useItemResult); + ConnectService.getInstance().addEventListener(ItemEvent.Item_useBatchItemResult,this.useBatchItemResult); + ConnectService.getInstance().addEventListener(UserPackEvent.PACK_throwItemResult,this.throwItemResult); + ConnectService.getInstance().addEventListener(UserPackEvent.PACK_throwItemAllResult,this.throwItemAllResult); + Utils.g_events.addEventListener(DevEvent.CASTLEMOVE,this.moveCastleSucc); + PakState.setGetPackListStatus(); + this.getCashAndPoint(); + if(this.prePage == -1) + { + this.btnArr[0].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + else if(this.prePage != 5) + { + this.page1.getItemsList(); + } + } + + private function useItemResult(param1:ItemEvent) : void + { + var _loc2_:ShowGiftItem = null; + if(param1.obj.type == "box1") + { + _loc2_ = ShowGiftItem.getInstance(); + _loc2_.update(param1.obj); + _loc2_.show(); + } + else + { + MessageBoxUI.getInstance().addMessage(param1.obj.useContent); + } + ConnectService.getInstance().castleService.calcuDevData(); + BuffManager.getInstance().update(); + } + + private function useBatchItemResult(param1:ItemEvent) : void + { + MessageBoxUI.getInstance().addMessage(param1.obj.useContent); + ConnectService.getInstance().castleService.calcuDevData(); + BuffManager.getInstance().update(); + } + + private function throwItemResult(param1:UserPackEvent) : void + { + MessageBoxUI.getInstance().addMessage("丢弃背包中的物品成功"); + } + + private function getCashAndPoint() : void + { + var _loc1_:NewUser = NewUserData.getUser(); + this.cashText.text = _loc1_.cash.toString(); + this.payPointText.text = _loc1_.paypoint.toString(); + this.getItemList(null); + } + + public function getDefaultPage(param1:int) : void + { + this.setBtnSelect(this.btnArr[param1]); + } + + private function getItemList(param1:DevEvent) : void + { + this.packNums.text = PakState.getTreasuryLength() + "/" + PakState.getTreasuryMaxLth(); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + this.setBtnSelect(_loc2_); + } + + private function setBtnSelect(param1:UITabBtn) : void + { + var _loc2_:* = undefined; + var _loc3_:UITabBtn = null; + if(this.lastbtn) + { + this.lastbtn.select = false; + } + this.lastbtn = param1; + this.lastbtn.select = true; + for(_loc2_ in this.btnArr) + { + _loc3_ = this.btnArr[_loc2_] as UITabBtn; + if(param1 == _loc3_) + { + this.getPage(_loc2_); + break; + } + } + } + + private function createPage1() : void + { + if(this.page1 == null) + { + this.page1 = new PackPage_1(); + } + this.paneBg.addChild(this.page1); + } + + private function getPage(param1:int) : void + { + this.prePage = param1; + this.clearDelPage(); + if(param1 == 5) + { + if(this.paneBg.contains(this.page1)) + { + this.paneBg.removeChild(this.page1); + } + if(this.exchangePage == null) + { + this.exchangePage = new ExchangePage(); + } + if(!this.paneBg.contains(this.exchangePage)) + { + this.paneBg.addChild(this.exchangePage); + } + if(this.showDelPage) + { + this.showDelPage = false; + this.delPage.visible = this.showDelPage; + this.page1.setCckShow(this.showDelPage); + this.setPosi111(); + } + return; + } + if(Boolean(this.exchangePage) && this.paneBg.contains(this.exchangePage)) + { + this.paneBg.removeChild(this.exchangePage); + } + if(!this.paneBg.contains(this.page1)) + { + this.paneBg.addChild(this.page1); + } + switch(param1) + { + case 0: + this.page1.type = 99; + break; + case 1: + this.page1.type = 6; + break; + case 2: + this.page1.type = 7; + break; + case 3: + this.page1.type = 9; + break; + case 4: + this.page1.type = 4; + } + this.page1.getItemsList(); + if(this.showDelPage) + { + this.page1.setCckShow(true); + this.page1.setAllSelect(false); + } + } + + private function moveCastleSucc(param1:DevEvent) : void + { + closeUI(null); + } + + private function delAll(param1:MouseEvent) : void + { + if(this.showDelPage) + { + this.showDelPage = false; + } + else + { + this.showDelPage = true; + } + this.page1.setCckShow(this.showDelPage); + this.delPage.visible = this.showDelPage; + if(this.showDelPage) + { + setPosition(); + } + else + { + this.setPosi111(); + } + } + + override public function reSizeWindow(param1:Event) : void + { + if(this.prePage != 5 && this.showDelPage == false) + { + this.setPosi111(); + } + else + { + super.reSizeWindow(param1); + } + } + + private function setPosi111() : void + { + this.x = int(face.realWidth / 2 - 666 / 2); + this.y = int(face.realHeight / 2 - height / 2); + } + + public function showDelInfo(param1:Array) : void + { + var _loc2_:* = undefined; + var _loc3_:PackDelItem = null; + this.clearDelPage(); + if(param1 != null && param1.length > 0) + { + for(_loc2_ in param1) + { + if(_loc2_ > 13) + { + _loc3_ = new PackDelItem(); + this.delSp.addChild(_loc3_); + this.delList.push(_loc3_); + _loc3_.y = 24 * _loc2_; + _loc3_.setObj(param1[_loc2_]); + } + else + { + this.delList[_loc2_].setObj(param1[_loc2_]); + } + this.idArr.push(param1[_loc2_].id); + } + } + this.delScroll.verticalScrollPosition = 0; + this.delScroll.update(); + } + + private function clearDelPage() : void + { + var _loc1_:* = int(this.delList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 13) + { + this.delSp.removeChild(this.delList[_loc1_]); + this.delList.splice(_loc1_,1); + } + else + { + this.delList[_loc1_].setObj(null); + } + _loc1_--; + } + this.idArr = new Array(); + } + + private function clAll(param1:MouseEvent) : void + { + if(this.idArr.length > 0) + { + MessageBoxUI.getInstance().confirmMsg("确定要删除这些装备?",this.confirmSubmit); + } + else + { + MessageBoxUI.getInstance().addMessage("请先选择需要删除的装备"); + } + } + + private function confirmSubmit() : void + { + var _loc2_:* = undefined; + var _loc3_:Object = null; + var _loc1_:Array = new Array(); + for each(_loc2_ in this.idArr) + { + _loc1_.push(_loc2_); + } + if(_loc1_.length > 0) + { + _loc3_ = new Object(); + _loc3_.idList = _loc1_; + ConnectService.getInstance().packService.deleteAllTreasury(_loc3_); + } + } + + private function throwItemAllResult(param1:UserPackEvent) : void + { + MessageBoxUI.getInstance().addMessage("丢弃背包中的物品成功"); + this.clearDelPage(); + this.page1.setCckShow(true); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(this.showDelPage) + { + this.showDelPage = false; + this.delPage.visible = this.showDelPage; + this.setPosi111(); + } + this.clearDelPage(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/data/PackExchangeItem.as b/flash_decompiled/com/view/ui/pak/data/PackExchangeItem.as new file mode 100644 index 0000000..e85ee77 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/data/PackExchangeItem.as @@ -0,0 +1,18 @@ +package com.view.ui.pak.data +{ + public class PackExchangeItem + { + + public var id:int; + + public var itemName:String; + + public function PackExchangeItem(param1:Object) + { + super(); + this.id = param1.id; + this.itemName = param1.itemName; + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/data/PackItem.as b/flash_decompiled/com/view/ui/pak/data/PackItem.as new file mode 100644 index 0000000..40418ab --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/data/PackItem.as @@ -0,0 +1,113 @@ +package com.view.ui.pak.data +{ + import com.view.ui.user.data.UserPetItem; + + public class PackItem + { + + public var viewMap:Object; + + public var useAble:int; + + public var itemCount:int; + + public var id:int; + + public var itemId:int; + + public var itemType:int; + + public var throwAble:int; + + public var useMaxNum:int; + + public var equip:int; + + public var childType:int; + + public var color:int; + + public var chaofu:Object; + + public var gemValue:String; + + public var strongLevel:int; + + public var heroId:int; + + public var level:int; + + public var sellPrice:int; + + public var needMoney:int; + + public var needCopper:int; + + public var nextDesc:String; + + public var currDesc:String; + + public var effType:int; + + public var para1:int; + + public var liuyu:Object; + + public var petRoleItem:UserPetItem; + + public function PackItem(param1:Object) + { + super(); + if(param1 == null) + { + return; + } + this.viewMap = param1.viewMap; + this.useAble = param1.useAble; + this.itemCount = param1.itemCount; + this.id = param1.id; + this.itemId = param1.itemId; + this.itemType = param1.itemType; + this.throwAble = param1.throwAble; + this.useMaxNum = param1.useMaxNum; + this.equip = param1.equip; + this.childType = param1.childType; + this.color = param1.color; + this.strongLevel = param1.strongLevel; + this.level = param1.level; + this.sellPrice = param1.sellPrice; + this.needMoney = param1.needMoney; + this.needCopper = param1.needCopper; + if(this.itemType == 14) + { + this.chaofu = param1.chaofu; + this.gemValue = param1.gemValue; + } + if(this.itemType == 13) + { + this.gemValue = param1.gemValue; + } + if(this.itemType == 12) + { + this.nextDesc = param1.nextDesc; + this.currDesc = param1.currDesc; + this.effType = param1.effType; + this.para1 = param1.para1; + if(param1.liuyu) + { + this.liuyu = param1.liuyu; + } + } + } + + public function isYuBo() : Boolean + { + if(this.itemType == 531 || this.itemType == 532 || this.itemType == 533 || this.itemType == 534 || this.itemType == 535) + { + return true; + } + return false; + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/data/PakState.as b/flash_decompiled/com/view/ui/pak/data/PakState.as new file mode 100644 index 0000000..8894392 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/data/PakState.as @@ -0,0 +1,662 @@ +package com.view.ui.pak.data +{ + import com.control.ConnectService; + import com.control.iron.event.IronEvent; + import com.control.pack.event.UserPackEvent; + import com.events.DevEvent; + import com.utils.Utils; + + public class PakState + { + + private static var treasuryLength:int; + + private static var treasuryMaxLth:int; + + private static var allPakList1:Vector. = new Vector.(); + + private static var allPakList2:Vector. = new Vector.(); + + private static var needGetPackList:Boolean = true; + + private static var exchangeList1:Vector. = new Vector.(); + + private static var exchangeList2:Vector. = new Vector.(); + + private static var exchangeList3:Vector. = new Vector.(); + + private static var exchangeList4:Vector. = new Vector.(); + + private static var exchangeList5:Vector. = new Vector.(); + + private static var exchangeList6:Vector. = new Vector.(); + + private static var exchangeList7:Vector. = new Vector.(); + + private static var exchangeList8:Vector. = new Vector.(); + + private static var exchangeList9:Vector. = new Vector.(); + + private static var ironSellList:Array = new Array(); + + public function PakState() + { + super(); + } + + public static function setIronSellList(param1:Array) : void + { + ironSellList = param1; + Utils.g_events.dispatchEvent(new IronEvent(IronEvent.PAGE1_CANBUYLIST)); + } + + public static function getIronSellList() : Array + { + return ironSellList; + } + + public static function getTreasuryLength() : int + { + return treasuryLength; + } + + public static function getTreasuryMaxLth() : int + { + return treasuryMaxLth; + } + + public static function setGetPackListStatus() : void + { + needGetPackList = true; + } + + public static function setGetPackListStatus1() : void + { + needGetPackList = true; + } + + public static function getGetPackListStatus() : Boolean + { + return needGetPackList; + } + + public static function setPackData(param1:Object) : void + { + var _loc2_:Object = null; + var _loc3_:PackItem = null; + treasuryLength = param1.treasuryLength; + treasuryMaxLth = param1.treasuryMaxLth; + if(allPakList1.length > 0) + { + allPakList1.splice(0,allPakList1.length); + } + if(allPakList2.length > 0) + { + allPakList2.splice(0,allPakList2.length); + } + for each(_loc2_ in param1.treasuryList) + { + _loc3_ = new PackItem(_loc2_); + if(_loc3_.equip == 1) + { + allPakList1.push(_loc3_); + } + else + { + allPakList2.push(_loc3_); + } + } + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.PAKCHANGE)); + } + + public static function getAllPackList() : void + { + if(needGetPackList) + { + needGetPackList = false; + ConnectService.getInstance().packService.getItemListByType(); + } + } + + public static function getPackData(param1:int) : Vector. + { + var _loc3_:PackItem = null; + getAllPackList(); + var _loc2_:Vector. = new Vector.(); + if(allPakList2 == null || allPakList2.length == 0) + { + return _loc2_; + } + if(param1 == 99) + { + return allPakList2; + } + for each(_loc3_ in allPakList2) + { + if(param1 == 3) + { + if(_loc3_.itemType == 521 || _loc3_.itemType == 522 || _loc3_.itemType == 523 || _loc3_.itemType == 524) + { + _loc2_.push(_loc3_); + } + } + else if(param1 == 5) + { + if(_loc3_.itemType == 501 || _loc3_.itemType == 502 || _loc3_.itemType == 503 || _loc3_.itemType == 504 || _loc3_.itemType == 512) + { + _loc2_.push(_loc3_); + } + } + else if(param1 == 4) + { + if(_loc3_.itemType == 501 || _loc3_.itemType == 502 || _loc3_.itemType == 503 || _loc3_.itemType == 504 || _loc3_.itemType == 512 || _loc3_.itemType == 521 || _loc3_.itemType == 522 || _loc3_.itemType == 523 || _loc3_.itemType == 524 || _loc3_.itemType == 531 || _loc3_.itemType == 532 || _loc3_.itemType == 533 || _loc3_.itemType == 534 || _loc3_.itemType == 535 || _loc3_.itemType == 601 || _loc3_.itemType == 602 || _loc3_.itemType == 603 || _loc3_.itemType == 604) + { + _loc2_.push(_loc3_); + } + } + else if(param1 == 6) + { + if(_loc3_.itemType == 601 || _loc3_.itemType == 602 || _loc3_.itemType == 603 || _loc3_.itemType == 604) + { + _loc2_.push(_loc3_); + } + } + else if(_loc3_.itemType == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + + public static function getBaoshiList(param1:int, param2:int) : Vector. + { + var _loc5_:PackItem = null; + var _loc3_:Vector. = getPackData(param1); + if(param2 == -1) + { + return _loc3_; + } + var _loc4_:Vector. = new Vector.(); + for each(_loc5_ in _loc3_) + { + if(_loc5_.level == param2) + { + _loc4_.push(_loc5_); + } + } + return _loc4_; + } + + public static function getEquipCanSellList() : Vector. + { + var _loc2_:PackItem = null; + getAllPackList(); + var _loc1_:Vector. = new Vector.(); + for each(_loc2_ in allPakList2) + { + if(_loc2_.sellPrice > 0) + { + _loc1_.push(_loc2_); + } + } + return _loc1_; + } + + public static function getEquipCanFenjieList(param1:int) : Vector. + { + var _loc3_:PackItem = null; + getAllPackList(); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in allPakList2) + { + if(_loc3_.itemType != 6) + { + continue; + } + if(_loc3_.strongLevel > 0) + { + continue; + } + if(_loc3_.needMoney == 0) + { + continue; + } + if(param1 == 99 || param1 == _loc3_.color) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + + public static function getEquipListByChildType(param1:int) : Vector. + { + var _loc3_:PackItem = null; + getAllPackList(); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in allPakList1) + { + if(_loc3_.itemType != 6) + { + continue; + } + if(param1 == 99) + { + _loc2_.push(_loc3_); + } + else if(_loc3_.childType == param1) + { + _loc2_.push(_loc3_); + } + } + for each(_loc3_ in allPakList2) + { + if(_loc3_.itemType != 6) + { + continue; + } + if(param1 == 99) + { + _loc2_.push(_loc3_); + } + else if(_loc3_.childType == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + + public static function getPakEquipListByChildType(param1:int) : Vector. + { + var _loc3_:PackItem = null; + getAllPackList(); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in allPakList2) + { + if(_loc3_.itemType != 6) + { + continue; + } + if(param1 == 99) + { + _loc2_.push(_loc3_); + } + else if(_loc3_.childType == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + + public static function getItemListByChildType(param1:int) : Vector. + { + var _loc3_:PackItem = null; + getAllPackList(); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in allPakList2) + { + if(_loc3_.childType == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + + public static function getItemsByEntId(param1:int) : int + { + var _loc3_:PackItem = null; + getAllPackList(); + var _loc2_:int = 0; + for each(_loc3_ in allPakList2) + { + if(_loc3_.itemId == param1) + { + _loc2_ += _loc3_.itemCount; + } + } + return _loc2_; + } + + public static function getALlChaofuItemList(param1:int, param2:int) : Vector. + { + var _loc4_:PackItem = null; + var _loc6_:PackItem = null; + var _loc7_:Vector. = null; + getAllPackList(); + var _loc3_:Vector. = new Vector.(); + for each(_loc4_ in allPakList2) + { + if(_loc4_.itemType == 14) + { + _loc3_.push(_loc4_); + } + } + if(param1 == 0 && param2 == 0) + { + return _loc3_; + } + var _loc5_:Vector. = new Vector.(); + if(param1 == 0) + { + _loc5_ = _loc3_; + } + else + { + for each(_loc6_ in _loc3_) + { + if(_loc6_.childType == param1) + { + _loc5_.push(_loc6_); + } + } + } + if(param2 == 0) + { + return _loc5_; + } + _loc7_ = new Vector.(); + for each(_loc6_ in _loc5_) + { + if(_loc6_.color == param2) + { + _loc7_.push(_loc6_); + } + } + return _loc7_; + } + + public static function getUserItemListByColor(param1:int) : Vector. + { + var _loc3_:PackItem = null; + var _loc5_:PackItem = null; + getAllPackList(); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in allPakList2) + { + if(_loc3_.itemType == 12) + { + _loc2_.push(_loc3_); + } + } + if(param1 == 0 || _loc2_.length == 0) + { + return _loc2_; + } + var _loc4_:Vector. = new Vector.(); + for each(_loc5_ in _loc2_) + { + if(_loc5_.color == param1) + { + _loc4_.push(_loc5_); + } + } + return _loc4_; + } + + public static function getUserItemListByChildType(param1:int) : Vector. + { + var _loc3_:PackItem = null; + var _loc5_:PackItem = null; + getAllPackList(); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in allPakList2) + { + if(_loc3_.itemType == 12) + { + _loc2_.push(_loc3_); + } + } + if(param1 == 0 || _loc2_.length == 0) + { + return _loc2_; + } + var _loc4_:Vector. = new Vector.(); + for each(_loc5_ in _loc2_) + { + if(_loc5_.childType == param1) + { + _loc4_.push(_loc5_); + } + } + return _loc4_; + } + + public static function getUserItemByChildType(param1:int) : PackItem + { + var _loc2_:PackItem = null; + for each(_loc2_ in allPakList1) + { + if(_loc2_.itemType == 12 && _loc2_.childType == param1) + { + return _loc2_; + } + } + return null; + } + + public static function getUserItemListByChildType1(param1:int) : Vector. + { + var _loc3_:PackItem = null; + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in allPakList1) + { + if(param1 == 0 && _loc3_.itemType == 12) + { + _loc2_.push(_loc3_); + } + else if(_loc3_.itemType == 12 && _loc3_.childType == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + + public static function getPetItemByChildType(param1:int) : PackItem + { + var _loc2_:PackItem = null; + if(param1 == 0) + { + return null; + } + for each(_loc2_ in allPakList1) + { + if(_loc2_.itemType == 13 && _loc2_.id == param1) + { + return _loc2_; + } + } + return null; + } + + public static function getHeroEquipById(param1:int) : PackItem + { + var _loc2_:PackItem = null; + getAllPackList(); + if(param1 == 0) + { + return null; + } + for each(_loc2_ in allPakList1) + { + if(_loc2_.id == param1) + { + return _loc2_; + } + } + return null; + } + + public static function getYuBoList(param1:int, param2:int) : Vector. + { + var _loc5_:PackItem = null; + getAllPackList(); + var _loc3_:Vector. = new Vector.(); + if(allPakList2.length == 0) + { + return _loc3_; + } + var _loc4_:Vector. = new Vector.(); + for each(_loc5_ in allPakList2) + { + if(_loc5_.isYuBo() == false) + { + continue; + } + if(param1 > 0) + { + if(param1 == _loc5_.itemType) + { + _loc4_.push(_loc5_); + } + } + else + { + _loc4_.push(_loc5_); + } + } + for each(_loc5_ in _loc4_) + { + if(param2 == 0) + { + _loc3_.push(_loc5_); + } + else if(param2 == _loc5_.level) + { + _loc3_.push(_loc5_); + } + } + return _loc3_; + } + + public static function getExchangeListByType(param1:int) : Vector. + { + var _loc2_:Vector. = new Vector.(); + if(param1 == 1) + { + _loc2_ = exchangeList1; + } + else if(param1 == 2) + { + _loc2_ = exchangeList2; + } + else if(param1 == 3) + { + _loc2_ = exchangeList3; + } + else if(param1 == 4) + { + _loc2_ = exchangeList4; + } + else if(param1 == 5) + { + _loc2_ = exchangeList5; + } + else if(param1 == 6) + { + _loc2_ = exchangeList6; + } + else if(param1 == 7) + { + _loc2_ = exchangeList7; + } + else if(param1 == 8) + { + _loc2_ = exchangeList8; + } + else if(param1 == 9) + { + _loc2_ = exchangeList9; + } + if(_loc2_.length == 0) + { + ConnectService.getInstance().packService.getExchangeList(param1); + } + return _loc2_; + } + + public static function setExchangeList(param1:int, param2:Array) : void + { + var _loc4_:Object = null; + var _loc6_:PackExchangeItem = null; + var _loc3_:Vector. = new Vector.(); + for each(_loc4_ in param2) + { + _loc6_ = new PackExchangeItem(_loc4_); + _loc3_.push(_loc6_); + } + if(param1 == 1) + { + exchangeList1 = _loc3_; + } + else if(param1 == 2) + { + exchangeList2 = _loc3_; + } + else if(param1 == 3) + { + exchangeList3 = _loc3_; + } + else if(param1 == 4) + { + exchangeList4 = _loc3_; + } + else if(param1 == 5) + { + exchangeList5 = _loc3_; + } + else if(param1 == 6) + { + exchangeList6 = _loc3_; + } + else if(param1 == 7) + { + exchangeList7 = _loc3_; + } + else if(param1 == 8) + { + exchangeList8 = _loc3_; + } + else if(param1 == 9) + { + exchangeList9 = _loc3_; + } + var _loc5_:UserPackEvent = new UserPackEvent(UserPackEvent.Exchange_getItemList); + _loc5_._type = param1; + Utils.g_events.dispatchEvent(_loc5_); + } + + public static function getPetItemListByColor(param1:int) : Vector. + { + var _loc3_:PackItem = null; + var _loc5_:PackItem = null; + getAllPackList(); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in allPakList2) + { + if(_loc3_.itemType == 13) + { + _loc2_.push(_loc3_); + } + } + if(param1 == 0 || _loc2_.length == 0) + { + return _loc2_; + } + var _loc4_:Vector. = new Vector.(); + for each(_loc5_ in _loc2_) + { + if(_loc5_.childType == param1) + { + _loc4_.push(_loc5_); + } + } + return _loc4_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/mc/ExchangeMc.as b/flash_decompiled/com/view/ui/pak/mc/ExchangeMc.as new file mode 100644 index 0000000..4782133 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/mc/ExchangeMc.as @@ -0,0 +1,114 @@ +package com.view.ui.pak.mc +{ + import com.common.PublicMethod; + import com.view.ui.pak.data.PackExchangeItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ExchangeMc extends Sprite + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var itemObj:PackExchangeItem; + + private var itemName:TextField; + + private var hasClick:Boolean; + + private var line:Sprite; + + public function ExchangeMc() + { + super(); + this.bg1 = PublicMethod.createShape(6378823,159,22); + this.bg2 = PublicMethod.createShape(4605510,159,22); + addChild(this.bg1); + addChild(this.bg2); + this.bg1.y = 1; + this.bg2.y = 1; + addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true); + this.bg2.alpha = 0; + this.bg1.alpha = 0; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,159); + this.itemName.defaultTextFormat = PublicMethod.getCenterTextFormat(); + addChild(this.itemName); + this.itemName.y = 3; + this.line = PublicMethod.getTrLine(159); + addChild(this.line); + this.line.y = 23; + } + + public function setItem(param1:PackExchangeItem) : void + { + this.itemObj = param1; + if(this.itemObj) + { + this.itemName.htmlText = this.itemObj.itemName; + } + else + { + this.itemName.htmlText = ""; + } + } + + private function rollOut(param1:MouseEvent) : void + { + if(this.itemObj == null) + { + return; + } + if(!this.hasClick) + { + this.bg2.alpha = 0; + } + } + + private function rollOver(param1:MouseEvent) : void + { + if(this.itemObj == null) + { + return; + } + if(!this.hasClick) + { + this.bg2.alpha = 1; + } + } + + public function setClick(param1:Boolean) : void + { + if(this.itemObj == null) + { + return; + } + this.hasClick = param1; + if(this.hasClick) + { + this.bg1.alpha = 1; + } + else + { + this.bg1.alpha = 0; + } + this.bg2.alpha = 0; + } + + public function getItemObj() : PackExchangeItem + { + return this.itemObj; + } + + public function clear() : void + { + this.itemObj = null; + removeEventListener(MouseEvent.ROLL_OUT,this.rollOut); + removeEventListener(MouseEvent.ROLL_OVER,this.rollOver); + } + } +} + diff --git a/flash_decompiled/com/view/ui/pak/mc/PackDelItem.as b/flash_decompiled/com/view/ui/pak/mc/PackDelItem.as new file mode 100644 index 0000000..54f47f6 --- /dev/null +++ b/flash_decompiled/com/view/ui/pak/mc/PackDelItem.as @@ -0,0 +1,44 @@ +package com.view.ui.pak.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.text.TextField; + + public class PackDelItem extends Sprite + { + + private var itemName:TextField; + + private var itemNums:TextField; + + public function PackDelItem() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(144); + addChild(_loc1_); + _loc1_.x = 2; + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + addChild(this.itemName); + this.itemName.x = 10; + this.itemName.y = 4; + this.itemNums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40); + addChild(this.itemNums); + this.itemNums.x = this.itemName.x + this.itemName.width; + this.itemNums.y = 3; + } + + public function setObj(param1:Object) : void + { + if(param1 == null) + { + this.itemName.text = ""; + this.itemNums.text = ""; + return; + } + this.itemName.htmlText = param1.itemName; + this.itemNums.htmlText = param1.itemCount; + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/CheckMenu.as b/flash_decompiled/com/view/ui/province/CheckMenu.as new file mode 100644 index 0000000..afd2982 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/CheckMenu.as @@ -0,0 +1,152 @@ +package com.view.ui.province +{ + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.world.ui.AbstractView; + import flash.display.MovieClip; + import flash.events.Event; + import flash.events.MouseEvent; + + public class CheckMenu extends AbstractView + { + + public var _move_btn:UIButton; + + public var _info_btn:UIButton; + + public var _watch_btn:UIButton; + + private var menuMc:MovieClip; + + private var watchF:Function; + + private var moveF:Function; + + private var infoF:Function; + + public var infoArray:Object; + + public var obj:Object; + + public function CheckMenu() + { + super(); + this._move_btn = new UIButton("移动",1,10); + this._info_btn = new UIButton("查看",1,10); + this._watch_btn = new UIButton("战况",1,10); + addChild(this._move_btn); + addChild(this._info_btn); + addChild(this._watch_btn); + this._info_btn.x = this._move_btn.width; + this._watch_btn.x = this._info_btn.x + this._info_btn.width; + this._move_btn.y = 70; + this._info_btn.y = 70; + this._watch_btn.y = 70; + this._move_btn.onClick = this.move; + this._info_btn.onClick = this.info; + this._watch_btn.onClick = this.watch; + addEventListener(Event.REMOVED_FROM_STAGE,this.removeStage); + } + + override public function setPosition() : void + { + } + + public function hidePart() : void + { + this._info_btn.visible = false; + this._watch_btn.visible = false; + } + + public function setMessage(param1:String) : void + { + } + + private function watch(param1:MouseEvent) : void + { + if(this.watchF != null) + { + this.watchF(); + } + } + + public function list(param1:Object, param2:Object) : void + { + this.obj = param1; + var _loc3_:Array = param2.combatInfo; + if(param2.isWatch == 1) + { + this._move_btn.setUnEnable(); + this._info_btn.setUnEnable(); + this._watch_btn.setUnEnable(); + } + else + { + this._move_btn.setEnable(); + this._info_btn.setEnable(); + this._watch_btn.setEnable(); + } + this._watch_btn.setUnEnable(); + if(_loc3_ == null || _loc3_.length == 0) + { + return; + } + var _loc4_:int = 0; + while(_loc4_ < _loc3_.length) + { + if(_loc3_[_loc4_].pointId == this.obj.pointId) + { + this._watch_btn.setEnable(); + this.infoArray = _loc3_[_loc4_].pointFight; + this._watch_btn.visible = true; + break; + } + _loc4_++; + } + } + + public function set onMove(param1:Function) : void + { + this.moveF = param1; + } + + public function showAll() : void + { + this._move_btn.visible = true; + this._info_btn.visible = true; + this._watch_btn.visible = true; + } + + private function info(param1:MouseEvent) : void + { + if(this.infoF != null) + { + this.infoF(); + } + } + + public function set onWatch(param1:Function) : void + { + this.watchF = param1; + } + + public function set onInfo(param1:Function) : void + { + this.infoF = param1; + } + + private function move(param1:MouseEvent) : void + { + if(this.moveF != null) + { + this.moveF(); + } + } + + private function removeStage(param1:Event) : void + { + Utils.removeAll(this); + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/City.as b/flash_decompiled/com/view/ui/province/City.as new file mode 100644 index 0000000..0ba8704 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/City.as @@ -0,0 +1,101 @@ +package com.view.ui.province +{ + import com.comfig.ServerConfig; + import com.loader.CLoader; + import com.utils.Utils; + import com.view.ui.guild.mc.NodeTip; + import com.view.world.ToolTipManager; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.net.URLRequest; + import flash.text.TextField; + import flash.text.TextFormat; + + public class City extends Sprite + { + + private var img:Object; + + private var fireLoader:CLoader; + + private var loader:CLoader; + + private var bit:Bitmap; + + public var obj:Object; + + private var clickF:Function; + + public var menu:CheckMenu; + + public function City(param1:Object, param2:*) + { + super(); + this.loader = new CLoader(); + this.fireLoader = new CLoader(); + this.obj = param1; + this.img = param2; + this.loader.load(new URLRequest(ServerConfig.IMG_PLAY_URL + this.obj.picName)); + this.addChild(this.loader); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.__complete,false,0,true); + this.addEventListener(MouseEvent.CLICK,this.__click,false,0,true); + ToolTipManager.getInstance().setToolTip(this,new NodeTip(this.obj)); + this.addChild(this.fireLoader); + } + + public function set onClick(param1:Function) : void + { + this.clickF = param1; + } + + public function getTextField(param1:String) : TextField + { + var _loc2_:TextField = new TextField(); + var _loc3_:TextFormat = new TextFormat(); + _loc3_.bold = true; + _loc3_.align = "center"; + _loc3_.font = "SimSun"; + _loc2_.defaultTextFormat = _loc3_; + _loc2_.mouseWheelEnabled = false; + _loc2_.mouseEnabled = false; + _loc2_.htmlText = Utils.getHtmlText(param1,"#ffffff"); + _loc2_.height = 18; + _loc2_.mouseEnabled = false; + return _loc2_; + } + + private function __click(param1:MouseEvent) : void + { + if(this.clickF != null) + { + this.clickF(); + } + } + + public function addFire(param1:Array) : void + { + } + + private function fireComplete(param1:Event) : void + { + var _loc2_:* = MovieClip(param1.target.content); + _loc2_.x = this.img.x + this.obj.posX - 20; + _loc2_.y = this.img.y + this.obj.posY - _loc2_.height; + } + + private function __complete(param1:Event) : void + { + this.bit = Bitmap(param1.target.content); + this.bit.x = this.img.x + this.obj.posX - this.bit.width / 2; + this.bit.y = this.img.y + this.obj.posY - this.bit.height / 2; + var _loc2_:* = this.getTextField(this.obj.pointName); + _loc2_.x = this.img.x + this.obj.posX - _loc2_.width / 2; + _loc2_.y = this.bit.y + this.bit.height + 5; + this.addChild(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/CityInfoView.as b/flash_decompiled/com/view/ui/province/CityInfoView.as new file mode 100644 index 0000000..9347902 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/CityInfoView.as @@ -0,0 +1,299 @@ +package com.view.ui.province +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.province.event.ProvinceEvent; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.province.mc.CityViewMc; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class CityInfoView extends BaseUI + { + + private static var instance:CityInfoView; + + private var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var succF:Function; + + private var img:Bitmap; + + public var menuObj:Object; + + private var cityMc:MovieClip; + + private var casnametxt:TextField; + + private var castypetxt:TextField; + + private var batttypetxt:TextField; + + private var battrebtxt:TextField; + + private var canaddtxt:TextField; + + private var heronumtxt:TextField; + + private var cityListVec:Vector.; + + private var cityListMc:Sprite; + + private var scrollPane:ScrollPane; + + public function CityInfoView() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_zhendianxiangqing); + this.setPosition(); + this.createUI(); + } + + public static function getInstance() : CityInfoView + { + if(instance == null) + { + instance = new CityInfoView(); + } + return instance; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getPointUserInfo,this.getPointUserInfoSucc); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getPointUserInfo,this.getPointUserInfoSucc); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc7_:TextField = null; + var _loc8_:TextField = null; + var _loc12_:TextField = null; + var _loc14_:CityViewMc = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(140,391); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:Array = ["君主名","联盟名","战斗力","总兵数","君主等级","所在据点"]; + var _loc4_:Array = [101,100,70,70,60,80]; + var _loc5_:UITable = new UITable(); + _loc5_.drawLine = true; + _loc5_.install(15,_loc3_,_loc4_); + _loc1_.addChild(_loc5_); + _loc5_.x = _loc2_.x + _loc2_.width + 3; + _loc5_.y = _loc2_.y; + var _loc6_:UITitleBg = new UITitleBg("阵点信息",_loc2_.width); + _loc2_.addChild(_loc6_); + _loc6_.x = int(_loc2_.width / 2 - _loc6_.width / 2); + this.cityMc = this.gameRes.getMovieClip(ClassConfig.pro_CityInfo,this.gameRes.provinceInfo); + _loc2_.addChild(this.cityMc); + this.cityMc.x = 70; + this.cityMc.y = 72; + this.cityMc.iconmc.gotoAndStop(1); + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc7_.text = "阵点名称:"; + _loc2_.addChild(_loc7_); + _loc7_.x = 10; + _loc7_.y = 120; + this.casnametxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + _loc2_.addChild(this.casnametxt); + this.casnametxt.x = _loc7_.x + _loc7_.width; + this.casnametxt.y = _loc7_.y; + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc8_.text = "阵点类型:"; + _loc2_.addChild(_loc8_); + _loc8_.x = _loc7_.x; + _loc8_.y = _loc7_.y + 30; + this.castypetxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + _loc2_.addChild(this.castypetxt); + this.castypetxt.x = this.casnametxt.x; + this.castypetxt.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc9_.text = "战斗类型:"; + _loc2_.addChild(_loc9_); + _loc9_.x = _loc7_.x; + _loc9_.y = _loc8_.y + 30; + this.batttypetxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + _loc2_.addChild(this.batttypetxt); + this.batttypetxt.x = this.casnametxt.x; + this.batttypetxt.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc10_.text = "战斗恢复:"; + _loc2_.addChild(_loc10_); + _loc10_.x = _loc7_.x; + _loc10_.y = _loc9_.y + 30; + this.battrebtxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + _loc2_.addChild(this.battrebtxt); + this.battrebtxt.x = this.casnametxt.x; + this.battrebtxt.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc11_.text = "可否补兵:"; + _loc2_.addChild(_loc11_); + _loc11_.x = _loc7_.x; + _loc11_.y = _loc10_.y + 30; + this.canaddtxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + _loc2_.addChild(this.canaddtxt); + this.canaddtxt.x = this.casnametxt.x; + this.canaddtxt.y = _loc11_.y; + _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc12_.text = "君主数量:"; + _loc2_.addChild(_loc12_); + _loc12_.x = _loc7_.x; + _loc12_.y = _loc11_.y + 30; + this.heronumtxt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + _loc2_.addChild(this.heronumtxt); + this.heronumtxt.x = this.casnametxt.x; + this.heronumtxt.y = _loc12_.y; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(481,375); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc5_.addChild(this.scrollPane); + this.scrollPane.y = 25; + this.cityListMc = new Sprite(); + this.scrollPane.source = this.cityListMc; + this.cityListVec = new Vector.(); + var _loc13_:int = 0; + while(_loc13_ < 15) + { + _loc14_ = new CityViewMc(); + this.cityListMc.addChild(_loc14_); + this.cityListVec.push(_loc14_); + _loc14_.y = _loc13_ * 25; + _loc14_.x = 4; + _loc13_++; + } + this.scrollPane.update(); + } + + public function set onSucc(param1:Function) : void + { + this.succF = param1; + } + + public function list(param1:int, param2:Object, param3:Bitmap) : void + { + this.menuObj = param2; + this.img = param3; + ConnectService.getInstance().provinceService.getPointUserInfo(param1,this.menuObj.pointId); + } + + private function getPointUserInfoSucc(param1:ProvinceEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + closeUI(null); + return; + } + this.showList(param1.objData); + var _loc2_:* = param1.objData; + this.casnametxt.text = String(_loc2_["pointName"]); + this.castypetxt.text = String(_loc2_["pointType"]); + this.batttypetxt.text = String(_loc2_["fightType"]); + var _loc3_:* = _loc2_["isAtt"]; + if(_loc3_ == 1) + { + this.battrebtxt.text = String(_loc2_["attRecoverRate"]); + this.canaddtxt.text = String(_loc2_["attSupplyType"]); + } + else if(_loc3_ == 0) + { + this.battrebtxt.text = String(_loc2_["defRecoverRate"]); + this.canaddtxt.text = String(_loc2_["defSupplyType"]); + } + var _loc4_:* = _loc2_["type"]; + this.cityMc.iconmc.gotoAndStop(_loc4_); + if(this.succF != null) + { + this.succF(); + } + } + + private function clearMemList() : void + { + var _loc1_:int = int(this.cityListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.cityListVec[_loc2_].setData(null); + if(_loc2_ > 13) + { + this.cityListMc.removeChild(this.cityListVec[_loc2_]); + this.cityListVec[_loc2_].clear(); + this.cityListVec.splice(_loc2_,1); + } + _loc2_--; + } + this.scrollPane.update(); + } + + private function showList(param1:Object) : void + { + var _loc3_:* = undefined; + var _loc4_:CityViewMc = null; + var _loc2_:Array = param1.memberList as Array; + this.clearMemList(); + if(Boolean(_loc2_) && _loc2_.length > 0) + { + for(_loc3_ in _loc2_) + { + if(_loc3_ > 13) + { + _loc4_ = new CityViewMc(); + this.cityListMc.addChild(_loc4_); + this.cityListVec.push(_loc4_); + _loc4_.y = _loc3_ * 24; + } + this.cityListVec[_loc3_].setData(_loc2_[_loc3_]); + } + this.heronumtxt.text = _loc2_.length.toString(); + } + else + { + this.heronumtxt.text = "0"; + } + this.scrollPane.update(); + } + + private function fail(param1:*) : void + { + if(this.parent != null && this.parent.contains(this)) + { + this.parent.removeChild(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/DaBtn.as b/flash_decompiled/com/view/ui/province/DaBtn.as new file mode 100644 index 0000000..77e3431 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/DaBtn.as @@ -0,0 +1,20 @@ +package com.view.ui.province +{ + import com.view.res.GameUIRes; + + public class DaBtn extends ProButton + { + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + public function DaBtn(param1:String) + { + super(); + buttonMc = this.gameRes.getMovieClip(param1,this.gameRes.provinceInfo); + addChild(buttonMc); + super.addMouseEvent(); + buttonMc.gotoAndStop(1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/FightInfoViewProvince.as b/flash_decompiled/com/view/ui/province/FightInfoViewProvince.as new file mode 100644 index 0000000..349bcd3 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/FightInfoViewProvince.as @@ -0,0 +1,161 @@ +package com.view.ui.province +{ + import com.comfig.ClassConfig; + import com.view.mc.sprite.TextBar; + import com.view.ui.army.ArmySetUI; + import com.view.world.ui.AbstractView; + import flash.display.MovieClip; + + public class FightInfoViewProvince extends AbstractView + { + + private var controlBar:MovieClip; + + public var daBtn:DaBtn; + + public var bubingBtn:DaBtn; + + public var memBtn:DaBtn; + + private var close_btn:DaBtn; + + private var dashangF:Function; + + private var memberF:Function; + + private var disppearF:Function; + + private var provinceId:int; + + private var infoObj:Object; + + private var fightInfo_txt:TextBar; + + public function FightInfoViewProvince() + { + super(); + this.controlBar = gameRes.getMovieClip(ClassConfig.Pro_FightInfoViewProvince,gameRes.provinceInfo); + addChild(this.controlBar); + this.daBtn = new DaBtn(ClassConfig.pro_dashang); + this.bubingBtn = new DaBtn(ClassConfig.pro_bubing); + this.memBtn = new DaBtn(ClassConfig.pro_meminfo); + this.controlBar.addChild(this.daBtn); + this.controlBar.addChild(this.bubingBtn); + this.controlBar.addChild(this.memBtn); + this.daBtn.x = -132; + this.daBtn.y = -96; + this.daBtn.visible = false; + this.bubingBtn.x = -51; + this.bubingBtn.y = -96; + this.memBtn.x = 29; + this.memBtn.y = -96; + this.memBtn.onclick = this.__member; + this.bubingBtn.onclick = this.__addArmy; + this.close_btn = new DaBtn(ClassConfig.pro_close); + this.controlBar.addChild(this.close_btn); + this.close_btn.x = 319; + this.close_btn.y = -97; + this.close_btn.onclick = this.close; + this.fightInfo_txt = new TextBar(); + this.fightInfo_txt.createTextField(265,54); + this.controlBar.addChild(this.fightInfo_txt); + this.fightInfo_txt.x = -316; + this.fightInfo_txt.y = -57; + } + + override public function setPosition() : void + { + } + + public function updateDashang() : void + { + } + + private function __addArmy() : void + { + var _loc1_:ArmySetUI = ArmySetUI.getInstance(); + _loc1_.show(); + } + + public function set onDisppear(param1:Function) : void + { + this.disppearF = param1; + } + + private function __member() : void + { + if(this.memberF != null) + { + this.memberF(); + } + } + + private function close() : void + { + if(this.disppearF != null) + { + this.disppearF(); + } + } + + public function listMemberInfo(param1:Object) : void + { + var _loc2_:Object = null; + var _loc3_:int = 0; + this.controlBar.atkUnion_txt.text = param1.attGuildInfo.guildName; + this.controlBar.atkLevel_txt.text = param1.attGuildInfo.guildLevel; + this.controlBar.atkNum_txt.htmlText = param1.attGuildInfo.joinUserNum; + this.controlBar.defUnion_txt.text = param1.defGuildInfo.guildName; + this.controlBar.defLevel_txt.text = param1.defGuildInfo.guildLevel; + this.controlBar.defNum_txt.htmlText = param1.defGuildInfo.joinUserNum; + } + + public function list(param1:Object, param2:int) : void + { + this.infoObj = param1; + this.provinceId = param2; + if(this.infoObj.selfInfo != null) + { + if(this.infoObj.selfInfo.canSupply == 1) + { + this.bubingBtn.setEnabled(true); + } + else if(this.infoObj.selfInfo.canSupply == 2) + { + this.bubingBtn.setEnabled(false); + } + } + this.fightInfo_txt.traceMsg(""); + var _loc3_:int = 0; + while(_loc3_ < this.infoObj.mesList.length) + { + this.fightInfo_txt.print(String(this.infoObj.mesList[_loc3_])); + _loc3_++; + } + } + + public function set onMember(param1:Function) : void + { + this.memberF = param1; + } + + private function dashangHandler() : void + { + if(this.dashangF != null) + { + this.dashangF(); + } + } + + public function set onDashang(param1:Function) : void + { + this.dashangF = param1; + } + + public function get onDashang() : Function + { + return this.dashangF; + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/Flag.as b/flash_decompiled/com/view/ui/province/Flag.as new file mode 100644 index 0000000..c2bef99 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/Flag.as @@ -0,0 +1,59 @@ +package com.view.ui.province +{ + import com.comfig.ServerConfig; + import com.loader.CLoader; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.net.URLRequest; + + public class Flag extends Sprite + { + + private var img:Object; + + public var obj:Object; + + private var loader:CLoader; + + public function Flag(param1:Object, param2:*) + { + super(); + this.loader = new CLoader(); + this.obj = param1; + this.img = param2; + if(this.getFlagURL(this.obj.occuType) != "") + { + this.loader.load(new URLRequest(ServerConfig.IMG_PLAY_URL + this.getFlagURL(this.obj.occuType))); + } + this.addChild(this.loader); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.__complete); + } + + private function getFlagURL(param1:int) : String + { + var _loc2_:String = null; + if(param1 == 0) + { + _loc2_ = ""; + } + else if(param1 == 1) + { + _loc2_ = "redFlag.png"; + } + else if(param1 == 2) + { + _loc2_ = "blueFlag.png"; + } + return _loc2_; + } + + private function __complete(param1:Event) : void + { + var _loc2_:* = Bitmap(param1.target.content); + _loc2_.x = this.img.x + this.obj.posX - _loc2_.width / 2; + _loc2_.y = this.img.y + this.obj.posY - 32 - _loc2_.height / 2; + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/HeroInfoView.as b/flash_decompiled/com/view/ui/province/HeroInfoView.as new file mode 100644 index 0000000..0d36241 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/HeroInfoView.as @@ -0,0 +1,198 @@ +package com.view.ui.province +{ + import com.comfig.ClassConfig; + import com.utils.Utils; + import com.view.world.ui.AbstractView; + import flash.display.MovieClip; + + public class HeroInfoView extends AbstractView implements ITimeObject + { + + private var timeMc:MovieClip; + + private var disppearF:Function; + + private var refreshF:Function; + + private var opetime:int = 50; + + private var exetime:int = 21; + + private var endDes:String; + + private var time:int; + + public var infoObj:Object; + + private var provinceId:int; + + private var errorcount:int = -1; + + public function HeroInfoView() + { + super(); + this.timeMc = gameRes.getMovieClip(ClassConfig.Pro_HeroInfoView,gameRes.provinceInfo); + addChild(this.timeMc); + } + + public function infoTxt(param1:String) : void + { + this.timeMc.info_txt.htmlText = param1; + } + + override public function setPosition() : void + { + this.y = 0; + this.x = int(face.realWidth / 2) - 620; + } + + public function set onDisppear(param1:Function) : void + { + this.disppearF = param1; + } + + public function list(param1:Object, param2:int, param3:int = 0) : void + { + try + { + this.infoObj = param1; + this.provinceId = param2; + this.time = 0; + this.timeMc.time_txt.text = ""; + this.endDes = ""; + this.timeMc.info_txt.text = ""; + this.timeMc.battle_txt.text = String(this.infoObj.battleName) + "第" + this.infoObj.turnNum + "回合"; + if(this.infoObj.selfInfo != null) + { + if(this.infoObj.selfInfo.userPos == 2) + { + this.timeMc.info_txt.htmlText = "正在复活中 , 第" + this.infoObj.selfInfo.reliveTurn + "回合后复活"; + } + else + { + this.timeMc.info_txt.htmlText = "操作指令:" + String(this.infoObj.selfInfo.selfMes); + } + } + if(this.infoObj.time > 0) + { + this.time = this.infoObj.time; + TimerManager.getInstance().addTime(this); + this.errorcount = -1; + } + else + { + if(param3 > 0) + { + this.time = 10; + } + else + { + this.time = this.exetime; + } + TimerManager.getInstance().addTime(this); + } + if(this.infoObj.turnType == 1) + { + if(this.time > this.opetime) + { + this.opetime = this.time; + } + } + else if(this.infoObj.turnType == 2) + { + if(this.time > this.exetime) + { + this.exetime = this.time; + } + } + } + catch(e:Error) + { + } + } + + public function setResult(param1:String) : void + { + this.timeMc.time_txt.htmlText = param1; + this.timeMc.info_txt.text = ""; + TimerManager.getInstance().removeTime(this); + } + + public function getTimeType() : TimeType + { + return TimeType.COUNT_DOWN; + } + + public function carryOut() : void + { + var _loc1_:Number = NaN; + --this.time; + if(this.time <= 0) + { + TimerManager.getInstance().removeTime(this); + this.time = 0; + if(this.endDes != "") + { + TimerManager.getInstance().removeTime(this); + if(this.disppearF != null) + { + this.disppearF(); + } + return; + } + if(this.refreshF != null) + { + this.refreshF(); + } + } + if(this.endDes != "") + { + this.timeMc.time_txt.text = "距离战场关闭倒计时:" + this.time + "," + this.endDes; + return; + } + if(this.infoObj.turnType == 1) + { + this.timeMc.time_txt.text = "操作阶段, 剩余时间:" + Utils.formatSeconds(this.time); + _loc1_ = 1 - this.time / this.opetime; + this.timeMc.proarrowmc.x = this.timeMc.opmc.x + this.timeMc.opmc.width * _loc1_; + } + else if(this.infoObj.turnType == 2) + { + this.timeMc.time_txt.text = "行进阶段, 剩余时间:" + Utils.formatSeconds(this.time); + _loc1_ = 1 - this.time / this.exetime; + this.timeMc.proarrowmc.x = this.timeMc.exmc.x + this.timeMc.exmc.width * _loc1_; + } + } + + public function getTime() : int + { + return this.time; + } + + public function endCountStart(param1:String) : void + { + this.time = 30; + TimerManager.getInstance().removeTime(this); + TimerManager.getInstance().addTime(this); + this.endDes = param1; + } + + public function setTime(param1:int, param2:int) : void + { + if(param1 != 0) + { + this.opetime = param1; + } + if(param2 != 0) + { + this.exetime = param2; + } + } + + public function set onRefresh(param1:Function) : void + { + this.refreshF = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/HeroItem.as b/flash_decompiled/com/view/ui/province/HeroItem.as new file mode 100644 index 0000000..4a53851 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/HeroItem.as @@ -0,0 +1,103 @@ +package com.view.ui.province +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class HeroItem extends Sprite + { + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + private var heroMc:MovieClip; + + public var obj:Object; + + private var bgloader:LoadResource; + + private var headImg:Bitmap; + + private var bgImg:Bitmap; + + private var maxwidth:Number = 50; + + public function HeroItem() + { + super(); + this.heroMc = this.gameRes.getMovieClip(ClassConfig.Pro_HeroItem,this.gameRes.provinceInfo); + addChild(this.heroMc); + } + + public function update(param1:Object) : void + { + this.obj = param1; + var _loc2_:String = this.obj["armyEntId"]; + var _loc3_:* = _loc2_.substring(0,6); + var _loc4_:* = _loc2_.substring(6); + this.heroMc.lvtxt.text = _loc4_; + switch(_loc3_) + { + case "105010": + this.heroMc.typemc.visible = true; + this.heroMc.typemc.gotoAndStop(1); + break; + case "105020": + this.heroMc.typemc.visible = true; + this.heroMc.typemc.gotoAndStop(2); + break; + case "105030": + this.heroMc.typemc.visible = true; + this.heroMc.typemc.gotoAndStop(3); + break; + case "105040": + this.heroMc.typemc.visible = true; + this.heroMc.typemc.gotoAndStop(4); + break; + case "105050": + this.heroMc.typemc.visible = true; + this.heroMc.typemc.gotoAndStop(5); + break; + default: + this.heroMc.typemc.visible = false; + this.heroMc.lvtxt.visible = false; + this.heroMc.typemc.gotoAndStop(1); + } + var _loc5_:* = this.obj["armyNum"]; + var _loc6_:* = this.obj["finalLead"]; + if(_loc5_ > _loc6_) + { + _loc5_ = _loc6_; + } + this.heroMc.parbarmc.visible = true; + this.heroMc.parbarmc.width = this.maxwidth * (_loc5_ / _loc6_); + this.heroMc.counttxt.text = _loc5_ + "/" + _loc6_; + this.loadImg(ServerConfig.IMAGE_HEAD_URL + this.obj.picPath); + } + + private function loadImg(param1:String) : void + { + if(Boolean(this.headImg) && contains(this.headImg)) + { + removeChild(this.headImg); + } + this.bgloader = new LoadResource(param1,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.bgImg = Bitmap(param1.target.loader.content); + this.bgloader.clear(); + addChildAt(this.bgImg,0); + this.bgImg.x = -2; + this.bgImg.y = 24; + this.bgImg.width = 46; + this.bgImg.height = 60; + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/Horse.as b/flash_decompiled/com/view/ui/province/Horse.as new file mode 100644 index 0000000..45c82f6 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/Horse.as @@ -0,0 +1,195 @@ +package com.view.ui.province +{ + import com.comfig.ServerConfig; + import com.common.PublicMethod; + import com.greensock.TweenLite; + import com.loader.CLoader; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.net.URLRequest; + import flash.text.TextField; + + public class Horse extends Sprite + { + + private var loader:CLoader; + + private var img:Object; + + private var movetime:int; + + private var flagObj:Object; + + private var headBit:MovieClip; + + private var headLoader:CLoader; + + private var bit:MovieClip; + + public var obj:Object; + + public function Horse(param1:Object, param2:*, param3:Object, param4:int = 10) + { + super(); + this.loader = new CLoader(); + this.headLoader = new CLoader(); + this.obj = param1; + this.movetime = param4; + this.img = param2; + this.flagObj = param3; + if(this.flagObj.selfInfo != null && this.flagObj.selfInfo.userPos == 1) + { + if(this.isUserIn()) + { + this.headLoader.load(new URLRequest(ServerConfig.IMG_PLAY_URL + "player.swf")); + addChild(this.headLoader); + this.headLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.__headComplete); + } + else + { + this.loadHorse(); + } + } + else + { + this.loadHorse(); + } + ToolTipManager.getInstance().setToolTip(this,new TxtTooltip("玩家数量:" + this.obj.userNum)); + } + + public function getTextField(param1:String) : TextField + { + var _loc2_:* = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc2_.mouseWheelEnabled = false; + if(this.obj.attType == 1) + { + _loc2_.htmlText = Utils.getHtmlText(param1,"#ff0000"); + } + else + { + _loc2_.htmlText = Utils.getHtmlText(param1,"#0000ff"); + } + return _loc2_; + } + + private function __complete(param1:Event) : void + { + this.bit = MovieClip(param1.target.content); + if(this.obj.direction == 2) + { + this.bit.scaleX = -1; + this.bit.x += this.bit.width; + } + var _loc2_:* = this.getTextField("玩家数量:" + this.obj.userNum); + addChild(_loc2_); + if(this.headBit != null) + { + addChild(this.headBit); + } + if(this.flagObj.turnType == 1) + { + x = this.img.x + this.obj.posX - this.bit.width / 2; + y = this.img.y + this.obj.posY - this.bit.height / 2; + _loc2_.x = (this.bit.width - _loc2_.width) / 2; + _loc2_.y = this.bit.y - 5 - _loc2_.textHeight; + if(this.headBit != null) + { + this.headBit.x = (this.bit.width - this.headBit.width) / 2; + this.headBit.y = _loc2_.y - 5 - this.headBit.height; + } + } + else if(this.flagObj.turnType == 2) + { + x = this.img.x + this.obj.pathPosX - this.bit.width / 2; + y = this.img.y + this.obj.pathPosY - this.bit.height / 2; + _loc2_.x = (this.bit.width - _loc2_.width) / 2; + _loc2_.y = this.bit.y - 5 - _loc2_.textHeight; + if(this.headBit != null) + { + this.headBit.x = (this.bit.width - this.headBit.width) / 2; + this.headBit.y = _loc2_.y - 5 - this.headBit.height; + } + this.move(); + } + } + + private function isUserIn() : Boolean + { + var _loc1_:Boolean = false; + var _loc2_:int = 0; + while(_loc2_ < this.obj.userInfo.length) + { + if(this.obj.userInfo[_loc2_].userId == this.flagObj.selfInfo.userId) + { + _loc1_ = true; + break; + } + _loc2_++; + } + return _loc1_; + } + + private function loadHorse() : void + { + var _loc1_:String = ""; + if(this.obj.direction == 1) + { + if(this.obj.attType == 2) + { + _loc1_ = "blueRight.swf"; + } + else if(this.obj.attType == 1) + { + _loc1_ = "redRight.swf"; + } + } + else if(this.obj.direction == 2) + { + if(this.obj.attType == 2) + { + _loc1_ = "blueRight.swf"; + } + else if(this.obj.attType == 1) + { + _loc1_ = "redRight.swf"; + } + } + this.loader.load(new URLRequest(ServerConfig.IMG_PLAY_URL + _loc1_)); + addChild(this.loader); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.__complete); + } + + private function move() : void + { + TweenLite.to(this,this.movetime,{ + "x":this.img.x + this.obj.posX - this.bit.width / 2, + "y":this.img.y + this.obj.posY - this.bit.height / 2, + "overwrite":0, + "onComplete":this.timeEnd + }); + } + + private function __headComplete(param1:Event) : void + { + this.headBit = MovieClip(param1.target.content); + this.loadHorse(); + } + + private function timeEnd() : void + { + if(this.obj["isArrival"] != 2) + { + TweenLite.to(this,5,{ + "alpha":0, + "overwrite":0 + }); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/ITimeObject.as b/flash_decompiled/com/view/ui/province/ITimeObject.as new file mode 100644 index 0000000..8a244a5 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/ITimeObject.as @@ -0,0 +1,13 @@ +package com.view.ui.province +{ + public interface ITimeObject + { + + function getTime() : int; + + function carryOut() : void; + + function getTimeType() : TimeType; + } +} + diff --git a/flash_decompiled/com/view/ui/province/KingInfoView.as b/flash_decompiled/com/view/ui/province/KingInfoView.as new file mode 100644 index 0000000..4085cae --- /dev/null +++ b/flash_decompiled/com/view/ui/province/KingInfoView.as @@ -0,0 +1,119 @@ +package com.view.ui.province +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.newdata.user.NewUserData; + import com.view.Control; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import com.view.world.ui.AbstractView; + import flash.display.Bitmap; + import flash.display.DisplayObject; + import flash.display.MovieClip; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class KingInfoView extends AbstractView + { + + private var headMc:MovieClip; + + private var _heroItem0:HeroItem; + + private var _heroItem1:HeroItem; + + private var _heroItem2:HeroItem; + + private var _heroItem3:HeroItem; + + private var _heroItem4:HeroItem; + + private var _lvtxt:TextField; + + private var myBtn:MovieClip; + + private var loadHead:LoadResource; + + private var imgBitmap:Bitmap; + + public function KingInfoView() + { + super(); + this.headMc = gameRes.getMovieClip(ClassConfig.Pro_KingInfoView,gameRes.provinceInfo); + addChild(this.headMc); + this._heroItem0 = new HeroItem(); + this._heroItem1 = new HeroItem(); + this._heroItem2 = new HeroItem(); + this._heroItem3 = new HeroItem(); + this._heroItem4 = new HeroItem(); + this.headMc.addChild(this._heroItem0); + this.headMc.addChild(this._heroItem1); + this.headMc.addChild(this._heroItem2); + this.headMc.addChild(this._heroItem3); + this.headMc.addChild(this._heroItem4); + this.headMc.btn_my.addEventListener(MouseEvent.CLICK,this.switchMsg,false,0,true); + this._heroItem0.x = 114; + this._heroItem0.y = -17; + this._heroItem1.x = 168; + this._heroItem1.y = this._heroItem0.y; + this._heroItem2.x = 221; + this._heroItem2.y = this._heroItem0.y; + this._heroItem3.x = 273; + this._heroItem3.y = this._heroItem0.y; + this._heroItem4.x = 327; + this._heroItem4.y = this._heroItem0.y; + this._lvtxt = this.headMc.lvtxt as TextField; + this._lvtxt.text = ""; + this.myBtn = this.headMc.myBtn; + ToolTipManager.getInstance().setToolTip(this.myBtn,new TxtTooltip("收缩/展开个人信息")); + this.loadHead = new LoadResource(ServerConfig.IMAGE_HEAD_URL + NewUserData.getUser().icon,this.loadHeadBack); + } + + override public function setPosition() : void + { + } + + private function loadHeadBack(param1:Event) : void + { + this.imgBitmap = Bitmap(DisplayObject(param1.target.content)); + this.headMc.addChildAt(this.imgBitmap,this.headMc.getChildIndex(this.headMc.mark)); + this.imgBitmap.mask = this.headMc.mark; + this.loadHead.clear(); + } + + private function switchMsg(param1:MouseEvent) : void + { + Control.getInstance().userFaceUI.showSysMessUI(param1); + } + + public function list(param1:Object) : void + { + this.showHero(param1.selfInfo.heroList); + this._lvtxt.text = String(NewUserData.getUser().rankId); + } + + private function showHero(param1:Array) : void + { + var _loc2_:int = 0; + while(_loc2_ < 5) + { + (this["_heroItem" + _loc2_] as HeroItem).visible = false; + _loc2_++; + } + if(param1.length == 0) + { + return; + } + var _loc3_:int = 0; + while(_loc3_ < param1.length) + { + (this["_heroItem" + _loc3_] as HeroItem).visible = true; + (this["_heroItem" + _loc3_] as HeroItem).update(param1[_loc3_]); + _loc3_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/ProButton.as b/flash_decompiled/com/view/ui/province/ProButton.as new file mode 100644 index 0000000..ec077db --- /dev/null +++ b/flash_decompiled/com/view/ui/province/ProButton.as @@ -0,0 +1,94 @@ +package com.view.ui.province +{ + import com.common.PublicMethod; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class ProButton extends Sprite + { + + public var buttonMc:MovieClip; + + private var isEnabled:Boolean; + + private var _onclick:Function; + + public function ProButton() + { + super(); + this.isEnabled = true; + } + + public function addMouseEvent() : void + { + if(this.buttonMc) + { + addEventListener(MouseEvent.ROLL_OVER,this.mouse_over); + addEventListener(MouseEvent.ROLL_OUT,this.mouse_out); + addEventListener(MouseEvent.MOUSE_DOWN,this.mouse_down); + addEventListener(MouseEvent.MOUSE_UP,this.mouse_up); + } + } + + public function setEnabled(param1:Boolean) : void + { + this.isEnabled = param1; + if(this.isEnabled) + { + PublicMethod.setColor(this.buttonMc); + } + else + { + PublicMethod.setBlack(this.buttonMc); + } + } + + public function mouse_over(param1:MouseEvent) : void + { + if(this.isEnabled) + { + this.buttonMc.gotoAndStop(2); + } + } + + public function mouse_down(param1:MouseEvent) : void + { + if(this.isEnabled) + { + this.buttonMc.gotoAndStop(3); + } + } + + public function mouse_up(param1:MouseEvent) : void + { + if(this.isEnabled) + { + this.buttonMc.gotoAndStop(2); + if(Boolean(this._onclick)) + { + this._onclick(); + } + } + } + + public function mouse_out(param1:MouseEvent) : void + { + if(this.isEnabled) + { + this.buttonMc.gotoAndStop(1); + } + } + + public function get onclick() : Function + { + return this._onclick; + } + + public function set onclick(param1:Function) : void + { + this._onclick = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/ProvinceBase.as b/flash_decompiled/com/view/ui/province/ProvinceBase.as new file mode 100644 index 0000000..c6a2cad --- /dev/null +++ b/flash_decompiled/com/view/ui/province/ProvinceBase.as @@ -0,0 +1,97 @@ +package com.view.ui.province +{ + import com.comfig.PathConfig; + import com.control.ConnectService; + import com.control.province.event.ProvinceEvent; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.net.URLRequest; + + public class ProvinceBase extends BaseUI + { + + private var guildUrl:String = "Province.swf"; + + public var gameRes:GameUIRes; + + public var id:int; + + public var hasLoad:Boolean; + + public function ProvinceBase() + { + var _loc1_:URLRequest = null; + this.gameRes = GameUIRes.getInstance(); + super(); + if(this.gameRes.provinceInfo == null) + { + _loc1_ = new URLRequest(PathConfig.getInstance().getVerStr(this.guildUrl)); + super.loadUIResource(_loc1_); + } + else + { + this.createUI(); + } + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getPointForMap,this.getPointForMapSucc); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getBattleInfoForMap,this.getBattleInfoForMapSucc); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_userMove,this.userMoveSucc); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getPointForMap,this.getPointForMapSucc); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getBattleInfoForMap,this.getBattleInfoForMapSucc); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_userMove,this.userMoveSucc); + } + + public function getPointForMap() : void + { + ConnectService.getInstance().provinceService.getPointForMap(this.id); + } + + public function getPointForMapSucc(param1:ProvinceEvent) : void + { + } + + public function getBattleInfoForMap() : void + { + ConnectService.getInstance().provinceService.getBattleInfoForMap(this.id); + } + + public function getBattleInfoForMapSucc(param1:ProvinceEvent) : void + { + } + + public function userMove(param1:int) : void + { + ConnectService.getInstance().provinceService.userMove(param1,this.id); + } + + public function userMoveSucc(param1:ProvinceEvent) : void + { + } + + override public function loadUiComplete(param1:Event) : void + { + super.loadUiComplete(param1); + this.gameRes.provinceInfo = _loaderInfo; + this.createUI(); + } + + override public function createUI() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/ProvinceView.as b/flash_decompiled/com/view/ui/province/ProvinceView.as new file mode 100644 index 0000000..0222f08 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/ProvinceView.as @@ -0,0 +1,711 @@ +package com.view.ui.province +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.control.province.event.ProvinceEvent; + import com.loader.CLoader; + import com.utils.Utils; + import com.view.Control; + import com.view.ui.guild.FightInfoView; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.net.URLRequest; + import flash.utils.Timer; + + public class ProvinceView extends ProvinceBase + { + + private static var instance:ProvinceView; + + private var bgContainer:Sprite; + + private var fightInfoContainer:Sprite; + + private var KingContainer:Sprite; + + private var infoContainer:Sprite; + + private var mapContainer:Sprite; + + private var effectContainer:Sprite; + + private var flagContainer:Sprite; + + private var headContainer:Sprite; + + private var cityContainer:Sprite; + + private var proObj:Object; + + private var dragIng:Boolean = false; + + private var kingInfo:KingInfoView; + + private var heroInfoView:HeroInfoView; + + private var fightInfoViewProvince:FightInfoViewProvince; + + private var timeEffect:TimeEffect; + + private var endpoptimer:Timer; + + private var readerrortimer:Timer; + + private var movetimer:Timer; + + private var last_mx:Number; + + private var last_my:Number; + + private var h:int = 900; + + private var w:int = 1482; + + private var readerrornum:int = 3; + + private var flagObj:Object; + + private var headLoader:CLoader; + + private var m_errorNum:int = 0; + + private var cityArr:Array; + + private var cloader:CLoader; + + private var myCityId:String; + + private var reliveStatuc:String; + + private var fightStatuc:String; + + private var atkLv:int; + + private var defLv:int; + + private var img:Bitmap; + + private var pathList:Array; + + public function ProvinceView() + { + super(); + } + + public static function getInstance() : ProvinceView + { + if(instance == null) + { + instance = new ProvinceView(); + } + return instance; + } + + override public function createUI() : void + { + var mapText:Sprite; + hasLoad = true; + this.endpoptimer = new Timer(3000,1); + this.readerrortimer = new Timer(6000,1); + this.movetimer = new Timer(10,1); + this.fightInfoContainer = new Sprite(); + this.KingContainer = new Sprite(); + this.infoContainer = new Sprite(); + this.mapContainer = new Sprite(); + this.effectContainer = new Sprite(); + this.flagContainer = new Sprite(); + this.headContainer = new Sprite(); + this.cloader = new CLoader(); + this.cityContainer = new Sprite(); + this.bgContainer = gameRes.getSprite(ClassConfig.Pro_provinceView,gameRes.provinceInfo); + addChild(this.bgContainer); + this.bgContainer.addChild(this.cloader); + this.bgContainer.addChild(this.cityContainer); + this.bgContainer.addChild(this.flagContainer); + this.bgContainer.addChild(this.headContainer); + this.kingInfo = new KingInfoView(); + this.KingContainer.addChild(this.kingInfo); + addChild(this.KingContainer); + this.heroInfoView = new HeroInfoView(); + this.infoContainer.addChild(this.heroInfoView); + addChild(this.infoContainer); + this.fightInfoViewProvince = new FightInfoViewProvince(); + this.fightInfoContainer.addChild(this.fightInfoViewProvince); + addChild(this.fightInfoContainer); + this.fightInfoViewProvince.onMember = function():* + { + viewMember(fightInfoViewProvince); + }; + this.fightInfoViewProvince.onDisppear = function():* + { + close(); + }; + this.fightInfoViewProvince.onDashang = function():* + { + dashangHandler(); + }; + mapText = gameRes.getSprite(ClassConfig.Pro_MapView,gameRes.provinceInfo); + this.mapContainer.addChild(mapText); + addChild(this.mapContainer); + this.timeEffect = new TimeEffect(); + this.effectContainer.addChild(this.timeEffect); + addChild(this.effectContainer); + this.timeEffect.addEventListener(TimeEffect.TIMEEND,this.timeEnd); + this.heroInfoView.onDisppear = function():* + { + close(); + }; + this.heroInfoView.onRefresh = function():* + { + changeStates(this); + }; + this.endpoptimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.endpophandler); + this.readerrortimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.readerrorcomplete); + this.addedHandler(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(hasLoad) + { + getPointForMap(); + this.bgContainer.x = 0; + this.bgContainer.y = 0; + } + } + + private function close() : void + { + Control.getInstance().removeProvinceWar(); + } + + private function timeEnd(param1:Event) : void + { + this.refresh(); + } + + private function addedHandler() : void + { + this.resize(); + stage.addEventListener(Event.RESIZE,this.resizeHandler,false,0,true); + this.bgContainer.addEventListener(MouseEvent.MOUSE_DOWN,this.e_down,false,0,true); + this.bgContainer.addEventListener(MouseEvent.MOUSE_UP,this.e_up,false,0,true); + this.bgContainer.addEventListener(MouseEvent.MOUSE_OUT,this.mouseOut,false,0,true); + getPointForMap(); + } + + public function resize() : void + { + if(this.bgContainer.x > 0) + { + this.bgContainer.x = 0; + } + if(this.bgContainer.y > 0) + { + this.bgContainer.y = 0; + } + if(this.bgContainer.x < face.realWidth - this.w) + { + this.bgContainer.x = face.realWidth - this.w; + } + if(this.bgContainer.y < face.realHeight - this.h) + { + this.bgContainer.y = face.realHeight - this.h; + } + this.KingContainer.x = 0; + this.KingContainer.y = 0; + this.infoContainer.x = 400; + this.fightInfoContainer.x = 700; + this.fightInfoContainer.y = face.realHeight; + this.mapContainer.x = face.realWidth; + this.mapContainer.y = 20; + } + + private function resizeHandler(param1:Event) : void + { + this.resize(); + } + + private function e_down(param1:MouseEvent) : void + { + this.dragIng = true; + this.bgContainer.removeEventListener(MouseEvent.MOUSE_MOVE,this.move); + this.bgContainer.addEventListener(MouseEvent.MOUSE_MOVE,this.move); + this.last_mx = this.bgContainer.mouseX; + this.last_my = this.bgContainer.mouseY; + } + + private function e_up(param1:MouseEvent) : void + { + this.bgContainer.stopDrag(); + this.dragIng = false; + this.bgContainer.removeEventListener(MouseEvent.MOUSE_MOVE,this.move); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.dragIng = false; + this.bgContainer.removeEventListener(MouseEvent.MOUSE_MOVE,this.move); + } + + private function endpophandler(param1:TimerEvent) : void + { + this.endpoptimer.removeEventListener(TimerEvent.TIMER_COMPLETE,this.endpophandler); + var _loc2_:FightInfoView = FightInfoView.getInstance(); + _loc2_.getinfo(id); + _loc2_.show(); + } + + private function readerrorcomplete(param1:TimerEvent) : void + { + --this.readerrornum; + if(this.readerrornum > 0) + { + this.refresh(); + } + } + + private function changeStates(param1:HeroInfoView) : void + { + if(this.m_errorNum == 0) + { + this.timeEffect.addTimeClip(this.flagObj.turnType); + } + else + { + this.refresh(); + } + } + + public function refresh() : void + { + this.resize(); + this.readerrortimer.delay = 8000; + this.readerrortimer.start(); + getBattleInfoForMap(); + } + + override public function getBattleInfoForMapSucc(param1:ProvinceEvent) : void + { + this.readerrortimer.stop(); + this.readerrornum = 3; + Utils.removeAll(this.flagContainer); + this.flagObj = param1.objData; + if(this.flagObj == null) + { + return; + } + this.myCityId = this.flagObj.selfInfo.selfPointId; + this.reliveStatuc = this.flagObj.selfInfo.userPos; + this.fightStatuc = this.flagObj.turnType; + if(Boolean(this.flagObj.selfInfo.atk) && int(this.flagObj.selfInfo.atk) > 0) + { + this.atkLv = int(this.flagObj.selfInfo.atk); + } + else + { + this.atkLv = 0; + } + if(Boolean(this.flagObj.selfInfo.def) && int(this.flagObj.selfInfo.def) > 0) + { + this.defLv = int(this.flagObj.selfInfo.def); + } + else + { + this.defLv = 0; + } + if(this.headLoader != null && this.headContainer.contains(this.headLoader)) + { + this.headContainer.removeChild(this.headLoader); + this.headLoader = null; + } + if(this.flagObj.isWatch == 1) + { + this.fightInfoViewProvince.memBtn.setEnabled(false); + this.fightInfoViewProvince.bubingBtn.setEnabled(false); + } + else + { + this.kingInfo.list(this.flagObj); + this.fightInfoViewProvince.memBtn.setEnabled(true); + this.fightInfoViewProvince.bubingBtn.setEnabled(true); + if(this.flagObj.selfInfo.userPos == 3) + { + this.headLoader = new CLoader(); + this.headLoader.load(new URLRequest(ServerConfig.IMG_PLAY_URL + "player.swf")); + this.headLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.__headComplete); + this.headContainer.addChild(this.headLoader); + } + else if(this.flagObj.selfInfo.userPos == 2) + { + this.headLoader = new CLoader(); + this.headLoader.load(new URLRequest(ServerConfig.IMG_PLAY_URL + "dead.swf")); + this.headLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.__headComplete); + this.headContainer.addChild(this.headLoader); + } + } + this.fightInfoViewProvince.list(this.flagObj,id); + if(this.flagObj.turnType == 2) + { + if(this.flagObj.time < 0) + { + if(this.m_errorNum > 0) + { + this.movetimer.stop(); + this.horsemovecomplete(null); + } + else + { + this.moveHorse(); + } + this.m_errorNum += 1; + } + else + { + this.m_errorNum = 0; + this.moveHorse(); + } + } + else + { + this.horsemovecomplete(); + } + if(this.flagObj.res == 2) + { + if(this.flagObj.winType == "进攻方胜利") + { + } + this.heroInfoView.setResult(this.flagObj.winResult); + this.endpoptimer.start(); + } + } + + private function horsemovecomplete(param1:TimerEvent = null) : void + { + var _loc6_:CheckMenu = null; + var _loc2_:City = null; + var _loc3_:String = null; + var _loc4_:Array = this.getMovePoint(this.myCityId); + var _loc5_:int = 0; + while(_loc5_ < this.cityArr.length) + { + _loc2_ = this.cityArr[_loc5_]; + this.addMenu(_loc2_); + _loc3_ = _loc2_.obj["pointId"]; + if(_loc4_.indexOf(_loc3_) == -1) + { + _loc6_ = _loc2_.menu; + if(_loc6_ != null) + { + _loc6_._move_btn.visible = false; + _loc6_._watch_btn.visible = false; + } + } + else + { + _loc2_.menu._watch_btn.visible = false; + } + _loc2_.addFire(this.flagObj.combatInfo); + _loc5_++; + } + if(this.flagObj.res != 2) + { + this.heroInfoView.list(this.flagObj,id,this.m_errorNum); + } + this.showFlag(this.flagObj.allPointInfo); + if(this.flagObj.res == 2) + { + this.heroInfoView.setResult(this.flagObj.winResult); + } + } + + private function showFlag(param1:Array) : void + { + var _loc2_:Flag = null; + var _loc3_:int = 0; + while(_loc3_ < param1.length) + { + _loc2_ = new Flag(param1[_loc3_],this.cloader); + this.flagContainer.addChild(_loc2_); + _loc3_++; + } + } + + private function addMenu(param1:City) : void + { + var checkmenu:CheckMenu = null; + var city:City = param1; + checkmenu = new CheckMenu(); + checkmenu.x = int(this.cloader.x + city.obj.posX - checkmenu.width / 2); + checkmenu.y = int(this.cloader.y + city.obj.posY - checkmenu.height / 2); + checkmenu.list(city.obj,this.flagObj); + checkmenu._move_btn.setEnable(); + checkmenu.onMove = function():* + { + moveUser(checkmenu); + }; + checkmenu.onInfo = function():* + { + InfoCity(checkmenu); + }; + checkmenu.onWatch = function():* + { + watchFight(checkmenu); + }; + this.flagContainer.addChild(checkmenu); + city.menu = checkmenu; + if(this.flagObj.turnType == 2) + { + checkmenu._move_btn.visible = false; + } + else + { + checkmenu._move_btn.visible = true; + } + if(this.reliveStatuc == "2" || this.reliveStatuc == "1") + { + checkmenu._move_btn.setEnable(); + } + else if(city.obj.pointId == this.myCityId) + { + checkmenu._move_btn.setEnable(); + checkmenu._move_btn.setText("防守"); + } + if(this.fightStatuc == "1") + { + checkmenu._move_btn.setEnable(); + } + else + { + checkmenu._move_btn.setUnEnable(); + } + } + + private function watchFight(param1:CheckMenu) : void + { + var _loc2_:WatchView = WatchView.getInstance(); + _loc2_.list(param1.infoArray); + _loc2_.show(); + } + + private function InfoCity(param1:CheckMenu) : void + { + var _loc2_:CityInfoView = CityInfoView.getInstance(); + _loc2_.show(); + _loc2_.list(id,param1.obj,this.img); + } + + private function moveUser(param1:CheckMenu) : void + { + param1._move_btn.setUnEnable(); + userMove(param1.obj.pointId); + } + + override public function userMoveSucc(param1:ProvinceEvent) : void + { + var _loc3_:City = null; + var _loc2_:String = String(param1.objData); + this.heroInfoView.infoTxt(_loc2_); + for each(_loc3_ in this.cityArr) + { + _loc3_.menu._move_btn.visible = false; + } + MessageBoxUI.getInstance().addMessage("操作成功,请等待行动回合开始"); + } + + private function moveHorse() : void + { + var _loc1_:int = 5; + if(this.flagObj.time < 5 && this.flagObj.time > 0) + { + _loc1_ = int(this.flagObj.time); + } + this.movetimer.stop(); + this.movetimer.delay = int(_loc1_ * 1000); + if(this.movetimer.hasEventListener(TimerEvent.TIMER_COMPLETE) == false) + { + this.movetimer.addEventListener(TimerEvent.TIMER_COMPLETE,this.horsemovecomplete); + } + this.movetimer.start(); + this.showAtkHorse(this.flagObj.attUser,_loc1_); + this.showDefHorse(this.flagObj.defUser,_loc1_); + } + + private function showAtkHorse(param1:Array, param2:int) : void + { + var _loc3_:Horse = null; + if(param1.length == 0) + { + return; + } + var _loc4_:int = 0; + while(_loc4_ < param1.length) + { + _loc3_ = new Horse(param1[_loc4_],this.cloader,this.flagObj,param2); + this.flagContainer.addChild(_loc3_); + _loc4_++; + } + } + + private function showDefHorse(param1:Array, param2:int) : void + { + var _loc3_:Horse = null; + if(param1.length == 0) + { + return; + } + var _loc4_:int = 0; + while(_loc4_ < param1.length) + { + _loc3_ = new Horse(param1[_loc4_],this.cloader,this.flagObj,param2); + this.flagContainer.addChild(_loc3_); + _loc4_++; + } + } + + private function move(param1:MouseEvent) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + if(this.dragIng) + { + _loc2_ = this.bgContainer.x + this.bgContainer.mouseX - this.last_mx; + _loc3_ = this.bgContainer.y + this.bgContainer.mouseY - this.last_my; + _loc4_ = -(this.w - face.realWidth); + _loc5_ = -(this.h - face.realHeight); + if(_loc2_ > _loc4_ && _loc2_ < _loc6_) + { + this.bgContainer.x = _loc2_; + } + if(_loc3_ > _loc5_ && _loc3_ < _loc7_) + { + this.bgContainer.y = _loc3_; + } + param1.updateAfterEvent(); + } + } + + private function viewMember(param1:FightInfoViewProvince) : void + { + var _loc2_:TeamInfoView = TeamInfoView.getInstance(); + _loc2_.update(id); + _loc2_.show(); + } + + private function getMovePoint(param1:String) : Array + { + var _loc3_:Object = null; + var _loc4_:Object = null; + var _loc2_:Array = new Array(); + for each(_loc3_ in this.pathList) + { + if(_loc3_.startPoint == param1) + { + _loc2_.push(_loc3_.endPoint + ""); + } + } + for each(_loc4_ in this.pathList) + { + if(_loc4_.endPoint == param1) + { + _loc2_.push(_loc4_.startPoint + ""); + } + } + return _loc2_; + } + + private function __headComplete(param1:Event) : void + { + var _loc3_:MovieClip = null; + var _loc2_:* = param1; + try + { + _loc3_ = MovieClip(_loc2_.target.content) as MovieClip; + } + catch(e:Error) + { + } + if(_loc3_ == null) + { + throw new Error("头像是空的"); + } + _loc3_.x = this.cloader.x + this.flagObj.selfInfo.selfPointX - _loc3_.width / 2 + _loc3_.width; + _loc3_.y = this.cloader.y + this.flagObj.selfInfo.selfPointY - _loc3_.height - 28; + } + + private function dashangHandler() : void + { + } + + public function list(param1:int) : void + { + id = param1; + } + + private function addCity(param1:Array) : void + { + var city:City = null; + var i:int = 0; + var arr:Array = param1; + this.cityArr = new Array(); + while(i < arr.length) + { + city = new City(arr[i],this.cloader); + city.onClick = function():* + { + clickCity(this); + }; + this.cityContainer.addChild(city); + this.cityArr.push(city); + i += 1; + } + } + + private function clickCity(param1:City) : * + { + } + + private function showRoad(param1:Array) : void + { + var _loc2_:Road = null; + var _loc3_:int = 0; + while(_loc3_ < param1.length) + { + _loc2_ = new Road(param1[_loc3_],this.cloader); + this.cityContainer.addChild(_loc2_); + _loc3_++; + } + } + + private function loadFinish(param1:Event) : void + { + this.cloader.x = 0; + this.cloader.y = 0; + this.addCity(this.proObj.pointList); + this.showRoad(this.proObj.pathList); + this.refresh(); + } + + override public function getPointForMapSucc(param1:ProvinceEvent) : void + { + this.proObj = param1.objData; + this.pathList = this.proObj.pathList; + this.heroInfoView.setTime(this.proObj["operTime"],this.proObj["showTime"]); + this.fightInfoViewProvince.listMemberInfo(this.proObj); + this.cloader.unload(); + this.cloader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadFinish,false,0,true); + this.cloader.load(new URLRequest(ServerConfig.IMG_PLAY_URL + this.proObj.formationPic)); + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/Road.as b/flash_decompiled/com/view/ui/province/Road.as new file mode 100644 index 0000000..4145470 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/Road.as @@ -0,0 +1,64 @@ +package com.view.ui.province +{ + import com.utils.Utils; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFieldAutoSize; + + public class Road extends Sprite + { + + private var img:Object; + + private var sprite:Sprite; + + private var obj:Object; + + public function Road(param1:Object, param2:*) + { + super(); + this.sprite = new Sprite(); + this.obj = param1; + this.img = param2; + this.sprite.graphics.beginFill(16711680,1); + this.sprite.graphics.moveTo(this.img.x + this.obj.startPosX,this.img.y + this.obj.startPosY); + this.sprite.graphics.lineTo(this.img.x + this.obj.endPosX,this.img.y + this.obj.endPosY); + this.sprite.graphics.endFill(); + ToolTipManager.getInstance().setToolTip(this,new TxtTooltip("距离" + this.obj.length + "步")); + this.addChild(this.sprite); + } + + private function drawpoint(param1:int) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + this.sprite.graphics.beginFill(16711680); + var _loc4_:* = param1 + 1; + var _loc5_:* = this.obj.startPosX - this.obj.endPosX < 0 ? 1 : -1; + var _loc6_:* = this.obj.startPosY - this.obj.endPosY < 0 ? 1 : -1; + var _loc7_:* = Math.abs(this.obj.startPosX - this.obj.endPosX) / _loc4_; + var _loc8_:* = Math.abs(this.obj.startPosY - this.obj.endPosY) / _loc4_; + var _loc9_:* = 1; + while(_loc9_ < _loc4_) + { + _loc2_ = this.obj.startPosX + _loc7_ * _loc9_ * _loc5_; + _loc3_ = this.obj.startPosY + _loc8_ * _loc9_ * _loc6_; + this.sprite.graphics.drawCircle(_loc2_,_loc3_,10); + _loc9_ += 1; + } + } + + public function getTextField(param1:String) : TextField + { + var _loc2_:* = new TextField(); + _loc2_.mouseWheelEnabled = false; + _loc2_.mouseEnabled = false; + _loc2_.autoSize = TextFieldAutoSize.LEFT; + _loc2_.htmlText = Utils.getHtmlText(param1,"#ffff00"); + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/TeamInfoView.as b/flash_decompiled/com/view/ui/province/TeamInfoView.as new file mode 100644 index 0000000..bdca319 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/TeamInfoView.as @@ -0,0 +1,153 @@ +package com.view.ui.province +{ + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.province.event.ProvinceEvent; + import com.view.newui.UITable; + 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.province.mc.TeamInfoItem; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + + public class TeamInfoView extends BaseUI + { + + private static var g_instance:TeamInfoView; + + private var tableMc:UITable; + + private var teamListVec:Vector.; + + private var teamListMc:Sprite; + + private var scrollPane:ScrollPane; + + public function TeamInfoView() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_chengyuanxinxi); + setPosition(); + this.createUI(); + } + + public static function getInstance() : TeamInfoView + { + if(g_instance == null) + { + g_instance = new TeamInfoView(); + } + return g_instance; + } + + override public function createUI() : void + { + var _loc5_:TeamInfoItem = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:Array = ["君主","等级","战斗力","总兵数","位置","操作"]; + var _loc3_:Array = [105,105,105,105,105,109]; + this.tableMc = new UITable(); + this.tableMc.install(15,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(630,375); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.scrollPane.verticalPageScrollSize = 23; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.x = 0; + this.scrollPane.y = 25; + this.teamListMc = new Sprite(); + this.scrollPane.source = this.teamListMc; + this.teamListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 15) + { + _loc5_ = new TeamInfoItem(); + this.teamListMc.addChild(_loc5_); + this.teamListVec.push(_loc5_); + _loc5_.y = _loc4_ * 25; + _loc5_.x = 4; + _loc4_++; + } + this.scrollPane.update(); + } + + private function clearMemList() : void + { + var _loc1_:int = int(this.teamListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.teamListVec[_loc2_].setData(null); + if(_loc2_ > 14) + { + this.teamListMc.removeChild(this.teamListVec[_loc2_]); + this.teamListVec.splice(_loc2_,1); + } + _loc2_--; + } + this.scrollPane.update(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(ProvinceEvent.Pro_getMemberInfo,this.getMemberInfoSucc); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(ProvinceEvent.Pro_getMemberInfo,this.getMemberInfoSucc); + } + + public function update(param1:int) : void + { + ConnectService.getInstance().provinceService.getMemberInfo(param1); + } + + private function getMemberInfoSucc(param1:ProvinceEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:TeamInfoItem = null; + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + closeUI(null); + return; + } + if(param1.objData == null) + { + MessageBoxUI.getInstance().addMessage("获取成员信息失败"); + closeUI(null); + return; + } + var _loc2_:Array = param1.objData.selfMember as Array; + this.clearMemList(); + for(_loc3_ in _loc2_) + { + if(_loc3_ > 14) + { + _loc4_ = new TeamInfoItem(); + this.teamListMc.addChild(_loc4_); + this.teamListVec.push(_loc4_); + _loc4_.y = _loc3_ * 23; + } + this.teamListVec[_loc3_].setData(_loc2_[_loc3_]); + } + this.scrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/TimeEffect.as b/flash_decompiled/com/view/ui/province/TimeEffect.as new file mode 100644 index 0000000..d0e426e --- /dev/null +++ b/flash_decompiled/com/view/ui/province/TimeEffect.as @@ -0,0 +1,50 @@ +package com.view.ui.province +{ + import com.InstallFace; + import com.greensock.TweenLite; + import flash.display.Sprite; + import flash.events.Event; + + public class TimeEffect extends Sprite + { + + public static const TIMEEND:String = "timeEnd"; + + private var face:InstallFace = InstallFace.getInstance(); + + private var point:TurningPoint; + + public function TimeEffect() + { + super(); + } + + private function timeEnd() : void + { + this.removeChild(this.point); + this.dispatchEvent(new Event(TimeEffect.TIMEEND)); + } + + public function addTimeClip(param1:int) : void + { + this.point = new TurningPoint(); + if(param1 == 1) + { + this.point.go(2); + } + else + { + this.point.go(1); + } + this.point.x = this.x + (this.face.realWidth - this.point.width) / 2 + this.point.width / 2; + this.point.y = this.y + (this.face.realHeight - this.point.height) / 2 + this.point.height / 2; + addChild(this.point); + TweenLite.to(this.point,4,{ + "alpha":1, + "overwrite":0, + "onComplete":this.timeEnd + }); + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/TimeType.as b/flash_decompiled/com/view/ui/province/TimeType.as new file mode 100644 index 0000000..b92881b --- /dev/null +++ b/flash_decompiled/com/view/ui/province/TimeType.as @@ -0,0 +1,18 @@ +package com.view.ui.province +{ + public final class TimeType + { + + public static const BOTH:TimeType = new TimeType(); + + public static const TIMER:TimeType = new TimeType(); + + public static const COUNT_DOWN:TimeType = new TimeType(); + + public function TimeType() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/TimerManager.as b/flash_decompiled/com/view/ui/province/TimerManager.as new file mode 100644 index 0000000..3644f2d --- /dev/null +++ b/flash_decompiled/com/view/ui/province/TimerManager.as @@ -0,0 +1,173 @@ +package com.view.ui.province +{ + import flash.display.DisplayObject; + import flash.events.TimerEvent; + import flash.utils.Dictionary; + import flash.utils.Timer; + + public class TimerManager + { + + private static var instance:TimerManager; + + private var myTime2:Timer; + + private var timeArr2:Array; + + private var timeMap:Dictionary; + + private var timeArr:Array; + + private var myTime:Timer; + + public function TimerManager() + { + super(); + this.timeArr = new Array(); + this.timeArr2 = new Array(); + if(instance != null) + { + throw new Error("此类是一个单例,无法为它创建实例"); + } + this.init(); + } + + public static function getInstance() : TimerManager + { + if(instance == null) + { + instance = new TimerManager(); + } + return instance; + } + + private function __time2(param1:TimerEvent) : void + { + this.timer(1); + } + + private function __time(param1:TimerEvent) : void + { + this.timer(0); + } + + public function addTime(param1:ITimeObject, param2:int = 0) : void + { + var _loc3_:* = this.timeArr; + if(param2 == 1) + { + _loc3_ = this.timeArr2; + } + var _loc4_:* = _loc3_.indexOf(param1); + if(_loc3_.indexOf(param1) != -1) + { + return; + } + _loc3_.push(param1); + this.timeMap[param1] = param1.getTime(); + if(param2 == 0 && !this.myTime.running) + { + this.myTime.start(); + } + if(param2 == 1 && !this.myTime2.running) + { + this.myTime2.start(); + } + } + + private function init() : void + { + this.timeMap = new Dictionary(false); + this.myTime = new Timer(1000,0); + this.myTime.addEventListener(TimerEvent.TIMER,this.__time); + this.myTime.reset(); + this.myTime.start(); + this.myTime2 = new Timer(100,0); + this.myTime2.addEventListener(TimerEvent.TIMER,this.__time2); + this.myTime2.reset(); + this.myTime2.start(); + } + + public function removeTime(param1:ITimeObject) : void + { + delete this.timeMap[param1]; + var _loc2_:* = this.timeArr.indexOf(param1); + if(_loc2_ != -1) + { + this.timeArr.splice(_loc2_,1); + if(this.timeArr.length == 0) + { + this.myTime.stop(); + } + } + else + { + _loc2_ = this.timeArr2.indexOf(param1); + if(_loc2_ != -1) + { + this.timeArr2.splice(_loc2_,1); + if(this.timeArr2.length == 0) + { + this.myTime2.stop(); + } + } + } + } + + private function timer(param1:int = 0) : * + { + var _loc5_:* = undefined; + var _loc6_:* = undefined; + var _loc7_:* = undefined; + var _loc2_:Array = null; + var _loc3_:ITimeObject = null; + if(param1 == 1) + { + _loc2_ = this.timeArr2; + } + if(param1 == 0) + { + _loc2_ = this.timeArr; + } + var _loc4_:int = 0; + while(_loc4_ < _loc2_.length) + { + _loc3_ = _loc2_[_loc4_] as ITimeObject; + if(_loc3_.getTimeType() == TimeType.BOTH || _loc3_.getTimeType() == TimeType.COUNT_DOWN) + { + if(_loc3_.getTime() >= 0) + { + if((_loc2_[_loc4_] as DisplayObject).stage == null) + { + _loc4_--; + this.removeTime(_loc3_); + } + else + { + _loc3_.carryOut(); + } + } + else + { + _loc2_.splice(_loc4_,1); + _loc4_--; + } + } + if(_loc3_.getTimeType() == TimeType.BOTH || _loc3_.getTimeType() == TimeType.TIMER) + { + _loc5_ = this.timeMap; + _loc6_ = _loc3_; + _loc7_ = this.timeMap[_loc3_] - 1; + _loc5_[_loc6_] = _loc7_; + if(this.timeMap[_loc3_] <= 0) + { + _loc3_.carryOut(); + this.timeMap[_loc3_] = _loc3_.getTime(); + } + } + _loc4_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/TurningPoint.as b/flash_decompiled/com/view/ui/province/TurningPoint.as new file mode 100644 index 0000000..e76423c --- /dev/null +++ b/flash_decompiled/com/view/ui/province/TurningPoint.as @@ -0,0 +1,49 @@ +package com.view.ui.province +{ + import com.comfig.ClassConfig; + import com.view.res.GameUIRes; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.utils.setTimeout; + + public class TurningPoint extends Sprite + { + + public var mc0:MovieClip; + + public var mc1:MovieClip; + + private var mc:MovieClip; + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + public function TurningPoint() + { + super(); + this.mc = this.gameRes.getMovieClip(ClassConfig.Pro_TurningPoint,this.gameRes.provinceInfo); + addChild(this.mc); + this.mc.gotoAndStop(1); + } + + public function go(param1:int) : void + { + if(param1 == 1) + { + this.mc.gotoAndStop(1); + setTimeout(function():* + { + mc.mc0.play(); + },100); + } + else if(param1 == 2) + { + this.mc.gotoAndStop(2); + setTimeout(function():* + { + mc.mc1.play(); + },100); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/WatchView.as b/flash_decompiled/com/view/ui/province/WatchView.as new file mode 100644 index 0000000..1d1306a --- /dev/null +++ b/flash_decompiled/com/view/ui/province/WatchView.as @@ -0,0 +1,134 @@ +package com.view.ui.province +{ + import com.comfig.ClassConfig; + import com.view.UIListManage; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.province.mc.WatchViewItem; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class WatchView extends BaseUI + { + + private static var instance:WatchView; + + private var watchMc:MovieClip; + + private var gameRes:GameUIRes; + + private var cityListVec:Vector.; + + private var cityListMc:Sprite; + + private var scrollPane:ScrollPane; + + public function WatchView() + { + var _loc2_:WatchViewItem = null; + this.gameRes = GameUIRes.getInstance(); + super(); + if(instance != null) + { + throw new Error("instance is exsit"); + } + this.watchMc = this.gameRes.getMovieClip(ClassConfig.pro_WatchView,this.gameRes.provinceInfo); + addChild(this.watchMc); + this.watchMc.x = -this.watchMc.width / 2; + this.watchMc.y = -this.watchMc.height / 2; + this.setPosition(); + this.watchMc.closebtn.addEventListener(MouseEvent.CLICK,closeUI); + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(286,121); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.scrollPane.verticalPageScrollSize = 23; + this.watchMc.addChild(this.scrollPane); + this.scrollPane.x = 44; + this.scrollPane.y = 161; + this.cityListMc = new Sprite(); + this.scrollPane.source = this.cityListMc; + this.cityListVec = new Vector.(); + var _loc1_:int = 0; + while(_loc1_ < 5) + { + _loc2_ = new WatchViewItem(); + this.cityListMc.addChild(_loc2_); + this.cityListVec.push(_loc2_); + _loc2_.y = _loc1_ * 23; + _loc1_++; + } + this.scrollPane.update(); + } + + public static function getInstance() : WatchView + { + if(instance == null) + { + instance = new WatchView(); + } + return instance; + } + + private function clearMemList() : void + { + var _loc1_:int = int(this.cityListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.cityListVec[_loc2_].setData(null); + if(_loc2_ > 4) + { + this.cityListMc.removeChild(this.cityListVec[_loc2_]); + this.cityListVec[_loc2_].clear(); + this.cityListVec.splice(_loc2_,1); + } + _loc2_--; + } + this.scrollPane.update(); + } + + public function list(param1:Object) : void + { + var _loc5_:WatchViewItem = null; + this.watchMc.attuniontxt.text = param1["attName"]; + this.watchMc.defuniontxt.text = param1["defName"]; + this.watchMc.attuniontxt1.text = param1["attUserNum"]; + this.watchMc.defuniontxt1.text = param1["defUserNum"]; + this.watchMc.fightresult.htmlText = String(param1["combatRes"]); + this.clearMemList(); + var _loc2_:Array = param1["combatInfo"]; + var _loc3_:int = int(_loc2_.length); + var _loc4_:int = 0; + while(_loc4_ < _loc3_) + { + if(_loc4_ > 4) + { + _loc5_ = new WatchViewItem(); + this.cityListMc.addChild(_loc5_); + this.cityListVec.push(_loc5_); + _loc5_.y = _loc4_ * 23; + } + this.cityListVec[_loc4_].setData(_loc2_[_loc4_]); + _loc4_++; + } + } + + override public function setPosition() : void + { + this.x = face.realWidth / 2; + this.y = face.realHeight / 2; + } + + override public function show() : void + { + if(!UIListManage.getInstance().containsUI(this)) + { + UIListManage.getInstance().addUI(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/mc/CityViewMc.as b/flash_decompiled/com/view/ui/province/mc/CityViewMc.as new file mode 100644 index 0000000..2fe8fde --- /dev/null +++ b/flash_decompiled/com/view/ui/province/mc/CityViewMc.as @@ -0,0 +1,141 @@ +package com.view.ui.province.mc +{ + import com.common.CommonAPI; + import com.common.PublicMethod; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.newdata.user.NewUserData; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class CityViewMc extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var label6:TextField; + + private var css:TextFormat; + + private var bg1:Sprite; + + private var obj:Object; + + public function CityViewMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(466); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,469,24); + addChild(this.bg1); + this.bg1.alpha = 0.3; + addChild(_loc1_); + this.bg1.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.css = PublicMethod.getCenterTextFormat(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,95); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.label6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + var _loc2_:int = 1; + while(_loc2_ < 7) + { + addChild(this["label" + _loc2_]); + if(_loc2_ > 1) + { + this["label" + _loc2_].x = this["label" + (_loc2_ - 1)].x + this["label" + (_loc2_ - 1)].width; + } + this["label" + _loc2_].y = 4; + _loc2_++; + } + this.label1.styleSheet = CommonAPI.getLinkStyle(); + this.label1.mouseEnabled = true; + this.label1.addEventListener(TextEvent.LINK,this.linkeventhandler); + } + + 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 clear() : void + { + this.label1.removeEventListener(TextEvent.LINK,this.linkeventhandler); + } + + public function setData(param1:Object) : void + { + var _loc4_:int = 0; + this.obj = param1; + if(this.obj == null) + { + _loc4_ = 1; + while(_loc4_ < 7) + { + this["label" + _loc4_].text = ""; + _loc4_++; + } + this.bg1.visible = false; + return; + } + var _loc2_:String = String(this.obj.userName); + var _loc3_:String = NewUserData.getUser().userName; + if(_loc2_ != _loc3_) + { + this.label1.htmlText = String("

" + _loc2_ + "

"); + } + else + { + this.label1.htmlText = "

" + _loc2_ + "

"; + } + if(this.obj.guildName) + { + this.label2.text = this.obj.guildName; + } + this.label3.text = String(this.obj.powerNum); + this.label4.text = String(this.obj.armyNum); + this.label6.text = this.obj.pos; + this.label5.text = this.obj.userLevel; + this.label2.setTextFormat(this.css); + this.label3.setTextFormat(this.css); + this.label4.setTextFormat(this.css); + this.label5.setTextFormat(this.css); + this.label6.setTextFormat(this.css); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:LinkEvent = new LinkEvent(); + _loc3_.eventType = "kinginfo"; + _loc3_.id = _loc2_; + EventUtils.getInstance().dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/mc/TeamInfoItem.as b/flash_decompiled/com/view/ui/province/mc/TeamInfoItem.as new file mode 100644 index 0000000..d56d0f4 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/mc/TeamInfoItem.as @@ -0,0 +1,126 @@ +package com.view.ui.province.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class TeamInfoItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var viewBtn:UISmallBtn; + + private var css:TextFormat; + + private var bg1:Sprite; + + private var obj:Object; + + public function TeamInfoItem() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(623); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,623,24); + addChild(this.bg1); + this.bg1.alpha = 0.3; + addChild(_loc1_); + this.bg1.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.css = PublicMethod.getCenterTextFormat(); + var _loc2_:int = 1; + while(_loc2_ < 6) + { + if(_loc2_ == 1) + { + this["label" + _loc2_] = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + } + else + { + this["label" + _loc2_] = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,105); + } + addChild(this["label" + _loc2_]); + this["label" + _loc2_].y = 4; + this["label" + _loc2_].x = _loc2_ * 105 + 1 - 100; + this["label" + _loc2_].defaultTextFormat = this.css; + _loc2_++; + } + this.viewBtn = new UISmallBtn("查 看",2); + addChild(this.viewBtn); + this.viewBtn.x = 546; + this.viewBtn.y = 2; + this.viewBtn.onClick = this.viewMeminfo; + this.viewBtn.visible = false; + } + + 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 setData(param1:Object) : void + { + var _loc2_:int = 0; + this.obj = param1; + if(this.obj == null) + { + _loc2_ = 1; + while(_loc2_ < 6) + { + this["label" + _loc2_].text = ""; + _loc2_++; + } + this.viewBtn.visible = false; + this.bg1.visible = false; + } + else + { + this.viewBtn.visible = true; + this.label1.text = this.obj.userName; + this.label2.text = this.obj.userLevel; + this.label3.text = this.obj.powerNum; + this.label4.text = this.obj.armyNum; + this.label5.text = this.obj.pos; + } + } + + private function viewMeminfo(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:CastleUserUI = null; + if(this.obj) + { + _loc2_ = this.obj.userName; + _loc3_ = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/province/mc/WatchViewItem.as b/flash_decompiled/com/view/ui/province/mc/WatchViewItem.as new file mode 100644 index 0000000..8f76585 --- /dev/null +++ b/flash_decompiled/com/view/ui/province/mc/WatchViewItem.as @@ -0,0 +1,50 @@ +package com.view.ui.province.mc +{ + import com.common.PublicMethod; + import com.events.EventUtils; + import com.events.LinkEvent; + import flash.display.Sprite; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class WatchViewItem extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var css:TextFormat; + + public function WatchViewItem() + { + super(); + this.label1 = PublicMethod.getTextField(16777215,143); + this.label2 = PublicMethod.getTextField(16777215,136); + addChild(this.label1); + addChild(this.label2); + this.label1.y = 2; + this.label2.x = this.label1.x + this.label1.width; + this.label2.y = this.label1.y; + } + + public function clear() : void + { + } + + public function setData(param1:Object) : void + { + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:LinkEvent = new LinkEvent(); + _loc3_.eventType = "kinginfo"; + _loc3_.id = _loc2_; + EventUtils.getInstance().dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/BabelRankingPage.as b/flash_decompiled/com/view/ui/ranking/BabelRankingPage.as new file mode 100644 index 0000000..3735589 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/BabelRankingPage.as @@ -0,0 +1,473 @@ +package com.view.ui.ranking +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.data.BabelData; + import com.view.ui.ranking.mc.*; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BabelRankingPage extends BaseUI + { + + private var css:TextFormat; + + private var searchBtn:UIButton; + + private var nameText:UIInputText; + + private var pageText:UIInputText; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var index:int = 1; + + private var indexTemp:int = 1; + + private var userListVec:Vector.; + + private var flag2:Boolean; + + private var flag:Boolean; + + private var isVaildData:Boolean = true; + + private const listNum:int = 12; + + public var rank:int = 0; + + private var rankId:int = -1; + + public function BabelRankingPage() + { + var titleArr:Array; + var posArr:Array; + var i:int; + var myRinkBtn:UIButton; + var toBtn:UIButton; + var timeText:TextField; + var bg1:Sprite = null; + var userLine:BabelRankMc = null; + super(); + this.css = PublicMethod.getCenterTextFormat(); + titleArr = ["名次","君主","塔楼记录","到达时间","操作"]; + posArr = [45,196,109,142,143]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,titleArr,posArr); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.userListVec = new Vector.(); + i = 0; + while(i < 12) + { + userLine = new BabelRankMc(); + this.tableMc.addChild(userLine); + this.userListVec.push(userLine); + userLine.y = 26 + i * 26; + userLine.x = 4; + i++; + } + bg1 = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(bg1); + bg1.x = 4; + bg1.y = 346; + this.nameText = new UIInputText(100); + bg1.addChild(this.nameText); + this.nameText.x = 10; + this.nameText.y = 5; + this.nameText.setMaxChars(50); + this.nameText.setTextFormat(this.css); + this.searchBtn = new UIButton("查询名称",2); + this.searchBtn.onClick = function(param1:MouseEvent):* + { + nameRank(this); + }; + myRinkBtn = new UIButton("我的排行",2); + myRinkBtn.onClick = this.myRank; + bg1.addChild(this.searchBtn); + bg1.addChild(myRinkBtn); + this.searchBtn.x = this.nameText.x + 105; + --this.nameText.y; + myRinkBtn.x = this.searchBtn.x + this.searchBtn.width + 5; + myRinkBtn.y = this.searchBtn.y; + this.pageMc = new UIPageMc(); + bg1.addChild(this.pageMc); + this.pageMc.x = 380; + this.pageMc.y = this.nameText.y + 2; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.pageText = new UIInputText(50); + bg1.addChild(this.pageText); + this.pageText.x = this.pageMc.x + this.pageMc.width + 34; + this.pageText.y = this.nameText.y; + this.pageText.setMaxChars(3); + this.pageText.numOnly(); + this.pageText.setTextFormat(this.css); + toBtn = new UIButton("跳 转"); + bg1.addChild(toBtn); + toBtn.x = this.pageText.x + this.pageText.width + 4; + toBtn.y = this.searchBtn.y; + toBtn.onClick = this.jumpRank; + timeText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + timeText.text = "每日凌晨刷新"; + addChild(timeText); + timeText.x = 550; + timeText.y = -20; + this.list(); + } + + public function nextPage() : void + { + this.updateList(2); + } + + public function prePage() : void + { + this.updateList(1); + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(!ConnectService.getInstance().hasEventListener(UserEvent.USER_babelRankAction)) + { + ConnectService.getInstance().addEventListener(UserEvent.USER_babelRankAction,this.babelRankActionSucc); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(ConnectService.getInstance().hasEventListener(UserEvent.USER_babelRankAction)) + { + ConnectService.getInstance().removeEventListener(UserEvent.USER_babelRankAction,this.babelRankActionSucc); + } + } + + private function list() : void + { + this.flag2 = false; + this.flag = false; + ConnectService.getInstance().userService.babelRankAction(this.index); + } + + private function babelRankActionSucc(param1:UserEvent) : void + { + var _loc3_:String = null; + var _loc2_:Object = param1.userObject; + if(_loc2_ != null && _loc2_.rankList != null && _loc2_.rankList.length > 0) + { + if(this.flag2) + { + this.rank = _loc2_.rankList[0].rank; + if(this.rank == -1) + { + MessageBoxUI.getInstance().addMessage("您暂时没有排名"); + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.babelDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + return; + } + if(this.flag) + { + this.rank = _loc2_.rankList[0].rank; + _loc3_ = this.nameText.getText(); + if(this.rank == -1) + { + MessageBoxUI.getInstance().addMessage(_loc3_ + "暂时没有排名"); + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.babelDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + if(this.nameText.getText()) + { + this.nameText.setText(""); + } + return; + } + if(int(_loc2_.totalNum) == 0) + { + if(this.isVaildData) + { + this.isVaildData = false; + this.list(); + } + else + { + GameData.babelDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + GameData.babelDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + MessageBoxUI.getInstance().addMessage("没有符合要求的数据!"); + this.index = this.indexTemp; + if(!this.flag) + { + if(!this.flag2) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + } + this.flag = false; + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + 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 > GameData.babelDataList.totalNum) + { + this.index = GameData.babelDataList.totalNum - this.listNum; + return; + } + break; + case 3: + this.index = (Math.ceil(GameData.babelDataList.totalNum / this.listNum) - 1) * 12 + 1; + } + if(GameData.babelDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function myRank(param1:MouseEvent) : void + { + this.flag2 = true; + this.flag = false; + this.indexTemp = this.index; + this.index = 1; + ConnectService.getInstance().userService.myBabelAction(); + } + + private function nameRank(param1:*) : void + { + var _loc2_:String = this.nameText.getText(); + this.flag2 = false; + this.flag = true; + if(param1 == this.searchBtn) + { + this.indexTemp = this.index; + this.index = 1; + } + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("君主名称不能为空,请重新输入。"); + return; + } + ConnectService.getInstance().userService.getBabelRankListLikeName(_loc2_); + } + + private function jumpRank(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + if(this.pageText.getText() == "") + { + MessageBoxUI.getInstance().addMessage("跳转的页数不能为空,请重新输入。"); + return; + } + var _loc5_:int = int(this.pageText.getText()); + if(_loc5_ == 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数输入不合法,请重新输入。"); + return; + } + if(_loc5_ > Math.ceil(GameData.babelDataList.totalNum / this.listNum) || _loc5_ <= 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数太大或太小,请重新输入。"); + return; + } + this.index = this.listNum * (_loc5_ - 1) + 1; + if(GameData.babelDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function clearList() : void + { + var _loc1_:BabelRankMc = null; + for each(_loc1_ in this.userListVec) + { + _loc1_.setDate(null); + } + } + + private function showList() : void + { + var _loc2_:* = undefined; + var _loc3_:BabelData = null; + if(GameData.babelDataList.totalNum == 0) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + else + { + this.pageMc.setPageCount(Math.ceil(GameData.babelDataList.totalNum / this.listNum)); + this.pageMc.setPage(this.index / this.listNum + 1 >> 0); + } + var _loc1_:int = this.pageMc.getCurrPage(); + this.clearList(); + for(_loc2_ in this.userListVec) + { + _loc3_ = GameData.babelDataList.getItem(this.index + _loc2_); + if(_loc3_) + { + this.userListVec[_loc2_].defaultRank = this.rank; + this.userListVec[_loc2_].setDate(_loc3_); + if(_loc1_ == 1) + { + if(_loc2_ <= 2) + { + this.userListVec[_loc2_].setStyle(_loc2_); + } + } + } + else + { + this.userListVec[_loc2_].setDate(null); + } + } + } + + private function getLastNum() : int + { + var _loc1_:int = 0; + var _loc2_:* = GameData.babelDataList.totalNum - this.index + 1; + if(_loc2_ < this.listNum) + { + _loc1_ = _loc2_; + } + else + { + _loc1_ = this.listNum; + } + return _loc1_; + } + + private function setHashMap(param1:Object) : void + { + var _loc2_:BabelData = null; + var _loc3_:int = 0; + while(_loc3_ < param1.rankList.length) + { + if(param1.rankList[_loc3_]) + { + _loc2_ = new BabelData(); + if(this.rankId == -1) + { + this.rankId = param1.rankList[_loc3_].rank; + } + _loc2_.rank = param1.rankList[_loc3_].rank - this.rankId + 1; + _loc2_.userId = param1.rankList[_loc3_].userId; + _loc2_.userName = param1.rankList[_loc3_].userName; + _loc2_.countryId = param1.rankList[_loc3_].countryId; + _loc2_.topStage = param1.rankList[_loc3_].topStageId; + _loc2_.topStageTime = param1.rankList[_loc3_].topDttm; + _loc2_.vipLevel = param1.rankList[_loc3_].vipLevel; + _loc2_.govId = param1.rankList[_loc3_].govId; + GameData.babelDataList.addItem(_loc2_); + } + _loc3_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/BigBossRankingPage.as b/flash_decompiled/com/view/ui/ranking/BigBossRankingPage.as new file mode 100644 index 0000000..affc204 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/BigBossRankingPage.as @@ -0,0 +1,435 @@ +package com.view.ui.ranking +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.view.mc.button.Button_16; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.data.UserBigBossData; + import com.view.ui.ranking.mc.BigBossRankMc; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BigBossRankingPage extends BaseUI + { + + private var css:TextFormat; + + private var searchBtn:Button_16; + + private var pageText:UIInputText; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var index:int = 1; + + private var indexTemp:int = 1; + + private var userListVec:Vector.; + + private var flag2:Boolean; + + private var flag:Boolean; + + private var isVaildData:Boolean = true; + + private const listNum:int = 12; + + public var rank:int = 0; + + public function BigBossRankingPage() + { + var _loc4_:Sprite = null; + var _loc7_:BigBossRankMc = null; + super(); + this.css = PublicMethod.getCenterTextFormat(); + var _loc1_:Array = ["名次","君主","挑战名将","战绩","挑战时间"]; + var _loc2_:Array = [50,186,110,127,162]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.userListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc7_ = new BigBossRankMc(); + this.tableMc.addChild(_loc7_); + this.userListVec.push(_loc7_); + _loc7_.y = 26 + _loc3_ * 26; + _loc7_.x = 4; + _loc3_++; + } + _loc4_ = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 346; + this.pageMc = new UIPageMc(); + _loc4_.addChild(this.pageMc); + this.pageMc.x = 380; + this.pageMc.y = 7; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.pageText = new UIInputText(50); + _loc4_.addChild(this.pageText); + this.pageText.x = this.pageMc.x + this.pageMc.width + 34; + this.pageText.y = 5; + this.pageText.setMaxChars(3); + this.pageText.numOnly(); + this.pageText.setTextFormat(this.css); + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + _loc5_.text = "每日凌晨刷新"; + addChild(_loc5_); + _loc5_.x = 550; + _loc5_.y = -20; + var _loc6_:UIButton = new UIButton("跳 转"); + _loc4_.addChild(_loc6_); + _loc6_.x = this.pageText.x + this.pageText.width + 4; + _loc6_.y = 4; + _loc6_.onClick = this.jumpRank; + this.list(); + } + + public function nextPage() : void + { + this.updateList(2); + } + + public function prePage() : void + { + this.updateList(1); + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(!ConnectService.getInstance().hasEventListener(UserEvent.USER_bigBossRankAction)) + { + ConnectService.getInstance().addEventListener(UserEvent.USER_bigBossRankAction,this.hostRankActionSucc); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(ConnectService.getInstance().hasEventListener(UserEvent.USER_bigBossRankAction)) + { + ConnectService.getInstance().removeEventListener(UserEvent.USER_bigBossRankAction,this.hostRankActionSucc); + } + } + + private function list() : void + { + this.flag2 = false; + this.flag = false; + ConnectService.getInstance().userService.bigBossRankAction(this.index); + } + + private function hostRankActionSucc(param1:UserEvent) : void + { + var _loc2_:Object = param1.userObject; + if(_loc2_ != null && _loc2_.rankList != null && _loc2_.rankList.length > 0) + { + if(this.flag2) + { + this.rank = _loc2_.rankList[0].rank; + if(this.rank == -1) + { + MessageBoxUI.getInstance().addMessage("您暂时没有排名"); + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.bigBossDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + return; + } + if(this.flag) + { + this.rank = _loc2_.rankList[0].rank; + if(this.rank == -1) + { + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.bigBossDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + return; + } + if(int(_loc2_.totalNum) == 0) + { + if(this.isVaildData) + { + this.isVaildData = false; + this.list(); + } + else + { + GameData.bigBossDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + GameData.bigBossDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + MessageBoxUI.getInstance().addMessage("没有符合要求的数据!"); + this.index = this.indexTemp; + if(!this.flag) + { + if(!this.flag2) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + } + this.flag = false; + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + 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 > GameData.bigBossDataList.totalNum) + { + this.index = GameData.bigBossDataList.totalNum - this.listNum; + return; + } + break; + case 3: + this.index = (Math.ceil(GameData.bigBossDataList.totalNum / this.listNum) - 1) * 12 + 1; + } + if(GameData.bigBossDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function myRank() : void + { + this.flag2 = true; + this.flag = false; + this.indexTemp = this.index; + this.index = 1; + ConnectService.getInstance().userService.myRankAction(); + } + + private function jumpRank(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + if(this.pageText.getText() == "") + { + MessageBoxUI.getInstance().addMessage("跳转的页数不能为空,请重新输入。"); + return; + } + var _loc5_:int = int(this.pageText.getText()); + if(_loc5_ == 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数输入不合法,请重新输入。"); + return; + } + if(_loc5_ > Math.ceil(GameData.bigBossDataList.totalNum / this.listNum) || _loc5_ <= 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数太大或太小,请重新输入。"); + return; + } + this.index = this.listNum * (_loc5_ - 1) + 1; + if(GameData.bigBossDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function clearList() : void + { + var _loc1_:BigBossRankMc = null; + for each(_loc1_ in this.userListVec) + { + _loc1_.setDate(null); + } + } + + private function showList() : void + { + var _loc2_:* = undefined; + var _loc3_:UserBigBossData = null; + if(GameData.bigBossDataList.totalNum == 0) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + else + { + this.pageMc.setPageCount(Math.ceil(GameData.bigBossDataList.totalNum / this.listNum)); + this.pageMc.setPage(this.index / this.listNum + 1 >> 0); + } + var _loc1_:int = this.pageMc.getCurrPage(); + this.clearList(); + for(_loc2_ in this.userListVec) + { + _loc3_ = GameData.bigBossDataList.getItem(this.index + _loc2_); + if(_loc3_) + { + this.userListVec[_loc2_].defaultRank = this.rank; + this.userListVec[_loc2_].setDate(_loc3_); + if(_loc1_ == 1) + { + if(_loc2_ <= 2) + { + this.userListVec[_loc2_].setStyle(_loc2_); + } + } + } + else + { + this.userListVec[_loc2_].setDate(null); + } + } + } + + private function getLastNum() : int + { + var _loc1_:int = 0; + var _loc2_:* = GameData.bigBossDataList.totalNum - this.index + 1; + if(_loc2_ < this.listNum) + { + _loc1_ = _loc2_; + } + else + { + _loc1_ = this.listNum; + } + return _loc1_; + } + + private function setHashMap(param1:Object) : void + { + var _loc2_:UserBigBossData = null; + var _loc3_:int = 0; + while(_loc3_ < param1.rankList.length) + { + if(param1.rankList[_loc3_]) + { + _loc2_ = new UserBigBossData(); + _loc2_.rankId = param1.rankList[_loc3_].rankId; + _loc2_.userId = param1.rankList[_loc3_].userId; + _loc2_.userName = param1.rankList[_loc3_].userName; + _loc2_.countryId = param1.rankList[_loc3_].countryId; + _loc2_.vipLevel = param1.rankList[_loc3_].vipLevel; + _loc2_.warTime = param1.rankList[_loc3_].warTime; + _loc2_.stageId = param1.rankList[_loc3_].stageId; + _loc2_.win1 = param1.rankList[_loc3_].win1; + _loc2_.win2 = param1.rankList[_loc3_].win2; + _loc2_.win3 = param1.rankList[_loc3_].win3; + _loc2_.win4 = param1.rankList[_loc3_].win4; + _loc2_.win5 = param1.rankList[_loc3_].win5; + _loc2_.win6 = param1.rankList[_loc3_].win6; + _loc2_.win7 = param1.rankList[_loc3_].win7; + _loc2_.win8 = param1.rankList[_loc3_].win8; + _loc2_.win9 = param1.rankList[_loc3_].win9; + _loc2_.win10 = param1.rankList[_loc3_].win10; + _loc2_.lost1 = param1.rankList[_loc3_].lost1; + _loc2_.lost2 = param1.rankList[_loc3_].lost2; + _loc2_.lost3 = param1.rankList[_loc3_].lost3; + _loc2_.lost4 = param1.rankList[_loc3_].lost4; + _loc2_.lost5 = param1.rankList[_loc3_].lost5; + _loc2_.lost6 = param1.rankList[_loc3_].lost6; + _loc2_.lost7 = param1.rankList[_loc3_].lost7; + _loc2_.lost8 = param1.rankList[_loc3_].lost8; + _loc2_.lost9 = param1.rankList[_loc3_].lost9; + _loc2_.lost10 = param1.rankList[_loc3_].lost10; + GameData.bigBossDataList.addItem(_loc2_); + } + _loc3_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/GuildRankingPage.as b/flash_decompiled/com/view/ui/ranking/GuildRankingPage.as new file mode 100644 index 0000000..f4f12fd --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/GuildRankingPage.as @@ -0,0 +1,491 @@ +package com.view.ui.ranking +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.friend.event.RankEvent; + import com.data.GameData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.guild.GuildViewUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.data.LeagueData; + import com.view.ui.ranking.mc.GuildRankMc; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GuildRankingPage extends BaseUI + { + + private var css:TextFormat; + + private var userListVec:Vector.; + + private var searchBtn:UIButton; + + private var nameText:UIInputText; + + private var pageText:UIInputText; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var index:int = 1; + + private var indexTemp:int = 1; + + private var flag2:Boolean; + + private var flag:Boolean; + + private var isVaildData:Boolean = true; + + private const listNum:int = 12; + + public var rank:int = 0; + + private var guildViewUI:GuildViewUI; + + public function GuildRankingPage() + { + var titleArr:Array; + var posArr:Array; + var i:int; + var myRinkBtn:UIButton; + var toBtn:UIButton; + var timeText:TextField; + var bg1:Sprite = null; + var userLine:GuildRankMc = null; + super(); + this.css = PublicMethod.getCenterTextFormat(); + titleArr = ["名次","联盟","盟主","等级","人数","联盟荣耀","郡城数","操作"]; + posArr = [45,123,157,52,54,63,52,89]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,titleArr,posArr); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.userListVec = new Vector.(); + i = 0; + while(i < 12) + { + userLine = new GuildRankMc(); + this.tableMc.addChild(userLine); + this.userListVec.push(userLine); + userLine.y = 26 + i * 26; + userLine.x = 4; + userLine.viewGuildF = this.showGuildInfo; + i++; + } + bg1 = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(bg1); + bg1.x = 4; + bg1.y = 346; + this.nameText = new UIInputText(100); + bg1.addChild(this.nameText); + this.nameText.x = 10; + this.nameText.y = 5; + this.nameText.setMaxChars(50); + this.nameText.setTextFormat(this.css); + this.searchBtn = new UIButton("查询名称",2); + this.searchBtn.onClick = function(param1:MouseEvent):* + { + nameRank(this); + }; + myRinkBtn = new UIButton("我的排行",2); + myRinkBtn.onClick = this.myRank; + bg1.addChild(this.searchBtn); + bg1.addChild(myRinkBtn); + this.searchBtn.x = this.nameText.x + 105; + --this.nameText.y; + myRinkBtn.x = this.searchBtn.x + this.searchBtn.width + 5; + myRinkBtn.y = this.searchBtn.y; + this.pageMc = new UIPageMc(); + bg1.addChild(this.pageMc); + this.pageMc.x = 380; + this.pageMc.y = this.nameText.y + 2; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.pageText = new UIInputText(50); + bg1.addChild(this.pageText); + this.pageText.x = this.pageMc.x + this.pageMc.width + 34; + this.pageText.y = this.nameText.y; + this.pageText.setMaxChars(3); + this.pageText.numOnly(); + this.pageText.setTextFormat(this.css); + toBtn = new UIButton("跳 转"); + bg1.addChild(toBtn); + toBtn.x = this.pageText.x + this.pageText.width + 4; + toBtn.y = this.searchBtn.y; + toBtn.onClick = this.jumpRank; + timeText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + timeText.text = "每日凌晨刷新"; + addChild(timeText); + timeText.x = 550; + timeText.y = -20; + this.list(); + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(!ConnectService.getInstance().hasEventListener(RankEvent.Rank_unionRankAction)) + { + ConnectService.getInstance().addEventListener(RankEvent.Rank_unionRankAction,this.unionRankActionSucc); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(ConnectService.getInstance().hasEventListener(RankEvent.Rank_unionRankAction)) + { + ConnectService.getInstance().removeEventListener(RankEvent.Rank_unionRankAction,this.unionRankActionSucc); + } + if(this.guildViewUI != null) + { + if(contains(this.guildViewUI)) + { + removeChild(this.guildViewUI); + } + } + } + + private function list() : void + { + this.flag2 = false; + this.flag = false; + ConnectService.getInstance().friendService.unionRankAction(this.index); + } + + private function unionRankActionSucc(param1:RankEvent) : void + { + var _loc3_:String = null; + var _loc2_:Object = param1.obj; + if(_loc2_ != null && _loc2_.rankList != null && _loc2_.rankList.length > 0) + { + if(this.flag2) + { + this.rank = _loc2_.rankList[0].rank; + if(this.rank == -1) + { + MessageBoxUI.getInstance().addMessage("您所在的联盟暂时没有排名"); + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.leagueDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + return; + } + if(this.flag) + { + this.rank = _loc2_.rankList[0].rank; + _loc3_ = this.nameText.getText(); + if(this.rank == -1) + { + MessageBoxUI.getInstance().addMessage(_loc3_ + "所在的联盟暂时没有排名"); + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.leagueDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + if(this.nameText.getText()) + { + this.nameText.setText(""); + } + return; + } + if(int(_loc2_.totalNum) == 0) + { + if(this.isVaildData) + { + this.isVaildData = false; + this.list(); + } + else + { + GameData.leagueDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + GameData.leagueDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + MessageBoxUI.getInstance().addMessage("没有符合要求的数据!"); + this.index = this.indexTemp; + if(!this.flag) + { + if(!this.flag2) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + } + this.flag = false; + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + public function nextPage() : void + { + this.updateList(2); + } + + public function prePage() : void + { + this.updateList(1); + } + + 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 > GameData.leagueDataList.totalNum) + { + this.index = GameData.leagueDataList.totalNum - this.listNum; + return; + } + break; + case 3: + this.index = (Math.ceil(GameData.leagueDataList.totalNum / this.listNum) - 1) * 12 + 1; + } + if(GameData.leagueDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function myRank(param1:MouseEvent) : void + { + this.flag2 = true; + this.flag = false; + this.indexTemp = this.index; + this.index = 1; + ConnectService.getInstance().friendService.myUnionRankAction(); + } + + private function nameRank(param1:*) : void + { + var _loc2_:String = this.nameText.getText(); + this.flag2 = false; + this.flag = true; + if(param1 == this.searchBtn) + { + this.indexTemp = this.index; + this.index = 1; + } + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("联盟名称不能为空,请重新输入。"); + return; + } + ConnectService.getInstance().friendService.nameUnionRankAction(_loc2_); + } + + private function jumpRank(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + if(this.pageText.getText() == "") + { + MessageBoxUI.getInstance().addMessage("跳转的页数不能为空,请重新输入。"); + return; + } + var _loc5_:int = int(this.pageText.getText()); + if(_loc5_ == 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数输入不合法,请重新输入。"); + return; + } + if(_loc5_ > Math.ceil(GameData.leagueDataList.totalNum / this.listNum) || _loc5_ <= 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数太大或太小,请重新输入。"); + return; + } + this.index = this.listNum * (_loc5_ - 1) + 1; + if(GameData.leagueDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function clearList() : void + { + var _loc1_:GuildRankMc = null; + for each(_loc1_ in this.userListVec) + { + _loc1_.setDate(null); + } + } + + private function showList() : void + { + var _loc2_:* = undefined; + var _loc3_:LeagueData = null; + if(GameData.monarchDataList.totalNum == 0) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + else + { + this.pageMc.setPageCount(Math.ceil(GameData.leagueDataList.totalNum / this.listNum)); + this.pageMc.setPage(this.index / this.listNum + 1 >> 0); + } + var _loc1_:int = this.pageMc.getCurrPage(); + this.clearList(); + for(_loc2_ in this.userListVec) + { + _loc3_ = GameData.leagueDataList.getItem(this.index + _loc2_); + if(_loc3_) + { + this.userListVec[_loc2_].defaultRank = this.rank; + this.userListVec[_loc2_].setDate(_loc3_); + if(_loc1_ == 1) + { + if(_loc2_ <= 2) + { + this.userListVec[_loc2_].setStyle(_loc2_); + } + } + } + else + { + this.userListVec[_loc2_].setDate(null); + } + } + } + + private function getLastNum() : int + { + var _loc1_:int = 0; + var _loc2_:* = GameData.leagueDataList.totalNum - this.index + 1; + if(_loc2_ < this.listNum) + { + _loc1_ = _loc2_; + } + else + { + _loc1_ = this.listNum; + } + return _loc1_; + } + + private function setHashMap(param1:Object) : void + { + var _loc2_:LeagueData = null; + var _loc3_:int = 0; + while(_loc3_ < param1.rankList.length) + { + if(param1.rankList[_loc3_]) + { + _loc2_ = new LeagueData(); + _loc2_.rank = param1.rankList[_loc3_].rank; + _loc2_.guildId = param1.rankList[_loc3_].guildId; + _loc2_.guildName = param1.rankList[_loc3_].guildName; + _loc2_.leader = param1.rankList[_loc3_].leader; + _loc2_.level = param1.rankList[_loc3_].level; + _loc2_.memberNumber = param1.rankList[_loc3_].memberNumber; + _loc2_.repute = param1.rankList[_loc3_].repute; + _loc2_.countryId = param1.rankList[_loc3_].countryId; + _loc2_.canApply = param1.rankList[_loc3_].canApply; + _loc2_.shireNum = param1.rankList[_loc3_].shireNum; + _loc2_.vipLevel = param1.rankList[_loc3_].vipLevel; + _loc2_.govId = param1.rankList[_loc3_].govId; + GameData.leagueDataList.addItem(_loc2_); + } + _loc3_++; + } + } + + private function showGuildInfo(param1:int) : void + { + this.guildViewUI = GuildViewUI.getInstance(); + this.guildViewUI.setGuildId(param1); + addChild(this.guildViewUI); + this.guildViewUI.x = 134; + this.guildViewUI.y = -25; + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/HallFamePage.as b/flash_decompiled/com/view/ui/ranking/HallFamePage.as new file mode 100644 index 0000000..31f9199 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/HallFamePage.as @@ -0,0 +1,328 @@ +package com.view.ui.ranking +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.data.BabelData; + import com.view.ui.ranking.mc.BabelRankMc; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HallFamePage extends BaseUI + { + + private var css:TextFormat; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var index:int = 1; + + private var indexTemp:int = 1; + + private var pageText:UIInputText; + + private var userListVec:Vector.; + + private var isVaildData:Boolean = true; + + public var rank:int = 0; + + private const listNum:int = 12; + + public function HallFamePage() + { + var _loc4_:Sprite = null; + var _loc5_:TextField = null; + var _loc8_:BabelRankMc = null; + super(); + this.css = PublicMethod.getCenterTextFormat(); + var _loc1_:Array = ["名次","君主","重楼记录","到达时间","操作"]; + var _loc2_:Array = [45,196,109,142,143]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.userListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc8_ = new BabelRankMc(); + this.tableMc.addChild(_loc8_); + this.userListVec.push(_loc8_); + _loc8_.y = 26 + _loc3_ * 26; + _loc8_.x = 4; + _loc3_++; + } + _loc4_ = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 346; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,250); + _loc4_.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = 8; + _loc5_.text = "通过仙宫楼100层即可进入名人堂排名"; + this.pageMc = new UIPageMc(); + _loc4_.addChild(this.pageMc); + this.pageMc.x = 380; + this.pageMc.y = 7; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.pageText = new UIInputText(50); + _loc4_.addChild(this.pageText); + this.pageText.x = this.pageMc.x + this.pageMc.width + 34; + this.pageText.y = 5; + this.pageText.setMaxChars(3); + this.pageText.numOnly(); + this.pageText.setTextFormat(this.css); + var _loc6_:UIButton = new UIButton("跳 转"); + _loc4_.addChild(_loc6_); + _loc6_.x = this.pageText.x + this.pageText.width + 4; + --this.pageText.y; + _loc6_.onClick = this.jumpRank; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + _loc7_.text = "每日凌晨刷新"; + addChild(_loc7_); + _loc7_.x = 550; + _loc7_.y = -20; + this.list(); + } + + public function nextPage() : void + { + this.updateList(2); + } + + public function prePage() : void + { + this.updateList(1); + } + + 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 > GameData.hallFameDataList.totalNum) + { + this.index = GameData.hallFameDataList.totalNum - this.listNum; + return; + } + break; + case 3: + this.index = (Math.ceil(GameData.hallFameDataList.totalNum / this.listNum) - 1) * 12 + 1; + } + if(GameData.hallFameDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function jumpRank(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + if(this.pageText.getText() == "") + { + MessageBoxUI.getInstance().addMessage("跳转的页数不能为空,请重新输入。"); + return; + } + var _loc5_:int = int(this.pageText.getText()); + if(_loc5_ == 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数输入不合法,请重新输入。"); + return; + } + if(_loc5_ > Math.ceil(GameData.hallFameDataList.totalNum / this.listNum) || _loc5_ <= 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数太大或太小,请重新输入。"); + return; + } + this.index = this.listNum * (_loc5_ - 1) + 1; + if(GameData.hallFameDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function getLastNum() : int + { + var _loc1_:int = 0; + var _loc2_:* = GameData.hallFameDataList.totalNum - this.index + 1; + if(_loc2_ < this.listNum) + { + _loc1_ = _loc2_; + } + else + { + _loc1_ = this.listNum; + } + return _loc1_; + } + + private function list() : void + { + ConnectService.getInstance().userService.geMingRankListFromCache(this.index); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(!ConnectService.getInstance().hasEventListener(UserEvent.USER_mingbabelRankAction)) + { + ConnectService.getInstance().addEventListener(UserEvent.USER_mingbabelRankAction,this.babelRankActionSucc); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(ConnectService.getInstance().hasEventListener(UserEvent.USER_mingbabelRankAction)) + { + ConnectService.getInstance().removeEventListener(UserEvent.USER_mingbabelRankAction,this.babelRankActionSucc); + } + } + + private function babelRankActionSucc(param1:UserEvent) : void + { + var _loc2_:Object = param1.userObject; + if(_loc2_ != null && _loc2_.rankList != null && _loc2_.rankList.length > 0) + { + if(int(_loc2_.totalNum) == 0) + { + if(this.isVaildData) + { + this.isVaildData = false; + this.list(); + } + else + { + GameData.hallFameDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + GameData.hallFameDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + MessageBoxUI.getInstance().addMessage("没有符合要求的数据!"); + this.index = this.indexTemp; + } + } + + private function showList() : void + { + var _loc2_:* = undefined; + var _loc3_:BabelData = null; + if(GameData.hallFameDataList.totalNum == 0) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + else + { + this.pageMc.setPageCount(Math.ceil(GameData.hallFameDataList.totalNum / this.listNum)); + this.pageMc.setPage(this.index / this.listNum + 1 >> 0); + } + var _loc1_:int = this.pageMc.getCurrPage(); + this.clearList(); + for(_loc2_ in this.userListVec) + { + _loc3_ = GameData.hallFameDataList.getItem(this.index + _loc2_); + if(_loc3_) + { + this.userListVec[_loc2_].defaultRank = this.rank; + this.userListVec[_loc2_].setDate(_loc3_); + if(_loc1_ == 1) + { + if(_loc2_ <= 2) + { + this.userListVec[_loc2_].setStyle(_loc2_); + } + } + } + else + { + this.userListVec[_loc2_].setDate(null); + } + } + } + + private function clearList() : void + { + var _loc1_:BabelRankMc = null; + for each(_loc1_ in this.userListVec) + { + _loc1_.setDate(null); + } + } + + private function setHashMap(param1:Object) : void + { + var _loc2_:BabelData = null; + var _loc3_:int = 0; + while(_loc3_ < param1.rankList.length) + { + if(param1.rankList[_loc3_]) + { + _loc2_ = new BabelData(); + _loc2_.rank = param1.rankList[_loc3_].rank; + _loc2_.userId = param1.rankList[_loc3_].userId; + _loc2_.userName = param1.rankList[_loc3_].userName; + _loc2_.countryId = param1.rankList[_loc3_].countryId; + _loc2_.topStage = param1.rankList[_loc3_].topStageId; + _loc2_.topStageTime = param1.rankList[_loc3_].topDttm; + _loc2_.vipLevel = param1.rankList[_loc3_].vipLevel; + _loc2_.govId = param1.rankList[_loc3_].govId; + GameData.hallFameDataList.addItem(_loc2_); + } + _loc3_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/LeagueRankingPage.as b/flash_decompiled/com/view/ui/ranking/LeagueRankingPage.as new file mode 100644 index 0000000..6d4c9cf --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/LeagueRankingPage.as @@ -0,0 +1,572 @@ +package com.view.ui.ranking +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.play.event.LeagueEvent; + import com.data.GameData; + import com.utils.HashMap; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.data.BattlesData; + import com.view.ui.ranking.data.BattlesState; + import com.view.ui.ranking.mc.LeagueRankMc; + import fl.controls.ComboBox; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class LeagueRankingPage extends BaseUI + { + + private var css:TextFormat; + + private var searchBtn:UIButton; + + private var nameText:UIInputText; + + private var pageText:UIInputText; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var index:int = 1; + + private var indexTemp:int = 1; + + private var leagueLevel:int = 30; + + private var _zyCombox:ComboBox; + + private var userListVec:Vector.; + + private var currLevel:int; + + private var flag2:Boolean; + + private var flag:Boolean; + + private var isVaildData:Boolean = true; + + private const listNum:int = 12; + + public var rank:int = 0; + + private var kingObj:Object; + + private var curTotalNum:int; + + public function LeagueRankingPage() + { + var titleArr:Array; + var posArr:Array; + var i:int; + var myRinkBtn:UIButton; + var toBtn:UIButton; + var bg1:Sprite = null; + var timeText:TextField = null; + var userLine:LeagueRankMc = null; + super(); + this.css = PublicMethod.getCenterTextFormat(); + titleArr = ["名次","玩家","胜","负","赛季积分"]; + posArr = [45,190,133,134,133]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,titleArr,posArr); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.userListVec = new Vector.(); + i = 0; + while(i < 12) + { + userLine = new LeagueRankMc(); + this.tableMc.addChild(userLine); + this.userListVec.push(userLine); + userLine.y = 26 + i * 26; + userLine.x = 4; + i++; + } + bg1 = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(bg1); + bg1.x = 4; + bg1.y = 346; + this.nameText = new UIInputText(100); + bg1.addChild(this.nameText); + this.nameText.x = 10; + this.nameText.y = 5; + this.nameText.setMaxChars(50); + this.nameText.setTextFormat(this.css); + timeText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + timeText.text = "每日凌晨刷新"; + addChild(timeText); + timeText.x = 550; + timeText.y = -20; + this.searchBtn = new UIButton("查询名称",2); + this.searchBtn.onClick = function(param1:MouseEvent):* + { + nameRank(this); + }; + myRinkBtn = new UIButton("我的排行",2); + myRinkBtn.onClick = this.myRank; + bg1.addChild(this.searchBtn); + bg1.addChild(myRinkBtn); + this.searchBtn.x = this.nameText.x + 105; + --this.nameText.y; + myRinkBtn.x = this.searchBtn.x + this.searchBtn.width + 5; + myRinkBtn.y = this.searchBtn.y; + this.pageMc = new UIPageMc(); + bg1.addChild(this.pageMc); + this.pageMc.x = 380; + this.pageMc.y = this.nameText.y + 2; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.pageText = new UIInputText(50); + bg1.addChild(this.pageText); + this.pageText.x = this.pageMc.x + this.pageMc.width + 34; + this.pageText.y = this.nameText.y; + this.pageText.setMaxChars(3); + this.pageText.numOnly(); + this.pageText.setTextFormat(this.css); + toBtn = new UIButton("跳 转"); + bg1.addChild(toBtn); + toBtn.x = this.pageText.x + this.pageText.width + 4; + toBtn.y = this.searchBtn.y; + toBtn.onClick = this.jumpRank; + this.getCurrLevel(); + this.list(); + } + + public function nextPage() : void + { + this.updateList(2); + } + + public function prePage() : void + { + this.updateList(1); + } + + private function getCurrLevel() : void + { + this.currLevel = this.leagueLevel + 1; + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(!ConnectService.getInstance().hasEventListener(LeagueEvent.LEAGUE_getRankInfo)) + { + ConnectService.getInstance().addEventListener(LeagueEvent.LEAGUE_getRankInfo,this.hostRankActionSucc); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(ConnectService.getInstance().hasEventListener(LeagueEvent.LEAGUE_getRankInfo)) + { + ConnectService.getInstance().removeEventListener(LeagueEvent.LEAGUE_getRankInfo,this.hostRankActionSucc); + } + } + + private function list() : void + { + this.flag2 = false; + this.flag = false; + ConnectService.getInstance().leagueService.getRankInfo(this.index,this.currLevel); + } + + private function hostRankActionSucc(param1:LeagueEvent) : void + { + var _loc3_:* = undefined; + var _loc2_:Object = param1.obj; + if(_loc2_ != null && _loc2_.rankList != null && _loc2_.rankList.length > 0) + { + if(this.flag2) + { + this.rank = _loc2_.rankList[0].rank; + this.leagueLevel = int(_loc2_.leagueLevel); + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + this.leagueLevel += 30; + this.list(); + return; + } + if(this.flag) + { + this.rank = _loc2_.rankList[0].rank; + this.currLevel = int(_loc2_.leagueLevel); + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(this.currLevel <= 0) + { + this.currLevel = 1; + } + if(GameData.battlesDataList.getbIndex(this.getHashMap(this.currLevel),this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.currLevel += 30; + this.list(); + } + if(GameData.monarchDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + if(this.nameText.getText()) + { + this.nameText.setText(""); + } + return; + } + this.kingObj = _loc2_; + if(int(_loc2_.totalNum) == 0) + { + if(this.isVaildData) + { + this.isVaildData = false; + this.list(); + } + else + { + this.leagueLevel = int(_loc2_.leagueLevel); + if(BattlesState.leagueLevel == 0) + { + BattlesState.leagueLevel = this.leagueLevel; + } + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + this.currLevel = int(_loc2_.leagueLevel); + if(BattlesState.leagueLevel == 0) + { + BattlesState.leagueLevel = this.currLevel; + } + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + if(this.flag2) + { + MessageBoxUI.getInstance().addMessage("您在百战千军中没有排名"); + this.flag2 = false; + return; + } + if(this.flag) + { + _loc3_ = this.nameText.getText(); + MessageBoxUI.getInstance().addMessage(_loc3_ + "在百战千军中没有排名"); + this.flag = false; + return; + } + if(this.nameText.getText()) + { + this.nameText.setText(""); + } + MessageBoxUI.getInstance().addMessage("没有符合要求的数据!"); + this.index = this.indexTemp; + this.indexTemp = 1; + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + 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.curTotalNum) + { + this.index = this.curTotalNum - this.listNum; + return; + } + break; + case 3: + this.index = (Math.ceil(this.curTotalNum / this.listNum) - 1) * 12 + 1; + } + if(GameData.battlesDataList.getbIndex(this.getHashMap(this.currLevel),this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.currLevel += 30; + this.list(); + } + } + + private function myRank(param1:MouseEvent) : void + { + this.flag2 = true; + this.flag = false; + this.indexTemp = this.index; + this.index = 1; + ConnectService.getInstance().leagueService.getMyRankInfo(); + } + + private function nameRank(param1:*) : void + { + var _loc2_:String = this.nameText.getText(); + this.flag2 = false; + this.flag = true; + if(param1 == this.searchBtn) + { + this.indexTemp = this.index; + this.index = 1; + } + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("查询名称不能为空,请重新输入。"); + return; + } + ConnectService.getInstance().leagueService.getNameRankInfo(_loc2_); + } + + private function jumpRank(param1:MouseEvent) : void + { + if(this.pageText.getText() == "") + { + MessageBoxUI.getInstance().addMessage("跳转的页数不能为空,请重新输入。"); + return; + } + var _loc2_:int = int(this.pageText.getText()); + if(_loc2_ == 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数输入不合法,请重新输入。"); + return; + } + if(_loc2_ > Math.ceil(GameData.monarchDataList.totalNum / this.listNum) || _loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数太大或太小,请重新输入。"); + return; + } + this.index = this.listNum * (_loc2_ - 1) + 1; + if(GameData.battlesDataList.getbIndex(this.getHashMap(this.currLevel),this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.currLevel += 30; + this.list(); + } + } + + private function clearList() : void + { + var _loc1_:LeagueRankMc = null; + for each(_loc1_ in this.userListVec) + { + _loc1_.setDate(null); + } + } + + private function showList() : void + { + var _loc2_:* = undefined; + var _loc3_:BattlesData = null; + if(GameData.monarchDataList.totalNum == 0) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + else + { + this.pageMc.setPageCount(Math.ceil(this.curTotalNum / this.listNum)); + this.pageMc.setPage(this.index / this.listNum + 1 >> 0); + } + var _loc1_:int = this.pageMc.getCurrPage(); + this.clearList(); + for(_loc2_ in this.userListVec) + { + _loc3_ = this.getHashMap(this.currLevel).getValue(this.index + _loc2_); + if(_loc3_) + { + this.userListVec[_loc2_].defaultRank = this.rank; + this.userListVec[_loc2_].setDate(_loc3_); + if(_loc1_ == 1) + { + if(_loc2_ <= 2) + { + this.userListVec[_loc2_].setStyle(_loc2_); + } + } + } + else + { + this.userListVec[_loc2_].setDate(null); + } + } + } + + private function getLastNum() : int + { + var _loc1_:int = 0; + var _loc2_:* = this.curTotalNum - this.index + 1; + if(_loc2_ < this.listNum) + { + _loc1_ = _loc2_; + } + else + { + _loc1_ = this.listNum; + } + return _loc1_; + } + + private function setHashMap(param1:Object) : void + { + switch(param1.leagueLevel) + { + case 1: + this.deepCopy(param1.rankList,BattlesState.obiitList); + BattlesState.obiitTotalNum = param1.totalNum; + break; + case 2: + this.deepCopy(param1.rankList,BattlesState.infantryList); + BattlesState.infantryTotalNum = param1.totalNum; + break; + case 3: + this.deepCopy(param1.rankList,BattlesState.cavalierList); + BattlesState.cavalierTotalNum = param1.totalNum; + break; + case 4: + this.deepCopy(param1.rankList,BattlesState.myrmidonList); + BattlesState.myrmidonTotalNum = param1.totalNum; + break; + case 5: + this.deepCopy(param1.rankList,BattlesState.vanguardList); + BattlesState.vanguardTotalNum = param1.totalNum; + break; + case 6: + this.deepCopy(param1.rankList,BattlesState.generalList); + BattlesState.generalTotalNum = param1.totalNum; + break; + case 7: + this.deepCopy(param1.rankList,BattlesState.marshalList); + BattlesState.marshalTotalNum = param1.totalNum; + break; + case 8: + this.deepCopy(param1.rankList,BattlesState.vassalList); + BattlesState.vassalTotalNum = param1.totalNum; + } + } + + private function deepCopy(param1:Array, param2:HashMap) : void + { + var _loc3_:BattlesData = null; + var _loc4_:* = param1.length; + var _loc5_:int = 0; + while(_loc5_ < _loc4_) + { + if(param1[_loc5_]) + { + _loc3_ = new BattlesData(); + _loc3_.rank = param1[_loc5_].rank; + _loc3_.userId = param1[_loc5_].userId; + _loc3_.userName = param1[_loc5_].userName; + _loc3_.countryId = param1[_loc5_].countryId; + _loc3_.winNum = param1[_loc5_].selfWin; + _loc3_.loseNum = param1[_loc5_].selfLose; + _loc3_.integral = param1[_loc5_].selfIntegral; + _loc3_.vipLevel = param1[_loc5_].vipLevel; + _loc3_.govId = param1[_loc5_].govId; + param2.put(_loc3_.rank,_loc3_); + } + _loc5_++; + } + } + + private function getHashMap(param1:int) : HashMap + { + switch(param1) + { + case 1: + this.curTotalNum = BattlesState.obiitTotalNum; + return BattlesState.obiitList; + case 2: + this.curTotalNum = BattlesState.infantryTotalNum; + return BattlesState.infantryList; + case 3: + this.curTotalNum = BattlesState.cavalierTotalNum; + return BattlesState.cavalierList; + case 4: + this.curTotalNum = BattlesState.myrmidonTotalNum; + return BattlesState.myrmidonList; + case 5: + this.curTotalNum = BattlesState.vanguardTotalNum; + return BattlesState.vanguardList; + case 6: + this.curTotalNum = BattlesState.generalTotalNum; + return BattlesState.generalList; + case 7: + this.curTotalNum = BattlesState.marshalTotalNum; + return BattlesState.marshalList; + case 8: + this.curTotalNum = BattlesState.vassalTotalNum; + return BattlesState.vassalList; + default: + return null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/PvpRankingPage.as b/flash_decompiled/com/view/ui/ranking/PvpRankingPage.as new file mode 100644 index 0000000..4cc14d5 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/PvpRankingPage.as @@ -0,0 +1,407 @@ +package com.view.ui.ranking +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.view.mc.button.Button_16; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.data.PvpData; + import com.view.ui.ranking.mc.PvpRankMc; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class PvpRankingPage extends BaseUI + { + + private var css:TextFormat; + + private var searchBtn:Button_16; + + private var pageText:UIInputText; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var index:int = 1; + + private var indexTemp:int = 1; + + private var userListVec:Vector.; + + private var flag2:Boolean; + + private var flag:Boolean; + + private var isVaildData:Boolean = true; + + private const listNum:int = 12; + + public var rank:int = 0; + + public function PvpRankingPage() + { + var _loc4_:Sprite = null; + var _loc7_:PvpRankMc = null; + super(); + this.css = PublicMethod.getCenterTextFormat(); + var _loc1_:Array = ["名次","君主","PVP次数","PVP胜利次数","被流放次数"]; + var _loc2_:Array = [50,186,110,127,162]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.userListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc7_ = new PvpRankMc(); + this.tableMc.addChild(_loc7_); + this.userListVec.push(_loc7_); + _loc7_.y = 26 + _loc3_ * 26; + _loc7_.x = 4; + _loc3_++; + } + _loc4_ = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 346; + this.pageMc = new UIPageMc(); + _loc4_.addChild(this.pageMc); + this.pageMc.x = 380; + this.pageMc.y = 7; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.pageText = new UIInputText(50); + _loc4_.addChild(this.pageText); + this.pageText.x = this.pageMc.x + this.pageMc.width + 34; + this.pageText.y = 5; + this.pageText.setMaxChars(3); + this.pageText.numOnly(); + this.pageText.setTextFormat(this.css); + var _loc5_:UIButton = new UIButton("跳 转"); + _loc4_.addChild(_loc5_); + _loc5_.x = this.pageText.x + this.pageText.width + 4; + _loc5_.y = 4; + _loc5_.onClick = this.jumpRank; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + _loc6_.text = "每日凌晨刷新"; + addChild(_loc6_); + _loc6_.x = 550; + _loc6_.y = -20; + this.list(); + } + + public function nextPage() : void + { + this.updateList(2); + } + + public function prePage() : void + { + this.updateList(1); + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(!ConnectService.getInstance().hasEventListener(UserEvent.USER_pvpRankAction)) + { + ConnectService.getInstance().addEventListener(UserEvent.USER_pvpRankAction,this.hostRankActionSucc); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(ConnectService.getInstance().hasEventListener(UserEvent.USER_pvpRankAction)) + { + ConnectService.getInstance().removeEventListener(UserEvent.USER_pvpRankAction,this.hostRankActionSucc); + } + } + + private function list() : void + { + this.flag2 = false; + this.flag = false; + ConnectService.getInstance().userService.pvpRankAction(this.index); + } + + private function hostRankActionSucc(param1:UserEvent) : void + { + var _loc2_:Object = param1.userObject; + if(_loc2_ != null && _loc2_.rankList != null && _loc2_.rankList.length > 0) + { + if(this.flag2) + { + this.rank = _loc2_.rankList[0].rank; + if(this.rank == -1) + { + MessageBoxUI.getInstance().addMessage("您暂时没有排名"); + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.pvpDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + return; + } + if(this.flag) + { + this.rank = _loc2_.rankList[0].rank; + if(this.rank == -1) + { + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.pvpDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + return; + } + if(int(_loc2_.totalNum) == 0) + { + if(this.isVaildData) + { + this.isVaildData = false; + this.list(); + } + else + { + GameData.pvpDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + GameData.pvpDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + MessageBoxUI.getInstance().addMessage("没有符合要求的数据!"); + this.index = this.indexTemp; + if(!this.flag) + { + if(!this.flag2) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + } + this.flag = false; + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + 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 > GameData.pvpDataList.totalNum) + { + this.index = GameData.pvpDataList.totalNum - this.listNum; + return; + } + break; + case 3: + this.index = (Math.ceil(GameData.pvpDataList.totalNum / this.listNum) - 1) * 12 + 1; + } + if(GameData.pvpDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function jumpRank(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + if(this.pageText.getText() == "") + { + MessageBoxUI.getInstance().addMessage("跳转的页数不能为空,请重新输入。"); + return; + } + var _loc5_:int = int(this.pageText.getText()); + if(_loc5_ == 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数输入不合法,请重新输入。"); + return; + } + if(_loc5_ > Math.ceil(GameData.pvpDataList.totalNum / this.listNum) || _loc5_ <= 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数太大或太小,请重新输入。"); + return; + } + this.index = this.listNum * (_loc5_ - 1) + 1; + if(GameData.pvpDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function clearList() : void + { + var _loc1_:PvpRankMc = null; + for each(_loc1_ in this.userListVec) + { + _loc1_.setDate(null); + } + } + + private function showList() : void + { + var _loc2_:* = undefined; + var _loc3_:PvpData = null; + if(GameData.pvpDataList.totalNum == 0) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + else + { + this.pageMc.setPageCount(Math.ceil(GameData.pvpDataList.totalNum / this.listNum)); + this.pageMc.setPage(this.index / this.listNum + 1 >> 0); + } + var _loc1_:int = this.pageMc.getCurrPage(); + this.clearList(); + for(_loc2_ in this.userListVec) + { + _loc3_ = GameData.pvpDataList.getItem(this.index + _loc2_); + if(_loc3_) + { + this.userListVec[_loc2_].defaultRank = this.rank; + this.userListVec[_loc2_].setDate(_loc3_); + if(_loc1_ == 1) + { + if(_loc2_ <= 2) + { + this.userListVec[_loc2_].setStyle(_loc2_); + } + } + } + else + { + this.userListVec[_loc2_].setDate(null); + } + } + } + + private function getLastNum() : int + { + var _loc1_:int = 0; + var _loc2_:* = GameData.pvpDataList.totalNum - this.index + 1; + if(_loc2_ < this.listNum) + { + _loc1_ = _loc2_; + } + else + { + _loc1_ = this.listNum; + } + return _loc1_; + } + + private function setHashMap(param1:Object) : void + { + var _loc2_:PvpData = null; + var _loc3_:int = 0; + while(_loc3_ < param1.rankList.length) + { + if(param1.rankList[_loc3_]) + { + _loc2_ = new PvpData(); + _loc2_.rankId = param1.rankList[_loc3_].rankId; + _loc2_.userId = param1.rankList[_loc3_].userId; + _loc2_.userName = param1.rankList[_loc3_].userName; + _loc2_.pvpNum = param1.rankList[_loc3_].pvpNum; + _loc2_.rebuildNum = param1.rankList[_loc3_].rebuildNum; + _loc2_.winNum = param1.rankList[_loc3_].winNum; + _loc2_.countryId = param1.rankList[_loc3_].countryId; + _loc2_.vipLevel = param1.rankList[_loc3_].vipLevel; + GameData.pvpDataList.addItem(_loc2_); + } + _loc3_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/RankingMainUI.as b/flash_decompiled/com/view/ui/ranking/RankingMainUI.as new file mode 100644 index 0000000..6936fc0 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/RankingMainUI.as @@ -0,0 +1,327 @@ +package com.view.ui.ranking +{ + import com.control.ConnectService; + import com.control.friend.event.RankEvent; + import com.data.GameData; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class RankingMainUI extends BaseUI + { + + private static var instance:RankingMainUI; + + private var startPage:int; + + private var btnArr:Array = new Array(); + + private var paneBg:UIWindowBg; + + private var currPage:int = -1; + + public var userRanking:UserRankingPage; + + public var guildRanking:GuildRankingPage; + + public var leagueRanking:LeagueRankingPage; + + public var babelRanking:BabelRankingPage; + + public var bigBossRankingPage:BigBossRankingPage; + + public var pvpRankingPage:PvpRankingPage; + + public var hallFamePage:HallFamePage; + + public var singleBabelPage:SingleBabelPage; + + public function RankingMainUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_paihangbang); + super.setPosition(); + this.createUI(); + } + + public static function getInstance() : RankingMainUI + { + if(instance == null) + { + return instance = new RankingMainUI(); + } + return instance; + } + + public function setStartPage(param1:int) : void + { + this.startPage = param1; + } + + override public function createUI() : void + { + var _loc9_:int = 0; + var _loc10_:UITabBtn = null; + var _loc1_:UITabBtn = new UITabBtn("君主排行",2); + var _loc2_:UITabBtn = new UITabBtn("联盟排行",2); + var _loc3_:UITabBtn = new UITabBtn("重楼排行",2); + var _loc4_:UITabBtn = new UITabBtn("百战千军",2); + var _loc5_:UITabBtn = new UITabBtn("名将排名",2); + var _loc6_:UITabBtn = new UITabBtn("战神排名",2); + var _loc7_:UITabBtn = new UITabBtn("名 人 堂",2); + var _loc8_:UITabBtn = new UITabBtn("单将楼",2); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + this.btnArr.push(_loc7_); + this.btnArr.push(_loc8_); + for each(_loc10_ in this.btnArr) + { + addChild(_loc10_); + _loc10_.x = 25 + _loc9_ * 66; + _loc10_.y = 40; + _loc10_.onClick = this.changTab; + _loc9_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(GameData.monarchDataList.bPast) + { + GameData.monarchDataList.hashMap.clear(); + ConnectService.getInstance().friendService.getInvalidTime(); + ConnectService.getInstance().addEventListener(RankEvent.Rank_getInvalidTime,this.getInvalidTimeSucc); + } + else + { + this.setBtnSelect(this.btnArr[this.startPage]); + } + } + + private function getInvalidTimeSucc(param1:RankEvent) : void + { + ConnectService.getInstance().removeEventListener(RankEvent.Rank_getInvalidTime,this.getInvalidTimeSucc); + GameData.monarchDataList.pastTime = param1.obj as Number; + this.setBtnSelect(this.btnArr[this.startPage]); + } + + private function changTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + this.setBtnSelect(_loc2_); + } + + private function setBtnSelect(param1:UITabBtn) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + if(this.currPage >= 0) + { + this.btnArr[this.currPage].select = false; + } + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(param1 == _loc4_) + { + _loc4_.select = true; + _loc2_ = _loc3_; + break; + } + } + this.openPage(_loc2_); + } + + private function removePage(param1:int) : void + { + if(param1 >= 0) + { + switch(param1) + { + case 0: + if(Boolean(this.userRanking) && contains(this.userRanking)) + { + this.paneBg.removeChild(this.userRanking); + } + break; + case 1: + if(Boolean(this.guildRanking) && contains(this.guildRanking)) + { + this.paneBg.removeChild(this.guildRanking); + } + break; + case 2: + if(Boolean(this.leagueRanking) && contains(this.leagueRanking)) + { + this.paneBg.removeChild(this.leagueRanking); + } + break; + case 3: + if(Boolean(this.babelRanking) && contains(this.babelRanking)) + { + this.paneBg.removeChild(this.babelRanking); + } + break; + case 4: + if(Boolean(this.bigBossRankingPage) && contains(this.bigBossRankingPage)) + { + this.paneBg.removeChild(this.bigBossRankingPage); + } + break; + case 5: + if(Boolean(this.pvpRankingPage) && contains(this.pvpRankingPage)) + { + this.paneBg.removeChild(this.pvpRankingPage); + } + case 6: + if(Boolean(this.hallFamePage) && contains(this.hallFamePage)) + { + this.paneBg.removeChild(this.hallFamePage); + } + case 7: + if(Boolean(this.singleBabelPage) && contains(this.singleBabelPage)) + { + this.paneBg.removeChild(this.singleBabelPage); + } + } + } + } + + private function addPage(param1:int) : void + { + if(param1 >= 0) + { + switch(param1) + { + case 0: + this.createPage1(); + break; + case 1: + this.createPage2(); + break; + case 2: + this.createPage3(); + break; + case 3: + this.createPage4(); + break; + case 4: + this.createPage5(); + break; + case 5: + this.createPage6(); + break; + case 6: + this.createPage7(); + break; + case 7: + this.createPage8(); + } + } + } + + private function openPage(param1:int) : void + { + if(this.currPage == param1) + { + return; + } + this.removePage(this.currPage); + this.currPage = param1; + this.addPage(this.currPage); + } + + private function createPage1() : void + { + if(this.userRanking == null) + { + this.userRanking = new UserRankingPage(); + } + this.paneBg.addChild(this.userRanking); + } + + private function createPage2() : void + { + if(this.guildRanking == null) + { + this.guildRanking = new GuildRankingPage(); + } + this.paneBg.addChild(this.guildRanking); + } + + private function createPage3() : void + { + if(this.leagueRanking == null) + { + this.leagueRanking = new LeagueRankingPage(); + } + this.paneBg.addChild(this.leagueRanking); + } + + private function createPage4() : void + { + if(this.babelRanking == null) + { + this.babelRanking = new BabelRankingPage(); + } + this.paneBg.addChild(this.babelRanking); + } + + private function createPage5() : void + { + if(this.bigBossRankingPage == null) + { + this.bigBossRankingPage = new BigBossRankingPage(); + } + this.paneBg.addChild(this.bigBossRankingPage); + } + + private function createPage6() : void + { + if(this.pvpRankingPage == null) + { + this.pvpRankingPage = new PvpRankingPage(); + } + this.paneBg.addChild(this.pvpRankingPage); + } + + private function createPage7() : void + { + if(this.hallFamePage == null) + { + this.hallFamePage = new HallFamePage(); + } + this.paneBg.addChild(this.hallFamePage); + } + + private function createPage8() : void + { + if(this.singleBabelPage == null) + { + this.singleBabelPage = new SingleBabelPage(); + } + this.paneBg.addChild(this.singleBabelPage); + } + + private function getNextRefreshTime() : void + { + ConnectService.getInstance().friendService.getInvalidTime(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/SingleBabelPage.as b/flash_decompiled/com/view/ui/ranking/SingleBabelPage.as new file mode 100644 index 0000000..e340511 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/SingleBabelPage.as @@ -0,0 +1,328 @@ +package com.view.ui.ranking +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.data.SingleBabelData; + import com.view.ui.ranking.mc.SingleBabelRankMc; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SingleBabelPage extends BaseUI + { + + private var css:TextFormat; + + private var tableMc:UITable; + + private var pageMc:UIPageMc; + + private var index:int = 1; + + private var indexTemp:int = 1; + + private var pageText:UIInputText; + + private var userListVec:Vector.; + + private var isVaildData:Boolean = true; + + public var rank:int = 0; + + private const listNum:int = 12; + + public function SingleBabelPage() + { + var _loc4_:Sprite = null; + var _loc7_:TextField = null; + var _loc8_:SingleBabelRankMc = null; + super(); + this.css = PublicMethod.getCenterTextFormat(); + var _loc1_:Array = ["名次","君主","武将","武将战力","楼层","到达时间"]; + var _loc2_:Array = [45,196,89,92,83,130]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.userListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc8_ = new SingleBabelRankMc(); + this.tableMc.addChild(_loc8_); + this.userListVec.push(_loc8_); + _loc8_.y = 26 + _loc3_ * 26; + _loc8_.x = 4; + _loc3_++; + } + _loc4_ = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 346; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,250); + _loc4_.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = 8; + this.pageMc = new UIPageMc(); + _loc4_.addChild(this.pageMc); + this.pageMc.x = 380; + this.pageMc.y = 7; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.pageText = new UIInputText(50); + _loc4_.addChild(this.pageText); + this.pageText.x = this.pageMc.x + this.pageMc.width + 34; + this.pageText.y = 5; + this.pageText.setMaxChars(3); + this.pageText.numOnly(); + this.pageText.setTextFormat(this.css); + var _loc6_:UIButton = new UIButton("跳 转"); + _loc4_.addChild(_loc6_); + _loc6_.x = this.pageText.x + this.pageText.width + 4; + --this.pageText.y; + _loc6_.onClick = this.jumpRank; + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + _loc7_.text = "每日凌晨刷新"; + addChild(_loc7_); + _loc7_.x = 550; + _loc7_.y = -20; + this.list(); + } + + public function nextPage() : void + { + this.updateList(2); + } + + public function prePage() : void + { + this.updateList(1); + } + + 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 > GameData.singleBabelDataList.totalNum) + { + this.index = GameData.singleBabelDataList.totalNum - this.listNum; + return; + } + break; + case 3: + this.index = (Math.ceil(GameData.singleBabelDataList.totalNum / this.listNum) - 1) * 12 + 1; + } + if(GameData.singleBabelDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function jumpRank(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + if(this.pageText.getText() == "") + { + MessageBoxUI.getInstance().addMessage("跳转的页数不能为空,请重新输入。"); + return; + } + var _loc5_:int = int(this.pageText.getText()); + if(_loc5_ == 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数输入不合法,请重新输入。"); + return; + } + if(_loc5_ > Math.ceil(GameData.singleBabelDataList.totalNum / this.listNum) || _loc5_ <= 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数太大或太小,请重新输入。"); + return; + } + this.index = this.listNum * (_loc5_ - 1) + 1; + if(GameData.singleBabelDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function getLastNum() : int + { + var _loc1_:int = 0; + var _loc2_:* = GameData.singleBabelDataList.totalNum - this.index + 1; + if(_loc2_ < this.listNum) + { + _loc1_ = _loc2_; + } + else + { + _loc1_ = this.listNum; + } + return _loc1_; + } + + private function list() : void + { + ConnectService.getInstance().userService.singleBabelRankAction(this.index); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(!ConnectService.getInstance().hasEventListener(UserEvent.USER_singleBabelRankAction)) + { + ConnectService.getInstance().addEventListener(UserEvent.USER_singleBabelRankAction,this.babelRankActionSucc); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(ConnectService.getInstance().hasEventListener(UserEvent.USER_singleBabelRankAction)) + { + ConnectService.getInstance().removeEventListener(UserEvent.USER_singleBabelRankAction,this.babelRankActionSucc); + } + } + + private function babelRankActionSucc(param1:UserEvent) : void + { + var _loc2_:Object = param1.userObject; + if(_loc2_ != null && _loc2_.rankList != null && _loc2_.rankList.length > 0) + { + if(int(_loc2_.totalNum) == 0) + { + if(this.isVaildData) + { + this.isVaildData = false; + this.list(); + } + else + { + GameData.singleBabelDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + GameData.singleBabelDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + MessageBoxUI.getInstance().addMessage("没有符合要求的数据!"); + this.index = this.indexTemp; + } + } + + private function showList() : void + { + var _loc2_:* = undefined; + var _loc3_:SingleBabelData = null; + if(GameData.singleBabelDataList.totalNum == 0) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + else + { + this.pageMc.setPageCount(Math.ceil(GameData.singleBabelDataList.totalNum / this.listNum)); + this.pageMc.setPage(this.index / this.listNum + 1 >> 0); + } + var _loc1_:int = this.pageMc.getCurrPage(); + this.clearList(); + for(_loc2_ in this.userListVec) + { + _loc3_ = GameData.singleBabelDataList.getItem(this.index + _loc2_); + if(_loc3_) + { + this.userListVec[_loc2_].defaultRank = this.rank; + this.userListVec[_loc2_].setDate(_loc3_); + if(_loc1_ == 1) + { + if(_loc2_ <= 2) + { + this.userListVec[_loc2_].setStyle(_loc2_); + } + } + } + else + { + this.userListVec[_loc2_].setDate(null); + } + } + } + + private function clearList() : void + { + var _loc1_:SingleBabelRankMc = null; + for each(_loc1_ in this.userListVec) + { + _loc1_.setDate(null); + } + } + + private function setHashMap(param1:Object) : void + { + var _loc2_:SingleBabelData = null; + var _loc3_:int = 0; + while(_loc3_ < param1.rankList.length) + { + if(param1.rankList[_loc3_]) + { + _loc2_ = new SingleBabelData(); + _loc2_.rank = param1.rankList[_loc3_].rankId; + _loc2_.userName = param1.rankList[_loc3_].userName; + _loc2_.heroName = param1.rankList[_loc3_].heroName; + _loc2_.stageId = param1.rankList[_loc3_].stageId; + _loc2_.topStageTime = param1.rankList[_loc3_].topDttm; + _loc2_.vipLevel = param1.rankList[_loc3_].vipLevel; + _loc2_.power = param1.rankList[_loc3_].power; + _loc2_.countryId = param1.rankList[_loc3_].countryId; + _loc2_.govId = param1.rankList[_loc3_].govId; + GameData.singleBabelDataList.addItem(_loc2_); + } + _loc3_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/UserRankingPage.as b/flash_decompiled/com/view/ui/ranking/UserRankingPage.as new file mode 100644 index 0000000..9da1795 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/UserRankingPage.as @@ -0,0 +1,473 @@ +package com.view.ui.ranking +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.data.MonarchData; + import com.view.ui.ranking.mc.UserRankMc; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UserRankingPage extends BaseUI + { + + private var css:TextFormat; + + private var tableMc:UITable; + + private var searchBtn:UIButton; + + private var nameText:UIInputText; + + private var pageText:UIInputText; + + private var pageMc:UIPageMc; + + private var index:int = 1; + + private var indexTemp:int = 1; + + private var userListVec:Vector.; + + private var flag2:Boolean; + + private var flag:Boolean; + + private var isVaildData:Boolean = true; + + private const listNum:int = 12; + + public var rank:int = 0; + + public function UserRankingPage() + { + var titleArr:Array; + var posArr:Array; + var i:int; + var toBtn:UIButton; + var timeText:TextField; + var bg1:Sprite = null; + var myRinkBtn:UIButton = null; + var userLine:UserRankMc = null; + super(); + this.css = PublicMethod.getCenterTextFormat(); + titleArr = ["名次","君主","联盟","等级","繁荣度","操作"]; + posArr = [45,192,115,69,82,132]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,titleArr,posArr); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.userListVec = new Vector.(); + i = 0; + while(i < 12) + { + userLine = new UserRankMc(); + this.tableMc.addChild(userLine); + this.userListVec.push(userLine); + userLine.y = 26 + i * 26; + userLine.x = 4; + i++; + } + bg1 = new Scale9Grid(face.getSprite(UIConfig.secondPanel_skin),622,24); + addChild(bg1); + bg1.x = 4; + bg1.y = 346; + this.nameText = new UIInputText(100); + bg1.addChild(this.nameText); + this.nameText.x = 10; + this.nameText.y = 5; + this.nameText.setMaxChars(50); + this.nameText.setTextFormat(this.css); + this.searchBtn = new UIButton("查询名称",2); + this.searchBtn.onClick = function(param1:MouseEvent):* + { + nameRank(this); + }; + myRinkBtn = new UIButton("我的排行",2); + myRinkBtn.onClick = this.myRank; + ToolTipManager.getInstance().setToolTip(this.searchBtn,new TxtTooltip("繁荣度达到1200才能上榜"),false,-1,false); + ToolTipManager.getInstance().setToolTip(myRinkBtn,new TxtTooltip("繁荣度达到1200才能上榜"),false,-1,false); + bg1.addChild(this.searchBtn); + bg1.addChild(myRinkBtn); + this.searchBtn.x = this.nameText.x + 105; + --this.nameText.y; + myRinkBtn.x = this.searchBtn.x + this.searchBtn.width + 5; + myRinkBtn.y = this.searchBtn.y; + this.pageMc = new UIPageMc(); + bg1.addChild(this.pageMc); + this.pageMc.x = 380; + this.pageMc.y = this.nameText.y + 2; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.pageText = new UIInputText(50); + bg1.addChild(this.pageText); + this.pageText.x = this.pageMc.x + this.pageMc.width + 34; + this.pageText.y = this.nameText.y; + this.pageText.setMaxChars(3); + this.pageText.numOnly(); + this.pageText.setTextFormat(this.css); + toBtn = new UIButton("跳 转"); + bg1.addChild(toBtn); + toBtn.x = this.pageText.x + this.pageText.width + 4; + toBtn.y = this.searchBtn.y; + toBtn.onClick = this.jumpRank; + timeText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + timeText.text = "每日凌晨刷新"; + addChild(timeText); + timeText.x = 550; + timeText.y = -20; + this.list(); + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(!ConnectService.getInstance().hasEventListener(UserEvent.USER_hostRankAction)) + { + ConnectService.getInstance().addEventListener(UserEvent.USER_hostRankAction,this.hostRankActionSucc); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(ConnectService.getInstance().hasEventListener(UserEvent.USER_hostRankAction)) + { + ConnectService.getInstance().removeEventListener(UserEvent.USER_hostRankAction,this.hostRankActionSucc); + } + } + + private function list() : void + { + this.flag2 = false; + this.flag = false; + ConnectService.getInstance().userService.hostRankAction(this.index); + } + + private function hostRankActionSucc(param1:UserEvent) : void + { + var _loc3_:String = null; + var _loc2_:Object = param1.userObject; + if(_loc2_ != null && _loc2_.rankList != null && _loc2_.rankList.length > 0) + { + if(this.flag2) + { + this.rank = _loc2_.rankList[0].rank; + if(this.rank == -1) + { + MessageBoxUI.getInstance().addMessage("您暂时没有排名"); + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.monarchDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + return; + } + if(this.flag) + { + this.rank = _loc2_.rankList[0].rank; + _loc3_ = this.nameText.getText(); + if(this.rank == -1) + { + MessageBoxUI.getInstance().addMessage(_loc3_ + "暂时没有排名"); + return; + } + if(this.rank <= this.listNum) + { + this.index = 1; + } + else if(this.rank % this.listNum == 0) + { + this.index = this.rank - 11; + } + else + { + this.index = this.rank - this.rank % this.listNum + 1; + } + if(GameData.monarchDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + if(this.nameText.getText()) + { + this.nameText.setText(""); + } + return; + } + if(int(_loc2_.totalNum) == 0) + { + if(this.isVaildData) + { + this.isVaildData = false; + this.list(); + } + else + { + GameData.monarchDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + GameData.monarchDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + MessageBoxUI.getInstance().addMessage("没有符合要求的数据!"); + this.index = this.indexTemp; + if(!this.flag) + { + if(!this.flag2) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + } + this.flag = false; + } + } + + private function clickPage(param1:MouseEvent) : void + { + } + + public function nextPage() : void + { + this.updateList(2); + } + + public function prePage() : void + { + this.updateList(1); + } + + 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 > GameData.monarchDataList.totalNum) + { + this.index = GameData.monarchDataList.totalNum - this.listNum; + return; + } + break; + case 3: + this.index = (Math.ceil(GameData.monarchDataList.totalNum / this.listNum) - 1) * 12 + 1; + } + if(GameData.monarchDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function myRank(param1:MouseEvent) : void + { + this.flag2 = true; + this.flag = false; + this.indexTemp = this.index; + this.index = 1; + ConnectService.getInstance().userService.myRankAction(); + } + + private function nameRank(param1:*) : void + { + var _loc2_:String = this.nameText.getText(); + this.flag2 = false; + this.flag = true; + if(param1 == this.searchBtn) + { + this.indexTemp = this.index; + this.index = 1; + } + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("君主名称不能为空,请重新输入。"); + return; + } + ConnectService.getInstance().userService.nameRankAction(_loc2_); + } + + private function jumpRank(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + if(this.pageText.getText() == "") + { + MessageBoxUI.getInstance().addMessage("跳转的页数不能为空,请重新输入。"); + return; + } + var _loc5_:int = int(this.pageText.getText()); + if(_loc5_ == 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数输入不合法,请重新输入。"); + return; + } + if(_loc5_ > Math.ceil(GameData.monarchDataList.totalNum / this.listNum) || _loc5_ <= 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数太大或太小,请重新输入。"); + return; + } + this.index = this.listNum * (_loc5_ - 1) + 1; + if(GameData.monarchDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function clearList() : void + { + var _loc1_:UserRankMc = null; + for each(_loc1_ in this.userListVec) + { + _loc1_.setDate(null); + } + } + + private function showList() : void + { + var _loc2_:* = undefined; + var _loc3_:MonarchData = null; + if(GameData.monarchDataList.totalNum == 0) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + else + { + this.pageMc.setPageCount(Math.ceil(GameData.monarchDataList.totalNum / this.listNum)); + this.pageMc.setPage(this.index / this.listNum + 1 >> 0); + } + var _loc1_:int = this.pageMc.getCurrPage(); + this.clearList(); + for(_loc2_ in this.userListVec) + { + _loc3_ = GameData.monarchDataList.getItem(this.index + _loc2_); + if(_loc3_) + { + this.userListVec[_loc2_].defaultRank = this.rank; + this.userListVec[_loc2_].setDate(_loc3_); + if(_loc1_ == 1) + { + if(_loc2_ <= 2) + { + this.userListVec[_loc2_].setStyle(_loc2_); + } + } + } + else + { + this.userListVec[_loc2_].setDate(null); + } + } + } + + private function getLastNum() : int + { + var _loc1_:int = 0; + var _loc2_:* = GameData.monarchDataList.totalNum - this.index + 1; + if(_loc2_ < this.listNum) + { + _loc1_ = _loc2_; + } + else + { + _loc1_ = this.listNum; + } + return _loc1_; + } + + private function setHashMap(param1:Object) : void + { + var _loc2_:MonarchData = null; + var _loc3_:int = 0; + while(_loc3_ < param1.rankList.length) + { + if(param1.rankList[_loc3_]) + { + _loc2_ = new MonarchData(); + _loc2_.rank = param1.rankList[_loc3_].rank; + _loc2_.userId = param1.rankList[_loc3_].userId; + _loc2_.userName = param1.rankList[_loc3_].userName; + _loc2_.rankName = param1.rankList[_loc3_].rankName; + _loc2_.countryId = param1.rankList[_loc3_].countryId; + _loc2_.guildId = param1.rankList[_loc3_].guildId; + _loc2_.guildName = param1.rankList[_loc3_].guildName; + _loc2_.rangeValue = param1.rankList[_loc3_].rangeValue; + _loc2_.vipLevel = param1.rankList[_loc3_].vipLevel; + _loc2_.govId = param1.rankList[_loc3_].govId; + GameData.monarchDataList.addItem(_loc2_); + } + _loc3_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/BabelData.as b/flash_decompiled/com/view/ui/ranking/data/BabelData.as new file mode 100644 index 0000000..1c8582d --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/BabelData.as @@ -0,0 +1,111 @@ +package com.view.ui.ranking.data +{ + import com.view.ui.farm.data.Data; + + public class BabelData extends Data + { + + private var _rank:int; + + private var _userName:String; + + private var _userId:int; + + private var _topStage:String; + + private var _topStageTime:String; + + private var _countryId:int; + + private var _vipLevel:int; + + private var _govId:int; + + public function BabelData() + { + super(); + this.property = ["_rank","_userName","_userId","_topStage","_topStageTime"]; + } + + public function get rank() : int + { + return this._rank; + } + + public function set rank(param1:int) : void + { + this._rank = param1; + } + + public function get userName() : String + { + return this._userName; + } + + public function set userName(param1:String) : void + { + this._userName = param1; + } + + public function get userId() : int + { + return this._userId; + } + + public function set userId(param1:int) : void + { + this._userId = param1; + } + + public function get topStage() : String + { + return this._topStage; + } + + public function set topStage(param1:String) : void + { + this._topStage = param1; + } + + public function get topStageTime() : String + { + return this._topStageTime; + } + + public function set topStageTime(param1:String) : void + { + this._topStageTime = param1; + } + + public function get countryId() : int + { + return this._countryId; + } + + public function set countryId(param1:int) : void + { + this._countryId = param1; + } + + public function get vipLevel() : int + { + return this._vipLevel; + } + + public function set vipLevel(param1:int) : void + { + this._vipLevel = param1; + } + + public function get govId() : int + { + return this._govId; + } + + public function set govId(param1:int) : void + { + this._govId = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/BabelDataList.as b/flash_decompiled/com/view/ui/ranking/data/BabelDataList.as new file mode 100644 index 0000000..e647f60 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/BabelDataList.as @@ -0,0 +1,99 @@ +package com.view.ui.ranking.data +{ + import com.utils.HashMap; + + public class BabelDataList + { + + private var m_List:HashMap; + + private var m_nowTime:Date; + + private var m_totalNum:int; + + private var m_pastTime:Date; + + public function BabelDataList() + { + super(); + this.m_pastTime = new Date(); + this.m_List = new HashMap(); + } + + public function getNumArray(param1:int, param2:int) : Array + { + var _loc3_:* = new Array(); + var _loc4_:* = param1 + param2; + var _loc5_:* = param1; + while(_loc5_ < _loc4_) + { + if(this.m_List.containsKey(param1)) + { + throw new Error("获取数据出错!"); + } + _loc3_.push(this.m_List.getValue(param1)); + _loc5_++; + } + return _loc3_; + } + + public function addItem(param1:BabelData) : void + { + this.m_List.put(param1.rank,param1); + } + + public function set totalNum(param1:int) : void + { + this.m_totalNum = param1; + } + + public function get length() : int + { + return this.m_List.size(); + } + + public function getItem(param1:int) : BabelData + { + return this.m_List.getValue(param1); + } + + public function getbIndex(param1:int, param2:int) : Boolean + { + var _loc3_:* = param1 + param2; + var _loc4_:* = param1; + while(_loc4_ < _loc3_) + { + if(!this.m_List.containsKey(param1)) + { + return false; + } + _loc4_++; + } + return true; + } + + public function get hashMap() : HashMap + { + return this.m_List; + } + + public function get totalNum() : int + { + return this.m_totalNum; + } + + public function get bPast() : Boolean + { + this.m_nowTime = new Date(); + return this.m_nowTime.valueOf() >= this.m_pastTime.valueOf(); + } + + public function set pastTime(param1:Number) : void + { + this.m_nowTime = new Date(); + this.m_pastTime = new Date(); + this.m_pastTime.setTime(this.m_nowTime.valueOf() + param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/BattlesData.as b/flash_decompiled/com/view/ui/ranking/data/BattlesData.as new file mode 100644 index 0000000..e87ffe9 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/BattlesData.as @@ -0,0 +1,120 @@ +package com.view.ui.ranking.data +{ + public class BattlesData + { + + private var _integral:int; + + private var _userName:String; + + private var _countryId:int; + + private var _rank:int; + + private var _userId:int; + + private var _winNum:int; + + private var _loseNum:int; + + private var _vipLevel:int; + + private var _govId:int; + + public function BattlesData() + { + super(); + } + + public function set loseNum(param1:int) : void + { + this._loseNum = param1; + } + + public function get userId() : int + { + return this._userId; + } + + public function get winNum() : int + { + return this._winNum; + } + + public function set userId(param1:int) : void + { + this._userId = param1; + } + + public function set winNum(param1:int) : void + { + this._winNum = param1; + } + + public function set rank(param1:int) : void + { + this._rank = param1; + } + + public function set integral(param1:int) : void + { + this._integral = param1; + } + + public function get countryId() : int + { + return this._countryId; + } + + public function set countryId(param1:int) : void + { + this._countryId = param1; + } + + public function set userName(param1:String) : void + { + this._userName = param1; + } + + public function get loseNum() : int + { + return this._loseNum; + } + + public function get rank() : int + { + return this._rank; + } + + public function get userName() : String + { + return this._userName; + } + + public function get integral() : int + { + return this._integral; + } + + public function get vipLevel() : int + { + return this._vipLevel; + } + + public function set vipLevel(param1:int) : void + { + this._vipLevel = param1; + } + + public function get govId() : int + { + return this._govId; + } + + public function set govId(param1:int) : void + { + this._govId = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/BattlesDataList.as b/flash_decompiled/com/view/ui/ranking/data/BattlesDataList.as new file mode 100644 index 0000000..ecd8f5a --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/BattlesDataList.as @@ -0,0 +1,47 @@ +package com.view.ui.ranking.data +{ + import com.utils.HashMap; + + public class BattlesDataList + { + + private var m_pastTime:Date; + + private var m_nowTime:Date; + + public function BattlesDataList() + { + super(); + this.m_pastTime = new Date(); + } + + public function get bPast() : Boolean + { + this.m_nowTime = new Date(); + return this.m_nowTime.valueOf() >= this.m_pastTime.valueOf(); + } + + public function getbIndex(param1:HashMap, param2:int, param3:int) : Boolean + { + var _loc4_:* = param2 + param3; + var _loc5_:* = param2; + while(_loc5_ < _loc4_) + { + if(!param1.containsKey(param2)) + { + return false; + } + _loc5_++; + } + return true; + } + + public function set pastTime(param1:Number) : void + { + this.m_nowTime = new Date(); + this.m_pastTime = new Date(); + this.m_pastTime.setTime(this.m_nowTime.valueOf() + param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/BattlesState.as b/flash_decompiled/com/view/ui/ranking/data/BattlesState.as new file mode 100644 index 0000000..4cecff8 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/BattlesState.as @@ -0,0 +1,48 @@ +package com.view.ui.ranking.data +{ + import com.utils.HashMap; + + public class BattlesState + { + + public static var leagueLevel:int; + + public static var obiitTotalNum:int; + + public static var vanguardTotalNum:int; + + public static var marshalTotalNum:int; + + public static var infantryTotalNum:int; + + public static var myrmidonTotalNum:int; + + public static var cavalierTotalNum:int; + + public static var generalTotalNum:int; + + public static var vassalTotalNum:int; + + public static var marshalList:HashMap = new HashMap(); + + public static var myrmidonList:HashMap = new HashMap(); + + public static var vanguardList:HashMap = new HashMap(); + + public static var generalList:HashMap = new HashMap(); + + public static var infantryList:HashMap = new HashMap(); + + public static var obiitList:HashMap = new HashMap(); + + public static var cavalierList:HashMap = new HashMap(); + + public static var vassalList:HashMap = new HashMap(); + + public function BattlesState() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/BigBossDataList.as b/flash_decompiled/com/view/ui/ranking/data/BigBossDataList.as new file mode 100644 index 0000000..80229bd --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/BigBossDataList.as @@ -0,0 +1,90 @@ +package com.view.ui.ranking.data +{ + import com.utils.HashMap; + + public class BigBossDataList + { + + private var m_totalNum:int; + + private var m_List:HashMap; + + public function BigBossDataList() + { + super(); + this.m_List = new HashMap(); + } + + public function getNumArray(param1:int, param2:int) : Array + { + var _loc3_:* = new Array(); + var _loc4_:* = param1 + param2; + var _loc5_:* = param1; + while(_loc5_ < _loc4_) + { + if(this.m_List.containsKey(param1)) + { + throw new Error("获取数据出错!"); + } + _loc3_.push(this.m_List.getValue(param1)); + _loc5_++; + } + return _loc3_; + } + + public function addItem(param1:UserBigBossData) : void + { + this.m_List.put(param1.rankId,param1); + } + + public function set totalNum(param1:int) : void + { + this.m_totalNum = param1; + } + + public function get totalNum() : int + { + return this.m_totalNum; + } + + public function get length() : int + { + return this.m_List.size(); + } + + public function getItem(param1:int) : UserBigBossData + { + return this.m_List.getValue(param1); + } + + public function getbIndex(param1:int, param2:int) : Boolean + { + var _loc3_:* = param1 + param2; + var _loc4_:* = param1; + while(_loc4_ < _loc3_) + { + if(!this.m_List.containsKey(param1)) + { + return false; + } + _loc4_++; + } + return true; + } + + public function get hashMap() : HashMap + { + return this.m_List; + } + + public function get bPast() : Boolean + { + return false; + } + + public function set pastTime(param1:Number) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/LeagueData.as b/flash_decompiled/com/view/ui/ranking/data/LeagueData.as new file mode 100644 index 0000000..e9e756a --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/LeagueData.as @@ -0,0 +1,159 @@ +package com.view.ui.ranking.data +{ + import com.view.ui.farm.data.Data; + + public class LeagueData extends Data + { + + private var _level:int; + + private var _repute:int; + + private var _rank:int; + + private var _countryId:int; + + private var _canApply:String; + + private var _guildName:String; + + private var _memberNumber:int; + + private var _leader:String; + + private var _guildId:int; + + private var _shireNum:int; + + private var _vipLevel:int; + + private var _govId:int; + + public function LeagueData() + { + super(); + this.property = ["_rank","_guildId","_guildName","_leader","_level","_memberNumber","_repute","_countryId","_canApply","_shireNum"]; + } + + public function set guildName(param1:String) : void + { + this._guildName = param1; + } + + public function set memberNumber(param1:int) : void + { + this._memberNumber = param1; + } + + public function get leader() : String + { + return this._leader; + } + + public function set level(param1:int) : void + { + this._level = param1; + } + + public function get countryId() : int + { + return this._countryId; + } + + public function get level() : int + { + return this._level; + } + + public function set canApply(param1:String) : void + { + this._canApply = param1; + } + + public function set rank(param1:int) : void + { + this._rank = param1; + } + + public function set leader(param1:String) : void + { + this._leader = param1; + } + + public function get memberNumber() : int + { + return this._memberNumber; + } + + public function set guildId(param1:int) : void + { + this._guildId = param1; + } + + public function get canApply() : String + { + return this._canApply; + } + + public function set repute(param1:int) : void + { + this._repute = param1; + } + + public function get guildName() : String + { + return this._guildName; + } + + public function get shireNum() : int + { + return this._shireNum; + } + + public function get repute() : int + { + return this._repute; + } + + public function set shireNum(param1:int) : void + { + this._shireNum = param1; + } + + public function get rank() : int + { + return this._rank; + } + + public function get guildId() : int + { + return this._guildId; + } + + public function set countryId(param1:int) : void + { + this._countryId = param1; + } + + public function get vipLevel() : int + { + return this._vipLevel; + } + + public function set vipLevel(param1:int) : void + { + this._vipLevel = param1; + } + + public function get govId() : int + { + return this._govId; + } + + public function set govId(param1:int) : void + { + this._govId = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/LeagueDataList.as b/flash_decompiled/com/view/ui/ranking/data/LeagueDataList.as new file mode 100644 index 0000000..ca7646b --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/LeagueDataList.as @@ -0,0 +1,82 @@ +package com.view.ui.ranking.data +{ + import com.utils.HashMap; + + public class LeagueDataList + { + + private var _leagueList:HashMap; + + private var m_pastTime:Date; + + private var m_totalNum:int; + + private var m_nowTime:Date; + + public function LeagueDataList() + { + super(); + this.m_pastTime = new Date(); + this._leagueList = new HashMap(); + } + + public function addItem(param1:LeagueData) : void + { + this._leagueList.put(param1.rank,param1); + } + + public function set totalNum(param1:int) : void + { + this.m_totalNum = param1; + } + + public function get length() : int + { + return this._leagueList.size(); + } + + public function getbIndex(param1:int, param2:int) : Boolean + { + var _loc3_:* = param1 + param2; + var _loc4_:* = param1; + while(_loc4_ < _loc3_) + { + if(!this._leagueList.containsKey(param1)) + { + return false; + } + _loc4_++; + } + return true; + } + + public function get hashMap() : HashMap + { + return this._leagueList; + } + + public function getItem(param1:int) : LeagueData + { + return this._leagueList.getValue(param1); + } + + public function get totalNum() : int + { + return this.m_totalNum; + } + + public function get bPast() : Boolean + { + this.m_nowTime = new Date(); + return this.m_nowTime.valueOf() >= this.m_pastTime.valueOf(); + } + + public function set pastTime(param1:Number) : void + { + this.m_nowTime = new Date(); + this.m_pastTime = new Date(); + this.m_pastTime.setTime(this.m_nowTime.valueOf() + param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/MonarchData.as b/flash_decompiled/com/view/ui/ranking/data/MonarchData.as new file mode 100644 index 0000000..1c62e12 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/MonarchData.as @@ -0,0 +1,135 @@ +package com.view.ui.ranking.data +{ + import com.view.ui.farm.data.Data; + + public class MonarchData extends Data + { + + private var _rank:int; + + private var _countryId:int; + + private var _rangeValue:int; + + private var _userName:String; + + private var _guildName:String; + + private var _userId:int; + + private var _guildId:int; + + private var _rankName:String; + + private var _govId:int; + + private var _vipLevel:int; + + public function MonarchData() + { + super(); + this.property = ["_rank","_userId","_userName","_rankName","_countryId","_guildId","_guildName","_rangeValue","_govId","_vipLevel"]; + } + + public function get userId() : int + { + return this._userId; + } + + public function set userId(param1:int) : void + { + this._userId = param1; + } + + public function get countryId() : int + { + return this._countryId; + } + + public function get rankName() : String + { + return this._rankName; + } + + public function set rank(param1:int) : void + { + this._rank = param1; + } + + public function set guildId(param1:int) : void + { + this._guildId = param1; + } + + public function set countryId(param1:int) : void + { + this._countryId = param1; + } + + public function set rangeValue(param1:int) : void + { + this._rangeValue = param1; + } + + public function get guildName() : String + { + return this._guildName; + } + + public function set rankName(param1:String) : void + { + this._rankName = param1; + } + + public function set userName(param1:String) : void + { + this._userName = param1; + } + + public function get rangeValue() : int + { + return this._rangeValue; + } + + public function get guildId() : int + { + return this._guildId; + } + + public function get userName() : String + { + return this._userName; + } + + public function get rank() : int + { + return this._rank; + } + + public function set guildName(param1:String) : void + { + this._guildName = param1; + } + + public function get vipLevel() : int + { + return this._vipLevel; + } + + public function set vipLevel(param1:int) : void + { + this._vipLevel = param1; + } + + public function get govId() : int + { + return this._govId; + } + + public function set govId(param1:int) : void + { + this._govId = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/MonarchDataList.as b/flash_decompiled/com/view/ui/ranking/data/MonarchDataList.as new file mode 100644 index 0000000..edf8731 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/MonarchDataList.as @@ -0,0 +1,99 @@ +package com.view.ui.ranking.data +{ + import com.utils.HashMap; + + public class MonarchDataList + { + + private var m_List:HashMap; + + private var m_nowTime:Date; + + private var m_totalNum:int; + + private var m_pastTime:Date; + + public function MonarchDataList() + { + super(); + this.m_pastTime = new Date(); + this.m_List = new HashMap(); + } + + public function getNumArray(param1:int, param2:int) : Array + { + var _loc3_:* = new Array(); + var _loc4_:* = param1 + param2; + var _loc5_:* = param1; + while(_loc5_ < _loc4_) + { + if(this.m_List.containsKey(param1)) + { + throw new Error("获取数据出错!"); + } + _loc3_.push(this.m_List.getValue(param1)); + _loc5_++; + } + return _loc3_; + } + + public function addItem(param1:MonarchData) : void + { + this.m_List.put(param1.rank,param1); + } + + public function set totalNum(param1:int) : void + { + this.m_totalNum = param1; + } + + public function get length() : int + { + return this.m_List.size(); + } + + public function getItem(param1:int) : MonarchData + { + return this.m_List.getValue(param1); + } + + public function getbIndex(param1:int, param2:int) : Boolean + { + var _loc3_:* = param1 + param2; + var _loc4_:* = param1; + while(_loc4_ < _loc3_) + { + if(!this.m_List.containsKey(param1)) + { + return false; + } + _loc4_++; + } + return true; + } + + public function get hashMap() : HashMap + { + return this.m_List; + } + + public function get totalNum() : int + { + return this.m_totalNum; + } + + public function get bPast() : Boolean + { + this.m_nowTime = new Date(); + return this.m_nowTime.valueOf() >= this.m_pastTime.valueOf(); + } + + public function set pastTime(param1:Number) : void + { + this.m_nowTime = new Date(); + this.m_pastTime = new Date(); + this.m_pastTime.setTime(this.m_nowTime.valueOf() + param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/PvpData.as b/flash_decompiled/com/view/ui/ranking/data/PvpData.as new file mode 100644 index 0000000..ec22f8e --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/PvpData.as @@ -0,0 +1,110 @@ +package com.view.ui.ranking.data +{ + import com.view.ui.farm.data.Data; + + public class PvpData extends Data + { + + private var _rankId:int; + + private var _userName:String; + + private var _userId:int; + + private var _winNum:int; + + private var _rebuildNum:int; + + private var _pvpNum:int; + + private var _countryId:int; + + private var _vipLevel:int; + + public function PvpData() + { + super(); + } + + public function get rankId() : int + { + return this._rankId; + } + + public function set rankId(param1:int) : void + { + this._rankId = param1; + } + + public function get userName() : String + { + return this._userName; + } + + public function set userName(param1:String) : void + { + this._userName = param1; + } + + public function get userId() : int + { + return this._userId; + } + + public function set userId(param1:int) : void + { + this._userId = param1; + } + + public function get winNum() : int + { + return this._winNum; + } + + public function set winNum(param1:int) : void + { + this._winNum = param1; + } + + public function get rebuildNum() : int + { + return this._rebuildNum; + } + + public function set rebuildNum(param1:int) : void + { + this._rebuildNum = param1; + } + + public function get pvpNum() : int + { + return this._pvpNum; + } + + public function set pvpNum(param1:int) : void + { + this._pvpNum = param1; + } + + public function get countryId() : int + { + return this._countryId; + } + + public function set countryId(param1:int) : void + { + this._countryId = param1; + } + + public function get vipLevel() : int + { + return this._vipLevel; + } + + public function set vipLevel(param1:int) : void + { + this._vipLevel = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/PvpDataList.as b/flash_decompiled/com/view/ui/ranking/data/PvpDataList.as new file mode 100644 index 0000000..c042d78 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/PvpDataList.as @@ -0,0 +1,90 @@ +package com.view.ui.ranking.data +{ + import com.utils.HashMap; + + public class PvpDataList + { + + private var m_totalNum:int; + + private var m_List:HashMap; + + public function PvpDataList() + { + super(); + this.m_List = new HashMap(); + } + + public function getNumArray(param1:int, param2:int) : Array + { + var _loc3_:* = new Array(); + var _loc4_:* = param1 + param2; + var _loc5_:* = param1; + while(_loc5_ < _loc4_) + { + if(this.m_List.containsKey(param1)) + { + throw new Error("获取数据出错!"); + } + _loc3_.push(this.m_List.getValue(param1)); + _loc5_++; + } + return _loc3_; + } + + public function addItem(param1:PvpData) : void + { + this.m_List.put(param1.rankId,param1); + } + + public function set totalNum(param1:int) : void + { + this.m_totalNum = param1; + } + + public function get totalNum() : int + { + return this.m_totalNum; + } + + public function get length() : int + { + return this.m_List.size(); + } + + public function getItem(param1:int) : PvpData + { + return this.m_List.getValue(param1); + } + + public function getbIndex(param1:int, param2:int) : Boolean + { + var _loc3_:* = param1 + param2; + var _loc4_:* = param1; + while(_loc4_ < _loc3_) + { + if(!this.m_List.containsKey(param1)) + { + return false; + } + _loc4_++; + } + return true; + } + + public function get hashMap() : HashMap + { + return this.m_List; + } + + public function get bPast() : Boolean + { + return false; + } + + public function set pastTime(param1:Number) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/SingleBabelData.as b/flash_decompiled/com/view/ui/ranking/data/SingleBabelData.as new file mode 100644 index 0000000..11b67ec --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/SingleBabelData.as @@ -0,0 +1,135 @@ +package com.view.ui.ranking.data +{ + import com.view.ui.farm.data.Data; + + public class SingleBabelData extends Data + { + + private var _rank:int; + + private var _userName:String; + + private var _userId:int; + + private var _stageId:int; + + private var _topStageTime:String; + + private var _vipLevel:int; + + private var _heroName:String; + + private var _power:Number; + + private var _countryId:int; + + private var _govId:int; + + public function SingleBabelData() + { + super(); + this.property = ["_rank","_userName","_userId","_topStage","_topStageTime"]; + } + + public function get heroName() : String + { + return this._heroName; + } + + public function set heroName(param1:String) : void + { + this._heroName = param1; + } + + public function get power() : Number + { + return this._power; + } + + public function set power(param1:Number) : void + { + this._power = param1; + } + + public function get vipLevel() : int + { + return this._vipLevel; + } + + public function set vipLevel(param1:int) : void + { + this._vipLevel = param1; + } + + public function get rank() : int + { + return this._rank; + } + + public function set rank(param1:int) : void + { + this._rank = param1; + } + + public function get userName() : String + { + return this._userName; + } + + public function set userName(param1:String) : void + { + this._userName = param1; + } + + public function get userId() : int + { + return this._userId; + } + + public function set userId(param1:int) : void + { + this._userId = param1; + } + + public function get stageId() : int + { + return this._stageId; + } + + public function set stageId(param1:int) : void + { + this._stageId = param1; + } + + public function get topStageTime() : String + { + return this._topStageTime; + } + + public function set topStageTime(param1:String) : void + { + this._topStageTime = param1; + } + + public function get countryId() : int + { + return this._countryId; + } + + public function set countryId(param1:int) : void + { + this._countryId = param1; + } + + public function get govId() : int + { + return this._govId; + } + + public function set govId(param1:int) : void + { + this._govId = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/SingleBabelDataList.as b/flash_decompiled/com/view/ui/ranking/data/SingleBabelDataList.as new file mode 100644 index 0000000..b52fdfc --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/SingleBabelDataList.as @@ -0,0 +1,99 @@ +package com.view.ui.ranking.data +{ + import com.utils.HashMap; + + public class SingleBabelDataList + { + + private var m_List:HashMap; + + private var m_nowTime:Date; + + private var m_totalNum:int; + + private var m_pastTime:Date; + + public function SingleBabelDataList() + { + super(); + this.m_pastTime = new Date(); + this.m_List = new HashMap(); + } + + public function getNumArray(param1:int, param2:int) : Array + { + var _loc3_:* = new Array(); + var _loc4_:* = param1 + param2; + var _loc5_:* = param1; + while(_loc5_ < _loc4_) + { + if(this.m_List.containsKey(param1)) + { + throw new Error("获取数据出错!"); + } + _loc3_.push(this.m_List.getValue(param1)); + _loc5_++; + } + return _loc3_; + } + + public function addItem(param1:SingleBabelData) : void + { + this.m_List.put(param1.rank,param1); + } + + public function set totalNum(param1:int) : void + { + this.m_totalNum = param1; + } + + public function get length() : int + { + return this.m_List.size(); + } + + public function getItem(param1:int) : SingleBabelData + { + return this.m_List.getValue(param1); + } + + public function getbIndex(param1:int, param2:int) : Boolean + { + var _loc3_:* = param1 + param2; + var _loc4_:* = param1; + while(_loc4_ < _loc3_) + { + if(!this.m_List.containsKey(param1)) + { + return false; + } + _loc4_++; + } + return true; + } + + public function get hashMap() : HashMap + { + return this.m_List; + } + + public function get totalNum() : int + { + return this.m_totalNum; + } + + public function get bPast() : Boolean + { + this.m_nowTime = new Date(); + return this.m_nowTime.valueOf() >= this.m_pastTime.valueOf(); + } + + public function set pastTime(param1:Number) : void + { + this.m_nowTime = new Date(); + this.m_pastTime = new Date(); + this.m_pastTime.setTime(this.m_nowTime.valueOf() + param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/TianxiaData.as b/flash_decompiled/com/view/ui/ranking/data/TianxiaData.as new file mode 100644 index 0000000..827a2e7 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/TianxiaData.as @@ -0,0 +1,28 @@ +package com.view.ui.ranking.data +{ + public class TianxiaData + { + + public var orders:int; + + public var userName:String; + + public var rankId:int; + + public var winTimes:int; + + public var loseTimes:int; + + public var jifen:int; + + public var userId:int; + + public var level:int; + + public function TianxiaData() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/TianxiaDataList.as b/flash_decompiled/com/view/ui/ranking/data/TianxiaDataList.as new file mode 100644 index 0000000..7e5b75c --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/TianxiaDataList.as @@ -0,0 +1,54 @@ +package com.view.ui.ranking.data +{ + import com.utils.HashMap; + + public class TianxiaDataList + { + + private var m_totalNum:int; + + private var m_List:HashMap; + + public function TianxiaDataList() + { + super(); + this.m_List = new HashMap(); + } + + public function get totalNum() : int + { + return this.m_totalNum; + } + + public function set totalNum(param1:int) : void + { + this.m_totalNum = param1; + } + + public function addItem(param1:TianxiaData) : void + { + this.m_List.put(param1.rankId,param1); + } + + public function getbIndex(param1:int, param2:int) : Boolean + { + var _loc3_:* = param1 + param2; + var _loc4_:* = param1; + while(_loc4_ < _loc3_) + { + if(!this.m_List.containsKey(param1)) + { + return false; + } + _loc4_++; + } + return true; + } + + public function getItem(param1:int) : TianxiaData + { + return this.m_List.getValue(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/data/UserBigBossData.as b/flash_decompiled/com/view/ui/ranking/data/UserBigBossData.as new file mode 100644 index 0000000..cce3c6a --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/data/UserBigBossData.as @@ -0,0 +1,338 @@ +package com.view.ui.ranking.data +{ + import com.view.ui.farm.data.Data; + + public class UserBigBossData extends Data + { + + private var _rankId:int; + + private var _stageId:int; + + private var _countryId:int; + + private var _userName:String; + + private var _userId:int; + + private var _vipLevel:int; + + private var _warTime:String; + + private var _lost1:int; + + private var _lost2:int; + + private var _lost3:int; + + private var _lost4:int; + + private var _lost5:int; + + private var _lost6:int; + + private var _lost7:int; + + private var _lost8:int; + + private var _lost9:int; + + private var _lost10:int; + + private var _win1:int; + + private var _win2:int; + + private var _win3:int; + + private var _win4:int; + + private var _win5:int; + + private var _win6:int; + + private var _win7:int; + + private var _win8:int; + + private var _win9:int; + + private var _win10:int; + + public function UserBigBossData() + { + super(); + } + + public function get rankId() : int + { + return this._rankId; + } + + public function set rankId(param1:int) : void + { + this._rankId = param1; + } + + public function get stageId() : int + { + return this._stageId; + } + + public function set stageId(param1:int) : void + { + this._stageId = param1; + } + + public function get userName() : String + { + return this._userName; + } + + public function set userName(param1:String) : void + { + this._userName = param1; + } + + public function get userId() : int + { + return this._userId; + } + + public function set userId(param1:int) : void + { + this._userId = param1; + } + + public function get vipLevel() : int + { + return this._vipLevel; + } + + public function set vipLevel(param1:int) : void + { + this._vipLevel = param1; + } + + public function get warTime() : String + { + return this._warTime; + } + + public function set warTime(param1:String) : void + { + this._warTime = param1; + } + + public function get lost1() : int + { + return this._lost1; + } + + public function set lost1(param1:int) : void + { + this._lost1 = param1; + } + + public function get lost2() : int + { + return this._lost2; + } + + public function set lost2(param1:int) : void + { + this._lost2 = param1; + } + + public function get lost3() : int + { + return this._lost3; + } + + public function set lost3(param1:int) : void + { + this._lost3 = param1; + } + + public function get lost4() : int + { + return this._lost4; + } + + public function set lost4(param1:int) : void + { + this._lost4 = param1; + } + + public function get lost5() : int + { + return this._lost5; + } + + public function set lost5(param1:int) : void + { + this._lost5 = param1; + } + + public function get lost6() : int + { + return this._lost6; + } + + public function set lost6(param1:int) : void + { + this._lost6 = param1; + } + + public function get lost8() : int + { + return this._lost8; + } + + public function set lost8(param1:int) : void + { + this._lost8 = param1; + } + + public function get lost7() : int + { + return this._lost7; + } + + public function set lost7(param1:int) : void + { + this._lost7 = param1; + } + + public function get lost9() : int + { + return this._lost9; + } + + public function set lost9(param1:int) : void + { + this._lost9 = param1; + } + + public function get lost10() : int + { + return this._lost10; + } + + public function set lost10(param1:int) : void + { + this._lost10 = param1; + } + + public function get win1() : int + { + return this._win1; + } + + public function set win1(param1:int) : void + { + this._win1 = param1; + } + + public function get win2() : int + { + return this._win2; + } + + public function set win2(param1:int) : void + { + this._win2 = param1; + } + + public function get win3() : int + { + return this._win3; + } + + public function set win3(param1:int) : void + { + this._win3 = param1; + } + + public function get win4() : int + { + return this._win4; + } + + public function set win4(param1:int) : void + { + this._win4 = param1; + } + + public function get win5() : int + { + return this._win5; + } + + public function set win5(param1:int) : void + { + this._win5 = param1; + } + + public function get win6() : int + { + return this._win6; + } + + public function set win6(param1:int) : void + { + this._win6 = param1; + } + + public function get win7() : int + { + return this._win7; + } + + public function set win7(param1:int) : void + { + this._win7 = param1; + } + + public function get win8() : int + { + return this._win8; + } + + public function set win8(param1:int) : void + { + this._win8 = param1; + } + + public function get win9() : int + { + return this._win9; + } + + public function set win9(param1:int) : void + { + this._win9 = param1; + } + + public function get win10() : int + { + return this._win10; + } + + public function set win10(param1:int) : void + { + this._win10 = param1; + } + + public function get countryId() : int + { + return this._countryId; + } + + public function set countryId(param1:int) : void + { + this._countryId = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/mc/BabelRankMc.as b/flash_decompiled/com/view/ui/ranking/mc/BabelRankMc.as new file mode 100644 index 0000000..22a8d6c --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/mc/BabelRankMc.as @@ -0,0 +1,255 @@ +package com.view.ui.ranking.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.Control; + import com.view.UIListManage; + import com.view.newui.UIConfig; + import com.view.tip.TipTitle; + import com.view.ui.mail.MailUI; + import com.view.ui.ranking.data.BabelData; + import com.view.world.ui.CastleUserUI; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BabelRankMc 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 css:TextFormat; + + public var viewBtn:SimpleButton; + + public var talkBtn:SimpleButton; + + public var mailBtn:SimpleButton; + + private var face:InstallFace = InstallFace.getInstance(); + + private var countryMc:MovieClip; + + private var govMc:MovieClip; + + private var vipMc:MovieClip; + + private var isSelf:Boolean; + + private var obj:BabelData; + + public var defaultRank:int; + + public function BabelRankMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,624,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,624,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.govMc = this.face.getMovieClip(ClassConfig.LIB_CUNTRY_5); + this.govMc.gotoAndStop(1); + this.vipMc = this.face.getMovieClip(ClassConfig.lib_ui_vipmc); + this.vipMc.gotoAndStop(2); + this.vipMc.visible = false; + this.countryMc = this.face.getMovieClip(ClassConfig.lib_country); + this.countryMc.gotoAndStop(1); + this.countryMc.visible = false; + this.value1 = PublicMethod.getTextFieldWithFillter(16777215,45); + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,110); + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,109); + this.value4 = PublicMethod.getTextFieldWithFillter(16777215,140); + addChild(this.value1); + addChild(this.govMc); + addChild(this.countryMc); + addChild(this.vipMc); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + this.value2.mouseEnabled = true; + this.value2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.value1.x = 0; + this.value1.y = 4; + this.govMc.x = 48; + this.govMc.y = 4; + this.countryMc.x = 76; + this.countryMc.y = 3; + this.vipMc.x = 96; + this.vipMc.y = 7; + this.value2.x = this.vipMc.x + this.vipMc.width + 6; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.viewBtn = this.face.getButton(ClassConfig.lib_ui_view); + this.talkBtn = this.face.getButton(ClassConfig.lib_ui_talk); + this.mailBtn = this.face.getButton(ClassConfig.lib_ui_mail); + addChild(this.viewBtn); + addChild(this.talkBtn); + addChild(this.mailBtn); + this.viewBtn.x = this.value4.x + this.value4.width + 20; + this.viewBtn.y = 3; + this.talkBtn.x = this.viewBtn.x + 30; + this.talkBtn.y = 5; + this.mailBtn.x = this.talkBtn.x + 30; + this.mailBtn.y = 6; + new TipTitle(this.viewBtn,this.face.stage,this.face.tip_bg,{"titletext":"查看信息"}); + new TipTitle(this.talkBtn,this.face.stage,this.face.tip_bg,{"titletext":"私聊"}); + new TipTitle(this.mailBtn,this.face.stage,this.face.tip_bg,{"titletext":"发送邮件"}); + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.viewBtn.addEventListener(MouseEvent.CLICK,this.showFriendInfo); + this.talkBtn.addEventListener(MouseEvent.CLICK,this.siliao); + this.mailBtn.addEventListener(MouseEvent.CLICK,this.sendMail); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = true; + } + } + + public function setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 0) + { + _loc2_.color = 16771584; + } + else if(param1 == 1) + { + _loc2_.color = 16743936; + } + else if(param1 == 2) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + } + + public function setDate(param1:BabelData) : void + { + var _loc2_:Date = null; + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.countryMc.visible = false; + this.vipMc.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.vipMc.gotoAndStop(1); + this.govMc.gotoAndStop(1); + this.bg2.visible = false; + return; + } + this.value1.text = this.obj.rank.toString(); + _loc2_ = this.obj.topStageTime as Date; + this.value2.htmlText = "" + this.obj.userName + ""; + this.value3.text = this.obj.topStage; + if(this.obj.topStageTime) + { + this.value4.text = this.obj.topStageTime; + } + else + { + this.value4.text = ""; + } + this.vipMc.visible = true; + this.countryMc.gotoAndStop(this.obj.countryId); + this.countryMc.visible = true; + this.viewBtn.visible = true; + this.talkBtn.visible = true; + this.mailBtn.visible = true; + if(this.obj.rank == this.defaultRank) + { + this.isSelf = true; + this.bg2.visible = true; + this.bg1.visible = false; + } + else + { + this.isSelf = false; + this.bg2.visible = false; + this.bg1.visible = false; + } + this.govMc.gotoAndStop(this.obj.govId + 1); + this.vipMc.gotoAndStop(this.obj.vipLevel + 1); + } + + private function showFriendInfo(param1:MouseEvent) : void + { + var _loc2_:CastleUserUI = CastleUserUI.getInstance(); + _loc2_.show(); + _loc2_.updateByUserName(this.obj.userName); + } + + private function siliao(param1:MouseEvent) : void + { + Control.getInstance().chatMainUI.talkToUser(this.obj.userName); + UIListManage.getInstance().clearAll(); + } + + private function sendMail(param1:MouseEvent) : void + { + var _loc2_:MailUI = MailUI.getInstance(); + _loc2_.setStartPage(2); + _loc2_.setReceiveName(this.obj.userName); + _loc2_.show(); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/mc/BigBossRankMc.as b/flash_decompiled/com/view/ui/ranking/mc/BigBossRankMc.as new file mode 100644 index 0000000..89df416 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/mc/BigBossRankMc.as @@ -0,0 +1,240 @@ +package com.view.ui.ranking.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.Control; + import com.view.UIListManage; + import com.view.ui.mail.MailUI; + import com.view.ui.ranking.data.UserBigBossData; + import com.view.world.ui.CastleUserUI; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BigBossRankMc 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 css:TextFormat; + + public var viewBtn:SimpleButton; + + public var talkBtn:SimpleButton; + + public var mailBtn:SimpleButton; + + private var face:InstallFace = InstallFace.getInstance(); + + private var countryMc:MovieClip; + + private var govMc:MovieClip; + + private var vipMc:MovieClip; + + private var isSelf:Boolean; + + private var obj:UserBigBossData; + + public var defaultRank:int; + + public function BigBossRankMc() + { + super(); + this.bg1 = PublicMethod.createShape(6378823,624,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(13382604,624,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.countryMc = this.face.getMovieClip(ClassConfig.lib_country); + this.countryMc.gotoAndStop(1); + this.countryMc.visible = false; + this.value1 = PublicMethod.getTextField(16777215,50); + this.value2 = PublicMethod.getTextField(16777215,107); + this.value2.mouseEnabled = true; + this.value2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govMc = this.face.getMovieClip(ClassConfig.LIB_CUNTRY_5); + this.govMc.gotoAndStop(1); + this.vipMc = this.face.getMovieClip(ClassConfig.lib_ui_vipmc); + this.vipMc.gotoAndStop(2); + this.vipMc.visible = false; + this.value3 = PublicMethod.getTextField(16777215,110); + this.value4 = PublicMethod.getTextField(16777215,127); + this.value5 = PublicMethod.getTextField(16777215,150); + addChild(this.value1); + addChild(this.govMc); + addChild(this.countryMc); + addChild(this.vipMc); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + this.value1.x = 0; + this.value1.y = 4; + this.govMc.x = 48; + this.govMc.y = 4; + this.countryMc.x = 76; + this.countryMc.y = 3; + this.vipMc.x = 96; + this.vipMc.y = 7; + this.value2.x = 127; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + this.viewBtn = this.face.getButton(ClassConfig.lib_ui_view); + this.talkBtn = this.face.getButton(ClassConfig.lib_ui_talk); + this.mailBtn = this.face.getButton(ClassConfig.lib_ui_mail); + addChild(this.viewBtn); + addChild(this.talkBtn); + addChild(this.mailBtn); + this.viewBtn.x = this.value5.x + 110; + this.viewBtn.y = 3; + this.talkBtn.x = this.viewBtn.x + 30; + this.talkBtn.y = 5; + this.mailBtn.x = this.talkBtn.x + 30; + this.mailBtn.y = 6; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + } + + public function setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 0) + { + _loc2_.color = 16771584; + } + else if(param1 == 1) + { + _loc2_.color = 16743936; + } + else if(param1 == 2) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + this.value5.setTextFormat(_loc2_); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = true; + } + } + + public function setDate(param1:UserBigBossData) : void + { + var _loc2_:int = 0; + var _loc3_:String = null; + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.countryMc.visible = false; + this.vipMc.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.vipMc.gotoAndStop(1); + this.govMc.gotoAndStop(1); + this.bg2.visible = false; + return; + } + this.value1.text = this.obj.rankId.toString(); + this.value2.htmlText = "" + this.obj.userName + ""; + this.vipMc.visible = true; + _loc2_ = this.obj.stageId; + if(_loc2_ == 0) + { + _loc2_ = 1; + } + this.value3.text = _loc2_ + ""; + this.countryMc.visible = true; + _loc3_ = "" + this.obj["win" + _loc2_] + "" + this.obj["lost" + _loc2_] + " 负"; + this.value4.htmlText = _loc3_; + this.value5.text = this.obj.warTime == null ? "" : this.obj.warTime; + this.countryMc.gotoAndStop(this.obj.countryId); + this.vipMc.gotoAndStop(this.obj.vipLevel + 1); + } + + private function showFriendInfo(param1:MouseEvent) : void + { + var _loc2_:CastleUserUI = CastleUserUI.getInstance(); + _loc2_.show(); + _loc2_.updateByUserName(this.obj.userName); + } + + private function siliao(param1:MouseEvent) : void + { + Control.getInstance().chatMainUI.talkToUser(this.obj.userName); + UIListManage.getInstance().clearAll(); + } + + private function sendMail(param1:MouseEvent) : void + { + var _loc2_:MailUI = MailUI.getInstance(); + _loc2_.setStartPage(2); + _loc2_.setReceiveName(this.obj.userName); + _loc2_.show(); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/mc/GuildRankMc.as b/flash_decompiled/com/view/ui/ranking/mc/GuildRankMc.as new file mode 100644 index 0000000..4468b02 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/mc/GuildRankMc.as @@ -0,0 +1,237 @@ +package com.view.ui.ranking.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.newui.UISmallBtn; + import com.view.ui.ranking.data.LeagueData; + import com.view.world.ui.CastleUserUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GuildRankMc 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 value6:TextField; + + private var value7:TextField; + + private var css:TextFormat; + + public var viewBtn:UISmallBtn; + + private var face:InstallFace = InstallFace.getInstance(); + + private var countryMc:MovieClip; + + private var govMc:MovieClip; + + private var vipMc:MovieClip; + + private var isSelf:Boolean; + + private var obj:LeagueData; + + public var defaultRank:int; + + public var viewGuildF:Function; + + public function GuildRankMc() + { + super(); + this.bg1 = PublicMethod.createShape(6378823,624,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(13382604,624,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.govMc = this.face.getMovieClip(ClassConfig.LIB_CUNTRY_5); + this.govMc.gotoAndStop(1); + this.vipMc = this.face.getMovieClip(ClassConfig.lib_ui_vipmc); + this.vipMc.gotoAndStop(2); + this.vipMc.visible = false; + this.countryMc = this.face.getMovieClip(ClassConfig.lib_country); + this.countryMc.gotoAndStop(1); + this.countryMc.visible = false; + this.value1 = PublicMethod.getTextFieldWithFillter(16777215,45); + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,100); + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,101); + this.value4 = PublicMethod.getTextFieldWithFillter(16777215,52); + this.value5 = PublicMethod.getTextFieldWithFillter(16777215,54); + this.value6 = PublicMethod.getTextFieldWithFillter(16777215,63); + this.value7 = PublicMethod.getTextFieldWithFillter(16777215,52); + addChild(this.value1); + addChild(this.countryMc); + addChild(this.value2); + addChild(this.govMc); + addChild(this.vipMc); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + addChild(this.value6); + addChild(this.value7); + this.value3.mouseEnabled = true; + this.value3.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.value1.x = 0; + this.value1.y = 4; + this.countryMc.x = 46; + this.countryMc.y = 3; + this.value2.x = 64; + this.value2.y = this.value1.y; + this.govMc.x = this.value2.x + this.value2.width + 2; + this.govMc.y = 4; + this.vipMc.x = this.govMc.x + 26; + this.vipMc.y = 7; + this.value3.x = this.value2.x + this.value2.width + 58; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.value6.x = this.value5.x + this.value5.width; + this.value6.y = this.value1.y; + this.value7.x = this.value6.x + this.value6.width; + this.value7.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value2.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + this.value6.defaultTextFormat = this.css; + this.value7.defaultTextFormat = this.css; + this.viewBtn = new UISmallBtn("查 看",2); + addChild(this.viewBtn); + this.viewBtn.x = this.value7.x + this.value7.width + 15; + this.viewBtn.y = 3; + this.viewBtn.visible = false; + this.viewBtn.onClick = this.showGuildInfo; + } + + public function setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 0) + { + _loc2_.color = 16771584; + } + else if(param1 == 1) + { + _loc2_.color = 16743936; + } + else if(param1 == 2) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + this.value5.setTextFormat(_loc2_); + this.value6.setTextFormat(_loc2_); + this.value7.setTextFormat(_loc2_); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = true; + } + } + + public function setDate(param1:LeagueData) : void + { + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.viewBtn.visible = false; + this.countryMc.visible = false; + this.vipMc.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.value6.text = ""; + this.value7.text = ""; + this.vipMc.gotoAndStop(1); + this.govMc.gotoAndStop(1); + this.bg2.visible = false; + return; + } + this.value1.text = this.obj.rank.toString(); + this.value2.text = this.obj.guildName; + this.value3.htmlText = "" + this.obj.leader + ""; + this.value4.text = this.obj.level.toString(); + this.value5.text = this.obj.memberNumber.toString(); + this.countryMc.gotoAndStop(this.obj.countryId); + this.vipMc.visible = true; + this.countryMc.visible = true; + this.value6.text = this.obj.repute.toString(); + this.value7.text = this.obj.shireNum.toString(); + this.viewBtn.visible = true; + if(this.obj.rank == this.defaultRank) + { + this.isSelf = true; + this.bg2.visible = true; + this.bg1.visible = false; + } + else + { + this.isSelf = false; + this.bg2.visible = false; + this.bg1.visible = false; + } + this.govMc.gotoAndStop(this.obj.govId + 1); + this.vipMc.gotoAndStop(this.obj.vipLevel + 1); + } + + private function showGuildInfo(param1:MouseEvent) : void + { + if(this.viewGuildF != null) + { + this.viewGuildF(this.obj.guildId); + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/mc/LeagueRankMc.as b/flash_decompiled/com/view/ui/ranking/mc/LeagueRankMc.as new file mode 100644 index 0000000..3de5564 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/mc/LeagueRankMc.as @@ -0,0 +1,196 @@ +package com.view.ui.ranking.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.ui.ranking.data.BattlesData; + import com.view.world.ui.CastleUserUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class LeagueRankMc 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 css:TextFormat; + + private var face:InstallFace = InstallFace.getInstance(); + + private var countryMc:MovieClip; + + private var govMc:MovieClip; + + private var vipMc:MovieClip; + + private var isSelf:Boolean; + + private var obj:BattlesData; + + public var defaultRank:int; + + public function LeagueRankMc() + { + super(); + this.bg1 = PublicMethod.createShape(6378823,624,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(13382604,624,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.govMc = this.face.getMovieClip(ClassConfig.LIB_CUNTRY_5); + this.govMc.gotoAndStop(1); + this.vipMc = this.face.getMovieClip(ClassConfig.lib_ui_vipmc); + this.vipMc.gotoAndStop(2); + this.vipMc.visible = false; + this.countryMc = this.face.getMovieClip(ClassConfig.lib_country); + this.countryMc.gotoAndStop(1); + this.countryMc.visible = false; + this.value1 = PublicMethod.getTextFieldWithFillter(16777215,45); + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,113); + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,123); + this.value4 = PublicMethod.getTextFieldWithFillter(16777215,130); + this.value5 = PublicMethod.getTextFieldWithFillter(16777215,130); + addChild(this.value1); + addChild(this.govMc); + addChild(this.countryMc); + addChild(this.vipMc); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + this.value2.mouseEnabled = true; + this.value2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.value1.x = 0; + this.value1.y = 4; + this.govMc.x = 48; + this.govMc.y = 4; + this.countryMc.x = 76; + this.countryMc.y = 3; + this.vipMc.x = 96; + this.vipMc.y = 7; + this.value2.x = this.vipMc.x + this.vipMc.width + 6; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + } + + public function setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 0) + { + _loc2_.color = 16771584; + } + else if(param1 == 1) + { + _loc2_.color = 16743936; + } + else if(param1 == 2) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + this.value5.setTextFormat(_loc2_); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = true; + } + } + + public function setDate(param1:BattlesData) : void + { + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.vipMc.visible = false; + this.countryMc.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.vipMc.gotoAndStop(1); + this.govMc.gotoAndStop(1); + this.bg2.visible = false; + return; + } + this.value1.text = this.obj.rank.toString(); + this.value2.htmlText = "" + this.obj.userName + ""; + this.vipMc.visible = true; + this.value3.text = this.obj.winNum.toString(); + this.value4.text = this.obj.loseNum.toString(); + this.value5.text = this.obj.integral.toString(); + this.countryMc.gotoAndStop(this.obj.countryId); + this.countryMc.visible = true; + if(this.obj.rank == this.defaultRank) + { + this.isSelf = true; + this.bg2.visible = true; + this.bg1.visible = false; + } + else + { + this.isSelf = false; + this.bg2.visible = false; + this.bg1.visible = false; + } + this.govMc.gotoAndStop(this.obj.govId + 1); + this.vipMc.gotoAndStop(this.obj.vipLevel + 1); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/mc/OtherUserEquView.as b/flash_decompiled/com/view/ui/ranking/mc/OtherUserEquView.as new file mode 100644 index 0000000..c09ad7f --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/mc/OtherUserEquView.as @@ -0,0 +1,451 @@ +package com.view.ui.ranking.mc +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class OtherUserEquView extends Sprite + { + + private var loadImg:LoadResource; + + private var bodyImg:Bitmap; + + private var url:String; + + private var bodySp:Sprite; + + private var sex:int; + + private var img1:Bitmap; + + private var img2:Bitmap; + + private var img3:Bitmap; + + private var img4:Bitmap; + + private var sp1:Sprite; + + private var sp2:Sprite; + + private var sp3:Sprite; + + private var sp4:Sprite; + + private var obj1:Object; + + private var obj2:Object; + + private var obj3:Object; + + private var obj4:Object; + + private var loadItemPng1:LoadResource; + + private var loadItemPng2:LoadResource; + + private var loadItemPng3:LoadResource; + + private var loadItemPng4:LoadResource; + + private var url1:String; + + private var url2:String; + + private var url3:String; + + private var url4:String; + + public function OtherUserEquView() + { + super(); + this.sp2 = new Sprite(); + addChild(this.sp2); + this.bodySp = new Sprite(); + addChild(this.bodySp); + this.sp3 = new Sprite(); + addChild(this.sp3); + this.sp1 = new Sprite(); + addChild(this.sp1); + this.sp4 = new Sprite(); + addChild(this.sp4); + this.sp1.mouseEnabled = false; + this.sp2.mouseEnabled = false; + this.sp3.mouseEnabled = false; + this.sp4.mouseEnabled = false; + this.sp1.mouseChildren = false; + this.sp2.mouseChildren = false; + this.sp3.mouseChildren = false; + this.sp4.mouseChildren = false; + mouseEnabled = false; + } + + private function loadBodyBg(param1:String) : void + { + if(this.url == param1) + { + return; + } + this.url = param1; + if(Boolean(this.bodyImg) && this.bodySp.contains(this.bodyImg)) + { + this.bodySp.removeChild(this.bodyImg); + } + if(ImgCache.getInstance().getImg(this.url)) + { + this.bodyImg = new Bitmap(); + this.bodyImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadImg = new LoadResource(this.url,this.loadImgBack); + } + } + + private function loadImgBack(param1:Event) : void + { + this.bodyImg = param1.target.loader.content; + this.setImgValue(); + this.loadImg.clear(); + } + + private function setImgValue() : void + { + this.bodySp.addChild(this.bodyImg); + if(this.sex == 1) + { + this.bodyImg.width = 108; + this.bodyImg.height = 186; + } + else + { + this.bodyImg.width = 100; + this.bodyImg.height = 191; + } + } + + public function setUserSex(param1:int) : void + { + var _loc2_:String = null; + this.sex = param1; + if(this.sex == 1) + { + _loc2_ = "pic/king/manRole.png"; + } + else + { + _loc2_ = "pic/king/womenRole.png"; + } + if(this.sex == 1) + { + this.bodySp.x = 17; + this.bodySp.y = 12; + this.sp1.x = -1; + this.sp1.y = 128; + this.sp2.x = -69; + this.sp2.y = -8; + this.sp3.x = 1; + this.sp3.y = 14; + this.sp4.x = 38; + this.sp4.y = -18; + } + else + { + this.bodySp.x = 25; + this.bodySp.y = 12; + this.sp1.x = 9; + this.sp1.y = 128; + this.sp2.x = -68; + this.sp2.y = -22; + this.sp3.x = 13; + this.sp3.y = 19; + this.sp4.x = 33; + this.sp4.y = -16; + } + this.loadBodyBg(_loc2_); + } + + public function setAsset(param1:int, param2:Object) : void + { + var _loc3_:String = null; + if(param1 == 5) + { + this.obj1 = param2; + if(param2 == null) + { + this.url1 = ""; + if(Boolean(this.img1) && this.sp1.contains(this.img1)) + { + this.sp1.removeChild(this.img1); + } + } + else + { + _loc3_ = PublicMethod.getAssetUrl(this.sex,param2.color,param1); + if(this.url1 == _loc3_) + { + return; + } + if(Boolean(this.img1) && this.sp1.contains(this.img1)) + { + this.sp1.removeChild(this.img1); + } + this.url1 = _loc3_; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.img1 = new Bitmap(); + this.img1.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + this.sp1.addChild(this.img1); + if(this.sex == 1) + { + this.img1.width = 117; + this.img1.height = 77; + } + else + { + this.img1.width = 100; + this.img1.height = 92; + } + } + else + { + this.loadItemPng1 = new LoadResource(_loc3_,this.loadPngBack1); + } + } + } + if(param1 == 6) + { + this.obj2 = param2; + if(param2 == null) + { + this.url2 = ""; + if(Boolean(this.img2) && this.sp2.contains(this.img2)) + { + this.sp2.removeChild(this.img2); + } + } + else + { + _loc3_ = PublicMethod.getAssetUrl(this.sex,param2.color,param1); + if(this.url2 == _loc3_) + { + return; + } + if(Boolean(this.img2) && this.sp2.contains(this.img2)) + { + this.sp2.removeChild(this.img2); + } + this.url2 = _loc3_; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.img2 = new Bitmap(); + this.img2.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + this.sp2.addChild(this.img2); + if(this.sex == 1) + { + this.img2.width = 187; + this.img2.height = 221; + } + else + { + this.img2.width = 203; + this.img2.height = 232; + } + } + else + { + this.loadItemPng2 = new LoadResource(_loc3_,this.loadPngBack2); + } + } + } + if(param1 == 7) + { + this.obj3 = param2; + if(param2 == null) + { + this.url3 = ""; + if(Boolean(this.img3) && this.sp3.contains(this.img3)) + { + this.sp3.removeChild(this.img3); + } + } + else + { + _loc3_ = PublicMethod.getAssetUrl(this.sex,param2.color,param1); + if(this.url3 == _loc3_) + { + return; + } + if(Boolean(this.img3) && this.sp3.contains(this.img3)) + { + this.sp3.removeChild(this.img3); + } + this.url3 = _loc3_; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.img3 = new Bitmap(); + this.img3.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + this.sp3.addChild(this.img3); + if(this.sex == 1) + { + this.img3.width = 133; + this.img3.height = 173; + } + else + { + this.img3.width = 121; + this.img3.height = 175; + } + } + else + { + this.loadItemPng3 = new LoadResource(_loc3_,this.loadPngBack3); + } + } + } + if(param1 == 8) + { + this.obj4 = param2; + if(param2 == null) + { + this.url4 = ""; + if(Boolean(this.img4) && this.sp4.contains(this.img4)) + { + this.sp4.removeChild(this.img4); + } + } + else + { + _loc3_ = PublicMethod.getAssetUrl(this.sex,param2.color,param1); + if(this.url4 == _loc3_) + { + return; + } + if(Boolean(this.img4) && this.sp4.contains(this.img4)) + { + this.sp4.removeChild(this.img4); + } + this.url4 = _loc3_; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.img4 = new Bitmap(); + this.img4.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + if(this.sex == 1) + { + this.img4.width = 48; + this.img4.height = 62; + } + else + { + this.img4.width = 57; + this.img4.height = 70; + } + this.sp4.addChild(this.img4); + } + else + { + this.loadItemPng4 = new LoadResource(_loc3_,this.loadPngBack4); + } + } + } + } + + private function loadPngBack1(param1:Event) : void + { + if(this.obj1 == null) + { + this.url1 = ""; + return; + } + this.img1 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng1.url,this.img1); + this.sp1.addChild(this.img1); + if(this.sex == 1) + { + this.img1.width = 117; + this.img1.height = 77; + } + else + { + this.img1.width = 100; + this.img1.height = 92; + } + this.loadItemPng1.clear(); + } + + private function loadPngBack2(param1:Event) : void + { + if(this.obj2 == null) + { + this.url2 = ""; + return; + } + this.img2 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng2.url,this.img2); + this.sp2.addChild(this.img2); + if(this.sex == 1) + { + this.img2.width = 187; + this.img2.height = 221; + } + else + { + this.img2.width = 203; + this.img2.height = 232; + } + this.loadItemPng2.clear(); + } + + private function loadPngBack3(param1:Event) : void + { + if(this.obj3 == null) + { + this.url3 = ""; + return; + } + this.img3 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng3.url,this.img3); + this.sp3.addChild(this.img3); + if(this.sex == 1) + { + this.img3.width = 133; + this.img3.height = 173; + } + else + { + this.img3.width = 121; + this.img3.height = 175; + } + this.loadItemPng3.clear(); + } + + private function loadPngBack4(param1:Event) : void + { + if(this.obj4 == null) + { + this.url4 = ""; + return; + } + this.img4 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng4.url,this.img4); + this.sp4.addChild(this.img4); + if(this.sex == 1) + { + this.img4.width = 48; + this.img4.height = 62; + } + else + { + this.img4.width = 57; + this.img4.height = 70; + } + this.loadItemPng4.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/mc/OtherUserEquipBg.as b/flash_decompiled/com/view/ui/ranking/mc/OtherUserEquipBg.as new file mode 100644 index 0000000..c7dfd29 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/mc/OtherUserEquipBg.as @@ -0,0 +1,176 @@ +package com.view.ui.ranking.mc +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.newui.UIConfig; + import com.view.tip.KingItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class OtherUserEquipBg extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var equipName:String; + + private var bgClass:String; + + public var type:int; + + private var bg:Sprite; + + private var nameText:TextField; + + private var obj:Object; + + private var itemMc:Sprite; + + private var levelText:TextField; + + private var itemTip:KingItemTip; + + private var url:String; + + private var loadItemPng:LoadResource; + + private var itemImg:Bitmap; + + public function OtherUserEquipBg(param1:int) + { + super(); + this.type = param1; + this.bgClass = "lib_eq_" + this.type; + this.bg = new Sprite(); + var _loc2_:Bitmap = new Bitmap(this.face.getPng(this.bgClass)); + _loc2_.width = 45; + _loc2_.height = 46; + this.bg.addChild(_loc2_); + addChild(this.bg); + switch(this.type) + { + case 1: + this.equipName = "护符"; + break; + case 2: + this.equipName = "戒指"; + break; + case 3: + this.equipName = "腰带"; + break; + case 4: + this.equipName = "项链"; + break; + case 5: + this.equipName = "鞋子"; + break; + case 6: + this.equipName = "武器"; + break; + case 7: + this.equipName = "衣服"; + break; + case 8: + this.equipName = "头盔"; + } + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,30); + this.nameText.text = this.equipName; + this.bg.addChild(this.nameText); + this.nameText.x = 9; + this.nameText.y = 15; + if(this.type < 5) + { + this.bg.x = 205; + this.bg.y = 234 - this.type * 56; + } + else + { + this.bg.x = 8; + this.bg.y = 234 - (this.type - 4) * 56; + } + this.itemMc = new Sprite(); + this.levelText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,26); + this.bg.addChild(this.itemMc); + this.itemMc.x = 1; + this.itemMc.y = 1; + this.bg.addChild(this.levelText); + this.levelText.x = 22; + this.levelText.y = 28; + } + + public function getObj() : Object + { + return this.obj; + } + + public function setItemObj(param1:Object) : void + { + this.obj = param1; + if(Boolean(this.itemImg) && this.itemMc.contains(this.itemImg)) + { + this.itemMc.removeChild(this.itemImg); + this.levelText.text = ""; + } + if(this.obj == null) + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + return; + } + this.levelText.text = "+" + this.obj.itemLevel; + this.url = ServerConfig.IMAGE_ITEM_URL + this.obj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.itemImg.width = 43; + this.itemImg.height = 43; + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(this.url,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + if(this.obj == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemMc.addChild(this.itemImg); + this.itemImg.width = 44; + this.itemImg.height = 44; + var _loc1_:PackItem = new PackItem(null); + _loc1_.viewMap = this.obj.viewMap; + _loc1_.level = this.obj.level; + _loc1_.currDesc = this.obj.currDesc; + if(this.itemTip == null) + { + this.itemTip = new KingItemTip(this.itemMc,this.face.stage,this.face.tip_bg,_loc1_); + } + else + { + this.itemTip.setTipData(_loc1_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/mc/PvpRankMc.as b/flash_decompiled/com/view/ui/ranking/mc/PvpRankMc.as new file mode 100644 index 0000000..2c769fb --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/mc/PvpRankMc.as @@ -0,0 +1,232 @@ +package com.view.ui.ranking.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.Control; + import com.view.UIListManage; + import com.view.ui.mail.MailUI; + import com.view.ui.ranking.data.PvpData; + import com.view.world.ui.CastleUserUI; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class PvpRankMc 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 css:TextFormat; + + public var viewBtn:SimpleButton; + + public var talkBtn:SimpleButton; + + public var mailBtn:SimpleButton; + + private var face:InstallFace = InstallFace.getInstance(); + + private var countryMc:MovieClip; + + private var govMc:MovieClip; + + private var vipMc:MovieClip; + + private var isSelf:Boolean; + + private var obj:PvpData; + + public var defaultRank:int; + + public function PvpRankMc() + { + super(); + this.bg1 = PublicMethod.createShape(6378823,624,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(13382604,624,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.countryMc = this.face.getMovieClip(ClassConfig.lib_country); + this.countryMc.gotoAndStop(1); + this.countryMc.visible = false; + this.value1 = PublicMethod.getTextField(16777215,50); + this.value2 = PublicMethod.getTextField(16777215,108); + this.value2.mouseEnabled = true; + this.value2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govMc = this.face.getMovieClip(ClassConfig.LIB_CUNTRY_5); + this.govMc.gotoAndStop(1); + this.vipMc = this.face.getMovieClip(ClassConfig.lib_ui_vipmc); + this.vipMc.gotoAndStop(2); + this.vipMc.visible = false; + this.value3 = PublicMethod.getTextField(16777215,110); + this.value4 = PublicMethod.getTextField(16777215,127); + this.value5 = PublicMethod.getTextField(16777215,150); + addChild(this.value1); + addChild(this.govMc); + addChild(this.countryMc); + addChild(this.vipMc); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + this.value1.x = 0; + this.value1.y = 4; + this.govMc.x = 48; + this.govMc.y = 4; + this.countryMc.x = 76; + this.countryMc.y = 3; + this.vipMc.x = 96; + this.vipMc.y = 7; + this.value2.x = 127; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + this.viewBtn = this.face.getButton(ClassConfig.lib_ui_view); + this.talkBtn = this.face.getButton(ClassConfig.lib_ui_talk); + this.mailBtn = this.face.getButton(ClassConfig.lib_ui_mail); + addChild(this.viewBtn); + addChild(this.talkBtn); + addChild(this.mailBtn); + this.viewBtn.x = this.value5.x + 110; + this.viewBtn.y = 3; + this.talkBtn.x = this.viewBtn.x + 30; + this.talkBtn.y = 5; + this.mailBtn.x = this.talkBtn.x + 30; + this.mailBtn.y = 6; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = true; + } + } + + public function setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 0) + { + _loc2_.color = 16771584; + } + else if(param1 == 1) + { + _loc2_.color = 16743936; + } + else if(param1 == 2) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + this.value5.setTextFormat(_loc2_); + } + + public function setDate(param1:PvpData) : void + { + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.countryMc.visible = false; + this.vipMc.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.vipMc.gotoAndStop(1); + this.govMc.gotoAndStop(1); + this.bg2.visible = false; + return; + } + this.value1.text = this.obj.rankId.toString(); + this.value2.htmlText = "" + this.obj.userName + ""; + this.vipMc.visible = true; + this.value3.text = this.obj.pvpNum + ""; + this.value4.text = this.obj.winNum + ""; + this.value5.text = this.obj.rebuildNum + ""; + this.countryMc.visible = true; + this.countryMc.gotoAndStop(this.obj.countryId); + this.vipMc.gotoAndStop(this.obj.vipLevel + 1); + } + + private function showFriendInfo(param1:MouseEvent) : void + { + var _loc2_:CastleUserUI = CastleUserUI.getInstance(); + _loc2_.show(); + _loc2_.updateByUserName(this.obj.userName); + } + + private function siliao(param1:MouseEvent) : void + { + Control.getInstance().chatMainUI.talkToUser(this.obj.userName); + UIListManage.getInstance().clearAll(); + } + + private function sendMail(param1:MouseEvent) : void + { + var _loc2_:MailUI = MailUI.getInstance(); + _loc2_.setStartPage(2); + _loc2_.setReceiveName(this.obj.userName); + _loc2_.show(); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/mc/SingleBabelRankMc.as b/flash_decompiled/com/view/ui/ranking/mc/SingleBabelRankMc.as new file mode 100644 index 0000000..f986884 --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/mc/SingleBabelRankMc.as @@ -0,0 +1,242 @@ +package com.view.ui.ranking.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.ui.ranking.data.SingleBabelData; + import com.view.world.ui.CastleUserUI; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SingleBabelRankMc 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 value6:TextField; + + private var css:TextFormat; + + public var viewBtn:SimpleButton; + + public var talkBtn:SimpleButton; + + public var mailBtn:SimpleButton; + + private var face:InstallFace = InstallFace.getInstance(); + + private var countryMc:MovieClip; + + private var govMc:MovieClip; + + private var vipMc:MovieClip; + + private var isSelf:Boolean; + + private var obj:SingleBabelData; + + public var defaultRank:int; + + public function SingleBabelRankMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,624,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,624,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.govMc = this.face.getMovieClip(ClassConfig.LIB_CUNTRY_5); + this.govMc.gotoAndStop(1); + this.vipMc = this.face.getMovieClip(ClassConfig.lib_ui_vipmc); + this.vipMc.gotoAndStop(2); + this.vipMc.visible = false; + this.countryMc = this.face.getMovieClip(ClassConfig.lib_country); + this.countryMc.gotoAndStop(1); + this.countryMc.visible = false; + this.value1 = PublicMethod.getTextFieldWithFillter(16777215,45); + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,110); + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,90); + this.value4 = PublicMethod.getTextFieldWithFillter(16777215,92); + this.value5 = PublicMethod.getTextFieldWithFillter(16777215,82); + this.value6 = PublicMethod.getTextFieldWithFillter(16777215,125); + addChild(this.value1); + addChild(this.govMc); + addChild(this.countryMc); + addChild(this.vipMc); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + addChild(this.value6); + this.value2.mouseEnabled = true; + this.value2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.value1.x = 0; + this.value1.y = 4; + this.govMc.x = 48; + this.govMc.y = 4; + this.countryMc.x = 76; + this.countryMc.y = 3; + this.vipMc.x = 96; + this.vipMc.y = 7; + this.value2.x = this.vipMc.x + this.vipMc.width + 6; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.value6.x = this.value5.x + this.value5.width; + this.value6.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + this.value6.defaultTextFormat = this.css; + this.viewBtn = this.face.getButton(ClassConfig.lib_ui_view); + this.talkBtn = this.face.getButton(ClassConfig.lib_ui_talk); + this.mailBtn = this.face.getButton(ClassConfig.lib_ui_mail); + this.viewBtn.x = this.value4.x + this.value4.width + 20; + this.viewBtn.y = 3; + this.talkBtn.x = this.viewBtn.x + 30; + this.talkBtn.y = 5; + this.mailBtn.x = this.talkBtn.x + 30; + this.mailBtn.y = 6; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = true; + } + } + + public function setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 0) + { + _loc2_.color = 16771584; + } + else if(param1 == 1) + { + _loc2_.color = 16743936; + } + else if(param1 == 2) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + } + + public function setDate(param1:SingleBabelData) : void + { + var _loc2_:Date = null; + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.countryMc.visible = false; + this.vipMc.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.vipMc.gotoAndStop(1); + this.govMc.gotoAndStop(1); + this.bg2.visible = false; + return; + } + this.value1.text = this.obj.rank.toString(); + _loc2_ = this.obj.topStageTime as Date; + this.value2.htmlText = "" + this.obj.userName + ""; + if(this.obj.heroName == null) + { + this.value3.text = ""; + } + else + { + this.value3.htmlText = this.obj.heroName; + } + this.value4.text = Utils.getNewPower(this.obj.power); + this.value5.text = "第 " + this.obj.stageId + " 层"; + if(this.obj.topStageTime == null) + { + this.value6.text = ""; + } + else + { + this.value6.text = this.obj.topStageTime; + } + this.vipMc.visible = true; + this.countryMc.gotoAndStop(this.obj.countryId); + this.countryMc.visible = true; + if(this.obj.rank == this.defaultRank) + { + this.isSelf = true; + this.bg2.visible = true; + this.bg1.visible = false; + } + else + { + this.isSelf = false; + this.bg2.visible = false; + this.bg1.visible = false; + } + this.govMc.gotoAndStop(this.obj.govId + 1); + this.vipMc.gotoAndStop(this.obj.vipLevel + 1); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/ranking/mc/UserRankMc.as b/flash_decompiled/com/view/ui/ranking/mc/UserRankMc.as new file mode 100644 index 0000000..38fceab --- /dev/null +++ b/flash_decompiled/com/view/ui/ranking/mc/UserRankMc.as @@ -0,0 +1,263 @@ +package com.view.ui.ranking.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.Control; + import com.view.UIListManage; + import com.view.newui.UIConfig; + import com.view.tip.TipTitle; + import com.view.ui.mail.MailUI; + import com.view.ui.ranking.data.MonarchData; + import com.view.world.ui.CastleUserUI; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UserRankMc 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 css:TextFormat; + + public var viewBtn:SimpleButton; + + public var talkBtn:SimpleButton; + + public var mailBtn:SimpleButton; + + private var face:InstallFace = InstallFace.getInstance(); + + private var countryMc:MovieClip; + + private var govMc:MovieClip; + + private var vipMc:MovieClip; + + private var isSelf:Boolean; + + private var obj:MonarchData; + + public var defaultRank:int; + + public function UserRankMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,624,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,624,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.countryMc = this.face.getMovieClip(ClassConfig.lib_country); + this.countryMc.gotoAndStop(1); + this.countryMc.visible = false; + this.value1 = PublicMethod.getTextFieldWithFillter(16777215,45); + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,110); + this.value2.mouseEnabled = true; + this.value2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + this.govMc = this.face.getMovieClip(ClassConfig.LIB_CUNTRY_5); + this.govMc.gotoAndStop(1); + this.vipMc = this.face.getMovieClip(ClassConfig.lib_ui_vipmc); + this.vipMc.gotoAndStop(2); + this.vipMc.visible = false; + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,114); + this.value4 = PublicMethod.getTextFieldWithFillter(16777215,70); + this.value5 = PublicMethod.getTextFieldWithFillter(16777215,81); + addChild(this.value1); + addChild(this.govMc); + addChild(this.countryMc); + addChild(this.vipMc); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + this.value1.x = 0; + this.value1.y = 4; + this.govMc.x = 48; + this.govMc.y = 5; + this.countryMc.x = 76; + this.countryMc.y = 4; + this.vipMc.x = 96; + this.vipMc.y = 7; + this.value2.x = 127; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + this.viewBtn = this.face.getButton(ClassConfig.lib_ui_view); + this.talkBtn = this.face.getButton(ClassConfig.lib_ui_talk); + this.mailBtn = this.face.getButton(ClassConfig.lib_ui_mail); + addChild(this.viewBtn); + addChild(this.talkBtn); + addChild(this.mailBtn); + this.viewBtn.x = this.value5.x + 110; + this.viewBtn.y = 3; + this.talkBtn.x = this.viewBtn.x + 30; + this.talkBtn.y = 5; + this.mailBtn.x = this.talkBtn.x + 30; + this.mailBtn.y = 6; + new TipTitle(this.viewBtn,this.face.stage,this.face.tip_bg,{"titletext":"查看信息"}); + new TipTitle(this.talkBtn,this.face.stage,this.face.tip_bg,{"titletext":"私聊"}); + new TipTitle(this.mailBtn,this.face.stage,this.face.tip_bg,{"titletext":"发送邮件"}); + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.viewBtn.addEventListener(MouseEvent.CLICK,this.showFriendInfo); + this.talkBtn.addEventListener(MouseEvent.CLICK,this.siliao); + this.mailBtn.addEventListener(MouseEvent.CLICK,this.sendMail); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelf) + { + this.bg1.visible = true; + } + } + + public function setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 0) + { + _loc2_.color = 16771584; + } + else if(param1 == 1) + { + _loc2_.color = 16743936; + } + else if(param1 == 2) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + this.value5.setTextFormat(_loc2_); + } + + public function setDate(param1:MonarchData) : void + { + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.viewBtn.visible = false; + this.talkBtn.visible = false; + this.mailBtn.visible = false; + this.countryMc.visible = false; + this.vipMc.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.vipMc.gotoAndStop(1); + this.govMc.gotoAndStop(1); + this.bg2.visible = false; + return; + } + this.value1.text = this.obj.rank.toString(); + this.value2.htmlText = "" + this.obj.userName + ""; + this.vipMc.visible = true; + if(this.obj.guildName) + { + this.value3.text = this.obj.guildName; + } + else + { + this.value3.text = "无"; + } + this.value4.text = this.obj.rankName; + this.value5.text = this.obj.rangeValue.toString(); + this.countryMc.gotoAndStop(this.obj.countryId); + this.countryMc.visible = true; + this.viewBtn.visible = true; + this.talkBtn.visible = true; + this.mailBtn.visible = true; + if(this.obj.rank == this.defaultRank) + { + this.isSelf = true; + this.bg2.visible = true; + this.bg1.visible = false; + } + else + { + this.isSelf = false; + this.bg2.visible = false; + this.bg1.visible = false; + } + this.govMc.gotoAndStop(this.obj.govId + 1); + this.vipMc.gotoAndStop(this.obj.vipLevel + 1); + } + + private function showFriendInfo(param1:MouseEvent) : void + { + var _loc2_:CastleUserUI = CastleUserUI.getInstance(); + _loc2_.show(); + _loc2_.updateByUserName(this.obj.userName); + } + + private function siliao(param1:MouseEvent) : void + { + Control.getInstance().chatMainUI.talkToUser(this.obj.userName); + UIListManage.getInstance().clearAll(); + } + + private function sendMail(param1:MouseEvent) : void + { + var _loc2_:MailUI = MailUI.getInstance(); + _loc2_.setStartPage(2); + _loc2_.setReceiveName(this.obj.userName); + _loc2_.show(); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/riches/FastRFightUI.as b/flash_decompiled/com/view/ui/riches/FastRFightUI.as new file mode 100644 index 0000000..fccf980 --- /dev/null +++ b/flash_decompiled/com/view/ui/riches/FastRFightUI.as @@ -0,0 +1,154 @@ +package com.view.ui.riches +{ + 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 FastRFightUI extends UIWindowBg + { + + public static var instance:FastRFightUI; + + private var bg:UIWindowBg; + + private var inputBar:TextField; + + private var _heroIdArr:Array; + + private var currStageId:int; + + public var needCash:int; + + public function FastRFightUI() + { + 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_ += "
扫荡目标层:30层"; + _loc2_ += "
消耗时间:即刻"; + _loc2_ += "
扫荡规则:"; + _loc2_ += "
1、只能从第一层开始扫荡,扫荡不消耗兵力,不消耗武将健康度。"; + _loc2_ += "
2、扫荡结束后发放楼层奖励。
"; + this.inputBar.htmlText = _loc2_; + _loc3_ = new UIButton("开始扫荡",2); + this.bg.addChild(_loc3_); + _loc3_.x = 30; + _loc3_.y = 170; + _loc3_.onClick = this.submit; + var _loc4_:UIButton = new UIButton("扫荡10次",2); + this.bg.addChild(_loc4_); + _loc4_.x = _loc3_.x + 80; + _loc4_.y = 170; + _loc4_.onClick = this.tenplay; + var _loc5_:UIButton = new UIButton("一键扫荡",2); + this.bg.addChild(_loc5_); + _loc5_.x = _loc4_.x + 80; + _loc5_.y = _loc3_.y; + _loc5_.onClick = this.onkeyplayConfig; + } + + public static function getInstance() : FastRFightUI + { + if(instance == null) + { + instance = new FastRFightUI(); + } + return instance; + } + + 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_ < 5) + { + _loc3_ = "当前vip等级没有达到5级"; + MessageBoxUI.getInstance().addMessage(_loc3_); + return; + } + ConnectService.getInstance().babelService.startRiFastCombat(this.heroIdArr); + closeSelf(param1); + } + + private function onkeyplayConfig(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确定要一键扫荡所有次数吗?",this.onkeyplay); + } + + private function onkeyplay() : void + { + var _loc2_:String = null; + var _loc1_:int = int(NewUserData.getUser().viplevel); + if(_loc1_ < 6) + { + _loc2_ = "当前vip等级没有达到6级。"; + MessageBoxUI.getInstance().addMessage(_loc2_); + return; + } + ConnectService.getInstance().babelService.onekeyplay2(this.heroIdArr); + closeSelf(null); + } + + 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.tenkeyplay2(this.heroIdArr); + closeSelf(param1); + } + + 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/riches/RichesAutoSet.as b/flash_decompiled/com/view/ui/riches/RichesAutoSet.as new file mode 100644 index 0000000..b6f3bcc --- /dev/null +++ b/flash_decompiled/com/view/ui/riches/RichesAutoSet.as @@ -0,0 +1,202 @@ +package com.view.ui.riches +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.RichesEvent; + 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 RichesAutoSet extends UIWindowBg + { + + private var bg:UIWindowBg; + + private var checkBox1:UICheckBtn; + + private var checkBox2:UICheckBtn; + + private var input:UINumInputText; + + private var currStageId:int; + + private var stageMin:int; + + private var isAutoTrea:Boolean; + + private var isAutoArmy:Boolean; + + public function RichesAutoSet() + { + var _loc2_:TextField = null; + super(); + 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 _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,230); + _loc1_.text = "自动补充(补充顺序按出征顺序补充)"; + this.bg.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.checkBox1 = new UICheckBtn(); + this.bg.addChild(this.checkBox1); + this.checkBox1.x = _loc1_.x; + this.checkBox1.y = _loc1_.y + 25; + this.checkBox1.onClick = this.clickCheckBox; + _loc2_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc2_.text = "自动医疗受伤武将(健康幅度低于80时)"; + this.bg.addChild(_loc2_); + _loc2_.x = this.checkBox1.x + 30; + _loc2_.y = _loc1_.y + 25; + this.checkBox2 = new UICheckBtn(); + this.bg.addChild(this.checkBox2); + this.checkBox2.x = this.checkBox1.x; + this.checkBox2.y = _loc2_.y + 25; + this.checkBox2.onClick = this.clickCheckArmy; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc3_.text = "自动补充兵力(补充到初始兵力)"; + this.bg.addChild(_loc3_); + _loc3_.x = _loc2_.x; + _loc3_.y = _loc2_.y + 25; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,250); + _loc4_.text = "打过第 层时自动停止"; + this.bg.addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = _loc3_.y + 30; + this.input = new UINumInputText(50); + this.bg.addChild(this.input); + this.input.x = 50; + this.input.y = _loc4_.y - 3; + this.input.hiddenBtn(); + this.input.setMaxNum(30); + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,225); + _loc5_.height = 40; + _loc5_.wordWrap = true; + _loc5_.multiline = true; + var _loc6_:TextFormat = new TextFormat(); + _loc6_.leading = 4; + this.bg.addChild(_loc5_); + _loc5_.defaultTextFormat = _loc6_; + _loc5_.x = 30; + _loc5_.y = 120; + _loc5_.text = "注:失败时会自动停止,若某个武将兵力补充后 仍为0,则该武将不能继续前进"; + var _loc7_:UIButton = new UIButton("开 始",2,10); + var _loc8_:UIButton = new UIButton("退 出",2,10); + this.bg.addChild(_loc7_); + this.bg.addChild(_loc8_); + _loc7_.x = 70; + _loc7_.y = 170; + _loc8_.x = _loc7_.x + _loc7_.width + 30; + _loc8_.y = _loc7_.y; + _loc8_.onClick = closeSelf; + _loc7_.onClick = this.editEvent; + ConnectService.getInstance().addEventListener(RichesEvent.BABEL_AUTO_SAVE,this.autoSaveBack); + } + + public function setCurrBattle(param1:int) : void + { + this.currStageId = param1; + } + + public function setType(param1:int) : void + { + this.stageMin = 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 editEvent(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ < this.currStageId) + { + MessageBoxUI.getInstance().addMessage("您已挑战过该楼关."); + return; + } + _loc2_ += this.stageMin; + var _loc3_:Object = new Object(); + _loc3_.treatHero = this.isAutoTrea; + _loc3_.supplyArmy = this.isAutoArmy; + _loc3_.stopStage = _loc2_.toString(); + ConnectService.getInstance().babelService.saveRichesAutoConfig(_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:RichesEvent) : void + { + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/riches/RichesBuild.as b/flash_decompiled/com/view/ui/riches/RichesBuild.as new file mode 100644 index 0000000..6053534 --- /dev/null +++ b/flash_decompiled/com/view/ui/riches/RichesBuild.as @@ -0,0 +1,45 @@ +package com.view.ui.riches +{ + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class RichesBuild extends BaseBuild + { + + private var tipStr:String; + + public function RichesBuild(param1:BuildData) + { + super(); + param1.swfUrl = "pic/build/army.swf"; + super.buildData = param1; + super.loadSwfBg(); + super.addEvent(); + super.createNpcTip(); + this.buttonMode = true; + } + + override public function createNpcTipStr() : void + { + npcTipStr = "

藏宝阁

"; + npcTipStr += "进入藏宝阁,参与副本活动课获得大量奖励"; + } + + override public function mouseClick(param1:MouseEvent) : void + { + if(buildUI == null) + { + buildUI = new RichesBuildUI(); + } + buildUI.show(); + } + + override public function getBuildNameMc() : MovieClip + { + return null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/riches/RichesBuildEnterUI.as b/flash_decompiled/com/view/ui/riches/RichesBuildEnterUI.as new file mode 100644 index 0000000..845e55d --- /dev/null +++ b/flash_decompiled/com/view/ui/riches/RichesBuildEnterUI.as @@ -0,0 +1,1084 @@ +package com.view.ui.riches +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.data.ReturnBean; + import com.control.play.event.RichesEvent; + 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.tip.TipTitle; + import com.view.ui.PlayUI; + import com.view.ui.army.ArmySetUI; + import com.view.ui.babel.AddBabelExpUI; + import com.view.ui.babel.AddBabelRevocerUI; + import com.view.ui.babel.AddDoubleDropUI; + 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.Timer; + + public class RichesBuildEnterUI 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 stopAutoBtn:UIButton; + + private var viewAutoBtn:UIButton; + + private var resultMc:MovieClip; + + private var heroMcVec:Vector.; + + 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 fastCash:int; + + private var realStage:int; + + private var stageMin:int; + + private var leftLifeTip:TipTitle; + + private var reliveTimes:int; + + private var awardRecordList:Array; + + private var tipStr1:String; + + private var tipStr2:String; + + private var tipStr3:String; + + private var tipStr4:String; + + private var tipStr5:String; + + private var tipStr6:String; + + private var tipStr7:String; + + private var tipStr8:String; + + private var preMinStageId:int = -1; + + 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 autoBattleSet:RichesAutoSet; + + private var stageId:int; + + private var awardList:BabelAwardList; + + public function RichesBuildEnterUI() + { + super(); + super.addUIBg(); + super.setPosition(); + this.createUI(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc9_:int = 0; + var _loc19_:UIButton = null; + var _loc20_:UIHeroItem = null; + var _loc21_:StageAwardMc = null; + super.loadTitle(UITitleConfig.title_xieyueshandao); + 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) + { + _loc20_ = new UIHeroItem(); + _loc8_.addChild(_loc20_); + _loc20_.x = 5 + _loc9_ * 124; + _loc20_.y = 5; + this.heroMcVec.push(_loc20_); + _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,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_ = new UIButton("查看奖励",2,10); + _loc4_.addChild(_loc19_); + _loc19_.x = 10; + _loc19_.y = 220; + _loc19_.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) + { + _loc21_ = new StageAwardMc(2); + this.awardMc.addChild(_loc21_); + this.awardListVec.push(_loc21_); + _loc21_.y = _loc9_ * 25; + _loc21_.x = 4; + _loc9_++; + } + this.scrollPane.update(); + } + + 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_:FastRFightUI = FastRFightUI.getInstance(); + addChild(_loc4_); + _loc4_.heroIdArr = _loc2_; + _loc4_.setCurrStageId(this.stageId); + _loc4_.x = int(this.width / 2 - _loc4_.width / 2); + _loc4_.y = int(this.height / 2 - _loc4_.height / 2); + } + + private function getEnterView() : void + { + ConnectService.getInstance().babelService.getRichesPreCombatDetail(); + } + + private function getEnterViewResult(param1:RichesEvent) : void + { + var _loc3_:String = null; + var _loc2_:Object = param1.obj; + this.stageId = _loc2_.stageId; + if(this.stageId > 210) + { + this.stageMin = 210; + this.realStage = this.stageId - 210; + _loc3_ = UITitleConfig.title_zhenzhuquan; + } + else if(this.stageId > 180) + { + this.stageMin = 180; + this.realStage = this.stageId - 180; + _loc3_ = UITitleConfig.title_wolongshanzhuang; + } + else if(this.stageId > 150) + { + this.stageMin = 150; + this.realStage = this.stageId - 150; + _loc3_ = UITitleConfig.title_wuyoushanzhuang; + } + else if(this.stageId > 120) + { + this.stageMin = 120; + this.realStage = this.stageId - 120; + _loc3_ = UITitleConfig.title_zhenlongxiaojing; + } + else if(this.stageId > 90) + { + this.stageMin = 90; + this.realStage = this.stageId - 90; + _loc3_ = UITitleConfig.title_suixiangxia; + } + else if(this.stageId > 60) + { + this.stageMin = 60; + this.realStage = this.stageId - 60; + _loc3_ = UITitleConfig.title_qingyunshandao; + } + else if(this.stageId > 30) + { + this.stageMin = 30; + this.realStage = this.stageId - 30; + _loc3_ = UITitleConfig.title_liushuangshandao; + } + else + { + this.stageMin = 0; + this.realStage = this.stageId; + _loc3_ = UITitleConfig.title_xieyueshandao; + } + this.initAwardDic(this.stageMin); + super.loadTitle(_loc3_); + var _loc4_:String = _loc2_.defArmyType; + var _loc5_:int = int(_loc2_.freeTimes); + var _loc6_:int = int(_loc2_.itemTimes); + this.reliveTimes = _loc2_.reliveTimes; + this.myWarTimes.text = this.reliveTimes + "次"; + if(this.reliveTimes <= 0) + { + MessageBoxUI.getInstance().confirmMsg("已没有复活次数,闯关失败,请重新挑战",this.configExit); + return; + } + this.doubleDropCash = _loc2_.doubleNeedCash; + if(_loc2_.doubleDrop > 0) + { + this.addDropText.text = "已使用"; + this.addDoubleDrop.visible = false; + } + else + { + this.addDropText.text = "未使用"; + this.addDoubleDrop.visible = true; + } + var _loc7_:Number = Math.round(_loc2_.monsterPower); + var _loc8_:Number = Math.round(_loc2_.atkPower); + var _loc9_:int = int(_loc2_.state); + var _loc10_:Array = _loc2_.atkHeroList as Array; + this.initHeroView(_loc10_); + this.awardRecordList = _loc2_.awardRecordList as Array; + this.combatId = _loc2_.combatId; + var _loc11_:int = int(_loc2_.exp); + var _loc12_:int = int(_loc2_.isPass); + var _loc13_:int = int(_loc2_.stopStage); + var _loc14_:Boolean = _loc2_.supplyArmy as Boolean; + var _loc15_:int = int(_loc2_.totalFreeTimes); + var _loc16_:int = int(_loc2_.totalItemTimes); + var _loc17_:Boolean = _loc2_.treatHero as Boolean; + var _loc18_:int = int(_loc2_.winTimes); + var _loc19_:int = int(_loc2_.lastWinScore); + this.initStageMc(this.realStage); + this.armyTypeText.text = _loc4_ + ""; + this.myArmyPower.text = _loc7_ + ""; + this.aktPowerText.text = _loc8_ + ""; + var _loc20_:int = int(_loc2_.topStageId); + _loc20_ = _loc20_ - this.stageMin; + if(_loc20_ > 30) + { + _loc20_ = 30; + } + else if(_loc20_ <= 0) + { + _loc20_ = 1; + } + this.topStageMc.showNum(_loc20_); + this.initWinResult(_loc19_); + this.combatFinishSeconds = _loc2_.combatFinishSeconds; + if(_loc9_ == 2) + { + this.status = 3; + } + else if(this.combatFinishSeconds > 0) + { + this.status = 2; + } + else + { + this.status = 1; + } + this.startBattleTime(); + } + + private function initStageMc(param1:int) : void + { + var _loc2_:int = param1; + if(_loc2_ > 100) + { + _loc2_ = 100; + } + this.stageMc.showNum(param1); + } + + 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 initAwardDic(param1:int) : void + { + var _loc5_:int = 0; + var _loc6_:StageAwardMc = null; + if(this.preMinStageId == param1) + { + return; + } + this.preMinStageId = param1; + var _loc2_:Array = RichesData.getStageAwardList(); + if(_loc2_.length == 0) + { + return; + } + this.clearAwardList(); + var _loc3_:int = 0; + var _loc4_:int = 0; + while(_loc4_ < _loc2_.length) + { + _loc5_ = int(_loc2_[_loc4_].stageId); + if(!(_loc5_ <= param1 || _loc5_ > param1 + 30)) + { + if(_loc3_ > 9) + { + _loc6_ = new StageAwardMc(2); + this.awardMc.addChild(_loc6_); + this.awardListVec.push(_loc6_); + _loc6_.y = _loc3_ * 25; + _loc6_.x = 4; + } + this.awardListVec[_loc3_].setData(_loc2_[_loc4_],param1); + _loc3_++; + } + _loc4_++; + } + this.scrollPane.update(); + } + + private function clearAwardList() : void + { + var _loc1_:int = int(this.awardListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + if(_loc2_ > 9) + { + this.awardMc.removeChild(this.awardListVec[_loc2_]); + this.awardListVec.splice(_loc2_,1); + } + else + { + this.awardListVec[_loc2_].setData(null); + } + _loc2_--; + } + } + + 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(RichesEvent.ENTER_RICHES_VIEW,this.getEnterViewResult); + ConnectService.getInstance().addEventListener(RichesEvent.BABEL_STARTCOMBAT,this.getStartBattleResult); + ConnectService.getInstance().addEventListener(RichesEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult); + ConnectService.getInstance().addEventListener(RichesEvent.BABEL_TREAT_HERO,this.treatHeroResult); + ConnectService.getInstance().addEventListener(RichesEvent.BABEL_AUTO_SAVE,this.saveAutoResult); + ConnectService.getInstance().addEventListener(RichesEvent.BABEL_AUTO_START,this.startAutoResult); + ConnectService.getInstance().addEventListener(RichesEvent.BABEL_RICHES_EXIT,this.exitBabelUI); + ConnectService.getInstance().addEventListener(RichesEvent.BABEL_DOUBLESET,this.doubleSetResult); + Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(RichesEvent.ENTER_RICHES_VIEW,this.getEnterViewResult); + ConnectService.getInstance().removeEventListener(RichesEvent.BABEL_STARTCOMBAT,this.getStartBattleResult); + ConnectService.getInstance().removeEventListener(RichesEvent.ENTER_BABEL_CHANGEHERO,this.changeHeroResult); + ConnectService.getInstance().removeEventListener(RichesEvent.BABEL_TREAT_HERO,this.treatHeroResult); + ConnectService.getInstance().removeEventListener(RichesEvent.BABEL_AUTO_SAVE,this.saveAutoResult); + ConnectService.getInstance().removeEventListener(RichesEvent.BABEL_AUTO_START,this.startAutoResult); + ConnectService.getInstance().removeEventListener(RichesEvent.BABEL_RICHES_EXIT,this.exitBabelUI); + ConnectService.getInstance().removeEventListener(RichesEvent.BABEL_DOUBLESET,this.doubleSetResult); + Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc); + 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.addDoubleDropUI) && contains(this.addDoubleDropUI)) + { + removeChild(this.addDoubleDropUI); + } + } + + private function doubleSetResult(param1:RichesEvent) : 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(2); + 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 > 150) + { + _loc1_ = 6 * _loc1_; + } + else if(this.stageId > 120) + { + _loc1_ = 5 * _loc1_; + } + else if(this.stageId > 90) + { + _loc1_ = 4 * _loc1_; + } + else if(this.stageId > 60) + { + _loc1_ = 3 * _loc1_; + } + else if(this.stageId > 30) + { + _loc1_ = 2 * _loc1_; + } + this.addDoubleDropUI.setData("是否花费" + _loc1_ + "元宝增加藏宝双倍掉落
提示:使用后藏宝掉落将会翻倍,退出藏宝后该效果消失"); + } + } + + private function changeArmySucc(param1:DevEvent) : void + { + this.getEnterView(); + } + + private function exitBabelUI(param1:RichesEvent) : 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.startRichesCombat(_loc2_); + } + else + { + MessageBoxUI.getInstance().addMessage("未选择武将"); + } + } + + private function getStartBattleResult(param1:RichesEvent) : 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.changeRichesHero(_loc2_); + } + + private function changeHeroResult(param1:RichesEvent) : void + { + this.getEnterView(); + } + + 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 RichesAutoSet(); + this.autoBattleSet.x = int(width / 2 - this.autoBattleSet.width / 2); + this.autoBattleSet.y = int(height / 2 - this.autoBattleSet.height / 2); + } + this.autoBattleSet.setCurrBattle(this.realStage); + this.autoBattleSet.setType(this.stageMin); + addChild(this.autoBattleSet); + } + + private function treatHero(param1:MouseEvent) : void + { + if(this.status == 1) + { + ConnectService.getInstance().babelService.treatRichesAllHero(); + } + } + + private function treatHeroResult(param1:RichesEvent) : 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:RichesEvent) : 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.startRichesCombatAuto(_loc2_); + } + } + + private function startAutoResult(param1:RichesEvent) : 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.stopRichesAutoCombat(); + } + + 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.stopRichesChallenge(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/riches/RichesBuildUI.as b/flash_decompiled/com/view/ui/riches/RichesBuildUI.as new file mode 100644 index 0000000..686005a --- /dev/null +++ b/flash_decompiled/com/view/ui/riches/RichesBuildUI.as @@ -0,0 +1,545 @@ +package com.view.ui.riches +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.RichesEvent; + import com.view.mc.button.Button_9; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.tip.MulTipTitle; + import com.view.ui.PlayUI; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class RichesBuildUI extends PlayUI + { + + private var enterBtn1:UIButton; + + private var enterBtn2:UIButton; + + private var enterBtn3:UIButton; + + private var enterBtn4:UIButton; + + private var enterBtn5:UIButton; + + private var enterBtn6:UIButton; + + private var enterBtn7:UIButton; + + private var enterBtn8:UIButton; + + private var tipBg1:Button_9; + + private var tipBg2:Button_9; + + private var tipBg3:Button_9; + + private var tipBg4:Button_9; + + private var tipBg5:Button_9; + + private var tipBg6:Button_9; + + private var tipBg7:Button_9; + + private var tipBg8:Button_9; + + private var bg2:UIWindowBg; + + private var bgMc:MovieClip; + + private var freeText:TextField; + + private var itemText:TextField; + + private var towerObj:Object; + + private var topStageId:int; + + private var hasInitDropTip:Boolean = false; + + private var richesBuildEnterUI:RichesBuildEnterUI; + + private var stageId:int; + + public function RichesBuildUI() + { + super(); + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc6_:String = null; + super.createUI(); + super.loadTitle(UITitleConfig.title_cangbaoge); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,400); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(410,391); + _loc1_.addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = 4; + var _loc2_:Sprite = new Sprite(); + _loc1_.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 4; + var _loc3_:UITitleBg = new UITitleBg("关卡选择",this.bg2.width); + this.bg2.addChild(_loc3_); + _loc3_.x = int(this.bg2.width / 2 - _loc3_.width / 2); + var _loc4_:UIWindowBg = new UIWindowBg(); + _loc4_.initThirdPanel(197,391); + _loc1_.addChild(_loc4_); + _loc4_.x = this.bg2.x + this.bg2.width + 4; + _loc4_.y = this.bg2.y; + var _loc5_:UITitleBg = new UITitleBg("活动介绍",_loc4_.width); + _loc4_.addChild(_loc5_); + _loc5_.x = int(_loc4_.width / 2 - _loc5_.width / 2); + _loc6_ = "活动类型:单人副本。
"; + _loc6_ = _loc6_ + "模式:战略战。
"; + _loc6_ = _loc6_ + "免费挑战次数:
"; + _loc6_ = _loc6_ + "道具挑战次数:
"; + _loc6_ = _loc6_ + "奖励:大量武将经验、神秘装备、材料
"; + _loc6_ = _loc6_ + "规则:
"; + _loc6_ = _loc6_ + "1、每天可在副本里挑战1次,击败精英后可获得经验,且通关一定层数将获得材料、装备。
"; + _loc6_ = _loc6_ + "2、挑战次数用完后继续挑战需要消耗金钥匙,否则无法进入。
"; + _loc6_ = _loc6_ + "3、本活动中战斗有70%的伤亡恢复率,精英战力较高请慎重!。"; + this.freeText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,50); + this.itemText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,50); + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,191); + _loc7_.height = 340; + _loc7_.wordWrap = true; + _loc7_.multiline = true; + var _loc8_:TextFormat = new TextFormat(); + _loc8_.leading = 4; + _loc7_.defaultTextFormat = _loc8_; + _loc7_.selectable = false; + _loc4_.addChild(_loc7_); + _loc7_.x = 10; + _loc7_.y = 28; + _loc7_.htmlText = _loc6_; + _loc4_.addChild(this.freeText); + _loc4_.addChild(this.itemText); + this.freeText.x = 95; + this.freeText.y = 59; + this.itemText.x = this.freeText.x; + this.itemText.y = 76; + this.freeText.text = ""; + this.itemText.text = ""; + var _loc9_:String = "pic/bg/bg_cangbao.jpg"; + loadBg(_loc9_); + var _loc10_:ScrollPane = new ScrollPane(); + _loc10_.setSize(417,373); + _loc10_.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc2_.addChild(_loc10_); + _loc10_.x = 1; + _loc10_.y = 26; + this.bgMc = playUIRes.getMovieClip(ClassConfig.riches_1); + _loc10_.source = this.bgMc; + this.bgMc.x = 1; + this.bgMc.mc1.visible = false; + this.bgMc.mc2.visible = false; + this.bgMc.mc3.visible = false; + this.bgMc.mc4.visible = false; + this.bgMc.mc5.visible = false; + this.bgMc.mc6.visible = false; + this.bgMc.mc7.visible = false; + this.bgMc.mc8.visible = false; + this.bgMc.mc9.alpha = 0; + this.enterBtn1 = new UIButton("进 入",2,10); + this.bgMc.addChild(this.enterBtn1); + this.enterBtn1.x = 57; + this.enterBtn1.y = 171; + this.enterBtn1.onClick = this.enterRiches1; + this.tipBg1 = new Button_9("查看掉落"); + this.tipBg1.buttonMode = true; + this.bgMc.addChild(this.tipBg1); + this.tipBg1.x = this.enterBtn1.x + 5; + this.tipBg1.y = this.enterBtn1.y - 22; + this.enterBtn2 = new UIButton("进 入",2,10); + this.bgMc.addChild(this.enterBtn2); + this.enterBtn2.x = this.enterBtn1.x + 124; + this.enterBtn2.y = this.enterBtn1.y; + this.enterBtn2.onClick = this.enterRiches2; + this.tipBg2 = new Button_9("查看掉落"); + this.tipBg2.buttonMode = true; + this.bgMc.addChild(this.tipBg2); + this.tipBg2.x = this.enterBtn2.x + 5; + this.tipBg2.y = this.enterBtn2.y - 22; + this.enterBtn3 = new UIButton("进 入",2,10); + this.bgMc.addChild(this.enterBtn3); + this.enterBtn3.x = this.enterBtn2.x + 124; + this.enterBtn3.y = this.enterBtn1.y; + this.enterBtn3.onClick = this.enterRiches3; + this.tipBg3 = new Button_9("查看掉落"); + this.tipBg3.buttonMode = true; + this.bgMc.addChild(this.tipBg3); + this.tipBg3.x = this.enterBtn3.x + 5; + this.tipBg3.y = this.enterBtn3.y - 22; + this.enterBtn4 = new UIButton("进 入",2,10); + this.bgMc.addChild(this.enterBtn4); + this.enterBtn4.x = 57; + this.enterBtn4.y = 345; + this.enterBtn4.onClick = this.enterRiches4; + this.tipBg4 = new Button_9("查看掉落"); + this.tipBg4.buttonMode = true; + this.bgMc.addChild(this.tipBg4); + this.tipBg4.x = this.enterBtn4.x + 5; + this.tipBg4.y = this.enterBtn4.y - 22; + this.enterBtn5 = new UIButton("进 入",2,10); + this.bgMc.addChild(this.enterBtn5); + this.enterBtn5.x = this.enterBtn4.x + 124; + this.enterBtn5.y = this.enterBtn4.y; + this.enterBtn5.onClick = this.enterRiches5; + this.tipBg5 = new Button_9("查看掉落"); + this.tipBg5.buttonMode = true; + this.bgMc.addChild(this.tipBg5); + this.tipBg5.x = this.enterBtn5.x + 5; + this.tipBg5.y = this.enterBtn5.y - 22; + this.enterBtn6 = new UIButton("进 入",2,10); + this.bgMc.addChild(this.enterBtn6); + this.enterBtn6.x = this.enterBtn5.x + 124; + this.enterBtn6.y = this.enterBtn4.y; + this.enterBtn6.onClick = this.enterRiches6; + this.tipBg6 = new Button_9("查看掉落"); + this.tipBg6.buttonMode = true; + this.bgMc.addChild(this.tipBg6); + this.tipBg6.x = this.enterBtn6.x + 5; + this.tipBg6.y = this.enterBtn6.y - 22; + this.enterBtn7 = new UIButton("进 入",2,10); + this.bgMc.addChild(this.enterBtn7); + this.enterBtn7.x = 57; + this.enterBtn7.y = 518; + this.enterBtn7.onClick = this.enterRiches7; + this.tipBg7 = new Button_9("查看掉落"); + this.tipBg7.buttonMode = true; + this.bgMc.addChild(this.tipBg7); + this.tipBg7.x = this.enterBtn7.x + 5; + this.tipBg7.y = this.enterBtn7.y - 22; + this.enterBtn8 = new UIButton("进 入",2,10); + this.bgMc.addChild(this.enterBtn8); + this.enterBtn8.x = this.enterBtn7.x + 124; + this.enterBtn8.y = this.enterBtn7.y; + this.enterBtn8.onClick = this.enterRiches8; + this.tipBg8 = new Button_9("查看掉落"); + this.tipBg8.buttonMode = true; + this.bgMc.addChild(this.tipBg8); + this.tipBg8.x = this.enterBtn8.x + 5; + this.tipBg8.y = this.enterBtn8.y - 22; + var _loc11_:String = "

斜月山道

"; + _loc11_ = _loc11_ + "关卡:30关
"; + _loc11_ = _loc11_ + "进入条件:千重楼达到100层"; + new MulTipTitle(this.enterBtn1,face.stage,face.tip_bg,_loc11_); + var _loc12_:String = "

流霸山道

"; + _loc12_ = _loc12_ + "关卡:30关
"; + _loc12_ = _loc12_ + "进入条件:千重楼达到100层,斜月山道通关"; + new MulTipTitle(this.enterBtn2,face.stage,face.tip_bg,_loc12_); + var _loc13_:String = "

青云山道

"; + _loc13_ = _loc13_ + "关卡:30关
"; + _loc13_ = _loc13_ + "进入条件:千重楼达到100层,流霸山道通关"; + new MulTipTitle(this.enterBtn3,face.stage,face.tip_bg,_loc13_); + var _loc14_:String = "

碎星峡

"; + _loc14_ = _loc14_ + "关卡:30关
"; + _loc14_ = _loc14_ + "进入条件:青山云道通关"; + new MulTipTitle(this.enterBtn4,face.stage,face.tip_bg,_loc14_); + var _loc15_:String = "

珍珑小径

"; + _loc15_ = _loc15_ + "关卡:30关
"; + _loc15_ = _loc15_ + "进入条件:碎星峡通关"; + new MulTipTitle(this.enterBtn5,face.stage,face.tip_bg,_loc15_); + var _loc16_:String = "

无忧山庄

"; + _loc16_ = _loc16_ + "关卡:30关
"; + _loc16_ = _loc16_ + "进入条件:珍珑小径通关"; + new MulTipTitle(this.enterBtn6,face.stage,face.tip_bg,_loc16_); + var _loc17_:String = "

卧龙山庄

"; + _loc17_ = _loc17_ + "关卡:30关
"; + _loc17_ = _loc17_ + "进入条件:无忧山庄通关"; + new MulTipTitle(this.enterBtn7,face.stage,face.tip_bg,_loc17_); + var _loc18_:String = "

珍珠泉

"; + _loc18_ = _loc18_ + "关卡:30关
"; + _loc18_ = _loc18_ + "进入条件:卧龙山庄通关"; + new MulTipTitle(this.enterBtn8,face.stage,face.tip_bg,_loc18_); + this.entryRiches(1); + _loc10_.update(); + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg2.addChild(param1); + param1.x = 2; + param1.y = 26; + param1.width = 417; + param1.height = 373; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(this.freeText) + { + this.entryRiches(0); + } + ConnectService.getInstance().addEventListener(RichesEvent.ENTER_RICHES_SelectRound,this.enterRichesRes); + ConnectService.getInstance().addEventListener(RichesEvent.ENTER_RICHES,this.entryRichesView); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(RichesEvent.ENTER_RICHES_SelectRound,this.enterRichesRes); + ConnectService.getInstance().removeEventListener(RichesEvent.ENTER_RICHES,this.entryRichesView); + } + + private function entryRiches(param1:int) : void + { + ConnectService.getInstance().babelService.entryRiches(param1); + } + + private function entryRichesView(param1:RichesEvent) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + this.towerObj = param1.obj; + var _loc2_:int = int(this.towerObj.needSelectRound); + if(_loc2_ == 1) + { + _loc3_ = int(this.towerObj.totalFreeTimes); + _loc4_ = int(this.towerObj.freeTimes); + _loc5_ = int(this.towerObj.totalItemTimes); + _loc6_ = int(this.towerObj.itemTimes); + this.freeText.text = _loc4_ + "/" + _loc3_ + "次"; + this.itemText.text = _loc6_ + "/" + _loc5_ + "次"; + } + else + { + this.enterRichesRoom(this.towerObj.stageId); + } + this.topStageId = this.towerObj.topStageId; + if(this.topStageId >= 30) + { + this.bgMc.mc1.visible = true; + } + if(this.topStageId >= 60) + { + this.bgMc.mc2.visible = true; + } + if(this.topStageId >= 90) + { + this.bgMc.mc3.visible = true; + } + if(this.topStageId >= 120) + { + this.bgMc.mc4.visible = true; + } + if(this.topStageId >= 150) + { + this.bgMc.mc5.visible = true; + } + if(this.topStageId >= 180) + { + this.bgMc.mc6.visible = true; + } + if(this.topStageId >= 210) + { + this.bgMc.mc7.visible = true; + } + if(this.topStageId >= 240) + { + this.bgMc.mc8.visible = true; + } + this.initDropTip(); + } + + private function initDropTip() : void + { + var _loc1_:Array = null; + var _loc2_:int = 0; + var _loc3_:String = null; + var _loc4_:String = null; + var _loc5_:String = null; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc8_:String = null; + var _loc9_:String = null; + var _loc10_:String = null; + var _loc11_:Object = null; + if(!this.hasInitDropTip) + { + _loc1_ = RichesData.getStageAwardList(); + _loc3_ = "斜月山道掉落
"; + _loc4_ = "流霸山道掉落
"; + _loc5_ = "青云山道掉落
"; + _loc6_ = "碎星峡掉落
"; + _loc7_ = "珍珑小径掉落
"; + _loc8_ = "无忧山庄掉落
"; + _loc9_ = "卧龙山庄掉落
"; + _loc10_ = "珍珠泉掉落
"; + for each(_loc11_ in _loc1_) + { + _loc2_ = int(_loc11_.stageId); + if(_loc2_ <= 30) + { + _loc3_ = _loc3_ + "第" + _loc2_ + "关 掉落:" + _loc11_.awardList[0].itemName + "
"; + } + if(_loc2_ > 30 && _loc2_ <= 60) + { + _loc2_ -= 30; + _loc4_ = _loc4_ + "第" + _loc2_ + "关 掉落:" + _loc11_.awardList[0].itemName + "
"; + } + if(_loc2_ > 60 && _loc2_ <= 90) + { + _loc2_ -= 60; + _loc5_ = _loc5_ + "第" + _loc2_ + "关 掉落:" + _loc11_.awardList[0].itemName + "
"; + } + if(_loc2_ > 90 && _loc2_ <= 120) + { + _loc2_ -= 90; + _loc6_ = _loc6_ + "第" + _loc2_ + "关 掉落:" + _loc11_.awardList[0].itemName + "
"; + } + if(_loc2_ > 120 && _loc2_ <= 150) + { + _loc2_ -= 120; + _loc7_ = _loc7_ + "第" + _loc2_ + "关 掉落:" + _loc11_.awardList[0].itemName + "
"; + } + if(_loc2_ > 150 && _loc2_ <= 180) + { + _loc2_ -= 150; + _loc8_ = _loc8_ + "第" + _loc2_ + "关 掉落:" + _loc11_.awardList[0].itemName + "
"; + } + if(_loc2_ > 180 && _loc2_ <= 210) + { + _loc2_ -= 180; + _loc9_ = _loc9_ + "第" + _loc2_ + "关 掉落:" + _loc11_.awardList[0].itemName + "
"; + } + if(_loc2_ > 210 && _loc2_ <= 240) + { + _loc2_ -= 210; + _loc10_ = _loc10_ + "第" + _loc2_ + "关 掉落:" + _loc11_.awardList[0].itemName + "
"; + } + } + ToolTipManager.getInstance().setToolTip(this.tipBg1,new TxtTooltip(_loc3_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.tipBg2,new TxtTooltip(_loc4_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.tipBg3,new TxtTooltip(_loc5_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.tipBg4,new TxtTooltip(_loc6_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.tipBg5,new TxtTooltip(_loc7_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.tipBg6,new TxtTooltip(_loc8_),false,-1,false); + if(_loc9_ != "卧龙山庄掉落
") + { + ToolTipManager.getInstance().setToolTip(this.tipBg7,new TxtTooltip(_loc9_),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.tipBg8,new TxtTooltip(_loc10_),false,-1,false); + } + this.hasInitDropTip = true; + } + } + + private function enterRiches1(param1:MouseEvent) : void + { + this.enterRiches(1); + } + + private function enterRiches2(param1:MouseEvent) : void + { + this.enterRiches(31); + } + + private function enterRiches3(param1:MouseEvent) : void + { + this.enterRiches(61); + } + + private function enterRiches4(param1:MouseEvent) : void + { + this.enterRiches(91); + } + + private function enterRiches5(param1:MouseEvent) : void + { + this.enterRiches(121); + } + + private function enterRiches6(param1:MouseEvent) : void + { + this.enterRiches(151); + } + + private function enterRiches7(param1:MouseEvent) : void + { + this.enterRiches(181); + } + + private function enterRiches8(param1:MouseEvent) : void + { + this.enterRiches(211); + } + + private function enterRiches(param1:int) : void + { + this.stageId = param1; + if(this.towerObj == null) + { + return; + } + if(param1 > this.topStageId + 1 && param1 > 30) + { + MessageBoxUI.getInstance().addMessage("你的前置副本未完成"); + return; + } + if(this.towerObj.freeTimes >= this.towerObj.totalFreeTimes) + { + if(this.towerObj.itemTimes >= this.towerObj.totalItemTimes) + { + MessageBoxUI.getInstance().addMessage("今天进入次数已达上限,请明天再来"); + return; + } + MessageBoxUI.getInstance().confirmMsg("是否消耗一个【金钥匙】进入?",this.enterRichesStage); + return; + } + this.enterRichesStage(); + } + + private function enterRichesStage() : void + { + ConnectService.getInstance().babelService.selectRichesRound(this.stageId); + } + + private function enterRichesRes(param1:RichesEvent) : void + { + var _loc2_:int = param1.obj as int; + this.enterRichesRoom(_loc2_); + } + + private function enterRichesRoom(param1:int) : void + { + if(this.richesBuildEnterUI == null) + { + this.richesBuildEnterUI = new RichesBuildEnterUI(); + } + this.richesBuildEnterUI.show(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/riches/RichesData.as b/flash_decompiled/com/view/ui/riches/RichesData.as new file mode 100644 index 0000000..3ca16a4 --- /dev/null +++ b/flash_decompiled/com/view/ui/riches/RichesData.as @@ -0,0 +1,27 @@ +package com.view.ui.riches +{ + public class RichesData + { + + private static var itemAwardList:Array = null; + + public function RichesData() + { + super(); + } + + public static function setStageAwardList(param1:Array) : void + { + if(itemAwardList == null) + { + itemAwardList = param1; + } + } + + public static function getStageAwardList() : Array + { + return itemAwardList; + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/RiskAwardUI.as b/flash_decompiled/com/view/ui/risk/RiskAwardUI.as new file mode 100644 index 0000000..9ad4084 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/RiskAwardUI.as @@ -0,0 +1,198 @@ +package com.view.ui.risk +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.risk.mc.ItemShowMc; + import flash.display.Bitmap; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class RiskAwardUI extends BaseUI + { + + public static var instance:RiskAwardUI; + + public var gameRes:GameUIRes; + + private var currText:TextField; + + private var needText:TextField; + + private var _width2:int = -300; + + private var _height2:int = -230; + + private var bg2:UIWindowBg; + + private var star:int; + + private var getBtn:UIButton; + + private var getText:TextField; + + private var titleText:TextField; + + private var seqId:int; + + private var itemListVec:Vector.; + + public function RiskAwardUI() + { + var _loc2_:Bitmap = null; + var _loc4_:ItemShowMc = null; + this.gameRes = GameUIRes.getInstance(); + super(); + super.addUIBg(); + 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,140); + _loc1_.addChild(this.titleText); + this.titleText.text = "通关星数达到10可领取"; + this.titleText.x = 110; + 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 = 130; + this.getBtn.y = this.bg2.y + this.bg2.height + 15; + this.getBtn.onClick = this.getAward; + this.getText = PublicMethod.getTextFieldWithFillter(16053645,100); + _loc1_.addChild(this.getText); + this.getText.x = 145; + this.getText.y = this.getBtn.y; + _loc2_ = new Bitmap(this.gameRes.getPng("rish_28",this.gameRes.getApplication(GameUIRes.swfUrl_2))); + ui_bg.addChild(_loc2_); + _loc2_.x = int(ui_bg.width / 2 - _loc2_.width / 2); + _loc2_.y = 6; + _loc2_.smoothing = true; + this.itemListVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 4) + { + _loc4_ = new ItemShowMc(); + this.itemListVec.push(_loc4_); + this.bg2.addChild(_loc4_); + _loc4_.x = 10 + _loc3_ * 70; + _loc4_.y = 10; + _loc3_++; + } + } + + public static function getInstance() : RiskAwardUI + { + if(instance == null) + { + return instance = new RiskAwardUI(); + } + return instance; + } + + 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; + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + } + + public function setStar(param1:int) : void + { + this.star = param1; + } + + public function showBox(param1:Object) : void + { + this.seqId = param1.id; + if(this.star == 1) + { + this.titleText.text = "通关星数达到" + param1.star1 + "可领取"; + this.initItemList(param1.awardList1); + } + if(this.star == 2) + { + this.titleText.text = "通关星数达到" + param1.star2 + "可领取"; + this.initItemList(param1.awardList2); + } + if(this.star == 3) + { + this.titleText.text = "通关星数达到" + param1.star3 + "可领取"; + this.initItemList(param1.awardList3); + } + } + + public function initItemList(param1:Array) : void + { + var _loc3_:ItemShowMc = null; + if(param1 == null || param1.length == 0) + { + for each(_loc3_ in this.itemListVec) + { + _loc3_.setData(null); + } + return; + } + var _loc2_:int = 0; + while(_loc2_ < 4) + { + if(param1[_loc2_]) + { + this.itemListVec[_loc2_].setData(param1[_loc2_]); + } + else + { + this.itemListVec[_loc2_].setData(null); + } + _loc2_++; + } + } + + public function setStatus(param1:int) : void + { + this.getText.visible = false; + this.getBtn.visible = false; + if(param1 == 3) + { + this.getText.text = "已领取"; + this.getText.visible = true; + } + if(param1 == 2) + { + this.getBtn.setEnable(); + this.getBtn.visible = true; + } + if(param1 == 1) + { + this.getBtn.setUnEnable(); + this.getBtn.visible = true; + } + } + + private function getAward(param1:MouseEvent) : void + { + ConnectService.getInstance().riskService.getSceneAward(this.seqId,this.star); + this.closeUI(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/RiskBattleEnterUI.as b/flash_decompiled/com/view/ui/risk/RiskBattleEnterUI.as new file mode 100644 index 0000000..2a8ed1c --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/RiskBattleEnterUI.as @@ -0,0 +1,521 @@ +package com.view.ui.risk +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.data.GameData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UILabel; + import com.view.newui.UITabBtn; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.risk.mc.ItemShowMc; + import com.view.ui.risk.mc.RiskEmptyBtn; + 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 RiskBattleEnterUI extends BaseUI + { + + private static var instance:RiskBattleEnterUI; + + public var game:GameUIRes; + + private var _width2:int = 10; + + private var _height2:int = -50; + + private var bg1:UIWindowBg; + + private var bg5:UIWindowBg; + + private var hpText:UILabel; + + private var descText:TextField; + + private var todayText:UILabel; + + private var needHp:UILabel; + + private var userExpText:UILabel; + + private var heroExpText:UILabel; + + private var monsterPowerText:UILabel; + + private var paneBg:UIWindowBg; + + private var btnArr:Array; + + private var btn1:UIButton; + + private var btn2:UIButton; + + private var btn3:RiskEmptyBtn; + + private var titleText:UILabel; + + private var leftTimes:int; + + private var battleObj:Object; + + private var preBtn:UITabBtn; + + private var currType:int; + + private var itemListVec:Vector.; + + public function RiskBattleEnterUI() + { + var _loc1_:int = 0; + var _loc2_:UIWindowBg = null; + var _loc6_:UIWindowBg = null; + var _loc10_:int = 0; + var _loc11_:UITabBtn = null; + var _loc12_:Bitmap = null; + var _loc13_:Bitmap = null; + var _loc14_:Bitmap = null; + var _loc15_:Bitmap = null; + var _loc16_:Bitmap = null; + var _loc17_:Bitmap = null; + var _loc18_:Bitmap = null; + var _loc19_:Bitmap = null; + var _loc20_:Bitmap = null; + var _loc21_:int = 0; + var _loc22_:Sprite = null; + var _loc23_:ItemShowMc = null; + this.game = GameUIRes.getInstance(); + super(); + super.addUIBg(); + super.setPosition(); + this.titleText = new UILabel(100); + ui_bg.addChild(this.titleText); + this.titleText.x = int(ui_bg.width / 2 - this.titleText.width / 2); + this.titleText.y = 8; + this.titleText.setTextForMat(PublicMethod.getCenterTextFormat()); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + this.hpText = new UILabel(100); + this.bg1.addChild(this.hpText); + this.hpText.x = this.bg1.width - this.hpText.width - 10; + this.hpText.y = 10; + this.hpText.setTextForMat(PublicMethod.getRightTextFormat()); + this.hpText.setText("体力:100/150"); + _loc1_ = 50; + _loc2_ = new UIWindowBg(); + _loc2_.initSecondPanel(622 + this._width2,_loc1_); + this.bg1.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = 34; + this.descText = PublicMethod.getMulTextField(16355072,_loc2_.width - 20,_loc2_.height - 20); + _loc2_.addChild(this.descText); + this.descText.x = 10; + this.descText.y = 10; + var _loc3_:TextFormat = new TextFormat(); + _loc3_.leading = 5; + this.descText.defaultTextFormat = _loc3_; + this.descText.htmlText = "晋国大军凯旋后在都城大摆酒宴,席间智伯瑶羞辱赵襄子,赵襄子愤然离席,智伯瑶遭冲撞后大为不快,意图对赵襄子下手,赵襄子得知后决定趁夜逃回封地。"; + var _loc4_:int = 400; + var _loc5_:UIWindowBg = new UIWindowBg(); + _loc5_.initSecondPanel(_loc4_,400 + this._height2 - _loc1_ - 52); + this.bg1.addChild(_loc5_); + _loc5_.x = 4; + _loc5_.y = _loc2_.y + _loc2_.height + 4; + this.bg5 = new UIWindowBg(); + this.bg5.initThirdPanel(_loc4_ - 8,180); + _loc5_.addChild(this.bg5); + this.bg5.x = 4; + this.bg5.y = 64; + _loc6_ = new UIWindowBg(); + _loc6_.initSecondPanel(622 + this._width2 - _loc5_.width - 4,400 + this._height2 - _loc1_ - 52); + this.bg1.addChild(_loc6_); + _loc6_.x = _loc5_.x + _loc5_.width + 4; + _loc6_.y = _loc5_.y; + this.btnArr = new Array(); + var _loc7_:UITabBtn = new UITabBtn("简 单",2); + var _loc8_:UITabBtn = new UITabBtn("普 通",2); + var _loc9_:UITabBtn = new UITabBtn("困 难",2); + this.btnArr.push(_loc7_); + this.btnArr.push(_loc8_); + this.btnArr.push(_loc9_); + for each(_loc11_ in this.btnArr) + { + _loc6_.addChild(_loc11_); + _loc11_.x = 15 + _loc10_ * 66; + _loc11_.y = 10; + _loc11_.onClick = this.clickTab; + _loc10_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initThirdPanel(622 + this._width2 - _loc5_.width - 4 - 8,400 + this._height2 - _loc1_ - 52 - 35 - 5); + _loc6_.addChild(this.paneBg); + this.paneBg.x = 4; + this.paneBg.y = 35; + _loc12_ = this.game.getBitMap("rish_21",this.game.getApplication(GameUIRes.swfUrl_2)); + _loc5_.addChild(_loc12_); + _loc12_.x = 50; + _loc12_.y = 10; + this.todayText = new UILabel(100); + _loc5_.addChild(this.todayText); + this.todayText.x = _loc12_.x + _loc12_.width + 5; + this.todayText.y = _loc12_.y + 3; + this.todayText.setText("0/10"); + _loc13_ = this.game.getBitMap("rish_22",this.game.getApplication(GameUIRes.swfUrl_2)); + _loc5_.addChild(_loc13_); + _loc13_.x = _loc12_.x + 19; + _loc13_.y = 35; + this.needHp = new UILabel(100); + _loc5_.addChild(this.needHp); + this.needHp.x = this.todayText.x; + this.needHp.y = _loc13_.y + 3; + this.needHp.setText("6"); + _loc14_ = this.game.getBitMap("rish_27",this.game.getApplication(GameUIRes.swfUrl_2)); + this.bg5.addChild(_loc14_); + _loc14_.x = 2; + _loc14_.y = 2; + _loc15_ = this.game.getBitMap("rish_23",this.game.getApplication(GameUIRes.swfUrl_2)); + this.bg5.addChild(_loc15_); + _loc15_.x = 120; + _loc15_.y = 8; + _loc16_ = this.game.getBitMap("rish_24",this.game.getApplication(GameUIRes.swfUrl_2)); + this.paneBg.addChild(_loc16_); + _loc16_.x = 60; + _loc16_.y = 15; + _loc17_ = this.game.getBitMap("window_split1",this.game.getApplication(GameUIRes.swfUrl_2)); + this.paneBg.addChild(_loc17_); + _loc17_.x = 5; + _loc17_.y = 50; + _loc17_.width = 200; + _loc18_ = this.game.getBitMap("rish_25",this.game.getApplication(GameUIRes.swfUrl_2)); + this.paneBg.addChild(_loc18_); + _loc18_.x = 40; + _loc18_.y = 70; + this.userExpText = new UILabel(100); + this.paneBg.addChild(this.userExpText); + this.userExpText.x = _loc18_.x + 90; + this.userExpText.y = _loc18_.y; + this.userExpText.setText("900"); + _loc19_ = this.game.getBitMap("rish_26",this.game.getApplication(GameUIRes.swfUrl_2)); + this.paneBg.addChild(_loc19_); + _loc19_.x = _loc18_.x; + _loc19_.y = 100; + this.heroExpText = new UILabel(100); + this.paneBg.addChild(this.heroExpText); + this.heroExpText.x = this.userExpText.x; + this.heroExpText.y = _loc19_.y; + this.heroExpText.setText("3600"); + _loc20_ = this.game.getBitMap("rish_30",this.game.getApplication(GameUIRes.swfUrl_2)); + this.paneBg.addChild(_loc20_); + _loc20_.x = _loc18_.x; + _loc20_.y = 130; + this.monsterPowerText = new UILabel(100); + this.paneBg.addChild(this.monsterPowerText); + this.monsterPowerText.x = this.userExpText.x; + this.monsterPowerText.y = _loc20_.y; + this.monsterPowerText.setText("3600"); + this.btn1 = new UIButton("挂机10次",3); + this.btn3 = new RiskEmptyBtn(); + this.btn3.addEventListener(MouseEvent.CLICK,this.clearColdTime); + this.btn2 = new UIButton("开 战",2); + this.paneBg.addChild(this.btn1); + this.btn1.x = 30; + this.btn1.y = 170; + this.btn1.onClick = this.startFightTen; + this.paneBg.addChild(this.btn3); + this.btn3.x = 20; + this.btn3.y = 167; + this.paneBg.addChild(this.btn2); + this.btn2.x = this.btn1.x + this.btn1.width + 15; + this.btn2.y = this.btn1.y; + this.btn2.onClick = this.startFight; + this.itemListVec = new Vector.(); + _loc21_ = 0; + while(_loc21_ < 5) + { + _loc22_ = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg5.addChild(_loc22_); + _loc22_.x = 30 + _loc21_ * 72; + _loc22_.y = 85; + _loc23_ = new ItemShowMc(); + this.itemListVec.push(_loc23_); + this.bg5.addChild(_loc23_); + _loc23_.x = _loc22_.x; + _loc23_.y = _loc22_.y; + _loc21_++; + } + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_COMBAT_TEN,this.fightTenResult); + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_USERRISK,this.userChangeResult); + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_CLEARCOLD,this.clearColdResult); + this.userChangeResult(null); + } + + public static function getInstance() : RiskBattleEnterUI + { + if(instance == null) + { + return instance = new RiskBattleEnterUI(); + } + return instance; + } + + 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; + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + } + + override public function reSizeWindow(param1:Event) : void + { + } + + public function loadBattleInfo(param1:Object) : void + { + this.battleObj = param1; + if(this.battleObj == null) + { + return; + } + this.descText.htmlText = param1.scenedesc; + this.needHp.setText(param1.hpPoint); + this.titleText.setText(param1.name); + this.leftTimes = this.battleObj.maxJoinNum - GameData.getTatolFights(this.battleObj.sceneId); + if(this.leftTimes > 0) + { + this.btn1.setText("挂机" + this.leftTimes + "次"); + } + if(this.btnArr[0] == this.preBtn) + { + this.showItemList(); + } + else + { + this.btnArr[0].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + this.getTotals(); + } + + private function getTotals() : void + { + var _loc1_:* = this.battleObj.sceneId; + this.todayText.setText(GameData.getTatolFights(_loc1_) + "/" + this.battleObj.maxJoinNum); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.preBtn) + { + this.preBtn.select = false; + } + this.preBtn = _loc2_; + this.preBtn.select = true; + this.showItemList(); + } + + private function showItemList() : void + { + var _loc4_:Number = NaN; + var _loc1_:int = int(this.battleObj.parentId); + var _loc2_:int = int(this.battleObj.sceneId); + var _loc3_:int = GameData.getUserRiskFightStatus(_loc1_,_loc2_); + this.btn2.setEnable(); + if(this.btnArr[0] == this.preBtn) + { + this.currType = 1; + this.userExpText.setText(this.battleObj.userExp1); + this.heroExpText.setText(this.battleObj.heroExp); + _loc4_ = Math.round(this.battleObj.power1); + this.monsterPowerText.setText("" + _loc4_); + this.initItemList(this.battleObj.itemList1); + if(_loc3_ < this.currType || this.leftTimes <= 0) + { + this.showBtn(false); + this.btn2.x = 77; + } + else + { + this.showBtn(true); + this.btn2.x = this.btn1.x + this.btn1.width + 15; + } + } + if(this.btnArr[1] == this.preBtn) + { + this.currType = 2; + this.userExpText.setText(this.battleObj.userExp2); + this.heroExpText.setText(this.battleObj.heroExp2); + _loc4_ = Math.round(this.battleObj.power2); + this.monsterPowerText.setText("" + _loc4_); + this.initItemList(this.battleObj.itemList2); + if(_loc3_ == 0) + { + this.showBtn(false); + this.btn2.setUnEnable(); + this.btn2.x = 77; + } + else if(_loc3_ == 1) + { + this.showBtn(false); + this.btn2.x = 77; + } + else if(this.leftTimes <= 0) + { + this.showBtn(false); + this.btn2.x = 77; + } + else + { + this.showBtn(true); + this.btn2.x = this.btn1.x + this.btn1.width + 15; + } + } + if(this.btnArr[2] == this.preBtn) + { + this.currType = 3; + this.userExpText.setText(this.battleObj.userExp3); + this.heroExpText.setText(this.battleObj.heroExp3); + _loc4_ = Math.round(this.battleObj.power3); + this.monsterPowerText.setText("" + _loc4_); + this.initItemList(this.battleObj.itemList3); + if(_loc3_ < 2) + { + this.showBtn(false); + this.btn2.setUnEnable(); + this.btn2.x = 77; + } + else if(_loc3_ == 2) + { + this.showBtn(false); + this.btn2.x = 77; + } + else if(this.leftTimes <= 0) + { + this.showBtn(false); + this.btn2.x = 77; + } + else + { + this.showBtn(true); + this.btn2.x = this.btn1.x + this.btn1.width + 15; + } + } + } + + private function showBtn(param1:Boolean) : void + { + if(param1) + { + if(GameData.getLeftColdTime() > 0) + { + this.btn1.visible = false; + this.btn3.visible = true; + } + else + { + this.btn1.visible = true; + this.btn3.visible = false; + } + } + else + { + this.btn1.visible = false; + this.btn3.visible = false; + } + } + + public function initItemList(param1:Array) : void + { + var _loc3_:ItemShowMc = null; + if(param1 == null || param1.length == 0) + { + for each(_loc3_ in this.itemListVec) + { + _loc3_.setData(null); + } + return; + } + var _loc2_:int = 0; + while(_loc2_ < 5) + { + if(param1[_loc2_]) + { + this.itemListVec[_loc2_].setData(param1[_loc2_]); + } + else + { + this.itemListVec[_loc2_].setData(null); + } + _loc2_++; + } + } + + private function startFight(param1:MouseEvent) : void + { + if(this.leftTimes == 0) + { + MessageBoxUI.getInstance().addMessage("今日次数已用完"); + return; + } + var _loc2_:int = int(this.battleObj.sceneId); + ConnectService.getInstance().riskService.startBattle(_loc2_,this.currType); + super.closeUI2(); + } + + private function startFightTen(param1:MouseEvent) : void + { + if(this.leftTimes == 0) + { + MessageBoxUI.getInstance().addMessage("今日次数已用完"); + return; + } + var _loc2_:int = int(this.battleObj.sceneId); + ConnectService.getInstance().riskService.startBattleTen(_loc2_,this.currType); + } + + private function fightTenResult(param1:DevEvent) : void + { + this.closeUI(null); + MessageBoxUI.getInstance().addMessage("挂机成功"); + } + + private function userChangeResult(param1:DevEvent) : void + { + var _loc2_:Object = GameData.getUserRisk(); + this.hpText.setText("体力:" + _loc2_.hppoint + "/" + _loc2_.maxHpPoint); + this.loadBattleInfo(this.battleObj); + } + + private function clearColdResult(param1:DevEvent) : void + { + this.showItemList(); + } + + private function clearColdTime(param1:MouseEvent) : void + { + ConnectService.getInstance().riskService.clearColdTime(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/RiskBattleUI.as b/flash_decompiled/com/view/ui/risk/RiskBattleUI.as new file mode 100644 index 0000000..ac5c2c1 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/RiskBattleUI.as @@ -0,0 +1,624 @@ +package com.view.ui.risk +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.data.GameData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.cache.ImgCache; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.risk.mc.RiskBoxMc; + import com.view.ui.risk.mc.RiskMc2; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class RiskBattleUI extends BaseUI + { + + private static var instance:RiskBattleUI; + + private var a:Number = 0.8; + + private var scene1:Array = [[57,164],[109,98],[238,98],[393,117],[350,228],[348,353],[606,326],[690,218],[730,131]]; + + private var scene2:Array = [[89,115],[87,245],[213,254],[315,257],[341,137],[505,157],[543,236],[538,335],[727,357]]; + + private var scene3:Array = [[825,99],[702,236],[587,281],[434,243],[250,244],[138,274],[68,269],[86,85],[201,80]]; + + private var scene4:Array = [[215,113],[67,162],[40,202],[123,296],[270,296],[390,318],[585,368],[729,227],[582,216]]; + + private var scene5:Array = [[82,120],[230,106],[373,124],[273,207],[273,325],[391,368],[526,339],[669,233],[778,240]]; + + private var scene6:Array = [[43,117],[110,292],[236,199],[332,99],[481,95],[459,157],[419,245],[644,343],[838,154]]; + + private var scene7:Array = [[52,300],[160,171],[322,119],[433,119],[478,151],[474,329],[628,349],[768,258],[809,162]]; + + private var scene8:Array = [[59,329],[211,328],[198,196],[197,91],[249,64],[455,93],[531,217],[597,264],[766,118]]; + + private var scene9:Array = [[45,379],[163,293],[131,191],[165,84],[347,86],[457,99],[615,104],[708,182],[820,127]]; + + private var scene10:Array = [[38,351],[159,370],[301,354],[454,369],[608,309],[729,185],[654,124],[486,109],[360,142]]; + + private var _width2:int = 120; + + private var _height2:int = 34; + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var bg3:Sprite; + + private var bg4:Sprite; + + private var hpText:TextField; + + private var battleObj:Object; + + private var loadMap:LoadResource; + + private var preUrl:String; + + private var box1:RiskBoxMc; + + private var box2:RiskBoxMc; + + private var box3:RiskBoxMc; + + private var mapPng:Bitmap; + + private var titlePng:Bitmap; + + private var titleLoadMap:LoadResource; + + private var linePngArr:Vector. = new Vector.(); + + private var lineNum:int = 1; + + private var lineLoad:LoadResource; + + private var currScene:String; + + private var battleMcArr:Array = new Array(); + + public function RiskBattleUI() + { + super(); + super.addUIBg(); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + this.hpText = PublicMethod.getTextFieldWithFillter(16776960,100); + this.bg1.addChild(this.hpText); + this.hpText.x = 670; + this.hpText.y = 12; + this.hpText.text = "体力:150/150"; + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(622 + this._width2,332 + this._height2); + this.bg1.addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = 34; + this.bg3 = new Sprite(); + this.bg1.addChild(this.bg3); + this.bg3.x = 6; + this.bg3.y = 36; + this.bg4 = new Sprite(); + this.bg1.addChild(this.bg4); + this.bg4.x = 6; + this.bg4.y = 36; + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_USERRISK,this.userChangeResult); + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_USERRISKSCENE,this.userRiskSceneResult); + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_GETAWARD,this.getRiskAwardResult); + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_COMBAT,this.fightResult); + this.userChangeResult(null); + } + + public static function getInstance() : RiskBattleUI + { + if(instance == null) + { + return instance = new RiskBattleUI(); + } + return instance; + } + + 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; + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + } + + override public function reSizeWindow(param1:Event) : void + { + } + + private function fightResult(param1:DevEvent) : void + { + var _loc4_:RiskWinUI = null; + var _loc5_:RiskFaileUI = null; + var _loc2_:Object = param1.obj; + var _loc3_:String = _loc2_.warResult; + if(_loc3_ == "ATTACKER") + { + _loc4_ = RiskWinUI.getInstance(); + _loc4_.showResult(_loc2_); + _loc4_.setBackF(null); + addChild(_loc4_); + _loc4_.x = int(784 / 2 - 492 / 2); + _loc4_.y = int(496 / 2 - 344 / 2); + } + else + { + _loc5_ = RiskFaileUI.getInstance(); + _loc5_.showResult(_loc2_); + _loc5_.setBackF(null); + addChild(_loc5_); + _loc5_.x = int(784 / 2 - 492 / 2); + _loc5_.y = int(496 / 2 - 344 / 2); + } + } + + public function setBattleObj(param1:Object) : void + { + this.battleObj = param1; + } + + public function showBattle() : void + { + var _loc1_:String = "pic/riskmap/" + this.battleObj.pic + ".jpg"; + this.startLoadMap(_loc1_); + } + + private function startLoadMap(param1:String) : void + { + if(this.preUrl == param1) + { + return; + } + this.preUrl = param1; + this.clear(); + if(Boolean(this.mapPng) && this.bg2.contains(this.mapPng)) + { + this.bg2.removeChild(this.mapPng); + } + if(ImgCache.getInstance().getImg(param1)) + { + this.mapPng = new Bitmap(); + this.mapPng.bitmapData = ImgCache.getInstance().getImg(param1).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadMap = new LoadResource(param1,this.loadPngBack); + } + this.startLoadTitle("scene" + this.battleObj.id + "_title.png"); + this.lineNum = 1; + this.currScene = this.battleObj.pic; + this.startLoadLine(); + this.loadBattleInfo(); + if(this.box1 == null) + { + this.box1 = new RiskBoxMc(1); + this.bg4.addChild(this.box1); + this.box1.x = 250; + this.box1.y = 360; + this.box1.addEventListener(MouseEvent.CLICK,this.showBoxItem1); + this.box2 = new RiskBoxMc(2); + this.bg4.addChild(this.box2); + this.box2.x = 375; + this.box2.y = this.box1.y; + this.box2.addEventListener(MouseEvent.CLICK,this.showBoxItem2); + this.box3 = new RiskBoxMc(3); + this.bg4.addChild(this.box3); + this.box3.x = 500; + this.box3.y = this.box1.y; + this.box3.addEventListener(MouseEvent.CLICK,this.showBoxItem3); + } + this.initAwardBox(); + this.initBattleStatus(); + } + + private function loadPngBack(param1:Event) : void + { + this.mapPng = param1.target.loader.content as Bitmap; + this.loadMap.clear(); + this.setImgValue(); + ImgCache.getInstance().setImg(this.loadMap.url,this.mapPng); + } + + private function setImgValue() : void + { + this.bg2.addChild(this.mapPng); + this.mapPng.x = 2; + this.mapPng.y = 2; + this.mapPng.width *= this.a; + this.mapPng.height *= this.a; + this.mapPng.smoothing = true; + } + + private function clear() : void + { + if(Boolean(this.mapPng) && this.bg2.contains(this.mapPng)) + { + this.bg2.removeChild(this.mapPng); + } + this.clearLinePng(); + if(Boolean(this.titlePng) && ui_bg.contains(this.titlePng)) + { + ui_bg.removeChild(this.titlePng); + } + } + + private function startLoadTitle(param1:String) : void + { + var _loc2_:String = ServerConfig.IMAGE_URL + "risk_section/" + param1; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.titlePng = new Bitmap(); + this.titlePng.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setTitleImgValue(); + } + else + { + this.titleLoadMap = new LoadResource(_loc2_,this.loadTitleBack); + } + } + + private function loadTitleBack(param1:Event) : void + { + this.titlePng = param1.target.loader.content as Bitmap; + this.titleLoadMap.clear(); + this.setTitleImgValue(); + ImgCache.getInstance().setImg(this.titleLoadMap.url,this.titlePng); + } + + private function setTitleImgValue() : void + { + ui_bg.addChild(this.titlePng); + this.titlePng.x = int(ui_bg.width / 2 - this.titlePng.width / 2); + this.titlePng.y = 1; + this.titlePng.smoothing = true; + } + + private function startLoadLine() : void + { + var _loc2_:Bitmap = null; + var _loc1_:String = "pic/riskmap/route/" + this.currScene + "/" + this.lineNum + ".png"; + if(ImgCache.getInstance().getImg(_loc1_)) + { + _loc2_ = new Bitmap(); + _loc2_.bitmapData = ImgCache.getInstance().getImg(_loc1_).bitmapData.clone(); + this.setLineImgValue(_loc2_); + ++this.lineNum; + if(this.lineNum < 10) + { + this.startLoadLine(); + } + } + else + { + this.lineLoad = new LoadResource(_loc1_,this.loadLineBack); + } + } + + private function loadLineBack(param1:Event) : void + { + var _loc2_:Bitmap = param1.target.loader.content as Bitmap; + this.setLineImgValue(_loc2_); + ++this.lineNum; + ImgCache.getInstance().setImg(this.lineLoad.url,_loc2_); + if(this.lineNum < 10) + { + this.startLoadLine(); + } + else + { + this.lineLoad.clear(); + } + } + + private function setLineImgValue(param1:Bitmap) : void + { + this.bg3.addChild(param1); + var _loc2_:int = int(this[this.currScene][this.lineNum - 1][0]); + var _loc3_:int = int(this[this.currScene][this.lineNum - 1][1]); + param1.x = int(_loc2_ * this.a); + param1.y = int(_loc3_ * this.a); + param1.width = int(param1.width * this.a); + param1.height = int(param1.height * this.a); + param1.smoothing = true; + this.linePngArr.push(param1); + } + + private function clearLinePng() : void + { + var _loc1_:Bitmap = null; + for each(_loc1_ in this.linePngArr) + { + if(Boolean(_loc1_) && this.bg3.contains(_loc1_)) + { + this.bg3.removeChild(_loc1_); + } + } + this.linePngArr = new Vector.(); + } + + private function loadBattleInfo() : void + { + var _loc3_:Object = null; + var _loc4_:* = undefined; + var _loc5_:RiskMc2 = null; + var _loc1_:Array = GameData.getRiskSceneList(this.battleObj.id); + if(this.battleMcArr.length > 0) + { + for(_loc4_ in this.battleMcArr) + { + this.battleMcArr[_loc4_].setObj(_loc1_[_loc4_]); + this.battleMcArr[_loc4_].x = int(_loc1_[_loc4_].posx * this.a); + this.battleMcArr[_loc4_].y = int(_loc1_[_loc4_].posy * this.a); + } + return; + } + var _loc2_:Object = GameData.getUserRiskSceneBySeqId(this.battleObj.id); + for each(_loc3_ in _loc1_) + { + _loc5_ = new RiskMc2(_loc3_); + this.bg4.addChild(_loc5_); + _loc5_.x = int(_loc3_.posx * this.a); + _loc5_.y = int(_loc3_.posy * this.a); + this.battleMcArr.push(_loc5_); + } + } + + private function initAwardBox() : void + { + var _loc1_:Object = GameData.getUserRiskSceneBySeqId(this.battleObj.id); + if(_loc1_.award1 == 1) + { + this.box1.setStatus(3); + } + else if(_loc1_.passNums >= 10) + { + this.box1.setStatus(2); + } + else + { + this.box1.setStatus(1,_loc1_.passNums); + } + if(_loc1_.award2 == 1) + { + this.box2.setStatus(3); + } + else if(_loc1_.passNums >= 20) + { + this.box2.setStatus(2); + } + else + { + this.box2.setStatus(1,_loc1_.passNums); + } + if(_loc1_.award3 == 1) + { + this.box3.setStatus(3); + } + else if(_loc1_.passNums >= 30) + { + this.box3.setStatus(2); + } + else + { + this.box3.setStatus(1,_loc1_.passNums); + } + } + + private function initBattleStatus() : void + { + var _loc2_:RiskMc2 = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:Object = null; + var _loc7_:int = 0; + var _loc1_:Object = GameData.getUserRiskSceneBySeqId(this.battleObj.id); + if(this.battleMcArr.length > 0) + { + for each(_loc2_ in this.battleMcArr) + { + _loc3_ = int(_loc2_.getObj().sceneId); + _loc4_ = this.getBattleStatus(_loc1_.sceneStr,_loc3_); + _loc5_ = _loc3_ % 100; + _loc2_.visible = true; + if(_loc5_ == 1) + { + if(_loc4_ == 0) + { + _loc2_.showStar(0); + _loc2_.showEff(); + } + else + { + _loc2_.showStar(_loc4_); + _loc2_.unShowEff(); + } + } + else if(_loc4_ == 0) + { + _loc6_ = GameData.getRiskSceneBySceneId(this.battleObj.id,_loc3_); + _loc7_ = this.getBattleStatus(_loc1_.sceneStr,_loc6_.prevSceneId); + if(_loc7_ == 0) + { + _loc2_.visible = false; + _loc2_.unShowEff(); + } + else + { + _loc2_.showStar(0); + _loc2_.showEff(); + } + } + else + { + _loc2_.showStar(_loc4_); + _loc2_.unShowEff(); + } + } + } + } + + private function getBattleStatus(param1:String, param2:int) : int + { + var _loc4_:String = null; + var _loc5_:Array = null; + var _loc3_:Array = param1.split(";"); + for each(_loc4_ in _loc3_) + { + _loc5_ = _loc4_.split(","); + if(_loc5_[0] == param2) + { + return _loc5_[1]; + } + } + return 0; + } + + private function showBoxItem1(param1:MouseEvent) : void + { + var _loc2_:RiskAwardUI = RiskAwardUI.getInstance(); + _loc2_.setStar(1); + _loc2_.showBox(this.battleObj); + addChild(_loc2_); + _loc2_.x = int(width / 2 - _loc2_.width / 2); + _loc2_.y = int(height / 2 - _loc2_.height / 2); + var _loc3_:Object = GameData.getUserRiskSceneBySeqId(this.battleObj.id); + if(_loc3_.award1 == 1) + { + _loc2_.setStatus(3); + } + else if(_loc3_.passNums >= 10) + { + _loc2_.setStatus(2); + } + else + { + _loc2_.setStatus(1); + } + } + + override public function removeFromStage(param1:Event) : void + { + if(Boolean(RiskAwardUI.instance) && contains(RiskAwardUI.instance)) + { + removeChild(RiskAwardUI.instance); + } + var _loc2_:RiskFaileUI = RiskFaileUI.instance; + if(Boolean(_loc2_) && this.contains(_loc2_)) + { + removeChild(_loc2_); + } + var _loc3_:RiskWinUI = RiskWinUI.instance; + if(Boolean(_loc3_) && this.contains(_loc3_)) + { + removeChild(_loc3_); + } + } + + private function showBoxItem2(param1:MouseEvent) : void + { + var _loc2_:RiskAwardUI = RiskAwardUI.getInstance(); + _loc2_.setStar(2); + _loc2_.showBox(this.battleObj); + addChild(_loc2_); + _loc2_.x = int(width / 2 - _loc2_.width / 2); + _loc2_.y = int(height / 2 - _loc2_.height / 2); + var _loc3_:Object = GameData.getUserRiskSceneBySeqId(this.battleObj.id); + if(_loc3_.award2 == 1) + { + _loc2_.setStatus(3); + } + else if(_loc3_.passNums >= 20) + { + _loc2_.setStatus(2); + } + else + { + _loc2_.setStatus(1); + } + } + + private function showBoxItem3(param1:MouseEvent) : void + { + var _loc2_:RiskAwardUI = RiskAwardUI.getInstance(); + _loc2_.setStar(3); + _loc2_.showBox(this.battleObj); + addChild(_loc2_); + _loc2_.x = int(width / 2 - _loc2_.width / 2); + _loc2_.y = int(height / 2 - _loc2_.height / 2); + var _loc3_:Object = GameData.getUserRiskSceneBySeqId(this.battleObj.id); + if(_loc3_.award3 == 1) + { + _loc2_.setStatus(3); + } + else if(_loc3_.passNums >= 30) + { + _loc2_.setStatus(2); + } + else + { + _loc2_.setStatus(1); + } + } + + private function userChangeResult(param1:DevEvent) : void + { + var _loc2_:Object = GameData.getUserRisk(); + this.hpText.text = "体力:" + _loc2_.hppoint + "/" + _loc2_.maxHpPoint; + } + + private function userRiskSceneResult(param1:DevEvent) : void + { + var _loc2_:Object = null; + if(param1.id == this.battleObj.id && Boolean(this.box1)) + { + this.initAwardBox(); + if(this.battleMcArr.length > 0) + { + _loc2_ = this.battleMcArr[0].getObj(); + if(_loc2_.parentId != this.battleObj.id) + { + this.loadBattleInfo(); + } + } + this.initBattleStatus(); + } + } + + private function getRiskAwardResult(param1:DevEvent) : void + { + var _loc2_:int = param1.id; + if(_loc2_ == this.battleObj.id) + { + this.initAwardBox(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/RiskFaileUI.as b/flash_decompiled/com/view/ui/risk/RiskFaileUI.as new file mode 100644 index 0000000..6947a4e --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/RiskFaileUI.as @@ -0,0 +1,188 @@ +package com.view.ui.risk +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.newui.UIButton; + import com.view.newui.UILabel; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.battle.BattleViewUI; + import com.view.ui.risk.mc.RiskBattleResultMc1; + import flash.display.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.utils.clearInterval; + import flash.utils.setInterval; + + public class RiskFaileUI extends BaseUI + { + + public static var instance:RiskFaileUI; + + private var _width2:int = -171; + + private var _height2:int = -115; + + public var game:GameUIRes; + + private var bg1:UIWindowBg; + + private var btn1:UIButton; + + private var contentLabel:UILabel; + + private var battleResultMc:RiskBattleResultMc1; + + private var intervalId:uint; + + private var intervalDuration:Number = 1000; + + private var counter:int = 15; + + private var backF:Function; + + private var combatId:String; + + public function RiskFaileUI() + { + var _loc2_:Bitmap = null; + var _loc3_:Bitmap = null; + this.game = GameUIRes.getInstance(); + super(); + super.addUIBg(); + super.loadTitle(ClassConfig.title_battleresult); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:Bitmap = this.game.getBitMap("battle_losebg",this.game.getApplication(GameUIRes.swfUrl_2)); + _loc1_.x = 2; + _loc1_.y = 2; + this.bg1.addChild(_loc1_); + _loc2_ = this.game.getBitMap("battle_losebg1",this.game.getApplication(GameUIRes.swfUrl_2)); + _loc2_.x = int(this.bg1.width / 2 - _loc2_.width / 2); + _loc2_.y = 20; + this.bg1.addChild(_loc2_); + _loc3_ = this.game.getBitMap("battle_1",this.game.getApplication(GameUIRes.swfUrl_2)); + _loc3_.x = int(this.bg1.width / 2 - _loc3_.width / 2); + _loc3_.y = 145; + this.bg1.addChild(_loc3_); + this.battleResultMc = new RiskBattleResultMc1(); + this.bg1.addChild(this.battleResultMc); + this.battleResultMc.x = 170; + this.battleResultMc.y = 60; + this.battleResultMc.setResultScore(4); + this.contentLabel = new UILabel(450); + this.contentLabel.x = 10; + this.contentLabel.y = 152; + this.contentLabel.setTextForMat(PublicMethod.getCenterTextFormat()); + this.bg1.addChild(this.contentLabel); + this.contentLabel.setText("千重楼第255层 君主经验:289 武将池经验:1122"); + this.btn1 = new UIButton("查看战斗",3); + this.bg1.addChild(this.btn1); + this.btn1.x = 290; + this.btn1.y = 260; + this.btn1.onClick = this.showBattle; + var _loc4_:UIButton = new UIButton("关 闭",2); + this.bg1.addChild(_loc4_); + _loc4_.x = 380; + _loc4_.y = 260; + _loc4_.onClick = this.closeUI; + } + + public static function getInstance() : RiskFaileUI + { + if(instance == null) + { + return instance = new RiskFaileUI(); + } + return instance; + } + + 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; + } + + override public function reSizeWindow(param1:Event) : void + { + } + + public function showResult(param1:Object) : void + { + var _loc2_:int = int(param1.resultScore); + this.combatId = param1.combatId; + this.battleResultMc.setResultScore(_loc2_); + var _loc3_:int = int(param1.type); + var _loc4_:String = ""; + if(_loc3_ == 1) + { + _loc4_ = "简单模式"; + } + if(_loc3_ == 2) + { + _loc4_ = "普通模式"; + } + if(_loc3_ == 3) + { + _loc4_ = "困难模式"; + } + this.contentLabel.setText(_loc4_ + " 胜败乃兵家常事,主公可以通过以下方式提升战力"); + this.startT(); + } + + private function startT() : void + { + this.counter = 15; + this.btn1.visible = true; + if(this.intervalId) + { + clearInterval(this.intervalId); + } + this.btn1.setText("查看战斗15"); + this.intervalId = setInterval(this.myRepeatingFunction,this.intervalDuration); + } + + public function myRepeatingFunction() : void + { + --this.counter; + this.btn1.setText("查看战斗" + this.counter); + if(this.counter == 0) + { + this.btn1.visible = false; + clearInterval(this.intervalId); + } + } + + public function setBackF(param1:Function) : void + { + this.backF = param1; + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + if(Boolean(this.backF)) + { + this.backF(); + } + } + + private function showBattle(param1:MouseEvent) : void + { + var _loc2_:BattleViewUI = BattleViewUI.getInstance(); + _loc2_.showUI(this.combatId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/RiskMainUI.as b/flash_decompiled/com/view/ui/risk/RiskMainUI.as new file mode 100644 index 0000000..2f69801 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/RiskMainUI.as @@ -0,0 +1,139 @@ +package com.view.ui.risk +{ + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.activity.ActivityBase; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class RiskMainUI extends ActivityBase + { + + private static var instance:RiskMainUI; + + private var _width2:int = 24; + + private var _height2:int = 60; + + public var btnArr:Array; + + private var paneBg:UIWindowBg; + + private var preBtn:UITabBtn; + + private var prePage:Sprite; + + private var page1:RiskPage1; + + public var page2:RiskPage2; + + public function RiskMainUI() + { + super(); + loadRes(GameUIRes.swfUrl_2); + } + + public static function getInstance() : RiskMainUI + { + if(instance == null) + { + return instance = new RiskMainUI(); + } + return instance; + } + + 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; + } + + override public function createUI() : void + { + var _loc3_:int = 0; + var _loc4_:UITabBtn = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_gerenzhanyi); + super.setPosition(); + 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 + this._width2,400 + this._height2 - 26); + ui_bg.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 RiskPage1(); + this.page1.x = 4; + this.page1.y = 4; + } + this.page1.getHeroList(); + this.prePage = this.page1; + } + if(this.btnArr[1] == this.preBtn) + { + if(this.page2 == null) + { + this.page2 = new RiskPage2(); + this.page2.x = 2; + this.page2.y = 2; + } + this.prePage = this.page2; + } + this.paneBg.addChild(this.prePage); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(Boolean(this.page1) && this.prePage == this.page1) + { + this.page1.getHeroList(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/RiskPage1.as b/flash_decompiled/com/view/ui/risk/RiskPage1.as new file mode 100644 index 0000000..0b94649 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/RiskPage1.as @@ -0,0 +1,326 @@ +package com.view.ui.risk +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.GameData; + import com.data.data.hero.Hero; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIHeroItem; + import com.view.newui.UILabel; + import com.view.newui.UISmallBtn; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.HeroConst; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.risk.mc.RiskRankMc; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class RiskPage1 extends UIBase + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var value1:UILabel; + + private var value2:UILabel; + + private var value3:UILabel; + + private var value4:UILabel; + + private var value5:UILabel; + + private var heroMcVec:Vector.; + + private var powerText:TextField; + + private var heroIdList:Vector.; + + private var rankMcVec:Vector.; + + public function RiskPage1() + { + var _loc3_:UILabel = null; + var _loc4_:UILabel = null; + var _loc7_:Sprite = null; + var _loc11_:UIWindowBg = null; + var _loc15_:UITable = null; + var _loc16_:int = 0; + var _loc18_:RiskRankMc = null; + var _loc19_:UIHeroItem = null; + this.heroIdList = new Vector.(); + this.rankMcVec = new Vector.(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(421,298); + addChild(this.bg1); + var _loc1_:UILabel = new UILabel(150,UIConfig.textColor); + this.bg1.addChild(_loc1_); + _loc1_.x = 80; + _loc1_.y = 30; + _loc1_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc1_.setText("当前体力值:"); + this.value1 = new UILabel(100); + this.bg1.addChild(this.value1); + this.value1.x = _loc1_.x + _loc1_.width + 10; + this.value1.y = _loc1_.y; + var _loc2_:UILabel = new UILabel(150,UIConfig.textColor); + this.bg1.addChild(_loc2_); + _loc2_.x = _loc1_.x; + _loc2_.y = _loc1_.y + 24; + _loc2_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc2_.setText("当前体力最大值:"); + this.value2 = new UILabel(100); + this.bg1.addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc2_.y; + _loc3_ = new UILabel(150,UIConfig.textColor); + this.bg1.addChild(_loc3_); + _loc3_.x = _loc1_.x; + _loc3_.y = _loc2_.y + 24; + _loc3_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc3_.setText("正在通关:"); + this.value3 = new UILabel(100); + this.bg1.addChild(this.value3); + this.value3.x = this.value1.x; + this.value3.y = _loc3_.y; + _loc4_ = new UILabel(150,UIConfig.textColor); + this.bg1.addChild(_loc4_); + _loc4_.x = _loc1_.x; + _loc4_.y = _loc3_.y + 24; + _loc4_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc4_.setText("体力恢复时间:"); + this.value4 = new UILabel(100,16711680); + this.bg1.addChild(this.value4); + this.value4.x = this.value1.x; + this.value4.y = _loc4_.y; + this.value4.setText("00:00:00"); + var _loc5_:UILabel = new UILabel(150,UIConfig.textColor); + this.bg1.addChild(_loc5_); + _loc5_.x = _loc1_.x; + _loc5_.y = _loc4_.y + 24; + _loc5_.setTextForMat(PublicMethod.getRightTextFormat()); + _loc5_.setText("今日剩余使用道具次数:"); + this.value5 = new UILabel(100); + this.bg1.addChild(this.value5); + this.value5.x = this.value1.x; + this.value5.y = _loc5_.y; + this.value5.setText(""); + var _loc6_:UISmallBtn = new UISmallBtn("使 用",2); + this.bg1.addChild(_loc6_); + _loc6_.x = this.value5.x + 30; + _loc6_.y = _loc5_.y; + _loc6_.onClick = this.useHpItem; + ToolTipManager.getInstance().setToolTip(_loc6_,new TxtTooltip("使用道具 瑶台雨露 可增加体力值"),false,-1,false); + _loc7_ = PublicMethod.getTrLine(406); + this.bg1.addChild(_loc7_); + _loc7_.x = 4; + _loc7_.y = 170; + var _loc8_:TextField = PublicMethod.getMulTextField(UIConfig.textColor,400,110); + this.bg1.addChild(_loc8_); + _loc8_.x = 10; + _loc8_.y = _loc7_.y + 10; + var _loc9_:TextFormat = new TextFormat(); + _loc9_.leading = 6; + _loc8_.defaultTextFormat = _loc9_; + var _loc10_:String = "1、战役共包含91大关卡,每大关卡包含10s个小关卡,关卡里会掉落君主经验、武将池经验、武将装备与琉璃等。"; + _loc10_ = _loc10_ + "
2、每关卡会消耗一定的体力值,体力值每隔15分钟刷新一次,每次增长5点,达到体力最大值即停止增长。"; + _loc10_ = _loc10_ + "
3、初始体力最大值为300。"; + _loc10_ = _loc10_ + "
4、通过前置关卡才能开启下一关。"; + _loc8_.htmlText = _loc10_; + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(121 + 89,298); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 4; + this.bg2.y = this.bg1.y; + _loc11_ = new UIWindowBg(); + _loc11_.initThirdPanel(645,114); + addChild(_loc11_); + _loc11_.x = this.bg1.x; + _loc11_.y = this.bg1.y + this.bg1.height + 4; + var _loc12_:UITitleBg = new UITitleBg("通关排名",this.bg2.width); + this.bg2.addChild(_loc12_); + _loc12_.x = int(this.bg2.width / 2 - _loc12_.width / 2); + var _loc13_:Array = ["名次","君主名称","关卡"]; + var _loc14_:Array = [45,113,60]; + _loc15_ = new UITable(); + _loc15_.drawLine = true; + _loc15_.lineHeight = 26; + _loc15_.install(10,_loc13_,_loc14_); + this.bg2.addChild(_loc15_); + _loc15_.x = 2; + _loc15_.y = 23; + _loc16_ = 1; + while(_loc16_ < 11) + { + _loc18_ = new RiskRankMc(_loc16_); + _loc15_.addChild(_loc18_); + _loc18_.y = 29 + 26 * (_loc16_ - 1); + _loc18_.x = 2; + this.rankMcVec.push(_loc18_); + _loc16_++; + } + this.heroMcVec = new Vector.(); + _loc16_ = 0; + while(_loc16_ < 5) + { + _loc19_ = new UIHeroItem(); + _loc11_.addChild(_loc19_); + _loc19_.x = 8 + _loc16_ * 128; + _loc19_.y = 5; + this.heroMcVec.push(_loc19_); + _loc16_++; + } + var _loc17_:UIButton = new UIButton("武将设置",2,10); + _loc11_.addChild(_loc17_); + _loc17_.x = 10; + _loc17_.y = 95; + _loc17_.onClick = this.selectHero; + this.powerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc11_.addChild(this.powerText); + this.powerText.x = _loc17_.x + 100; + this.powerText.y = _loc17_.y + 3; + this.powerText.htmlText = "武将战斗力:0"; + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_USERRISK,this.userRiskResult); + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_HEROLIST,this.heroListResult); + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_RANK,this.getRankResult); + this.initData(); + GameData.setTechBackF(this.setLeftTime); + this.getRankList(); + } + + private function getRankList() : void + { + ConnectService.getInstance().riskService.getRishRank(); + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance(); + _loc2_.setSelectheroArr(this.heroIdList); + var _loc3_:RiskMainUI = RiskMainUI.getInstance(); + _loc3_.addChild(_loc2_); + _loc2_.x = 14; + _loc2_.y = 40; + _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().riskService.changeHero(_loc2_); + } + + public function getHeroList() : void + { + ConnectService.getInstance().riskService.getHeroListMap(); + } + + private function heroListResult(param1:DevEvent) : void + { + var _loc2_:Object = param1.obj; + var _loc3_:Number = Math.round(_loc2_.monsterPower); + this.powerText.htmlText = "武将战斗力:" + _loc3_ + ""; + var _loc4_:Array = _loc2_.atkHeroList as Array; + this.initHeroView(_loc4_); + } + + 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); + } + } + } + + private function clearHeroIdList() : void + { + if(this.heroIdList.length > 0) + { + this.heroIdList = new Vector.(); + } + } + + private function userRiskResult(param1:DevEvent) : void + { + this.initData(); + } + + private function initData() : void + { + var _loc1_:Object = GameData.getUserRisk(); + this.value1.setText(_loc1_.hppoint); + this.value2.setText(_loc1_.maxHpPoint); + this.value3.setText(_loc1_.bigStageIdStr); + this.value5.setText(_loc1_.useItemTimes); + } + + private function useHpItem(param1:MouseEvent) : void + { + ConnectService.getInstance().riskService.useAddHpItem(); + } + + private function setLeftTime(param1:int) : void + { + this.value4.setText(Utils.formatSeconds(param1)); + } + + private function getRankResult(param1:DevEvent) : void + { + var _loc2_:Object = param1.obj; + var _loc3_:int = 1; + while(_loc3_ < 11) + { + if(_loc2_[_loc3_]) + { + this.rankMcVec[_loc3_ - 1].setObj(_loc2_[_loc3_]); + } + else + { + this.rankMcVec[_loc3_ - 1].setObj(null); + } + _loc3_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/RiskPage2.as b/flash_decompiled/com/view/ui/risk/RiskPage2.as new file mode 100644 index 0000000..9357842 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/RiskPage2.as @@ -0,0 +1,207 @@ +package com.view.ui.risk +{ + import com.common.DragTools; + import com.control.ConnectService; + import com.data.GameData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIWindowBg; + import com.view.ui.risk.mc.RiskMc; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.geom.Rectangle; + + public class RiskPage2 extends UIBase + { + + private var bg1:UIWindowBg; + + private var mapSp:Sprite; + + private var dragSp:Sprite; + + private var _dragWidth:int = 660; + + private var preMaxMapId:int; + + private var mcVec:Vector. = new Vector.(); + + private var window:Rectangle; + + private var isFirst:int = -1; + + private var dragRec:Rectangle; + + private var dragTools:DragTools; + + public function RiskPage2() + { + super(); + this.mapSp = new Sprite(); + addChild(this.mapSp); + this.dragSp = new Sprite(); + this.mapSp.addChild(this.dragSp); + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_CONFIG,this.getConfigResult); + Utils.g_events.addEventListener(DevEvent.EVENT_RISKRCENE_CONFIG,this.getRiskRceneOk); + Utils.g_events.addEventListener(DevEvent.EVENT_RISK_USERRISK,this.getUserRiskResult); + this.getRiskMain(); + } + + private function getRiskRceneOk(param1:DevEvent) : void + { + var _loc2_:RiskBattleUI = RiskBattleUI.getInstance(); + _loc2_.showBattle(); + var _loc3_:RiskMainUI = RiskMainUI.getInstance(); + _loc3_.addChild(_loc2_); + _loc2_.x = int(688 / 2 - 782 / 2); + _loc2_.y = 10; + } + + private function getRiskMain() : void + { + ConnectService.getInstance().riskService.getRishMain(); + } + + private function getConfigResult(param1:DevEvent) : void + { + var _loc5_:int = 0; + var _loc7_:Object = null; + var _loc9_:* = undefined; + var _loc10_:* = undefined; + var _loc11_:RiskMc = null; + var _loc12_:RiskMc = null; + var _loc13_:Object = null; + var _loc2_:Object = GameData.getRiskConfigObj(); + var _loc3_:Object = GameData.getUserRisk(); + var _loc4_:Array = _loc2_.riskMapList; + var _loc6_:int = int(_loc3_.bigStageId); + if(_loc6_ > 91) + { + _loc6_ = 91; + } + for each(_loc7_ in _loc4_) + { + _loc9_ = _loc7_.parentsceneid; + if(this.checkSceneId(_loc9_,_loc6_ + "")) + { + this.preMaxMapId = _loc7_.id; + _loc5_ = int(_loc7_.pageTurn); + break; + } + } + if(_loc3_.bigStageId > _loc5_) + { + this.preMaxMapId += 1; + } + if(this.preMaxMapId > _loc4_.length) + { + this.preMaxMapId = _loc4_.length; + } + var _loc8_:int = 0; + while(_loc8_ < this.preMaxMapId) + { + _loc10_ = _loc4_[_loc8_].id; + _loc11_ = this.getRiskMc(_loc10_); + if(_loc11_ != null) + { + _loc11_.updateStatus(); + } + else + { + _loc12_ = new RiskMc(this.dragSp); + this.mcVec.push(_loc12_); + this.dragSp.addChild(_loc12_); + _loc12_.mouseEnabled = false; + _loc12_.mouseChildren = false; + _loc12_.loadRes(_loc4_[_loc8_]); + _loc12_.x = 660 * _loc8_; + this._dragWidth -= 660; + } + _loc8_++; + } + this.window = new Rectangle(0,0,660,440); + this.mapSp.scrollRect = this.window; + this.dragRec = new Rectangle(0,0,this._dragWidth,0); + if(this.isFirst == -1 && _loc3_.bigStageId > 4) + { + _loc13_ = GameData.getRiskParentSceneObjById(_loc6_); + this.dragSp.x = -_loc13_.posx1; + if(this.dragSp.x < this._dragWidth) + { + this.dragSp.x = this._dragWidth; + } + this.isFirst = 1; + } + this.addDragEvent(); + } + + private function getRiskMc(param1:int) : RiskMc + { + var _loc2_:RiskMc = null; + for each(_loc2_ in this.mcVec) + { + if(_loc2_.getId() == param1) + { + return _loc2_; + } + } + return null; + } + + private function getUserRiskResult(param1:DevEvent) : void + { + this.getConfigResult(param1); + } + + private function checkSceneId(param1:String, param2:String) : Boolean + { + var _loc4_:String = null; + var _loc3_:Array = param1.split(","); + for each(_loc4_ in _loc3_) + { + if(_loc4_ == param2) + { + return true; + } + } + return false; + } + + private function addDragEvent() : void + { + this.dragTools = new DragTools(this.dragSp,{"methods":"s"}); + addEventListener(MouseEvent.MOUSE_DOWN,this.mouseDownHandler); + } + + private function mouseDownHandler(param1:MouseEvent) : void + { + face.stage.addEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + face.stage.addEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + face.stage.addEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseMove(param1:MouseEvent) : void + { + face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + this.dragTools.beginDrag(false,this.dragRec); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + + private function mouseUp(param1:MouseEvent) : void + { + this.dragTools.endDrag(); + face.stage.removeEventListener(MouseEvent.MOUSE_MOVE,this.mouseMove); + face.stage.removeEventListener(MouseEvent.MOUSE_OUT,this.mouseOut); + face.stage.removeEventListener(MouseEvent.MOUSE_UP,this.mouseUp); + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/RiskWinUI.as b/flash_decompiled/com/view/ui/risk/RiskWinUI.as new file mode 100644 index 0000000..cb164d8 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/RiskWinUI.as @@ -0,0 +1,239 @@ +package com.view.ui.risk +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.newui.UIButton; + import com.view.newui.UILabel; + import com.view.newui.UIWindowBg; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.ui.battle.BattleViewUI; + import com.view.ui.risk.mc.ItemShowMc; + import com.view.ui.risk.mc.RiskBattleResultMc1; + import flash.display.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.utils.clearInterval; + import flash.utils.setInterval; + + public class RiskWinUI extends BaseUI + { + + public static var instance:RiskWinUI; + + private var _width2:int = -171; + + private var _height2:int = -115; + + public var game:GameUIRes; + + private var bg1:UIWindowBg; + + private var btn1:UIButton; + + private var contentLabel:UILabel; + + private var battleResultMc:RiskBattleResultMc1; + + private var combatId:String; + + private var intervalId:uint; + + private var intervalDuration:Number = 1000; + + private var counter:int = 15; + + private var itemListVec:Vector.; + + private var backF:Function; + + public function RiskWinUI() + { + var _loc2_:Bitmap = null; + var _loc3_:Bitmap = null; + var _loc5_:UIButton = null; + var _loc6_:ItemShowMc = null; + this.game = GameUIRes.getInstance(); + super(); + super.addUIBg(); + super.loadTitle(ClassConfig.title_battleresult); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:Bitmap = this.game.getBitMap("battle_winbg",this.game.getApplication(GameUIRes.swfUrl_2)); + _loc1_.x = 2; + _loc1_.y = 2; + this.bg1.addChild(_loc1_); + _loc2_ = this.game.getBitMap("battle_winbg1",this.game.getApplication(GameUIRes.swfUrl_2)); + _loc2_.x = int(this.bg1.width / 2 - _loc2_.width / 2); + _loc2_.y = 10; + this.bg1.addChild(_loc2_); + _loc3_ = this.game.getBitMap("battle_1",this.game.getApplication(GameUIRes.swfUrl_2)); + _loc3_.x = int(this.bg1.width / 2 - _loc3_.width / 2); + _loc3_.y = 145; + this.bg1.addChild(_loc3_); + this.battleResultMc = new RiskBattleResultMc1(); + this.bg1.addChild(this.battleResultMc); + this.battleResultMc.x = 170; + this.battleResultMc.y = 74; + this.battleResultMc.setResultScore(4); + this.contentLabel = new UILabel(450,16776960); + this.contentLabel.x = 10; + this.contentLabel.y = 152; + this.contentLabel.setTextForMat(PublicMethod.getCenterTextFormat()); + this.bg1.addChild(this.contentLabel); + this.contentLabel.setText("千重楼第255层 君主经验:289 武将池经验:1122"); + this.itemListVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 5) + { + _loc6_ = new ItemShowMc(); + this.itemListVec.push(_loc6_); + this.bg1.addChild(_loc6_); + _loc6_.x = 50 + _loc4_ * 80; + _loc6_.y = 190; + _loc4_++; + } + this.btn1 = new UIButton("查看战斗",3); + this.bg1.addChild(this.btn1); + this.btn1.x = 290; + this.btn1.y = 260; + this.btn1.onClick = this.showBattle; + _loc5_ = new UIButton("关 闭",2); + this.bg1.addChild(_loc5_); + _loc5_.x = 290 + 90; + _loc5_.y = 260; + _loc5_.onClick = this.closeUI; + } + + public static function getInstance() : RiskWinUI + { + if(instance == null) + { + return instance = new RiskWinUI(); + } + return instance; + } + + 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; + } + + override public function reSizeWindow(param1:Event) : void + { + } + + public function showResult(param1:Object) : void + { + var _loc5_:int = 0; + var _loc6_:String = null; + var _loc7_:Array = null; + var _loc8_:int = 0; + var _loc2_:String = param1.combatType; + var _loc3_:Object = param1.dropMap; + this.combatId = param1.combatId; + if(_loc2_ == "RISK") + { + _loc5_ = int(param1.type); + _loc6_ = ""; + if(_loc5_ == 1) + { + _loc6_ = "简单模式"; + } + if(_loc5_ == 2) + { + _loc6_ = "普通模式"; + } + if(_loc5_ == 3) + { + _loc6_ = "困难模式"; + } + this.contentLabel.setText(_loc6_ + " 君主经验:" + _loc3_.userExp + " 武将池经验:" + _loc3_.heroExp); + } + var _loc4_:int = int(param1.resultScore); + this.battleResultMc.setResultScore(_loc4_); + if(_loc3_.dropPackList) + { + _loc7_ = _loc3_.dropPackList; + _loc8_ = 0; + while(_loc8_ < 5) + { + if(_loc7_[_loc8_]) + { + this.itemListVec[_loc8_].setData(_loc7_[_loc8_]); + } + else + { + this.itemListVec[_loc8_].setData(null); + } + _loc8_++; + } + } + else + { + _loc8_ = 0; + while(_loc8_ < 5) + { + this.itemListVec[_loc8_].setData(null); + _loc8_++; + } + } + this.startT(); + } + + private function startT() : void + { + this.counter = 15; + this.btn1.visible = true; + if(this.intervalId) + { + clearInterval(this.intervalId); + } + this.btn1.setText("查看战斗15"); + this.intervalId = setInterval(this.myRepeatingFunction,this.intervalDuration); + } + + public function myRepeatingFunction() : void + { + --this.counter; + this.btn1.setText("查看战斗" + this.counter); + if(this.counter == 0) + { + this.btn1.visible = false; + clearInterval(this.intervalId); + } + } + + public function setBackF(param1:Function) : void + { + this.backF = param1; + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + if(Boolean(this.backF)) + { + this.backF(); + } + } + + private function showBattle(param1:MouseEvent) : void + { + var _loc2_:BattleViewUI = BattleViewUI.getInstance(); + _loc2_.showUI(this.combatId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/mc/ItemShowMc.as b/flash_decompiled/com/view/ui/risk/mc/ItemShowMc.as new file mode 100644 index 0000000..0dfda66 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/mc/ItemShowMc.as @@ -0,0 +1,116 @@ +package com.view.ui.risk.mc +{ + 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.UIBase; + import com.view.newui.UIConfig; + import com.view.tip.ShopItemTip; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class ItemShowMc extends UIBase + { + + private var itemSprite:Sprite; + + private var itemNumsText:TextField; + + private var itemObj:Object; + + private var loadItemPng:LoadResource; + + private var itemsTip:ShopItemTip; + + private var itemImg:Bitmap; + + private var buyItemImg:BitmapData; + + public function ItemShowMc() + { + super(); + var _loc1_:Sprite = new Scale9Grid(face.getSprite(UIConfig.shop_item_bg),49,49); + addChild(_loc1_); + this.itemSprite = new Sprite(); + addChild(this.itemSprite); + this.itemSprite.x = 3; + this.itemSprite.y = 3; + this.itemNumsText = PublicMethod.getTextFieldWithFillter(16777215,50); + addChild(this.itemNumsText); + this.itemNumsText.x = 3; + this.itemNumsText.y = 40; + this.itemNumsText.defaultTextFormat = PublicMethod.getRightTextFormat(); + } + + public function setData(param1:Object) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + this.visible = false; + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + } + if(Boolean(this.itemImg) && this.itemSprite.contains(this.itemImg)) + { + this.itemSprite.removeChild(this.itemImg); + } + return; + } + this.visible = true; + var _loc2_:String = ServerConfig.IMAGE_ITEM_URL + this.itemObj.iconPath; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(_loc2_,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; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemSprite.addChild(this.itemImg); + this.itemImg.width = 53; + this.itemImg.height = 53; + var _loc1_:Bitmap = new Bitmap(); + _loc1_.bitmapData = this.itemImg.bitmapData.clone(); + this.buyItemImg = this.itemImg.bitmapData.clone(); + if(this.itemsTip) + { + this.itemsTip.destroyTip(); + } + this.itemsTip = new ShopItemTip(this.itemSprite,face.stage,face.tip_bg,this.itemObj,_loc1_); + if(this.itemObj.itemNums > 1) + { + this.itemNumsText.text = "" + this.itemObj.itemNums; + } + else + { + this.itemNumsText.text = ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/mc/RiskBattleResultMc1.as b/flash_decompiled/com/view/ui/risk/mc/RiskBattleResultMc1.as new file mode 100644 index 0000000..bba4cea --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/mc/RiskBattleResultMc1.as @@ -0,0 +1,148 @@ +package com.view.ui.risk.mc +{ + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + + public class RiskBattleResultMc1 extends UIBase + { + + private var battle_li:Bitmap; + + private var battle_sheng:Bitmap; + + private var battle_win_da:Bitmap; + + private var battle_win_wan:Bitmap; + + private var battle_win_xian:Bitmap; + + private var battle_win_xiao:Bitmap; + + private var battle_bai:Bitmap; + + private var battle_xi:Bitmap; + + private var battle_lose_da:Bitmap; + + private var battle_lose_wan:Bitmap; + + private var battle_shi:Bitmap; + + public function RiskBattleResultMc1() + { + super(); + this.battle_li = game.getBitMap("battle_li",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_sheng = game.getBitMap("battle_sheng",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_win_da = game.getBitMap("battle_win_da",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_win_wan = game.getBitMap("battle_win_wan",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_win_xian = game.getBitMap("battle_win_xian",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_win_xiao = game.getBitMap("battle_win_xiao",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_bai = game.getBitMap("battle_bai",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_xi = game.getBitMap("battle_xi",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_lose_da = game.getBitMap("battle_lose_da",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_lose_wan = game.getBitMap("battle_lose_wan",game.getApplication(GameUIRes.swfUrl_2)); + this.battle_shi = game.getBitMap("battle_shi",game.getApplication(GameUIRes.swfUrl_2)); + addChild(this.battle_li); + addChild(this.battle_sheng); + addChild(this.battle_win_da); + addChild(this.battle_win_wan); + addChild(this.battle_win_xian); + addChild(this.battle_win_xiao); + addChild(this.battle_bai); + addChild(this.battle_xi); + addChild(this.battle_lose_da); + addChild(this.battle_lose_wan); + addChild(this.battle_shi); + this.battle_li.visible = false; + this.battle_sheng.visible = false; + this.battle_win_da.visible = false; + this.battle_win_wan.visible = false; + this.battle_win_xian.visible = false; + this.battle_win_xiao.visible = false; + this.battle_bai.visible = false; + this.battle_xi.visible = false; + this.battle_lose_da.visible = false; + this.battle_lose_wan.visible = false; + this.battle_shi.visible = false; + } + + public function setResultScore(param1:int) : void + { + this.battle_li.visible = false; + this.battle_sheng.visible = false; + this.battle_win_da.visible = false; + this.battle_win_wan.visible = false; + this.battle_win_xian.visible = false; + this.battle_win_xiao.visible = false; + this.battle_bai.visible = false; + this.battle_xi.visible = false; + this.battle_lose_da.visible = false; + this.battle_lose_wan.visible = false; + this.battle_shi.visible = false; + switch(param1) + { + case 5: + this.battle_win_wan.visible = true; + this.battle_sheng.visible = true; + this.battle_win_wan.x = 0; + this.battle_sheng.x = 79; + break; + case 4: + this.battle_win_da.visible = true; + this.battle_sheng.visible = true; + this.battle_win_da.x = 0; + this.battle_sheng.x = 79; + break; + case 3: + this.battle_sheng.visible = true; + this.battle_li.visible = true; + this.battle_sheng.x = 0; + this.battle_li.x = 79; + break; + case 2: + this.battle_win_xiao.visible = true; + this.battle_sheng.visible = true; + this.battle_sheng.x = 79; + this.battle_win_xiao.x = 0; + break; + case 1: + this.battle_win_xian.visible = true; + this.battle_sheng.visible = true; + this.battle_win_xian.x = 0; + this.battle_sheng.x = 79; + break; + case -1: + this.battle_xi.visible = true; + this.battle_bai.visible = true; + this.battle_xi.x = 0; + this.battle_bai.x = 79; + break; + case -2: + this.battle_shi.visible = true; + this.battle_bai.visible = true; + this.battle_shi.x = 0; + this.battle_bai.x = 79; + break; + case -3: + this.battle_lose_da.visible = true; + this.battle_bai.visible = true; + this.battle_lose_da.x = 0; + this.battle_bai.x = 79; + break; + case -4: + this.battle_lose_wan.visible = true; + this.battle_bai.visible = true; + this.battle_lose_wan.x = 0; + this.battle_bai.x = 79; + break; + case -5: + this.battle_lose_wan.visible = true; + this.battle_bai.visible = true; + this.battle_lose_wan.x = 0; + this.battle_bai.x = 79; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/mc/RiskBoxMc.as b/flash_decompiled/com/view/ui/risk/mc/RiskBoxMc.as new file mode 100644 index 0000000..4dbb248 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/mc/RiskBoxMc.as @@ -0,0 +1,112 @@ +package com.view.ui.risk.mc +{ + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import flash.display.MovieClip; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class RiskBoxMc extends UIBase + { + + private var boxMc:MovieClip; + + private var textLabel:TextField; + + private var type:int; + + private var hpMax:int; + + private var effMc:MovieClip; + + public function RiskBoxMc(param1:int) + { + super(); + this.type = param1; + if(this.type == 1) + { + this.hpMax = 10; + } + else if(this.type == 2) + { + this.hpMax = 20; + } + else + { + this.hpMax = 30; + } + this.boxMc = game.getMovieClip("rish_box_" + this.type,game.getApplication(GameUIRes.swfUrl_2)); + addChild(this.boxMc); + this.textLabel = PublicMethod.getTextFieldWithFillter(16355072,60); + addChild(this.textLabel); + this.textLabel.y = 30; + this.textLabel.x = -30; + this.textLabel.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.boxMc.gotoAndStop(1); + buttonMode = true; + addEventListener(MouseEvent.ROLL_OVER,this.mouseOverBuild); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOutBuild); + addEventListener(MouseEvent.CLICK,this.mouseClick); + } + + public function setStatus(param1:int, param2:int = 0) : void + { + if(param1 == 1) + { + this.textLabel.text = param2 + "/" + this.hpMax; + this.boxMc.gotoAndStop(1); + if(this.effMc != null && contains(this.effMc)) + { + removeChild(this.effMc); + this.effMc.gotoAndStop(1); + } + } + if(param1 == 2) + { + this.textLabel.text = "可领取"; + this.boxMc.gotoAndStop(3); + if(contains(this.getEffMc()) == false) + { + addChild(this.getEffMc()); + this.effMc.gotoAndPlay(1); + } + } + if(param1 == 3) + { + this.textLabel.text = "已领取"; + this.boxMc.gotoAndStop(2); + if(this.effMc != null && contains(this.effMc)) + { + removeChild(this.effMc); + this.effMc.gotoAndStop(1); + } + } + } + + private function getEffMc() : MovieClip + { + if(this.effMc == null) + { + this.effMc = game.getMovieClip("rish_eff_2",game.getApplication(GameUIRes.swfUrl_2)); + } + return this.effMc; + } + + public function mouseOverBuild(param1:MouseEvent) : void + { + this.boxMc.filters = [PublicGlow.getInstance().lightFilter]; + } + + public function mouseOutBuild(param1:MouseEvent) : void + { + this.boxMc.filters = null; + } + + private function mouseClick(param1:MouseEvent) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/mc/RiskEmptyBtn.as b/flash_decompiled/com/view/ui/risk/mc/RiskEmptyBtn.as new file mode 100644 index 0000000..0d77b59 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/mc/RiskEmptyBtn.as @@ -0,0 +1,54 @@ +package com.view.ui.risk.mc +{ + import com.common.PublicMethod; + import com.data.GameData; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + import com.view.res.GameUIRes; + import flash.display.Bitmap; + import flash.events.MouseEvent; + + public class RiskEmptyBtn extends UIBase + { + + private var timeText:UILabel; + + private var leftTime:int = 0; + + public function RiskEmptyBtn() + { + super(); + var _loc1_:Bitmap = game.getBitMap("rish_29",game.getApplication(GameUIRes.swfUrl_2)); + addChild(_loc1_); + _loc1_.width = 80; + _loc1_.height = 32; + this.timeText = new UILabel(80,16711680); + addChild(this.timeText); + this.timeText.setTextForMat(PublicMethod.getCenterTextFormat()); + this.timeText.y = 8; + buttonMode = true; + GameData.setRiskBackF1(this.setTime); + addEventListener(MouseEvent.CLICK,this.clearTime); + } + + public function setTime(param1:int) : void + { + if(param1 < 0) + { + return; + } + this.leftTime = param1; + this.timeText.setText(Utils.formatSeconds(param1)); + } + + private function clearTime(param1:MouseEvent) : void + { + } + + private function configF() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/mc/RiskMapMc.as b/flash_decompiled/com/view/ui/risk/mc/RiskMapMc.as new file mode 100644 index 0000000..da175a8 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/mc/RiskMapMc.as @@ -0,0 +1,96 @@ +package com.view.ui.risk.mc +{ + import com.common.LoadResource; + import com.data.GameData; + import com.view.newui.UIBase; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.geom.Point; + + public class RiskMapMc extends UIBase + { + + private var loadMap:LoadResource; + + private var mc:Sprite; + + private var dragMc:Sprite; + + private var ht:Sprite; + + private var pngObj:Object; + + private var id:int; + + private var map:Bitmap; + + public function RiskMapMc() + { + super(); + this.mc = new Sprite(); + addChild(this.mc); + } + + public function startLoadBg(param1:int) : void + { + this.id = param1; + this.pngObj = GameData.getRiskParentSceneObjById(this.id); + if(this.pngObj == null) + { + return; + } + var _loc2_:int = int(this.pngObj.id); + if(_loc2_ > 41) + { + _loc2_ -= 41; + } + if(_loc2_ > 41) + { + _loc2_ -= 41; + } + this.loadMap = new LoadResource("pic/riskmap/" + _loc2_ + ".png",this.loadPngBgBack); + } + + private function loadPngBgBack(param1:Event) : void + { + this.map = param1.target.loader.content as Bitmap; + this.mc.addChild(this.map); + this.map.x = this.pngObj.posx; + this.map.y = this.pngObj.posy; + this.loadMap.clear(); + this.mouseEnabled = false; + this.mouseChildren = false; + } + + private function onMouseMove(param1:MouseEvent) : void + { + var _loc2_:Point = this.map.globalToLocal(new Point(param1.stageX,param1.stageY)); + this.mc.buttonMode = this.isActiveUnderPoint(this.map.bitmapData,_loc2_.x,_loc2_.y); + } + + public function isActiveUnderPoint(param1:BitmapData, param2:Number, param3:Number) : Boolean + { + var _loc4_:uint = 0; + var _loc5_:uint = 0; + if(param1 != null) + { + _loc4_ = param1.getPixel32(param2,param3); + _loc5_ = uint(_loc4_ >> 24); + return _loc5_ != 0; + } + return false; + } + + private function mouseOut(param1:MouseEvent) : void + { + } + + private function mouseOver(param1:MouseEvent) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/mc/RiskMc.as b/flash_decompiled/com/view/ui/risk/mc/RiskMc.as new file mode 100644 index 0000000..bf5a4e3 --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/mc/RiskMc.as @@ -0,0 +1,96 @@ +package com.view.ui.risk.mc +{ + import com.common.LoadResource; + import com.view.newui.UIBase; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class RiskMc extends UIBase + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var dragMc:Sprite; + + private var idArr:Array; + + private var id:int; + + private var loadMap:LoadResource; + + private var _num:int = 0; + + private var pngObj:Object; + + private var mcVec:Vector. = new Vector.(); + + public function RiskMc(param1:Sprite) + { + super(); + this.dragMc = param1; + this.bg1 = new Sprite(); + addChild(this.bg1); + this.bg2 = new Sprite(); + addChild(this.bg2); + } + + public function getId() : int + { + return this.id; + } + + public function loadRes(param1:Object) : void + { + this.id = param1.id; + var _loc2_:String = param1.pic; + this.startLoadMap(_loc2_); + var _loc3_:String = param1.parentsceneid; + this.idArr = _loc3_.split(","); + } + + private function startLoadMap(param1:String) : void + { + this.loadMap = new LoadResource("pic/" + param1,this.loadPngBack); + } + + private function loadPngBack(param1:Event) : void + { + var _loc2_:Bitmap = param1.target.loader.content as Bitmap; + this.bg1.addChild(_loc2_); + this.loadMap.clear(); + this.startLoadBg(); + } + + private function startLoadBg() : void + { + var _loc2_:RiskMapMc = null; + var _loc3_:int = 0; + var _loc4_:RiskMc1 = null; + var _loc1_:int = 0; + while(_loc1_ < this.idArr.length) + { + _loc2_ = new RiskMapMc(); + _loc3_ = int(this.idArr[_loc1_]); + _loc2_.startLoadBg(_loc3_); + this.dragMc.addChild(_loc2_); + _loc4_ = new RiskMc1(_loc3_); + this.dragMc.addChild(_loc4_); + this.mcVec.push(_loc4_); + _loc1_++; + } + } + + public function updateStatus() : void + { + var _loc1_:RiskMc1 = null; + for each(_loc1_ in this.mcVec) + { + _loc1_.checkStatus(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/mc/RiskMc1.as b/flash_decompiled/com/view/ui/risk/mc/RiskMc1.as new file mode 100644 index 0000000..e2de13e --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/mc/RiskMc1.as @@ -0,0 +1,181 @@ +package com.view.ui.risk.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.GameData; + import com.view.newui.UIBase; + import com.view.res.GameUIRes; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.risk.RiskBattleUI; + import com.view.ui.risk.RiskMainUI; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class RiskMc1 extends UIBase + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var label1:TextField; + + private var label2:TextField; + + private var png3:Bitmap; + + private var pngObj:Object; + + private var id:int; + + private var css1:TextFormat; + + private var css2:TextFormat; + + private var status:int = 0; + + private var eff:MovieClip; + + public function RiskMc1(param1:int) + { + super(); + this.id = param1; + this.pngObj = GameData.getRiskParentSceneObjById(this.id); + if(this.pngObj == null) + { + return; + } + var _loc2_:Bitmap = new Bitmap(game.getPng("rish_6",game.getApplication(GameUIRes.swfUrl_2))); + this.bg1 = new Sprite(); + addChild(this.bg1); + this.bg1.addChild(_loc2_); + var _loc3_:Bitmap = new Bitmap(game.getPng("rish_5",game.getApplication(GameUIRes.swfUrl_2))); + this.bg2 = new Sprite(); + addChild(this.bg2); + this.bg2.addChild(_loc3_); + this.png3 = new Bitmap(game.getPng("rish_7",game.getApplication(GameUIRes.swfUrl_2))); + this.bg2.addChild(this.png3); + this.png3.x = 2; + this.png3.y = -2; + this.label1 = PublicMethod.getTextFieldWithFillter(16355072,70); + addChild(this.label1); + this.label1.text = this.pngObj.name; + this.label1.x = 55; + this.label1.y = 6; + this.label2 = PublicMethod.getTextFieldWithFillter(16355072,70); + addChild(this.label2); + this.label2.text = "进行中"; + this.label2.x = 65; + this.label2.y = 26; + this.buttonMode = true; + this.x = this.pngObj.posx1; + this.y = this.pngObj.posy1; + addEventListener(MouseEvent.CLICK,this.clickBattle); + this.css1 = new TextFormat(); + this.css1.color = 16355072; + this.css2 = new TextFormat(); + this.css2.color = 13158600; + this.checkStatus(); + } + + private function clickBattle(param1:MouseEvent) : void + { + var _loc2_:RiskBattleUI = null; + var _loc5_:RiskMainUI = null; + if(this.status == 3) + { + MessageBoxUI.getInstance().addMessage("请先征服前面的城池"); + return; + } + _loc2_ = RiskBattleUI.getInstance(); + _loc2_.setBattleObj(this.pngObj); + var _loc3_:int = int(this.pngObj.id); + var _loc4_:Array = GameData.getRiskSceneList(_loc3_); + if(_loc4_ == null) + { + ConnectService.getInstance().riskService.getRiskSceneById(_loc3_); + } + else + { + _loc2_.showBattle(); + _loc5_ = RiskMainUI.getInstance(); + _loc5_.addChild(_loc2_); + _loc2_.x = int(688 / 2 - _loc2_.width / 2); + _loc2_.y = int(_loc5_.height / 2 - _loc2_.height / 2); + } + } + + public function checkStatus() : void + { + if(this.pngObj == null) + { + return; + } + var _loc1_:int = int(this.pngObj.id); + var _loc2_:Object = GameData.getUserRisk(); + var _loc3_:int = int(_loc2_.bigStageId); + if(_loc3_ > _loc1_) + { + this.label2.setTextFormat(this.css1); + this.label1.setTextFormat(this.css1); + this.label2.text = "已通关"; + if(Boolean(this.eff) && contains(this.eff)) + { + removeChild(this.eff); + this.eff.gotoAndStop(1); + } + this.png3.visible = true; + this.bg1.visible = false; + this.bg2.visible = true; + this.status = 1; + } + else if(_loc3_ == _loc1_) + { + this.label2.setTextFormat(this.css1); + this.label1.setTextFormat(this.css1); + this.label2.text = "进行中"; + if(contains(this.getEffMc()) == false) + { + addChild(this.eff); + this.eff.gotoAndPlay(1); + } + this.png3.visible = false; + this.bg1.visible = false; + this.bg2.visible = true; + this.status = 2; + } + else + { + this.label2.setTextFormat(this.css2); + this.label1.setTextFormat(this.css2); + this.label2.text = "未解锁"; + if(Boolean(this.eff) && contains(this.eff)) + { + removeChild(this.eff); + this.eff.gotoAndStop(1); + } + this.png3.visible = false; + this.bg2.visible = false; + this.bg1.visible = true; + this.status = 3; + } + this.label1.text = this.pngObj.name; + } + + private function getEffMc() : MovieClip + { + if(this.eff == null) + { + this.eff = game.getMovieClip("rish_eff_3",game.getApplication(GameUIRes.swfUrl_2)); + this.eff.x = 25; + this.eff.y = 25; + } + return this.eff; + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/mc/RiskMc2.as b/flash_decompiled/com/view/ui/risk/mc/RiskMc2.as new file mode 100644 index 0000000..9925a4e --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/mc/RiskMc2.as @@ -0,0 +1,226 @@ +package com.view.ui.risk.mc +{ + import com.common.PublicGlow; + import com.view.newui.UIBase; + import com.view.newui.UINums; + import com.view.res.GameUIRes; + import com.view.ui.risk.RiskBattleEnterUI; + import com.view.ui.risk.RiskBattleUI; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.events.MouseEvent; + + public class RiskMc2 extends UIBase + { + + private var starMc1:MovieClip; + + private var starMc2:MovieClip; + + private var starMc3:MovieClip; + + private var currBattleObj:Object; + + private var effMc:MovieClip; + + public function RiskMc2(param1:Object) + { + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:UINums = null; + super(); + this.currBattleObj = param1; + var _loc2_:int = int(this.currBattleObj.showstar); + var _loc3_:int = int(this.currBattleObj.sceneId); + var _loc4_:Bitmap = new Bitmap(game.getPng("rish_flag_" + _loc2_,game.getApplication(GameUIRes.swfUrl_2))); + addChild(_loc4_); + if(_loc2_ != 3) + { + _loc5_ = _loc3_ % 100; + _loc6_ = 0; + _loc7_ = 0; + _loc8_ = 0; + _loc9_ = new UINums(10); + switch(_loc5_) + { + case 1: + _loc7_ = 18; + _loc8_ = 22; + _loc6_ = 1; + break; + case 2: + _loc7_ = 19; + _loc8_ = 8; + _loc6_ = 2; + break; + case 3: + _loc6_ = 3; + _loc7_ = 19; + _loc8_ = 8; + break; + case 4: + _loc6_ = 4; + _loc7_ = 19; + _loc8_ = 8; + break; + case 6: + _loc6_ = 5; + _loc7_ = 19; + _loc8_ = 8; + break; + case 7: + _loc6_ = 6; + _loc7_ = 19; + _loc8_ = 8; + break; + case 8: + _loc6_ = 7; + _loc7_ = 19; + _loc8_ = 8; + break; + case 10: + _loc6_ = 8; + _loc7_ = 19; + _loc8_ = 8; + break; + case 11: + _loc6_ = 9; + _loc7_ = 19; + _loc8_ = 8; + break; + case 12: + _loc6_ = 10; + _loc7_ = 10; + _loc8_ = 22; + _loc9_.initWidth(12); + } + _loc9_.showNum(_loc6_); + addChild(_loc9_); + _loc9_.x = _loc7_; + _loc9_.y = _loc8_; + } + if(_loc2_ != 3) + { + this.starMc1 = face.getMovieClip("libadd_star"); + this.starMc2 = face.getMovieClip("libadd_star"); + this.starMc3 = face.getMovieClip("libadd_star"); + addChild(this.starMc1); + this.starMc1.x = 4; + this.starMc1.y = 40; + if(_loc6_ == 1 || _loc6_ == 10) + { + this.starMc1.y = 55; + } + addChild(this.starMc2); + this.starMc2.x = this.starMc1.x + 17; + this.starMc2.y = this.starMc1.y; + addChild(this.starMc3); + this.starMc3.x = this.starMc2.x + 17; + this.starMc3.y = this.starMc1.y; + this.starMc1.gotoAndStop(1); + this.starMc2.gotoAndStop(1); + this.starMc3.gotoAndStop(1); + } + buttonMode = true; + 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 setObj(param1:Object) : void + { + this.currBattleObj = param1; + } + + public function getObj() : Object + { + return this.currBattleObj; + } + + private function mouseClick(param1:MouseEvent) : void + { + var _loc2_:RiskBattleEnterUI = null; + _loc2_ = RiskBattleEnterUI.getInstance(); + _loc2_.loadBattleInfo(this.currBattleObj); + var _loc3_:RiskBattleUI = RiskBattleUI.getInstance(); + _loc3_.addChild(_loc2_); + _loc2_.x = int(783 / 2 - 673 / 2); + _loc2_.y = int(493 / 2 - 409 / 2); + } + + public function showStar(param1:int) : void + { + if(this.starMc1 == null) + { + return; + } + this.starMc1.gotoAndStop(2); + this.starMc2.gotoAndStop(2); + this.starMc3.gotoAndStop(2); + if(param1 == 1) + { + this.starMc1.gotoAndStop(1); + } + if(param1 == 2) + { + this.starMc1.gotoAndStop(1); + this.starMc2.gotoAndStop(1); + } + if(param1 == 3) + { + this.starMc1.gotoAndStop(1); + this.starMc2.gotoAndStop(1); + this.starMc3.gotoAndStop(1); + } + } + + public function showEff() : void + { + if(contains(this.getEffMc()) == false) + { + addChild(this.effMc); + this.effMc.gotoAndPlay(1); + } + } + + public function unShowEff() : void + { + if(Boolean(this.effMc) && contains(this.effMc)) + { + removeChild(this.effMc); + this.effMc.gotoAndStop(1); + } + } + + private function getEffMc() : MovieClip + { + if(this.effMc == null) + { + this.effMc = game.getMovieClip("rish_eff_1",game.getApplication(GameUIRes.swfUrl_2)); + this.effMc.x = 27; + if(this.currBattleObj.showstar == 0) + { + this.effMc.y = 22; + } + else + { + this.effMc.y = 35; + } + } + return this.effMc; + } + } +} + diff --git a/flash_decompiled/com/view/ui/risk/mc/RiskRankMc.as b/flash_decompiled/com/view/ui/risk/mc/RiskRankMc.as new file mode 100644 index 0000000..bc4d9bd --- /dev/null +++ b/flash_decompiled/com/view/ui/risk/mc/RiskRankMc.as @@ -0,0 +1,62 @@ +package com.view.ui.risk.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UILabel; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.TextEvent; + import flash.text.TextField; + + public class RiskRankMc extends Sprite + { + + private var label1:UILabel; + + private var nameText:TextField; + + private var label3:UILabel; + + public function RiskRankMc(param1:int) + { + super(); + this.label1 = new UILabel(45); + addChild(this.label1); + this.label1.setTextForMat(PublicMethod.getCenterTextFormat()); + this.label1.setText(param1 + ""); + this.nameText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,111); + addChild(this.nameText); + this.nameText.x = this.label1.width; + this.nameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label3 = new UILabel(60); + addChild(this.label3); + this.label3.x = this.nameText.x + this.nameText.width; + this.label3.setTextForMat(PublicMethod.getCenterTextFormat()); + this.nameText.mouseEnabled = true; + this.nameText.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + + public function setObj(param1:Object) : void + { + if(param1 == null) + { + this.nameText.text = ""; + this.label3.setText(""); + } + else + { + this.nameText.htmlText = "" + param1.userName + ""; + this.label3.setText("第" + param1.stageId + "关"); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/shenbin/GunMainUI.as b/flash_decompiled/com/view/ui/shenbin/GunMainUI.as new file mode 100644 index 0000000..9fe3f19 --- /dev/null +++ b/flash_decompiled/com/view/ui/shenbin/GunMainUI.as @@ -0,0 +1,122 @@ +package com.view.ui.shenbin +{ + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.activity.ActivityBase; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class GunMainUI extends ActivityBase + { + + private static var instance:GunMainUI; + + private var _width2:int = -100; + + private var _height2:int = -40; + + private var paneBg:UIWindowBg; + + private var preBtn:UITabBtn; + + private var prePage:Sprite; + + public var btnArr:Array; + + private var page1:GunPage1; + + private var page2:GunPage2; + + public function GunMainUI() + { + var _loc3_:int = 0; + var _loc4_:UITabBtn = null; + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_gun); + super.setPosition(); + 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 + this._width2,400 + this._height2 - 26); + ui_bg.addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + _loc1_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + public static function getInstance() : GunMainUI + { + if(instance == null) + { + return instance = new GunMainUI(); + } + return instance; + } + + 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; + } + + 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 GunPage1(); + this.page1.x = 4; + this.page1.y = 4; + } + this.prePage = this.page1; + } + if(this.btnArr[1] == this.preBtn) + { + if(this.page2 == null) + { + this.page2 = new GunPage2(); + this.page2.x = 4; + this.page2.y = 4; + } + this.prePage = this.page2; + } + this.paneBg.addChild(this.prePage); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shenbin/GunPage1.as b/flash_decompiled/com/view/ui/shenbin/GunPage1.as new file mode 100644 index 0000000..1fdf7da --- /dev/null +++ b/flash_decompiled/com/view/ui/shenbin/GunPage1.as @@ -0,0 +1,202 @@ +package com.view.ui.shenbin +{ + import com.comfig.ServerConfig; + 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.newui.UILabel; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.display.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GunPage1 extends BaseUI + { + + private var sp1:UIWindowBg; + + private var text1:UILabel; + + private var text2:UILabel; + + private var text3:UILabel; + + private var text4:UILabel; + + private var text5:UILabel; + + private var text12:UILabel; + + public function GunPage1() + { + var _loc6_:TextField = null; + var _loc12_:UIButton = null; + super(); + this.sp1 = new UIWindowBg(); + this.sp1.initThirdPanel(352,180); + addChild(this.sp1); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(155,324); + addChild(_loc1_); + _loc1_.x = this.sp1.x + this.sp1.width + 4; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(352,132); + addChild(_loc2_); + _loc2_.y = this.sp1.y + this.sp1.height + 4; + var _loc3_:String = "gun.png"; + this.loadBg(ServerConfig.IMG_BG_URL + _loc3_); + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc4_.text = "当前等级:"; + _loc2_.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 10; + this.text1 = new UILabel(50); + this.text1.setText("当前等级:"); + _loc2_.addChild(this.text1); + this.text1.x = _loc4_.x + _loc4_.width; + this.text1.y = 10; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc5_.text = "最大等级:"; + _loc2_.addChild(_loc5_); + _loc5_.x = this.text1.x + this.text1.width; + _loc5_.y = 10; + this.text12 = new UILabel(70); + this.text12.setText("当前等级:"); + _loc2_.addChild(this.text12); + this.text12.x = _loc5_.x + _loc5_.width; + this.text12.y = 10; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc6_.text = "当前效果:"; + _loc2_.addChild(_loc6_); + _loc6_.x = _loc4_.x; + _loc6_.y = _loc4_.y + 20; + this.text2 = new UILabel(240); + this.text2.setText("当前效果:"); + _loc2_.addChild(this.text2); + this.text2.x = this.text1.x; + this.text2.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc7_.text = "下级效果:"; + _loc2_.addChild(_loc7_); + _loc7_.x = _loc4_.x; + _loc7_.y = _loc6_.y + 20; + this.text3 = new UILabel(240); + this.text3.setText("下级效果:"); + _loc2_.addChild(this.text3); + this.text3.x = _loc7_.x + _loc7_.width; + this.text3.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,120); + _loc8_.text = "升级所需神兵秘籍:"; + _loc2_.addChild(_loc8_); + _loc8_.x = _loc4_.x; + _loc8_.y = _loc7_.y + 20; + this.text4 = new UILabel(170); + this.text4.setText("升级所需神兵秘籍:"); + _loc2_.addChild(this.text4); + this.text4.x = _loc8_.x + _loc8_.width; + this.text4.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + _loc9_.text = "当前拥有神兵秘籍数量:"; + _loc2_.addChild(_loc9_); + _loc9_.x = _loc4_.x; + _loc9_.y = _loc8_.y + 20; + this.text5 = new UILabel(170); + this.text5.setText("当前拥有神兵秘籍数量:"); + _loc2_.addChild(this.text5); + this.text5.x = _loc9_.x + _loc9_.width; + this.text5.y = _loc9_.y; + var _loc10_:UIButton = new UIButton("升1级",2,10); + _loc2_.addChild(_loc10_); + _loc10_.x = 80; + _loc10_.y = _loc9_.y + 24; + _loc10_.onClick = this.levelUp; + var _loc11_:UIButton = new UIButton("升10级",2,10); + _loc2_.addChild(_loc11_); + _loc11_.x = _loc10_.x + _loc10_.width + 10; + _loc11_.y = _loc10_.y; + _loc11_.onClick = this.levelUp10; + _loc12_ = new UIButton("升50级",2,10); + _loc2_.addChild(_loc12_); + _loc12_.x = _loc11_.x + _loc11_.width + 10; + _loc12_.y = _loc10_.y; + _loc12_.onClick = this.levelUp50; + var _loc13_:UITitleBg = new UITitleBg("规则说明",_loc1_.width); + _loc1_.addChild(_loc13_); + _loc13_.x = int(_loc1_.width / 2 - _loc13_.width / 2); + var _loc14_:String = "1、该功能在pvp、pvc战役中均可用。
"; + _loc14_ = _loc14_ + "2、战斗开始后,由九转通天炮首先攻击对方部队,所产生的伤亡公式为对方总兵力*九转通天炮产生的效果,比如九转通天炮100级,减少对方10%的兵力。对方5个武将,每个武将500万兵力,九转通天炮产生的伤亡数为每个武将减少50万兵力。
"; + _loc14_ = _loc14_ + "3、战斗结束后,九转通天炮产生的士兵损耗计算到战斗伤亡结果,通天炮最大限度能减少90%对方兵力。"; + var _loc15_:TextField = PublicMethod.getMulTextField(UIConfig.textColor,150,310); + _loc1_.addChild(_loc15_); + _loc15_.x = 10; + _loc15_.y = 30; + var _loc16_:TextFormat = new TextFormat(); + _loc16_.leading = 6; + _loc15_.defaultTextFormat = _loc16_; + _loc15_.htmlText = _loc14_; + Utils.g_events.addEventListener(DevEvent.DATA_USERGUN,this.getUserGunResult); + this.getUserGunData(); + } + + private function getUserGunData() : void + { + ConnectService.getInstance().userService.getUserGun(); + } + + private function getUserGunResult(param1:DevEvent) : void + { + var _loc2_:Object = param1.obj; + this.text1.setText(_loc2_.gunLv); + var _loc3_:Number = Number(_loc2_.gunLv); + var _loc4_:Number = _loc2_.gunLv + 1; + var _loc5_:Number = _loc3_ / 10; + var _loc6_:Number = _loc4_ / 10; + var _loc7_:* = _loc5_.toFixed(1) + "%"; + var _loc8_:* = _loc6_.toFixed(1) + "%"; + this.text2.setText("最多减少敌方 " + _loc7_ + " 士兵数量"); + this.text3.setText("最多减少敌方 " + _loc8_ + " 士兵数量"); + this.text4.setText(_loc2_.nextItems); + this.text5.setText(_loc2_.itemCounts); + this.text12.setText(_loc2_.maxLv); + } + + override public function loadBg(param1:String) : void + { + super.loadBg(param1); + } + + override public function getBgImg(param1:Bitmap) : void + { + this.sp1.addChild(param1); + param1.x = 32; + param1.y = 12; + } + + private function levelUp(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.upUserGun(1); + } + + private function levelUp10(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.upUserGun(2); + } + + private function levelUp50(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.upUserGun(3); + } + + override public function reSizeWindow(param1:Event) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/shenbin/GunPage2.as b/flash_decompiled/com/view/ui/shenbin/GunPage2.as new file mode 100644 index 0000000..95a4e02 --- /dev/null +++ b/flash_decompiled/com/view/ui/shenbin/GunPage2.as @@ -0,0 +1,208 @@ +package com.view.ui.shenbin +{ + import com.comfig.ServerConfig; + 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.newui.UILabel; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.display.Bitmap; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class GunPage2 extends BaseUI + { + + private var sp1:UIWindowBg; + + private var s1:String; + + private var s2:String; + + private var s3:String; + + private var explainText:TextField; + + private var text1:UILabel; + + private var text2:UILabel; + + private var text3:UILabel; + + private var text4:UILabel; + + private var text5:UILabel; + + private var text12:UILabel; + + public function GunPage2() + { + var _loc6_:TextField = null; + var _loc12_:UIButton = null; + super(); + this.sp1 = new UIWindowBg(); + this.sp1.initThirdPanel(352,180); + addChild(this.sp1); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(155,324); + addChild(_loc1_); + _loc1_.x = this.sp1.x + this.sp1.width + 4; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(352,132); + addChild(_loc2_); + _loc2_.y = this.sp1.y + this.sp1.height + 4; + var _loc3_:String = "che.png"; + this.loadBg(ServerConfig.IMG_BG_URL + _loc3_); + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc4_.text = "当前等级:"; + _loc2_.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 10; + this.text1 = new UILabel(50); + this.text1.setText("当前等级:"); + _loc2_.addChild(this.text1); + this.text1.x = _loc4_.x + _loc4_.width; + this.text1.y = 10; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc5_.text = "最大等级:"; + _loc2_.addChild(_loc5_); + _loc5_.x = this.text1.x + this.text1.width; + _loc5_.y = 10; + this.text12 = new UILabel(70); + this.text12.setText("当前等级:"); + _loc2_.addChild(this.text12); + this.text12.x = _loc5_.x + _loc5_.width; + this.text12.y = 10; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc6_.text = "当前效果:"; + _loc2_.addChild(_loc6_); + _loc6_.x = _loc4_.x; + _loc6_.y = _loc4_.y + 20; + this.text2 = new UILabel(240); + this.text2.setText("当前效果:"); + _loc2_.addChild(this.text2); + this.text2.x = this.text1.x; + this.text2.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc7_.text = "下级效果:"; + _loc2_.addChild(_loc7_); + _loc7_.x = _loc4_.x; + _loc7_.y = _loc6_.y + 20; + this.text3 = new UILabel(240); + this.text3.setText("下级效果:"); + _loc2_.addChild(this.text3); + this.text3.x = _loc7_.x + _loc7_.width; + this.text3.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,120); + _loc8_.text = "升级所需神兵秘籍:"; + _loc2_.addChild(_loc8_); + _loc8_.x = _loc4_.x; + _loc8_.y = _loc7_.y + 20; + this.text4 = new UILabel(170); + this.text4.setText("升级所需神兵秘籍:"); + _loc2_.addChild(this.text4); + this.text4.x = _loc8_.x + _loc8_.width; + this.text4.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + _loc9_.text = "当前拥有神兵秘籍数量:"; + _loc2_.addChild(_loc9_); + _loc9_.x = _loc4_.x; + _loc9_.y = _loc8_.y + 20; + this.text5 = new UILabel(170); + this.text5.setText("当前拥有神兵秘籍数量:"); + _loc2_.addChild(this.text5); + this.text5.x = _loc9_.x + _loc9_.width; + this.text5.y = _loc9_.y; + var _loc10_:UIButton = new UIButton("升1级",2,10); + _loc2_.addChild(_loc10_); + _loc10_.x = 80; + _loc10_.y = _loc9_.y + 24; + _loc10_.onClick = this.levelUp; + var _loc11_:UIButton = new UIButton("升10级",2,10); + _loc2_.addChild(_loc11_); + _loc11_.x = _loc10_.x + _loc10_.width + 10; + _loc11_.y = _loc10_.y; + _loc11_.onClick = this.levelUp10; + _loc12_ = new UIButton("升50级",2,10); + _loc2_.addChild(_loc12_); + _loc12_.x = _loc11_.x + _loc11_.width + 10; + _loc12_.y = _loc10_.y; + _loc12_.onClick = this.levelUp50; + var _loc13_:UITitleBg = new UITitleBg("规则说明",_loc1_.width); + _loc1_.addChild(_loc13_); + _loc13_.x = int(_loc1_.width / 2 - _loc13_.width / 2); + this.s1 = "1、该功能在pvp、pvc战役中均可用。
"; + this.s2 = "2、通天炮等级达到200级以后才能开启伏兵车升级,每升级一级增加带兵上限5000。
"; + this.s3 = "3、伏兵车升级后需重新补兵。"; + this.explainText = PublicMethod.getMulTextField(UIConfig.textColor,150,310); + _loc1_.addChild(this.explainText); + this.explainText.x = 10; + this.explainText.y = 30; + var _loc14_:TextFormat = new TextFormat(); + _loc14_.leading = 6; + this.explainText.defaultTextFormat = _loc14_; + Utils.g_events.addEventListener(DevEvent.DATA_USERGUN,this.getUserGunResult); + this.getUserGunData(); + } + + private function getUserGunData() : void + { + ConnectService.getInstance().userService.getUserGun(); + } + + private function getUserGunResult(param1:DevEvent) : void + { + var _loc2_:Object = param1.obj; + this.text1.setText(_loc2_.cheLv); + var _loc3_:int = int(_loc2_.cheLv); + var _loc4_:int = _loc3_ + 1; + var _loc5_:int = int(_loc2_.cheNums); + this.text2.setText("增加带兵上限 " + _loc5_ * _loc3_ + ""); + this.text3.setText("增加带兵上限 " + _loc4_ * _loc5_ + ""); + this.text4.setText(_loc2_.nextArmyItems); + this.text5.setText(_loc2_.itemCounts); + this.text12.setText(_loc2_.maxCheLv); + this.s2 = "2、通天炮等级达到200级以后才能开启伏兵车升级,每升级一级增加带兵上限 " + _loc5_ + "
"; + this.explainText.htmlText = this.s1 + this.s2 + this.s3; + } + + override public function loadBg(param1:String) : void + { + super.loadBg(param1); + } + + override public function getBgImg(param1:Bitmap) : void + { + this.sp1.addChild(param1); + param1.x = 32; + param1.y = 12; + } + + private function levelUp(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.upUserChe(1); + } + + private function levelUp10(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.upUserChe(2); + } + + private function levelUp50(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.upUserChe(3); + } + + override public function reSizeWindow(param1:Event) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/BuyItemsUI.as b/flash_decompiled/com/view/ui/shop/BuyItemsUI.as new file mode 100644 index 0000000..5a5468f --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/BuyItemsUI.as @@ -0,0 +1,224 @@ +package com.view.ui.shop +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.shop.event.ShopEvent; + 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 flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BuyItemsUI extends UIWindowBg + { + + private var itemsImg:Bitmap; + + private var itemImgSp:Sprite; + + private var desc_txt:TextField; + + private var num_txt:UINumInputText; + + private var sum_txt:UINumInputText; + + private var buyBtn:UIButton; + + private var cashCheckBox:UICheckBtn; + + private var cashIcon:Sprite; + + private var payPointCheckBox:UICheckBtn; + + private var payPointIcon:Sprite; + + private var realPrice:int; + + private var itemObj:Object; + + private var buyType:int; + + public var buyCompleteF:Function; + + public function BuyItemsUI() + { + var _loc4_:TextField = null; + var _loc7_:UIButton = null; + super(); + initSize(125,200); + loadTitle(UITitleConfig.title_goumaidaoju); + 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 = 15; + this.itemImgSp.y = 20; + this.itemsImg = new Bitmap(); + this.itemImgSp.addChild(this.itemsImg); + this.itemsImg.x = 3; + this.itemsImg.y = 3; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.leading = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initSecondPanel(190,60); + _loc1_.addChild(_loc3_); + _loc3_.x = this.itemImgSp.x + this.itemImgSp.width + 10; + _loc3_.y = this.itemImgSp.y; + this.desc_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,_loc3_.width - 5); + this.desc_txt.wordWrap = true; + this.desc_txt.multiline = true; + this.desc_txt.height = 60; + _loc3_.addChild(this.desc_txt); + this.desc_txt.x = 3; + this.desc_txt.y = 3; + this.desc_txt.defaultTextFormat = _loc2_; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,62); + _loc4_.text = "购买方式:"; + _loc1_.addChild(_loc4_); + _loc4_.x = 60; + _loc4_.y = this.itemImgSp.y + this.itemImgSp.height + 20; + this.cashCheckBox = new UICheckBtn(); + _loc1_.addChild(this.cashCheckBox); + this.cashCheckBox.x = _loc4_.x + _loc4_.width; + this.cashCheckBox.y = _loc4_.y; + this.cashIcon = face.getSprite(ClassConfig.lib_ui_cash); + _loc1_.addChild(this.cashIcon); + this.cashIcon.x = this.cashCheckBox.x + 25; + this.cashIcon.y = _loc4_.y; + this.payPointCheckBox = new UICheckBtn(); + _loc1_.addChild(this.payPointCheckBox); + this.payPointCheckBox.x = this.cashCheckBox.x + 70; + this.payPointCheckBox.y = _loc4_.y; + this.payPointIcon = face.getSprite(ClassConfig.lib_ui_point); + _loc1_.addChild(this.payPointIcon); + this.payPointIcon.x = this.payPointCheckBox.x + 25; + this.payPointIcon.y = _loc4_.y; + this.cashCheckBox.onClick = this.choosePayType; + this.payPointCheckBox.onClick = this.choosePayType; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc5_.text = "购买数量:"; + _loc1_.addChild(_loc5_); + _loc5_.x = _loc4_.x; + _loc5_.y = _loc4_.y + 25; + this.num_txt = new UINumInputText(90); + _loc1_.addChild(this.num_txt); + this.num_txt.x = _loc5_.x + _loc5_.width; + this.num_txt.y = _loc5_.y - 3; + this.num_txt.setInputEvent(this.changeNum); + this.num_txt.setMaxChars(5); + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc6_.text = "购买总价:"; + _loc1_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.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 = _loc6_.y - 3; + this.sum_txt.readOnly(); + this.sum_txt.hiddenBtn(); + this.sum_txt.setMaxChars(10); + this.buyBtn = new UIButton("购 买"); + _loc7_ = new UIButton("取 消"); + bg1.addChild(this.buyBtn); + this.buyBtn.x = 180; + this.buyBtn.y = 198; + bg1.addChild(_loc7_); + _loc7_.x = this.buyBtn.x + this.buyBtn.width + 10; + _loc7_.y = this.buyBtn.y; + _loc7_.onClick = closeSelf; + this.buyBtn.onClick = this.buyItems; + ConnectService.getInstance().addEventListener(ShopEvent.SHOP_ITEM_BUY_RESULT,this.buyItemsResult); + } + + public function setData(param1:Object, param2:BitmapData) : void + { + if(param1 == null) + { + return; + } + this.itemObj = param1; + if(param1.isPayPointCanBuy == 1) + { + this.payPointCheckBox.visible = true; + this.payPointIcon.visible = true; + } + else + { + this.payPointCheckBox.visible = false; + this.payPointIcon.visible = false; + } + if(param2) + { + this.itemsImg.bitmapData = param2; + this.itemsImg.width = 53; + this.itemsImg.height = 53; + } + this.realPrice = int(param1.realPrice); + this.desc_txt.htmlText = param1.viewMap.desc; + this.sum_txt.setTextNum(param1.realPrice); + this.num_txt.setTextNum(1); + this.cashCheckBox.setSelect(); + this.payPointCheckBox.setUnSelect(); + this.buyType = 2; + } + + private function choosePayType(param1:MouseEvent) : void + { + var _loc2_:UICheckBtn = param1.currentTarget as UICheckBtn; + if(this.payPointCheckBox.visible == false) + { + return; + } + if(_loc2_ == this.cashCheckBox) + { + this.buyType = 2; + this.cashCheckBox.setSelect(); + this.payPointCheckBox.setUnSelect(); + } + else + { + this.buyType = 1; + this.cashCheckBox.setUnSelect(); + this.payPointCheckBox.setSelect(); + } + } + + private function changeNum() : void + { + var _loc1_:int = this.num_txt.getTextNum(); + this.sum_txt.setTextNum(this.realPrice * _loc1_); + } + + private function buyItems(param1:MouseEvent) : void + { + var _loc2_:int = this.num_txt.getTextNum(); + ConnectService.getInstance().shopService.buyGood(this.itemObj.shopId,_loc2_,this.buyType); + } + + private function buyItemsResult(param1:ShopEvent) : void + { + closeSelf(null); + if(this.buyCompleteF != null) + { + this.buyCompleteF(); + this.buyCompleteF = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/BuyPresItemsUI.as b/flash_decompiled/com/view/ui/shop/BuyPresItemsUI.as new file mode 100644 index 0000000..ab094ce --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/BuyPresItemsUI.as @@ -0,0 +1,201 @@ +package com.view.ui.shop +{ + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.shop.event.ShopEvent; + 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 flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BuyPresItemsUI extends UIWindowBg + { + + private var itemsImg:Bitmap; + + private var itemImgSp:Sprite; + + private var desc_txt:TextField; + + private var num_txt:UINumInputText; + + private var sum_txt:UINumInputText; + + private var label3:TextField; + + private var label4:TextField; + + private var buyBtn:UIButton; + + private var realPrice:int; + + private var itemObj:Object; + + public var buyCompleteF:Function; + + public function BuyPresItemsUI() + { + var _loc4_:TextField = null; + super(); + initSize(125,200); + loadTitle(UITitleConfig.title_goumaidaoju); + 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 = 15; + this.itemImgSp.y = 20; + this.itemsImg = new Bitmap(); + this.itemImgSp.addChild(this.itemsImg); + this.itemsImg.x = 3; + this.itemsImg.y = 3; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.leading = 4; + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initSecondPanel(190,60); + _loc1_.addChild(_loc3_); + _loc3_.x = this.itemImgSp.x + this.itemImgSp.width + 10; + _loc3_.y = this.itemImgSp.y; + this.desc_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,_loc3_.width - 5); + this.desc_txt.wordWrap = true; + this.desc_txt.multiline = true; + this.desc_txt.height = 60; + _loc3_.addChild(this.desc_txt); + this.desc_txt.x = 3; + this.desc_txt.y = 3; + this.desc_txt.defaultTextFormat = _loc2_; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc4_.text = "购买数量:"; + _loc1_.addChild(_loc4_); + _loc4_.x = 60; + _loc4_.y = 100; + this.num_txt = new UINumInputText(90); + _loc1_.addChild(this.num_txt); + this.num_txt.x = _loc4_.x + _loc4_.width; + this.num_txt.y = _loc4_.y - 3; + this.num_txt.setInputEvent(this.changeNum); + this.num_txt.setMaxChars(3); + this.num_txt.hiddenBtn(); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + this.label3.text = ""; + _loc1_.addChild(this.label3); + this.label3.x = _loc4_.x; + this.label3.y = _loc4_.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 = this.label3.y - 3; + this.sum_txt.readOnly(); + this.sum_txt.hiddenBtn(); + this.sum_txt.setMaxChars(10); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,215); + this.label4.text = "声望道具只能单个购买"; + _loc1_.addChild(this.label4); + this.label4.x = _loc4_.x; + this.label4.y = this.label3.y + 25; + this.buyBtn = new UIButton("购 买",2,10); + var _loc5_:UIButton = new UIButton("取 消",2,10); + bg1.addChild(this.buyBtn); + this.buyBtn.x = 180; + this.buyBtn.y = 198; + bg1.addChild(_loc5_); + _loc5_.x = this.buyBtn.x + this.buyBtn.width + 10; + _loc5_.y = this.buyBtn.y; + _loc5_.onClick = closeSelf; + this.buyBtn.onClick = this.buyItem; + ConnectService.getInstance().addEventListener(ShopEvent.SHOP_ITEM_BUY_Jungong,this.buyItemsResult); + ConnectService.getInstance().addEventListener(ShopEvent.SHOP_ITEM_BUY_Prestige,this.buyItemsResult); + } + + public function setData(param1:Object, param2:BitmapData) : void + { + if(param1 == null) + { + return; + } + this.itemObj = param1; + if(param2) + { + this.itemsImg.bitmapData = param2; + } + if(param1.tagId == 40) + { + this.num_txt.canInput(); + this.label3.text = "需要军工:"; + this.label4.visible = false; + } + else + { + this.num_txt.readOnly(); + this.label3.text = "需要声望:"; + this.label4.visible = true; + } + this.num_txt.setTextNum(1); + this.realPrice = int(param1.realPrice); + this.desc_txt.htmlText = param1.viewMap.desc; + this.sum_txt.setTextNum(this.realPrice); + } + + private function changeNum() : void + { + var _loc1_:int = this.num_txt.getTextNum(); + this.sum_txt.setTextNum(this.realPrice * _loc1_); + } + + private function buyItem(param1:MouseEvent) : void + { + var _loc2_:int = 0; + if(this.itemObj == null) + { + return; + } + if(this.itemObj.tagId == 40) + { + _loc2_ = this.num_txt.getTextNum(); + if(_loc2_ < 1) + { + return; + } + this.buyJunGongGood(_loc2_); + } + else + { + this.buyPrestigeGood(); + } + } + + private function buyPrestigeGood() : void + { + ConnectService.getInstance().shopService.buyPrestigeGood(this.itemObj.shopId,1); + } + + private function buyJunGongGood(param1:int) : void + { + ConnectService.getInstance().shopService.buyJunGongGood(this.itemObj.shopId,param1); + } + + private function buyItemsResult(param1:ShopEvent) : void + { + closeSelf(null); + if(this.buyCompleteF != null) + { + this.buyCompleteF(); + this.buyCompleteF = null; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopPage_1.as b/flash_decompiled/com/view/ui/shop/ShopPage_1.as new file mode 100644 index 0000000..1421a1a --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopPage_1.as @@ -0,0 +1,90 @@ +package com.view.ui.shop +{ + import com.InstallFace; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIShopItem; + import com.view.newui.UIWindowBg; + import com.view.ui.shop.data.ItemData; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + + public class ShopPage_1 extends Sprite + { + + private var bg:UIWindowBg; + + private var face:InstallFace = InstallFace.getInstance(); + + private var shop:ShopUI = ShopUI.getInstance(); + + private var shopScroll:ScrollPane; + + private var shopListMc:Sprite; + + private var itemsList:Array; + + public function ShopPage_1() + { + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + this.shopScroll = new ScrollPane(); + this.shopScroll.setSize(626,332); + this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg.addChild(this.shopScroll); + this.shopScroll.x = 4; + this.shopScroll.y = 6; + this.shopListMc = new Sprite(); + this.shopScroll.source = this.shopListMc; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + } + + private function addEvent(param1:Event) : void + { + if(ShopState.hotShopList.length == 0) + { + ShopUI.getInstance().getShopView(); + Utils.g_events.addEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + else if(this.itemsList == null) + { + this.getShopData(null); + } + } + + private function clearEvent(param1:Event) : void + { + if(Utils.g_events.hasEventListener(DevEvent.SHOPCHANGE)) + { + Utils.g_events.removeEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + } + + private function getShopData(param1:DevEvent) : void + { + var _loc2_:int = 0; + var _loc3_:ItemData = null; + var _loc4_:UIShopItem = null; + ShopUI.getInstance().setCashView(); + this.itemsList = ShopState.hotShopList; + this.itemsList.sortOn("shopId",Array.NUMERIC); + for each(_loc3_ in this.itemsList) + { + _loc4_ = new UIShopItem(_loc3_); + this.shopListMc.addChild(_loc4_); + _loc4_.x = 205 * (_loc2_ % 3); + _loc4_.y = 113 * int(_loc2_ / 3); + _loc2_++; + } + this.shopScroll.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopPage_2.as b/flash_decompiled/com/view/ui/shop/ShopPage_2.as new file mode 100644 index 0000000..605eb17 --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopPage_2.as @@ -0,0 +1,444 @@ +package com.view.ui.shop +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.shop.event.ShopEvent; + import com.view.mc.button.Button_2; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UINumInputText; + import com.view.newui.UIWindowBg; + 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; + + public class ShopPage_2 extends Sprite + { + + private var bg:UIWindowBg; + + private var shop:ShopUI; + + private var face:InstallFace; + + private var buy_1:Button_2; + + private var buy_2:Button_2; + + private var buy_3:Button_2; + + private var buy_4:Button_2; + + private var canBuyText:TextField; + + private var currCanBuyText:TextField; + + private var nextCanBuyText:TextField; + + private var labelText:TextField; + + private var inputUI1:UINumInputText; + + private var singleText1:TextField; + + private var countText1:TextField; + + private var buyBtn1:UIButton; + + private var inputUI2:UINumInputText; + + private var singleText2:TextField; + + private var countText2:TextField; + + private var buyBtn2:UIButton; + + private var inputUI3:UINumInputText; + + private var singleText3:TextField; + + private var countText3:TextField; + + private var buyBtn3:UIButton; + + private var inputUI4:UINumInputText; + + private var singleText4:TextField; + + private var countText4:TextField; + + private var buyBtn4:UIButton; + + private var firstBtnArr:Array; + + private var preBtnArr:Array; + + private var nextBtnArr:Array; + + private var lastBtnArr:Array; + + private var remainCount:int; + + private var currSingleNum:int; + + public function ShopPage_2() + { + var _loc2_:UIWindowBg = null; + var _loc3_:Sprite = null; + var _loc10_:TextField = null; + var _loc12_:Sprite = null; + var _loc23_:UIWindowBg = null; + this.shop = ShopUI.getInstance(); + this.face = InstallFace.getInstance(); + this.firstBtnArr = new Array(); + this.preBtnArr = new Array(); + this.nextBtnArr = new Array(); + this.lastBtnArr = new Array(); + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(614,35); + this.bg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + this.canBuyText = PublicMethod.getTextFieldWithFillter(16777215,300); + _loc1_.addChild(this.canBuyText); + this.canBuyText.x = 200; + this.canBuyText.y = 15; + _loc2_ = new UIWindowBg(); + _loc2_.initSecondPanel(614,205); + this.bg.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = _loc1_.y + _loc1_.height + 4; + _loc3_ = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),16,16); + _loc2_.addChild(_loc3_); + _loc3_.x = 40; + _loc3_.y = 20; + var _loc4_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.ui_resource_1)); + _loc3_.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = 5; + this.inputUI1 = new UINumInputText(120); + _loc2_.addChild(this.inputUI1); + this.inputUI1.x = _loc3_.x + 65; + this.inputUI1.y = _loc3_.y + 1; + this.inputUI1.setInputEvent(this.changeInputValue1); + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(16777215,20); + _loc5_.text = "×"; + _loc2_.addChild(_loc5_); + _loc5_.x = this.inputUI1.x + 130; + _loc5_.y = _loc3_.y + 4; + this.singleText1 = PublicMethod.getTextFieldWithFillter(16773120,50); + _loc2_.addChild(this.singleText1); + this.singleText1.x = _loc5_.x + 30; + this.singleText1.y = _loc5_.y; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(16777215,20); + _loc6_.text = "="; + _loc2_.addChild(_loc6_); + _loc6_.x = _loc5_.x + 100; + _loc6_.y = _loc5_.y; + this.countText1 = PublicMethod.getTextFieldWithFillter(16773120,100); + _loc2_.addChild(this.countText1); + this.countText1.x = _loc6_.x + 30; + this.countText1.y = _loc5_.y; + this.buyBtn1 = new UIButton("购 买"); + _loc2_.addChild(this.buyBtn1); + this.buyBtn1.x = this.countText1.x + 100; + this.buyBtn1.y = _loc5_.y - 3; + var _loc7_:Sprite = PublicMethod.getTrLine(570); + _loc2_.addChild(_loc7_); + _loc7_.x = 20; + _loc7_.y = this.buyBtn1.y + 33; + var _loc8_:Sprite = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),16,16); + _loc2_.addChild(_loc8_); + _loc8_.x = 40; + _loc8_.y = _loc3_.y + 50; + var _loc9_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.ui_resource_2)); + _loc8_.addChild(_loc9_); + _loc9_.x = 2; + _loc9_.y = 5; + this.inputUI2 = new UINumInputText(120); + _loc2_.addChild(this.inputUI2); + this.inputUI2.x = _loc8_.x + 65; + this.inputUI2.y = _loc8_.y + 1; + this.inputUI2.setInputEvent(this.changeInputValue2); + _loc10_ = PublicMethod.getTextFieldWithFillter(16777215,20); + _loc10_.text = "×"; + _loc2_.addChild(_loc10_); + _loc10_.x = this.inputUI2.x + 130; + _loc10_.y = _loc8_.y + 4; + this.singleText2 = PublicMethod.getTextFieldWithFillter(16773120,50); + _loc2_.addChild(this.singleText2); + this.singleText2.x = _loc10_.x + 30; + this.singleText2.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(16777215,20); + _loc11_.text = "="; + _loc2_.addChild(_loc11_); + _loc11_.x = _loc10_.x + 100; + _loc11_.y = _loc10_.y; + this.countText2 = PublicMethod.getTextFieldWithFillter(16773120,100); + _loc2_.addChild(this.countText2); + this.countText2.x = _loc11_.x + 30; + this.countText2.y = _loc10_.y; + this.buyBtn2 = new UIButton("购 买"); + _loc2_.addChild(this.buyBtn2); + this.buyBtn2.x = this.countText2.x + 100; + this.buyBtn2.y = _loc10_.y - 3; + _loc12_ = PublicMethod.getTrLine(570); + _loc2_.addChild(_loc12_); + _loc12_.x = 20; + _loc12_.y = this.buyBtn2.y + 33; + var _loc13_:Sprite = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),16,16); + _loc2_.addChild(_loc13_); + _loc13_.x = 40; + _loc13_.y = _loc8_.y + 50; + var _loc14_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.ui_resource_3)); + _loc13_.addChild(_loc14_); + _loc14_.x = 4; + _loc14_.y = 3; + this.inputUI3 = new UINumInputText(120); + _loc2_.addChild(this.inputUI3); + this.inputUI3.x = _loc13_.x + 65; + this.inputUI3.y = _loc13_.y + 1; + this.inputUI3.setInputEvent(this.changeInputValue3); + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(16777215,20); + _loc15_.text = "×"; + _loc2_.addChild(_loc15_); + _loc15_.x = this.inputUI3.x + 130; + _loc15_.y = _loc13_.y + 4; + this.singleText3 = PublicMethod.getTextFieldWithFillter(16773120,50); + _loc2_.addChild(this.singleText3); + this.singleText3.x = _loc15_.x + 30; + this.singleText3.y = _loc15_.y; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(16777215,20); + _loc16_.text = "="; + _loc2_.addChild(_loc16_); + _loc16_.x = _loc15_.x + 100; + _loc16_.y = _loc15_.y; + this.countText3 = PublicMethod.getTextFieldWithFillter(16773120,100); + _loc2_.addChild(this.countText3); + this.countText3.x = _loc16_.x + 30; + this.countText3.y = _loc15_.y; + this.buyBtn3 = new UIButton("购 买"); + _loc2_.addChild(this.buyBtn3); + this.buyBtn3.x = this.countText3.x + 100; + this.buyBtn3.y = _loc15_.y - 3; + var _loc17_:Sprite = PublicMethod.getTrLine(570); + _loc2_.addChild(_loc17_); + _loc17_.x = 20; + _loc17_.y = this.buyBtn3.y + 33; + var _loc18_:Sprite = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),16,16); + _loc2_.addChild(_loc18_); + _loc18_.x = 40; + _loc18_.y = _loc13_.y + 50; + var _loc19_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.ui_resource_4)); + _loc18_.addChild(_loc19_); + _loc19_.x = 4; + _loc19_.y = 5; + this.inputUI4 = new UINumInputText(120); + _loc2_.addChild(this.inputUI4); + this.inputUI4.x = _loc18_.x + 65; + this.inputUI4.y = _loc18_.y + 1; + this.inputUI4.setInputEvent(this.changeInputValue4); + var _loc20_:TextField = PublicMethod.getTextFieldWithFillter(16777215,20); + _loc20_.text = "×"; + _loc2_.addChild(_loc20_); + _loc20_.x = this.inputUI4.x + 130; + _loc20_.y = _loc18_.y + 4; + this.singleText4 = PublicMethod.getTextFieldWithFillter(16773120,50); + _loc2_.addChild(this.singleText4); + this.singleText4.x = _loc20_.x + 30; + this.singleText4.y = _loc20_.y; + var _loc21_:TextField = PublicMethod.getTextFieldWithFillter(16777215,20); + _loc21_.text = "="; + _loc2_.addChild(_loc21_); + _loc21_.x = _loc20_.x + 100; + _loc21_.y = _loc20_.y; + this.countText4 = PublicMethod.getTextFieldWithFillter(16773120,100); + _loc2_.addChild(this.countText4); + this.countText4.x = _loc21_.x + 30; + this.countText4.y = _loc21_.y; + this.buyBtn4 = new UIButton("购 买"); + _loc2_.addChild(this.buyBtn4); + this.buyBtn4.x = this.countText4.x + 100; + this.buyBtn4.y = _loc20_.y - 3; + var _loc22_:Sprite = PublicMethod.getTrLine(570); + _loc2_.addChild(_loc22_); + _loc22_.x = 20; + _loc22_.y = this.buyBtn4.y + 33; + this.buyBtn1.onClick = this.buyResEvent; + this.buyBtn2.onClick = this.buyResEvent; + this.buyBtn3.onClick = this.buyResEvent; + this.buyBtn4.onClick = this.buyResEvent; + _loc23_ = new UIWindowBg(); + _loc23_.initSecondPanel(614,61); + this.bg.addChild(_loc23_); + _loc23_.x = 4; + _loc23_.y = _loc2_.y + _loc2_.height + 4; + this.currCanBuyText = PublicMethod.getTextFieldWithFillter(16777215,300); + _loc23_.addChild(this.currCanBuyText); + this.currCanBuyText.x = 200; + this.currCanBuyText.y = 6; + this.nextCanBuyText = PublicMethod.getTextFieldWithFillter(16777215,300); + _loc23_.addChild(this.nextCanBuyText); + this.nextCanBuyText.x = 200; + this.nextCanBuyText.y = this.currCanBuyText.y + 20; + this.labelText = PublicMethod.getTextFieldWithFillter(16711680,300); + _loc23_.addChild(this.labelText); + this.labelText.x = 200; + this.labelText.y = this.nextCanBuyText.y + 25; + this.labelText.text = "超出仓库上限的资源,下线后会消失"; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(ShopEvent.SHOP_RESOURCE_VIEW,this.getResData); + ConnectService.getInstance().addEventListener(ShopEvent.SHOP_RESOURCE_BUY,this.buyResResult); + this.getResView(); + } + + private function clearEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(ShopEvent.SHOP_RESOURCE_VIEW,this.getResData); + ConnectService.getInstance().removeEventListener(ShopEvent.SHOP_RESOURCE_BUY,this.buyResResult); + } + + private function getResView() : void + { + ConnectService.getInstance().shopService.showCashByResView(); + } + + private function getResData(param1:ShopEvent) : void + { + var _loc2_:Object = param1.resObject; + this.remainCount = _loc2_.remainCount; + this.currCanBuyText.htmlText = "当前等级城池1元宝可购买 " + _loc2_.currSingleNum + " 资源"; + if(_loc2_.nextSingleNum) + { + this.nextCanBuyText.htmlText = "下一等级城池1元宝可购买 " + _loc2_.nextSingleNum + " 资源"; + } + else + { + this.nextCanBuyText.htmlText = "下一等级城池1元宝可购买 " + _loc2_.currSingleNum + " 资源"; + } + this.currSingleNum = _loc2_.currSingleNum; + this.singleText1.text = _loc2_.currSingleNum; + this.countText1.text = _loc2_.currSingleNum; + this.inputUI1.setTextNum(1); + this.singleText2.text = _loc2_.currSingleNum; + this.countText2.text = _loc2_.currSingleNum; + this.inputUI2.setTextNum(1); + this.singleText3.text = _loc2_.currSingleNum; + this.countText3.text = _loc2_.currSingleNum; + this.inputUI3.setTextNum(1); + this.singleText4.text = _loc2_.currSingleNum; + this.countText4.text = _loc2_.currSingleNum; + this.inputUI4.setTextNum(1); + this.setCanBuyNums(); + } + + private function buyResEvent(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc2_:UIButton = param1.currentTarget as UIButton; + if(_loc2_ == this.buyBtn1) + { + _loc3_ = 20100002; + _loc4_ = this.inputUI1.getTextNum(); + } + if(_loc2_ == this.buyBtn2) + { + _loc3_ = 20100003; + _loc4_ = this.inputUI2.getTextNum(); + } + if(_loc2_ == this.buyBtn3) + { + _loc3_ = 20100004; + _loc4_ = this.inputUI3.getTextNum(); + } + if(_loc2_ == this.buyBtn4) + { + _loc3_ = 20100005; + _loc4_ = this.inputUI4.getTextNum(); + } + if(_loc3_ > 0 && _loc4_ > 0) + { + ConnectService.getInstance().shopService.buyRes(_loc3_,_loc4_); + } + } + + private function getCountNums(param1:int) : void + { + var _loc2_:int = 0; + switch(param1) + { + case 1: + _loc2_ = this.inputUI1.getTextNum(); + this.countText1.text = String(_loc2_ * this.currSingleNum); + break; + case 2: + _loc2_ = this.inputUI2.getTextNum(); + this.countText2.text = String(_loc2_ * this.currSingleNum); + break; + case 3: + _loc2_ = this.inputUI3.getTextNum(); + this.countText3.text = String(_loc2_ * this.currSingleNum); + break; + case 4: + _loc2_ = this.inputUI4.getTextNum(); + this.countText4.text = String(_loc2_ * this.currSingleNum); + } + } + + private function buyResResult(param1:ShopEvent) : void + { + var _loc2_:int = int(param1.resObject.cash); + this.remainCount -= _loc2_; + MessageBoxUI.getInstance().addMessage(param1.resObject.result); + this.setCanBuyNums(); + } + + public function setCanBuyNums() : void + { + this.canBuyText.htmlText = "你今天还可以购买 " + this.remainCount + " 元宝的资源"; + this.inputUI1.setMaxNum(this.remainCount); + this.inputUI2.setMaxNum(this.remainCount); + this.inputUI3.setMaxNum(this.remainCount); + this.inputUI4.setMaxNum(this.remainCount); + } + + private function changeInputValue1() : void + { + this.getCountNums(1); + } + + private function changeInputValue2() : void + { + this.getCountNums(2); + } + + private function changeInputValue3() : void + { + this.getCountNums(3); + } + + private function changeInputValue4() : void + { + this.getCountNums(4); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopPage_3.as b/flash_decompiled/com/view/ui/shop/ShopPage_3.as new file mode 100644 index 0000000..cb4b6ab --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopPage_3.as @@ -0,0 +1,89 @@ +package com.view.ui.shop +{ + import com.InstallFace; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIShopItem; + import com.view.newui.UIWindowBg; + import com.view.ui.shop.data.ItemData; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + + public class ShopPage_3 extends Sprite + { + + private var bg:UIWindowBg; + + private var face:InstallFace = InstallFace.getInstance(); + + private var shop:ShopUI = ShopUI.getInstance(); + + private var shopScroll:ScrollPane; + + private var shopListMc:Sprite; + + private var itemsList:Array; + + public function ShopPage_3() + { + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + this.shopScroll = new ScrollPane(); + this.shopScroll.setSize(626,332); + this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg.addChild(this.shopScroll); + this.shopScroll.x = 4; + this.shopScroll.y = 6; + this.shopListMc = new Sprite(); + this.shopScroll.source = this.shopListMc; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + } + + private function addEvent(param1:Event) : void + { + if(ShopState.devShopList.length == 0) + { + ShopUI.getInstance().getShopView(); + Utils.g_events.addEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + else if(this.itemsList == null) + { + this.getShopData(null); + } + } + + private function clearEvent(param1:Event) : void + { + if(Utils.g_events.hasEventListener(DevEvent.SHOPCHANGE)) + { + Utils.g_events.removeEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + } + + private function getShopData(param1:DevEvent) : void + { + var _loc2_:int = 0; + var _loc3_:ItemData = null; + var _loc4_:UIShopItem = null; + this.itemsList = ShopState.devShopList; + this.itemsList.sortOn("shopId",Array.NUMERIC); + for each(_loc3_ in this.itemsList) + { + _loc4_ = new UIShopItem(_loc3_); + this.shopListMc.addChild(_loc4_); + _loc4_.x = 205 * (_loc2_ % 3); + _loc4_.y = 113 * int(_loc2_ / 3); + _loc2_++; + } + this.shopScroll.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopPage_4.as b/flash_decompiled/com/view/ui/shop/ShopPage_4.as new file mode 100644 index 0000000..66d0f54 --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopPage_4.as @@ -0,0 +1,89 @@ +package com.view.ui.shop +{ + import com.InstallFace; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIShopItem; + import com.view.newui.UIWindowBg; + import com.view.ui.shop.data.ItemData; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + + public class ShopPage_4 extends Sprite + { + + private var bg:UIWindowBg; + + private var face:InstallFace = InstallFace.getInstance(); + + private var shop:ShopUI = ShopUI.getInstance(); + + private var shopScroll:ScrollPane; + + private var shopListMc:Sprite; + + private var itemsList:Array; + + public function ShopPage_4() + { + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + this.shopScroll = new ScrollPane(); + this.shopScroll.setSize(626,332); + this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg.addChild(this.shopScroll); + this.shopScroll.x = 4; + this.shopScroll.y = 6; + this.shopListMc = new Sprite(); + this.shopScroll.source = this.shopListMc; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + } + + private function addEvent(param1:Event) : void + { + if(ShopState.militaryShopList.length == 0) + { + ShopUI.getInstance().getShopView(); + Utils.g_events.addEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + else if(this.itemsList == null) + { + this.getShopData(null); + } + } + + private function clearEvent(param1:Event) : void + { + if(Utils.g_events.hasEventListener(DevEvent.SHOPCHANGE)) + { + Utils.g_events.removeEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + } + + private function getShopData(param1:DevEvent) : void + { + var _loc2_:int = 0; + var _loc3_:ItemData = null; + var _loc4_:UIShopItem = null; + this.itemsList = ShopState.militaryShopList; + this.itemsList.sortOn("shopId",Array.NUMERIC); + for each(_loc3_ in this.itemsList) + { + _loc4_ = new UIShopItem(_loc3_); + this.shopListMc.addChild(_loc4_); + _loc4_.x = 205 * (_loc2_ % 3); + _loc4_.y = 113 * int(_loc2_ / 3); + _loc2_++; + } + this.shopScroll.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopPage_5.as b/flash_decompiled/com/view/ui/shop/ShopPage_5.as new file mode 100644 index 0000000..6f9daa4 --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopPage_5.as @@ -0,0 +1,97 @@ +package com.view.ui.shop +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIPresItem; + import com.view.newui.UIWindowBg; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class ShopPage_5 extends Sprite + { + + private var bg:UIWindowBg; + + private var face:InstallFace = InstallFace.getInstance(); + + private var shop:ShopUI = ShopUI.getInstance(); + + private var shopScroll:ScrollPane; + + private var shopListMc:Sprite; + + private var itemsList:Array; + + private var tagId:int = 999; + + public function ShopPage_5() + { + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + this.shopScroll = new ScrollPane(); + this.shopScroll.setSize(626,332); + this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg.addChild(this.shopScroll); + this.shopScroll.x = 4; + this.shopScroll.y = 6; + this.shopListMc = new Sprite(); + this.shopScroll.source = this.shopListMc; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + } + + private function addEvent(param1:Event) : void + { + if(ShopState.exploitShopList.length == 0) + { + ShopUI.getInstance().getShopView(); + Utils.g_events.addEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + else if(this.itemsList == null) + { + this.getShopData(null); + } + } + + private function clearEvent(param1:Event) : void + { + if(Utils.g_events.hasEventListener(DevEvent.SHOPCHANGE)) + { + Utils.g_events.removeEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + } + + private function getShopData(param1:DevEvent) : void + { + var _loc2_:int = 0; + var _loc3_:Object = null; + var _loc4_:TextField = null; + var _loc5_:UIPresItem = null; + this.itemsList = ShopState.exploitShopList; + this.itemsList.sortOn("shopId",Array.NUMERIC); + for each(_loc3_ in this.itemsList) + { + _loc5_ = new UIPresItem(_loc3_); + this.shopListMc.addChild(_loc5_); + _loc5_.x = 205 * (_loc2_ % 3); + _loc5_.y = 113 * int(_loc2_ / 3); + _loc2_++; + } + _loc4_ = PublicMethod.getTextField(16777215,100); + _loc4_.height = 30; + this.shopListMc.addChild(_loc4_); + _loc4_.y = this.shopListMc.height; + this.shopScroll.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopPage_6.as b/flash_decompiled/com/view/ui/shop/ShopPage_6.as new file mode 100644 index 0000000..6d69863 --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopPage_6.as @@ -0,0 +1,97 @@ +package com.view.ui.shop +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIPresItem; + import com.view.newui.UIWindowBg; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class ShopPage_6 extends Sprite + { + + private var bg:UIWindowBg; + + private var face:InstallFace = InstallFace.getInstance(); + + private var shop:ShopUI = ShopUI.getInstance(); + + private var shopScroll:ScrollPane; + + private var shopListMc:Sprite; + + private var itemsList:Array; + + private var tagId:int = 0; + + public function ShopPage_6() + { + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + this.shopScroll = new ScrollPane(); + this.shopScroll.setSize(626,332); + this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg.addChild(this.shopScroll); + this.shopScroll.x = 4; + this.shopScroll.y = 6; + this.shopListMc = new Sprite(); + this.shopScroll.source = this.shopListMc; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + } + + private function addEvent(param1:Event) : void + { + if(ShopState.preShopList.length == 0) + { + ShopUI.getInstance().getShopView(); + Utils.g_events.addEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + else if(this.itemsList == null) + { + this.getShopData(null); + } + } + + private function clearEvent(param1:Event) : void + { + if(Utils.g_events.hasEventListener(DevEvent.SHOPCHANGE)) + { + Utils.g_events.removeEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + } + + private function getShopData(param1:DevEvent) : void + { + var _loc2_:int = 0; + var _loc3_:Object = null; + var _loc4_:TextField = null; + var _loc5_:UIPresItem = null; + this.itemsList = ShopState.preShopList; + this.itemsList.sortOn("shopId",Array.NUMERIC); + for each(_loc3_ in this.itemsList) + { + _loc5_ = new UIPresItem(_loc3_); + this.shopListMc.addChild(_loc5_); + _loc5_.x = 205 * (_loc2_ % 3); + _loc5_.y = 113 * int(_loc2_ / 3); + _loc2_++; + } + _loc4_ = PublicMethod.getTextField(16777215,100); + _loc4_.height = 30; + this.shopListMc.addChild(_loc4_); + _loc4_.y = this.shopListMc.height; + this.shopScroll.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopPage_7.as b/flash_decompiled/com/view/ui/shop/ShopPage_7.as new file mode 100644 index 0000000..ddbfcac --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopPage_7.as @@ -0,0 +1,89 @@ +package com.view.ui.shop +{ + import com.InstallFace; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIShopItem; + import com.view.newui.UIWindowBg; + import com.view.ui.shop.data.ItemData; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + + public class ShopPage_7 extends Sprite + { + + private var bg:UIWindowBg; + + private var face:InstallFace = InstallFace.getInstance(); + + private var shop:ShopUI = ShopUI.getInstance(); + + private var shopScroll:ScrollPane; + + private var shopListMc:Sprite; + + private var itemsList:Array; + + public function ShopPage_7() + { + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + this.shopScroll = new ScrollPane(); + this.shopScroll.setSize(626,332); + this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg.addChild(this.shopScroll); + this.shopScroll.x = 4; + this.shopScroll.y = 6; + this.shopListMc = new Sprite(); + this.shopScroll.source = this.shopListMc; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + } + + private function addEvent(param1:Event) : void + { + if(ShopState.otherShopList.length == 0) + { + ShopUI.getInstance().getShopView(); + Utils.g_events.addEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + else if(this.itemsList == null) + { + this.getShopData(null); + } + } + + private function clearEvent(param1:Event) : void + { + if(Utils.g_events.hasEventListener(DevEvent.SHOPCHANGE)) + { + Utils.g_events.removeEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + } + + private function getShopData(param1:DevEvent) : void + { + var _loc2_:int = 0; + var _loc3_:ItemData = null; + var _loc4_:UIShopItem = null; + this.itemsList = ShopState.otherShopList; + this.itemsList.sortOn("shopId",Array.NUMERIC); + for each(_loc3_ in this.itemsList) + { + _loc4_ = new UIShopItem(_loc3_); + this.shopListMc.addChild(_loc4_); + _loc4_.x = 205 * (_loc2_ % 3); + _loc4_.y = 113 * int(_loc2_ / 3); + _loc2_++; + } + this.shopScroll.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopPage_8.as b/flash_decompiled/com/view/ui/shop/ShopPage_8.as new file mode 100644 index 0000000..e29ffd0 --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopPage_8.as @@ -0,0 +1,89 @@ +package com.view.ui.shop +{ + import com.InstallFace; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIShopItem; + import com.view.newui.UIWindowBg; + import com.view.ui.shop.data.ItemData; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + + public class ShopPage_8 extends Sprite + { + + private var bg:UIWindowBg; + + private var face:InstallFace = InstallFace.getInstance(); + + private var shop:ShopUI = ShopUI.getInstance(); + + private var shopScroll:ScrollPane; + + private var shopListMc:Sprite; + + private var itemsList:Array; + + public function ShopPage_8() + { + super(); + this.bg = new UIWindowBg(); + this.bg.initThirdPanel(622,337); + addChild(this.bg); + this.bg.x = 4; + this.bg.y = 4; + this.shopScroll = new ScrollPane(); + this.shopScroll.setSize(626,332); + this.shopScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg.addChild(this.shopScroll); + this.shopScroll.x = 4; + this.shopScroll.y = 6; + this.shopListMc = new Sprite(); + this.shopScroll.source = this.shopListMc; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearEvent); + } + + private function addEvent(param1:Event) : void + { + if(ShopState.otherShopList.length == 0) + { + ShopUI.getInstance().getShopView(); + Utils.g_events.addEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + else if(this.itemsList == null) + { + this.getShopData(null); + } + } + + private function clearEvent(param1:Event) : void + { + if(Utils.g_events.hasEventListener(DevEvent.SHOPCHANGE)) + { + Utils.g_events.removeEventListener(DevEvent.SHOPCHANGE,this.getShopData); + } + } + + private function getShopData(param1:DevEvent) : void + { + var _loc2_:int = 0; + var _loc3_:ItemData = null; + var _loc4_:UIShopItem = null; + this.itemsList = ShopState.bookShopList; + this.itemsList.sortOn("shopId",Array.NUMERIC); + for each(_loc3_ in this.itemsList) + { + _loc4_ = new UIShopItem(_loc3_); + this.shopListMc.addChild(_loc4_); + _loc4_.x = 205 * (_loc2_ % 3); + _loc4_.y = 113 * int(_loc2_ / 3); + _loc2_++; + } + this.shopScroll.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopState.as b/flash_decompiled/com/view/ui/shop/ShopState.as new file mode 100644 index 0000000..c93ec20 --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopState.as @@ -0,0 +1,36 @@ +package com.view.ui.shop +{ + public class ShopState + { + + public static var num:int; + + public static var curNum:int; + + public static var shopName:String; + + public static var isShowTip:Boolean; + + public static var isRefresh:Boolean; + + public static var hotShopList:Array = new Array(); + + public static var otherShopList:Array = new Array(); + + public static var militaryShopList:Array = new Array(); + + public static var devShopList:Array = new Array(); + + public static var preShopList:Array = new Array(); + + public static var exploitShopList:Array = new Array(); + + public static var bookShopList:Array = new Array(); + + public function ShopState() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/ShopUI.as b/flash_decompiled/com/view/ui/shop/ShopUI.as new file mode 100644 index 0000000..da918a4 --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/ShopUI.as @@ -0,0 +1,461 @@ +package com.view.ui.shop +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.shop.event.ShopEvent; + import com.events.DevEvent; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.Control; + import com.view.UIListManage; + import com.view.newui.UIButton; + import com.view.newui.UIBuyItem; + import com.view.newui.UIBuyPresItem; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ShopUI extends BaseUI + { + + private static var instance:ShopUI; + + private var _ShopUrl:String = "Shop.swf"; + + private var lastbtn:UITabBtn; + + private var btnArr:Array; + + private var paneBg:UIWindowBg; + + private var startPage:int; + + private var curPage:Sprite; + + private var page1:ShopPage_1; + + private var page2:ShopPage_2; + + private var page3:ShopPage_3; + + private var page4:ShopPage_4; + + private var page5:ShopPage_5; + + private var page6:ShopPage_6; + + private var page7:ShopPage_7; + + private var page8:ShopPage_8; + + private var cashMc:Sprite; + + private var cashText:TextField; + + private var payPointText:TextField; + + private var jungongValue:TextField; + + private var presValue:TextField; + + private var uIBuyItem:UIBuyItem; + + private var buyPresItemUI:UIBuyPresItem; + + public function ShopUI() + { + super(); + } + + public static function getInstance() : ShopUI + { + if(instance == null) + { + return instance = new ShopUI(); + } + return instance; + } + + public function open(param1:int = 0) : void + { + if(_loaderInfo == null) + { + this._loaderInfo = face.loaderInfo; + this.startPage = param1; + this.createUI(); + } + else + { + this.getPage(param1); + this.addUIToStage(); + } + } + + private function addUIToStage() : void + { + if(!UIListManage.getInstance().containsUI(this)) + { + UIListManage.getInstance().addUI(this); + } + } + + override public function loadUiComplete(param1:Event) : void + { + super.loadUiComplete(param1); + this.createUI(); + } + + override public function createUI() : void + { + var _loc9_:int = 0; + var _loc10_:UITabBtn = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_shangcheng); + super.setPosition(); + this.btnArr = new Array(); + var _loc1_:UITabBtn = new UITabBtn("热 卖",2); + var _loc2_:UITabBtn = new UITabBtn("购买资源",2); + var _loc3_:UITabBtn = new UITabBtn("内政相关",2); + var _loc4_:UITabBtn = new UITabBtn("军事相关",2); + var _loc5_:UITabBtn = new UITabBtn("军工商店",2); + var _loc6_:UITabBtn = new UITabBtn("声望商店",2); + var _loc7_:UITabBtn = new UITabBtn("其 他",2); + var _loc8_:UITabBtn = new UITabBtn("书 市",2); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + this.btnArr.push(_loc7_); + this.btnArr.push(_loc8_); + for each(_loc10_ in this.btnArr) + { + addChild(_loc10_); + _loc10_.x = 25 + _loc9_ * 66; + _loc10_.y = 40; + _loc10_.onClick = this.clickTab; + _loc9_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + this.getPage(this.startPage); + this.addUIToStage(); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(_loc2_ == _loc4_) + { + this.getPage(_loc3_); + break; + } + } + } + + private function getPage(param1:int) : void + { + if(this.lastbtn) + { + this.lastbtn.select = false; + } + this.lastbtn = this.btnArr[param1]; + this.lastbtn.select = true; + this.closeBuyItemsUI(); + if(Boolean(this.curPage) && this.paneBg.contains(this.curPage)) + { + this.paneBg.removeChild(this.curPage); + } + switch(param1 + 1) + { + case 1: + this.createPage1(); + this.curPage = this.page1; + this.paneBg.addChild(this.curPage); + break; + case 2: + this.createPage3(); + this.curPage = this.page3; + this.paneBg.addChild(this.curPage); + break; + case 3: + this.createPage4(); + this.curPage = this.page4; + this.paneBg.addChild(this.curPage); + break; + case 4: + this.createPage5(); + this.curPage = this.page5; + this.paneBg.addChild(this.curPage); + break; + case 5: + this.createPage6(); + this.curPage = this.page6; + this.paneBg.addChild(this.curPage); + break; + case 6: + this.createPage7(); + this.curPage = this.page7; + this.paneBg.addChild(this.curPage); + break; + case 7: + this.createPage8(); + this.curPage = this.page8; + this.paneBg.addChild(this.curPage); + } + } + + private function createPage1() : void + { + if(this.page1 == null) + { + this.page1 = new ShopPage_1(); + this.paneBg.addChild(this.page1); + } + } + + private function createPage2() : void + { + if(this.page2 == null) + { + this.page2 = new ShopPage_2(); + this.paneBg.addChild(this.page2); + } + } + + private function createPage3() : void + { + if(this.page3 == null) + { + this.page3 = new ShopPage_3(); + } + } + + private function createPage4() : void + { + if(this.page4 == null) + { + this.page4 = new ShopPage_4(); + } + } + + private function createPage5() : void + { + if(this.page5 == null) + { + this.page5 = new ShopPage_5(); + } + } + + private function createPage6() : void + { + if(this.page6 == null) + { + this.page6 = new ShopPage_6(); + } + } + + private function createPage7() : void + { + if(this.page7 == null) + { + this.page7 = new ShopPage_7(); + } + } + + private function createPage8() : void + { + if(this.page8 == null) + { + this.page8 = new ShopPage_8(); + } + } + + private function createCashMc() : void + { + var _loc3_:TextField = null; + var _loc4_:TextField = null; + this.cashMc = new Sprite(); + var _loc1_:Sprite = face.getSprite(ClassConfig.lib_ui_cash); + var _loc2_:Sprite = face.getSprite(ClassConfig.lib_ui_point); + this.cashMc.addChild(_loc1_); + this.cashMc.addChild(_loc2_); + this.cashText = PublicMethod.getTextFieldWithFillter(16773120,100); + this.cashMc.addChild(this.cashText); + this.payPointText = PublicMethod.getTextFieldWithFillter(16773120,100); + this.cashMc.addChild(this.payPointText); + _loc1_.x = 0; + _loc1_.y = 10; + this.cashText.x = _loc1_.x + _loc1_.width + 2; + this.cashText.y = 11; + _loc2_.x = 110; + _loc2_.y = _loc1_.y; + this.payPointText.x = _loc2_.x + _loc2_.width + 2; + this.payPointText.y = 11; + _loc3_ = PublicMethod.getTextFieldWithFillter(16777215,90); + this.cashMc.addChild(_loc3_); + _loc3_.x = 230; + _loc3_.y = this.cashText.y; + _loc3_.text = "当前军工值:"; + this.jungongValue = PublicMethod.getTextFieldWithFillter(16776960,100); + this.cashMc.addChild(this.jungongValue); + this.jungongValue.x = _loc3_.x + 70; + this.jungongValue.y = this.cashText.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(16777215,90); + this.cashMc.addChild(_loc4_); + _loc4_.x = _loc3_.x + 150; + _loc4_.y = this.cashText.y; + _loc4_.text = "当前声望值:"; + this.presValue = PublicMethod.getTextFieldWithFillter(16776960,100); + this.cashMc.addChild(this.presValue); + this.presValue.x = _loc4_.x + 70; + this.presValue.y = this.cashText.y; + var _loc5_:UIButton = new UIButton("充 值"); + var _loc6_:UIButton = new UIButton("背 包"); + this.cashMc.addChild(_loc5_); + _loc5_.x = 510; + _loc5_.y = 7; + this.cashMc.addChild(_loc6_); + _loc6_.onClick = this.openPack; + _loc5_.onClick = this.openPayHttp; + _loc6_.x = 574; + _loc6_.y = 7; + this.cashMc.y = 347; + this.cashMc.x = 8; + Utils.g_events.addEventListener(DevEvent.USERCHANGE,this.setCashAndPay); + } + + public function openPayHttp(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.openPayhttp(); + } + + public function setCashView() : void + { + if(this.cashMc == null) + { + this.createCashMc(); + } + if(!this.paneBg.contains(this.cashMc)) + { + this.paneBg.addChild(this.cashMc); + } + this.setCashAndPoint(); + } + + public function buyItems(param1:Object, param2:BitmapData) : void + { + if(this.uIBuyItem == null) + { + this.uIBuyItem = new UIBuyItem(); + this.uIBuyItem.x = int(width / 2 - this.uIBuyItem.width / 2); + this.uIBuyItem.y = int(height / 2 - this.uIBuyItem.height / 2) - 50; + } + if(!this.paneBg.contains(this.uIBuyItem)) + { + this.paneBg.addChild(this.uIBuyItem); + } + this.uIBuyItem.setData(param1,param2); + } + + public function buyPresItems(param1:Object, param2:BitmapData) : void + { + if(this.buyPresItemUI == null) + { + this.buyPresItemUI = new UIBuyPresItem(); + this.buyPresItemUI.x = int(width / 2 - this.buyPresItemUI.width / 2); + this.buyPresItemUI.y = int(height / 2 - this.buyPresItemUI.height / 2) - 50; + } + if(!this.paneBg.contains(this.buyPresItemUI)) + { + this.paneBg.addChild(this.buyPresItemUI); + } + this.buyPresItemUI.setData(param1,param2); + } + + private function closeBuyItemsUI() : void + { + if(Boolean(this.uIBuyItem) && this.paneBg.contains(this.uIBuyItem)) + { + this.paneBg.removeChild(this.uIBuyItem); + } + if(Boolean(this.buyPresItemUI) && this.paneBg.contains(this.buyPresItemUI)) + { + this.paneBg.removeChild(this.buyPresItemUI); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.closeBuyItemsUI(); + ConnectService.getInstance().removeEventListener(ShopEvent.Shop_getShopView,this.getShopViewSucc); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(ShopEvent.Shop_getShopView,this.getShopViewSucc); + } + + public function setCashAndPoint() : void + { + if(Boolean(this.cashText) && Boolean(this.payPointText)) + { + this.setCashAndPay(null); + } + } + + private function setCashAndPay(param1:DevEvent) : void + { + if(this.cashText) + { + this.cashText.text = NewUserData.getUser().cash.toString(); + this.payPointText.text = NewUserData.getUser().paypoint.toString(); + } + if(this.presValue) + { + this.presValue.text = NewUserData.getUser().prestige.toString(); + this.jungongValue.text = NewUserData.getUser().junGong.toString(); + } + } + + public function setJungong() : void + { + if(this.presValue) + { + this.setCashAndPay(null); + } + } + + private function openPack(param1:MouseEvent) : void + { + Control.getInstance().rightControlUI.openUserPack(param1); + } + + public function getShopView() : void + { + ConnectService.getInstance().shopService.getShopView(); + } + + private function getShopViewSucc(param1:ShopEvent) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/shop/data/ItemData.as b/flash_decompiled/com/view/ui/shop/data/ItemData.as new file mode 100644 index 0000000..696a9b2 --- /dev/null +++ b/flash_decompiled/com/view/ui/shop/data/ItemData.as @@ -0,0 +1,40 @@ +package com.view.ui.shop.data +{ + import com.data.data.items.Item; + + public class ItemData + { + + public var shopId:int; + + public var itemId:int; + + public var shopType:int; + + public var singleNum:int; + + public var singlePrice:int; + + public var realPrice:int; + + public var isQQAdd:int; + + public var pricePercent:int; + + public var isPayPointCanBuy:int; + + public var tagId:int; + + public var needPrestige:int; + + public var item:Item; + + public var viewMap:Object; + + public function ItemData() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/teach/TechBuild.as b/flash_decompiled/com/view/ui/teach/TechBuild.as new file mode 100644 index 0000000..984da6b --- /dev/null +++ b/flash_decompiled/com/view/ui/teach/TechBuild.as @@ -0,0 +1,60 @@ +package com.view.ui.teach +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class TechBuild extends BaseBuild + { + + public function TechBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/TechView1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/TechView3.swf"; + buildData.picUrl = "pic/build/TechView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/TechView2.swf"; + buildData.picUrl = "pic/build/TechView2.png"; + } + else + { + buildData.swfUrl = "pic/build/TechView1.swf"; + buildData.picUrl = "pic/build/TechView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new TechBuildUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/teach/TechBuildUI.as b/flash_decompiled/com/view/ui/teach/TechBuildUI.as new file mode 100644 index 0000000..a1c4fcc --- /dev/null +++ b/flash_decompiled/com/view/ui/teach/TechBuildUI.as @@ -0,0 +1,176 @@ +package com.view.ui.teach +{ + import com.control.ConnectService; + import com.control.tech.event.TechUpEvent; + import com.utils.TimerManager; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.buildlist.TimerInfo; + import flash.events.Event; + + public class TechBuildUI extends BaseUI + { + + private var techBgArr:Array; + + private var techInfo:TechInfoMc; + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var levelUpMc:TechUpMc; + + private var levelTechType:String; + + public function TechBuildUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_shuyuan); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(150,290); + _loc1_.addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc2_:UITitleBg = new UITitleBg("正在研究",this.bg1.width); + this.bg1.addChild(_loc2_); + _loc2_.x = int(this.bg1.width / 2 - _loc2_.width / 2); + this.techInfo = new TechInfoMc(); + _loc1_.addChild(this.techInfo); + this.techInfo.x = this.bg1.x + this.bg1.width + 3; + this.techInfo.y = this.bg1.y; + } + + override public function loadUiData() : void + { + super.loadUiData(); + } + + private function createLevelMc() : void + { + this.levelUpMc = new TechUpMc(); + } + + public function techLevelUp(param1:Object) : void + { + if(this.levelUpMc == null) + { + this.createLevelMc(); + } + this.bg1.addChild(this.levelUpMc); + this.levelUpMc.setUserTech(param1); + this.levelTechType = param1.entName; + } + + public function processDo(param1:TimerInfo) : void + { + this.levelUpMc.setTime(param1.timerStr); + } + + private function techUpOverResult(param1:TechUpEvent) : void + { + this.refresh(); + if(this.levelUpMc == null || !this.bg1.contains(this.levelUpMc)) + { + return; + } + this.levelUpMc.clear(); + this.bg1.removeChild(this.levelUpMc); + } + + private function getTechUpInto() : void + { + var _loc2_:Object = null; + var _loc3_:TimerInfo = null; + var _loc1_:int = TimerManager.getInstance().getSkillTimerLength(); + if(_loc1_ > 0) + { + _loc2_ = new Object(); + var _loc4_:int = 0; + var _loc5_:* = TimerManager.getInstance().getTechTimeMap(); + for each(_loc3_ in _loc5_) + { + _loc2_.queId = _loc3_.queId; + _loc2_.techName = _loc3_.name; + _loc2_.iconPath = _loc3_.iconPath; + _loc2_.entName = _loc3_.type; + _loc3_.process1 = this.processDo; + this.techLevelUp(_loc2_); + } + } + else + { + this.techUpOverResult(null); + } + } + + private function refresh() : void + { + this.techInfo.refresh(this.levelTechType); + this.levelTechType = ""; + } + + private function techCancelResult(param1:TechUpEvent) : void + { + if(this.levelUpMc == null || !this.bg1.contains(this.levelUpMc)) + { + return; + } + this.levelUpMc.clear(); + this.bg1.removeChild(this.levelUpMc); + } + + private function addSpeedTechResult(param1:TechUpEvent) : void + { + var _loc2_:Object = param1.obj; + if(_loc2_ == null) + { + this.levelUpMc.clear(); + this.bg1.removeChild(this.levelUpMc); + this.refresh(); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + ConnectService.getInstance().addEventListener(TechUpEvent.UP_OVER,this.techUpOverResult); + ConnectService.getInstance().addEventListener(TechUpEvent.CANCEL_OVER,this.techCancelResult); + ConnectService.getInstance().addEventListener(TechUpEvent.ADDSPEED_OK,this.addSpeedTechResult); + this.getTechUpInto(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + ConnectService.getInstance().removeEventListener(TechUpEvent.UP_OVER,this.techUpOverResult); + ConnectService.getInstance().removeEventListener(TechUpEvent.CANCEL_OVER,this.techCancelResult); + ConnectService.getInstance().removeEventListener(TechUpEvent.ADDSPEED_OK,this.addSpeedTechResult); + } + } +} + diff --git a/flash_decompiled/com/view/ui/teach/TechInfoMc.as b/flash_decompiled/com/view/ui/teach/TechInfoMc.as new file mode 100644 index 0000000..4299a9c --- /dev/null +++ b/flash_decompiled/com/view/ui/teach/TechInfoMc.as @@ -0,0 +1,454 @@ +package com.view.ui.teach +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.tech.event.TechListEvent; + import com.data.data.city.EntityConsume; + import com.data.data.city.EntityLimit; + import com.data.data.tech.Technology; + import com.utils.TimerManager; + import com.utils.Utils; + import com.view.mc.sprite.ItemMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.teach.data.TechData; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class TechInfoMc extends Sprite + { + + private var btnArr:Array; + + private var centerCss:TextFormat; + + private var face:InstallFace; + + private var imgMcArr:Array; + + private var bg2:UIWindowBg; + + private var techTitle:UITitleBg; + + private var studyBtn:UIButton; + + private var preBtn:UITabBtn; + + public var currPage:int = -1; + + private var techType:String; + + private var currentList:Array; + + private var curr_i:int = -1; + + private var isRed:Boolean; + + private var preTechMc:ItemMc; + + private var techEffValue:TextField; + + private var techLimitValue:TextField; + + private var techResValue:TextField; + + private var time1Value:TextField; + + private var time2Value:TextField; + + public function TechInfoMc() + { + var _loc7_:int = 0; + var _loc8_:UITabBtn = null; + var _loc9_:int = 0; + var _loc10_:TextField = null; + var _loc16_:ItemMc = null; + this.face = InstallFace.getInstance(); + this.currentList = new Array(); + super(); + this.btnArr = new Array(); + var _loc1_:UITabBtn = new UITabBtn("内政"); + var _loc2_:UITabBtn = new UITabBtn("步兵"); + var _loc3_:UITabBtn = new UITabBtn("弓兵"); + var _loc4_:UITabBtn = new UITabBtn("骑兵"); + var _loc5_:UITabBtn = new UITabBtn("战车"); + var _loc6_:UITabBtn = new UITabBtn("器械"); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + for each(_loc8_ in this.btnArr) + { + addChild(_loc8_); + _loc8_.x = 10 + _loc7_ * 56; + _loc8_.y = 0; + _loc8_.onClick = this.clickTabBtn; + _loc7_++; + } + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(450,262); + addChild(this.bg2); + this.bg2.y = 28; + this.imgMcArr = new Array(); + _loc9_ = 0; + while(_loc9_ < 5) + { + _loc16_ = new ItemMc(); + this.bg2.addChild(_loc16_); + _loc16_.x = 6 + _loc9_ * 90; + _loc16_.y = 6; + this.imgMcArr.push(_loc16_); + _loc16_.addClickEvent(); + _loc16_.addEventListener(MouseEvent.CLICK,this.clickTechMc); + _loc9_++; + } + this.techTitle = new UITitleBg("技能信息",this.bg2.width); + this.bg2.addChild(this.techTitle); + this.techTitle.x = int(this.bg2.width / 2 - this.techTitle.width / 2); + this.techTitle.y = 115; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc10_.text = "科技效果:"; + this.techEffValue = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,330); + this.techEffValue.text = "增强步兵类军队的体力,共10级"; + this.bg2.addChild(_loc10_); + this.bg2.addChild(this.techEffValue); + _loc10_.x = 20; + _loc10_.y = this.techTitle.y + 35; + this.techEffValue.x = 82; + this.techEffValue.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc11_.text = "研究条件:"; + this.techLimitValue = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,330); + this.techLimitValue.htmlText = "书院(等级1) 军营(等级1) "; + this.bg2.addChild(_loc11_); + this.bg2.addChild(this.techLimitValue); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc10_.y + 24; + this.techLimitValue.x = this.techEffValue.x; + this.techLimitValue.y = _loc11_.y; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc12_.text = "研究消耗:"; + this.techResValue = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,330); + this.techResValue.htmlText = "铜币 8 铜币 8 "; + this.bg2.addChild(_loc12_); + this.bg2.addChild(this.techResValue); + _loc12_.x = _loc10_.x; + _loc12_.y = _loc11_.y + 24; + this.techResValue.x = this.techEffValue.x; + this.techResValue.y = _loc12_.y; + var _loc13_:Sprite = PublicMethod.getTrLine(445); + this.bg2.addChild(_loc13_); + _loc13_.x = 6; + _loc13_.y = _loc12_.y + 26; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc14_.text = "实际耗时:"; + this.time1Value = PublicMethod.getTextField(UIConfig.textColor,70); + this.time1Value.text = "00:00:08"; + this.bg2.addChild(_loc14_); + this.bg2.addChild(this.time1Value); + _loc14_.x = _loc10_.x; + _loc14_.y = _loc13_.y + 10; + this.time1Value.x = _loc14_.x + _loc14_.width; + this.time1Value.y = _loc14_.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc15_.text = "原始耗时:"; + this.time2Value = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.time2Value.text = "00:00:08"; + this.bg2.addChild(_loc15_); + this.bg2.addChild(this.time2Value); + _loc15_.x = 206; + _loc15_.y = _loc14_.y; + this.time2Value.x = _loc15_.x + _loc15_.width; + this.time2Value.y = _loc14_.y; + this.studyBtn = new UIButton("研 究",2,10); + this.bg2.addChild(this.studyBtn); + this.studyBtn.x = width - this.studyBtn.width - 10; + this.studyBtn.y = _loc15_.y + 5; + this.studyBtn.onClick = this.techUp; + this.addEvent(); + this.btnArr[0].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function addEvent() : void + { + Utils.g_events.addEventListener(TechListEvent.GetTechList,this.getTechListResult); + } + + public function refresh(param1:String) : void + { + if(param1 == null || param1 == "") + { + return; + } + TechData.setTechTypeNull(param1); + if(param1 == this.techType) + { + this.getTechListResult(null); + } + } + + private function clickTabBtn(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.preBtn == _loc2_) + { + return; + } + if(this.preBtn) + { + this.preBtn.select = false; + } + this.preBtn = _loc2_; + this.preBtn.select = true; + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(_loc4_ == _loc2_) + { + this.getPage(_loc3_); + } + } + } + + private function getPage(param1:int) : void + { + if(this.currPage == param1) + { + return; + } + this.removeFromStage(null); + this.currPage = param1; + this.curr_i = -1; + switch(param1) + { + case 0: + this.techType = "TT_ZIYUAN"; + break; + case 1: + this.techType = "TT_BUBING"; + break; + case 2: + this.techType = "TT_GONGBING"; + break; + case 3: + this.techType = "TT_QIBING"; + break; + case 4: + this.techType = "TT_ZHANCHE"; + break; + case 5: + this.techType = "TT_QIXIE"; + } + this.getTechListResult(null); + } + + private function getTechListResult(param1:TechListEvent) : void + { + var _loc3_:int = 0; + var _loc4_:Object = null; + var _loc5_:Boolean = false; + var _loc6_:Array = null; + var _loc7_:EntityLimit = null; + var _loc8_:Array = null; + var _loc9_:EntityConsume = null; + var _loc10_:int = 0; + var _loc11_:Technology = null; + var _loc12_:ItemMc = null; + var _loc2_:Array = TechData.getTechListByType(this.techType); + if(_loc2_ == null) + { + return; + } + this.currentList = _loc2_["userTechList"] as Array; + for each(_loc4_ in this.currentList) + { + _loc5_ = false; + _loc6_ = _loc4_.limits as Array; + for each(_loc7_ in _loc6_) + { + if(_loc7_.red) + { + _loc5_ = true; + break; + } + } + _loc8_ = _loc4_.consumes as Array; + for each(_loc9_ in _loc8_) + { + if(_loc9_.needEntId == 90000001) + { + continue; + } + if(_loc9_.red) + { + _loc5_ = true; + break; + } + } + _loc10_ = int(_loc4_.level); + _loc11_ = _loc4_.tech as Technology; + if(_loc3_ < this.imgMcArr.length) + { + _loc12_ = this.imgMcArr[_loc3_] as ItemMc; + _loc12_.setLock(_loc5_); + _loc12_.setTitle(_loc10_ + " 级" + _loc11_.techName); + _loc12_.setImg("pic/tech/" + _loc11_.iconPath); + } + _loc3_++; + } + if(this.preTechMc == null) + { + this.preTechMc = this.imgMcArr[0]; + } + this.preTechMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + + private function clickTechMc(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:ItemMc = null; + var _loc2_:ItemMc = param1.target as ItemMc; + if(this.preTechMc) + { + this.preTechMc.setUnClick(); + } + this.preTechMc = _loc2_; + this.preTechMc.setClick(); + for(_loc3_ in this.imgMcArr) + { + _loc4_ = this.imgMcArr[_loc3_] as ItemMc; + if(this.preTechMc == _loc4_) + { + this.setItemValue(_loc3_); + } + } + } + + private function setItemValue(param1:int) : void + { + var _loc6_:EntityLimit = null; + var _loc9_:int = 0; + var _loc10_:int = 0; + var _loc11_:EntityConsume = null; + if(this.curr_i == param1) + { + return; + } + this.isRed = false; + this.curr_i = param1; + var _loc2_:Object = this.currentList[this.curr_i]; + if(_loc2_ == null) + { + return; + } + var _loc3_:Technology = _loc2_.tech as Technology; + this.techEffValue.text = _loc3_.techDesc; + var _loc4_:Array = _loc2_.limits as Array; + var _loc5_:String = ""; + for each(_loc6_ in _loc4_) + { + if(_loc6_.red) + { + this.isRed = true; + _loc5_ += ""; + } + else + { + _loc5_ += ""; + } + _loc5_ = _loc5_ + _loc6_.needEntName + "(等级" + _loc6_.needLevel + ") "; + } + this.techLimitValue.htmlText = _loc5_; + if(_loc2_.nextLevelName) + { + this.techTitle.setTitleName("升级至:" + _loc2_.nextLevelName); + this.studyBtn.visible = true; + var _loc7_:Array = _loc2_.consumes as Array; + var _loc8_:String = ""; + for each(_loc11_ in _loc7_) + { + if(_loc11_.needEntId == 90000001) + { + _loc9_ = _loc11_.needEntNum; + _loc10_ = _loc11_.orgNeedTime; + } + else + { + if(_loc11_.red) + { + this.isRed = true; + _loc8_ += ""; + } + else + { + _loc8_ += ""; + } + _loc8_ = _loc8_ + _loc11_.needEntName + " " + _loc11_.needEntNum; + _loc8_ = _loc8_ + " "; + } + } + this.techResValue.htmlText = _loc8_; + this.time1Value.text = PublicMethod.getTime(_loc9_); + this.time2Value.text = PublicMethod.getTime(_loc10_); + return; + } + this.techTitle.setTitleName("已满级"); + this.studyBtn.visible = false; + this.techResValue.htmlText = ""; + this.techLimitValue.htmlText = ""; + this.time1Value.text = ""; + this.time2Value.text = ""; + } + + private function removeFromStage(param1:Event) : void + { + var _loc2_:ItemMc = null; + this.currPage = -1; + this.techType = ""; + this.curr_i = -1; + this.currentList = new Array(); + for each(_loc2_ in this.imgMcArr) + { + _loc2_.clear(); + } + this.techEffValue.text = ""; + this.techLimitValue.text = ""; + this.techResValue.text = ""; + this.time1Value.text = ""; + this.time2Value.text = ""; + } + + private function techUp(param1:MouseEvent) : void + { + var _loc3_:Technology = null; + var _loc2_:int = TimerManager.getInstance().getSkillTimerLength(); + if(_loc2_ > 0) + { + MessageBoxUI.getInstance().addMessage("当前有科技正在升级中"); + return; + } + if(this.isRed) + { + MessageBoxUI.getInstance().addMessage("条件不足,无法研究"); + } + else + { + _loc3_ = this.currentList[this.curr_i].tech as Technology; + ConnectService.getInstance().techService.techLevelUp(_loc3_.entId); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/teach/TechUpMc.as b/flash_decompiled/com/view/ui/teach/TechUpMc.as new file mode 100644 index 0000000..e3dee58 --- /dev/null +++ b/flash_decompiled/com/view/ui/teach/TechUpMc.as @@ -0,0 +1,107 @@ +package com.view.ui.teach +{ + import com.common.PublicMethod; + import com.data.data.items.AddSpeed; + import com.utils.TimerManager; + import com.view.mc.sprite.ItemMc; + import com.view.newui.UISmallBtn; + import com.view.ui.addspeed.AddSpeedUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class TechUpMc extends Sprite + { + + private var levelUpMc:ItemMc; + + private var userUpTech:Object; + + private var title:TextField; + + private var css:TextFormat; + + private var leftTime:TextField; + + private var addSpeedBtn:UISmallBtn; + + private var cancelBtn:UISmallBtn; + + public function TechUpMc() + { + super(); + this.css = new TextFormat(); + this.css.align = "center"; + this.levelUpMc = new ItemMc(); + this.levelUpMc.x = 40; + this.levelUpMc.y = 72; + addChild(this.levelUpMc); + this.title = PublicMethod.getTextFieldWithFillter(16777215,88); + addChild(this.title); + this.title.x = this.levelUpMc.x; + this.title.y = this.levelUpMc.y + this.levelUpMc.height + 5; + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(16777215,60); + addChild(_loc1_); + _loc1_.text = "剩余时间:"; + _loc1_.x = 30; + _loc1_.y = this.title.y + this.title.height + 5; + this.leftTime = PublicMethod.getTextFieldWithFillter(16777215,60); + addChild(this.leftTime); + this.leftTime.text = "00:00:00"; + this.leftTime.x = _loc1_.x + _loc1_.width; + this.leftTime.y = _loc1_.y; + this.addSpeedBtn = new UISmallBtn("加 速",2); + addChild(this.addSpeedBtn); + this.addSpeedBtn.x = 26; + this.addSpeedBtn.y = _loc1_.y + _loc1_.height + 5; + this.addSpeedBtn.onClick = this.addSpeedEvent; + this.cancelBtn = new UISmallBtn("取 消",2); + addChild(this.cancelBtn); + this.cancelBtn.x = this.addSpeedBtn.x + this.addSpeedBtn.width + 14; + this.cancelBtn.y = this.addSpeedBtn.y; + this.cancelBtn.onClick = this.cancelEvent; + } + + public function setUserTech(param1:Object) : void + { + this.userUpTech = param1; + if(this.userUpTech.iconPath) + { + this.levelUpMc.setImg("pic/tech/" + this.userUpTech.iconPath); + } + if(this.userUpTech.techName) + { + this.title.text = this.userUpTech.techName; + } + this.title.setTextFormat(this.css); + } + + public function setTime(param1:String) : void + { + this.leftTime.text = param1; + } + + public function clear() : void + { + this.levelUpMc.clear(); + this.title.text = "00:00:00"; + } + + private function addSpeedEvent(param1:MouseEvent) : void + { + var _loc2_:AddSpeed = new AddSpeed(); + _loc2_.id = this.userUpTech.queId; + _loc2_.fastQueType = 2; + var _loc3_:AddSpeedUI = AddSpeedUI.getInstance(); + _loc3_.getFastInfo(_loc2_); + _loc3_.addToStage(); + } + + private function cancelEvent(param1:MouseEvent) : void + { + TimerManager.getInstance().cancelTech(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/teach/data/TechData.as b/flash_decompiled/com/view/ui/teach/data/TechData.as new file mode 100644 index 0000000..5974898 --- /dev/null +++ b/flash_decompiled/com/view/ui/teach/data/TechData.as @@ -0,0 +1,41 @@ +package com.view.ui.teach.data +{ + import com.control.ConnectService; + import com.control.tech.event.TechListEvent; + import com.utils.Utils; + import flash.utils.Dictionary; + + public class TechData + { + + public static var techList1:Dictionary = new Dictionary(); + + public function TechData() + { + super(); + } + + public static function getTechListByType(param1:String) : Array + { + var _loc2_:Array = techList1[param1]; + if(_loc2_ == null) + { + ConnectService.getInstance().techService.getTechList(param1); + } + return _loc2_; + } + + public static function setTechListByType(param1:String, param2:Array) : void + { + techList1[param1] = param2; + var _loc3_:TechListEvent = new TechListEvent(); + Utils.g_events.dispatchEvent(_loc3_); + } + + public static function setTechTypeNull(param1:String) : void + { + techList1[param1] = null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/temple/TempleBuild.as b/flash_decompiled/com/view/ui/temple/TempleBuild.as new file mode 100644 index 0000000..d709fe0 --- /dev/null +++ b/flash_decompiled/com/view/ui/temple/TempleBuild.as @@ -0,0 +1,69 @@ +package com.view.ui.temple +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class TempleBuild extends BaseBuild + { + + public function TempleBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/TempleView1.swf"; + super.loadSwfBg(); + } + else + { + face.stage.addEventListener(TempleEvent.OPEN,this.openTempleBuildUI,false,0,true); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/TempleView3.swf"; + buildData.picUrl = "pic/build/TempleView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/TempleView2.swf"; + buildData.picUrl = "pic/build/TempleView2.png"; + } + else + { + buildData.swfUrl = "pic/build/TempleView1.swf"; + buildData.picUrl = "pic/build/TempleView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new TempleBuildUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + + private function openTempleBuildUI(param1:TempleEvent) : void + { + this.openBuildUI(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/temple/TempleBuildUI.as b/flash_decompiled/com/view/ui/temple/TempleBuildUI.as new file mode 100644 index 0000000..2032060 --- /dev/null +++ b/flash_decompiled/com/view/ui/temple/TempleBuildUI.as @@ -0,0 +1,208 @@ +package com.view.ui.temple +{ + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.world.World; + import flash.events.Event; + import flash.events.MouseEvent; + + public class TempleBuildUI extends BaseUI + { + + private var btn1:UITabBtn; + + private var btn2:UITabBtn; + + private var btnArr:Array; + + private var bg2:UIWindowBg; + + private var page1:TemplePage1; + + private var page2:TemplePage2; + + private var page3:TemplePage3; + + public function TempleBuildUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_waishiyuan); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + ConnectService.getInstance().addEventListener(GuildEvent.LegationView,this.getLegaInfo); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_createGuild,this.createSucc); + this.getGuildInfo(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + ConnectService.getInstance().removeEventListener(GuildEvent.LegationView,this.getLegaInfo); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_createGuild,this.createSucc); + if(Boolean(this.page3) && bigBg.contains(this.page3)) + { + bigBg.removeChild(this.page3); + this.page3.clear(); + } + if(Boolean(this.page2) && this.bg2.contains(this.page2)) + { + this.bg2.removeChild(this.page2); + } + } + + private function createSucc(param1:GuildEvent) : void + { + this.getGuildInfo(); + if(face.currStatus == 1) + { + World.getInstance().refresh(); + } + } + + private function getGuildInfo() : void + { + ConnectService.getInstance().guildService.enterLegationView(); + } + + private function createCurUI() : void + { + var _loc1_:int = 0; + var _loc2_:UITabBtn = null; + this.btnArr = new Array(); + this.btn1 = new UITabBtn("加入联盟",2); + this.btn2 = new UITabBtn("创建联盟",2); + this.btnArr.push(this.btn1); + this.btnArr.push(this.btn2); + for each(_loc2_ in this.btnArr) + { + bigBg.addChild(_loc2_); + _loc2_.x = 15 + _loc1_ * 66; + _loc2_.y = 98; + _loc1_++; + } + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(622,273); + bigBg.addChild(this.bg2); + this.bg2.y = 123; + this.bg2.x = 4; + this.btn1.onClick = this.clickBtn1; + this.btn2.onClick = this.clickBtn2; + this.btn1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function createPage1() : void + { + if(this.page1 == null) + { + this.page1 = new TemplePage1(); + this.page1.x = 4; + this.page1.y = 3; + } + } + + private function createPage2() : void + { + if(this.page2 == null) + { + this.page2 = new TemplePage2(); + this.page2.x = 4; + this.page2.y = 3; + } + } + + private function createPage3() : void + { + if(this.page3 == null) + { + this.page3 = new TemplePage3(); + } + } + + private function clickBtn1(param1:MouseEvent) : void + { + this.btn1.select = true; + this.btn2.select = false; + this.createPage1(); + if(!this.bg2.contains(this.page1)) + { + this.bg2.addChild(this.page1); + } + if(Boolean(this.page2) && this.bg2.contains(this.page2)) + { + this.bg2.removeChild(this.page2); + } + } + + private function clickBtn2(param1:MouseEvent) : void + { + this.btn2.select = true; + this.btn1.select = false; + this.createPage2(); + if(!this.bg2.contains(this.page2)) + { + this.bg2.addChild(this.page2); + } + if(Boolean(this.page1) && this.bg2.contains(this.page1)) + { + this.bg2.removeChild(this.page1); + } + } + + private function getLegaInfo(param1:GuildEvent) : void + { + var _loc2_:Object = param1.legationObj; + if(_loc2_.forward == 1) + { + this.page1.setData(_loc2_); + return; + } + if(_loc2_.forward == 0) + { + if(Boolean(this.page1) && this.bg2.contains(this.page1)) + { + this.bg2.removeChild(this.page1); + } + if(Boolean(this.page2) && this.bg2.contains(this.page2)) + { + this.bg2.removeChild(this.page2); + } + if(bigBg.contains(this.bg2)) + { + bigBg.removeChild(this.btn1); + bigBg.removeChild(this.btn2); + bigBg.removeChild(this.bg2); + } + if(this.page3 == null) + { + this.createPage3(); + } + bigBg.addChild(this.page3); + this.page3.setData(_loc2_); + this.page3.x = 4; + this.page3.y = 98; + return; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/temple/TempleEvent.as b/flash_decompiled/com/view/ui/temple/TempleEvent.as new file mode 100644 index 0000000..4ce2fa5 --- /dev/null +++ b/flash_decompiled/com/view/ui/temple/TempleEvent.as @@ -0,0 +1,16 @@ +package com.view.ui.temple +{ + import flash.events.Event; + + public class TempleEvent extends Event + { + + public static var OPEN:String = "OPEN"; + + public function TempleEvent() + { + super(OPEN); + } + } +} + diff --git a/flash_decompiled/com/view/ui/temple/TemplePage1.as b/flash_decompiled/com/view/ui/temple/TemplePage1.as new file mode 100644 index 0000000..9fa2fdd --- /dev/null +++ b/flash_decompiled/com/view/ui/temple/TemplePage1.as @@ -0,0 +1,253 @@ +package com.view.ui.temple +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UITable; + import com.view.newui.UIWindowBg; + import com.view.ui.guild.GuildListUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.temple.mc.ApplyJoinLine; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class TemplePage1 extends Sprite + { + + private var face:InstallFace; + + private var tableMc:UITable; + + private var value1:UIInputText; + + private var value2:TextField; + + private var cancelBtn:UIButton; + + private var lineVec:Vector.; + + private var bg3:Sprite; + + private var guildApplyGuild:Object; + + private var guildInviteList:Array; + + private var applyGuildId:int; + + private var guildListUI:GuildListUI; + + public function TemplePage1() + { + var _loc1_:UIWindowBg = null; + var _loc6_:TextField = null; + var _loc8_:Sprite = null; + var _loc9_:TextField = null; + var _loc12_:ApplyJoinLine = null; + this.face = InstallFace.getInstance(); + super(); + _loc1_ = new UIWindowBg(); + _loc1_.initThirdPanel(230,266); + addChild(_loc1_); + var _loc2_:Array = ["邀请信息","操作"]; + var _loc3_:Array = [273,110]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(10,_loc2_,_loc3_); + addChild(this.tableMc); + this.tableMc.x = _loc1_.x + _loc1_.width + 3; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + this.value1 = new UIInputText(85); + var _loc5_:UIButton = new UIButton("联盟列表",2); + _loc1_.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 20; + _loc4_.text = "申请加入:"; + _loc5_.onClick = this.openGuildList; + _loc1_.addChild(this.value1); + this.value1.x = 60 + _loc4_.x; + this.value1.y = _loc4_.y - 2; + this.value1.setMaxChars(20); + _loc1_.addChild(_loc5_); + _loc5_.x = 160; + _loc5_.y = _loc4_.y - 3; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc6_.text = "申 请 中:"; + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + _loc1_.addChild(_loc6_); + _loc6_.x = _loc4_.x; + _loc6_.y = _loc4_.y + 30; + _loc1_.addChild(this.value2); + this.value2.x = this.value1.x; + this.value2.y = _loc6_.y; + this.value2.text = "无"; + this.cancelBtn = new UIButton("取 消",2); + _loc1_.addChild(this.cancelBtn); + this.cancelBtn.x = _loc5_.x; + this.cancelBtn.y = _loc6_.y - 3; + this.cancelBtn.onClick = this.cancelApply; + var _loc7_:UIButton = new UIButton("申请加入",2); + _loc1_.addChild(_loc7_); + _loc7_.x = 90; + _loc7_.y = _loc6_.y + 40; + _loc7_.onClick = this.applyJoinGuild; + _loc8_ = PublicMethod.getTrLine(220); + _loc1_.addChild(_loc8_); + _loc8_.x = 5; + _loc8_.y = _loc7_.y + 40; + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,220); + _loc9_.height = 150; + _loc9_.mouseEnabled = false; + _loc9_.wordWrap = true; + _loc9_.multiline = true; + _loc1_.addChild(_loc9_); + _loc9_.x = 11; + _loc9_.y = _loc8_.y + 10; + var _loc10_:TextFormat = new TextFormat(); + _loc10_.leading = 4; + _loc9_.defaultTextFormat = _loc10_; + _loc9_.text = " 同一时间只能向一个本国联盟发出申请,最多能收到10个联盟邀请,加入联盟后申请和邀请自动删除。"; + this.lineVec = new Vector.(); + var _loc11_:int = 0; + while(_loc11_ < 10) + { + _loc12_ = new ApplyJoinLine(); + this.lineVec.push(_loc12_); + this.tableMc.addChild(_loc12_); + _loc12_.y = 26 + _loc11_ * 25; + _loc12_.x = 4; + _loc11_++; + } + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + } + + private function delEvent(param1:Event) : void + { + if(Boolean(this.guildListUI) && contains(this.guildListUI)) + { + removeChild(this.guildListUI); + } + this.applyGuildId = 0; + this.value1.setText(""); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_JoinGuild,this.applyJoinResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Apply_delete,this.deleteJoinGuild); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Jion_refuse,this.refuseGuildApply); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_Jion_permit,this.acceptGuildApply); + } + + private function clearData() : void + { + var _loc1_:* = undefined; + for(_loc1_ in this.lineVec) + { + this.lineVec[_loc1_].setData(null); + } + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(GuildEvent.Guild_JoinGuild,this.applyJoinResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Apply_delete,this.deleteJoinGuild); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Jion_refuse,this.refuseGuildApply); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_Jion_permit,this.acceptGuildApply); + } + + public function setData(param1:Object) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + if(param1.guildApplyList[0]) + { + this.guildApplyGuild = param1.guildApplyList[0]; + this.cancelBtn.visible = true; + this.value2.text = this.guildApplyGuild.guildName; + this.applyGuildId = this.guildApplyGuild.guildId; + } + else + { + this.cancelBtn.visible = false; + this.guildApplyGuild = null; + this.value2.text = "无"; + } + if(param1.guildInviteList) + { + this.guildInviteList = param1.guildInviteList; + } + else + { + this.guildInviteList = null; + } + this.clearData(); + if(this.guildInviteList != null && this.guildInviteList.length > 0) + { + _loc2_ = int(this.guildInviteList.length); + _loc3_ = 0; + while(_loc3_ < _loc2_) + { + this.lineVec[_loc3_].setData(this.guildInviteList[0]); + _loc3_++; + } + } + } + + private function cancelApply(param1:MouseEvent) : void + { + if(this.applyGuildId > 0) + { + ConnectService.getInstance().guildService.deleteApplyById(this.applyGuildId); + } + } + + private function openGuildList(param1:MouseEvent) : void + { + this.guildListUI = GuildListUI.getInstance(); + addChild(this.guildListUI); + this.guildListUI.setType(0); + this.guildListUI.x = -19; + this.guildListUI.y = -165; + } + + private function applyJoinGuild(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.value1.getText()); + if(_loc2_.length > 0) + { + ConnectService.getInstance().guildService.applyJoinGuildByName(_loc2_); + } + } + + private function applyJoinResult(param1:GuildEvent) : void + { + ConnectService.getInstance().guildService.enterLegationView(); + MessageBoxUI.getInstance().addMessage("申请成功。"); + this.value1.setText(""); + } + + private function deleteJoinGuild(param1:GuildEvent) : void + { + ConnectService.getInstance().guildService.enterLegationView(); + MessageBoxUI.getInstance().addMessage("取消申请成功。"); + this.value1.setText(""); + } + + public function refuseGuildApply(param1:GuildEvent) : void + { + ConnectService.getInstance().guildService.enterLegationView(); + } + + public function acceptGuildApply(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("成功加入联盟"); + ConnectService.getInstance().guildService.enterLegationView(); + ConnectService.getInstance().castleService.getUserData(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/temple/TemplePage2.as b/flash_decompiled/com/view/ui/temple/TemplePage2.as new file mode 100644 index 0000000..342c4d5 --- /dev/null +++ b/flash_decompiled/com/view/ui/temple/TemplePage2.as @@ -0,0 +1,117 @@ +package com.view.ui.temple +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class TemplePage2 extends Sprite + { + + private var face:InstallFace; + + private var value2:UIInputText; + + private var value1:UIInputText; + + public function TemplePage2() + { + var _loc5_:TextField = null; + var _loc6_:UIInputText = null; + var _loc7_:UIButton = null; + var _loc8_:UIButton = null; + var _loc10_:TextField = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(230,266); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(370,266); + addChild(_loc2_); + _loc2_.x = _loc1_.x + _loc1_.width + 3; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + this.value1 = new UIInputText(85); + _loc1_.addChild(_loc3_); + _loc3_.x = 10; + _loc3_.y = 20; + _loc3_.text = "联盟名称:"; + _loc1_.addChild(this.value1); + this.value1.x = _loc3_.x + 60; + this.value1.y = _loc3_.y - 2; + this.value1.setMaxChars(20); + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + this.value2 = new UIInputText(85); + _loc1_.addChild(_loc4_); + _loc4_.x = _loc3_.x; + _loc4_.y = _loc3_.y + 30; + _loc4_.text = "旗 号:"; + _loc1_.addChild(this.value2); + this.value2.x = _loc4_.x + 60; + this.value2.y = _loc4_.y - 2; + this.value2.setMaxChars(4); + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,70); + _loc6_ = new UIInputText(85); + _loc1_.addChild(_loc5_); + _loc5_.x = _loc3_.x; + _loc5_.y = _loc4_.y + 30; + _loc5_.text = "铜 币:"; + _loc1_.addChild(_loc6_); + _loc6_.x = _loc5_.x + 60; + _loc6_.y = _loc5_.y - 2; + _loc6_.setText("30000"); + _loc6_.readOnly(); + _loc7_ = new UIButton("创 建",2); + _loc8_ = new UIButton("随 机",2); + _loc1_.addChild(_loc7_); + _loc1_.addChild(_loc8_); + _loc8_.x = this.value2.x + this.value2.width + 5; + _loc8_.y = this.value2.y; + _loc7_.x = 90; + _loc7_.y = 120; + _loc7_.onClick = this.create; + _loc8_.onClick = this.getRadomFlag; + var _loc9_:TextFormat = new TextFormat(); + _loc9_.leading = 5; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,350); + _loc10_.height = 100; + _loc2_.addChild(_loc10_); + _loc10_.x = 15; + _loc10_.y = 40; + _loc10_.defaultTextFormat = _loc9_; + _loc10_.mouseEnabled = false; + _loc10_.wordWrap = true; + _loc10_.multiline = true; + _loc10_.textColor = 11583207; + _loc10_.text = " 联盟名称全服唯一,2~7个字符,创建后不可更改。旗号全服唯一,一个字符。点击“随机”,系统会推荐一个旗号,您可要更改或再次随机。创建联盟需要1级外使院,消耗三万铜币。"; + } + + private function getRadomFlag(param1:MouseEvent) : void + { + this.value2.setText(String.fromCharCode(uint(Math.random() * (40869 - 19968) + 19968))); + } + + private function create(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.value1.getText()); + var _loc3_:String = PublicMethod.trim(this.value2.getText()); + if(_loc2_ != "" && _loc3_ != "") + { + ConnectService.getInstance().guildService.createGuild(_loc2_,_loc3_); + } + else + { + MessageBoxUI.getInstance().addMessage("联盟名和旗号名都不能为空"); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/temple/TemplePage3.as b/flash_decompiled/com/view/ui/temple/TemplePage3.as new file mode 100644 index 0000000..9318a6c --- /dev/null +++ b/flash_decompiled/com/view/ui/temple/TemplePage3.as @@ -0,0 +1,227 @@ +package com.view.ui.temple +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.combat.event.CombatEvent; + import com.data.MemeberShip; + import com.view.UIListManage; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UIWindowBg; + import com.view.ui.guild.GuildMainUI; + import com.view.ui.temple.mc.ArmyList; + import com.view.ui.warreport.ArmyPane; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class TemplePage3 extends Sprite + { + + private var face:InstallFace; + + private var tableMc:UITable; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var value6:TextField; + + private var armyVec:Vector.; + + private var armyPane:ArmyPane; + + public function TemplePage3() + { + var _loc1_:UIWindowBg = null; + var _loc6_:TextField = null; + var _loc7_:TextField = null; + var _loc12_:ArmyList = null; + this.face = InstallFace.getInstance(); + super(); + _loc1_ = new UIWindowBg(); + _loc1_.initThirdPanel(622,298); + addChild(_loc1_); + var _loc2_:Array = ["援军君主","战斗力","操 作"]; + var _loc3_:Array = [205,215,206]; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc4_.text = "所属联盟:"; + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(_loc4_); + _loc4_.x = 20; + _loc4_.y = 15; + _loc1_.addChild(this.value1); + this.value1.x = _loc4_.x + 62; + this.value1.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc5_.text = "联盟等级:"; + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(_loc5_); + _loc5_.x = _loc4_.x + 180; + _loc5_.y = _loc4_.y; + _loc1_.addChild(this.value2); + this.value2.x = _loc5_.x + 62; + this.value2.y = _loc4_.y; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc6_.text = "联盟盟主:"; + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(_loc6_); + _loc6_.x = _loc5_.x + 180; + _loc6_.y = _loc4_.y; + _loc1_.addChild(this.value3); + this.value3.x = _loc6_.x + 62; + this.value3.y = _loc4_.y; + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc7_.text = "联盟旗号:"; + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(_loc7_); + _loc7_.x = _loc4_.x; + _loc7_.y = _loc4_.y + 30; + _loc1_.addChild(this.value4); + this.value4.x = this.value1.x; + this.value4.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc8_.text = "联盟排名:"; + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y; + _loc1_.addChild(this.value5); + this.value5.x = this.value2.x; + this.value5.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc9_.text = "援军数量:"; + this.value6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc1_.addChild(_loc9_); + _loc9_.x = _loc6_.x; + _loc9_.y = _loc7_.y; + _loc1_.addChild(this.value6); + this.value6.x = this.value3.x; + this.value6.y = _loc9_.y; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(8,_loc2_,_loc3_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 78; + var _loc10_:UIButton = new UIButton("进入联盟",2); + _loc1_.addChild(_loc10_); + _loc10_.x = 555; + _loc10_.y = 10; + _loc10_.onClick = this.enterMyGuild; + this.armyVec = new Vector.(); + var _loc11_:int = 0; + while(_loc11_ < 8) + { + _loc12_ = new ArmyList(); + this.armyVec.push(_loc12_); + this.tableMc.addChild(_loc12_); + _loc12_.y = 26 + _loc11_ * 25; + _loc12_.x = 4; + _loc11_++; + } + } + + public function showArmyPane(param1:int, param2:int = 0) : void + { + if(this.armyPane == null) + { + this.armyPane = ArmyPane.getInstance(); + this.armyPane.updateFunc = this.getDefFriendList; + } + addChild(this.armyPane); + this.armyPane.update(param1,param2); + this.armyPane.x = int(width / 2 - this.armyPane.width / 2); + this.armyPane.y = int(height / 2 - this.armyPane.height / 2); + } + + public function clear() : void + { + if(Boolean(this.armyPane) && contains(this.armyPane)) + { + removeChild(this.armyPane); + } + } + + public function setData(param1:Object) : void + { + var _loc2_:Object = param1.guild; + this.value1.text = _loc2_.name; + this.value2.text = _loc2_.level.toString(); + this.value3.text = _loc2_.leaderName; + this.value4.text = _loc2_.flag; + if(_loc2_.ladder < 0) + { + this.value5.text = "未上榜"; + } + else + { + this.value5.text = _loc2_.ladder.toString(); + } + this.value6.text = "0/5"; + this.getDefFriendList(); + } + + private function getDefFriendList() : void + { + ConnectService.getInstance().combatService.getLeagueDefList(MemeberShip.getMainCastle().casId); + if(!ConnectService.getInstance().hasEventListener(CombatEvent.Combat_getLeagueDefList)) + { + ConnectService.getInstance().addEventListener(CombatEvent.Combat_getLeagueDefList,this.getDefFriendListSucc); + } + } + + private function getDefFriendListSucc(param1:CombatEvent) : void + { + var _loc3_:* = undefined; + if(ConnectService.getInstance().hasEventListener(CombatEvent.Combat_getLeagueDefList)) + { + ConnectService.getInstance().removeEventListener(CombatEvent.Combat_getLeagueDefList,this.getDefFriendListSucc); + } + this.clearArmyList(); + var _loc2_:Array = param1.list; + if(_loc2_ == null || _loc2_.length == 0) + { + this.value6.text = "0/5"; + return; + } + this.value6.text = _loc2_.length + "/5"; + for(_loc3_ in _loc2_) + { + if(_loc3_ > 7) + { + break; + } + this.armyVec[_loc3_].setDate(_loc2_[_loc3_]); + this.armyVec[_loc3_].refresh = this.getDefFriendList; + this.armyVec[_loc3_].viewArmyFunc = this.showArmyPane; + } + } + + private function clearArmyList() : void + { + var _loc1_:ArmyList = null; + for each(_loc1_ in this.armyVec) + { + _loc1_.setDate(null); + } + } + + private function enterMyGuild(param1:MouseEvent) : void + { + var _loc2_:GuildMainUI = GuildMainUI.getInstance(); + UIListManage.getInstance().addUI(_loc2_); + _loc2_.init(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/temple/mc/ApplyJoinLine.as b/flash_decompiled/com/view/ui/temple/mc/ApplyJoinLine.as new file mode 100644 index 0000000..8fe4ea2 --- /dev/null +++ b/flash_decompiled/com/view/ui/temple/mc/ApplyJoinLine.as @@ -0,0 +1,143 @@ +package com.view.ui.temple.mc +{ + import com.common.CommonAPI; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + + public class ApplyJoinLine extends Sprite + { + + private var guildId:int; + + private var text:TextField; + + private var acceptBtn:UISmallBtn; + + private var rejectBtn:UISmallBtn; + + private var bg:Sprite; + + private var objDate:Object; + + public function ApplyJoinLine() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,370,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); + this.text = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,270); + addChild(this.text); + this.text.styleSheet = CommonAPI.getLinkStyle(); + this.text.htmlText = ""; + this.text.addEventListener(TextEvent.LINK,this.linkeventhandler); + this.text.y = 3; + this.acceptBtn = new UISmallBtn("接 受",2); + this.rejectBtn = new UISmallBtn("拒 绝",2); + this.acceptBtn.visible = false; + this.rejectBtn.visible = false; + this.acceptBtn.onClick = this.joinGuild; + this.rejectBtn.onClick = this.rejectGuild; + addChild(this.acceptBtn); + addChild(this.rejectBtn); + this.acceptBtn.x = 272; + this.acceptBtn.y = 2; + this.rejectBtn.x = this.acceptBtn.x + this.acceptBtn.width + 5; + this.rejectBtn.y = 2; + this.text.mouseEnabled = true; + this.text.selectable = false; + } + + private function rollOut(param1:MouseEvent) : void + { + if(this.objDate) + { + this.bg.alpha = 0; + } + } + + private function rollOver(param1:MouseEvent) : void + { + if(this.objDate) + { + this.bg.alpha = 0.2; + } + } + + public function setData(param1:Object) : void + { + this.objDate = param1; + if(param1 == null) + { + this.guildId = 0; + this.acceptBtn.visible = false; + this.rejectBtn.visible = false; + this.text.visible = false; + } + else + { + this.guildId = param1.guildId; + this.text.visible = true; + this.text.htmlText = param1.sendUserName + " 邀请您加入联盟 " + param1.guildName; + this.acceptBtn.visible = true; + this.rejectBtn.visible = true; + this.acceptBtn.setEnable(); + this.rejectBtn.setEnable(); + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc7_:CastleUserUI = null; + var _loc2_:String = param1.text; + var _loc3_:Array = _loc2_.split(":"); + var _loc4_:String = _loc3_[0]; + var _loc5_:String = _loc3_[1]; + if(_loc4_ == "kinginfo") + { + _loc7_ = CastleUserUI.getInstance(); + _loc7_.show(); + _loc7_.updateByUserName(_loc5_); + return; + } + var _loc6_:LinkEvent = new LinkEvent(); + _loc6_.eventType = _loc4_; + _loc6_.id = _loc5_; + EventUtils.getInstance().dispatchEvent(_loc6_); + } + + public function clear() : void + { + } + + private function joinGuild(param1:MouseEvent) : void + { + if(this.guildId > 0) + { + this.acceptBtn.setUnEnable(); + ConnectService.getInstance().guildService.permitInvitation(this.guildId); + } + } + + private function rejectGuild(param1:MouseEvent) : void + { + if(this.guildId > 0) + { + this.rejectBtn.setUnEnable(); + ConnectService.getInstance().guildService.refuseInvitation(this.guildId); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/temple/mc/ArmyList.as b/flash_decompiled/com/view/ui/temple/mc/ArmyList.as new file mode 100644 index 0000000..79f39f6 --- /dev/null +++ b/flash_decompiled/com/view/ui/temple/mc/ArmyList.as @@ -0,0 +1,117 @@ +package com.view.ui.temple.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ArmyList extends Sprite + { + + private var bg1:Sprite; + + private var value1:TextField; + + private var value2:TextField; + + public var refresh:Function; + + public var viewArmyFunc:Function; + + private var btn1:UISmallBtn; + + private var btn2:UISmallBtn; + + public var obj:Object; + + private var atkOutId:int; + + public function ArmyList() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,612,23); + this.bg1.alpha = 0; + addChild(this.bg1); + this.bg1.y = 1; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,205); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,215); + addChild(this.value1); + addChild(this.value2); + this.value1.y = 3; + this.value2.x = this.value1.x + this.value1.width; + this.value2.y = this.value1.y; + this.value1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.value2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.btn1 = new UISmallBtn("遣 返",2); + this.btn2 = new UISmallBtn("查 看",2); + this.btn1.visible = false; + this.btn2.visible = false; + addChild(this.btn1); + addChild(this.btn2); + this.btn1.x = this.value2.x + this.value2.width + 30; + this.btn1.y = 2; + this.btn2.x = this.btn1.x + 70; + this.btn2.y = 2; + this.btn2.onClick = this.lookAttackOut; + this.btn1.onClick = this.callBack; + } + + private function callBack(param1:MouseEvent) : void + { + ConnectService.getInstance().battleService.callBackLeagueDefArmy(this.atkOutId); + if(!ConnectService.getInstance().hasEventListener(BattleEvent.B_callBackLeagueDefArmy)) + { + ConnectService.getInstance().addEventListener(BattleEvent.B_callBackLeagueDefArmy,this.callBackSucc); + } + } + + private function callBackSucc(param1:BattleEvent) : void + { + if(ConnectService.getInstance().hasEventListener(BattleEvent.B_callBackLeagueDefArmy)) + { + ConnectService.getInstance().removeEventListener(BattleEvent.B_callBackLeagueDefArmy,this.callBackSucc); + } + MessageBoxUI.getInstance().addMessage("遣返成功"); + if(this.refresh != null) + { + this.refresh(); + } + } + + private function lookAttackOut(param1:MouseEvent) : void + { + if(this.viewArmyFunc != null) + { + this.viewArmyFunc(this.atkOutId,0); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg1.alpha = 0; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg1.alpha = 0.2; + } + } + + public function setDate(param1:Object) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/test/TestUI.as b/flash_decompiled/com/view/ui/test/TestUI.as new file mode 100644 index 0000000..4cfa636 --- /dev/null +++ b/flash_decompiled/com/view/ui/test/TestUI.as @@ -0,0 +1,127 @@ +package com.view.ui.test +{ + import com.control.ConnectService; + import com.view.mc.button.Button_1; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.net.URLLoader; + import flash.net.URLRequest; + + public class TestUI extends BaseUI + { + + private var loadBtn:Button_1; + + private var testBtn:Button_1; + + private var isOn:Boolean; + + private var timer:int; + + private var xml:String = "xml/kingequip.xml"; + + private var urlloader:URLLoader; + + private var a:Array; + + public function TestUI() + { + super(); + super.addUIBg(); + super.setTitle("测试"); + super.setPosition(); + this.testBtn = new Button_1("测试"); + this.testBtn.onclick = this.begin; + addChild(this.testBtn); + this.testBtn.x = 100; + this.testBtn.y = 100; + this.testBtn.visible = false; + this.loadBtn = new Button_1("加载"); + this.loadBtn.onclick = this.beginLoad; + addChild(this.loadBtn); + this.loadBtn.x = 100; + this.loadBtn.y = 150; + } + + private function begin() : void + { + ConnectService.getInstance().castleService.testEquip(this.a); + } + + private function backF(param1:Object) : void + { + if(this.isOn) + { + } + } + + override public function addToStage(param1:Event) : void + { + this.isOn = true; + super.addToStage(param1); + } + + override public function removeFromStage(param1:Event) : void + { + this.isOn = false; + super.removeFromStage(param1); + } + + private function beginLoad() : void + { + this.loadBtn.setUnEnable(); + this.loadXML(); + } + + private function loadXML() : void + { + this.urlloader = new URLLoader(new URLRequest(this.xml)); + this.urlloader.addEventListener(Event.COMPLETE,this.loadedXmlComplete); + } + + private function loadedXmlComplete(param1:Event) : void + { + this.urlloader.removeEventListener(Event.COMPLETE,this.loadedXmlComplete); + this.testBtn.visible = true; + this.loadBtn.visible = false; + this.Init(XML(param1.target.data)); + } + + public function Init(param1:XML) : void + { + var _loc2_:* = undefined; + var _loc3_:Object = null; + this.a = new Array(); + for(_loc2_ in param1.Item) + { + _loc3_ = new Object(); + _loc3_.entId = String(param1.Item[_loc2_].@entId); + _loc3_.itemName = String(param1.Item[_loc2_].@itemName); + _loc3_.itemDesc = String(param1.Item[_loc2_].@itemDesc); + _loc3_.type = String(param1.Item[_loc2_].@type); + _loc3_.childType = String(param1.Item[_loc2_].@childType); + _loc3_.level = String(param1.Item[_loc2_].@level); + _loc3_.color = String(param1.Item[_loc2_].@color); + _loc3_.sellPrice = String(param1.Item[_loc2_].@sellPrice); + _loc3_.buyHonor = String(param1.Item[_loc2_].@buyHonor); + _loc3_.buyGuild = String(param1.Item[_loc2_].@buyGuild); + _loc3_.fameType = String(param1.Item[_loc2_].@fameType); + _loc3_.effectId = String(param1.Item[_loc2_].@effectId); + _loc3_.useMaxNum = String(param1.Item[_loc2_].@useMaxNum); + _loc3_.useContent = String(param1.Item[_loc2_].@useContent); + _loc3_.throwAble = String(param1.Item[_loc2_].@throwAble); + _loc3_.bandAble = String(param1.Item[_loc2_].@bandAble); + _loc3_.dropAble = String(param1.Item[_loc2_].@dropAble); + _loc3_.instDesc = String(param1.Item[_loc2_].@instDesc); + _loc3_.instCur = String(param1.Item[_loc2_].@instCur); + _loc3_.instMax = String(param1.Item[_loc2_].@instMax); + _loc3_.missionId = String(param1.Item[_loc2_].@missionId); + _loc3_.iconPath = String(param1.Item[_loc2_].@iconPath); + _loc3_.time = String(param1.Item[_loc2_].@time); + _loc3_.gemValue = String(param1.Item[_loc2_].@gemValue); + this.a.push(_loc3_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tianxia/CopyHeroSetUI.as b/flash_decompiled/com/view/ui/tianxia/CopyHeroSetUI.as new file mode 100644 index 0000000..8146d16 --- /dev/null +++ b/flash_decompiled/com/view/ui/tianxia/CopyHeroSetUI.as @@ -0,0 +1,346 @@ +package com.view.ui.tianxia +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.data.data.hero.Hero; + import com.events.DevEvent; + import com.newdata.hero.NewCopyHero; + import com.newdata.hero.NewHero; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.newui.UIBigButton; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIHeroItem; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class CopyHeroSetUI extends BaseUI + { + + private static var instants:CopyHeroSetUI; + + private var copyPowerText:TextField; + + private var powerText:TextField; + + private var heroMcVec1:Vector.; + + private var heroMcVec2:Vector.; + + private var heroIdList:Vector. = new Vector.(); + + private var currType:int; + + public function CopyHeroSetUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_jingxiang); + this.createUI(); + } + + public static function getInstants() : CopyHeroSetUI + { + if(instants == null) + { + instants = new CopyHeroSetUI(); + } + return instants; + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w; + window_heihgt = UIWindowBg.normal_window_h - 60; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640; + ui_closeBtn.y = 10; + } + + override public function setPosition() : void + { + } + + override public function createUI() : void + { + var _loc10_:UIHeroItem = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(UIWindowBg.normal_window_w + 190,UIWindowBg.normal_window_h + 20 - 60); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(UIWindowBg.normal_window_w + 180,110); + _loc1_.addChild(_loc2_); + _loc2_.x = 5; + _loc2_.y = 5; + var _loc3_:UITitleBg = new UITitleBg("镜像武将",_loc2_.width); + _loc2_.addChild(_loc3_); + _loc3_.x = int(_loc2_.width / 2 - _loc3_.width / 2); + this.heroMcVec1 = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 5) + { + _loc10_ = new UIHeroItem(); + _loc2_.addChild(_loc10_); + _loc10_.x = 5 + _loc4_ * 124; + _loc10_.y = 30; + this.heroMcVec1.push(_loc10_); + _loc4_++; + } + this.copyPowerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,190); + _loc1_.addChild(this.copyPowerText); + this.copyPowerText.x = 460; + this.copyPowerText.y = _loc2_.y + 126; + this.copyPowerText.htmlText = "武将镜像战斗力:0"; + var _loc5_:UIBigButton = new UIBigButton(5); + _loc1_.addChild(_loc5_); + _loc5_.x = 270; + _loc5_.y = 140; + _loc5_.onClick = this.saveCopyHero; + var _loc6_:UIWindowBg = new UIWindowBg(); + _loc6_.initSecondPanel(UIWindowBg.normal_window_w + 180,110); + _loc1_.addChild(_loc6_); + _loc6_.x = 5; + _loc6_.y = _loc5_.y + 50; + var _loc7_:UITitleBg = new UITitleBg("当前武将",_loc2_.width); + _loc6_.addChild(_loc7_); + _loc7_.x = int(_loc6_.width / 2 - _loc7_.width / 2); + this.heroMcVec2 = new Vector.(); + _loc4_ = 0; + while(_loc4_ < 5) + { + _loc10_ = new UIHeroItem(); + _loc6_.addChild(_loc10_); + _loc10_.x = 5 + _loc4_ * 124; + _loc10_.y = 30; + this.heroMcVec2.push(_loc10_); + _loc4_++; + } + this.powerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,190); + _loc1_.addChild(this.powerText); + this.powerText.x = this.copyPowerText.x; + this.powerText.y = _loc6_.y + 126; + this.powerText.htmlText = "当前武将战斗力:0"; + var _loc8_:UIButton = new UIButton("选择武将",2,10); + _loc1_.addChild(_loc8_); + _loc8_.x = 10; + _loc8_.y = this.powerText.y - 4; + _loc8_.onClick = this.selectHero; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,380); + _loc1_.addChild(_loc9_); + _loc9_.x = 85; + _loc9_.y = this.powerText.y; + _loc9_.htmlText = "镜像数据以上次设置镜像时的武将信息为准。"; + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance(); + _loc2_.setSelectheroArr(this.heroIdList); + addChild(_loc2_); + _loc2_.x = 0; + _loc2_.y = -35; + _loc2_.backFunc = this.selectHeroList; + } + + public function selectHeroList(param1:Vector.) : void + { + var _loc4_:Hero = null; + var _loc5_:Object = null; + if(param1.length == 0) + { + MessageBoxUI.getInstance().addMessage("未选择武将"); + return; + } + var _loc2_:Array = new Array(); + var _loc3_:Number = 0; + for each(_loc4_ in param1) + { + _loc5_ = new Object(); + _loc5_.showName = _loc4_.showName; + _loc5_.hpColor = _loc4_.hpColor; + _loc5_.hpStatusView = _loc4_.hpStatusView; + _loc5_.armyNum = _loc4_.armyNum; + _loc5_.armyName = _loc4_.armyName; + _loc5_.level = _loc4_.level; + _loc5_.changeCount = _loc4_.changeCount; + _loc5_.picPath = _loc4_.picPath; + _loc5_.heroId = _loc4_.heroId; + _loc3_ += _loc4_.combatPower; + _loc2_.push(_loc5_); + } + this.powerText.htmlText = "当前武将战斗力:" + _loc3_ + ""; + this.initHeroView(_loc2_); + } + + private function initHeroView(param1:Array) : void + { + var _loc2_:* = undefined; + this.clearHeroIdList(); + for(_loc2_ in this.heroMcVec2) + { + if(param1[_loc2_]) + { + this.heroIdList.push(param1[_loc2_].heroId); + this.heroMcVec2[_loc2_].setData(param1[_loc2_]); + } + else + { + this.heroMcVec2[_loc2_].setData(null); + } + } + } + + private function clearHeroIdList() : void + { + if(this.heroIdList.length > 0) + { + this.heroIdList = new Vector.(); + } + } + + private function saveCopyHero(param1:MouseEvent) : void + { + var _loc3_:int = 0; + if(this.heroIdList.length == 0) + { + MessageBoxUI.getInstance().addMessage("清先选择要镜像的武将"); + return; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in this.heroIdList) + { + _loc2_.push(_loc3_); + } + this.saveHeros(_loc2_); + } + + private function saveHeros(param1:Array) : void + { + switch(this.currType) + { + case 1: + ConnectService.getInstance().playService.saveCopyHeros(param1); + break; + case 2: + ConnectService.getInstance().activityService.saveYabiaoHeros(param1); + break; + case 3: + ConnectService.getInstance().activityService.saveWorldBossHeros(param1); + } + } + + public function init(param1:Vector., param2:int) : void + { + this.currType = param2; + var _loc3_:Number = 0; + this.heroIdList.splice(0,this.heroIdList.length); + var _loc4_:int = 0; + while(_loc4_ < 5) + { + if(_loc4_ < param1.length) + { + this.heroMcVec1[_loc4_].setData(param1[_loc4_]); + _loc3_ += param1[_loc4_].power; + this.heroIdList.push(param1[_loc4_].heroId); + } + else + { + this.heroMcVec1[_loc4_].setData(null); + } + _loc4_++; + } + this.copyPowerText.htmlText = "武将镜像战斗力:" + _loc3_ + ""; + this.initCurrHeroList(); + } + + private function initCurrHeroList() : void + { + var _loc4_:NewHero = null; + var _loc1_:Vector. = NewHeroData.getAllHeroList(); + if(_loc1_.length == 0) + { + return; + } + var _loc2_:Number = 0; + var _loc3_:int = 0; + while(_loc3_ < 5) + { + if(_loc3_ < this.heroIdList.length) + { + _loc4_ = NewHeroData.getHeroByHeroId(this.heroIdList[_loc3_]); + this.heroMcVec2[_loc3_].setData(this.getObjByHero(_loc4_)); + _loc2_ += _loc4_.combatPower; + } + else + { + this.heroMcVec2[_loc3_].setData(null); + } + _loc3_++; + } + this.powerText.htmlText = "当前武将战斗力:" + _loc2_ + ""; + } + + private function getObjByHero(param1:NewHero) : Object + { + var _loc2_:Object = new Object(); + _loc2_.heroId = param1.heroId; + _loc2_.showName = param1.showName; + _loc2_.hpColor = param1.hpColor; + _loc2_.hpStatusView = param1.hpStatusView; + _loc2_.armyName = param1.armyName; + _loc2_.level = param1.level; + _loc2_.changeCount = param1.changeCount; + _loc2_.armyNum = param1.armyNum; + _loc2_.picPath = param1.picPath; + _loc2_.power = param1.combatPower; + return _loc2_; + } + + private function getAllHeroListResult(param1:DevEvent) : void + { + this.initCurrHeroList(); + } + + override public function addToStage(param1:Event) : void + { + Utils.g_events.addEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getAllHeroListResult); + ConnectService.getInstance().addEventListener(PlayEvent.COPYHERO_SAVE_OK,this.saveCopyHeroSucc); + } + + override public function removeFromStage(param1:Event) : void + { + Utils.g_events.removeEventListener(DevEvent.DATA_HERO_GETALLHEROLIST,this.getAllHeroListResult); + ConnectService.getInstance().removeEventListener(PlayEvent.COPYHERO_SAVE_OK,this.saveCopyHeroSucc); + if(HeroListSelectUI.instance != null && contains(HeroListSelectUI.instance)) + { + removeChild(HeroListSelectUI.instance); + } + } + + private function saveCopyHeroSucc(param1:PlayEvent) : void + { + MessageBoxUI.getInstance().addMessage("镜像成功"); + closeUI2(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/tianxia/TianxiaMc.as b/flash_decompiled/com/view/ui/tianxia/TianxiaMc.as new file mode 100644 index 0000000..8c7120f --- /dev/null +++ b/flash_decompiled/com/view/ui/tianxia/TianxiaMc.as @@ -0,0 +1,191 @@ +package com.view.ui.tianxia +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.newdata.user.NewUserData; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.ranking.data.TianxiaData; + import com.view.world.ui.CastleUserUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class TianxiaMc 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 value6:TextField; + + private var face:InstallFace = InstallFace.getInstance(); + + private var css:TextFormat; + + private var startCombat:UISmallBtn; + + public var defaultRank:int; + + private var obj:TianxiaData; + + public var combatF:Function; + + public function TianxiaMc() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,430,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,430,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,58); + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,95); + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,40); + this.value4 = PublicMethod.getTextFieldWithFillter(16777215,66); + this.value5 = PublicMethod.getTextFieldWithFillter(16777215,66); + this.value6 = PublicMethod.getTextFieldWithFillter(16777215,50); + this.startCombat = new UISmallBtn("挑 战",2); + this.value2.mouseEnabled = true; + this.value2.addEventListener(TextEvent.LINK,this.linkeventhandler,false,0,true); + addChild(this.value1); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + addChild(this.value6); + addChild(this.startCombat); + this.value1.y = 2; + this.value2.x = this.value1.x + this.value1.width + 5; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.value6.x = this.value5.x + this.value5.width; + this.value6.y = 1; + this.startCombat.x = this.value6.x + this.value6.width + 4; + this.startCombat.y = this.value1.y; + this.startCombat.onClick = this.combat; + this.startCombat.visible = false; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + this.value6.defaultTextFormat = this.css; + } + + 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 setStyle(param1:int) : void + { + var _loc2_:TextFormat = new TextFormat(); + if(param1 == 0) + { + _loc2_.color = 16771584; + } + else if(param1 == 1) + { + _loc2_.color = 16743936; + } + else if(param1 == 2) + { + _loc2_.color = 15540735; + } + this.value1.setTextFormat(_loc2_); + this.value2.setTextFormat(_loc2_); + this.value3.setTextFormat(_loc2_); + this.value4.setTextFormat(_loc2_); + this.value5.setTextFormat(_loc2_); + this.value6.setTextFormat(_loc2_); + } + + public function setDate(param1:TianxiaData) : void + { + var _loc2_:int = 0; + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.value6.text = ""; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.startCombat.visible = false; + } + else + { + this.value1.text = param1.rankId.toString(); + this.value2.htmlText = "" + this.obj.userName + ""; + this.value3.text = this.obj.level.toString(); + this.value4.text = this.obj.winTimes.toString(); + this.value5.text = this.obj.loseTimes.toString(); + this.value6.text = this.obj.jifen.toString(); + this.startCombat.visible = true; + _loc2_ = NewUserData.getUser().userId; + if(_loc2_ == this.obj.userId) + { + this.startCombat.setUnEnable(); + } + else + { + this.startCombat.setEnable(); + } + } + } + + private function combat(param1:MouseEvent) : void + { + if(Boolean(this.obj) && Boolean(this.combatF)) + { + this.combatF(this.obj.userId); + } + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:String = param1.text; + var _loc3_:CastleUserUI = CastleUserUI.getInstance(); + _loc3_.show(); + _loc3_.updateByUserName(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/tianxia/TianxiaUI.as b/flash_decompiled/com/view/ui/tianxia/TianxiaUI.as new file mode 100644 index 0000000..1e3f7e3 --- /dev/null +++ b/flash_decompiled/com/view/ui/tianxia/TianxiaUI.as @@ -0,0 +1,632 @@ +package com.view.ui.tianxia +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.events.DevEvent; + import com.newdata.hero.NewCopyHero; + import com.newdata.hero.NewHeroData; + import com.newdata.user.NewUserData; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UIBigButton; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIHeroItem; + import com.view.newui.UIInputText; + import com.view.newui.UINums; + import com.view.newui.UIPageMc; + import com.view.newui.UITable; + 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.gift.NewItemMc; + import com.view.ui.battleview.CopyBattleViewUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.data.TianxiaData; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class TianxiaUI extends BaseUI + { + + private var tableMc:UITable; + + private var rankImg:UINums; + + private var dailyItemMc:NewItemMc; + + private var hasGetBtn:UIBigButton; + + private var getBtn:UIBigButton; + + private var myRankText:TextField; + + private var myJifenText:TextField; + + private var myHaoText:TextField; + + private var winTimesText:TextField; + + private var lostTimesText:TextField; + + private var leftTimesText:TextField; + + private var powerText:TextField; + + private var pageText:UIInputText; + + private var pageMc:UIPageMc; + + private var css:TextFormat; + + private var heroMcVec:Vector.; + + private var userListVec:Vector.; + + private var copyHeroSetUI:CopyHeroSetUI; + + private var currHeroIds:Array = new Array(); + + private var currCopyHeroVec:Vector. = new Vector.(); + + private var index:int = 1; + + private const listNum:int = 10; + + private var indexTemp:int = 1; + + public function TianxiaUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_tianxia); + 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 _loc1_:UIWindowBg = null; + var _loc4_:Button_9 = null; + var _loc8_:int = 0; + var _loc12_:TianxiaMc = null; + var _loc13_:UIHeroItem = null; + _loc1_ = new UIWindowBg(); + _loc1_.initSecondPanel(630,420); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(180,284); + _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); + this.myRankText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,150); + _loc2_.addChild(this.myRankText); + this.myRankText.x = 10; + this.myRankText.y = 60; + this.myRankText.htmlText = "我的排名:未上榜"; + this.rankImg = new UINums(10); + this.rankImg.showNum(0); + _loc2_.addChild(this.rankImg); + this.rankImg.x = 68; + this.rankImg.y = 55; + this.rankImg.visible = false; + this.myJifenText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,150); + _loc2_.addChild(this.myJifenText); + this.myJifenText.x = this.myRankText.x; + this.myJifenText.y = this.myRankText.y + 30; + this.myJifenText.htmlText = "我的积分:0"; + this.myHaoText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,150); + _loc2_.addChild(this.myHaoText); + this.myHaoText.x = this.myRankText.x; + this.myHaoText.y = this.myJifenText.y + 30; + this.myHaoText.htmlText = "我的称号:"; + this.winTimesText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,150); + _loc2_.addChild(this.winTimesText); + this.winTimesText.x = this.myRankText.x; + this.winTimesText.y = this.myHaoText.y + 30; + this.winTimesText.htmlText = "胜利次数:0"; + this.lostTimesText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,150); + _loc2_.addChild(this.lostTimesText); + this.lostTimesText.x = this.myRankText.x; + this.lostTimesText.y = this.winTimesText.y + 30; + this.lostTimesText.htmlText = "失败次数:0"; + this.leftTimesText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,150); + _loc2_.addChild(this.leftTimesText); + this.leftTimesText.x = this.myRankText.x; + this.leftTimesText.y = this.lostTimesText.y + 30; + this.leftTimesText.htmlText = "今日剩余次数:0"; + this.dailyItemMc = new NewItemMc(1); + _loc2_.addChild(this.dailyItemMc); + this.dailyItemMc.x = 20; + this.dailyItemMc.y = 240; + this.hasGetBtn = new UIBigButton(4); + _loc2_.addChild(this.hasGetBtn); + this.hasGetBtn.x = this.dailyItemMc.x + 50; + this.hasGetBtn.y = this.dailyItemMc.y; + this.hasGetBtn.setUnEnable(); + this.getBtn = new UIBigButton(3); + _loc2_.addChild(this.getBtn); + this.getBtn.x = this.hasGetBtn.x; + this.getBtn.y = this.hasGetBtn.y; + this.getBtn.onClick = this.getGiftItem; + _loc4_ = new Button_9("积分规则"); + _loc2_.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 35; + _loc4_.buttonMode = true; + var _loc5_:String = "1、君主等级达到100级后才可参与该活动
"; + _loc5_ = _loc5_ + "2、玩家每天有5次挑战机会,5次机会挑战结束后可以领取每日奖励
"; + _loc5_ = _loc5_ + "3、挑战模式,战胜排名低于自己的玩家可赢得2积分。战胜排名高于自己的玩家可赢得5积分,战败不扣分
"; + _loc5_ = _loc5_ + "4、防守模式,防守方不管胜利还是失败,都不扣分
"; + _loc5_ = _loc5_ + "5、根据积分不同,君主可获得不同称号,不同的称号每日领取的奖励也不同
-----------------------------------------------
王:积分1万以上
候:积分5000以上
将:积分2500以上
士:积分500以上
卒:积分500以下
"; + ToolTipManager.getInstance().setToolTip(_loc4_,new TxtTooltip(_loc5_),false,-1,false); + var _loc6_:Array = ["排名","君主","等级","胜利次数","失败次数","积分","操作"]; + var _loc7_:Array = [60,100,40,65,65,50,60]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.lineHeight = 24; + this.tableMc.install(10,_loc6_,_loc7_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = _loc2_.x + _loc2_.width + 4; + this.tableMc.y = _loc2_.y; + this.userListVec = new Vector.(); + _loc8_ = 0; + while(_loc8_ < 10) + { + _loc12_ = new TianxiaMc(); + this.tableMc.addChild(_loc12_); + this.userListVec.push(_loc12_); + _loc12_.y = 26 + _loc8_ * 24; + _loc12_.x = 2; + _loc12_.combatF = this.startCombat; + _loc8_++; + } + this.pageMc = new UIPageMc(); + _loc1_.addChild(this.pageMc); + this.pageMc.x = 390; + this.pageMc.y = this.tableMc.y + this.tableMc.height + 6; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + this.css = PublicMethod.getCenterTextFormat(); + this.pageText = new UIInputText(50); + _loc1_.addChild(this.pageText); + this.pageText.x = this.pageMc.x + this.pageMc.width + 34; + this.pageText.y = this.pageMc.y - 2; + this.pageText.setMaxChars(3); + this.pageText.numOnly(); + this.pageText.setTextFormat(this.css); + var _loc9_:UIButton = new UIButton("跳 转",1,10); + _loc1_.addChild(_loc9_); + _loc9_.x = this.pageText.x + this.pageText.width + 4; + _loc9_.y = this.pageText.y; + _loc9_.onClick = this.jumpRank; + var _loc10_:UIWindowBg = new UIWindowBg(); + _loc10_.initThirdPanel(621,113); + _loc1_.addChild(_loc10_); + _loc10_.x = 4; + _loc10_.y = _loc2_.y + _loc2_.height + 4; + this.heroMcVec = new Vector.(); + _loc8_ = 0; + while(_loc8_ < 5) + { + _loc13_ = new UIHeroItem(); + _loc10_.addChild(_loc13_); + _loc13_.x = 5 + _loc8_ * 124; + _loc13_.y = 5; + this.heroMcVec.push(_loc13_); + _loc8_++; + } + var _loc11_:UIButton = new UIButton("镜像设置",2,10); + _loc10_.addChild(_loc11_); + _loc11_.x = 10; + _loc11_.y = 95; + _loc11_.onClick = this.openHeroSet; + this.powerText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc10_.addChild(this.powerText); + this.powerText.x = _loc11_.x + 100; + this.powerText.y = _loc11_.y + 3; + this.powerText.htmlText = "武将镜像战斗力:0"; + this.list(); + this.enterMain(); + } + + private function startCombat(param1:int) : void + { + var _loc2_:int = NewUserData.getUser().userId; + if(_loc2_ == param1) + { + MessageBoxUI.getInstance().addMessage("无法挑战自己"); + return; + } + ConnectService.getInstance().playService.startCopyCombat(param1); + } + + override public function addToStage(param1:Event) : void + { + Utils.g_events.addEventListener(DevEvent.DATA_COPYHERO_GETALL,this.getAllCopyHeroListResult); + ConnectService.getInstance().addEventListener(PlayEvent.HUIWU_ENTERMAIN,this.enterMainResult); + ConnectService.getInstance().addEventListener(PlayEvent.COPYHERO_SAVE_OK,this.saveCopyHeroResult); + ConnectService.getInstance().addEventListener(PlayEvent.HUIWU_COMBAT_RESULT,this.startCombatResult); + ConnectService.getInstance().addEventListener(UserEvent.USER_huiwuRankAction,this.rankActionSucc); + if(this.heroMcVec != null) + { + this.getHeroList(); + } + } + + override public function removeFromStage(param1:Event) : void + { + Utils.g_events.removeEventListener(DevEvent.DATA_COPYHERO_GETALL,this.getAllCopyHeroListResult); + ConnectService.getInstance().removeEventListener(PlayEvent.HUIWU_ENTERMAIN,this.enterMainResult); + ConnectService.getInstance().removeEventListener(PlayEvent.COPYHERO_SAVE_OK,this.saveCopyHeroResult); + ConnectService.getInstance().removeEventListener(PlayEvent.HUIWU_COMBAT_RESULT,this.startCombatResult); + ConnectService.getInstance().removeEventListener(UserEvent.USER_huiwuRankAction,this.rankActionSucc); + if(Boolean(this.copyHeroSetUI) && contains(this.copyHeroSetUI)) + { + removeChild(this.copyHeroSetUI); + } + } + + 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,1); + } + + private function enterMain() : void + { + ConnectService.getInstance().playService.enterHuiWuMain(); + } + + private function enterMainResult(param1:PlayEvent) : void + { + var _loc4_:String = null; + var _loc2_:Object = param1.obj; + if(_loc2_ == null) + { + this.myRankText.htmlText = "我的排名:未上榜"; + this.rankImg.visible = false; + this.myJifenText.htmlText = "我的积分:0"; + this.myHaoText.htmlText = "我的称号:"; + this.winTimesText.htmlText = "胜利次数:0"; + this.lostTimesText.htmlText = "失败次数:0"; + this.leftTimesText.htmlText = "今日剩余次数:5"; + return; + } + var _loc3_:int = int(_loc2_.rankId); + if(_loc3_ > 0) + { + this.myRankText.htmlText = "我的排名:"; + this.rankImg.visible = true; + this.rankImg.showNum(_loc3_); + this.myJifenText.htmlText = "我的积分:" + _loc2_.jifen + ""; + _loc4_ = Utils.getJifenStr(_loc2_.jifen); + this.myHaoText.htmlText = "我的称号:" + _loc4_ + ""; + this.winTimesText.htmlText = "胜利次数:" + _loc2_.wintimes + ""; + this.lostTimesText.htmlText = "失败次数:" + _loc2_.losetimes + ""; + this.leftTimesText.htmlText = "今日剩余次数:" + _loc2_.lefttimes + ""; + } + else + { + this.myRankText.htmlText = "我的排名:未上榜"; + this.rankImg.visible = false; + this.myJifenText.htmlText = "我的积分:" + _loc2_.jifen + ""; + this.myHaoText.htmlText = "我的称号:"; + this.winTimesText.htmlText = "胜利次数:" + _loc2_.wintimes + ""; + this.lostTimesText.htmlText = "失败次数:" + _loc2_.losetimes + ""; + this.leftTimesText.htmlText = "今日剩余次数:" + _loc2_.lefttimes + ""; + } + this.currHeroIds = _loc2_.heroids as Array; + this.dailyItemMc.setObj(_loc2_); + this.dailyItemMc.loadTip(_loc2_); + if(_loc2_.getItem == 1) + { + this.getBtn.visible = false; + this.hasGetBtn.visible = true; + } + else + { + if(_loc2_.lefttimes == 0) + { + this.getBtn.setEnable(); + } + else + { + this.getBtn.setUnEnable(); + } + this.getBtn.visible = true; + this.hasGetBtn.visible = false; + } + this.getHeroList(); + } + + 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_ + ""; + } + } + + private function getAllCopyHeroListResult(param1:DevEvent) : void + { + this.getHeroList(); + } + + private function saveCopyHeroResult(param1:PlayEvent) : void + { + this.enterMain(); + } + + private function startCombatResult(param1:PlayEvent) : void + { + this.enterMain(); + var _loc2_:CopyBattleViewUI = CopyBattleViewUI.getInstance(); + _loc2_.initData(param1.obj); + _loc2_.showUI(); + } + + public function nextPage() : void + { + this.updateList(2); + } + + public function prePage() : void + { + this.updateList(1); + } + + 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 > GameData.tianxiaDataList.totalNum) + { + this.index = GameData.tianxiaDataList.totalNum - this.listNum; + return; + } + break; + case 3: + this.index = (Math.ceil(GameData.tianxiaDataList.totalNum / this.listNum) - 1) * 10 + 1; + } + if(GameData.tianxiaDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function jumpRank(param1:MouseEvent) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + if(this.pageText.getText() == "") + { + MessageBoxUI.getInstance().addMessage("跳转的页数不能为空,请重新输入。"); + return; + } + var _loc5_:int = int(this.pageText.getText()); + if(_loc5_ == 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数输入不合法,请重新输入。"); + return; + } + if(_loc5_ > Math.ceil(GameData.tianxiaDataList.totalNum / this.listNum) || _loc5_ <= 0) + { + MessageBoxUI.getInstance().addMessage("跳转的页数太大或太小,请重新输入。"); + return; + } + this.index = this.listNum * (_loc5_ - 1) + 1; + if(GameData.tianxiaDataList.getbIndex(this.index,this.getLastNum())) + { + this.showList(); + } + else + { + this.list(); + } + } + + private function getLastNum() : int + { + var _loc1_:int = 0; + var _loc2_:* = GameData.tianxiaDataList.totalNum - this.index + 1; + if(_loc2_ < this.listNum) + { + _loc1_ = _loc2_; + } + else + { + _loc1_ = this.listNum; + } + return _loc1_; + } + + private function showList() : void + { + var _loc2_:* = undefined; + var _loc3_:TianxiaData = null; + if(GameData.tianxiaDataList.totalNum == 0) + { + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + else + { + this.pageMc.setPageCount(Math.ceil(GameData.tianxiaDataList.totalNum / this.listNum)); + this.pageMc.setPage(this.index / this.listNum + 1 >> 0); + } + var _loc1_:int = this.pageMc.getCurrPage(); + this.clearList(); + for(_loc2_ in this.userListVec) + { + _loc3_ = GameData.tianxiaDataList.getItem(this.index + _loc2_); + if(_loc3_) + { + this.userListVec[_loc2_].setDate(_loc3_); + if(_loc1_ == 1) + { + if(_loc2_ <= 2) + { + this.userListVec[_loc2_].setStyle(_loc2_); + } + } + } + else + { + this.userListVec[_loc2_].setDate(null); + } + } + } + + private function clearList() : void + { + var _loc1_:TianxiaMc = null; + for each(_loc1_ in this.userListVec) + { + _loc1_.setDate(null); + } + } + + private function list() : void + { + ConnectService.getInstance().playService.getHuiwuRankListFromCache(this.index); + } + + private function rankActionSucc(param1:UserEvent) : void + { + var _loc2_:Object = param1.userObject; + if(_loc2_ != null && _loc2_.rankList != null && _loc2_.rankList.length > 0) + { + if(int(_loc2_.totalNum) == 0) + { + GameData.tianxiaDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + else + { + GameData.tianxiaDataList.totalNum = _loc2_.totalNum as int; + this.setHashMap(_loc2_); + this.showList(); + } + } + else + { + MessageBoxUI.getInstance().addMessage("没有符合要求的数据!"); + this.index = this.indexTemp; + this.pageMc.setPageCount(1); + this.pageMc.setPage(1); + } + } + + private function setHashMap(param1:Object) : void + { + var _loc2_:TianxiaData = null; + var _loc3_:int = 0; + while(_loc3_ < param1.rankList.length) + { + if(param1.rankList[_loc3_]) + { + _loc2_ = new TianxiaData(); + _loc2_.userName = param1.rankList[_loc3_].userName; + _loc2_.rankId = param1.rankList[_loc3_].rankId; + _loc2_.winTimes = param1.rankList[_loc3_].winnum; + _loc2_.loseTimes = param1.rankList[_loc3_].losenum; + _loc2_.jifen = param1.rankList[_loc3_].jifen; + _loc2_.userId = param1.rankList[_loc3_].userId; + _loc2_.level = param1.rankList[_loc3_].level; + GameData.tianxiaDataList.addItem(_loc2_); + } + _loc3_++; + } + } + + private function getGiftItem(param1:MouseEvent) : void + { + ConnectService.getInstance().playService.getGiftItem(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/tools/ListItem.as b/flash_decompiled/com/view/ui/tools/ListItem.as new file mode 100644 index 0000000..57637f9 --- /dev/null +++ b/flash_decompiled/com/view/ui/tools/ListItem.as @@ -0,0 +1,192 @@ +package com.view.ui.tools +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + 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; + import flash.text.TextFormat; + + public class ListItem extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var bg:MovieClip; + + private var nameText:TextField; + + private var itemCountText:TextField; + + private var itemTip:ItemTip; + + private var imgUrl:String; + + public var obj:Object; + + private var itemImg:Bitmap; + + public var cloneImg:BitmapData; + + private var loader:LoadResource; + + public var clickFunc:Function; + + private var isSelect:Boolean; + + public function ListItem() + { + super(); + this.bg = this.face.getMovieClip(ClassConfig.lib_tech_bg); + addChild(this.bg); + this.bg.gotoAndStop(1); + this.nameText = PublicMethod.getTextFieldWithFillter(16777215,82); + addChild(this.nameText); + this.nameText.y = 75; + this.nameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.itemCountText = PublicMethod.getTextFieldWithFillter(16777215,55); + addChild(this.itemCountText); + this.itemCountText.x = 14; + this.itemCountText.y = 55; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "right"; + this.itemCountText.defaultTextFormat = _loc1_; + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + addEventListener(MouseEvent.MOUSE_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.CLICK,this.mouseClick,false,0,true); + } + + private function mouseOver(param1:MouseEvent) : void + { + if(!this.isSelect && Boolean(this.obj)) + { + this.bg.gotoAndStop(3); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(!this.isSelect && Boolean(this.obj)) + { + this.bg.gotoAndStop(1); + } + } + + public function setDate(param1:Object) : void + { + this.obj = param1; + this.nameText.text = this.obj.item.itemName; + if(this.obj.itemCount > 0) + { + this.itemCountText.text = "" + this.obj.itemCount; + } + else + { + this.itemCountText.text = ""; + } + this.imgUrl = ServerConfig.IMAGE_EQUIP_URL + this.obj.item.iconPath; + this.loadImg(); + if(this.itemTip == null) + { + this.itemTip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.obj.viewMap); + } + else + { + this.itemTip.setTipData(this.obj.viewMap); + } + } + + private function loadImg() : void + { + this.loader = new LoadResource(this.imgUrl,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.itemImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + addChildAt(this.itemImg,getChildIndex(this.itemCountText)); + this.itemImg.x = 14; + this.itemImg.y = 15; + this.itemImg.width = 56; + this.itemImg.height = 59; + this.cloneImg = this.itemImg.bitmapData.clone(); + } + + public function clear() : void + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + if(this.loader) + { + this.loader.clear(); + } + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + this.nameText.text = ""; + this.clickFunc = null; + this.isSelect = false; + this.bg.gotoAndStop(1); + this.obj = null; + } + + private function mouseClick(param1:MouseEvent) : void + { + if(this.clickFunc != null) + { + this.clickFunc(this); + } + } + + public function setSelect(param1:Boolean) : void + { + this.isSelect = param1; + if(this.isSelect) + { + this.bg.gotoAndStop(3); + } + else + { + this.bg.gotoAndStop(1); + } + } + + public function setDate1(param1:PackItem) : void + { + this.obj = param1; + this.nameText.htmlText = param1.viewMap.showName; + if(this.obj.itemCount > 0) + { + this.itemCountText.text = "" + param1.itemCount; + } + else + { + this.itemCountText.text = ""; + } + this.imgUrl = ServerConfig.IMAGE_EQUIP_URL + param1.viewMap.iconPath; + this.loadImg(); + if(this.itemTip == null) + { + this.itemTip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.obj.viewMap); + } + else + { + this.itemTip.setTipData(this.obj.viewMap); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tools/ToolView.as b/flash_decompiled/com/view/ui/tools/ToolView.as new file mode 100644 index 0000000..530ff64 --- /dev/null +++ b/flash_decompiled/com/view/ui/tools/ToolView.as @@ -0,0 +1,470 @@ +package com.view.ui.tools +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.item.event.ItemEvent; + import com.control.pack.event.UserPackEvent; + import com.control.shop.event.ShopEvent; + import com.data.MemeberShip; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UICloseBtn; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.buff.BuffManager; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.shop.BuyItemsUI; + import com.view.ui.shop.BuyPresItemsUI; + import com.view.ui.shop.ShopUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ToolView extends BaseUI + { + + private static var instance:ToolView; + + private var maskMc:Sprite; + + private var label1:TextField; + + private var shopBtn:UIButton; + + private var bg:Sprite; + + private var itemListVec:Vector.; + + private var itemListMc:Sprite; + + private var scrollPane:ScrollPane; + + private var queueId:int; + + private var type:int; + + private var b:int; + + private var currChildType:int; + + private var refreshF:Function; + + private var lastImg:ListItem; + + private var m_buyRefreshF:Function; + + private var buyItemUI:BuyItemsUI; + + private var buyPresItemUI:BuyPresItemsUI; + + public function ToolView() + { + var _loc3_:ListItem = null; + super(); + if(instance != null) + { + throw Error("单例"); + } + this.bg = new Sprite(); + this.maskMc = PublicMethod.createShape(0,CommonData.MAX_WIDTH,CommonData.MAX_HEIGHT); + this.maskMc.alpha = 0.2; + addChild(this.maskMc); + this.maskMc.x = -this.maskMc.width / 2; + this.maskMc.y = -50; + this.addUIBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(590,120); + this.bg.addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,160); + this.label1.text = "(点击图标使用道具)"; + this.bg.addChild(this.label1); + this.label1.x = 10; + this.label1.y = 175; + this.shopBtn = new UIButton("商 城",2,10); + this.bg.addChild(this.shopBtn); + this.shopBtn.x = 540; + this.shopBtn.y = this.label1.y; + this.shopBtn.onClick = this.toshop; + this.itemListMc = new Sprite(); + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(576,110); + this.scrollPane.verticalScrollPolicy = ScrollPolicy.OFF; + _loc1_.addChild(this.scrollPane); + this.scrollPane.x = 10; + this.scrollPane.y = 10; + this.scrollPane.source = this.itemListMc; + this.itemListVec = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 6) + { + _loc3_ = new ListItem(); + this.itemListMc.addChild(_loc3_); + this.itemListVec.push(_loc3_); + _loc3_.x = _loc2_ * 98; + _loc3_.y = 2; + _loc3_.visible = false; + _loc2_++; + } + this.scrollPane.update(); + addChild(this.bg); + this.bg.x = -this.bg.width / 2; + this.setPosition(); + } + + public static function getInstance() : ToolView + { + if(instance == null) + { + instance = new ToolView(); + } + return instance; + } + + override public function show() : void + { + face.stage.addChild(this); + this.setPosition(); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w - 45; + window_heihgt = 130; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 - 45; + ui_closeBtn.y = 10; + } + + override public function addUIBg() : void + { + this.setWindowSize(); + ui_bg = new UIWindowBg(); + ui_bg.initSize(window_width,window_heihgt); + ui_closeBtn = new UICloseBtn(); + this.bg.addChild(ui_bg); + this.bg.addChild(ui_closeBtn); + ui_closeBtn.onClick = this.closeUI; + this.setCloseBtnPosi(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(UserPackEvent.PACK_getItemByChildType,this.getTreasuryByChildTypeSucc); + ConnectService.getInstance().addEventListener(ItemEvent.Item_useItem,this.useItemSucc); + ConnectService.getInstance().addEventListener(ShopEvent.SHOP_getBuyTools,this.getBuyToolSucc); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(UserPackEvent.PACK_getItemByChildType,this.getTreasuryByChildTypeSucc); + ConnectService.getInstance().removeEventListener(ItemEvent.Item_useItem,this.useItemSucc); + ConnectService.getInstance().removeEventListener(ShopEvent.SHOP_getBuyTools,this.getBuyToolSucc); + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.itemChange); + this.clearItem(); + this.lastImg = null; + if(Boolean(this.buyItemUI) && contains(this.buyItemUI)) + { + removeChild(this.buyItemUI); + } + if(Boolean(this.buyPresItemUI) && contains(this.buyPresItemUI)) + { + removeChild(this.buyPresItemUI); + } + } + + override public function setPosition() : void + { + this.x = int(face.realWidth / 2); + this.y = 50; + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + } + + private function toshop(param1:MouseEvent) : void + { + this.closeUI(null); + var _loc2_:ShopUI = ShopUI.getInstance(); + _loc2_.open(); + } + + public function list(param1:int, param2:int, param3:int = -1, param4:int = 1, param5:String = "") : void + { + if(param5 != "") + { + this.shopBtn.visible = true; + loadTitle(UITitleConfig.title_shiyongdaoju); + this.label1.text = "(点击图标使用道具)"; + } + this.queueId = param1; + this.type = param3; + this.b = param4; + this.currChildType = param2; + this.showView(); + } + + private function getTreasuryByChildTypeSucc(param1:UserPackEvent) : void + { + if(param1.equipList != null) + { + } + } + + public function set onRefresh(param1:Function) : void + { + this.refreshF = param1; + } + + private function clearItem() : void + { + var _loc1_:int = int(this.itemListVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.itemListVec[_loc2_].clear(); + if(_loc2_ > 5) + { + this.itemListMc.removeChild(this.itemListVec[_loc2_]); + this.itemListVec.splice(_loc2_,1); + } + else + { + this.itemListVec[_loc2_].visible = false; + } + _loc2_--; + } + this.scrollPane.update(); + } + + private function itemChange(param1:DevEvent) : void + { + this.showView(); + } + + private function showView() : void + { + var _loc2_:int = 0; + var _loc3_:ListItem = null; + this.clearItem(); + if(PakState.getGetPackListStatus()) + { + PakState.getItemListByChildType(this.currChildType); + return; + } + var _loc1_:Vector. = PakState.getItemListByChildType(this.currChildType); + if(_loc1_.length > 0) + { + _loc2_ = 0; + while(_loc2_ < _loc1_.length) + { + if(_loc2_ > 5) + { + _loc3_ = new ListItem(); + this.itemListMc.addChild(_loc3_); + this.itemListVec.push(_loc3_); + _loc3_.x = _loc2_ * 98; + _loc3_.y = 11; + } + this.itemListVec[_loc2_].setDate1(_loc1_[_loc2_]); + this.itemListVec[_loc2_].visible = true; + this.itemListVec[_loc2_].clickFunc = this.select; + _loc2_++; + } + } + this.scrollPane.update(); + } + + private function select(param1:ListItem) : void + { + if(this.lastImg != null) + { + this.lastImg.setSelect(false); + } + this.lastImg = param1; + this.lastImg.setSelect(true); + if(this.type == 1) + { + if(int(this.lastImg.obj.itemCount) == 0) + { + MessageBoxUI.getInstance().addMessage("该道具数量为0"); + return; + } + ConnectService.getInstance().itemsService.useItem(int(this.lastImg.obj.id),MemeberShip.getMainCastle().casId,this.b); + } + else if(this.type == 2) + { + if(int(this.lastImg.obj.itemCount) == 0) + { + MessageBoxUI.getInstance().addMessage("该道具数量为0"); + return; + } + if(this.refreshF != null) + { + this.refreshF(this.lastImg.obj.itemId); + this.refreshF = null; + this.closeUI(null); + } + } + else if(this.queueId == -1) + { + if(int(this.lastImg.obj.itemCount) == 0) + { + MessageBoxUI.getInstance().addMessage("该道具数量为0"); + return; + } + ConnectService.getInstance().itemsService.useItem(int(this.lastImg.obj.id),MemeberShip.getMainCastle().casId,this.b); + } + else + { + if(int(this.lastImg.obj.itemCount) == 0) + { + MessageBoxUI.getInstance().addMessage("该道具数量为0"); + return; + } + ConnectService.getInstance().itemsService.useItem(int(this.lastImg.obj.id),this.queueId,this.b); + } + } + + private function useItemSucc(param1:ItemEvent) : void + { + if(this.type == 1) + { + this.fastBuildingSucc(param1.obj); + } + else if(this.type != 2) + { + if(this.queueId == -1) + { + this.updateCasResNumSucc(param1.obj); + } + else if(int(this.lastImg.obj.itemCount) != 0) + { + this.fastBuildingSucc(param1.obj); + } + } + } + + private function updateCasResNumSucc(param1:Object) : void + { + MessageBoxUI.getInstance().addMessage("道具使用成功"); + if(this.refreshF != null) + { + this.refreshF(); + } + this.closeUI(null); + this.refreshF = null; + } + + private function fastBuildingSucc(param1:Object) : void + { + MessageBoxUI.getInstance().addMessage("道具使用成功"); + if(this.refreshF != null) + { + this.refreshF(); + } + if(param1 != null && param1.newData != null) + { + } + ConnectService.getInstance().castleService.calcuDevData(); + BuffManager.getInstance().update(); + this.refreshF = null; + this.closeUI(null); + } + + public function listBuyTools(param1:String) : void + { + this.shopBtn.visible = false; + loadTitle(UITitleConfig.title_kuaijiegoumai); + this.label1.text = "(点击图标购买道具)"; + ConnectService.getInstance().shopService.getBuyTools(param1); + } + + private function getBuyToolSucc(param1:ShopEvent) : void + { + var _loc3_:int = 0; + var _loc4_:ListItem = null; + this.m_buyRefreshF = this.refreshF; + var _loc2_:* = param1.resObject.shopList; + if(Boolean(_loc2_) && _loc2_.length > 0) + { + _loc3_ = 0; + while(_loc3_ < _loc2_.length) + { + if(_loc3_ > 5) + { + _loc4_ = new ListItem(); + this.itemListMc.addChild(_loc4_); + this.itemListVec.push(_loc4_); + _loc4_.x = _loc3_ * 98; + _loc4_.y = 11; + } + this.itemListVec[_loc3_].setDate(_loc2_[_loc3_]); + this.itemListVec[_loc3_].visible = true; + this.itemListVec[_loc3_].clickFunc = this.showBuyView; + _loc3_++; + } + } + this.scrollPane.update(); + } + + private function showBuyView(param1:ListItem) : void + { + var _loc2_:* = param1.obj; + switch(_loc2_.shopTypeStr) + { + case "cash": + if(this.buyItemUI == null) + { + this.buyItemUI = new BuyItemsUI(); + this.buyItemUI.x = -this.buyItemUI.width / 2; + this.buyItemUI.y = 80; + } + this.buyItemUI.setData(_loc2_,param1.cloneImg); + addChild(this.buyItemUI); + this.buyItemUI.buyCompleteF = this.m_buyRefreshF; + break; + case "jungong": + if(this.buyPresItemUI == null) + { + this.buyPresItemUI = new BuyPresItemsUI(); + this.buyPresItemUI.x = -this.buyPresItemUI.width / 2; + this.buyPresItemUI.y = 80; + } + this.buyPresItemUI.setData(_loc2_,param1.cloneImg); + addChild(this.buyPresItemUI); + this.buyPresItemUI.buyCompleteF = this.m_buyRefreshF; + break; + case "prestige": + if(this.buyPresItemUI == null) + { + this.buyPresItemUI = new BuyPresItemsUI(); + this.buyPresItemUI.x = -this.buyPresItemUI.width / 2; + this.buyPresItemUI.y = 80; + } + this.buyPresItemUI.setData(_loc2_,param1.cloneImg); + addChild(this.buyPresItemUI); + this.buyPresItemUI.buyCompleteF = this.m_buyRefreshF; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/TowerData.as b/flash_decompiled/com/view/ui/tower/TowerData.as new file mode 100644 index 0000000..874ee68 --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/TowerData.as @@ -0,0 +1,31 @@ +package com.view.ui.tower +{ + import com.events.DevEvent; + import com.utils.Utils; + + public class TowerData + { + + private static var _towerObj:Object; + + private static var itemAwardList:Array = null; + + public function TowerData() + { + super(); + } + + public static function get towerObj() : Object + { + return _towerObj; + } + + public static function set towerObj(param1:Object) : void + { + _towerObj = param1; + var _loc2_:DevEvent = new DevEvent(DevEvent.EVENT_SINGLEBABEL_DATA); + Utils.g_events.dispatchEvent(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/TowerDropListUI.as b/flash_decompiled/com/view/ui/tower/TowerDropListUI.as new file mode 100644 index 0000000..b22d782 --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/TowerDropListUI.as @@ -0,0 +1,149 @@ +package com.view.ui.tower +{ + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIPageMc; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.tower.mc.BabelDropMc; + import flash.events.MouseEvent; + + public class TowerDropListUI extends BaseUI + { + + private var _width2:int = 15; + + private var _height2:int = -120; + + private var bg1:UIWindowBg; + + private var itemVec:Vector.; + + private var pageMc:UIPageMc; + + private var allitemList:Array; + + private var currPage:int = 1; + + public function TowerDropListUI() + { + var _loc3_:BabelDropMc = null; + this.allitemList = new Array(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_babeldrop); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622 + this._width2,392 + this._height2 - 34); + this.bg1.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + this.itemVec = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + _loc3_ = new BabelDropMc(); + _loc3_.x = 4 + 130 * _loc2_; + _loc3_.y = 4; + _loc1_.addChild(_loc3_); + this.itemVec.push(_loc3_); + _loc2_++; + } + this.pageMc = new UIPageMc(); + this.bg1.addChild(this.pageMc); + this.pageMc.x = 550; + this.pageMc.y = 260; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + Utils.g_events.addEventListener(DevEvent.EVENT_SINGLEBABEL_DROPLIST,this.getListResult); + ConnectService.getInstance().singleBabelService.getStageAward(); + } + + 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; + } + + override public function setPosition() : void + { + } + + public function nextPage() : void + { + this.currPage += 1; + this.getItemListByType(); + } + + public function prePage() : void + { + --this.currPage; + this.getItemListByType(); + } + + private function getListResult(param1:DevEvent) : void + { + this.allitemList = param1.arr; + this.getDropList(); + } + + public function getDropList() : void + { + this.currPage = 1; + this.getItemListByType(); + } + + private function getItemListByType() : void + { + var _loc3_:int = 0; + var _loc1_:Array = new Array(); + if(this.allitemList.length >= 0) + { + _loc3_ = 1 + (this.allitemList.length - 1) / 5; + if(_loc3_ <= 0) + { + _loc3_ = 1; + } + this.pageMc.setPageCount(_loc3_); + if(this.currPage > _loc3_) + { + this.currPage = _loc3_; + } + _loc1_ = this.allitemList.slice((this.currPage - 1) * 5,this.currPage * 5); + } + this.pageMc.setPage(this.currPage); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + if(_loc1_[_loc2_]) + { + this.itemVec[_loc2_].setData(_loc1_[_loc2_]); + } + else + { + this.itemVec[_loc2_].setData(null); + } + _loc2_++; + } + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/TowerEnterUI.as b/flash_decompiled/com/view/ui/tower/TowerEnterUI.as new file mode 100644 index 0000000..20eba33 --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/TowerEnterUI.as @@ -0,0 +1,637 @@ +package com.view.ui.tower +{ + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.data.hero.Hero; + import com.events.DevEvent; + import com.greensock.TweenMax; + import com.utils.Utils; + import com.view.newui.IconBtn; + import com.view.newui.UIBorderMc; + import com.view.newui.UIButton1; + import com.view.newui.UILabel; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tower.mc.BabelBossMc; + import com.view.ui.tower.mc.BabelHeroMc; + import com.view.ui.tower.mc.BabelStairMc; + import com.view.ui.tower.mc.BabelStepMc; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.geom.Rectangle; + + public class TowerEnterUI extends BaseUI + { + + private static var instance:TowerEnterUI; + + private var _width2:int = 20; + + private var _height2:int = -2; + + private var bg1:UIWindowBg; + + private var stairMc1:BabelStairMc; + + private var stairMc2:BabelStairMc; + + private var stairMc3:BabelStairMc; + + private var stairMc4:BabelStairMc; + + private var boss1:BabelBossMc; + + private var boss2:BabelBossMc; + + private var stepMc1:BabelStepMc; + + private var stepMc2:BabelStepMc; + + private var stepMc3:BabelStepMc; + + private var moveSp:Sprite; + + private var heroMc:BabelHeroMc; + + private var stepSp:Sprite; + + private var currStageLabel:UILabel; + + private var totalStageLabel:UILabel; + + private var stagePowerLabel:UILabel; + + private var armyTypeLabel:UILabel; + + private var imgSp:Sprite; + + private var heroNameLabel:UILabel; + + private var heroHpLabel:UILabel; + + private var heroArmyLabel:UILabel; + + private var heroPowerLabel:UILabel; + + private var towerDropListUI:TowerDropListUI; + + private var aliveVec:Vector.; + + private var currStep:int; + + private var preUrl:String; + + private var loadHead:LoadResource; + + private var headImg:Bitmap; + + private var heroIdList:Vector. = new Vector.(); + + private var towerPowerUI:TowerPowerUI; + + public function TowerEnterUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_danjianglou); + this.setPosition(); + this.createUI(); + } + + public static function getInstance() : TowerEnterUI + { + if(instance == null) + { + return instance = new TowerEnterUI(); + } + return instance; + } + + 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; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc2_:Sprite = null; + var _loc3_:Bitmap = null; + var _loc5_:UIButton1 = null; + var _loc7_:IconBtn = null; + var _loc32_:Bitmap = null; + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(390,390); + this.bg1.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + _loc2_ = new Sprite(); + _loc1_.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 2; + _loc3_ = face.getBitMap("tower_1"); + _loc3_.width = _loc1_.width - 4; + _loc3_.height = _loc1_.height - 4; + _loc2_.addChild(_loc3_); + var _loc4_:Rectangle = new Rectangle(0,0,_loc3_.width,_loc3_.height); + _loc2_.scrollRect = _loc4_; + this.stepSp = new Sprite(); + _loc2_.addChild(this.stepSp); + this.stairMc1 = new BabelStairMc(); + _loc2_.addChild(this.stairMc1); + this.stairMc1.x = 135; + this.stairMc1.y = -92; + this.stepMc1 = new BabelStepMc(); + _loc2_.addChild(this.stepMc1); + this.stepMc1.x = 60; + this.stepMc1.y = 10; + this.boss1 = new BabelBossMc(); + _loc2_.addChild(this.boss1); + this.boss1.setBossType("dunbing"); + this.boss1.x = 120; + this.boss1.y = 48; + this.stairMc2 = new BabelStairMc(); + _loc2_.addChild(this.stairMc2); + this.stairMc2.x = 135; + this.stairMc2.y = 48; + this.stepMc2 = new BabelStepMc(); + _loc2_.addChild(this.stepMc2); + this.stepMc2.x = 60; + this.stepMc2.y = 150; + this.boss2 = new BabelBossMc(); + _loc2_.addChild(this.boss2); + this.boss2.setBossType("gongbing"); + this.boss2.x = 260; + this.boss2.y = 188; + this.stairMc3 = new BabelStairMc(); + _loc2_.addChild(this.stairMc3); + this.stairMc3.x = 135; + this.stairMc3.y = 188; + this.stepMc3 = new BabelStepMc(); + _loc2_.addChild(this.stepMc3); + this.stepMc3.x = 60; + this.stepMc3.y = 290; + this.stairMc4 = new BabelStairMc(); + _loc2_.addChild(this.stairMc4); + this.stairMc4.x = 135; + this.stairMc4.y = 328; + this.moveSp = new Sprite(); + _loc1_.addChild(this.moveSp); + this.heroMc = new BabelHeroMc(); + this.moveSp.addChild(this.heroMc); + this.heroMc.x = 224; + this.heroMc.y = 267; + this.heroMc.setBackF(this.startFight); + _loc5_ = new UIButton1("放 弃"); + this.bg1.addChild(_loc5_); + _loc5_.x = 310; + _loc5_.y = 366; + _loc5_.onClick = this.giveUpBabel; + var _loc6_:UIButton1 = new UIButton1("楼层战力"); + this.bg1.addChild(_loc6_); + _loc6_.x = 310; + _loc6_.y = 326; + _loc6_.onClick = this.getPwer; + _loc7_ = new IconBtn("tower_5"); + this.bg1.addChild(_loc7_); + _loc7_.x = 357; + _loc7_.y = 49; + _loc7_.onClick = this.openDropListUI; + var _loc8_:UIWindowBg = new UIWindowBg(); + _loc8_.initSecondPanel(238,390); + this.bg1.addChild(_loc8_); + _loc8_.x = _loc1_.x + _loc1_.width + 4; + _loc8_.y = 4; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initThirdPanel(230,170); + _loc8_.addChild(_loc9_); + _loc9_.x = 4; + _loc9_.y = 4; + var _loc10_:UIBorderMc = new UIBorderMc(159); + _loc9_.addChild(_loc10_); + _loc10_.x = 0; + _loc10_.y = 1; + _loc10_.loadTitle(1); + var _loc11_:Sprite = face.getSprite(ClassConfig.lib_herobg); + _loc9_.addChild(_loc11_); + _loc11_.x = 12; + _loc11_.y = 40; + this.imgSp = new Sprite(); + _loc11_.addChild(this.imgSp); + this.imgSp.x = 4; + this.imgSp.y = 4; + var _loc12_:UILabel = new UILabel(60,10852210); + _loc9_.addChild(_loc12_); + _loc12_.x = 95; + _loc12_.y = 40; + _loc12_.setText("武将名称:"); + this.heroNameLabel = new UILabel(60); + _loc9_.addChild(this.heroNameLabel); + this.heroNameLabel.x = 153; + this.heroNameLabel.y = _loc12_.y; + var _loc13_:UILabel = new UILabel(60,10852210); + _loc9_.addChild(_loc13_); + _loc13_.x = _loc12_.x; + _loc13_.y = _loc12_.y + 25; + _loc13_.setText("武将健康:"); + this.heroHpLabel = new UILabel(60); + _loc9_.addChild(this.heroHpLabel); + this.heroHpLabel.x = this.heroNameLabel.x; + this.heroHpLabel.y = _loc13_.y; + var _loc14_:UILabel = new UILabel(60,10852210); + _loc9_.addChild(_loc14_); + _loc14_.x = _loc12_.x; + _loc14_.y = _loc13_.y + 25; + _loc14_.setText("带兵数量:"); + this.heroArmyLabel = new UILabel(60); + _loc9_.addChild(this.heroArmyLabel); + this.heroArmyLabel.x = this.heroNameLabel.x; + this.heroArmyLabel.y = _loc14_.y; + var _loc15_:UILabel = new UILabel(60,10852210); + _loc9_.addChild(_loc15_); + _loc15_.x = _loc12_.x; + _loc15_.y = _loc14_.y + 25; + _loc15_.setText("武将战力:"); + this.heroPowerLabel = new UILabel(80); + _loc9_.addChild(this.heroPowerLabel); + this.heroPowerLabel.x = this.heroNameLabel.x; + this.heroPowerLabel.y = _loc15_.y; + var _loc16_:UIButton1 = new UIButton1("医疗武将"); + _loc9_.addChild(_loc16_); + _loc16_.x = 10; + _loc16_.y = _loc9_.y + _loc9_.height - 40; + _loc16_.onClick = this.treatHero; + var _loc17_:UIButton1 = new UIButton1("更换武将"); + _loc9_.addChild(_loc17_); + _loc17_.x = 150; + _loc17_.y = _loc9_.y + _loc9_.height - 40; + _loc17_.onClick = this.selectHero; + var _loc18_:UIWindowBg = new UIWindowBg(); + _loc18_.initThirdPanel(230,158); + _loc8_.addChild(_loc18_); + _loc18_.x = 4; + _loc18_.y = _loc9_.y + _loc9_.height + 2; + var _loc19_:UIBorderMc = new UIBorderMc(159); + _loc18_.addChild(_loc19_); + _loc19_.x = 0; + _loc19_.y = 1; + _loc19_.loadTitle(2); + var _loc20_:UILabel = new UILabel(60,10852210); + _loc18_.addChild(_loc20_); + _loc20_.x = 15; + _loc20_.y = 40; + _loc20_.setText("挑战楼层:"); + this.currStageLabel = new UILabel(100); + _loc18_.addChild(this.currStageLabel); + this.currStageLabel.x = _loc20_.x + 70; + this.currStageLabel.y = _loc20_.y; + this.currStageLabel.setText("250层"); + var _loc21_:Sprite = PublicMethod.getTrLine(220); + _loc18_.addChild(_loc21_); + _loc21_.x = 10; + _loc21_.y = _loc20_.y + 20; + var _loc22_:UILabel = new UILabel(60,10852210); + _loc18_.addChild(_loc22_); + _loc22_.x = 15; + _loc22_.y = _loc21_.y + 5; + _loc22_.setText("楼层战力:"); + this.stagePowerLabel = new UILabel(100); + _loc18_.addChild(this.stagePowerLabel); + this.stagePowerLabel.x = _loc22_.x + 70; + this.stagePowerLabel.y = _loc22_.y; + this.stagePowerLabel.setText(""); + var _loc23_:Sprite = PublicMethod.getTrLine(220); + _loc18_.addChild(_loc23_); + _loc23_.x = 10; + _loc23_.y = _loc22_.y + 20; + var _loc24_:UILabel = new UILabel(60,10852210); + _loc18_.addChild(_loc24_); + _loc24_.x = _loc20_.x; + _loc24_.y = _loc23_.y + 5; + _loc24_.setText("楼层兵种:"); + this.armyTypeLabel = new UILabel(100); + _loc18_.addChild(this.armyTypeLabel); + this.armyTypeLabel.x = this.currStageLabel.x; + this.armyTypeLabel.y = _loc24_.y; + this.armyTypeLabel.setText(""); + var _loc25_:Sprite = PublicMethod.getTrLine(220); + _loc18_.addChild(_loc25_); + _loc25_.x = 10; + _loc25_.y = _loc24_.y + 20; + var _loc26_:UILabel = new UILabel(60,10852210); + _loc18_.addChild(_loc26_); + _loc26_.x = _loc20_.x; + _loc26_.y = _loc25_.y + 5; + _loc26_.setText("通关记录:"); + this.totalStageLabel = new UILabel(100); + _loc18_.addChild(this.totalStageLabel); + this.totalStageLabel.x = this.currStageLabel.x; + this.totalStageLabel.y = _loc26_.y; + this.totalStageLabel.setText("250层"); + var _loc27_:Sprite = PublicMethod.getTrLine(220); + _loc18_.addChild(_loc27_); + _loc27_.x = 10; + _loc27_.y = _loc26_.y + 20; + var _loc28_:UILabel = new UILabel(60,10852210); + _loc18_.addChild(_loc28_); + _loc28_.x = _loc20_.x; + _loc28_.y = _loc27_.y + 5; + _loc28_.setText("复活机会:"); + this.aliveVec = new Vector.(); + var _loc29_:int = 0; + while(_loc29_ < 3) + { + _loc3_ = face.getBitMap("tower_8"); + _loc3_.x = 85 + _loc29_ * 34; + _loc3_.y = _loc28_.y; + _loc3_.width = 24; + _loc3_.height = 21; + _loc18_.addChild(_loc3_); + _loc32_ = face.getBitMap("tower_7"); + _loc32_.x = 85 + _loc29_ * 34; + _loc32_.y = _loc28_.y; + _loc32_.width = 24; + _loc32_.height = 21; + _loc18_.addChild(_loc32_); + this.aliveVec.push(_loc32_); + _loc29_++; + } + var _loc30_:UIButton1 = new UIButton1("开始清剿"); + _loc9_.addChild(_loc30_); + _loc30_.x = 20; + _loc30_.y = _loc18_.y + _loc18_.height + 5; + _loc30_.onClick = this.startOneKey; + var _loc31_:UIButton1 = new UIButton1("开始挑战"); + _loc9_.addChild(_loc31_); + _loc31_.x = 150; + _loc31_.y = _loc30_.y; + _loc31_.onClick = this.fight; + Utils.g_events.addEventListener(DevEvent.EVENT_SINGLEBABEL_DATA,this.getBabelDataResult); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.getObj(); + } + + private function startFight() : void + { + ConnectService.getInstance().singleBabelService.startCombat(); + } + + private function openDropListUI() : void + { + if(this.towerDropListUI == null) + { + this.towerDropListUI = new TowerDropListUI(); + } + this.towerDropListUI.getDropList(); + this.bg1.addChild(this.towerDropListUI); + this.towerDropListUI.x = -5; + this.towerDropListUI.y = 30; + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(Boolean(this.towerDropListUI) && this.bg1.contains(this.towerDropListUI)) + { + this.bg1.removeChild(this.towerDropListUI); + } + if(Boolean(this.towerPowerUI) && this.bg1.contains(this.towerPowerUI)) + { + this.bg1.removeChild(this.towerPowerUI); + } + } + + private function fight(param1:MouseEvent) : void + { + var _loc2_:Object = TowerData.towerObj; + if(_loc2_.heroMap == null) + { + MessageBoxUI.getInstance().addMessage("请选择单挑武将!"); + return; + } + if(_loc2_.heroMap.armyNum == 0) + { + MessageBoxUI.getInstance().addMessage("武将带兵数量为0!"); + return; + } + this.run(); + } + + private function run() : void + { + var _loc1_:int = 0; + var _loc2_:int = 127; + if(this.currStep % 2 == 0) + { + _loc1_ = 224; + } + else + { + _loc1_ = 84; + } + TweenMax.to(this.heroMc,2,{ + "x":_loc1_, + "y":_loc2_, + "onComplete":this.moveOver + }); + } + + private function moveOver() : void + { + this.heroMc.fight(); + } + + private function startOneKey(param1:MouseEvent) : void + { + var _loc2_:Object = TowerData.towerObj; + if(_loc2_.stageId != 1) + { + MessageBoxUI.getInstance().addMessage("清缴只能从第一层开始!"); + return; + } + ConnectService.getInstance().singleBabelService.fastPlayBabel(); + } + + private function getBabelDataResult(param1:DevEvent) : void + { + this.getObj(); + } + + public function getObj() : void + { + var _loc1_:Object = TowerData.towerObj; + if(_loc1_.reliveTimes == 0) + { + if(getOpenStatus()) + { + MessageBoxUI.getInstance().addMessage("复活次数已用完,请退出重新开始"); + } + } + this.currStageLabel.setText("第 " + _loc1_.stageId + " 层"); + this.totalStageLabel.setText("第 " + _loc1_.topStageId + " 层"); + this.armyTypeLabel.setText(_loc1_.defArmyType); + this.aliveVec[0].visible = false; + var _loc2_:int = int(_loc1_.reliveTimes); + var _loc3_:int = 0; + while(_loc3_ < 3) + { + if(_loc2_ > _loc3_) + { + this.aliveVec[_loc3_].visible = true; + } + else + { + this.aliveVec[_loc3_].visible = false; + } + _loc3_++; + } + this.currStep = _loc1_.stageId - 1; + this.stairMc1.setStep(this.currStep + 3); + this.stepMc1.setStep(this.currStep + 2); + this.stairMc2.setStep(this.currStep + 2); + this.stepMc2.setStep(this.currStep + 1); + this.stairMc3.setStep(this.currStep + 1); + this.stepMc3.setStep(this.currStep); + this.stairMc4.setStep(this.currStep); + if(this.currStep % 2 == 1) + { + this.boss1.x = 260; + this.boss2.x = 120; + this.heroMc.x = 224; + } + else + { + this.boss1.x = 120; + this.boss2.x = 260; + this.heroMc.x = 84; + } + this.heroMc.y = 267; + this.stagePowerLabel.setText(Utils.getNewPower(_loc1_.atkPower)); + this.heroIdList = new Vector.(); + if(_loc1_.heroMap) + { + this.loadHeroHead(_loc1_.heroMap.picPath); + this.heroNameLabel.setText(_loc1_.heroMap.heroName); + this.heroHpLabel.setText(_loc1_.heroMap.hpStatus); + this.heroArmyLabel.setText(_loc1_.heroMap.armyNum); + this.heroPowerLabel.setText(Utils.getNewPower(_loc1_.heroMap.power)); + this.heroIdList.push(_loc1_.heroMap.heroId); + } + else + { + this.heroNameLabel.setText(""); + this.heroHpLabel.setText(""); + this.heroArmyLabel.setText(""); + this.heroPowerLabel.setText(""); + this.heroIdList = new Vector.(); + } + } + + private function loadHeroHead(param1:String) : void + { + param1 = "pic/head/" + param1; + if(this.preUrl == param1) + { + return; + } + this.preUrl = param1; + this.loadHead = new LoadResource(param1,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.imgSp.contains(this.headImg)) + { + this.imgSp.removeChild(this.headImg); + } + this.headImg = Bitmap(param1.target.loader.content); + this.headImg.width = 65; + this.headImg.height = 80; + this.loadHead.clear(); + this.imgSp.addChild(this.headImg); + } + + private function giveUpBabel(param1:MouseEvent) : void + { + var _loc2_:MessageBoxUI = MessageBoxUI.getInstance(); + _loc2_.confirmMsg("您是否放弃本次挑战机会?",this.quiteBabel); + } + + private function quiteBabel() : void + { + ConnectService.getInstance().singleBabelService.stopChallenge(); + closeUI(null); + } + + private function getPwer(param1:MouseEvent) : void + { + if(this.towerPowerUI == null) + { + this.towerPowerUI = new TowerPowerUI(); + } + this.towerPowerUI.getDropList(); + this.bg1.addChild(this.towerPowerUI); + this.towerPowerUI.x = -5; + this.towerPowerUI.y = 15; + } + + private function treatHero(param1:MouseEvent) : void + { + ConnectService.getInstance().singleBabelService.treatAllHero(); + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance(); + _loc2_.setSelectheroArr(this.heroIdList); + this.addChild(_loc2_); + _loc2_.x = 11; + _loc2_.y = 0; + _loc2_.backFunc = this.selectHeroList; + } + + public function selectHeroList(param1:Vector.) : void + { + if(param1.length > 1) + { + MessageBoxUI.getInstance().addMessage("只能选择一个武将"); + return; + } + if(param1.length == 0) + { + MessageBoxUI.getInstance().addMessage("至少要选中一个武将"); + return; + } + var _loc2_:int = param1[0].heroId; + ConnectService.getInstance().singleBabelService.changeChallengeHero(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/TowerMainUI.as b/flash_decompiled/com/view/ui/tower/TowerMainUI.as new file mode 100644 index 0000000..e7ac4df --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/TowerMainUI.as @@ -0,0 +1,222 @@ +package com.view.ui.tower +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIBorderMc; + import com.view.newui.UIButton1; + import com.view.newui.UIConfig; + import com.view.newui.UILabel; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class TowerMainUI extends BaseUI + { + + private static var instance:TowerMainUI; + + private var _width2:int = 40; + + private var _height2:int = -2; + + private var bg1:UIWindowBg; + + private var stageText:UILabel; + + private var timesText:UILabel; + + private var towerObj:Object; + + public function TowerMainUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_danjianglou); + this.setPosition(); + this.createUI(); + } + + public static function getInstance() : TowerMainUI + { + if(instance == null) + { + instance = new TowerMainUI(); + } + return instance; + } + + 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; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc3_:UIWindowBg = null; + var _loc4_:UIWindowBg = null; + var _loc5_:UIBorderMc = null; + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(390,390); + this.bg1.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:Bitmap = face.getBitMap("tower_1"); + _loc2_.x = 2; + _loc2_.y = 2; + _loc2_.width = _loc1_.width - 4; + _loc2_.height = _loc1_.height - 4; + _loc1_.addChild(_loc2_); + _loc3_ = new UIWindowBg(); + _loc3_.initSecondPanel(258,390); + this.bg1.addChild(_loc3_); + _loc3_.x = _loc1_.x + _loc1_.width + 4; + _loc3_.y = 4; + _loc4_ = new UIWindowBg(); + _loc4_.initThirdPanel(250,200); + _loc3_.addChild(_loc4_); + _loc4_.x = 4; + _loc4_.y = 4; + _loc5_ = new UIBorderMc(179); + _loc4_.addChild(_loc5_); + _loc5_.x = 0; + _loc5_.y = 1; + _loc5_.loadTitle(5); + var _loc6_:String = "1、单将楼只能用一个武将挑战,挑战每层后可恢复80%兵力。
"; + _loc6_ = _loc6_ + "2、单将楼每日次数与vip等级有关。
"; + _loc6_ = _loc6_ + "3、由于单将楼难度较大,君主等级达到1500级,千重楼通过楼外楼100层才能参与活动。"; + _loc6_ = _loc6_ + "4、单将楼通过50层后可使用清缴功能,清缴楼层至最高楼层低5层。"; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,240); + _loc7_.wordWrap = true; + _loc7_.multiline = true; + _loc7_.height = 162; + _loc4_.addChild(_loc7_); + _loc7_.x = 6; + _loc7_.y = 38; + var _loc8_:TextFormat = new TextFormat(); + _loc8_.leading = 5; + _loc7_.defaultTextFormat = _loc8_; + _loc7_.htmlText = _loc6_; + var _loc9_:UIWindowBg = new UIWindowBg(); + _loc9_.initThirdPanel(250,120); + _loc3_.addChild(_loc9_); + _loc9_.x = 4; + _loc9_.y = _loc4_.y + _loc4_.height + 3; + _loc5_ = new UIBorderMc(179); + _loc9_.addChild(_loc5_); + _loc5_.x = 0; + _loc5_.y = 1; + _loc5_.loadTitle(6); + var _loc10_:UILabel = new UILabel(100,UIConfig.labelColor); + var _loc11_:UILabel = new UILabel(100,UIConfig.labelColor); + _loc10_.setText("最高通关记录:"); + _loc11_.setText("本日剩余次数:"); + _loc9_.addChild(_loc10_); + _loc10_.x = 20; + _loc10_.y = 50; + this.stageText = new UILabel(100); + _loc9_.addChild(this.stageText); + this.stageText.x = _loc10_.x + 85; + this.stageText.y = _loc10_.y; + _loc9_.addChild(_loc11_); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc10_.y + 30; + this.timesText = new UILabel(100); + _loc9_.addChild(this.timesText); + this.timesText.x = this.stageText.x; + this.timesText.y = _loc11_.y; + var _loc12_:UIButton1 = new UIButton1("全部清缴",4); + _loc3_.addChild(_loc12_); + _loc12_.x = 20; + _loc12_.y = _loc9_.y + 143; + _loc12_.onClick = this.oneKeyPlayBabelConfig; + var _loc13_:UIButton1 = new UIButton1("清缴10次",4); + _loc3_.addChild(_loc13_); + _loc13_.x = _loc12_.x + 80; + _loc13_.onClick = this.tenKeyPlayBabel; + _loc13_.y = _loc9_.y + 143; + var _loc14_:UIButton1 = new UIButton1("进 入",4); + _loc3_.addChild(_loc14_); + _loc14_.x = _loc13_.x + 80; + _loc14_.y = _loc12_.y; + _loc14_.onClick = this.enterBabel; + Utils.g_events.addEventListener(DevEvent.EVENT_SINGLEBABEL_DATA,this.getBabelMainResult); + this.getBabelMain(); + } + + private function getBabelMain() : void + { + ConnectService.getInstance().singleBabelService.entryBabel(); + } + + private function getBabelMainResult(param1:DevEvent) : void + { + this.checkStatus(); + } + + private function checkStatus() : void + { + var _loc1_:Object = TowerData.towerObj; + if(_loc1_.state == 1) + { + closeUI(null); + TowerEnterUI.getInstance().show(); + } + this.stageText.setText("第 " + _loc1_.topStageId + " 层"); + this.timesText.setText(_loc1_.times + " 次"); + } + + private function enterBabel(param1:MouseEvent) : void + { + ConnectService.getInstance().singleBabelService.enterBabel(1); + } + + private function oneKeyPlayBabelConfig(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确定要全部清缴吗?",this.oneKeyPlayBabel); + } + + private function oneKeyPlayBabel() : void + { + ConnectService.getInstance().singleBabelService.oneKeyPlayBabel(); + } + + private function tenKeyPlayBabel(param1:MouseEvent) : void + { + ConnectService.getInstance().singleBabelService.tenKeyPlayBabel(); + } + + public function getData() : void + { + var _loc1_:Object = TowerData.towerObj; + if(_loc1_) + { + this.checkStatus(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/TowerPowerUI.as b/flash_decompiled/com/view/ui/tower/TowerPowerUI.as new file mode 100644 index 0000000..4b096ff --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/TowerPowerUI.as @@ -0,0 +1,161 @@ +package com.view.ui.tower +{ + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIPageMc; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.tower.mc.BabelPowerMc; + import flash.events.MouseEvent; + + public class TowerPowerUI extends BaseUI + { + + private var _width2:int = 15; + + private var _height2:int = -94; + + private var bg1:UIWindowBg; + + private var itemVec:Vector.; + + private var pageMc:UIPageMc; + + private var allitemList:Array; + + private var currPage:int = 1; + + public function TowerPowerUI() + { + var _loc3_:BabelPowerMc = null; + this.allitemList = new Array(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_babeldrop); + super.setPosition(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(630 + this._width2,400 + this._height2); + ui_bg.addChild(this.bg1); + this.bg1.x = 11; + this.bg1.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(622 + this._width2,392 + this._height2 - 29); + this.bg1.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + this.itemVec = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + _loc3_ = new BabelPowerMc(_loc2_); + _loc3_.x = 4 + 128 * _loc2_; + _loc3_.y = 4; + _loc1_.addChild(_loc3_); + this.itemVec.push(_loc3_); + _loc2_++; + } + this.pageMc = new UIPageMc(); + this.bg1.addChild(this.pageMc); + this.pageMc.x = 550; + this.pageMc.y = 288; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + Utils.g_events.addEventListener(DevEvent.EVENT_SINGLEBABEL_STAGEPOWER,this.getListResult); + ConnectService.getInstance().singleBabelService.getBabelPower(); + } + + 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; + } + + override public function setPosition() : void + { + } + + public function nextPage() : void + { + this.currPage += 1; + this.getItemListByType(); + } + + public function prePage() : void + { + --this.currPage; + this.getItemListByType(); + } + + private function getListResult(param1:DevEvent) : void + { + this.allitemList = param1.arr; + this.getDropList(); + } + + public function getDropList() : void + { + this.currPage = 1; + this.getItemListByType(); + } + + private function getItemListByType() : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc1_:Array = new Array(); + if(this.allitemList.length == 0) + { + return; + } + if(this.allitemList.length >= 0) + { + _loc3_ = 1 + (this.allitemList.length - 1) / 50; + if(_loc3_ <= 0) + { + _loc3_ = 1; + } + this.pageMc.setPageCount(_loc3_); + if(this.currPage > _loc3_) + { + this.currPage = _loc3_; + } + _loc1_ = this.allitemList.slice((this.currPage - 1) * 50,this.currPage * 50); + } + this.pageMc.setPage(this.currPage); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + _loc4_ = 0; + while(_loc4_ < 10) + { + _loc5_ = _loc2_ * 10 + _loc4_; + if(_loc1_[_loc5_]) + { + this.itemVec[_loc2_].setData(_loc1_[_loc5_],_loc4_,this.currPage); + } + else + { + this.itemVec[_loc2_].setData(null,0,this.currPage); + } + _loc4_++; + } + _loc2_++; + } + } + + override public function closeUI(param1:MouseEvent) : void + { + super.closeUI2(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/mc/BabelBossMc.as b/flash_decompiled/com/view/ui/tower/mc/BabelBossMc.as new file mode 100644 index 0000000..d58bc46 --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/mc/BabelBossMc.as @@ -0,0 +1,43 @@ +package com.view.ui.tower.mc +{ + import com.view.newui.UIBase; + import flash.display.MovieClip; + + public class BabelBossMc extends UIBase + { + + private var bossMc:MovieClip; + + public function BabelBossMc() + { + super(); + this.bossMc = face.getMovieClip("tower_boss"); + addChild(this.bossMc); + } + + public function setBossType(param1:String) : void + { + if(param1 == "boss2") + { + this.bossMc.gotoAndStop(1); + } + if(param1 == "boss3") + { + this.bossMc.gotoAndStop(2); + } + if(param1 == "boss4") + { + this.bossMc.gotoAndStop(3); + } + if(param1 == "dunbing") + { + this.bossMc.gotoAndStop(4); + } + if(param1 == "gongbing") + { + this.bossMc.gotoAndStop(5); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/mc/BabelDropMc.as b/flash_decompiled/com/view/ui/tower/mc/BabelDropMc.as new file mode 100644 index 0000000..4ac0e17 --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/mc/BabelDropMc.as @@ -0,0 +1,152 @@ +package com.view.ui.tower.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + import com.view.newui.UIWindowBg; + import flash.display.Bitmap; + + public class BabelDropMc extends UIBase + { + + private var stageNameLabel:UILabel; + + private var itemLabel1:UILabel; + + private var itemLabel2:UILabel; + + private var itemLabel3:UILabel; + + private var itemLabel4:UILabel; + + private var itemLabel5:UILabel; + + private var itemLabel6:UILabel; + + private var getPng:Bitmap; + + private var currStageId:int; + + private var obj:Object; + + public function BabelDropMc() + { + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(110,230); + addChild(_loc1_); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(86,86); + addChild(_loc2_); + _loc2_.x = 12; + _loc2_.y = 10; + var _loc3_:Bitmap = face.getBitMap("tower_11"); + _loc2_.addChild(_loc3_); + _loc3_.x = 8; + _loc3_.y = 8; + var _loc4_:Bitmap = face.getBitMap("tower_9"); + _loc2_.addChild(_loc4_); + _loc4_.x = _loc3_.x + int(_loc3_.width / 2 - _loc4_.width / 2); + _loc4_.y = _loc3_.y + int(_loc3_.height / 2 - _loc4_.height / 2); + this.stageNameLabel = new UILabel(_loc2_.width,10852210); + _loc2_.addChild(this.stageNameLabel); + this.stageNameLabel.y = 100; + this.stageNameLabel.setTextForMat(PublicMethod.getCenterTextFormat()); + this.itemLabel1 = new UILabel(_loc2_.width,10852210); + _loc2_.addChild(this.itemLabel1); + this.itemLabel1.y = this.stageNameLabel.y + 22; + this.itemLabel1.setTextForMat(PublicMethod.getCenterTextFormat()); + this.itemLabel2 = new UILabel(_loc2_.width,10852210); + _loc2_.addChild(this.itemLabel2); + this.itemLabel2.y = this.itemLabel1.y + 18; + this.itemLabel2.setTextForMat(PublicMethod.getCenterTextFormat()); + this.itemLabel3 = new UILabel(_loc2_.width,10852210); + _loc2_.addChild(this.itemLabel3); + this.itemLabel3.y = this.itemLabel2.y + 18; + this.itemLabel3.setTextForMat(PublicMethod.getCenterTextFormat()); + this.itemLabel4 = new UILabel(_loc2_.width,10852210); + _loc2_.addChild(this.itemLabel4); + this.itemLabel4.y = this.itemLabel3.y + 18; + this.itemLabel4.setTextForMat(PublicMethod.getCenterTextFormat()); + this.itemLabel5 = new UILabel(_loc2_.width,10852210); + _loc2_.addChild(this.itemLabel5); + this.itemLabel5.y = this.itemLabel4.y + 18; + this.itemLabel5.setTextForMat(PublicMethod.getCenterTextFormat()); + this.itemLabel6 = new UILabel(_loc2_.width,10852210); + _loc2_.addChild(this.itemLabel6); + this.itemLabel6.y = this.itemLabel5.y + 18; + this.itemLabel6.setTextForMat(PublicMethod.getCenterTextFormat()); + } + + public function setData(param1:Object) : void + { + var _loc2_:Array = null; + this.obj = param1; + if(this.obj == null) + { + this.stageNameLabel.setText(""); + this.itemLabel1.setText(""); + this.itemLabel2.setText(""); + this.itemLabel3.setText(""); + this.itemLabel4.setText(""); + this.itemLabel5.setText(""); + this.itemLabel6.setText(""); + } + else + { + this.currStageId = this.obj.stageId; + this.stageNameLabel.setText("第" + this.currStageId + "层"); + _loc2_ = this.obj.awardList; + if(_loc2_[0]) + { + this.itemLabel1.setText(_loc2_[0].itemName); + } + else + { + this.itemLabel1.setText(""); + } + if(_loc2_[1]) + { + this.itemLabel2.setText(_loc2_[1].itemName); + } + else + { + this.itemLabel2.setText(""); + } + if(_loc2_[2]) + { + this.itemLabel3.setText(_loc2_[2].itemName); + } + else + { + this.itemLabel3.setText(""); + } + if(_loc2_[3]) + { + this.itemLabel4.setText(_loc2_[3].itemName); + } + else + { + this.itemLabel4.setText(""); + } + if(_loc2_[4]) + { + this.itemLabel5.setText(_loc2_[4].itemName); + } + else + { + this.itemLabel5.setText(""); + } + if(_loc2_[5]) + { + this.itemLabel6.setText(_loc2_[5].itemName); + } + else + { + this.itemLabel6.setText(""); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/mc/BabelHeroMc.as b/flash_decompiled/com/view/ui/tower/mc/BabelHeroMc.as new file mode 100644 index 0000000..b7deb17 --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/mc/BabelHeroMc.as @@ -0,0 +1,53 @@ +package com.view.ui.tower.mc +{ + import com.view.newui.UIBase; + import flash.display.MovieClip; + import flash.events.Event; + + public class BabelHeroMc extends UIBase + { + + private var standMc:MovieClip; + + private var fightMc:MovieClip; + + private var backF:Function; + + public function BabelHeroMc() + { + super(); + this.standMc = face.getMovieClip("hero_stand"); + addChild(this.standMc); + this.fightMc = face.getMovieClip("hero_fight"); + addChild(this.fightMc); + this.fightMc.gotoAndStop(1); + this.fightMc.visible = false; + } + + public function setBackF(param1:Function) : void + { + this.backF = param1; + } + + public function fight() : void + { + this.standMc.visible = false; + this.fightMc.visible = true; + this.fightMc.gotoAndPlay(1); + face.stage.addEventListener(Event.ENTER_FRAME,this.enterFrame); + } + + private function enterFrame(param1:Event) : void + { + if(this.fightMc.totalFrames == this.fightMc.currentFrame) + { + face.stage.removeEventListener(Event.ENTER_FRAME,this.enterFrame); + this.fightMc.stop(); + this.fightMc.visible = false; + this.standMc.visible = true; + this.backF(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/mc/BabelPowerMc.as b/flash_decompiled/com/view/ui/tower/mc/BabelPowerMc.as new file mode 100644 index 0000000..b87ac51 --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/mc/BabelPowerMc.as @@ -0,0 +1,56 @@ +package com.view.ui.tower.mc +{ + import com.view.newui.UIBase; + import com.view.newui.UITable; + + public class BabelPowerMc extends UIBase + { + + private var tableMc1:UITable; + + private var type:int; + + private var itemVec:Vector.; + + public function BabelPowerMc(param1:int) + { + var _loc2_:Array = null; + var _loc5_:PowerLineMc = null; + super(); + this.type = param1; + _loc2_ = ["楼层","战力"]; + var _loc3_:Array = [58,70]; + this.tableMc1 = new UITable(); + this.tableMc1.drawLine = true; + this.tableMc1.lineHeight = 24; + this.tableMc1.install(10,_loc2_,_loc3_); + addChild(this.tableMc1); + this.tableMc1.x = 1; + this.tableMc1.y = 1; + this.itemVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 10) + { + _loc5_ = new PowerLineMc(); + this.itemVec.push(_loc5_); + this.tableMc1.addChild(_loc5_); + _loc5_.x = 5; + _loc5_.y = 27 + _loc4_ * 24; + _loc4_++; + } + } + + public function setData(param1:Object, param2:int, param3:int) : void + { + if(param1 == null) + { + this.itemVec[param2].setDate(param1); + } + else + { + this.itemVec[param2].setDate(param1); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/mc/BabelStairMc.as b/flash_decompiled/com/view/ui/tower/mc/BabelStairMc.as new file mode 100644 index 0000000..92794aa --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/mc/BabelStairMc.as @@ -0,0 +1,37 @@ +package com.view.ui.tower.mc +{ + import com.view.newui.UIBase; + import flash.display.Bitmap; + + public class BabelStairMc extends UIBase + { + + private var stair1:Bitmap; + + private var stair2:Bitmap; + + public function BabelStairMc() + { + super(); + this.stair1 = face.getBitMap("tower_2"); + this.stair2 = face.getBitMap("tower_3"); + addChild(this.stair1); + addChild(this.stair2); + } + + public function setStep(param1:int) : void + { + if(param1 % 2 == 1) + { + this.stair1.visible = false; + this.stair2.visible = true; + } + else + { + this.stair1.visible = true; + this.stair2.visible = false; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/mc/BabelStepMc.as b/flash_decompiled/com/view/ui/tower/mc/BabelStepMc.as new file mode 100644 index 0000000..859c89a --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/mc/BabelStepMc.as @@ -0,0 +1,49 @@ +package com.view.ui.tower.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIBase; + import com.view.newui.UILabel; + import flash.display.Bitmap; + + public class BabelStepMc extends UIBase + { + + private var stepLabel:UILabel; + + private var stepMc:Bitmap; + + public function BabelStepMc() + { + super(); + this.stepMc = face.getBitMap("tower_4"); + addChild(this.stepMc); + this.stepLabel = new UILabel(60); + addChild(this.stepLabel); + this.stepLabel.y = 30; + this.stepLabel.setTextForMat(PublicMethod.getCenterTextFormat()); + } + + public function setStep(param1:int) : void + { + if(param1 % 2 == 0) + { + this.stepMc.x = 0; + this.stepLabel.x = this.stepMc.x + 125; + } + else + { + this.stepMc.x = 140; + this.stepLabel.x = this.stepMc.x - 60; + } + if(param1 == 0) + { + this.stepLabel.setText("起点"); + } + else + { + this.stepLabel.setText("第" + param1 + "层"); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/tower/mc/PowerLineMc.as b/flash_decompiled/com/view/ui/tower/mc/PowerLineMc.as new file mode 100644 index 0000000..13dadfe --- /dev/null +++ b/flash_decompiled/com/view/ui/tower/mc/PowerLineMc.as @@ -0,0 +1,41 @@ +package com.view.ui.tower.mc +{ + import com.common.PublicMethod; + import com.utils.Utils; + import flash.display.Sprite; + import flash.text.TextField; + + public class PowerLineMc extends Sprite + { + + private var stage1:TextField; + + private var power1:TextField; + + public function PowerLineMc() + { + super(); + this.stage1 = PublicMethod.getTextField(16777215,57); + this.power1 = PublicMethod.getTextField(16711680,60); + addChild(this.stage1); + addChild(this.power1); + this.stage1.x = 2; + this.stage1.y = 2; + this.power1.x = this.stage1.x + this.stage1.width + 3; + this.power1.y = this.stage1.y; + } + + public function setDate(param1:Object) : void + { + if(param1 == null) + { + this.stage1.text = ""; + this.power1.text = ""; + return; + } + this.stage1.text = "第" + param1.stageId + "层"; + this.power1.text = Utils.getNewPower(param1.power); + } + } +} + diff --git a/flash_decompiled/com/view/ui/training/CityView.as b/flash_decompiled/com/view/ui/training/CityView.as new file mode 100644 index 0000000..a0682e3 --- /dev/null +++ b/flash_decompiled/com/view/ui/training/CityView.as @@ -0,0 +1,296 @@ +package com.view.ui.training +{ + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.view.newui.UIButton; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.training.mc.PlayerItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class CityView extends Sprite + { + + private var m_nameArr:Array; + + private var m_picArr:Array; + + private var bg:UIWindowBg; + + private var delBtn:UIButton; + + public var backFunc:Function; + + public var onSelect:Function; + + private var itemVec:Vector.; + + private var okBtn:UIButton; + + private var backBtn:UIButton; + + private var paneVec:Vector.; + + private var lastPane:ItemPanel; + + private var tableMc:UITable; + + private var lastItem:PlayerItem; + + private var userList:Array; + + private var currCastleType:int; + + public function CityView() + { + var _loc3_:Object = null; + var _loc4_:ItemPanel = null; + super(); + this.m_nameArr = ["收藏城池","冲突势力","仇人","洗刷耻辱"]; + this.m_picArr = ["显示您标记过的玩家","显示您城池周围势力有可能重叠冲突的玩家","显示您曾经攻打过的玩家和您自己加的仇人","显示给您插了白旗的玩家和该玩家联盟的成员,成功的攻打他们后可以洗刷被插白旗的耻辱"]; + this.bg = new UIWindowBg(); + this.bg.initSecondPanel(161,367); + addChild(this.bg); + var _loc1_:UITitleBg = new UITitleBg("敌对势力",this.bg.width); + this.bg.addChild(_loc1_); + _loc1_.x = int(this.bg.width / 2 - _loc1_.width / 2); + var _loc2_:int = 0; + this.paneVec = new Vector.(); + for each(_loc3_ in this.m_nameArr) + { + _loc4_ = new ItemPanel(); + _loc4_.num = _loc2_; + this.bg.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = 26 + 4 + 33 * _loc2_; + _loc4_.init(); + _loc4_.showName(String(_loc3_)); + _loc4_.setContent(this.m_picArr[_loc2_]); + this.paneVec.push(_loc4_); + _loc2_++; + _loc4_.addEventListener(MouseEvent.CLICK,this.clickPane); + } + this.lastPane = this.paneVec[0]; + this.lastPane.changeLabel(false); + this.initHeight(); + this.initTable(); + this.okBtn = new UIButton("确 定",2); + this.backBtn = new UIButton("返 回",2); + this.bg.addChild(this.okBtn); + this.okBtn.x = 481; + this.okBtn.y = 345; + this.backBtn.onClick = this.close; + this.okBtn.onClick = this.okFunc; + this.bg.addChild(this.backBtn); + this.backBtn.x = this.okBtn.x + this.okBtn.width + 10; + this.backBtn.y = this.okBtn.y; + ConnectService.getInstance().addEventListener(BattleEvent.B_getBattleDexList,this.getBattleDexResult); + ConnectService.getInstance().addEventListener(BattleEvent.B_getChouRen,this.getChouRenResult); + ConnectService.getInstance().addEventListener(BattleEvent.B_getChongToUser,this.getChongToUserResult); + ConnectService.getInstance().addEventListener(BattleEvent.B_getBattleFlagUser,this.getBattleFlagUserResult); + ConnectService.getInstance().addEventListener(BattleEvent.DeleteBattleDex,this.delBattleDexResult); + this.getUserList(); + this.delBtn = new UIButton("删除"); + this.bg.addChild(this.delBtn); + this.delBtn.x = 185; + this.delBtn.y = 345; + this.delBtn.onClick = this.delBattleDex; + this.delBtn.visible = false; + } + + private function okFunc(param1:MouseEvent) : void + { + if(this.lastItem == null || this.lastItem.obj == null) + { + MessageBoxUI.getInstance().addMessage("请选择目标"); + return; + } + if(this.onSelect != null) + { + this.onSelect(this.lastItem.obj); + } + this.close(param1); + } + + private function close(param1:MouseEvent) : void + { + if(this.backFunc != null) + { + this.backFunc(); + } + } + + private function clickPane(param1:MouseEvent) : void + { + if(this.lastPane) + { + this.lastPane.changeLabel(true); + } + this.lastItem = null; + this.delBtn.visible = false; + var _loc2_:ItemPanel = param1.currentTarget as ItemPanel; + this.lastPane = _loc2_; + this.lastPane.changeLabel(false); + this.initHeight(); + this.currCastleType = this.lastPane.num; + this.getUserList(); + } + + private function initHeight() : void + { + var _loc1_:* = undefined; + for(_loc1_ in this.paneVec) + { + if(_loc1_ > 0) + { + this.paneVec[_loc1_].y = this.paneVec[_loc1_ - 1].y + this.paneVec[_loc1_ - 1].height + 4; + } + } + } + + private function initTable() : void + { + var _loc4_:PlayerItem = null; + var _loc1_:Array = ["君主","坐标","单程时间"]; + var _loc2_:Array = [140,145,174]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 175; + this.itemVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc4_ = new PlayerItem(); + this.itemVec.push(_loc4_); + this.tableMc.addChild(_loc4_); + _loc4_.y = 26 + _loc3_ * 26; + _loc4_.x = 4; + _loc4_.onClickF = this.clickItem; + _loc3_++; + } + } + + private function clickItem(param1:PlayerItem) : void + { + if(param1.obj == null) + { + return; + } + if(this.lastItem != null) + { + this.lastItem.setSelect(false); + } + this.lastItem = param1; + this.lastItem.setSelect(true); + if(this.currCastleType == 0) + { + this.delBtn.visible = true; + } + } + + public function getBattleDexResult(param1:BattleEvent) : void + { + if(this.currCastleType == 0) + { + this.userList = param1.list; + this.getUserListResult(); + } + } + + public function getChouRenResult(param1:BattleEvent) : void + { + if(this.currCastleType == 2) + { + this.userList = param1.list; + this.getUserListResult(); + } + } + + public function getChongToUserResult(param1:BattleEvent) : void + { + if(this.currCastleType == 1) + { + this.userList = param1.list; + this.getUserListResult(); + } + } + + public function getBattleFlagUserResult(param1:BattleEvent) : void + { + if(this.currCastleType == 3) + { + this.userList = param1.list; + this.getUserListResult(); + } + } + + private function getUserList() : void + { + switch(this.currCastleType) + { + case 0: + ConnectService.getInstance().battleService.getBattleDexList(); + break; + case 1: + ConnectService.getInstance().battleService.getChongToUser(); + break; + case 2: + ConnectService.getInstance().battleService.getChouRen(); + break; + case 3: + ConnectService.getInstance().battleService.getBattleFlagUser(); + } + } + + private function getUserListResult() : void + { + var _loc1_:* = undefined; + this.clearUserList(); + if(this.userList != null && this.userList.length > 0) + { + for(_loc1_ in this.userList) + { + if(_loc1_ > 12) + { + break; + } + this.itemVec[_loc1_].setDate(this.userList[_loc1_]); + } + } + } + + private function clearUserList() : void + { + var _loc1_:PlayerItem = null; + for each(_loc1_ in this.itemVec) + { + _loc1_.setDate(null); + } + } + + private function delBattleDex(param1:MouseEvent) : void + { + if(this.lastItem == null || this.lastItem.obj == null) + { + MessageBoxUI.getInstance().addMessage("请选择一个目标"); + return; + } + ConnectService.getInstance().battleService.deleteBattleDex(this.lastItem.obj.dexId); + } + + private function delBattleDexResult(param1:BattleEvent) : void + { + if(this.currCastleType == 0) + { + ConnectService.getInstance().battleService.getBattleDexList(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/training/ItemPanel.as b/flash_decompiled/com/view/ui/training/ItemPanel.as new file mode 100644 index 0000000..17983da --- /dev/null +++ b/flash_decompiled/com/view/ui/training/ItemPanel.as @@ -0,0 +1,273 @@ +package com.view.ui.training +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.mc.sprite.ExpBar; + import flash.display.Bitmap; + import flash.display.Shape; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ItemPanel extends Sprite + { + + private var m_index:int; + + private var m_btn:Sprite; + + private var m_shape:Shape; + + private var m_itemWidth:int = 161; + + private var m_sp:Sprite; + + private var m_dir:Boolean; + + private var face:InstallFace = InstallFace.getInstance(); + + private var imgSp:Sprite; + + private var url:String; + + private var img:Bitmap; + + private var content:String = ""; + + private var urlLoad:LoadResource; + + private var contentText:TextField; + + private var m_jingYanBar:ExpBar; + + public var sName:String; + + public function ItemPanel() + { + super(); + this.m_sp = new Sprite(); + this.buttonMode = true; + } + + public function get num() : int + { + return this.m_index; + } + + public function set num(param1:int) : void + { + this.m_index = param1; + } + + public function get dir() : Boolean + { + return this.m_dir; + } + + public function init() : void + { + this.mouseEnabled = false; + var _loc1_:* = new Shape(); + _loc1_.graphics.beginFill(7759679); + _loc1_.graphics.drawRoundRect(0,0,161,29,4,4); + _loc1_.graphics.endFill(); + this.addChild(_loc1_); + var _loc2_:* = new Sprite(); + _loc2_.x = 1; + _loc2_.y = 1; + _loc2_.buttonMode = true; + _loc2_.graphics.beginFill(3090721); + _loc2_.graphics.drawRoundRect(0,0,159,27,4,4); + _loc2_.graphics.endFill(); + this.addChild(_loc2_); + var _loc3_:* = this.face.getButton(ClassConfig.LIB_UI_BT_FANGXING); + this.m_btn = new Sprite(); + this.m_btn.x = this.m_itemWidth - 26; + this.m_btn.y = 3; + this.m_btn.addChild(_loc3_); + this.addChild(this.m_btn); + this.drawImgPane(); + this.drawUp(); + } + + private function drawImgPane() : void + { + this.imgSp = new Sprite(); + var _loc1_:* = new Shape(); + _loc1_.graphics.beginFill(7759679); + _loc1_.graphics.drawRoundRect(0,0,161,120,4,4); + _loc1_.graphics.endFill(); + this.imgSp.addChild(_loc1_); + var _loc2_:* = new Sprite(); + _loc2_.x = 1; + _loc2_.y = 1; + _loc2_.graphics.beginFill(3090721); + _loc2_.graphics.drawRoundRect(0,0,159,118,4,4); + _loc2_.graphics.endFill(); + this.imgSp.addChild(_loc2_); + } + + private function drawDown() : void + { + this.m_shape = new Shape(); + this.m_shape.graphics.lineStyle(1,16777215); + this.m_shape.graphics.moveTo(0,0); + this.m_shape.graphics.lineTo(4,4); + this.m_shape.graphics.lineTo(8,0); + this.m_shape.graphics.moveTo(0,4); + this.m_shape.graphics.lineTo(4,8); + this.m_shape.graphics.lineTo(8,4); + this.m_shape.x = 8; + this.m_shape.y = 8; + this.m_btn.addChild(this.m_shape); + this.setImageView(true); + } + + private function setImageView(param1:Boolean) : void + { + if(param1) + { + addChild(this.imgSp); + this.imgSp.y = 33; + this.startLoadImg(); + } + else if(contains(this.imgSp)) + { + removeChild(this.imgSp); + } + } + + public function setUrl(param1:String) : void + { + this.url = param1; + } + + public function setContent(param1:String) : void + { + this.content = param1; + } + + private function startLoadImg() : void + { + var _loc1_:TextFormat = null; + if(this.content != "") + { + if(this.contentText == null) + { + this.contentText = PublicMethod.getTextFieldWithFillter(16640697,142); + this.contentText.height = 90; + this.imgSp.addChild(this.contentText); + _loc1_ = new TextFormat(); + _loc1_.leading = 3; + this.contentText.defaultTextFormat = _loc1_; + this.contentText.wordWrap = true; + this.contentText.multiline = true; + this.contentText.textColor = 16777215; + this.contentText.text = this.content; + this.contentText.mouseEnabled = false; + this.contentText.x = 10; + this.contentText.y = 20; + } + return; + } + if(Boolean(this.img) && this.imgSp.contains(this.img)) + { + return; + } + this.urlLoad = new LoadResource(ServerConfig.IMAGE_IMG_URL + this.url,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.img) && this.imgSp.contains(this.img)) + { + this.urlLoad.clear(); + return; + } + this.img = Bitmap(param1.target.loader.content); + this.urlLoad.clear(); + this.imgSp.addChild(this.img); + this.img.x = 12; + this.img.y = 6; + } + + public function showBar(param1:int, param2:int) : void + { + if(this.m_jingYanBar == null) + { + this.m_jingYanBar = new ExpBar(); + addChild(this.m_jingYanBar); + this.m_jingYanBar.setSize(96); + this.m_jingYanBar.x = 34; + this.m_jingYanBar.y = 8; + } + this.m_jingYanBar.setLength(param1); + this.m_jingYanBar.setCurValue(param2); + this.m_jingYanBar.setStr1("仇恨值"); + } + + public function set dir(param1:Boolean) : void + { + this.m_dir = param1; + } + + public function get sp() : Sprite + { + return this.m_sp; + } + + public function changeLabel(param1:Boolean) : void + { + this.m_btn.removeChild(this.m_shape); + if(param1) + { + this.drawUp(); + } + else + { + this.drawDown(); + } + } + + public function set itemWidth(param1:int) : void + { + this.m_itemWidth = param1; + } + + public function showName(param1:String) : void + { + this.sName = param1; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(16640697,60); + _loc2_.text = param1; + _loc2_.x = 4; + _loc2_.y = 4; + this.addChild(_loc2_); + } + + public function get itemWidth() : int + { + return this.m_itemWidth; + } + + private function drawUp() : void + { + this.m_shape = new Shape(); + this.m_shape.graphics.lineStyle(1,16777215); + this.m_shape.graphics.moveTo(0,0); + this.m_shape.graphics.lineTo(4,4); + this.m_shape.graphics.lineTo(0,8); + this.m_shape.graphics.moveTo(4,8); + this.m_shape.graphics.lineTo(8,4); + this.m_shape.graphics.lineTo(4,0); + this.m_shape.x = 8; + this.m_shape.y = 8; + this.m_btn.addChild(this.m_shape); + this.setImageView(false); + } + } +} + diff --git a/flash_decompiled/com/view/ui/training/MonsterView.as b/flash_decompiled/com/view/ui/training/MonsterView.as new file mode 100644 index 0000000..0ab9c15 --- /dev/null +++ b/flash_decompiled/com/view/ui/training/MonsterView.as @@ -0,0 +1,279 @@ +package com.view.ui.training +{ + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.control.user.event.UserEvent; + import com.view.newui.UIButton; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.training.mc.MonsterItem; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class MonsterView extends Sprite + { + + private var m_nameArr:Array; + + private var m_picArr:Array; + + private var bg:UIWindowBg; + + public var backFunc:Function; + + public var onSelect:Function; + + private var itemVec:Vector.; + + private var okBtn:UIButton; + + private var backBtn:UIButton; + + private var paneVec:Vector.; + + private var lastPane:ItemPanel; + + private var tableMc:UITable; + + private var lastItem:MonsterItem; + + private var pveList:Array; + + private var currCastleType:int = 99; + + public function MonsterView() + { + var _loc3_:Object = null; + var _loc4_:ItemPanel = null; + super(); + this.m_nameArr = ["新手","暴民","流寇","戍卒","叛军","蛮族"]; + this.m_picArr = ["panjun.jpg","baomin.jpg","liukou.jpg","shuzu.jpg","panjun.jpg","shuzu.jpg"]; + this.bg = new UIWindowBg(); + this.bg.initSecondPanel(161,367); + addChild(this.bg); + var _loc1_:UITitleBg = new UITitleBg("野外势力",this.bg.width); + this.bg.addChild(_loc1_); + _loc1_.x = int(this.bg.width / 2 - _loc1_.width / 2); + var _loc2_:int = 0; + this.paneVec = new Vector.(); + for each(_loc3_ in this.m_nameArr) + { + _loc4_ = new ItemPanel(); + _loc4_.num = _loc2_; + this.bg.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = 26 + 4 + 33 * _loc2_; + _loc4_.init(); + _loc4_.showName(String(_loc3_)); + _loc4_.setUrl(this.m_picArr[_loc2_]); + this.paneVec.push(_loc4_); + _loc2_++; + _loc4_.addEventListener(MouseEvent.CLICK,this.clickPane); + } + this.lastPane = this.paneVec[0]; + this.lastPane.changeLabel(false); + this.initHeight(); + this.initTable(); + this.okBtn = new UIButton("确 定",2); + this.backBtn = new UIButton("返 回",2); + this.bg.addChild(this.okBtn); + this.okBtn.x = 481; + this.okBtn.y = 345; + this.backBtn.onClick = this.close; + this.okBtn.onClick = this.okFunc; + this.bg.addChild(this.backBtn); + this.backBtn.x = this.okBtn.x + this.okBtn.width + 10; + this.backBtn.y = this.okBtn.y; + ConnectService.getInstance().battleService.getPveCastleList(); + ConnectService.getInstance().addEventListener(BattleEvent.B_getPveCastleList,this.getArmyListResult); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent); + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(UserEvent.USER_getUserAnimus,this.getAnimusSucc); + if(this.pveList) + { + this.getUserAnimus(); + } + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(UserEvent.USER_getUserAnimus,this.getAnimusSucc); + } + + private function close(param1:MouseEvent) : void + { + if(this.backFunc != null) + { + this.backFunc(); + } + } + + private function okFunc(param1:MouseEvent) : void + { + if(this.lastItem == null || this.lastItem.obj == null) + { + MessageBoxUI.getInstance().addMessage("请选择目标"); + return; + } + if(this.onSelect != null) + { + this.onSelect(this.lastItem.obj); + } + this.close(param1); + } + + private function clickPane(param1:MouseEvent) : void + { + if(this.lastPane) + { + this.lastPane.changeLabel(true); + } + this.lastItem = null; + var _loc2_:ItemPanel = param1.currentTarget as ItemPanel; + this.lastPane = _loc2_; + this.lastPane.changeLabel(false); + this.initHeight(); + this.currCastleType = this.lastPane.num; + if(this.currCastleType == 0) + { + this.currCastleType = 99; + } + this.getPveList(); + } + + private function initHeight() : void + { + var _loc1_:* = undefined; + for(_loc1_ in this.paneVec) + { + if(_loc1_ > 0) + { + this.paneVec[_loc1_].y = this.paneVec[_loc1_ - 1].y + this.paneVec[_loc1_ - 1].height + 4; + } + } + } + + private function initTable() : void + { + var _loc4_:MonsterItem = null; + var _loc1_:Array = ["势力类型","等级","坐标","讨伐","单挑","单程时间"]; + var _loc2_:Array = [114,47,101,47,47,103]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 175; + this.itemVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc4_ = new MonsterItem(); + this.itemVec.push(_loc4_); + this.tableMc.addChild(_loc4_); + _loc4_.y = 26 + _loc3_ * 26; + _loc4_.x = 4; + _loc4_.onClickF = this.clickItem; + _loc3_++; + } + } + + private function clickItem(param1:MonsterItem) : void + { + if(param1.obj == null) + { + return; + } + if(this.lastItem != null) + { + this.lastItem.setSelect(false); + } + this.lastItem = param1; + this.lastItem.setSelect(true); + } + + public function getArmyListResult(param1:BattleEvent) : void + { + ConnectService.getInstance().removeEventListener(BattleEvent.B_getPveCastleList,this.getArmyListResult); + this.pveList = param1.list; + this.getPveList(); + this.getUserAnimus(); + } + + private function getUserAnimus() : void + { + ConnectService.getInstance().userService.getUserAnimus(); + } + + private function getAnimusSucc(param1:UserEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:ItemPanel = null; + var _loc2_:Array = param1.list; + if(_loc2_ != null && _loc2_.length > 0) + { + for(_loc3_ in _loc2_) + { + _loc4_ = this.getPaneByName(_loc2_[_loc3_].name); + if(_loc4_) + { + _loc4_.showBar(_loc2_[_loc3_].maxValue,_loc2_[_loc3_].value); + } + } + } + } + + private function getPaneByName(param1:String) : ItemPanel + { + var _loc2_:ItemPanel = null; + for each(_loc2_ in this.paneVec) + { + if(_loc2_.sName == param1) + { + return _loc2_; + } + } + return null; + } + + private function getPveList() : void + { + var _loc1_:int = 0; + var _loc2_:* = undefined; + this.clearPveList(); + if(this.pveList != null && this.pveList.length > 0) + { + for(_loc2_ in this.pveList) + { + if(this.pveList[_loc2_].pveCastleType != this.currCastleType) + { + continue; + } + this.itemVec[_loc1_].setDate(this.pveList[_loc2_]); + if(_loc1_ >= 13) + { + break; + } + _loc1_++; + } + } + } + + private function clearPveList() : void + { + var _loc1_:MonsterItem = null; + for each(_loc1_ in this.itemVec) + { + _loc1_.setDate(null); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/training/SelectView.as b/flash_decompiled/com/view/ui/training/SelectView.as new file mode 100644 index 0000000..2b22a6e --- /dev/null +++ b/flash_decompiled/com/view/ui/training/SelectView.as @@ -0,0 +1,153 @@ +package com.view.ui.training +{ + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class SelectView extends BaseUI + { + + private static var s_instance:SelectView = new SelectView(); + + public var parentView:*; + + public var onSeletF:Function; + + private var armyDataList:Array; + + private var btnArr:Array = new Array(); + + private var paneBg:UIWindowBg; + + private var btn_1:UITabBtn; + + private var btn_2:UITabBtn; + + private var monsterView:MonsterView; + + private var cityView:CityView; + + public function SelectView() + { + super(); + if(s_instance) + { + throw new Error("单例模式!"); + } + this.init(); + } + + public static function getInstance() : SelectView + { + return s_instance; + } + + override public function setPosition() : void + { + } + + public function init() : void + { + var _loc1_:int = 0; + var _loc2_:UITabBtn = null; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xuanzhemubiao); + this.setPosition(); + this.btn_1 = new UITabBtn("野外势力",2); + this.btn_2 = new UITabBtn("敌对势力",2); + this.btnArr.push(this.btn_1); + this.btnArr.push(this.btn_2); + for each(_loc2_ in this.btnArr) + { + addChild(_loc2_); + _loc2_.x = 25 + _loc1_ * 66; + _loc2_.y = 40; + _loc1_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + this.btn_1.onClick = this.getMonsterView; + this.btn_2.onClick = this.getCityView; + this.btn_1.dispatchClickEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function getMonsterView(param1:MouseEvent) : void + { + this.initBtn(1); + if(this.monsterView == null) + { + this.monsterView = new MonsterView(); + this.monsterView.x = 4; + this.monsterView.y = 4; + this.monsterView.backFunc = this.backFunc; + this.monsterView.onSelect = this.onSelect; + } + this.paneBg.addChild(this.monsterView); + } + + private function getCityView(param1:MouseEvent) : void + { + this.initBtn(2); + if(this.cityView == null) + { + this.cityView = new CityView(); + this.cityView.x = 4; + this.cityView.y = 4; + this.cityView.backFunc = this.backFunc; + this.cityView.onSelect = this.onSelect; + } + this.paneBg.addChild(this.cityView); + } + + private function onSelect(param1:Object) : void + { + if(this.onSeletF != null) + { + this.onSeletF(param1); + } + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + } + + private function initBtn(param1:int) : void + { + if(param1 == 1) + { + this.btn_1.select = true; + this.btn_2.select = false; + } + else + { + this.btn_2.select = true; + this.btn_1.select = false; + } + } + + override public function closeUI(param1:MouseEvent) : void + { + if(this.parentView == face.stage) + { + super.closeUI(param1); + } + else + { + super.closeUI2(); + } + } + + private function backFunc() : void + { + this.closeUI(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/training/SoldierFirstView.as b/flash_decompiled/com/view/ui/training/SoldierFirstView.as new file mode 100644 index 0000000..4a78129 --- /dev/null +++ b/flash_decompiled/com/view/ui/training/SoldierFirstView.as @@ -0,0 +1,850 @@ +package com.view.ui.training +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.control.data.ReturnBean; + import com.control.hero.event.HeroEvent; + import com.data.MemeberShip; + import com.data.data.hero.Hero; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UINumInputText; + import com.view.newui.UIRadioBtn; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.army.ArmySetUI; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.training.mc.HeroItemMc; + import com.view.ui.warreport.MilitaryView; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SoldierFirstView extends BaseUI + { + + private static var instance:SoldierFirstView; + + private var bg:UIWindowBg; + + private var aim_txt:TextField; + + private var x_txt:UINumInputText; + + private var y_txt:UINumInputText; + + private var time_txt:TextField; + + private var txtPvp:TextField; + + private var warText:TextField; + + private var pow_txt:TextField; + + private var aimpow_txt:TextField; + + private var tableMc:UITable; + + private var sendBtn:UIButton; + + private var heroListMc:Vector.; + + private var selectHeroBtn:UIButton; + + private var selectArmyBtn:UIButton; + + private var radio1:UIRadioBtn; + + private var radio2:UIRadioBtn; + + private var radio3:UIRadioBtn; + + private var radio4:UIRadioBtn; + + private var lastClickBtn:UIRadioBtn; + + private var selectView:SelectView; + + private var currArmyObj:Object; + + private var m_obj:Object = new Object(); + + private var _obj:Object; + + private var targetCasId:int; + + private var _fight:int = -1; + + private var _combat:int = -1; + + private var m_isGuildWar:Boolean; + + private var _curStage:String; + + private var selnum:int; + + private var heroListArr:Vector. = new Vector.(); + + private var _heroComboat:Number; + + private var _fightComboat:Number; + + private var wallHeroList:Object; + + private var s_obj:Object; + + public function SoldierFirstView() + { + super(); + if(instance != null) + { + throw new Error("此类是一个单例,无法为它创建实例"); + } + super.addUIBg(); + super.loadTitle(UITitleConfig.title_chuzheng); + super.setPosition(); + this.createUI(); + } + + public static function getInstance() : SoldierFirstView + { + if(instance == null) + { + return instance = new SoldierFirstView(); + } + return instance; + } + + override public function createUI() : void + { + var _loc3_:UIWindowBg = null; + var _loc5_:TextField = null; + var _loc6_:UIButton = null; + var _loc8_:TextField = null; + var _loc23_:HeroItemMc = null; + this.bg = new UIWindowBg(); + this.bg.initSecondPanel(630,400); + addChild(this.bg); + this.bg.x = 11; + this.bg.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(320,180); + this.bg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initSecondPanel(287,180); + this.bg.addChild(_loc2_); + _loc2_.x = _loc1_.x + _loc1_.width + 4; + _loc2_.y = _loc1_.y; + _loc3_ = new UIWindowBg(); + _loc3_.initSecondPanel(621,198); + this.bg.addChild(_loc3_); + _loc3_.x = _loc1_.x; + _loc3_.y = _loc1_.y + _loc1_.height + 4; + var _loc4_:UITitleBg = new UITitleBg("出征目标",_loc1_.width); + _loc1_.addChild(_loc4_); + _loc4_.x = int(_loc1_.width / 2 - _loc4_.width / 2); + _loc5_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc5_.text = "目标名称:"; + _loc1_.addChild(_loc5_); + _loc5_.x = 20; + _loc5_.y = 40; + this.aim_txt = PublicMethod.getTextFieldWithFillter(16640697,140); + _loc1_.addChild(this.aim_txt); + this.aim_txt.x = 80; + this.aim_txt.y = _loc5_.y; + _loc6_ = new UIButton("选择目标",2); + _loc1_.addChild(_loc6_); + _loc6_.x = 200; + _loc6_.y = _loc5_.y - 3; + _loc6_.onClick = this.selectMonster; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc7_.text = "目标坐标X:"; + _loc1_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc5_.y + 35; + this.x_txt = new UINumInputText(50); + _loc1_.addChild(this.x_txt); + this.x_txt.x = this.aim_txt.x; + this.x_txt.y = _loc7_.y - 2; + this.x_txt.setMaxNum(9999); + this.x_txt.setMaxChars(4); + this.x_txt.hiddenBtn(); + this.x_txt.setTextNull(); + _loc8_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc8_.text = "目标坐标Y:"; + _loc1_.addChild(_loc8_); + _loc8_.x = 160; + _loc8_.y = _loc7_.y; + this.y_txt = new UINumInputText(50); + _loc1_.addChild(this.y_txt); + this.y_txt.x = _loc8_.x + 60; + this.y_txt.y = this.x_txt.y; + this.y_txt.setMaxNum(9999); + this.y_txt.setMaxChars(4); + this.y_txt.hiddenBtn(); + this.y_txt.setTextNull(); + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc9_.text = "单程时间:"; + _loc1_.addChild(_loc9_); + _loc9_.x = _loc5_.x; + _loc9_.y = _loc7_.y + 35; + this.time_txt = PublicMethod.getTextFieldWithFillter(16640697,140); + _loc1_.addChild(this.time_txt); + this.time_txt.x = this.aim_txt.x; + this.time_txt.y = _loc9_.y; + var _loc10_:Sprite = PublicMethod.getTrLine(310); + _loc1_.addChild(_loc10_); + _loc10_.x = 7; + _loc10_.y = 135; + this.warText = PublicMethod.getTextFieldWithFillter(16640697,320); + this.warText.height = 34; + this.warText.wordWrap = true; + this.warText.multiline = true; + _loc1_.addChild(this.warText); + this.warText.x = 5; + this.warText.y = _loc10_.y + 5; + var _loc11_:TextFormat = new TextFormat(); + _loc11_.leading = 3; + this.warText.defaultTextFormat = _loc11_; + var _loc12_:UITitleBg = new UITitleBg("出征类型",_loc2_.width); + _loc2_.addChild(_loc12_); + _loc12_.x = int(_loc2_.width / 2 - _loc12_.width / 2); + this.radio1 = new UIRadioBtn(); + _loc2_.addChild(this.radio1); + this.radio1.x = 10; + this.radio1.y = 30; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(10852210,260); + _loc13_.text = "讨伐(胜利可获取目标城池的铜币和各项资源)"; + _loc2_.addChild(_loc13_); + _loc13_.x = 30; + _loc13_.y = this.radio1.y + 2; + this.radio2 = new UIRadioBtn(); + _loc2_.addChild(this.radio2); + this.radio2.x = 10; + this.radio2.y = this.radio1.y + 27; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(10852210,260); + _loc14_.text = "单挑(胜利可以获得武将功勋和道具)"; + _loc2_.addChild(_loc14_); + _loc14_.x = _loc13_.x; + _loc14_.y = this.radio2.y + 2; + this.radio3 = new UIRadioBtn(); + _loc2_.addChild(this.radio3); + this.radio3.x = 10; + this.radio3.y = this.radio2.y + 27; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(10852210,260); + _loc15_.text = "派遣(胜利可以获取目标城池的铜币和各项资源)"; + _loc2_.addChild(_loc15_); + _loc15_.x = _loc13_.x; + _loc15_.y = this.radio3.y + 2; + this.radio4 = new UIRadioBtn(); + _loc2_.addChild(this.radio4); + this.radio4.x = 10; + this.radio4.y = this.radio3.y + 27; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(10852210,260); + _loc16_.text = "摧毁(胜利可以获取目标城池的铜币和各项资源)"; + _loc2_.addChild(_loc16_); + _loc16_.x = _loc13_.x; + _loc16_.y = this.radio4.y + 2; + this.radio1.onClick = this.typeClick; + this.radio2.onClick = this.typeClick; + this.radio3.onClick = this.typeClick; + this.radio4.onClick = this.typeClick; + var _loc17_:Sprite = PublicMethod.getTrLine(285); + _loc2_.addChild(_loc17_); + _loc17_.x = 5; + _loc17_.y = _loc10_.y; + this.txtPvp = PublicMethod.getTextFieldWithFillter(10852210,270); + _loc2_.addChild(this.txtPvp); + this.txtPvp.x = 5; + this.txtPvp.y = _loc17_.y + 5; + this.txtPvp.text = "今日剩余免费攻打玩家次数"; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(10852210,280); + _loc18_.height = 34; + _loc18_.wordWrap = true; + _loc18_.multiline = true; + _loc2_.addChild(_loc18_); + _loc18_.defaultTextFormat = _loc11_; + _loc18_.x = 5; + _loc18_.y = this.txtPvp.y + 16; + _loc18_.text = "对玩家讨伐或摧毁会消耗出征次数,次数为0后需要消耗出师令"; + var _loc19_:UITitleBg = new UITitleBg("出征配置",_loc3_.width); + _loc3_.addChild(_loc19_); + _loc19_.x = int(_loc3_.width / 2 - _loc19_.width / 2); + var _loc20_:Array = ["出征顺序","武将","等级","职业","健康度","统兵","统兵数量","状态","操作"]; + var _loc21_:Array = [60,80,80,80,60,70,70,60,65]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(5,_loc20_,_loc21_); + _loc3_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 27; + this.heroListMc = new Vector.(); + var _loc22_:int = 0; + while(_loc22_ < 5) + { + _loc23_ = new HeroItemMc(); + this.tableMc.addChild(_loc23_); + _loc23_.x = 1; + _loc23_.y = 27 + _loc22_ * 25; + _loc23_.setNums(_loc22_ + 1); + this.heroListMc.push(_loc23_); + _loc23_.addEventListener(MouseEvent.CLICK,this.removeHero,false,0,true); + _loc22_++; + } + this.selectHeroBtn = new UIButton("选择武将",2); + _loc3_.addChild(this.selectHeroBtn); + this.selectHeroBtn.x = 4; + this.selectHeroBtn.y = 180; + this.selectHeroBtn.onClick = this.selectHero; + this.selectArmyBtn = new UIButton("统兵配置",2); + _loc3_.addChild(this.selectArmyBtn); + this.selectArmyBtn.x = this.selectHeroBtn.x + 70; + this.selectArmyBtn.y = this.selectHeroBtn.y; + this.selectArmyBtn.onClick = this.armySet; + this.sendBtn = new UIButton("出 征",2); + _loc3_.addChild(this.sendBtn); + this.sendBtn.x = 560; + this.sendBtn.y = this.selectHeroBtn.y; + this.sendBtn.onClick = this.send; + this.pow_txt = PublicMethod.getTextFieldWithFillter(10852210,200); + _loc3_.addChild(this.pow_txt); + this.pow_txt.x = 150; + this.pow_txt.y = this.selectHeroBtn.y + 4; + this.pow_txt.text = "我方部队战斗力:0"; + this.aimpow_txt = PublicMethod.getTextFieldWithFillter(10852210,200); + _loc3_.addChild(this.aimpow_txt); + this.aimpow_txt.x = 360; + this.aimpow_txt.y = this.selectHeroBtn.y + 4; + this.aimpow_txt.text = "敌方部队战斗力:0"; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(BattleEvent.B_getPveDrop,this.getPveDropSucc); + ConnectService.getInstance().addEventListener(BattleEvent.B_armyOutBattle,this.sendSucc); + Utils.g_events.addEventListener(DevEvent.RemainPvpNum_UPDATE,this.getRemainNumSucc); + Utils.g_events.addEventListener(DevEvent.CHANGEARMY,this.changeArmySucc); + ConnectService.getInstance().addEventListener(BattleEvent.B_getPvpTime,this.getPveTimeSucc); + ConnectService.getInstance().addEventListener(HeroEvent.HERO_getHeroCombat,this.getCombatSucc); + ConnectService.getInstance().battleService.remainPvpNum(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(BattleEvent.B_getPvpTime,this.getPveTimeSucc); + ConnectService.getInstance().removeEventListener(BattleEvent.B_getPveDrop,this.getPveDropSucc); + ConnectService.getInstance().removeEventListener(BattleEvent.B_armyOutBattle,this.sendSucc); + Utils.g_events.removeEventListener(DevEvent.RemainPvpNum_UPDATE,this.getRemainNumSucc); + Utils.g_events.removeEventListener(DevEvent.CHANGEARMY,this.changeArmySucc); + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_getHeroCombat,this.getCombatSucc); + if(Boolean(this.selectView) && contains(this.selectView)) + { + removeChild(this.selectView); + } + } + + private function getRemainNumSucc(param1:DevEvent) : void + { + var _loc2_:int = MemeberShip.getRemainPvpNum(); + if(_loc2_ < 0) + { + _loc2_ = 0; + } + this.txtPvp.htmlText = "今日剩余免费攻打玩家次数 " + _loc2_ + ""; + } + + public function typeClick(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc2_:UIRadioBtn = param1.currentTarget as UIRadioBtn; + if(this.lastClickBtn == null) + { + this.lastClickBtn = this.radio1; + } + else + { + this.lastClickBtn.setUnSelect(); + } + this.lastClickBtn = _loc2_; + this.lastClickBtn.setSelect(); + this.warText.text = ""; + this.pow_txt.text = ""; + this.aimpow_txt.text = ""; + this.time_txt.text = ""; + this.setAimCombat(); + this.setMyArmyCombat(); + this._curStage = "combat"; + if(this.lastClickBtn == this.radio1) + { + this._curStage = "combat"; + this.selnum = 5; + } + if(this.lastClickBtn == this.radio2) + { + this._curStage = "fight"; + this.selnum = 1; + } + if(this.lastClickBtn == this.radio3) + { + this._curStage = ""; + this.warText.text = "将部队派遣至盟友城池,协助守城,可在军情中召回军队。只能向盟友城池派遣。"; + this.selnum = 5; + } + if(this.lastClickBtn == this.radio4) + { + this.selnum = 5; + this.warText.text = "摧毁模式会使目标繁荣度受损,与讨伐模式相比出征时间特别长!"; + } + if(this.currArmyObj) + { + this.time_txt.text = Utils.formatSeconds(this.currArmyObj.time); + if(int(this.currArmyObj.time) > 1200) + { + this.time_txt.text = Utils.formatSeconds(1200); + } + } + if(this.targetCasId < 0) + { + if(this.lastClickBtn == this.radio1 || this.lastClickBtn == this.radio2) + { + _loc3_ = this.x_txt.getTextNum(); + _loc4_ = this.y_txt.getTextNum(); + if(_loc3_ > 0 && _loc3_ > 0) + { + ConnectService.getInstance().battleService.getPveDrop(_loc3_,_loc4_); + } + } + } + } + + private function getPveDropSucc(param1:BattleEvent) : void + { + var _loc2_:Object = param1.armyObj; + if(_loc2_ == null) + { + return; + } + var _loc3_:String = ""; + if(this._curStage == "combat") + { + if(_loc2_.combatExp != "" && _loc2_.combatExp != null) + { + _loc3_ = "胜利后 "; + _loc3_ += "可获得经验:" + _loc2_.combatExp; + } + if(_loc2_.combatItem != "" && _loc2_.combatItem != null) + { + _loc3_ += "可获得道具:" + _loc2_.combatItem; + } + else + { + _loc3_ += "可获得道具:无"; + } + } + else if(this._curStage == "fight") + { + if(_loc2_.fightExp != "" && _loc2_.fightExp != null) + { + _loc3_ = "胜利后"; + _loc3_ += "可获得:" + _loc2_.fightExp; + } + if(_loc2_.fightItem != "" && _loc2_.fightItem != null) + { + _loc3_ += "可获得道具:" + _loc2_.fightItem; + } + else + { + _loc3_ += "可获得道具:无"; + } + } + this.warText.htmlText = _loc3_; + } + + private function selectMonster(param1:MouseEvent) : void + { + this.selectView = SelectView.getInstance(); + this.selectView.parentView = this; + this.selectView.onSeletF = this.onSelect; + addChild(this.selectView); + } + + public function onSelect(param1:Object) : void + { + this.currArmyObj = param1; + this.setData(); + } + + private function setData() : void + { + if(this.currArmyObj.userName) + { + this.aim_txt.text = this.currArmyObj.userName; + } + else + { + this.aim_txt.text = this.currArmyObj.npcName; + } + this.x_txt.setTextNum(int(this.currArmyObj.posX)); + this.y_txt.setTextNum(int(this.currArmyObj.posY)); + if(this.currArmyObj.pveCastleId) + { + this.targetCasId = this.currArmyObj.pveCastleId; + } + if(this.lastClickBtn) + { + this.lastClickBtn.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + } + + private function setAimCombat() : void + { + if(this.lastClickBtn == this.radio1) + { + if(this.currArmyObj) + { + this.aimpow_txt.htmlText = "敌方部队战斗力:" + Math.round(this.currArmyObj.combatPower) + ""; + } + else + { + this.aimpow_txt.text = "敌方部队战斗力:0"; + } + return; + } + if(this.lastClickBtn == this.radio2) + { + if(this.currArmyObj) + { + this.aimpow_txt.htmlText = "敌方武将单挑力:" + Math.round(this.currArmyObj.fightPower) + ""; + } + else + { + this.aimpow_txt.text = "敌方武将单挑力:0"; + } + return; + } + this.aimpow_txt.text = "敌方部队战斗力:0"; + } + + private function setMyArmyCombat() : void + { + if(this.lastClickBtn == this.radio1 || this.lastClickBtn == this.radio3 || this.lastClickBtn == this.radio4) + { + this.pow_txt.htmlText = "我方部队战斗力:" + Math.round(this._heroComboat) + ""; + return; + } + if(this.lastClickBtn == this.radio2) + { + this.pow_txt.htmlText = "我方武将单挑力:" + Math.round(this._fightComboat) + ""; + return; + } + this.pow_txt.text = "我方部队战斗力:0"; + } + + private function armySet(param1:MouseEvent) : void + { + var _loc2_:ArmySetUI = ArmySetUI.getInstance(); + _loc2_.open(this); + _loc2_.x = 0; + _loc2_.y = 0; + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance(); + _loc2_.setSelectheroArr(this.heroListArr); + addChild(_loc2_); + _loc2_.x = 0; + _loc2_.y = 0; + _loc2_.backFunc = this.selectHeroList; + } + + public function selectHeroList(param1:Vector.) : void + { + var _loc3_:Object = null; + this._heroComboat = 0; + this._fightComboat = 0; + this.wallHeroList = new Object(); + this.heroListArr = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + if(param1.length > _loc2_) + { + _loc3_ = new Object(); + _loc3_.showName = param1[_loc2_].showName; + _loc3_.level = param1[_loc2_].level; + _loc3_.career = param1[_loc2_].careerName; + _loc3_.hpColor = param1[_loc2_].hpColor; + _loc3_.hpStatus = param1[_loc2_].hpStatus; + _loc3_.hpStatusView = param1[_loc2_].hpStatusView; + _loc3_.armyName = param1[_loc2_].armyName; + _loc3_.armyNum = param1[_loc2_].armyNum; + _loc3_.actionStatusChn = param1[_loc2_].actionStatusChn; + _loc3_.heroId = param1[_loc2_].heroId; + this._heroComboat += param1[_loc2_].combatPower; + this._fightComboat += param1[_loc2_].fightPower; + this.wallHeroList["index_hero" + (_loc2_ + 1)] = _loc3_; + this.heroListArr.push(_loc3_.heroId); + } + else + { + this.wallHeroList["index_hero" + (_loc2_ + 1)] = null; + } + _loc2_++; + } + this.setHeroValue(); + } + + private function setHeroValue() : void + { + var _loc1_:* = undefined; + for(_loc1_ in this.heroListMc) + { + if(this.heroListArr.length > _loc1_) + { + this.heroListMc[_loc1_].setHero(this.getHeroObjByHeroId(this.heroListArr[_loc1_])); + } + else + { + this.heroListMc[_loc1_].setHero(null); + } + } + this.getCurrCombat(); + } + + private function getCurrCombat() : void + { + var _loc2_:int = 0; + if(this.heroListArr.length == 0) + { + this._fightComboat = 0; + this._heroComboat = 0; + this.setMyArmyCombat(); + return; + } + var _loc1_:Array = new Array(); + for each(_loc2_ in this.heroListArr) + { + _loc1_.push(_loc2_); + } + ConnectService.getInstance().heroService.getHeroCombat(_loc1_); + } + + private function getCombatSucc(param1:HeroEvent) : void + { + var _loc2_:Object = param1.heroObj; + this._fightComboat = _loc2_.fightPower; + this._heroComboat = _loc2_.combatPower; + this.setMyArmyCombat(); + } + + private function removeHero(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc2_:HeroItemMc = param1.currentTarget as HeroItemMc; + if(_loc2_.getHero()) + { + for(_loc3_ in this.heroListArr) + { + if(this.heroListArr[_loc3_] == _loc2_.getHero().heroId) + { + this.heroListArr.splice(_loc3_,1); + _loc2_.setHero(null); + break; + } + } + } + this.setHeroValue(); + } + + private function getHeroObjByHeroId(param1:int) : Object + { + if(this.wallHeroList == null) + { + return null; + } + if(Boolean(this.wallHeroList.index_hero1) && this.wallHeroList.index_hero1.heroId == param1) + { + return this.wallHeroList.index_hero1; + } + if(Boolean(this.wallHeroList.index_hero2) && this.wallHeroList.index_hero2.heroId == param1) + { + return this.wallHeroList.index_hero2; + } + if(Boolean(this.wallHeroList.index_hero3) && this.wallHeroList.index_hero3.heroId == param1) + { + return this.wallHeroList.index_hero3; + } + if(Boolean(this.wallHeroList.index_hero4) && this.wallHeroList.index_hero4.heroId == param1) + { + return this.wallHeroList.index_hero4; + } + if(Boolean(this.wallHeroList.index_hero5) && this.wallHeroList.index_hero5.heroId == param1) + { + return this.wallHeroList.index_hero5; + } + return null; + } + + private function changeArmySucc(param1:DevEvent) : void + { + var _loc3_:Object = null; + var _loc4_:Object = null; + var _loc2_:Array = param1.getParameter() as Array; + for each(_loc3_ in _loc2_) + { + _loc4_ = this.getHeroObjByHeroId(_loc3_.heroId); + if(_loc4_) + { + _loc4_.armyNum = _loc3_.armyNum; + _loc4_.armyName = _loc3_.armyName; + } + } + this.setHeroValue(); + } + + private function send(param1:MouseEvent) : void + { + var _loc5_:* = undefined; + if(this.x_txt.getTextNum() <= 0 || this.y_txt.getTextNum() <= 0) + { + MessageBoxUI.getInstance().addMessage("请选择出征目标!"); + return; + } + var _loc2_:int = 0; + var _loc3_:Object = new Object(); + _loc3_.posX = this.x_txt.getTextNum().toString(); + _loc3_.posY = this.y_txt.getTextNum().toString(); + _loc3_.pvpType = this.getType(); + var _loc4_:Array = new Array(); + for(_loc5_ in this.heroListMc) + { + if(this.heroListMc[_loc5_].getHero() != null) + { + _loc4_.push(this.heroListMc[_loc5_].getHero().heroId); + } + } + if(_loc4_.length == 0) + { + MessageBoxUI.getInstance().addMessage("必须派遣至少一个武将"); + return; + } + if(_loc3_.pvpType == "PVE_FIGTH" && _loc4_.length > 1) + { + MessageBoxUI.getInstance().addMessage("单挑必须派遣一个武将"); + return; + } + _loc3_.atkHeroIdList = _loc4_; + this.s_obj = _loc3_; + if(MemeberShip.getRemainPvpNum() <= 0) + { + if(this.currArmyObj == null) + { + MessageBoxUI.getInstance().confirmMsg("由于本日的免费出征次数已用尽,本次出征消耗1个出师令",this.onSubmit); + return; + } + } + this.onSubmit(); + } + + private function onSubmit() : void + { + ConnectService.getInstance().battleService.armyOutBattle(this.s_obj); + } + + private function sendSucc(param1:BattleEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + var _loc2_:MilitaryView = MilitaryView.getInstance(); + _loc2_.setStartPage(0); + _loc2_.show(); + } + + private function getType() : String + { + var _loc1_:String = ""; + if(this.lastClickBtn == this.radio1) + { + _loc1_ = "PVP_ROB"; + } + else if(this.lastClickBtn == this.radio2) + { + _loc1_ = "PVE_FIGTH"; + } + else if(this.lastClickBtn == this.radio3) + { + _loc1_ = "COUNTRY_BATTLE_FIELD"; + } + else if(this.lastClickBtn == this.radio4) + { + _loc1_ = "PVP_SIEGE"; + } + return _loc1_; + } + + public function sendArmy(param1:String, param2:int, param3:int) : void + { + this.aim_txt.text = param1; + this.x_txt.setTextNum(param2); + this.y_txt.setTextNum(param3); + if(this.lastClickBtn) + { + this.lastClickBtn.setUnSelect(); + } + this.lastClickBtn = this.radio3; + this.lastClickBtn.setSelect(); + this.lastClickBtn.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + this.getArmyOutTime(param2,param3,2); + } + + public function killArmy(param1:String, param2:int, param3:int) : void + { + this.currArmyObj = null; + this.aim_txt.text = param1; + this.x_txt.setTextNum(param2); + this.y_txt.setTextNum(param3); + if(this.lastClickBtn) + { + this.lastClickBtn.setUnSelect(); + } + this.lastClickBtn = this.radio1; + this.lastClickBtn.setSelect(); + this.lastClickBtn.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + this.getArmyOutTime(param2,param3,1); + } + + private function getArmyOutTime(param1:int, param2:int, param3:int) : void + { + ConnectService.getInstance().battleService.getPvpTime(param1,param2,param3); + } + + private function getPveTimeSucc(param1:BattleEvent) : void + { + var _loc3_:int = 0; + var _loc2_:Object = param1.armyObj; + if(_loc2_ != null) + { + _loc3_ = _loc2_ as int; + this.time_txt.text = Utils.formatSeconds(_loc3_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/training/mc/HeroItemMc.as b/flash_decompiled/com/view/ui/training/mc/HeroItemMc.as new file mode 100644 index 0000000..6657593 --- /dev/null +++ b/flash_decompiled/com/view/ui/training/mc/HeroItemMc.as @@ -0,0 +1,130 @@ +package com.view.ui.training.mc +{ + import com.common.PublicMethod; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class HeroItemMc extends Sprite + { + + private var heroObj:Object; + + private var centerCss:TextFormat; + + private var numsText:TextField; + + private var heroName:TextField; + + private var heroLevel:TextField; + + private var careerName:TextField; + + private var hpStatus:TextField; + + private var armyName:TextField; + + private var armyNums:TextField; + + private var heroStatus:TextField; + + private var removeBtn:UISmallBtn; + + public function HeroItemMc() + { + super(); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.numsText = PublicMethod.getTextFieldWithFillter(16777215,60); + addChild(this.numsText); + this.numsText.y = 3; + this.numsText.text = ""; + this.numsText.visible = false; + this.heroName = PublicMethod.getTextFieldWithFillter(16777215,80); + addChild(this.heroName); + this.heroName.y = this.numsText.y; + this.heroName.x = this.numsText.x + this.numsText.width; + this.heroLevel = PublicMethod.getTextFieldWithFillter(16777215,80); + addChild(this.heroLevel); + this.heroLevel.y = this.numsText.y; + this.heroLevel.x = this.heroName.x + this.heroName.width; + this.careerName = PublicMethod.getTextFieldWithFillter(16777215,80); + addChild(this.careerName); + this.careerName.y = this.numsText.y; + this.careerName.x = this.heroLevel.x + this.heroLevel.width; + this.hpStatus = PublicMethod.getTextFieldWithFillter(16777215,60); + addChild(this.hpStatus); + this.hpStatus.y = this.numsText.y; + this.hpStatus.x = this.careerName.x + this.careerName.width; + this.armyName = PublicMethod.getTextFieldWithFillter(16777215,70); + addChild(this.armyName); + this.armyName.y = this.numsText.y; + this.armyName.x = this.hpStatus.x + this.hpStatus.width; + this.armyNums = PublicMethod.getTextFieldWithFillter(16777215,70); + addChild(this.armyNums); + this.armyNums.y = this.numsText.y; + this.armyNums.x = this.armyName.x + this.armyName.width; + this.heroStatus = PublicMethod.getTextFieldWithFillter(16777215,60); + addChild(this.heroStatus); + this.heroStatus.y = this.numsText.y; + this.heroStatus.x = this.armyNums.x + this.armyNums.width; + this.removeBtn = new UISmallBtn("移 除",2); + this.removeBtn.visible = false; + addChild(this.removeBtn); + this.removeBtn.x = this.heroStatus.x + this.heroStatus.width + 4; + this.removeBtn.y = 2; + } + + public function setNums(param1:int) : void + { + this.numsText.text = param1.toString(); + this.numsText.setTextFormat(this.centerCss); + } + + public function setHero(param1:Object) : void + { + if(this.heroObj == null && param1 == null) + { + return; + } + this.heroObj = param1; + if(this.heroObj == null) + { + this.numsText.visible = false; + this.removeBtn.visible = false; + this.heroName.text = ""; + this.heroLevel.text = ""; + this.careerName.text = ""; + this.hpStatus.text = ""; + this.armyName.text = ""; + this.armyNums.text = ""; + this.heroStatus.text = ""; + } + else + { + this.numsText.visible = true; + this.removeBtn.visible = true; + this.heroName.htmlText = this.heroObj.showName; + this.heroName.setTextFormat(this.centerCss); + this.heroLevel.text = this.heroObj.level.toString(); + this.heroLevel.setTextFormat(this.centerCss); + this.careerName.text = this.heroObj.career; + this.careerName.setTextFormat(this.centerCss); + this.hpStatus.htmlText = "" + this.heroObj.hpStatus.toString() + " " + this.heroObj.hpStatusView + ""; + this.hpStatus.setTextFormat(this.centerCss); + this.armyName.text = this.heroObj.armyName; + this.armyName.setTextFormat(this.centerCss); + this.armyNums.text = this.heroObj.armyNum; + this.armyNums.setTextFormat(this.centerCss); + this.heroStatus.text = this.heroObj.actionStatusChn; + this.heroStatus.setTextFormat(this.centerCss); + } + } + + public function getHero() : Object + { + return this.heroObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/training/mc/MonsterItem.as b/flash_decompiled/com/view/ui/training/mc/MonsterItem.as new file mode 100644 index 0000000..acc37b3 --- /dev/null +++ b/flash_decompiled/com/view/ui/training/mc/MonsterItem.as @@ -0,0 +1,176 @@ +package com.view.ui.training.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MonsterItem extends Sprite + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var radioBtn:UIRadioBtn; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var value6:TextField; + + private var css:TextFormat; + + public var onClickF:Function; + + public var obj:Object; + + private var isSelect:Boolean; + + public function MonsterItem() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,447,24); + this.bg1.alpha = 0.2; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,447,24); + this.bg2.alpha = 0.3; + addChild(this.bg1); + addChild(this.bg2); + this.bg1.visible = false; + this.bg2.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.CLICK,this.mouseClick); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 2; + this.radioBtn.y = 2; + this.value1 = PublicMethod.getTextFieldWithFillter(16777215,86); + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,47); + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,101); + this.value4 = PublicMethod.getTextFieldWithFillter(16777215,47); + this.value5 = PublicMethod.getTextFieldWithFillter(16777215,47); + this.value6 = PublicMethod.getTextFieldWithFillter(16777215,100); + addChild(this.value1); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + addChild(this.value6); + this.value1.x = 24; + this.value1.y = 2; + this.value2.x = this.value1.x + this.value1.width; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.value6.x = this.value5.x + this.value5.width; + this.value6.y = this.value1.y; + this.radioBtn.visible = false; + this.css = PublicMethod.getCenterTextFormat(); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelect) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelect) + { + this.bg1.visible = true; + } + } + + private function mouseClick(param1:MouseEvent) : void + { + if(this.onClickF != null) + { + this.onClickF(this); + } + } + + public function setSelect(param1:Boolean) : void + { + this.isSelect = param1; + if(param1) + { + this.radioBtn.setSelect(); + } + else + { + this.radioBtn.setUnSelect(); + } + this.bg2.visible = this.isSelect; + this.bg1.visible = false; + } + + public function setDate(param1:Object) : void + { + this.obj = param1; + if(this.obj) + { + this.radioBtn.visible = true; + this.radioBtn.setUnSelect(); + this.value1.text = this.obj.npcName; + this.value2.text = this.obj.level; + this.value3.text = "(" + this.obj.posX + "," + this.obj.posY + ")"; + if(this.obj.combatFlag == 1) + { + this.value4.text = "成功"; + } + else + { + this.value4.text = "未"; + } + if(this.obj.figthFlag == 1) + { + this.value5.text = "成功"; + } + else + { + this.value5.text = "未"; + } + this.value6.text = PublicMethod.getTime(this.obj.time); + this.value1.setTextFormat(this.css); + this.value2.setTextFormat(this.css); + this.value3.setTextFormat(this.css); + this.value4.setTextFormat(this.css); + this.value5.setTextFormat(this.css); + this.value6.setTextFormat(this.css); + } + else + { + this.isSelect = false; + this.bg2.visible = false; + this.bg1.visible = false; + this.radioBtn.visible = false; + this.radioBtn.setSelect(); + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.value6.text = ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/training/mc/PlayerItem.as b/flash_decompiled/com/view/ui/training/mc/PlayerItem.as new file mode 100644 index 0000000..25f0f53 --- /dev/null +++ b/flash_decompiled/com/view/ui/training/mc/PlayerItem.as @@ -0,0 +1,135 @@ +package com.view.ui.training.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class PlayerItem extends Sprite + { + + private var bg1:Sprite; + + private var bg2:Sprite; + + private var radioBtn:UIRadioBtn; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var css:TextFormat; + + public var onClickF:Function; + + public var obj:Object; + + private var isSelect:Boolean; + + public function PlayerItem() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,447,24); + this.bg1.alpha = 0.2; + this.bg2 = PublicMethod.createShape(UIConfig.selectBgColor,447,24); + this.bg2.alpha = 0.3; + addChild(this.bg1); + addChild(this.bg2); + this.bg1.visible = false; + this.bg2.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + addEventListener(MouseEvent.CLICK,this.mouseClick); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 2; + this.radioBtn.y = 2; + this.value1 = PublicMethod.getTextFieldWithFillter(16777215,112); + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,142); + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,170); + addChild(this.value1); + addChild(this.value2); + addChild(this.value3); + this.value1.x = 24; + this.value1.y = 2; + this.value2.x = this.value1.x + this.value1.width; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.radioBtn.visible = false; + this.css = PublicMethod.getCenterTextFormat(); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelect) + { + this.bg1.visible = false; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(Boolean(this.obj) && !this.isSelect) + { + this.bg1.visible = true; + } + } + + private function mouseClick(param1:MouseEvent) : void + { + if(this.onClickF != null) + { + this.onClickF(this); + } + } + + public function setSelect(param1:Boolean) : void + { + this.isSelect = param1; + if(param1) + { + this.radioBtn.setSelect(); + } + else + { + this.radioBtn.setUnSelect(); + } + this.bg2.visible = this.isSelect; + this.bg1.visible = false; + } + + public function setDate(param1:Object) : void + { + this.obj = param1; + if(this.obj) + { + this.radioBtn.visible = true; + this.radioBtn.setUnSelect(); + this.value1.text = this.obj.userName; + this.value2.text = "(" + this.obj.posX + "," + this.obj.posY + ")"; + this.value3.text = PublicMethod.getTime(this.obj.time); + this.value1.setTextFormat(this.css); + this.value2.setTextFormat(this.css); + this.value3.setTextFormat(this.css); + } + else + { + this.isSelect = false; + this.radioBtn.setSelect(); + this.bg2.visible = false; + this.bg1.visible = false; + this.radioBtn.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/AddPointUI.as b/flash_decompiled/com/view/ui/user/AddPointUI.as new file mode 100644 index 0000000..3a60424 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/AddPointUI.as @@ -0,0 +1,109 @@ +package com.view.ui.user +{ + import com.common.PublicMethod; + import com.control.ConnectService; + 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 flash.events.MouseEvent; + import flash.text.TextField; + + public class AddPointUI extends UIWindowBg + { + + private var maxPointNums:TextField; + + private var input:UINumInputText; + + private var type:int; + + private var maxPoint:int; + + public function AddPointUI() + { + var _loc5_:UIButton = null; + super(); + initSize(115,140); + loadTitle(UITitleConfig.title_fenpeishuxing); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(285,100); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,110); + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + _loc1_.addChild(_loc2_); + _loc2_.x = 25; + _loc2_.y = 20; + _loc2_.text = "(您可以在这里批量分配属性点)"; + _loc1_.addChild(_loc3_); + _loc3_.x = 25; + _loc3_.y = _loc2_.y + 30; + _loc3_.text = "可分配的最大点数:"; + _loc1_.addChild(_loc4_); + _loc4_.x = 25; + _loc4_.y = _loc3_.y + 30; + _loc4_.text = "请输入分配的武力点数:"; + this.input = new UINumInputText(80); + this.input.hiddenBtn(); + _loc1_.addChild(this.input); + this.input.x = _loc4_.x + _loc4_.width; + this.input.y = _loc4_.y - 3; + this.maxPointNums = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,50); + _loc1_.addChild(this.maxPointNums); + this.maxPointNums.x = _loc3_.x + _loc3_.width; + this.maxPointNums.y = _loc3_.y; + _loc5_ = new UIButton("确 定",2,10); + var _loc6_:UIButton = new UIButton("取 消",2,10); + bg1.addChild(_loc5_); + bg1.addChild(_loc6_); + _loc5_.x = 80; + _loc5_.y = 130; + _loc6_.x = _loc5_.x + 90; + _loc6_.y = _loc5_.y; + _loc6_.onClick = closeSelf; + _loc5_.onClick = this.addPoint; + } + + public function setType(param1:int) : void + { + this.type = param1; + } + + public function setMaxPoint(param1:int) : void + { + this.maxPoint = param1; + } + + public function init() : void + { + this.maxPointNums.text = this.maxPoint.toString(); + this.input.setTextNum(1); + this.input.setMaxNum(this.maxPoint); + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function addPoint(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ > 0 && _loc2_ <= this.maxPoint) + { + ConnectService.getInstance().userService.addPropertyPoint(_loc2_,this.type); + this.closeUI(null); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/BuildLineMc.as b/flash_decompiled/com/view/ui/user/BuildLineMc.as new file mode 100644 index 0000000..9bee3dd --- /dev/null +++ b/flash_decompiled/com/view/ui/user/BuildLineMc.as @@ -0,0 +1,71 @@ +package com.view.ui.user +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class BuildLineMc extends Sprite + { + + private var bg:Sprite; + + private var obj:Object; + + private var buildName:TextField; + + private var buildLevel:TextField; + + private var css:TextFormat; + + public function BuildLineMc() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,220,24); + addChild(this.bg); + this.bg.alpha = 0; + var _loc1_:Sprite = PublicMethod.getTrLine(220); + addChild(_loc1_); + _loc1_.y = 24; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.buildName = PublicMethod.getTextFieldWithFillter(16777215,116); + this.buildLevel = PublicMethod.getTextFieldWithFillter(16777215,80); + addChild(this.buildName); + addChild(this.buildLevel); + this.buildName.x = 10; + this.buildName.y = 2; + this.buildLevel.x = this.buildName.x + this.buildName.width; + this.buildLevel.y = 2; + this.css = PublicMethod.getCenterTextFormat(); + } + + public function setData(param1:Object) : void + { + this.obj = param1; + this.buildName.text = this.obj.name; + this.buildLevel.text = this.obj.level; + this.buildName.setTextFormat(this.css); + this.buildLevel.setTextFormat(this.css); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.alpha = 0; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj) + { + this.bg.alpha = 0.2; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/CastleMc.as b/flash_decompiled/com/view/ui/user/CastleMc.as new file mode 100644 index 0000000..0861bc6 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/CastleMc.as @@ -0,0 +1,147 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.data.DataModoule; + import com.view.tip.TipTitle; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class CastleMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var bg:Sprite; + + private var buildText:TextField; + + private var nums:int; + + private var isSelect:Boolean; + + private var castlemc:MovieClip; + + public var casId:int; + + private var tip:TipTitle; + + public function CastleMc(param1:int) + { + super(); + this.nums = param1; + this.isSelect = false; + this.bg = PublicMethod.createShape(16777215,72,72); + addChild(this.bg); + this.bg.alpha = 0; + this.buildText = PublicMethod.getTextField(16763749,70); + this.buildText.text = "点击建造"; + this.buildText.setTextFormat(PublicMethod.getCenterTextFormat()); + this.buildText.y = 26; + } + + public function getCastleMc(param1:String) : void + { + if(this.castlemc) + { + return; + } + if(this.tip) + { + this.tip.destroyTip(); + this.tip = null; + } + if(param1 == "main") + { + this.castlemc = this.face.getMovieClip(ClassConfig.build_castle_main); + } + if(param1 == "military") + { + this.castlemc = this.face.getMovieClip(ClassConfig.build_castle_mil); + } + if(param1 == "economic") + { + this.castlemc = this.face.getMovieClip(ClassConfig.build_castle_eco); + } + this.castlemc.buttonMode = true; + addChild(this.castlemc); + this.castlemc.gotoAndStop(1); + this.castlemc.addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + this.castlemc.addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + } + + public function setSelect() : void + { + if(this.castlemc) + { + this.isSelect = true; + this.castlemc.gotoAndStop(2); + } + } + + public function setUnSelect() : void + { + if(this.castlemc) + { + this.isSelect = false; + this.castlemc.gotoAndStop(1); + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(!this.isSelect && Boolean(this.castlemc)) + { + this.castlemc.gotoAndStop(2); + } + } + + private function mouseOut(param1:MouseEvent) : void + { + if(!this.isSelect && Boolean(this.castlemc)) + { + this.castlemc.gotoAndStop(1); + } + } + + public function getEmptyCastle() : void + { + var _loc2_:int = 0; + var _loc1_:int = DataModoule.getInstance().userMgr.castle.casLv; + switch(this.nums) + { + case 1: + _loc2_ = 4; + break; + case 2: + _loc2_ = 6; + break; + case 3: + _loc2_ = 8; + break; + case 4: + _loc2_ = 11; + } + if(_loc1_ >= _loc2_) + { + if(!contains(this.buildText)) + { + addChild(this.buildText); + this.bg.buttonMode = true; + if(this.tip) + { + this.tip.destroyTip(); + } + } + } + else if(this.tip == null) + { + this.tip = new TipTitle(this,this.face.stage,this.face.tip_bg,{"titletext":"城池等级达到" + _loc2_ + "级的时候可以建造"}); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/ChangeCountryUI.as b/flash_decompiled/com/view/ui/user/ChangeCountryUI.as new file mode 100644 index 0000000..14b4e53 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/ChangeCountryUI.as @@ -0,0 +1,266 @@ +package com.view.ui.user +{ + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.newdata.user.NewUserData; + import com.utils.Utils; + 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.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.external.ExternalInterface; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class ChangeCountryUI extends UIWindowBg + { + + private var bg:Sprite; + + private var changeBtn:UIButton; + + private var m_countryArr:Array; + + private var time_txt:TextField; + + private var need_txt:TextField; + + private var m_lastMc:MovieClip; + + private var countryMcArr:Array; + + private var myCountry:MovieClip; + + private var time:int; + + private var timer:Timer; + + public function ChangeCountryUI() + { + var _loc4_:TextField = null; + var _loc14_:MovieClip = null; + super(); + initSize(115,250); + loadTitle(UITitleConfig.title_zhuanhuanguojia); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(285,222); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc2_.text = "当前国家:"; + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 20; + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc3_.text = "冷却时间:"; + _loc1_.addChild(_loc3_); + _loc3_.x = 140; + _loc3_.y = _loc2_.y; + this.time_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc1_.addChild(this.time_txt); + this.time_txt.x = _loc3_.x + _loc3_.width; + this.time_txt.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc4_.text = "可转国家:"; + _loc1_.addChild(_loc4_); + _loc4_.x = _loc2_.x; + _loc4_.y = _loc2_.y + 50; + this.myCountry = face.getMovieClip(ClassConfig.ui_country); + _loc1_.addChild(this.myCountry); + this.myCountry.x = 69; + this.myCountry.y = _loc2_.y - 10; + this.myCountry.gotoAndStop(1); + this.m_countryArr = CommonData.countryArr; + var _loc5_:int = 0; + while(_loc5_ < this.m_countryArr.length) + { + if(this.m_countryArr[_loc5_] == NewUserData.getUser().countryId) + { + this.m_countryArr.splice(_loc5_,1); + break; + } + _loc5_++; + } + var _loc6_:int = 0; + this.countryMcArr = new Array(); + while(_loc6_ < this.m_countryArr.length) + { + _loc14_ = face.getMovieClip(ClassConfig.ui_country); + _loc1_.addChild(_loc14_); + _loc14_.x = 69 + _loc6_ * 33; + _loc14_.y = _loc4_.y - 10; + _loc14_.gotoAndStop(this.m_countryArr[_loc6_]); + _loc14_.addEventListener(MouseEvent.CLICK,this.onClick,false,0,true); + this.countryMcArr.push(_loc14_); + _loc14_.buttonMode = true; + _loc6_++; + } + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,165); + _loc7_.text = "转换后城池坐标:随机"; + _loc1_.addChild(_loc7_); + _loc7_.x = _loc4_.x; + _loc7_.y = _loc4_.y + 35; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc8_.text = "转换需求:"; + _loc1_.addChild(_loc8_); + _loc8_.x = _loc7_.x; + _loc8_.y = _loc7_.y + 20; + this.need_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,165); + _loc1_.addChild(this.need_txt); + this.need_txt.x = _loc8_.x + _loc8_.width; + this.need_txt.y = _loc8_.y; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + _loc9_.text = "新手期免费一次"; + _loc1_.addChild(_loc9_); + _loc9_.x = _loc3_.x + 20; + _loc9_.y = _loc8_.y; + var _loc10_:Sprite = PublicMethod.getTrLine(280); + _loc1_.addChild(_loc10_); + _loc10_.x = 5; + _loc10_.y = _loc9_.y + 25; + var _loc11_:String = "转换条件:
1、不能拥有联盟
2、不能拥有出征武将
3、转换国家后当前国家声望为原国家声望的50%"; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,300); + _loc12_.wordWrap = true; + _loc12_.height = 70; + _loc12_.multiline = true; + _loc1_.addChild(_loc12_); + var _loc13_:TextFormat = new TextFormat(); + _loc13_.leading = 4; + _loc12_.defaultTextFormat = _loc13_; + _loc12_.x = _loc8_.x; + _loc12_.y = _loc10_.y + 10; + _loc12_.htmlText = _loc11_; + this.changeBtn = new UIButton("转换国家",2); + bg1.addChild(this.changeBtn); + this.changeBtn.x = 130; + this.changeBtn.y = 248; + this.changeBtn.onClick = this.changeCountry; + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_changeCountryView,this.getViewSucc); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_changeCountry,this.changeSucc); + } + + private function onClick(param1:MouseEvent) : void + { + if(this.m_lastMc) + { + Utils.applyDefault(this.m_lastMc); + } + this.m_lastMc = param1.currentTarget as MovieClip; + Utils.applyGlow(this.m_lastMc,15461201,1); + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + this.stopTime(); + } + } + + public function showView() : void + { + ConnectService.getInstance().castleService.changeCountryView(); + } + + private function getViewSucc(param1:CastleEvent) : void + { + var _loc2_:Object = param1.castleObj; + this.need_txt.text = _loc2_.cash + "元宝"; + var _loc3_:int = int(_loc2_.countryId); + this.myCountry.gotoAndStop(_loc3_); + this.time = _loc2_.time; + this.startTime(); + } + + private function startTime() : void + { + if(this.time > 0) + { + this.changeBtn.setUnEnable(); + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.enterframe); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + else + { + this.changeBtn.setEnable(); + this.time_txt.text = "无"; + } + } + + private function enterframe(param1:TimerEvent) : void + { + --this.time; + this.time_txt.text = PublicMethod.getTime(this.time); + if(this.time < 0) + { + this.changeBtn.setEnable(); + this.time_txt.text = "无"; + } + } + + public function stopTime() : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.enterframe); + this.timer = null; + } + } + + private function changeCountry(param1:MouseEvent) : void + { + if(this.m_lastMc == null) + { + MessageBoxUI.getInstance().addMessage("请选择要转换的国家"); + return; + } + MessageBoxUI.getInstance().confirmMsg("你确定要转换国家吗?确认转换将回到官方首页重新登录",this.configChange); + } + + private function configChange() : void + { + var _loc1_:int = 0; + var _loc2_:* = undefined; + if(this.m_lastMc == null) + { + return; + } + for(_loc2_ in this.countryMcArr) + { + if(this.m_lastMc == this.countryMcArr[_loc2_]) + { + _loc1_ = int(this.m_countryArr[_loc2_]); + break; + } + } + ConnectService.getInstance().castleService.changeCountry(_loc1_); + } + + private function changeSucc(param1:CastleEvent) : void + { + ExternalInterface.call("relogin"); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/EditUserSigUI.as b/flash_decompiled/com/view/ui/user/EditUserSigUI.as new file mode 100644 index 0000000..96c5882 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/EditUserSigUI.as @@ -0,0 +1,71 @@ +package com.view.ui.user +{ + 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.TextFieldType; + + public class EditUserSigUI extends UIWindowBg + { + + private var content:TextField; + + public function EditUserSigUI() + { + var _loc3_:UIButton = null; + var _loc4_:UIButton = null; + super(); + initSize(115,160); + loadTitle(UITitleConfig.title_xiugaiqianming); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(285,125); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.content = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,280); + this.content.mouseEnabled = true; + this.content.type = TextFieldType.INPUT; + this.content.multiline = true; + this.content.wordWrap = true; + this.content.height = 120; + this.content.x = 5; + this.content.y = 5; + _loc1_.addChild(this.content); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,165); + _loc2_.text = "个性签名最多可以输入50字符"; + bg1.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = _loc1_.y + _loc1_.height + 10; + _loc3_ = new UIButton("确 定",2,10); + _loc4_ = new UIButton("取 消",2,10); + bg1.addChild(_loc3_); + bg1.addChild(_loc4_); + _loc3_.x = _loc2_.x + _loc2_.width; + _loc3_.y = _loc2_.y; + _loc4_.x = _loc3_.x + _loc3_.width + 10; + _loc4_.y = _loc2_.y; + _loc4_.onClick = closeSelf; + _loc3_.onClick = this.editEvent; + } + + private function editEvent(param1:MouseEvent) : void + { + var _loc2_:String = this.content.text; + ConnectService.getInstance().userService.updateUserSelfSignature(_loc2_); + closeSelf(null); + } + + public function setContent(param1:String) : void + { + this.content.text = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/JiangHunPage.as b/flash_decompiled/com/view/ui/user/JiangHunPage.as new file mode 100644 index 0000000..3691c0e --- /dev/null +++ b/flash_decompiled/com/view/ui/user/JiangHunPage.as @@ -0,0 +1,553 @@ +package com.view.ui.user +{ + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.data.data.hero.Hero; + import com.events.DevEvent; + import com.newdata.hero.NewHeroData; + import com.utils.Utils; + import com.view.newui.UIBase; + import com.view.newui.UIBorderMc; + import com.view.newui.UIButton1; + import com.view.newui.UILabel; + import com.view.newui.UIWindowBg; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.hero.data.HeroJiangHun; + import com.view.ui.hero.mc.HeroJiangHunMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class JiangHunPage extends UIBase + { + + private var bg2:UIWindowBg; + + private var valueText1:UILabel; + + private var valueText2:UILabel; + + private var valueText3:UILabel; + + private var valueText4:UILabel; + + private var valueText5:UILabel; + + private var valueText6:UILabel; + + private var valueText7:UILabel; + + private var valueText8:UILabel; + + private var valueText9:UILabel; + + private var valueText10:UILabel; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var itemVec:Vector.; + + private var lastText:TextField; + + private var proItem:HeroJiangHunMc; + + private var heroIdList:Vector.; + + public function JiangHunPage() + { + var _loc6_:UILabel = null; + var _loc7_:UILabel = null; + var _loc9_:UILabel = null; + var _loc15_:UIButton1 = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630 + 40,400); + addChild(_loc1_); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(400 + 32,392); + _loc1_.addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = 4; + var _loc2_:UIBorderMc = new UIBorderMc(361); + this.bg2.addChild(_loc2_); + _loc2_.x = 0; + _loc2_.y = 1; + _loc2_.loadTitle(7); + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(190 + 28,222); + _loc1_.addChild(_loc3_); + _loc3_.x = this.bg2.x + this.bg2.width + 3; + _loc3_.y = this.bg2.y; + var _loc4_:UIBorderMc = new UIBorderMc(147); + _loc3_.addChild(_loc4_); + _loc4_.x = 0; + _loc4_.y = 1; + _loc4_.loadTitle(8); + var _loc5_:UILabel = new UILabel(70,10852210); + _loc3_.addChild(_loc5_); + _loc5_.x = 16; + _loc5_.y = 38; + _loc5_.setText("将魂名称:"); + this.valueText1 = new UILabel(130); + _loc3_.addChild(this.valueText1); + this.valueText1.x = 80; + this.valueText1.y = _loc5_.y; + _loc6_ = new UILabel(70,10852210); + _loc3_.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 19; + _loc6_.setText("所附武将:"); + this.valueText2 = new UILabel(130); + _loc3_.addChild(this.valueText2); + this.valueText2.x = this.valueText1.x; + this.valueText2.y = _loc6_.y; + _loc7_ = new UILabel(70,10852210); + _loc3_.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 19; + _loc7_.setText("将魂等级:"); + this.valueText3 = new UILabel(130); + _loc3_.addChild(this.valueText3); + this.valueText3.x = this.valueText1.x; + this.valueText3.y = _loc7_.y; + var _loc8_:UILabel = new UILabel(70,10852210); + _loc3_.addChild(_loc8_); + _loc8_.x = _loc5_.x; + _loc8_.y = _loc7_.y + 19; + _loc8_.setText("最大等级:"); + this.valueText4 = new UILabel(130); + _loc3_.addChild(this.valueText4); + this.valueText4.x = this.valueText1.x; + this.valueText4.y = _loc8_.y; + _loc9_ = new UILabel(70,10852210); + _loc3_.addChild(_loc9_); + _loc9_.x = _loc5_.x; + _loc9_.y = _loc8_.y + 19; + _loc9_.setText("升级所需:"); + this.valueText5 = new UILabel(130); + _loc3_.addChild(this.valueText5); + this.valueText5.x = this.valueText1.x; + this.valueText5.y = _loc9_.y; + var _loc10_:UILabel = new UILabel(70,10852210); + _loc3_.addChild(_loc10_); + _loc10_.x = _loc5_.x; + _loc10_.y = _loc9_.y + 19; + _loc10_.setText("当前拥有:"); + this.valueText6 = new UILabel(130,16711680); + _loc3_.addChild(this.valueText6); + this.valueText6.x = this.valueText1.x; + this.valueText6.y = _loc10_.y; + var _loc11_:UILabel = new UILabel(70,10852210); + _loc3_.addChild(_loc11_); + _loc11_.x = _loc5_.x; + _loc11_.y = _loc10_.y + 19; + _loc11_.setText("将魂属性:"); + this.valueText7 = new UILabel(140); + _loc3_.addChild(this.valueText7); + this.valueText7.x = this.valueText1.x; + this.valueText7.y = _loc11_.y; + this.valueText8 = new UILabel(140); + _loc3_.addChild(this.valueText8); + this.valueText8.x = this.valueText7.x; + this.valueText8.y = this.valueText7.y + 19; + this.valueText9 = new UILabel(140); + _loc3_.addChild(this.valueText9); + this.valueText9.x = this.valueText7.x; + this.valueText9.y = this.valueText8.y + 19; + this.valueText10 = new UILabel(140); + _loc3_.addChild(this.valueText10); + this.valueText10.x = this.valueText7.x; + this.valueText10.y = this.valueText9.y + 19; + var _loc12_:UIWindowBg = new UIWindowBg(); + _loc12_.initThirdPanel(190 + 28,158); + _loc1_.addChild(_loc12_); + _loc12_.x = _loc3_.x; + _loc12_.y = _loc3_.y + _loc3_.height + 2; + var _loc13_:UIBorderMc = new UIBorderMc(147); + _loc12_.addChild(_loc13_); + _loc13_.x = 0; + _loc13_.y = 1; + _loc13_.loadTitle(9); + var _loc14_:UIButton1 = new UIButton1("将魂升级"); + _loc12_.addChild(_loc14_); + _loc14_.x = 20; + _loc14_.y = 45; + _loc14_.onClick = this.levelUpJiangHun; + _loc14_.setUnEnable(); + _loc15_ = new UIButton1("一键30级"); + _loc12_.addChild(_loc15_); + _loc15_.x = _loc14_.x + _loc14_.width + 20; + _loc15_.y = _loc14_.y; + _loc15_.onClick = this.levelUpJiangHun30; + _loc15_.setUnEnable(); + var _loc16_:UIButton1 = new UIButton1("一键100级"); + _loc12_.addChild(_loc16_); + _loc16_.x = _loc14_.x; + _loc16_.y = _loc14_.y + 40; + _loc16_.onClick = this.levelUpJiangHun100; + _loc16_.setUnEnable(); + var _loc17_:UIButton1 = new UIButton1("附于武将"); + _loc12_.addChild(_loc17_); + _loc17_.x = _loc15_.x; + _loc17_.y = _loc16_.y; + _loc17_.onClick = this.selectHero; + _loc17_.setUnEnable(); + var _loc18_:UIButton1 = new UIButton1("将魂分解"); + _loc12_.addChild(_loc18_); + _loc18_.x = _loc14_.x; + _loc18_.y = _loc16_.y + 40; + _loc18_.onClick = this.jiangHunFenJie; + var _loc19_:UIButton1 = new UIButton1("卸下将魂"); + _loc12_.addChild(_loc19_); + _loc19_.x = _loc15_.x; + _loc19_.y = _loc18_.y; + _loc19_.onClick = this.downHunFenJie; + _loc19_.setUnEnable(); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(439,368); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg2.addChild(this.packScrollPane); + this.packScrollPane.x = 2; + this.packScrollPane.y = 32; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + Utils.g_events.addEventListener(DevEvent.DATA_JIANGHUN_LIST,this.getJiangHunListResult); + Utils.g_events.addEventListener(DevEvent.DATA_JIANGHUN_UPDATE,this.getJiangHunResult); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChange); + this.getALlJunHunList(); + } + + private function getALlJunHunList() : void + { + ConnectService.getInstance().heroService.getUserJiangHunList1(); + } + + private function getJiangHunListResult(param1:DevEvent) : void + { + var _loc3_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:HeroJiangHunMc = null; + var _loc2_:Vector. = NewHeroData.getJiangHunList1(); + this.clear(); + if(_loc2_.length == 0) + { + this.proItem = null; + } + this.itemVec = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < _loc2_.length) + { + _loc5_ = _loc4_ % 4; + _loc6_ = _loc4_ / 4; + _loc7_ = new HeroJiangHunMc(); + _loc7_.addEventListener(MouseEvent.CLICK,this.clickItemMc); + this.packMc.addChild(_loc7_); + _loc7_.x = 4 + 106 * _loc5_; + _loc7_.y = 4 + 106 * _loc6_; + this.itemVec.push(_loc7_); + _loc7_.setDate(_loc2_[_loc4_]); + _loc3_ = _loc7_.y + _loc7_.height; + _loc4_++; + } + if(_loc2_.length > 12) + { + this.packMc.addChild(this.getLastText()); + this.getLastText().y = _loc3_; + } + this.packScrollPane.update(); + if(_loc2_.length > 0) + { + this.itemVec[0].dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + else + { + this.setJiangHunValue(null); + } + } + + private function clear() : void + { + var _loc1_:* = undefined; + if(this.itemVec != null && this.itemVec.length > 0) + { + for(_loc1_ in this.itemVec) + { + this.packMc.removeChild(this.itemVec[_loc1_]); + this.itemVec[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickItemMc); + this.itemVec[_loc1_].clear(); + } + } + if(this.packMc.contains(this.getLastText())) + { + this.packMc.removeChild(this.getLastText()); + } + this.itemVec = null; + this.packScrollPane.update(); + } + + private function getLastText() : TextField + { + if(this.lastText == null) + { + this.lastText = PublicMethod.getTextField(16777215,20); + this.lastText.height = 10; + } + return this.lastText; + } + + private function clickItemMc(param1:MouseEvent) : void + { + var _loc2_:HeroJiangHunMc = param1.currentTarget as HeroJiangHunMc; + if(this.proItem) + { + this.proItem.setFilters(null); + } + this.proItem = _loc2_; + this.proItem.setFilters([PublicGlow.getInstance().yellowGlow1]); + this.setJiangHunValue(_loc2_.getHeroJiangHun()); + this.itemChange(null); + } + + private function itemChange(param1:DevEvent) : void + { + var _loc2_:int = 0; + if(this.itemVec.length > 0) + { + _loc2_ = PakState.getItemsByEntId(20202335); + this.valueText6.setText(_loc2_ + " 将魂精魄"); + } + } + + private function setJiangHunValue(param1:HeroJiangHun) : void + { + if(param1 == null) + { + this.valueText1.setText(""); + this.valueText2.setText(""); + this.valueText3.setText(""); + this.valueText4.setText(""); + this.valueText5.setText(""); + this.valueText6.setText(""); + this.valueText7.setText(""); + this.valueText8.setText(""); + this.valueText9.setText(""); + this.valueText10.setText(""); + return; + } + this.valueText1.setText(param1.name); + this.valueText2.setText(param1.heroName + ""); + this.valueText3.setText(param1.level + " 级"); + this.valueText4.setText(param1.maxLevel + " 级"); + this.valueText5.setText(param1.needItems + " 将魂精魄"); + var _loc2_:int = param1.pro; + var _loc3_:int = int(_loc2_ * 1.2); + if(param1.type == 1) + { + this.valueText7.setText("武将攻击 + " + Utils.getNewPower(_loc3_)); + this.valueText8.setText("武将防御 + " + Utils.getNewPower(_loc2_)); + this.valueText9.setText("武将体力 + " + Utils.getNewPower(_loc2_)); + this.valueText10.setText("武将敏捷 + " + Utils.getNewPower(_loc2_)); + } + if(param1.type == 2) + { + this.valueText7.setText("武将攻击 + " + Utils.getNewPower(_loc2_)); + this.valueText8.setText("武将防御 + " + Utils.getNewPower(_loc3_)); + this.valueText9.setText("武将体力 + " + Utils.getNewPower(_loc2_)); + this.valueText10.setText("武将敏捷 + " + Utils.getNewPower(_loc2_)); + } + if(param1.type == 3) + { + this.valueText7.setText("武将攻击 + " + Utils.getNewPower(_loc2_)); + this.valueText8.setText("武将防御 + " + Utils.getNewPower(_loc2_)); + this.valueText9.setText("武将体力 + " + Utils.getNewPower(_loc3_)); + this.valueText10.setText("武将敏捷 + " + Utils.getNewPower(_loc2_)); + } + if(param1.type == 4) + { + this.valueText7.setText("武将攻击 + " + Utils.getNewPower(_loc2_)); + this.valueText8.setText("武将防御 + " + Utils.getNewPower(_loc2_)); + this.valueText9.setText("武将体力 + " + Utils.getNewPower(_loc2_)); + this.valueText10.setText("武将敏捷 + " + Utils.getNewPower(_loc3_)); + } + } + + public function getDate() : void + { + this.itemChange(null); + if(this.packScrollPane) + { + this.getALlJunHunList(); + } + } + + public function levelUpJiangHun(param1:MouseEvent) : void + { + if(this.proItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.proItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + } + + public function levelUpJiangHun30(param1:MouseEvent) : void + { + if(this.proItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.proItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + } + + public function levelUpJiangHun100(param1:MouseEvent) : void + { + if(this.proItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.proItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + } + + private function jiangHunFenJie(param1:MouseEvent) : void + { + if(this.proItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要升级的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.proItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要分解的将魂!"); + return; + } + var _loc3_:MessageBoxUI = MessageBoxUI.getInstance(); + _loc3_.confirmMsg("您是否确定要分解该将魂?分解将魂返还100%的升级材料。",this.configFenJie); + } + + private function configFenJie() : void + { + var _loc1_:HeroJiangHun = this.proItem.getHeroJiangHun(); + ConnectService.getInstance().heroService.jiangHunFenJie1(_loc1_.id); + } + + public function downHunFenJie(param1:MouseEvent) : void + { + if(this.proItem == null) + { + MessageBoxUI.getInstance().addMessage("请选中要卸下的将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.proItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请选中要卸下的将魂!"); + return; + } + if(_loc2_.heroId == 0) + { + MessageBoxUI.getInstance().addMessage("该将魂未附于武将!"); + return; + } + } + + private function selectHero(param1:MouseEvent) : void + { + if(this.proItem == null) + { + MessageBoxUI.getInstance().addMessage("请先选择将魂!"); + return; + } + var _loc2_:HeroJiangHun = this.proItem.getHeroJiangHun(); + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("请先选择将魂!"); + return; + } + this.heroIdList = new Vector.(); + if(_loc2_.heroId > 0) + { + this.heroIdList.push(_loc2_.heroId); + } + var _loc3_:HeroListSelectUI = HeroListSelectUI.getInstance(); + _loc3_.setSelectheroArr(this.heroIdList); + this.addChild(_loc3_); + _loc3_.x = 11; + _loc3_.y = -45; + _loc3_.backFunc = this.selectHeroList; + } + + public function selectHeroList(param1:Vector.) : void + { + if(param1.length > 1) + { + MessageBoxUI.getInstance().addMessage("只能附于一个武将"); + return; + } + if(param1.length == 0) + { + MessageBoxUI.getInstance().addMessage("至少要选中一个武将"); + return; + } + var _loc2_:HeroJiangHun = this.proItem.getHeroJiangHun(); + var _loc3_:int = param1[0].heroId; + } + + private function getJiangHunResult(param1:DevEvent) : void + { + var _loc3_:HeroJiangHunMc = null; + if(this.itemVec.length == 0) + { + return; + } + var _loc2_:HeroJiangHun = param1.obj as HeroJiangHun; + for each(_loc3_ in this.itemVec) + { + if(_loc3_.getHeroJiangHun().id == _loc2_.id) + { + _loc3_.setDate(_loc2_); + if(_loc3_ == this.proItem) + { + this.proItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + break; + } + } + } + + public function clearPage() : void + { + var _loc1_:HeroListSelectUI = HeroListSelectUI.getInstance(); + if(Boolean(_loc1_) && contains(_loc1_)) + { + removeChild(_loc1_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/KingEnmityItem.as b/flash_decompiled/com/view/ui/user/KingEnmityItem.as new file mode 100644 index 0000000..d22ebd7 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/KingEnmityItem.as @@ -0,0 +1,191 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.view.mc.sprite.ExpBar; + import com.view.newui.UIButton; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class KingEnmityItem extends Sprite + { + + private var m_descArr:Array; + + private var face:InstallFace; + + private var tab2:Sprite; + + private var titlebg:MovieClip; + + private var lingquBtn:UIButton; + + private var label1:TextField; + + private var label2:TextField; + + private var m_guaiId:int; + + private var m_yiZhengFuTxt:TextField; + + private var m_jingYanBar:ExpBar; + + private var m_url:String = ""; + + private var loadRes:LoadResource; + + private var itemImg:Bitmap; + + public function KingEnmityItem() + { + var _loc4_:Sprite = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:Sprite = this.face.getSprite(ClassConfig.lib_ui_bg_4); + this.m_descArr = ["流寇乃大盗巨贼之结伙,个个穷凶极恶,殊为可恨。","暴民起于陇亩,为四乡百姓之公害。","战国时期徭役繁重,屡有戍卒不胜其苦,结伙私逃,自成势力。","叛军本是各国正规部队,装备精良,战力强大。"]; + var _loc2_:Sprite = new Scale9Grid(_loc1_,98,15); + addChild(_loc2_); + this.titlebg = this.face.getMovieClip(ClassConfig.lib_ui_title_1); + addChild(this.titlebg); + this.titlebg.x = 40; + this.titlebg.y = 6; + this.tab2 = new Scale9Grid(_loc1_,98,109); + addChild(this.tab2); + this.tab2.y = 30; + var _loc3_:Sprite = new Scale9Grid(_loc1_,98,16); + addChild(_loc3_); + _loc3_.y = this.tab2.height + this.tab2.y - 1; + this.m_jingYanBar = new ExpBar(); + this.m_jingYanBar.setSize(142); + this.m_jingYanBar.setLength(200); + this.m_jingYanBar.setCurValue(151); + _loc3_.addChild(this.m_jingYanBar); + this.m_jingYanBar.x = 6; + this.m_jingYanBar.y = 12; + _loc4_ = new Scale9Grid(_loc1_,98,66); + addChild(_loc4_); + _loc4_.y = _loc3_.height + _loc3_.y - 1; + this.label1 = PublicMethod.getTextFieldWithFillter(10852210,142); + this.label1.textColor = 16777215; + this.label1.width = 142; + this.label1.height = 55; + this.label1.multiline = true; + this.label1.wordWrap = true; + var _loc5_:TextFormat = new TextFormat(); + _loc5_.leading = 3; + this.label1.defaultTextFormat = _loc5_; + _loc4_.addChild(this.label1); + this.label1.x = 5; + this.label1.y = 5; + this.label2 = PublicMethod.getTextFieldWithFillter(65280,96); + _loc4_.addChild(this.label2); + this.label2.x = 4; + this.label2.y = 52; + this.label2.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.lingquBtn = new UIButton("领 取",1,10); + _loc4_.addChild(this.lingquBtn); + this.lingquBtn.x = 95; + this.lingquBtn.y = 50; + this.lingquBtn.onClick = this.lingqu; + this.m_yiZhengFuTxt = PublicMethod.getTextFieldWithFillter(65280,96); + this.m_yiZhengFuTxt.htmlText = "已征服"; + } + + public function setData(param1:Object) : void + { + var _loc2_:String = null; + var _loc3_:String = null; + if(param1 != null) + { + switch(param1.name) + { + case "流寇": + _loc3_ = this.m_descArr[0]; + _loc2_ = "木材"; + this.m_url = "pic/img/liukou.jpg"; + this.m_guaiId = 2; + break; + case "暴民": + _loc3_ = this.m_descArr[1]; + _loc2_ = "粮食"; + this.m_url = "pic/img/baomin.jpg"; + this.m_guaiId = 1; + break; + case "戍卒": + _loc3_ = this.m_descArr[2]; + _loc2_ = "石料"; + this.m_url = "pic/img/shuzu.jpg"; + this.m_guaiId = 3; + break; + case "叛军": + _loc3_ = this.m_descArr[3]; + _loc2_ = "青铜"; + this.m_url = "pic/img/panjun.jpg"; + this.m_guaiId = 4; + } + this.titlebg.title.text = param1.name; + if(param1.canObtainAward == 0 && param1.status == 1) + { + this.lingquBtn.setEnable(); + } + else + { + this.lingquBtn.setUnEnable(); + } + this.label1.text = _loc3_; + this.label2.htmlText = "+100000" + _loc2_ + ""; + this.m_jingYanBar.setLength(param1.maxValue); + this.m_jingYanBar.setCurValue(param1.value); + this.m_jingYanBar.setStr("仇恨值"); + if(param1.status == 0) + { + this.m_yiZhengFuTxt.visible = false; + } + else + { + this.m_yiZhengFuTxt.visible = true; + } + if(this.itemImg == null) + { + this.loadRes = new LoadResource(this.m_url,this.loadBack); + } + } + } + + private function loadBack(param1:Event) : void + { + this.itemImg = Bitmap(param1.target.loader.content); + this.tab2.addChild(this.itemImg); + this.itemImg.width = 136; + this.itemImg.height = 108; + this.itemImg.x = 9; + this.itemImg.y = 9; + this.loadRes.clear(); + } + + private function lingqu(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.getNPCZhengFuAward(this.m_guaiId); + ConnectService.getInstance().addEventListener(UserEvent.USER_getNPCZhengFuAward,this.viewSucc); + } + + private function viewSucc(param1:UserEvent) : void + { + ConnectService.getInstance().removeEventListener(UserEvent.USER_getNPCZhengFuAward,this.viewSucc); + this.lingquBtn.setUnEnable(); + MessageBoxUI.getInstance().addMessage("领取奖励成功"); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/MainCasInfoUI.as b/flash_decompiled/com/view/ui/user/MainCasInfoUI.as new file mode 100644 index 0000000..798c668 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/MainCasInfoUI.as @@ -0,0 +1,323 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.data.MemeberShip; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.newui.UIWindowBg; + import com.view.ui.buff.BuffManager; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.CasMovePane; + import com.view.ui.pak.CasMoveSePane; + import com.view.ui.tools.ToolView; + 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.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class MainCasInfoUI extends Sprite + { + + private var face:InstallFace; + + private var castlemc:MovieClip; + + private var label01:TextField; + + private var label02:TextField; + + private var label03:TextField; + + private var label04:TextField; + + private var label05:TextField; + + private var label06:TextField; + + private var value01:TextField; + + private var value02:TextField; + + private var value03:TextField; + + private var value04:TextField; + + private var value05:TextField; + + private var value06:TextField; + + private var mianzhanText:TextField; + + private var btn_avoid:UISmallBtn; + + private var t_mill:Number; + + private var status:int; + + private var warStatus:String; + + private var casMove:CasMovePane; + + private var casMoveSePane:CasMoveSePane; + + private var _timer:Timer; + + public function MainCasInfoUI() + { + var _loc5_:UIWindowBg = null; + var _loc6_:UISmallBtn = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(88,87); + addChild(_loc1_); + this.castlemc = this.face.getMovieClip(ClassConfig.build_castle_main); + _loc1_.addChild(this.castlemc); + this.castlemc.gotoAndStop(1); + this.castlemc.x = 2; + this.castlemc.y = 2; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(16763749,50); + addChild(_loc2_); + _loc2_.x = 140; + _loc2_.text = "主城"; + var _loc3_:Sprite = new Scale9Grid(this.face.getSprite(UIConfig.light_separete),130,5); + addChild(_loc3_); + _loc3_.x = 0; + _loc3_.y = 110; + var _loc4_:int = 1; + while(_loc4_ < 7) + { + this["value0" + _loc4_] = PublicMethod.getTextFieldWithFillter(16640697,120); + this["label0" + _loc4_] = PublicMethod.getTextFieldWithFillter(10852210,70); + addChild(this["label0" + _loc4_]); + this["label0" + _loc4_].x = 1; + this["label0" + _loc4_].y = 88 + 31 * _loc4_; + addChild(this["value0" + _loc4_]); + this["value0" + _loc4_].x = 70; + this["value0" + _loc4_].y = 88 + 31 * _loc4_; + switch(_loc4_) + { + case 1: + this["label0" + _loc4_].text = "城 池 名:"; + break; + case 2: + this["label0" + _loc4_].text = "位 置:"; + break; + case 3: + this["label0" + _loc4_].text = "坐 标:"; + break; + case 4: + this["label0" + _loc4_].text = "等 级:"; + break; + case 5: + this["label0" + _loc4_].text = "势力范围:"; + break; + case 6: + this["label0" + _loc4_].text = "繁 荣 度:"; + } + _loc4_++; + } + _loc5_ = new UIWindowBg(); + _loc5_.initSecondPanel(133,11); + addChild(_loc5_); + _loc5_.x = 1; + _loc5_.y = this.label06.y + this.label06.height + 10; + _loc6_ = new UISmallBtn("迁 城",2); + addChild(_loc6_); + _loc6_.x = 160; + _loc6_.y = this.label03.y; + _loc6_.onClick = this.clickQiancheng; + this.btn_avoid = new UISmallBtn("免 战",2); + addChild(this.btn_avoid); + this.btn_avoid.x = _loc5_.x + _loc5_.width + 4; + this.btn_avoid.y = _loc5_.y; + this.mianzhanText = PublicMethod.getTextFieldWithFillter(10852210,150); + this.mianzhanText.mouseEnabled = true; + this.mianzhanText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + _loc5_.addChild(this.mianzhanText); + this.mianzhanText.y = 1; + addEventListener(Event.REMOVED_FROM_STAGE,this.clear); + } + + private function clear(param1:Event) : void + { + this.clearTime(); + } + + public function setData(param1:Object) : void + { + this.value01.text = param1.casName; + this.value02.text = param1.posName; + this.value03.text = param1.pos; + this.value04.text = param1.level; + this.value05.text = param1.rangeNum; + this.value06.text = param1.rangeValue; + this.mianzhanText.text = param1.status; + this.mianzhanText.setTextFormat(PublicMethod.getCenterTextFormat()); + this.warStatus = param1.status; + this.t_mill = param1.time as Number; + if(param1.status == "正常") + { + this.status = 1; + this.btn_avoid.setText("免 战"); + this.btn_avoid.onClick = this.avoidBattle; + ToolTipManager.getInstance().setToolTip(this.mianzhanText,new TxtTooltip("可与其他玩家正常交战")); + } + else if(this.mianzhanText.text == "免战" || this.mianzhanText.text == "高级免战") + { + this.status = 2; + this.t_mill /= 1000; + this.btn_avoid.setText("解 除"); + this.btn_avoid.onClick = this.recoverBattle; + ToolTipManager.getInstance().setToolTip(this.mianzhanText,new TxtTooltip("不可攻击其他玩家,其他玩家入侵需\n要使用强攻令牌。可点“解除”按钮\n解除免战以便攻击其他玩家")); + this.showListMainInfo(); + } + else + { + this.status = 3; + this.t_mill /= 1000; + this.btn_avoid.setText("免战"); + this.btn_avoid.setUnEnable(); + ToolTipManager.getInstance().setToolTip(this.mianzhanText,new TxtTooltip("可与其他玩家正常交战。冷却时间内\n不能再次使用免战物品")); + this.showListMainInfo(); + } + } + + private function avoidBattle(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.list(-1,155,-1,1,"QUICK_STORE_MIANZHAN"); + _loc2_.onRefresh = this.avoidRefresh; + _loc2_.show(); + } + + private function avoidRefresh() : void + { + this.refreshData(); + } + + private function refresh(param1:int) : void + { + this.moveCas(param1); + } + + private function moveCas(param1:int) : void + { + if(param1 == 10371531 || param1 == 10471531) + { + this.casMove = CasMovePane.getInstance(); + this.casMove.showSelf(this.parent); + } + if(param1 == 10471532 || param1 == 10371532) + { + this.casMoveSePane = CasMoveSePane.getInstance(); + this.casMoveSePane.showSelf(this.parent); + this.casMoveSePane.update(); + } + } + + private function clickQiancheng(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.list(-1,150,2,1,"QUICK_STORE_QIANCHENG"); + _loc2_.onRefresh = this.refresh; + _loc2_.show(); + } + + private function recoverBattle(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("解除免战后可攻击其他玩家,也会受\n到其他玩家攻击,确认解除免战吗?",this.isRecoverBattle); + } + + private function isRecoverBattle() : void + { + this.btn_avoid.onClick = null; + this.btn_avoid.setUnEnable(); + ConnectService.getInstance().castleService.recoveryBattleInfo(); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_recoveryBattleInfo,this._coolingSucc); + } + + private function _coolingSucc(param1:CastleEvent) : void + { + ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_recoveryBattleInfo,this._coolingSucc); + BuffManager.getInstance().refresh(); + this.refreshData(); + } + + private function showTime(param1:*, param2:String) : void + { + } + + private function showListMainInfo() : void + { + if(this._timer == null) + { + this._timer = new Timer(1000); + this._timer.addEventListener(TimerEvent.TIMER,this.handleTimer); + } + if(!this._timer.running) + { + this._timer.start(); + } + } + + private function handleTimer(param1:TimerEvent) : void + { + --this.t_mill; + if(this.t_mill > 0) + { + if(this.status == 2) + { + this.mianzhanText.htmlText = this.warStatus + " " + PublicMethod.getTime(this.t_mill) + ""; + } + else + { + this.mianzhanText.htmlText = "冷却 " + PublicMethod.getTime(this.t_mill) + ""; + } + } + else + { + this.clearTime(); + if(this.status == 2) + { + this.refreshData(); + } + else + { + ToolTipManager.getInstance().disposeToolTip(this.mianzhanText); + this.mianzhanText.text = "正常"; + this.btn_avoid.setText("免 战"); + this.btn_avoid.setEnable(); + this.btn_avoid.onClick = this.avoidBattle; + ToolTipManager.getInstance().setToolTip(this.mianzhanText,new TxtTooltip("可与其他玩家正常交战")); + } + } + } + + private function clearTime() : void + { + if(this._timer) + { + this._timer.removeEventListener(TimerEvent.TIMER,this.handleTimer); + this._timer.stop(); + this._timer = null; + } + } + + private function refreshData() : void + { + ConnectService.getInstance().castleService.getCastleView(MemeberShip.getMainCastle().casId); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/SelectLiuYuUI.as b/flash_decompiled/com/view/ui/user/SelectLiuYuUI.as new file mode 100644 index 0000000..42dedba --- /dev/null +++ b/flash_decompiled/com/view/ui/user/SelectLiuYuUI.as @@ -0,0 +1,255 @@ +package com.view.ui.user +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_2; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.iron.IronPage_4; + import com.view.ui.iron.mc.SelectGemMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SelectLiuYuUI extends UIWindowBg + { + + private var tft:TextFormat; + + private var tableMc:UITable; + + private var okBtn:Button_2; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var typeCombox:ComboBox; + + private var addGemObj:Object; + + private var selectItem:Object; + + private var preGemMc:SelectGemMc; + + public function SelectLiuYuUI() + { + var _loc4_:UIButton = null; + var _loc6_:SelectGemMc = null; + super(); + initSize(100,270); + loadTitle(UITitleConfig.title_xuanzhebaoshi); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.text = "琉玉类型:"; + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.typeCombox = new ComboBox(); + this.typeCombox.addItem({ + "label":"全部", + "data":IronPage_4.type_all2 + }); + this.typeCombox.addItem({ + "label":"攻击琉玉", + "data":IronPage_4.type_11 + }); + this.typeCombox.addItem({ + "label":"防御琉玉", + "data":IronPage_4.type_12 + }); + this.typeCombox.addItem({ + "label":"体力琉玉", + "data":IronPage_4.type_13 + }); + this.typeCombox.addItem({ + "label":"敏捷琉玉", + "data":IronPage_4.type_14 + }); + this.typeCombox.width = 80; + bg1.addChild(this.typeCombox); + this.typeCombox.x = _loc1_.x + 60; + this.typeCombox.y = _loc1_.y - 2; + this.typeCombox.addEventListener(Event.CHANGE,this.changeType,false,0,true); + this.typeCombox.textField.setStyle("textFormat",this.tft); + this.typeCombox.dropdown.setRendererStyle("textFormat",this.tft); + var _loc2_:Array = ["琉玉名称","琉玉数量"]; + var _loc3_:Array = [155,130]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 25; + this.tableMc.drawLine = false; + this.tableMc.install(8,_loc2_,_loc3_); + bg1.addChild(this.tableMc); + this.tableMc.x = 10; + this.tableMc.y = 34; + _loc4_ = new UIButton("确 定",2,10); + bg1.addChild(_loc4_); + _loc4_.x = 130; + _loc4_.y = 270; + _loc4_.onClick = this.submit; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(280,201); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + var _loc5_:int = 0; + while(_loc5_ < 8) + { + _loc6_ = new SelectGemMc(); + this.packMc.addChild(_loc6_); + this.packList.push(_loc6_); + _loc6_.y = 25 * _loc5_; + _loc6_.x = 4; + _loc6_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + this.packScrollPane.update(); + this.typeCombox.selectedItem = this.typeCombox.getItemAt(0); + } + + private function changeLevel(param1:Event) : void + { + this.getGemList(); + } + + private function changeType(param1:Event) : void + { + this.getGemList(); + } + + private function addEvent(param1:Event) : void + { + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + this.getGemList(); + } + + private function delEvent(param1:Event) : void + { + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + } + + private function itemChangeResult(param1:DevEvent) : void + { + this.getGemList(); + } + + private function clearGemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 7) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObject(null); + this.packList[_loc1_].setSelect(false); + } + _loc1_--; + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + this.selectItem = null; + } + + private function getGemList() : void + { + var _loc2_:* = undefined; + var _loc3_:SelectGemMc = null; + var _loc1_:Vector. = PakState.getBaoshiList(this.typeCombox.selectedItem.data,-1); + this.clearGemList(); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 7) + { + _loc3_ = new SelectGemMc(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 25 * _loc2_; + _loc3_.x = 4; + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + this.packList[_loc2_].setItemObject(_loc1_[_loc2_]); + } + } + this.packScrollPane.verticalScrollPosition = 0; + this.packScrollPane.update(); + if(this.preGemMc) + { + this.preGemMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + private function submit(param1:MouseEvent) : void + { + if(this.selectItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择琉玉"); + } + else + { + ConnectService.getInstance().userService.addLiuYu(this.addGemObj.treasuryId,this.selectItem.itemId,this.addGemObj.holeNo); + closeSelf(null); + } + } + + public function setObj(param1:Object) : void + { + this.addGemObj = param1; + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:SelectGemMc = null; + this.preGemMc = param1.currentTarget as SelectGemMc; + if(this.preGemMc.getItemObj() != null) + { + for each(_loc2_ in this.packList) + { + if(_loc2_ == this.preGemMc) + { + this.selectItem = this.preGemMc.getItemObj(); + _loc2_.setSelect(true); + } + else + { + _loc2_.setSelect(false); + } + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/SelectPetJewUI.as b/flash_decompiled/com/view/ui/user/SelectPetJewUI.as new file mode 100644 index 0000000..99705bd --- /dev/null +++ b/flash_decompiled/com/view/ui/user/SelectPetJewUI.as @@ -0,0 +1,261 @@ +package com.view.ui.user +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_2; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.iron.mc.SelectGemMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import fl.controls.ComboBox; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SelectPetJewUI extends UIWindowBg + { + + private var tft:TextFormat; + + private var costMoney:TextField; + + private var tableMc:UITable; + + private var okBtn:Button_2; + + private var packList:Vector.; + + private var levelCombox:ComboBox; + + private var tid:int; + + private var roles:int; + + private var selectItem:Object; + + private var preGemMc:SelectGemMc; + + public function SelectPetJewUI() + { + var _loc4_:UIButton = null; + var _loc6_:SelectGemMc = null; + super(); + initSize(100,320); + loadTitle(UITitleConfig.title_xuanzhebaoshi); + addCloseBtn(); + initBg(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc1_.text = "宝石等级:"; + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + this.levelCombox = new ComboBox(); + this.levelCombox.addItem({ + "label":"全部", + "data":-1 + }); + this.levelCombox.addItem({ + "label":"1级", + "data":1 + }); + this.levelCombox.addItem({ + "label":"2级", + "data":2 + }); + this.levelCombox.addItem({ + "label":"3级", + "data":3 + }); + this.levelCombox.addItem({ + "label":"4级", + "data":4 + }); + this.levelCombox.addItem({ + "label":"5级", + "data":5 + }); + this.levelCombox.addItem({ + "label":"6级", + "data":6 + }); + this.levelCombox.addItem({ + "label":"7级", + "data":7 + }); + this.levelCombox.addItem({ + "label":"8级", + "data":8 + }); + this.levelCombox.addItem({ + "label":"9级", + "data":9 + }); + this.levelCombox.addItem({ + "label":"10级", + "data":10 + }); + this.levelCombox.textField.setStyle("textFormat",this.tft); + this.levelCombox.dropdown.setRendererStyle("textFormat",this.tft); + this.levelCombox.addEventListener(Event.CHANGE,this.changeLevel,false,0,true); + this.levelCombox.width = 80; + bg1.addChild(this.levelCombox); + this.levelCombox.x = _loc1_.x + 60; + this.levelCombox.y = 8; + var _loc2_:Array = ["宝石名称","宝石数量"]; + var _loc3_:Array = [155,130]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 25; + this.tableMc.drawLine = false; + this.tableMc.install(10,_loc2_,_loc3_); + bg1.addChild(this.tableMc); + this.tableMc.x = 10; + this.tableMc.y = 34; + _loc4_ = new UIButton("确 定",2,10); + bg1.addChild(_loc4_); + _loc4_.x = 124; + _loc4_.y = 320; + _loc4_.onClick = this.submit; + this.packList = new Vector.(); + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + var _loc5_:int = 0; + while(_loc5_ < 10) + { + _loc6_ = new SelectGemMc(); + this.tableMc.addChild(_loc6_); + this.packList.push(_loc6_); + _loc6_.y = 25 + 25 * _loc5_; + _loc6_.x = 5; + _loc6_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + this.levelCombox.selectedItem = this.levelCombox.getItemAt(0); + } + + private function changeLevel(param1:Event) : void + { + this.getGemList(); + } + + private function addEvent(param1:Event) : void + { + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + this.getGemList(); + } + + private function delEvent(param1:Event) : void + { + Utils.g_events.removeEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + } + + private function itemChangeResult(param1:DevEvent) : void + { + this.getGemList(); + } + + private function getGemList() : void + { + var _loc3_:PackItem = null; + var _loc4_:* = undefined; + var _loc5_:Boolean = false; + var _loc6_:PackItem = null; + var _loc7_:PackItem = null; + var _loc1_:Vector. = PakState.getBaoshiList(541,this.levelCombox.selectedItem.data); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in _loc1_) + { + _loc5_ = false; + for each(_loc6_ in _loc2_) + { + if(_loc6_.itemId == _loc3_.itemId) + { + _loc5_ = true; + _loc6_.itemCount += _loc3_.itemCount; + break; + } + } + if(_loc5_ == false) + { + _loc7_ = new PackItem(_loc3_); + _loc2_.push(_loc7_); + } + } + for(_loc4_ in this.packList) + { + if(_loc2_.length <= _loc4_) + { + this.packList[_loc4_].setItemObject(null); + } + else + { + this.packList[_loc4_].setItemObject(_loc2_[_loc4_]); + } + } + if(this.preGemMc == null) + { + return; + } + if(this.preGemMc.getItemObj() == null) + { + this.preGemMc.setSelect(false); + this.selectItem = null; + this.preGemMc = null; + return; + } + if(this.preGemMc) + { + this.preGemMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + private function submit(param1:MouseEvent) : void + { + if(this.selectItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择宝石"); + return; + } + ConnectService.getInstance().playService.addPetItemRoleBijou(this.tid,this.preGemMc.getItemObj().itemId,this.roles); + closeSelf(null); + } + + public function setTid(param1:int) : void + { + this.tid = param1; + } + + public function setRoles(param1:int) : void + { + this.roles = param1; + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:SelectGemMc = param1.currentTarget as SelectGemMc; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.preGemMc) + { + this.preGemMc.setSelect(false); + } + this.preGemMc = _loc2_; + this.preGemMc.setSelect(true); + this.selectItem = this.preGemMc.getItemObj(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/Strategy1.as b/flash_decompiled/com/view/ui/user/Strategy1.as new file mode 100644 index 0000000..8df9ae9 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/Strategy1.as @@ -0,0 +1,327 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.StrategyEvent; + import com.control.data.ReturnBean; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIExpBar; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.utils.Timer; + + public class Strategy1 extends Sprite + { + + private var face:InstallFace; + + private var usebtn:UIButton; + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var strategy_name:TextField; + + private var grade:TextField; + + private var clearColling:TextField; + + private var remain_Time:TextField; + + private var desc:TextField; + + private var str_value:TextField; + + private var nextTime:TextField; + + private var mastery_bar:UIExpBar; + + private var cur_strValue:TextField; + + private var tacticLimit:int; + + private var tacticPoint:int; + + private var neizhengVec:Vector.; + + private var neizhengArr:Array; + + private var currMc:StrategyImgMc; + + private var coolTime:int; + + private var timer:Timer; + + public function Strategy1() + { + var _loc3_:TextField = null; + var _loc8_:TextField = null; + this.face = InstallFace.getInstance(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(622,226); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(622,127); + addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = this.bg1.y + this.bg1.height + 4; + var _loc1_:UITitleBg = new UITitleBg("策略属性",600); + this.bg2.addChild(_loc1_); + _loc1_.x = int(this.bg2.width / 2 - _loc1_.width / 2); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc2_.text = "策略名称:"; + this.bg2.addChild(_loc2_); + _loc2_.x = 15; + _loc2_.y = 35; + this.strategy_name = PublicMethod.getTextFieldWithFillter(16640697,120); + this.bg2.addChild(this.strategy_name); + this.strategy_name.x = _loc2_.x + 65; + this.strategy_name.y = _loc2_.y; + _loc3_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc3_.text = "策略等级:"; + this.bg2.addChild(_loc3_); + _loc3_.x = 15; + _loc3_.y = _loc2_.y + 20; + this.grade = PublicMethod.getTextFieldWithFillter(16640697,120); + this.bg2.addChild(this.grade); + this.grade.x = this.strategy_name.x; + this.grade.y = _loc3_.y; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc4_.text = "熟 练 度:"; + this.bg2.addChild(_loc4_); + _loc4_.x = 15; + _loc4_.y = _loc3_.y + 20; + this.mastery_bar = new UIExpBar(); + this.mastery_bar.setWidth(140); + this.mastery_bar.init(); + this.bg2.addChild(this.mastery_bar); + this.mastery_bar.setMaxValue(100); + this.mastery_bar.setCurValue(0); + this.mastery_bar.x = this.strategy_name.x; + this.mastery_bar.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc5_.text = "策略说明:"; + this.bg2.addChild(_loc5_); + _loc5_.x = 15; + _loc5_.y = _loc4_.y + 25; + this.desc = PublicMethod.getTextFieldWithFillter(16640697,390); + this.desc.wordWrap = true; + this.desc.multiline = true; + this.desc.height = 40; + this.bg2.addChild(this.desc); + this.desc.x = this.strategy_name.x; + this.desc.y = _loc5_.y; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc6_.text = "冷却时间:"; + this.bg2.addChild(_loc6_); + _loc6_.x = 270; + _loc6_.y = _loc2_.y; + this.nextTime = PublicMethod.getTextFieldWithFillter(16640697,80); + this.bg2.addChild(this.nextTime); + this.nextTime.x = _loc6_.x + 65; + this.nextTime.y = _loc6_.y; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(10852210,68); + _loc7_.text = "消耗策略值:"; + this.bg2.addChild(_loc7_); + _loc7_.x = _loc6_.x - 12; + _loc7_.y = _loc3_.y; + this.str_value = PublicMethod.getTextFieldWithFillter(16640697,80); + this.bg2.addChild(this.str_value); + this.str_value.x = this.nextTime.x; + this.str_value.y = _loc7_.y; + _loc8_ = PublicMethod.getTextFieldWithFillter(10852210,68); + _loc8_.text = "当前策略值:"; + this.bg2.addChild(_loc8_); + _loc8_.x = _loc7_.x; + _loc8_.y = _loc4_.y; + this.cur_strValue = PublicMethod.getTextFieldWithFillter(16640697,80); + this.bg2.addChild(this.cur_strValue); + this.cur_strValue.x = this.nextTime.x; + this.cur_strValue.y = _loc8_.y; + this.clearColling = PublicMethod.getTextFieldWithFillter(10852210,65); + this.clearColling.text = "剩余冷却:"; + this.bg2.addChild(this.clearColling); + this.clearColling.x = 420; + this.clearColling.y = _loc2_.y; + this.remain_Time = PublicMethod.getTextFieldWithFillter(16711680,80); + this.bg2.addChild(this.remain_Time); + this.remain_Time.x = this.clearColling.x + 65; + this.remain_Time.y = _loc2_.y; + this.usebtn = new UIButton("使用",1,10); + this.bg2.addChild(this.usebtn); + this.usebtn.x = 565; + this.usebtn.y = 29; + this.usebtn.onClick = this.useEvent; + this.usebtn.setUnEnable(); + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_Up,this.upStrategyResult); + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_By_Id,this.getStrategyView); + } + + private function clickNeiZheng(param1:MouseEvent) : void + { + var _loc2_:StrategyImgMc = param1.currentTarget as StrategyImgMc; + this.getNeiZhengView(_loc2_); + } + + public function initData(param1:Array) : void + { + var _loc2_:* = undefined; + var _loc3_:StrategyImgMc = null; + this.neizhengArr = param1; + this.neizhengVec = new Vector.(); + for(_loc2_ in this.neizhengArr) + { + _loc3_ = new StrategyImgMc(this.neizhengArr[_loc2_]); + this.bg1.addChild(_loc3_); + _loc3_.x = 40 + 96 * int(_loc2_ % 6); + _loc3_.y = 20 + 108 * int(_loc2_ / 6); + this.neizhengVec.push(_loc3_); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickNeiZheng,false,0,true); + } + this.getNeiZhengView(this.neizhengVec[0]); + } + + private function getNeiZhengView(param1:StrategyImgMc) : void + { + if(this.currMc != null) + { + this.currMc.setUnClick(); + } + this.currMc = param1; + this.currMc.mouseClick(); + } + + private function getStrategyView(param1:StrategyEvent) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc2_:Object = param1.strategyObj; + if(this.currMc.getData().id == _loc2_.id) + { + _loc3_ = int(_loc2_.highestProficiency); + _loc4_ = int(_loc2_.proficiency); + this.tacticLimit = _loc2_.tacticLimit; + this.tacticPoint = _loc2_.tacticPoint; + this.strategy_name.text = this.currMc.getData().templateStrategy.name; + this.grade.text = "Lv." + this.currMc.getData().level; + this.mastery_bar.setMaxValue(_loc3_); + this.mastery_bar.setCurValue(_loc4_); + this.desc.htmlText = _loc2_.res; + this.nextTime.text = PublicMethod.getTimeStr(this.currMc.getData().templateStrategy.coolingTime); + this.str_value.text = this.currMc.getData().templateStrategy.consumption; + this.cur_strValue.text = this.tacticPoint + "/" + this.tacticLimit; + this.coolTime = _loc2_.coolTime; + this.setTimeStr(); + this.startTime(); + } + } + + private function setTimeStr() : void + { + if(this.coolTime <= 1) + { + this.remain_Time.text = ""; + this.remain_Time.visible = false; + this.clearColling.visible = false; + this.usebtn.setEnable(); + } + else + { + if(!this.remain_Time.visible) + { + this.remain_Time.text = ""; + this.remain_Time.visible = true; + this.clearColling.visible = true; + } + this.usebtn.setUnEnable(); + this.remain_Time.text = PublicMethod.getTimeStr1(this.coolTime); + } + } + + private function startTime() : void + { + if(this.coolTime > 0) + { + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timeframe); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + } + + private function timeframe(param1:TimerEvent) : void + { + --this.coolTime; + this.remain_Time.text = PublicMethod.getTimeStr1(this.coolTime); + if(this.coolTime <= 0) + { + this.clearTime(); + this.getNeiZhengView(this.currMc); + } + } + + private function clearTime() : void + { + if(this.timer != null) + { + this.timer.removeEventListener(TimerEvent.TIMER,this.timeframe); + this.timer.stop(); + this.timer = null; + } + } + + private function useEvent(param1:MouseEvent) : void + { + var _loc2_:int = int(this.currMc.getData().id); + var _loc3_:int = int(this.currMc.getData().strategyId); + if(_loc2_ > 0 && _loc3_ > 0) + { + this.usebtn.setUnEnable(); + ConnectService.getInstance().castleService.useStrategyById(_loc2_,_loc3_); + } + } + + private function upStrategyResult(param1:StrategyEvent) : void + { + this.usebtn.setEnable(); + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + var _loc2_:Object = param1.strategyObj; + if(this.currMc.getData().id == _loc2_.userStrategy.id) + { + this.getNeiZhengView(this.currMc); + } + MessageBoxUI.getInstance().addMessage(_loc2_.res + _loc2_.result); + Utils.g_events.dispatchEvent(new DevEvent(UserPage1.STRATEGY_CHANGE_EVENT,_loc2_)); + if(this.currMc.strategyName == "科研") + { + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.USERTECH)); + } + if(this.currMc.strategyName == "迁城") + { + Utils.g_events.dispatchEvent(new DevEvent(DevEvent.CASTLEMOVE)); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/Strategy2.as b/flash_decompiled/com/view/ui/user/Strategy2.as new file mode 100644 index 0000000..87d387e --- /dev/null +++ b/flash_decompiled/com/view/ui/user/Strategy2.as @@ -0,0 +1,454 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.StrategyEvent; + import com.control.data.ReturnBean; + import com.data.data.items.AddSpeed; + import com.view.mc.button.Button_9; + import com.view.newui.UIButton; + import com.view.newui.UIExpBar; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.addspeed.AddSpeedUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tools.ToolView; + import com.view.ui.warreport.MilitaryView; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class Strategy2 extends Sprite + { + + private var face:InstallFace; + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var strategy_name:TextField; + + private var grade:TextField; + + private var clearColling:TextField; + + private var remain_Time:TextField; + + private var desc:TextField; + + private var str_value:TextField; + + private var nextTime:TextField; + + private var mastery_bar:UIExpBar; + + private var cur_strValue:TextField; + + private var useBtn:UIButton; + + private var addSpeedBtn:UIButton; + + private var textBen:Button_9; + + private var junshiArr:Array; + + private var junshiVec:Vector.; + + private var currMc:StrategyImgMc; + + private var items:int; + + private var needItems:int; + + private var needCash:int; + + private var coolTime:int; + + private var timer:Timer; + + private var attOutId:int; + + public function Strategy2() + { + var _loc3_:TextField = null; + var _loc4_:TextField = null; + var _loc9_:TextField = null; + this.face = InstallFace.getInstance(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(622,226); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(622,127); + addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = this.bg1.y + this.bg1.height + 4; + var _loc1_:UITitleBg = new UITitleBg("策略属性",600); + this.bg2.addChild(_loc1_); + _loc1_.x = int(this.bg2.width / 2 - _loc1_.width / 2); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc2_.text = "策略名称:"; + this.bg2.addChild(_loc2_); + _loc2_.x = 15; + _loc2_.y = 35; + this.strategy_name = PublicMethod.getTextFieldWithFillter(16640697,120); + this.bg2.addChild(this.strategy_name); + this.strategy_name.x = _loc2_.x + 65; + this.strategy_name.y = _loc2_.y; + _loc3_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc3_.text = "策略等级:"; + this.bg2.addChild(_loc3_); + _loc3_.x = 15; + _loc3_.y = _loc2_.y + 20; + this.grade = PublicMethod.getTextFieldWithFillter(16640697,120); + this.bg2.addChild(this.grade); + this.grade.x = this.strategy_name.x; + this.grade.y = _loc3_.y; + _loc4_ = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc4_.text = "熟 练 度:"; + this.bg2.addChild(_loc4_); + _loc4_.x = 15; + _loc4_.y = _loc3_.y + 20; + this.mastery_bar = new UIExpBar(); + this.mastery_bar.setWidth(140); + this.mastery_bar.init(); + this.bg2.addChild(this.mastery_bar); + this.mastery_bar.setMaxValue(100); + this.mastery_bar.setCurValue(0); + this.mastery_bar.x = this.strategy_name.x; + this.mastery_bar.y = _loc4_.y; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc5_.text = "策略说明:"; + this.bg2.addChild(_loc5_); + _loc5_.x = 15; + _loc5_.y = _loc4_.y + 25; + this.desc = PublicMethod.getTextFieldWithFillter(16640697,390); + this.desc.wordWrap = true; + this.desc.multiline = true; + this.desc.height = 40; + this.bg2.addChild(this.desc); + this.desc.x = this.strategy_name.x; + this.desc.y = _loc5_.y; + var _loc6_:TextFormat = new TextFormat(); + _loc6_.leading = 3; + this.desc.defaultTextFormat = _loc6_; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(10852210,60); + _loc7_.text = "冷却时间:"; + this.bg2.addChild(_loc7_); + _loc7_.x = 270; + _loc7_.y = _loc2_.y; + this.nextTime = PublicMethod.getTextFieldWithFillter(16640697,80); + this.bg2.addChild(this.nextTime); + this.nextTime.x = _loc7_.x + 65; + this.nextTime.y = _loc7_.y; + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(10852210,68); + _loc8_.text = "消耗锦囊数:"; + this.bg2.addChild(_loc8_); + _loc8_.x = _loc7_.x - 12; + _loc8_.y = _loc3_.y; + this.str_value = PublicMethod.getTextFieldWithFillter(16640697,80); + this.bg2.addChild(this.str_value); + this.str_value.x = this.nextTime.x; + this.str_value.y = _loc8_.y; + _loc9_ = PublicMethod.getTextFieldWithFillter(10852210,68); + _loc9_.text = "当前锦囊数:"; + this.bg2.addChild(_loc9_); + _loc9_.x = _loc8_.x; + _loc9_.y = _loc4_.y; + this.cur_strValue = PublicMethod.getTextFieldWithFillter(16640697,80); + this.bg2.addChild(this.cur_strValue); + this.cur_strValue.x = this.nextTime.x; + this.cur_strValue.y = _loc9_.y; + this.clearColling = PublicMethod.getTextFieldWithFillter(10852210,65); + this.clearColling.text = "剩余冷却:"; + this.bg2.addChild(this.clearColling); + this.clearColling.x = 420; + this.clearColling.y = _loc2_.y; + this.remain_Time = PublicMethod.getTextFieldWithFillter(16711680,80); + this.bg2.addChild(this.remain_Time); + this.remain_Time.x = this.clearColling.x + 65; + this.remain_Time.y = _loc2_.y; + this.useBtn = new UIButton("使用",1,10); + this.bg2.addChild(this.useBtn); + this.useBtn.x = 565; + this.useBtn.y = 29; + this.useBtn.onClick = this.useStrategy; + this.textBen = new Button_9("军情界面对军队使用"); + this.bg2.addChild(this.textBen); + this.textBen.buttonMode = true; + this.textBen.x = 500; + this.textBen.y = _loc3_.y; + this.textBen.addEventListener(MouseEvent.CLICK,this.openMilitary); + var _loc10_:Button_9 = new Button_9("购买锦囊"); + _loc10_.addEventListener(MouseEvent.CLICK,this.buyItem); + this.bg2.addChild(_loc10_); + _loc10_.buttonMode = true; + _loc10_.x = 560; + _loc10_.y = _loc4_.y; + var _loc11_:Button_9 = new Button_9("一键满级"); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc4_.y + 20; + _loc11_.buttonMode = true; + this.bg2.addChild(_loc11_); + _loc11_.addEventListener(MouseEvent.CLICK,this.upStrategyConfig); + _loc11_.visible = true; + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_By_Id,this.getStrategyView); + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_UseJunShi,this.useJunshiStrategySucc); + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_Ups,this.upJunshiStrategySucc); + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_addSpeedJunShi,this.addSpeedJunshiStrategySucc); + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_AddSpeed,this.addSpeedStrategySucc); + this.addSpeedBtn = new UIButton("加速",1,10); + this.bg2.addChild(this.addSpeedBtn); + this.addSpeedBtn.x = 565; + this.addSpeedBtn.y = 29; + this.addSpeedBtn.visible = false; + this.addSpeedBtn.onClick = this.addSpeed; + } + + private function buyItem(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_JINNANG"); + _loc2_.onRefresh = this.refresh; + _loc2_.show(); + } + + private function refresh() : void + { + if(this.currMc) + { + this.currMc.mouseClick(); + } + } + + public function initData(param1:Array) : void + { + var _loc2_:* = undefined; + var _loc3_:StrategyImgMc = null; + this.junshiArr = param1; + this.junshiVec = new Vector.(); + for(_loc2_ in this.junshiArr) + { + _loc3_ = new StrategyImgMc(this.junshiArr[_loc2_]); + this.bg1.addChild(_loc3_); + _loc3_.x = 40 + 96 * int(_loc2_ % 6); + _loc3_.y = 20 + 108 * int(_loc2_ / 6); + this.junshiVec.push(_loc3_); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickJunShi,false,0,true); + } + this.getJunShiView(this.junshiVec[0]); + } + + private function clickJunShi(param1:MouseEvent) : void + { + var _loc2_:StrategyImgMc = param1.currentTarget as StrategyImgMc; + this.getJunShiView(_loc2_); + } + + private function openMilitary(param1:MouseEvent) : void + { + var _loc2_:MilitaryView = MilitaryView.getInstance(); + _loc2_.setStartPage(0); + _loc2_.show(); + } + + private function getJunShiView(param1:StrategyImgMc) : void + { + if(this.currMc != null) + { + this.currMc.setUnClick(); + } + this.currMc = param1; + this.currMc.mouseClick(); + } + + private function getStrategyView(param1:StrategyEvent) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc2_:Object = param1.strategyObj; + if(this.currMc.getData().id == _loc2_.id) + { + this.items = _loc2_.items; + this.needCash = _loc2_.upCash; + this.desc.htmlText = _loc2_.res; + this.strategy_name.text = this.currMc.getData().templateStrategy.name; + this.grade.text = "Lv." + _loc2_.level; + _loc3_ = int(_loc2_.highestProficiency); + _loc4_ = int(_loc2_.proficiency); + this.needItems = int(this.currMc.getData().templateStrategy.consumption); + this.str_value.text = this.needItems + ""; + this.nextTime.text = PublicMethod.getTimeStr(this.currMc.getData().templateStrategy.coolingTime); + this.mastery_bar.setMaxValue(_loc3_); + this.mastery_bar.setCurValue(_loc4_); + this.cur_strValue.text = this.items + ""; + this.coolTime = _loc2_.coolTime; + this.setTimeStr(); + this.startTime(); + } + } + + private function setTimeStr() : void + { + if(this.coolTime <= 1) + { + this.remain_Time.text = ""; + this.remain_Time.visible = false; + this.clearColling.visible = false; + this.useBtn.setEnable(); + } + else + { + if(!this.remain_Time.visible) + { + this.remain_Time.text = ""; + this.remain_Time.visible = true; + this.clearColling.visible = true; + } + this.useBtn.setUnEnable(); + this.remain_Time.text = PublicMethod.getTimeStr1(this.coolTime); + } + } + + private function startTime() : void + { + if(this.coolTime > 0) + { + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timeframe); + } + if(!this.timer.running) + { + this.timer.start(); + } + this.addSpeedBtn.visible = true; + } + else + { + this.addSpeedBtn.visible = false; + } + } + + private function timeframe(param1:TimerEvent) : void + { + --this.coolTime; + this.remain_Time.text = PublicMethod.getTimeStr1(this.coolTime); + if(this.coolTime <= 0) + { + this.clearTime(); + this.getJunShiView(this.currMc); + } + } + + private function clearTime() : void + { + if(this.timer != null) + { + this.timer.removeEventListener(TimerEvent.TIMER,this.timeframe); + this.timer.stop(); + this.timer = null; + } + } + + public function showUse(param1:Boolean, param2:int = 0) : void + { + this.useBtn.visible = param1; + this.textBen.visible = !param1; + this.attOutId = param2; + } + + private function useStrategy(param1:MouseEvent) : void + { + if(this.needItems > this.items) + { + MessageBoxUI.getInstance().addMessage("锦囊数不够"); + return; + } + var _loc2_:int = int(this.currMc.getData().id); + var _loc3_:int = int(this.currMc.getData().strategyId); + if(_loc2_ > 0 && _loc3_ > 0) + { + this.useBtn.setUnEnable(); + ConnectService.getInstance().castleService.useJunshiStrategy(_loc2_,_loc3_,this.attOutId); + } + } + + private function useJunshiStrategySucc(param1:StrategyEvent) : void + { + this.useBtn.setEnable(); + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + var _loc2_:String = param1.strategyObj.msg; + MessageBoxUI.getInstance().addMessage(_loc2_); + this.getJunShiView(this.currMc); + } + + private function upStrategyConfig(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("确定花费" + this.needCash + "元宝升级该策略?",this.upStrategy); + } + + private function upStrategy() : void + { + var _loc1_:int = int(this.currMc.getData().id); + var _loc2_:int = int(this.currMc.getData().strategyId); + if(_loc1_ > 0 && _loc2_ > 0) + { + ConnectService.getInstance().castleService.upTemplateStrategy(_loc1_); + } + } + + private function upJunshiStrategySucc(param1:StrategyEvent) : void + { + this.refresh(); + } + + private function addSpeedStrategySucc(param1:StrategyEvent) : void + { + if(this.currMc) + { + this.getJunShiView(this.currMc); + } + } + + public function addSpeed(param1:MouseEvent) : void + { + var _loc2_:int = int(this.currMc.getData().id); + if(_loc2_ <= 0) + { + return; + } + var _loc3_:AddSpeed = new AddSpeed(); + _loc3_.id = _loc2_; + _loc3_.fastQueType = 4; + var _loc4_:AddSpeedUI = AddSpeedUI.getInstance(); + _loc4_.getFastInfo(_loc3_); + _loc4_.addToStage(); + } + + private function addSpeedJunshiStrategySucc(param1:StrategyEvent) : void + { + this.addSpeedBtn.setEnable(); + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + MessageBoxUI.getInstance().addMessage("加速成功"); + this.getJunShiView(this.currMc); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/StrategyImgMc.as b/flash_decompiled/com/view/ui/user/StrategyImgMc.as new file mode 100644 index 0000000..504dd02 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/StrategyImgMc.as @@ -0,0 +1,230 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.newdata.user.NewUserData; + import com.view.tip.MulTipTitle; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.filters.GlowFilter; + import flash.utils.Timer; + + public class StrategyImgMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var mc:MovieClip; + + private var strategyObj:Object; + + private var titleTip:MulTipTitle; + + private var imgLoad:LoadResource; + + private var hasClick:Boolean; + + private var fillers:GlowFilter; + + private var time:int; + + private var timer:Timer; + + public var canUse:Boolean; + + public var strategyName:String; + + private var isCooling:Boolean = false; + + private var func:Function; + + public function StrategyImgMc(param1:Object) + { + super(); + this.canUse = false; + this.getFillers(); + this.strategyObj = param1; + this.mc = this.face.getMovieClip(ClassConfig.lib_ui_bg_11); + addChild(this.mc); + this.mc.str_img.gotoAndStop(1); + this.strategyName = this.strategyObj.templateStrategy.name; + this.mc.textName.text = this.strategyObj.templateStrategy.name; + this.mc.textName.filters = [PublicGlow.getInstance().blackGlow]; + this.checkUserLevel(); + this.imgLoad = new LoadResource("pic/politic/" + this.strategyObj.templateStrategy.logo,this.loadImgBack); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.time = this.strategyObj.coolTime; + if(this.time > 0) + { + this.startTime(); + } + } + + public function setStrategyObj(param1:Object) : void + { + this.strategyObj = param1; + this.time = this.strategyObj.coolTime; + if(this.time > 0) + { + this.startTime(); + } + } + + public function setTime(param1:int) : void + { + this.strategyObj.coolTime = param1; + this.time = this.strategyObj.coolTime; + if(this.time > 0) + { + this.startTime(); + } + } + + public function checkUserLevel() : void + { + var _loc1_:int = NewUserData.getUser().rankId; + if(_loc1_ >= this.strategyObj.templateStrategy.userLevel) + { + if(this.titleTip) + { + if(!this.canUse) + { + this.canUse = true; + PublicMethod.setColor(this); + this.titleTip.setValue(this.strategyObj.templateStrategy.description); + } + } + else + { + this.canUse = true; + PublicMethod.setColor(this); + this.titleTip = new MulTipTitle(this,this.face.stage,this.face.tip_bg,this.strategyObj.templateStrategy.description); + } + } + else if(this.titleTip == null) + { + this.canUse = false; + PublicMethod.setBlack(this); + this.titleTip = new MulTipTitle(this,this.face.stage,this.face.tip_bg,"开通该策略需要君主等级达到 " + this.strategyObj.templateStrategy.userLevel + " 级"); + } + else if(this.canUse) + { + this.canUse = false; + PublicMethod.setBlack(this); + this.titleTip.setValue("开通该策略需要君主等级达到 " + this.strategyObj.templateStrategy.userLevel + " 级"); + } + } + + public function getCooling() : Boolean + { + return this.isCooling; + } + + private function startTime() : void + { + if(this.time > 0) + { + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.timeframe); + } + if(!this.timer.running) + { + this.isCooling = true; + this.timer.start(); + } + } + } + + public function setFunction(param1:Function) : void + { + this.func = param1; + } + + private function timeframe(param1:TimerEvent) : void + { + if(Boolean(this.func)) + { + this.func(this.time); + } + --this.time; + if(this.time <= 0) + { + this.isCooling = false; + this.timer.stop(); + } + } + + private function loadImgBack(param1:Event) : void + { + var _loc2_:Bitmap = param1.target.loader.content; + _loc2_.width = 53; + _loc2_.height = 53; + this.mc.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 24; + this.imgLoad.clear(); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(!this.hasClick) + { + this.mc.str_img.gotoAndStop(1); + this.mc.filters = null; + } + } + + private function mouseOver(param1:MouseEvent) : void + { + if(!this.hasClick) + { + this.mc.str_img.gotoAndStop(2); + this.mc.filters = [this.fillers]; + } + } + + public function mouseClick() : void + { + this.hasClick = true; + this.mc.str_img.gotoAndStop(2); + this.mc.filters = [this.fillers]; + ConnectService.getInstance().castleService.showUseStrategyLimit(this.strategyObj.id); + } + + public function setUnClick() : void + { + this.hasClick = false; + this.mc.str_img.gotoAndStop(1); + this.mc.filters = null; + } + + public function getData() : Object + { + return this.strategyObj; + } + + private function getFillers() : void + { + this.fillers = new GlowFilter(); + this.fillers.color = 2686760; + this.fillers.blurX = 12; + this.fillers.alpha = 1; + this.fillers.blurY = 12; + this.fillers.inner = false; + this.fillers.quality = 1; + this.fillers.strength = 2; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/StrategyUI.as b/flash_decompiled/com/view/ui/user/StrategyUI.as new file mode 100644 index 0000000..253a780 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/StrategyUI.as @@ -0,0 +1,202 @@ +package com.view.ui.user +{ + import com.comfig.CommonData; + import com.control.ConnectService; + import com.control.castle.event.StrategyEvent; + import com.view.newui.UITabBtn; + 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 StrategyUI extends BaseUI + { + + private static var instance:StrategyUI; + + private var startPage:int; + + public var btnArr:Array; + + private var btn_1:UITabBtn; + + private var btn_2:UITabBtn; + + private var paneBg:UIWindowBg; + + private var neizhengArr:Array; + + private var junshiArr:Array; + + private var strategy1:Strategy1; + + private var strategy2:Strategy2; + + private var showUseBtn:Boolean; + + private var attOutId:int; + + private var preBtn:UITabBtn; + + public function StrategyUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_junzhucelue); + this.createUI(); + } + + public static function getInstance() : StrategyUI + { + if(instance == null) + { + instance = new StrategyUI(); + } + return instance; + } + + public function setStartPage(param1:int) : void + { + this.startPage = param1; + } + + override public function setPosition() : void + { + } + + override public function createUI() : void + { + var _loc1_:int = 0; + var _loc2_:UITabBtn = null; + this.btn_1 = new UITabBtn("内政策略",2); + this.btn_2 = new UITabBtn("军事策略",2); + this.btnArr = new Array(); + this.btnArr.push(this.btn_1); + this.btnArr.push(this.btn_2); + this.btn_1.onClick = this.clickNeiZhen; + this.btn_2.onClick = this.clickJunshi; + for each(_loc2_ in this.btnArr) + { + addChild(_loc2_); + _loc2_.x = 25 + _loc1_ * 66; + _loc2_.y = 40; + _loc1_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_ALL,this.getAllStrategy); + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_UseJunShi,this.useJunshiStrategySucc); + if(this.neizhengArr == null || this.neizhengArr.length <= 0) + { + ConnectService.getInstance().castleService.showOfficeOper4People(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(StrategyEvent.Strategy_ALL,this.getAllStrategy); + ConnectService.getInstance().removeEventListener(StrategyEvent.Strategy_UseJunShi,this.useJunshiStrategySucc); + } + + private function useJunshiStrategySucc(param1:StrategyEvent) : void + { + this.closeUI(null); + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function getAllStrategy(param1:StrategyEvent) : void + { + this.neizhengArr = param1.strategyObj.neizheng as Array; + this.junshiArr = param1.strategyObj.junshi as Array; + if(this.startPage == 0) + { + this.btn_1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + else + { + this.btn_2.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + } + + private function clickJunshi(param1:MouseEvent) : void + { + if(CommonData.open_junshi == 0) + { + this.btn_2.select = false; + MessageBoxUI.getInstance().addMessage("敬请期待。"); + return; + } + this.startPage = 1; + this.btn_1.select = false; + this.btn_2.select = true; + if(this.strategy2 == null) + { + this.strategy2 = new Strategy2(); + this.strategy2.initData(this.junshiArr); + } + this.paneBg.addChild(this.strategy2); + if(this.showUseBtn) + { + this.strategy2.showUse(true,this.attOutId); + } + else + { + this.strategy2.showUse(false); + } + if(Boolean(this.strategy1) && this.paneBg.contains(this.strategy1)) + { + this.paneBg.removeChild(this.strategy1); + } + } + + public function showUse(param1:Boolean, param2:int = 0) : void + { + this.showUseBtn = param1; + this.attOutId = param2; + if(Boolean(this.strategy2) && this.showUseBtn) + { + this.strategy2.showUse(true,param2); + } + if(this.showUseBtn && this.strategy2 == null) + { + this.startPage = 1; + } + } + + private function clickNeiZhen(param1:MouseEvent) : void + { + this.startPage = 0; + this.btn_1.select = true; + this.btn_2.select = false; + if(this.strategy1 == null) + { + this.strategy1 = new Strategy1(); + this.strategy1.initData(this.neizhengArr); + } + this.paneBg.addChild(this.strategy1); + if(Boolean(this.strategy2) && this.paneBg.contains(this.strategy2)) + { + this.paneBg.removeChild(this.strategy2); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/SunCasInfoUI.as b/flash_decompiled/com/view/ui/user/SunCasInfoUI.as new file mode 100644 index 0000000..370cdb6 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/SunCasInfoUI.as @@ -0,0 +1,126 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.view.newui.UITable; + import com.view.newui.UIWindowBg; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class SunCasInfoUI extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var milMc:MovieClip; + + private var econMc:MovieClip; + + private var milText:TextField; + + private var scrollPane:ScrollPane; + + private var listMc:Sprite; + + private var listArr:Vector.; + + public function SunCasInfoUI() + { + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(87,70); + addChild(_loc1_); + this.listArr = new Vector.(); + this.milMc = this.face.getMovieClip(ClassConfig.ui_economic); + this.milMc.gotoAndStop(2); + this.econMc = this.face.getMovieClip(ClassConfig.ui_military); + this.econMc.gotoAndStop(2); + this.milText = PublicMethod.getTextFieldWithFillter(16763749,108); + this.milText.multiline = true; + this.milText.wordWrap = true; + this.milText.width = 105; + this.milText.height = 100; + _loc1_.addChild(this.milMc); + this.milMc.x = 2; + this.milMc.y = 2; + this.milMc.visible = false; + _loc1_.addChild(this.econMc); + this.econMc.x = 2; + this.econMc.y = 2; + this.econMc.visible = false; + addChild(this.milText); + this.milText.x = 105; + var _loc2_:TextFormat = new TextFormat(); + _loc2_.leading = 4; + this.milText.defaultTextFormat = _loc2_; + var _loc3_:Array = ["分城建筑","等 级"]; + var _loc4_:Array = [130,77]; + var _loc5_:UITable = new UITable(); + _loc5_.drawLine = false; + _loc5_.install(8,_loc3_,_loc4_); + addChild(_loc5_); + _loc5_.x = 0; + _loc5_.y = 100; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(204,200); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc5_.addChild(this.scrollPane); + this.scrollPane.x = 1; + this.scrollPane.y = 25; + this.listMc = new Sprite(); + this.scrollPane.source = this.listMc; + } + + public function setData(param1:Object) : void + { + var _loc3_:* = undefined; + var _loc4_:BuildLineMc = null; + if(param1.casType == "military") + { + this.econMc.visible = false; + this.milMc.visible = true; + this.milText.text = "军镇是募兵养兵的军事领地,可以为主城提供大批训练有素的战斗人员。"; + } + else + { + this.econMc.visible = true; + this.milMc.visible = false; + this.milText.text = "封邑是获取赋税资源的经济领地,可以为主城提供源源不断的资源供给。"; + } + var _loc2_:Array = param1.buildingList; + this.delLineMc(); + if(Boolean(_loc2_) && _loc2_.length > 0) + { + for(_loc3_ in _loc2_) + { + _loc4_ = new BuildLineMc(); + _loc4_.setData(_loc2_[_loc3_]); + this.listMc.addChild(_loc4_); + _loc4_.y = 25 * _loc3_; + _loc4_.x = 1; + this.listArr.push(_loc4_); + } + this.scrollPane.update(); + } + } + + private function delLineMc() : void + { + var _loc1_:* = undefined; + if(this.listArr.length > 0) + { + for each(_loc1_ in this.listArr) + { + this.listMc.removeChild(_loc1_); + } + this.listArr = new Vector.(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserEquip1.as b/flash_decompiled/com/view/ui/user/UserEquip1.as new file mode 100644 index 0000000..ef635f8 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserEquip1.as @@ -0,0 +1,412 @@ +package com.view.ui.user +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.pack.event.UserPackEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UISmallBtn; + import com.view.newui.UIWindowBg; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.mc.UserEquView; + import com.view.ui.user.mc.UserEquipBg; + import com.view.ui.user.mc.UserItemMc; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 UserEquip1 extends Sprite + { + + private var itemVec:Vector.; + + private var combox:ComboBox; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var userEquView:UserEquView; + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var centerBg:Sprite; + + private var loadImg:LoadResource; + + private var bodyImg:Bitmap; + + private var currType:int = 0; + + public function UserEquip1() + { + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc7_:UserEquipBg = null; + var _loc8_:UserItemMc = null; + this.itemVec = new Vector.(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(323,332); + addChild(this.bg1); + this.bg1.y = 31; + this.bg1.x = 4; + this.bg2 = new UIWindowBg(); + this.bg2.initSecondPanel(277,332); + addChild(this.bg2); + this.bg2.x = this.bg1.width + 8; + this.bg2.y = this.bg1.y; + var _loc1_:int = 1; + while(_loc1_ < 9) + { + _loc7_ = new UserEquipBg(_loc1_); + this.bg1.addChild(_loc7_); + this.itemVec.push(_loc7_); + _loc7_.addEventListener(MouseEvent.CLICK,this.clickEquItem); + _loc1_++; + } + var _loc2_:UISmallBtn = new UISmallBtn("展 示",2); + this.centerBg = new Sprite(); + this.bg1.addChild(this.centerBg); + this.centerBg.x = 76; + this.centerBg.y = 13; + this.userEquView = new UserEquView(); + this.bg1.addChild(this.userEquView); + this.userEquView.x = this.centerBg.x; + this.userEquView.y = 13; + this.label1 = PublicMethod.getTextFieldWithFillter(10852210,60); + this.label2 = PublicMethod.getTextFieldWithFillter(10852210,60); + this.label3 = PublicMethod.getTextFieldWithFillter(10852210,60); + this.label4 = PublicMethod.getTextFieldWithFillter(10852210,60); + this.label5 = PublicMethod.getTextFieldWithFillter(10852210,60); + this.value1 = PublicMethod.getTextFieldWithFillter(65280,60); + this.value2 = PublicMethod.getTextFieldWithFillter(65280,60); + this.value3 = PublicMethod.getTextFieldWithFillter(65280,60); + this.value4 = PublicMethod.getTextFieldWithFillter(65280,60); + this.value5 = PublicMethod.getTextFieldWithFillter(65280,60); + this.bg1.addChild(this.label1); + this.bg1.addChild(this.label2); + this.bg1.addChild(this.label3); + this.bg1.addChild(this.label4); + this.bg1.addChild(this.label5); + this.bg1.addChild(this.value1); + this.bg1.addChild(this.value2); + this.bg1.addChild(this.value3); + this.bg1.addChild(this.value4); + this.bg1.addChild(this.value5); + this.label1.text = "武 力 点:"; + this.value1.text = "+0"; + this.label2.text = "部队伤害:"; + this.value2.text = "+0.0%"; + this.label3.text = "伤害减免:"; + this.value3.text = "+0.0%"; + this.label4.text = "幸 运:"; + this.value4.text = "+0"; + this.label5.text = "诅 咒:"; + this.value5.text = "+0"; + this.label1.x = 10; + this.label1.y = 273; + this.value1.x = 70; + this.value1.y = this.label1.y; + this.label2.x = 10; + this.label2.y = this.label1.y + 20; + this.value2.x = this.value1.x; + this.value2.y = this.label2.y; + this.label3.x = 180; + this.label3.y = this.label2.y; + this.value3.x = 240; + this.value3.y = this.label2.y; + this.label4.x = 10; + this.label4.y = this.label2.y + 20; + this.value4.x = this.value1.x; + this.value4.y = this.label4.y; + this.label5.x = 180; + this.label5.y = this.label4.y; + this.value5.x = this.value3.x; + this.value5.y = this.label4.y; + var _loc3_:TextFormat = new TextFormat(); + _loc3_.align = "center"; + _loc3_.size = 12; + _loc3_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部类型", + "data":0 + }); + this.combox.addItem({ + "label":"头盔", + "data":8 + }); + this.combox.addItem({ + "label":"衣服", + "data":7 + }); + this.combox.addItem({ + "label":"武器", + "data":6 + }); + this.combox.addItem({ + "label":"鞋子", + "data":5 + }); + this.combox.addItem({ + "label":"项链", + "data":4 + }); + this.combox.addItem({ + "label":"腰带", + "data":3 + }); + this.combox.addItem({ + "label":"戒指", + "data":2 + }); + this.combox.addItem({ + "label":"护符", + "data":1 + }); + this.bg2.addChild(this.combox); + this.combox.textField.setStyle("textFormat",_loc3_); + this.combox.dropdown.setRendererStyle("textFormat",_loc3_); + this.combox.selectedItem = this.combox.getItemAt(0); + this.combox.x = 2; + this.combox.y = -24; + this.combox.addEventListener(Event.CHANGE,this.selectColor); + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(273,322); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg2.addChild(this.packScrollPane); + this.packScrollPane.x = 10; + this.packScrollPane.y = 13; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 20) + { + _loc8_ = new UserItemMc(); + this.packMc.addChild(_loc8_); + this.packList.push(_loc8_); + _loc4_ = _loc6_ % 4; + _loc5_ = _loc6_ / 4; + _loc8_.x = 64 * _loc4_; + _loc8_.y = 64 * _loc5_; + _loc8_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc6_++; + } + this.packScrollPane.update(); + this.bg1.addChild(_loc2_); + _loc2_.x = 150; + _loc2_.y = 240; + _loc2_.onClick = this.showUserEqu; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.loadUserEquList); + ConnectService.getInstance().addEventListener(UserPackEvent.USER_EQUIP_EQ,this.equipEqResult); + this.loadBodyBg(); + } + + private function showUserEqu(param1:MouseEvent) : void + { + ConnectService.getInstance().chatService.showItem(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:UserItemMc = param1.currentTarget as UserItemMc; + if(_loc2_.getObj() == null) + { + return; + } + ConnectService.getInstance().packService.equipEqById(_loc2_.getObj().id); + } + + private function loadBodyBg() : void + { + if(this.bodyImg == null) + { + this.loadImg = new LoadResource("pic/king/kingRoleBg.jpg",this.loadImgBack); + } + } + + private function loadImgBack(param1:Event) : void + { + this.bodyImg = param1.target.loader.content; + this.centerBg.addChild(this.bodyImg); + this.bodyImg.width = 181; + this.loadImg.clear(); + } + + private function selectColor(param1:Event) : void + { + this.currType = this.combox.selectedItem.data; + this.initPackList(); + } + + public function setEquipList() : void + { + this.loadUserEquList(null); + } + + private function loadUserEquList(param1:DevEvent) : void + { + this.initEquList(); + this.initPackList(); + } + + private function equipEqResult(param1:UserPackEvent) : void + { + this.initEquList(); + this.initPackList(); + } + + private function initEquList() : void + { + var _loc6_:UserEquipBg = null; + var _loc7_:PackItem = null; + var _loc1_:int = 0; + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + for each(_loc6_ in this.itemVec) + { + _loc7_ = PakState.getUserItemByChildType(_loc6_.type); + _loc6_.setItemObj(_loc7_); + if(_loc7_) + { + switch(_loc7_.effType) + { + case 1: + _loc1_ += int(_loc7_.para1); + break; + case 2: + _loc2_ += int(_loc7_.para1); + break; + case 3: + _loc4_ += int(_loc7_.para1); + break; + case 4: + _loc5_ += int(_loc7_.para1); + } + } + if(_loc6_.type > 4) + { + this.userEquView.setAsset(_loc6_.type,_loc7_); + } + } + this.value1.text = _loc1_ + ""; + if(_loc5_ == 0) + { + this.value2.text = "0.0%"; + } + else + { + this.value2.text = _loc5_ / 10 + "%"; + } + if(_loc4_ == 0) + { + this.value3.text = "0.0%"; + } + else + { + this.value3.text = _loc4_ / 10 + "%"; + } + this.value4.text = _loc2_ + ""; + this.value5.text = _loc2_ + ""; + } + + private function initPackList() : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:* = undefined; + var _loc5_:UserItemMc = null; + this.clearPackList(); + var _loc1_:Vector. = PakState.getUserItemListByChildType(this.currType); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc4_ in _loc1_) + { + if(_loc4_ > 19) + { + _loc5_ = new UserItemMc(); + this.packMc.addChild(_loc5_); + this.packList.push(_loc5_); + _loc2_ = _loc4_ % 4; + _loc3_ = _loc4_ / 4; + _loc5_.x = 64 * _loc2_; + _loc5_.y = 64 * _loc3_; + _loc5_.setItemObj(_loc1_[_loc4_]); + _loc5_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc4_].setItemObj(_loc1_[_loc4_]); + } + } + } + this.packScrollPane.update(); + } + + private function clearPackList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 19) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + } + + private function clickEquItem(param1:MouseEvent) : void + { + var _loc2_:UserEquipBg = param1.currentTarget as UserEquipBg; + if(_loc2_.getObj() == null) + { + return; + } + ConnectService.getInstance().packService.setUnEqu(_loc2_.getObj().id); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserEquip2.as b/flash_decompiled/com/view/ui/user/UserEquip2.as new file mode 100644 index 0000000..535eeb8 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserEquip2.as @@ -0,0 +1,381 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.sprite.BorderMc2; + import com.view.mc.sprite.ExpBar; + import com.view.newui.UIButton; + import com.view.newui.UITable; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.mc.PiliangStrongUI; + import com.view.ui.user.mc.UserEquipItem1; + import com.view.ui.user.mc.UserItemMc; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 UserEquip2 extends Sprite + { + + private var bg1:UIWindowBg; + + private var combox:ComboBox; + + private var face:InstallFace; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var itemNumsText:TextField; + + private var strongBtn:UIButton; + + private var mulStringBtn:UIButton; + + private var itemNameText:TextField; + + private var currProText:TextField; + + private var nextProText:TextField; + + private var expBar:ExpBar; + + private var selectItem:UserItemMc; + + private var currColor:int = 0; + + private var itemNums:int; + + private var lastItem:UserEquipItem1; + + private var piliangUI:PiliangStrongUI; + + public function UserEquip2() + { + var _loc4_:UITable = null; + var _loc13_:UserEquipItem1 = null; + this.face = InstallFace.getInstance(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(614,332); + addChild(this.bg1); + this.bg1.y = 31; + this.bg1.x = 4; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部品质", + "data":0 + }); + this.combox.addItem({ + "label":"白色品质", + "data":1 + }); + this.combox.addItem({ + "label":"绿色品质", + "data":2 + }); + this.combox.addItem({ + "label":"蓝色品质", + "data":3 + }); + this.combox.addItem({ + "label":"紫色品质", + "data":4 + }); + this.combox.addItem({ + "label":"橙色品质", + "data":5 + }); + this.bg1.addChild(this.combox); + this.combox.x = 5; + this.combox.y = 6; + this.combox.textField.setStyle("textFormat",_loc1_); + this.combox.dropdown.setRendererStyle("textFormat",_loc1_); + this.combox.addEventListener(Event.CHANGE,this.selectColor); + this.combox.selectedItem = this.combox.getItemAt(0); + var _loc2_:Array = ["装备名称","装备等级"]; + var _loc3_:Array = [130,72]; + _loc4_ = new UITable(); + _loc4_.drawLine = false; + _loc4_.install(11,_loc2_,_loc3_); + this.bg1.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = 34; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(196,276); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc4_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 11) + { + _loc13_ = new UserEquipItem1(); + this.packMc.addChild(_loc13_); + this.packList.push(_loc13_); + _loc13_.y = _loc5_ * 25; + _loc13_.x = 1; + _loc13_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + this.packScrollPane.update(); + var _loc6_:Sprite = new Sprite(); + var _loc7_:Sprite = this.face.getSprite(ClassConfig.lib_img_border); + var _loc8_:Sprite = new Scale9Grid(_loc7_,361,245); + this.bg1.addChild(_loc6_); + _loc6_.x = 212; + _loc6_.y = 10; + var _loc9_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_img_usereqbg)); + _loc6_.addChild(_loc9_); + _loc9_.width = 400; + _loc9_.height = 282; + _loc6_.addChild(_loc8_); + this.selectItem = new UserItemMc(); + _loc6_.addChild(this.selectItem); + this.selectItem.x = 170; + this.selectItem.y = 34; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(16777215,65); + _loc10_.text = "强化进度:"; + _loc6_.addChild(_loc10_); + _loc10_.x = 90; + _loc10_.y = 130; + this.expBar = new ExpBar(); + this.expBar.setSize(150); + this.expBar.setLength(10); + this.expBar.setCurValue(0); + _loc6_.addChild(this.expBar); + this.expBar.x = _loc10_.x + _loc10_.width; + this.expBar.y = _loc10_.y + 4; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(16777215,180); + _loc11_.height = 40; + _loc11_.multiline = true; + _loc11_.wordWrap = true; + _loc11_.textColor = 16777215; + _loc11_.htmlText = "每次强化需要消耗一个逐雷砂
(可通过分解君主装备获得)"; + _loc6_.addChild(_loc11_); + _loc11_.x = 130; + _loc11_.y = 220; + _loc11_.filters = [PublicGlow.getInstance().blackGlow]; + var _loc12_:BorderMc2 = new BorderMc2("所选装备",80); + _loc6_.addChild(_loc12_); + _loc12_.x = 160; + _loc12_.y = 1; + this.strongBtn = new UIButton("强 化",2); + _loc6_.addChild(this.strongBtn); + this.strongBtn.x = 120; + this.strongBtn.y = 295; + this.strongBtn.onClick = this.destoryItem; + this.mulStringBtn = new UIButton("批量强化",2); + _loc6_.addChild(this.mulStringBtn); + this.mulStringBtn.x = this.strongBtn.x + 82; + this.mulStringBtn.y = this.strongBtn.y; + this.mulStringBtn.onClick = this.piliangStrong; + this.itemNameText = PublicMethod.getTextFieldWithFillter(16777215,180); + _loc6_.addChild(this.itemNameText); + this.itemNameText.x = 130; + this.itemNameText.y = 106; + this.itemNameText.filters = [PublicGlow.getInstance().blackGlow]; + this.currProText = PublicMethod.getTextFieldWithFillter(16777215,200); + _loc6_.addChild(this.currProText); + this.currProText.x = 110; + this.currProText.y = 158; + this.currProText.filters = [PublicGlow.getInstance().blackGlow]; + this.nextProText = PublicMethod.getTextFieldWithFillter(16777215,200); + _loc6_.addChild(this.nextProText); + this.nextProText.x = 98; + this.nextProText.y = 186; + this.nextProText.filters = [PublicGlow.getInstance().blackGlow]; + this.itemNumsText = PublicMethod.getTextFieldWithFillter(65280,100); + _loc6_.addChild(this.itemNumsText); + this.itemNumsText.text = "逐雷砂:0"; + this.itemNumsText.x = 170; + this.itemNumsText.y = 256; + this.itemNumsText.filters = [PublicGlow.getInstance().blackGlow]; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + ConnectService.getInstance().addEventListener(UserEvent.USER_EquipItemStrong,this.strongEqResult); + addEventListener(Event.REMOVED_FROM_STAGE,this.clearUI); + } + + private function selectColor(param1:Event) : void + { + this.currColor = this.combox.selectedItem.data; + this.initEquList(); + } + + private function setItemCount(param1:DevEvent) : void + { + this.itemNums = PakState.getItemsByEntId(10471260); + this.itemNumsText.text = "逐雷砂:" + this.itemNums; + this.initEquList(); + } + + private function strongEqResult(param1:UserEvent) : void + { + this.setItemCount(null); + } + + public function setEquipList() : void + { + this.setItemCount(null); + } + + private function initEquList() : void + { + var _loc2_:* = undefined; + var _loc3_:UserEquipItem1 = null; + this.clearItemList(); + var _loc1_:Vector. = PakState.getUserItemListByColor(this.currColor); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 10) + { + _loc3_ = new UserEquipItem1(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 25 * _loc2_; + _loc3_.setItemObj(_loc1_[_loc2_]); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc2_].setItemObj(_loc1_[_loc2_]); + this.packList[_loc2_].setClick(false); + } + } + } + this.packScrollPane.update(); + if(this.lastItem) + { + this.lastItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + private function setItemSelect(param1:Boolean) : void + { + var _loc2_:UserEquipItem1 = null; + for each(_loc2_ in this.packList) + { + _loc2_.setClick(param1); + } + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:UserEquipItem1 = param1.currentTarget as UserEquipItem1; + if(_loc2_.getItemObj() == null) + { + this.initViewItem(null); + return; + } + if(this.lastItem) + { + this.lastItem.setClick(false); + } + this.lastItem = _loc2_; + this.lastItem.setClick(true); + this.initViewItem(this.lastItem.getItemObj()); + } + + private function initViewItem(param1:PackItem) : void + { + if(param1 == null) + { + this.itemNameText.htmlText = ""; + this.currProText.htmlText = ""; + this.nextProText.htmlText = ""; + this.expBar.setCurValue(0); + this.selectItem.setItemObj(null); + return; + } + this.itemNameText.htmlText = "装备名称:" + param1.viewMap.showName; + this.currProText.htmlText = "当前属性:" + param1.currDesc; + this.nextProText.htmlText = "下一级属性:" + param1.nextDesc; + this.expBar.setCurValue(param1.strongLevel); + this.selectItem.setItemObj(param1); + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 10) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function destoryItem(param1:MouseEvent) : void + { + if(this.lastItem == null || this.lastItem.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要强化的装备"); + return; + } + ConnectService.getInstance().userService.strongUserEqu(this.lastItem.getItemObj().id,1); + } + + private function piliangStrong(param1:MouseEvent) : void + { + if(this.lastItem == null || this.lastItem.getItemObj() == null) + { + MessageBoxUI.getInstance().addMessage("请选择要强化的装备"); + return; + } + if(this.piliangUI == null) + { + this.piliangUI = new PiliangStrongUI(); + this.piliangUI.x = int(width / 2 - this.piliangUI.width / 2); + this.piliangUI.y = 70; + } + this.bg1.addChild(this.piliangUI); + this.piliangUI.seItemId(this.lastItem.getItemObj().id,this.itemNums); + } + + private function clearUI(param1:Event) : void + { + if(Boolean(this.piliangUI) && this.bg1.contains(this.piliangUI)) + { + this.bg1.removeChild(this.piliangUI); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserEquip3.as b/flash_decompiled/com/view/ui/user/UserEquip3.as new file mode 100644 index 0000000..412ba70 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserEquip3.as @@ -0,0 +1,309 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.sprite.BorderMc2; + import com.view.newui.UIButton; + import com.view.newui.UICheckBtn; + import com.view.newui.UITable; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.mc.UserEquipItem2; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 UserEquip3 extends Sprite + { + + private var bg1:UIWindowBg; + + private var combox:ComboBox; + + private var face:InstallFace; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var itemNumsText:TextField; + + private var reduceBtn:UIButton; + + private var allCheckBox:UICheckBtn; + + private var currColor:int = 0; + + private var fenjieResultText:TextField; + + public function UserEquip3() + { + var _loc4_:UITable = null; + var _loc8_:Sprite = null; + var _loc11_:UserEquipItem2 = null; + this.face = InstallFace.getInstance(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(614,332); + addChild(this.bg1); + this.bg1.y = 31; + this.bg1.x = 4; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部品质", + "data":0 + }); + this.combox.addItem({ + "label":"白色品质", + "data":1 + }); + this.combox.addItem({ + "label":"绿色品质", + "data":2 + }); + this.combox.addItem({ + "label":"蓝色品质", + "data":3 + }); + this.combox.addItem({ + "label":"紫色品质", + "data":4 + }); + this.combox.addItem({ + "label":"橙色品质", + "data":5 + }); + this.bg1.addChild(this.combox); + this.combox.x = 5; + this.combox.y = 6; + this.combox.textField.setStyle("textFormat",_loc1_); + this.combox.dropdown.setRendererStyle("textFormat",_loc1_); + this.combox.addEventListener(Event.CHANGE,this.selectColor); + this.combox.selectedItem = this.combox.getItemAt(0); + var _loc2_:Array = ["装备名称","装备等级"]; + var _loc3_:Array = [130,72]; + _loc4_ = new UITable(); + _loc4_.drawLine = false; + _loc4_.install(11,_loc2_,_loc3_); + this.bg1.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = 34; + this.allCheckBox = new UICheckBtn(); + _loc4_.addChild(this.allCheckBox); + this.allCheckBox.x = 8; + this.allCheckBox.y = 4; + this.allCheckBox.onClick = this.selectAll; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(196,276); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc4_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 11) + { + _loc11_ = new UserEquipItem2(); + this.packMc.addChild(_loc11_); + this.packList.push(_loc11_); + _loc11_.y = 25 * _loc5_; + _loc11_.x = 1; + _loc11_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + this.packScrollPane.update(); + var _loc6_:Sprite = new Sprite(); + var _loc7_:Sprite = this.face.getSprite(ClassConfig.lib_img_border); + _loc8_ = new Scale9Grid(_loc7_,361,245); + this.bg1.addChild(_loc6_); + _loc6_.x = 212; + _loc6_.y = 10; + var _loc9_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_img_usereqbg)); + _loc6_.addChild(_loc9_); + _loc9_.width = 400; + _loc9_.height = 282; + _loc6_.addChild(_loc8_); + this.fenjieResultText = PublicMethod.getTextFieldWithFillter(65280,300); + _loc6_.addChild(this.fenjieResultText); + this.fenjieResultText.x = 100; + this.fenjieResultText.y = 55; + var _loc10_:BorderMc2 = new BorderMc2("分解信息",80); + _loc6_.addChild(_loc10_); + _loc10_.x = 160; + _loc10_.y = 1; + this.reduceBtn = new UIButton("分 解",2); + _loc6_.addChild(this.reduceBtn); + this.reduceBtn.x = 160; + this.reduceBtn.y = 295; + this.reduceBtn.onClick = this.destoryItem; + this.itemNumsText = PublicMethod.getTextFieldWithFillter(16777215,100); + _loc6_.addChild(this.itemNumsText); + this.itemNumsText.x = this.reduceBtn.x + 80; + this.itemNumsText.y = this.reduceBtn.y + 5; + this.itemNumsText.text = "逐雷砂:0"; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + ConnectService.getInstance().addEventListener(UserEvent.USER_EquipItemFenjie,this.fenjieEqResult); + } + + private function selectColor(param1:Event) : void + { + if(this.allCheckBox.getSelect()) + { + this.allCheckBox.setUnSelect(); + } + this.currColor = this.combox.selectedItem.data; + this.initEquList(); + } + + private function setItemCount(param1:DevEvent) : void + { + var _loc2_:int = PakState.getItemsByEntId(10471260); + this.itemNumsText.text = "逐雷砂:" + _loc2_; + this.initEquList(); + } + + private function fenjieEqResult(param1:UserEvent) : void + { + this.setItemCount(null); + } + + public function setEquipList() : void + { + this.setItemCount(null); + } + + private function initEquList() : void + { + var _loc2_:* = undefined; + var _loc3_:UserEquipItem2 = null; + this.clearItemList(); + var _loc1_:Vector. = PakState.getUserItemListByColor(this.currColor); + this.clearItemList(); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 10) + { + _loc3_ = new UserEquipItem2(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 24 * _loc2_; + _loc3_.setItemObj(_loc1_[_loc2_]); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc2_].setItemObj(_loc1_[_loc2_]); + this.packList[_loc2_].setClick(false); + } + } + } + this.packScrollPane.update(); + } + + private function selectAll(param1:MouseEvent) : void + { + if(this.allCheckBox.getSelect()) + { + this.allCheckBox.setSelect(); + } + else + { + this.allCheckBox.setUnSelect(); + } + this.setItemSelect(this.allCheckBox.getSelect()); + } + + private function setItemSelect(param1:Boolean) : void + { + var _loc2_:UserEquipItem2 = null; + for each(_loc2_ in this.packList) + { + _loc2_.setClick(param1); + } + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:UserEquipItem2 = param1.currentTarget as UserEquipItem2; + if(_loc2_.getSelectStatus()) + { + _loc2_.setClick(false); + } + else + { + _loc2_.setClick(true); + } + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 10) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function destoryItem(param1:MouseEvent) : void + { + var _loc3_:UserEquipItem2 = null; + var _loc4_:Object = null; + this.fenjieResultText.text = ""; + var _loc2_:Array = new Array(); + for each(_loc3_ in this.packList) + { + if(_loc3_.getItemObj() != null && _loc3_.getSelectStatus()) + { + _loc2_.push(_loc3_.getItemObj().id); + } + } + if(_loc2_.length == 0) + { + MessageBoxUI.getInstance().addMessage("请选择要分解的装备"); + return; + } + if(_loc2_.length > 0) + { + _loc4_ = new Object(); + _loc4_.itemList = _loc2_; + ConnectService.getInstance().userService.fenJie(_loc4_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserEquip4.as b/flash_decompiled/com/view/ui/user/UserEquip4.as new file mode 100644 index 0000000..6892483 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserEquip4.as @@ -0,0 +1,645 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.mc.LiuYuMc; + import com.view.ui.user.mc.UserEquipItem3; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UserEquip4 extends Sprite + { + + private var bg1:UIWindowBg; + + private var combox:ComboBox; + + private var face:InstallFace; + + private var hole1Text:TextField; + + private var hole2Text:TextField; + + private var hole3Text:TextField; + + private var hole4Text:TextField; + + private var stage_txt:TextField; + + private var bg2:UIWindowBg; + + private var bg3:UIWindowBg; + + private var itemImgSp2:Sprite; + + private var itemImgSp3:Sprite; + + private var itemImgSp4:Sprite; + + private var itemImgSp5:Sprite; + + private var selectItemGemVew:Vector.; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var del_all:UIButton; + + private var reduceBtn:UIButton; + + private var allCheckBox:UICheckBtn; + + private var childType:int = 0; + + private var fenjieResultText:TextField; + + private var lastItem:UserEquipItem3; + + private var selectPackItem:PackItem; + + private var currHoleNo:int; + + private var selectJewUI:SelectLiuYuUI; + + public function UserEquip4() + { + var _loc4_:UITable = null; + var _loc5_:TextField = null; + var _loc10_:TextField = null; + var _loc19_:UserEquipItem3 = null; + var _loc20_:LiuYuMc = null; + this.face = InstallFace.getInstance(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initSecondPanel(614,332); + addChild(this.bg1); + this.bg1.y = 31; + this.bg1.x = 4; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部位置", + "data":0 + }); + this.combox.addItem({ + "label":"头盔", + "data":8 + }); + this.combox.addItem({ + "label":"衣服", + "data":7 + }); + this.combox.addItem({ + "label":"武器", + "data":6 + }); + this.combox.addItem({ + "label":"鞋子", + "data":5 + }); + this.combox.addItem({ + "label":"项链", + "data":4 + }); + this.combox.addItem({ + "label":"腰带", + "data":3 + }); + this.combox.addItem({ + "label":"戒指", + "data":2 + }); + this.combox.addItem({ + "label":"护符", + "data":1 + }); + this.combox.width = 80; + this.bg1.addChild(this.combox); + this.combox.x = 12; + this.combox.y = 6; + this.combox.textField.setStyle("textFormat",_loc1_); + this.combox.dropdown.setRendererStyle("textFormat",_loc1_); + this.combox.addEventListener(Event.CHANGE,this.selectColor); + this.combox.selectedItem = this.combox.getItemAt(0); + var _loc2_:Array = ["装备名称","已镶嵌"]; + var _loc3_:Array = [140,82]; + _loc4_ = new UITable(); + _loc4_.drawLine = false; + _loc4_.install(11,_loc2_,_loc3_); + this.bg1.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = 34; + this.allCheckBox = new UICheckBtn(); + this.bg1.addChild(this.allCheckBox); + this.allCheckBox.x = 89; + this.allCheckBox.y = 8; + this.allCheckBox.onClick = this.selectAll; + this.allCheckBox.visible = false; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,100); + this.bg1.addChild(_loc5_); + _loc5_.x = 113; + _loc5_.y = 8; + _loc5_.text = "显示包裹中装备"; + _loc5_.visible = false; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(216,276); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc4_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 11) + { + _loc19_ = new UserEquipItem3(); + this.packMc.addChild(_loc19_); + this.packList.push(_loc19_); + _loc19_.y = _loc6_ * 25; + _loc19_.x = 1; + _loc19_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc6_++; + } + this.packScrollPane.update(); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(380,146); + this.bg1.addChild(this.bg2); + this.bg2.x = 230; + this.bg2.y = 4; + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(380,165); + this.bg1.addChild(this.bg3); + this.bg3.x = this.bg2.x; + this.bg3.y = this.bg2.y + this.bg2.height + 3; + var _loc7_:UITitleBg = new UITitleBg("已镶嵌琉玉",this.bg3.width); + this.bg2.addChild(_loc7_); + _loc7_.x = int(this.bg2.width / 2 - _loc7_.width / 2); + var _loc8_:UITitleBg = new UITitleBg("镶嵌属性",this.bg3.width); + this.bg3.addChild(_loc8_); + _loc8_.x = int(this.bg3.width / 2 - _loc8_.width / 2); + this.itemImgSp2 = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp2); + this.itemImgSp2.x = 25; + this.itemImgSp2.y = 56; + this.itemImgSp3 = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp3); + this.itemImgSp3.x = this.itemImgSp2.x + 95; + this.itemImgSp3.y = this.itemImgSp2.y; + this.itemImgSp4 = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp4); + this.itemImgSp4.x = this.itemImgSp3.x + 95; + this.itemImgSp4.y = this.itemImgSp2.y; + this.itemImgSp5 = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),49,49); + this.bg2.addChild(this.itemImgSp5); + this.itemImgSp5.x = this.itemImgSp4.x + 95; + this.itemImgSp5.y = this.itemImgSp2.y; + this.selectItemGemVew = new Vector.(); + var _loc9_:int = 1; + while(_loc9_ < 5) + { + _loc20_ = new LiuYuMc(_loc9_); + this.selectItemGemVew.push(_loc20_); + switch(_loc9_) + { + case 1: + this.itemImgSp2.addChild(_loc20_); + break; + case 2: + this.itemImgSp3.addChild(_loc20_); + break; + case 3: + this.itemImgSp4.addChild(_loc20_); + break; + case 4: + this.itemImgSp5.addChild(_loc20_); + } + _loc20_.x = 3; + _loc20_.y = 3; + _loc20_.addBtn.onClick = this.addGem; + _loc20_.delBtn.onClick = this.delGem; + _loc9_++; + } + this.del_all = new UIButton("一键摘除",2,10); + this.bg2.addChild(this.del_all); + this.del_all.x = 230 - 55; + this.del_all.y = 124; + this.del_all.onClick = this.delAllGem; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc10_.text = "已镶嵌:"; + this.bg3.addChild(_loc10_); + _loc10_.x = 20; + _loc10_.y = 30; + this.stage_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg3.addChild(this.stage_txt); + this.stage_txt.x = _loc10_.x + 50; + this.stage_txt.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc11_.text = "孔 1:"; + this.bg3.addChild(_loc11_); + _loc11_.x = _loc10_.x; + _loc11_.y = _loc10_.y + 22; + this.hole1Text = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg3.addChild(this.hole1Text); + this.hole1Text.x = this.stage_txt.x; + this.hole1Text.y = _loc11_.y; + var _loc12_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc12_.text = "孔 2:"; + this.bg3.addChild(_loc12_); + _loc12_.x = _loc11_.x + 170; + _loc12_.y = _loc11_.y; + this.hole2Text = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg3.addChild(this.hole2Text); + this.hole2Text.x = _loc12_.x + 50; + this.hole2Text.y = _loc12_.y; + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc13_.text = "孔 3:"; + this.bg3.addChild(_loc13_); + _loc13_.x = _loc11_.x; + _loc13_.y = _loc11_.y + 22; + this.hole3Text = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg3.addChild(this.hole3Text); + this.hole3Text.x = this.hole1Text.x; + this.hole3Text.y = _loc13_.y; + var _loc14_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,65); + _loc14_.text = "孔 4:"; + this.bg3.addChild(_loc14_); + _loc14_.x = _loc12_.x; + _loc14_.y = _loc13_.y; + this.hole4Text = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg3.addChild(this.hole4Text); + this.hole4Text.x = this.hole2Text.x; + this.hole4Text.y = _loc14_.y; + var _loc15_:Sprite = PublicMethod.getTrLine(370); + this.bg3.addChild(_loc15_); + _loc15_.x = 20; + _loc15_.y = 105; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,265); + _loc16_.text = "1、君主装备必须脱下才能镶嵌或取出琉玉"; + this.bg3.addChild(_loc16_); + _loc16_.x = 20; + _loc16_.y = _loc15_.y + 5; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,265); + _loc17_.text = "2、一件装备上同类型琉玉只能装备一颗。"; + this.bg3.addChild(_loc17_); + _loc17_.x = _loc16_.x; + _loc17_.y = _loc16_.y + 20; + var _loc18_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,265); + _loc18_.text = "3、琉玉可通过剧情战役系统获得。"; + this.bg3.addChild(_loc18_); + _loc18_.x = _loc16_.x; + _loc18_.y = _loc17_.y + 20; + ConnectService.getInstance().addEventListener(UserEvent.USER_delLiuYu,this.delLiuYuResult); + ConnectService.getInstance().addEventListener(UserEvent.USER_addLiuYu,this.addLiuYuresult); + ConnectService.getInstance().addEventListener(UserEvent.USER_delAllLiuYu,this.addLiuYuresult); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.itemChangeResult); + addEventListener(Event.REMOVED_FROM_STAGE,this.removeFromStage); + } + + private function selectColor(param1:Event) : void + { + if(this.allCheckBox.getSelect()) + { + this.allCheckBox.setUnSelect(); + } + this.childType = this.combox.selectedItem.data; + this.initEquList(); + } + + private function setItemCount(param1:DevEvent) : void + { + this.initEquList(); + } + + private function delLiuYuResult(param1:UserEvent) : void + { + this.setItemCount(null); + } + + private function addLiuYuresult(param1:UserEvent) : void + { + this.setItemCount(null); + } + + public function setEquipList() : void + { + this.setItemCount(null); + } + + private function itemChangeResult(param1:DevEvent) : void + { + this.initEquList(); + } + + private function initEquList() : void + { + var _loc2_:UserEquipItem3 = null; + var _loc3_:* = undefined; + var _loc4_:UserEquipItem3 = null; + this.clearItemList(); + if(PakState.getGetPackListStatus()) + { + PakState.getAllPackList(); + return; + } + var _loc1_:Vector. = PakState.getUserItemListByChildType(this.childType); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc3_ in _loc1_) + { + if(_loc3_ > 10) + { + _loc4_ = new UserEquipItem3(); + this.packMc.addChild(_loc4_); + this.packList.push(_loc4_); + _loc4_.y = 25 * _loc3_; + _loc4_.setItemObj(_loc1_[_loc3_]); + _loc4_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc3_].setItemObj(_loc1_[_loc3_]); + this.packList[_loc3_].setClick(false); + } + } + if(this.lastItem) + { + this.lastItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + else + { + this.packList[0].dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + this.packScrollPane.update(); + } + + private function selectAll(param1:MouseEvent) : void + { + if(this.allCheckBox.getSelect()) + { + this.allCheckBox.setSelect(); + } + else + { + this.allCheckBox.setUnSelect(); + } + this.initEquList(); + } + + private function removeFromStage(param1:Event) : void + { + this.lastItem = null; + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:UserEquipItem3 = param1.currentTarget as UserEquipItem3; + if(this.lastItem) + { + this.lastItem.setClick(false); + } + if(_loc2_.getItemObj() == null) + { + this.initViewItem(null); + return; + } + this.lastItem = _loc2_; + this.lastItem.setClick(true); + this.initViewItem(this.lastItem.getItemObj()); + } + + private function initViewItem(param1:PackItem) : void + { + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:Object = null; + var _loc8_:Object = null; + var _loc9_:Object = null; + var _loc10_:Object = null; + this.selectPackItem = param1; + this.hole1Text.htmlText = ""; + this.hole2Text.htmlText = ""; + this.hole3Text.htmlText = ""; + this.hole4Text.htmlText = ""; + if(this.selectPackItem == null) + { + this.selectItemGemVew[0].setGemView(null); + this.selectItemGemVew[1].setGemView(null); + this.selectItemGemVew[2].setGemView(null); + this.selectItemGemVew[3].setGemView(null); + return; + } + var _loc2_:Object = param1.liuyu; + if(_loc2_) + { + _loc3_ = int(_loc2_.roleId1); + _loc4_ = int(_loc2_.roleId2); + _loc5_ = int(_loc2_.roleId3); + _loc6_ = int(_loc2_.roleId4); + if(_loc3_ == 0) + { + this.selectItemGemVew[0].setGemView(null); + } + else + { + _loc7_ = GameData.getItemByEntId(_loc3_); + this.selectItemGemVew[0].setGemView(_loc7_); + this.hole1Text.htmlText = _loc7_.name; + } + if(_loc4_ == 0) + { + this.selectItemGemVew[1].setGemView(null); + } + else + { + _loc8_ = GameData.getItemByEntId(_loc4_); + this.selectItemGemVew[1].setGemView(_loc8_); + this.hole2Text.htmlText = _loc8_.name; + } + if(_loc5_ == 0) + { + this.selectItemGemVew[2].setGemView(null); + } + else + { + _loc9_ = GameData.getItemByEntId(_loc5_); + this.selectItemGemVew[2].setGemView(_loc9_); + this.hole3Text.htmlText = _loc9_.name; + } + if(_loc6_ == 0) + { + this.selectItemGemVew[3].setGemView(null); + } + else + { + _loc10_ = GameData.getItemByEntId(_loc6_); + this.selectItemGemVew[3].setGemView(_loc10_); + this.hole4Text.htmlText = _loc10_.name; + } + } + else + { + this.selectItemGemVew[0].setGemView(null); + this.selectItemGemVew[1].setGemView(null); + this.selectItemGemVew[2].setGemView(null); + this.selectItemGemVew[3].setGemView(null); + } + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 10) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function destoryItem(param1:MouseEvent) : void + { + var _loc3_:UserEquipItem3 = null; + var _loc4_:Object = null; + this.fenjieResultText.text = ""; + var _loc2_:Array = new Array(); + for each(_loc3_ in this.packList) + { + if(_loc3_.getItemObj() != null && _loc3_.getSelectStatus()) + { + _loc2_.push(_loc3_.getItemObj().id); + } + } + if(_loc2_.length == 0) + { + MessageBoxUI.getInstance().addMessage("请选择要分解的装备"); + return; + } + if(_loc2_.length > 0) + { + _loc4_ = new Object(); + _loc4_.itemList = _loc2_; + ConnectService.getInstance().userService.fenJie(_loc4_); + } + } + + private function delGem(param1:MouseEvent) : void + { + if(this.selectPackItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择装备"); + return; + } + var _loc2_:LiuYuMc = param1.currentTarget.parent as LiuYuMc; + if(_loc2_.getgemObj() == null) + { + return; + } + this.currHoleNo = _loc2_.holeNo; + var _loc3_:String = "你确定摘除吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc3_,this.confimDelJew); + } + + private function confimDelJew() : void + { + ConnectService.getInstance().userService.delLiuYu(this.selectPackItem.id,this.currHoleNo); + } + + private function addGem(param1:MouseEvent) : void + { + var _loc3_:Object = null; + if(this.selectPackItem == null) + { + MessageBoxUI.getInstance().addMessage("请先选择装备"); + return; + } + var _loc2_:LiuYuMc = param1.currentTarget.parent as LiuYuMc; + if(_loc2_.getgemObj() != null) + { + return; + } + this.addSelectJewUI(); + _loc3_ = new Object(); + _loc3_.treasuryId = this.selectPackItem.id; + _loc3_.holeNo = _loc2_.holeNo; + this.selectJewUI.setObj(_loc3_); + } + + private function addSelectJewUI() : void + { + if(this.selectJewUI == null) + { + this.selectJewUI = new SelectLiuYuUI(); + this.selectJewUI.x = int(width / 2 - this.selectJewUI.width / 2); + this.selectJewUI.y = int(height / 2 - this.selectJewUI.height / 2); + } + addChild(this.selectJewUI); + } + + private function delAllGem(param1:MouseEvent) : void + { + if(this.selectPackItem == null) + { + MessageBoxUI.getInstance().addMessage("请选择装备"); + return; + } + var _loc2_:Object = this.selectPackItem.liuyu; + if(_loc2_ == null) + { + MessageBoxUI.getInstance().addMessage("该装备没有镶嵌琉玉"); + return; + } + if(_loc2_.roleId1 == 0 && _loc2_.roleId2 == 0 && _loc2_.roleId3 == 0 && _loc2_.roleId4 == 0) + { + MessageBoxUI.getInstance().addMessage("该装备没有镶嵌琉玉"); + return; + } + MessageBoxUI.getInstance().confirmMsg("确定摘除该道具所有琉玉?",this.confimDelAll); + } + + private function confimDelAll() : void + { + ConnectService.getInstance().userService.oneKeyOutLiuYu(this.selectPackItem.id); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserHeadUI.as b/flash_decompiled/com/view/ui/user/UserHeadUI.as new file mode 100644 index 0000000..7ac70b9 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserHeadUI.as @@ -0,0 +1,188 @@ +package com.view.ui.user +{ + import com.data.GameData; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.view.newui.UILabel; + import com.view.newui.UIPageMc; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.login.ImageItem; + import flash.events.MouseEvent; + + public class UserHeadUI extends BaseUI + { + + private var currArr:Array; + + private var imgCounts:int; + + private var paneBg:UIWindowBg; + + private var pageMc:UIPageMc; + + private var itemVec:Vector.; + + private var currPage:int = 1; + + private var selectBackF:Function; + + public function UserHeadUI() + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:ImageItem = null; + this.currArr = new Array(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xuanzhehead); + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630 - 15,400 - 90 + 30); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 39; + var _loc1_:NewUser = NewUserData.getUser(); + if(_loc1_.sex == 1) + { + this.imgCounts = GameData.getConfigMap()["USER_HEAD_MALE_COUNT"]; + _loc3_ = 1; + while(_loc3_ <= this.imgCounts) + { + this.currArr.push("user1_" + _loc3_ + ".jpg"); + _loc3_++; + } + } + else + { + this.imgCounts = GameData.getConfigMap()["USER_HEAD_REMALE_COUNT"]; + _loc3_ = 1; + while(_loc3_ <= this.imgCounts) + { + this.currArr.push("user2_" + _loc3_ + ".jpg"); + _loc3_++; + } + } + _loc2_ = 1 + (this.imgCounts - 1) / 18; + this.itemVec = new Vector.(); + _loc3_ = 1; + while(_loc3_ < 4) + { + _loc5_ = 1; + while(_loc5_ < 7) + { + _loc6_ = (_loc3_ - 1) * 6 + _loc5_ - 1; + _loc7_ = new ImageItem(this.currArr[_loc6_]); + this.paneBg.addChild(_loc7_); + _loc7_.x = 10 + (_loc5_ - 1) * 102; + _loc7_.y = 10 + (_loc3_ - 1) * 102; + _loc7_.addEventListener(MouseEvent.CLICK,this.selectHeadImg); + this.itemVec.push(_loc7_); + _loc5_++; + } + _loc3_++; + } + this.pageMc = new UIPageMc(); + this.paneBg.addChild(this.pageMc); + this.pageMc.x = 510; + this.pageMc.y = 320; + this.pageMc.preFunc = this.prePage; + this.pageMc.nextFunc = this.nextPage; + if(_loc2_ <= 0) + { + _loc2_ = 1; + } + if(this.currPage > _loc2_) + { + this.currPage = _loc2_; + } + this.pageMc.setPageCount(_loc2_); + this.pageMc.setPage(this.currPage); + var _loc4_:UILabel = new UILabel(400,10852210); + _loc4_.setText("更改君主头像需要消耗一个改头换面卡,包裹中有兑换"); + this.paneBg.addChild(_loc4_); + _loc4_.x = 10; + _loc4_.y = 325; + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w - 15; + window_heihgt = UIWindowBg.normal_window_h - 90 + 30; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 - 15; + ui_closeBtn.y = 10; + } + + override public function setPosition() : void + { + } + + public function nextPage() : void + { + this.currPage += 1; + this.getItemListByType(); + } + + public function prePage() : void + { + --this.currPage; + this.getItemListByType(); + } + + private function getItemListByType() : void + { + var _loc1_:int = 18 * (this.currPage - 1) + 1; + var _loc2_:int = 18 * this.currPage; + var _loc3_:int = 0; + var _loc4_:int = _loc1_; + while(_loc4_ <= _loc2_) + { + if(_loc4_ < this.imgCounts) + { + this.itemVec[_loc3_].setUrl(this.currArr[_loc4_]); + this.itemVec[_loc3_].visible = true; + } + else + { + this.itemVec[_loc3_].setUrl(null); + this.itemVec[_loc3_].visible = false; + } + _loc3_++; + _loc4_++; + } + this.pageMc.setPage(this.currPage); + } + + private function selectHeadImg(param1:MouseEvent) : void + { + var _loc2_:ImageItem = param1.currentTarget as ImageItem; + var _loc3_:String = _loc2_.currUrl; + this.selectBackF(_loc3_); + this.closeUI(param1); + } + + public function selectImgFunc(param1:Function) : void + { + this.selectBackF = param1; + } + + public function clear() : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserInfoUI.as b/flash_decompiled/com/view/ui/user/UserInfoUI.as new file mode 100644 index 0000000..a86a86a --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserInfoUI.as @@ -0,0 +1,240 @@ +package com.view.ui.user +{ + import com.newdata.user.NewUserData; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class UserInfoUI extends BaseUI + { + + public var btnArr:Array; + + public var btn_5:UITabBtn; + + private var paneBg:UIWindowBg; + + private var curPage:Sprite; + + private var page1:UserPage1; + + private var page2:UserPage2; + + private var page3:UserPage3; + + private var page4:UserPage4; + + private var page5:StrategyUI; + + private var page6:UserPage6; + + private var page7:UserPage7; + + private var page8:UserPage5; + + public function UserInfoUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_junzhu); + super.setPosition(); + this.createUI(); + } + + override public function createUI() : void + { + var _loc8_:int = 0; + var _loc9_:UITabBtn = null; + this.btnArr = new Array(); + var _loc1_:UITabBtn = new UITabBtn("君主属性",2); + var _loc2_:UITabBtn = new UITabBtn("君主装备",2); + var _loc3_:UITabBtn = new UITabBtn("君主坐骑",2); + var _loc4_:UITabBtn = new UITabBtn("君主战宠",2); + var _loc5_:UITabBtn = new UITabBtn("城池总览",2); + var _loc6_:UITabBtn = new UITabBtn("君主仇恨",2); + var _loc7_:UITabBtn = new UITabBtn("好友印象",2); + this.btn_5 = new UITabBtn("君主策略",2); + this.btnArr.push(_loc1_); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + this.btnArr.push(_loc4_); + this.btnArr.push(_loc5_); + this.btnArr.push(_loc6_); + this.btnArr.push(_loc7_); + this.btnArr.push(this.btn_5); + for each(_loc9_ in this.btnArr) + { + addChild(_loc9_); + _loc9_.x = 25 + _loc8_ * 66; + _loc9_.y = 40; + _loc9_.onClick = this.clickPage; + _loc8_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + } + + private function clickPage(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(_loc2_ != this.btn_5) + { + this.openPage(_loc2_); + } + else + { + this.btn_5.select = false; + this.openStrategyUI(); + } + } + + public function openFirstPage(param1:int = 0) : void + { + this.openPage(this.btnArr[param1]); + } + + private function openPage(param1:UITabBtn) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + for(_loc3_ in this.btnArr) + { + if(param1 == this.btnArr[_loc3_]) + { + this.btnArr[_loc3_].select = true; + _loc2_ = _loc3_; + } + else + { + this.btnArr[_loc3_].select = false; + } + } + if(_loc2_ == 2) + { + if(NewUserData.getUser().rankId < 30) + { + MessageBoxUI.getInstance().addMessage("君主等级达到30才能进入"); + return; + } + } + if(Boolean(this.curPage) && this.paneBg.contains(this.curPage)) + { + this.paneBg.removeChild(this.curPage); + } + switch(_loc2_) + { + case 0: + this.curPage = this.getPage1(); + break; + case 4: + this.curPage = this.getPage2(); + break; + case 5: + this.curPage = this.getPage3(); + break; + case 6: + this.curPage = this.getPage4(); + break; + case 1: + this.curPage = this.getPage6(); + break; + case 2: + this.curPage = this.getPage7(); + break; + case 3: + this.curPage = this.getPage5(); + } + this.paneBg.addChild(this.curPage); + } + + private function getPage1() : Sprite + { + if(this.page1 == null) + { + this.page1 = new UserPage1(); + this.page1.celueFunc = this.openCeLue; + } + return this.page1; + } + + private function openCeLue() : void + { + this.btn_5.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function getPage2() : Sprite + { + if(this.page2 == null) + { + this.page2 = new UserPage2(); + } + return this.page2; + } + + private function getPage3() : Sprite + { + if(this.page3 == null) + { + this.page3 = new UserPage3(); + } + return this.page3; + } + + private function getPage4() : Sprite + { + if(this.page4 == null) + { + this.page4 = new UserPage4(); + } + return this.page4; + } + + private function openStrategyUI() : void + { + if(this.page5 == null) + { + this.page5 = StrategyUI.getInstance(); + this.page5.setStartPage(0); + } + this.paneBg.addChild(this.page5); + this.page5.x = -11; + this.page5.y = -65; + this.page5.showUse(false); + } + + private function getPage6() : Sprite + { + if(this.page6 == null) + { + this.page6 = new UserPage6(); + } + return this.page6; + } + + private function getPage7() : Sprite + { + if(this.page7 == null) + { + this.page7 = new UserPage7(); + } + return this.page7; + } + + private function getPage5() : Sprite + { + if(this.page8 == null) + { + this.page8 = new UserPage5(); + } + return this.page8; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPage.as b/flash_decompiled/com/view/ui/user/UserPage.as new file mode 100644 index 0000000..e4553a0 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPage.as @@ -0,0 +1,33 @@ +package com.view.ui.user +{ + import com.InstallFace; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextFormat; + + public class UserPage extends Sprite + { + + public var face:InstallFace = InstallFace.getInstance(); + + public var centerCss:TextFormat; + + public function UserPage() + { + super(); + this.centerCss = new TextFormat(); + this.centerCss.align = "center"; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + } + + public function addEvent(param1:Event) : void + { + } + + public function delEvent(param1:Event) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPage1.as b/flash_decompiled/com/view/ui/user/UserPage1.as new file mode 100644 index 0000000..8079678 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPage1.as @@ -0,0 +1,934 @@ +package com.view.ui.user +{ + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.item.event.ItemEvent; + 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.Control; + import com.view.newui.UIButton; + import com.view.newui.UIExpBar; + import com.view.newui.UISmallBtn; + import com.view.newui.UITextBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.tip.MulTipTitle; + import com.view.ui.guild.GuildViewUI; + import com.view.ui.message.MessageBoxUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UserPage1 extends UserPage + { + + public static const STRATEGY_CHANGE_EVENT:String = "strategy_change"; + + private var headbg:Sprite; + + private var nameText:TextField; + + private var textField0:TextField; + + private var textField1:TextField; + + private var textField2:TextField; + + private var textField3:TextField; + + private var textField4:TextField; + + private var textField10:TextField; + + private var textField11:TextField; + + private var textField12:TextField; + + private var textField13:TextField; + + private var textField14:TextField; + + private var leftPoint:TextField; + + private var wuliBar1:UIExpBar; + + private var zhengchiBar1:UIExpBar; + + private var label7:TextField; + + private var expBar:UIExpBar; + + private var countryImg:MovieClip; + + private var govMc:MovieClip; + + private var bg1:UIWindowBg; + + private var ui_whitemc:MovieClip; + + private var addBtn2:Sprite; + + private var addBtn1:Sprite; + + private var piBtn2:UISmallBtn; + + private var piBtn1:UISmallBtn; + + private var changeCountryUI:ChangeCountryUI; + + private var loadImg:LoadResource; + + private var headImg:Bitmap; + + private var userProperty:Object; + + private var loadTianxiaImg:LoadResource; + + private var lastJifenType:int; + + private var tianxiaImg:Bitmap; + + private var _mc1:MovieClip; + + private var _mc2:MovieClip; + + private var _mc3:MovieClip; + + private var _mc7:MovieClip; + + private var _mc9:MovieClip; + + private var _mc11:MovieClip; + + private var baseWuLi:int; + + private var baseZhengZhi:int; + + private var addPointUI:AddPointUI; + + private var editUserSigUI:EditUserSigUI; + + private var atkGuildId:int; + + private var guildViewUI:GuildViewUI; + + private var xididanUI:XidianUI; + + private var _celueFunc:Function; + + private var userHeadUI:UserHeadUI; + + public function UserPage1() + { + var label2:TextField; + var label3:TextField; + var useBtn:UISmallBtn; + var changeBtn:UISmallBtn; + var bg2:UIWindowBg; + var title1:UITitleBg; + var label11:TextField; + var label12:TextField; + var label13:TextField; + var label14:TextField; + var title2:UITitleBg; + var editBtn:UITextBtn; + var bg3:UIWindowBg; + var title3:UITitleBg; + var label5bg:Sprite; + var xidianBtn1:UISmallBtn; + var label6bg:Sprite; + var tip99:String; + var xidianBtn2:UISmallBtn; + var bg4:UIWindowBg; + var label8bg:Sprite; + var label8:TextField; + var fenpeiBtn:UIButton; + var label1:TextField = null; + var label4:TextField = null; + var label5:TextField = null; + var changImgBtn:UISmallBtn = null; + var label6:TextField = null; + var label10:TextField = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(412,140); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + this.headbg = face.getSprite(ClassConfig.ui_userhead_bg); + this.bg1.addChild(this.headbg); + this.headbg.x = 10; + this.headbg.y = 10; + this.govMc = face.getMovieClip(ClassConfig.LIB_CUNTRY_5); + this.govMc.gotoAndStop(1); + this.bg1.addChild(this.govMc); + this.govMc.x = 80; + this.govMc.y = 102; + this.nameText = PublicMethod.getTextFieldWithFillter(65280,108); + this.bg1.addChild(this.nameText); + this.nameText.x = 11; + this.nameText.y = 126; + this.nameText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.nameText.text = ""; + label1 = PublicMethod.getTextFieldWithFillter(10852210,40); + label1.text = "联 盟:"; + this.bg1.addChild(label1); + label1.x = 131; + label1.y = 9; + this.textField0 = PublicMethod.getTextFieldWithFillter(16640697,140); + this.bg1.addChild(this.textField0); + this.textField0.x = label1.x + 45; + this.textField0.y = label1.y; + label2 = PublicMethod.getTextFieldWithFillter(10852210,40); + label2.text = "等 级:"; + this.bg1.addChild(label2); + label2.x = label1.x; + label2.y = label1.y + 20; + this.textField1 = PublicMethod.getTextFieldWithFillter(16640697,140); + this.bg1.addChild(this.textField1); + this.textField1.x = this.textField0.x; + this.textField1.y = label2.y; + label3 = PublicMethod.getTextFieldWithFillter(10852210,40); + label3.text = "经 验:"; + this.bg1.addChild(label3); + label3.x = label1.x; + label3.y = label2.y + 20; + this.textField2 = PublicMethod.getTextFieldWithFillter(16640697,240); + this.bg1.addChild(this.textField2); + this.textField2.x = this.textField0.x; + this.textField2.y = label3.y; + label4 = PublicMethod.getTextFieldWithFillter(10852210,50); + label4.text = "军 衔:"; + this.bg1.addChild(label4); + label4.x = label1.x; + label4.y = label3.y + 20; + this.textField3 = PublicMethod.getTextFieldWithFillter(16640697,140); + this.bg1.addChild(this.textField3); + this.textField3.x = this.textField0.x; + this.textField3.y = label4.y; + label5 = PublicMethod.getTextFieldWithFillter(10852210,50); + label5.text = "策略值:"; + this.bg1.addChild(label5); + label5.x = label1.x; + label5.y = label4.y + 20; + this.textField4 = PublicMethod.getTextFieldWithFillter(16640697,140); + this.bg1.addChild(this.textField4); + this.textField4.x = this.textField0.x; + this.textField4.y = label5.y; + useBtn = new UISmallBtn("使用",2); + this.bg1.addChild(useBtn); + useBtn.x = 270; + useBtn.y = label5.y; + useBtn.onClick = this.openCelue; + changImgBtn = new UISmallBtn("更换头像",3); + this.bg1.addChild(changImgBtn); + changImgBtn.x = 340; + changImgBtn.y = label5.y; + changImgBtn.onClick = this.openSelectImgUI; + label6 = PublicMethod.getTextFieldWithFillter(10852210,50); + label6.text = "国 家:"; + this.bg1.addChild(label6); + label6.x = label1.x; + label6.y = label5.y + 20; + this.countryImg = face.getMovieClip(ClassConfig.ui_country); + this.bg1.addChild(this.countryImg); + this.countryImg.x = this.textField0.x; + this.countryImg.y = label6.y - 2; + this.countryImg.gotoAndStop(1); + changeBtn = new UISmallBtn("转换",2); + this.bg1.addChild(changeBtn); + changeBtn.x = useBtn.x; + changeBtn.y = label6.y; + changeBtn.onClick = this.changeCountry; + bg2 = new UIWindowBg(); + bg2.initThirdPanel(195,304); + addChild(bg2); + bg2.x = 430; + bg2.y = 4; + title1 = new UITitleBg("君主属性",200); + bg2.addChild(title1); + title1.x = int(bg2.width / 2 - title1.width / 2); + label10 = PublicMethod.getTextFieldWithFillter(10852210,60); + label10.text = "行 动 力:"; + bg2.addChild(label10); + label10.x = 20; + label10.y = 40; + this.textField10 = PublicMethod.getTextFieldWithFillter(16640697,120); + bg2.addChild(this.textField10); + this.textField10.x = label10.x + 60; + this.textField10.y = label10.y; + label11 = PublicMethod.getTextFieldWithFillter(10852210,60); + label11.text = "统兵上限:"; + bg2.addChild(label11); + label11.x = label10.x; + label11.y = label10.y + 20; + this.textField11 = PublicMethod.getTextFieldWithFillter(16640697,120); + bg2.addChild(this.textField11); + this.textField11.x = this.textField10.x; + this.textField11.y = label11.y; + label12 = PublicMethod.getTextFieldWithFillter(10852210,60); + label12.text = "势力范围:"; + bg2.addChild(label12); + label12.x = label10.x; + label12.y = label11.y + 20; + this.textField12 = PublicMethod.getTextFieldWithFillter(16640697,120); + bg2.addChild(this.textField12); + this.textField12.x = this.textField10.x; + this.textField12.y = label12.y; + label13 = PublicMethod.getTextFieldWithFillter(10852210,60); + label13.text = "排 名:"; + bg2.addChild(label13); + label13.x = label10.x; + label13.y = label12.y + 20; + this.textField13 = PublicMethod.getTextFieldWithFillter(16640697,120); + bg2.addChild(this.textField13); + this.textField13.x = this.textField10.x; + this.textField13.y = label13.y; + label14 = PublicMethod.getTextFieldWithFillter(10852210,60); + label14.text = "声 望:"; + bg2.addChild(label14); + label14.x = label10.x; + label14.y = label13.y + 20; + this.textField14 = PublicMethod.getTextFieldWithFillter(16640697,120); + bg2.addChild(this.textField14); + this.textField14.x = this.textField10.x; + this.textField14.y = label14.y; + title2 = new UITitleBg("个性签名",200); + bg2.addChild(title2); + title2.x = int(bg2.width / 2 - title2.width / 2); + title2.y = 150; + this.label7 = new TextField(); + this.label7.wordWrap = true; + this.label7.multiline = true; + this.label7.mouseEnabled = false; + this.label7.height = 120; + this.label7.width = 186; + this.label7.textColor = 16640697; + this.label7.text = ""; + bg2.addChild(this.label7); + this.label7.x = 10; + this.label7.y = 182; + editBtn = new UITextBtn("修改"); + bg2.addChild(editBtn); + editBtn.x = 170; + editBtn.y = 290; + editBtn.addEventListener(MouseEvent.CLICK,this.editUserSig,false,0,true); + bg3 = new UIWindowBg(); + bg3.initThirdPanel(412,124); + addChild(bg3); + bg3.x = 4; + bg3.y = 184; + title3 = new UITitleBg("君主属性点",400); + bg3.addChild(title3); + title3.x = int(bg3.width / 2 - title3.width / 2); + this.leftPoint = PublicMethod.getTextFieldWithFillter(10852210,230); + this.leftPoint.text = "君主属性点 (可分配点)"; + bg3.addChild(this.leftPoint); + this.leftPoint.x = 50; + this.leftPoint.y = 35; + label5bg = PublicMethod.createShape(16777215,30,18); + label5bg.alpha = 0; + label5 = PublicMethod.getTextFieldWithFillter(10852210,30); + label5.text = "武力"; + bg3.addChild(label5bg); + bg3.addChild(label5); + label5.x = 20; + label5.y = 60; + label5bg.x = 30; + label5bg.y = 60; + new MulTipTitle(label5bg,face.stage,face.tip_bg,"每1点武力增加君主麾下武将的四项属性1%
每1点武力增加总兵数上限100"); + this.wuliBar1 = new UIExpBar(); + this.wuliBar1.setWidth(240); + this.wuliBar1.init(); + bg3.addChild(this.wuliBar1); + this.wuliBar1.x = 54; + this.wuliBar1.y = 62; + this.wuliBar1.setMaxValue(100); + this.wuliBar1.setCurValue(0); + this.addBtn1 = face.getSprite(ClassConfig.sprite_btn_11); + bg3.addChild(this.addBtn1); + this.addBtn1.buttonMode = true; + this.addBtn1.x = 300; + this.addBtn1.y = label5.y + 2; + this.addBtn1.addEventListener(MouseEvent.CLICK,this.addWuli,false,0,true); + this.piBtn1 = new UISmallBtn("批量",2); + bg3.addChild(this.piBtn1); + this.piBtn1.x = this.addBtn1.x + this.addBtn1.width + 5; + this.piBtn1.y = this.addBtn1.y - 5; + this.piBtn1.onClick = this.addPoint; + xidianBtn1 = new UISmallBtn("洗点",2); + bg3.addChild(xidianBtn1); + xidianBtn1.x = this.piBtn1.x + this.piBtn1.width + 5; + xidianBtn1.y = this.piBtn1.y; + xidianBtn1.onClick = function(param1:MouseEvent):* + { + propDec(2); + }; + label6bg = PublicMethod.createShape(16777215,34,18); + label6bg.alpha = 0; + label6 = PublicMethod.getTextField(10852210,30); + label6.text = "政治"; + bg3.addChild(label6bg); + bg3.addChild(label6); + label6.x = 20; + label6.y = 96; + label6bg.x = 30; + label6bg.y = 96; + tip99 = "每1点政治增加武将经验池上限1000
"; + tip99 += "每1点政治增加资源产量1%
"; + tip99 += "每1点政治增加建筑建造速度2%
"; + tip99 += "每1点政治增加城防建造速度1%"; + new MulTipTitle(label6bg,face.stage,face.tip_bg,tip99); + this.zhengchiBar1 = new UIExpBar(); + this.zhengchiBar1.setWidth(240); + this.zhengchiBar1.init(); + bg3.addChild(this.zhengchiBar1); + this.zhengchiBar1.x = 54; + this.zhengchiBar1.y = 96; + this.zhengchiBar1.setMaxValue(100); + this.zhengchiBar1.setCurValue(0); + this.addBtn2 = face.getSprite(ClassConfig.sprite_btn_11); + bg3.addChild(this.addBtn2); + this.addBtn2.buttonMode = true; + this.addBtn2.x = 300; + this.addBtn2.y = label6.y + 2; + this.addBtn2.addEventListener(MouseEvent.CLICK,this.addZhengchi,false,0,true); + this.piBtn2 = new UISmallBtn("批量",2); + bg3.addChild(this.piBtn2); + this.piBtn2.x = this.piBtn1.x; + this.piBtn2.y = this.addBtn2.y - 5; + this.piBtn2.onClick = this.addPoint; + xidianBtn2 = new UISmallBtn("洗点",2); + bg3.addChild(xidianBtn2); + xidianBtn2.x = this.piBtn2.x + this.piBtn2.width + 5; + xidianBtn2.y = this.piBtn2.y; + xidianBtn2.onClick = function(param1:MouseEvent):* + { + propDec(3); + }; + bg4 = new UIWindowBg(); + bg4.initThirdPanel(621,48); + addChild(bg4); + bg4.x = 4; + bg4.y = 322; + label8bg = PublicMethod.createShape(16777215,76,18); + label8bg.alpha = 0; + label8 = PublicMethod.getTextField(10852210,70); + label8.text = "武将经验池"; + bg4.addChild(label8bg); + bg4.addChild(label8); + label8.x = 24; + label8.y = 22; + label8bg.x = 24; + label8bg.y = 22; + new MulTipTitle(label8bg,face.stage,face.tip_bg,"可以将武将经验池中的武将经验分配给麾下武将"); + this.expBar = new UIExpBar(); + this.expBar.setWidth(470); + this.expBar.init(); + bg4.addChild(this.expBar); + this.expBar.x = 94; + this.expBar.y = 24; + this.expBar.setMaxValue(100); + this.expBar.setCurValue(0); + fenpeiBtn = new UIButton("分配"); + bg4.addChild(fenpeiBtn); + fenpeiBtn.x = 570; + fenpeiBtn.y = this.expBar.y - 5; + fenpeiBtn.onClick = this.openHeroList; + this.ui_whitemc = face.getMovieClip(ClassConfig.ui_whitemc); + this.headbg.addChild(this.ui_whitemc); + this.ui_whitemc.x = 8; + this.ui_whitemc.y = 8; + this.ui_whitemc.addEventListener(MouseEvent.CLICK,this.showGuildInfo); + this.ui_whitemc.buttonMode = true; + this.ui_whitemc.flag_txt.mouseEnabled = false; + this._mc1 = face.getMovieClip("LIB_UI_MC_pro1"); + this._mc2 = face.getMovieClip("LIB_UI_MC_pro2"); + this._mc3 = face.getMovieClip("LIB_UI_MC_pro3"); + this._mc7 = face.getMovieClip("LIB_UI_MC_pro7"); + this._mc9 = face.getMovieClip("LIB_UI_MC_pro9"); + this._mc11 = face.getMovieClip("LIB_UI_MC_pro11"); + this._mc1.gotoAndStop(1); + this._mc2.gotoAndStop(1); + this._mc3.gotoAndStop(1); + this._mc7.gotoAndStop(1); + this._mc9.gotoAndStop(1); + this._mc11.gotoAndStop(1); + this.bg1.addChild(this._mc1); + this._mc1.x = 12; + this._mc1.y = 150; + this.bg1.addChild(this._mc2); + this._mc2.x = this._mc1.x + 22; + this._mc2.y = this._mc1.y + 2; + this.bg1.addChild(this._mc3); + this._mc3.x = this._mc2.x + 22; + this._mc3.y = this._mc1.y + 4; + this.bg1.addChild(this._mc7); + this._mc7.x = this._mc3.x + 22; + this._mc7.y = this._mc1.y + 4; + this.bg1.addChild(this._mc9); + this._mc9.x = this._mc7.x + 22; + this._mc9.y = this._mc1.y + 5; + this.bg1.addChild(this._mc11); + this._mc11.x = this._mc9.x + 22; + this._mc11.y = this._mc1.y + 3; + Utils.applyGray(this._mc1); + Utils.applyGray(this._mc2); + Utils.applyGray(this._mc3); + Utils.applyGray(this._mc7); + Utils.applyGray(this._mc9); + Utils.applyGray(this._mc11); + ToolTipManager.getInstance().setToolTip(this._mc1,new TxtTooltip("未达到:城池达到4级")); + ToolTipManager.getInstance().setToolTip(this._mc2,new TxtTooltip("未达到:" + CommonData.babelNameArr[0] + "闯过10层")); + ToolTipManager.getInstance().setToolTip(this._mc3,new TxtTooltip("未达到:凌烟阁禁军通关")); + ToolTipManager.getInstance().setToolTip(this._mc7,new TxtTooltip("下一级别:对其他君主攻城胜利次数达到10次")); + ToolTipManager.getInstance().setToolTip(this._mc9,new TxtTooltip("至交好友")); + ToolTipManager.getInstance().setToolTip(this._mc11,new TxtTooltip("未达到:单将楼闯过10层")); + Utils.g_events.addEventListener(DevEvent.USER_ICON_CHANGE,this.userIconChange); + } + + override public function addEvent(param1:Event) : void + { + super.addEvent(param1); + ConnectService.getInstance().addEventListener(UserEvent.USER_PROPERTY,this.getUserProperty); + ConnectService.getInstance().addEventListener(UserEvent.USER_ADDPOINT,this.addPropertyPoint); + ConnectService.getInstance().addEventListener(UserEvent.USER_EDITSignature,this.editSigResult); + ConnectService.getInstance().addEventListener(ItemEvent.Item_decPropertyPoint,this.decPropertyPointResult); + Utils.g_events.addEventListener(STRATEGY_CHANGE_EVENT,this.changeStrategy); + this.initData(); + } + + private function initData() : void + { + ConnectService.getInstance().userService.getUserProperty(); + } + + private function changeCountry(param1:MouseEvent) : void + { + if(this.changeCountryUI == null) + { + this.changeCountryUI = new ChangeCountryUI(); + this.changeCountryUI.x = int(632 / 2 - this.changeCountryUI.width / 2); + this.changeCountryUI.y = int(180 - this.changeCountryUI.height / 2); + } + addChild(this.changeCountryUI); + this.changeCountryUI.showView(); + } + + override public function delEvent(param1:Event) : void + { + super.delEvent(param1); + ConnectService.getInstance().removeEventListener(UserEvent.USER_PROPERTY,this.getUserProperty); + ConnectService.getInstance().removeEventListener(UserEvent.USER_ADDPOINT,this.addPropertyPoint); + ConnectService.getInstance().removeEventListener(UserEvent.USER_EDITSignature,this.editSigResult); + ConnectService.getInstance().removeEventListener(ItemEvent.Item_decPropertyPoint,this.decPropertyPointResult); + Utils.g_events.removeEventListener(STRATEGY_CHANGE_EVENT,this.changeStrategy); + if(Boolean(this.addPointUI) && contains(this.addPointUI)) + { + removeChild(this.addPointUI); + } + if(Boolean(this.editUserSigUI) && contains(this.editUserSigUI)) + { + removeChild(this.editUserSigUI); + } + if(Boolean(this.xididanUI) && contains(this.xididanUI)) + { + removeChild(this.xididanUI); + } + if(Boolean(this.changeCountryUI) && contains(this.changeCountryUI)) + { + removeChild(this.changeCountryUI); + this.changeCountryUI.stopTime(); + } + if(Boolean(this.userHeadUI) && contains(this.userHeadUI)) + { + removeChild(this.userHeadUI); + } + } + + private function getUserProperty(param1:UserEvent) : void + { + this.userProperty = param1.userObject; + this.ui_whitemc.visible = false; + this.atkGuildId = 0; + if(this.userProperty.leagueAttack > 0) + { + this.ui_whitemc.visible = true; + ToolTipManager.getInstance().setToolTip(this.ui_whitemc,new TxtTooltip("攻击你的联盟:" + this.userProperty.atkGuildName + "(点击此旗帜查看)\n" + "攻击时间:" + this.userProperty.atkTime + "\n白旗消失时间:" + this.userProperty.endFlagTime + "\n(攻破此联盟任意一名君主城池可摘掉白旗)")); + this.atkGuildId = this.userProperty.leagueAttack; + this.ui_whitemc.flag_txt.text = this.userProperty.otherflag; + } + if(this.headImg == null) + { + this.loadImg = new LoadResource("pic/head/" + this.userProperty.headIcon,this.loadImgBack); + } + this.nameText.text = this.userProperty.userName; + this.textField0.text = this.userProperty.guildName == null ? "无" : this.userProperty.guildName; + this.textField1.text = this.userProperty.rankName; + if(this.userProperty.nextLvHonor) + { + this.textField2.text = this.userProperty.honor + "/" + this.userProperty.nextLvHonor; + } + else + { + this.textField2.text = this.userProperty.honor + "/--"; + } + this.textField3.htmlText = this.userProperty.title != null && this.userProperty.title != "" ? this.userProperty.title + "(军功值" + this.userProperty.junGong + ")" : "无"; + this.textField4.text = this.userProperty.tacticNum + "/" + this.userProperty.tacticLimit; + this.countryImg.gotoAndStop(this.userProperty.countryId); + this.textField10.text = this.userProperty.actPoint + "/" + this.userProperty.actLimit; + this.textField11.text = this.userProperty.userCurrArmyNum + "/" + this.userProperty.armyNumLimit; + this.textField12.text = this.userProperty.influence + "/" + this.userProperty.infLimit; + this.textField13.text = this.userProperty.influenceRank <= 0 ? "未在榜上" : this.userProperty.influenceRank + ""; + this.textField14.htmlText = this.userProperty.prestige + "(" + this.userProperty.prestigeLv + ")"; + this.leftPoint.htmlText = "君主属性点 " + this.userProperty.availPropertyPoint + " (可分配点)"; + this.setAddPointData(); + this.wuliBar1.setMaxValue(this.userProperty.militaryLimit); + this.wuliBar1.setCurValue(this.userProperty.militaryPoint); + this.zhengchiBar1.setMaxValue(this.userProperty.polityLimit); + this.zhengchiBar1.setCurValue(this.userProperty.polityPoint); + this.label7.text = this.userProperty.selfSignature; + this.expBar.setMaxValue(this.userProperty.expLimit); + this.expBar.setCurValue(this.userProperty.expPoint); + var _loc2_:* = this.userProperty.finalMilitaryPoint - this.userProperty.militaryPoint; + var _loc3_:* = this.userProperty.finalPolityPoint - this.userProperty.polityPoint; + var _loc4_:* = this.userProperty.finalMilitaryPoint; + var _loc5_:* = this.userProperty.finalPolityPoint; + this.baseWuLi = _loc4_ - _loc2_; + this.baseZhengZhi = _loc5_ - _loc3_; + var _loc6_:String = "基础武力:" + (_loc4_ - _loc2_) + " 附加武力:" + _loc2_ + "\n" + "武将四项属性增加" + _loc4_ + "%\n总兵数上限增加" + _loc4_ * 100 + "\n"; + var _loc7_:String = "基础政治: "; + _loc7_ = _loc7_ + (_loc5_ - _loc3_) + "附加政治:"; + _loc7_ = _loc7_ + _loc3_ + "\n" + "资源产量增加 "; + _loc7_ = _loc7_ + _loc5_ + "%\n建筑建造速度增加 "; + _loc7_ = _loc7_ + _loc5_ * 2 + "%\n武将经验池上限增加 "; + _loc7_ = _loc7_ + _loc5_ * 1000 + "点\n城防建造速度增加 "; + _loc7_ = _loc7_ + _loc5_ + "%"; + ToolTipManager.getInstance().setToolTip(this.wuliBar1,new TxtTooltip(_loc6_)); + ToolTipManager.getInstance().setToolTip(this.zhengchiBar1,new TxtTooltip(_loc7_)); + var _loc8_:* = this.userProperty.userAchieve as Array; + var _loc9_:int = 0; + while(_loc9_ < _loc8_.length) + { + switch(_loc8_[_loc9_].achieveSubType) + { + case "castleLevel": + ToolTipManager.getInstance().setToolTip(this._mc1,new TxtTooltip(_loc8_[_loc9_].tip)); + if(_loc8_[_loc9_].level == 0) + { + this._mc1.gotoAndStop(1); + Utils.applyGray(this._mc1); + } + else + { + Utils.applyDefault(this._mc1); + this._mc1.gotoAndStop(_loc8_[_loc9_].level + 1); + } + break; + case "invite": + ToolTipManager.getInstance().setToolTip(this._mc9,new TxtTooltip(_loc8_[_loc9_].tip)); + if(_loc8_[_loc9_].invite == 0) + { + this._mc9.gotoAndStop(1); + Utils.applyGray(this._mc9); + } + else + { + Utils.applyDefault(this._mc9); + this._mc9.gotoAndStop(_loc8_[_loc9_].invite + 1); + } + break; + case "babel": + ToolTipManager.getInstance().setToolTip(this._mc2,new TxtTooltip(_loc8_[_loc9_].tip)); + if(_loc8_[_loc9_].level == 0) + { + this._mc2.gotoAndStop(1); + Utils.applyGray(this._mc2); + } + else + { + Utils.applyDefault(this._mc2); + this._mc2.gotoAndStop(_loc8_[_loc9_].level + 1); + } + break; + case "singlebabel": + ToolTipManager.getInstance().setToolTip(this._mc11,new TxtTooltip(_loc8_[_loc9_].tip)); + if(_loc8_[_loc9_].invite == 0) + { + this._mc11.gotoAndStop(1); + Utils.applyGray(this._mc11); + } + else + { + Utils.applyDefault(this._mc11); + this._mc11.gotoAndStop(_loc8_[_loc9_].level + 1); + } + break; + case "heroBabel": + ToolTipManager.getInstance().setToolTip(this._mc3,new TxtTooltip(_loc8_[_loc9_].tip)); + if(_loc8_[_loc9_].level == 0) + { + this._mc1.gotoAndStop(1); + Utils.applyGray(this._mc3); + } + else + { + Utils.applyDefault(this._mc3); + this._mc3.gotoAndStop(_loc8_[_loc9_].level + 1); + } + break; + case "pvpWin": + ToolTipManager.getInstance().setToolTip(this._mc7,new TxtTooltip(_loc8_[_loc9_].tip)); + if(_loc8_[_loc9_].level == 0) + { + this._mc7.gotoAndStop(1); + Utils.applyGray(this._mc7); + } + else + { + Utils.applyDefault(this._mc7); + this._mc7.gotoAndStop(_loc8_[_loc9_].level + 1); + } + } + _loc9_++; + } + this.govMc.gotoAndStop(this.userProperty.govId + 1); + var _loc10_:int = int(this.userProperty.tianxiaJifen); + var _loc11_:int = Utils.getJifenType(_loc10_); + this.loadTianxiaIg(_loc11_); + } + + private function loadTianxiaIg(param1:int) : void + { + if(this.lastJifenType == param1) + { + return; + } + this.lastJifenType = param1; + this.loadTianxiaImg = new LoadResource("pic/bg/tianxia_" + this.lastJifenType + ".png",this.loadTianxiaImgBack); + } + + private function loadTianxiaImgBack(param1:Event) : void + { + if(Boolean(this.tianxiaImg) && this.bg1.contains(this.tianxiaImg)) + { + this.bg1.removeChild(this.tianxiaImg); + } + this.tianxiaImg = param1.target.loader.content; + this.bg1.addChild(this.tianxiaImg); + this.tianxiaImg.x = 82; + this.tianxiaImg.y = 15; + this.loadTianxiaImg.clear(); + } + + private function setAddPointData() : void + { + if(this.userProperty.availPropertyPoint > 0) + { + this.addBtn1.buttonMode = true; + this.addBtn1.alpha = 1; + this.addBtn2.buttonMode = true; + this.addBtn2.alpha = 1; + this.piBtn1.setEnable(); + this.piBtn2.setEnable(); + } + else + { + this.addBtn1.buttonMode = false; + this.addBtn1.alpha = 0.5; + this.addBtn2.buttonMode = false; + this.addBtn2.alpha = 0.5; + this.piBtn1.setUnEnable(); + this.piBtn2.setUnEnable(); + } + } + + private function addPropertyPoint(param1:UserEvent) : void + { + this.initData(); + } + + private function editSigResult(param1:UserEvent) : void + { + this.userProperty.selfSignature = param1.msg; + this.label7.text = this.userProperty.selfSignature; + MessageBoxUI.getInstance().addMessage("修改个性签名成功"); + } + + private function loadImgBack(param1:Event) : void + { + if(Boolean(this.headImg) && this.headbg.contains(this.headImg)) + { + this.headbg.removeChild(this.headImg); + } + this.headImg = param1.target.loader.content; + this.headbg.addChildAt(this.headImg,this.headbg.getChildIndex(this.ui_whitemc)); + this.headImg.x = 7; + this.headImg.y = 8; + this.loadImg.clear(); + } + + private function addZhengchi(param1:MouseEvent) : void + { + if(this.userProperty.availPropertyPoint <= 0) + { + return; + } + ConnectService.getInstance().userService.addPropertyPoint(1,3); + } + + private function addWuli(param1:MouseEvent) : void + { + if(this.userProperty.availPropertyPoint <= 0) + { + return; + } + ConnectService.getInstance().userService.addPropertyPoint(1,2); + } + + private function addPoint(param1:MouseEvent) : void + { + var _loc2_:int = 0; + if(this.userProperty.availPropertyPoint <= 0) + { + return; + } + if(param1.currentTarget == this.piBtn1) + { + _loc2_ = 2; + } + else + { + _loc2_ = 3; + } + if(this.addPointUI == null) + { + this.addPointUI = new AddPointUI(); + this.addPointUI.x = int(312 - this.addPointUI.width / 2); + this.addPointUI.y = int(183 - this.addPointUI.height / 2); + } + addChild(this.addPointUI); + this.addPointUI.setType(_loc2_); + this.addPointUI.setMaxPoint(this.userProperty.availPropertyPoint); + this.addPointUI.init(); + } + + private function openHeroList(param1:MouseEvent) : void + { + Control.getInstance().centerMenu.getUserHero(); + } + + private function editUserSig(param1:MouseEvent) : void + { + var _loc2_:String = null; + if(this.editUserSigUI == null) + { + this.editUserSigUI = new EditUserSigUI(); + this.editUserSigUI.x = int(312 - this.editUserSigUI.width / 2); + this.editUserSigUI.y = int(183 - this.editUserSigUI.height / 2); + } + if(!contains(this.editUserSigUI)) + { + addChild(this.editUserSigUI); + _loc2_ = ""; + if(this.userProperty) + { + _loc2_ = this.userProperty.selfSignature; + } + this.editUserSigUI.setContent(_loc2_); + } + } + + private function showGuildInfo(param1:MouseEvent) : void + { + if(this.atkGuildId == 0) + { + return; + } + this.guildViewUI = GuildViewUI.getInstance(); + this.guildViewUI.setGuildId(this.atkGuildId); + addChild(this.guildViewUI); + this.guildViewUI.x = int(632 / 2 - this.guildViewUI.width / 2); + this.guildViewUI.y = int(180 - this.guildViewUI.height / 2); + } + + private function propDec(param1:int) : void + { + if(this.xididanUI == null) + { + this.xididanUI = new XidianUI(); + this.xididanUI.x = int(632 / 2 - this.xididanUI.width / 2); + this.xididanUI.y = int(180 - this.xididanUI.height / 2); + } + var _loc2_:int = 0; + if(param1 == 2) + { + _loc2_ = this.baseWuLi; + } + else + { + _loc2_ = this.baseZhengZhi; + } + this.xididanUI.update(_loc2_,param1); + addChild(this.xididanUI); + } + + private function decPropertyPointResult(param1:ItemEvent) : void + { + this.initData(); + } + + private function changeStrategy(param1:DevEvent) : void + { + this.textField4.text = param1.getParameter().tacticPoint + "/" + param1.getParameter().tacticLimit; + } + + public function openCelue(param1:MouseEvent) : void + { + if(Boolean(this._celueFunc)) + { + this._celueFunc(); + } + } + + private function openSelectImgUI(param1:MouseEvent) : void + { + if(this.userHeadUI == null) + { + this.userHeadUI = new UserHeadUI(); + this.userHeadUI.selectImgFunc(this.loadHeadImg2); + } + addChild(this.userHeadUI); + this.userHeadUI.x = -5; + this.userHeadUI.y = -30; + } + + private function loadHeadImg2(param1:String) : void + { + ConnectService.getInstance().userService.changeUserIcon(param1); + } + + private function userIconChange(param1:DevEvent) : void + { + var _loc2_:NewUser = NewUserData.getUser(); + this.loadImg = new LoadResource("pic/head/" + _loc2_.icon,this.loadImgBack); + } + + public function set celueFunc(param1:Function) : void + { + this._celueFunc = param1; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPage2.as b/flash_decompiled/com/view/ui/user/UserPage2.as new file mode 100644 index 0000000..57e1a16 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPage2.as @@ -0,0 +1,200 @@ +package com.view.ui.user +{ + import com.comfig.ClassConfig; + import com.control.ConnectService; + import com.control.castle.event.CastleEvent; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class UserPage2 extends UserPage + { + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var castleList:Vector.; + + private var sunCasUI:SunCasInfoUI; + + private var mainCasUI:MainCasInfoUI; + + private var currPage:int; + + private var currCasId:int; + + private var casIdList:Array; + + public function UserPage2() + { + var _loc5_:CastleMc = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(392,367); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc1_:UITitleBg = new UITitleBg("城池总览",400); + this.bg1.addChild(_loc1_); + _loc1_.x = int(this.bg1.width / 2 - _loc1_.width / 2); + var _loc2_:Sprite = face.getSprite(ClassConfig.ui_user_page2); + this.bg1.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 25; + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(216,367); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 4; + this.bg2.y = this.bg1.y; + var _loc3_:UITitleBg = new UITitleBg("城池属性",224); + this.bg2.addChild(_loc3_); + _loc3_.x = int(this.bg2.width / 2 - _loc3_.width / 2); + this.castleList = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 5) + { + _loc5_ = new CastleMc(_loc4_); + this.castleList.push(_loc5_); + addChild(_loc5_); + switch(_loc4_) + { + case 0: + _loc5_.x = 154; + _loc5_.y = 157; + break; + case 1: + _loc5_.x = 291; + _loc5_.y = 170; + break; + case 2: + _loc5_.x = 165; + _loc5_.y = 285; + break; + case 3: + _loc5_.x = 39; + _loc5_.y = 170; + break; + case 4: + _loc5_.x = 165; + _loc5_.y = 51; + } + _loc5_.addEventListener(MouseEvent.CLICK,this.mouseClick,false,0,true); + _loc4_++; + } + this.mainCasUI = new MainCasInfoUI(); + this.mainCasUI.x = 421; + this.mainCasUI.y = 40; + this.sunCasUI = new SunCasInfoUI(); + this.sunCasUI.x = 421; + this.sunCasUI.y = 40; + } + + override public function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_LIST_ALL,this.getAllCastle); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_VIEW,this.getCastleViewResult); + this.currPage = 0; + ConnectService.getInstance().castleService.getAllCastle(); + } + + override public function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_LIST_ALL,this.getAllCastle); + ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_VIEW,this.getCastleViewResult); + } + + private function getCastleView() : void + { + if(this.currCasId > 0) + { + ConnectService.getInstance().castleService.getCastleView(this.currCasId); + } + } + + private function getAllCastle(param1:CastleEvent) : void + { + var _loc2_:* = undefined; + this.casIdList = param1.castleList; + for(_loc2_ in this.castleList) + { + if(this.castleList[_loc2_].casId <= 0) + { + if(this.casIdList[_loc2_]) + { + this.castleList[_loc2_].getCastleMc(this.casIdList[_loc2_].casType); + this.castleList[_loc2_].casId = int(this.casIdList[_loc2_].casId); + } + else + { + this.castleList[_loc2_].getEmptyCastle(); + } + } + } + this.setSelectCasMc(this.castleList[0]); + } + + private function getCastleViewResult(param1:CastleEvent) : void + { + if(param1.castleObj.casId != this.currCasId) + { + return; + } + if(param1.castleObj.casType == "main") + { + if(contains(this.sunCasUI)) + { + removeChild(this.sunCasUI); + } + if(!contains(this.mainCasUI)) + { + addChild(this.mainCasUI); + } + this.mainCasUI.setData(param1.castleObj); + } + else + { + if(contains(this.mainCasUI)) + { + removeChild(this.mainCasUI); + } + if(!contains(this.sunCasUI)) + { + addChild(this.sunCasUI); + } + this.sunCasUI.setData(param1.castleObj); + } + } + + private function mouseClick(param1:MouseEvent) : void + { + var _loc2_:CastleMc = param1.currentTarget as CastleMc; + if(_loc2_.casId > 0) + { + this.setSelectCasMc(_loc2_); + } + } + + private function setSelectCasMc(param1:CastleMc) : void + { + var _loc2_:* = undefined; + for(_loc2_ in this.castleList) + { + if(this.castleList[_loc2_] == param1) + { + this.castleList[_loc2_].setSelect(); + this.currPage = _loc2_; + this.currCasId = this.castleList[_loc2_].casId; + this.getCastleView(); + } + else + { + this.castleList[_loc2_].setUnSelect(); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPage3.as b/flash_decompiled/com/view/ui/user/UserPage3.as new file mode 100644 index 0000000..99990fc --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPage3.as @@ -0,0 +1,89 @@ +package com.view.ui.user +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UserPage3 extends BaseUI + { + + private var mcVec:Vector.; + + public function UserPage3() + { + var _loc6_:KingEnmityItem = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,267); + addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + this.mcVec = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 4) + { + _loc6_ = new KingEnmityItem(); + _loc1_.addChild(_loc6_); + _loc6_.x = 8 + _loc2_ * 154; + _loc6_.y = 5; + this.mcVec.push(_loc6_); + _loc2_++; + } + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(622,84); + addChild(_loc3_); + _loc3_.x = 4; + _loc3_.y = 286; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(16640697,610); + _loc3_.addChild(_loc4_); + _loc4_.height = 60; + var _loc5_:TextFormat = new TextFormat(); + _loc5_.leading = 4; + _loc4_.x = 6; + _loc4_.y = 15; + _loc4_.wordWrap = true; + _loc4_.multiline = true; + _loc4_.defaultTextFormat = _loc5_; + _loc4_.text = "以上4种敌对势力对应4个仇恨值。仇恨值随着时间缓慢增长,主动攻击这些势力会加深仇恨。仇恨值达到200点的势力可能会主动入侵。入侵的敌人可能越来越强,请注意防守。如果您能够成功抵御最强入侵者,征服敌对势力,该势力会每天进贡一些资源。"; + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(UserEvent.USER_getUserAnimus,this.getAnimusSucc); + ConnectService.getInstance().userService.getUserAnimus(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(UserEvent.USER_getUserAnimus,this.getAnimusSucc); + } + + private function getAnimusSucc(param1:UserEvent) : void + { + var _loc3_:* = undefined; + var _loc2_:Array = param1.list; + if(_loc2_ != null && _loc2_.length > 0) + { + for(_loc3_ in this.mcVec) + { + if(_loc2_[_loc3_]) + { + this.mcVec[_loc3_].setData(_loc2_[_loc3_]); + } + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPage4.as b/flash_decompiled/com/view/ui/user/UserPage4.as new file mode 100644 index 0000000..58d09aa --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPage4.as @@ -0,0 +1,277 @@ +package com.view.ui.user +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildTransEvent; + import com.newdata.user.NewUserData; + import com.utils.HashMap; + import com.utils.Utils; + import com.view.mc.button.Button_11; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import com.view.world.EmptyContainer; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UserPage4 extends BaseUI + { + + private var colorBg:Array; + + private var last_txt:TextField; + + private var moren_txt:TextField; + + private var _itemContainer:EmptyContainer; + + private var lasty3Records:Array; + + private var impressMap:HashMap; + + public function UserPage4() + { + var _loc3_:UIWindowBg = null; + var _loc4_:TextFormat = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,267); + addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:UITitleBg = new UITitleBg("大家对我的印象",500); + _loc1_.addChild(_loc2_); + _loc2_.x = int(_loc1_.width / 2 - _loc2_.width / 2); + this.colorBg = ["YinXiang_1","YinXiang_2","YinXiang_3","YinXiang_4","YinXiang_5","YinXiang_6","YinXiang_7","YinXiang_8","YinXiang_9","YinXiang_10"]; + this.impressMap = new HashMap(); + this._itemContainer = new EmptyContainer(); + _loc1_.addChild(this._itemContainer); + this._itemContainer.x = 10; + this._itemContainer.y = 30; + this.moren_txt = PublicMethod.getTextFieldWithFillter(10852210,150); + addChild(this.moren_txt); + this.moren_txt.text = "还没有好友进行评价"; + this.moren_txt.x = 242; + this.moren_txt.y = 131; + _loc3_ = new UIWindowBg(); + _loc3_.initThirdPanel(622,85); + addChild(_loc3_); + _loc3_.x = 4; + _loc3_.y = 285; + _loc4_ = new TextFormat(); + _loc4_.leading = 3; + this.last_txt = PublicMethod.getTextFieldWithFillter(10852210,160); + this.last_txt.width = 600; + this.last_txt.height = 70; + this.last_txt.x = 5; + this.last_txt.y = 5; + _loc3_.addChild(this.last_txt); + this.last_txt.defaultTextFormat = _loc4_; + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_getEvalutions,this.listSucc); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_removeImpress,this.removeSucc); + this.refresh(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(GuildTransEvent.Trans_getEvalutions,this.listSucc); + ConnectService.getInstance().removeEventListener(GuildTransEvent.Trans_removeImpress,this.removeSucc); + } + + private function refresh() : void + { + ConnectService.getInstance().guildTransService.getEvalutions(NewUserData.getUser().userId); + } + + private function removeSucc(param1:GuildTransEvent) : void + { + var _loc2_:UserInfoUI = null; + var _loc3_:Button_11 = null; + MessageBoxUI.getInstance().addMessage("删除好友评价成功"); + if(Boolean(parent) && parent is UserInfoUI) + { + _loc2_ = parent as UserInfoUI; + _loc3_ = _loc2_.btnArr[3] as Button_11; + _loc3_.dispatchEvent(new MouseEvent("click")); + } + } + + private function listSucc(param1:GuildTransEvent) : void + { + var _loc2_:* = undefined; + var _loc3_:String = null; + this.lasty3Records = param1.itemObj.lasty3Records as Array; + var _loc4_:* = param1.itemObj.numSortList as Array; + this.drawImpress(_loc4_); + var _loc5_:String = ""; + var _loc6_:int = 0; + while(_loc6_ < this.lasty3Records.length) + { + _loc2_ = this.lasty3Records[_loc6_].showTime; + _loc3_ = ""; + if(_loc2_ / 1000 > 3600 * 24) + { + _loc3_ += int(_loc2_ / 1000 / 3600 / 24) + "天"; + } + else + { + _loc3_ += Utils.formatSecond(_loc2_ / 1000); + } + _loc5_ += this.lasty3Records[_loc6_].friendUserName + " " + _loc3_ + " 前描述了我:" + this.lasty3Records[_loc6_].evalutionContent + "\n"; + _loc6_++; + } + this.last_txt.text = _loc5_; + this.last_txt.selectable = false; + } + + private function drawImpress(param1:Array) : void + { + var arr:*; + var nameMap:HashMap = null; + var content:String = null; + var num:int = 0; + var evalutionArr:Array = null; + var xx:int = 0; + var yy:int = 0; + var j:int = 0; + var userNameArr:Array = null; + var nameStr:String = null; + var k:int = 0; + var sp:Sprite = null; + var color:* = undefined; + var txt:TextField = null; + var format:TextFormat = null; + var lastfloor:int = 0; + var i:int = 0; + var viewFail:Array = param1; + Utils.removeAll(this._itemContainer); + arr = viewFail; + this._itemContainer.clear(); + this.impressMap.clear(); + if(arr.length == 0) + { + this.moren_txt.visible = true; + return; + } + this.moren_txt.visible = false; + while(i < arr.length) + { + nameMap = new HashMap(); + this.moren_txt.visible = false; + content = arr[i].content; + num = int(arr[i].num); + evalutionArr = arr[i].evalutionList; + xx = int(Math.random() * 520); + yy = int(Math.random() * 220); + j = 0; + while(j < evalutionArr.length) + { + nameMap.put(evalutionArr[j].friendUserName,"1"); + j += 1; + } + userNameArr = nameMap.keys(); + nameStr = ""; + k = 0; + while(k < userNameArr.length) + { + nameStr += userNameArr[k]; + if(k != userNameArr.length - 1) + { + nameStr += "、"; + } + k += 1; + } + sp = new Sprite(); + color = i >= 9 ? face.getPng(this.colorBg[9]) : face.getPng(this.colorBg[i]); + sp.graphics.beginBitmapFill(color); + sp.graphics.drawRect(0,0,79,19); + sp.graphics.endFill(); + this._itemContainer.addChild(sp); + sp.x = xx; + sp.y = yy; + this.impressMap.put(xx + "," + yy,evalutionArr); + txt = new TextField(); + txt.text = content; + txt.width = 79; + txt.height = 19; + format = new TextFormat(); + format.align = "center"; + txt.setTextFormat(format); + sp.addChild(txt); + txt.x = -1; + txt.selectable = false; + txt.mouseEnabled = false; + lastfloor = this._itemContainer.getChildIndex(sp); + ToolTipManager.getInstance().setToolTip(sp,new TxtTooltip(nameStr + " 这样描述我: " + content)); + sp.addEventListener(MouseEvent.CLICK,function(param1:MouseEvent):* + { + var _loc2_:Array = null; + var _loc3_:Array = null; + var _loc4_:int = 0; + if(param1.localX > 72 && param1.localY < 12) + { + _loc2_ = new Array(); + _loc3_ = new Array(); + if(impressMap.getValue(param1.currentTarget.x + "," + param1.currentTarget.y)) + { + _loc3_ = impressMap.getValue(param1.currentTarget.x + "," + param1.currentTarget.y); + } + _loc4_ = 0; + while(_loc4_ < _loc3_.length) + { + _loc2_[_loc4_] = _loc3_[_loc4_].evalutionId; + _loc4_++; + } + ConnectService.getInstance().guildTransService.removeImpress(_loc2_); + } + },false,0,true); + sp.addEventListener(MouseEvent.MOUSE_OVER,function(param1:MouseEvent):* + { + var _loc2_:* = new BitmapData(7,7); + var _loc3_:* = new Bitmap(); + _loc2_ = face.getPng("chazi"); + _loc3_.bitmapData = _loc2_; + _loc3_.name = "chazi"; + var _loc4_:* = (param1.currentTarget as Sprite).x; + var _loc5_:* = (param1.currentTarget as Sprite).y; + (param1.currentTarget as Sprite).addChild(_loc3_); + _loc3_.x = 72; + (param1.currentTarget as Sprite).x = _loc4_; + (param1.currentTarget as Sprite).y = _loc5_; + },false,0,true); + sp.addEventListener(MouseEvent.MOUSE_OUT,function(param1:MouseEvent):* + { + var _loc2_:* = (param1.currentTarget as Sprite).x; + var _loc3_:* = (param1.currentTarget as Sprite).y; + if((param1.currentTarget as Sprite).numChildren >= 2) + { + (param1.currentTarget as Sprite).removeChildAt(1); + } + _itemContainer.addChildAt(param1.currentTarget as Sprite,lastfloor); + (param1.currentTarget as Sprite).x = _loc2_; + (param1.currentTarget as Sprite).y = _loc3_; + },false,0,true); + i += 1; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPage5.as b/flash_decompiled/com/view/ui/user/UserPage5.as new file mode 100644 index 0000000..b2fac80 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPage5.as @@ -0,0 +1,130 @@ +package com.view.ui.user +{ + import com.view.newui.UITabBtn; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class UserPage5 extends BaseUI + { + + private var bg1:UIWindowBg; + + private var lastTab:UITabBtn; + + private var tab1:UITabBtn; + + private var tab2:UITabBtn; + + private var page1:UserPet1; + + private var page2:UserPet2; + + public function UserPage5() + { + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(622,367); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + this.tab1 = new UITabBtn("战宠展示",2); + this.bg1.addChild(this.tab1); + this.tab1.x = 10; + this.tab1.y = 6; + this.tab2 = new UITabBtn("战宠装备",2); + this.bg1.addChild(this.tab2); + this.tab2.x = this.tab1.x + 66; + this.tab2.y = this.tab1.y; + this.tab1.onClick = this.clickTab; + this.tab2.onClick = this.clickTab; + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + if(this.tab1) + { + this.tab1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + if(Boolean(this.page1) && this.bg1.contains(this.page1)) + { + this.page1.getData(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.page1.release(); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.lastTab) + { + if(_loc2_ == this.lastTab) + { + return; + } + this.lastTab.select = false; + if(this.lastTab == this.tab1) + { + this.bg1.removeChild(this.page1); + } + if(this.lastTab == this.tab2) + { + this.bg1.removeChild(this.page2); + } + } + this.lastTab = _loc2_; + if(this.lastTab == this.tab1) + { + this.getPage1(); + } + if(this.lastTab == this.tab2) + { + this.getPage2(); + } + this.lastTab.select = true; + } + + private function init() : void + { + this.getPage1(); + } + + private function getPage1() : void + { + if(this.page1 == null) + { + this.page1 = new UserPet1(); + } + if(!contains(this.page1)) + { + this.bg1.addChild(this.page1); + this.page1.y = 27; + } + } + + private function getPage2() : void + { + if(this.page2 == null) + { + this.page2 = new UserPet2(); + } + if(!contains(this.page2)) + { + this.bg1.addChild(this.page2); + this.page2.y = 27; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPage6.as b/flash_decompiled/com/view/ui/user/UserPage6.as new file mode 100644 index 0000000..2d97a4c --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPage6.as @@ -0,0 +1,241 @@ +package com.view.ui.user +{ + import com.control.ConnectService; + import com.control.pack.event.UserPackEvent; + import com.control.user.event.UserEvent; + import com.view.newui.UITabBtn; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.user.data.UserEquipData; + import flash.events.Event; + import flash.events.MouseEvent; + + public class UserPage6 extends BaseUI + { + + private var bg1:UIWindowBg; + + private var userEquipList:Array; + + private var lastTab:UITabBtn; + + private var tab1:UITabBtn; + + private var tab2:UITabBtn; + + private var tab3:UITabBtn; + + private var tab4:UITabBtn; + + private var page1:UserEquip1; + + private var page2:UserEquip2; + + private var page3:UserEquip3; + + private var page4:UserEquip4; + + public function UserPage6() + { + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(622,367); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + this.tab1 = new UITabBtn("君主装备",2); + this.bg1.addChild(this.tab1); + this.tab1.x = 10; + this.tab1.y = 6; + this.tab2 = new UITabBtn("装备强化",2); + this.bg1.addChild(this.tab2); + this.tab2.x = this.tab1.x + 66; + this.tab2.y = this.tab1.y; + this.tab3 = new UITabBtn("装备分解",2); + this.bg1.addChild(this.tab3); + this.tab3.x = this.tab2.x + 66; + this.tab3.y = this.tab1.y; + this.tab4 = new UITabBtn("装备镶嵌",2); + this.bg1.addChild(this.tab4); + this.tab4.x = this.tab3.x + 66; + this.tab4.y = this.tab1.y; + this.tab1.onClick = this.clickTab; + this.tab2.onClick = this.clickTab; + this.tab3.onClick = this.clickTab; + this.tab4.onClick = this.clickTab; + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(UserPackEvent.USER_EQUIP_LIST,this.getAllUserEquipListResult); + ConnectService.getInstance().addEventListener(UserPackEvent.USER_EQUIP_EQ,this.equipEqResult); + ConnectService.getInstance().addEventListener(UserEvent.USER_EquipItemFenjie,this.fenjieEqResult); + ConnectService.getInstance().addEventListener(UserEvent.USER_EquipItemStrong,this.strongResult); + if(this.tab1) + { + this.tab1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + this.getAllUserEquipList(); + } + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(UserPackEvent.USER_EQUIP_LIST,this.getAllUserEquipListResult); + ConnectService.getInstance().removeEventListener(UserPackEvent.USER_EQUIP_EQ,this.equipEqResult); + ConnectService.getInstance().removeEventListener(UserEvent.USER_EquipItemFenjie,this.fenjieEqResult); + ConnectService.getInstance().removeEventListener(UserEvent.USER_EquipItemStrong,this.strongResult); + } + + private function getAllUserEquipList() : void + { + } + + private function getAllUserEquipListResult(param1:UserPackEvent) : void + { + this.userEquipList = param1.equipList; + UserEquipData.setEquipData(this.userEquipList); + if(this.lastTab == this.tab1) + { + this.page1.setEquipList(); + } + if(this.lastTab == this.tab2) + { + this.page2.setEquipList(); + } + if(this.lastTab == this.tab3) + { + this.page3.setEquipList(); + } + if(this.lastTab == this.tab4) + { + this.page4.setEquipList(); + } + } + + private function equipEqResult(param1:UserPackEvent) : void + { + this.getAllUserEquipList(); + } + + private function fenjieEqResult(param1:UserEvent) : void + { + this.getAllUserEquipList(); + } + + private function strongResult(param1:UserEvent) : void + { + this.getAllUserEquipList(); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.lastTab) + { + if(_loc2_ == this.lastTab) + { + return; + } + this.lastTab.select = false; + if(this.lastTab == this.tab1) + { + this.bg1.removeChild(this.page1); + } + if(this.lastTab == this.tab2) + { + this.bg1.removeChild(this.page2); + } + if(this.lastTab == this.tab3) + { + this.bg1.removeChild(this.page3); + } + if(this.lastTab == this.tab4) + { + this.bg1.removeChild(this.page4); + } + } + this.lastTab = _loc2_; + if(this.lastTab == this.tab1) + { + this.getPage1(); + } + if(this.lastTab == this.tab2) + { + this.getPage2(); + } + if(this.lastTab == this.tab3) + { + this.getPage3(); + } + if(this.lastTab == this.tab4) + { + this.getPage4(); + } + this.lastTab.select = true; + } + + private function init() : void + { + this.getPage1(); + } + + private function getPage1() : void + { + if(this.page1 == null) + { + this.page1 = new UserEquip1(); + } + if(!this.bg1.contains(this.page1)) + { + this.bg1.addChild(this.page1); + } + this.page1.setEquipList(); + } + + private function getPage2() : void + { + if(this.page2 == null) + { + this.page2 = new UserEquip2(); + } + if(!this.bg1.contains(this.page2)) + { + this.bg1.addChild(this.page2); + } + this.page2.setEquipList(); + } + + private function getPage3() : void + { + if(this.page3 == null) + { + this.page3 = new UserEquip3(); + } + if(!this.bg1.contains(this.page3)) + { + this.bg1.addChild(this.page3); + } + this.page3.setEquipList(); + } + + private function getPage4() : void + { + if(this.page4 == null) + { + this.page4 = new UserEquip4(); + } + if(!this.bg1.contains(this.page4)) + { + this.bg1.addChild(this.page4); + } + this.page4.setEquipList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPage7.as b/flash_decompiled/com/view/ui/user/UserPage7.as new file mode 100644 index 0000000..4ea4dd1 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPage7.as @@ -0,0 +1,125 @@ +package com.view.ui.user +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_32; + import com.view.newui.UIConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.horse.HorseEqUI; + import com.view.ui.user.data.UserHorseData; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class UserPage7 extends BaseUI + { + + private var bg1:UIWindowBg; + + private var bgSp:Sprite; + + private var equText:TextField; + + private var horseEquUI:HorseEqUI; + + public function UserPage7() + { + var _loc5_:TextField = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(622,367); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + this.bgSp = new Sprite(); + this.bg1.addChild(this.bgSp); + this.bgSp.x = 2; + this.bgSp.y = 2; + var _loc1_:String = "pic/bg/bg_maju.jpg"; + loadBg(_loc1_); + var _loc2_:Sprite = new Sprite(); + this.bg1.addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 2; + var _loc3_:Sprite = new Scale9Grid(face.getSprite(ClassConfig.lib_img_border),120,120); + var _loc4_:Sprite = PublicMethod.createShape(2107430,int(_loc3_.width),int(_loc3_.height)); + _loc4_.addChild(_loc3_); + _loc2_.addChild(_loc4_); + _loc4_.x = this.bg1.width - _loc4_.width - 4; + _loc4_.y = 50; + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + _loc5_.htmlText = "名称:白龙马"; + _loc4_.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = 30; + this.equText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,150); + _loc4_.addChild(this.equText); + this.equText.x = 10; + this.equText.y = 60; + this.equText.htmlText = "饰具:"; + var _loc6_:Button_32 = new Button_32("装备饰具"); + _loc4_.addChild(_loc6_); + _loc6_.x = 36; + _loc6_.y = 100; + _loc6_.onclick = this.openHorseUI; + Utils.g_events.addEventListener(DevEvent.WULICHANGE,this.getWuliResult); + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bgSp.addChild(param1); + param1.width = 628; + param1.height = 373; + } + + private function getWuliResult(param1:DevEvent) : void + { + this.equText.htmlText = "饰具:增加君主武力 " + UserHorseData.getWuliAdd(); + } + + override public function setPosition() : void + { + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.getHorseList(); + } + + private function getHorseList() : void + { + ConnectService.getInstance().userService.getHorseItemList(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + if(Boolean(this.horseEquUI) && contains(this.horseEquUI)) + { + removeChild(this.horseEquUI); + } + } + + private function openHorseUI() : void + { + if(this.horseEquUI == null) + { + this.horseEquUI = new HorseEqUI(); + } + if(!contains(this.horseEquUI)) + { + addChild(this.horseEquUI); + this.horseEquUI.x = 636 / 2 - int(this.horseEquUI.width / 2); + this.horseEquUI.y = 366 / 2 - 160; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPet1.as b/flash_decompiled/com/view/ui/user/UserPet1.as new file mode 100644 index 0000000..bb4c7cd --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPet1.as @@ -0,0 +1,747 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UIConfig; + import com.view.newui.UINumInputText; + import com.view.newui.UISmallBtn; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.data.UserPetData; + import com.view.ui.user.data.UserPetItem; + import com.view.ui.user.mc.PetItemMc5; + import com.view.ui.user.mc.PetItemMc6; + import com.view.ui.user.pet.PetItem1; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class UserPet1 extends Sprite + { + + private var face:InstallFace; + + private var bg1:UIWindowBg; + + private var bg2:Sprite; + + private var petPngSp:Sprite; + + private var bg3:UIWindowBg; + + private var bg4:UIWindowBg; + + private var petVec:Vector.; + + private var label1:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var label5:TextField; + + private var label6:TextField; + + private var label7:TextField; + + private var label8:TextField; + + private var label9:TextField; + + private var petText1:TextField; + + private var petText2:TextField; + + private var petText3:TextField; + + private var petText4:TextField; + + private var num_txt1:UINumInputText; + + private var num_txt:UINumInputText; + + private var petSp:Sprite; + + private var petScrollPane:ScrollPane; + + private var tab1:UITabBtn; + + private var tab2:UITabBtn; + + private var tab3:UITabBtn; + + private var petItem61:PetItemMc6; + + private var petItem62:PetItemMc6; + + private var petItem63:PetItemMc6; + + private var petItem64:PetItemMc6; + + private var petItem65:PetItemMc6; + + private var petItem66:PetItemMc6; + + private var petItemVec:Vector.; + + private var petItemScroll:ScrollPane; + + private var petItemMc:Sprite; + + private var upBtn:UISmallBtn; + + private var upSuperBtn:UISmallBtn; + + private var upLastBtn:UISmallBtn; + + private var preType:int = 0; + + private var petBg:Bitmap; + + private var loadRes:LoadResource; + + private var pingzhipng:Bitmap; + + private var pngArr:Array; + + public function UserPet1() + { + var _loc16_:int = 0; + var _loc17_:PetItem1 = null; + var _loc18_:PetItemMc5 = null; + var _loc19_:int = 0; + var _loc20_:int = 0; + this.face = InstallFace.getInstance(); + this.pngArr = new Array(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(150,332); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + var _loc1_:UITitleBg = new UITitleBg("战宠成长",this.bg1.width); + this.bg1.addChild(_loc1_); + _loc1_.x = int(this.bg1.width / 2 - _loc1_.width / 2); + this.bg2 = new Sprite(); + this.petPngSp = new Sprite(); + this.bg2.addChild(this.petPngSp); + var _loc2_:Bitmap = new Bitmap(this.face.getPng("pet_bg")); + this.petPngSp.addChild(_loc2_); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 3; + this.bg2.y = this.bg1.y; + _loc2_.width = 288; + _loc2_.height = 186; + this.bg4 = new UIWindowBg(); + this.bg4.initThirdPanel(278,143); + addChild(this.bg4); + this.bg4.x = this.bg2.x; + this.bg4.y = this.bg2.y + this.bg2.height + 3; + var _loc3_:UITitleBg = new UITitleBg("战宠装备",this.bg4.width); + this.bg4.addChild(_loc3_); + _loc3_.x = int(this.bg4.width / 2 - _loc3_.width / 2); + var _loc4_:UITitleBg = new UITitleBg("战宠展示",this.bg2.width); + this.bg2.addChild(_loc4_); + _loc4_.x = int(this.bg2.width / 2 - _loc4_.width / 2); + var _loc5_:int = 1; + while(_loc5_ < 7) + { + this["petItem6" + _loc5_] = new PetItemMc6(_loc5_); + this.bg2.addChild(this["petItem6" + _loc5_]); + switch(_loc5_) + { + case 1: + this["petItem6" + _loc5_].x = 30; + this["petItem6" + _loc5_].y = 28; + break; + case 2: + this["petItem6" + _loc5_].x = 30 + 180; + this["petItem6" + _loc5_].y = 28; + break; + case 3: + this["petItem6" + _loc5_].x = 30; + this["petItem6" + _loc5_].y = 28 + 52; + break; + case 4: + this["petItem6" + _loc5_].x = 30 + 180; + this["petItem6" + _loc5_].y = 28 + 52; + break; + case 5: + this["petItem6" + _loc5_].x = 30; + this["petItem6" + _loc5_].y = 28 + 104; + break; + case 6: + this["petItem6" + _loc5_].x = 30 + 180; + this["petItem6" + _loc5_].y = 28 + 104; + } + _loc5_++; + } + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(160,332); + addChild(this.bg3); + this.bg3.x = this.bg2.x + this.bg2.width + 3; + this.bg3.y = this.bg1.y; + var _loc6_:UITitleBg = new UITitleBg("战宠属性",this.bg3.width); + this.bg3.addChild(_loc6_); + _loc6_.x = int(this.bg3.width / 2 - _loc6_.width / 2); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + this.bg3.addChild(this.label1); + this.label1.x = 5; + this.label1.y = 30; + this.label1.htmlText = "宠物名称:"; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + this.bg3.addChild(_loc7_); + _loc7_.x = this.label1.x; + _loc7_.y = this.label1.y + 20; + _loc7_.htmlText = "宠物品质:"; + var _loc8_:Bitmap = new Bitmap(this.face.getPng("pet_06")); + this.bg3.addChild(_loc8_); + _loc8_.x = 45; + _loc8_.y = _loc7_.y + 20; + var _loc9_:Sprite = PublicMethod.getTrLine(160); + this.bg3.addChild(_loc9_); + _loc9_.x = 5; + _loc9_.y = _loc8_.y + 28; + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,95); + this.bg3.addChild(this.label3); + this.label3.x = this.label1.x; + this.label3.y = _loc9_.y + 7; + this.label3.htmlText = "攻 击:"; + this.petText1 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.bg3.addChild(this.petText1); + this.petText1.x = this.label3.x + this.label3.width; + this.petText1.y = this.label3.y; + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,95); + this.bg3.addChild(this.label4); + this.label4.x = this.label1.x; + this.label4.y = this.label3.y + 18; + this.label4.htmlText = "防 御:"; + this.petText2 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.bg3.addChild(this.petText2); + this.petText2.x = this.label4.x + this.label4.width; + this.petText2.y = this.label4.y; + this.label5 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,95); + this.bg3.addChild(this.label5); + this.label5.x = this.label1.x; + this.label5.y = this.label4.y + 18; + this.label5.htmlText = "体 力:"; + this.petText3 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.bg3.addChild(this.petText3); + this.petText3.x = this.label5.x + this.label5.width; + this.petText3.y = this.label5.y; + this.label6 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,95); + this.bg3.addChild(this.label6); + this.label6.x = this.label1.x; + this.label6.y = this.label5.y + 18; + this.label6.htmlText = "敏 捷:"; + this.petText4 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.bg3.addChild(this.petText4); + this.petText4.x = this.label6.x + this.label6.width; + this.petText4.y = this.label6.y; + this.label7 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + this.bg3.addChild(this.label7); + this.label7.x = this.label1.x; + this.label7.y = this.label6.y + 18; + this.label7.htmlText = "拥有宠物仙丹:"; + var _loc10_:Button_9 = new Button_9("说明"); + this.bg3.addChild(_loc10_); + _loc10_.x = 140; + _loc10_.y = this.label7.y; + _loc10_.buttonMode = true; + var _loc11_:String = "仙宠丹可随机提升宠物属性,直到达到最大值。2000万属性以上宠物需要使用超级宠物仙丹升级,5000万属性以上需要使用终极宠物仙丹升级"; + ToolTipManager.getInstance().setToolTip(_loc10_,new TxtTooltip(_loc11_),false,-1,false); + this.num_txt = new UINumInputText(80); + this.num_txt.setMaxChars(5); + this.bg3.addChild(this.num_txt); + this.num_txt.x = this.label1.x; + this.num_txt.y = this.label7.y + 24; + this.upBtn = new UISmallBtn("提 升",2); + this.bg3.addChild(this.upBtn); + this.upBtn.x = 110; + this.upBtn.y = this.num_txt.y + 2; + this.upBtn.onClick = this.upPetPro; + this.upSuperBtn = new UISmallBtn("提 升",2); + this.bg3.addChild(this.upSuperBtn); + this.upSuperBtn.x = this.upBtn.x; + this.upSuperBtn.y = this.upBtn.y; + this.upSuperBtn.onClick = this.upSuperPetPro; + this.upLastBtn = new UISmallBtn("提 升",2); + this.bg3.addChild(this.upLastBtn); + this.upLastBtn.x = this.upBtn.x; + this.upLastBtn.y = this.upBtn.y; + this.upLastBtn.onClick = this.upLastPetPro; + var _loc12_:UITitleBg = new UITitleBg("战宠成长",this.bg3.width); + this.bg3.addChild(_loc12_); + _loc12_.x = int(this.bg3.width / 2 - _loc12_.width / 2); + _loc12_.y = 235; + this.label8 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + this.bg3.addChild(this.label8); + this.label8.x = this.label1.x; + this.label8.y = _loc12_.y + 32; + this.label8.htmlText = "宠物成长值:"; + this.label9 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,150); + this.bg3.addChild(this.label9); + this.label9.x = this.label1.x; + this.label9.y = this.label8.y + 20; + this.label9.htmlText = "宠物成长丹:"; + var _loc13_:Button_9 = new Button_9("说明"); + this.bg3.addChild(_loc13_); + _loc13_.x = 140; + _loc13_.y = this.label9.y; + _loc13_.buttonMode = true; + var _loc14_:String = "宠物成长丹可随机提升宠物成长值,当成长值达到上限,同时宠物属性也已到上限时,宠物可自动进阶到下一级"; + ToolTipManager.getInstance().setToolTip(_loc13_,new TxtTooltip(_loc14_),false,-1,false); + this.num_txt1 = new UINumInputText(80); + this.num_txt1.setMaxChars(5); + this.bg3.addChild(this.num_txt1); + this.num_txt1.x = this.label1.x; + this.num_txt1.y = this.label9.y + 20; + var _loc15_:UISmallBtn = new UISmallBtn("提 升",2); + this.bg3.addChild(_loc15_); + _loc15_.x = 110; + _loc15_.y = this.num_txt1.y + 2; + _loc15_.onClick = this.upPetCount; + this.petScrollPane = new ScrollPane(); + this.petScrollPane.setSize(155,313); + this.petScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg1.addChild(this.petScrollPane); + this.petScrollPane.x = 4; + this.petScrollPane.y = 26; + this.petSp = new Sprite(); + this.petScrollPane.source = this.petSp; + this.petVec = new Vector.(); + _loc16_ = 1; + while(_loc16_ < 6) + { + _loc17_ = new PetItem1(_loc16_); + this.petSp.addChild(_loc17_); + _loc17_.y = 10 + (_loc16_ - 1) * 86; + _loc17_.x = 4; + this.petVec.push(_loc17_); + _loc16_++; + } + this.petScrollPane.update(); + this.petItemScroll = new ScrollPane(); + this.petItemScroll.setSize(285,125); + this.petItemScroll.horizontalScrollPolicy = ScrollPolicy.OFF; + this.bg4.addChild(this.petItemScroll); + this.petItemScroll.x = 2; + this.petItemScroll.y = 26; + this.petItemMc = new Sprite(); + this.petItemScroll.source = this.petItemMc; + this.petItemVec = new Vector.(); + _loc16_ = 0; + while(_loc16_ < 18) + { + _loc18_ = new PetItemMc5(); + this.petItemMc.addChild(_loc18_); + _loc19_ = _loc16_ % 6; + _loc20_ = _loc16_ / 6; + _loc18_.x = 46 * _loc19_; + _loc18_.y = 46 * _loc20_; + this.petItemVec.push(_loc18_); + _loc16_++; + } + this.petItemScroll.update(); + Utils.g_events.addEventListener(PlayEvent.PET_ENTERMAIN,this.enterMainResult); + Utils.g_events.addEventListener(PlayEvent.PET_ITEMLIST_DATA,this.getPetItemListResult); + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + this.getPetItemList(); + } + + public function getData() : void + { + this.getPetView(); + } + + public function release() : void + { + UserPetData.setNeedGetData(); + } + + private function enterMainResult(param1:PlayEvent) : void + { + this.getPetView(); + } + + private function getPetView() : void + { + var _loc13_:PetItem1 = null; + var _loc1_:Object = UserPetData.getPetData(); + if(_loc1_ == null) + { + return; + } + var _loc2_:int = int(_loc1_.type); + var _loc3_:int = int(_loc1_.upCount); + var _loc4_:String = _loc1_.petName; + var _loc5_:int = int(_loc1_.addAgl); + var _loc6_:int = int(_loc1_.addHp); + var _loc7_:int = int(_loc1_.addAtk); + var _loc8_:int = int(_loc1_.addDef); + this.label1.htmlText = "宠物名称:" + Utils.getPetName(_loc2_); + this.label3.htmlText = "攻击:" + _loc7_ + ""; + this.label4.htmlText = "防御:" + _loc8_ + ""; + this.label5.htmlText = "体力:" + _loc6_ + ""; + this.label6.htmlText = "敏捷:" + _loc5_ + ""; + var _loc9_:int = int(_loc1_.itemNums1); + var _loc10_:int = int(_loc1_.itemNums2); + var _loc11_:int = int(_loc1_.itemNums3); + var _loc12_:int = int(_loc1_.itemNums4); + if(_loc7_ >= 50000000 && _loc8_ >= 50000000 && _loc6_ >= 50000000 && _loc5_ >= 50000000) + { + this.label7.htmlText = "终极宠物仙丹:" + Utils.getPower(_loc12_) + ""; + this.upSuperBtn.visible = false; + this.upLastBtn.visible = true; + this.upBtn.visible = false; + this.num_txt.setMaxNum(_loc12_); + if(this.num_txt.getTextNum() > _loc12_) + { + this.num_txt.setTextNum(_loc12_); + } + } + else if(_loc7_ >= 20000000 && _loc8_ >= 20000000 && _loc6_ >= 20000000 && _loc5_ >= 20000000) + { + this.label7.htmlText = "超级宠物仙丹:" + Utils.getPower(_loc11_) + ""; + this.upSuperBtn.visible = true; + this.upLastBtn.visible = false; + this.upBtn.visible = false; + this.num_txt.setMaxNum(_loc11_); + if(this.num_txt.getTextNum() > _loc11_) + { + this.num_txt.setTextNum(_loc11_); + } + } + else + { + this.label7.htmlText = "拥有宠物仙丹:" + _loc9_ + ""; + this.upSuperBtn.visible = false; + this.upLastBtn.visible = false; + this.upBtn.visible = true; + this.num_txt.setMaxNum(_loc9_); + if(this.num_txt.getTextNum() > _loc9_) + { + this.num_txt.setTextNum(_loc9_); + } + } + this.label8.htmlText = "宠物成长值:" + _loc3_ + ""; + this.label9.htmlText = "宠物成长丹:" + _loc10_ + ""; + this.num_txt1.setMaxNum(_loc10_); + if(this.num_txt1.getTextNum() > _loc10_) + { + this.num_txt1.setTextNum(_loc10_); + } + this.petVec[0].setTip(_loc1_.PET_TYPE1_MAX); + this.petVec[1].setTip(_loc1_.PET_TYPE2_MAX); + this.petVec[2].setTip(_loc1_.PET_TYPE3_MAX); + this.petVec[3].setTip(_loc1_.PET_TYPE4_MAX); + this.petVec[4].setTip(_loc1_.PET_TYPE5_MAX); + for each(_loc13_ in this.petVec) + { + if(_loc13_.type == _loc2_) + { + _loc13_.setCurr(true); + } + else + { + _loc13_.setCurr(false); + } + } + this.showPetBg(_loc2_); + this.showPetItemInfo(); + } + + private function showPetItemInfo() : void + { + var _loc2_:PackItem = null; + var _loc3_:UserPetItem = null; + var _loc4_:PackItem = null; + var _loc5_:UserPetItem = null; + var _loc6_:PackItem = null; + var _loc7_:UserPetItem = null; + var _loc8_:PackItem = null; + var _loc9_:UserPetItem = null; + var _loc10_:PackItem = null; + var _loc11_:UserPetItem = null; + var _loc12_:PackItem = null; + var _loc13_:UserPetItem = null; + var _loc1_:Object = UserPetData.getPetData(); + if(_loc1_) + { + _loc2_ = PakState.getPetItemByChildType(_loc1_.item61); + if(_loc2_) + { + _loc3_ = UserPetData.getPetItemByTid(_loc2_.id); + } + this.petItem61.setItemObj(_loc2_,_loc3_); + _loc4_ = PakState.getPetItemByChildType(_loc1_.item62); + if(_loc4_) + { + _loc5_ = UserPetData.getPetItemByTid(_loc4_.id); + } + this.petItem62.setItemObj(_loc4_,_loc5_); + _loc6_ = PakState.getPetItemByChildType(_loc1_.item63); + if(_loc6_) + { + _loc7_ = UserPetData.getPetItemByTid(_loc6_.id); + } + this.petItem63.setItemObj(_loc6_,_loc7_); + _loc8_ = PakState.getPetItemByChildType(_loc1_.item64); + if(_loc8_) + { + _loc9_ = UserPetData.getPetItemByTid(_loc8_.id); + } + this.petItem64.setItemObj(_loc8_,_loc9_); + _loc10_ = PakState.getPetItemByChildType(_loc1_.item65); + if(_loc10_) + { + _loc11_ = UserPetData.getPetItemByTid(_loc10_.id); + } + this.petItem65.setItemObj(_loc10_,_loc11_); + _loc12_ = PakState.getPetItemByChildType(_loc1_.item66); + if(_loc12_) + { + _loc13_ = UserPetData.getPetItemByTid(_loc12_.id); + } + this.petItem66.setItemObj(_loc12_,_loc13_); + this.petText1.htmlText = "[" + Utils.getPower(_loc1_.itemAddAtk) + "]"; + this.petText2.htmlText = "[" + Utils.getPower(_loc1_.itemAddDef) + "]"; + this.petText3.htmlText = "[" + Utils.getPower(_loc1_.itemAddHp) + "]"; + this.petText4.htmlText = "[" + Utils.getPower(_loc1_.itemAddAgl) + "]"; + } + } + + private function getPetItemList() : void + { + ConnectService.getInstance().playService.getUserPetItemList(); + } + + private function getPetItemListResult(param1:PlayEvent) : void + { + this.showPetItem(); + } + + private function setItemCount(param1:DevEvent) : void + { + this.showPetItem(); + this.showPetItemInfo(); + } + + private function showPetItem() : void + { + var _loc2_:* = undefined; + var _loc3_:PetItemMc5 = null; + var _loc4_:int = 0; + var _loc5_:int = 0; + this.clearPetItemList(); + var _loc1_:Vector. = PakState.getPetItemListByColor(0); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 17) + { + _loc3_ = new PetItemMc5(); + this.petItemMc.addChild(_loc3_); + _loc4_ = _loc2_ % 6; + _loc5_ = _loc2_ / 6; + _loc3_.x = 46 * _loc4_; + _loc3_.y = 46 * _loc5_; + this.petItemVec.push(_loc3_); + } + this.petItemVec[_loc2_].setItemObj(_loc1_[_loc2_]); + } + } + this.petItemScroll.update(); + } + + private function clearPetItemList() : void + { + var _loc1_:* = int(this.petItemVec.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 17) + { + this.petItemMc.removeChild(this.petItemVec[_loc1_]); + this.petItemVec.splice(_loc1_,1); + } + else + { + this.petItemVec[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.petItemScroll.update(); + } + + private function showPetBg(param1:int) : void + { + if(this.preType == param1) + { + return; + } + this.preType = param1; + if(Boolean(this.petBg) && this.petPngSp.contains(this.petBg)) + { + this.petPngSp.removeChild(this.petBg); + } + var _loc2_:String = "pet_bg_0" + param1; + this.petBg = new Bitmap(this.face.getPng(_loc2_)); + this.petPngSp.addChild(this.petBg); + switch(this.preType) + { + case 1: + this.petBg.x = 102; + this.petBg.y = 73; + break; + case 2: + this.petBg.x = 73; + this.petBg.y = 33; + break; + case 3: + this.petBg.x = 77; + this.petBg.y = 31; + break; + case 4: + this.petBg.x = 79; + this.petBg.y = 32; + break; + case 5: + this.petBg.x = 54; + this.petBg.y = 44; + } + this.loadPinzhi(); + } + + private function loadPinzhi() : void + { + if(this.pingzhipng != null) + { + this.addPinZhiPng(); + return; + } + var _loc1_:String = "pic/sys/image 9.png"; + this.loadRes = new LoadResource(_loc1_,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + this.pingzhipng = Bitmap(param1.target.loader.content); + this.loadRes.clear(); + this.addPinZhiPng(); + } + + private function addPinZhiPng() : void + { + var _loc1_:int = 0; + var _loc2_:Bitmap = null; + _loc1_ = 0; + while(_loc1_ < this.pngArr.length) + { + this.bg3.removeChild(this.pngArr[_loc1_]); + _loc1_++; + } + this.pngArr = new Array(); + _loc1_ = 0; + while(_loc1_ < this.preType) + { + _loc2_ = new Bitmap(this.pingzhipng.bitmapData); + this.pngArr.push(_loc2_); + this.bg3.addChild(_loc2_); + _loc2_.x = 66 + _loc1_ * 19; + _loc2_.y = 48; + _loc1_++; + } + } + + private function upPetCount(param1:MouseEvent) : void + { + var _loc2_:int = this.num_txt1.getTextNum(); + var _loc3_:Object = UserPetData.getPetData(); + var _loc4_:int = int(_loc3_.itemNums2); + if(_loc2_ > _loc4_) + { + MessageBoxUI.getInstance().addMessage("道具数量不足"); + return; + } + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("提升次数必须大于0"); + return; + } + ConnectService.getInstance().playService.upPetCount(_loc2_); + } + + private function upPetPro(param1:MouseEvent) : void + { + var _loc2_:int = this.num_txt.getTextNum(); + var _loc3_:Object = UserPetData.getPetData(); + var _loc4_:int = int(_loc3_.itemNums1); + if(_loc2_ > _loc4_) + { + MessageBoxUI.getInstance().addMessage("道具数量不足"); + return; + } + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("提升次数必须大于0"); + return; + } + ConnectService.getInstance().playService.upPetPro(_loc2_); + } + + private function upSuperPetPro(param1:MouseEvent) : void + { + var _loc2_:int = this.num_txt.getTextNum(); + var _loc3_:Object = UserPetData.getPetData(); + var _loc4_:int = int(_loc3_.itemNums3); + if(_loc2_ > _loc4_) + { + MessageBoxUI.getInstance().addMessage("道具数量不足"); + return; + } + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("提升次数必须大于0"); + return; + } + ConnectService.getInstance().playService.upSuperPetPro(_loc2_); + } + + private function upLastPetPro(param1:MouseEvent) : void + { + var _loc2_:int = this.num_txt.getTextNum(); + var _loc3_:Object = UserPetData.getPetData(); + var _loc4_:int = int(_loc3_.itemNums4); + if(_loc2_ > _loc4_) + { + MessageBoxUI.getInstance().addMessage("道具数量不足"); + return; + } + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("提升次数必须大于0"); + return; + } + ConnectService.getInstance().playService.upLastPetPro(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPet2.as b/flash_decompiled/com/view/ui/user/UserPet2.as new file mode 100644 index 0000000..4d3646f --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPet2.as @@ -0,0 +1,193 @@ +package com.view.ui.user +{ + import com.view.newui.UITabBtn; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + import flash.events.MouseEvent; + + public class UserPet2 extends Sprite + { + + private var bg1:UIWindowBg; + + private var tab1:UITabBtn; + + private var tab2:UITabBtn; + + private var tab3:UITabBtn; + + private var tab4:UITabBtn; + + private var tab5:UITabBtn; + + private var lastTab:UITabBtn; + + private var page1:UserPetItem1; + + private var page2:UserPetItem2; + + private var page3:UserPetItem3; + + private var page4:UserPetItem4; + + private var page5:UserPetItem5; + + public function UserPet2() + { + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(150 + 464,332); + addChild(this.bg1); + this.bg1.x = 4; + this.bg1.y = 4; + this.tab1 = new UITabBtn("装备升级",2); + this.bg1.addChild(this.tab1); + this.tab1.x = 10; + this.tab1.y = 4; + this.tab2 = new UITabBtn("装备分解",2); + this.bg1.addChild(this.tab2); + this.tab2.x = this.tab1.x + 66; + this.tab2.y = this.tab1.y; + this.tab3 = new UITabBtn("装备打孔",2); + this.bg1.addChild(this.tab3); + this.tab3.x = this.tab2.x + 66; + this.tab3.y = this.tab1.y; + this.tab4 = new UITabBtn("装备镶嵌",2); + this.bg1.addChild(this.tab4); + this.tab4.x = this.tab3.x + 66; + this.tab4.y = this.tab1.y; + this.tab5 = new UITabBtn("宠物宝石升级",3); + this.bg1.addChild(this.tab5); + this.tab5.x = this.tab4.x + 66; + this.tab5.y = this.tab1.y; + this.tab1.onClick = this.clickTab; + this.tab2.onClick = this.clickTab; + this.tab3.onClick = this.clickTab; + this.tab4.onClick = this.clickTab; + this.tab5.onClick = this.clickTab; + this.tab1.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.lastTab) + { + if(_loc2_ == this.lastTab) + { + return; + } + this.lastTab.select = false; + if(this.lastTab == this.tab1) + { + this.bg1.removeChild(this.page1); + } + if(this.lastTab == this.tab2) + { + this.bg1.removeChild(this.page2); + } + if(this.lastTab == this.tab3) + { + this.bg1.removeChild(this.page3); + } + if(this.lastTab == this.tab4) + { + this.bg1.removeChild(this.page4); + } + } + this.lastTab = _loc2_; + if(this.lastTab == this.tab1) + { + this.getPage1(); + } + if(this.lastTab == this.tab2) + { + this.getPage2(); + } + if(this.lastTab == this.tab3) + { + this.getPage3(); + } + if(this.lastTab == this.tab4) + { + this.getPage4(); + } + if(this.lastTab == this.tab5) + { + this.getPage5(); + } + this.lastTab.select = true; + } + + private function getPage1() : void + { + if(this.page1 == null) + { + this.page1 = new UserPetItem1(); + } + if(!contains(this.page1)) + { + this.bg1.addChild(this.page1); + this.page1.y = 27; + } + this.page1.getEquipList(); + } + + private function getPage2() : void + { + if(this.page2 == null) + { + this.page2 = new UserPetItem2(); + } + if(!contains(this.page2)) + { + this.bg1.addChild(this.page2); + this.page2.y = 27; + } + this.page2.getEquipList(); + } + + private function getPage3() : void + { + if(this.page3 == null) + { + this.page3 = new UserPetItem3(); + } + if(!contains(this.page3)) + { + this.bg1.addChild(this.page3); + this.page3.y = 27; + } + this.page3.getEquipList(); + } + + private function getPage4() : void + { + if(this.page4 == null) + { + this.page4 = new UserPetItem4(); + } + if(!contains(this.page4)) + { + this.bg1.addChild(this.page4); + this.page4.y = 27; + } + this.page4.getEquipList(); + } + + private function getPage5() : void + { + if(this.page5 == null) + { + this.page5 = new UserPetItem5(); + } + if(!contains(this.page5)) + { + this.bg1.addChild(this.page5); + this.page5.y = 27; + } + this.page5.getEquipList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPetItem1.as b/flash_decompiled/com/view/ui/user/UserPetItem1.as new file mode 100644 index 0000000..cf1b0aa --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPetItem1.as @@ -0,0 +1,295 @@ +package com.view.ui.user +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.mc.PetItemMc; + import com.view.ui.user.pet.PetItem3; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UserPetItem1 extends Sprite + { + + private var bg1:UIWindowBg; + + private var combox:ComboBox; + + private var itemNumsText:TextField; + + private var petItemVec:Vector.; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var currColor:int = 0; + + private var hasGetItemList:Boolean; + + private var lastItem:PetItemMc; + + private var hasGetPetItem:Boolean; + + public function UserPetItem1() + { + var _loc4_:UITable = null; + var _loc9_:PetItemMc = null; + var _loc10_:PetItem3 = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(150 + 456,299); + addChild(this.bg1); + this.bg1.y = 2; + this.bg1.x = 4; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部", + "data":0 + }); + this.combox.addItem({ + "label":"头饰", + "data":61 + }); + this.combox.addItem({ + "label":"项链", + "data":62 + }); + this.combox.addItem({ + "label":"胸甲", + "data":63 + }); + this.combox.addItem({ + "label":"利爪", + "data":64 + }); + this.combox.addItem({ + "label":"挂饰", + "data":65 + }); + this.combox.addItem({ + "label":"脚环", + "data":66 + }); + this.bg1.addChild(this.combox); + this.combox.x = 5; + this.combox.y = 4; + this.combox.textField.setStyle("textFormat",_loc1_); + this.combox.dropdown.setRendererStyle("textFormat",_loc1_); + this.combox.addEventListener(Event.CHANGE,this.selectColor); + this.combox.selectedItem = this.combox.getItemAt(0); + var _loc2_:Array = ["装备名称","装备品质"]; + var _loc3_:Array = [110,98]; + _loc4_ = new UITable(); + _loc4_.drawLine = false; + _loc4_.install(10,_loc2_,_loc3_); + this.bg1.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = 29; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(202,251); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc4_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 10) + { + _loc9_ = new PetItemMc(); + this.packMc.addChild(_loc9_); + this.packList.push(_loc9_); + _loc9_.y = _loc5_ * 25; + _loc9_.x = 1; + _loc9_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + this.packScrollPane.update(); + var _loc6_:UIWindowBg = new UIWindowBg(); + _loc6_.initThirdPanel(390,291); + this.bg1.addChild(_loc6_); + _loc6_.x = 212; + _loc6_.y = 4; + var _loc7_:UITitleBg = new UITitleBg("宠物装备升级",_loc6_.width); + _loc6_.addChild(_loc7_); + _loc7_.x = int(_loc6_.width / 2 - _loc7_.width / 2); + this.itemNumsText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc6_.addChild(this.itemNumsText); + this.itemNumsText.x = 10; + this.itemNumsText.y = 28; + this.itemNumsText.htmlText = "当前拥有宠物道具碎片数量:0"; + this.petItemVec = new Vector.(); + var _loc8_:int = 0; + while(_loc8_ < 4) + { + _loc10_ = new PetItem3(_loc8_); + _loc6_.addChild(_loc10_); + _loc10_.x = 20; + _loc10_.y = 43 + 63 * _loc8_; + this.petItemVec.push(_loc10_); + _loc8_++; + } + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + ConnectService.getInstance().playService.getPetItem(); + Utils.g_events.addEventListener(PlayEvent.PET_ITEM_DATA,this.getPetItemResult); + Utils.g_events.addEventListener(PlayEvent.PET_ITEM_UP,this.upPetItemResult); + } + + public function getEquipList() : void + { + this.initEquList(); + } + + private function selectColor(param1:Event) : void + { + this.currColor = this.combox.selectedItem.data; + this.initEquList(); + } + + private function setItemCount(param1:DevEvent) : void + { + this.initEquList(); + } + + private function initEquList() : void + { + var _loc2_:* = undefined; + var _loc3_:PetItemMc = null; + this.clearItemList(); + var _loc1_:Vector. = PakState.getPetItemListByColor(this.currColor); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 9) + { + _loc3_ = new PetItemMc(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 25 * _loc2_; + _loc3_.setItemObj(_loc1_[_loc2_]); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc2_].setItemObj(_loc1_[_loc2_]); + this.packList[_loc2_].setClick(false); + } + } + } + this.hasGetItemList = true; + this.packScrollPane.update(); + this.loadDataComplete(); + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc4_:PetItem3 = null; + var _loc2_:PetItemMc = param1.currentTarget as PetItemMc; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.lastItem) + { + this.lastItem.setClick(false); + } + this.lastItem = _loc2_; + this.lastItem.setClick(true); + var _loc3_:PackItem = this.lastItem.getItemObj(); + for each(_loc4_ in this.petItemVec) + { + _loc4_.initData(_loc3_); + } + } + + private function getPetItemResult(param1:PlayEvent) : void + { + this.hasGetPetItem = true; + this.loadDataComplete(); + } + + private function loadDataComplete() : void + { + var _loc1_:int = 0; + var _loc2_:PetItem3 = null; + if(this.hasGetPetItem == false) + { + return; + } + if(this.hasGetItemList == false) + { + return; + } + if(this.lastItem == null) + { + this.lastItem = this.packList[0]; + } + if(this.lastItem.getItemObj() == null) + { + this.lastItem = this.packList[0]; + } + if(this.lastItem.getItemObj() != null) + { + this.lastItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + else + { + for each(_loc2_ in this.petItemVec) + { + _loc2_.initData(null); + } + } + _loc1_ = PakState.getItemsByEntId(10395507); + this.itemNumsText.htmlText = "当前拥有宠物道具碎片数量:" + _loc1_ + ""; + } + + private function upPetItemResult(param1:PlayEvent) : void + { + this.initEquList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPetItem2.as b/flash_decompiled/com/view/ui/user/UserPetItem2.as new file mode 100644 index 0000000..fb61fd3 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPetItem2.as @@ -0,0 +1,353 @@ +package com.view.ui.user +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.mc.PetItemMc2; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UserPetItem2 extends Sprite + { + + private var bg1:UIWindowBg; + + private var combox:ComboBox; + + private var selectAllBtn:UICheckBtn; + + private var fenjieBtn:UIButton; + + private var fenjieInfo:TextField; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var currColor:int = 0; + + private var selelctAllStatus:Boolean = false; + + private var lastItem:PetItemMc2; + + public function UserPetItem2() + { + var _loc2_:Array = null; + var _loc3_:Array = null; + var _loc4_:TextField = null; + var _loc12_:TextField = null; + var _loc13_:PetItemMc2 = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(150 + 456,299); + addChild(this.bg1); + this.bg1.y = 2; + this.bg1.x = 4; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部", + "data":0 + }); + this.combox.addItem({ + "label":"头饰", + "data":61 + }); + this.combox.addItem({ + "label":"项链", + "data":62 + }); + this.combox.addItem({ + "label":"胸甲", + "data":63 + }); + this.combox.addItem({ + "label":"利爪", + "data":64 + }); + this.combox.addItem({ + "label":"挂饰", + "data":65 + }); + this.combox.addItem({ + "label":"脚环", + "data":66 + }); + this.bg1.addChild(this.combox); + this.combox.x = 5; + this.combox.y = 4; + this.combox.textField.setStyle("textFormat",_loc1_); + this.combox.dropdown.setRendererStyle("textFormat",_loc1_); + this.combox.addEventListener(Event.CHANGE,this.selectColor); + this.combox.selectedItem = this.combox.getItemAt(0); + this.selectAllBtn = new UICheckBtn(); + this.bg1.addChild(this.selectAllBtn); + this.selectAllBtn.x = 125; + this.selectAllBtn.y = 7; + this.selectAllBtn.onClick = this.selectAll; + _loc2_ = ["装备名称","装备品质"]; + _loc3_ = [110,98]; + _loc4_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,50); + this.bg1.addChild(_loc4_); + _loc4_.x = 148; + _loc4_.y = 8; + _loc4_.text = "全选"; + var _loc5_:UITable = new UITable(); + _loc5_.drawLine = false; + _loc5_.install(10,_loc2_,_loc3_); + this.bg1.addChild(_loc5_); + _loc5_.x = 5; + _loc5_.y = 29; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(202,251); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc5_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 10) + { + _loc13_ = new PetItemMc2(); + this.packMc.addChild(_loc13_); + this.packList.push(_loc13_); + _loc13_.y = _loc6_ * 25; + _loc13_.x = 1; + _loc13_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc6_++; + } + this.packScrollPane.update(); + var _loc7_:UIWindowBg = new UIWindowBg(); + _loc7_.initThirdPanel(390,291); + this.bg1.addChild(_loc7_); + _loc7_.x = 212; + _loc7_.y = 4; + var _loc8_:UITitleBg = new UITitleBg("分解信息",_loc7_.width); + _loc7_.addChild(_loc8_); + _loc8_.x = int(_loc7_.width / 2 - _loc8_.width / 2); + var _loc9_:Sprite = PublicMethod.getTrLine(380); + _loc7_.addChild(_loc9_); + _loc9_.x = 5; + _loc9_.y = 206; + var _loc10_:String = "1 星品质宠物道具分解可活动1-10个宠物道具碎片
"; + _loc10_ = _loc10_ + "2 星品质宠物道具分解可活动10-30个宠物道具碎片
"; + _loc10_ = _loc10_ + "3 星品质宠物道具分解可活动30-60个宠物道具碎片
"; + _loc10_ = _loc10_ + "4 星品质宠物道具分解可活动60-100个宠物道具碎片
"; + _loc10_ = _loc10_ + "5 星品质宠物道具分解可活动100-200个宠物道具碎片
"; + var _loc11_:TextFormat = new TextFormat(); + _loc11_.leading = 4; + _loc12_ = PublicMethod.getMulTextField(UIConfig.labelColor,360,100); + _loc7_.addChild(_loc12_); + _loc12_.x = _loc9_.x + 4; + _loc12_.y = _loc9_.y + 6; + _loc12_.defaultTextFormat = _loc11_; + _loc12_.htmlText = _loc10_; + this.fenjieInfo = PublicMethod.getMulTextField(UIConfig.succColor,280,60); + _loc7_.addChild(this.fenjieInfo); + this.fenjieInfo.x = 60; + this.fenjieInfo.y = 70; + this.fenjieInfo.mouseEnabled = false; + this.fenjieInfo.defaultTextFormat = _loc11_; + this.fenjieBtn = new UIButton("分 解",2); + _loc7_.addChild(this.fenjieBtn); + this.fenjieBtn.x = 170; + this.fenjieBtn.y = 151; + this.fenjieBtn.onClick = this.fenjieSubmit; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + Utils.g_events.addEventListener(PlayEvent.PET_ITEM_FENJIE,this.fenjieResult); + } + + public function getEquipList() : void + { + this.initEquList(); + } + + private function selectColor(param1:Event) : void + { + this.currColor = this.combox.selectedItem.data; + this.initEquList(); + } + + private function setItemCount(param1:DevEvent) : void + { + this.initEquList(); + } + + private function initEquList() : void + { + var _loc2_:* = undefined; + var _loc3_:PetItemMc2 = null; + this.clearItemList(); + var _loc1_:Vector. = PakState.getPetItemListByColor(this.currColor); + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc2_ in _loc1_) + { + if(_loc2_ > 9) + { + _loc3_ = new PetItemMc2(); + this.packMc.addChild(_loc3_); + this.packList.push(_loc3_); + _loc3_.y = 25 * _loc2_; + _loc3_.setItemObj(_loc1_[_loc2_]); + _loc3_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc2_].setItemObj(_loc1_[_loc2_]); + this.packList[_loc2_].setClick(false); + } + } + } + this.packScrollPane.update(); + if(this.lastItem) + { + this.lastItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + this.selectAllBtn.setUnSelect(); + this.selelctAllStatus = false; + } + + private function selectAll(param1:MouseEvent) : void + { + var _loc2_:PetItemMc2 = null; + if(this.selelctAllStatus) + { + this.selelctAllStatus = false; + } + else + { + this.selelctAllStatus = true; + } + if(this.selelctAllStatus) + { + this.selectAllBtn.setSelect(); + } + else + { + this.selectAllBtn.setUnSelect(); + } + for each(_loc2_ in this.packList) + { + if(_loc2_.getItemObj() != null) + { + _loc2_.setClick(this.selelctAllStatus); + } + } + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc4_:PetItemMc2 = null; + var _loc2_:PetItemMc2 = param1.currentTarget as PetItemMc2; + if(_loc2_.getItemObj() == null) + { + return; + } + if(_loc2_.getSelectStatus()) + { + _loc2_.setClick(false); + } + else + { + _loc2_.setClick(true); + } + var _loc3_:int = 0; + for each(_loc4_ in this.packList) + { + if(_loc4_.getSelectStatus()) + { + _loc3_++; + } + } + this.fenjieInfo.htmlText = "已选中 " + _loc3_ + " 个宠物道具"; + if(_loc3_ <= 0) + { + this.fenjieBtn.setUnEnable(); + } + else + { + this.fenjieBtn.setEnable(); + } + } + + private function fenjieSubmit(param1:MouseEvent) : void + { + var _loc3_:PetItemMc2 = null; + var _loc4_:int = 0; + var _loc5_:Object = null; + var _loc2_:Array = new Array(); + for each(_loc3_ in this.packList) + { + if(_loc3_.getSelectStatus()) + { + _loc4_ = _loc3_.getItemObj().id; + _loc2_.push(_loc4_); + } + } + if(_loc2_.length == 0) + { + MessageBoxUI.getInstance().addMessage("请选择要分解的装备"); + return; + } + if(_loc2_.length > 0) + { + _loc5_ = new Object(); + _loc5_.itemList = _loc2_; + ConnectService.getInstance().playService.fenJiePetItem(_loc5_); + } + } + + private function fenjieResult(param1:PlayEvent) : void + { + var _loc2_:int = int(param1.obj); + this.fenjieInfo.htmlText = "分解成功,本次分解共获得" + _loc2_ + "个宠物道具碎片"; + this.initEquList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPetItem3.as b/flash_decompiled/com/view/ui/user/UserPetItem3.as new file mode 100644 index 0000000..be3ad7b --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPetItem3.as @@ -0,0 +1,407 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.cache.ImgCache; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIItem; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.tip.PetItemTip; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.data.UserPetData; + import com.view.ui.user.data.UserPetItem; + import com.view.ui.user.mc.PetItemMc; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 UserPetItem3 extends Sprite + { + + private var bg1:UIWindowBg; + + private var combox:ComboBox; + + private var itemNumsText:TextField; + + private var label2:TextField; + + private var itembg1:UIItem; + + private var dakongBtn:UIButton; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var rolesText:TextField; + + private var currColor:int = 0; + + private var tip:PetItemTip; + + private var lastItem:PetItemMc; + + private var selectObj:PackItem; + + private var load:LoadResource; + + private var itemImg:Bitmap; + + private var face:InstallFace; + + public function UserPetItem3() + { + var _loc2_:TextField = null; + var _loc5_:UITable = null; + var _loc7_:UIWindowBg = null; + var _loc10_:Sprite = null; + var _loc13_:TextField = null; + var _loc14_:PetItemMc = null; + this.face = InstallFace.getInstance(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(150 + 456,299); + addChild(this.bg1); + this.bg1.y = 2; + this.bg1.x = 4; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部", + "data":0 + }); + this.combox.addItem({ + "label":"头饰", + "data":61 + }); + this.combox.addItem({ + "label":"项链", + "data":62 + }); + this.combox.addItem({ + "label":"胸甲", + "data":63 + }); + this.combox.addItem({ + "label":"利爪", + "data":64 + }); + this.combox.addItem({ + "label":"挂饰", + "data":65 + }); + this.combox.addItem({ + "label":"脚环", + "data":66 + }); + this.bg1.addChild(this.combox); + this.combox.x = 5; + this.combox.y = 4; + this.combox.width = 70; + this.combox.textField.setStyle("textFormat",_loc1_); + this.combox.dropdown.setRendererStyle("textFormat",_loc1_); + this.combox.addEventListener(Event.CHANGE,this.selectColor); + this.combox.selectedItem = this.combox.getItemAt(0); + _loc2_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,130); + _loc2_.text = "显示4星以上未打孔道具"; + this.bg1.addChild(_loc2_); + _loc2_.x = this.combox.x + this.combox.width; + _loc2_.y = 8; + var _loc3_:Array = ["装备名称","装备品质"]; + var _loc4_:Array = [110,98]; + _loc5_ = new UITable(); + _loc5_.drawLine = false; + _loc5_.install(10,_loc3_,_loc4_); + this.bg1.addChild(_loc5_); + _loc5_.x = 5; + _loc5_.y = 29; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(202,251); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc5_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 10) + { + _loc14_ = new PetItemMc(); + this.packMc.addChild(_loc14_); + this.packList.push(_loc14_); + _loc14_.y = _loc6_ * 25; + _loc14_.x = 1; + _loc14_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc6_++; + } + this.packScrollPane.update(); + _loc7_ = new UIWindowBg(); + _loc7_.initThirdPanel(390,291); + this.bg1.addChild(_loc7_); + _loc7_.x = 212; + _loc7_.y = 4; + var _loc8_:UITitleBg = new UITitleBg("宠物装备打孔",_loc7_.width); + _loc7_.addChild(_loc8_); + _loc8_.x = int(_loc7_.width / 2 - _loc8_.width / 2); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc7_.addChild(this.label2); + this.label2.x = 10; + this.label2.y = 30; + this.label2.htmlText = "当前拥有打孔石:5"; + this.itembg1 = new UIItem(); + _loc7_.addChild(this.itembg1); + this.itembg1.y = 60; + this.itembg1.x = 177; + var _loc9_:TextFormat = PublicMethod.getCenterTextFormat(); + this.rolesText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,50); + _loc7_.addChild(this.rolesText); + this.rolesText.x = this.itembg1.x; + this.rolesText.y = this.itembg1.y + 50; + this.rolesText.defaultTextFormat = _loc9_; + this.rolesText.text = "未打孔"; + _loc10_ = PublicMethod.getTrLine(380); + _loc7_.addChild(_loc10_); + _loc10_.x = 5; + _loc10_.y = 206; + var _loc11_:String = "1、只有4星和5星宠物道具才能打孔
"; + _loc11_ = _loc11_ + "2、打孔需要打孔石,每个宠物道具只能打孔1次
"; + _loc11_ = _loc11_ + "3、初级打孔石40%几率打1孔,30%几率打2孔,20%几率打3孔,10%几率打4孔
"; + _loc11_ = _loc11_ + "4、宠物道具最高可打出4孔
"; + var _loc12_:TextFormat = new TextFormat(); + _loc12_.leading = 4; + _loc13_ = PublicMethod.getMulTextField(UIConfig.labelColor,360,100); + _loc7_.addChild(_loc13_); + _loc13_.x = _loc10_.x + 4; + _loc13_.y = _loc10_.y + 6; + _loc13_.defaultTextFormat = _loc12_; + _loc13_.htmlText = _loc11_; + this.dakongBtn = new UIButton("打 孔",2); + _loc7_.addChild(this.dakongBtn); + this.dakongBtn.x = 170; + this.dakongBtn.y = 151; + this.dakongBtn.onClick = this.dakong; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + Utils.g_events.addEventListener(PlayEvent.PET_ITEMLIST_DATA,this.getPetItemListResult); + } + + public function getEquipList() : void + { + this.initEquList(); + } + + private function selectColor(param1:Event) : void + { + this.currColor = this.combox.selectedItem.data; + this.initEquList(); + } + + private function setItemCount(param1:DevEvent) : void + { + this.initEquList(); + } + + private function initEquList() : void + { + var _loc4_:UserPetItem = null; + var _loc5_:* = undefined; + var _loc6_:PetItemMc = null; + this.clearItemList(); + var _loc1_:Vector. = PakState.getPetItemListByColor(this.currColor); + var _loc2_:* = int(_loc1_.length - 1); + while(_loc2_ >= 0) + { + if(_loc1_[_loc2_].level <= 3) + { + _loc1_.splice(_loc2_,1); + } + else + { + _loc4_ = UserPetData.getPetItemByTid(_loc1_[_loc2_].id); + if(_loc4_ != null) + { + _loc1_.splice(_loc2_,1); + } + } + _loc2_--; + } + if(_loc1_ != null && _loc1_.length > 0) + { + for(_loc5_ in _loc1_) + { + if(_loc5_ > 9) + { + _loc6_ = new PetItemMc(); + this.packMc.addChild(_loc6_); + this.packList.push(_loc6_); + _loc6_.y = 25 * _loc5_; + _loc6_.setItemObj(_loc1_[_loc5_]); + _loc6_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc5_].setItemObj(_loc1_[_loc5_]); + this.packList[_loc5_].setClick(false); + } + } + } + this.packScrollPane.update(); + if(this.lastItem == null) + { + this.lastItem = this.packList[0]; + } + if(this.lastItem.getItemObj() == null) + { + this.lastItem = this.packList[0]; + } + if(this.lastItem.getItemObj() != null) + { + this.lastItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + else + { + this.rolesText.text = ""; + this.itembg1.clear(); + } + var _loc3_:int = PakState.getItemsByEntId(10395508); + this.label2.htmlText = "当前拥有打孔石:" + _loc3_ + ""; + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:PetItemMc = param1.currentTarget as PetItemMc; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.lastItem) + { + this.lastItem.setClick(false); + } + this.lastItem = _loc2_; + this.lastItem.setClick(true); + this.selectObj = this.lastItem.getItemObj(); + this.loadPng(); + } + + private function loadPng() : void + { + var _loc1_:String = ServerConfig.IMAGE_ITEM_URL + this.selectObj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(_loc1_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc1_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.load = new LoadResource(_loc1_,this.loadBack); + } + } + + private function loadBack(param1:Event) : void + { + if(this.selectObj == null) + { + this.load.clear(); + this.tip.destroyTip(); + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.load.url,this.itemImg); + this.setImgValue(); + this.load.clear(); + } + + private function setImgValue() : void + { + this.itembg1.addPng(this.itemImg); + this.itemImg.width = 41; + this.itemImg.height = 41; + this.showItemInfo(); + } + + private function showItemInfo() : void + { + var _loc1_:int = this.selectObj.id; + var _loc2_:UserPetItem = UserPetData.getPetItemByTid(_loc1_); + if(_loc2_ == null) + { + this.rolesText.text = "未打孔"; + this.dakongBtn.setEnable(); + } + else + { + this.rolesText.text = "孔数:" + _loc2_.roles; + this.dakongBtn.setUnEnable(); + } + if(this.tip == null) + { + this.tip = new PetItemTip(this.itembg1.getItemSprite(),this.face.stage,this.face.tip_bg,this.selectObj,null); + } + else + { + this.tip.setTipData(this.selectObj,null); + } + } + + private function dakong(param1:MouseEvent) : void + { + if(this.selectObj == null) + { + MessageBoxUI.getInstance().addMessage("请先选择要打孔的装备"); + return; + } + ConnectService.getInstance().playService.addPetItemRole(this.selectObj.id); + } + + private function getPetItemListResult(param1:PlayEvent) : void + { + this.initEquList(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPetItem4.as b/flash_decompiled/com/view/ui/user/UserPetItem4.as new file mode 100644 index 0000000..d0e735e --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPetItem4.as @@ -0,0 +1,408 @@ +package com.view.ui.user +{ + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.cache.ImgCache; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIItem; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.data.UserPetData; + import com.view.ui.user.data.UserPetItem; + import com.view.ui.user.mc.PetBaoshiItem; + import com.view.ui.user.mc.PetItemMc4; + import fl.containers.ScrollPane; + import fl.controls.ComboBox; + import fl.controls.ScrollPolicy; + 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 UserPetItem4 extends Sprite + { + + private var bg1:UIWindowBg; + + private var combox:ComboBox; + + private var itemNumsText:TextField; + + private var itembg1:UIItem; + + private var baoshoVec:Vector.; + + private var dakongBtn:UIButton; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var currColor:int = 0; + + private var lastItem:PetItemMc4; + + private var selectObj:PackItem; + + private var load:LoadResource; + + private var itemImg:Bitmap; + + private var selectJewUI:SelectPetJewUI; + + public function UserPetItem4() + { + var _loc5_:UITable = null; + var _loc12_:TextFormat = null; + var _loc13_:TextField = null; + var _loc14_:PetItemMc4 = null; + var _loc15_:PetBaoshiItem = null; + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(150 + 456,299); + addChild(this.bg1); + this.bg1.y = 2; + this.bg1.x = 4; + var _loc1_:TextFormat = new TextFormat(); + _loc1_.align = "center"; + _loc1_.size = 12; + _loc1_.color = 16777215; + this.combox = new ComboBox(); + this.combox.addItem({ + "label":"全部", + "data":0 + }); + this.combox.addItem({ + "label":"头饰", + "data":61 + }); + this.combox.addItem({ + "label":"项链", + "data":62 + }); + this.combox.addItem({ + "label":"胸甲", + "data":63 + }); + this.combox.addItem({ + "label":"利爪", + "data":64 + }); + this.combox.addItem({ + "label":"挂饰", + "data":65 + }); + this.combox.addItem({ + "label":"脚环", + "data":66 + }); + this.bg1.addChild(this.combox); + this.combox.x = 5; + this.combox.y = 4; + this.combox.width = 70; + this.combox.textField.setStyle("textFormat",_loc1_); + this.combox.dropdown.setRendererStyle("textFormat",_loc1_); + this.combox.addEventListener(Event.CHANGE,this.selectColor); + this.combox.selectedItem = this.combox.getItemAt(0); + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,135); + _loc2_.text = "只显示打过孔的宠物道具"; + this.bg1.addChild(_loc2_); + _loc2_.x = this.combox.x + this.combox.width; + _loc2_.y = 8; + var _loc3_:Array = ["装备名称","装备孔数"]; + var _loc4_:Array = [110,98]; + _loc5_ = new UITable(); + _loc5_.drawLine = false; + _loc5_.install(10,_loc3_,_loc4_); + this.bg1.addChild(_loc5_); + _loc5_.x = 5; + _loc5_.y = 29; + this.packScrollPane = new ScrollPane(); + this.packScrollPane.setSize(202,251); + this.packScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + _loc5_.addChild(this.packScrollPane); + this.packScrollPane.x = 1; + this.packScrollPane.y = 25; + this.packMc = new Sprite(); + this.packScrollPane.source = this.packMc; + this.packList = new Vector.(); + var _loc6_:int = 0; + while(_loc6_ < 10) + { + _loc14_ = new PetItemMc4(); + this.packMc.addChild(_loc14_); + this.packList.push(_loc14_); + _loc14_.y = _loc6_ * 25; + _loc14_.x = 1; + _loc14_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc6_++; + } + this.packScrollPane.update(); + var _loc7_:UIWindowBg = new UIWindowBg(); + _loc7_.initThirdPanel(390,291); + this.bg1.addChild(_loc7_); + _loc7_.x = 212; + _loc7_.y = 4; + var _loc8_:UITitleBg = new UITitleBg("宠物装备镶嵌",_loc7_.width); + _loc7_.addChild(_loc8_); + _loc8_.x = int(_loc7_.width / 2 - _loc8_.width / 2); + this.itembg1 = new UIItem(); + this.itembg1.y = 60; + this.itembg1.x = 177; + this.baoshoVec = new Vector.(); + var _loc9_:int = 1; + while(_loc9_ < 5) + { + _loc15_ = new PetBaoshiItem(_loc9_); + _loc7_.addChild(_loc15_); + _loc15_.x = _loc9_ * 80 - 20; + _loc15_.y = 50; + _loc15_.setFunc(this.addSelectJewUI); + this.baoshoVec.push(_loc15_); + _loc9_++; + } + var _loc10_:Sprite = PublicMethod.getTrLine(380); + _loc7_.addChild(_loc10_); + _loc10_.x = 5; + _loc10_.y = 206; + var _loc11_:String = "1、只有4星和5星宠物道具才能打孔
"; + _loc11_ = _loc11_ + "2、打孔需要打孔石,每个宠物道具只能打孔1次
"; + _loc11_ = _loc11_ + "3、初级打孔石40%几率打1孔,30%几率打2孔,20%几率打3孔,10%几率打4孔
"; + _loc11_ = _loc11_ + "4、宠物道具最高可打出4孔
"; + _loc12_ = new TextFormat(); + _loc12_.leading = 4; + _loc13_ = PublicMethod.getMulTextField(UIConfig.labelColor,360,100); + _loc7_.addChild(_loc13_); + _loc13_.x = _loc10_.x + 4; + _loc13_.y = _loc10_.y + 6; + _loc13_.defaultTextFormat = _loc12_; + this.dakongBtn = new UIButton("一键取出",2); + _loc7_.addChild(this.dakongBtn); + this.dakongBtn.x = 300; + this.dakongBtn.y = 170; + this.dakongBtn.onClick = this.dakong; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + Utils.g_events.addEventListener(PlayEvent.PET_ITEMLIST_DATA,this.getPetItemListResult); + } + + public function getEquipList() : void + { + this.initEquList(); + } + + private function selectColor(param1:Event) : void + { + this.currColor = this.combox.selectedItem.data; + this.initEquList(); + } + + private function setItemCount(param1:DevEvent) : void + { + this.initEquList(); + } + + private function initEquList() : void + { + var _loc3_:PackItem = null; + var _loc4_:UserPetItem = null; + var _loc5_:* = undefined; + var _loc6_:PetItemMc4 = null; + this.clearItemList(); + var _loc1_:Vector. = PakState.getPetItemListByColor(this.currColor); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in _loc1_) + { + _loc4_ = UserPetData.getPetItemByTid(_loc3_.id); + if(_loc4_ != null) + { + _loc3_.petRoleItem = _loc4_; + _loc2_.push(_loc3_); + } + } + if(_loc2_ != null && _loc2_.length > 0) + { + for(_loc5_ in _loc2_) + { + if(_loc5_ > 9) + { + _loc6_ = new PetItemMc4(); + this.packMc.addChild(_loc6_); + this.packList.push(_loc6_); + _loc6_.y = 25 * _loc5_; + _loc6_.setItemObj(_loc2_[_loc5_]); + _loc6_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + } + else + { + this.packList[_loc5_].setItemObj(_loc2_[_loc5_]); + this.packList[_loc5_].setClick(false); + } + } + } + this.packScrollPane.update(); + if(this.lastItem == null) + { + this.lastItem = this.packList[0]; + } + if(this.lastItem.getItemObj() == null) + { + this.lastItem = this.packList[0]; + } + if(this.lastItem.getItemObj() != null) + { + this.lastItem.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + else + { + this.itembg1.clear(); + this.dakongBtn.setUnEnable(); + this.baoshoVec[0].setBaoshi(null); + this.baoshoVec[1].setBaoshi(null); + this.baoshoVec[2].setBaoshi(null); + this.baoshoVec[3].setBaoshi(null); + } + } + + private function clearItemList() : void + { + var _loc1_:* = int(this.packList.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 9) + { + this.packList[_loc1_].removeEventListener(MouseEvent.CLICK,this.clickSingleItem); + this.packMc.removeChild(this.packList[_loc1_]); + this.packList.splice(_loc1_,1); + } + else + { + this.packList[_loc1_].setItemObj(null); + } + _loc1_--; + } + this.packScrollPane.update(); + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:PetItemMc4 = param1.currentTarget as PetItemMc4; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.lastItem) + { + this.lastItem.setClick(false); + } + this.lastItem = _loc2_; + this.lastItem.setClick(true); + this.selectObj = this.lastItem.getItemObj(); + this.loadPng(); + } + + private function loadPng() : void + { + var _loc1_:String = ServerConfig.IMAGE_ITEM_URL + this.selectObj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(_loc1_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc1_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.load = new LoadResource(_loc1_,this.loadBack); + } + } + + private function loadBack(param1:Event) : void + { + if(this.selectObj == null) + { + this.load.clear(); + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.load.url,this.itemImg); + this.setImgValue(); + this.load.clear(); + } + + private function setImgValue() : void + { + this.itembg1.addPng(this.itemImg); + this.itemImg.width = 41; + this.itemImg.height = 41; + this.showItemInfo(); + } + + private function showItemInfo() : void + { + var _loc1_:int = this.selectObj.id; + var _loc2_:UserPetItem = UserPetData.getPetItemByTid(_loc1_); + if(_loc2_.role1 > 0 || _loc2_.role2 > 0 || _loc2_.role3 > 0 || _loc2_.role4 > 0) + { + this.dakongBtn.setEnable(); + } + else + { + this.dakongBtn.setUnEnable(); + } + if(_loc2_.role1 > 0 || _loc2_.role2 > 0 || _loc2_.role3 > 0 || _loc2_.role4 > 0) + { + this.dakongBtn.setEnable(); + } + else + { + this.dakongBtn.setUnEnable(); + } + this.baoshoVec[0].setBaoshi(_loc2_); + this.baoshoVec[1].setBaoshi(_loc2_); + this.baoshoVec[2].setBaoshi(_loc2_); + this.baoshoVec[3].setBaoshi(_loc2_); + } + + private function dakong(param1:MouseEvent) : void + { + if(this.selectObj == null) + { + MessageBoxUI.getInstance().addMessage("请选择要取出宝石的装备"); + return; + } + ConnectService.getInstance().playService.outAllPetItemRoleBijou(this.selectObj.id); + } + + private function getPetItemListResult(param1:PlayEvent) : void + { + this.initEquList(); + } + + private function addSelectJewUI(param1:int) : void + { + if(this.selectJewUI == null) + { + this.selectJewUI = new SelectPetJewUI(); + this.selectJewUI.x = int(width / 2 - this.selectJewUI.width / 2); + this.selectJewUI.y = int(height / 2 - this.selectJewUI.height / 2) - 70; + } + addChild(this.selectJewUI); + this.selectJewUI.setTid(this.selectObj.id); + this.selectJewUI.setRoles(param1); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/UserPetItem5.as b/flash_decompiled/com/view/ui/user/UserPetItem5.as new file mode 100644 index 0000000..099303b --- /dev/null +++ b/flash_decompiled/com/view/ui/user/UserPetItem5.as @@ -0,0 +1,300 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.cache.ImgCache; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIItem; + import com.view.newui.UINumInputText; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.pak.data.PakState; + import com.view.ui.user.mc.PetItemMc7; + import fl.containers.ScrollPane; + 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 UserPetItem5 extends Sprite + { + + private var bg1:UIWindowBg; + + private var itemNumsText:TextField; + + private var label2:TextField; + + private var itembg1:UIItem; + + private var dakongBtn:UIButton; + + private var packList:Vector.; + + private var packScrollPane:ScrollPane; + + private var packMc:Sprite; + + private var rolesText:TextField; + + private var preGemMc:PetItemMc7; + + private var selectObj:PackItem; + + private var load:LoadResource; + + private var itemImg:Bitmap; + + private var num_txt1:UINumInputText; + + private var face:InstallFace; + + public function UserPetItem5() + { + var _loc1_:TextField = null; + var _loc6_:UIWindowBg = null; + var _loc13_:PetItemMc7 = null; + this.face = InstallFace.getInstance(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(150 + 456,299); + addChild(this.bg1); + this.bg1.y = 2; + this.bg1.x = 4; + _loc1_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,130); + _loc1_.text = "显示4星以上未打孔道具"; + this.bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 8; + var _loc2_:Array = ["宝石名称","数量"]; + var _loc3_:Array = [110,98]; + var _loc4_:UITable = new UITable(); + _loc4_.drawLine = false; + _loc4_.install(10,_loc2_,_loc3_); + this.bg1.addChild(_loc4_); + _loc4_.x = 5; + _loc4_.y = 29; + this.packList = new Vector.(); + var _loc5_:int = 0; + while(_loc5_ < 10) + { + _loc13_ = new PetItemMc7(); + _loc4_.addChild(_loc13_); + this.packList.push(_loc13_); + _loc13_.y = _loc5_ * 25 + 25; + _loc13_.x = 2; + _loc13_.addEventListener(MouseEvent.CLICK,this.clickSingleItem,false,0,true); + _loc5_++; + } + _loc6_ = new UIWindowBg(); + _loc6_.initThirdPanel(390,291); + this.bg1.addChild(_loc6_); + _loc6_.x = 212; + _loc6_.y = 4; + var _loc7_:UITitleBg = new UITitleBg("宠物宝石升级",_loc6_.width); + _loc6_.addChild(_loc7_); + _loc7_.x = int(_loc6_.width / 2 - _loc7_.width / 2); + this.itembg1 = new UIItem(); + _loc6_.addChild(this.itembg1); + this.itembg1.y = 60; + this.itembg1.x = 177; + var _loc8_:TextFormat = PublicMethod.getCenterTextFormat(); + this.rolesText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,90); + _loc6_.addChild(this.rolesText); + this.rolesText.x = this.itembg1.x - 20; + this.rolesText.y = this.itembg1.y + 50; + this.rolesText.defaultTextFormat = _loc8_; + this.rolesText.text = "当前数量:0"; + _loc1_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,200); + _loc1_.text = "升级数量: × 4 "; + _loc6_.addChild(_loc1_); + _loc1_.x = 130; + _loc1_.y = 135; + this.num_txt1 = new UINumInputText(55); + this.num_txt1.setMaxChars(4); + _loc6_.addChild(this.num_txt1); + this.num_txt1.x = 195; + this.num_txt1.y = _loc1_.y - 4; + var _loc9_:Sprite = PublicMethod.getTrLine(380); + _loc6_.addChild(_loc9_); + _loc9_.x = 5; + _loc9_.y = 206; + var _loc10_:String = "1、每4个低级宠物宝石可升级成1个高级宝石
"; + _loc10_ = _loc10_ + "2、宝石最高等级10级
"; + _loc10_ = _loc10_ + "3、输入1则会消耗4个当前宝石获得1个高级宝石
"; + var _loc11_:TextFormat = new TextFormat(); + _loc11_.leading = 4; + var _loc12_:TextField = PublicMethod.getMulTextField(UIConfig.labelColor,360,100); + _loc6_.addChild(_loc12_); + _loc12_.x = _loc9_.x + 4; + _loc12_.y = _loc9_.y + 6; + _loc12_.defaultTextFormat = _loc11_; + _loc12_.htmlText = _loc10_; + this.dakongBtn = new UIButton("升 级",2); + _loc6_.addChild(this.dakongBtn); + this.dakongBtn.x = 170; + this.dakongBtn.y = 171; + this.dakongBtn.onClick = this.upPetBaoshi; + Utils.g_events.addEventListener(DevEvent.PAKCHANGE,this.setItemCount); + } + + public function getEquipList() : void + { + this.getGemList(); + } + + private function setItemCount(param1:DevEvent) : void + { + this.getGemList(); + } + + private function getGemList() : void + { + var _loc3_:PackItem = null; + var _loc4_:* = undefined; + var _loc5_:Boolean = false; + var _loc6_:PackItem = null; + var _loc7_:PackItem = null; + var _loc1_:Vector. = PakState.getBaoshiList(541,-1); + var _loc2_:Vector. = new Vector.(); + for each(_loc3_ in _loc1_) + { + _loc5_ = false; + for each(_loc6_ in _loc2_) + { + if(_loc6_.itemId == _loc3_.itemId) + { + _loc5_ = true; + _loc6_.itemCount += _loc3_.itemCount; + break; + } + } + if(_loc5_ == false) + { + _loc7_ = new PackItem(_loc3_); + _loc2_.push(_loc7_); + } + } + for(_loc4_ in this.packList) + { + if(_loc2_.length <= _loc4_) + { + this.packList[_loc4_].setItemObj(null); + } + else + { + this.packList[_loc4_].setItemObj(_loc2_[_loc4_]); + } + } + if(this.preGemMc == null) + { + this.selectObj = null; + this.preGemMc = null; + this.dakongBtn.setUnEnable(); + return; + } + if(this.preGemMc.getItemObj() == null) + { + this.preGemMc.setClick(false); + this.selectObj = null; + this.preGemMc = null; + this.dakongBtn.setUnEnable(); + return; + } + if(this.preGemMc) + { + this.preGemMc.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + private function clickSingleItem(param1:MouseEvent) : void + { + var _loc2_:PetItemMc7 = param1.currentTarget as PetItemMc7; + if(_loc2_.getItemObj() == null) + { + return; + } + if(this.preGemMc) + { + this.preGemMc.setClick(false); + } + this.dakongBtn.setEnable(); + this.preGemMc = _loc2_; + this.preGemMc.setClick(true); + this.selectObj = _loc2_.getItemObj(); + this.loadPng(); + } + + private function loadPng() : void + { + var _loc1_:String = ServerConfig.IMAGE_ITEM_URL + this.selectObj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(_loc1_)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(_loc1_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.load = new LoadResource(_loc1_,this.loadBack); + } + } + + private function loadBack(param1:Event) : void + { + if(this.selectObj == null) + { + this.load.clear(); + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.load.url,this.itemImg); + this.setImgValue(); + this.load.clear(); + } + + private function setImgValue() : void + { + this.itembg1.addPng(this.itemImg); + this.itemImg.width = 41; + this.itemImg.height = 41; + this.showItemInfo(); + } + + private function showItemInfo() : void + { + this.rolesText.text = "当前数量:" + this.selectObj.itemCount; + var _loc1_:int = this.selectObj.itemCount / 4; + this.num_txt1.setMaxNum(_loc1_); + } + + private function upPetBaoshi(param1:MouseEvent) : void + { + if(this.selectObj == null) + { + MessageBoxUI.getInstance().addMessage("请先选择要打孔的装备"); + return; + } + var _loc2_:int = this.selectObj.itemId; + var _loc3_:int = this.num_txt1.getTextNum(); + if(_loc3_ <= 0) + { + MessageBoxUI.getInstance().addMessage("升级数量必须大于零"); + return; + } + ConnectService.getInstance().playService.upPetBaoshi(_loc3_,_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/WelcomeView.as b/flash_decompiled/com/view/ui/user/WelcomeView.as new file mode 100644 index 0000000..5213b9e --- /dev/null +++ b/flash_decompiled/com/view/ui/user/WelcomeView.as @@ -0,0 +1,627 @@ +package com.view.ui.user +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.assistant.event.AssisEvent; + import com.control.user.event.UserEvent; + import com.events.ParameterEvent; + import com.utils.Utils; + import com.view.newui.UITitleBg; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.ui.mail.MailUI; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.mission.MissionUI; + import com.view.ui.user.mc.BoxItem; + import com.view.ui.user.mc.ScrollMail; + import com.view.ui.user.mc.TaskItem; + import com.view.world.EmptyContainer; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + 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.text.TextField; + import flash.utils.setTimeout; + + public class WelcomeView extends BaseUI + { + + private static var instance:WelcomeView; + + private var welComeMc:MovieClip; + + private var _scrollmail:ScrollMail; + + private var _contentContainer:EmptyContainer; + + private var _contentScrollPane:ScrollPane; + + private var _box3:BoxItem; + + private var _box4:BoxItem; + + private var _box1:BoxItem; + + private var _box2:BoxItem; + + private var tiptxt:TextField; + + private var paneBg:UIWindowBg; + + private var ui_welcome_1:MovieClip; + + private var ui_welcome_2:MovieClip; + + private var ui_welcome_3:MovieClip; + + private var ui_welcome_4:MovieClip; + + private var ui_welcome_5:MovieClip; + + private var lucky1txt:TextField; + + private var lucky1tiptxt:TextField; + + private var lucky2txt:TextField; + + private var lucky2tiptxt:TextField; + + private var busy:Boolean; + + private var currActivityNum:int; + + public function WelcomeView() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_dengluxinxi); + this.setPosition(); + this.createUI(); + } + + public static function getInstance() : WelcomeView + { + if(instance == null) + { + instance = new WelcomeView(); + } + return instance; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + override public function createUI() : void + { + var _loc9_:UIWindowBg = null; + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,400); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 39; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,60); + this.paneBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 4; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(322,284); + this.paneBg.addChild(_loc2_); + _loc2_.x = 4; + _loc2_.y = _loc1_.y + _loc1_.height + 4; + var _loc3_:Sprite = face.getSprite(ClassConfig.ui_logo); + _loc3_.x = 2; + _loc3_.y = 2; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(10852210,100); + _loc4_.text = "今日活跃度:"; + _loc1_.addChild(_loc4_); + _loc4_.x = 150; + _loc4_.y = 15; + this.ui_welcome_1 = face.getMovieClip(ClassConfig.ui_welcome_1); + _loc1_.addChild(this.ui_welcome_1); + this.ui_welcome_1.x = 230; + this.ui_welcome_1.y = 12; + this.ui_welcome_2 = face.getMovieClip(ClassConfig.ui_welcome_2); + _loc1_.addChild(this.ui_welcome_2); + this.ui_welcome_2.x = 290; + this.ui_welcome_2.y = this.ui_welcome_1.y; + this.tiptxt = PublicMethod.getTextFieldWithFillter(10852210,300); + _loc1_.addChild(this.tiptxt); + this.tiptxt.x = 150; + this.tiptxt.y = 47; + this.ui_welcome_3 = face.getMovieClip(ClassConfig.ui_welcome_3); + _loc1_.addChild(this.ui_welcome_3); + this.ui_welcome_3.x = 500; + this.ui_welcome_3.y = 46; + this.ui_welcome_4 = face.getMovieClip(ClassConfig.ui_welcome_4); + _loc1_.addChild(this.ui_welcome_4); + this.ui_welcome_4.x = 570; + this.ui_welcome_4.y = this.ui_welcome_3.y - 5; + var _loc5_:UIWindowBg = new UIWindowBg(); + _loc5_.initThirdPanel(285,130); + this.paneBg.addChild(_loc5_); + _loc5_.x = _loc2_.x + _loc2_.width + 4; + _loc5_.y = _loc2_.y; + var _loc6_:UITitleBg = new UITitleBg("今日运势",240); + _loc5_.addChild(_loc6_); + _loc6_.x = int(_loc5_.width / 2 - _loc6_.width / 2); + this.ui_welcome_5 = face.getMovieClip(ClassConfig.ui_welcome_5); + _loc5_.addChild(this.ui_welcome_5); + this.ui_welcome_5.x = 15; + this.ui_welcome_5.y = 35; + this.lucky1txt = PublicMethod.getTextFieldWithFillter(65280,170); + _loc5_.addChild(this.lucky1txt); + this.lucky1txt.x = 102; + this.lucky1txt.y = 35; + this.lucky1tiptxt = PublicMethod.getTextFieldWithFillter(16777215,190); + _loc5_.addChild(this.lucky1tiptxt); + this.lucky1tiptxt.x = this.lucky1txt.x; + this.lucky1tiptxt.y = this.lucky1txt.y + 20; + this.lucky2txt = PublicMethod.getTextFieldWithFillter(65280,170); + _loc5_.addChild(this.lucky2txt); + this.lucky2txt.x = this.lucky1txt.x; + this.lucky2txt.y = this.lucky1tiptxt.y + 30; + this.lucky2tiptxt = PublicMethod.getTextFieldWithFillter(16777215,190); + _loc5_.addChild(this.lucky2tiptxt); + this.lucky2tiptxt.x = this.lucky1txt.x; + this.lucky2tiptxt.y = this.lucky2txt.y + 20; + var _loc7_:UIWindowBg = new UIWindowBg(); + _loc7_.initThirdPanel(285,140); + this.paneBg.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc5_.y + _loc5_.height + 4; + var _loc8_:UITitleBg = new UITitleBg("活跃度抽奖",240); + _loc7_.addChild(_loc8_); + _loc8_.x = int(_loc7_.width / 2 - _loc8_.width / 2); + _loc9_ = new UIWindowBg(); + _loc9_.initThirdPanel(622,19); + this.paneBg.addChild(_loc9_); + _loc9_.x = 4; + _loc9_.y = _loc2_.y + _loc2_.height + 4; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(16245593,60); + _loc10_.text = "最新战报:"; + _loc9_.addChild(_loc10_); + _loc10_.x = 10; + _loc10_.y = 7; + this._scrollmail = new ScrollMail(); + this._scrollmail.x = 70; + this._scrollmail.y = 5; + _loc9_.addChild(this._scrollmail); + this.ui_welcome_5.luckymc.gotoAndStop(1); + this.ui_welcome_1.num3mc.gotoAndStop(1); + this.ui_welcome_1.num2mc.gotoAndStop(1); + this.ui_welcome_1.num1mc.gotoAndStop(1); + this.ui_welcome_2.numpermc.gotoAndStop(1); + this._contentScrollPane = new ScrollPane(); + this._contentScrollPane.setSize(325,286); + _loc2_.addChild(this._contentScrollPane); + this._contentScrollPane.x = 4; + this._contentScrollPane.y = 4; + this._contentContainer = new EmptyContainer(); + this._contentScrollPane.source = this._contentContainer; + this._box1 = new BoxItem(1); + _loc7_.addChild(this._box1); + this._box1.x = 22; + this._box1.y = 35; + this._box2 = new BoxItem(2); + _loc7_.addChild(this._box2); + this._box2.x = this._box1.x + 140; + this._box2.y = this._box1.y; + this._box3 = new BoxItem(3); + _loc7_.addChild(this._box3); + this._box3.x = this._box1.x; + this._box3.y = this._box1.y + 60; + this._box4 = new BoxItem(4); + _loc7_.addChild(this._box4); + this._box4.x = this._box2.x; + this._box4.y = this._box3.y; + this.ui_welcome_3.youjianmc.addEventListener(MouseEvent.CLICK,this.openMail); + this.ui_welcome_4.xingdonglimc.addEventListener(MouseEvent.CLICK,this.openMission); + ToolTipManager.getInstance().setToolTip(this.ui_welcome_3.youjianmc,new TxtTooltip("未读邮件总数量"),false,-1,false); + ToolTipManager.getInstance().setToolTip(this.ui_welcome_4.xingdonglimc,new TxtTooltip("当前剩余行动力"),false,-1,false); + Utils.g_events.addEventListener(BoxItem.OPEN_BOX_EVENT,this.openboxhandler); + InstallFace.getInstance().getChatConnect().sendHeartConnect(); + setTimeout(this.getHeroDate,1000); + } + + private function getHeroDate() : void + { + ConnectService.getInstance().heroService.getSkill(); + } + + private function openboxhandler(param1:ParameterEvent) : void + { + var _loc2_:* = param1.getParameter(); + if(_loc2_ == null) + { + return; + } + ConnectService.getInstance().assistantService.gainActivityGift(_loc2_); + } + + private function refreshbox(param1:AssisEvent) : void + { + var _loc2_:Object = param1.obj; + if(_loc2_ == null) + { + return; + } + if(_loc2_["boxList"] is Array) + { + this.setBoxList(_loc2_["boxList"]); + } + if(_loc2_["res"] is String) + { + MessageBoxUI.getInstance().addMessage(_loc2_["res"]); + } + } + + private function openMail(param1:MouseEvent) : void + { + var _loc2_:MailUI = MailUI.getInstance(); + _loc2_.setStartPage(0); + _loc2_.show(); + } + + private function openMission(param1:MouseEvent) : void + { + var _loc2_:MissionUI = MissionUI.getInstance(); + _loc2_.setStartPage(2); + _loc2_.show(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + ConnectService.getInstance().addEventListener(UserEvent.USER_getLuckInfo,this.setluckyinfo); + ConnectService.getInstance().addEventListener(AssisEvent.A_getLoginFirstPageView,this.setinfo); + ConnectService.getInstance().addEventListener(AssisEvent.A_gainActivityGift,this.refreshbox); + this.getluckyinfo(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + ConnectService.getInstance().removeEventListener(UserEvent.USER_getLuckInfo,this.setluckyinfo); + ConnectService.getInstance().removeEventListener(AssisEvent.A_getLoginFirstPageView,this.setinfo); + ConnectService.getInstance().removeEventListener(AssisEvent.A_gainActivityGift,this.refreshbox); + } + + private function getluckyinfo() : void + { + ConnectService.getInstance().userService.getLuckInfo(); + } + + private function setluckyinfo(param1:UserEvent) : void + { + var _loc2_:Object = param1.userObject; + var _loc3_:Object = null; + var _loc4_:String = null; + this.busy = false; + if(_loc2_ == null) + { + this.getinfo(); + return; + } + if(_loc2_.totalLuck == "凶") + { + this.ui_welcome_5.luckymc.gotoAndStop(1); + } + if(_loc2_.totalLuck == "中") + { + this.ui_welcome_5.luckymc.gotoAndStop(2); + } + if(_loc2_.totalLuck == "吉") + { + this.ui_welcome_5.luckymc.gotoAndStop(3); + } + var _loc5_:* = _loc2_.resList; + if(_loc5_ == null) + { + return; + } + _loc3_ = _loc5_[0]; + if(_loc3_ != null) + { + _loc4_ = _loc3_["luckName"]; + if(_loc4_ == "忌:") + { + this.lucky1txt.textColor = 16711680; + } + else + { + this.lucky1txt.textColor = 65280; + } + this.lucky1txt.text = _loc3_.luckName + _loc3_.luckType.typeName; + this.lucky1tiptxt.htmlText = _loc3_.luckTip; + if(!_loc3_.luckType.typeIcon) + { + } + if(_loc3_.luckId > 0) + { + } + if(_loc3_.luckId < 0) + { + } + } + _loc3_ = _loc5_[1]; + if(_loc3_ != null) + { + _loc4_ = _loc3_["luckName"]; + if(_loc4_ == "忌:") + { + this.lucky2txt.textColor = 16711680; + } + else + { + this.lucky2txt.textColor = 65280; + } + this.lucky2txt.text = _loc3_.luckName + _loc3_.luckType.typeName; + this.lucky2tiptxt.htmlText = _loc3_.luckTip; + if(!_loc3_.luckType.typeIcon) + { + } + if(_loc3_.luckId > 0) + { + } + if(_loc3_.luckId < 0) + { + } + } + this.getinfo(); + } + + private function getinfo() : void + { + if(this.busy == true) + { + return; + } + this.busy = true; + ConnectService.getInstance().assistantService.getLoginFirstPageView(); + } + + private function setinfo(param1:AssisEvent) : void + { + var _loc2_:Object = param1.obj; + this.busy = false; + if(_loc2_ == null) + { + return; + } + var _loc3_:* = _loc2_["activityNum"]; + this.setActivity(_loc3_); + var _loc4_:* = _loc2_["unReadMessage"]; + this.setUnReadMsg(_loc4_); + var _loc5_:* = _loc2_["actionPoint"]; + this.setActionPoint(_loc5_); + var _loc6_:* = _loc2_["warReport"]; + this.setWarReport(_loc6_); + var _loc7_:* = _loc2_["activityList"]; + this.setActivityList(_loc7_); + var _loc8_:* = _loc2_["boxList"]; + this.setBoxList(_loc8_); + } + + private function setActivity(param1:int) : void + { + var _loc7_:Boolean = false; + var _loc2_:int = 0; + if(param1 > 100) + { + param1 = 100; + } + this.currActivityNum = param1; + var _loc3_:String = "你还有很多事情可以做……"; + if(this.currActivityNum >= 100) + { + _loc3_ = "云淡风轻,又是圆满的一天。"; + } + else if(this.currActivityNum >= 90) + { + _loc3_ = "距离极限只有一步,你不是一个人在战斗!"; + } + else if(this.currActivityNum >= 80) + { + _loc3_ = "不可思议,你简直就是本国最勤奋的君主!"; + } + else if(this.currActivityNum >= 60) + { + _loc3_ = "表现抢眼,继续加油,我们看好你哦!"; + } + else if(this.currActivityNum >= 45) + { + _loc3_ = "再接再厉,你的行程表还是排的很满哦!"; + } + else if(this.currActivityNum >= 30) + { + _loc3_ = "成功?你才刚上路……"; + } + this.tiptxt.text = _loc3_; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + _loc7_ = false; + this.ui_welcome_1.num3mc.visible = false; + this.ui_welcome_1.num2mc.visible = false; + this.ui_welcome_1.num1mc.visible = false; + var _loc8_:int = 100; + if(param1 >= 100) + { + _loc7_ = true; + this.ui_welcome_1.num3mc.visible = _loc7_; + this.ui_welcome_1.num2mc.visible = _loc7_; + this.ui_welcome_1.num1mc.visible = _loc7_; + _loc4_ = int(param1 / 100); + _loc2_ = param1 % 100; + _loc5_ = int(_loc2_ / 10); + _loc6_ = _loc2_ % 10; + } + else if(param1 >= 10) + { + _loc7_ = true; + this.ui_welcome_1.num2mc.visible = _loc7_; + this.ui_welcome_1.num1mc.visible = _loc7_; + _loc4_ = int(param1 / 10); + _loc5_ = param1 % 10; + } + else + { + this.ui_welcome_1.num1mc.visible = true; + _loc4_ = param1; + } + this.ui_welcome_1.num1mc.gotoAndStop(_loc4_ + 1); + this.ui_welcome_1.num2mc.gotoAndStop(_loc5_ + 1); + this.ui_welcome_1.num3mc.gotoAndStop(_loc6_ + 1); + var _loc9_:int = param1 / _loc8_ * 100 + 1; + this.ui_welcome_2.numpermc.gotoAndStop(_loc9_); + } + + private function setUnReadMsg(param1:String) : void + { + this.ui_welcome_3.youjianmc.youjiantxt.htmlText = "" + String(param1) + ""; + } + + private function setActionPoint(param1:int) : void + { + this.ui_welcome_4.xingdonglimc.xingdonglitxt.htmlText = "" + String(param1) + ""; + } + + private function setWarReport(param1:String) : void + { + this._scrollmail.setinfo(param1); + } + + private function setActivityList(param1:Array) : void + { + var _loc2_:int = 0; + var _loc3_:TextField = null; + var _loc4_:int = 0; + var _loc5_:Object = null; + var _loc6_:TaskItem = null; + if(param1.length == 0) + { + return; + } + this._contentContainer.clear(); + _loc3_ = new TextField(); + _loc3_.selectable = false; + _loc3_.textColor = 16699235; + _loc3_.autoSize = "left"; + _loc3_.text = "未完成项目(0个)"; + this._contentContainer.addChild(_loc3_); + _loc2_ += _loc3_.height; + var _loc7_:* = param1.length; + var _loc8_:Array = []; + var _loc9_:Array = []; + var _loc10_:int = 0; + while(_loc10_ < _loc7_) + { + _loc5_ = param1[_loc10_]; + if(_loc5_["currNum"] == _loc5_["needNum"]) + { + _loc8_.push(_loc5_); + } + else + { + if(_loc5_["currNum"] == 0) + { + _loc9_.push(_loc5_); + } + else + { + _loc6_ = new TaskItem(_loc5_); + _loc6_.y = _loc2_; + _loc2_ += _loc6_.height; + this._contentContainer.addChild(_loc6_); + } + _loc4_++; + } + _loc10_++; + } + _loc3_.htmlText = "未完成项目(" + _loc4_ + "个)"; + _loc7_ = _loc9_.length; + _loc10_ = 0; + while(_loc10_ < _loc7_) + { + _loc5_ = _loc9_[_loc10_]; + _loc6_ = new TaskItem(_loc5_); + _loc6_.y = _loc2_; + _loc2_ += _loc6_.height; + this._contentContainer.addChild(_loc6_); + _loc10_++; + } + _loc7_ = _loc8_.length; + _loc3_ = new TextField(); + _loc3_.selectable = false; + _loc3_.autoSize = "left"; + _loc3_.textColor = 16699235; + _loc3_.htmlText = "已完成项目(" + _loc7_ + "个)"; + this._contentContainer.addChild(_loc3_); + _loc3_.y = _loc2_; + _loc2_ += _loc3_.height; + _loc10_ = 0; + while(_loc10_ < _loc7_) + { + _loc5_ = _loc8_[_loc10_]; + _loc6_ = new TaskItem(_loc5_); + _loc6_.y = _loc2_; + _loc2_ += _loc6_.height; + this._contentContainer.addChild(_loc6_); + _loc10_++; + } + this._contentScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this._contentScrollPane.addEventListener(Event.INIT,this.scrollpaneinithandler); + this.scrollpaneinithandler(); + this._contentScrollPane.update(); + } + + private function scrollpaneinithandler(param1:Event = null) : void + { + var _loc2_:TaskItem = null; + var _loc3_:* = this._contentContainer.numChildren; + while(_loc3_ > 0) + { + _loc3_--; + _loc2_ = this._contentContainer.getChildAt(_loc3_) as TaskItem; + if(_loc2_ != null) + { + _loc2_.addtooltip(); + } + } + } + + private function setBoxList(param1:Array) : void + { + var _loc5_:BoxItem = null; + var _loc2_:Object = null; + var _loc3_:String = null; + if(param1.length == 0) + { + return; + } + var _loc4_:int = 1; + while(_loc4_ <= 4) + { + _loc2_ = param1[_loc4_ - 1] as Object; + _loc5_ = this["_box" + _loc4_] as BoxItem; + if(_loc5_ != null) + { + _loc5_.setinfo(_loc2_); + _loc5_.setActivityNum(this.currActivityNum); + } + _loc4_++; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/XidianUI.as b/flash_decompiled/com/view/ui/user/XidianUI.as new file mode 100644 index 0000000..4b3d158 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/XidianUI.as @@ -0,0 +1,162 @@ +package com.view.ui.user +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.pack.event.UserPackEvent; + import com.view.mc.button.Button_9; + import com.view.newui.UIButton; + import com.view.newui.UINumInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.tools.ToolView; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class XidianUI extends UIWindowBg + { + + private var buyBtn:Button_9; + + private var label1:TextField; + + private var label2:TextField; + + private var label4:TextField; + + private var input:UINumInputText; + + private var maxNum:int; + + private var proStr:String; + + private var type:int; + + private var treasuryId:int; + + private var cardNum:int; + + public function XidianUI() + { + var _loc5_:UIButton = null; + super(); + initSize(115,160); + loadTitle(UITitleConfig.title_xidian); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(285,125); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + this.label1 = PublicMethod.getTextField(16777215,110); + this.label2 = PublicMethod.getTextField(11583207,130); + var _loc2_:TextField = PublicMethod.getTextField(16711680,240); + this.label4 = PublicMethod.getTextField(11583207,130); + var _loc3_:TextField = PublicMethod.getTextField(65280,210); + _loc1_.addChild(this.label1); + this.label1.x = 15; + this.label1.y = 10; + _loc1_.addChild(this.label2); + this.label2.x = this.label1.x; + this.label2.y = this.label1.y + 25; + _loc1_.addChild(_loc2_); + _loc2_.x = this.label1.x; + _loc2_.y = this.label2.y + 25; + _loc2_.text = "(注:分城建筑增加的属性点不可被洗去)"; + _loc1_.addChild(this.label4); + this.label4.x = this.label1.x; + this.label4.y = _loc2_.y + 25; + this.label4.text = "请输入分配的武力点数:"; + _loc1_.addChild(_loc3_); + _loc3_.x = this.label1.x; + _loc3_.y = this.label4.y + 25; + _loc3_.text = "提示:每洗一点属性需要一点洗点卡"; + this.input = new UINumInputText(80); + _loc1_.addChild(this.input); + this.input.x = this.label4.x + this.label4.width + 15; + this.input.y = this.label4.y - 3; + this.input.hiddenBtn(); + var _loc4_:UIButton = new UIButton("确 定",2,10); + _loc5_ = new UIButton("取 消",2,10); + bg1.addChild(_loc4_); + bg1.addChild(_loc5_); + _loc4_.x = 80; + _loc4_.y = 155; + _loc5_.x = _loc4_.x + 90; + _loc5_.y = _loc4_.y; + _loc5_.onClick = closeSelf; + _loc4_.onClick = this.addPoint; + this.buyBtn = new Button_9("快捷购买"); + this.buyBtn.addEventListener(MouseEvent.CLICK,this.buyXiDian); + this.buyBtn.buttonMode = true; + _loc1_.addChild(this.buyBtn); + this.buyBtn.x = 185; + this.buyBtn.y = this.label1.y; + } + + private function addPoint(param1:MouseEvent) : void + { + var _loc2_:* = this.input.getTextNum(); + if(this.maxNum < _loc2_) + { + MessageBoxUI.getInstance().addMessage("超过最大值"); + return; + } + if(isNaN(_loc2_) || _loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("只能输入正整数"); + return; + } + ConnectService.getInstance().itemsService.decPropertyPoint(this.treasuryId,_loc2_); + closeSelf(null); + } + + public function update(param1:int, param2:int) : void + { + this.input.setMaxNum(param1); + this.input.setTextNum(1); + this.maxNum = param1; + this.type = param2; + if(param2 == 2) + { + this.proStr = "武力"; + } + if(param2 == 1) + { + this.proStr = "智力"; + } + if(param2 == 3) + { + this.proStr = "政治"; + } + var _loc3_:String = "请输入洗去的" + this.proStr + "点数:"; + this.label4.text = _loc3_; + this.label2.htmlText = "可洗去的" + this.proStr + "点数:" + param1 + ""; + this.treasuryId = 129 + param2; + ConnectService.getInstance().packService.getCardNum(this.treasuryId); + ConnectService.getInstance().addEventListener(UserPackEvent.PACK_getCardNum,this.getCardNumSucc); + } + + private function getCardNumSucc(param1:UserPackEvent) : void + { + ConnectService.getInstance().removeEventListener(UserPackEvent.PACK_getCardNum,this.getCardNumSucc); + this.cardNum = int(param1.packObject.num); + this.label1.htmlText = "" + this.proStr + "洗点卡 " + "×" + this.cardNum; + } + + private function buyXiDian(param1:MouseEvent) : void + { + var _loc2_:ToolView = ToolView.getInstance(); + _loc2_.listBuyTools("QUICK_STORE_XIDIAN"); + _loc2_.onRefresh = this.refresh; + _loc2_.show(); + } + + private function refresh() : void + { + this.update(this.maxNum,this.type); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/data/UserEquipData.as b/flash_decompiled/com/view/ui/user/data/UserEquipData.as new file mode 100644 index 0000000..abbf1c8 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/data/UserEquipData.as @@ -0,0 +1,67 @@ +package com.view.ui.user.data +{ + public class UserEquipData + { + + private static var equipList:Array = new Array(); + + private static var noEquipList:Array = new Array(); + + public function UserEquipData() + { + super(); + } + + public static function setEquipData(param1:Array) : void + { + var _loc2_:Object = null; + if(Boolean(equipList) && equipList.length > 0) + { + equipList.splice(0,equipList.length); + } + if(Boolean(noEquipList) && noEquipList.length > 0) + { + noEquipList.splice(0,noEquipList.length); + } + for each(_loc2_ in param1) + { + if(_loc2_.equip == 1) + { + equipList.push(_loc2_); + } + else + { + noEquipList.push(_loc2_); + } + } + } + + public static function getEquipList() : Array + { + return equipList; + } + + public static function getNoEquipList(param1:int = 0) : Array + { + var _loc3_:Object = null; + if(param1 == 0) + { + return noEquipList; + } + if(noEquipList.length == 0) + { + return noEquipList; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in noEquipList) + { + if(_loc3_.color == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/data/UserHorseData.as b/flash_decompiled/com/view/ui/user/data/UserHorseData.as new file mode 100644 index 0000000..5b789b0 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/data/UserHorseData.as @@ -0,0 +1,134 @@ +package com.view.ui.user.data +{ + import com.newdata.user.NewUserData; + + public class UserHorseData + { + + private static var _wuliCount:int; + + private static var _wuliAdd:int; + + private static var upHorseItemNeedPoint:int; + + private static var equipList:Array = new Array(); + + private static var noEquipList:Array = new Array(); + + public function UserHorseData() + { + super(); + } + + public static function getWuliCount() : int + { + return _wuliCount; + } + + public static function getWuliAdd() : int + { + return _wuliAdd; + } + + public static function getUpHorseItemNeedPoint() : int + { + return upHorseItemNeedPoint; + } + + public static function setWuli(param1:Object) : void + { + _wuliCount = param1.militaryPoint; + _wuliAdd = param1.addWuli; + upHorseItemNeedPoint = param1.upNeedPoint; + } + + public static function setHorseItem(param1:Array) : void + { + var _loc2_:Object = null; + if(Boolean(equipList) && equipList.length > 0) + { + equipList.splice(0,equipList.length); + } + if(Boolean(noEquipList) && noEquipList.length > 0) + { + noEquipList.splice(0,noEquipList.length); + } + if(param1 != null && param1.length > 0) + { + for each(_loc2_ in param1) + { + if(_loc2_.equip == 1) + { + equipList.push(_loc2_); + } + else if(!getObjByEntId(_loc2_.entId)) + { + noEquipList.push(_loc2_); + } + } + } + } + + private static function getObjByEntId(param1:int) : Object + { + var _loc2_:Object = null; + if(noEquipList.length > 0) + { + for each(_loc2_ in noEquipList) + { + if(_loc2_.entId == param1) + { + _loc2_.itemCount += 1; + return true; + } + } + } + return false; + } + + public static function getNoEquipList(param1:int = 0) : Array + { + var _loc3_:Object = null; + if(param1 == 0) + { + return noEquipList; + } + var _loc2_:Array = new Array(); + for each(_loc3_ in noEquipList) + { + if(_loc3_.childType == param1) + { + _loc2_.push(_loc3_); + } + } + return _loc2_; + } + + public static function getEquip(param1:int) : Object + { + var _loc2_:Object = null; + if(equipList.length > 0) + { + for each(_loc2_ in equipList) + { + if(_loc2_.childType == param1) + { + return _loc2_; + } + } + } + return null; + } + + public static function checkCashCanUp() : Boolean + { + return NewUserData.getUser().cash >= upHorseItemNeedPoint; + } + + public static function checkPointCanUp() : Boolean + { + return NewUserData.getUser().paypoint >= upHorseItemNeedPoint; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/data/UserPetData.as b/flash_decompiled/com/view/ui/user/data/UserPetData.as new file mode 100644 index 0000000..19a3e0b --- /dev/null +++ b/flash_decompiled/com/view/ui/user/data/UserPetData.as @@ -0,0 +1,104 @@ +package com.view.ui.user.data +{ + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.utils.HashMap; + import com.utils.Utils; + + public class UserPetData + { + + private static var obj:Object; + + private static var needGetData:Boolean = true; + + private static var petItem:HashMap = null; + + private static var petItemList:Vector. = null; + + public function UserPetData() + { + super(); + } + + public static function setNeedGetData() : void + { + needGetData = true; + } + + public static function getPetData() : Object + { + if(needGetData) + { + needGetData = false; + getInitData(); + return null; + } + return obj; + } + + public static function setPetData(param1:Object) : void + { + obj = param1; + var _loc2_:PlayEvent = new PlayEvent(PlayEvent.PET_ENTERMAIN); + Utils.g_events.dispatchEvent(_loc2_); + } + + private static function getInitData() : void + { + ConnectService.getInstance().playService.viewPetMain(); + } + + public static function setPetItemData(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:PlayEvent = null; + petItem = new HashMap(); + for each(_loc2_ in param1) + { + petItem.put(_loc2_.itemId,_loc2_); + } + _loc3_ = new PlayEvent(PlayEvent.PET_ITEM_DATA); + Utils.g_events.dispatchEvent(_loc3_); + } + + public static function getPetItemByItemId(param1:int) : Object + { + return petItem.get(param1); + } + + public static function setPetItemList(param1:Array) : void + { + var _loc2_:Object = null; + var _loc3_:PlayEvent = null; + var _loc4_:UserPetItem = null; + petItemList = new Vector.(); + for each(_loc2_ in param1) + { + _loc4_ = new UserPetItem(_loc2_); + petItemList.push(_loc4_); + } + _loc3_ = new PlayEvent(PlayEvent.PET_ITEMLIST_DATA); + Utils.g_events.dispatchEvent(_loc3_); + } + + public static function getPetItemList() : Vector. + { + return petItemList; + } + + public static function getPetItemByTid(param1:int) : UserPetItem + { + var _loc2_:UserPetItem = null; + for each(_loc2_ in petItemList) + { + if(_loc2_.tid == param1) + { + return _loc2_; + } + } + return null; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/data/UserPetItem.as b/flash_decompiled/com/view/ui/user/data/UserPetItem.as new file mode 100644 index 0000000..dbbd8f8 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/data/UserPetItem.as @@ -0,0 +1,42 @@ +package com.view.ui.user.data +{ + public class UserPetItem + { + + public var tid:int; + + public var roles:int; + + public var role1:int; + + public var role2:int; + + public var role3:int; + + public var role4:int; + + public var role1Obj1:Object; + + public var role1Obj2:Object; + + public var role1Obj3:Object; + + public var role1Obj4:Object; + + public function UserPetItem(param1:Object) + { + super(); + this.tid = param1.tid; + this.roles = param1.roles; + this.role1 = param1.role1; + this.role2 = param1.role2; + this.role3 = param1.role3; + this.role4 = param1.role4; + this.role1Obj1 = param1.role1Obj1; + this.role1Obj2 = param1.role1Obj2; + this.role1Obj3 = param1.role1Obj3; + this.role1Obj4 = param1.role1Obj4; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/BoxItem.as b/flash_decompiled/com/view/ui/user/mc/BoxItem.as new file mode 100644 index 0000000..aa411e8 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/BoxItem.as @@ -0,0 +1,145 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.events.ParameterEvent; + import com.utils.Utils; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class BoxItem extends Sprite + { + + public static const OPEN_BOX_EVENT:String = "openboxevent"; + + private var boxId:String; + + private var isGain:Boolean; + + private var _tiaojiantxt:TextField; + + private var needNum:int; + + private var _boxmc:MovieClip; + + private var _zhuangtaitxt:TextField; + + private var boxName:String; + + private var boxDesc:String; + + private var face:InstallFace = InstallFace.getInstance(); + + private var currNum:int; + + private var isLoad:Boolean; + + public function BoxItem(param1:int) + { + super(); + this.currNum = param1; + this.init(); + } + + private function clickhandler(param1:MouseEvent) : void + { + if(this.boxId == null) + { + return; + } + if(this.isLoad) + { + return; + } + this.isLoad = true; + var _loc2_:* = new ParameterEvent(OPEN_BOX_EVENT,this.boxId); + Utils.g_events.dispatchEvent(_loc2_); + } + + private function init() : void + { + this._boxmc = this.face.getMovieClip(ClassConfig.ui_box); + addChild(this._boxmc); + this._boxmc.boxmc.gotoAndStop(this.currNum); + this._tiaojiantxt = this._boxmc.getChildByName("tiaojiantxt") as TextField; + this._zhuangtaitxt = this._boxmc.getChildByName("zhuangtaitxt") as TextField; + this._tiaojiantxt.text = ""; + this._zhuangtaitxt.text = ""; + } + + public function setinfo(param1:Object = null) : void + { + if(param1 == null) + { + return; + } + if(param1["boxId"] != undefined) + { + this.boxId = param1["boxId"]; + } + if(param1["boxName"] != undefined) + { + this.boxName = param1["boxName"]; + } + if(param1["boxDesc"] != undefined) + { + this.boxDesc = param1["boxDesc"]; + ToolTipManager.getInstance().setToolTip(this._boxmc,new TxtTooltip(this.boxDesc)); + } + if(param1["needNum"] != undefined) + { + this.needNum = param1["needNum"]; + this._tiaojiantxt.text = "需求:" + this.needNum + "活跃"; + } + if(param1["isGain"] != undefined) + { + this.isGain = param1["isGain"]; + } + if(this.isGain == true || param1["isGain"] == "true") + { + buttonMode = false; + this._zhuangtaitxt.textColor = 8421504; + this._zhuangtaitxt.text = "已领取"; + if(hasEventListener(MouseEvent.CLICK)) + { + removeEventListener(MouseEvent.CLICK,this.clickhandler); + } + } + else + { + buttonMode = true; + this._zhuangtaitxt.textColor = 65344; + this._zhuangtaitxt.text = "可开启"; + addEventListener(MouseEvent.CLICK,this.clickhandler); + } + } + + public function setDisable() : void + { + buttonMode = false; + if(hasEventListener(MouseEvent.CLICK)) + { + removeEventListener(MouseEvent.CLICK,this.clickhandler); + } + } + + public function setActivityNum(param1:int) : void + { + if(param1 < this.needNum) + { + buttonMode = false; + this._zhuangtaitxt.textColor = 16711680; + this._zhuangtaitxt.text = "未达到需求"; + if(hasEventListener(MouseEvent.CLICK)) + { + removeEventListener(MouseEvent.CLICK,this.clickhandler); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/EquHorseMc.as b/flash_decompiled/com/view/ui/user/mc/EquHorseMc.as new file mode 100644 index 0000000..6dd82d0 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/EquHorseMc.as @@ -0,0 +1,182 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.tip.HorseItemTip; + import com.view.ui.user.data.UserHorseData; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class EquHorseMc extends Sprite + { + + private var bg:MovieClip; + + private var face:InstallFace = InstallFace.getInstance(); + + private var imgSp:Sprite; + + private var img:Bitmap; + + private var itemTip:HorseItemTip; + + private var type:int; + + private var obj:Object; + + private var loadImg:LoadResource; + + private var hasSelect:Boolean; + + public function EquHorseMc(param1:int) + { + super(); + this.type = param1; + this.bg = this.face.getMovieClip(ClassConfig.lib_horse_3); + addChild(this.bg); + this.bg.gotoAndStop(1); + var _loc2_:TextField = PublicMethod.getTextField(16777215,30); + switch(this.type) + { + case 1: + _loc2_.text = "盔具"; + break; + case 3: + _loc2_.text = "鞍具"; + break; + case 5: + _loc2_.text = "蹄具"; + break; + case 2: + _loc2_.text = "项具"; + break; + case 4: + _loc2_.text = "挂饰"; + } + this.bg.addChild(_loc2_); + _loc2_.x = 20; + _loc2_.y = 25; + this.imgSp = new Sprite(); + addChild(this.imgSp); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.hasSelect) + { + return; + } + this.bg.gotoAndStop(1); + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.hasSelect) + { + return; + } + this.bg.gotoAndStop(2); + } + + public function setObj(param1:Object) : void + { + var _loc2_:String = null; + this.obj = param1; + if(this.obj == null) + { + if(Boolean(this.img) && this.imgSp.contains(this.img)) + { + this.imgSp.removeChild(this.img); + } + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + } + else + { + if(Boolean(this.img) && this.imgSp.contains(this.img)) + { + this.imgSp.removeChild(this.img); + } + _loc2_ = ServerConfig.IMAGE_EQUIP_URL + this.obj.iconPath; + this.loadImg = new LoadResource(_loc2_,this.loadImgBack); + } + } + + private function loadImgBack(param1:Event) : void + { + if(this.obj == null) + { + this.loadImg.clear(); + return; + } + this.img = param1.target.loader.content; + this.imgSp.addChild(this.img); + this.img.x = 7; + this.img.y = 7; + this.loadImg.clear(); + if(this.itemTip == null) + { + this.itemTip = new HorseItemTip(this.imgSp,this.face.stage,this.face.tip_bg,this.obj); + } + else + { + this.itemTip.setTipData(this.obj); + } + } + + public function getObj() : Object + { + return this.obj; + } + + public function setClick(param1:Boolean) : void + { + if(this.obj == null) + { + this.hasSelect = false; + return; + } + this.hasSelect = param1; + if(this.hasSelect) + { + this.bg.gotoAndStop(2); + } + else + { + this.bg.gotoAndStop(1); + } + } + + public function getData() : void + { + var _loc1_:Object = UserHorseData.getEquip(this.type); + if(_loc1_ == null) + { + if(this.obj != null) + { + this.setObj(null); + } + } + else if(this.obj == null) + { + this.setObj(_loc1_); + } + else if(_loc1_.entId != this.obj.entId) + { + this.setObj(_loc1_); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/HorseItemMc.as b/flash_decompiled/com/view/ui/user/mc/HorseItemMc.as new file mode 100644 index 0000000..0efead8 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/HorseItemMc.as @@ -0,0 +1,126 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.mc.button.Button_15; + import com.view.newui.UIConfig; + import com.view.tip.HorseItemTip; + import flash.display.Sprite; + import flash.text.TextField; + + public class HorseItemMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var radioBtn:Button_15; + + private var itemName:TextField; + + private var itemLevel:TextField; + + private var selectStatus:Boolean; + + private var selectBg:Sprite; + + private var itemTip:HorseItemTip; + + private var itemObj:Object; + + public function HorseItemMc() + { + super(); + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,202,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + var _loc1_:Sprite = PublicMethod.getTrLine(202); + addChild(_loc1_); + this.itemName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,135); + this.itemLevel = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.radioBtn = new Button_15(); + addChild(this.radioBtn); + this.radioBtn.x = 5; + this.radioBtn.y = 4; + this.radioBtn.visible = false; + addChild(this.itemName); + this.itemName.x = 25; + this.itemName.y = 4; + addChild(this.itemLevel); + this.itemLevel.x = this.itemName.x + this.itemName.width; + this.itemLevel.y = 3; + } + + public function setClick(param1:Boolean) : void + { + if(this.itemObj == null) + { + return; + } + this.selectStatus = param1; + this.selectBg.visible = this.selectStatus; + this.radioBtn.setClick(param1); + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + + public function mouseClick() : void + { + if(this.itemObj == null) + { + return; + } + if(this.selectStatus) + { + this.selectStatus = false; + } + else + { + this.selectStatus = true; + } + this.selectBg.visible = this.selectStatus; + this.radioBtn.setClick(this.selectStatus); + } + + public function setItemObj(param1:Object) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + this.selectStatus = false; + this.radioBtn.visible = false; + this.itemName.text = ""; + this.itemLevel.text = ""; + this.selectBg.visible = false; + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + } + else + { + this.radioBtn.setClick(false); + this.radioBtn.visible = true; + this.itemName.htmlText = this.itemObj.showName; + this.itemLevel.htmlText = this.itemObj.itemCount; + if(this.itemTip == null) + { + this.itemTip = new HorseItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj); + } + else + { + this.itemTip.setTipData(this.itemObj); + } + } + } + + public function getItemObj() : Object + { + return this.itemObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/LiuYuMc.as b/flash_decompiled/com/view/ui/user/mc/LiuYuMc.as new file mode 100644 index 0000000..2d778e3 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/LiuYuMc.as @@ -0,0 +1,164 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.cache.ImgCache; + import com.view.newui.UISmallBtn; + import com.view.tip.JewTip; + import com.view.ui.message.MessageBoxUI; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class LiuYuMc extends Sprite + { + + public var holeNo:int; + + public var addBtn:UISmallBtn; + + public var delBtn:UISmallBtn; + + private var bg:Sprite; + + private var gemView:Object; + + private var jewTip:JewTip; + + private var loader:LoadResource; + + private var url:String; + + private var itemImg:Bitmap; + + private var face:InstallFace = InstallFace.getInstance(); + + public function LiuYuMc(param1:int) + { + super(); + this.holeNo = param1; + this.addBtn = new UISmallBtn("镶 嵌",2); + this.delBtn = new UISmallBtn("摘 除",2); + addChild(this.addBtn); + addChild(this.delBtn); + this.addBtn.x = 2; + this.addBtn.y = -25; + this.delBtn.x = 2; + this.delBtn.y = -25; + this.bg = PublicMethod.createShape(16777215,52,52); + addChild(this.bg); + this.bg.alpha = 0; + this.delBtn.visible = false; + } + + public function setEnable(param1:Boolean) : void + { + if(param1) + { + this.addBtn.setEnable(); + this.delBtn.setEnable(); + } + else + { + this.addBtn.setUnEnable(); + this.delBtn.setUnEnable(); + } + } + + public function getgemObj() : Object + { + return this.gemView; + } + + public function setGemView(param1:Object) : void + { + this.clear(); + if(param1 == null) + { + this.gemView = null; + return; + } + this.gemView = param1; + this.loadImg(); + this.delBtn.visible = true; + this.addBtn.visible = false; + } + + private function clear() : void + { + if(Boolean(this.itemImg) && contains(this.itemImg)) + { + removeChild(this.itemImg); + } + this.addBtn.visible = true; + this.delBtn.visible = false; + if(this.jewTip) + { + this.jewTip.destroyTip(); + } + } + + private function loadImg() : void + { + this.url = "pic/equip/" + this.gemView.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loader = new LoadResource(this.url,this.loadBack); + } + } + + private function loadBack(param1:Event) : void + { + this.itemImg = Bitmap(param1.target.loader.content); + ImgCache.getInstance().setImg(this.loader.url,this.itemImg); + this.loader.clear(); + this.setImgValue(); + } + + private function setImgValue() : void + { + addChildAt(this.itemImg,0); + this.itemImg.width = 53; + this.itemImg.height = 53; + this.itemImg.x = 0; + this.itemImg.y = 0; + if(this.jewTip == null) + { + this.jewTip = new JewTip(this.bg,this.face.stage,this.face.tip_bg,this.gemView); + } + else + { + this.jewTip.setTipData(this.gemView); + } + } + + private function addGem(param1:MouseEvent) : void + { + } + + private function delGem(param1:MouseEvent) : void + { + if(this.gemView == null) + { + return; + } + var _loc2_:String = "你确定摘除吗?"; + MessageBoxUI.getInstance().confirmMsg(_loc2_,this.confimDelgem); + } + + private function confimDelgem() : void + { + ConnectService.getInstance().userService.delLiuYu(this.holeNo,this.holeNo); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/LiuYuMc1.as b/flash_decompiled/com/view/ui/user/mc/LiuYuMc1.as new file mode 100644 index 0000000..b87a1d6 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/LiuYuMc1.as @@ -0,0 +1,61 @@ +package com.view.ui.user.mc +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.data.GameData; + import com.view.newui.UIBase; + import flash.display.MovieClip; + import flash.text.TextField; + + public class LiuYuMc1 extends UIBase + { + + private var mc:MovieClip; + + private var levelText:TextField; + + public function LiuYuMc1() + { + super(); + this.mc = face.getMovieClip(ClassConfig.liuyu_mc); + addChild(this.mc); + this.mc.gotoAndStop(1); + this.levelText = PublicMethod.getTextFieldWithFillter(16777215,18); + addChild(this.levelText); + this.levelText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.levelText.x = 4; + } + + public function setEntId(param1:int) : void + { + var _loc2_:Object = null; + var _loc3_:int = 0; + if(param1 == 0) + { + this.mc.gotoAndStop(5); + this.levelText.text = ""; + } + else + { + _loc2_ = GameData.getItemByEntId(param1); + this.levelText.text = _loc2_.level + ""; + _loc3_ = int(_loc2_.type); + switch(_loc3_) + { + case 521: + this.mc.gotoAndStop(2); + break; + case 522: + this.mc.gotoAndStop(4); + break; + case 523: + this.mc.gotoAndStop(3); + break; + case 524: + this.mc.gotoAndStop(1); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/PetBaoshiItem.as b/flash_decompiled/com/view/ui/user/mc/PetBaoshiItem.as new file mode 100644 index 0000000..bb202e4 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/PetBaoshiItem.as @@ -0,0 +1,177 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.cache.ImgCache; + import com.view.newui.UIConfig; + import com.view.newui.UIItem; + import com.view.newui.UISmallBtn; + import com.view.tip.ItemTip; + import com.view.ui.user.data.UserPetItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PetBaoshiItem extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var itembg1:UIItem; + + private var label1:TextField; + + private var label2:TextField; + + private var upBtn1:UISmallBtn; + + private var addFunc:Function; + + private var roleId:int; + + private var itemObj:UserPetItem; + + private var baoshi:Object; + + private var load:LoadResource; + + private var itemImg:Bitmap; + + private var itemTip:ItemTip; + + public function PetBaoshiItem(param1:int) + { + super(); + this.roleId = param1; + this.itembg1 = new UIItem(); + addChild(this.itembg1); + this.itembg1.y = 16; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,45); + this.label1.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.label1.text = "孔" + param1; + addChild(this.label1); + this.label1.x = 0; + this.label1.y = 0; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,70); + this.label2.text = ""; + addChild(this.label2); + this.label2.x = -12; + this.label2.y = this.itembg1.y + this.itembg1.height + 3; + this.upBtn1 = new UISmallBtn("镶 嵌",2); + addChild(this.upBtn1); + this.upBtn1.x = 0; + this.upBtn1.y = this.label2.y + 20; + this.upBtn1.onClick = this.openBaoshiSelect; + } + + public function setFunc(param1:Function) : void + { + this.addFunc = param1; + } + + private function openBaoshiSelect(param1:MouseEvent) : void + { + if(Boolean(this.addFunc)) + { + this.addFunc(this.roleId); + } + } + + private function outBaoShi(param1:MouseEvent) : void + { + ConnectService.getInstance().playService.outPetItemRoleBijou(this.itemObj.tid,this.roleId); + } + + public function setBaoshi(param1:UserPetItem) : void + { + this.itemObj = param1; + this.init(); + } + + private function init() : void + { + var _loc1_:String = null; + if(this.itemObj == null || this.roleId > this.itemObj.roles) + { + this.upBtn1.setUnEnable(); + this.upBtn1.setText("镶 嵌"); + this.itembg1.clear(); + this.label2.text = ""; + this.baoshi = null; + if(this.itemTip) + { + this.itemTip.destroyTip(); + this.itemTip = null; + } + return; + } + this.upBtn1.setEnable(); + this.baoshi = this.itemObj["role1Obj" + this.roleId]; + if(this.baoshi) + { + this.upBtn1.setText("取 出"); + this.label2.htmlText = this.baoshi.showName; + _loc1_ = ServerConfig.IMAGE_ITEM_URL + this.baoshi.iconPath; + this.loadPng(_loc1_); + this.upBtn1.onClick = this.outBaoShi; + } + else + { + this.upBtn1.setText("镶 嵌"); + this.itembg1.clear(); + this.label2.htmlText = ""; + this.upBtn1.onClick = this.openBaoshiSelect; + } + } + + private function loadPng(param1:String) : void + { + if(ImgCache.getInstance().getImg(param1)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(param1).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.load = new LoadResource(param1,this.loadBack); + } + } + + private function loadBack(param1:Event) : void + { + if(this.baoshi == null) + { + this.load.clear(); + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.load.url,this.itemImg); + this.setImgValue(); + this.load.clear(); + } + + private function setImgValue() : void + { + this.itembg1.addPng(this.itemImg); + this.itemImg.width = 41; + this.itemImg.height = 41; + if(this.baoshi == null) + { + return; + } + if(this.itemTip) + { + this.itemTip.destroyTip(); + this.itemTip = null; + } + this.itemTip = new ItemTip(this.itembg1.getItemSprite(),this.face.stage,this.face.tip_bg,this.baoshi); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/PetItemMc.as b/flash_decompiled/com/view/ui/user/mc/PetItemMc.as new file mode 100644 index 0000000..12c4ef8 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/PetItemMc.as @@ -0,0 +1,165 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.PetItemTip; + import com.view.ui.pak.data.PackItem; + import com.view.ui.user.data.UserPetData; + import com.view.ui.user.data.UserPetItem; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.text.TextField; + + public class PetItemMc extends Sprite + { + + private var face:InstallFace; + + private var selectBg:Sprite; + + private var checkBox:UIRadioBtn; + + private var itemName:TextField; + + private var pngArr:Array; + + private var tip:PetItemTip; + + private var itemObj:PackItem; + + private var selectStatus:Boolean; + + public function PetItemMc() + { + var _loc5_:Bitmap = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:Sprite = PublicMethod.createShape(UIConfig.overBgColor,199,24); + addChild(_loc1_); + _loc1_.alpha = 0.2; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,199,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + var _loc2_:Sprite = PublicMethod.getTrLine(194); + addChild(_loc2_); + _loc2_.y = 24; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName.text = ""; + this.checkBox = new UIRadioBtn(); + addChild(this.checkBox); + this.checkBox.x = 5; + this.checkBox.y = 2; + addChild(this.itemName); + this.itemName.x = 25; + this.itemName.y = 3; + this.pngArr = new Array(); + var _loc3_:BitmapData = this.face.getPng("newui_star_1"); + var _loc4_:int = 0; + while(_loc4_ < 5) + { + _loc5_ = new Bitmap(_loc3_); + this.pngArr.push(_loc5_); + addChild(_loc5_); + _loc5_.x = 112 + 16 * _loc4_; + _loc5_.y = 3; + _loc5_.width = 16; + _loc5_.height = 16; + _loc4_++; + } + } + + public function setItemObj(param1:PackItem) : void + { + var _loc2_:* = undefined; + var _loc3_:String = null; + var _loc4_:int = 0; + var _loc5_:UserPetItem = null; + this.itemObj = param1; + if(this.itemObj == null) + { + this.selectStatus = false; + this.checkBox.visible = false; + this.selectBg.visible = false; + this.itemName.text = ""; + for(_loc2_ in this.pngArr) + { + if(_loc2_ < _loc4_) + { + this.pngArr[_loc2_].visible = true; + } + else + { + this.pngArr[_loc2_].visible = false; + } + } + if(this.tip) + { + this.tip.destroyTip(); + this.tip = null; + } + } + else + { + this.checkBox.setUnSelect(); + this.checkBox.visible = true; + _loc3_ = this.itemObj.viewMap.showName; + _loc4_ = int(this.itemObj.viewMap.level); + this.itemName.htmlText = _loc3_; + for(_loc2_ in this.pngArr) + { + if(_loc2_ < _loc4_) + { + this.pngArr[_loc2_].visible = true; + } + else + { + this.pngArr[_loc2_].visible = false; + } + } + _loc5_ = UserPetData.getPetItemByTid(this.itemObj.id); + if(this.tip == null) + { + this.tip = new PetItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj,_loc5_); + } + else + { + this.tip.setTipData(this.itemObj,_loc5_); + } + } + } + + public function setClick(param1:Boolean) : void + { + if(this.itemObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.selectBg.visible = true; + this.checkBox.setSelect(); + } + else + { + this.selectBg.visible = false; + this.checkBox.setUnSelect(); + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/PetItemMc2.as b/flash_decompiled/com/view/ui/user/mc/PetItemMc2.as new file mode 100644 index 0000000..82e7209 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/PetItemMc2.as @@ -0,0 +1,165 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.tip.PetItemTip; + import com.view.ui.pak.data.PackItem; + import com.view.ui.user.data.UserPetData; + import com.view.ui.user.data.UserPetItem; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.text.TextField; + + public class PetItemMc2 extends Sprite + { + + private var tip:PetItemTip; + + private var face:InstallFace; + + private var selectBg:Sprite; + + private var checkBox:UICheckBtn; + + private var itemName:TextField; + + private var pngArr:Array; + + private var itemObj:PackItem; + + private var selectStatus:Boolean; + + public function PetItemMc2() + { + var _loc5_:Bitmap = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:Sprite = PublicMethod.createShape(UIConfig.overBgColor,199,24); + addChild(_loc1_); + _loc1_.alpha = 0.2; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,199,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + var _loc2_:Sprite = PublicMethod.getTrLine(194); + addChild(_loc2_); + _loc2_.y = 24; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName.text = ""; + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 5; + this.checkBox.y = 3; + addChild(this.itemName); + this.itemName.x = 25; + this.itemName.y = 3; + this.pngArr = new Array(); + var _loc3_:BitmapData = this.face.getPng("newui_star_1"); + var _loc4_:int = 0; + while(_loc4_ < 5) + { + _loc5_ = new Bitmap(_loc3_); + this.pngArr.push(_loc5_); + addChild(_loc5_); + _loc5_.x = 112 + 16 * _loc4_; + _loc5_.y = 3; + _loc5_.width = 16; + _loc5_.height = 16; + _loc4_++; + } + } + + public function setItemObj(param1:PackItem) : void + { + var _loc2_:* = undefined; + var _loc3_:String = null; + var _loc4_:int = 0; + var _loc5_:UserPetItem = null; + this.itemObj = param1; + if(this.itemObj == null) + { + this.selectStatus = false; + this.checkBox.visible = false; + this.selectBg.visible = false; + this.itemName.text = ""; + for(_loc2_ in this.pngArr) + { + if(_loc2_ < _loc4_) + { + this.pngArr[_loc2_].visible = true; + } + else + { + this.pngArr[_loc2_].visible = false; + } + } + if(this.tip) + { + this.tip.destroyTip(); + this.tip = null; + } + } + else + { + this.checkBox.setUnSelect(); + this.checkBox.visible = true; + _loc3_ = this.itemObj.viewMap.showName; + _loc4_ = int(this.itemObj.viewMap.level); + this.itemName.htmlText = _loc3_; + for(_loc2_ in this.pngArr) + { + if(_loc2_ < _loc4_) + { + this.pngArr[_loc2_].visible = true; + } + else + { + this.pngArr[_loc2_].visible = false; + } + } + _loc5_ = UserPetData.getPetItemByTid(this.itemObj.id); + if(this.tip == null) + { + this.tip = new PetItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj,_loc5_); + } + else + { + this.tip.setTipData(this.itemObj,_loc5_); + } + } + } + + public function setClick(param1:Boolean) : void + { + if(this.itemObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.selectBg.visible = true; + this.checkBox.setSelect(); + } + else + { + this.selectBg.visible = false; + this.checkBox.setUnSelect(); + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/PetItemMc4.as b/flash_decompiled/com/view/ui/user/mc/PetItemMc4.as new file mode 100644 index 0000000..0aa9770 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/PetItemMc4.as @@ -0,0 +1,185 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.PetItemTip; + import com.view.ui.pak.data.PackItem; + import com.view.ui.user.data.UserPetData; + import com.view.ui.user.data.UserPetItem; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.Sprite; + import flash.text.TextField; + + public class PetItemMc4 extends Sprite + { + + private var face:InstallFace; + + private var selectBg:Sprite; + + private var checkBox:UIRadioBtn; + + private var itemName:TextField; + + private var pngArr:Array; + + private var roleText:TextField; + + private var tip:PetItemTip; + + private var itemObj:PackItem; + + private var selectStatus:Boolean; + + public function PetItemMc4() + { + var _loc5_:Bitmap = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:Sprite = PublicMethod.createShape(UIConfig.overBgColor,199,24); + addChild(_loc1_); + _loc1_.alpha = 0.2; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,199,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + var _loc2_:Sprite = PublicMethod.getTrLine(194); + addChild(_loc2_); + _loc2_.y = 24; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName.text = ""; + this.checkBox = new UIRadioBtn(); + addChild(this.checkBox); + this.checkBox.x = 5; + this.checkBox.y = 2; + addChild(this.itemName); + this.itemName.x = 25; + this.itemName.y = 3; + this.pngArr = new Array(); + var _loc3_:BitmapData = this.face.getPng("myui_role"); + var _loc4_:int = 0; + while(_loc4_ < 4) + { + _loc5_ = new Bitmap(_loc3_); + this.pngArr.push(_loc5_); + addChild(_loc5_); + _loc5_.x = 110 + 22 * _loc4_; + _loc5_.y = 2; + _loc5_.width = 22; + _loc5_.height = 22; + _loc4_++; + } + this.roleText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,65); + addChild(this.roleText); + this.roleText.x = 112; + this.roleText.y = 2; + } + + public function setItemObj(param1:PackItem) : void + { + var _loc2_:* = undefined; + var _loc3_:String = null; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:UserPetItem = null; + var _loc7_:int = 0; + this.itemObj = param1; + if(this.itemObj == null) + { + this.selectStatus = false; + this.checkBox.visible = false; + this.selectBg.visible = false; + this.itemName.text = ""; + for(_loc2_ in this.pngArr) + { + this.pngArr[_loc2_].visible = false; + } + if(this.tip) + { + this.tip.destroyTip(); + this.tip = null; + } + this.roleText.text = ""; + } + else + { + this.checkBox.setUnSelect(); + this.checkBox.visible = true; + _loc3_ = this.itemObj.viewMap.showName; + _loc4_ = int(this.itemObj.viewMap.level); + this.itemName.htmlText = _loc3_; + _loc5_ = this.itemObj.id; + _loc6_ = UserPetData.getPetItemByTid(_loc5_); + if(this.tip == null) + { + this.tip = new PetItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj,_loc6_); + } + else + { + this.tip.setTipData(this.itemObj,_loc6_); + } + _loc7_ = 0; + if(_loc6_ != null) + { + _loc7_ = _loc6_.roles; + } + if(_loc7_ > 0) + { + for(_loc2_ in this.pngArr) + { + if(_loc2_ < _loc7_) + { + this.pngArr[_loc2_].visible = true; + } + else + { + this.pngArr[_loc2_].visible = false; + } + } + this.roleText.text = ""; + } + else + { + this.roleText.text = "未打孔"; + for(_loc2_ in this.pngArr) + { + this.pngArr[_loc2_].visible = false; + } + } + } + } + + public function setClick(param1:Boolean) : void + { + if(this.itemObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.selectBg.visible = true; + this.checkBox.setSelect(); + } + else + { + this.selectBg.visible = false; + this.checkBox.setUnSelect(); + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/PetItemMc5.as b/flash_decompiled/com/view/ui/user/mc/PetItemMc5.as new file mode 100644 index 0000000..e00406d --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/PetItemMc5.as @@ -0,0 +1,117 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.control.ConnectService; + import com.view.cache.ImgCache; + import com.view.newui.UIItem; + import com.view.tip.PetItemTip; + import com.view.ui.pak.data.PackItem; + import com.view.ui.user.data.UserPetData; + import com.view.ui.user.data.UserPetItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class PetItemMc5 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var itembg1:UIItem; + + private var itemImg1:Bitmap; + + private var tip:PetItemTip; + + private var item:PackItem; + + private var load:LoadResource; + + public function PetItemMc5() + { + super(); + this.itembg1 = new UIItem(); + addChild(this.itembg1); + this.itembg1.addEventListener(MouseEvent.CLICK,this.clickPetItem); + } + + public function setItemObj(param1:PackItem) : void + { + var _loc2_:String = null; + this.item = param1; + if(this.item == null) + { + if(this.tip) + { + this.tip.destroyTip(); + this.tip = null; + } + this.itembg1.clear(); + } + else + { + if(this.tip) + { + this.tip.destroyTip(); + } + _loc2_ = ServerConfig.IMAGE_ITEM_URL + this.item.viewMap.iconPath; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.itemImg1 = new Bitmap(); + this.itemImg1.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.load = new LoadResource(_loc2_,this.loadBack); + } + } + } + + private function loadBack(param1:Event) : void + { + if(this.item == null) + { + this.load.clear(); + return; + } + this.itemImg1 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.load.url,this.itemImg1); + this.setImgValue(); + this.load.clear(); + } + + private function setImgValue() : void + { + if(this.item == null) + { + return; + } + this.itembg1.addPng(this.itemImg1); + this.itemImg1.width = 41; + this.itemImg1.height = 41; + var _loc1_:int = this.item.id; + var _loc2_:UserPetItem = UserPetData.getPetItemByTid(_loc1_); + if(this.tip == null) + { + this.tip = new PetItemTip(this.itembg1.getItemSprite(),this.face.stage,this.face.tip_bg,this.item,_loc2_); + } + else + { + this.tip.setTipData(this.item,_loc2_); + } + } + + private function clickPetItem(param1:MouseEvent) : void + { + if(this.item != null) + { + ConnectService.getInstance().playService.equPetItem(this.item.id); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/PetItemMc6.as b/flash_decompiled/com/view/ui/user/mc/PetItemMc6.as new file mode 100644 index 0000000..3ff22cd --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/PetItemMc6.as @@ -0,0 +1,146 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.cache.ImgCache; + import com.view.newui.UIConfig; + import com.view.newui.UIItem; + import com.view.tip.PetItemTip; + import com.view.ui.pak.data.PackItem; + import com.view.ui.user.data.UserPetItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PetItemMc6 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var itembg1:UIItem; + + private var type:int; + + private var typeText:TextField; + + private var tip:PetItemTip; + + private var item:PackItem; + + private var petitem:UserPetItem; + + private var itemImg1:Bitmap; + + private var load:LoadResource; + + public function PetItemMc6(param1:int) + { + super(); + this.type = param1; + this.itembg1 = new UIItem(); + addChild(this.itembg1); + this.itembg1.addEventListener(MouseEvent.CLICK,this.clickPetItem); + this.typeText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,40); + addChild(this.typeText); + this.typeText.x = 10; + this.typeText.y = 14; + switch(param1) + { + case 1: + this.itembg1.setTextStr("头饰"); + break; + case 2: + this.itembg1.setTextStr("项链"); + break; + case 3: + this.itembg1.setTextStr("胸甲"); + break; + case 4: + this.itembg1.setTextStr("利爪"); + break; + case 5: + this.itembg1.setTextStr("挂饰"); + break; + case 6: + this.itembg1.setTextStr("脚环"); + } + } + + private function clickPetItem(param1:MouseEvent) : void + { + if(this.item != null) + { + ConnectService.getInstance().playService.unEquPetItem(this.type + 60); + } + } + + private function clear() : void + { + if(this.tip) + { + this.tip.destroyTip(); + } + this.itembg1.clear(); + } + + public function setItemObj(param1:PackItem, param2:UserPetItem) : void + { + this.item = param1; + this.petitem = param2; + if(this.item == null) + { + this.clear(); + return; + } + var _loc3_:String = ServerConfig.IMAGE_ITEM_URL + this.item.viewMap.iconPath; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.itemImg1 = new Bitmap(); + this.itemImg1.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.load = new LoadResource(_loc3_,this.loadBack); + } + } + + private function loadBack(param1:Event) : void + { + if(this.item == null) + { + this.clear(); + return; + } + this.itemImg1 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.load.url,this.itemImg1); + this.setImgValue(); + this.load.clear(); + } + + private function setImgValue() : void + { + if(this.item == null) + { + return; + } + this.itembg1.addPng(this.itemImg1); + this.itemImg1.width = 41; + this.itemImg1.height = 41; + if(this.tip == null) + { + this.tip = new PetItemTip(this.itembg1.getItemSprite(),this.face.stage,this.face.tip_bg,this.item,this.petitem); + } + else + { + this.tip.setTipData(this.item,this.petitem); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/PetItemMc7.as b/flash_decompiled/com/view/ui/user/mc/PetItemMc7.as new file mode 100644 index 0000000..ec81445 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/PetItemMc7.as @@ -0,0 +1,129 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import com.view.tip.ItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.text.TextField; + + public class PetItemMc7 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var selectBg:Sprite; + + private var checkBox:UIRadioBtn; + + private var itemName:TextField; + + private var itemNums:TextField; + + private var pngArr:Array; + + private var tip:ItemTip; + + private var itemObj:PackItem; + + private var selectStatus:Boolean; + + public function PetItemMc7() + { + super(); + var _loc1_:Sprite = PublicMethod.createShape(UIConfig.overBgColor,199,24); + addChild(_loc1_); + _loc1_.alpha = 0.2; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,199,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + var _loc2_:Sprite = PublicMethod.getTrLine(194); + addChild(_loc2_); + _loc2_.y = 24; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemName.text = ""; + this.itemNums = PublicMethod.getTextFieldWithFillter(16777215,50); + this.itemNums.text = ""; + this.checkBox = new UIRadioBtn(); + addChild(this.checkBox); + this.checkBox.x = 5; + this.checkBox.y = 2; + addChild(this.itemName); + this.itemName.x = 25; + this.itemName.y = 3; + addChild(this.itemNums); + this.itemNums.x = 140; + this.itemNums.y = 3; + } + + public function setItemObj(param1:PackItem) : void + { + var _loc2_:String = null; + var _loc3_:int = 0; + this.itemObj = param1; + if(this.itemObj == null) + { + this.selectStatus = false; + this.checkBox.visible = false; + this.selectBg.visible = false; + this.itemName.text = ""; + this.itemNums.text = ""; + if(this.tip) + { + this.tip.destroyTip(); + this.tip = null; + } + } + else + { + this.checkBox.setUnSelect(); + this.checkBox.visible = true; + _loc2_ = this.itemObj.viewMap.showName; + _loc3_ = int(this.itemObj.viewMap.level); + this.itemName.htmlText = _loc2_; + this.itemNums.text = this.itemObj.itemCount + ""; + if(this.tip == null) + { + this.tip = new ItemTip(this,this.face.stage,this.face.tip_bg,this.itemObj.viewMap); + } + else + { + this.tip.setTipData(this.itemObj.viewMap); + } + } + } + + public function setClick(param1:Boolean) : void + { + if(this.itemObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.selectBg.visible = true; + this.checkBox.setSelect(); + } + else + { + this.selectBg.visible = false; + this.checkBox.setUnSelect(); + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/PiliangStrongUI.as b/flash_decompiled/com/view/ui/user/mc/PiliangStrongUI.as new file mode 100644 index 0000000..b85ba49 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/PiliangStrongUI.as @@ -0,0 +1,98 @@ +package com.view.ui.user.mc +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import com.view.newui.UINumInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PiliangStrongUI extends UIWindowBg + { + + private var okBtn:UIButton; + + private var input:UINumInputText; + + private var itemId:int; + + private var itemNums:int; + + public function PiliangStrongUI() + { + super(); + initSize(115,100); + loadTitle(UITitleConfig.title_piliangqianghua); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(285,65); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(11583207,140); + _loc1_.addChild(_loc2_); + _loc2_.text = "请输入批量强化次数"; + _loc2_.x = 20; + _loc2_.y = 30; + this.input = new UINumInputText(80); + _loc1_.addChild(this.input); + this.input.x = _loc2_.x + _loc2_.width - 15; + this.input.y = _loc2_.y - 3; + this.input.setTextNum(1); + this.input.setMaxChars(5); + this.okBtn = new UIButton("确 定"); + var _loc3_:UIButton = new UIButton("取 消"); + bg1.addChild(this.okBtn); + bg1.addChild(_loc3_); + this.okBtn.x = 80; + this.okBtn.y = 95; + _loc3_.x = 170; + _loc3_.y = this.okBtn.y; + _loc3_.onClick = closeSelf; + this.okBtn.onClick = this.submit; + } + + public function seItemId(param1:int, param2:int) : void + { + this.itemId = param1; + this.itemNums = param2; + this.input.setMaxNum(this.itemNums); + this.input.setTextNum(0); + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("强化次数必须大于0"); + return; + } + if(this.itemId > 0) + { + ConnectService.getInstance().userService.strongUserEqu(this.itemId,_loc2_); + closeSelf(null); + } + } + + private function changeNums(param1:Event) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ > this.itemNums) + { + _loc2_ = this.itemNums; + } + if(_loc2_ <= 0) + { + _loc2_ = 1; + } + this.input.setTextNum(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/ScrollMail.as b/flash_decompiled/com/view/ui/user/mc/ScrollMail.as new file mode 100644 index 0000000..bf9e2c6 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/ScrollMail.as @@ -0,0 +1,63 @@ +package com.view.ui.user.mc +{ + import flash.display.Shape; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class ScrollMail extends Sprite + { + + private var _msgtxt:TextField; + + private var _width:int; + + private var _mask:Shape; + + public function ScrollMail() + { + super(); + this._msgtxt = new TextField(); + this._mask = new Shape(); + this._msgtxt.textColor = 16777215; + this._msgtxt.autoSize = "left"; + this._msgtxt.selectable = false; + var _loc1_:Boolean = false; + mouseEnabled = false; + mouseChildren = _loc1_; + this._mask.graphics.beginFill(0); + this._mask.graphics.drawRect(0,0,550,22); + addChild(this._mask); + mask = this._mask; + } + + public function setinfo(param1:String) : void + { + addChild(this._msgtxt); + this._msgtxt.htmlText = param1; + this._width = this._msgtxt.width; + this._msgtxt.x = 0; + if(this._width > 550) + { + if(hasEventListener(Event.ENTER_FRAME) == false) + { + addEventListener(Event.ENTER_FRAME,this.movehandler); + } + } + else if(hasEventListener(Event.ENTER_FRAME)) + { + removeEventListener(Event.ENTER_FRAME,this.movehandler); + } + } + + private function movehandler(param1:Event) : void + { + --this._msgtxt.x; + if(this._msgtxt.x < -this._width) + { + this._msgtxt.x = 0; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/TaskItem.as b/flash_decompiled/com/view/ui/user/mc/TaskItem.as new file mode 100644 index 0000000..89e0417 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/TaskItem.as @@ -0,0 +1,197 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.events.ParameterEvent; + import com.utils.Utils; + import com.view.newui.UIConfig; + 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 TaskItem extends Sprite + { + + public static const VIEW_BUILD_EVENT:String = "viewbuildevent"; + + private var unit:String = ""; + + public var finishedmc:MovieClip; + + private var _numtxt:TextField; + + private var _addnumtxt:TextField; + + private var actId:String; + + private var desc:String = ""; + + private var tip:String; + + private var isfinished:Boolean = false; + + private var addNumDesc:String = ""; + + private var addNum:int; + + private var _finishedmc:Sprite; + + private var needNum:int; + + private var currNum:int; + + private var _titletxt:TextField; + + private var taskMc:MovieClip; + + private var face:InstallFace = InstallFace.getInstance(); + + private var bg:Sprite; + + private var bg1:Sprite; + + public function TaskItem(param1:Object) + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,320,24); + addChild(this.bg); + this.bg.alpha = 0.6; + this.bg.visible = false; + this.bg1 = PublicMethod.createShape(16777215,320,24); + addChild(this.bg1); + this.bg1.alpha = 0; + this.taskMc = this.face.getMovieClip(ClassConfig.ui_taskItem); + addChild(this.taskMc); + this.init(); + this.setinfo(param1); + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.MOUSE_OVER,this.mouseOver); + addEventListener(Event.REMOVED_FROM_STAGE,this.removed); + } + + private function mouseOut(param1:MouseEvent) : void + { + this.bg.visible = false; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.bg.visible = true; + } + + public function addtooltip() : void + { + if(this.bg1 != null) + { + if(this.tip != null) + { + ToolTipManager.getInstance().setToolTip(this.bg1,new TxtTooltip(this.tip)); + } + } + if(this._addnumtxt != null) + { + ToolTipManager.getInstance().setToolTip(this._addnumtxt,new TxtTooltip("今日所获得活跃度")); + } + } + + private function show() : void + { + if(this.desc.length > 0) + { + this._titletxt.htmlText = this.desc; + } + this._numtxt.htmlText = this.currNum + "/" + this.needNum + this.unit; + if(this.currNum != this.needNum) + { + this._finishedmc.visible = false; + } + if(this.addNumDesc != "") + { + this._addnumtxt.text = this.addNumDesc; + } + if(this.currNum > 0) + { + this._titletxt.textColor = 65280; + } + this.addtooltip(); + } + + private function removed(param1:Event) : void + { + removeEventListener(Event.REMOVED_FROM_STAGE,this.removed); + removeEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + removeEventListener(MouseEvent.MOUSE_OVER,this.mouseOver); + ToolTipManager.getInstance().disposeToolTip(this.bg1); + ToolTipManager.getInstance().disposeToolTip(this._addnumtxt); + } + + private function setinfo(param1:Object) : void + { + if(param1["actId"] != undefined) + { + this.actId = param1["actId"]; + } + if(param1["desc"] != undefined) + { + this.desc = param1["desc"]; + } + if(param1["currNum"] != undefined) + { + this.currNum = param1["currNum"]; + } + if(param1["needNum"] != undefined) + { + this.needNum = param1["needNum"]; + } + if(param1["unit"] != undefined) + { + this.unit = param1["unit"]; + } + if(param1["addNum"] != undefined) + { + this.addNum = param1["addNum"]; + } + if(param1["addNumDesc"] != undefined) + { + this.addNumDesc = param1["addNumDesc"]; + } + if(param1["buttonTip"] != undefined) + { + this.tip = param1["buttonTip"]; + } + this.show(); + } + + private function init() : void + { + this.taskMc.mouseEnabled = false; + this._finishedmc = this.taskMc.getChildByName("finishedmc") as Sprite; + this._finishedmc.mouseEnabled = false; + this._finishedmc.mouseChildren = false; + this._titletxt = this.taskMc.getChildByName("titletxt") as TextField; + this._titletxt.mouseEnabled = false; + this._numtxt = this.taskMc.getChildByName("numtxt") as TextField; + this._addnumtxt = this.taskMc.getChildByName("addnumtxt") as TextField; + this._addnumtxt.autoSize = "center"; + this._addnumtxt.text = ""; + this._numtxt.mouseEnabled = false; + this._titletxt.mouseEnabled = false; + } + + public function showcas() : void + { + if(this.actId == null) + { + return; + } + var _loc1_:* = new ParameterEvent(VIEW_BUILD_EVENT,this.actId); + Utils.g_events.dispatchEvent(_loc1_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/UserEquView.as b/flash_decompiled/com/view/ui/user/mc/UserEquView.as new file mode 100644 index 0000000..9d5b387 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/UserEquView.as @@ -0,0 +1,319 @@ +package com.view.ui.user.mc +{ + import com.common.LoadResource; + import com.common.PublicMethod; + import com.newdata.user.NewUserData; + import com.view.cache.ImgCache; + import com.view.ui.pak.data.PackItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class UserEquView extends Sprite + { + + private var loadImg:LoadResource; + + private var bodyImg:Bitmap; + + private var url:String; + + private var bodySp:Sprite; + + private var sex:int = NewUserData.getUser().sex; + + private var img1:Bitmap; + + private var img2:Bitmap; + + private var img3:Bitmap; + + private var img4:Bitmap; + + private var sp1:Sprite; + + private var sp2:Sprite; + + private var sp3:Sprite; + + private var sp4:Sprite; + + private var obj1:PackItem; + + private var obj2:PackItem; + + private var obj3:PackItem; + + private var obj4:PackItem; + + private var loadItemPng1:LoadResource; + + private var loadItemPng2:LoadResource; + + private var loadItemPng3:LoadResource; + + private var loadItemPng4:LoadResource; + + private var url1:String; + + private var url2:String; + + private var url3:String; + + private var url4:String; + + public function UserEquView() + { + super(); + this.sp2 = new Sprite(); + addChild(this.sp2); + this.bodySp = new Sprite(); + addChild(this.bodySp); + this.bodySp.x = 47; + this.bodySp.y = 12; + this.sp3 = new Sprite(); + addChild(this.sp3); + this.sp1 = new Sprite(); + addChild(this.sp1); + this.sp4 = new Sprite(); + addChild(this.sp4); + if(this.sex == 1) + { + this.sp1.x = 26; + this.sp1.y = 151; + this.sp2.x = -57; + this.sp2.y = -12; + this.sp3.x = 30; + this.sp3.y = 14; + this.sp4.x = 73; + this.sp4.y = -24; + } + else + { + this.sp1.x = 28; + this.sp1.y = 150; + this.sp2.x = -70; + this.sp2.y = -24; + this.sp3.x = 32; + this.sp3.y = 21; + this.sp4.x = 56; + this.sp4.y = -20; + } + this.sp1.mouseEnabled = false; + this.sp2.mouseEnabled = false; + this.sp3.mouseEnabled = false; + this.sp4.mouseEnabled = false; + this.sp1.mouseChildren = false; + this.sp2.mouseChildren = false; + this.sp3.mouseChildren = false; + this.sp4.mouseChildren = false; + mouseEnabled = false; + if(this.sex == 1) + { + this.url = "pic/king/manRole.png"; + } + else + { + this.url = "pic/king/womenRole.png"; + } + this.loadBodyBg(); + } + + private function loadBodyBg() : void + { + if(this.bodyImg == null) + { + this.loadImg = new LoadResource(this.url,this.loadImgBack); + } + } + + private function loadImgBack(param1:Event) : void + { + this.bodyImg = param1.target.loader.content; + this.bodySp.addChild(this.bodyImg); + this.loadImg.clear(); + } + + public function setAsset(param1:int, param2:PackItem) : void + { + var _loc3_:String = null; + if(param1 == 5) + { + this.obj1 = param2; + if(param2 == null) + { + this.url1 = ""; + if(Boolean(this.img1) && this.sp1.contains(this.img1)) + { + this.sp1.removeChild(this.img1); + } + } + else + { + _loc3_ = PublicMethod.getAssetUrl(this.sex,param2.color,param1); + if(this.url1 == _loc3_) + { + return; + } + this.url1 = _loc3_; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.img1 = new Bitmap(); + this.img1.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + this.sp1.addChild(this.img1); + } + else + { + this.loadItemPng1 = new LoadResource(_loc3_,this.loadPngBack1); + } + } + } + if(param1 == 6) + { + this.obj2 = param2; + if(param2 == null) + { + this.url2 = ""; + if(Boolean(this.img2) && this.sp2.contains(this.img2)) + { + this.sp2.removeChild(this.img2); + } + } + else + { + _loc3_ = PublicMethod.getAssetUrl(this.sex,param2.color,param1); + if(this.url2 == _loc3_) + { + return; + } + this.url2 = _loc3_; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.img2 = new Bitmap(); + this.img2.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + this.sp2.addChild(this.img2); + } + else + { + this.loadItemPng2 = new LoadResource(_loc3_,this.loadPngBack2); + } + } + } + if(param1 == 7) + { + this.obj3 = param2; + if(param2 == null) + { + this.url3 = ""; + if(Boolean(this.img3) && this.sp3.contains(this.img3)) + { + this.sp3.removeChild(this.img3); + } + } + else + { + _loc3_ = PublicMethod.getAssetUrl(this.sex,param2.color,param1); + if(this.url3 == _loc3_) + { + return; + } + this.url3 = _loc3_; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.img3 = new Bitmap(); + this.img3.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + this.sp3.addChild(this.img3); + } + else + { + this.loadItemPng3 = new LoadResource(_loc3_,this.loadPngBack3); + } + } + } + if(param1 == 8) + { + this.obj4 = param2; + if(param2 == null) + { + this.url4 = ""; + if(Boolean(this.img4) && this.sp4.contains(this.img4)) + { + this.sp4.removeChild(this.img4); + } + } + else + { + _loc3_ = PublicMethod.getAssetUrl(this.sex,param2.color,param1); + if(this.url4 == _loc3_) + { + return; + } + this.url4 = _loc3_; + if(ImgCache.getInstance().getImg(_loc3_)) + { + this.img4 = new Bitmap(); + this.img4.bitmapData = ImgCache.getInstance().getImg(_loc3_).bitmapData.clone(); + this.sp4.addChild(this.img4); + } + else + { + this.loadItemPng4 = new LoadResource(_loc3_,this.loadPngBack4); + } + } + } + } + + private function loadPngBack1(param1:Event) : void + { + if(this.obj1 == null) + { + this.url1 = ""; + return; + } + this.img1 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng1.url,this.img1); + this.sp1.addChild(this.img1); + this.loadItemPng1.clear(); + } + + private function loadPngBack2(param1:Event) : void + { + if(this.obj2 == null) + { + this.url2 = ""; + return; + } + this.img2 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng2.url,this.img2); + this.sp2.addChild(this.img2); + this.loadItemPng2.clear(); + } + + private function loadPngBack3(param1:Event) : void + { + if(this.obj3 == null) + { + this.url3 = ""; + return; + } + this.img3 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng3.url,this.img3); + this.sp3.addChild(this.img3); + this.loadItemPng3.clear(); + } + + private function loadPngBack4(param1:Event) : void + { + if(this.obj4 == null) + { + this.url4 = ""; + return; + } + this.img4 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng4.url,this.img4); + this.sp4.addChild(this.img4); + this.loadItemPng4.clear(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/UserEquipBg.as b/flash_decompiled/com/view/ui/user/mc/UserEquipBg.as new file mode 100644 index 0000000..60fdfb3 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/UserEquipBg.as @@ -0,0 +1,166 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.tip.KingItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class UserEquipBg extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var equipName:String; + + private var bgClass:String; + + public var type:int; + + private var bg:Sprite; + + private var nameText:TextField; + + private var obj:PackItem; + + private var itemMc:Sprite; + + private var levelText:TextField; + + private var itemTip:KingItemTip; + + private var url:String; + + private var loadItemPng:LoadResource; + + private var itemImg:Bitmap; + + public function UserEquipBg(param1:int) + { + super(); + this.type = param1; + this.bgClass = "lib_eq_" + this.type; + this.bg = new Sprite(); + this.bg.addChild(new Bitmap(this.face.getPng(this.bgClass))); + addChild(this.bg); + switch(this.type) + { + case 1: + this.equipName = "护符"; + break; + case 2: + this.equipName = "戒指"; + break; + case 3: + this.equipName = "腰带"; + break; + case 4: + this.equipName = "项链"; + break; + case 5: + this.equipName = "鞋子"; + break; + case 6: + this.equipName = "武器"; + break; + case 7: + this.equipName = "衣服"; + break; + case 8: + this.equipName = "头盔"; + } + this.nameText = PublicMethod.getTextFieldWithFillter(7895160,30); + this.nameText.text = this.equipName; + this.bg.addChild(this.nameText); + this.nameText.x = 18; + this.nameText.y = 20; + if(this.type < 5) + { + this.bg.x = 261; + this.bg.y = 273 - this.type * 65; + } + else + { + this.bg.x = 10; + this.bg.y = 273 - (this.type - 4) * 65; + } + this.itemMc = new Sprite(); + this.levelText = PublicMethod.getTextFieldWithFillter(16777215,24); + this.bg.addChild(this.itemMc); + this.itemMc.x = 4; + this.itemMc.y = 4; + this.bg.addChild(this.levelText); + this.levelText.x = 32; + this.levelText.y = 40; + } + + public function getObj() : PackItem + { + return this.obj; + } + + public function setItemObj(param1:PackItem) : void + { + this.obj = param1; + if(Boolean(this.itemImg) && this.itemMc.contains(this.itemImg)) + { + this.itemMc.removeChild(this.itemImg); + this.levelText.text = ""; + } + if(this.obj == null) + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + return; + } + this.levelText.text = "+" + this.obj.level; + this.url = ServerConfig.IMAGE_ITEM_URL + this.obj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(this.url,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + if(this.obj == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemMc.addChild(this.itemImg); + this.itemImg.width = 52; + this.itemImg.height = 52; + if(this.itemTip == null) + { + this.itemTip = new KingItemTip(this.itemMc,this.face.stage,this.face.tip_bg,this.obj); + } + else + { + this.itemTip.setTipData(this.obj); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/UserEquipItem1.as b/flash_decompiled/com/view/ui/user/mc/UserEquipItem1.as new file mode 100644 index 0000000..4d912da --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/UserEquipItem1.as @@ -0,0 +1,124 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.mc.button.Button_15; + import com.view.newui.UIConfig; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.text.TextField; + + public class UserEquipItem1 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var radioBtn:Button_15; + + private var itemName:TextField; + + private var itemLevel:TextField; + + private var selectBg:Sprite; + + private var selectStatus:Boolean; + + private var itemObj:PackItem; + + public function UserEquipItem1() + { + super(); + var _loc1_:Sprite = PublicMethod.createShape(UIConfig.overBgColor,199,24); + addChild(_loc1_); + _loc1_.alpha = 0.2; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,199,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + var _loc2_:Sprite = PublicMethod.getTrLine(199); + addChild(_loc2_); + _loc2_.y = 24; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,120); + this.itemLevel = PublicMethod.getTextFieldWithFillter(16777215,46); + this.radioBtn = new Button_15(); + addChild(this.radioBtn); + this.radioBtn.x = 5; + this.radioBtn.y = 4; + this.radioBtn.visible = false; + addChild(this.itemName); + this.itemName.x = 25; + this.itemName.y = 3; + addChild(this.itemLevel); + this.itemLevel.x = this.itemName.x + this.itemName.width; + this.itemLevel.y = 3; + } + + public function setClick(param1:Boolean) : void + { + if(this.itemObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.selectBg.visible = true; + } + else + { + this.selectBg.visible = false; + } + this.radioBtn.setClick(param1); + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + + public function mouseClick() : void + { + if(this.itemObj == null) + { + return; + } + if(this.selectStatus) + { + this.selectStatus = false; + this.selectBg.visible = false; + } + else + { + this.selectStatus = true; + this.selectBg.visible = true; + } + this.radioBtn.setClick(this.selectStatus); + } + + public function setItemObj(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + this.selectStatus = false; + this.radioBtn.visible = false; + this.selectBg.visible = false; + this.itemName.text = ""; + this.itemLevel.text = ""; + } + else + { + this.radioBtn.setClick(false); + this.radioBtn.visible = true; + this.itemName.htmlText = this.itemObj.viewMap.showName; + this.itemLevel.htmlText = "+" + this.itemObj.level; + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/UserEquipItem2.as b/flash_decompiled/com/view/ui/user/mc/UserEquipItem2.as new file mode 100644 index 0000000..695aae1 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/UserEquipItem2.as @@ -0,0 +1,126 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.text.TextField; + + public class UserEquipItem2 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var checkBox:UICheckBtn; + + private var itemName:TextField; + + private var itemLevel:TextField; + + private var selectBg:Sprite; + + private var selectStatus:Boolean; + + private var itemObj:PackItem; + + public function UserEquipItem2() + { + super(); + var _loc1_:Sprite = PublicMethod.createShape(UIConfig.overBgColor,199,24); + addChild(_loc1_); + _loc1_.alpha = 0.2; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,199,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + var _loc2_:Sprite = PublicMethod.getTrLine(199); + addChild(_loc2_); + _loc2_.y = 24; + this.itemName = PublicMethod.getTextField(16777215,120); + this.itemLevel = PublicMethod.getTextField(16777215,46); + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 5; + this.checkBox.y = 2; + this.checkBox.visible = false; + addChild(this.itemName); + this.itemName.x = 25; + this.itemName.y = 3; + addChild(this.itemLevel); + this.itemLevel.x = this.itemName.x + this.itemName.width; + this.itemLevel.y = 3; + } + + public function setClick(param1:Boolean) : void + { + if(this.itemObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.selectBg.visible = true; + this.checkBox.setSelect(); + } + else + { + this.selectBg.visible = false; + this.checkBox.setUnSelect(); + } + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + + public function mouseClick() : void + { + if(this.itemObj == null) + { + return; + } + if(this.selectStatus) + { + this.selectStatus = false; + this.selectBg.visible = false; + this.checkBox.setUnSelect(); + } + else + { + this.selectStatus = true; + this.selectBg.visible = true; + this.checkBox.setSelect(); + } + } + + public function setItemObj(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + this.selectStatus = false; + this.checkBox.visible = false; + this.selectBg.visible = false; + this.itemName.text = ""; + this.itemLevel.text = ""; + } + else + { + this.checkBox.setUnSelect(); + this.checkBox.visible = true; + this.itemName.htmlText = this.itemObj.viewMap.showName; + this.itemLevel.htmlText = "+" + this.itemObj.level; + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/UserEquipItem3.as b/flash_decompiled/com/view/ui/user/mc/UserEquipItem3.as new file mode 100644 index 0000000..3031075 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/UserEquipItem3.as @@ -0,0 +1,165 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.view.mc.button.Button_15; + import com.view.newui.UIConfig; + import com.view.ui.pak.data.PackItem; + import flash.display.Sprite; + import flash.text.TextField; + + public class UserEquipItem3 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var radioBtn:Button_15; + + private var itemName:TextField; + + private var liuYuMc1:LiuYuMc1; + + private var liuYuMc2:LiuYuMc1; + + private var liuYuMc3:LiuYuMc1; + + private var liuYuMc4:LiuYuMc1; + + private var selectBg:Sprite; + + private var selectStatus:Boolean; + + private var itemObj:PackItem; + + public function UserEquipItem3() + { + super(); + var _loc1_:Sprite = PublicMethod.createShape(UIConfig.overBgColor,219,24); + addChild(_loc1_); + _loc1_.alpha = 0.2; + this.selectBg = PublicMethod.createShape(UIConfig.selectBgColor,219,24); + addChild(this.selectBg); + this.selectBg.alpha = 0.3; + this.selectBg.visible = false; + var _loc2_:Sprite = PublicMethod.getTrLine(219); + addChild(_loc2_); + _loc2_.y = 24; + this.itemName = PublicMethod.getTextFieldWithFillter(16777215,115); + this.liuYuMc1 = new LiuYuMc1(); + this.radioBtn = new Button_15(); + addChild(this.radioBtn); + this.radioBtn.x = 5; + this.radioBtn.y = 4; + this.radioBtn.visible = false; + addChild(this.itemName); + this.itemName.x = 25; + this.itemName.y = 3; + addChild(this.liuYuMc1); + this.liuYuMc1.x = 138; + this.liuYuMc1.y = 3; + this.liuYuMc2 = new LiuYuMc1(); + addChild(this.liuYuMc2); + this.liuYuMc2.x = this.liuYuMc1.x + 18; + this.liuYuMc2.y = 3; + this.liuYuMc3 = new LiuYuMc1(); + addChild(this.liuYuMc3); + this.liuYuMc3.x = this.liuYuMc2.x + 18; + this.liuYuMc3.y = 3; + this.liuYuMc4 = new LiuYuMc1(); + addChild(this.liuYuMc4); + this.liuYuMc4.x = this.liuYuMc3.x + 18; + this.liuYuMc4.y = 3; + } + + public function setClick(param1:Boolean) : void + { + if(this.itemObj == null) + { + return; + } + this.selectStatus = param1; + if(this.selectStatus) + { + this.selectBg.visible = true; + } + else + { + this.selectBg.visible = false; + } + this.radioBtn.setClick(param1); + } + + public function getSelectStatus() : Boolean + { + return this.selectStatus; + } + + public function mouseClick() : void + { + if(this.itemObj == null) + { + return; + } + if(this.selectStatus) + { + this.selectStatus = false; + this.selectBg.visible = false; + } + else + { + this.selectStatus = true; + this.selectBg.visible = true; + } + this.radioBtn.setClick(this.selectStatus); + } + + public function setItemObj(param1:PackItem) : void + { + this.itemObj = param1; + if(this.itemObj == null) + { + this.selectStatus = false; + this.radioBtn.visible = false; + this.selectBg.visible = false; + this.itemName.text = ""; + this.liuYuMc1.setEntId(0); + this.liuYuMc2.setEntId(0); + this.liuYuMc3.setEntId(0); + this.liuYuMc4.setEntId(0); + } + else + { + this.radioBtn.setClick(false); + this.radioBtn.visible = true; + if(this.itemObj.equip == 1) + { + this.itemName.htmlText = this.itemObj.viewMap.showName + "(已穿戴)"; + } + else + { + this.itemName.htmlText = this.itemObj.viewMap.showName; + } + if(this.itemObj.liuyu) + { + this.liuYuMc1.setEntId(this.itemObj.liuyu.roleId1); + this.liuYuMc2.setEntId(this.itemObj.liuyu.roleId2); + this.liuYuMc3.setEntId(this.itemObj.liuyu.roleId3); + this.liuYuMc4.setEntId(this.itemObj.liuyu.roleId4); + } + else + { + this.liuYuMc1.setEntId(0); + this.liuYuMc2.setEntId(0); + this.liuYuMc3.setEntId(0); + this.liuYuMc4.setEntId(0); + } + } + } + + public function getItemObj() : PackItem + { + return this.itemObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/mc/UserItemMc.as b/flash_decompiled/com/view/ui/user/mc/UserItemMc.as new file mode 100644 index 0000000..204edb9 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/mc/UserItemMc.as @@ -0,0 +1,115 @@ +package com.view.ui.user.mc +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.LoadResource; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.view.cache.ImgCache; + import com.view.tip.KingItemTip; + import com.view.ui.pak.data.PackItem; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class UserItemMc extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var itemMc:Sprite; + + private var levelText:TextField; + + private var itemTip:KingItemTip; + + private var obj:PackItem; + + private var url:String; + + private var loadItemPng:LoadResource; + + private var itemImg:Bitmap; + + public function UserItemMc() + { + super(); + var _loc1_:Bitmap = new Bitmap(this.face.getPng(ClassConfig.lib_exchange_4)); + addChild(_loc1_); + this.itemMc = new Sprite(); + this.levelText = PublicMethod.getTextField(16777215,24); + addChild(this.itemMc); + this.itemMc.x = 6; + this.itemMc.y = 6; + this.levelText.filters = [PublicGlow.getInstance().blackGlow]; + addChild(this.levelText); + this.levelText.x = 32; + this.levelText.y = 40; + } + + public function getObj() : Object + { + return this.obj; + } + + public function setItemObj(param1:PackItem) : void + { + this.obj = param1; + if(Boolean(this.itemImg) && this.itemMc.contains(this.itemImg)) + { + this.itemMc.removeChild(this.itemImg); + this.levelText.text = ""; + } + if(this.obj == null) + { + if(this.itemTip) + { + this.itemTip.destroyTip(); + } + return; + } + this.levelText.text = "+" + this.obj.level; + this.url = ServerConfig.IMAGE_ITEM_URL + this.obj.viewMap.iconPath; + if(ImgCache.getInstance().getImg(this.url)) + { + this.itemImg = new Bitmap(); + this.itemImg.bitmapData = ImgCache.getInstance().getImg(this.url).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.loadItemPng = new LoadResource(this.url,this.loadPngBack); + } + } + + private function loadPngBack(param1:Event) : void + { + if(this.obj == null) + { + return; + } + this.itemImg = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.loadItemPng.url,this.itemImg); + this.setImgValue(); + this.loadItemPng.clear(); + } + + private function setImgValue() : void + { + this.itemMc.addChild(this.itemImg); + this.itemImg.width = 52; + this.itemImg.height = 52; + if(this.itemTip == null) + { + this.itemTip = new KingItemTip(this.itemMc,this.face.stage,this.face.tip_bg,this.obj); + } + else + { + this.itemTip.setTipData(this.obj); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/pet/PetItem1.as b/flash_decompiled/com/view/ui/user/pet/PetItem1.as new file mode 100644 index 0000000..ad8835b --- /dev/null +++ b/flash_decompiled/com/view/ui/user/pet/PetItem1.as @@ -0,0 +1,97 @@ +package com.view.ui.user.pet +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.utils.Utils; + import com.view.newui.UIConfig; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.text.TextField; + + public class PetItem1 extends Sprite + { + + public var type:int; + + private var petNameText:TextField; + + private var useText:TextField; + + private var face:InstallFace = InstallFace.getInstance(); + + private var bg:Sprite; + + private var content:String = null; + + public function PetItem1(param1:int) + { + super(); + this.type = param1; + var _loc2_:Bitmap = new Bitmap(this.face.getPng("pet_0" + param1)); + this.bg = new Sprite(); + this.bg.addChild(_loc2_); + addChild(this.bg); + var _loc3_:Sprite = PublicMethod.getTrLine(140); + addChild(_loc3_); + _loc3_.y = 75; + this.petNameText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + addChild(this.petNameText); + this.petNameText.x = this.bg.x + this.bg.width; + this.petNameText.y = 2; + this.useText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,60); + addChild(this.useText); + this.useText.x = this.petNameText.x; + this.useText.y = this.petNameText.y + 36; + this.init(); + } + + private function init() : void + { + this.petNameText.htmlText = Utils.getPetName(this.type); + } + + public function setTip(param1:int) : void + { + if(this.content != null) + { + return; + } + var _loc2_:int = 0; + switch(this.type) + { + case 1: + _loc2_ = 100; + break; + case 2: + _loc2_ = 300; + break; + case 3: + _loc2_ = 600; + break; + case 4: + _loc2_ = 1000; + break; + case 5: + _loc2_ = 1000; + } + this.content = "成长上限:" + _loc2_ + "
"; + this.content = this.content + "属性上限:" + param1 + ""; + ToolTipManager.getInstance().setToolTip(this.bg,new TxtTooltip(this.content),false,-1,false); + } + + public function setCurr(param1:Boolean) : void + { + if(param1) + { + this.useText.text = "使用中"; + } + else + { + this.useText.text = ""; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/user/pet/PetItem3.as b/flash_decompiled/com/view/ui/user/pet/PetItem3.as new file mode 100644 index 0000000..397b5c7 --- /dev/null +++ b/flash_decompiled/com/view/ui/user/pet/PetItem3.as @@ -0,0 +1,321 @@ +package com.view.ui.user.pet +{ + 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.view.cache.ImgCache; + import com.view.newui.UIButton; + import com.view.newui.UIItem; + import com.view.tip.ItemTip; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.pak.data.PackItem; + import com.view.ui.user.data.UserPetData; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class PetItem3 extends Sprite + { + + private var face:InstallFace; + + private var bg:Sprite; + + private var _i:int; + + private var arrow:Sprite; + + private var btn:UIButton; + + private var itembg1:UIItem; + + private var itembg3:UIItem; + + private var itembg5:UIItem; + + private var currObj:PackItem; + + private var tip1:ItemTip; + + private var tip2:ItemTip; + + private var tip3:ItemTip; + + private var needItems:int; + + private var step:int; + + private var centerItem:Object; + + private var currItem:Object; + + private var nextItem:Object; + + private var itemImg1:Bitmap; + + private var itemImg2:Bitmap; + + private var itemImg3:Bitmap; + + private var load:LoadResource; + + public function PetItem3(param1:int) + { + var _loc4_:Bitmap = null; + var _loc5_:Bitmap = null; + this.face = InstallFace.getInstance(); + super(); + this._i = param1; + this.bg = new Scale9Grid(this.face.getSprite("bg_border"),348,46); + addChild(this.bg); + this.bg.visible = false; + this.bg.x = -10; + var _loc2_:Sprite = PublicMethod.createShape(16777215,360,62); + addChild(_loc2_); + _loc2_.alpha = 0; + var _loc3_:Sprite = PublicMethod.getTrLine(360); + addChild(_loc3_); + _loc3_.y = 62; + this.arrow = this.face.getSprite("arrow_2"); + addChild(this.arrow); + this.arrow.y = 18; + this.arrow.x = 0; + this.itembg1 = new UIItem(); + addChild(this.itembg1); + this.itembg1.y = 10; + this.itembg1.x = 60; + _loc4_ = new Bitmap(this.face.getPng("myui_jia")); + addChild(_loc4_); + _loc4_.y = this.itembg1.y + 9; + _loc4_.x = this.itembg1.x + 50; + this.itembg3 = new UIItem(); + addChild(this.itembg3); + this.itembg3.y = this.itembg1.y; + this.itembg3.x = this.itembg1.x + 90; + _loc5_ = new Bitmap(this.face.getPng("myui_deng")); + addChild(_loc5_); + _loc5_.y = _loc4_.y; + _loc5_.x = this.itembg3.x + 55; + this.itembg5 = new UIItem(); + addChild(this.itembg5); + this.itembg5.y = this.itembg1.y; + this.itembg5.x = this.itembg3.x + 90; + this.btn = new UIButton("升级"); + addChild(this.btn); + this.btn.x = this.itembg5.x + 60; + this.btn.y = _loc5_.y; + this.btn.onClick = this.upPetItem; + } + + private function mouseOut(param1:MouseEvent) : void + { + this.bg.visible = false; + } + + private function mouseOver(param1:MouseEvent) : void + { + this.bg.visible = true; + } + + public function initData(param1:PackItem) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + this.currObj = param1; + if(param1 == null) + { + this.setSelect(false); + return; + } + var _loc4_:int = param1.childType; + var _loc5_:int = param1.level; + switch(_loc4_) + { + case 61: + _loc2_ = 10395101; + break; + case 62: + _loc2_ = 10395102; + break; + case 63: + _loc2_ = 10395103; + break; + case 64: + _loc2_ = 10395104; + break; + case 65: + _loc2_ = 10395105; + break; + case 66: + _loc2_ = 10395106; + } + switch(this._i) + { + case 0: + this.needItems = 100; + break; + case 1: + this.needItems = 200; + _loc2_ += 100; + break; + case 2: + this.needItems = 300; + _loc2_ += 200; + break; + case 3: + this.needItems = 400; + _loc2_ += 300; + } + _loc3_ = _loc2_ + 100; + if(_loc5_ == this._i + 1) + { + this.setSelect(true); + } + else + { + this.setSelect(false); + } + this.currItem = UserPetData.getPetItemByItemId(_loc2_); + this.nextItem = UserPetData.getPetItemByItemId(_loc3_); + if(this.centerItem == null) + { + this.centerItem = UserPetData.getPetItemByItemId(10395507); + } + this.step = 1; + this.loadCurrItem(); + } + + private function loadCurrItem() : void + { + var _loc1_:String = null; + if(this.step == 1) + { + _loc1_ = ServerConfig.IMAGE_ITEM_URL + this.currItem.iconPath; + } + if(this.step == 2) + { + _loc1_ = ServerConfig.IMAGE_ITEM_URL + this.centerItem.iconPath; + } + if(this.step == 3) + { + _loc1_ = ServerConfig.IMAGE_ITEM_URL + this.nextItem.iconPath; + } + if(ImgCache.getInstance().getImg(_loc1_)) + { + this.itemImg1 = new Bitmap(); + this.itemImg1.bitmapData = ImgCache.getInstance().getImg(_loc1_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.load = new LoadResource(_loc1_,this.loadBack); + } + } + + private function loadBack(param1:Event) : void + { + if(this.currObj == null) + { + this.load.clear(); + return; + } + this.itemImg1 = param1.target.loader.content as Bitmap; + ImgCache.getInstance().setImg(this.load.url,this.itemImg1); + this.setImgValue(); + this.load.clear(); + } + + private function setImgValue() : void + { + if(this.step == 1) + { + this.itembg1.addPng(this.itemImg1); + this.itemImg1.width = 41; + this.itemImg1.height = 41; + this.itembg1.setItemNums(1); + if(this.tip1 == null) + { + this.tip1 = new ItemTip(this.itembg1.getItemSprite(),this.face.stage,this.face.tip_bg,this.currItem); + } + else + { + this.tip1.setTipData(this.currItem); + } + } + if(this.step == 2) + { + this.itembg3.addPng(this.itemImg1); + this.itemImg1.width = 41; + this.itemImg1.height = 41; + this.itembg3.setItemNums(this.needItems); + if(this.tip2 == null) + { + this.tip2 = new ItemTip(this.itembg3.getItemSprite(),this.face.stage,this.face.tip_bg,this.centerItem); + } + } + if(this.step == 3) + { + this.itembg5.addPng(this.itemImg1); + this.itemImg1.width = 41; + this.itemImg1.height = 41; + this.itembg5.setItemNums(1); + if(this.tip3 == null) + { + this.tip3 = new ItemTip(this.itembg5.getItemSprite(),this.face.stage,this.face.tip_bg,this.nextItem); + } + else + { + this.tip3.setTipData(this.nextItem); + } + } + ++this.step; + if(this.step == 2 && this.itemImg2 != null) + { + ++this.step; + } + if(this.step <= 3) + { + this.loadCurrItem(); + } + } + + private function loadSecItem() : void + { + var _loc1_:Object = UserPetData.getPetItemByItemId(10395507); + var _loc2_:String = ServerConfig.IMAGE_ITEM_URL + _loc1_.iconPath; + if(ImgCache.getInstance().getImg(_loc2_)) + { + this.itemImg2 = new Bitmap(); + this.itemImg1.bitmapData = ImgCache.getInstance().getImg(_loc2_).bitmapData.clone(); + this.setImgValue(); + } + else + { + this.load = new LoadResource(_loc2_,this.loadBack); + } + } + + public function setSelect(param1:Boolean) : void + { + this.bg.visible = param1; + this.arrow.visible = param1; + this.btn.visible = param1; + } + + private function upPetItem(param1:MouseEvent) : void + { + if(this.currObj == null) + { + MessageBoxUI.getInstance().addMessage("请选择要升级的装备"); + return; + } + var _loc2_:int = this.currObj.id; + ConnectService.getInstance().playService.upPetItem(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/vip/MyVipUI.as b/flash_decompiled/com/view/ui/vip/MyVipUI.as new file mode 100644 index 0000000..a3ff63c --- /dev/null +++ b/flash_decompiled/com/view/ui/vip/MyVipUI.as @@ -0,0 +1,328 @@ +package com.view.ui.vip +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.data.GameData; + import com.data.MemeberShip; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIExpBar; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class MyVipUI extends Sprite + { + + private var expBar:UIExpBar; + + private var currText:TextField; + + private var face:InstallFace; + + private var getVipGift:UIButton; + + private var needText:TextField; + + private var titleText:TextField; + + private var levelText:TextField; + + public function MyVipUI() + { + var _loc6_:TextFormat = null; + this.face = InstallFace.getInstance(); + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(772,367); + addChild(_loc1_); + var _loc2_:UITitleBg = new UITitleBg("当前等级",_loc1_.width); + _loc1_.addChild(_loc2_); + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,64); + _loc3_.text = "当前等级:"; + _loc1_.addChild(_loc3_); + _loc3_.x = 20; + _loc3_.y = 40; + this.levelText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,150); + _loc1_.addChild(this.levelText); + this.levelText.x = _loc3_.x + _loc3_.width; + this.levelText.y = _loc3_.y; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,64); + _loc4_.text = "当前称号:"; + _loc1_.addChild(_loc4_); + _loc4_.x = 200; + _loc4_.y = _loc3_.y; + this.titleText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + _loc1_.addChild(this.titleText); + this.titleText.x = _loc4_.x + _loc4_.width; + this.titleText.y = _loc4_.y; + this.expBar = new UIExpBar(); + this.expBar.setWidth(550); + this.expBar.init(); + this.expBar.x = 100; + this.expBar.y = 70; + this.expBar.setCurValue(0); + this.expBar.setMaxValue(100); + _loc1_.addChild(this.expBar); + this.needText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,450); + _loc1_.addChild(this.needText); + this.needText.x = this.expBar.x; + this.needText.y = this.expBar.y + 25; + this.needText.defaultTextFormat = PublicMethod.getCenterTextFormat(); + var _loc5_:UITitleBg = new UITitleBg("每日福利",_loc1_.width); + _loc1_.addChild(_loc5_); + _loc5_.y = 125; + _loc6_ = new TextFormat(); + _loc6_.leading = 3; + this.currText = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,640); + this.currText.wordWrap = true; + this.currText.multiline = true; + this.currText.height = 200; + this.currText.selectable = false; + _loc1_.addChild(this.currText); + this.currText.x = 50; + this.currText.y = _loc5_.y + 31; + this.currText.defaultTextFormat = _loc6_; + this.getVipGift = new UIButton("领取奖励",2,10); + _loc1_.addChild(this.getVipGift); + this.getVipGift.x = 335; + this.getVipGift.y = 346; + this.getVipGift.onClick = this.getVipGiftF; + ConnectService.getInstance().addEventListener(UserEvent.USER_GetVipGift,this.getGiftResult); + var _loc7_:String = ""; + _loc7_ = _loc7_ + "" + GameData.getConfigMap().vipBoxStr; + this.currText.htmlText = _loc7_; + } + + public function getDate() : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc6_:int = 0; + var _loc1_:NewUser = NewUserData.getUser(); + var _loc4_:String = ""; + var _loc5_:String = ""; + if(_loc1_.viplevel == 0) + { + _loc5_ = "无"; + _loc4_ = "0级"; + _loc6_ = 100; + _loc3_ = 100 - _loc1_.vippoint; + this.getVipGift.setUnEnable(); + } + else if(_loc1_.viplevel == 1) + { + _loc5_ = "步兵"; + _loc4_ = "VIP1"; + _loc6_ = 150; + _loc3_ = 150 - _loc1_.vippoint; + this.getVipGift.setUnEnable(); + } + else if(_loc1_.viplevel == 2) + { + _loc5_ = "骑士"; + _loc4_ = "VIP2"; + _loc6_ = 300; + _loc3_ = 300 - _loc1_.vippoint; + this.getVipGift.setUnEnable(); + } + else if(_loc1_.viplevel == 3) + { + _loc5_ = "禁卫"; + _loc4_ = "VIP3"; + _loc6_ = 500; + _loc3_ = 500 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 4) + { + _loc5_ = "将军"; + _loc4_ = "VIP4"; + _loc6_ = 1000; + _loc3_ = 1000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 5) + { + _loc5_ = "元帅"; + _loc4_ = "VIP5"; + _loc6_ = 2000; + _loc3_ = 2000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 6) + { + _loc5_ = "诸侯"; + _loc4_ = "VIP6"; + _loc6_ = 5000; + _loc3_ = 5000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 7) + { + _loc5_ = "帝王"; + _loc4_ = "VIP7"; + _loc6_ = 10000; + _loc3_ = 10000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 8) + { + _loc5_ = "至尊"; + _loc4_ = "VIP8"; + _loc6_ = 20000; + _loc3_ = 20000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 9) + { + _loc5_ = "无极"; + _loc4_ = "VIP9"; + _loc6_ = 50000; + _loc3_ = 50000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 10) + { + _loc5_ = "齐天"; + _loc4_ = "VIP10"; + _loc6_ = 100000; + _loc3_ = 100000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 11) + { + _loc5_ = "玉帝"; + _loc4_ = "VIP11"; + _loc6_ = 210000; + _loc3_ = 210000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 12) + { + _loc5_ = "天帝"; + _loc4_ = "VIP12"; + _loc6_ = 400000; + _loc3_ = 400000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 13) + { + _loc5_ = "女窝"; + _loc4_ = "VIP13"; + _loc6_ = 600000; + _loc3_ = 600000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 14) + { + _loc5_ = "天尊"; + _loc4_ = "VIP14"; + _loc6_ = 800000; + _loc3_ = 800000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 15) + { + _loc5_ = "盘古"; + _loc4_ = "VIP15"; + _loc6_ = 1200000; + _loc3_ = 1200000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 16) + { + _loc5_ = "鸿钧老祖"; + _loc4_ = "VIP16"; + _loc6_ = 2000000; + _loc3_ = 2000000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 17) + { + _loc5_ = "亚当"; + _loc4_ = "VIP17"; + _loc6_ = 4000000; + _loc3_ = 4000000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 18) + { + _loc5_ = "夏娃"; + _loc4_ = "VIP18"; + _loc6_ = 6000000; + _loc3_ = 6000000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else if(_loc1_.viplevel == 19) + { + _loc5_ = "耶稣"; + _loc4_ = "VIP19"; + _loc6_ = 8000000; + _loc3_ = 8000000 - _loc1_.vippoint; + this.getVipGift.setEnable(); + } + else + { + _loc5_ = "决战之神"; + _loc4_ = "VIP20"; + _loc6_ = 8000000; + _loc3_ = 0; + this.getVipGift.setEnable(); + } + this.levelText.text = _loc4_; + this.titleText.text = _loc5_; + this.expBar.setMaxValue(_loc6_); + this.expBar.setCurValue(_loc1_.vippoint); + if(_loc3_ <= 0) + { + this.needText.text = "已到最大级"; + } + else + { + this.needText.htmlText = "当前vip经验:" + _loc1_.vippoint + ",还需要 " + _loc3_ + " 点VIP经验可升级"; + } + if(_loc1_.viplevel <= 2) + { + this.getVipGift.setText("领取奖励"); + this.getVipGift.setUnEnable(); + return; + } + if(MemeberShip.getVipGift()) + { + this.getVipGift.setText("已 领 取"); + this.getVipGift.setUnEnable(); + } + else + { + this.getVipGift.setText("领取奖励"); + this.getVipGift.setEnable(); + } + } + + private function getVipGiftF(param1:MouseEvent) : void + { + if(MemeberShip.getVipGift()) + { + MessageBoxUI.getInstance().addMessage("今天已经领取过奖励"); + return; + } + ConnectService.getInstance().userService.getVipGift(); + } + + private function getGiftResult(param1:UserEvent) : void + { + this.getVipGift.setText("已领取"); + this.getVipGift.setUnEnable(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/vip/VipExplainUI.as b/flash_decompiled/com/view/ui/vip/VipExplainUI.as new file mode 100644 index 0000000..59d8e57 --- /dev/null +++ b/flash_decompiled/com/view/ui/vip/VipExplainUI.as @@ -0,0 +1,126 @@ +package com.view.ui.vip +{ + import com.view.newui.UITable; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + + public class VipExplainUI extends Sprite + { + + private var tableMc:UITable; + + private var heroScrollPane:ScrollPane; + + private var vipListMc:Sprite; + + public function VipExplainUI() + { + var _loc2_:Array = null; + var _loc17_:VipItemMc = null; + super(); + var _loc1_:Array = ["功能","VIP4","VIP5","VIP6","VIP7","VIP8","VIP9","VIP10","VIP11","VIP12","VIP13","VIP14","VIP15","VIP16"]; + _loc2_ = [120,50,50,50,50,50,50,50,50,50,50,50,50,55]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(14,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.lineHeight = 25; + this.heroScrollPane = new ScrollPane(); + this.heroScrollPane.setSize(782,350); + this.heroScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.heroScrollPane); + this.heroScrollPane.x = 4; + this.heroScrollPane.y = 25; + this.vipListMc = new Sprite(); + this.heroScrollPane.source = this.vipListMc; + var _loc3_:int = 0; + var _loc4_:VipItemMc = new VipItemMc("君主称号","将军","元帅","诸侯","帝王","至尊","无极","齐天","玉帝","天帝","女窝","天尊","盘古","鸿钧"); + this.vipListMc.addChild(_loc4_); + _loc4_.y = _loc3_ * 24; + _loc3_++; + var _loc5_:VipItemMc = new VipItemMc("VIP经验值","500","1000","2000","5000","10000","20000","50000","100000","210000","400000","600000","800000","1200000"); + this.vipListMc.addChild(_loc5_); + _loc5_.y = _loc3_ * 24; + _loc3_++; + var _loc6_:VipItemMc = new VipItemMc("部队攻防","20%","25%","30%","35%","40%","45%","50%","55%","60%","65%","70%","75%","80%"); + this.vipListMc.addChild(_loc6_); + _loc6_.y = _loc3_ * 24; + _loc3_++; + var _loc7_:VipItemMc = new VipItemMc("联盟祈福次数","2","2","2","3","3","3","3","3","3","3","3","3","3"); + this.vipListMc.addChild(_loc7_); + _loc7_.y = _loc3_ * 24; + _loc3_++; + var _loc8_:VipItemMc = new VipItemMc("资源产量增加","200%","250%","300%","350%","400%","450%","500%","550%","600%","600%","600%","600%","600%"); + this.vipListMc.addChild(_loc8_); + _loc8_.y = _loc3_ * 24; + _loc3_++; + var _loc9_:VipItemMc = new VipItemMc("铜币产量增加","200%","250%","300%","350%","400%","450%","500%","550%","600%","600%","600%","600%","600%"); + this.vipListMc.addChild(_loc9_); + _loc9_.y = _loc3_ * 24; + _loc3_++; + var _loc10_:VipItemMc = new VipItemMc("新兵产量增加","200%","200%","200%","250%","300%","350%","400%","450%","500%","500%","500%","500%","500%"); + this.vipListMc.addChild(_loc10_); + _loc10_.y = _loc3_ * 24; + _loc3_++; + var _loc11_:VipItemMc = new VipItemMc("重楼经验加成","200%","250%","300%","350%","400%","450%","500%","550%","600%","650%","700%","750%","800%"); + this.vipListMc.addChild(_loc11_); + _loc11_.y = _loc3_ * 24; + _loc3_++; + var _loc12_:VipItemMc = new VipItemMc("免费加速君主任务","√","√","√","√","√","√","√","√","√","√","√","√","√"); + this.vipListMc.addChild(_loc12_); + _loc12_.y = _loc3_ * 24; + _loc3_++; + var _loc13_:VipItemMc = new VipItemMc("重楼过楼时间","10秒","5秒","5秒","5秒","5秒","5秒","5秒","5秒","5秒","5秒","5秒","5秒","5秒"); + this.vipListMc.addChild(_loc13_); + _loc13_.y = _loc3_ * 24; + _loc3_++; + var _loc14_:VipItemMc = new VipItemMc("百战军工加成","100%","100%","200%","250%","300%","350%","400%","450%","500%","500%","500%","500%","500%"); + this.vipListMc.addChild(_loc14_); + _loc14_.y = _loc3_ * 24; + _loc3_++; + var _loc15_:VipItemMc = new VipItemMc("重楼次数","5","6","7","8","9","10","11","12","13","14","15","16","17"); + this.vipListMc.addChild(_loc15_); + _loc15_.y = _loc3_ * 24; + _loc3_++; + var _loc16_:VipItemMc = new VipItemMc("藏宝次数","5","6","7","8","9","10","11","12","13","14","15","16","17"); + this.vipListMc.addChild(_loc16_); + _loc16_.y = _loc3_ * 24; + _loc3_++; + _loc17_ = new VipItemMc("名将次数","3","3","3","3","3","4","5","6","7","8","9","10","11"); + this.vipListMc.addChild(_loc17_); + _loc17_.y = _loc3_ * 24; + _loc3_++; + var _loc18_:VipItemMc = new VipItemMc("重楼扫荡","√","√","√","√","√","√","√","√","√","√","√","√","√"); + this.vipListMc.addChild(_loc18_); + _loc18_.y = _loc3_ * 24; + _loc3_++; + var _loc19_:VipItemMc = new VipItemMc("藏宝扫荡","×","√","√","√","√","√","√","√","√","√","√","√","√"); + this.vipListMc.addChild(_loc19_); + _loc19_.y = _loc3_ * 24; + _loc3_++; + _loc17_ = new VipItemMc("重楼一键扫荡","×","×","√","√","√","√","√","√","√","√","√","√","√"); + this.vipListMc.addChild(_loc17_); + _loc17_.y = _loc3_ * 24; + _loc3_++; + var _loc20_:VipItemMc = new VipItemMc("藏宝一键扫荡","×","×","√","√","√","√","√","√","√","√","√","√","√"); + this.vipListMc.addChild(_loc20_); + _loc20_.y = _loc3_ * 24; + _loc3_++; + var _loc21_:VipItemMc = new VipItemMc("战役体力最大值","300","300","300","300","300","350","400","450","500","500","500","500","500"); + this.vipListMc.addChild(_loc21_); + _loc21_.y = _loc3_ * 24; + _loc3_++; + var _loc22_:VipItemMc = new VipItemMc("过关斩将功勋加成","×","×","×","×","×","50%","100%","200%","300%","400%","500%","600%","700%"); + this.vipListMc.addChild(_loc22_); + _loc22_.y = _loc3_ * 24; + _loc3_++; + var _loc23_:VipItemMc = new VipItemMc("每日押镖劫镖次数","3","3","3","3","3","4","5","6","7","7","7","7","7"); + this.vipListMc.addChild(_loc23_); + _loc23_.y = _loc3_ * 24; + _loc3_++; + this.heroScrollPane.update(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/vip/VipItemMc.as b/flash_decompiled/com/view/ui/vip/VipItemMc.as new file mode 100644 index 0000000..5f0f696 --- /dev/null +++ b/flash_decompiled/com/view/ui/vip/VipItemMc.as @@ -0,0 +1,153 @@ +package com.view.ui.vip +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class VipItemMc extends Sprite + { + + private var text1:TextField; + + private var text2:TextField; + + private var text3:TextField; + + private var text4:TextField; + + private var text5:TextField; + + private var text6:TextField; + + private var text7:TextField; + + private var text8:TextField; + + private var text9:TextField; + + private var text10:TextField; + + private var text11:TextField; + + private var text12:TextField; + + private var text13:TextField; + + private var text14:TextField; + + private var centerCss:TextFormat; + + private var bg:Sprite; + + public function VipItemMc(param1:String, param2:String, param3:String, param4:String, param5:String, param6:String, param7:String, param8:String, param9:String, param10:String, param11:String, param12:String, param13:String, param14:String) + { + super(); + var _loc15_:Sprite = PublicMethod.getTrLine(769); + addChild(_loc15_); + this.centerCss = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,769,23); + addChild(this.bg); + this.bg.alpha = 0; + this.bg.y = 1; + addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true); + this.text1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,116); + addChild(this.text1); + this.text1.y = 4; + this.text1.defaultTextFormat = this.centerCss; + this.text1.text = param1; + this.text2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text2); + this.text2.defaultTextFormat = this.centerCss; + this.text2.x = this.text1.x + this.text1.width; + this.text2.y = this.text1.y; + this.text2.text = param2; + this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text3); + this.text3.defaultTextFormat = this.centerCss; + this.text3.x = this.text2.x + this.text2.width; + this.text3.y = this.text1.y; + this.text3.text = param3; + this.text4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text4); + this.text4.defaultTextFormat = this.centerCss; + this.text4.x = this.text3.x + this.text3.width; + this.text4.y = this.text1.y; + this.text4.text = param4; + this.text5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text5); + this.text5.defaultTextFormat = this.centerCss; + this.text5.x = this.text4.x + this.text4.width; + this.text5.y = this.text1.y; + this.text5.text = param5; + this.text6 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text6); + this.text6.defaultTextFormat = this.centerCss; + this.text6.x = int(this.text5.x + this.text5.width); + this.text6.y = int(this.text1.y); + this.text6.text = param6; + this.text7 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text7); + this.text7.defaultTextFormat = this.centerCss; + this.text7.x = int(this.text6.x + this.text6.width); + this.text7.y = int(this.text1.y); + this.text7.text = param7; + this.text8 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text8); + this.text8.defaultTextFormat = this.centerCss; + this.text8.x = int(this.text7.x + this.text7.width); + this.text8.y = int(this.text1.y); + this.text8.text = param8; + this.text9 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text9); + this.text9.defaultTextFormat = this.centerCss; + this.text9.x = int(this.text8.x + this.text8.width); + this.text9.y = int(this.text1.y); + this.text9.text = param9; + this.text10 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text10); + this.text10.defaultTextFormat = this.centerCss; + this.text10.x = int(this.text9.x + this.text9.width); + this.text10.y = int(this.text1.y); + this.text10.text = param10; + this.text11 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text11); + this.text11.defaultTextFormat = this.centerCss; + this.text11.x = int(this.text10.x + this.text10.width); + this.text11.y = int(this.text1.y); + this.text11.text = param11; + this.text12 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text12); + this.text12.defaultTextFormat = this.centerCss; + this.text12.x = int(this.text11.x + this.text11.width); + this.text12.y = int(this.text1.y); + this.text12.text = param12; + this.text13 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text13); + this.text13.defaultTextFormat = this.centerCss; + this.text13.x = int(this.text12.x + this.text12.width); + this.text13.y = int(this.text1.y); + this.text13.text = param13; + this.text14 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,50); + addChild(this.text14); + this.text14.defaultTextFormat = this.centerCss; + this.text14.x = int(this.text13.x + this.text13.width); + this.text14.y = int(this.text1.y); + this.text14.text = param14; + } + + private function rollOut(param1:MouseEvent) : void + { + this.bg.alpha = 0; + } + + private function rollOver(param1:MouseEvent) : void + { + this.bg.alpha = 0.3; + } + } +} + diff --git a/flash_decompiled/com/view/ui/vip/VipUI.as b/flash_decompiled/com/view/ui/vip/VipUI.as new file mode 100644 index 0000000..3d83aec --- /dev/null +++ b/flash_decompiled/com/view/ui/vip/VipUI.as @@ -0,0 +1,144 @@ +package com.view.ui.vip +{ + 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 VipUI extends BaseUI + { + + public var btnArr:Array = new Array(); + + private var paneBg:UIWindowBg; + + private var curPage:Sprite; + + private var vipExplainUI:VipExplainUI; + + private var myVipUI:MyVipUI; + + public function VipUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_rongyuchenghao); + this.setPosition(); + this.createUI(); + } + + override public function setWindowSize() : void + { + window_width = UIWindowBg.normal_window_w + 150; + window_heihgt = UIWindowBg.normal_window_h; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 640 + 150; + ui_closeBtn.y = 10; + } + + override public function setPosition() : void + { + this.x = int(face.realWidth / 2 - 663 / 2 - 50); + this.y = int(face.realHeight / 2 - 459 / 2); + } + + override public function createUI() : void + { + var _loc3_:int = 0; + var _loc4_:UITabBtn = null; + 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(780,375); + 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; + this.openPage(_loc2_); + } + + private function openPage(param1:UITabBtn) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + for(_loc3_ in this.btnArr) + { + if(param1 == this.btnArr[_loc3_]) + { + this.btnArr[_loc3_].select = true; + _loc2_ = _loc3_; + } + else + { + this.btnArr[_loc3_].select = false; + } + } + if(Boolean(this.curPage) && this.paneBg.contains(this.curPage)) + { + this.paneBg.removeChild(this.curPage); + } + switch(_loc2_) + { + case 0: + this.curPage = this.getPage2(); + break; + case 1: + this.curPage = this.getPage1(); + } + this.paneBg.addChild(this.curPage); + } + + private function getPage1() : Sprite + { + if(this.vipExplainUI == null) + { + this.vipExplainUI = new VipExplainUI(); + this.vipExplainUI.x = 4; + this.vipExplainUI.y = 4; + } + return this.vipExplainUI; + } + + private function getPage2() : Sprite + { + if(this.myVipUI == null) + { + this.myVipUI = new MyVipUI(); + this.myVipUI.x = 4; + this.myVipUI.y = 4; + } + this.myVipUI.getDate(); + return this.myVipUI; + } + + override public function addToStage(param1:Event) : void + { + if(this.myVipUI) + { + this.myVipUI.getDate(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/wall/BuildWallMc.as b/flash_decompiled/com/view/ui/wall/BuildWallMc.as new file mode 100644 index 0000000..db4f91e --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/BuildWallMc.as @@ -0,0 +1,92 @@ +package com.view.ui.wall +{ + import com.common.PublicMethod; + import com.data.data.items.AddSpeed; + import com.utils.TimerManager; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.addspeed.AddSpeedUI; + import com.view.ui.buildlist.TimerInfo; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class BuildWallMc extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var time:TextField; + + private var wallObject:Object; + + private var numText:TextField; + + public function BuildWallMc() + { + var _loc1_:UISmallBtn = null; + var _loc2_:UISmallBtn = null; + super(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.label1.text = "陷阱数量:"; + this.label2.text = "剩余时间:"; + addChild(this.label1); + addChild(this.label2); + this.label1.x = 5; + this.label1.y = 4; + this.label2.x = 5; + this.label2.y = 28; + this.numText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.numText); + this.numText.x = 84; + this.numText.y = 4; + this.numText.text = "1234"; + this.time = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.time); + this.time.x = 84; + this.time.y = 28; + this.time.text = "00:00:12"; + _loc1_ = new UISmallBtn("加 速",2); + addChild(_loc1_); + _loc2_ = new UISmallBtn("取 消",2); + addChild(_loc2_); + _loc1_.x = 25; + _loc1_.y = 55; + _loc2_.x = 85; + _loc2_.y = 55; + _loc1_.onClick = this.addSpeedEvent; + _loc2_.onClick = this.cancelEvent; + } + + public function setData(param1:Object) : void + { + this.wallObject = param1; + this.numText.text = this.wallObject.buiNum; + this.time.text = "00:00:00"; + } + + public function setTime(param1:TimerInfo) : void + { + this.time.text = param1.timerStr; + } + + private function addSpeedEvent(param1:MouseEvent) : void + { + var _loc2_:AddSpeed = new AddSpeed(); + _loc2_.id = this.wallObject.id; + _loc2_.fastQueType = 3; + var _loc3_:AddSpeedUI = AddSpeedUI.getInstance(); + _loc3_.getFastInfo(_loc2_); + _loc3_.addToStage(); + } + + private function cancelEvent(param1:MouseEvent) : void + { + TimerManager.getInstance().cancelWall(this.wallObject.id); + } + } +} + diff --git a/flash_decompiled/com/view/ui/wall/CityWall.as b/flash_decompiled/com/view/ui/wall/CityWall.as new file mode 100644 index 0000000..2611113 --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/CityWall.as @@ -0,0 +1,116 @@ +package com.view.ui.wall +{ + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.events.DevEvent; + import com.utils.Utils; + import com.view.tip.BuildTipTitle; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + import flash.events.MouseEvent; + + public class CityWall extends BaseBuild + { + + public function CityWall(param1:BuildData) + { + super(); + super.buildData = param1; + markMc = face.getMovieClip(ClassConfig.ui_wall_bg); + addChild(markMc); + markMc.alpha = 0; + Utils.g_events.addEventListener(DevEvent.OPENWALL,this.openWallDefUI); + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + private function openWallDefUI(param1:DevEvent) : void + { + if(buildUI == null) + { + buildUI = new CityWallUI(this); + } + buildUI.loadUiData(); + buildUI.show(); + CityWallUI(buildUI).setOpenPage(1); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/WallView3.swf"; + buildData.picUrl = "pic/build/WallView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/WallView2.swf"; + buildData.picUrl = "pic/build/WallView2.png"; + } + else + { + buildData.swfUrl = "pic/build/WallView1.swf"; + buildData.picUrl = "pic/build/WallView1.png"; + } + super.checkBuildRes(); + } + + override public function addEvent() : void + { + markMc.addEventListener(MouseEvent.ROLL_OVER,mouseOverBuild); + markMc.addEventListener(MouseEvent.ROLL_OUT,mouseOutBuild); + markMc.addEventListener(MouseEvent.CLICK,mouseClick); + } + + override public function setSwfBgUnClick() : void + { + bgSwf.mouseEnabled = false; + } + + override public function setTipInfo(param1:Object) : void + { + if(tipTitle == null) + { + tipTitle = new BuildTipTitle(markMc,face.stage,face.tip_bg,param1); + } + else + { + tipTitle.infoObject = param1; + } + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new CityWallUI(this); + } + buildUI.loadUiData(); + CityWallUI(buildUI).setOpenPage(0); + buildUI.show(); + } + + override public function setTimeMcPosi() : void + { + getBuildTimeMc().x = 340; + getBuildTimeMc().y = 640; + } + + override public function setNameMcPosi() : void + { + getBuildNameMc().x = 370; + getBuildNameMc().y = 620; + } + + override public function setUpingMcPosi() : void + { + getBuildUpMc().x = 345; + getBuildUpMc().y = 432; + } + } +} + diff --git a/flash_decompiled/com/view/ui/wall/CityWallUI.as b/flash_decompiled/com/view/ui/wall/CityWallUI.as new file mode 100644 index 0000000..211c6fe --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/CityWallUI.as @@ -0,0 +1,220 @@ +package com.view.ui.wall +{ + import com.control.ConnectService; + import com.control.castle.event.CastleWallEvent; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class CityWallUI extends BaseUI + { + + private var hasYs:Boolean; + + private var btnArr:Array = new Array(); + + private var bg3:UIWindowBg; + + public var page1:WallPage1; + + private var page2:WallPage2; + + private var page3:WallPage3; + + private var curPage:int = 0; + + public function CityWallUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_chengqiang); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_VIEW,this.getWallData); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + ConnectService.getInstance().removeEventListener(CastleWallEvent.WALL_VIEW,this.getWallData); + } + + private function getWallData(param1:CastleWallEvent) : void + { + if(param1.wallObject.hasYs == 1) + { + this.hasYs = true; + } + else + { + this.hasYs = false; + } + } + + public function createCurUI() : void + { + var _loc4_:int = 0; + var _loc5_:UITabBtn = null; + 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) + { + bigBg.addChild(_loc5_); + _loc5_.x = 25 + _loc4_ * 66; + _loc5_.y = 100; + _loc5_.onClick = this.changTab; + _loc4_++; + } + this.bg3 = new UIWindowBg(); + this.bg3.initThirdPanel(622,271); + bigBg.addChild(this.bg3); + this.bg3.x = 4; + this.bg3.y = 125; + } + + public function setOpenPage(param1:int) : void + { + this.btnArr[param1].dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + } + + private function changTab(param1:MouseEvent) : void + { + var _loc3_:int = 0; + var _loc4_:* = undefined; + var _loc5_:UITabBtn = null; + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(_loc2_ == this.btnArr[2]) + { + if(!this.hasYs) + { + MessageBoxUI.getInstance().addMessage("您还没有哨塔"); + return; + } + } + for(_loc4_ in this.btnArr) + { + _loc5_ = this.btnArr[_loc4_] as UITabBtn; + if(_loc2_ == _loc5_) + { + _loc5_.select = true; + _loc3_ = _loc4_; + } + else + { + _loc5_.select = false; + } + } + this.openPage(_loc3_ + 1); + } + + private function removePage(param1:int) : void + { + if(param1 > 0) + { + switch(param1) + { + case 1: + this.bg3.removeChild(this.page1); + break; + case 2: + this.bg3.removeChild(this.page2); + break; + case 3: + this.bg3.removeChild(this.page3); + } + } + } + + private function openPage(param1:int) : void + { + if(this.curPage == param1) + { + return; + } + switch(param1) + { + case 1: + this.removePage(this.curPage); + if(this.page1 == null) + { + this.createPage1(); + } + this.bg3.addChild(this.page1); + this.curPage = param1; + break; + case 2: + this.removePage(this.curPage); + if(this.page2 == null) + { + this.createPage2(); + } + this.bg3.addChild(this.page2); + this.curPage = param1; + break; + case 3: + this.removePage(this.curPage); + if(this.page3 == null) + { + this.createPage3(); + } + this.bg3.addChild(this.page3); + this.curPage = param1; + } + } + + private function createPage1() : void + { + this.page1 = new WallPage1(); + this.page1.x = 4; + this.page1.y = 4; + } + + private function createPage2() : void + { + this.page2 = new WallPage2(); + this.page2.x = 4; + this.page2.y = 4; + } + + private function createPage3() : void + { + this.page3 = new WallPage3(); + this.page3.x = 4; + this.page3.y = 4; + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/wall/Page2Line.as b/flash_decompiled/com/view/ui/wall/Page2Line.as new file mode 100644 index 0000000..2d50a38 --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/Page2Line.as @@ -0,0 +1,164 @@ +package com.view.ui.wall +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class Page2Line extends Sprite + { + + private var heroObj:Object; + + private var centerCss:TextFormat; + + private var numsText:TextField; + + private var heroName:TextField; + + private var heroLevel:TextField; + + private var careerName:TextField; + + private var hpStatus:TextField; + + private var armyName:TextField; + + private var armyNums:TextField; + + private var heroStatus:TextField; + + public var removeBtn:UISmallBtn; + + private var bg:Sprite; + + public function Page2Line() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,617,23); + addChild(this.bg); + this.bg.y = 1; + this.bg.alpha = 0; + this.centerCss = PublicMethod.getCenterTextFormat(); + this.numsText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,46); + addChild(this.numsText); + this.numsText.y = 3; + this.numsText.text = ""; + this.numsText.visible = false; + this.heroName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.heroName); + this.heroName.y = this.numsText.y; + this.heroName.x = this.numsText.x + this.numsText.width; + this.heroLevel = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,51); + addChild(this.heroLevel); + this.heroLevel.y = this.numsText.y; + this.heroLevel.x = this.heroName.x + this.heroName.width; + this.careerName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,71); + addChild(this.careerName); + this.careerName.y = this.numsText.y; + this.careerName.x = this.heroLevel.x + this.heroLevel.width; + this.hpStatus = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,65); + addChild(this.hpStatus); + this.hpStatus.y = this.numsText.y; + this.hpStatus.x = this.careerName.x + this.careerName.width; + this.armyName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.armyName); + this.armyName.y = this.numsText.y; + this.armyName.x = this.hpStatus.x + this.hpStatus.width; + this.armyNums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.armyNums); + this.armyNums.y = this.numsText.y; + this.armyNums.x = this.armyName.x + this.armyName.width; + this.heroStatus = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.heroStatus); + this.heroStatus.y = this.numsText.y; + this.heroStatus.x = this.armyNums.x + this.armyNums.width; + this.removeBtn = new UISmallBtn("移 除",2); + this.removeBtn.visible = false; + addChild(this.removeBtn); + this.removeBtn.x = 20 + this.heroStatus.x + this.heroStatus.width; + this.removeBtn.y = 2; + addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true); + } + + public function setNums(param1:int) : void + { + this.numsText.text = param1.toString(); + this.numsText.setTextFormat(this.centerCss); + } + + 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 setHero(param1:Object) : void + { + if(this.heroObj == null && param1 == null) + { + return; + } + this.heroObj = param1; + if(this.heroObj == null) + { + this.numsText.visible = false; + this.removeBtn.visible = false; + this.heroName.text = ""; + this.heroLevel.text = ""; + this.careerName.text = ""; + this.hpStatus.text = ""; + this.armyName.text = ""; + this.armyNums.text = ""; + this.heroStatus.text = ""; + this.bg.alpha = 0; + } + else + { + this.numsText.visible = true; + this.removeBtn.visible = true; + this.heroName.htmlText = this.heroObj.name; + this.heroName.setTextFormat(this.centerCss); + this.heroLevel.text = this.heroObj.level.toString(); + this.heroLevel.setTextFormat(this.centerCss); + this.careerName.text = this.heroObj.career; + this.careerName.setTextFormat(this.centerCss); + this.hpStatus.htmlText = "" + this.heroObj.hpStatus + " 健康"; + this.hpStatus.setTextFormat(this.centerCss); + if(this.heroObj.armyName == "") + { + this.armyName.text = "无"; + } + else + { + this.armyName.text = this.heroObj.armyName; + } + this.armyName.setTextFormat(this.centerCss); + this.armyNums.text = this.heroObj.armyNum; + this.armyNums.setTextFormat(this.centerCss); + this.heroStatus.text = this.heroObj.actionStatusChn; + this.heroStatus.setTextFormat(this.centerCss); + } + } + + public function getHero() : Object + { + return this.heroObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/wall/Page3Line1.as b/flash_decompiled/com/view/ui/wall/Page3Line1.as new file mode 100644 index 0000000..9fec8a5 --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/Page3Line1.as @@ -0,0 +1,248 @@ +package com.view.ui.wall +{ + import com.InstallFace; + import com.common.PublicMethod; + 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 Page3Line1 extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + private var css:TextFormat; + + private var heroName:TextField; + + private var armyType:ComboBox; + + private var input:PageInputMc2; + + private var okBtn:UISmallBtn; + + private var nums:TextField; + + public var onClick:Function; + + public var num:int; + + private var selectArmyIndex:int; + + private var armyList:Array; + + private var heroObj:Object; + + public function Page3Line1(param1:int) + { + super(); + this.num = param1 + 1; + this.css = new TextFormat(); + this.css.align = "center"; + this.css.size = 12; + this.css.color = 16777215; + this.heroName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + addChild(this.heroName); + this.heroName.y = 2; + this.heroName.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.armyType = new ComboBox(); + this.armyType.setSize(86,22); + this.armyType.addEventListener(Event.CHANGE,this.selectArmy); + this.armyType.x = this.heroName.width + 10; + this.armyType.y = 1; + this.input = new PageInputMc2(); + this.input.setMinNum(0); + this.input.setMaxLen(6); + addChild(this.input); + this.input.x = this.armyType.x + this.armyType.width + 22; + this.input.y = 5; + this.nums = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.nums); + this.nums.y = 2; + this.nums.x = this.input.x + this.input.width - 8; + this.okBtn = new UISmallBtn("确 定",2); + this.okBtn.x = this.nums.x + this.nums.width + 13; + this.okBtn.y = 2; + addChild(this.okBtn); + this.okBtn.onClick = this.saveArmy; + this.armyType.textField.setStyle("textFormat",this.css); + this.armyType.dropdown.setRendererStyle("textFormat",this.css); + this.heroName.text = ""; + this.input.visible = false; + this.nums.text = ""; + this.okBtn.visible = false; + } + + 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_:* = undefined; + if(param1 == 0) + { + this.input.setMaxNum(0); + } + else + { + _loc2_ = this.getObjByEntId(param1); + if(_loc2_) + { + this.input.setMaxNum(int(this.nums.text)); + if(_loc2_.armyNum < int(this.nums.text)) + { + this.input.setMaxNum(_loc2_.armyNum); + } + } + else + { + this.input.setMaxNum(0); + } + } + this.input.setText(0); + this.css.color = 16777215; + this.armyType.textField.setStyle("textFormat",this.css); + } + + private function getObjByEntId(param1:int) : Object + { + var _loc2_:Object = null; + for each(_loc2_ in this.armyList) + { + if(_loc2_.armyEntId == param1) + { + return _loc2_; + } + } + return null; + } + + public function setData(param1:Object) : void + { + this.heroObj = param1; + if(this.heroObj) + { + this.heroName.text = "哨塔" + this.heroObj.index; + this.input.setText(param1.armyNum); + this.nums.text = param1.lead; + this.input.setMaxNum(param1.lead); + this.okBtn.visible = true; + this.input.visible = true; + } + else + { + this.heroName.text = ""; + this.input.visible = false; + this.nums.text = ""; + this.okBtn.visible = false; + } + } + + public function getHeroObj() : Object + { + return this.heroObj; + } + + 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()); + if(this.onClick != null) + { + this.onClick(this); + } + } + + public function getObj() : Object + { + var _loc1_:Object = new Object(); + _loc1_.armyEntId = this.getComboxSelect().toString(); + _loc1_.armyNum = this.input.getText().toString(); + return _loc1_; + } + + 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/wall/Page3Line2.as b/flash_decompiled/com/view/ui/wall/Page3Line2.as new file mode 100644 index 0000000..a6305b7 --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/Page3Line2.as @@ -0,0 +1,74 @@ +package com.view.ui.wall +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class Page3Line2 extends Sprite + { + + private var armyName:TextField; + + private var armyNums:TextField; + + private var bg:Sprite; + + private var armyObj:Object; + + public function Page3Line2() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,168,23); + addChild(this.bg); + this.bg.y = 1; + this.bg.alpha = 0; + this.armyName = PublicMethod.getTextFieldWithFillter(16777215,85); + this.armyNums = PublicMethod.getTextFieldWithFillter(16777215,85); + addChild(this.armyName); + addChild(this.armyNums); + this.armyNums.x = this.armyName.width; + this.armyName.y = 4; + this.armyNums.y = this.armyName.y; + this.armyName.defaultTextFormat = PublicMethod.getCenterTextFormat(); + this.armyNums.defaultTextFormat = PublicMethod.getCenterTextFormat(); + var _loc1_:Sprite = PublicMethod.getTrLine(168); + addChild(_loc1_); + addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true); + } + + public function setData(param1:Object) : void + { + this.armyObj = param1; + if(param1) + { + this.armyName.text = param1.armyName; + this.armyNums.text = param1.armyNum; + } + else + { + this.armyName.text = ""; + this.armyNums.text = ""; + } + } + + private function rollOut(param1:MouseEvent) : void + { + if(this.armyObj) + { + this.bg.alpha = 0; + } + } + + private function rollOver(param1:MouseEvent) : void + { + if(this.armyObj) + { + this.bg.alpha = 0.2; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/wall/WallDestroyUI.as b/flash_decompiled/com/view/ui/wall/WallDestroyUI.as new file mode 100644 index 0000000..cb3ec07 --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/WallDestroyUI.as @@ -0,0 +1,110 @@ +package com.view.ui.wall +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.common.Scale9Grid; + import com.control.ConnectService; + import com.data.data.army.TowerArmy; + import com.view.mc.button.Button_2; + import com.view.mc.sprite.PageInputMc2; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class WallDestroyUI extends Sprite + { + + private var face:InstallFace; + + private var bg:Sprite; + + private var inputMc:PageInputMc2; + + private var label1:TextField; + + private var label2:TextField; + + private var currentEntId:int; + + public function WallDestroyUI() + { + var _loc5_:Button_2 = null; + this.face = InstallFace.getInstance(); + super(); + this.bg = new Scale9Grid(this.face.getSprite(ClassConfig.lib_ui_bg_10),160,82); + addChild(this.bg); + var _loc1_:SimpleButton = this.face.getButton(ClassConfig.button_close); + addChild(_loc1_); + _loc1_.x = width - 4 - _loc1_.width; + _loc1_.y = 4; + this.label1 = PublicMethod.getTextField(16777215,80); + this.label2 = PublicMethod.getTextField(16777215,80); + var _loc2_:TextField = PublicMethod.getTextField(16777215,80); + var _loc3_:TextField = PublicMethod.getTextField(16776960,180); + this.label1.text = "陷阱总数:"; + this.label2.text = "222"; + _loc2_.text = "拆除数量:"; + _loc3_.text = "拆除城防不返还任何资源"; + addChild(this.label1); + addChild(this.label2); + addChild(_loc2_); + addChild(_loc3_); + this.label1.x = 50; + this.label1.y = 50; + this.label2.x = this.label1.x + this.label1.width; + this.label2.y = this.label1.y; + _loc2_.x = this.label1.x; + _loc2_.y = 75; + _loc3_.x = this.label1.x; + _loc3_.y = 100; + this.inputMc = new PageInputMc2(); + addChild(this.inputMc); + this.inputMc.x = _loc2_.x + _loc2_.width; + this.inputMc.y = _loc2_.y + 2; + this.inputMc.setMinNum(1); + this.inputMc.setMaxLen(5); + var _loc4_:Button_2 = new Button_2("拆 除"); + addChild(_loc4_); + _loc5_ = new Button_2("取 消"); + addChild(_loc5_); + _loc4_.x = 70; + _loc4_.y = 132; + _loc5_.x = 150; + _loc5_.y = 132; + _loc1_.addEventListener(MouseEvent.CLICK,this.closeUI,false,0,true); + _loc4_.addEventListener(MouseEvent.CLICK,this.destroyEvent,false,0,true); + _loc5_.addEventListener(MouseEvent.CLICK,this.closeUI,false,0,true); + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + private function destroyEvent(param1:MouseEvent) : void + { + var _loc2_:int = this.inputMc.getText(); + if(this.currentEntId < 0 || _loc2_ <= 0) + { + return; + } + ConnectService.getInstance().castleService.disMissTowerArmy(this.currentEntId,_loc2_); + parent.removeChild(this); + } + + public function setData(param1:TowerArmy, param2:int) : void + { + this.currentEntId = param1.entId; + this.inputMc.setMaxNum(param2); + this.label2.text = param2.toString(); + this.inputMc.setText(1); + this.label1.text = param1.armyName + "总数:"; + } + } +} + diff --git a/flash_decompiled/com/view/ui/wall/WallPage1.as b/flash_decompiled/com/view/ui/wall/WallPage1.as new file mode 100644 index 0000000..45d13eb --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/WallPage1.as @@ -0,0 +1,559 @@ +package com.view.ui.wall +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.CastleWallEvent; + import com.data.data.army.TowerArmy; + import com.data.data.city.EntityConsume; + import com.view.mc.sprite.ItemMc; + import com.view.mc.sprite.PageInputMc2; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class WallPage1 extends Sprite + { + + private var face:InstallFace; + + private var bg1:UIWindowBg; + + private var bg2:UIWindowBg; + + private var num_1:TextField; + + private var num_2:TextField; + + private var num_3:TextField; + + private var num_4:TextField; + + private var num_5:TextField; + + private var title:UITitleBg; + + private var atk1:TextField; + + private var atk2:TextField; + + private var label1:TextField; + + private var res1:TextField; + + private var label2:TextField; + + private var res2:TextField; + + private var label3:TextField; + + private var res3:TextField; + + private var time:TextField; + + private var space:TextField; + + private var buiBtn:UISmallBtn; + + private var inputMc:PageInputMc2; + + private var armyList:Array; + + private var desBtnArr:Array; + + private var armyMcArr:Array; + + private var curr_i:int = -1; + + private var currEntId:int; + + private var desUI:WallDestroyUI; + + public var buildWallMc:BuildWallMc; + + public function WallPage1() + { + var _loc7_:TextField = null; + var _loc8_:Sprite = null; + var _loc11_:TextField = null; + var _loc12_:UISmallBtn = null; + var _loc13_:ItemMc = null; + this.face = InstallFace.getInstance(); + this.armyList = new Array(); + this.desBtnArr = new Array(); + this.armyMcArr = new Array(); + this.buildWallMc = new BuildWallMc(); + super(); + this.bg1 = new UIWindowBg(); + this.bg1.initThirdPanel(152,263); + addChild(this.bg1); + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(449,263); + addChild(this.bg2); + this.bg2.x = this.bg1.x + this.bg1.width + 3; + this.bg2.y = this.bg1.y; + var _loc1_:UITitleBg = new UITitleBg("建造中",this.bg1.width); + this.bg1.addChild(_loc1_); + _loc1_.x = int(this.bg1.width / 2 - _loc1_.width / 2); + var _loc2_:UITitleBg = new UITitleBg("已造设施",this.bg1.width); + this.bg1.addChild(_loc2_); + _loc2_.x = int(this.bg1.width / 2 - _loc2_.width / 2); + _loc2_.y = 110; + var _loc3_:int = 0; + while(_loc3_ < 5) + { + _loc11_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.bg1.addChild(_loc11_); + _loc11_.x = 10; + _loc11_.y = 140 + 28 * _loc3_; + switch(_loc3_) + { + case 0: + _loc11_.text = "陷阱:"; + break; + case 1: + _loc11_.text = "滚木:"; + break; + case 2: + _loc11_.text = "拒马:"; + break; + case 3: + _loc11_.text = "礌石:"; + break; + case 4: + _loc11_.text = "弩箭:"; + } + this["num_" + (_loc3_ + 1)] = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,55); + this.bg1.addChild(this["num_" + (_loc3_ + 1)]); + this["num_" + (_loc3_ + 1)].x = 50; + this["num_" + (_loc3_ + 1)].y = _loc11_.y; + if(_loc3_ < 4) + { + _loc8_ = PublicMethod.getTrLine(152); + this.bg1.addChild(_loc8_); + _loc8_.x = 3; + _loc8_.y = _loc11_.y + 21; + } + _loc12_ = new UISmallBtn("拆 除",2); + this.bg1.addChild(_loc12_); + _loc12_.x = 105; + --_loc11_.y; + this.desBtnArr.push(_loc12_); + _loc12_.visible = false; + _loc12_.onClick = this.destroyArmy; + _loc3_++; + } + var _loc4_:int = 0; + while(_loc4_ < 5) + { + _loc13_ = new ItemMc(); + this.bg2.addChild(_loc13_); + _loc13_.x = 7 + _loc4_ * 90; + _loc13_.y = 6; + this.armyMcArr.push(_loc13_); + _loc13_.addEventListener(MouseEvent.CLICK,this.clickArmyMc,false,0,true); + _loc4_++; + } + this.title = new UITitleBg("陷阱",450); + this.bg2.addChild(this.title); + this.title.x = int(this.bg2.width / 2 - this.title.width / 2); + this.title.y = 115; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.bg2.addChild(_loc5_); + _loc5_.x = 10; + _loc5_.y = this.title.y + 35; + _loc5_.text = "防御效果:"; + this.atk1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg2.addChild(this.atk1); + this.atk1.x = _loc5_.x + 65; + this.atk1.y = _loc5_.y; + this.atk2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + this.bg2.addChild(this.atk2); + this.atk2.x = _loc5_.x + 185; + this.atk2.y = _loc5_.y; + var _loc6_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.bg2.addChild(_loc6_); + _loc6_.x = _loc5_.x; + _loc6_.y = _loc5_.y + 30; + _loc6_.text = "消耗资源:"; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40); + this.bg2.addChild(this.label1); + this.label1.x = this.atk1.x; + this.label1.y = _loc6_.y; + this.res1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + this.bg2.addChild(this.res1); + this.res1.x = this.label1.x + 40; + this.res1.y = _loc6_.y; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40); + this.bg2.addChild(this.label2); + this.label2.x = this.res1.x + this.res1.width; + this.label2.y = _loc6_.y; + this.res2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + this.bg2.addChild(this.res2); + this.res2.x = this.label2.x + 40; + this.res2.y = _loc6_.y; + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,40); + this.bg2.addChild(this.label3); + this.label3.x = this.res2.x + this.res2.width; + this.label3.y = _loc6_.y; + this.res3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,52); + this.bg2.addChild(this.res3); + this.res3.x = this.label3.x + 40; + this.res3.y = _loc6_.y; + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.bg2.addChild(_loc7_); + _loc7_.x = _loc5_.x; + _loc7_.y = _loc6_.y + 30; + _loc7_.text = "建造时间:"; + this.time = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,333); + this.bg2.addChild(this.time); + this.time.x = this.atk1.x; + this.time.y = _loc7_.y; + _loc8_ = PublicMethod.getTrLine(445); + this.bg2.addChild(_loc8_); + _loc8_.x = 5; + _loc8_.y = _loc7_.y + 25; + var _loc9_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.bg2.addChild(_loc9_); + _loc9_.x = _loc5_.x; + _loc9_.y = _loc8_.y + 10; + _loc9_.text = "城防空间:"; + this.space = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,333); + this.bg2.addChild(this.space); + this.space.x = this.atk1.x; + this.space.y = _loc9_.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.bg2.addChild(_loc10_); + _loc10_.x = 260; + _loc10_.y = _loc9_.y; + _loc10_.text = "建造数量"; + this.inputMc = new PageInputMc2(); + this.bg2.addChild(this.inputMc); + this.inputMc.x = _loc10_.x + 60; + this.inputMc.y = _loc10_.y + 2; + this.inputMc.setMinNum(1); + this.inputMc.setMaxLen(5); + this.buiBtn = new UISmallBtn("建 造",2); + this.bg2.addChild(this.buiBtn); + this.buiBtn.x = this.inputMc.x + this.inputMc.width - 5; + this.buiBtn.y = this.inputMc.y - 4; + this.buiBtn.onClick = this.produceArmy; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + } + + private function addEvent(param1:Event) : void + { + this.getData(); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_VIEW,this.getWallData); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_PRODUCTOVER,this.productArmyOverResult); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_ADDSPEED,this.addSpeedWallResult); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_CANCEL,this.cancelWallResult); + ConnectService.getInstance().addEventListener(CastleWallEvent.WALL_DISMISS,this.dismissWallResult); + } + + private function getData() : void + { + ConnectService.getInstance().castleService.showCastleView(); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(CastleWallEvent.WALL_VIEW,this.getWallData); + ConnectService.getInstance().removeEventListener(CastleWallEvent.WALL_PRODUCTOVER,this.productArmyOverResult); + ConnectService.getInstance().removeEventListener(CastleWallEvent.WALL_ADDSPEED,this.addSpeedWallResult); + ConnectService.getInstance().removeEventListener(CastleWallEvent.WALL_CANCEL,this.cancelWallResult); + ConnectService.getInstance().removeEventListener(CastleWallEvent.WALL_DISMISS,this.dismissWallResult); + this.currEntId = -1; + this.delDesUI(); + } + + private function getWallData(param1:CastleWallEvent) : void + { + var _loc6_:Object = null; + var _loc7_:TowerArmy = null; + var _loc8_:int = 0; + var _loc9_:Array = null; + var _loc2_:Object = param1.wallObject; + var _loc3_:int = int(_loc2_.hasYs); + var _loc4_:int = int(_loc2_.usedSpace); + var _loc5_:int = int(_loc2_.space); + this.inputMc.setMaxNum(_loc5_ - _loc4_); + this.space.text = _loc4_ + "/" + _loc5_; + this.armyList = _loc2_.towerArmyList as Array; + for each(_loc6_ in this.armyList) + { + _loc7_ = _loc6_.towerArmy as TowerArmy; + _loc8_ = int(_loc6_.num); + _loc9_ = _loc6_.consumes as Array; + switch(_loc7_.entId) + { + case 10600001: + this.num_2.text = _loc8_.toString(); + this.desBtnArr[1].visible = _loc8_ > 0; + this.armyMcArr[1].setImg("pic/army/" + _loc7_.iconPath); + this.armyMcArr[1].setTitle(_loc7_.armyName); + break; + case 10600002: + this.num_1.text = _loc8_.toString(); + this.desBtnArr[0].visible = _loc8_ > 0; + this.armyMcArr[0].setImg("pic/army/" + _loc7_.iconPath); + this.armyMcArr[0].setTitle(_loc7_.armyName); + break; + case 10600003: + this.num_3.text = _loc8_.toString(); + this.desBtnArr[2].visible = _loc8_ > 0; + this.armyMcArr[2].setImg("pic/army/" + _loc7_.iconPath); + this.armyMcArr[2].setTitle(_loc7_.armyName); + break; + case 10600004: + this.num_4.text = _loc8_.toString(); + this.desBtnArr[3].visible = _loc8_ > 0; + this.armyMcArr[3].setImg("pic/army/" + _loc7_.iconPath); + this.armyMcArr[3].setTitle(_loc7_.armyName); + break; + case 10600005: + this.num_5.text = _loc8_.toString(); + this.desBtnArr[4].visible = _loc8_ > 0; + this.armyMcArr[4].setImg("pic/army/" + _loc7_.iconPath); + this.armyMcArr[4].setTitle(_loc7_.armyName); + } + } + this.setArmyValue(this.curr_i); + this.armyMcArr[0].setClick(); + this.armyMcArr[1].setUnClick(); + this.armyMcArr[2].setUnClick(); + this.armyMcArr[3].setUnClick(); + this.armyMcArr[4].setUnClick(); + } + + private function clickArmyMc(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:ItemMc = null; + if(this.curr_i == _loc3_) + { + return; + } + var _loc2_:ItemMc = param1.target as ItemMc; + for(_loc3_ in this.armyMcArr) + { + _loc4_ = this.armyMcArr[_loc3_] as ItemMc; + if(_loc2_ == _loc4_) + { + _loc4_.setClick(); + this.setArmyValue(_loc3_); + } + else + { + _loc4_.setUnClick(); + } + } + } + + private function setArmyValue(param1:int) : void + { + var _loc2_:Object = null; + var _loc6_:int = 0; + var _loc7_:EntityConsume = null; + var _loc8_:String = null; + var _loc9_:String = null; + if(param1 < 0) + { + param1 = 0; + } + this.curr_i = param1; + if(param1 == 0) + { + _loc2_ = this.armyList[1] as Object; + } + else if(param1 == 1) + { + _loc2_ = this.armyList[0] as Object; + } + else + { + _loc2_ = this.armyList[param1] as Object; + } + var _loc3_:TowerArmy = _loc2_.towerArmy as TowerArmy; + this.currEntId = _loc3_.entId; + var _loc4_:Array = _loc2_.consumes as Array; + this.title.setTitleName(_loc3_.armyName); + this.atk1.text = "攻击力" + _loc3_.damageNum; + switch(_loc3_.entId) + { + case 10600001: + this.atk2.text = "优先攻击步兵"; + break; + case 10600002: + this.atk2.text = "优先攻击弓兵"; + break; + case 10600003: + this.atk2.text = "优先攻击骑兵"; + break; + case 10600004: + this.atk2.text = "优先攻击战车"; + break; + case 10600005: + this.atk2.text = "优先攻击器械"; + } + var _loc5_:int = 1; + param1 = 0; + while(param1 < 4) + { + _loc7_ = _loc4_[param1] as EntityConsume; + if((Boolean(_loc7_)) && _loc7_.needEntId == 90000001) + { + _loc6_ = _loc7_.needEntNum; + } + else + { + _loc8_ = ""; + _loc9_ = ""; + if(_loc7_ != null) + { + _loc8_ = _loc7_.needEntName; + _loc9_ = _loc7_.needEntNum.toString(); + } + if(_loc5_ == 1) + { + this.label1.text = _loc8_; + this.res1.text = _loc9_; + } + if(_loc5_ == 2) + { + this.label2.text = _loc8_; + this.res2.text = _loc9_; + } + if(_loc5_ == 3) + { + this.label3.text = _loc8_; + this.res3.text = _loc9_; + } + _loc5_++; + } + param1++; + } + this.time.text = PublicMethod.getTime(_loc6_); + this.inputMc.setText(1); + } + + private function destroyArmy(param1:MouseEvent) : void + { + var _loc4_:* = undefined; + var _loc5_:TowerArmy = null; + var _loc6_:int = 0; + if(this.desUI == null) + { + this.desUI = new WallDestroyUI(); + this.desUI.x = int(width / 2 - this.desUI.width / 2); + this.desUI.y = int(height / 2 - this.desUI.height / 2); + } + var _loc2_:int = -1; + var _loc3_:UISmallBtn = param1.currentTarget as UISmallBtn; + for(_loc4_ in this.desBtnArr) + { + if(_loc3_ == this.desBtnArr[_loc4_]) + { + _loc2_ = _loc4_; + break; + } + } + if(_loc2_ == -1) + { + return; + } + if(this.armyList == null) + { + return; + } + if(_loc2_ == 0) + { + _loc5_ = this.armyList[1].towerArmy as TowerArmy; + _loc6_ = int(this.armyList[1].num); + } + else if(_loc2_ == 1) + { + _loc5_ = this.armyList[0].towerArmy as TowerArmy; + _loc6_ = int(this.armyList[0].num); + } + else + { + _loc5_ = this.armyList[_loc2_].towerArmy as TowerArmy; + _loc6_ = int(this.armyList[_loc2_].num); + } + if(!contains(this.desUI)) + { + addChild(this.desUI); + } + this.desUI.setData(_loc5_,_loc6_); + } + + private function delDesUI() : void + { + if(Boolean(this.desUI) && contains(this.desUI)) + { + removeChild(this.desUI); + } + } + + private function produceArmy(param1:MouseEvent) : void + { + var _loc2_:int = this.inputMc.getText(); + if(_loc2_ <= 0 || this.currEntId <= 0) + { + return; + } + ConnectService.getInstance().castleService.productTowerArmy(this.currEntId,_loc2_); + } + + private function productArmyOverResult(param1:CastleWallEvent) : void + { + if(contains(this.buildWallMc)) + { + removeChild(this.buildWallMc); + } + this.getData(); + } + + private function addSpeedWallResult(param1:CastleWallEvent) : void + { + var _loc2_:Object = param1.wallObject; + if(_loc2_ == null) + { + if(contains(this.buildWallMc)) + { + removeChild(this.buildWallMc); + } + this.getData(); + } + } + + private function cancelWallResult(param1:CastleWallEvent) : void + { + if(contains(this.buildWallMc)) + { + removeChild(this.buildWallMc); + } + } + + private function dismissWallResult(param1:CastleWallEvent) : void + { + this.getData(); + } + + public function addProductArmy(param1:Object) : void + { + this.buildWallMc.setData(param1); + addChild(this.buildWallMc); + this.buildWallMc.x = 5; + this.buildWallMc.y = 28; + } + } +} + diff --git a/flash_decompiled/com/view/ui/wall/WallPage2.as b/flash_decompiled/com/view/ui/wall/WallPage2.as new file mode 100644 index 0000000..e005870 --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/WallPage2.as @@ -0,0 +1,279 @@ +package com.view.ui.wall +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.data.data.hero.Hero; + import com.view.newui.UIButton; + import com.view.newui.UITable; + import com.view.ui.army.ArmySetUI; + import com.view.ui.hero.HeroListSelectUI; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class WallPage2 extends Sprite + { + + private var bg:Sprite; + + private var tab_1:Sprite; + + private var tableMc:UITable; + + private var wallHeroList:Object; + + private var heroListMc:Vector.; + + private var heroListArr:Vector.; + + public function WallPage2() + { + var _loc1_:Array = null; + var _loc6_:Sprite = null; + var _loc7_:TextField = null; + var _loc9_:Page2Line = null; + this.heroListArr = new Vector.(); + super(); + _loc1_ = ["出征顺序","武 将","等 级","职 业","健康度","统 兵","统兵数量","状 态","操 作"]; + var _loc2_:Array = [50,80,51,71,65,80,60,80,90]; + this.tableMc = new UITable(); + this.tableMc.drawLine = true; + this.tableMc.install(5,_loc1_,_loc2_); + addChild(this.tableMc); + var _loc3_:UIButton = new UIButton("武将选择",2); + var _loc4_:UIButton = new UIButton("统兵配置",2); + var _loc5_:UIButton = new UIButton("保存配置",2); + addChild(_loc3_); + _loc3_.y = 160; + addChild(_loc4_); + _loc4_.x = 70; + _loc4_.y = _loc3_.y; + addChild(_loc5_); + _loc5_.x = 555; + _loc5_.y = _loc3_.y; + _loc4_.onClick = this.armySet; + _loc3_.onClick = this.selectHero; + _loc5_.onClick = this.saveSelect; + _loc6_ = PublicMethod.getTrLine(615); + addChild(_loc6_); + _loc6_.x = 4; + _loc6_.y = _loc3_.y + 35; + _loc7_ = PublicMethod.getTextFieldWithFillter(65280,600); + addChild(_loc7_); + _loc7_.x = 20; + _loc7_.y = _loc6_.y + 10; + _loc7_.text = "小提示:守城开始时,若守城武将在本城内(包括修炼武将),则可出城迎敌,否则将无法出战!"; + this.heroListMc = new Vector.(); + var _loc8_:int = 0; + while(_loc8_ < 5) + { + _loc9_ = new Page2Line(); + this.tableMc.addChild(_loc9_); + _loc9_.y = 26 + _loc8_ * 25; + _loc9_.x = 4; + _loc9_.setNums(_loc8_ + 1); + this.heroListMc.push(_loc9_); + _loc9_.removeBtn.onClick = this.removeHero; + _loc8_++; + } + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + } + + private function armySet(param1:MouseEvent) : void + { + var _loc2_:ArmySetUI = ArmySetUI.getInstance(); + _loc2_.show(); + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(BattleEvent.WALL_DEF_HEROLIST,this.getWallHeroList); + ConnectService.getInstance().addEventListener(BattleEvent.WALL_DEF_HEROLIST_SAVE,this.saveWallHeroList); + this.getWallHero(); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(BattleEvent.WALL_DEF_HEROLIST,this.getWallHeroList); + ConnectService.getInstance().removeEventListener(BattleEvent.WALL_DEF_HEROLIST_SAVE,this.saveWallHeroList); + this.clearWallHero(); + } + + private function getWallHero() : void + { + ConnectService.getInstance().battleService.getSiegeDefView(); + } + + private function clearWallHero() : void + { + var _loc1_:Page2Line = null; + for each(_loc1_ in this.heroListMc) + { + if(_loc1_.getHero()) + { + _loc1_.setHero(null); + } + } + } + + private function saveWallHeroList(param1:BattleEvent) : void + { + MessageBoxUI.getInstance().addMessage("保存成功。"); + } + + private function getWallHeroList(param1:BattleEvent) : void + { + this.wallHeroList = param1.wallHero; + this.heroListArr = new Vector.(); + if(this.wallHeroList.index_hero1) + { + this.heroListArr.push(this.wallHeroList.index_hero1.heroId); + } + if(this.wallHeroList.index_hero2) + { + this.heroListArr.push(this.wallHeroList.index_hero2.heroId); + } + if(this.wallHeroList.index_hero3) + { + this.heroListArr.push(this.wallHeroList.index_hero3.heroId); + } + if(this.wallHeroList.index_hero4) + { + this.heroListArr.push(this.wallHeroList.index_hero4.heroId); + } + if(this.wallHeroList.index_hero5) + { + this.heroListArr.push(this.wallHeroList.index_hero5.heroId); + } + this.setHeroValue(); + } + + private function setHeroValue() : void + { + var _loc1_:* = undefined; + for(_loc1_ in this.heroListMc) + { + if(this.heroListArr.length > _loc1_) + { + this.heroListMc[_loc1_].setHero(this.getHeroObjByHeroId(this.heroListArr[_loc1_])); + } + else + { + this.heroListMc[_loc1_].setHero(null); + } + } + } + + private function getHeroObjByHeroId(param1:int) : Object + { + if(Boolean(this.wallHeroList.index_hero1) && this.wallHeroList.index_hero1.heroId == param1) + { + return this.wallHeroList.index_hero1; + } + if(Boolean(this.wallHeroList.index_hero2) && this.wallHeroList.index_hero2.heroId == param1) + { + return this.wallHeroList.index_hero2; + } + if(Boolean(this.wallHeroList.index_hero3) && this.wallHeroList.index_hero3.heroId == param1) + { + return this.wallHeroList.index_hero3; + } + if(Boolean(this.wallHeroList.index_hero4) && this.wallHeroList.index_hero4.heroId == param1) + { + return this.wallHeroList.index_hero4; + } + if(Boolean(this.wallHeroList.index_hero5) && this.wallHeroList.index_hero5.heroId == param1) + { + return this.wallHeroList.index_hero5; + } + return null; + } + + private function selectHero(param1:MouseEvent) : void + { + var _loc2_:HeroListSelectUI = HeroListSelectUI.getInstance(); + _loc2_.setSelectheroArr(this.heroListArr); + addChild(_loc2_); + _loc2_.x = -19; + _loc2_.y = -168; + _loc2_.backFunc = this.selectHeroList; + } + + private function saveSelect(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc4_:Array = null; + var _loc2_:Object = new Object(); + for(_loc3_ in this.heroListMc) + { + _loc4_ = new Array(); + if(this.heroListArr.length > _loc3_) + { + _loc4_.push(this.heroListArr[_loc3_]); + } + else + { + _loc4_.push(0); + } + _loc2_["index_hero" + (_loc3_ + 1)] = _loc4_; + } + ConnectService.getInstance().battleService.saveSiegeDef(_loc2_); + } + + public function selectHeroList(param1:Vector.) : void + { + var _loc3_:Object = null; + this.wallHeroList = new Object(); + this.heroListArr = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + if(param1.length > _loc2_) + { + _loc3_ = new Object(); + _loc3_.name = param1[_loc2_].showName; + _loc3_.level = param1[_loc2_].level; + _loc3_.career = param1[_loc2_].careerName; + _loc3_.hpColor = param1[_loc2_].hpColor; + _loc3_.hpStatus = param1[_loc2_].hpStatus; + _loc3_.armyName = param1[_loc2_].armyName; + _loc3_.armyNum = param1[_loc2_].armyNum; + _loc3_.actionStatusChn = param1[_loc2_].actionStatusChn; + _loc3_.heroId = param1[_loc2_].heroId; + this.wallHeroList["index_hero" + (_loc2_ + 1)] = _loc3_; + this.heroListArr.push(_loc3_.heroId); + } + else + { + this.wallHeroList["index_hero" + (_loc2_ + 1)] = null; + } + _loc2_++; + } + this.setHeroValue(); + } + + private function removeHero(param1:MouseEvent) : void + { + var _loc3_:* = undefined; + var _loc2_:Page2Line = param1.currentTarget.parent as Page2Line; + if(_loc2_.getHero()) + { + for(_loc3_ in this.heroListArr) + { + if(this.heroListArr[_loc3_] == _loc2_.getHero().heroId) + { + this.heroListArr.splice(_loc3_,1); + _loc2_.setHero(null); + break; + } + } + } + this.setHeroValue(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/wall/WallPage3.as b/flash_decompiled/com/view/ui/wall/WallPage3.as new file mode 100644 index 0000000..779566f --- /dev/null +++ b/flash_decompiled/com/view/ui/wall/WallPage3.as @@ -0,0 +1,407 @@ +package com.view.ui.wall +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.utils.HashMap; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.army.ComboxArmy; + import com.view.ui.message.MessageBoxUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class WallPage3 extends Sprite + { + + private var table1:UITable; + + private var table2:UITable; + + private var face:InstallFace; + + private var armyScrollPane:ScrollPane; + + private var myArmyMc:Sprite; + + private var myArmyVec:Vector.; + + private var uintArmyVec:Vector.; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var armyMap:HashMap; + + public function WallPage3() + { + var _loc1_:Array = null; + var _loc8_:UIButton = null; + var _loc9_:UIButton = null; + var _loc10_:UIButton = null; + var _loc14_:TextField = null; + var _loc18_:Page3Line1 = null; + var _loc19_:Page3Line2 = null; + this.face = InstallFace.getInstance(); + super(); + _loc1_ = ["守卫","统兵","统兵数量","操作"]; + var _loc2_:Array = [115,103,160,68]; + this.table1 = new UITable(); + this.table1.drawLine = true; + this.table1.install(5,_loc1_,_loc2_); + addChild(this.table1); + var _loc3_:UIWindowBg = new UIWindowBg(); + _loc3_.initThirdPanel(433,37); + addChild(_loc3_); + _loc3_.y = this.table1.height + 3; + var _loc4_:Array = ["兵种","空闲"]; + var _loc5_:Array = [90,90]; + this.table2 = new UITable(); + this.table2.drawLine = false; + this.table2.install(7,_loc4_,_loc5_); + addChild(this.table2); + this.table2.x = this.table1.width + 1; + this.table2.y = this.table1.y; + var _loc6_:UIWindowBg = new UIWindowBg(); + _loc6_.initThirdPanel(614,58); + addChild(_loc6_); + _loc6_.y = this.table2.height + 3; + var _loc7_:UITitleBg = new UITitleBg("守卫属性",610); + _loc6_.addChild(_loc7_); + _loc7_.x = int(_loc6_.width / 2 - _loc7_.width / 2); + _loc8_ = new UIButton("全部清空",2); + _loc9_ = new UIButton("全部补满",2); + _loc10_ = new UIButton("全部确定",2); + _loc3_.addChild(_loc8_); + _loc8_.x = 5; + _loc8_.y = 10; + _loc3_.addChild(_loc9_); + _loc9_.x = _loc8_.x + _loc8_.width + 5; + _loc9_.y = _loc8_.y; + _loc3_.addChild(_loc10_); + _loc10_.x = 375; + _loc10_.y = _loc8_.y; + _loc8_.onClick = this.clearAll; + _loc9_.onClick = this.fullAll; + _loc10_.onClick = this.saveAll; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + this.uintArmyVec = new Vector.(); + var _loc11_:int = 0; + while(_loc11_ < 5) + { + _loc18_ = new Page3Line1(_loc11_); + this.uintArmyVec.push(_loc18_); + this.table1.addChild(_loc18_); + _loc18_.y = 26 + _loc11_ * 25; + _loc18_.x = 4; + _loc18_.onClick = this.itemClick; + _loc11_++; + } + this.armyScrollPane = new ScrollPane(); + this.myArmyMc = new Sprite(); + this.armyScrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.armyScrollPane.setSize(176,175); + this.table2.addChild(this.armyScrollPane); + this.armyScrollPane.y = 25; + this.armyScrollPane.x = 1; + this.armyScrollPane.source = this.myArmyMc; + this.myArmyVec = new Vector.(); + var _loc12_:int = 0; + while(_loc12_ < 7) + { + _loc19_ = new Page3Line2(); + this.myArmyMc.addChild(_loc19_); + _loc19_.y = _loc12_ * 25; + _loc19_.x = 4; + this.myArmyVec.push(_loc19_); + _loc12_++; + } + this.armyScrollPane.update(); + var _loc13_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,65); + _loc13_.text = "攻击:"; + _loc6_.addChild(_loc13_); + _loc13_.x = 30; + _loc13_.y = 37; + _loc6_.addChild(this.value1); + this.value1.x = _loc13_.x + 45; + this.value1.y = _loc13_.y; + _loc14_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,65); + _loc14_.text = "防御:"; + _loc6_.addChild(_loc14_); + _loc14_.x = this.value1.x + 100; + _loc14_.y = _loc13_.y; + _loc6_.addChild(this.value2); + this.value2.x = _loc14_.x + 45; + this.value2.y = _loc13_.y; + var _loc15_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,65); + _loc15_.text = "敏捷:"; + _loc6_.addChild(_loc15_); + _loc15_.x = this.value2.x + 100; + _loc15_.y = _loc13_.y; + _loc6_.addChild(this.value3); + this.value3.x = _loc15_.x + 45; + this.value3.y = _loc13_.y; + var _loc16_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,65); + _loc16_.text = "体力:"; + _loc6_.addChild(_loc16_); + _loc16_.x = this.value3.x + 100; + _loc16_.y = _loc13_.y; + _loc6_.addChild(this.value4); + this.value4.x = _loc15_.x + 45; + this.value4.y = _loc13_.y; + var _loc17_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,65); + _loc17_.text = "统率:"; + _loc6_.addChild(_loc17_); + _loc17_.x = this.value4.x + 100; + _loc17_.y = _loc13_.y; + _loc6_.addChild(this.value5); + this.value5.x = _loc16_.x + 45; + this.value5.y = _loc13_.y; + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(BattleEvent.B_getChangeArmyView4YS,this.getChangeArmyViewSucc); + ConnectService.getInstance().addEventListener(BattleEvent.B_saveYsChangeArmy,this.changeArmyViewSucc); + this.updata(); + } + + private function delEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(BattleEvent.B_getChangeArmyView4YS,this.getChangeArmyViewSucc); + ConnectService.getInstance().removeEventListener(BattleEvent.B_saveYsChangeArmy,this.changeArmyViewSucc); + } + + private function clearArmyList() : void + { + var _loc1_:int = int(this.myArmyVec.length); + var _loc2_:* = int(_loc1_ - 1); + while(_loc2_ >= 0) + { + this.myArmyVec[_loc2_].setData(null); + if(_loc2_ > 6) + { + this.myArmyMc.removeChild(this.myArmyVec[_loc2_]); + this.myArmyVec.splice(_loc2_,1); + } + _loc2_--; + } + this.armyScrollPane.update(); + } + + public function updata() : void + { + ConnectService.getInstance().battleService.getChangeArmyView4YS(); + } + + private function getChangeArmyViewSucc(param1:BattleEvent) : void + { + var _loc3_:ComboxArmy = null; + var _loc6_:Page3Line1 = null; + var _loc7_:* = undefined; + var _loc8_:* = undefined; + var _loc9_:Page3Line2 = null; + this.armyMap = new HashMap(); + var _loc2_:Object = param1.armyObj; + this.value1.text = _loc2_.atk; + this.value2.text = _loc2_.def; + this.value3.text = _loc2_.agl; + this.value4.text = _loc2_.hp; + this.value5.text = _loc2_.lead; + var _loc4_:Array = _loc2_.castleBattleUnitList; + if((Boolean(_loc4_)) && _loc4_.length > 0) + { + for(_loc7_ in this.uintArmyVec) + { + if(_loc4_[_loc7_]) + { + this.uintArmyVec[_loc7_].setData(_loc4_[_loc7_]); + if(_loc4_[_loc7_].armyEntId == 0) + { + continue; + } + if(!this.armyMap.containsKey(_loc4_[_loc7_].armyEntId)) + { + _loc3_ = new ComboxArmy(); + _loc3_.armyEntId = _loc4_[_loc7_].armyEntId; + _loc3_.armyName = _loc4_[_loc7_].armyName; + _loc3_.armyNum = 0; + this.armyMap.put(_loc4_[_loc7_].armyEntId,_loc3_); + } + } + else + { + this.uintArmyVec[_loc7_].setData(null); + } + } + } + var _loc5_:Array = _loc2_.castleArmyList; + if(_loc5_ == null || _loc5_.length == 0) + { + this.clearArmyList(); + } + else + { + for(_loc8_ in _loc5_) + { + if(_loc5_[_loc8_].armyNum == 0) + { + continue; + } + if(_loc5_[_loc8_].armyEntId == 0) + { + continue; + } + if(_loc8_ > 6) + { + _loc9_ = new Page3Line2(); + this.myArmyMc.addChild(_loc9_); + _loc9_.y = 24 * _loc8_; + this.myArmyVec.push(_loc9_); + } + this.myArmyVec[_loc8_].setData(_loc5_[_loc8_]); + if(!this.armyMap.containsKey(_loc5_[_loc8_].armyEntId)) + { + _loc3_ = new ComboxArmy(); + _loc3_.armyEntId = _loc5_[_loc8_].armyEntId; + _loc3_.armyName = _loc5_[_loc8_].armyName; + _loc3_.armyNum = _loc5_[_loc8_].armyNum; + this.armyMap.put(_loc5_[_loc8_].armyEntId,_loc3_); + } + else + { + _loc3_ = this.armyMap.get(_loc5_[_loc8_].armyEntId); + _loc3_.armyNum += _loc5_[_loc8_].armyNum; + } + } + } + this.armyScrollPane.update(); + for each(_loc6_ in this.uintArmyVec) + { + if(_loc6_.getHeroObj()) + { + _loc6_.addCombox(this.armyMap); + } + } + } + + private function itemClick(param1:Page3Line1) : void + { + var _loc2_:Object = new Object(); + _loc2_["index_" + param1.num] = param1.getObj(); + ConnectService.getInstance().battleService.saveYsChangeArmy(_loc2_); + } + + private function changeArmyViewSucc(param1:BattleEvent) : void + { + MessageBoxUI.getInstance().addMessage("修改成功"); + this.updata(); + } + + private function clearAll(param1:MouseEvent) : void + { + var _loc3_:Page3Line1 = null; + var _loc2_:Object = new Object(); + for each(_loc3_ in this.uintArmyVec) + { + _loc3_.getInput().setText(0); + _loc2_["index_" + _loc3_.num] = _loc3_.getObj(); + } + ConnectService.getInstance().battleService.saveYsChangeArmy(_loc2_); + } + + private function fullAll(param1:MouseEvent) : void + { + var _loc3_:Page3Line1 = null; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc2_:Object = new Object(); + for each(_loc3_ in this.uintArmyVec) + { + if(_loc3_.getComboxSelect() == 0) + { + _loc3_.getInput().setText(0); + _loc2_["index_" + _loc3_.num] = _loc3_.getObj(); + } + else + { + _loc4_ = this.getArmyNums(_loc3_.getComboxSelect()); + if(_loc4_ == 0) + { + _loc3_.getInput().setText(0); + } + else + { + _loc5_ = int(_loc3_.getHeroObj().lead); + _loc6_ = int(_loc3_.getHeroObj().armyNum); + _loc7_ = _loc3_.getComboxSelect(); + if(_loc6_ + _loc4_ < _loc5_) + { + _loc3_.getInput().setText(_loc6_ + _loc4_); + this.updateArmyNums(_loc7_,_loc4_); + } + else + { + _loc3_.getInput().setText(_loc5_); + this.updateArmyNums(_loc7_,_loc5_ - _loc6_); + } + } + _loc2_["index_" + _loc3_.num] = _loc3_.getObj(); + } + } + ConnectService.getInstance().battleService.saveYsChangeArmy(_loc2_); + } + + private function getArmyNums(param1:int) : int + { + var _loc2_:ComboxArmy = this.armyMap.get(param1); + if(_loc2_ == null) + { + return 0; + } + return _loc2_.armyNum; + } + + private function updateArmyNums(param1:int, param2:int) : void + { + var _loc3_:ComboxArmy = this.armyMap.get(param1); + _loc3_.armyNum -= param2; + this.armyMap.put(param1,_loc3_); + } + + private function saveAll(param1:MouseEvent) : void + { + var _loc3_:Page3Line1 = null; + var _loc2_:Object = new Object(); + for each(_loc3_ in this.uintArmyVec) + { + _loc2_["index_" + _loc3_.num] = _loc3_.getObj(); + } + ConnectService.getInstance().battleService.saveYsChangeArmy(_loc2_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/warehouse/WarehouseBuild.as b/flash_decompiled/com/view/ui/warehouse/WarehouseBuild.as new file mode 100644 index 0000000..ec3887a --- /dev/null +++ b/flash_decompiled/com/view/ui/warehouse/WarehouseBuild.as @@ -0,0 +1,60 @@ +package com.view.ui.warehouse +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class WarehouseBuild extends BaseBuild + { + + public function WarehouseBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/WarehouseView1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/WarehouseView3.swf"; + buildData.picUrl = "pic/build/WarehouseView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/WarehouseView2.swf"; + buildData.picUrl = "pic/build/WarehouseView2.png"; + } + else + { + buildData.swfUrl = "pic/build/WarehouseView1.swf"; + buildData.picUrl = "pic/build/WarehouseView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new WarehouseBuildUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/warehouse/WarehouseBuildUI.as b/flash_decompiled/com/view/ui/warehouse/WarehouseBuildUI.as new file mode 100644 index 0000000..2b43c00 --- /dev/null +++ b/flash_decompiled/com/view/ui/warehouse/WarehouseBuildUI.as @@ -0,0 +1,108 @@ +package com.view.ui.warehouse +{ + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.newdata.user.NewRes; + import com.newdata.user.NewUserData; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + + public class WarehouseBuildUI extends BaseUI + { + + private var ui_warehouse:MovieClip; + + public function WarehouseBuildUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_cangku); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + } + + public function createCurUI() : void + { + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + this.ui_warehouse = face.getMovieClip(ClassConfig.ui_warehouse); + _loc1_.addChild(this.ui_warehouse); + this.ui_warehouse.foodRed.visible = false; + this.ui_warehouse.woodRed.visible = false; + this.ui_warehouse.stoneRed.visible = false; + this.ui_warehouse.bronzeRed.visible = false; + var _loc2_:Sprite = PublicMethod.createShape(3751743,590,6); + var _loc3_:Sprite = PublicMethod.createShape(5922912,590,6); + this.ui_warehouse.addChild(_loc2_); + _loc2_.x = 24; + _loc2_.y = 241; + this.ui_warehouse.addChild(_loc3_); + _loc3_.x = 24; + _loc3_.y = 80; + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + var _loc1_:NewRes = NewUserData.getRes(); + this.ui_warehouse.limit_txt.text = _loc1_.wareCapacity + ""; + this.ui_warehouse.food.txt.text = _loc1_.foodNum + ""; + this.ui_warehouse.wood.txt.text = _loc1_.woodNum + ""; + this.ui_warehouse.stone.txt.text = _loc1_.stoneNum + ""; + this.ui_warehouse.bronze.txt.text = _loc1_.bronzeNum + ""; + this.ui_warehouse.food_mc.height = int(156 * _loc1_.foodNum / _loc1_.wareCapacity); + this.ui_warehouse.wood_mc.height = int(156 * _loc1_.woodNum / _loc1_.wareCapacity); + this.ui_warehouse.stone_mc.height = int(156 * _loc1_.stoneNum / _loc1_.wareCapacity); + this.ui_warehouse.bronze_mc.height = int(156 * _loc1_.bronzeNum / _loc1_.wareCapacity); + if(this.ui_warehouse.food_mc.height > 156) + { + this.ui_warehouse.food_mc.height = 156; + } + if(this.ui_warehouse.wood_mc.height > 156) + { + this.ui_warehouse.wood_mc.height = 156; + } + if(this.ui_warehouse.stone_mc.height > 156) + { + this.ui_warehouse.stone_mc.height = 156; + } + if(this.ui_warehouse.bronze_mc.height > 156) + { + this.ui_warehouse.bronze_mc.height = 156; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/warreport/ArmyPane.as b/flash_decompiled/com/view/ui/warreport/ArmyPane.as new file mode 100644 index 0000000..5d7b244 --- /dev/null +++ b/flash_decompiled/com/view/ui/warreport/ArmyPane.as @@ -0,0 +1,263 @@ +package com.view.ui.warreport +{ + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.user.StrategyUI; + import com.view.ui.warreport.mc.ArmyItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ArmyPane extends UIWindowBg + { + + private static var instance:ArmyPane; + + private var bg:Sprite; + + private var itemVec:Vector.; + + private var label1:TextField; + + private var label2:TextField; + + private var value1:TextField; + + private var value2:TextField; + + private var tableMc:UITable; + + private var timeText:TextField; + + private var btnJice:UIButton; + + private var btnBack:UIButton; + + private var strategyUI:StrategyUI; + + private var armyId:int; + + public var updateFunc:Function; + + public function ArmyPane() + { + var _loc4_:ArmyItem = null; + super(); + if(instance != null) + { + throw Error("单例"); + } + initSize(125,215); + loadTitle(UITitleConfig.title_junduixiangqing); + addCloseBtn(); + initBg(); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,45); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,55); + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,90); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,90); + bg1.addChild(this.label1); + bg1.addChild(this.label2); + bg1.addChild(this.value1); + bg1.addChild(this.value2); + this.label1.x = 10; + this.label1.y = 15; + this.label1.text = "战斗力:"; + this.label2.x = this.label1.x + 140; + this.label2.y = this.label1.y; + this.label2.text = "所属君主:"; + this.value1.x = this.label1.x + 46; + this.value1.y = this.label1.y; + this.value1.text = ""; + this.value2.x = this.label2.x + 58; + this.value2.y = this.label1.y; + this.value2.text = ""; + var _loc1_:Array = ["武将","等级","健康度","士兵","数量"]; + var _loc2_:Array = [67,60,60,60,60]; + this.tableMc = new UITable(); + this.tableMc.install(5,_loc1_,_loc2_); + bg1.addChild(this.tableMc); + this.tableMc.x = this.label1.x; + this.tableMc.y = this.label1.y + 20; + this.timeText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,160); + bg1.addChild(this.timeText); + this.timeText.x = this.tableMc.x + 80; + this.timeText.y = this.tableMc.y + this.tableMc.height + 5; + this.timeText.text = "预计到达时间:"; + this.btnJice = new UIButton("计 策",2,10); + bg1.addChild(this.btnJice); + this.btnJice.x = this.tableMc.x + 60; + this.btnJice.y = this.timeText.y + this.timeText.height + 5; + this.btnBack = new UIButton("召 回",2,10); + bg1.addChild(this.btnBack); + this.btnBack.x = this.btnJice.x + 120; + this.btnBack.y = this.btnJice.y; + this.btnJice.onClick = this.jice; + this.btnBack.onClick = this.callBack; + this.itemVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 5) + { + _loc4_ = new ArmyItem(); + this.itemVec.push(_loc4_); + this.tableMc.addChild(_loc4_); + _loc4_.y = 25 + _loc3_ * 25; + _loc4_.x = 4; + _loc3_++; + } + ConnectService.getInstance().addEventListener(BattleEvent.B_getArmyOutList,this.readSucc); + ConnectService.getInstance().addEventListener(BattleEvent.B_callBackOutArmy,this.callBackSucc); + ConnectService.getInstance().addEventListener(BattleEvent.B_callBackLeagueDefArmy,this.qianFanSucc); + } + + public static function getInstance() : ArmyPane + { + if(instance == null) + { + instance = new ArmyPane(); + } + return instance; + } + + public function update(param1:int, param2:int = 0) : void + { + if(param2 > 0) + { + this.timeText.text = "预计到达时间:" + Utils.formatSecond(param2); + } + else + { + this.timeText.text = "预计到达时间:-:-"; + } + this.armyId = param1; + ConnectService.getInstance().battleService.getArmyOutList(param1); + } + + private function readSucc(param1:BattleEvent) : void + { + var _loc5_:* = undefined; + var _loc2_:Object = param1.armyObj; + var _loc3_:int = 1; + if(_loc2_.isLeague) + { + if(_loc2_.isLeague == 2) + { + if(_loc2_.canSeeArmy == 2) + { + _loc3_ = 2; + } + } + this.btnBack.setText("遣 返"); + this.btnBack.onClick = this.qianFan; + } + else + { + this.btnBack.setText("召 回"); + this.btnBack.onClick = this.callBack; + } + if(_loc3_ == 1) + { + this.value1.text = Math.round(_loc2_.armyPower) + ""; + } + else + { + this.value1.text = "未知"; + } + this.value2.text = _loc2_.userName; + var _loc4_:Array = _loc2_.heroList as Array; + if(_loc4_ == null || _loc4_.length == 0) + { + this.clearItemList(); + return; + } + for(_loc5_ in this.itemVec) + { + if(_loc4_[_loc5_]) + { + this.itemVec[_loc5_].setDate(_loc4_[_loc5_],_loc3_); + } + else + { + this.itemVec[_loc5_].setDate(null); + } + } + } + + private function clearItemList() : void + { + var _loc1_:ArmyItem = null; + for each(_loc1_ in this.itemVec) + { + _loc1_.setDate(null); + } + } + + override public function closeSelf(param1:MouseEvent) : void + { + super.closeSelf(param1); + this.clearItemList(); + if(Boolean(this.strategyUI) && contains(this.strategyUI)) + { + removeChild(this.strategyUI); + } + } + + private function jice(param1:MouseEvent) : void + { + if(CommonData.open_junshi == 0) + { + MessageBoxUI.getInstance().addMessage("尚未开放"); + return; + } + this.strategyUI = StrategyUI.getInstance(); + addChild(this.strategyUI); + this.strategyUI.x = -this.x - 11; + this.strategyUI.y = -this.y - 65; + this.strategyUI.showUse(true,this.armyId); + } + + private function qianFan() : void + { + ConnectService.getInstance().battleService.callBackLeagueDefArmy(this.armyId); + } + + private function qianFanSucc(param1:BattleEvent) : void + { + MessageBoxUI.getInstance().addMessage("遣返成功"); + if(this.updateFunc != null) + { + this.updateFunc(); + } + this.closeSelf(null); + } + + private function callBack(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("您确定要召回这支部队吗?",this.callBackOk); + } + + private function callBackOk() : void + { + ConnectService.getInstance().battleService.callBackOutArmy(this.armyId); + } + + private function callBackSucc(param1:BattleEvent) : void + { + MessageBoxUI.getInstance().addMessage("召回成功"); + if(this.updateFunc != null) + { + this.updateFunc(); + } + this.closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/warreport/MilitaryView.as b/flash_decompiled/com/view/ui/warreport/MilitaryView.as new file mode 100644 index 0000000..2d22ba4 --- /dev/null +++ b/flash_decompiled/com/view/ui/warreport/MilitaryView.as @@ -0,0 +1,192 @@ +package com.view.ui.warreport +{ + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import flash.events.Event; + import flash.events.MouseEvent; + + public class MilitaryView extends BaseUI + { + + private static var instance:MilitaryView; + + private var startPage:int; + + private var btnArr:Array = new Array(); + + private var paneBg:UIWindowBg; + + private var currPage:int = -1; + + public var personalMilitary:PersonalMilitary; + + public var unionMilitary:UnionMilitary; + + public function MilitaryView() + { + super(); + if(instance != null) + { + throw new Error("此类是一个单例,无法为它创建实例"); + } + super.addUIBg(); + super.loadTitle(UITitleConfig.title_junqing); + this.setPosition(); + this.createUI(); + } + + public static function getInstance() : MilitaryView + { + if(instance == null) + { + return instance = new MilitaryView(); + } + return instance; + } + + override public function setPosition() : void + { + super.setPosition2(); + } + + public function setStartPage(param1:int) : void + { + this.startPage = param1; + } + + override public function createUI() : void + { + var _loc3_:int = 0; + var _loc4_:UITabBtn = null; + 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.changTab; + _loc3_++; + } + this.paneBg = new UIWindowBg(); + this.paneBg.initSecondPanel(630,375); + addChild(this.paneBg); + this.paneBg.x = 11; + this.paneBg.y = 65; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + this.setBtnSelect(this.btnArr[this.startPage]); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + this.removePage(this.currPage); + this.currPage = -1; + } + + private function changTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + this.setBtnSelect(_loc2_); + } + + private function setBtnSelect(param1:UITabBtn) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + var _loc4_:UITabBtn = null; + for(_loc3_ in this.btnArr) + { + _loc4_ = this.btnArr[_loc3_] as UITabBtn; + if(param1 == _loc4_) + { + _loc4_.select = true; + _loc2_ = _loc3_; + } + else + { + _loc4_.select = false; + } + } + this.openPage(_loc2_); + } + + private function removePage(param1:int) : void + { + if(param1 >= 0) + { + switch(param1) + { + case 0: + if(Boolean(this.personalMilitary) && this.paneBg.contains(this.personalMilitary)) + { + this.paneBg.removeChild(this.personalMilitary); + this.personalMilitary.clearEvent(); + } + break; + case 1: + if(Boolean(this.unionMilitary) && this.paneBg.contains(this.unionMilitary)) + { + this.paneBg.removeChild(this.unionMilitary); + this.unionMilitary.clearEvent(); + } + } + } + } + + private function addPage(param1:int) : void + { + if(param1 >= 0) + { + switch(param1) + { + case 0: + this.createPage1(); + break; + case 1: + this.createPage2(); + } + } + } + + private function openPage(param1:int) : void + { + if(this.currPage == param1) + { + return; + } + this.removePage(this.currPage); + this.currPage = param1; + this.addPage(this.currPage); + } + + private function createPage1() : void + { + if(this.personalMilitary == null) + { + this.personalMilitary = new PersonalMilitary(); + } + this.paneBg.addChild(this.personalMilitary); + this.personalMilitary.addEvent(); + } + + private function createPage2() : void + { + if(this.unionMilitary == null) + { + this.unionMilitary = new UnionMilitary(); + } + this.paneBg.addChild(this.unionMilitary); + this.unionMilitary.addEvent(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/warreport/PersonalMilitary.as b/flash_decompiled/com/view/ui/warreport/PersonalMilitary.as new file mode 100644 index 0000000..52e499c --- /dev/null +++ b/flash_decompiled/com/view/ui/warreport/PersonalMilitary.as @@ -0,0 +1,164 @@ +package com.view.ui.warreport +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.control.castle.event.StrategyEvent; + import com.control.data.ReturnBean; + import com.view.newui.UIButton; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.training.SoldierFirstView; + import com.view.ui.warreport.mc.PersonalMilitaryItem; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PersonalMilitary extends BaseUI + { + + private var bg:Sprite; + + private var tableMc:UITable; + + private var itemVec:Vector.; + + private var label:TextField; + + private var backBtn:UIButton; + + private var armyPane:ArmyPane; + + public function PersonalMilitary() + { + var _loc1_:Array = null; + var _loc2_:Array = null; + var _loc4_:PersonalMilitaryItem = null; + super(); + _loc1_ = ["操作","君主","状态","目的地","剩余时间","操作"]; + _loc2_ = [52,150,88,153,68,124]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.label = PublicMethod.getTextFieldWithFillter(16763749,208); + this.label.text = "点击操作按钮可使用计策或召回军队"; + addChild(this.label); + this.label.x = 5; + this.label.y = 350; + this.backBtn = new UIButton("返回出征界面",3); + this.backBtn.x = 540; + this.backBtn.y = this.label.y; + addChild(this.backBtn); + this.backBtn.onClick = this.backToTrain; + this.itemVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc4_ = new PersonalMilitaryItem(); + this.itemVec.push(_loc4_); + _loc4_.y = 26 + _loc3_ * 24; + _loc4_.x = 4; + this.tableMc.addChild(_loc4_); + _loc4_.updateFunc = this.listArmyOut; + _loc4_.viewArmyFunc = this.showArmyPane; + _loc3_++; + } + } + + override public function setPosition() : void + { + } + + public function addEvent() : void + { + ConnectService.getInstance().addEventListener(BattleEvent.B_listArmyOut,this.freshSucc); + ConnectService.getInstance().addEventListener(StrategyEvent.Strategy_UseJunShi,this.useJunshiStrategySucc); + this.listArmyOut(); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(BattleEvent.B_listArmyOut,this.freshSucc); + ConnectService.getInstance().removeEventListener(StrategyEvent.Strategy_UseJunShi,this.useJunshiStrategySucc); + this.clearItem(); + if(Boolean(this.armyPane) && contains(this.armyPane)) + { + removeChild(this.armyPane); + } + } + + private function backToTrain(param1:MouseEvent) : void + { + var _loc2_:SoldierFirstView = SoldierFirstView.getInstance(); + _loc2_.show(); + } + + private function listArmyOut() : void + { + ConnectService.getInstance().battleService.listArmyOut(); + } + + private function freshSucc(param1:BattleEvent) : void + { + var _loc3_:* = undefined; + var _loc2_:Array = param1.list; + if(_loc2_ == null || _loc2_.length == 0) + { + this.clearItem(); + } + else + { + for(_loc3_ in this.itemVec) + { + if(_loc2_[_loc3_]) + { + this.itemVec[_loc3_].setDate(_loc2_[_loc3_]); + } + else + { + this.itemVec[_loc3_].setDate(null); + } + } + } + } + + public function clearItem() : void + { + var _loc1_:PersonalMilitaryItem = null; + for each(_loc1_ in this.itemVec) + { + _loc1_.setDate(null); + } + } + + public function showArmyPane(param1:int, param2:int = 0) : void + { + if(this.armyPane == null) + { + this.armyPane = ArmyPane.getInstance(); + } + this.armyPane.updateFunc = this.listArmyOut; + addChild(this.armyPane); + this.armyPane.update(param1,param2); + this.armyPane.x = int(width / 2 - this.armyPane.width / 2); + this.armyPane.y = int(height / 2 - this.armyPane.height / 2); + } + + private function useJunshiStrategySucc(param1:StrategyEvent) : void + { + if(param1.result == ReturnBean.STATUS_0) + { + this.listArmyOut(); + if(Boolean(this.armyPane) && contains(this.armyPane)) + { + removeChild(this.armyPane); + } + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/warreport/UnionMilitary.as b/flash_decompiled/com/view/ui/warreport/UnionMilitary.as new file mode 100644 index 0000000..7aafaef --- /dev/null +++ b/flash_decompiled/com/view/ui/warreport/UnionMilitary.as @@ -0,0 +1,99 @@ +package com.view.ui.warreport +{ + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.view.newui.UITable; + import com.view.ui.BaseUI; + import com.view.ui.warreport.mc.UnionMilitaryItem; + import flash.display.Sprite; + + public class UnionMilitary extends BaseUI + { + + private var bg:Sprite; + + private var tableMc:UITable; + + private var miliVec:Vector.; + + public function UnionMilitary() + { + var _loc1_:Array = null; + var _loc2_:Array = null; + var _loc4_:UnionMilitaryItem = null; + super(); + _loc1_ = ["攻方君主","所属联盟","状态","敌方城池","盟友城池","剩余时间","操作"]; + _loc2_ = [100,100,50,100,100,100,85]; + this.tableMc = new UITable(); + this.tableMc.lineHeight = 26; + this.tableMc.drawLine = true; + this.tableMc.install(12,_loc1_,_loc2_); + addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.miliVec = new Vector.(); + var _loc3_:int = 0; + while(_loc3_ < 12) + { + _loc4_ = new UnionMilitaryItem(); + this.miliVec.push(_loc4_); + _loc4_.y = 26 + _loc3_ * 24; + _loc4_.x = 4; + this.tableMc.addChild(_loc4_); + _loc3_++; + } + } + + override public function setPosition() : void + { + } + + public function addEvent() : void + { + ConnectService.getInstance().addEventListener(BattleEvent.B_listUnionArmyOut,this.getGuildMilitarySucc); + this.listArmyOut(); + } + + public function clearEvent() : void + { + ConnectService.getInstance().removeEventListener(BattleEvent.B_listUnionArmyOut,this.getGuildMilitarySucc); + } + + private function listArmyOut() : void + { + ConnectService.getInstance().battleService.getGuildMilitaryMessage(); + } + + private function getGuildMilitarySucc(param1:BattleEvent) : void + { + var _loc3_:* = undefined; + var _loc2_:Array = param1.list; + if(_loc2_ == null || _loc2_.length == 0) + { + this.clearList(); + return; + } + for(_loc3_ in this.miliVec) + { + if(_loc2_[_loc3_]) + { + this.miliVec[_loc3_].setDate(_loc2_[_loc3_]); + } + else + { + this.miliVec[_loc3_].setDate(null); + } + } + } + + private function clearList() : void + { + var _loc1_:UnionMilitaryItem = null; + for each(_loc1_ in this.miliVec) + { + _loc1_.setDate(null); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/warreport/mc/ArmyItem.as b/flash_decompiled/com/view/ui/warreport/mc/ArmyItem.as new file mode 100644 index 0000000..51fe7e6 --- /dev/null +++ b/flash_decompiled/com/view/ui/warreport/mc/ArmyItem.as @@ -0,0 +1,113 @@ +package com.view.ui.warreport.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ArmyItem extends Sprite + { + + private var bg1:Sprite; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var css:TextFormat; + + public var obj:Object; + + public function ArmyItem() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,295,24); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,62); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,60); + addChild(this.value1); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + this.value1.y = 4; + this.value2.x = this.value1.x + this.value1.width; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value2.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + } + + 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, param2:int = 1) : void + { + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + return; + } + if(param2 == 1) + { + this.value1.htmlText = this.obj.name; + this.value2.text = this.obj.level; + this.value3.text = this.obj.hpStatus; + this.value4.text = this.obj.armyName; + this.value5.text = this.obj.armyNum; + } + else + { + this.value1.htmlText = "未知"; + this.value2.text = "未知"; + this.value3.text = "未知"; + this.value4.text = "未知"; + this.value5.text = "未知"; + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/warreport/mc/PersonalMilitaryItem.as b/flash_decompiled/com/view/ui/warreport/mc/PersonalMilitaryItem.as new file mode 100644 index 0000000..bda24c3 --- /dev/null +++ b/flash_decompiled/com/view/ui/warreport/mc/PersonalMilitaryItem.as @@ -0,0 +1,352 @@ +package com.view.ui.warreport.mc +{ + import com.common.DateUtil; + import com.common.PublicGlow; + import com.common.PublicMethod; + import com.data.MemeberShip; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.battle.BattleViewUI; + import com.view.ui.province.ITimeObject; + import com.view.ui.province.TimeType; + import com.view.ui.province.TimerManager; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class PersonalMilitaryItem extends Sprite implements ITimeObject + { + + private var bg1:Sprite; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var css:TextFormat; + + private var btn1:UISmallBtn; + + private var btn2:UISmallBtn; + + private var junshiText:TextField; + + private var junshiMc:Sprite; + + public var obj:Object; + + private var colorFlag:Boolean = false; + + private const LVEDUO:String = "掠夺"; + + private const TAOFA:String = "讨伐"; + + private const XIEFANG:String = "协防"; + + private const PAIQIAN:String = "派遣"; + + private const DANTIAO:String = "单挑"; + + private const CUIHUI:String = "摧毁"; + + private var colorStart:String = ""; + + private var colorEnd:String = ""; + + private var outType:String; + + private var time:int; + + private var _endTime:Number; + + private var _combatId:String; + + private var atkOutId:int; + + public var updateFunc:Function; + + public var viewArmyFunc:Function; + + public function PersonalMilitaryItem() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,624,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.value1 = PublicMethod.getTextFieldWithFillter(16777215,52); + this.value2 = PublicMethod.getTextFieldWithFillter(16777215,150); + this.value3 = PublicMethod.getTextFieldWithFillter(16777215,84); + this.junshiText = PublicMethod.getTextField(16777215,54); + this.junshiMc = new Sprite(); + this.junshiMc.addChild(this.junshiText); + this.value4 = PublicMethod.getTextFieldWithFillter(16777215,153); + this.value5 = PublicMethod.getTextFieldWithFillter(16777215,68); + addChild(this.value1); + addChild(this.value2); + addChild(this.value3); + addChild(this.junshiMc); + addChild(this.value4); + addChild(this.value5); + this.value1.y = 4; + this.value2.x = this.value1.x + this.value1.width; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width + 4; + this.value3.y = this.value1.y; + this.junshiMc.x = this.value3.x + 30; + this.junshiMc.y = this.value3.y; + this.junshiMc.visible = false; + this.junshiText.htmlText = "查看策略"; + this.junshiText.filters = [PublicGlow.getInstance().blackGlow]; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.btn1 = new UISmallBtn("操作",2); + this.btn2 = new UISmallBtn("观战",2); + this.btn1.visible = false; + this.btn2.visible = false; + addChild(this.btn1); + addChild(this.btn2); + this.btn1.x = this.value5.x + this.value5.width + 5; + this.btn1.y = 2; + this.btn2.x = this.value5.x + this.value5.width + 60; + this.btn2.y = 2; + this.btn1.onClick = this.lookAttackOut; + this.btn2.onClick = this.viewCombat; + this.css = PublicMethod.getCenterTextFormat(); + } + + 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 + { + var _loc2_:Array = null; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:int = 0; + var _loc10_:String = null; + this.obj = param1; + if(this.obj == null) + { + this.bg1.visible = false; + this.btn1.visible = false; + this.btn2.visible = false; + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.junshiMc.visible = false; + this.clear(); + return; + } + if((String(this.obj.outType) == this.TAOFA || String(this.obj.outType) == this.LVEDUO || String(this.obj.outType) == this.CUIHUI) && String(this.obj.targetCasName) == MemeberShip.getMainCastle().casName) + { + this.colorFlag = true; + } + else + { + this.colorFlag = false; + } + this.value1.htmlText = this.colorFlag ? this.colorStart + String(this.obj.outType) + this.colorEnd : String(this.obj.outType); + this.value2.htmlText = this.colorFlag ? this.colorStart + String(this.obj.userName) + this.colorEnd : String(this.obj.userName); + this.outType = String(this.obj.outType); + if(this.obj.direction == "go") + { + this.value3.htmlText = this.colorFlag ? this.colorStart + "前往" + this.colorEnd : "前往"; + this.time = this.obj.diffTime; + if(this.time > 0) + { + TimerManager.getInstance().addTime(this); + } + } + else if(this.obj.direction == "stay") + { + this.value3.htmlText = "驻守"; + this.value5.htmlText = "-:-:-:-"; + this.time = 0; + } + else + { + this.value3.htmlText = this.colorFlag ? this.colorStart + "返回" + this.colorEnd : "返回"; + this.time = this.obj.diffTime; + if(this.time > 0) + { + TimerManager.getInstance().addTime(this); + } + } + this._endTime = DateUtil.getEndTime(this.time); + this.value4.htmlText = this.colorFlag ? this.colorStart + String(this.obj.targetCasName) + this.colorEnd : String(this.obj.targetCasName); + if(this.obj.combatId == null) + { + this.btn2.setUnEnable(); + this._combatId = ""; + } + else + { + this._combatId = this.obj.combatId; + this.btn2.setEnable(); + } + if(this.obj.junshi) + { + _loc2_ = this.obj.junshi; + _loc3_ = 0; + _loc4_ = 0; + _loc5_ = 0; + _loc6_ = 0; + _loc7_ = 0; + _loc8_ = 0; + for each(_loc9_ in _loc2_) + { + if(_loc9_ == 1) + { + _loc3_++; + } + if(_loc9_ == 2) + { + _loc4_++; + } + if(_loc9_ == 4) + { + _loc5_++; + } + if(_loc9_ == 5) + { + _loc6_++; + } + if(_loc9_ == 6) + { + _loc7_++; + } + if(_loc9_ == 7) + { + _loc8_++; + } + } + _loc10_ = ""; + if(_loc3_ > 0) + { + _loc10_ = "已使用“强行”策略" + _loc3_ + "
"; + } + if(_loc4_ > 0) + { + _loc10_ = _loc10_ + "已使用“阻路”策略" + _loc4_ + "
"; + } + if(_loc5_ > 0) + { + _loc10_ = _loc10_ + "已使用“迫战”策略" + _loc5_ + "
"; + } + if(_loc6_ > 0) + { + _loc10_ = _loc10_ + "已使用“逃脱”策略" + _loc6_ + "
"; + } + if(_loc7_ > 0) + { + _loc10_ = _loc10_ + "已使用“瞭望”策略" + _loc7_ + "
"; + } + if(_loc8_ > 0) + { + _loc10_ = _loc10_ + "已使用“潜行”策略" + _loc8_ + "
"; + } + if(_loc2_.length > 0) + { + this.junshiMc.visible = true; + ToolTipManager.getInstance().setToolTip(this.junshiMc,new TxtTooltip(_loc10_)); + } + } + else + { + this.junshiMc.visible = false; + } + this.atkOutId = this.obj.atkOutId; + this.value1.setTextFormat(this.css); + this.value2.setTextFormat(this.css); + this.value4.setTextFormat(this.css); + this.value5.setTextFormat(this.css); + this.btn1.visible = true; + this.btn2.visible = true; + } + + public function clear() : void + { + TimerManager.getInstance().removeTime(this); + } + + public function carryOut() : void + { + this.time = DateUtil.distanceSeconds(this._endTime); + if(this.time <= 0) + { + this.value5.htmlText = ""; + if(this.updateFunc != null) + { + this.updateFunc(); + } + } + else + { + this.value5.htmlText = this.colorFlag ? this.colorStart + PublicMethod.getTime(this.time) + this.colorEnd : PublicMethod.getTime(this.time); + this.value5.setTextFormat(this.css); + } + } + + public function getTime() : int + { + return this.time; + } + + public function getTimeType() : TimeType + { + return TimeType.COUNT_DOWN; + } + + private function lookAttackOut(param1:MouseEvent) : void + { + if(this.viewArmyFunc != null) + { + this.viewArmyFunc(this.atkOutId,this.time); + } + } + + private function viewCombat(param1:MouseEvent) : void + { + var _loc2_:BattleViewUI = null; + if(Boolean(this._combatId) && this._combatId != "") + { + _loc2_ = BattleViewUI.getInstance(); + _loc2_.showUI(this._combatId); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/warreport/mc/UnionMilitaryItem.as b/flash_decompiled/com/view/ui/warreport/mc/UnionMilitaryItem.as new file mode 100644 index 0000000..69368d4 --- /dev/null +++ b/flash_decompiled/com/view/ui/warreport/mc/UnionMilitaryItem.as @@ -0,0 +1,135 @@ +package com.view.ui.warreport.mc +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.ui.training.SoldierFirstView; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class UnionMilitaryItem extends Sprite + { + + private var bg1:Sprite; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var value6:TextField; + + private var css:TextFormat; + + private var helpBtn:UISmallBtn; + + public var obj:Object; + + public function UnionMilitaryItem() + { + super(); + this.bg1 = PublicMethod.createShape(UIConfig.overBgColor,624,25); + this.bg1.alpha = 0.2; + addChild(this.bg1); + this.bg1.visible = false; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver); + this.value1 = PublicMethod.getTextFieldWithFillter(16711680,100); + this.value2 = PublicMethod.getTextFieldWithFillter(16711680,100); + this.value3 = PublicMethod.getTextFieldWithFillter(16711680,50); + this.value4 = PublicMethod.getTextFieldWithFillter(16711680,100); + this.value5 = PublicMethod.getTextFieldWithFillter(16711680,100); + this.value6 = PublicMethod.getTextFieldWithFillter(16711680,100); + addChild(this.value1); + addChild(this.value2); + addChild(this.value3); + addChild(this.value4); + addChild(this.value5); + addChild(this.value6); + this.value1.y = 4; + this.value2.x = this.value1.x + this.value1.width; + this.value2.y = this.value1.y; + this.value3.x = this.value2.x + this.value2.width; + this.value3.y = this.value1.y; + this.value4.x = this.value3.x + this.value3.width; + this.value4.y = this.value1.y; + this.value5.x = this.value4.x + this.value4.width; + this.value5.y = this.value1.y; + this.value6.x = this.value5.x + this.value5.width; + this.value6.y = this.value1.y; + this.helpBtn = new UISmallBtn("增援",2); + addChild(this.helpBtn); + this.helpBtn.y = 2; + this.helpBtn.x = this.value6.x + this.value6.width + 10; + this.helpBtn.visible = false; + this.helpBtn.onClick = this.zengYuan; + this.css = PublicMethod.getCenterTextFormat(); + this.value1.defaultTextFormat = this.css; + this.value2.defaultTextFormat = this.css; + this.value3.defaultTextFormat = this.css; + this.value4.defaultTextFormat = this.css; + this.value5.defaultTextFormat = this.css; + this.value6.defaultTextFormat = this.css; + } + + 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 + { + this.obj = param1; + if(this.obj == null) + { + this.value1.text = ""; + this.value2.text = ""; + this.value3.text = ""; + this.value4.text = ""; + this.value5.text = ""; + this.value6.text = ""; + this.helpBtn.visible = false; + } + else + { + this.value1.text = this.obj.atkUserName; + this.value2.text = this.obj.atkLeague == null ? "" : this.obj.atkLeague; + this.value3.text = this.obj.type; + this.value4.text = this.obj.aniCasName; + this.value5.text = this.obj.leagueCastleName; + this.value6.text = PublicMethod.getTime(int(this.obj.time)); + this.helpBtn.visible = true; + } + } + + private function zengYuan(param1:MouseEvent) : void + { + var _loc2_:SoldierFirstView = null; + if(this.obj) + { + _loc2_ = SoldierFirstView.getInstance(); + _loc2_.sendArmy(this.obj.leagueCastleName,this.obj.leagueCastlePosX,this.obj.leagueCastlePosY); + _loc2_.show(); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/wuguan/PracLineMc.as b/flash_decompiled/com/view/ui/wuguan/PracLineMc.as new file mode 100644 index 0000000..3feb944 --- /dev/null +++ b/flash_decompiled/com/view/ui/wuguan/PracLineMc.as @@ -0,0 +1,118 @@ +package com.view.ui.wuguan +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.ui.hero.HeroConst; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFormat; + + public class PracLineMc extends Sprite + { + + private var label1:TextField; + + private var label2:TextField; + + private var label3:TextField; + + private var label4:TextField; + + private var bg:Sprite; + + private var css:TextFormat; + + private var type:int; + + private var heroObj:Object; + + public function PracLineMc() + { + super(); + this.css = PublicMethod.getCenterTextFormat(); + this.bg = PublicMethod.createShape(898990,308,24); + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + this.label4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,80); + addChild(this.label1); + addChild(this.label2); + addChild(this.label3); + addChild(this.label4); + this.label1.y = 3; + this.label2.x = this.label1.width; + this.label2.y = this.label1.y; + this.label3.x = this.label2.x + this.label2.width; + this.label3.y = this.label1.y; + this.label4.x = this.label3.x + this.label3.width; + this.label4.y = this.label1.y; + var _loc1_:Sprite = PublicMethod.getTrLine(308); + addChild(_loc1_); + _loc1_.x = 4; + addChild(this.bg); + this.bg.alpha = 0.3; + this.bg.x = 4; + } + + public function setInfo(param1:Object, param2:int = 1) : void + { + this.heroObj = param1; + this.type = param2; + if(this.heroObj == null) + { + this.bg.visible = false; + this.label1.text = ""; + this.label2.text = ""; + this.label3.text = ""; + this.label4.text = ""; + } + else + { + this.bg.visible = true; + this.label1.htmlText = this.heroObj.name; + this.label1.setTextFormat(this.css); + this.label2.text = HeroConst.changeName(this.heroObj.heroLevel,this.heroObj.changeCount); + this.label2.setTextFormat(this.css); + if(this.type == 4) + { + this.label4.text = this.heroObj.noMoney; + this.label3.text = this.heroObj.noExp; + } + else + { + this.label4.text = this.heroObj.seMoney; + this.label3.text = this.heroObj.seExp; + } + this.label3.setTextFormat(this.css); + this.label4.setTextFormat(this.css); + } + } + + public function getCostCount(param1:int) : int + { + var _loc2_:int = 0; + var _loc3_:int = 0; + if(this.type == 4) + { + _loc3_ = int(this.heroObj.noMoney); + _loc2_ = int(this.heroObj.noExp); + } + else + { + _loc3_ = int(this.heroObj.seMoney); + _loc2_ = int(this.heroObj.seExp); + } + this.label3.text = String(_loc2_ * param1); + this.label3.setTextFormat(this.css); + this.label4.text = String(_loc3_ * param1); + this.label4.setTextFormat(this.css); + return _loc3_ * param1; + } + + public function getObj() : Object + { + return this.heroObj; + } + } +} + diff --git a/flash_decompiled/com/view/ui/wuguan/PracticeUI.as b/flash_decompiled/com/view/ui/wuguan/PracticeUI.as new file mode 100644 index 0000000..c7f442b --- /dev/null +++ b/flash_decompiled/com/view/ui/wuguan/PracticeUI.as @@ -0,0 +1,256 @@ +package com.view.ui.wuguan +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.mc.sprite.PageInputMc; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + 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.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class PracticeUI extends UIWindowBg + { + + private var bg:Sprite; + + private var titleMc:MovieClip; + + private var tableMc:UITable; + + private var label4:TextField; + + private var label6:TextField; + + private var input:PageInputMc; + + private var needMoney:TextField; + + private var scrollPane:ScrollPane; + + private var heroListMc:Sprite; + + private var heroListVec:Vector.; + + private var heroList:Array; + + private var type:int; + + public function PracticeUI() + { + var _loc1_:Array = null; + var _loc6_:Sprite = null; + var _loc8_:PracLineMc = null; + this.heroListVec = new Vector.(); + super(); + initSize(125,250); + loadTitle(UITitleConfig.title_wujiangxiulian); + addCloseBtn(); + initBg(); + _loc1_ = ["武将名称","武将等级","预计获得经验","消耗铜币"]; + var _loc2_:Array = [80,80,80,80]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(6,_loc1_,_loc2_); + bg1.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(315,150); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + bg1.addChild(this.scrollPane); + this.scrollPane.x = 5; + this.scrollPane.y = 29; + this.heroListMc = new Sprite(); + this.scrollPane.source = this.heroListMc; + var _loc3_:int = 0; + while(_loc3_ < 6) + { + _loc8_ = new PracLineMc(); + this.heroListVec.push(_loc8_); + this.heroListMc.addChild(_loc8_); + _loc8_.y = _loc3_ * 25; + _loc3_++; + } + this.scrollPane.update(); + addEventListener(Event.REMOVED_FROM_STAGE,this.delEvent,false,0,true); + this.label6 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.label6.text = "消耗铜币:"; + bg1.addChild(this.label6); + this.label6.x = 2; + this.label6.y = this.tableMc.y + this.tableMc.height + 8; + this.needMoney = PublicMethod.getTextField(16777215,90); + bg1.addChild(this.needMoney); + this.needMoney.x = this.label6.x + this.label6.width; + this.needMoney.y = this.label6.y; + this.needMoney.text = "0"; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc4_.text = "修炼时间:"; + bg1.addChild(_loc4_); + _loc4_.x = 109; + _loc4_.y = this.label6.y; + this.input = new PageInputMc(); + bg1.addChild(this.input); + this.input.x = _loc4_.x + _loc4_.width; + this.input.y = this.label6.y + 2; + this.input.setMinNum(1); + this.input.setMaxLen(2); + this.input.getInputText().addEventListener(Event.CHANGE,this.numsChange1,false,0,true); + this.input.getLeftBtn().addEventListener(MouseEvent.CLICK,this.numsChange2,false,0,true); + this.input.getRightBtn().addEventListener(MouseEvent.CLICK,this.numsChange2,false,0,true); + var _loc5_:UIButton = new UIButton("修 炼",2,10); + bg1.addChild(_loc5_); + _loc5_.x = this.input.x + this.input.width + 5; + --this.label6.y; + _loc5_.onClick = this.pracHero; + _loc6_ = PublicMethod.getTrLine(300); + bg1.addChild(_loc6_); + _loc6_.x = 5; + _loc6_.y = this.label6.y + 30; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,310); + _loc7_.wordWrap = true; + _loc7_.multiline = true; + _loc7_.height = 90; + _loc7_.text = "普通修炼每次的最长修炼时间为10小时,消耗一定量的铜币;高级修炼每次最长修炼时间为24小时,消耗一定量的元宝,高级修炼有一定的额外经验奖励。"; + bg1.addChild(_loc7_); + _loc7_.x = 4; + _loc7_.y = _loc6_.y + 5; + } + + private function closeUI(param1:MouseEvent) : void + { + if(Boolean(parent) && parent.contains(this)) + { + parent.removeChild(this); + } + } + + public function setHeroObj(param1:Array, param2:int) : void + { + var _loc3_:* = undefined; + var _loc4_:PracLineMc = null; + this.type = param2; + this.clear(); + this.heroList = param1; + for(_loc3_ in this.heroList) + { + if(_loc3_ < 6) + { + this.heroListVec[_loc3_].setInfo(this.heroList[_loc3_],this.type); + } + else + { + _loc4_ = new PracLineMc(); + this.heroListVec.push(_loc4_); + this.heroListMc.addChild(_loc4_); + _loc4_.y = _loc3_ * 25; + _loc4_.setInfo(this.heroList[_loc3_],this.type); + } + } + this.scrollPane.verticalScrollPosition = 0; + this.scrollPane.update(); + this.setInfoByType(); + } + + private function setInfoByType() : void + { + var _loc1_:Array = null; + var _loc2_:Array = null; + this.input.setText(1); + if(this.type == 4) + { + _loc1_ = ["武将名称","武将等级","预计获得经验","耗费铜币"]; + _loc2_ = [80,80,80,80]; + this.tableMc.install(6,_loc1_,_loc2_); + this.label6.text = "消耗铜币:"; + this.input.setMaxNum(10); + } + else + { + _loc1_ = ["武将名称","武将等级","预计获得经验","耗费元宝"]; + _loc2_ = [80,80,80,80]; + this.tableMc.install(6,_loc1_,_loc2_); + this.label6.text = "消耗元宝:"; + this.input.setMaxNum(24); + } + this.getMoneyCount(); + } + + private function numsChange1(param1:Event) : void + { + this.getMoneyCount(); + } + + private function numsChange2(param1:MouseEvent) : void + { + this.getMoneyCount(); + } + + private function getMoneyCount() : void + { + var _loc2_:int = 0; + var _loc3_:PracLineMc = null; + var _loc1_:int = this.input.getText(); + for each(_loc3_ in this.heroListVec) + { + if(_loc3_.getObj() != null) + { + _loc2_ += _loc3_.getCostCount(_loc1_); + } + } + this.needMoney.text = _loc2_.toString(); + } + + private function delEvent(param1:Event) : void + { + this.clear(); + } + + private function clear() : void + { + var _loc1_:* = int(this.heroListVec.length - 1); + while(_loc1_ >= 0) + { + if(_loc1_ > 5) + { + this.heroListMc.removeChild(this.heroListVec[_loc1_]); + this.heroListVec.splice(_loc1_,1); + } + else + { + this.heroListVec[_loc1_].setInfo(null); + } + _loc1_--; + } + this.scrollPane.update(); + } + + private function pracHero(param1:MouseEvent) : void + { + var _loc4_:* = undefined; + var _loc5_:Object = null; + var _loc2_:int = this.input.getText(); + if(this.heroList == null || this.heroList.length < 1) + { + return; + } + var _loc3_:Array = new Array(); + for(_loc4_ in this.heroList) + { + _loc3_.push(this.heroList[_loc4_].heroId); + } + _loc5_ = new Object(); + _loc5_.heroIdList = _loc3_; + ConnectService.getInstance().heroService.heroActPractice(_loc5_,_loc2_,this.type); + this.closeUI(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/wuguan/WuguanBuild.as b/flash_decompiled/com/view/ui/wuguan/WuguanBuild.as new file mode 100644 index 0000000..3471e66 --- /dev/null +++ b/flash_decompiled/com/view/ui/wuguan/WuguanBuild.as @@ -0,0 +1,60 @@ +package com.view.ui.wuguan +{ + import com.comfig.CommonData; + import com.view.UIListManage; + import com.view.ui.BaseBuild; + import com.view.ui.BuildData; + + public class WuguanBuild extends BaseBuild + { + + public function WuguanBuild(param1:BuildData) + { + super(); + super.buildData = param1; + if(param1 == null) + { + buildData = new BuildData(-20,20,""); + buildData.swfUrl = "pic/build/WuguanView1.swf"; + super.loadSwfBg(); + } + } + + override public function setBuildRes() : void + { + this.checkBuildRes(); + super.addEvent(); + } + + override public function checkBuildRes() : void + { + if(castleBuild.level >= CommonData.build_level_2) + { + buildData.swfUrl = "pic/build/WuguanView3.swf"; + buildData.picUrl = "pic/build/WuguanView3.png"; + } + else if(castleBuild.level >= CommonData.build_level_1) + { + buildData.swfUrl = "pic/build/WuguanView2.swf"; + buildData.picUrl = "pic/build/WuguanView2.png"; + } + else + { + buildData.swfUrl = "pic/build/WuguanView1.swf"; + buildData.picUrl = "pic/build/WuguanView1.png"; + } + super.checkBuildRes(); + } + + override public function openBuildUI() : void + { + if(buildUI == null) + { + buildUI = new WuguanBuildUI(this); + } + buildUI.loadUiData(); + UIListManage.getInstance().addUI(buildUI); + } + } +} + diff --git a/flash_decompiled/com/view/ui/wuguan/WuguanBuildUI.as b/flash_decompiled/com/view/ui/wuguan/WuguanBuildUI.as new file mode 100644 index 0000000..a57f34d --- /dev/null +++ b/flash_decompiled/com/view/ui/wuguan/WuguanBuildUI.as @@ -0,0 +1,357 @@ +package com.view.ui.wuguan +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITable; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseBuild; + import com.view.ui.BaseUI; + import com.view.ui.message.MessageBoxUI; + import fl.containers.ScrollPane; + import fl.controls.ScrollPolicy; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class WuguanBuildUI extends BaseUI + { + + private var bg2:Sprite; + + private var scrollPane:ScrollPane; + + private var heroListMc:Sprite; + + private var heroLineMc:Vector.; + + private var tableMc:UITable; + + private var heroList:Array; + + private var selectHeroList:Array = new Array(); + + private var practiceUI:PracticeUI; + + public function WuguanBuildUI(param1:BaseBuild) + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_xiulianguan); + super.setPosition(); + super.setBuild(param1); + this.createUI(); + } + + override public function createUI() : void + { + super.createUI(); + this.createCurUI(); + } + + public function createCurUI() : void + { + var _loc1_:UIWindowBg = null; + var _loc5_:UIButton = null; + var _loc6_:UIButton = null; + var _loc9_:UIButton = null; + var _loc10_:UIButton = null; + var _loc11_:WuguanHeroMc = null; + _loc1_ = new UIWindowBg(); + _loc1_.initThirdPanel(622,298); + bigBg.addChild(_loc1_); + _loc1_.x = 4; + _loc1_.y = 98; + var _loc2_:Array = ["武 将","等级","状 态","经验","时间","修炼时间","已获经验","操作"]; + var _loc3_:Array = [120,70,70,65,65,65,85,87]; + this.tableMc = new UITable(); + this.tableMc.drawLine = false; + this.tableMc.install(10,_loc2_,_loc3_); + _loc1_.addChild(this.tableMc); + this.tableMc.x = 4; + this.tableMc.y = 4; + this.scrollPane = new ScrollPane(); + this.scrollPane.setSize(623,250); + this.scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF; + this.tableMc.addChild(this.scrollPane); + this.scrollPane.x = 1; + this.scrollPane.y = 25; + this.heroListMc = new Sprite(); + this.scrollPane.source = this.heroListMc; + this.heroLineMc = new Vector.(); + var _loc4_:int = 0; + while(_loc4_ < 10) + { + _loc11_ = new WuguanHeroMc(); + this.heroLineMc.push(_loc11_); + this.heroListMc.addChild(_loc11_); + _loc11_.y = _loc4_ * 25; + _loc4_++; + } + this.scrollPane.update(); + _loc5_ = new UIButton("全部选中",2,10); + _loc6_ = new UIButton("全部取消",2,10); + var _loc7_:UIButton = new UIButton("全部停止",2,10); + var _loc8_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,260); + _loc8_.text = "高级修炼不满15分钟不得经验,返还全部元宝。"; + _loc9_ = new UIButton("修 炼",2,10); + _loc10_ = new UIButton("高级修炼",2,10); + _loc1_.addChild(_loc5_); + _loc1_.addChild(_loc6_); + _loc1_.addChild(_loc7_); + _loc1_.addChild(_loc8_); + _loc1_.addChild(_loc9_); + _loc1_.addChild(_loc10_); + _loc5_.x = 4; + _loc5_.y = 281; + _loc6_.x = _loc5_.x + _loc5_.width + 10; + _loc6_.y = _loc5_.y; + _loc7_.x = _loc6_.x + _loc6_.width + 10; + _loc7_.y = _loc5_.y; + _loc8_.x = _loc7_.x + _loc7_.width + 10; + _loc8_.y = _loc5_.y + 2; + _loc9_.x = _loc8_.x + _loc8_.width; + _loc9_.y = _loc5_.y; + _loc10_.x = _loc9_.x + _loc9_.width + 10; + _loc10_.y = _loc5_.y; + _loc5_.onClick = this.selectAllEvent; + _loc6_.onClick = this.cancelAllEvent; + _loc7_.onClick = this.stopAllEvent; + _loc9_.onClick = this.practiceEvent; + _loc10_.onClick = this.superPracticeEvent; + } + + override public function loadUiData() : void + { + super.loadUiData(); + this.loadLocalData(); + } + + override public function loadLocalData() : void + { + ConnectService.getInstance().heroService.getHeroPracticeVoList(); + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + super.addBuildEvent(); + ConnectService.getInstance().addEventListener(HeroEvent.WUGUAN_VIEW,this.wuguanViewResult); + ConnectService.getInstance().addEventListener(HeroEvent.WUGUAN_PRACTICE_START,this.newPracticeResult); + ConnectService.getInstance().addEventListener(HeroEvent.WUGUAN_PRACTICE_STOP,this.stopPracticeResult); + } + + override public function removeFromStage(param1:Event) : void + { + super.removeFromStage(param1); + super.delBuildEvent(); + ConnectService.getInstance().removeEventListener(HeroEvent.WUGUAN_VIEW,this.wuguanViewResult); + ConnectService.getInstance().removeEventListener(HeroEvent.WUGUAN_PRACTICE_START,this.newPracticeResult); + ConnectService.getInstance().removeEventListener(HeroEvent.WUGUAN_PRACTICE_STOP,this.stopPracticeResult); + this.clearHeroList(); + if(Boolean(this.practiceUI) && contains(this.practiceUI)) + { + removeChild(this.practiceUI); + } + } + + private function wuguanViewResult(param1:HeroEvent) : void + { + var _loc2_:* = undefined; + var _loc3_:WuguanHeroMc = null; + this.heroList = param1.heroObj.heroList; + this.clearHeroList(); + if(this.heroList != null && this.heroList.length > 0) + { + for(_loc2_ in this.heroList) + { + if(_loc2_ > 8) + { + _loc3_ = new WuguanHeroMc(); + this.heroListMc.addChild(_loc3_); + _loc3_.y = 25 * _loc2_; + _loc3_.setHero(this.heroList[_loc2_]); + this.heroLineMc.push(_loc3_); + } + else + { + this.heroLineMc[_loc2_].setHero(this.heroList[_loc2_]); + } + } + } + this.scrollPane.update(); + } + + private function newPracticeResult(param1:HeroEvent) : void + { + ConnectService.getInstance().heroService.getHeroPracticeVoList(); + } + + private function stopPracticeResult(param1:HeroEvent) : void + { + var _loc3_:WuguanHeroMc = null; + var _loc4_:* = undefined; + var _loc2_:Array = param1.heroList; + for each(_loc3_ in this.heroLineMc) + { + if(Boolean(_loc3_.getHero()) && _loc3_.getRuning()) + { + for(_loc4_ in _loc2_) + { + if(_loc3_.getHero().heroId == _loc2_[_loc4_]) + { + _loc3_.stop(); + break; + } + } + } + } + ConnectService.getInstance().heroService.getHeroPracticeVoList(); + } + + private function clearHeroList() : void + { + var _loc1_:* = int(this.heroLineMc.length - 1); + while(_loc1_ >= 0) + { + if(Boolean(this.heroLineMc[_loc1_].getHero()) && this.heroLineMc[_loc1_].getRuning()) + { + this.heroLineMc[_loc1_].stop(); + } + if(_loc1_ > 9) + { + this.heroLineMc[_loc1_].clear(); + this.heroListMc.removeChild(this.heroLineMc[_loc1_]); + this.heroLineMc.splice(_loc1_,1); + } + else + { + this.heroLineMc[_loc1_].setHero(null); + } + _loc1_--; + } + this.scrollPane.update(); + } + + private function selectAllEvent(param1:MouseEvent) : void + { + var _loc2_:WuguanHeroMc = null; + for each(_loc2_ in this.heroLineMc) + { + if(_loc2_.getHero() != null && !_loc2_.getRuning()) + { + _loc2_.setSelectd(true); + } + } + } + + private function cancelAllEvent(param1:MouseEvent) : void + { + var _loc2_:WuguanHeroMc = null; + for each(_loc2_ in this.heroLineMc) + { + if(_loc2_.getHero() != null && !_loc2_.getRuning()) + { + _loc2_.setSelectd(false); + } + } + } + + private function stopAllEvent(param1:MouseEvent) : void + { + MessageBoxUI.getInstance().confirmMsg("是否全部停止修炼?",this.configStopAll); + } + + private function configStopAll() : void + { + var _loc3_:WuguanHeroMc = null; + var _loc1_:Object = new Object(); + var _loc2_:Array = new Array(); + for each(_loc3_ in this.heroLineMc) + { + if(_loc3_.getHero() != null && _loc3_.getRuning()) + { + _loc2_.push(_loc3_.getHero().heroId); + } + } + if(_loc2_.length > 0) + { + _loc1_.heroIdList = _loc2_; + ConnectService.getInstance().heroService.stopHeroPractice(_loc1_); + } + else + { + MessageBoxUI.getInstance().addMessage("没有正在修炼中的武将"); + } + } + + private function addPracticeUI() : void + { + if(this.practiceUI == null) + { + this.practiceUI = new PracticeUI(); + this.practiceUI.x = int(realUIWidth / 2 - this.practiceUI.width / 2); + this.practiceUI.y = int(realUIheight / 2 - this.practiceUI.height / 2); + } + if(!contains(this.practiceUI)) + { + addChild(this.practiceUI); + } + } + + private function practiceEvent(param1:MouseEvent) : void + { + var _loc2_:WuguanHeroMc = null; + if(this.selectHeroList != null && this.selectHeroList.length > 0) + { + this.selectHeroList = new Array(); + } + for each(_loc2_ in this.heroLineMc) + { + if(_loc2_.getHero() != null && !_loc2_.getRuning() && _loc2_.selected) + { + this.selectHeroList.push(_loc2_.getHero()); + } + } + if(this.selectHeroList.length > 0) + { + this.addPracticeUI(); + this.practiceUI.setHeroObj(this.selectHeroList,4); + } + else + { + MessageBoxUI.getInstance().addMessage("请先选中武将"); + } + } + + private function superPracticeEvent(param1:MouseEvent) : void + { + var _loc2_:WuguanHeroMc = null; + if(this.selectHeroList != null && this.selectHeroList.length > 0) + { + this.selectHeroList = new Array(); + } + for each(_loc2_ in this.heroLineMc) + { + if(_loc2_.getHero() != null && !_loc2_.getRuning() && _loc2_.selected) + { + this.selectHeroList.push(_loc2_.getHero()); + } + } + if(this.selectHeroList.length > 0) + { + this.addPracticeUI(); + this.practiceUI.setHeroObj(this.selectHeroList,5); + } + else + { + MessageBoxUI.getInstance().addMessage("请先选中武将"); + } + } + } +} + diff --git a/flash_decompiled/com/view/ui/wuguan/WuguanHeroMc.as b/flash_decompiled/com/view/ui/wuguan/WuguanHeroMc.as new file mode 100644 index 0000000..e92e2de --- /dev/null +++ b/flash_decompiled/com/view/ui/wuguan/WuguanHeroMc.as @@ -0,0 +1,408 @@ +package com.view.ui.wuguan +{ + import com.InstallFace; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.hero.event.HeroEvent; + import com.view.newui.UICheckBtn; + import com.view.newui.UIConfig; + import com.view.newui.UISmallBtn; + import com.view.tip.HeroTip; + import com.view.tip.TipTitle; + import com.view.ui.hero.HeroConst; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.utils.Timer; + + public class WuguanHeroMc extends Sprite + { + + private var bg:Sprite; + + private var face:InstallFace = InstallFace.getInstance(); + + private var centerCss:TextFormat; + + public var hero:Object; + + private var checkBox:UICheckBtn; + + public var selected:Boolean; + + private var clickBg:Sprite; + + private var pracBtn:UISmallBtn; + + private var heroTip:HeroTip; + + private var expTip:TipTitle; + + private var heroExpSp:Sprite; + + private var heroName:TextField; + + private var exp:TextField; + + private var level:TextField; + + private var time:TextField; + + private var pracTime:TextField; + + private var getExp:TextField; + + private var status:TextField; + + private var maxSeconds:int; + + private var currSeconds:int; + + private var timer:Timer; + + public function WuguanHeroMc() + { + super(); + var _loc1_:Sprite = PublicMethod.getTrLine(614); + addChild(_loc1_); + _loc1_.x = 3; + this.bg = PublicMethod.createShape(UIConfig.overBgColor,616,23); + addChild(this.bg); + this.bg.y = 1; + this.bg.x = 3; + this.bg.alpha = 0.3; + this.bg.visible = false; + this.clickBg = PublicMethod.createShape(UIConfig.selectBgColor,616,24); + this.clickBg.alpha = 0.3; + addChild(this.clickBg); + this.clickBg.visible = false; + this.clickBg.x = 3; + this.centerCss = PublicMethod.getCenterTextFormat(); + addEventListener(MouseEvent.ROLL_OUT,this.rollOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.rollOver,false,0,true); + addEventListener(MouseEvent.CLICK,this.clickMc,false,0,true); + this.checkBox = new UICheckBtn(); + addChild(this.checkBox); + this.checkBox.x = 4; + this.checkBox.y = 2; + this.checkBox.visible = false; + this.checkBox.setUnSelect(); + this.heroName = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,64); + addChild(this.heroName); + this.heroName.x = this.checkBox.x + this.checkBox.width; + this.heroName.y = 4; + this.level = PublicMethod.getTextFieldWithFillter(16777215,70); + addChild(this.level); + this.level.x = 120; + this.level.y = this.heroName.y; + this.status = PublicMethod.getTextFieldWithFillter(16777215,70); + addChild(this.status); + this.status.x = this.level.x + this.level.width; + this.status.y = this.heroName.y; + this.exp = PublicMethod.getTextFieldWithFillter(16777215,65); + addChild(this.exp); + this.exp.x = this.status.x + this.status.width; + this.exp.y = this.heroName.y; + this.heroExpSp = PublicMethod.createShape(16777215,65,18); + addChild(this.heroExpSp); + this.heroExpSp.x = this.exp.x; + this.heroExpSp.y = this.exp.y; + this.heroExpSp.alpha = 0; + this.expTip = new TipTitle(this.heroExpSp,this.face.stage,this.face.tip_bg,{"titletext":"经验"}); + this.time = PublicMethod.getTextFieldWithFillter(16777215,65); + addChild(this.time); + this.time.x = this.exp.x + this.exp.width; + this.time.y = this.heroName.y; + this.pracTime = PublicMethod.getTextFieldWithFillter(16777215,65); + addChild(this.pracTime); + this.pracTime.x = this.time.x + this.time.width; + this.pracTime.y = this.heroName.y; + this.getExp = PublicMethod.getTextFieldWithFillter(16777215,85); + addChild(this.getExp); + this.getExp.x = this.pracTime.x + this.pracTime.width; + this.getExp.y = this.heroName.y; + this.pracBtn = new UISmallBtn("停止修炼",3); + addChild(this.pracBtn); + this.pracBtn.x = this.getExp.x + this.getExp.width + 10; + this.pracBtn.y = 3; + this.pracBtn.visible = false; + this.pracBtn.onClick = this.stopPrac; + addEventListener(Event.ADDED_TO_STAGE,this.addEvent,false,0,true); + addEventListener(Event.REMOVED_FROM_STAGE,this.removeEvent,false,0,true); + } + + private function addEvent(param1:Event) : void + { + ConnectService.getInstance().addEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().addEventListener(HeroEvent.WUGUAN_PRACTICE_STOP,this.stopPracticeResult); + } + + private function removeEvent(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(HeroEvent.HERO_IMG_VIEW,this.getHeroImgTipView); + ConnectService.getInstance().removeEventListener(HeroEvent.WUGUAN_PRACTICE_STOP,this.stopPracticeResult); + } + + private function rollOut(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + if(this.getRuning()) + { + return; + } + if(!this.selected) + { + this.bg.visible = false; + } + } + + private function rollOver(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + if(this.getRuning()) + { + return; + } + if(!this.selected) + { + this.bg.visible = true; + } + } + + private function clickMc(param1:MouseEvent) : void + { + if(this.hero == null) + { + return; + } + if(this.getRuning()) + { + return; + } + if(this.selected) + { + this.selected = false; + this.checkBox.setUnSelect(); + } + else + { + this.selected = true; + this.checkBox.setSelect(); + } + this.clickBg.visible = this.selected; + this.bg.visible = !this.selected; + } + + public function setSelectd(param1:Boolean) : void + { + this.selected = param1; + if(this.selected) + { + this.checkBox.setSelect(); + } + else + { + this.bg.alpha = 0; + this.checkBox.setUnSelect(); + } + this.clickBg.visible = this.selected; + this.bg.visible = !this.selected; + } + + public function stop() : void + { + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.startFrame); + this.timer = null; + } + this.time.text = "---"; + this.pracTime.text = ""; + this.pracBtn.visible = false; + } + + public function setHero(param1:Object) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + if(Boolean(this.timer) && this.timer.running) + { + this.timer.stop(); + } + this.hero = param1; + if(this.hero == null) + { + this.checkBox.visible = false; + this.checkBox.setUnSelect(); + this.selected = false; + this.clickBg.visible = this.selected; + this.bg.visible = false; + this.heroName.text = ""; + this.exp.text = ""; + this.level.text = ""; + this.time.text = ""; + this.pracTime.text = ""; + this.getExp.text = ""; + this.status.text = ""; + this.pracBtn.visible = false; + this.heroExpSp.visible = false; + this.expTip.destroyTip(); + } + else + { + this.checkBox.visible = true; + this.checkBox.setUnSelect(); + this.selected = false; + this.clickBg.visible = this.selected; + this.bg.visible = false; + this.heroName.htmlText = this.hero.name; + this.heroName.setTextFormat(this.centerCss); + _loc2_ = int(this.hero.exp); + _loc3_ = int(this.hero.expLimit); + this.expTip.infoObject = {"titletext":"当前经验:" + _loc2_ + "/" + _loc3_ + " 还需 " + (_loc3_ - _loc2_) + " 经验升级"}; + this.exp.text = int(100 * _loc2_ / _loc3_) + "%"; + this.exp.setTextFormat(this.centerCss); + this.level.text = HeroConst.changeName(this.hero.heroLevel,this.hero.changeCount); + this.level.setTextFormat(this.centerCss); + this.currSeconds = this.hero.seconds; + this.maxSeconds = this.hero.maxSeconds; + this.pracTime.text = this.getHourStr(); + this.pracTime.setTextFormat(this.centerCss); + this.getExp.text = this.hero.getExp; + this.getExp.setTextFormat(this.centerCss); + this.status.text = this.hero.actionStatusChn; + this.status.setTextFormat(this.centerCss); + this.getTimerInfo(); + this.heroExpSp.visible = true; + } + } + + public function clear() : void + { + if(this.expTip) + { + this.expTip.destroyTip(); + this.expTip = null; + } + if(this.heroTip) + { + this.heroTip.destroyTip(); + this.heroTip = null; + } + } + + private function getHeroImgTip() : void + { + if(this.hero) + { + ConnectService.getInstance().heroService.getHeroPicView(this.hero.heroId); + } + } + + private function getHeroImgTipView(param1:HeroEvent) : void + { + } + + private function getHourStr() : String + { + if(this.maxSeconds == 0) + { + return "0"; + } + return int(this.maxSeconds / 3600) + "小时"; + } + + public function getHero() : Object + { + return this.hero; + } + + public function getRuning() : Boolean + { + if(this.timer) + { + return this.timer.running; + } + return false; + } + + private function getTimerInfo() : void + { + if(this.currSeconds > 0) + { + this.pracBtn.visible = true; + 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(); + } + } + else + { + this.pracBtn.visible = false; + this.time.text = "---"; + this.time.setTextFormat(this.centerCss); + } + } + + private function startFrame(param1:TimerEvent) : void + { + ++this.currSeconds; + this.getTimeText(); + if(this.currSeconds >= this.maxSeconds) + { + this.timer.stop(); + this.time.text = "---"; + this.time.setTextFormat(this.centerCss); + ConnectService.getInstance().heroService.getHeroPracticeVoList(); + } + } + + private function getTimeText() : void + { + this.time.text = PublicMethod.getTime(this.currSeconds); + this.time.setTextFormat(this.centerCss); + } + + private function stopPrac(param1:MouseEvent) : void + { + var _loc3_:Object = null; + var _loc4_:Array = null; + var _loc2_:int = int(this.hero.heroId); + if(_loc2_ > 0) + { + _loc3_ = new Object(); + _loc4_ = new Array(); + _loc4_.push(_loc2_); + _loc3_.heroIdList = _loc4_; + MessageBoxUI.getInstance().confirmMsg("是否停止修炼?",this.configStopPrac,_loc3_); + } + } + + private function configStopPrac(param1:Object) : void + { + ConnectService.getInstance().heroService.stopHeroPractice(param1); + } + + private function stopPracticeResult(param1:HeroEvent) : void + { + } + } +} + diff --git a/flash_decompiled/com/view/ui/zhanqi/ZhanqiData.as b/flash_decompiled/com/view/ui/zhanqi/ZhanqiData.as new file mode 100644 index 0000000..02066ef --- /dev/null +++ b/flash_decompiled/com/view/ui/zhanqi/ZhanqiData.as @@ -0,0 +1,48 @@ +package com.view.ui.zhanqi +{ + import com.control.ConnectService; + import com.control.play.event.PlayEvent; + import com.utils.Utils; + + public class ZhanqiData + { + + public static var obj:Object; + + private static var needGetData:Boolean = true; + + public function ZhanqiData() + { + super(); + } + + public static function setNeedGetData() : void + { + needGetData = true; + } + + public static function getZhanqiData() : Object + { + if(needGetData) + { + needGetData = false; + getInitData(); + return null; + } + return obj; + } + + public static function setZhanqiData(param1:Object) : void + { + obj = param1; + var _loc2_:PlayEvent = new PlayEvent(PlayEvent.ZHANQI_ENTERMAIN); + Utils.g_events.dispatchEvent(_loc2_); + } + + private static function getInitData() : void + { + ConnectService.getInstance().playService.enterZhanqi(); + } + } +} + diff --git a/flash_decompiled/com/view/ui/zhanqi/ZhanqiFenpeiUI.as b/flash_decompiled/com/view/ui/zhanqi/ZhanqiFenpeiUI.as new file mode 100644 index 0000000..232fff5 --- /dev/null +++ b/flash_decompiled/com/view/ui/zhanqi/ZhanqiFenpeiUI.as @@ -0,0 +1,86 @@ +package com.view.ui.zhanqi +{ + import com.common.PublicMethod; + import com.control.ConnectService; + 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.events.MouseEvent; + import flash.text.TextField; + + public class ZhanqiFenpeiUI extends UIWindowBg + { + + private var inputUI:UINumInputText; + + private var maxPoint:int; + + private var type:int; + + public function ZhanqiFenpeiUI() + { + var _loc4_:UIButton = null; + super(); + initSize(115,80); + loadTitle(UITitleConfig.title_piliangfenpei); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(285,45); + bg1.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = 10; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,140); + _loc2_.text = "请输入需要升级的点数:"; + _loc1_.addChild(_loc2_); + _loc2_.x = 25; + _loc2_.y = 15; + this.inputUI = new UINumInputText(100); + _loc1_.addChild(this.inputUI); + this.inputUI.x = _loc2_.x + _loc2_.width; + this.inputUI.y = _loc2_.y - 4; + var _loc3_:UIButton = new UIButton("确 定"); + bg1.addChild(_loc3_); + _loc3_.x = 85; + _loc3_.y = 75; + _loc3_.onClick = this.submit; + _loc4_ = new UIButton("取 消"); + bg1.addChild(_loc4_); + _loc4_.x = _loc3_.x + 85; + _loc4_.y = _loc3_.y; + _loc4_.onClick = closeSelf; + } + + public function setMaxPoint(param1:int) : void + { + this.maxPoint = param1; + this.inputUI.setMaxNum(this.maxPoint); + } + + public function setType(param1:int) : void + { + this.type = param1; + } + + private function submit(param1:MouseEvent) : void + { + var _loc2_:int = this.inputUI.getTextNum(); + if(_loc2_ <= 0) + { + MessageBoxUI.getInstance().addMessage("分配点数必须大于0"); + return; + } + if(_loc2_ > this.maxPoint) + { + MessageBoxUI.getInstance().addMessage("分配点数不足"); + return; + } + ConnectService.getInstance().playService.fenpei(_loc2_,this.type); + closeSelf(null); + } + } +} + diff --git a/flash_decompiled/com/view/ui/zhanqi/ZhanqiItem1.as b/flash_decompiled/com/view/ui/zhanqi/ZhanqiItem1.as new file mode 100644 index 0000000..a6302f1 --- /dev/null +++ b/flash_decompiled/com/view/ui/zhanqi/ZhanqiItem1.as @@ -0,0 +1,301 @@ +package com.view.ui.zhanqi +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIExpBar; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ZhanqiItem1 extends Sprite + { + + private var expBar:UIExpBar; + + private var num:int; + + private var item1:ZhantiItem; + + private var levelText:TextField; + + private var useBtn:UIButton; + + private var fenpeiBtn:UIButton; + + private var up50Btn:UIButton; + + private var up400Btn:UIButton; + + private var ZHANQI_PRO:int; + + private var ZHANQI_PRO_ADD:int; + + private var ZHANQI_TONGLV:int; + + private var ZHANQI_TONGLV_ADD:int; + + private var ZHANQI_CONFIG_1:int; + + private var ZHANQI_CONFIG_2:int; + + private var preLevel:int = -1; + + public var fenpeiF:Function; + + public function ZhanqiItem1(param1:int) + { + super(); + this.num = param1; + var _loc2_:ZhanqiItem2 = new ZhanqiItem2(this.num); + addChild(_loc2_); + _loc2_.x = 2; + _loc2_.y = 10; + this.item1 = new ZhantiItem(); + addChild(this.item1); + this.item1.x = 40; + this.expBar = new UIExpBar(); + this.expBar.setWidth(150); + this.expBar.init(); + addChild(this.expBar); + this.expBar.x = this.item1.x + this.item1.width + 10; + this.expBar.y = this.item1.y + 20; + this.expBar.setMaxValue(100); + this.expBar.setCurValue(0); + this.levelText = PublicMethod.getTextFieldWithFillter(UIConfig.succColor,200); + addChild(this.levelText); + this.levelText.x = this.expBar.x + 40; + this.levelText.y = this.expBar.y + 20; + this.levelText.htmlText = "当前等级:1"; + this.fenpeiBtn = new UIButton("分 配",1,10); + addChild(this.fenpeiBtn); + this.fenpeiBtn.x = this.expBar.x + this.expBar.width + 6; + this.fenpeiBtn.y = this.expBar.y - 20; + this.fenpeiBtn.onClick = this.fenpei; + this.up50Btn = new UIButton("升50级",1,10); + addChild(this.up50Btn); + this.up50Btn.x = this.fenpeiBtn.x; + this.up50Btn.y = this.fenpeiBtn.y + 30; + this.up50Btn.onClick = this.up50Level; + ToolTipManager.getInstance().setToolTip(this.up50Btn,new TxtTooltip("直接包裹中扣除战旗令牌"),true,-1,false); + this.useBtn = new UIButton("装 备",1,10); + addChild(this.useBtn); + this.useBtn.x = this.fenpeiBtn.x + this.fenpeiBtn.width + 6; + this.useBtn.y = this.fenpeiBtn.y; + this.up400Btn = new UIButton("升400级",1,10); + addChild(this.up400Btn); + this.up400Btn.x = this.useBtn.x; + this.up400Btn.y = this.up50Btn.y; + this.up400Btn.onClick = this.up400Level; + ToolTipManager.getInstance().setToolTip(this.up400Btn,new TxtTooltip("直接包裹中扣除战旗令牌"),true,-1,false); + var _loc3_:Sprite = PublicMethod.getTrLine(340); + addChild(_loc3_); + _loc3_.x = 15; + _loc3_.y = 65; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,140); + addChild(_loc4_); + _loc4_.x = 106; + _loc4_.y = -2; + switch(this.num) + { + case 1: + break; + case 2: + _loc4_.text = "升级前提:金旗达到18级"; + break; + case 3: + _loc4_.text = "升级前提:木旗达到18级"; + break; + case 4: + _loc4_.text = "升级前提:水旗达到18级"; + break; + case 5: + _loc4_.text = "升级前提:火旗达到18级"; + } + this.loadImg(1); + } + + private function getPro(param1:int) : int + { + if(param1 == 0) + { + return 0; + } + return this.ZHANQI_PRO + (param1 - 1) * this.ZHANQI_PRO_ADD; + } + + private function getTongLv(param1:int) : int + { + if(param1 == 0) + { + return 0; + } + return this.ZHANQI_TONGLV + (param1 - 1) * this.ZHANQI_TONGLV_ADD; + } + + private function getCurrMaxExp(param1:int) : int + { + if(param1 < 100) + { + return 100; + } + return this.ZHANQI_CONFIG_1 + this.ZHANQI_CONFIG_2 * (param1 - 1); + } + + public function loadObj(param1:Object) : void + { + var _loc2_:int = int(param1["exp" + this.num]); + var _loc3_:int = int(param1["level" + this.num]); + var _loc4_:int = int(param1["use" + this.num]); + this.ZHANQI_PRO = param1.ZHANQI_PRO; + this.ZHANQI_PRO_ADD = param1.ZHANQI_PRO_ADD; + this.ZHANQI_TONGLV = param1.ZHANQI_TONGLV; + this.ZHANQI_TONGLV_ADD = param1.ZHANQI_TONGLV_ADD; + this.ZHANQI_CONFIG_1 = param1.ZHANQI_CONFIG_1; + this.ZHANQI_CONFIG_2 = param1.ZHANQI_CONFIG_2; + this.levelText.htmlText = "当前等级:" + _loc3_ + ""; + this.expBar.setMaxValue(this.getCurrMaxExp(_loc3_)); + this.expBar.setCurValue(_loc2_); + var _loc5_:int = int(param1.ZHANQI_MAX_LEVEL); + var _loc6_:String = ""; + switch(this.num) + { + case 1: + if(_loc3_ == _loc5_) + { + _loc6_ = "金旗
当前等级:" + _loc3_ + "
当前属性:武将防御 + " + this.getPro(_loc3_) + "
下级属性:已满级"; + break; + } + _loc6_ = "金旗
当前等级:" + _loc3_ + "
当前属性:武将防御 + " + this.getPro(_loc3_) + "
下级属性:武将防御 + " + this.getPro(_loc3_ + 1); + break; + case 2: + if(_loc3_ == _loc5_) + { + _loc6_ = "木旗
当前等级:" + _loc3_ + "
当前属性:武将体力 + " + this.getPro(_loc3_) + "
下级属性:已满级"; + break; + } + _loc6_ = "木旗
当前等级:" + _loc3_ + "
当前属性:武将体力 + " + this.getPro(_loc3_) + "
下级属性:武将体力 + " + this.getPro(_loc3_ + 1); + break; + case 3: + if(_loc3_ == _loc5_) + { + _loc6_ = "水旗
当前等级:" + _loc3_ + "
当前属性:武将敏捷 + " + this.getPro(_loc3_) + "
下级属性:已满级"; + break; + } + _loc6_ = "水旗
当前等级:" + _loc3_ + "
当前属性:武将敏捷 + " + this.getPro(_loc3_) + "
下级属性:武将敏捷 + " + this.getPro(_loc3_ + 1); + break; + case 4: + if(_loc3_ == _loc5_) + { + _loc6_ = "火旗
当前等级:" + _loc3_ + "
当前属性:武将攻击 + " + this.getPro(_loc3_) + "
下级属性:已满级"; + break; + } + _loc6_ = "火旗
当前等级:" + _loc3_ + "
当前属性:武将攻击 + " + this.getPro(_loc3_) + "
下级属性:武将攻击 + " + this.getPro(_loc3_ + 1); + break; + case 5: + if(_loc3_ == _loc5_) + { + _loc6_ = "土旗
当前等级:" + _loc3_ + "
当前属性:武将统率 + " + this.getTongLv(_loc3_) + "
下级属性:已满级"; + break; + } + _loc6_ = "土旗
当前等级:" + _loc3_ + "
当前属性:武将统率 + " + this.getTongLv(_loc3_) + "
下级属性:武将统率 + " + this.getTongLv(_loc3_ + 1); + } + ToolTipManager.getInstance().setToolTip(this.item1,new TxtTooltip(_loc6_),true,-1,false); + if(_loc4_ == 1) + { + this.useBtn.setText("卸 下"); + this.useBtn.onClick = this.unUseZhanti; + } + else + { + this.useBtn.setText("装 备"); + this.useBtn.onClick = this.useZhanti; + } + if(_loc3_ == 0) + { + this.useBtn.setUnEnable(); + } + else + { + this.useBtn.setEnable(); + } + if(_loc3_ >= _loc5_) + { + this.fenpeiBtn.setUnEnable(); + this.up50Btn.setUnEnable(); + this.up400Btn.setUnEnable(); + } + if(this.num == 5 && _loc3_ >= 100) + { + this.fenpeiBtn.setUnEnable(); + this.up50Btn.setUnEnable(); + this.up400Btn.setUnEnable(); + } + this.loadImg(_loc3_); + } + + private function loadImg(param1:int) : void + { + if(param1 == 0) + { + param1 = 1; + } + if(this.preLevel == param1) + { + return; + } + this.preLevel = param1; + var _loc2_:String = ""; + switch(this.num) + { + case 1: + _loc2_ = "zhanqijin" + param1 + ".png"; + break; + case 2: + _loc2_ = "zhanqimu" + param1 + ".png"; + break; + case 3: + _loc2_ = "zhanqishui" + param1 + ".png"; + break; + case 4: + _loc2_ = "zhanqihuo" + param1 + ".png"; + break; + case 5: + _loc2_ = "zhanqitu" + param1 + ".png"; + } + this.item1.loadImg(_loc2_); + } + + private function useZhanti(param1:MouseEvent) : void + { + ConnectService.getInstance().playService.useByType(this.num); + } + + private function unUseZhanti(param1:MouseEvent) : void + { + ConnectService.getInstance().playService.unUseByType(this.num); + } + + private function fenpei(param1:MouseEvent) : void + { + if(this.fenpeiF != null) + { + this.fenpeiF(this.num); + } + } + + private function up50Level(param1:MouseEvent) : void + { + ConnectService.getInstance().playService.upByTpe(this.num,1); + } + + private function up400Level(param1:MouseEvent) : void + { + ConnectService.getInstance().playService.upByTpe(this.num,2); + } + } +} + diff --git a/flash_decompiled/com/view/ui/zhanqi/ZhanqiItem2.as b/flash_decompiled/com/view/ui/zhanqi/ZhanqiItem2.as new file mode 100644 index 0000000..0e0b382 --- /dev/null +++ b/flash_decompiled/com/view/ui/zhanqi/ZhanqiItem2.as @@ -0,0 +1,33 @@ +package com.view.ui.zhanqi +{ + import com.common.LoadResource; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class ZhanqiItem2 extends Sprite + { + + private var bgload:LoadResource; + + public function ZhanqiItem2(param1:int) + { + super(); + var _loc2_:String = "pic/zhanqi/" + param1 + ".png"; + this.loadBg(_loc2_); + } + + 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_); + } + } +} + diff --git a/flash_decompiled/com/view/ui/zhanqi/ZhanqiUI.as b/flash_decompiled/com/view/ui/zhanqi/ZhanqiUI.as new file mode 100644 index 0000000..ac0a8b6 --- /dev/null +++ b/flash_decompiled/com/view/ui/zhanqi/ZhanqiUI.as @@ -0,0 +1,174 @@ +package com.view.ui.zhanqi +{ + import com.common.PublicMethod; + import com.control.play.event.PlayEvent; + import com.utils.Utils; + import com.view.mc.button.Button_9; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.BaseUI; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class ZhanqiUI extends BaseUI + { + + private var bg2:UIWindowBg; + + private var pointText:TextField; + + private var itemVec:Vector. = new Vector.(); + + private var bgSec:int = 0; + + private var maxPoint:int; + + private var fenpeiUI:ZhanqiFenpeiUI; + + public function ZhanqiUI() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_zhanqi); + 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_:TextField = null; + var _loc4_:Button_9 = null; + var _loc8_:ZhanqiItem1 = null; + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(630,420); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.bg2 = new UIWindowBg(); + this.bg2.initThirdPanel(248,412); + _loc1_.addChild(this.bg2); + this.bg2.x = 4; + this.bg2.y = 4; + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(360,412); + _loc1_.addChild(_loc2_); + _loc2_.x = 3 + this.bg2.width + this.bg2.x; + _loc2_.y = 4; + super.loadBg("pic/bg/zhanqi_bg.jpg"); + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,95); + _loc2_.addChild(_loc3_); + _loc3_.x = 15; + _loc3_.y = 15; + _loc3_.htmlText = "当前拥有分配点:"; + this.pointText = PublicMethod.getTextFieldWithFillter(16776960,100); + _loc2_.addChild(this.pointText); + this.pointText.x = _loc3_.x + _loc3_.width; + this.pointText.y = _loc3_.y; + this.pointText.text = "0"; + _loc4_ = new Button_9("说明"); + _loc2_.addChild(_loc4_); + _loc4_.x = 315; + _loc4_.y = 15; + _loc4_.buttonMode = true; + var _loc5_:String = "1、战旗分金木水火土5种,根据君主等级依次开放
"; + _loc5_ = _loc5_ + "2、战场中使用战旗可增加武将属性
"; + _loc5_ = _loc5_ + "3、战旗可通过使用分配点来升级,最高级18级
"; + _loc5_ = _loc5_ + "4、分配点可通过使用战旗令牌获得"; + ToolTipManager.getInstance().setToolTip(_loc4_,new TxtTooltip(_loc5_),false,-1,false); + var _loc6_:Sprite = PublicMethod.getTrLine(340); + _loc2_.addChild(_loc6_); + _loc6_.x = 15; + _loc6_.y = 40; + var _loc7_:int = 0; + while(_loc7_ < 5) + { + _loc8_ = new ZhanqiItem1(_loc7_ + 1); + _loc2_.addChild(_loc8_); + _loc8_.y = _loc6_.y + 12 + _loc7_ * 73; + this.itemVec.push(_loc8_); + _loc8_.fenpeiF = this.fenpeiPoint; + _loc7_++; + } + } + + override public function addToStage(param1:Event) : void + { + this.getZhanqiData(); + Utils.g_events.addEventListener(PlayEvent.ZHANQI_ENTERMAIN,this.enterMainResult); + } + + override public function removeFromStage(param1:Event) : void + { + Utils.g_events.removeEventListener(PlayEvent.ZHANQI_ENTERMAIN,this.enterMainResult); + } + + override public function getBgImg(param1:Bitmap) : void + { + this.bg2.addChild(param1); + if(this.bgSec == 0) + { + param1.x = 2; + param1.y = 2; + this.bgSec = 1; + } + else + { + param1.x = 2; + param1.y = 40; + this.bgSec = 2; + } + } + + private function enterMainResult(param1:PlayEvent) : void + { + this.getZhanqiData(); + } + + private function getZhanqiData() : void + { + var _loc2_:ZhanqiItem1 = null; + var _loc1_:Object = ZhanqiData.getZhanqiData(); + if(_loc1_ == null) + { + return; + } + this.pointText.text = _loc1_.point; + this.maxPoint = _loc1_.point; + for each(_loc2_ in this.itemVec) + { + _loc2_.loadObj(_loc1_); + } + } + + private function fenpeiPoint(param1:int) : void + { + if(this.fenpeiUI == null) + { + this.fenpeiUI = new ZhanqiFenpeiUI(); + this.fenpeiUI.x = int(width / 2 - this.fenpeiUI.width / 2); + this.fenpeiUI.y = int(height / 2 - this.fenpeiUI.height / 2); + } + addChild(this.fenpeiUI); + this.fenpeiUI.setType(param1); + this.fenpeiUI.setMaxPoint(this.maxPoint); + } + } +} + diff --git a/flash_decompiled/com/view/ui/zhanqi/ZhantiItem.as b/flash_decompiled/com/view/ui/zhanqi/ZhantiItem.as new file mode 100644 index 0000000..9923eae --- /dev/null +++ b/flash_decompiled/com/view/ui/zhanqi/ZhantiItem.as @@ -0,0 +1,50 @@ +package com.view.ui.zhanqi +{ + import com.InstallFace; + import com.common.LoadResource; + import com.common.Scale9Grid; + import com.view.newui.UIConfig; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.events.Event; + + public class ZhantiItem extends Sprite + { + + private var itemImgSp:Scale9Grid; + + private var face:InstallFace = InstallFace.getInstance(); + + private var loader:LoadResource; + + private var itemImg:Bitmap; + + public function ZhantiItem() + { + super(); + this.itemImgSp = new Scale9Grid(this.face.getSprite(UIConfig.shop_item_bg),36,36); + addChild(this.itemImgSp); + } + + public function loadImg(param1:String) : void + { + this.loader = new LoadResource("pic/zhanqi/" + param1,this.loadBack); + } + + private function loadBack(param1:Event) : void + { + if(Boolean(this.itemImg) && this.itemImgSp.contains(this.itemImg)) + { + this.itemImgSp.removeChild(this.itemImg); + } + this.itemImg = Bitmap(param1.target.loader.content); + this.loader.clear(); + this.itemImgSp.addChild(this.itemImg); + this.itemImg.x = 3; + this.itemImg.y = 3; + this.itemImg.width = 40; + this.itemImg.height = 40; + } + } +} + diff --git a/flash_decompiled/com/view/usertool/MainTool.as b/flash_decompiled/com/view/usertool/MainTool.as new file mode 100644 index 0000000..4614420 --- /dev/null +++ b/flash_decompiled/com/view/usertool/MainTool.as @@ -0,0 +1,148 @@ +package com.view.usertool +{ + 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.MouseEvent; + + public class MainTool extends BaseUI + { + + public var btnArr:Array; + + private var paneBg:UIWindowBg; + + private var curPage:Sprite; + + private var page1:ToolsPage1; + + private var page2:ToolsPage2; + + private var page3:ToolsPage3; + + public function MainTool() + { + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_chongzhi); + super.setPosition(); + this.createUI(); + } + + override public function setWindowSize() : void + { + window_width = 340; + window_heihgt = 280; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 540; + 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 UIWindowBg(); + this.paneBg.initSecondPanel(530,275); + 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; + this.openPage(_loc2_); + } + + private function openPage(param1:UITabBtn) : void + { + var _loc2_:int = 0; + var _loc3_:* = undefined; + for(_loc3_ in this.btnArr) + { + if(param1 == this.btnArr[_loc3_]) + { + this.btnArr[_loc3_].select = true; + _loc2_ = _loc3_; + } + else + { + this.btnArr[_loc3_].select = false; + } + } + if(Boolean(this.curPage) && this.paneBg.contains(this.curPage)) + { + this.paneBg.removeChild(this.curPage); + } + switch(_loc2_) + { + case 0: + this.curPage = this.getPage1(); + break; + case 1: + this.curPage = this.getPage2(); + break; + case 2: + this.curPage = this.getPage3(); + } + this.paneBg.addChild(this.curPage); + } + + private function getPage1() : Sprite + { + if(this.page1 == null) + { + this.page1 = new ToolsPage1(); + this.page1.x = 4; + this.page1.y = 4; + } + this.page1.initData(); + return this.page1; + } + + private function getPage2() : Sprite + { + if(this.page2 == null) + { + this.page2 = new ToolsPage2(); + this.page2.x = 4; + this.page2.y = 4; + } + return this.page2; + } + + private function getPage3() : Sprite + { + if(this.page3 == null) + { + this.page3 = new ToolsPage3(); + this.page3.x = 4; + this.page3.y = 4; + } + return this.page3; + } + } +} + diff --git a/flash_decompiled/com/view/usertool/MedicineItem.as b/flash_decompiled/com/view/usertool/MedicineItem.as new file mode 100644 index 0000000..343f5f5 --- /dev/null +++ b/flash_decompiled/com/view/usertool/MedicineItem.as @@ -0,0 +1,92 @@ +package com.view.usertool +{ + import com.common.PublicMethod; + import com.view.newui.UIConfig; + import com.view.newui.UIRadioBtn; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class MedicineItem extends Sprite + { + + private var radioBtn:UIRadioBtn; + + private var label1:TextField; + + private var cashText:TextField; + + private var bg:Sprite; + + private var obj:Object; + + public function MedicineItem() + { + super(); + this.bg = PublicMethod.createShape(UIConfig.overBgColor,260,24); + addChild(this.bg); + this.bg.alpha = 0; + addEventListener(MouseEvent.ROLL_OUT,this.mouseOut,false,0,true); + addEventListener(MouseEvent.ROLL_OVER,this.mouseOver,false,0,true); + this.radioBtn = new UIRadioBtn(); + addChild(this.radioBtn); + this.radioBtn.x = 2; + this.radioBtn.y = 2; + this.radioBtn.visible = false; + this.label1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,90); + addChild(this.label1); + this.label1.x = 24; + this.label1.y = 4; + this.cashText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,130); + addChild(this.cashText); + this.cashText.x = this.label1.x + this.label1.width + 15; + this.cashText.y = 4; + } + + private function mouseOut(param1:MouseEvent) : void + { + if(this.obj == null) + { + return; + } + this.bg.alpha = 0; + } + + private function mouseOver(param1:MouseEvent) : void + { + if(this.obj == null) + { + return; + } + this.bg.alpha = 0.3; + } + + public function setObj(param1:Object) : void + { + this.obj = param1; + if(this.obj) + { + this.radioBtn.visible = true; + this.label1.htmlText = this.obj.money; + this.cashText.htmlText = this.obj.time; + } + else + { + this.radioBtn.visible = false; + this.label1.text = ""; + this.cashText.text = ""; + } + } + + public function setUnSelect() : void + { + this.radioBtn.setUnSelect(); + } + + public function setSelect() : void + { + this.radioBtn.setSelect(); + } + } +} + diff --git a/flash_decompiled/com/view/usertool/MedicineView.as b/flash_decompiled/com/view/usertool/MedicineView.as new file mode 100644 index 0000000..2378741 --- /dev/null +++ b/flash_decompiled/com/view/usertool/MedicineView.as @@ -0,0 +1,298 @@ +package com.view.usertool +{ + import com.comfig.ClassConfig; + import com.comfig.CommonData; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.castle.event.HospitalEvent; + import com.control.data.ReturnBean; + import com.newdata.user.NewUserData; + 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 flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class MedicineView extends UIWindowBg + { + + private static var instance:MedicineView; + + private var bigBg:Sprite; + + private var bg5:Sprite; + + private var tableMc:UITable; + + private var title:TextField; + + public var refreshF:Function; + + 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 infoObj:Object; + + private var lastType:MedicineItem; + + private var lastPayType:UIRadioBtn; + + public function MedicineView() + { + 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_goumaigaoyao); + 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.buy; + 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); + ConnectService.getInstance().addEventListener(HospitalEvent.TREAT_getMedicPointInfo,this.getMedicPointInfoSucc); + ConnectService.getInstance().addEventListener(HospitalEvent.TREAT_addSelectMedicPoint,this.addSelectMedicPointSucc); + face.stage.addEventListener(Event.RESIZE,this.resize); + } + + public static function getInstance() : MedicineView + { + if(instance == null) + { + instance = new MedicineView(); + } + return instance; + } + + private function buy(param1:MouseEvent) : void + { + if(this.lastType == null) + { + MessageBoxUI.getInstance().addMessage("请选择购买类型"); + return; + } + if(this.lastPayType == null) + { + MessageBoxUI.getInstance().addMessage("请选择消耗货币的类型"); + return; + } + var _loc2_:* = new Object(); + if(this.lastType == this.fastTypeArr[0]) + { + _loc2_.fastType = String(this.infoObj["type0"]); + _loc2_.payMoney = String(this.infoObj["money0"]); + } + else if(this.lastType == this.fastTypeArr[1]) + { + _loc2_.fastType = String(this.infoObj["type1"]); + _loc2_.payMoney = String(this.infoObj["money1"]); + } + else if(this.lastType == this.fastTypeArr[2]) + { + _loc2_.fastType = String(this.infoObj["type2"]); + _loc2_.payMoney = String(this.infoObj["money2"]); + } + else if(this.lastType == this.fastTypeArr[3]) + { + _loc2_.fastType = String(this.infoObj["type3"]); + _loc2_.payMoney = String(this.infoObj["money3"]); + } + else if(this.lastType == this.fastTypeArr[4]) + { + _loc2_.fastType = String(this.infoObj["type4"]); + _loc2_.payMoney = String(this.infoObj["money4"]); + } + if(this.lastPayType == this.type_1) + { + _loc2_.payType = "2"; + } + if(this.lastPayType == this.type_2) + { + _loc2_.payType = "1"; + } + ConnectService.getInstance().castleService.addSelectMedicPoint(_loc2_); + } + + private function addSelectMedicPointSucc(param1:HospitalEvent) : void + { + MessageBoxUI.getInstance().addMessage(param1.msg); + if(this.refreshF != null) + { + this.refreshF(); + } + this.refreshF = null; + this.closeSelf(null); + } + + override public function closeSelf(param1:MouseEvent) : void + { + face.stage.removeChild(this.bigBg); + } + + private function getMedicPointInfo() : void + { + ConnectService.getInstance().castleService.getMedicPointInfo(); + } + + private function getMedicPointInfoSucc(param1:HospitalEvent) : void + { + var _loc3_:Object = null; + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + this.closeSelf(null); + return; + } + this.infoObj = param1.hospitalObject; + this.title.text = this.infoObj.emptyPoint; + var _loc2_:int = 0; + while(_loc2_ < 5) + { + _loc3_ = new Object(); + _loc3_.money = "" + this.infoObj["money" + _loc2_] + " 点券或元宝"; + if(_loc2_ > 0) + { + _loc3_.time = "" + this.infoObj["time" + _loc2_] + " 副膏药"; + } + else + { + _loc3_.time = this.infoObj["time" + _loc2_]; + } + this.fastTypeArr[_loc2_].setObj(_loc3_); + _loc2_++; + } + if(this.lastType) + { + this.lastType.setSelect(); + } + if(this.lastPayType) + { + this.lastPayType.setSelect(); + } + } + + private function selectFastType(param1:MouseEvent) : void + { + if(this.lastType) + { + this.lastType.setUnSelect(); + } + this.lastType = param1.currentTarget as MedicineItem; + this.lastType.setSelect(); + } + + private function selectPayType(param1:MouseEvent) : void + { + if(this.lastPayType) + { + this.lastPayType.setUnSelect(); + } + this.lastPayType = param1.currentTarget as UIRadioBtn; + this.lastPayType.setSelect(); + } + + public function list() : void + { + this.getMedicPointInfo(); + this.point.text = NewUserData.getUser().paypoint.toString(); + this.cash.text = NewUserData.getUser().cash.toString(); + } + + public function show() : void + { + face.stage.addChild(this.bigBg); + this.resize(null); + } + + 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); + } + } +} + diff --git a/flash_decompiled/com/view/usertool/ToolsPage1.as b/flash_decompiled/com/view/usertool/ToolsPage1.as new file mode 100644 index 0000000..0c8825f --- /dev/null +++ b/flash_decompiled/com/view/usertool/ToolsPage1.as @@ -0,0 +1,336 @@ +package com.view.usertool +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.view.Control; + import com.view.mc.button.Button_9; + import com.view.newui.UIBigNumInputText; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UINumInputText; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + + public class ToolsPage1 extends Sprite + { + + private var pointText:TextField; + + private var input:UINumInputText; + + private var labela1:TextField; + + private var labela2:TextField; + + private var labela3:TextField; + + private var labela4:TextField; + + private var input3:UIBigNumInputText; + + private var input4:UIBigNumInputText; + + private var view1:TextField; + + private var view2:TextField; + + private var shouxuText:TextField; + + private var label3:TextField; + + private var okBtn2:UIButton; + + private var okBtn1:UIButton; + + private var CASH_TO_POINT:int; + + private var POINT_TO_CASH:int; + + private var currPoint:int; + + public function ToolsPage1() + { + var _loc3_:TextField = null; + var _loc5_:TextField = null; + var _loc6_:UIButton = null; + var _loc7_:UIButton = null; + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(522,110); + addChild(_loc1_); + var _loc2_:UITitleBg = new UITitleBg("积分兑换元宝",_loc1_.width); + _loc1_.addChild(_loc2_); + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc3_.text = "当前拥有积分:"; + _loc1_.addChild(_loc3_); + _loc3_.x = 55; + _loc3_.y = 35; + this.pointText = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,100); + _loc1_.addChild(this.pointText); + this.pointText.x = _loc3_.x + _loc3_.width; + this.pointText.y = _loc3_.y; + this.pointText.text = "0"; + var _loc4_:Button_9 = new Button_9("充值"); + _loc1_.addChild(_loc4_); + _loc4_.buttonMode = true; + _loc4_.x = this.pointText.x + 100; + _loc4_.y = _loc3_.y; + _loc4_.addEventListener(MouseEvent.CLICK,this.openPay); + _loc5_ = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,110); + _loc5_.text = "请输入兑换的积分:"; + _loc1_.addChild(_loc5_); + _loc5_.x = _loc3_.x; + _loc5_.y = _loc3_.y + 25; + this.input = new UINumInputText(100); + _loc1_.addChild(this.input); + this.input.x = _loc5_.x + _loc5_.width + 5; + this.input.y = _loc5_.y - 3; + this.input.hiddenBtn(); + this.input.setMaxChars(10); + this.input.setMaxNum(999999999); + _loc6_ = new UIButton("确 定",2,10); + _loc1_.addChild(_loc6_); + _loc6_.x = this.input.x + 110; + _loc6_.y = this.input.y; + _loc6_.onClick = this.exchangePoint; + _loc7_ = new UIButton("测 试",2,10); + _loc1_.addChild(_loc7_); + _loc7_.x = _loc6_.x + 110; + _loc7_.y = _loc6_.y; + _loc7_.onClick = this.testConnect; + this.label3 = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,300); + this.label3.text = "提示:1积分可兑换1元宝"; + _loc1_.addChild(this.label3); + this.label3.x = _loc3_.x; + this.label3.y = _loc5_.y + 25; + var _loc8_:UIWindowBg = new UIWindowBg(); + _loc8_.initThirdPanel(522,144); + addChild(_loc8_); + _loc8_.y = _loc1_.y + _loc1_.height + 3; + var _loc9_:UITitleBg = new UITitleBg("元宝点券互换",_loc8_.width); + _loc8_.addChild(_loc9_); + this.labela1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,180); + this.labela1.text = "元宝兑换点券比例为:"; + _loc8_.addChild(this.labela1); + this.labela1.x = _loc3_.x; + this.labela1.y = 30; + this.labela2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,180); + this.labela2.text = "点券兑换元宝比例为:"; + _loc8_.addChild(this.labela2); + this.labela2.x = this.labela1.x; + this.labela2.y = this.labela1.y + 25; + this.labela3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + this.labela3.text = "当前拥有元宝:"; + _loc8_.addChild(this.labela3); + this.labela3.x = 220; + this.labela3.y = this.labela1.y; + this.labela4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + this.labela4.text = "当前拥有点券:"; + _loc8_.addChild(this.labela4); + this.labela4.x = this.labela3.x; + this.labela4.y = this.labela2.y; + var _loc10_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc10_.htmlText = "元宝兑换点券:"; + _loc8_.addChild(_loc10_); + _loc10_.x = this.labela1.x; + _loc10_.y = this.labela2.y + 25; + this.input3 = new UIBigNumInputText(100); + _loc8_.addChild(this.input3); + this.input3.x = _loc10_.x + _loc10_.width; + this.input3.y = _loc10_.y - 3; + this.input3.hiddenBtn(); + this.input3.setInputEvent(this.change1); + this.input3.setMaxChars(14); + this.input3.setMaxNum(999999999999); + this.okBtn1 = new UIButton("兑 换",2,10); + _loc8_.addChild(this.okBtn1); + this.okBtn1.x = this.input3.x + this.input3.width + 5; + this.okBtn1.y = this.input3.y; + this.okBtn1.onClick = this.cashToPoint; + this.view1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc8_.addChild(this.view1); + this.view1.x = this.okBtn1.x + this.okBtn1.width + 10; + this.view1.y = _loc10_.y; + var _loc11_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,90); + _loc11_.htmlText = "点券兑换元宝:"; + _loc8_.addChild(_loc11_); + _loc11_.x = this.labela1.x; + _loc11_.y = _loc10_.y + 25; + this.input4 = new UIBigNumInputText(100); + _loc8_.addChild(this.input4); + this.input4.x = this.input3.x; + this.input4.y = _loc11_.y - 3; + this.input4.hiddenBtn(); + this.input4.setInputEvent(this.change2); + this.input4.setMaxChars(14); + this.input4.setMaxNum(999999999999); + this.okBtn2 = new UIButton("兑 换",2,10); + _loc8_.addChild(this.okBtn2); + this.okBtn2.x = this.okBtn1.x; + this.okBtn2.y = this.input4.y; + this.okBtn2.onClick = this.pointToCash; + this.view2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc8_.addChild(this.view2); + this.view2.x = this.view1.x; + this.view2.y = _loc11_.y; + this.shouxuText = PublicMethod.getTextFieldWithFillter(UIConfig.warnColor,210); + _loc8_.addChild(this.shouxuText); + this.shouxuText.x = this.labela1.x; + this.shouxuText.y = _loc11_.y + 25; + ConnectService.getInstance().addEventListener(UserEvent.USER_exchangePoint,this.exchangePointSucc); + ConnectService.getInstance().addEventListener(UserEvent.USER_cashToPoint,this.exchangePointSucc); + ConnectService.getInstance().addEventListener(UserEvent.USER_pointToCash,this.exchangePointSucc); + ConnectService.getInstance().addEventListener(UserEvent.USER_exchangePointView,this.initDataSucc); + } + + private function openPay(param1:MouseEvent) : void + { + Control.getInstance().rightTopMenu.openPayHttp(); + } + + public function initData() : void + { + ConnectService.getInstance().userService.exchangePointView(); + } + + private function initDataSucc(param1:UserEvent) : void + { + this.currPoint = param1.userObject.point as int; + this.CASH_TO_POINT = param1.userObject.CASH_TO_POINT as int; + this.POINT_TO_CASH = param1.userObject.POINT_TO_CASH as int; + if(this.CASH_TO_POINT <= 0) + { + this.labela1.htmlText = "元宝兑换点券比例为:暂未开放"; + this.okBtn1.setUnEnable(); + } + else + { + this.labela1.htmlText = "元宝兑换点券比例为:1:" + this.CASH_TO_POINT + ""; + this.okBtn1.setEnable(); + } + if(this.POINT_TO_CASH <= 0) + { + this.labela2.htmlText = "点券兑换元宝比例为:暂未开放"; + this.okBtn2.setUnEnable(); + } + else + { + this.labela2.htmlText = "点券兑换元宝比例为:10:" + this.POINT_TO_CASH + ""; + this.okBtn2.setEnable(); + } + var _loc2_:NewUser = NewUserData.getUser(); + this.labela3.htmlText = "当前拥有元宝:" + _loc2_.cash + ""; + this.labela4.htmlText = "当前拥有点券:" + _loc2_.paypoint + ""; + this.pointText.text = this.currPoint.toString(); + this.input.setMaxNum(this.currPoint); + var _loc3_:int = param1.userObject.CASH_SCALE as int; + var _loc4_:int = param1.userObject.CASH_POINT_MONEY as int; + if(_loc4_ > 0) + { + this.shouxuText.text = "注意:点券与元宝互换收取" + _loc4_ + "%手续费"; + } + this.label3.htmlText = "提示:1积分可兑换" + _loc3_ + "元宝"; + } + + private function change1() : void + { + if(this.CASH_TO_POINT == 0) + { + return; + } + var _loc1_:Number = Number(this.input3.getTextNum()); + this.view1.htmlText = "可兑换点券:" + _loc1_ * this.CASH_TO_POINT + ""; + } + + private function change2() : void + { + if(this.POINT_TO_CASH == 0) + { + return; + } + var _loc1_:Number = Number(this.input4.getTextNum()); + _loc1_ /= 10; + _loc1_ *= this.POINT_TO_CASH; + this.view2.htmlText = "可兑换元宝:" + _loc1_ + ""; + } + + private function exchangePoint(param1:MouseEvent) : void + { + var _loc2_:int = this.input.getTextNum(); + if(_loc2_ > 0) + { + if(this.currPoint < _loc2_) + { + MessageBoxUI.getInstance().addMessage("积分不够"); + return; + } + ConnectService.getInstance().userService.exchangePoint(_loc2_); + } + else + { + MessageBoxUI.getInstance().addMessage("请输入要兑换的积分"); + } + } + + private function testConnect(param1:MouseEvent) : void + { + ConnectService.getInstance().userService.testConnect(); + } + + private function cashToPoint(param1:MouseEvent) : void + { + if(this.CASH_TO_POINT == 0) + { + MessageBoxUI.getInstance().addMessage("暂未开放元宝兑换点券"); + return; + } + var _loc2_:Number = this.input3.getTextNum(); + if(_loc2_ == 0) + { + MessageBoxUI.getInstance().addMessage("请输入兑换数量"); + return; + } + if(_loc2_ < 10000) + { + MessageBoxUI.getInstance().addMessage("兑换数量至少要1万以上"); + return; + } + ConnectService.getInstance().userService.cashToPaypoint(_loc2_); + } + + private function pointToCash(param1:MouseEvent) : void + { + if(this.POINT_TO_CASH == 0) + { + MessageBoxUI.getInstance().addMessage("暂未开放点券兑换元宝"); + return; + } + var _loc2_:Number = this.input4.getTextNum(); + if(_loc2_ % 10 > 0) + { + MessageBoxUI.getInstance().addMessage("点券兑换元宝只能为10的整数倍"); + return; + } + if(_loc2_ < 10000) + { + MessageBoxUI.getInstance().addMessage("兑换数量至少要1万以上"); + return; + } + ConnectService.getInstance().userService.pointToCash(_loc2_); + } + + private function exchangePointSucc(param1:UserEvent) : void + { + MessageBoxUI.getInstance().addMessage("兑换成功"); + this.initData(); + } + } +} + diff --git a/flash_decompiled/com/view/usertool/ToolsPage2.as b/flash_decompiled/com/view/usertool/ToolsPage2.as new file mode 100644 index 0000000..edf364e --- /dev/null +++ b/flash_decompiled/com/view/usertool/ToolsPage2.as @@ -0,0 +1,126 @@ +package com.view.usertool +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.utils.Utils; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ToolsPage2 extends Sprite + { + + private var input1:UIInputText; + + private var input2:UIInputText; + + private var input3:UIInputText; + + private var input4:UIInputText; + + public function ToolsPage2() + { + var _loc6_:TextField = null; + var _loc8_:UIButton = null; + super(); + var _loc1_:TextFormat = PublicMethod.getRightTextFormat(); + var _loc2_:UIWindowBg = new UIWindowBg(); + _loc2_.initThirdPanel(522,267); + addChild(_loc2_); + var _loc3_:UITitleBg = new UITitleBg("修改密码",_loc2_.width); + _loc2_.addChild(_loc3_); + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,115); + _loc2_.addChild(_loc4_); + _loc4_.x = 120; + _loc4_.y = 40; + _loc4_.defaultTextFormat = _loc1_; + _loc4_.text = "请输入原密码:"; + this.input1 = new UIInputText(150); + this.input1.setMaxChars(20); + _loc2_.addChild(this.input1); + this.input1.x = _loc4_.x + _loc4_.width; + this.input1.y = _loc4_.y - 3; + var _loc5_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,115); + _loc2_.addChild(_loc5_); + _loc5_.x = _loc4_.x; + _loc5_.y = _loc4_.y + 30; + _loc5_.defaultTextFormat = _loc1_; + _loc5_.text = "请输入新密码:"; + this.input2 = new UIInputText(150); + this.input2.setMaxChars(20); + _loc2_.addChild(this.input2); + this.input2.x = this.input1.x; + this.input2.y = _loc5_.y - 3; + _loc6_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,115); + _loc2_.addChild(_loc6_); + _loc6_.x = _loc4_.x; + _loc6_.y = _loc5_.y + 30; + _loc6_.defaultTextFormat = _loc1_; + _loc6_.text = "请再次输入新密码:"; + this.input3 = new UIInputText(150); + this.input3.setMaxChars(20); + _loc2_.addChild(this.input3); + this.input3.x = this.input1.x; + this.input3.y = _loc6_.y - 3; + var _loc7_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,115); + _loc2_.addChild(_loc7_); + _loc7_.x = _loc4_.x; + _loc7_.y = _loc6_.y + 30; + _loc7_.defaultTextFormat = _loc1_; + _loc7_.text = "请输入注册时邮箱:"; + this.input4 = new UIInputText(150); + this.input4.setMaxChars(20); + _loc2_.addChild(this.input4); + this.input4.x = this.input1.x; + this.input4.y = _loc7_.y - 3; + _loc8_ = new UIButton("确 定",2,10); + _loc2_.addChild(_loc8_); + _loc8_.x = this.input4.x; + _loc8_.y = _loc7_.y + 30; + _loc8_.onClick = this.updatePwd; + ConnectService.getInstance().addEventListener(UserEvent.USER_updatePwd,this.updatePwdSucc); + } + + private function updatePwd(param1:MouseEvent) : void + { + var _loc2_:String = Utils.trim(this.input1.getText()); + var _loc3_:String = Utils.trim(this.input2.getText()); + var _loc4_:String = Utils.trim(this.input3.getText()); + var _loc5_:String = Utils.trim(this.input4.getText()); + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("请输入原密码"); + return; + } + if(_loc3_ == "") + { + MessageBoxUI.getInstance().addMessage("请输入新密码"); + return; + } + if(_loc4_ != _loc3_) + { + MessageBoxUI.getInstance().addMessage("2次输入的新密码不一致"); + return; + } + ConnectService.getInstance().userService.updatePwd(_loc2_,_loc4_,_loc5_); + } + + private function updatePwdSucc(param1:UserEvent) : void + { + MessageBoxUI.getInstance().addMessage("修改成功"); + this.input1.setText(""); + this.input2.setText(""); + this.input3.setText(""); + this.input4.setText(""); + } + } +} + diff --git a/flash_decompiled/com/view/usertool/ToolsPage3.as b/flash_decompiled/com/view/usertool/ToolsPage3.as new file mode 100644 index 0000000..d302d49 --- /dev/null +++ b/flash_decompiled/com/view/usertool/ToolsPage3.as @@ -0,0 +1,137 @@ +package com.view.usertool +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.user.event.UserEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleBg; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class ToolsPage3 extends Sprite + { + + private var text3:TextField; + + private var text2:TextField; + + private var openDateText:TextField; + + private var regDateText:TextField; + + private var regDate:String = ""; + + private var openDate:String = ""; + + private var hasGet:int; + + private var addCash:int; + + private var okBtn:UIButton; + + public function ToolsPage3() + { + super(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(522,267); + addChild(_loc1_); + var _loc2_:UITitleBg = new UITitleBg("迟到基金",_loc1_.width); + _loc1_.addChild(_loc2_); + var _loc3_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,410); + _loc1_.addChild(_loc3_); + _loc3_.x = 50; + _loc3_.y = 60; + _loc3_.wordWrap = true; + _loc3_.multiline = true; + _loc3_.height = 40; + var _loc4_:TextFormat = new TextFormat(); + _loc4_.leading = 4; + _loc3_.defaultTextFormat = _loc4_; + var _loc5_:String = "迟到基金说明:账号注册日期晚于开服日期一天,则可以领取一定数量元宝与点券;晚2天可以领取2天数量的元宝与点券,晚10天以上则按10天计算。"; + _loc3_.text = _loc5_; + this.text2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,300); + _loc1_.addChild(this.text2); + this.text2.x = _loc3_.x; + this.text2.y = _loc3_.y + 60; + this.openDateText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc1_.addChild(this.openDateText); + this.openDateText.x = this.text2.x; + this.openDateText.y = this.text2.y + 25; + this.regDateText = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,200); + _loc1_.addChild(this.regDateText); + this.regDateText.x = this.text2.x; + this.regDateText.y = this.openDateText.y + 25; + this.text3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,300); + _loc1_.addChild(this.text3); + this.text3.x = this.text2.x; + this.text3.y = this.regDateText.y + 30; + this.okBtn = new UIButton("领 取",2,10); + _loc1_.addChild(this.okBtn); + this.okBtn.x = 240; + this.okBtn.y = this.text3.y + 25; + this.okBtn.onClick = this.getLaterAward; + this.initData(); + ConnectService.getInstance().addEventListener(UserEvent.USER_viewLaterAward,this.initDataSucc); + ConnectService.getInstance().addEventListener(UserEvent.USER_getLaterAward,this.getLaterAwardSucc); + } + + private function initData() : void + { + ConnectService.getInstance().userService.viewLaterAward(); + } + + private function initDataSucc(param1:UserEvent) : void + { + var _loc2_:Object = param1.userObject; + this.addCash = _loc2_.dayCash; + this.hasGet = _loc2_.hasGet; + if(this.addCash == 0) + { + this.text2.text = "暂未开放"; + } + else + { + this.text2.htmlText = "每晚注册一天,可领取数量:" + this.addCash + ""; + } + if(this.hasGet == 1) + { + this.text3.htmlText = "领取状态:已领取"; + this.okBtn.setUnEnable(); + this.okBtn.setText("已领取"); + } + else + { + this.text3.htmlText = "领取状态:未领取"; + this.okBtn.setEnable(); + } + this.regDate = _loc2_.regDate; + this.openDate = _loc2_.openDate; + this.openDateText.htmlText = "开服日期:" + this.openDate + ""; + this.regDateText.htmlText = "注册日期:" + this.regDate + ""; + } + + private function getLaterAward(param1:MouseEvent) : void + { + if(this.regDate == this.openDate) + { + MessageBoxUI.getInstance().addMessage("开服当天注册的帐号无法领取迟到基金"); + return; + } + ConnectService.getInstance().userService.getLaterAwar(); + } + + private function getLaterAwardSucc(param1:UserEvent) : void + { + MessageBoxUI.getInstance().addMessage("领取成功"); + this.text3.htmlText = "领取状态:已领取"; + this.okBtn.setUnEnable(); + this.okBtn.setText("已领取"); + } + } +} + diff --git a/flash_decompiled/com/view/world/AbstractToolTipCell.as b/flash_decompiled/com/view/world/AbstractToolTipCell.as new file mode 100644 index 0000000..d241acc --- /dev/null +++ b/flash_decompiled/com/view/world/AbstractToolTipCell.as @@ -0,0 +1,202 @@ +package com.view.world +{ + import com.InstallFace; + import com.utils.BitmapScale9Grid; + import flash.display.Bitmap; + import flash.display.MovieClip; + import flash.display.Shape; + import flash.display.Sprite; + import flash.text.TextField; + import flash.text.TextFieldAutoSize; + import flash.text.TextFormat; + + public class AbstractToolTipCell extends Sprite + { + + private var face:InstallFace = InstallFace.getInstance(); + + public var canMove:Boolean = false; + + public var position:int = -1; + + protected var MY_WIDTH:int = 320; + + public var isDraw:Boolean = false; + + protected var mySprite:Sprite; + + protected var MY_LEADING:int = 0; + + protected var MY_INDENT:int = 0; + + public function AbstractToolTipCell() + { + super(); + this.mySprite = new Sprite(); + this.addChild(this.mySprite); + } + + protected function getUserDefinedCutOffRule(param1:int) : Shape + { + var _loc2_:* = new Shape(); + _loc2_.graphics.moveTo(-3,0); + _loc2_.graphics.lineStyle(1,0); + _loc2_.graphics.lineTo(param1 - this.MY_INDENT - 2,0); + _loc2_.graphics.moveTo(-3,1); + _loc2_.graphics.lineStyle(1,12499631); + _loc2_.graphics.lineTo(param1 - this.MY_INDENT - 2,1); + _loc2_.graphics.moveTo(-3,2); + _loc2_.graphics.lineStyle(1,0); + _loc2_.graphics.lineTo(param1 - this.MY_INDENT - 2,2); + _loc2_.graphics.endFill(); + return _loc2_; + } + + protected function getRow(param1:String = "", param2:String = "", param3:String = "", param4:uint = 16777215, param5:uint = 16777215, param6:uint = 16777215) : Sprite + { + var _loc7_:TextField = null; + _loc7_ = null; + if(param1 == "" || param1 == null) + { + return new Sprite(); + } + var _loc8_:* = new Sprite(); + var _loc9_:* = this.getTextField(param1,param4); + var _loc10_:* = this.getTextField(param3,param6); + this.getTextField(param3,param6).x = 200; + _loc8_.addChild(_loc9_); + if(param2 != "") + { + _loc7_ = this.getTextField(param2,param5); + _loc7_.x = 100; + _loc8_.addChild(_loc7_); + } + if(param3 != "") + { + _loc8_.addChild(_loc10_); + } + _loc8_.graphics.beginFill(0,0); + _loc8_.graphics.drawRect(0,0,1,_loc9_.height + 2); + graphics.endFill(); + return _loc8_; + } + + protected function getCutOffRule() : Shape + { + var _loc1_:* = new Shape(); + _loc1_.graphics.moveTo(0,0); + _loc1_.graphics.lineStyle(1,0,0); + _loc1_.graphics.lineTo(this.MY_WIDTH - this.MY_INDENT,2); + _loc1_.graphics.moveTo(0,2); + _loc1_.graphics.lineStyle(1,0); + _loc1_.graphics.lineTo(this.MY_WIDTH - this.MY_INDENT,2); + _loc1_.graphics.moveTo(0,3); + _loc1_.graphics.lineStyle(1,12499631); + _loc1_.graphics.lineTo(this.MY_WIDTH - this.MY_INDENT,3); + _loc1_.graphics.moveTo(0,4); + _loc1_.graphics.lineStyle(1,0); + _loc1_.graphics.lineTo(this.MY_WIDTH - this.MY_INDENT,4); + _loc1_.graphics.moveTo(0,6); + _loc1_.graphics.lineStyle(1,0,0); + _loc1_.graphics.lineTo(this.MY_WIDTH - this.MY_INDENT,7); + _loc1_.graphics.endFill(); + return _loc1_; + } + + protected function getTextField(param1:String, param2:uint = 16551717, param3:uint = 12, param4:Boolean = false) : TextField + { + var _loc5_:* = new TextField(); + _loc5_.multiline = true; + _loc5_.autoSize = TextFieldAutoSize.LEFT; + var _loc6_:TextFormat = new TextFormat(); + _loc6_.font = "SimSun"; + _loc6_.color = param2; + _loc6_.size = param3; + _loc6_.bold = param4; + _loc6_.leading = 4; + _loc5_.defaultTextFormat = _loc6_; + if(param1 != null) + { + _loc5_.htmlText = param1; + } + if(_loc5_.width > this.MY_WIDTH) + { + _loc5_.width = this.MY_WIDTH; + _loc5_.wordWrap = true; + } + _loc5_.height += 7; + return _loc5_; + } + + protected function drawFrame(param1:Number, param2:Number, param3:Number, param4:Number, param5:String = "0") : void + { + var _loc6_:Bitmap = null; + var _loc7_:* = undefined; + var _loc8_:BitmapScale9Grid = null; + var _loc9_:* = undefined; + var _loc10_:MovieClip = null; + if(param5 == "0") + { + _loc7_ = this.face.getPng("tooltipx9"); + _loc6_ = new Bitmap(_loc7_); + _loc8_ = new BitmapScale9Grid(_loc6_,10,15,10,15); + _loc8_.x = -9; + _loc8_.y = -9; + _loc8_.width = param3 + 18; + _loc8_.height = param4 + 18; + this.mySprite.addChildAt(_loc8_,0); + } + else if(param5 == "1") + { + _loc9_ = this.face.getPng("tooltipx8"); + if(_loc9_) + { + _loc6_ = new Bitmap(_loc9_); + _loc10_ = new MovieClip(); + _loc10_.addChild(_loc6_); + _loc10_.x = param1; + _loc10_.y = param2; + this.mySprite.addChildAt(_loc10_,0); + } + } + } + + public function drawTooltip() : void + { + if(!this.isDraw) + { + this.drawUI(); + this.isDraw = true; + } + } + + protected function drawUI() : void + { + } + + protected function getTextFieldHtml(param1:String, param2:uint = 11992901, param3:uint = 12) : TextField + { + var _loc4_:* = new TextField(); + _loc4_.autoSize = TextFieldAutoSize.LEFT; + var _loc5_:* = new TextFormat(); + _loc5_.color = param2; + _loc5_.size = param3; + _loc4_.defaultTextFormat = _loc5_; + if(param1 != null) + { + _loc4_.htmlText = param1; + } + _loc4_.height += 7; + return _loc4_; + } + + protected function removeArr() : void + { + while(this.mySprite.numChildren > 0) + { + this.mySprite.removeChildAt(0); + } + } + } +} + diff --git a/flash_decompiled/com/view/world/CastleLayer.as b/flash_decompiled/com/view/world/CastleLayer.as new file mode 100644 index 0000000..93bea8e --- /dev/null +++ b/flash_decompiled/com/view/world/CastleLayer.as @@ -0,0 +1,336 @@ +package com.view.world +{ + import com.comfig.ClassConfig; + import com.utils.HashMap; + import flash.display.Bitmap; + import flash.display.Sprite; + import flash.geom.Point; + + public class CastleLayer extends EmptyContainer + { + + public var world:World = World.getInstance(); + + private var treeContainer:Sprite; + + public var centerGX:Object = 0; + + public var centerGY:Object = 0; + + private var casHash:HashMap; + + public var casList:Array; + + public var centerPX:Object = 0; + + public var centerPY:Object = 0; + + private var oldStartGX:Object = 0; + + private var oldStartGY:Object = 0; + + private var isShowEmptyCas:Boolean = false; + + private var item_arr:Array; + + public var startGX:int = 0; + + public var startGY:int = 0; + + private var grassContainer:Sprite; + + private var oldCasList:Array; + + private var update_type:int = 0; + + private var treeList:Array; + + public var redraw:Boolean = false; + + private var emptyHash:HashMap; + + private var drawIng:Object; + + public function CastleLayer() + { + super(); + this.casList = []; + this.oldCasList = []; + this.item_arr = []; + this.grassContainer = new Sprite(); + this.treeContainer = new Sprite(); + this.casHash = new HashMap(); + this.emptyHash = new HashMap(); + this.treeList = []; + } + + public function getCastle(param1:*, param2:*) : CastleMc + { + var _loc3_:* = param1 + "_" + param2; + return this.casHash.getValue(_loc3_) as CastleMc; + } + + public function removeCastle(param1:*, param2:Boolean = false) : void + { + var _loc3_:* = undefined; + var _loc4_:* = param1.posX + "_" + param1.posY; + if(this.casHash.containsKey(_loc4_)) + { + _loc3_ = this.casHash.getValue(_loc4_); + } + if(this.emptyHash.containsKey(_loc4_)) + { + _loc3_ = this.emptyHash.getValue(_loc4_); + if(this.contains(_loc3_)) + { + removeChild(_loc3_); + } + } + if(Boolean(_loc3_) && this.contains(_loc3_)) + { + this.removeChild(_loc3_); + } + this.casHash.remove(_loc4_); + _loc3_ = null; + } + + public function draw(param1:Boolean = false) : void + { + if(this.redraw) + { + this.clear(); + } + if(this.drawIng == true) + { + return; + } + this.drawCastle(); + this.world.hideAllRange(); + } + + public function isCastlePostion(param1:*, param2:*) : Boolean + { + var _loc3_:* = param1 + "_" + param2; + if(this.casHash.containsKey(_loc3_) || this.emptyHash.containsKey(_loc3_)) + { + return true; + } + return false; + } + + override public function clear() : void + { + var _loc1_:CastleMc = null; + var _loc2_:* = this.casHash.values(); + var _loc3_:* = 0; + while(_loc3_ < _loc2_.length) + { + _loc1_ = _loc2_[_loc3_] as CastleMc; + if(_loc1_ != null) + { + _loc1_.clear(); + _loc1_ = null; + } + _loc3_ += 1; + } + this.casHash.clear(); + this.emptyHash.clear(); + this.oldCasList.splice(0,this.oldCasList.length); + super.clear(); + this.casHash = new HashMap(); + this.emptyHash = new HashMap(); + this.oldCasList = []; + } + + public function set updateType(param1:int) : void + { + this.update_type = param1; + } + + public function getCasHash() : HashMap + { + return this.casHash; + } + + private function clearWait() : void + { + this.drawIng = false; + } + + public function drawCastle() : void + { + var _loc1_:Boolean = false; + var _loc2_:int = 0; + var _loc3_:* = undefined; + var _loc4_:Array = []; + var _loc5_:Array = this.oldCasList; + var _loc6_:int = 0; + while(_loc6_ < this.casList.length) + { + if(this.casList[_loc6_] != null) + { + _loc1_ = false; + _loc2_ = 0; + while(_loc2_ < _loc5_.length) + { + if(_loc5_[_loc2_] != null) + { + if(this.casList[_loc6_].posX == _loc5_[_loc2_].posX && this.casList[_loc6_].posY == _loc5_[_loc2_].posY) + { + _loc1_ = true; + _loc5_.splice(_loc2_,1); + break; + } + } + _loc2_ += 1; + } + if(!_loc1_) + { + _loc4_.push(this.casList[_loc6_]); + } + } + _loc6_ += 1; + } + _loc6_ = 0; + while(_loc6_ < _loc4_.length) + { + _loc3_ = _loc4_[_loc6_]; + this.addCastle(_loc3_); + _loc6_ += 1; + } + _loc6_ = 0; + while(_loc6_ < _loc5_.length) + { + this.removeCastle(_loc5_[_loc6_]); + _loc6_ += 1; + } + this.oldCasList = this.casList; + } + + public function showEmptyCas() : void + { + var _loc1_:* = undefined; + var _loc2_:* = undefined; + this.isShowEmptyCas = !this.isShowEmptyCas; + var _loc3_:* = this.emptyHash.values(); + if(this.isShowEmptyCas) + { + _loc1_ = 0; + while(_loc1_ < _loc3_.length) + { + _loc2_ = _loc3_[_loc1_]; + if(!this.contains(_loc2_)) + { + this.addChild(_loc2_); + } + _loc1_ += 1; + } + } + else + { + _loc1_ = 0; + while(_loc1_ < _loc3_.length) + { + _loc2_ = _loc3_[_loc1_]; + if(this.contains(_loc2_)) + { + this.removeChild(_loc2_); + } + _loc1_ += 1; + } + } + } + + public function updatePostion(param1:*, param2:*) : void + { + var _loc3_:* = undefined; + var _loc4_:* = 2; + while(_loc4_ < this.numChildren) + { + _loc3_ = getChildAt(_loc4_); + getChildAt(_loc4_).x = _loc3_.x + param1; + _loc3_.y += param2; + _loc4_ += 1; + } + } + + private function wait() : * + { + this.drawIng = true; + } + + public function addCastle(param1:Object) : void + { + var _loc4_:Point = null; + var _loc2_:Bitmap = null; + var _loc3_:CastleMc = null; + _loc4_ = MapManager.getPix(param1.posX - this.startGX,param1.posY - this.startGY); + if(param1.casId == -1) + { + if(param1.posX == this.world.getPosX() && param1.posY == this.world.getPosY() && this.world.getCastleStatus() == 1) + { + _loc3_ = new CastleMc(); + _loc3_.draw(true); + addChild(_loc3_); + } + _loc2_ = new Bitmap(); + _loc2_.bitmapData = this.world.getPng(ClassConfig.Empty_Castle); + _loc2_.x = _loc4_.x; + _loc2_.y = _loc4_.y; + _loc2_.name = param1.posX + "_" + param1.posY; + if(this.emptyHash.getValue(_loc2_.name) == null) + { + this.emptyHash.put(_loc2_.name,_loc2_); + if(this.isShowEmptyCas) + { + this.addChild(_loc2_); + } + } + } + else + { + _loc3_ = new CastleMc(); + _loc3_.x = _loc4_.x; + _loc3_.y = _loc4_.y; + _loc3_.gx = param1.posX; + _loc3_.gy = param1.posY; + _loc3_.name = param1.posX + "_" + param1.posY; + this.casHash.put(_loc3_.name,_loc3_); + _loc3_.rangeLv = param1.rangeLv; + _loc3_.leagueAttack = param1.leagueAttack; + _loc3_.otherflag = param1.otherflag; + _loc3_.casLv = param1.casLv; + _loc3_.casId = param1.casId; + _loc3_.casName = param1.name; + _loc3_.status = param1.status; + _loc3_.countryId = param1.countryId; + _loc3_.warStatus = param1.warStatus; + _loc3_.type = param1.type; + _loc3_.userRel = param1.userRel; + _loc3_.govId = param1.govId; + _loc3_.castleIcon = param1.castleIcon; + _loc3_.branchCasTypeList = param1.branchCasTypeList; + _loc3_.flagName = param1.flag; + _loc3_.guildName = param1.guildName; + if(_loc3_.type == "PVE" || _loc3_.type.indexOf("pve") >= 0) + { + _loc3_.pveCastle = param1.pveCastle; + } + _loc3_.draw(); + addChild(_loc3_); + } + } + + public function refreshMyCas(param1:*) : void + { + var _loc2_:* = param1.posX + "_" + param1.posY; + if(!this.casHash.containsKey(_loc2_)) + { + return; + } + this.removeCastle(param1,true); + this.addCastle(param1); + } + } +} + diff --git a/flash_decompiled/com/view/world/CastleMc.as b/flash_decompiled/com/view/world/CastleMc.as new file mode 100644 index 0000000..21c4b72 --- /dev/null +++ b/flash_decompiled/com/view/world/CastleMc.as @@ -0,0 +1,604 @@ +package com.view.world +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.loader.CLoader; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.net.URLRequest; + import flash.text.TextField; + import flash.utils.clearInterval; + import flash.utils.setInterval; + + public class CastleMc extends Sprite + { + + public static var range_arr:Array = []; + + private var world:World = World.getInstance(); + + private var _rangeMode:Boolean = false; + + private var _warStatus:int; + + private var _otherflag:String; + + private var _status:int = 0; + + public var isSelf:Boolean; + + private var _gx:int = 0; + + private var _gy:int = 0; + + private var _type:String = ""; + + private var flag_txt:TextField; + + public var guildName:String; + + public var castleIcon:String; + + private var _leagueAttack:int; + + private var _casLv:int = 0; + + private var _casName:String; + + private var timeId:uint; + + public var userRel:int = 0; + + private var _casId:int = 0; + + private var _countryId:int; + + private var car:MovieClip; + + private var range_mc:Sprite; + + private var _rangeLv:int = 0; + + public var inOneGuild:Boolean; + + private var _branchCasTypeList:String; + + public var pveCastle:Object; + + private var image_mc:Sprite; + + private var gov_mc:Sprite; + + private var corArr:Array; + + private var _flagName:String = ""; + + private var govMc:MovieClip; + + public var govId:int; + + private var cbmp:MovieClip; + + private var off_y:int = 0; + + public function CastleMc() + { + super(); + this.car = this.world.getMovieClip(ClassConfig.map_gharry); + this.corArr = ["91_23","-70_23","-70_-55","91_-55"]; + this.image_mc = new Sprite(); + this.gov_mc = new Sprite(); + this.range_mc = new Sprite(); + this.flag_txt = new TextField(); + addChildAt(this.range_mc,0); + addChildAt(this.image_mc,1); + addChildAt(this.gov_mc,2); + addChildAt(this.flag_txt,3); + var _loc1_:* = 0; + while(_loc1_ < 16) + { + range_arr[_loc1_] = []; + _loc1_ += 1; + } + range_arr[0] = [[0,0],[0,1],[0,-1],[-1,0],[1,0]]; + range_arr[1] = [[-1,1],[1,1],[-1,-1],[1,-1]]; + range_arr[2] = [[0,2],[0,-2],[2,0],[-2,0]]; + range_arr[3] = [[0,3],[0,-3],[3,0],[-3,0]]; + range_arr[4] = [[-1,2],[2,1],[-2,-1],[1,-2]]; + range_arr[5] = [[1,2],[-2,1],[2,-1],[-1,-2]]; + range_arr[6] = [[0,4],[-4,0],[4,0],[0,-4]]; + range_arr[7] = [[-2,2],[2,2],[-2,-2],[2,-2]]; + range_arr[8] = [[-1,3],[3,1],[-3,-1],[1,-3]]; + range_arr[9] = [[1,3],[-3,1],[3,-1],[-1,-3]]; + range_arr[10] = [[-1,4],[4,1],[-4,-1],[1,-4]]; + range_arr[11] = [[1,4],[-4,1],[4,-1],[-1,-4]]; + range_arr[12] = [[-2,3],[2,3],[-3,2],[3,2],[-3,-2],[3,-2],[-2,-3],[2,-3]]; + range_arr[13] = [[0,5],[-3,3],[3,3],[5,0],[-5,0],[-3,-3],[3,-3],[0,-5]]; + range_arr[14] = [[-1,5],[1,5],[-5,1],[5,1],[-5,-1],[5,-1],[-1,-5],[1,-5]]; + range_arr[15] = [[0,6],[-2,4],[2,4],[-4,2],[4,2],[-6,0],[6,0],[-4,-2],[4,-2],[-2,-4],[2,-4],[0,-6]]; + } + + public static function getRangeNum(param1:*) : * + { + var _loc2_:* = 0; + var _loc3_:* = 0; + while(_loc3_ < param1) + { + _loc2_ += range_arr[_loc3_].length; + _loc3_ += 1; + } + return _loc2_; + } + + public function set type(param1:*) : void + { + this._type = param1; + } + + public function set status(param1:*) : * + { + this._status = param1; + } + + public function set casName(param1:*) : * + { + this._casName = param1; + } + + public function get otherflag() : String + { + return this._otherflag; + } + + public function get casName() : String + { + return this._casName; + } + + public function get status() : * + { + return this._status; + } + + private function e_loaded(param1:Event) : void + { + var _loc2_:* = param1.target.content; + _loc2_.x = -int(_loc2_.width / 2 - MapVars.CELL_WIDTH / 2); + _loc2_.y = -int(_loc2_.height / 2 - MapVars.CELL_HEIGHT / 2); + this.drawFlag(); + } + + public function set warStatus(param1:int) : void + { + this._warStatus = param1; + } + + private function move() : void + { + var _loc1_:* = undefined; + var _loc2_:* = undefined; + if(this.car.x > 700 || this.car.y > 450) + { + clearInterval(this.timeId); + this.car.stop(); + this.car.visible = false; + this.world.refreshCastle(); + _loc1_ = this.world.getPosX(); + _loc2_ = this.world.getPosY(); + MapManager.drawMap(_loc1_,_loc2_,false); + } + else + { + this.car.x += 5; + this.car.y += 5; + } + } + + public function get flagName() : * + { + return this._flagName; + } + + public function set casId(param1:*) : * + { + this._casId = param1; + } + + public function get rangeMode() : Boolean + { + return this._rangeMode; + } + + public function set flagName(param1:*) : * + { + this._flagName = param1; + } + + public function set leagueAttack(param1:int) : void + { + this._leagueAttack = param1; + } + + public function set rangeMode(param1:Boolean) : void + { + this._rangeMode = param1; + } + + public function get rangeLv() : int + { + return this._rangeLv; + } + + public function updateStatus() : void + { + this.userRel = 3; + if(Boolean(this.cbmp) && this.contains(this.cbmp)) + { + this.removeChild(this.cbmp); + } + this.cbmp = this.world.getMovieClip(ClassConfig.Ant_Castle); + this.cbmp.gotoAndStop(1); + this.addChildAt(this.cbmp,0); + this.cbmp.x = 3; + this.cbmp.y = int((this.image_mc.height + MapVars.CELL_HEIGHT) / 2) - 10 - this.off_y; + } + + private function drawFlag() : void + { + var _loc1_:TextField = null; + var _loc2_:Bitmap = null; + var _loc3_:BitmapData = null; + var _loc4_:* = undefined; + var _loc5_:* = undefined; + var _loc6_:* = undefined; + var _loc7_:* = undefined; + var _loc8_:* = undefined; + var _loc11_:String = null; + var _loc12_:int = 0; + var _loc9_:* = new Bitmap(); + var _loc10_:* = new BitmapData(20,34); + if(this.userRel != 0) + { + if(this.userRel == 1) + { + } + if(this.userRel == 2) + { + } + if(this.userRel == 3) + { + } + } + if(this.castleIcon) + { + _loc11_ = this.castleIcon.split("_")[0]; + } + if(_loc11_ != "yellow") + { + if(_loc11_ != "blue") + { + if(_loc11_ == "vip") + { + } + } + } + if(Boolean(this.cbmp) && this.contains(this.cbmp)) + { + this.removeChild(this.cbmp); + } + if(this.userRel == 0) + { + this.cbmp = this.world.getMovieClip(ClassConfig.Own_Castle); + } + else if(this.userRel == 3 || this.userRel == 2) + { + this.cbmp = this.world.getMovieClip(ClassConfig.Ant_Castle); + } + else + { + this.cbmp = this.world.getMovieClip(ClassConfig.Others_Castle); + } + this.cbmp.gotoAndStop(_loc12_); + this.addChild(this.cbmp); + this.cbmp.x = 3; + this.cbmp.y = int((this.image_mc.height + MapVars.CELL_HEIGHT) / 2) - 10 - this.off_y; + _loc1_ = new TextField(); + _loc1_.autoSize = "center"; + if(this._casName) + { + _loc1_.text = this._casName; + } + _loc1_.y = this.cbmp.y; + _loc1_.x += 3; + _loc1_.textColor = 16777215; + this.addChild(_loc1_); + if(this._flagName) + { + _loc2_ = new Bitmap(); + if(this.userRel == 0) + { + if(this._flagName != this.world.getGuildFlag()) + { + } + } + if(this._flagName == this.world.getGuildFlag() || this.userRel == 0) + { + _loc3_ = this.world.getPng(ClassConfig.Blue); + } + else + { + _loc3_ = this.world.getPng(ClassConfig.Red); + } + _loc2_.bitmapData = _loc3_; + this.addChild(_loc2_); + _loc2_.x = this.cbmp.x - 25; + _loc2_.y = this.cbmp.y + 1; + _loc1_ = new TextField(); + _loc1_.textColor = 16777215; + _loc1_.autoSize = "left"; + if(this._flagName) + { + _loc1_.text = this._flagName; + } + else + { + _loc1_.text = ""; + } + _loc1_.x = _loc2_.x + 7; + _loc1_.y = _loc2_.y + 1; + this.addChild(_loc1_); + } + if(this._leagueAttack > 0) + { + _loc10_ = this.world.getPng(ClassConfig.Flag_White); + _loc9_.bitmapData = _loc10_; + this.addChild(_loc9_); + _loc9_.x = this.cbmp.x + 50; + _loc9_.y = this.cbmp.y + 2; + if(this.castleIcon) + { + _loc9_.y = -_loc9_.height + MapVars.CELL_HEIGHT * (1 - 0.8 - Number(this.castleIcon.charAt(8)) / 10 * 1.2) - 5; + } + _loc5_ = new TextField(); + _loc5_.textColor = 16711680; + _loc5_.autoSize = "left"; + if(this._otherflag) + { + _loc5_.text = this._otherflag; + } + else + { + _loc5_.text = ""; + } + _loc5_.x = _loc9_.x + 2; + _loc5_.y = _loc9_.y + 4; + this.addChild(_loc5_); + } + if(this.userRel == 0 && this._type == "USERCAS" && this.status == 0) + { + this.car.x = this.image_mc.width + 15; + this.car.y = this.image_mc.height - 10; + this.addChild(this.car); + this.car.gotoAndStop(13); + this.car.visible = false; + } + } + + public function set countryId(param1:int) : void + { + this._countryId = param1; + } + + public function carMove() : void + { + this.car.visible = true; + this.car.gotoAndPlay(1); + this.timeId = setInterval(this.move,100); + } + + public function get casLv() : * + { + return this._casLv; + } + + public function draw(param1:Boolean = false) : void + { + if(param1) + { + this.addChild(this.car); + this.car.gotoAndStop(13); + this.car.visible = false; + return; + } + this.drawCastle(); + } + + public function clear() : * + { + var _loc1_:* = undefined; + var _loc2_:* = 0; + while(_loc2_ < this.numChildren) + { + this.removeChildAt(0); + } + for(_loc1_ in this) + { + _loc1_ = null; + } + } + + public function set rangeLv(param1:int) : * + { + this._rangeLv = param1; + } + + public function set branchCasTypeList(param1:*) : * + { + this._branchCasTypeList = param1; + } + + public function get casId() : int + { + return this._casId; + } + + public function get type() : String + { + return this._type; + } + + public function get warStatus() : int + { + return this._warStatus; + } + + public function get leagueAttack() : int + { + return this._leagueAttack; + } + + public function get imageMc() : Sprite + { + return this.image_mc; + } + + public function set gx(param1:*) : void + { + this._gx = param1; + } + + private function drawCastle() : void + { + var _loc10_:String = null; + var _loc11_:CLoader = null; + var _loc12_:Sprite = null; + var _loc1_:String = null; + var _loc2_:* = undefined; + var _loc3_:BitmapData = null; + var _loc4_:Bitmap = null; + var _loc5_:Array = null; + if(this.contains(this.image_mc)) + { + removeChild(this.image_mc); + } + this.image_mc = new Sprite(); + var _loc6_:* = new Array(); + if(this._branchCasTypeList != null && this._branchCasTypeList != "") + { + _loc6_ = this._branchCasTypeList.split(","); + } + var _loc7_:int = 0; + while(_loc7_ < _loc6_.length) + { + _loc1_ = _loc6_[_loc7_]; + _loc3_ = new BitmapData(91,80); + _loc4_ = new Bitmap(); + if(_loc1_ == "economic") + { + _loc2_ = this.world.getPng("JingJi_" + (_loc7_ + 1)); + } + else if(_loc1_ == "military") + { + _loc2_ = this.world.getPng("JunShi_" + (_loc7_ + 1)); + } + _loc4_.bitmapData = _loc2_; + if(_loc7_ <= 1) + { + addChildAt(_loc4_,2); + } + else + { + addChildAt(_loc4_,0); + } + _loc5_ = this.corArr[_loc7_].split("_"); + _loc4_.x = int(_loc5_[0]); + _loc4_.y = int(_loc5_[1]); + _loc7_++; + if(this.govId > 0) + { + switch(this.govId) + { + case 1: + _loc10_ = "gjbiaoshi_castle.swf"; + break; + case 2: + _loc10_ = "djjbiaoshi_castle.swf"; + break; + case 3: + _loc10_ = "dwbiaoshi_castle.swf"; + break; + case 4: + _loc10_ = "smbiaoshi_castle.swf"; + } + _loc11_ = new CLoader(); + _loc11_.load(new URLRequest(ServerConfig.IMAGE_MAP_URL + _loc10_)); + _loc11_.contentLoaderInfo.addEventListener(Event.COMPLETE,this.e_loaded,false,0,true); + this.gov_mc.addChild(_loc11_); + } + } + addChildAt(this.image_mc,2); + var _loc8_:* = Math.floor(this.casLv / 3) + 1; + var _loc9_:* = this.type.toLowerCase() + ".png"; + if(this.type == "USERCAS") + { + _loc9_ = this.castleIcon; + } + if(_loc9_.indexOf(".") > 0) + { + _loc11_ = new CLoader(); + _loc11_.load(new URLRequest(ServerConfig.IMAGE_BUILD_URL + _loc9_)); + _loc11_.contentLoaderInfo.addEventListener(Event.COMPLETE,this.e_loaded,false,0,true); + this.image_mc.addChild(_loc11_); + this.off_y = 0; + } + else + { + _loc12_ = this.world.getSprite(_loc9_); + this.image_mc.addChild(_loc12_); + _loc12_.x = -int(_loc12_.width / 2 - MapVars.CELL_WIDTH / 2); + _loc12_.y = -int(_loc12_.height / 2 - MapVars.CELL_HEIGHT / 2); + this.off_y = 40; + this.drawFlag(); + } + } + + public function get countryId() : int + { + return this._countryId; + } + + public function get branchCasTypeList() : String + { + return this._branchCasTypeList; + } + + public function get gx() : int + { + return this._gx; + } + + public function set otherflag(param1:String) : void + { + this._otherflag = param1; + } + + public function get gy() : int + { + return this._gy; + } + + public function set gy(param1:*) : void + { + this._gy = param1; + } + + public function set casLv(param1:int) : void + { + this._casLv = param1; + } + } +} + diff --git a/flash_decompiled/com/view/world/ControlPanel.as b/flash_decompiled/com/view/world/ControlPanel.as new file mode 100644 index 0000000..371f434 --- /dev/null +++ b/flash_decompiled/com/view/world/ControlPanel.as @@ -0,0 +1,189 @@ +package com.view.world +{ + import com.InstallFace; + import com.comfig.ClassConfig; + import com.common.PublicMethod; + import com.utils.TextUtils; + import com.view.newui.UIConfig; + import com.view.tip.TipTitle; + import com.view.ui.menu.mc.MenuLeftBtn; + import flash.display.MovieClip; + import flash.display.SimpleButton; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFieldType; + + public class ControlPanel extends Sprite + { + + private var worldUI:World; + + private var face:InstallFace; + + private var world:World; + + private var x_txt:TextField; + + private var y_txt:TextField; + + private var goBtn:MenuLeftBtn; + + private var viewRange:Boolean; + + private var viewCountry:Boolean; + + private var rangeTip:TipTitle; + + private var mapTip:TipTitle; + + public function ControlPanel() + { + var _loc3_:TextField = null; + var _loc6_:MovieClip = null; + this.worldUI = World.getInstance(); + this.face = InstallFace.getInstance(); + this.world = World.getInstance(); + super(); + var _loc1_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,20); + addChild(_loc1_); + _loc1_.x = 15; + _loc1_.y = -20; + _loc1_.text = "X:"; + var _loc2_:Sprite = this.face.getSprite(ClassConfig.menu_sp10); + addChild(_loc2_); + _loc2_.x = _loc1_.x + _loc1_.width - 3; + _loc2_.y = _loc1_.y - 2; + this.x_txt = PublicMethod.getTextFieldWithFillter(1048575,40); + this.x_txt.mouseEnabled = true; + this.x_txt.type = TextFieldType.INPUT; + addChild(this.x_txt); + this.x_txt.x = _loc1_.x + _loc1_.width; + this.x_txt.y = _loc1_.y; + this.x_txt.maxChars = 4; + this.x_txt.restrict = "0-9"; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,20); + addChild(_loc3_); + _loc3_.x = 80; + _loc3_.y = _loc1_.y; + _loc3_.text = "Y:"; + var _loc4_:Sprite = this.face.getSprite(ClassConfig.menu_sp10); + addChild(_loc4_); + _loc4_.x = _loc3_.x + _loc3_.width; + _loc4_.y = _loc2_.y; + this.y_txt = PublicMethod.getTextFieldWithFillter(1048575,40); + this.y_txt.mouseEnabled = true; + this.y_txt.type = TextFieldType.INPUT; + addChild(this.y_txt); + this.y_txt.x = _loc3_.x + _loc3_.width; + this.y_txt.y = _loc1_.y; + this.y_txt.maxChars = 4; + this.y_txt.restrict = "0-9"; + this.goBtn = new MenuLeftBtn(); + addChild(this.goBtn); + this.goBtn.x = 156; + this.goBtn.y = -22; + this.goBtn.addEventListener(MouseEvent.CLICK,this.toPosi,false,0,true); + var _loc5_:SimpleButton = this.face.getButton(ClassConfig.menu_sp13); + addChild(_loc5_); + _loc5_.x = 60; + _loc5_.y = 158; + _loc5_.addEventListener(MouseEvent.CLICK,this.clickHome,false,0,true); + new TipTitle(_loc5_,this.face.stage,this.face.tip_bg,{"titletext":"我的城池"}); + _loc6_ = this.face.getMovieClip(ClassConfig.menu_sp12); + addChild(_loc6_); + _loc6_.x = 30; + _loc6_.y = 148; + _loc6_.addEventListener(MouseEvent.CLICK,this.clickRange,false,0,true); + var _loc7_:MovieClip = this.face.getMovieClip(ClassConfig.menu_sp11); + addChild(_loc7_); + _loc7_.x = 130; + _loc7_.y = 148; + _loc7_.addEventListener(MouseEvent.CLICK,this.clickEmptyTown,false,0,true); + var _loc8_:SimpleButton = this.face.getButton(UIConfig.btn_add); + addChild(_loc8_); + _loc8_.x = 150; + _loc8_.y = 6; + _loc8_.addEventListener(MouseEvent.CLICK,this.clickMinMap,false,0,true); + this.rangeTip = new TipTitle(_loc6_,this.face.stage,this.face.tip_bg,{"titletext":"势力范围"}); + new TipTitle(_loc7_,this.face.stage,this.face.tip_bg,{"titletext":"建城点"}); + this.mapTip = new TipTitle(_loc8_,this.face.stage,this.face.tip_bg,{"titletext":"显示小地图"}); + TextUtils.getInstance().selectText(this.x_txt); + TextUtils.getInstance().selectText(this.y_txt); + } + + private function clickRange(param1:MouseEvent) : void + { + if(!this.viewRange) + { + this.viewRange = true; + this.rangeTip.infoObject = {"titletext":"显示势力"}; + MapManager.setMode(1); + } + else + { + this.rangeTip.infoObject = {"titletext":"隐藏势力"}; + this.viewRange = false; + MapManager.setMode(0); + } + } + + private function clickMinMap(param1:MouseEvent) : void + { + if(!this.viewCountry) + { + this.viewCountry = true; + this.world.hideMinMap(); + } + else + { + this.viewCountry = false; + this.world.showMinMap(); + } + } + + private function clickEmptyTown(param1:MouseEvent) : void + { + this.world.showEmptyCas(); + } + + private function clickHome(param1:MouseEvent) : void + { + this.world.drawMap(this.world.getPosX(),this.world.getPosY()); + } + + private function toPosi(param1:MouseEvent) : void + { + var _loc2_:RegExp = /^\+?[1-9][0-9]*$/; + if(!_loc2_.test(this.x_txt.text) || !_loc2_.test(this.y_txt.text)) + { + return; + } + var _loc3_:Number = Number(this.x_txt.text); + var _loc4_:Number = Number(this.y_txt.text); + if(_loc3_ <= 0) + { + _loc3_ = 1; + this.x_txt.text = "1"; + } + if(_loc4_ <= 0) + { + _loc4_ = 1; + this.y_txt.text = "1"; + } + this.world.hideAllRange(); + this.world.drawMap(_loc3_,_loc4_); + } + + public function set gx(param1:int) : void + { + this.x_txt.text = param1.toString(); + } + + public function set gy(param1:int) : void + { + this.y_txt.text = param1.toString(); + } + } +} + diff --git a/flash_decompiled/com/view/world/Cube.as b/flash_decompiled/com/view/world/Cube.as new file mode 100644 index 0000000..a248a23 --- /dev/null +++ b/flash_decompiled/com/view/world/Cube.as @@ -0,0 +1,18 @@ +package com.view.world +{ + import com.comfig.ClassConfig; + import flash.display.Sprite; + + public class Cube extends Sprite + { + + private var worldUI:World = World.getInstance(); + + public function Cube() + { + super(); + addChild(this.worldUI.getSprite(ClassConfig.map_cube)); + } + } +} + diff --git a/flash_decompiled/com/view/world/EmptyContainer.as b/flash_decompiled/com/view/world/EmptyContainer.as new file mode 100644 index 0000000..de70065 --- /dev/null +++ b/flash_decompiled/com/view/world/EmptyContainer.as @@ -0,0 +1,48 @@ +package com.view.world +{ + import com.loader.CLoader; + import flash.display.Sprite; + + public class EmptyContainer extends Sprite + { + + public function EmptyContainer() + { + super(); + if(this.numChildren > 0) + { + removeChildAt(0); + } + this.scaleX = 1; + this.scaleY = 1; + } + + public function clear() : void + { + var _loc1_:* = undefined; + var _loc3_:int = 0; + var _loc2_:* = this.numChildren; + while(_loc3_ < _loc2_) + { + if(getChildAt(0) as CLoader) + { + (getChildAt(0) as CLoader).clear(); + } + _loc1_ = this.getChildAt(0).name; + if(_loc1_.indexOf("instance") < 0) + { + try + { + this[_loc1_] = null; + } + catch(e:Error) + { + } + } + removeChildAt(0); + _loc3_ += 1; + } + } + } +} + diff --git a/flash_decompiled/com/view/world/IMap.as b/flash_decompiled/com/view/world/IMap.as new file mode 100644 index 0000000..5b193da --- /dev/null +++ b/flash_decompiled/com/view/world/IMap.as @@ -0,0 +1,214 @@ +package com.view.world +{ + import com.InstallFace; + import com.common.App; + import com.control.ConnectService; + import com.control.map.event.MapEvent; + import com.data.MemeberShip; + import com.data.data.city.Castle; + import com.newdata.user.NewGuild; + import com.newdata.user.NewUser; + import com.newdata.user.NewUserData; + import com.view.Control; + 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.ProgressEvent; + import flash.net.URLRequest; + import flash.system.ApplicationDomain; + import flash.system.LoaderContext; + + public class IMap extends Sprite + { + + private var urlArr:Array = ["Map.swf","resc/MapResource.swf"]; + + public var face:InstallFace = InstallFace.getInstance(); + + public var loadComplete:Boolean; + + private var loadNums:int; + + public var loader:Loader; + + private var _loaderInfo:ApplicationDomain; + + public function IMap() + { + super(); + this._loaderInfo = new ApplicationDomain(); + Control.getInstance().addLoadMc(); + this.loadComplete = false; + this.loader = new Loader(); + this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.loadUiComplete); + this.loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,this.loadProgress); + this.beginLoadRes(); + addEventListener(Event.ADDED_TO_STAGE,this.addToStage); + addEventListener(Event.REMOVED_FROM_STAGE,this.removeToStage); + } + + public function addToStage(param1:Event) : void + { + ConnectService.getInstance().addEventListener(MapEvent.findMapCellsByPoint,this.readCasSucc); + ConnectService.getInstance().addEventListener(MapEvent.getCellToolTip,this.readCellInfoSucc); + } + + public function removeToStage(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(MapEvent.findMapCellsByPoint,this.readCasSucc); + ConnectService.getInstance().removeEventListener(MapEvent.getCellToolTip,this.readCellInfoSucc); + } + + public function findMapCellsByPoint(param1:int, param2:int, param3:int) : void + { + ConnectService.getInstance().mapService.findMapCellsByPoint(param1,param2,param3); + } + + public function readCasSucc(param1:MapEvent) : void + { + } + + public function getCellToolTip(param1:int, param2:int, param3:String) : void + { + ConnectService.getInstance().mapService.getCellToolTip(param1,param2,param3); + } + + public function readCellInfoSucc(param1:MapEvent) : void + { + } + + private function beginLoadRes() : void + { + Control.getInstance().setCurrNums(this.loadNums + 1 + "/" + this.urlArr.length); + var _loc1_:URLRequest = new URLRequest(this.urlArr[this.loadNums]); + this.loader.load(_loc1_,new LoaderContext(false,this._loaderInfo)); + } + + public function loadProgress(param1:ProgressEvent) : void + { + var _loc2_:int = int(param1.bytesLoaded / param1.bytesTotal * 100); + Control.getInstance().setLoadProess(_loc2_); + } + + public function loadUiComplete(param1:Event) : void + { + ++this.loadNums; + if(this.loadNums < this.urlArr.length) + { + this.beginLoadRes(); + } + else + { + this.loadComplete = true; + this.loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.loadUiComplete); + this.loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,this.loadProgress); + this.loader = null; + Control.getInstance().setCurrNums(""); + Control.getInstance().removeLoadMc(); + this.loadOver(); + } + } + + public function loadOver() : void + { + } + + 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_; + } + + public function getPosX() : int + { + return MemeberShip.getMainCastle().posX; + } + + public function getPosY() : int + { + return MemeberShip.getMainCastle().posY; + } + + public function getCastleStatus() : int + { + return MemeberShip.getMainCastle().status; + } + + public function getGuildFlag() : String + { + var _loc1_:NewGuild = NewUserData.getNewGuild(); + if(_loc1_) + { + return _loc1_.flag; + } + return ""; + } + + public function getCastle() : Castle + { + return MemeberShip.getMainCastle(); + } + + public function getUser() : NewUser + { + return NewUserData.getUser(); + } + } +} + diff --git a/flash_decompiled/com/view/world/InfoPanel.as b/flash_decompiled/com/view/world/InfoPanel.as new file mode 100644 index 0000000..66a5bd9 --- /dev/null +++ b/flash_decompiled/com/view/world/InfoPanel.as @@ -0,0 +1,120 @@ +package com.view.world +{ + import com.comfig.ClassConfig; + import com.loader.CLoader; + import com.utils.Utils; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.text.TextField; + + public class InfoPanel extends Sprite + { + + private var img_mc:CLoader; + + public var cas_txt:Object; + + private var lastCastle:CastleMc; + + private var txtXY:TextField; + + public var xy_txt:Object; + + private var gx:Object; + + private var gy:Object; + + private var txtInfo:TextField; + + private var world:World = World.getInstance(); + + private var infoMc:MovieClip; + + public function InfoPanel() + { + super(); + this.infoMc = this.world.getMovieClip(ClassConfig.map_InfoPanel); + addChild(this.infoMc); + this.txtXY = this.infoMc.xy_txt as TextField; + this.txtInfo = this.infoMc.cas_txt as TextField; + this.img_mc = new CLoader(); + addChild(this.img_mc); + this.img_mc.x = 100; + this.img_mc.contentLoaderInfo.addEventListener(Event.COMPLETE,this.e_loaded,false,0,true); + this.addEventListener(Event.REMOVED_FROM_STAGE,this.__removed,false,0,true); + } + + public function __removed(param1:Event) : void + { + this.clear(); + } + + public function set content(param1:String) : * + { + this.txtInfo.htmlText = param1; + this.img_mc.visible = false; + } + + public function clear() : void + { + var _loc1_:* = undefined; + this.removeEventListener(Event.REMOVED_FROM_STAGE,this.__removed); + this.img_mc.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.e_loaded); + Utils.removeAll(this); + for(_loc1_ in this) + { + _loc1_ = null; + } + this.img_mc.unloadAndStop(); + } + + public function set title(param1:String) : * + { + this.txtXY.text = param1; + } + + public function set castle(param1:CastleMc) : void + { + if(param1 == null) + { + this.txtInfo.htmlText = ""; + this.img_mc.visible = false; + this.lastCastle = param1; + return; + } + if(this.lastCastle == param1) + { + return; + } + this.lastCastle = param1; + if(param1 != null) + { + if(param1.casId >= 0) + { + this.img_mc.visible = false; + this.txtInfo.htmlText = "id:" + param1.casId + "
势力:" + param1.rangeLv; + if(param1.guildName != undefined) + { + this.txtInfo.htmlText += "
联盟:" + param1.guildName == null ? "" : param1.guildName; + } + this.txtInfo.htmlText += "
坐标:" + this.gx + "," + this.gy; + } + else + { + this.img_mc.visible = true; + this.txtInfo.htmlText = param1.pveCastle.npcDesc; + this.txtInfo.htmlText += "
坐标:" + this.gx + "," + this.gy; + } + } + } + + public function e_loaded(param1:*) : * + { + var _loc2_:* = param1.target.loader.height / param1.target.loader.width; + param1.target.loader.width = 50; + param1.target.loader.height = _loc2_ * param1.target.loader.width; + } + } +} + diff --git a/flash_decompiled/com/view/world/LandType.as b/flash_decompiled/com/view/world/LandType.as new file mode 100644 index 0000000..ef798bf --- /dev/null +++ b/flash_decompiled/com/view/world/LandType.as @@ -0,0 +1,51 @@ +package com.view.world +{ + public class LandType + { + + public function LandType() + { + super(); + } + + public static function getName(param1:int) : String + { + var _loc2_:String = ""; + switch(param1) + { + case 0: + _loc2_ = "草地"; + break; + case 1: + _loc2_ = "森林"; + break; + case 2: + _loc2_ = "沙漠"; + break; + case 3: + _loc2_ = "湖泊"; + break; + case 4: + _loc2_ = "山脉"; + } + return _loc2_; + } + + public static function getLandTypeId(param1:int, param2:int) : int + { + var _loc3_:* = param1; + var _loc4_:* = param2; + var _loc5_:* = MapVars.BMP_LOOP_NUM; + var _loc6_:* = Math.floor(_loc3_ / 6); + var _loc7_:* = Math.floor(_loc6_ % _loc5_); + var _loc8_:* = Math.floor(_loc4_ / 6); + var _loc9_:* = Math.floor(_loc8_ % _loc5_); + var _loc10_:* = MapVars.BMP_LOOP_DATA[_loc7_][_loc9_]; + var _loc11_:* = param1 - _loc6_ * 6; + var _loc12_:* = param2 - _loc8_ * 6; + var _loc13_:* = MapVars.BMP_LAND_DATA[_loc10_][_loc11_ * _loc12_]; + return MapVars.BMP_LAND_DATA[_loc10_][_loc11_ * _loc12_]; + } + } +} + diff --git a/flash_decompiled/com/view/world/MapManager.as b/flash_decompiled/com/view/world/MapManager.as new file mode 100644 index 0000000..0a8169a --- /dev/null +++ b/flash_decompiled/com/view/world/MapManager.as @@ -0,0 +1,87 @@ +package com.view.world +{ + import flash.display.Bitmap; + import flash.geom.Point; + + public class MapManager + { + + private static var world:World = World.getInstance(); + + public function MapManager() + { + super(); + } + + public static function getMode() : int + { + return MapVars.MAP_MODE; + } + + public static function getPix(param1:int, param2:int) : Point + { + var _loc3_:Point = new Point(); + var _loc4_:* = -param2 * MapVars.CELL_WIDTH / 2; + var _loc5_:* = -1 / 2 * _loc4_; + _loc3_.x = _loc4_ + param1 * MapVars.CELL_WIDTH / 2 - MapVars.CELL_WIDTH / 2; + _loc3_.y = _loc5_ + param1 * MapVars.CELL_HEIGHT / 2 - MapVars.CELL_HEIGHT / 2; + return _loc3_; + } + + public static function getBmp(param1:int) : Bitmap + { + return new Bitmap(world.getPng("BMP_" + param1)); + } + + public static function setMode(param1:int) : void + { + MapVars.MAP_MODE = param1; + if(param1 == 1) + { + world.hideAllRange(); + } + if(param1 == 0) + { + world.showRange(); + } + } + + public static function drawMap(param1:*, param2:*, param3:Boolean = true) : void + { + if(param3) + { + world.draw(param1,param2); + } + else + { + world.drawMap(param1,param2); + } + } + + public static function getLandType(param1:int, param2:int) : String + { + return LandType.getName(getLandTypeId(param1,param2)); + } + + public static function getLandTypeId(param1:int, param2:int) : int + { + if(param1 < 0 || param2 < 0) + { + return 0; + } + var _loc3_:* = param1; + var _loc4_:* = param2; + var _loc5_:* = MapVars.BMP_LOOP_NUM; + var _loc6_:* = Math.floor(_loc3_ / 6); + var _loc7_:* = Math.floor(_loc6_ % _loc5_); + var _loc8_:* = Math.floor(_loc4_ / 6); + var _loc9_:* = Math.floor(_loc8_ % _loc5_); + var _loc10_:* = MapVars.BMP_LOOP_DATA[_loc7_][_loc9_]; + var _loc11_:* = param1 - _loc6_ * 6; + var _loc12_:* = param2 - _loc8_ * 6; + var _loc13_:* = MapVars.BMP_LAND_DATA[_loc10_][_loc11_ * _loc12_]; + return MapVars.BMP_LAND_DATA[_loc10_][_loc11_ * _loc12_]; + } + } +} + diff --git a/flash_decompiled/com/view/world/MapVars.as b/flash_decompiled/com/view/world/MapVars.as new file mode 100644 index 0000000..726941b --- /dev/null +++ b/flash_decompiled/com/view/world/MapVars.as @@ -0,0 +1,53 @@ +package com.view.world +{ + public class MapVars + { + + public static const BMP_HEIGHT:int = 324; + + public static var SRV_GetUserCastles:Object = "accountAct.getUserCastles"; + + public static const CELL_WIDTH:int = 108; + + public static const BMP_WIDTH:int = 648; + + public static const VIEW_HEIGHT:int = 700; + + public static const AREA_CELL_NUM:int = 36; + + public static var MAP_MODE:int = 0; + + public static const AREA_HEIGHT:int = 2592; + + public static const AREA_BMP_NUM:int = 6; + + public static const VIEW_WIDTH:int = 1440; + + public static const CELL_X_NUM:int = 4680; + + public static const CELL_Y_NUM:int = 4680; + + public static const CELL_HEIGHT:int = 54; + + public static const BMP_LOOP_NUM:int = 9; + + public static var SRV_FindMapCellsByPoint:Object = "mapAct.findMapCellsByPoint"; + + public static var BMP_LAND_DATA:Object = [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[4,4,1,0,0,0,4,4,4,1,4,0,1,4,4,4,1,0,0,4,4,4,4,0,0,4,4,4,4,4,0,1,0,0,4,4],[0,0,0,0,1,1,0,0,0,0,0,0,4,1,0,0,0,0,4,4,0,0,0,0,4,4,1,0,0,0,1,4,1,1,0,0],[0,0,0,0,4,0,0,0,0,0,4,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,1,0,1,1,0,1,1,1,0,1,1,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1],[0,0,1,0,4,4,0,0,0,0,4,4,0,0,0,0,0,1,1,0,4,0,0,0,1,1,4,0,0,0,1,1,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,1,0,0,0,1,0,0,1,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,2,2,2,2,2,0,2,2,2,2,2,0,2,2,2,2,2,0,2,2,2,2,2,0,2,2,2,2,2],[0,0,0,0,0,0,2,2,2,2,2,0,2,2,2,2,2,0,2,2,2,2,2,0,2,2,2,2,2,0,2,2,2,2,2,0] + ,[0,2,2,2,2,2,0,2,2,2,2,2,0,0,2,2,2,2,0,0,2,2,2,2,0,0,2,2,2,2,0,0,0,0,0,0],[2,2,2,2,2,0,2,2,2,2,2,0,2,2,2,2,2,0,2,2,2,2,2,0,2,2,2,2,2,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,3,3,3,0,0,3,3,0,0,0,0,0,0,3,3,3,0,0,0,3,3,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,3,3,3,0,0,0,0,3,3]]; + + public static const BMP_LOOP_DATA:Object = [[3,2,0,4,5,6,17,1,9],[16,2,1,0,5,1,7,15,2],[3,4,3,4,11,12,6,8,3],[15,2,3,0,13,14,2,9,4],[1,11,12,4,2,6,3,6,6],[7,13,14,5,4,0,7,8,9],[1,2,3,17,5,16,4,8,2],[2,5,4,4,9,6,7,8,9],[17,2,3,1,0,15,2,6,3]]; + + public static const AREA_WIDTH:int = 5184; + + public static var SRV_FindDefaultMapCells:Object = "mapAct.findDefaultMapCells"; + + public static var CELL_LONG:Number = CELL_HEIGHT * Math.sqrt(5) / 2; + + public function MapVars() + { + super(); + } + } +} + diff --git a/flash_decompiled/com/view/world/MinMap.as b/flash_decompiled/com/view/world/MinMap.as new file mode 100644 index 0000000..7ed7374 --- /dev/null +++ b/flash_decompiled/com/view/world/MinMap.as @@ -0,0 +1,202 @@ +package com.view.world +{ + import com.common.PublicMethod; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.geom.Point; + + public class MinMap extends EmptyContainer + { + + public var world:World = World.getInstance(); + + private var container:EmptyContainer; + + public var centerGX:int = 0; + + public var centerGY:int = 0; + + public var update:Boolean = true; + + public var casList:Array; + + private var isMouseDown:Boolean = false; + + private var lastCas:Sprite; + + private var rect:Sprite; + + private var h:int = 158; + + private var percentX:Number = 0; + + private var percentY:Number = 0; + + private var w:int = 158; + + public function MinMap() + { + super(); + this.casList = []; + this.container = new EmptyContainer(); + this.container.x = 18; + this.container.y = -5; + this.addChildAt(this.container,0); + this.percentX = 0.75 * MapVars.AREA_CELL_NUM * MapVars.CELL_WIDTH / this.w; + this.percentY = 0.75 * MapVars.AREA_CELL_NUM * MapVars.CELL_HEIGHT / this.h; + this.container.graphics.beginFill(0,0); + this.container.graphics.drawRect(0,0,this.w,this.h); + this.container.graphics.endFill(); + var _loc1_:Sprite = new Sprite(); + _loc1_.graphics.beginFill(16777215,0); + _loc1_.graphics.drawCircle(0,0,this.w / 2); + _loc1_.graphics.endFill(); + _loc1_.mouseChildren = false; + _loc1_.mouseEnabled = false; + this.container.mask = _loc1_; + this.container.addEventListener(MouseEvent.CLICK,this.e_click,false,0,true); + this.container.addEventListener(MouseEvent.MOUSE_MOVE,this.e_move,false,0,true); + this.rect = new Sprite(); + this.rect.graphics.beginFill(16776960,0); + this.rect.graphics.lineStyle(1,65526); + this.rect.graphics.drawRect(-10,-10,20,20); + this.rect.graphics.endFill(); + this.addChild(this.rect); + this.addChild(_loc1_); + _loc1_.x = 10; + _loc1_.y = -3; + } + + public function draw() : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + var _loc1_:* = undefined; + _loc2_ = undefined; + _loc3_ = undefined; + var _loc4_:* = undefined; + var _loc5_:* = undefined; + var _loc6_:Point = null; + var _loc7_:* = undefined; + var _loc8_:* = undefined; + var _loc9_:* = undefined; + var _loc10_:* = undefined; + var _loc11_:Sprite = null; + if(!this.update) + { + return; + } + this.container.clear(); + var _loc12_:* = 0; + while(_loc12_ < this.casList.length) + { + if(this.casList[_loc12_] != null) + { + _loc1_ = this.casList[_loc12_]; + if(_loc1_.casId != -1) + { + _loc2_ = _loc1_.posX; + _loc3_ = _loc1_.posY; + _loc4_ = _loc2_ - this.centerGX; + _loc5_ = _loc3_ - this.centerGY; + _loc6_ = MapManager.getPix(_loc4_,_loc5_); + _loc7_ = _loc6_.x / this.percentX; + _loc8_ = _loc6_.y / this.percentY; + _loc9_ = 57087; + _loc10_ = 3; + if(_loc1_.warStatus == 0) + { + } + if(_loc1_.userRel == 0) + { + _loc9_ = 65376; + _loc10_ = 4; + } + else if(this.world.getGuildFlag() != null && this.world.getGuildFlag() != "" && _loc1_.flag != null && _loc1_.flag != "" && _loc1_.flag == this.world.getGuildFlag()) + { + _loc9_ = 16763904; + _loc10_ = 4; + } + if(_loc1_.type == "CAPITAL") + { + _loc9_ = 13202431; + _loc10_ = 4; + } + if(_loc1_.type == "PVE" || _loc1_.type == "TYPE_SINGLE_ACTION_PVE") + { + _loc9_ = 16727623; + _loc10_ = 2; + } + _loc11_ = new Sprite(); + _loc11_.graphics.beginFill(_loc9_); + _loc11_.graphics.drawCircle(0,0,_loc10_); + _loc11_.graphics.endFill(); + _loc11_.x = _loc7_ + MapVars.CELL_WIDTH / 2 / this.percentX; + _loc11_.y = _loc8_ + MapVars.CELL_HEIGHT / 2 / this.percentY; + _loc11_.name = _loc2_ + "_" + _loc3_; + this.container.addChild(_loc11_); + } + } + _loc12_ += 1; + } + } + + private function e_move(param1:MouseEvent) : void + { + var _loc2_:Sprite = null; + var _loc3_:* = undefined; + var _loc4_:* = undefined; + var _loc5_:* = undefined; + if(this.isMouseDown) + { + this.rect.x = this.mouseX; + this.rect.y = this.mouseY; + } + var _loc6_:* = this.container.mouseX * this.percentX; + var _loc7_:* = this.container.mouseY * this.percentY; + var _loc8_:* = this.container.numChildren; + var _loc9_:* = false; + var _loc10_:* = 0; + while(_loc10_ < _loc8_) + { + _loc2_ = this.container.getChildAt(_loc10_) as Sprite; + if(_loc2_.hitTestPoint(stage.mouseX,stage.mouseY)) + { + _loc3_ = _loc2_.name; + if(this.lastCas == _loc2_) + { + return; + } + this.lastCas = _loc2_; + _loc4_ = _loc3_.split("_")[0]; + _loc5_ = _loc3_.split("_")[1]; + this.world.showCellInfo(_loc4_,_loc5_,true); + _loc9_ = true; + break; + } + _loc10_ += 1; + } + this.lastCas = null; + if(_loc9_ == false) + { + this.world.hideCellInfo(); + } + } + + public function setRect(param1:Number, param2:Number) : void + { + this.rect.x = param1 / this.percentX + 18; + this.rect.y = param2 / this.percentY - 5; + } + + private function e_click(param1:MouseEvent) : void + { + var _loc2_:* = this.container.mouseX * this.percentX; + var _loc3_:* = this.container.mouseY * this.percentY; + var _loc4_:* = PublicMethod.getGlobalXY(_loc2_,_loc3_); + MapManager.drawMap(_loc4_.relX + this.centerGX,_loc4_.relY + this.centerGY,false); + this.update = false; + } + } +} + diff --git a/flash_decompiled/com/view/world/OpenPanel_PVE.as b/flash_decompiled/com/view/world/OpenPanel_PVE.as new file mode 100644 index 0000000..7cd3916 --- /dev/null +++ b/flash_decompiled/com/view/world/OpenPanel_PVE.as @@ -0,0 +1,210 @@ +package com.view.world +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.map.event.MapEvent; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.world.ui.AbstractView; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class OpenPanel_PVE extends AbstractView + { + + private var bg:Sprite; + + private var world:World; + + private var cas_txt:TextField; + + private var state_txt:TextField; + + private var pos_txt:TextField; + + private var desc_txt:TextField; + + private var label2:TextField; + + private var attackBtn:UIButton; + + private var singleFightBtn:UIButton; + + private var pveMc:MovieClip; + + private var _casId:int = 0; + + private var cas:CastleMc; + + private var time:int = 0; + + private var fightPower:Number; + + private var combatPower:Number; + + private var outBattleSeconds:int = 0; + + public function OpenPanel_PVE() + { + var _loc3_:TextField = null; + this.world = World.getInstance(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_chengchixinxi); + super.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(280,150); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "城池名称:"; + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 10; + this.cas_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(this.cas_txt); + this.cas_txt.x = _loc2_.x + _loc2_.width; + this.cas_txt.y = _loc2_.y; + this.label2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.label2.text = "所属势力:"; + _loc1_.addChild(this.label2); + this.label2.x = _loc2_.x; + this.label2.y = _loc2_.y + 20; + this.state_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(this.state_txt); + this.state_txt.x = this.cas_txt.x; + this.state_txt.y = this.label2.y; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc3_.text = "城池坐标:"; + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x; + _loc3_.y = this.label2.y + 20; + this.pos_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(this.pos_txt); + this.pos_txt.x = this.cas_txt.x; + this.pos_txt.y = _loc3_.y; + this.desc_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,265); + this.desc_txt.wordWrap = true; + this.desc_txt.multiline = true; + this.desc_txt.height = 60; + _loc1_.addChild(this.desc_txt); + this.desc_txt.x = _loc3_.x; + this.desc_txt.y = _loc3_.y + 20; + var _loc4_:TextFormat = new TextFormat(); + _loc4_.leading = 4; + this.desc_txt.defaultTextFormat = _loc4_; + this.attackBtn = new UIButton("攻 城",2,10); + this.singleFightBtn = new UIButton("单 挑",2,10); + var _loc5_:UIButton = new UIButton("计 策",2,10); + addChild(this.attackBtn); + addChild(this.singleFightBtn); + addChild(_loc5_); + this.attackBtn.x = 40; + this.attackBtn.y = 168; + this.singleFightBtn.x = this.attackBtn.x + this.attackBtn.width + 12; + this.singleFightBtn.y = this.attackBtn.y; + _loc5_.x = this.singleFightBtn.x + this.singleFightBtn.width + 12; + _loc5_.y = this.attackBtn.y; + _loc5_.setUnEnable(); + this.attackBtn.onClick = this.batCas; + this.singleFightBtn.onClick = this.batCas; + ConnectService.getInstance().addEventListener(MapEvent.getPveCastleByPos,this.onSucc); + } + + override public function setWindowSize() : void + { + window_width = 90; + window_heihgt = 132; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 290; + ui_closeBtn.y = 10; + } + + private function batCas(param1:MouseEvent) : void + { + var _loc2_:int = 0; + var _loc3_:UIButton = param1.currentTarget as UIButton; + if(_loc3_ == this.attackBtn) + { + _loc2_ = 1; + } + else + { + _loc2_ = 2; + } + } + + override public function closeUI(param1:MouseEvent) : void + { + disappear(); + } + + override public function update(param1:CastleMc) : void + { + this._casId = param1.casId; + this.cas = param1; + ConnectService.getInstance().mapService.getPveCastleByPos(param1.gx,param1.gy); + } + + private function onSucc(param1:MapEvent) : void + { + var _loc2_:* = param1.obj; + if(_loc2_ == null) + { + return; + } + this.fightPower = _loc2_.fightPower; + this.combatPower = _loc2_.combatPower; + var _loc3_:* = _loc2_.stateName; + var _loc4_:* = _loc2_.remainSeconds; + this.outBattleSeconds = _loc2_.outBattleSeconds; + if(_loc4_ != null) + { + this.time = _loc4_; + } + if(this.cas.type != "PVE") + { + this.cas_txt.text = ""; + this.label2.text = "所属势力:"; + this.pos_txt.text = _loc2_.name; + } + else + { + this.cas_txt.text = _loc2_.name; + this.label2.text = "所属位置:"; + this.pos_txt.text = this.cas.gx + "," + this.cas.gy; + } + this.state_txt.text = _loc2_.countryName + " " + _loc2_.stateName; + this.desc_txt.selectable = false; + if(_loc2_.desc) + { + this.desc_txt.text = _loc2_.desc; + } + } + + override public function show() : void + { + if(!face.stage.contains(this)) + { + face.stage.addChild(this); + } + this.setPosition(); + } + + override public function setPosition() : void + { + x = int(face.realWidth / 2 - width / 2); + y = int(face.realHeight / 2 - height / 2); + } + } +} + diff --git a/flash_decompiled/com/view/world/OpenPanel_Pos.as b/flash_decompiled/com/view/world/OpenPanel_Pos.as new file mode 100644 index 0000000..492b976 --- /dev/null +++ b/flash_decompiled/com/view/world/OpenPanel_Pos.as @@ -0,0 +1,231 @@ +package com.view.world +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.control.castle.event.CastleEvent; + import com.control.map.event.MapEvent; + 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 com.view.world.ui.AbstractView; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class OpenPanel_Pos extends AbstractView + { + + private var bg:Sprite; + + private var world:World; + + private var gx:int; + + private var gy:int; + + private var type:String = "USERCAS"; + + private var cas_txt:TextField; + + private var state_txt:TextField; + + private var pos_txt:TextField; + + private var desc_txt:TextField; + + private var btn1:UIButton; + + private var btn2:UIButton; + + private var btn3:UIButton; + + public function OpenPanel_Pos() + { + var _loc3_:TextField = null; + this.world = World.getInstance(); + super(); + super.addUIBg(); + super.loadTitle(UITitleConfig.title_chengchixinxi); + super.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(280,140); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc2_.text = "城池名称:"; + _loc1_.addChild(_loc2_); + _loc2_.x = 10; + _loc2_.y = 10; + this.cas_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(this.cas_txt); + this.cas_txt.x = _loc2_.x + _loc2_.width; + this.cas_txt.y = _loc2_.y; + _loc3_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc3_.text = "所属国家:"; + _loc1_.addChild(_loc3_); + _loc3_.x = _loc2_.x; + _loc3_.y = _loc2_.y + 20; + this.state_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(this.state_txt); + this.state_txt.x = this.cas_txt.x; + this.state_txt.y = _loc3_.y; + var _loc4_:TextField = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc4_.text = "城池坐标:"; + _loc1_.addChild(_loc4_); + _loc4_.x = _loc2_.x; + _loc4_.y = _loc3_.y + 20; + this.pos_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,120); + _loc1_.addChild(this.pos_txt); + this.pos_txt.x = this.cas_txt.x; + this.pos_txt.y = _loc4_.y; + this.desc_txt = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,265); + this.desc_txt.wordWrap = true; + this.desc_txt.multiline = true; + this.desc_txt.height = 40; + _loc1_.addChild(this.desc_txt); + this.desc_txt.x = _loc4_.x; + this.desc_txt.y = _loc4_.y + 20; + var _loc5_:TextFormat = new TextFormat(); + _loc5_.leading = 4; + this.desc_txt.defaultTextFormat = _loc5_; + this.desc_txt.text = "适宜营建城池的地点,可以使用高级迁城令迁往。"; + this.btn1 = new UIButton("收 藏",2,10); + this.btn2 = new UIButton("迁 城",2,10); + this.btn3 = new UIButton("购 买",2,10); + addChild(this.btn1); + addChild(this.btn2); + addChild(this.btn3); + this.btn1.x = 40; + this.btn1.y = 158; + this.btn2.x = this.btn1.x + this.btn1.width + 12; + this.btn2.y = this.btn1.y; + this.btn3.x = this.btn2.x + this.btn2.width + 12; + this.btn3.y = this.btn1.y; + this.init(); + } + + override public function setWindowSize() : void + { + window_width = 90; + window_heihgt = 122; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 290; + ui_closeBtn.y = 10; + } + + private function init() : void + { + this.btn3.setText("购买"); + this.btn1.onClick = this.saveCas; + if(this.world.getCastle().status == 1) + { + this.btn2.setText("重建"); + this.btn2.onClick = this.reCreateCas; + } + else + { + this.btn2.setText("迁城"); + this.btn2.onClick = this.movCas; + this.btn3.onClick = this.buy; + } + this.cas_txt.text = "建城点"; + } + + private function saveCas(param1:MouseEvent) : * + { + ConnectService.getInstance().battleService.saveBattleDex(this.gx,this.gy); + } + + private function saveCasResult(param1:BattleEvent) : void + { + this.succ(); + } + + private function reCreateCas(param1:MouseEvent) : * + { + } + + private function movCas(param1:MouseEvent) : * + { + this.closeUI(param1); + MessageBoxUI.getInstance().confirmMsg("您将消耗一张【高级迁城令】将城池迁往这里?",this._ok); + } + + private function buy(param1:MouseEvent) : void + { + } + + private function _ok() : * + { + ConnectService.getInstance().castleService.moveCastleSe(this.gx,this.gy); + } + + private function __Succ(param1:CastleEvent) : void + { + } + + override public function closeUI(param1:MouseEvent) : void + { + disappear(); + } + + override public function show() : void + { + if(!face.stage.contains(this)) + { + face.stage.addChild(this); + } + this.setPosition(); + } + + override public function setPosition() : void + { + x = int(face.realWidth / 2 - width / 2); + y = int(face.realHeight / 2 - height / 2); + } + + override public function addToStage(param1:Event) : void + { + ConnectService.getInstance().addEventListener(MapEvent.getCellToolTip,this.readNullCastleSucc); + ConnectService.getInstance().addEventListener(BattleEvent.SaveBattleDex,this.saveCasResult); + ConnectService.getInstance().addEventListener(CastleEvent.CASTLE_MOVE,this.__Succ); + } + + override public function removeFromStage(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(MapEvent.getCellToolTip,this.readNullCastleSucc); + ConnectService.getInstance().removeEventListener(BattleEvent.SaveBattleDex,this.saveCasResult); + ConnectService.getInstance().removeEventListener(CastleEvent.CASTLE_MOVE,this.__Succ); + } + + public function loadData(param1:int, param2:int) : void + { + this.gx = param1; + this.gy = param2; + ConnectService.getInstance().mapService.getCellToolTip(this.gx,this.gy,this.type); + } + + private function readNullCastleSucc(param1:MapEvent) : void + { + var _loc2_:* = param1.obj; + this.pos_txt.text = this.gx + "," + this.gy; + this.state_txt.text = _loc2_.countryName + ""; + } + + private function succ() : * + { + MessageBoxUI.getInstance().addMessage("操作成功"); + disappear(); + } + } +} + diff --git a/flash_decompiled/com/view/world/ToolTip.as b/flash_decompiled/com/view/world/ToolTip.as new file mode 100644 index 0000000..763f127 --- /dev/null +++ b/flash_decompiled/com/view/world/ToolTip.as @@ -0,0 +1,46 @@ +package com.view.world +{ + public class ToolTip extends AbstractToolTipCell + { + + private var childs:Array; + + public function ToolTip() + { + super(); + this.childs = []; + } + + public function draw() : void + { + var _loc1_:* = undefined; + var _loc2_:* = 0; + while(_loc2_ < this.childs.length) + { + _loc1_ = this.childs[_loc2_]; + _loc1_.y = _loc2_ * _loc1_.height; + this.mySprite.addChild(_loc1_); + _loc2_ += 1; + } + drawFrame(0,0,this.width,this.height); + } + + public function addRow(param1:String = "", param2:String = "", param3:String = "", param4:uint = 16777215, param5:uint = 16777215, param6:uint = 16777215) : void + { + var _loc7_:* = this.getRow(param1,param2,param3,param4,param5,param6); + this.childs.push(_loc7_); + } + + public function clear() : void + { + this.childs = new Array(); + this.removeArr(); + } + + public function addBreak() : void + { + this.childs.push(this.getUserDefinedCutOffRule(this.width)); + } + } +} + diff --git a/flash_decompiled/com/view/world/ToolTipManager.as b/flash_decompiled/com/view/world/ToolTipManager.as new file mode 100644 index 0000000..3f3c4ff --- /dev/null +++ b/flash_decompiled/com/view/world/ToolTipManager.as @@ -0,0 +1,283 @@ +package com.view.world +{ + import flash.display.DisplayObject; + import flash.display.DisplayObjectContainer; + import flash.display.InteractiveObject; + import flash.events.Event; + import flash.events.FocusEvent; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.geom.Point; + import flash.utils.Dictionary; + + public class ToolTipManager + { + + private static var instance:ToolTipManager; + + private var componentMap:Dictionary; + + private var isCtrl:Boolean; + + public function ToolTipManager() + { + super(); + if(instance != null) + { + throw new Error("此类是一个单例,无法为它创建实例"); + } + this.init(); + } + + public static function getInstance() : ToolTipManager + { + if(instance == null) + { + instance = new ToolTipManager(); + } + return instance; + } + + private function __removed(param1:Event) : void + { + this.disposeToolTip(param1.currentTarget as InteractiveObject); + } + + public function disposeToolTip(param1:InteractiveObject) : void + { + var _loc2_:DisplayObjectContainer = null; + var _loc3_:* = undefined; + if(this.componentMap[param1]) + { + this.removeDisplay(param1); + this.unlistenOwner(param1); + _loc2_ = this.componentMap[param1] as DisplayObjectContainer; + _loc3_ = 0; + while(_loc3_ < _loc2_.numChildren) + { + _loc2_.removeChildAt(0); + } + delete this.componentMap[param1]; + } + } + + private function __compRollOver(param1:MouseEvent) : void + { + var _loc2_:* = param1.currentTarget as InteractiveObject; + this.addDisplay(_loc2_); + } + + private function setPostion1(param1:InteractiveObject) : * + { + var _loc2_:* = this.componentMap[param1] as AbstractToolTipCell; + var _loc3_:* = param1.parent.localToGlobal(new Point(param1.x,param1.y)); + _loc2_.x = _loc3_.x - 80; + _loc2_.y = _loc3_.y + 6; + } + + private function setPostion2(param1:InteractiveObject) : * + { + var _loc2_:* = this.componentMap[param1] as AbstractToolTipCell; + if(_loc2_.width + param1.stage.mouseX - ViewManager.getLeftUpPoint().x > param1.stage.stageWidth) + { + _loc2_.x = param1.stage.mouseX - _loc2_.width - 10; + } + else + { + _loc2_.x = param1.stage.mouseX + 20; + } + _loc2_.y = ViewManager.getLeftUpPoint().y + (param1.stage.stageHeight - _loc2_.height) / 2; + } + + private function init() : void + { + this.componentMap = new Dictionary(false); + } + + public function setPostionTip(param1:InteractiveObject) : * + { + var _loc2_:* = this.componentMap[param1] as AbstractToolTipCell; + if(_loc2_.height + param1.stage.mouseY - ViewManager.getLeftUpPoint().y > param1.stage.stageHeight) + { + _loc2_.y = param1.stage.mouseY - _loc2_.height - 10; + } + else + { + _loc2_.y = param1.stage.mouseY + 20; + } + if(_loc2_.width + param1.stage.mouseX - ViewManager.getLeftUpPoint().x > param1.stage.stageWidth) + { + _loc2_.x = param1.stage.mouseX - _loc2_.width - 10 - _loc2_.width; + } + else + { + _loc2_.x = param1.stage.mouseX + 20 - _loc2_.width; + } + } + + private function __compClick(param1:MouseEvent) : void + { + var _loc2_:InteractiveObject = null; + var _loc3_:* = undefined; + } + + private function onFocusOut(param1:FocusEvent) : void + { + this.isCtrl = false; + } + + private function removeDisplay(param1:InteractiveObject) : void + { + if(this.componentMap[param1]) + { + if(this.componentMap[param1].stage != null) + { + if(this.componentMap[param1].stage.contains(this.componentMap[param1] as DisplayObject)) + { + this.componentMap[param1].stage.removeChild(this.componentMap[param1] as DisplayObject); + } + } + } + } + + public function setToolTip(param1:InteractiveObject, param2:AbstractToolTipCell, param3:Boolean = false, param4:int = -1, param5:Boolean = true) : void + { + if(param1 != null) + { + this.isCtrl = false; + param2.canMove = param3; + param2.position = param4; + if(this.componentMap[param1] != null) + { + this.disposeToolTip(param1); + } + this.componentMap[param1] = param2; + this.listenOwner(param1,param5); + } + } + + private function __compRollOut(param1:MouseEvent) : void + { + var _loc2_:* = param1.currentTarget as InteractiveObject; + this.removeDisplay(_loc2_); + } + + private function setPostion(param1:InteractiveObject) : * + { + var _loc2_:* = this.componentMap[param1] as AbstractToolTipCell; + if(_loc2_.height + param1.stage.mouseY - ViewManager.getLeftUpPoint().y > param1.stage.stageHeight) + { + _loc2_.y = param1.stage.mouseY - _loc2_.height - 10; + } + else + { + _loc2_.y = param1.stage.mouseY + 20; + } + if(_loc2_.width + param1.stage.mouseX - ViewManager.getLeftUpPoint().x > param1.stage.stageWidth) + { + _loc2_.x = param1.stage.mouseX - _loc2_.width - 10; + } + else + { + _loc2_.x = param1.stage.mouseX + 20; + } + } + + private function __compMouseMove(param1:MouseEvent) : void + { + var _loc2_:* = param1.currentTarget as InteractiveObject; + this.moveDisplay(_loc2_); + } + + private function addDisplay(param1:InteractiveObject) : void + { + param1.stage.addChild(this.componentMap[param1]); + param1.stage.addEventListener(FocusEvent.FOCUS_OUT,this.onFocusOut,false,0,true); + if((this.componentMap[param1] as AbstractToolTipCell).position == 2) + { + this.setPostion2(param1); + } + else if((this.componentMap[param1] as AbstractToolTipCell).position == 1) + { + this.setPostion1(param1); + } + else if((this.componentMap[param1] as AbstractToolTipCell).position == -1) + { + this.setPostion(param1); + } + else if((this.componentMap[param1] as AbstractToolTipCell).position == 0) + { + this.setPostion(param1); + } + } + + private function listenOwner(param1:InteractiveObject, param2:Boolean = true) : void + { + param1.addEventListener(MouseEvent.MOUSE_MOVE,this.__compMouseMove,false,0,true); + param1.addEventListener(MouseEvent.ROLL_OUT,this.__compRollOut,false,0,true); + param1.addEventListener(MouseEvent.ROLL_OVER,this.__compRollOver,false,0,true); + if(param2) + { + param1.addEventListener(Event.REMOVED_FROM_STAGE,this.__removed,false,0,true); + } + } + + public function getToolTip(param1:InteractiveObject) : ToolTip + { + if(param1 != null) + { + if(this.componentMap[param1] != null) + { + return this.componentMap[param1]; + } + } + return null; + } + + private function __keydown(param1:KeyboardEvent) : void + { + if(param1.keyCode == 17 || param1.keyCode == 16) + { + this.isCtrl = true; + } + } + + private function moveDisplay(param1:InteractiveObject) : void + { + var _loc2_:AbstractToolTipCell = this.componentMap[param1] as AbstractToolTipCell; + _loc2_.drawTooltip(); + if(!_loc2_.canMove) + { + return; + } + this.setPostion(param1); + } + + private function unlistenOwner(param1:InteractiveObject) : void + { + param1.removeEventListener(MouseEvent.MOUSE_MOVE,this.__compMouseMove); + param1.removeEventListener(MouseEvent.MOUSE_DOWN,this.__compRollOut); + param1.removeEventListener(MouseEvent.ROLL_OUT,this.__compRollOut); + param1.removeEventListener(MouseEvent.ROLL_OVER,this.__compRollOver); + if(param1.hasEventListener(MouseEvent.CLICK)) + { + param1.removeEventListener(MouseEvent.CLICK,this.__compClick); + if(this.componentMap[param1].stage != null) + { + this.componentMap[param1].stage.removeEventListener(KeyboardEvent.KEY_DOWN,this.__keydown); + this.componentMap[param1].stage.removeEventListener(KeyboardEvent.KEY_UP,this.__keyUp); + } + } + param1.removeEventListener(Event.REMOVED_FROM_STAGE,this.__removed); + } + + private function __keyUp(param1:KeyboardEvent) : void + { + if(param1.keyCode == 17 || param1.keyCode == 16) + { + this.isCtrl = false; + } + } + } +} + diff --git a/flash_decompiled/com/view/world/TxtTooltip.as b/flash_decompiled/com/view/world/TxtTooltip.as new file mode 100644 index 0000000..7fee82e --- /dev/null +++ b/flash_decompiled/com/view/world/TxtTooltip.as @@ -0,0 +1,41 @@ +package com.view.world +{ + import flash.text.TextField; + + public class TxtTooltip extends AbstractToolTipCell + { + + public var txt:String; + + private var title_txt:String; + + public function TxtTooltip(param1:String, param2:String = "") + { + super(); + this.title_txt = param2; + this.txt = param1; + } + + override protected function drawUI() : void + { + var _loc1_:TextField = null; + var _loc2_:int = 0; + if(this.title_txt != "") + { + _loc1_ = getTextField(this.title_txt,13369344,13); + _loc1_.y = 0; + _loc2_ = _loc1_.height; + this.mySprite.addChild(_loc1_); + } + var _loc3_:* = getTextField(this.txt); + _loc3_.y = _loc2_; + this.mySprite.addChild(_loc3_); + if(_loc1_) + { + _loc1_.x = (mySprite.width - _loc1_.width) / 2; + } + this.drawFrame(-5,-5,mySprite.width,mySprite.height); + } + } +} + diff --git a/flash_decompiled/com/view/world/ViewManager.as b/flash_decompiled/com/view/world/ViewManager.as new file mode 100644 index 0000000..6e01553 --- /dev/null +++ b/flash_decompiled/com/view/world/ViewManager.as @@ -0,0 +1,63 @@ +package com.view.world +{ + import com.InstallFace; + import com.comfig.ServerConfig; + import flash.geom.Point; + + public class ViewManager + { + + public function ViewManager() + { + super(); + } + + public static function getRightUpPoint() : Point + { + var _loc1_:* = getCenterPoint(); + _loc1_.x += getStageWidth() / 2; + _loc1_.y -= getStageHeight() / 2; + return _loc1_; + } + + public static function getLeftUpPoint() : Point + { + var _loc1_:* = new Point(); + _loc1_.x = -(getStageWidth() - ServerConfig.FLASH_WIDTH) / 2; + _loc1_.y = -(getStageHeight() - ServerConfig.FLASH_HEIGHT) / 2; + return _loc1_; + } + + public static function getCenterPoint() : Point + { + var _loc1_:* = new Point(); + _loc1_.x = ServerConfig.FLASH_WIDTH / 2; + _loc1_.y = ServerConfig.FLASH_HEIGHT / 2; + return _loc1_; + } + + public static function getStageWidth() : int + { + return getMain().realWidth; + } + + public static function getMain() : InstallFace + { + return InstallFace.getInstance(); + } + + public static function getStageHeight() : int + { + return getMain().realHeight; + } + + public static function getRightDownPoint() : Point + { + var _loc1_:* = getCenterPoint(); + _loc1_.x += getStageWidth() / 2; + _loc1_.y += getStageHeight() / 2; + return _loc1_; + } + } +} + diff --git a/flash_decompiled/com/view/world/WheelPanel.as b/flash_decompiled/com/view/world/WheelPanel.as new file mode 100644 index 0000000..115762c --- /dev/null +++ b/flash_decompiled/com/view/world/WheelPanel.as @@ -0,0 +1,113 @@ +package com.view.world +{ + import com.comfig.ClassConfig; + import com.view.ui.BaseUI; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + + public class WheelPanel extends BaseUI + { + + private var worldUI:World = World.getInstance(); + + private var miniMapMc:MovieClip; + + private var overF:Function; + + private var outF:Function; + + private var clickF:Function; + + private var _direction:int = -1; + + public function WheelPanel() + { + super(); + var _loc1_:Sprite = face.getSprite(ClassConfig.menu_sp9); + addChild(_loc1_); + _loc1_.y = -27; + _loc1_.x = 5; + this.miniMapMc = this.worldUI.getMovieClip(ClassConfig.map_small); + addChild(this.miniMapMc); + this.miniMapMc.btn_1.addEventListener(MouseEvent.MOUSE_DOWN,this.downHand); + this.miniMapMc.btn_3.addEventListener(MouseEvent.MOUSE_DOWN,this.downHand); + this.miniMapMc.btn_5.addEventListener(MouseEvent.MOUSE_DOWN,this.downHand); + this.miniMapMc.btn_7.addEventListener(MouseEvent.MOUSE_DOWN,this.downHand); + this.miniMapMc.btn_1.addEventListener(MouseEvent.MOUSE_OVER,this.overHand); + this.miniMapMc.btn_3.addEventListener(MouseEvent.MOUSE_OVER,this.overHand); + this.miniMapMc.btn_5.addEventListener(MouseEvent.MOUSE_OVER,this.overHand); + this.miniMapMc.btn_7.addEventListener(MouseEvent.MOUSE_OVER,this.overHand); + this.miniMapMc.btn_1.addEventListener(MouseEvent.MOUSE_OUT,this.outHand); + this.miniMapMc.btn_3.addEventListener(MouseEvent.MOUSE_OUT,this.outHand); + this.miniMapMc.btn_5.addEventListener(MouseEvent.MOUSE_OUT,this.outHand); + this.miniMapMc.btn_7.addEventListener(MouseEvent.MOUSE_OUT,this.outHand); + } + + public function addMiniMap(param1:MinMap) : void + { + this.miniMapMc.addChildAt(param1,1); + } + + override public function setPosition() : void + { + } + + override public function reSizeWindow(param1:Event) : void + { + } + + public function set onClick(param1:Function) : void + { + this.clickF = param1; + } + + private function outHand(param1:MouseEvent) : void + { + this._direction = 0; + if(this.outF != null) + { + this.outF(); + } + } + + public function set onOut(param1:Function) : void + { + this.outF = param1; + } + + private function overHand(param1:MouseEvent) : void + { + var _loc2_:* = param1.target.name; + var _loc3_:* = _loc2_.charAt(4); + this._direction = _loc3_; + if(this.overF != null) + { + this.overF(); + } + } + + public function set onOver(param1:Function) : void + { + this.overF = param1; + } + + private function downHand(param1:MouseEvent) : void + { + var _loc2_:* = param1.target.name; + var _loc3_:* = _loc2_.charAt(4); + this._direction = _loc3_; + if(this.clickF != null) + { + this.clickF(); + } + } + + public function get direction() : int + { + return this._direction; + } + } +} + diff --git a/flash_decompiled/com/view/world/World.as b/flash_decompiled/com/view/world/World.as new file mode 100644 index 0000000..5303b1c --- /dev/null +++ b/flash_decompiled/com/view/world/World.as @@ -0,0 +1,1267 @@ +package com.view.world +{ + import com.comfig.CommonData; + import com.comfig.ServerConfig; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.item.event.ItemEvent; + import com.control.map.event.MapEvent; + import com.data.data.city.Castle; + import com.loader.CLoader; + import com.utils.GC; + import com.utils.HashMap; + import com.view.world.ui.AbstractView; + import com.view.world.ui.CastleUserUI; + import flash.display.Bitmap; + import flash.display.Graphics; + import flash.display.MovieClip; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.MouseEvent; + import flash.geom.Point; + import flash.net.URLRequest; + import flash.utils.clearInterval; + import flash.utils.getTimer; + import flash.utils.setInterval; + + public class World extends IMap + { + + public static var instance:World; + + private static var range_arr:Array = []; + + private var bmp_width:int = 0; + + private var bmp_height:int = 0; + + private var cube_mc:Cube; + + private var bg_mc:Sprite; + + private var click_mc:Sprite; + + private var bmpLayer:EmptyContainer; + + private var powerLayer:EmptyContainer; + + private var range_mc:EmptyContainer; + + private var buildLayer:CastleLayer; + + private var cloudLayer:EmptyContainer; + + private var wheelPane:WheelPanel; + + private var controlPane:ControlPanel; + + private var horseLayer:EmptyContainer; + + private var minMap:MinMap; + + private var startGX:int = -1; + + private var startGY:int = -1; + + private var centerGX:int = 0; + + private var centerGY:int = 0; + + private var lastGX:int = 0; + + private var lastGY:int = 0; + + private var gx:int = 0; + + private var gy:int = 0; + + private var tip:ToolTip; + + private var area_cell_num:int = 0; + + private var lastCas:CastleMc; + + private var bmp_hash:HashMap; + + private var currentRangeMap:HashMap; + + private var notInCasMap:HashMap; + + private var currentCastleMap:HashMap; + + private var rangeOnCastleMap:HashMap; + + private var unionRange:HashMap; + + private var deadCastleMap:HashMap; + + private var infoPane:InfoPanel; + + private var bmp_loop_num:int = 0; + + private var cell_height:int = 0; + + private var dragIng:Boolean = false; + + private var upOrDown:Boolean = true; + + private var timeId:uint; + + private var lastX:Number = 0; + + private var lastY:Number = 0; + + private var lastTimer:int; + + private var deadCasId:int = 0; + + private var cell_width:int = 0; + + private var openPane:AbstractView; + + private var maskSp:Sprite; + + public function World() + { + super(); + this.bmp_width = MapVars.BMP_WIDTH; + this.bmp_height = MapVars.BMP_HEIGHT; + this.timeId = 0; + } + + public static function getInstance() : World + { + if(instance == null) + { + instance = new World(); + } + return instance; + } + + override public function addToStage(param1:Event) : void + { + super.addToStage(param1); + } + + override public function loadOver() : void + { + this.init(); + } + + private function init() : void + { + var _loc1_:int = 0; + var _loc2_:int = 0; + var _loc3_:Bitmap = null; + var _loc6_:int = 0; + this.area_cell_num = MapVars.AREA_CELL_NUM; + this.bmp_hash = new HashMap(); + this.currentRangeMap = new HashMap(); + this.notInCasMap = new HashMap(); + this.currentCastleMap = new HashMap(); + this.rangeOnCastleMap = new HashMap(); + this.unionRange = new HashMap(); + this.deadCastleMap = new HashMap(); + this.infoPane = new InfoPanel(); + range_arr = CastleMc.range_arr; + this.bmp_loop_num = MapVars.BMP_LOOP_NUM; + this.cell_height = MapVars.CELL_HEIGHT; + this.cell_width = MapVars.CELL_WIDTH; + this.bg_mc = new Sprite(); + var _loc4_:Bitmap = new Bitmap(getPng("BMP_0")); + var _loc5_:int = -5 * this.bmp_width / 2; + while(_loc1_ < 8) + { + _loc2_ = 0; + while(_loc2_ < 4) + { + _loc3_ = new Bitmap(); + _loc3_.bitmapData = _loc4_.bitmapData; + _loc3_.x = _loc5_ + _loc2_ * this.bmp_width + this.bmp_width / 2 * (_loc1_ % 2); + _loc3_.y = _loc6_ + _loc1_ * this.bmp_height / 2; + this.bg_mc.addChild(_loc3_); + _loc2_ += 1; + } + _loc1_ += 1; + } + this.bg_mc.alpha = 0.4; + addChild(this.bg_mc); + this.bmpLayer = new EmptyContainer(); + addChild(this.bmpLayer); + this.powerLayer = new EmptyContainer(); + addChild(this.powerLayer); + this.range_mc = new EmptyContainer(); + addChild(this.range_mc); + this.buildLayer = new CastleLayer(); + addChild(this.buildLayer); + this.cloudLayer = new EmptyContainer(); + addChild(this.cloudLayer); + this.cube_mc = new Cube(); + addChild(this.cube_mc); + this.click_mc = new Sprite(); + addChild(this.click_mc); + this.wheelPane = new WheelPanel(); + addChild(this.wheelPane); + this.wheelPane.onClick = this.moveMap4Posi; + this.controlPane = new ControlPanel(); + addChild(this.controlPane); + this.horseLayer = new EmptyContainer(); + addChild(this.horseLayer); + this.horseLayer.mouseEnabled = false; + this.maskSp = PublicMethod.createShape(0,CommonData.STAGE_MAX_WIDTH,CommonData.STAGE_MAX_HEIGHT); + addChild(this.maskSp); + this.maskSp.x = -this.maskSp.width / 2; + this.maskSp.y = -this.maskSp.height / 2; + this.mask = this.maskSp; + this.minMap = new MinMap(); + this.minMap.x = 104; + this.minMap.y = 87; + this.wheelPane.addMiniMap(this.minMap); + this.click_mc.graphics.beginFill(16777215,0); + this.click_mc.graphics.drawRect(-MapVars.VIEW_WIDTH / 2,-MapVars.VIEW_HEIGHT / 2,MapVars.VIEW_WIDTH,MapVars.VIEW_HEIGHT); + this.click_mc.graphics.endFill(); + this.cube_mc.mouseEnabled = false; + this.tip = new ToolTip(); + this.tip.mouseEnabled = false; + this.tip.mouseChildren = false; + ToolTipManager.getInstance().setToolTip(this.click_mc,this.tip,true,0,false); + this.click_mc.addEventListener(MouseEvent.MOUSE_DOWN,this.e_down); + this.click_mc.addEventListener(MouseEvent.MOUSE_UP,this.e_up); + this.click_mc.addEventListener(MouseEvent.MOUSE_OUT,this.e_out); + this.click_mc.addEventListener(MouseEvent.MOUSE_MOVE,this.e_move); + this.infoPane.mouseEnabled = false; + this.infoPane.mouseChildren = false; + this.cube_mc.mouseEnabled = false; + face.stage.addEventListener(Event.RESIZE,this.e_added); + if(this.startGX == -1 && this.startGY == -1) + { + this.draw(getPosX(),getPosY()); + } + else + { + this.draw(this.startGX,this.startGY); + } + this.resize(); + ConnectService.getInstance().addEventListener(ItemEvent.Item_Castle_useItem,this.refreshCastle); + } + + private function moveMap4Posi() : void + { + this.moveMap(this.wheelPane.direction,2); + } + + public function getCastleLayer() : CastleLayer + { + return this.buildLayer; + } + + public function check() : void + { + var _loc1_:* = undefined; + var _loc2_:* = this.bmpLayer.x; + var _loc3_:* = this.bmpLayer.y; + var _loc4_:* = _loc2_; + var _loc5_:* = _loc3_; + if(Math.random() < 0.1) + { + this.addClould(); + } + var _loc6_:* = PublicMethod.getGlobalXY(this.bmpLayer.x,this.bmpLayer.y); + var _loc7_:* = this.startGX - _loc6_.relX; + var _loc8_:* = this.startGY - _loc6_.relY; + if(_loc7_ == this.centerGX && _loc8_ == this.centerGY) + { + if(this.deadCasId == 0) + { + if(this.lastCas != null && getCastle().status != 1) + { + if(this.lastCas.type == "USERCAS") + { + _loc1_ = CastleUserUI.getInstance(); + } + if(this.lastCas.type == "PVE" || this.lastCas.type == "TYPE_SINGLE_ACTION_PVE") + { + _loc1_ = new OpenPanel_PVE(); + } + if(this.lastCas.type == "CAPITAL") + { + } + this.open(_loc1_); + } + else if(this.buildLayer.isCastlePostion(this.lastGX,this.lastGY)) + { + _loc1_ = new OpenPanel_Pos(); + _loc1_.loadData(this.lastGX,this.lastGY); + this.open(_loc1_); + } + } + } + else + { + this.minMap.update = true; + this.drawLand(_loc7_,_loc8_,false); + this.drawCastle(_loc7_,_loc8_,false); + } + } + + private function install() : void + { + } + + public function getMoveCar() : Function + { + return this.moveCar; + } + + public function hideRange() : void + { + var _loc1_:CastleMc = null; + var _loc2_:int = 0; + while(_loc2_ < this.rangeOnCastleMap.keys().length) + { + _loc1_ = this.rangeOnCastleMap.getValue(this.rangeOnCastleMap.keys()[_loc2_]); + if(_loc1_.rangeLv == 1 && _loc1_.casId != getCastle().casId) + { + _loc1_.imageMc.alpha = 1; + } + _loc2_++; + } + this.rangeOnCastleMap = new HashMap(); + this.powerLayer.graphics.clear(); + } + + public function showMinMap() : void + { + this.switchCountryFight(); + } + + private function saveDeadCastleCar() : void + { + } + + private function e_down(param1:MouseEvent) : void + { + this.dragIng = true; + this.lastX = this.bmpLayer.mouseX; + this.lastY = this.bmpLayer.mouseY; + } + + override public function readCasSucc(param1:MapEvent) : void + { + this.saveDeadCastleCar(); + var _loc2_:Array = new Array(); + _loc2_ = param1.data as Array; + if(_loc2_ == null) + { + return; + } + var _loc3_:Array = new Array(); + var _loc4_:int = 0; + while(_loc4_ < _loc2_.length) + { + if(_loc2_[_loc4_] !== null) + { + _loc3_[_loc4_] = _loc2_[_loc4_]; + } + _loc4_++; + } + this.buildLayer.casList = _loc3_; + this.buildLayer.draw(false); + this.drawCar(); + this.drawHorse(this.centerGX,this.centerGY); + var _loc5_:* = getCastle(); + var _loc6_:* = getPosX(); + var _loc7_:* = getPosY(); + var _loc8_:* = new Object(); + _loc8_.posX = _loc5_.posX; + _loc8_.posY = _loc5_.posY; + _loc8_.name = _loc5_.casName; + _loc8_.rangeLv = _loc5_.rangeLv; + _loc8_.userRel = 0; + var _loc9_:Array = this.aroundCas(_loc6_,_loc7_); + _loc9_[_loc9_.length] = _loc8_; + this.currentRangeMap = this.rangeMapT(_loc9_); + if(MapManager.getMode() == 0) + { + this.showRange(); + } + if(this.minMap.update) + { + this.minMap.centerGX = this.centerGX; + this.minMap.centerGY = this.centerGY; + this.minMap.casList = _loc2_; + this.minMap.draw(); + } + GC.clear(); + } + + private function moveCar(param1:int, param2:int, param3:int) : void + { + } + + public function draw(param1:int, param2:int) : void + { + this.clear(); + this.reset(); + this.startGX = param1; + this.startGY = param2; + this.drawLand(param1,param2); + this.drawCastle(param1,param2,true); + } + + public function showCellInfo(param1:*, param2:*, param3:Boolean = false) : void + { + var _loc4_:CastleMc = null; + var _loc5_:Array = null; + var _loc6_:Object = null; + var _loc7_:Array = null; + var _loc8_:int = 0; + var _loc9_:String = null; + var _loc10_:String = null; + var _loc11_:CastleMc = null; + var _loc12_:Array = null; + var _loc13_:int = 0; + if(param1 == 2092 && param2 == 1795) + { + } + if(this.deadCastleMap.getValue(param1 + "_" + param2) != null && this.buildLayer.isCastlePostion(param1 - 1,param2)) + { + this.deadCasId = this.deadCastleMap.getValue(param1 + "_" + param2); + } + else + { + this.deadCasId = 0; + } + this.tip.visible = true; + this.tip.clear(); + if(param3 == true) + { + if(this.tip.parent == null) + { + face.stage.addChild(this.tip); + } + } + var _loc14_:* = ViewManager.getRightDownPoint(); + if(face.stage.mouseX > _loc14_.x - 200) + { + this.infoPane.x = this.mouseX - this.infoPane.width - 5; + } + else + { + this.infoPane.x = this.mouseX + 5; + } + if(stage.mouseY > _loc14_.y - this.infoPane.height) + { + this.infoPane.y = this.mouseY - this.infoPane.height - 5; + } + else + { + this.infoPane.y = this.mouseY + 5; + } + this.lastCas = null; + var _loc15_:* = new Array(); + if(this.buildLayer.isCastlePostion(param1,param2)) + { + _loc4_ = this.buildLayer.getCastle(param1,param2); + if(_loc4_ == null) + { + this.tip.addRow("建城点"); + this.tip.addRow("坐标: " + param1 + "," + param2); + this.tip.draw(); + } + else + { + this.lastCas = _loc4_; + this.infoPane.visible = true; + this.infoPane.castle = _loc4_; + getCellToolTip(param1,param2,_loc4_.type); + if(MapManager.getMode() == 0 && _loc4_.casId != getCastle().casId) + { + _loc5_ = new Array(); + _loc6_ = new Object(); + _loc6_.posX = _loc4_.gx; + _loc6_.posY = _loc4_.gy; + _loc6_.name = _loc4_.casName; + _loc6_.rangeLv = _loc4_.rangeLv; + if(_loc4_.rangeLv == 1) + { + _loc4_.imageMc.alpha = 0.5; + } + _loc5_[0] = _loc6_; + this.hideRange(); + if(getGuildFlag() != null && getGuildFlag() != "" && _loc4_.flagName != null && _loc4_.flagName != "" && _loc4_.flagName == getGuildFlag() || _loc4_.userRel == 0) + { + _loc7_ = this.aroundCas(_loc4_.gx,_loc4_.gy); + this.currentRangeMap = this.rangeMapT(_loc7_); + this.showOneCasRange(this.rangeMapT(_loc5_),false,true); + } + else + { + this.showOneCasRange(this.rangeMapT(_loc5_)); + } + } + } + } + else + { + _loc8_ = 0; + while(_loc8_ < this.rangeOnCastleMap.keys().length) + { + _loc11_ = this.rangeOnCastleMap.getValue(this.rangeOnCastleMap.keys()[_loc8_]); + if(_loc11_.rangeLv == 1 && _loc11_.casId != getCastle().casId) + { + _loc11_.imageMc.alpha = 1; + } + _loc8_++; + } + this.hideRange(); + _loc9_ = this.currentRangeMap.getValue(param1 + "_" + param2); + if(this.unionRange.getValue(param1 + "_" + param2) == null) + { + _loc9_ = null; + } + if(_loc9_ != null) + { + _loc12_ = _loc9_.split("_"); + _loc5_ = new Array(); + _loc13_ = 0; + _loc8_ = 0; + while(_loc8_ < _loc12_.length) + { + if(_loc12_[_loc8_] != getUser().userName) + { + if(_loc13_ == 0) + { + _loc15_[_loc13_] = "敌对玩家: " + "【" + _loc12_[_loc8_] + "】" + ""; + } + else + { + _loc15_[_loc13_] = "\t\t\t" + "【" + _loc12_[_loc8_] + "】" + ""; + } + _loc13_++; + } + _loc8_++; + } + } + if(param1 < 0 || param2 < 0) + { + this.tip.clear(); + return; + } + this.tip.addRow("坐标: " + param1 + "," + param2); + _loc10_ = "正常(可采集资源)"; + if(_loc15_.length > 0) + { + _loc10_ = "战乱(无法采集资源)"; + } + this.tip.addRow("地形: " + MapManager.getLandType(param1,param2)); + if(this.unionRange.getValue(param1 + "_" + param2) != null) + { + this.tip.addRow("*****************************"); + this.tip.addRow("地域状态: " + _loc10_); + } + if(_loc15_.length > 0) + { + _loc8_ = 0; + while(_loc8_ < _loc15_.length) + { + this.tip.addRow(_loc15_[_loc8_]); + _loc8_++; + } + } + this.tip.draw(); + } + } + + private function open(param1:AbstractView) : void + { + if(getCastle().status == 1 && this.lastCas != null) + { + return; + } + if(this.openPane != null) + { + this.openPane.disappear(); + } + this.openPane = param1; + if(this.lastCas) + { + param1.update(this.lastCas); + } + param1.show(); + } + + private function rangeMapT(param1:Array) : HashMap + { + var _loc2_:Object = null; + var _loc3_:String = null; + var _loc4_:String = null; + var _loc5_:CastleMc = null; + var _loc6_:* = undefined; + var _loc7_:* = undefined; + var _loc8_:* = undefined; + var _loc9_:* = undefined; + var _loc10_:* = new HashMap(); + if(param1 == null) + { + param1 = new Array(); + } + var _loc11_:* = 0; + while(_loc11_ < param1.length) + { + _loc2_ = param1[_loc11_]; + _loc3_ = _loc2_.name; + _loc4_ = _loc2_.posX + "_" + _loc2_.posY; + _loc5_ = this.buildLayer.getCasHash().getValue(_loc4_) as CastleMc; + if(_loc5_ != null) + { + _loc5_.rangeMode = true; + this.rangeOnCastleMap.put(_loc5_.casId,_loc5_); + } + _loc6_ = 0; + while(_loc6_ < _loc2_.rangeLv) + { + _loc7_ = 0; + while(_loc7_ < range_arr[_loc6_].length) + { + _loc8_ = new Array(); + _loc9_ = range_arr[_loc6_][_loc7_]; + _loc8_[0] = _loc9_[0] + _loc2_.posX; + _loc8_[1] = _loc9_[1] + _loc2_.posY; + if(_loc10_.getValue(_loc8_[0] + "_" + _loc8_[1]) == null) + { + _loc10_.put(_loc8_[0] + "_" + _loc8_[1],_loc3_); + } + else + { + _loc10_.put(_loc8_[0] + "_" + _loc8_[1],_loc10_.getValue(_loc8_[0] + "_" + _loc8_[1]) + "_" + _loc3_); + } + _loc7_ += 1; + } + _loc6_ += 1; + } + _loc11_ += 1; + } + return _loc10_; + } + + override public function readCellInfoSucc(param1:MapEvent) : void + { + var _loc2_:* = param1.obj; + var _loc3_:String = ""; + this.tip.clear(); + if(this.lastCas == null) + { + return; + } + if(_loc2_.name == undefined) + { + return; + } + if(this.lastCas.type == "USERCAS") + { + this.tip.addRow("君主: " + _loc2_.userName + ""); + this.tip.addRow("势力: " + _loc2_.cellNum); + this.tip.addRow("联盟: " + _loc2_.guildName + ""); + this.tip.addRow("坐标: " + this.lastCas.gx + "," + this.lastCas.gy + ""); + this.tip.addRow("所在: " + _loc2_.countryName + ""); + } + else if(this.lastCas.type == "CAPITAL") + { + this.tip.addRow("城池: " + _loc2_.name + ""); + this.tip.addRow("势力: " + _loc2_.countryName + ""); + this.tip.addRow("坐标: " + this.lastCas.gx + "," + this.lastCas.gy + ""); + this.tip.addRow("所在: " + _loc2_.countryName + ""); + } + else + { + this.tip.addRow("城池: " + _loc2_.name + ""); + this.tip.addRow("势力: " + _loc2_.force + ""); + this.tip.addRow("坐标: " + this.lastCas.gx + "," + this.lastCas.gy + ""); + this.tip.addRow("所在: " + _loc2_.countryName + ""); + } + this.tip.addRow("地形: " + MapManager.getLandType(this.lastGX,this.lastGY)); + this.tip.draw(); + } + + public function checkPostion() : void + { + var _loc1_:* = PublicMethod.getGlobalXY(this.powerLayer.mouseX,this.powerLayer.mouseY); + var _loc2_:* = _loc1_.relX + this.startGX; + var _loc3_:* = _loc1_.relY + this.startGY; + if(this.lastGX == _loc2_ && this.lastGY == _loc3_) + { + return; + } + this.lastGX = _loc2_; + this.lastGY = _loc3_; + var _loc4_:* = MapManager.getPix(_loc1_.relX,_loc1_.relY); + this.cube_mc.x = _loc4_.x + this.bmpLayer.x; + this.cube_mc.y = _loc4_.y + this.bmpLayer.y; + this.minMap.setRect(this.mouseX,this.mouseY); + this.showCellInfo(_loc2_,_loc3_); + this.controlPane.gx = _loc2_; + this.controlPane.gy = _loc3_; + if(Math.random() < 0.01) + { + this.addClould(); + } + } + + private function timer() : void + { + if(this.powerLayer.alpha >= 0.4) + { + this.upOrDown = false; + } + else if(this.powerLayer.alpha < 0.2) + { + this.upOrDown = true; + } + if(this.upOrDown) + { + this.powerLayer.alpha += 0.05; + } + else + { + this.powerLayer.alpha -= 0.05; + } + } + + public function drawLand(param1:int, param2:int, param3:Boolean = false) : void + { + var _loc4_:* = undefined; + var _loc5_:Boolean = false; + var _loc6_:* = undefined; + var _loc7_:* = undefined; + var _loc8_:* = undefined; + var _loc9_:* = undefined; + var _loc10_:* = undefined; + var _loc11_:* = undefined; + var _loc12_:* = undefined; + var _loc13_:* = undefined; + var _loc14_:Bitmap = null; + var _loc15_:Bitmap = null; + var _loc16_:* = 0; + var _loc17_:* = 0; + if(param3) + { + this.bmpLayer.clear(); + } + var _loc18_:int = param1 - this.startGX; + var _loc19_:int = param2 - this.startGY; + var _loc20_:Point = MapManager.getPix(_loc18_,_loc19_); + _loc16_ = _loc20_.x; + _loc17_ = _loc20_.y; + this.centerGX = param1; + this.centerGY = param2; + this.gx = param1 - this.area_cell_num / 2; + this.gy = param2 - this.area_cell_num / 2; + var _loc21_:* = MapVars.AREA_BMP_NUM; + var _loc22_:* = Math.floor(this.centerGX / 6); + var _loc23_:* = Math.floor(this.centerGY / 6); + var _loc24_:* = this.centerGX - _loc22_ * 6; + var _loc25_:* = this.centerGY - _loc23_ * 6; + var _loc26_:* = MapManager.getPix(_loc24_,_loc25_); + var _loc27_:* = -_loc26_.x; + var _loc28_:* = -_loc26_.y; + var _loc29_:* = this.bmp_hash.clone(); + var _loc30_:* = 0; + while(_loc30_ < _loc21_) + { + _loc4_ = _loc30_ * 6 + this.gx; + _loc5_ = true; + _loc6_ = Math.floor(_loc4_ / 6); + _loc7_ = Math.floor(_loc6_ % this.bmp_loop_num); + _loc8_ = 0; + while(_loc8_ < _loc21_) + { + _loc9_ = _loc8_ * 6 + this.gy; + _loc10_ = Math.floor(_loc9_ / 6); + _loc11_ = Math.floor(_loc10_ % this.bmp_loop_num); + if(_loc7_ < 0 || _loc4_ > MapVars.CELL_X_NUM + 5 || _loc11_ < 0 || _loc9_ > MapVars.CELL_Y_NUM + 5) + { + _loc5_ = false; + } + else + { + _loc5_ = true; + } + _loc12_ = 0; + if(_loc5_) + { + _loc12_ = MapVars.BMP_LOOP_DATA[_loc7_][_loc11_]; + } + _loc13_ = "bmp_" + _loc6_ + "_" + _loc10_; + if(this.bmp_hash.containsKey(_loc13_)) + { + _loc29_.remove(_loc13_); + } + else + { + _loc14_ = MapManager.getBmp(_loc12_); + this.bmp_hash.put(_loc13_,_loc14_); + _loc14_.x = _loc27_ + _loc16_ + 0 + (_loc30_ - _loc8_) * this.bmp_width / 2 - this.bmp_width / 2; + _loc14_.y = _loc28_ + _loc17_ - _loc21_ * this.bmp_height / 2 + (_loc30_ + _loc8_) * this.bmp_height / 2 + this.cell_height / 2; + if(!_loc5_) + { + _loc14_.alpha = 0.3; + } + this.bmpLayer.addChild(_loc14_); + } + _loc8_ += 1; + } + _loc30_ += 1; + } + var _loc31_:* = _loc29_.keys(); + var _loc32_:* = 0; + while(_loc32_ < _loc31_.length) + { + _loc15_ = this.bmp_hash.getValue(_loc31_[_loc32_]); + _loc15_.bitmapData = null; + this.bmpLayer.removeChild(_loc15_); + _loc15_ = null; + this.bmp_hash.remove(_loc31_[_loc32_]); + _loc32_ += 1; + } + _loc29_.clear(); + } + + private function __remove(param1:Event) : void + { + } + + public function reset() : * + { + this.bmpLayer.x = 0; + this.bmpLayer.y = 0; + this.powerLayer.x = 0; + this.powerLayer.y = 0; + this.range_mc.x = 0; + this.range_mc.y = 0; + this.buildLayer.x = 0; + this.buildLayer.y = 0; + this.horseLayer.x = 0; + this.horseLayer.y = 0; + } + + private function e_move(param1:MouseEvent) : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + this.lastTimer = getTimer(); + this.checkPostion(); + if(this.dragIng) + { + this.cube_mc.x += this.bmpLayer.mouseX - this.lastX; + this.cube_mc.y += this.bmpLayer.mouseY - this.lastY; + this.bmpLayer.x += this.bmpLayer.mouseX - this.lastX; + this.bmpLayer.y += this.bmpLayer.mouseY - this.lastY; + _loc2_ = this.bmpLayer.x; + _loc3_ = this.bmpLayer.y; + this.powerLayer.x = _loc2_; + this.powerLayer.y = _loc3_; + this.range_mc.x = _loc2_; + this.range_mc.y = _loc3_; + this.buildLayer.x = _loc2_; + this.buildLayer.y = _loc3_; + this.horseLayer.x = _loc2_; + this.horseLayer.y = _loc3_; + } + } + + public function showRange() : void + { + var _loc7_:Array = null; + var _loc8_:int = 0; + var _loc1_:Object = null; + var _loc2_:HashMap = null; + var _loc3_:int = 0; + var _loc4_:* = new Array(); + var _loc5_:Castle = getCastle(); + var _loc6_:CastleMc = this.buildLayer.getCasHash().getValue(_loc5_.posX + "_" + _loc5_.posY) as CastleMc; + if(_loc6_ != null) + { + _loc1_ = new Object(); + _loc1_.posX = _loc5_.posX; + _loc1_.posY = _loc5_.posY; + _loc1_.name = _loc5_.casName; + _loc1_.rangeLv = _loc5_.rangeLv; + _loc1_.userRel = 0; + _loc1_.casId = _loc5_.casId; + if(_loc5_.rangeLv == 1 && _loc5_.casId != getCastle().casId) + { + _loc6_.imageMc.alpha = 0.5; + } + _loc4_[0] = _loc1_; + this.range_mc.clear(); + _loc2_ = this.rangeMapT(_loc4_); + _loc3_ = 0; + _loc7_ = _loc2_.keys(); + _loc8_ = int(_loc7_.length); + while(_loc3_ < _loc8_) + { + this.unionRange.put(_loc7_[_loc3_],_loc2_.getValue(_loc7_[_loc3_])); + _loc3_++; + } + this.showOneCasRange(_loc2_,true); + } + } + + public function clear() : void + { + this.buildLayer.clear(); + this.powerLayer.clear(); + this.range_mc.clear(); + this.bmpLayer.clear(); + var _loc1_:* = this.bmp_hash.values(); + var _loc2_:* = 0; + while(_loc2_ < _loc1_.length) + { + (_loc1_[_loc2_] as Bitmap).bitmapData = null; + _loc1_[_loc2_] = null; + _loc2_ += 1; + } + this.bmp_hash.clear(); + this.currentRangeMap.clear(); + this.notInCasMap.clear(); + this.currentCastleMap.clear(); + this.rangeOnCastleMap.clear(); + this.bmp_hash = new HashMap(); + } + + public function refreshMyCas(param1:*) : void + { + this.buildLayer.refreshMyCas(param1); + } + + private function openReCreate(param1:MouseEvent) : void + { + } + + private function e_out(param1:MouseEvent) : void + { + this.dragIng = false; + } + + public function showEmptyCas() : void + { + this.buildLayer.showEmptyCas(); + } + + public function drawMap(param1:*, param2:*) : void + { + var _loc3_:* = param1 - this.centerGX; + var _loc4_:* = param2 - this.centerGY; + var _loc5_:* = MapManager.getPix(-_loc3_,-_loc4_); + _loc5_.x += this.cell_width / 2; + _loc5_.y += this.cell_height / 2; + this.setPix(_loc5_); + this.drawLand(param1,param2,false); + this.drawCastle(param1,param2,false); + } + + public function switchCountryFight() : void + { + face.toCountryFight(); + } + + private function __horseClick(param1:MouseEvent) : * + { + var _loc2_:* = param1.currentTarget as MovieClip; + } + + public function hideAllRange() : void + { + this.range_mc.graphics.clear(); + var _loc1_:* = getPosX() + "_" + getPosY(); + var _loc2_:* = this.buildLayer.getCasHash().getValue(_loc1_) as CastleMc; + if(_loc2_ != null && _loc2_.rangeLv == 1) + { + _loc2_.imageMc.alpha = 1; + } + if(this.timeId > 0) + { + clearInterval(this.timeId); + this.timeId = 0 as uint; + } + this.hideRange(); + } + + public function hideCellInfo() : void + { + this.tip.visible = false; + } + + public function hideMinMap() : void + { + this.switchCountryFight(); + } + + public function drawCastle(param1:int, param2:int, param3:Boolean = false) : void + { + var _loc4_:* = param1; + var _loc5_:* = param2; + var _loc6_:* = param3; + this.buildLayer.redraw = _loc6_; + this.buildLayer.startGX = this.startGX; + this.buildLayer.startGY = this.startGY; + this.buildLayer.centerGX = _loc4_; + this.buildLayer.centerGY = _loc5_; + findMapCellsByPoint(_loc4_,_loc5_,MapVars.AREA_CELL_NUM / 2); + } + + public function showOneCasRange(param1:HashMap, param2:Boolean = false, param3:Boolean = false) : void + { + var _loc4_:String = null; + var _loc5_:Array = null; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc8_:Graphics = null; + var _loc9_:* = undefined; + var _loc10_:int = 0; + var _loc11_:Array = null; + var _loc12_:Boolean = false; + var _loc13_:int = 0; + var _loc14_:* = MapVars.CELL_WIDTH; + var _loc15_:* = 16724736; + var _loc16_:Number = 1; + var _loc17_:* = 0; + while(_loc17_ < param1.keys().length) + { + _loc4_ = param1.keys()[_loc17_]; + _loc5_ = _loc4_.split("_"); + _loc6_ = int(_loc5_[0]); + _loc7_ = int(_loc5_[1]); + if(param3) + { + _loc15_ = 39372; + } + if(param2) + { + _loc8_ = this.range_mc.graphics; + _loc15_ = 39372; + _loc16_ = 0.4; + } + else + { + _loc8_ = this.powerLayer.graphics; + } + if(this.currentRangeMap.getValue(_loc4_) != null && this.currentRangeMap.getValue(_loc4_).split("_").length >= 1) + { + _loc11_ = this.currentRangeMap.getValue(_loc4_).split("_"); + _loc12_ = false; + _loc13_ = 0; + while(_loc13_ < _loc11_.length) + { + if(_loc11_[_loc13_] == getCastle().casName) + { + _loc12_ = true; + break; + } + _loc13_++; + } + if(_loc12_ && !param2) + { + } + if(_loc11_.length >= 2 || param3) + { + _loc15_ = 16724736; + } + } + _loc8_.beginFill(_loc15_,_loc16_); + _loc9_ = MapManager.getPix(_loc6_ - this.startGX - 1,_loc7_ - this.startGY); + _loc10_ = _loc14_ - 4; + _loc9_.x += _loc10_ / 2 + 2; + _loc9_.y += _loc10_ / 4 + 2; + _loc8_.moveTo(_loc9_.x + _loc10_ / 2,_loc9_.y); + _loc8_.lineTo(_loc9_.x,_loc9_.y + _loc10_ / 4); + _loc8_.lineTo(_loc9_.x + _loc10_ / 2,_loc9_.y + _loc10_ / 2); + _loc8_.lineTo(_loc9_.x + _loc10_,_loc9_.y + _loc10_ / 4); + _loc8_.lineTo(_loc9_.x + _loc10_ / 2,_loc9_.y); + _loc8_.endFill(); + _loc17_ += 1; + } + if(this.timeId <= 0) + { + this.timeId = setInterval(this.timer,80); + } + } + + public function refreshCastle(param1:ItemEvent = null) : void + { + this.drawCastle(this.centerGX,this.centerGY,true); + } + + public function resize() : void + { + this.bg_mc.x = this.bmp_width / 4; + this.bg_mc.y = -this.bg_mc.height / 2; + this.x = face.realWidth / 2; + this.y = face.realHeight / 2; + this.drawHorse(this.centerGX,this.centerGY); + var _loc1_:* = face.realWidth; + var _loc2_:* = face.realHeight; + this.wheelPane.x = _loc1_ / 2 - 184; + this.wheelPane.y = -_loc2_ / 2 + 26 - 4; + this.controlPane.x = this.wheelPane.x; + this.controlPane.y = this.wheelPane.y; + } + + public function e_added(param1:Event) : void + { + this.resize(); + } + + private function e_up(param1:MouseEvent) : void + { + this.dragIng = false; + this.check(); + } + + public function moveCastleSuccF(param1:int, param2:int) : void + { + this.clear(); + this.draw(getPosX(),getPosY()); + } + + public function update(param1:Object = null) : void + { + if(param1 == null) + { + return; + } + } + + private function aroundCas(param1:int, param2:int) : Array + { + var _loc3_:Array = null; + var _loc4_:CastleMc = null; + var _loc5_:Object = null; + var _loc6_:Array = [[-6,0],[6,0],[-3,-3],[-3,3],[3,3],[3,-3],[0,6],[0,-6],[-8,-3],[-5,-6],[-2,-9],[-9,3],[-6,6],[-3,9],[3,9],[6,6],[9,3],[3,-9],[6,-6],[9,-3]]; + var _loc7_:* = new Array(); + var _loc8_:int = 0; + var _loc9_:int = 0; + while(_loc9_ < _loc6_.length) + { + _loc3_ = _loc6_[_loc9_]; + if(this.buildLayer.getCasHash().getValue(param1 + _loc3_[0] + "_" + (param2 + _loc3_[1])) != null) + { + _loc4_ = this.buildLayer.getCasHash().getValue(param1 + _loc3_[0] + "_" + (param2 + _loc3_[1])); + if(!(_loc9_ > 7 && (_loc4_.rangeLv < 10 || getCastle().rangeLv < 10))) + { + if(!(_loc4_.casId == getCastle().casId || getGuildFlag() != null && getGuildFlag() != "" && _loc4_.flagName != null && _loc4_.flagName != "" && _loc4_.flagName == getGuildFlag())) + { + _loc5_ = new Object(); + _loc5_.posX = _loc4_.gx; + _loc5_.posY = _loc4_.gy; + _loc5_.name = _loc4_.casName; + _loc5_.rangeLv = _loc4_.rangeLv; + _loc7_[_loc8_] = _loc5_; + _loc8_ += 1; + } + } + } + _loc9_++; + } + return _loc7_; + } + + public function moveMap(param1:int, param2:int = 1) : void + { + var _loc3_:* = 0; + var _loc4_:* = 0; + var _loc5_:* = 8; + var _loc6_:Point = new Point(); + switch(param1) + { + case 1: + _loc3_ = -1; + _loc4_ = -1; + _loc6_.x = 0; + _loc6_.y = _loc5_ * this.cell_height; + break; + case 3: + _loc3_ = 1; + _loc4_ = -1; + _loc6_.y = 0; + _loc6_.x = -_loc5_ * this.cell_width; + break; + case 5: + _loc3_ = 1; + _loc4_ = 1; + _loc6_.x = 0; + _loc6_.y = -_loc5_ * this.cell_height; + break; + case 7: + _loc3_ = -1; + _loc4_ = 1; + _loc6_.x = _loc5_ * this.cell_width; + _loc6_.y = 0; + } + var _loc7_:* = this.centerGX + _loc3_ * _loc5_; + var _loc8_:* = this.centerGY + _loc4_ * _loc5_; + this.setPix(_loc6_); + this.minMap.update = true; + this.drawLand(_loc7_,_loc8_,false); + this.drawCastle(_loc7_,_loc8_,false); + } + + public function setPix(param1:*) : * + { + this.buildLayer.x += param1.x; + this.buildLayer.y += param1.y; + this.powerLayer.x += param1.x; + this.powerLayer.y += param1.y; + this.range_mc.x += param1.x; + this.range_mc.y += param1.y; + this.bmpLayer.x += param1.x; + this.bmpLayer.y += param1.y; + this.horseLayer.x += param1.x; + this.horseLayer.y += param1.y; + } + + private function readHorseSucc(param1:*) : void + { + } + + public function refresh() : void + { + this.drawMap(this.centerGX,this.centerGY); + } + + public function addClould() : void + { + if(this.cloudLayer.numChildren > 0) + { + return; + } + var _loc1_:CLoader = new CLoader(); + _loc1_.load(new URLRequest(ServerConfig.IMAGE_MAP_URL + "cloud.swf")); + _loc1_.x = -face.realWidth / 2 + Math.random() * 100; + _loc1_.y = -face.realHeight / 2 + Math.random() * 200; + _loc1_.rotation -= Math.random() * 30; + this.cloudLayer.addChild(_loc1_); + } + + private function drawCar(param1:Boolean = true) : void + { + } + + private function drawHorse(param1:int, param2:int) : void + { + } + + public function toPosi(param1:int, param2:int) : void + { + this.startGX = param1; + this.startGY = param2; + if(!loadComplete) + { + return; + } + this.draw(this.startGX,this.startGY); + } + } +} + diff --git a/flash_decompiled/com/view/world/ui/AbstractView.as b/flash_decompiled/com/view/world/ui/AbstractView.as new file mode 100644 index 0000000..516ec43 --- /dev/null +++ b/flash_decompiled/com/view/world/ui/AbstractView.as @@ -0,0 +1,32 @@ +package com.view.world.ui +{ + import com.utils.GC; + import com.view.res.GameUIRes; + import com.view.ui.BaseUI; + import com.view.world.CastleMc; + + public class AbstractView extends BaseUI + { + + public var gameRes:GameUIRes = GameUIRes.getInstance(); + + public function AbstractView() + { + super(); + } + + public function update(param1:CastleMc) : void + { + } + + public function disappear() : void + { + if(this.parent != null && parent.contains(this)) + { + this.parent.removeChild(this); + GC.clear(); + } + } + } +} + diff --git a/flash_decompiled/com/view/world/ui/AddImpress.as b/flash_decompiled/com/view/world/ui/AddImpress.as new file mode 100644 index 0000000..4b08a8c --- /dev/null +++ b/flash_decompiled/com/view/world/ui/AddImpress.as @@ -0,0 +1,221 @@ +package com.view.world.ui +{ + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.guild.event.GuildTransEvent; + import com.utils.HashMap; + import com.view.newui.UIButton; + import com.view.newui.UIConfig; + import com.view.newui.UIInputText; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.message.MessageBoxUI; + import com.view.world.EmptyContainer; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import flash.display.Sprite; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFormat; + + public class AddImpress extends UIWindowBg + { + + private var bg:Sprite; + + private var tab1:Sprite; + + private var _itemContainer:EmptyContainer; + + private var moren_txt:TextField; + + private var colorBg:Array; + + private var inputText:UIInputText; + + private var userId:int; + + public function AddImpress() + { + super(); + this.colorBg = ["YinXiang_1","YinXiang_2","YinXiang_3","YinXiang_4","YinXiang_5","YinXiang_6","YinXiang_7","YinXiang_8","YinXiang_9","YinXiang_10"]; + initSize(125,160); + loadTitle(UITitleConfig.title_haoyouyinxiang); + addCloseBtn(); + initBg(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initThirdPanel(300,130); + bg1.addChild(_loc1_); + _loc1_.x = 7; + _loc1_.y = 7; + var _loc2_:TextField = PublicMethod.getTextFieldWithFillter(16777215,90); + _loc2_.text = "输入你的印象:"; + bg1.addChild(_loc2_); + _loc2_.x = 30; + _loc2_.y = 160; + this.inputText = new UIInputText(120); + bg1.addChild(this.inputText); + this.inputText.setMaxChars(20); + this.inputText.y = _loc2_.y - 2; + this.inputText.x = _loc2_.x + _loc2_.width; + var _loc3_:UIButton = new UIButton("提 交",2,10); + bg1.addChild(_loc3_); + _loc3_.x = this.inputText.x + this.inputText.width + 5; + _loc3_.y = this.inputText.y; + _loc3_.onClick = this.__ok; + this._itemContainer = new EmptyContainer(); + _loc1_.addChild(this._itemContainer); + this._itemContainer.x = 5; + this._itemContainer.y = 5; + this.moren_txt = PublicMethod.getTextFieldWithFillter(16777215,110); + bg1.addChild(this.moren_txt); + this.moren_txt.x = 100; + this.moren_txt.y = 75; + this.moren_txt.text = "还没有好友进行评价"; + this.moren_txt.visible = false; + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_getEvalutions,this.listSucc); + ConnectService.getInstance().addEventListener(GuildTransEvent.Trans_addImpress,this.addImpress); + } + + private function listSucc(param1:GuildTransEvent) : void + { + if(this.userId != param1.itemObj.userId) + { + return; + } + var _loc2_:Array = param1.itemObj.numSortList as Array; + this.drawImpress(_loc2_); + } + + private function drawImpress(param1:Array) : void + { + var nameMap:*; + var content:String = null; + var num:int = 0; + var evalutionArr:Array = null; + var xx:int = 0; + var yy:int = 0; + var j:int = 0; + var userNameArr:Array = null; + var nameStr:String = null; + var k:int = 0; + var sp:Sprite = null; + var color:* = undefined; + var txt:TextField = null; + var format:TextFormat = null; + var lastfloor:int = 0; + var i:int = 0; + var classS:String = null; + var arr:* = param1; + this._itemContainer.clear(); + if(arr.length == 0) + { + this.moren_txt.visible = true; + return; + } + this.moren_txt.visible = false; + nameMap = new HashMap(); + while(i < arr.length) + { + content = arr[i].content; + num = int(arr[i].num); + evalutionArr = arr[i].evalutionList; + xx = int(Math.random() * 300); + yy = int(Math.random() * 130); + j = 0; + while(j < evalutionArr.length) + { + nameMap.put(evalutionArr[j].friendUserName,"1"); + j += 1; + } + userNameArr = nameMap.keys(); + k = 0; + while(k < userNameArr.length) + { + nameStr += userNameArr[k]; + if(k != userNameArr.length - 1) + { + nameStr += "、"; + } + k += 1; + } + sp = new Sprite(); + classS = i >= 9 ? this.colorBg[9] : this.colorBg[i]; + color = face.getPng(classS); + sp.graphics.beginBitmapFill(color); + sp.graphics.drawRect(0,0,79,19); + sp.graphics.endFill(); + this._itemContainer.addChild(sp); + sp.x = xx; + sp.y = yy; + txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,80); + txt.text = content; + txt.height = 19; + format = new TextFormat(); + format.align = "center"; + txt.setTextFormat(format); + sp.addChild(txt); + txt.x = -1; + txt.selectable = false; + txt.mouseEnabled = false; + lastfloor = this._itemContainer.getChildIndex(sp); + ToolTipManager.getInstance().setToolTip(sp,new TxtTooltip("被这样描述 " + num + " 次: " + content)); + sp.addEventListener(MouseEvent.MOUSE_OVER,function(param1:MouseEvent):void + { + var _loc2_:* = (param1.currentTarget as Sprite).x; + var _loc3_:* = (param1.currentTarget as Sprite).y; + var _loc4_:* = param1.currentTarget; + _itemContainer.addChild(_loc4_); + _loc4_.x = _loc2_; + _loc4_.y = _loc3_; + },false,0,true); + sp.addEventListener(MouseEvent.MOUSE_OUT,function(param1:MouseEvent):void + { + var _loc2_:* = (param1.currentTarget as Sprite).x; + var _loc3_:* = (param1.currentTarget as Sprite).y; + var _loc4_:* = param1.currentTarget; + _itemContainer.addChildAt(_loc4_,lastfloor); + _loc4_.x = _loc2_; + _loc4_.y = _loc3_; + },false,0,true); + i += 1; + } + } + + public function listImpress(param1:int) : void + { + this.userId = param1; + ConnectService.getInstance().guildTransService.getEvalutions(param1); + } + + public function clear() : void + { + } + + override public function closeSelf(param1:MouseEvent) : void + { + this.inputText.setText(""); + this._itemContainer.clear(); + this.visible = false; + } + + private function __ok(param1:MouseEvent) : void + { + var _loc2_:String = PublicMethod.trim(this.inputText.getText()); + if(_loc2_ == "") + { + MessageBoxUI.getInstance().addMessage("请输入印象后再评价"); + return; + } + ConnectService.getInstance().guildTransService.addImpress(this.userId,_loc2_); + } + + private function addImpress(param1:GuildTransEvent) : void + { + MessageBoxUI.getInstance().addMessage("添加好友印象成功"); + this.closeSelf(null); + CastleUserUI(this.parent).refresh(); + } + } +} + diff --git a/flash_decompiled/com/view/world/ui/CastleUserUI.as b/flash_decompiled/com/view/world/ui/CastleUserUI.as new file mode 100644 index 0000000..dce76dd --- /dev/null +++ b/flash_decompiled/com/view/world/ui/CastleUserUI.as @@ -0,0 +1,1536 @@ +package com.view.world.ui +{ + import com.comfig.ClassConfig; + import com.comfig.ServerConfig; + import com.common.CommonAPI; + import com.common.LoadResource; + import com.common.PublicMethod; + import com.control.ConnectService; + import com.control.battle.event.BattleEvent; + import com.control.combat.event.CombatEvent; + import com.control.data.ReturnBean; + import com.control.friend.event.FriendEvent; + import com.control.guild.event.GuildEvent; + import com.control.map.event.MapEvent; + import com.control.user.event.UserEvent; + import com.data.DataModoule; + import com.events.EventUtils; + import com.events.LinkEvent; + import com.newdata.user.NewUserData; + import com.utils.GC; + import com.utils.HashMap; + 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.UILabel; + import com.view.newui.UITabBtn; + import com.view.newui.UITitleConfig; + import com.view.newui.UIWindowBg; + import com.view.ui.home.mc.HomeChildMc; + import com.view.ui.message.MessageBoxUI; + import com.view.ui.ranking.mc.OtherUserEquView; + import com.view.ui.ranking.mc.OtherUserEquipBg; + import com.view.ui.training.SoldierFirstView; + import com.view.world.CastleMc; + import com.view.world.EmptyContainer; + import com.view.world.ToolTipManager; + import com.view.world.TxtTooltip; + import com.view.world.World; + import flash.display.Bitmap; + import flash.display.BitmapData; + import flash.display.MovieClip; + import flash.display.SimpleButton; + 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.text.TextFormat; + import flash.utils.Timer; + + public class CastleUserUI extends AbstractView + { + + private static var instance:CastleUserUI; + + private var countryMc:MovieClip; + + private var bg:Sprite; + + private var colorBg:Array; + + private var tft:TextFormat; + + private var tab1:UIWindowBg; + + private var tab3:UIWindowBg; + + private var _addImpress_view:AddImpress; + + private var kingMc:UIWindowBg; + + private var govMc:MovieClip; + + private var btnArr:Array; + + private var oldNameBtn:Button_9; + + private var userHomevalue1:UILabel; + + private var userHomevalue2:UILabel; + + private var userHomevalue3:UILabel; + + private var userHomevalue4:UILabel; + + private var userHomevalue5:UILabel; + + private var userHomevalue6:UILabel; + + private var userHomevalue7:UILabel; + + private var userHomevalue8:UILabel; + + private var homelabel1:UILabel; + + private var homelabel2:UILabel; + + private var homelabel3:UILabel; + + private var homelabel4:UILabel; + + private var homelabel5:UILabel; + + private var homelabel6:UILabel; + + private var homelabel7:UILabel; + + private var homelabel8:UILabel; + + private var childMc:HomeChildMc; + + private var userHomePng1:Bitmap; + + private var userHomePng2:Bitmap; + + private var userHomeLine:Sprite; + + private var starVec:Vector.; + + private var starVec1:Vector.; + + private var centerBg:Sprite; + + private var itemVec:Vector.; + + private var userEquView:OtherUserEquView; + + private var userlabel1:TextField; + + private var userlabel2:TextField; + + private var userlabel3:TextField; + + private var userlabel4:TextField; + + private var userlabel5:TextField; + + private var value1:TextField; + + private var value2:TextField; + + private var value3:TextField; + + private var value4:TextField; + + private var value5:TextField; + + private var lastTab:UITabBtn; + + private var prePage:UIWindowBg; + + private var loadImg:LoadResource; + + private var bodyImg:Bitmap; + + private var closeBtn:SimpleButton; + + private var headBor:UIWindowBg; + + private var blabel1:TextField; + + private var blabel2:TextField; + + private var blabel3:TextField; + + private var blabel4:TextField; + + private var blabel5:TextField; + + private var blabel6:TextField; + + private var blabel7:TextField; + + private var blabel8:TextField; + + private var atkHeadLoad:LoadResource; + + private var txt_pos:TextField; + + private var noBtn:Button_9; + + private var _itemContainer:EmptyContainer; + + private var guildName:String; + + private var flagName:String; + + private var btn1:UIButton; + + private var btn2:UIButton; + + private var btn3:UIButton; + + private var btn4:UIButton; + + private var btn5:UIButton; + + private var btn6:UIButton; + + private var casId:int; + + private var _sign_txt:TextField; + + private var currCastleMc:CastleMc; + + private var currName:String; + + private var userEquList:Array; + + private var currPox:int; + + private var currPoy:int; + + private var userObj:Object; + + private var _userId:int; + + private var outBattleSeconds:int; + + private var isGuildWar:Boolean; + + private var loadTianxiaImg:LoadResource; + + private var tianxiaImg:Bitmap; + + private var _mc1:MovieClip; + + private var _mc2:MovieClip; + + private var _mc3:MovieClip; + + private var _mc7:MovieClip; + + private var _mc9:MovieClip; + + private var _mc11:MovieClip; + + private var warStr:String; + + private var timer:Timer; + + private var leftTime:int; + + private var preUrl:String; + + private var userHeadImg:Bitmap; + + public function CastleUserUI() + { + var _loc2_:UITabBtn = null; + var _loc4_:int = 0; + var _loc5_:UITabBtn = null; + var _loc6_:int = 0; + var _loc7_:TextField = null; + var _loc8_:TextField = null; + var _loc9_:TextField = null; + var _loc10_:TextField = null; + var _loc11_:TextField = null; + var _loc12_:TextField = null; + var _loc13_:TextField = null; + var _loc14_:TextField = null; + var _loc15_:TextField = null; + var _loc16_:TextField = null; + var _loc17_:UIWindowBg = null; + var _loc18_:TextField = null; + var _loc19_:Button_9 = null; + this.itemVec = new Vector.(); + super(); + this.colorBg = ["YinXiang_1","YinXiang_2","YinXiang_3","YinXiang_4","YinXiang_5","YinXiang_6","YinXiang_7","YinXiang_8","YinXiang_9","YinXiang_10"]; + this.tft = new TextFormat(); + this.tft.align = "center"; + this.tft.size = 12; + this.tft.color = 16777215; + super.addUIBg(); + super.loadTitle(UITitleConfig.title_junzhuxinxi); + this.setPosition(); + var _loc1_:UIWindowBg = new UIWindowBg(); + _loc1_.initSecondPanel(721,317); + addChild(_loc1_); + _loc1_.x = 11; + _loc1_.y = 39; + this.kingMc = new UIWindowBg(); + this.kingMc.initSecondPanel(252,310); + _loc1_.addChild(this.kingMc); + this.kingMc.x = 4; + this.kingMc.y = 4; + this.initKingMc(); + this.btnArr = new Array(); + _loc2_ = new UITabBtn("君 主",2); + var _loc3_:UITabBtn = new UITabBtn("子 嗣",2); + this.btnArr.push(_loc2_); + this.btnArr.push(_loc3_); + for each(_loc5_ in this.btnArr) + { + _loc1_.addChild(_loc5_); + _loc5_.x = this.kingMc.x + this.kingMc.width + 10 + _loc4_ * 66; + _loc5_.y = this.kingMc.y; + _loc5_.onClick = this.clickTab; + _loc4_++; + } + this.tab1 = new UIWindowBg(); + this.tab1.initSecondPanel(448,258); + _loc1_.addChild(this.tab1); + this.tab1.x = this.kingMc.x + this.kingMc.width + 3; + this.tab1.y = this.kingMc.y + 25; + this.tab3 = new UIWindowBg(); + this.tab3.initSecondPanel(448,284); + _loc1_.addChild(this.tab3); + this.tab3.x = this.kingMc.x + this.kingMc.width + 3; + this.tab3.y = this.kingMc.y + 25; + _loc2_.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP)); + this.tab3.visible = false; + this.initUserHome(); + this.headBor = new UIWindowBg(); + this.headBor.initThirdPanel(89,89); + this.tab1.addChild(this.headBor); + this.headBor.x = 5; + this.headBor.y = 5; + this.govMc = face.getMovieClip(ClassConfig.LIB_CUNTRY_5); + this.govMc.gotoAndStop(1); + this.tab1.addChild(this.govMc); + this.govMc.x = 72; + this.govMc.y = 81; + _loc6_ = 25; + _loc7_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.tab1.addChild(_loc7_); + _loc7_.x = 120; + _loc7_.y = this.headBor.y; + _loc7_.text = "君 主:"; + this.blabel1 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.tab1.addChild(this.blabel1); + this.blabel1.x = _loc7_.x + _loc7_.width; + this.blabel1.y = _loc7_.y; + this.countryMc = face.getMovieClip(ClassConfig.lib_country); + this.tab1.addChild(this.countryMc); + this.countryMc.x = this.blabel1.x + this.blabel1.width; + this.countryMc.y = _loc7_.y; + this.countryMc.stop(); + _loc8_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.tab1.addChild(_loc8_); + _loc8_.x = _loc7_.x; + _loc8_.y = _loc7_.y + _loc6_; + _loc8_.text = "联 盟:"; + this.blabel2 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.tab1.addChild(this.blabel2); + this.blabel2.x = this.blabel1.x; + this.blabel2.y = _loc8_.y; + _loc9_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.tab1.addChild(_loc9_); + _loc9_.x = _loc7_.x; + _loc9_.y = _loc8_.y + _loc6_; + _loc9_.text = "状 态:"; + this.blabel3 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.tab1.addChild(this.blabel3); + this.blabel3.x = this.blabel1.x; + this.blabel3.y = _loc9_.y; + _loc10_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.tab1.addChild(_loc10_); + _loc10_.x = _loc7_.x; + _loc10_.y = _loc9_.y + _loc6_; + _loc10_.text = "城池等级:"; + this.blabel4 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.tab1.addChild(this.blabel4); + this.blabel4.x = this.blabel1.x; + this.blabel4.y = _loc10_.y; + _loc11_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.tab1.addChild(_loc11_); + _loc11_.x = 300; + _loc11_.y = _loc7_.y; + _loc11_.text = "等 级:"; + this.blabel5 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.tab1.addChild(this.blabel5); + this.blabel5.x = _loc11_.x + _loc11_.width; + this.blabel5.y = _loc7_.y; + _loc12_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.tab1.addChild(_loc12_); + _loc12_.x = _loc11_.x; + _loc12_.y = _loc8_.y; + _loc12_.text = "坐 标:"; + this.txt_pos = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.tab1.addChild(this.txt_pos); + this.txt_pos.x = this.blabel5.x; + this.txt_pos.y = _loc12_.y; + this.txt_pos.styleSheet = CommonAPI.getLinkStyle(); + this.txt_pos.htmlText = ""; + this.txt_pos.addEventListener(TextEvent.LINK,this.linkeventhandler); + this.txt_pos.mouseEnabled = true; + _loc13_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.tab1.addChild(_loc13_); + _loc13_.x = _loc11_.x; + _loc13_.y = _loc12_.y + _loc6_; + _loc13_.text = "排 名:"; + this.blabel7 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.tab1.addChild(this.blabel7); + this.blabel7.x = this.blabel5.x; + this.blabel7.y = _loc13_.y; + _loc14_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.tab1.addChild(_loc14_); + _loc14_.x = _loc11_.x; + _loc14_.y = _loc13_.y + _loc6_; + _loc14_.text = "繁 荣 度:"; + this.blabel8 = PublicMethod.getTextFieldWithFillter(UIConfig.textColor,100); + this.tab1.addChild(this.blabel8); + this.blabel8.x = this.blabel5.x; + this.blabel8.y = _loc14_.y; + this._mc1 = face.getMovieClip("LIB_UI_MC_pro1"); + this._mc2 = face.getMovieClip("LIB_UI_MC_pro2"); + this._mc3 = face.getMovieClip("LIB_UI_MC_pro3"); + this._mc7 = face.getMovieClip("LIB_UI_MC_pro7"); + this._mc9 = face.getMovieClip("LIB_UI_MC_pro9"); + this._mc11 = face.getMovieClip("LIB_UI_MC_pro11"); + this._mc1.gotoAndStop(1); + this._mc2.gotoAndStop(1); + this._mc3.gotoAndStop(1); + this._mc7.gotoAndStop(1); + this._mc9.gotoAndStop(1); + this._mc11.gotoAndStop(1); + this.tab1.addChild(this._mc1); + this._mc1.x = 10; + this._mc1.y = 110; + this.tab1.addChild(this._mc2); + this._mc2.x = this._mc1.x + 22; + this._mc2.y = this._mc1.y; + this.tab1.addChild(this._mc3); + this._mc3.x = this._mc2.x + 22; + this._mc3.y = this._mc1.y; + this.tab1.addChild(this._mc7); + this._mc7.x = this._mc3.x + 22; + this._mc7.y = this._mc1.y; + this.tab1.addChild(this._mc9); + this._mc9.x = this._mc7.x + 22; + this._mc9.y = this._mc1.y + 5; + this.tab1.addChild(this._mc11); + this._mc11.x = this._mc9.x + 22; + this._mc11.y = this._mc1.y + 3; + Utils.applyGray(this._mc1); + Utils.applyGray(this._mc2); + Utils.applyGray(this._mc3); + Utils.applyGray(this._mc7); + Utils.applyGray(this._mc9); + Utils.applyGray(this._mc11); + _loc15_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + _loc15_.text = "个性签名:"; + this.tab1.addChild(_loc15_); + _loc15_.x = 15; + _loc15_.y = 130; + _loc16_ = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,120); + _loc16_.text = "(进入君主界面设置)"; + this.tab1.addChild(_loc16_); + _loc16_.x = 320; + _loc16_.y = 130; + _loc17_ = new UIWindowBg(); + _loc17_.initSecondPanel(415,38); + this.tab1.addChild(_loc17_); + _loc17_.x = 15; + _loc17_.y = 150; + this._sign_txt = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,415); + this._sign_txt.wordWrap = true; + this._sign_txt.multiline = true; + this._sign_txt.height = 38; + this._sign_txt.mouseEnabled = false; + _loc17_.addChild(this._sign_txt); + this._sign_txt.x = 4; + this._sign_txt.y = 2; + _loc18_ = PublicMethod.getTextFieldWithFillter(65280,120); + _loc18_.text = "大家对他的印象:"; + this.tab1.addChild(_loc18_); + _loc18_.x = 15; + _loc18_.y = 200; + this._itemContainer = new EmptyContainer(); + this.tab1.addChild(this._itemContainer); + this._itemContainer.x = 15; + this._itemContainer.y = 220; + _loc19_ = new Button_9("更多印象"); + this.tab1.addChild(_loc19_); + _loc19_.x = 395; + _loc19_.y = 245; + _loc19_.addEventListener(MouseEvent.CLICK,this.getMore,false,0,true); + this.oldNameBtn = new Button_9("君主曾用名"); + this.tab1.addChild(this.oldNameBtn); + this.oldNameBtn.x = 10; + this.oldNameBtn.y = 275; + this.oldNameBtn.buttonMode = true; + this.noBtn = new Button_9("还没有好友进行评价"); + this.tab1.addChild(this.noBtn); + this.noBtn.x = 150; + this.noBtn.y = 215; + this.btn1 = new UIButton("宣战",1,10); + this.btn2 = new UIButton("计策",1,10); + this.btn3 = new UIButton("收藏",1,10); + this.btn4 = new UIButton("好友",1,10); + this.btn5 = new UIButton("进入农场",2,10); + this.btn6 = new UIButton("申请入盟",2,10); + this.tab1.addChild(this.btn6); + this.tab1.addChild(this.btn1); + this.tab1.addChild(this.btn2); + this.tab1.addChild(this.btn3); + this.tab1.addChild(this.btn4); + this.tab1.addChild(this.btn5); + this.btn6.x = 85; + this.btn6.y = 270; + this.btn1.x = this.btn6.x + this.btn6.width + 5; + this.btn1.y = this.btn6.y; + this.btn2.x = this.btn1.x + this.btn1.width + 5; + this.btn2.y = this.btn6.y; + this.btn3.x = this.btn2.x + this.btn2.width + 5; + this.btn3.y = this.btn6.y; + this.btn4.x = this.btn3.x + this.btn3.width + 5; + this.btn4.y = this.btn6.y; + this.btn5.x = this.btn4.x + this.btn4.width + 5; + this.btn5.y = this.btn6.y; + this.btn2.setUnEnable(); + this._addImpress_view = new AddImpress(); + addChild(this._addImpress_view); + this._addImpress_view.x = int(width / 2 - this._addImpress_view.width / 2); + this._addImpress_view.y = int(height / 2 - this._addImpress_view.height / 2); + this._addImpress_view.visible = false; + } + + public static function getInstance() : CastleUserUI + { + if(instance == null) + { + instance = new CastleUserUI(); + } + return instance; + } + + override public function setWindowSize() : void + { + window_width = 530; + window_heihgt = 296; + } + + override public function setCloseBtnPosi() : void + { + ui_closeBtn.x = 730; + ui_closeBtn.y = 10; + } + + private function initUserHome() : void + { + var _loc3_:Bitmap = null; + var _loc4_:Bitmap = null; + this.childMc = new HomeChildMc(); + this.tab3.addChild(this.childMc); + this.childMc.x = 15; + this.childMc.y = 15; + this.userHomePng1 = face.getBitMap(ClassConfig.lib_add_1); + this.tab3.addChild(this.userHomePng1); + this.userHomePng1.x = 270; + this.userHomePng1.y = 15; + this.userHomeLine = PublicMethod.getTrLine(225,16711680); + this.tab3.addChild(this.userHomeLine); + this.userHomeLine.x = 212; + this.userHomeLine.y = this.userHomePng1.y + 30; + this.userHomePng2 = face.getBitMap(ClassConfig.lib_add_2); + this.tab3.addChild(this.userHomePng2); + this.userHomePng2.x = 180; + this.userHomePng2.y = 125; + var _loc1_:int = 1; + while(_loc1_ < 9) + { + this["homelabel" + _loc1_] = new UILabel(100,UIConfig.labelColor); + this.tab3.addChild(this["homelabel" + _loc1_]); + this["homelabel" + _loc1_].x = 230; + this["homelabel" + _loc1_].y = 30 + _loc1_ * 25; + this["homelabel" + _loc1_].setTextForMat(PublicMethod.getRightTextFormat()); + this["userHomevalue" + _loc1_] = new UILabel(100); + this.tab3.addChild(this["userHomevalue" + _loc1_]); + this["userHomevalue" + _loc1_].x = this["homelabel" + _loc1_].x + 100; + this["userHomevalue" + _loc1_].y = this["homelabel" + _loc1_].y; + switch(_loc1_) + { + case 1: + this["homelabel" + _loc1_].setText("子嗣姓名:"); + break; + case 2: + this["homelabel" + _loc1_].setText("子嗣性别:"); + break; + case 3: + this["homelabel" + _loc1_].setText("子嗣阶段:"); + break; + case 4: + this["homelabel" + _loc1_].setText("子嗣星级:"); + break; + case 5: + this["homelabel" + _loc1_].setText("武将攻击:"); + break; + case 6: + this["homelabel" + _loc1_].setText("武将防御:"); + break; + case 7: + this["homelabel" + _loc1_].setText("武将体力:"); + break; + case 8: + this["homelabel" + _loc1_].setText("武将敏捷:"); + } + _loc1_++; + } + this.starVec = new Vector.(); + this.starVec1 = new Vector.(); + var _loc2_:int = 0; + while(_loc2_ < 5) + { + _loc3_ = face.getBitMap(ClassConfig.lib_star_1); + this.tab3.addChild(_loc3_); + _loc3_.x = this.userHomevalue1.x + 18 * _loc2_; + _loc3_.y = this.userHomevalue4.y + 0; + this.starVec1.push(_loc3_); + _loc4_ = face.getBitMap(ClassConfig.lib_star_5); + this.tab3.addChild(_loc4_); + _loc4_.x = _loc3_.x; + _loc4_.y = _loc3_.y; + _loc4_.visible = false; + this.starVec.push(_loc4_); + _loc2_++; + } + } + + private function loadUserHomeData(param1:Object) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + if(param1 == null) + { + this.childMc.visible = false; + this.userHomePng1.visible = false; + this.userHomeLine.visible = false; + this.userHomePng2.visible = true; + _loc2_ = 1; + while(_loc2_ < 9) + { + this["homelabel" + _loc2_].visible = false; + this["userHomevalue" + _loc2_].visible = false; + _loc2_++; + } + _loc3_ = 0; + while(_loc3_ < this.starVec.length) + { + this.starVec[_loc3_].visible = false; + this.starVec1[_loc3_].visible = false; + _loc3_++; + } + return; + } + _loc2_ = 1; + while(_loc2_ < 9) + { + this["homelabel" + _loc2_].visible = true; + this["userHomevalue" + _loc2_].visible = true; + _loc2_++; + } + _loc3_ = 0; + while(_loc3_ < this.starVec.length) + { + this.starVec[_loc3_].visible = true; + this.starVec1[_loc3_].visible = true; + _loc3_++; + } + this.userHomePng1.visible = true; + this.userHomeLine.visible = true; + this.userHomePng2.visible = false; + var _loc4_:int = int(param1.level); + this.childMc.visible = true; + this.childMc.loadBg(param1.sex,_loc4_); + this.userHomevalue1.setText(param1.name); + if(param1.sex == 1) + { + this.userHomevalue2.setText("女"); + } + else + { + this.userHomevalue2.setText("男"); + } + switch(_loc4_) + { + case 1: + this.userHomevalue3.setText("婴儿"); + break; + case 2: + this.userHomevalue3.setText("幼儿"); + break; + case 3: + this.userHomevalue3.setText("少儿"); + break; + case 4: + this.userHomevalue3.setText("少年"); + break; + case 5: + this.userHomevalue3.setText("青年"); + break; + case 6: + this.userHomevalue3.setText("壮年"); + } + this.userHomevalue5.setText("" + PublicMethod.getHomePro(_loc4_,param1.addAtk) + ""); + this.userHomevalue6.setText("" + PublicMethod.getHomePro(_loc4_,param1.addDef) + ""); + this.userHomevalue7.setText("" + PublicMethod.getHomePro(_loc4_,param1.addHp) + ""); + this.userHomevalue8.setText("" + PublicMethod.getHomePro(_loc4_,param1.addAgl) + ""); + _loc3_ = 0; + while(_loc3_ < this.starVec.length) + { + if(_loc3_ < _loc4_ - 1) + { + this.starVec[_loc3_].visible = true; + } + else + { + this.starVec[_loc3_].visible = false; + } + _loc3_++; + } + } + + private function initKingMc() : void + { + var _loc2_:OtherUserEquipBg = null; + var _loc1_:int = 1; + while(_loc1_ < 9) + { + _loc2_ = new OtherUserEquipBg(_loc1_); + this.kingMc.addChild(_loc2_); + this.itemVec.push(_loc2_); + _loc1_++; + } + this.centerBg = new Sprite(); + this.kingMc.addChild(this.centerBg); + this.centerBg.x = 62; + this.centerBg.y = 6; + this.userEquView = new OtherUserEquView(); + this.kingMc.addChild(this.userEquView); + this.userEquView.x = this.centerBg.x; + this.userEquView.y = 10; + this.userlabel1 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.userlabel2 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.userlabel3 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.userlabel4 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.userlabel5 = PublicMethod.getTextFieldWithFillter(UIConfig.labelColor,60); + this.value1 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.value2 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.value3 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.value4 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.value5 = PublicMethod.getTextFieldWithFillter(UIConfig.importColor,60); + this.kingMc.addChild(this.userlabel1); + this.kingMc.addChild(this.userlabel2); + this.kingMc.addChild(this.userlabel3); + this.kingMc.addChild(this.userlabel4); + this.kingMc.addChild(this.userlabel5); + this.kingMc.addChild(this.value1); + this.kingMc.addChild(this.value2); + this.kingMc.addChild(this.value3); + this.kingMc.addChild(this.value4); + this.kingMc.addChild(this.value5); + this.userlabel1.text = "武力点:"; + this.value1.text = "+0"; + this.userlabel2.text = "部队伤害:"; + this.value2.text = "+0.0%"; + this.userlabel3.text = "伤害减免:"; + this.value3.text = "+0.0%"; + this.userlabel4.text = "幸运:"; + this.value4.text = "+0"; + this.userlabel5.text = "诅咒:"; + this.value5.text = "+0"; + this.userlabel1.x = 10; + this.userlabel1.y = 230; + this.value1.x = 56; + this.value1.y = this.userlabel1.y; + this.userlabel2.x = 10; + this.userlabel2.y = this.userlabel1.y + 20; + this.value2.x = 65; + this.value2.y = this.userlabel2.y; + this.userlabel3.x = 130; + this.userlabel3.y = this.userlabel2.y; + this.value3.x = 185; + this.value3.y = this.userlabel2.y; + this.userlabel4.x = 10; + this.userlabel4.y = this.userlabel2.y + 20; + this.value4.x = 50; + this.value4.y = this.userlabel4.y; + this.userlabel5.x = 130; + this.userlabel5.y = this.userlabel4.y; + this.value5.x = 170; + this.value5.y = this.userlabel4.y; + this.loadBodyBg(); + } + + private function clickTab(param1:MouseEvent) : void + { + var _loc2_:UITabBtn = param1.currentTarget as UITabBtn; + if(this.lastTab) + { + if(_loc2_ == this.lastTab) + { + return; + } + this.lastTab.select = false; + } + this.lastTab = _loc2_; + if(this.prePage) + { + this.prePage.visible = false; + } + if(this.lastTab == this.btnArr[0]) + { + this.prePage = this.tab1; + } + if(this.lastTab == this.btnArr[1]) + { + this.prePage = this.tab3; + } + this.prePage.visible = true; + this.lastTab.select = true; + } + + private function loadBodyBg() : void + { + if(this.bodyImg == null) + { + this.loadImg = new LoadResource("pic/king/kingRoleBg.jpg",this.loadImgBack); + } + } + + private function loadImgBack(param1:Event) : void + { + this.bodyImg = param1.target.loader.content; + this.centerBg.addChild(this.bodyImg); + this.bodyImg.width = 137; + this.bodyImg.height = 218; + this.loadImg.clear(); + } + + private function getEquByChildType(param1:int) : Object + { + var _loc2_:Object = null; + if(this.userEquList.length == 0) + { + return null; + } + for each(_loc2_ in this.userEquList) + { + if(_loc2_.childType == param1) + { + return _loc2_; + } + } + return null; + } + + private function setKingEquList() : void + { + var _loc6_:OtherUserEquipBg = null; + var _loc7_:Object = null; + var _loc1_:int = 0; + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:int = 0; + var _loc5_:int = 0; + for each(_loc6_ in this.itemVec) + { + _loc7_ = this.getEquByChildType(_loc6_.type); + _loc6_.setItemObj(_loc7_); + if(_loc7_) + { + switch(_loc7_.effType) + { + case 1: + _loc1_ += int(_loc7_.para1); + break; + case 2: + _loc2_ += int(_loc7_.para1); + _loc3_ += int(_loc7_.para1); + break; + case 3: + _loc4_ += int(_loc7_.para1); + break; + case 4: + _loc5_ += int(_loc7_.para1); + } + } + if(_loc6_.type > 4) + { + this.userEquView.setAsset(_loc6_.type,_loc7_); + } + } + this.value1.text = "+" + _loc1_; + if(_loc5_ == 0) + { + this.value2.text = "0.0%"; + } + else + { + this.value2.text = _loc5_ / 10 + "%"; + } + if(_loc4_ == 0) + { + this.value3.text = "0.0%"; + } + else + { + this.value3.text = _loc4_ / 10 + "%"; + } + this.value4.text = "+" + _loc2_; + this.value5.text = "+" + _loc3_; + } + + private function getMore(param1:MouseEvent) : void + { + if(this.userObj == null) + { + return; + } + this._addImpress_view.visible = true; + this._addImpress_view.listImpress(this.userObj.userId); + } + + override public function addToStage(param1:Event) : void + { + ConnectService.getInstance().addEventListener(MapEvent.getCastleByPos,this.getCastleByPosResult); + ConnectService.getInstance().addEventListener(CombatEvent.Combat_declareWar,this.declareWarResult); + ConnectService.getInstance().addEventListener(BattleEvent.SaveBattleDex,this.saveSucc); + ConnectService.getInstance().addEventListener(FriendEvent.Friend_addFriend,this.addFriendResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_JoinGuild,this.applyJoinGuildResult); + ConnectService.getInstance().addEventListener(GuildEvent.Guild_SendInvitation,this.sendInvitationResult); + ConnectService.getInstance().addEventListener(UserEvent.USER_getUserIdAndCasIdByNameResult,this.getCastleSucc); + if(this._mc1) + { + Utils.applyGray(this._mc1); + Utils.applyGray(this._mc2); + Utils.applyGray(this._mc3); + Utils.applyGray(this._mc7); + Utils.applyGray(this._mc9); + Utils.applyGray(this._mc11); + ToolTipManager.getInstance().setToolTip(this._mc1,new TxtTooltip("未达到:城池达到4级")); + ToolTipManager.getInstance().setToolTip(this._mc2,new TxtTooltip("未达到:千重楼闯过10层")); + ToolTipManager.getInstance().setToolTip(this._mc3,new TxtTooltip("未达到:三晋崛起通关")); + ToolTipManager.getInstance().setToolTip(this._mc7,new TxtTooltip("下一级别:对其他君主攻城胜利次数达到10次")); + ToolTipManager.getInstance().setToolTip(this._mc9,new TxtTooltip("至交好友")); + ToolTipManager.getInstance().setToolTip(this._mc11,new TxtTooltip("未达到:单将楼闯过10层")); + } + } + + override public function removeFromStage(param1:Event) : void + { + ConnectService.getInstance().removeEventListener(MapEvent.getCastleByPos,this.getCastleByPosResult); + ConnectService.getInstance().removeEventListener(CombatEvent.Combat_declareWar,this.declareWarResult); + ConnectService.getInstance().removeEventListener(BattleEvent.SaveBattleDex,this.saveSucc); + ConnectService.getInstance().removeEventListener(FriendEvent.Friend_addFriend,this.addFriendResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_JoinGuild,this.applyJoinGuildResult); + ConnectService.getInstance().removeEventListener(GuildEvent.Guild_SendInvitation,this.sendInvitationResult); + ConnectService.getInstance().removeEventListener(UserEvent.USER_getUserIdAndCasIdByNameResult,this.getCastleSucc); + this.stopTime(); + } + + override public function update(param1:CastleMc) : void + { + this.currCastleMc = param1; + this.currPox = param1.gx; + this.currPoy = param1.gy; + this.getCastleInfo(); + } + + private function getCastleInfo() : void + { + ConnectService.getInstance().mapService.getCastleByPos(this.currPox,this.currPoy); + } + + public function updateByUserName(param1:String) : void + { + this.currCastleMc = null; + this.currName = param1; + ConnectService.getInstance().userService.getUserIdAndCasIdByName(this.currName); + } + + private function getCastleSucc(param1:UserEvent) : void + { + var _loc2_:Object = param1.userObject; + this.currPox = _loc2_.posX; + this.currPoy = _loc2_.posY; + this.getCastleInfo(); + } + + public function refresh() : void + { + this.getCastleInfo(); + } + + private function getCastleByPosResult(param1:MapEvent) : void + { + var _loc7_:int = 0; + var _loc8_:int = 0; + var _loc9_:int = 0; + var _loc10_:String = null; + var _loc11_:int = 0; + var _loc12_:Array = null; + var _loc13_:int = 0; + var _loc14_:int = 0; + var _loc16_:String = null; + var _loc17_:Array = null; + var _loc18_:Sprite = null; + var _loc19_:TextField = null; + var _loc20_:TextFormat = null; + var _loc21_:int = 0; + var _loc22_:BitmapData = null; + var _loc23_:String = null; + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + this.closeUI(null); + return; + } + this.userEquList = param1.data; + var _loc2_:Object = param1.obj; + this.loadUserHomeData(_loc2_.userHomeMap); + this.userEquView.setUserSex(param1.obj.user.sex); + this.setKingEquList(); + if(_loc2_.leagueAttack > 0) + { + } + var _loc3_:String = _loc2_.user.oldName; + if(_loc3_) + { + ToolTipManager.getInstance().setToolTip(this.oldNameBtn,new TxtTooltip(_loc3_)); + } + else + { + ToolTipManager.getInstance().setToolTip(this.oldNameBtn,new TxtTooltip("此玩家还未曾改名")); + } + this._sign_txt.text = _loc2_.user.selfSignature; + var _loc4_:Array = _loc2_.achieve as Array; + var _loc5_:Array = _loc2_.friend as Array; + var _loc6_:* = Math.min(8,_loc5_.length); + var _loc15_:* = new HashMap(); + this._itemContainer.clear(); + if(_loc6_ == 0) + { + this.noBtn.visible = true; + } + else + { + this.noBtn.visible = false; + while(_loc7_ < _loc6_) + { + _loc10_ = _loc5_[_loc7_].content; + _loc11_ = int(_loc5_[_loc7_].num); + _loc12_ = _loc5_[_loc7_].evalutionList; + _loc13_ = (79 + 6) * int(_loc7_ % 5); + _loc14_ = _loc7_ > 4 ? 24 : 1; + _loc8_ = 0; + while(_loc8_ < _loc12_.length) + { + _loc15_.put(_loc12_[_loc8_].friendUserName,"1"); + _loc8_ += 1; + } + _loc17_ = _loc15_.keys(); + _loc16_ = ""; + _loc9_ = 0; + while(_loc9_ < _loc17_.length) + { + _loc16_ += _loc17_[_loc9_]; + if(_loc9_ != _loc17_.length - 1) + { + _loc16_ += "、"; + } + _loc9_ += 1; + } + _loc18_ = new Sprite(); + _loc23_ = _loc7_ >= 9 ? this.colorBg[9] : this.colorBg[_loc7_]; + _loc22_ = face.getPng(_loc23_); + _loc18_.graphics.beginBitmapFill(_loc22_); + _loc18_.graphics.drawRect(0,0,79,19); + _loc18_.graphics.endFill(); + this._itemContainer.addChild(_loc18_); + _loc18_.x = _loc13_; + _loc18_.y = _loc14_; + _loc19_ = new TextField(); + _loc19_.text = _loc10_; + _loc19_.width = 79; + _loc19_.height = 19; + _loc20_ = new TextFormat(); + _loc20_.align = "center"; + _loc19_.setTextFormat(_loc20_); + _loc18_.addChild(_loc19_); + _loc19_.x = -1; + _loc19_.selectable = false; + _loc19_.mouseEnabled = false; + _loc21_ = this._itemContainer.getChildIndex(_loc18_); + ToolTipManager.getInstance().setToolTip(_loc18_,new TxtTooltip("被这样描述 " + _loc11_ + " 次: " + _loc10_)); + _loc7_++; + } + } + this.warStr = String(_loc2_.userRelDesc); + this.userObj = _loc2_.user; + this._userId = _loc2_.user.userId; + this.outBattleSeconds = _loc2_.outBattleSeconds; + this.isGuildWar = _loc2_.isGuildWar; + this.countryMc.gotoAndStop(this.userObj.countryId); + this.loadUserHead(); + var _loc24_:int = int(_loc2_.tianxiaJifen); + var _loc25_:int = Utils.getJifenType(_loc24_); + this.loadTianxiaIg(_loc25_); + this.govMc.gotoAndStop(this.userObj.govId + 1); + this.blabel1.text = this.userObj.userName; + this.casId = _loc2_.casId; + this.blabel4.text = _loc2_.casLv + "级(范围" + _loc2_.cellNum + ")"; + var _loc26_:String = Number(this.userObj.rankIndex) <= 0 ? ServerConfig.RANK_OUT : this.userObj.rankIndex.toString(); + this.blabel7.text = _loc26_; + this.blabel8.text = _loc2_.rangeValue; + this.blabel5.text = this.userObj.rankName; + this.blabel3.text = this.warStr; + var _loc27_:String = ""; + if(_loc2_.guildName != null) + { + _loc27_ = _loc2_.guildName == "无" ? _loc2_.guildName : _loc2_.guildName + "(" + _loc2_.guildFlag + ")"; + this.guildName = _loc2_.guildName; + this.flagName = _loc2_.guildFlag; + } + this.blabel2.text = _loc27_; + var _loc28_:* = _loc2_.posX; + var _loc29_:* = _loc2_.posY; + this.txt_pos.htmlText = "" + this.currPox + "," + this.currPoy + ""; + var _loc30_:* = _loc2_.warStatus; + var _loc31_:Boolean = Boolean(_loc2_.inOneGuild); + var _loc32_:Boolean = Boolean(_loc2_.isSelf); + var _loc33_:int = int(_loc2_.userRelCode); + if(_loc32_ == "true" || _loc32_ == true) + { + this.mine(); + } + else if(_loc31_ == "true" || _loc31_ == true) + { + this.guild(); + } + else + { + this.other(); + if(_loc33_ == 1) + { + this.btn1.setText("宣战"); + this.btn1.onClick = this.callWar; + } + else if(_loc33_ == 2) + { + this.btn1.setText("进攻"); + this.btn1.setUnEnable(); + this.btn1.onClick = this.batCas; + } + else if(_loc33_ == 3) + { + this.btn1.setText("进攻"); + this.btn1.setEnable(); + this.btn1.onClick = this.batCas; + } + else if(_loc33_ == 10) + { + this.btn1.setUnEnable(); + } + } + this.leftTime = _loc2_.remainSeconds; + this.startTime(); + var _loc34_:* = _loc2_.achieve as Array; + var _loc35_:int = 0; + while(_loc35_ < _loc34_.length) + { + switch(_loc34_[_loc35_].achieveSubType) + { + case "castleLevel": + ToolTipManager.getInstance().setToolTip(this._mc1,new TxtTooltip(_loc34_[_loc35_].tip)); + if(_loc34_[_loc35_].level == 0) + { + this._mc1.gotoAndStop(1); + Utils.applyGray(this._mc1); + } + else + { + Utils.applyDefault(this._mc1); + this._mc1.gotoAndStop(_loc34_[_loc35_].level + 1); + } + break; + case "invite": + ToolTipManager.getInstance().setToolTip(this._mc9,new TxtTooltip(_loc34_[_loc35_].tip)); + if(_loc34_[_loc35_].invite == 0) + { + this._mc9.gotoAndStop(1); + Utils.applyGray(this._mc9); + } + else + { + Utils.applyDefault(this._mc9); + this._mc9.gotoAndStop(_loc34_[_loc35_].invite + 1); + } + break; + case "babel": + ToolTipManager.getInstance().setToolTip(this._mc2,new TxtTooltip(_loc34_[_loc35_].tip)); + if(_loc34_[_loc35_].level == 0) + { + this._mc2.gotoAndStop(1); + Utils.applyGray(this._mc2); + } + else + { + Utils.applyDefault(this._mc2); + this._mc2.gotoAndStop(_loc34_[_loc35_].level + 1); + } + break; + case "singlebabel": + ToolTipManager.getInstance().setToolTip(this._mc11,new TxtTooltip(_loc34_[_loc35_].tip)); + if(_loc34_[_loc35_].invite == 0) + { + this._mc11.gotoAndStop(1); + Utils.applyGray(this._mc11); + } + else + { + Utils.applyDefault(this._mc11); + this._mc11.gotoAndStop(_loc34_[_loc35_].level + 1); + } + break; + case "heroBabel": + ToolTipManager.getInstance().setToolTip(this._mc3,new TxtTooltip(_loc34_[_loc35_].tip)); + if(_loc34_[_loc35_].level == 0) + { + this._mc1.gotoAndStop(1); + Utils.applyGray(this._mc3); + } + else + { + Utils.applyDefault(this._mc3); + this._mc3.gotoAndStop(_loc34_[_loc35_].level + 1); + } + break; + case "pvpWin": + ToolTipManager.getInstance().setToolTip(this._mc7,new TxtTooltip(_loc34_[_loc35_].tip)); + if(_loc34_[_loc35_].level == 0) + { + this._mc7.gotoAndStop(1); + Utils.applyGray(this._mc7); + } + else + { + Utils.applyDefault(this._mc7); + this._mc7.gotoAndStop(_loc34_[_loc35_].level + 1); + } + } + _loc35_++; + } + } + + private function loadTianxiaIg(param1:int) : void + { + this.loadTianxiaImg = new LoadResource("pic/bg/tianxia_" + param1 + ".png",this.loadTianxiaImgBack); + } + + private function loadTianxiaImgBack(param1:Event) : void + { + if(Boolean(this.tianxiaImg) && this.tab1.contains(this.tianxiaImg)) + { + this.tab1.removeChild(this.tianxiaImg); + } + this.tianxiaImg = param1.target.loader.content; + this.tab1.addChild(this.tianxiaImg); + this.tianxiaImg.x = 70; + this.tianxiaImg.y = 6; + this.loadTianxiaImg.clear(); + } + + private function startTime() : void + { + if(this.leftTime <= 0) + { + return; + } + if(this.timer == null) + { + this.timer = new Timer(1000); + this.timer.addEventListener(TimerEvent.TIMER,this.enterFrame); + } + if(!this.timer.running) + { + this.timer.start(); + } + } + + private function enterFrame(param1:TimerEvent) : void + { + --this.leftTime; + this.blabel3.text = this.warStr + " " + PublicMethod.getTime(this.leftTime); + if(this.leftTime <= 0) + { + this.stopTime(); + this.getCastleInfo(); + } + } + + private function stopTime() : void + { + if(this.timer) + { + this.timer.stop(); + this.timer.removeEventListener(TimerEvent.TIMER,this.enterFrame); + this.timer = null; + } + } + + private function batCas(param1:MouseEvent) : void + { + var _loc2_:SoldierFirstView = SoldierFirstView.getInstance(); + _loc2_.killArmy(this.userObj.userName,this.currPox,this.currPoy); + _loc2_.show(); + this.disappear(); + } + + private function loadUserHead() : void + { + if(this.userObj == null) + { + return; + } + if(this.userObj.icon == this.preUrl) + { + return; + } + this.preUrl = this.userObj.icon; + this.atkHeadLoad = new LoadResource(ServerConfig.IMAGE_HEAD_URL + this.userObj.icon,this.loadHeadBack); + } + + private function loadHeadBack(param1:Event) : void + { + if(Boolean(this.userHeadImg) && this.headBor.contains(this.userHeadImg)) + { + this.headBor.removeChild(this.userHeadImg); + } + this.userHeadImg = Bitmap(param1.target.loader.content); + this.atkHeadLoad.clear(); + this.headBor.addChild(this.userHeadImg); + this.userHeadImg.x = 2; + this.userHeadImg.y = 2; + this.userHeadImg.width = 95; + this.userHeadImg.height = 95; + } + + override public function show() : void + { + if(!face.stage.contains(this)) + { + face.stage.addChild(this); + } + this.setPosition(); + } + + override public function setPosition() : void + { + x = int(face.realWidth / 2 - width / 2); + y = int(face.realHeight / 2 - height / 2); + } + + override public function closeUI(param1:MouseEvent) : void + { + this.disappear(); + } + + override public function disappear() : void + { + this._addImpress_view.clear(); + if(this.parent != null && parent.contains(this)) + { + this.parent.removeChild(this); + GC.clear(); + } + } + + private function mine() : void + { + this.btn6.visible = false; + this.btn1.setText("进入"); + this.btn2.setText("派遣"); + this.btn3.setText("计策"); + this.btn4.setText("迁城"); + this.btn1.onClick = this.intoCas; + this.btn3.setUnEnable(); + } + + private function guild() : void + { + this.other(); + this.btn1.setText("增援"); + this.btn1.onClick = this.sendCas; + } + + private function intoCas(param1:MouseEvent) : void + { + face.toTown(); + this.disappear(); + } + + private function getGuildFlag() : String + { + if(NewUserData.getNewGuild()) + { + return NewUserData.getNewGuild().flag; + } + return null; + } + + private function other() : void + { + this.btn1.setText("宣战"); + this.btn2.setText("计策"); + this.btn3.setText("收藏"); + this.btn4.setText("好友"); + this.btn1.onClick = this.callWar; + this.btn3.onClick = this.saveCas; + this.btn4.onClick = this.addFriend; + this.btn5.onClick = this.enterOtherFarm; + if(this.flagName == "" && this.getGuildFlag() == null || this.flagName != "" && this.getGuildFlag() != null) + { + this.btn6.visible = false; + } + else if(this.getGuildFlag() == null && this.flagName != "") + { + this.btn6.visible = true; + this.btn6.setText("申请入盟"); + this.btn6.onClick = this.applyJoinGuild; + } + else if(this.getGuildFlag() != null && this.flagName == "") + { + this.btn6.visible = true; + this.btn6.setText("邀请入盟"); + this.btn6.onClick = this.sendInvitation; + } + } + + private function sendCas(param1:MouseEvent) : void + { + var _loc2_:SoldierFirstView = SoldierFirstView.getInstance(); + _loc2_.sendArmy(this.userObj.userName,this.currPox,this.currPoy); + _loc2_.show(); + this.disappear(); + } + + private function callWar(param1:MouseEvent) : void + { + ConnectService.getInstance().combatService.declareWar(this.casId); + } + + private function declareWarResult(param1:CombatEvent) : void + { + if(param1.result == ReturnBean.STATUS_4) + { + MessageBoxUI.getInstance().addMessage(param1.msg); + return; + } + if(World.instance != null) + { + World.getInstance().refreshCastle(); + } + MessageBoxUI.getInstance().addMessage("宣战成功"); + this.disappear(); + } + + private function saveCas(param1:MouseEvent) : void + { + ConnectService.getInstance().battleService.saveBattleDex(this.currPox,this.currPoy); + } + + private function saveSucc(param1:BattleEvent) : void + { + MessageBoxUI.getInstance().addMessage("操作成功"); + this.disappear(); + } + + private function addFriend(param1:MouseEvent) : void + { + ConnectService.getInstance().friendService.addFriend(this.userObj.userName); + } + + private function addFriendResult(param1:FriendEvent) : void + { + MessageBoxUI.getInstance().addMessage("申请成功,等待对方确认"); + this.disappear(); + } + + private function enterOtherFarm(param1:MouseEvent) : void + { + this.enterFarm(this._userId); + } + + private function enterFarm(param1:int) : void + { + var _loc2_:LinkEvent = null; + if(DataModoule.getInstance().userMgr.castle.status == 1) + { + MessageBoxUI.getInstance().addMessage("您的城池已进入流亡状态"); + } + else + { + _loc2_ = new LinkEvent(); + _loc2_.id = param1.toString(); + _loc2_.eventType = "enterFarm"; + EventUtils.getInstance().dispatchEvent(_loc2_); + } + } + + private function applyJoinGuild(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.applyJoinGuildByName(this.guildName); + } + + private function applyJoinGuildResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("申请信息已发送"); + } + + private function sendInvitation(param1:MouseEvent) : void + { + ConnectService.getInstance().guildService.sendInvitation(this.userObj.userName); + } + + private function sendInvitationResult(param1:GuildEvent) : void + { + MessageBoxUI.getInstance().addMessage("邀请信息已发送"); + } + + private function linkeventhandler(param1:TextEvent) : void + { + var _loc2_:Array = param1.text.split(","); + var _loc3_:LinkEvent = new LinkEvent(); + _loc3_.id = "map"; + _loc3_.eventType = "map"; + _loc3_.data = _loc2_; + EventUtils.getInstance().dispatchEvent(_loc3_); + } + } +} + diff --git a/flash_decompiled/fl/containers/BaseScrollPane.as b/flash_decompiled/fl/containers/BaseScrollPane.as new file mode 100644 index 0000000..b6bc6fe --- /dev/null +++ b/flash_decompiled/fl/containers/BaseScrollPane.as @@ -0,0 +1,440 @@ +package fl.containers +{ + import fl.controls.ScrollBar; + import fl.controls.ScrollBarDirection; + import fl.controls.ScrollPolicy; + import fl.core.InvalidationType; + import fl.core.UIComponent; + import fl.events.ScrollEvent; + import flash.display.DisplayObject; + import flash.display.Graphics; + import flash.display.Shape; + import flash.events.MouseEvent; + import flash.geom.Rectangle; + + public class BaseScrollPane extends UIComponent + { + + private static var defaultStyles:Object = { + "repeatDelay":500, + "repeatInterval":35, + "skin":"ScrollPane_upSkin", + "contentPadding":0, + "disabledAlpha":0.5 + }; + + protected static const SCROLL_BAR_STYLES:Object = { + "upArrowDisabledSkin":"upArrowDisabledSkin", + "upArrowDownSkin":"upArrowDownSkin", + "upArrowOverSkin":"upArrowOverSkin", + "upArrowUpSkin":"upArrowUpSkin", + "downArrowDisabledSkin":"downArrowDisabledSkin", + "downArrowDownSkin":"downArrowDownSkin", + "downArrowOverSkin":"downArrowOverSkin", + "downArrowUpSkin":"downArrowUpSkin", + "thumbDisabledSkin":"thumbDisabledSkin", + "thumbDownSkin":"thumbDownSkin", + "thumbOverSkin":"thumbOverSkin", + "thumbUpSkin":"thumbUpSkin", + "thumbIcon":"thumbIcon", + "trackDisabledSkin":"trackDisabledSkin", + "trackDownSkin":"trackDownSkin", + "trackOverSkin":"trackOverSkin", + "trackUpSkin":"trackUpSkin", + "repeatDelay":"repeatDelay", + "repeatInterval":"repeatInterval" + }; + + protected var defaultLineScrollSize:Number = 4; + + protected var _maxHorizontalScrollPosition:Number = 0; + + protected var vScrollBar:Boolean; + + protected var disabledOverlay:Shape; + + protected var hScrollBar:Boolean; + + protected var availableWidth:Number; + + protected var _verticalPageScrollSize:Number = 0; + + protected var vOffset:Number = 0; + + protected var _verticalScrollBar:ScrollBar; + + protected var useFixedHorizontalScrolling:Boolean = false; + + protected var contentWidth:Number = 0; + + protected var contentHeight:Number = 0; + + protected var _horizontalPageScrollSize:Number = 0; + + protected var background:DisplayObject; + + protected var _useBitmpScrolling:Boolean = false; + + protected var contentPadding:Number = 0; + + protected var availableHeight:Number; + + protected var _horizontalScrollBar:ScrollBar; + + protected var contentScrollRect:Rectangle; + + protected var _horizontalScrollPolicy:String; + + protected var _verticalScrollPolicy:String; + + public function BaseScrollPane() + { + super(); + } + + public static function getStyleDefinition() : Object + { + return mergeStyles(defaultStyles,ScrollBar.getStyleDefinition()); + } + + protected function handleWheel(param1:MouseEvent) : void + { + if(!enabled || !_verticalScrollBar.visible || contentHeight <= availableHeight) + { + return; + } + _verticalScrollBar.scrollPosition -= param1.delta * verticalLineScrollSize; + setVerticalScrollPosition(_verticalScrollBar.scrollPosition); + dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL,param1.delta,horizontalScrollPosition)); + } + + public function get verticalScrollPosition() : Number + { + return _verticalScrollBar.scrollPosition; + } + + protected function drawDisabledOverlay() : void + { + if(enabled) + { + if(contains(disabledOverlay)) + { + removeChild(disabledOverlay); + } + } + else + { + disabledOverlay.x = disabledOverlay.y = contentPadding; + disabledOverlay.width = availableWidth; + disabledOverlay.height = availableHeight; + disabledOverlay.alpha = getStyleValue("disabledAlpha") as Number; + addChild(disabledOverlay); + } + } + + public function set verticalScrollPosition(param1:Number) : void + { + drawNow(); + _verticalScrollBar.scrollPosition = param1; + setVerticalScrollPosition(_verticalScrollBar.scrollPosition,false); + } + + protected function setContentSize(param1:Number, param2:Number) : void + { + if((contentWidth == param1 || useFixedHorizontalScrolling) && contentHeight == param2) + { + return; + } + contentWidth = param1; + contentHeight = param2; + invalidate(InvalidationType.SIZE); + } + + public function get horizontalScrollPosition() : Number + { + return _horizontalScrollBar.scrollPosition; + } + + public function get horizontalScrollBar() : ScrollBar + { + return _horizontalScrollBar; + } + + override public function set enabled(param1:Boolean) : void + { + if(enabled == param1) + { + return; + } + _verticalScrollBar.enabled = param1; + _horizontalScrollBar.enabled = param1; + super.enabled = param1; + } + + public function get verticalLineScrollSize() : Number + { + return _verticalScrollBar.lineScrollSize; + } + + public function get horizontalScrollPolicy() : String + { + return _horizontalScrollPolicy; + } + + protected function calculateAvailableSize() : void + { + var _loc1_:Number = NaN; + var _loc2_:Number = NaN; + var _loc3_:Number = NaN; + var _loc4_:Number = NaN; + var _loc5_:Number = NaN; + _loc1_ = ScrollBar.WIDTH; + _loc2_ = contentPadding = Number(getStyleValue("contentPadding")); + _loc3_ = height - 2 * _loc2_ - vOffset; + vScrollBar = _verticalScrollPolicy == ScrollPolicy.ON || _verticalScrollPolicy == ScrollPolicy.AUTO && contentHeight > _loc3_; + _loc4_ = width - (vScrollBar ? _loc1_ : 0) - 2 * _loc2_; + _loc5_ = useFixedHorizontalScrolling ? _maxHorizontalScrollPosition : contentWidth - _loc4_; + hScrollBar = _horizontalScrollPolicy == ScrollPolicy.ON || _horizontalScrollPolicy == ScrollPolicy.AUTO && _loc5_ > 0; + if(hScrollBar) + { + _loc3_ -= _loc1_; + } + if(hScrollBar && !vScrollBar && _verticalScrollPolicy == ScrollPolicy.AUTO && contentHeight > _loc3_) + { + vScrollBar = true; + _loc4_ -= _loc1_; + } + availableHeight = _loc3_ + vOffset; + availableWidth = _loc4_; + } + + public function get maxVerticalScrollPosition() : Number + { + drawNow(); + return Math.max(0,contentHeight - availableHeight); + } + + public function set horizontalScrollPosition(param1:Number) : void + { + drawNow(); + _horizontalScrollBar.scrollPosition = param1; + setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition,false); + } + + public function get horizontalLineScrollSize() : Number + { + return _horizontalScrollBar.lineScrollSize; + } + + public function set verticalPageScrollSize(param1:Number) : void + { + _verticalPageScrollSize = param1; + invalidate(InvalidationType.SIZE); + } + + public function get verticalScrollPolicy() : String + { + return _verticalScrollPolicy; + } + + protected function setHorizontalScrollPosition(param1:Number, param2:Boolean = false) : void + { + } + + public function get useBitmapScrolling() : Boolean + { + return _useBitmpScrolling; + } + + protected function handleScroll(param1:ScrollEvent) : void + { + if(param1.target == _verticalScrollBar) + { + setVerticalScrollPosition(param1.position); + } + else + { + setHorizontalScrollPosition(param1.position); + } + } + + public function set verticalLineScrollSize(param1:Number) : void + { + _verticalScrollBar.lineScrollSize = param1; + } + + public function get verticalScrollBar() : ScrollBar + { + return _verticalScrollBar; + } + + protected function setVerticalScrollPosition(param1:Number, param2:Boolean = false) : void + { + } + + public function set horizontalPageScrollSize(param1:Number) : void + { + _horizontalPageScrollSize = param1; + invalidate(InvalidationType.SIZE); + } + + override protected function draw() : void + { + if(isInvalid(InvalidationType.STYLES)) + { + setStyles(); + drawBackground(); + if(contentPadding != getStyleValue("contentPadding")) + { + invalidate(InvalidationType.SIZE,false); + } + } + if(isInvalid(InvalidationType.SIZE,InvalidationType.STATE)) + { + drawLayout(); + } + updateChildren(); + super.draw(); + } + + public function set horizontalScrollPolicy(param1:String) : void + { + _horizontalScrollPolicy = param1; + invalidate(InvalidationType.SIZE); + } + + override protected function configUI() : void + { + var _loc1_:Graphics = null; + super.configUI(); + contentScrollRect = new Rectangle(0,0,85,85); + _verticalScrollBar = new ScrollBar(); + _verticalScrollBar.addEventListener(ScrollEvent.SCROLL,handleScroll,false,0,true); + _verticalScrollBar.visible = false; + _verticalScrollBar.lineScrollSize = defaultLineScrollSize; + addChild(_verticalScrollBar); + copyStylesToChild(_verticalScrollBar,SCROLL_BAR_STYLES); + _horizontalScrollBar = new ScrollBar(); + _horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL; + _horizontalScrollBar.addEventListener(ScrollEvent.SCROLL,handleScroll,false,0,true); + _horizontalScrollBar.visible = false; + _horizontalScrollBar.lineScrollSize = defaultLineScrollSize; + addChild(_horizontalScrollBar); + copyStylesToChild(_horizontalScrollBar,SCROLL_BAR_STYLES); + disabledOverlay = new Shape(); + _loc1_ = disabledOverlay.graphics; + _loc1_.beginFill(16777215); + _loc1_.drawRect(0,0,width,height); + _loc1_.endFill(); + addEventListener(MouseEvent.MOUSE_WHEEL,handleWheel,false,0,true); + } + + protected function calculateContentWidth() : void + { + } + + public function get verticalPageScrollSize() : Number + { + if(isNaN(availableHeight)) + { + drawNow(); + } + return _verticalPageScrollSize == 0 && !isNaN(availableHeight) ? availableHeight : _verticalPageScrollSize; + } + + protected function drawLayout() : void + { + calculateAvailableSize(); + calculateContentWidth(); + background.width = width; + background.height = height; + if(vScrollBar) + { + _verticalScrollBar.visible = true; + _verticalScrollBar.x = width - ScrollBar.WIDTH - contentPadding; + _verticalScrollBar.y = contentPadding; + _verticalScrollBar.height = availableHeight; + } + else + { + _verticalScrollBar.visible = false; + } + _verticalScrollBar.setScrollProperties(availableHeight,0,contentHeight - availableHeight,verticalPageScrollSize); + setVerticalScrollPosition(_verticalScrollBar.scrollPosition,false); + if(hScrollBar) + { + _horizontalScrollBar.visible = true; + _horizontalScrollBar.x = contentPadding; + _horizontalScrollBar.y = height - ScrollBar.WIDTH - contentPadding; + _horizontalScrollBar.width = availableWidth; + } + else + { + _horizontalScrollBar.visible = false; + } + _horizontalScrollBar.setScrollProperties(availableWidth,0,useFixedHorizontalScrolling ? _maxHorizontalScrollPosition : contentWidth - availableWidth,horizontalPageScrollSize); + setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition,false); + drawDisabledOverlay(); + } + + protected function drawBackground() : void + { + var _loc1_:DisplayObject = null; + _loc1_ = background; + background = getDisplayObjectInstance(getStyleValue("skin")); + background.width = width; + background.height = height; + addChildAt(background,0); + if(_loc1_ != null && _loc1_ != background) + { + removeChild(_loc1_); + } + } + + public function set horizontalLineScrollSize(param1:Number) : void + { + _horizontalScrollBar.lineScrollSize = param1; + } + + public function get horizontalPageScrollSize() : Number + { + if(isNaN(availableWidth)) + { + drawNow(); + } + return _horizontalPageScrollSize == 0 && !isNaN(availableWidth) ? availableWidth : _horizontalPageScrollSize; + } + + public function get maxHorizontalScrollPosition() : Number + { + drawNow(); + return Math.max(0,contentWidth - availableWidth); + } + + protected function setStyles() : void + { + copyStylesToChild(_verticalScrollBar,SCROLL_BAR_STYLES); + copyStylesToChild(_horizontalScrollBar,SCROLL_BAR_STYLES); + } + + protected function updateChildren() : void + { + _verticalScrollBar.enabled = _horizontalScrollBar.enabled = enabled; + _verticalScrollBar.drawNow(); + _horizontalScrollBar.drawNow(); + } + + public function set verticalScrollPolicy(param1:String) : void + { + _verticalScrollPolicy = param1; + invalidate(InvalidationType.SIZE); + } + + public function set useBitmapScrolling(param1:Boolean) : void + { + _useBitmpScrolling = param1; + invalidate(InvalidationType.STATE); + } + } +} + diff --git a/flash_decompiled/fl/containers/ScrollPane.as b/flash_decompiled/fl/containers/ScrollPane.as new file mode 100644 index 0000000..cf1c007 --- /dev/null +++ b/flash_decompiled/fl/containers/ScrollPane.as @@ -0,0 +1,368 @@ +package fl.containers +{ + import fl.controls.ScrollPolicy; + import fl.core.InvalidationType; + import fl.events.ScrollEvent; + import fl.managers.IFocusManagerComponent; + import flash.display.DisplayObject; + import flash.display.Loader; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.events.ProgressEvent; + import flash.net.URLRequest; + import flash.system.ApplicationDomain; + import flash.system.LoaderContext; + import flash.ui.Keyboard; + + [Embed(source="/_assets/assets.swf", symbol="symbol43")] + public class ScrollPane extends BaseScrollPane implements IFocusManagerComponent + { + + private static var defaultStyles:Object = { + "upSkin":"ScrollPane_upSkin", + "disabledSkin":"ScrollPane_disabledSkin", + "focusRectSkin":null, + "focusRectPadding":null, + "contentPadding":0 + }; + + protected var scrollDragHPos:Number; + + protected var loader:Loader; + + protected var yOffset:Number; + + protected var currentContent:Object; + + protected var xOffset:Number; + + protected var _source:Object = ""; + + protected var scrollDragVPos:Number; + + protected var _scrollDrag:Boolean = false; + + protected var contentClip:Sprite; + + public function ScrollPane() + { + super(); + } + + public static function getStyleDefinition() : Object + { + return mergeStyles(defaultStyles,BaseScrollPane.getStyleDefinition()); + } + + public function get source() : Object + { + return _source; + } + + public function set source(param1:Object) : void + { + var _loc2_:* = undefined; + clearContent(); + if(isLivePreview) + { + return; + } + _source = param1; + if(_source == "" || _source == null) + { + return; + } + currentContent = getDisplayObjectInstance(param1); + if(currentContent != null) + { + _loc2_ = contentClip.addChild(currentContent as DisplayObject); + dispatchEvent(new Event(Event.INIT)); + update(); + } + else + { + load(new URLRequest(_source.toString())); + } + } + + public function get bytesLoaded() : Number + { + return loader == null || loader.contentLoaderInfo == null ? 0 : loader.contentLoaderInfo.bytesLoaded; + } + + protected function doDrag(param1:MouseEvent) : void + { + var _loc2_:* = undefined; + var _loc3_:* = undefined; + _loc2_ = scrollDragVPos - (mouseY - yOffset); + _verticalScrollBar.setScrollPosition(_loc2_); + setVerticalScrollPosition(_verticalScrollBar.scrollPosition,true); + _loc3_ = scrollDragHPos - (mouseX - xOffset); + _horizontalScrollBar.setScrollPosition(_loc3_); + setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition,true); + } + + override protected function keyDownHandler(param1:KeyboardEvent) : void + { + var _loc2_:int = 0; + _loc2_ = calculateAvailableHeight(); + switch(param1.keyCode) + { + case Keyboard.DOWN: + ++verticalScrollPosition; + break; + case Keyboard.UP: + --verticalScrollPosition; + break; + case Keyboard.RIGHT: + ++horizontalScrollPosition; + break; + case Keyboard.LEFT: + --horizontalScrollPosition; + break; + case Keyboard.END: + verticalScrollPosition = maxVerticalScrollPosition; + break; + case Keyboard.HOME: + verticalScrollPosition = 0; + break; + case Keyboard.PAGE_UP: + verticalScrollPosition -= _loc2_; + break; + case Keyboard.PAGE_DOWN: + verticalScrollPosition += _loc2_; + } + } + + protected function doStartDrag(param1:MouseEvent) : void + { + if(!enabled) + { + return; + } + xOffset = mouseX; + yOffset = mouseY; + scrollDragHPos = horizontalScrollPosition; + scrollDragVPos = verticalScrollPosition; + stage.addEventListener(MouseEvent.MOUSE_MOVE,doDrag,false,0,true); + } + + public function get content() : DisplayObject + { + var _loc1_:Object = null; + _loc1_ = currentContent; + if(_loc1_ is URLRequest) + { + _loc1_ = loader.content; + } + return _loc1_ as DisplayObject; + } + + public function get percentLoaded() : Number + { + if(loader != null) + { + return Math.round(bytesLoaded / bytesTotal * 100); + } + return 0; + } + + protected function endDrag(param1:MouseEvent) : void + { + stage.removeEventListener(MouseEvent.MOUSE_MOVE,doDrag); + } + + public function update() : void + { + var _loc1_:DisplayObject = null; + _loc1_ = contentClip.getChildAt(0); + setContentSize(_loc1_.width,_loc1_.height); + } + + override protected function setHorizontalScrollPosition(param1:Number, param2:Boolean = false) : void + { + var _loc3_:* = undefined; + _loc3_ = contentClip.scrollRect; + _loc3_.x = param1; + contentClip.scrollRect = _loc3_; + } + + public function refreshPane() : void + { + if(_source is URLRequest) + { + _source = _source.url; + } + source = _source; + } + + protected function passEvent(param1:Event) : void + { + dispatchEvent(param1); + } + + protected function calculateAvailableHeight() : Number + { + var _loc1_:Number = NaN; + _loc1_ = Number(getStyleValue("contentPadding")); + return height - _loc1_ * 2 - (_horizontalScrollPolicy == ScrollPolicy.ON || _horizontalScrollPolicy == ScrollPolicy.AUTO && _maxHorizontalScrollPosition > 0 ? 15 : 0); + } + + public function load(param1:URLRequest, param2:LoaderContext = null) : void + { + if(param2 == null) + { + param2 = new LoaderContext(false,ApplicationDomain.currentDomain); + } + clearContent(); + initLoader(); + currentContent = _source = param1; + loader.load(param1,param2); + } + + override protected function handleScroll(param1:ScrollEvent) : void + { + passEvent(param1); + super.handleScroll(param1); + } + + override protected function setVerticalScrollPosition(param1:Number, param2:Boolean = false) : void + { + var _loc3_:* = undefined; + _loc3_ = contentClip.scrollRect; + _loc3_.y = param1; + contentClip.scrollRect = _loc3_; + } + + protected function initLoader() : void + { + loader = new Loader(); + loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,passEvent,false,0,true); + loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onContentLoad,false,0,true); + loader.contentLoaderInfo.addEventListener(Event.INIT,passEvent,false,0,true); + contentClip.addChild(loader); + } + + override protected function draw() : void + { + if(isInvalid(InvalidationType.STYLES)) + { + drawBackground(); + } + if(isInvalid(InvalidationType.STATE)) + { + setScrollDrag(); + } + super.draw(); + } + + override protected function configUI() : void + { + super.configUI(); + contentClip = new Sprite(); + addChild(contentClip); + contentClip.scrollRect = contentScrollRect; + _horizontalScrollPolicy = ScrollPolicy.AUTO; + _verticalScrollPolicy = ScrollPolicy.AUTO; + } + + public function set scrollDrag(param1:Boolean) : void + { + _scrollDrag = param1; + invalidate(InvalidationType.STATE); + } + + protected function clearContent() : void + { + if(contentClip.numChildren == 0) + { + return; + } + contentClip.removeChildAt(0); + currentContent = null; + if(loader != null) + { + try + { + loader.close(); + } + catch(e:*) + { + } + try + { + loader.unload(); + } + catch(e:*) + { + } + loader = null; + } + } + + override protected function drawLayout() : void + { + super.drawLayout(); + contentScrollRect = contentClip.scrollRect; + contentScrollRect.width = availableWidth; + contentScrollRect.height = availableHeight; + contentClip.cacheAsBitmap = useBitmapScrolling; + contentClip.scrollRect = contentScrollRect; + contentClip.x = contentClip.y = contentPadding; + } + + override protected function drawBackground() : void + { + var _loc1_:DisplayObject = null; + _loc1_ = background; + background = getDisplayObjectInstance(getStyleValue(enabled ? "upSkin" : "disabledSkin")); + background.width = width; + background.height = height; + addChildAt(background,0); + if(_loc1_ != null && _loc1_ != background) + { + removeChild(_loc1_); + } + } + + public function get bytesTotal() : Number + { + return loader == null || loader.contentLoaderInfo == null ? 0 : loader.contentLoaderInfo.bytesTotal; + } + + protected function onContentLoad(param1:Event) : void + { + var _loc2_:* = undefined; + update(); + _loc2_ = calculateAvailableHeight(); + calculateAvailableSize(); + horizontalScrollBar.setScrollProperties(availableWidth,0,useFixedHorizontalScrolling ? _maxHorizontalScrollPosition : contentWidth - availableWidth,availableWidth); + verticalScrollBar.setScrollProperties(_loc2_,0,contentHeight - _loc2_,_loc2_); + passEvent(param1); + } + + public function get scrollDrag() : Boolean + { + return _scrollDrag; + } + + protected function setScrollDrag() : void + { + if(_scrollDrag) + { + contentClip.addEventListener(MouseEvent.MOUSE_DOWN,doStartDrag,false,0,true); + stage.addEventListener(MouseEvent.MOUSE_UP,endDrag,false,0,true); + } + else + { + contentClip.removeEventListener(MouseEvent.MOUSE_DOWN,doStartDrag); + stage.removeEventListener(MouseEvent.MOUSE_UP,endDrag); + removeEventListener(MouseEvent.MOUSE_MOVE,doDrag); + } + contentClip.buttonMode = _scrollDrag; + } + } +} + diff --git a/flash_decompiled/fl/controls/BaseButton.as b/flash_decompiled/fl/controls/BaseButton.as new file mode 100644 index 0000000..251b903 --- /dev/null +++ b/flash_decompiled/fl/controls/BaseButton.as @@ -0,0 +1,220 @@ +package fl.controls +{ + import fl.core.InvalidationType; + import fl.core.UIComponent; + import fl.events.ComponentEvent; + import flash.display.DisplayObject; + import flash.events.MouseEvent; + import flash.events.TimerEvent; + import flash.utils.Timer; + + public class BaseButton extends UIComponent + { + + private static var defaultStyles:Object = { + "upSkin":"Button_upSkin", + "downSkin":"Button_downSkin", + "overSkin":"Button_overSkin", + "disabledSkin":"Button_disabledSkin", + "selectedDisabledSkin":"Button_selectedDisabledSkin", + "selectedUpSkin":"Button_selectedUpSkin", + "selectedDownSkin":"Button_selectedDownSkin", + "selectedOverSkin":"Button_selectedOverSkin", + "focusRectSkin":null, + "focusRectPadding":null, + "repeatDelay":500, + "repeatInterval":35 + }; + + protected var _selected:Boolean = false; + + private var unlockedMouseState:String; + + protected var pressTimer:Timer; + + protected var mouseState:String; + + protected var background:DisplayObject; + + private var _mouseStateLocked:Boolean = false; + + protected var _autoRepeat:Boolean = false; + + public function BaseButton() + { + super(); + buttonMode = true; + mouseChildren = false; + useHandCursor = false; + setupMouseEvents(); + setMouseState("up"); + pressTimer = new Timer(1,0); + pressTimer.addEventListener(TimerEvent.TIMER,buttonDown,false,0,true); + } + + public static function getStyleDefinition() : Object + { + return defaultStyles; + } + + protected function endPress() : void + { + pressTimer.reset(); + } + + public function set mouseStateLocked(param1:Boolean) : void + { + _mouseStateLocked = param1; + if(param1 == false) + { + setMouseState(unlockedMouseState); + } + else + { + unlockedMouseState = mouseState; + } + } + + public function get autoRepeat() : Boolean + { + return _autoRepeat; + } + + public function set autoRepeat(param1:Boolean) : void + { + _autoRepeat = param1; + } + + override public function set enabled(param1:Boolean) : void + { + super.enabled = param1; + mouseEnabled = param1; + } + + public function get selected() : Boolean + { + return _selected; + } + + protected function mouseEventHandler(param1:MouseEvent) : void + { + if(param1.type == MouseEvent.MOUSE_DOWN) + { + setMouseState("down"); + startPress(); + } + else if(param1.type == MouseEvent.ROLL_OVER || param1.type == MouseEvent.MOUSE_UP) + { + setMouseState("over"); + endPress(); + } + else if(param1.type == MouseEvent.ROLL_OUT) + { + setMouseState("up"); + endPress(); + } + } + + public function setMouseState(param1:String) : void + { + if(_mouseStateLocked) + { + unlockedMouseState = param1; + return; + } + if(mouseState == param1) + { + return; + } + mouseState = param1; + invalidate(InvalidationType.STATE); + } + + protected function startPress() : void + { + if(_autoRepeat) + { + pressTimer.delay = Number(getStyleValue("repeatDelay")); + pressTimer.start(); + } + dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN,true)); + } + + protected function buttonDown(param1:TimerEvent) : void + { + if(!_autoRepeat) + { + endPress(); + return; + } + if(pressTimer.currentCount == 1) + { + pressTimer.delay = Number(getStyleValue("repeatInterval")); + } + dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN,true)); + } + + public function set selected(param1:Boolean) : void + { + if(_selected == param1) + { + return; + } + _selected = param1; + invalidate(InvalidationType.STATE); + } + + override public function get enabled() : Boolean + { + return super.enabled; + } + + override protected function draw() : void + { + if(isInvalid(InvalidationType.STYLES,InvalidationType.STATE)) + { + drawBackground(); + invalidate(InvalidationType.SIZE,false); + } + if(isInvalid(InvalidationType.SIZE)) + { + drawLayout(); + } + super.draw(); + } + + protected function setupMouseEvents() : void + { + addEventListener(MouseEvent.ROLL_OVER,mouseEventHandler,false,0,true); + addEventListener(MouseEvent.MOUSE_DOWN,mouseEventHandler,false,0,true); + addEventListener(MouseEvent.MOUSE_UP,mouseEventHandler,false,0,true); + addEventListener(MouseEvent.ROLL_OUT,mouseEventHandler,false,0,true); + } + + protected function drawLayout() : void + { + background.width = width; + background.height = height; + } + + protected function drawBackground() : void + { + var _loc1_:String = null; + var _loc2_:DisplayObject = null; + _loc1_ = enabled ? mouseState : "disabled"; + if(selected) + { + _loc1_ = "selected" + _loc1_.substr(0,1).toUpperCase() + _loc1_.substr(1); + } + _loc1_ += "Skin"; + _loc2_ = background; + background = getDisplayObjectInstance(getStyleValue(_loc1_)); + addChildAt(background,0); + if(_loc2_ != null && _loc2_ != background) + { + removeChild(_loc2_); + } + } + } +} + diff --git a/flash_decompiled/fl/controls/Button.as b/flash_decompiled/fl/controls/Button.as new file mode 100644 index 0000000..d0970c2 --- /dev/null +++ b/flash_decompiled/fl/controls/Button.as @@ -0,0 +1,116 @@ +package fl.controls +{ + import fl.core.InvalidationType; + import fl.core.UIComponent; + import fl.managers.IFocusManagerComponent; + import flash.display.DisplayObject; + + [Embed(source="/_assets/assets.swf", symbol="symbol97")] + public class Button extends LabelButton implements IFocusManagerComponent + { + + public static var createAccessibilityImplementation:Function; + + private static var defaultStyles:Object = { + "emphasizedSkin":"Button_emphasizedSkin", + "emphasizedPadding":2 + }; + + protected var emphasizedBorder:DisplayObject; + + protected var _emphasized:Boolean = false; + + public function Button() + { + super(); + } + + public static function getStyleDefinition() : Object + { + return UIComponent.mergeStyles(LabelButton.getStyleDefinition(),defaultStyles); + } + + override public function drawFocus(param1:Boolean) : void + { + var _loc2_:Number = NaN; + var _loc3_:* = undefined; + super.drawFocus(param1); + if(param1) + { + _loc2_ = Number(getStyleValue("emphasizedPadding")); + if(_loc2_ < 0 || !_emphasized) + { + _loc2_ = 0; + } + _loc3_ = getStyleValue("focusRectPadding"); + _loc3_ = _loc3_ == null ? 2 : _loc3_; + _loc3_ += _loc2_; + uiFocusRect.x = -_loc3_; + uiFocusRect.y = -_loc3_; + uiFocusRect.width = width + _loc3_ * 2; + uiFocusRect.height = height + _loc3_ * 2; + } + } + + public function set emphasized(param1:Boolean) : void + { + _emphasized = param1; + invalidate(InvalidationType.STYLES); + } + + override protected function draw() : void + { + if(isInvalid(InvalidationType.STYLES) || isInvalid(InvalidationType.SIZE)) + { + drawEmphasized(); + } + super.draw(); + if(emphasizedBorder != null) + { + setChildIndex(emphasizedBorder,numChildren - 1); + } + } + + public function get emphasized() : Boolean + { + return _emphasized; + } + + override protected function initializeAccessibility() : void + { + if(Button.createAccessibilityImplementation != null) + { + Button.createAccessibilityImplementation(this); + } + } + + protected function drawEmphasized() : void + { + var _loc1_:Object = null; + var _loc2_:Number = NaN; + if(emphasizedBorder != null) + { + removeChild(emphasizedBorder); + } + emphasizedBorder = null; + if(!_emphasized) + { + return; + } + _loc1_ = getStyleValue("emphasizedSkin"); + if(_loc1_ != null) + { + emphasizedBorder = getDisplayObjectInstance(_loc1_); + } + if(emphasizedBorder != null) + { + addChildAt(emphasizedBorder,0); + _loc2_ = Number(getStyleValue("emphasizedPadding")); + emphasizedBorder.x = emphasizedBorder.y = -_loc2_; + emphasizedBorder.width = width + _loc2_ * 2; + emphasizedBorder.height = height + _loc2_ * 2; + } + } + } +} + diff --git a/flash_decompiled/fl/controls/ButtonLabelPlacement.as b/flash_decompiled/fl/controls/ButtonLabelPlacement.as new file mode 100644 index 0000000..9531e58 --- /dev/null +++ b/flash_decompiled/fl/controls/ButtonLabelPlacement.as @@ -0,0 +1,20 @@ +package fl.controls +{ + public class ButtonLabelPlacement + { + + public static const BOTTOM:String = "bottom"; + + public static const TOP:String = "top"; + + public static const LEFT:String = "left"; + + public static const RIGHT:String = "right"; + + public function ButtonLabelPlacement() + { + super(); + } + } +} + diff --git a/flash_decompiled/fl/controls/ComboBox.as b/flash_decompiled/fl/controls/ComboBox.as new file mode 100644 index 0000000..feb88b6 --- /dev/null +++ b/flash_decompiled/fl/controls/ComboBox.as @@ -0,0 +1,869 @@ +package fl.controls +{ + import fl.controls.listClasses.ICellRenderer; + import fl.core.InvalidationType; + import fl.core.UIComponent; + import fl.data.DataProvider; + import fl.data.SimpleCollectionItem; + import fl.events.ComponentEvent; + import fl.events.DataChangeEvent; + import fl.events.ListEvent; + import fl.managers.IFocusManagerComponent; + import flash.display.DisplayObject; + import flash.events.Event; + import flash.events.FocusEvent; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.geom.Point; + import flash.text.TextFormat; + import flash.ui.Keyboard; + + [Embed(source="/_assets/assets.swf", symbol="symbol78")] + public class ComboBox extends UIComponent implements IFocusManagerComponent + { + + public static var createAccessibilityImplementation:Function; + + private static var defaultStyles:Object = { + "upSkin":"ComboBox_upSkin", + "downSkin":"ComboBox_downSkin", + "overSkin":"ComboBox_overSkin", + "disabledSkin":"ComboBox_disabledSkin", + "focusRectSkin":null, + "focusRectPadding":null, + "textFormat":null, + "disabledTextFormat":null, + "textPadding":3, + "buttonWidth":24, + "disabledAlpha":null, + "listSkin":null + }; + + protected static const LIST_STYLES:Object = { + "upSkin":"comboListUpSkin", + "overSkin":"comboListOverSkin", + "downSkin":"comobListDownSkin", + "disabledSkin":"comboListDisabledSkin", + "downArrowDisabledSkin":"downArrowDisabledSkin", + "downArrowDownSkin":"downArrowDownSkin", + "downArrowOverSkin":"downArrowOverSkin", + "downArrowUpSkin":"downArrowUpSkin", + "upArrowDisabledSkin":"upArrowDisabledSkin", + "upArrowDownSkin":"upArrowDownSkin", + "upArrowOverSkin":"upArrowOverSkin", + "upArrowUpSkin":"upArrowUpSkin", + "thumbDisabledSkin":"thumbDisabledSkin", + "thumbDownSkin":"thumbDownSkin", + "thumbOverSkin":"thumbOverSkin", + "thumbUpSkin":"thumbUpSkin", + "thumbIcon":"thumbIcon", + "trackDisabledSkin":"trackDisabledSkin", + "trackDownSkin":"trackDownSkin", + "trackOverSkin":"trackOverSkin", + "trackUpSkin":"trackUpSkin", + "repeatDelay":"repeatDelay", + "repeatInterval":"repeatInterval", + "textFormat":"textFormat", + "disabledAlpha":"disabledAlpha", + "skin":"listSkin" + }; + + protected static const BACKGROUND_STYLES:Object = { + "overSkin":"overSkin", + "downSkin":"downSkin", + "upSkin":"upSkin", + "disabledSkin":"disabledSkin", + "repeatInterval":"repeatInterval" + }; + + protected var _dropdownWidth:Number; + + protected var highlightedCell:int = -1; + + protected var _prompt:String; + + protected var isOpen:Boolean = false; + + protected var list:List; + + protected var _rowCount:uint = 5; + + protected var currentIndex:int; + + protected var isKeyDown:Boolean = false; + + protected var _labels:Array; + + protected var background:BaseButton; + + protected var inputField:TextInput; + + protected var listOverIndex:uint; + + protected var editableValue:String; + + protected var _editable:Boolean = false; + + private var collectionItemImport:SimpleCollectionItem; + + public function ComboBox() + { + super(); + } + + public static function getStyleDefinition() : Object + { + return mergeStyles(defaultStyles,List.getStyleDefinition()); + } + + protected function drawList() : void + { + list.rowCount = Math.max(0,Math.min(_rowCount,list.dataProvider.length)); + } + + public function set imeMode(param1:String) : void + { + inputField.imeMode = param1; + } + + public function get dropdown() : List + { + return list; + } + + public function get dropdownWidth() : Number + { + return list.width; + } + + public function sortItemsOn(param1:String, param2:Object = null) : * + { + return list.sortItemsOn(param1,param2); + } + + protected function onEnter(param1:ComponentEvent) : void + { + param1.stopPropagation(); + } + + public function removeItemAt(param1:uint) : void + { + list.removeItemAt(param1); + invalidate(InvalidationType.DATA); + } + + public function open() : void + { + currentIndex = selectedIndex; + if(isOpen || length == 0) + { + return; + } + dispatchEvent(new Event(Event.OPEN)); + isOpen = true; + addEventListener(Event.ENTER_FRAME,addCloseListener,false,0,true); + positionList(); + list.scrollToSelected(); + stage.addChild(list); + } + + public function get selectedItem() : Object + { + return list.selectedItem; + } + + public function set text(param1:String) : void + { + if(!editable) + { + return; + } + inputField.text = param1; + } + + public function get labelField() : String + { + return list.labelField; + } + + override protected function keyDownHandler(param1:KeyboardEvent) : void + { + var _loc2_:int = 0; + var _loc3_:uint = 0; + var _loc4_:Number = NaN; + var _loc5_:int = 0; + isKeyDown = true; + if(param1.ctrlKey) + { + switch(param1.keyCode) + { + case Keyboard.UP: + if(highlightedCell > -1) + { + selectedIndex = highlightedCell; + dispatchEvent(new Event(Event.CHANGE)); + } + close(); + break; + case Keyboard.DOWN: + open(); + } + return; + } + param1.stopPropagation(); + _loc2_ = Math.max(calculateAvailableHeight() / list.rowHeight << 0,1); + _loc3_ = uint(selectedIndex); + _loc4_ = highlightedCell == -1 ? selectedIndex : highlightedCell; + _loc5_ = -1; + switch(param1.keyCode) + { + case Keyboard.SPACE: + if(isOpen) + { + close(); + } + else + { + open(); + } + return; + case Keyboard.ESCAPE: + if(isOpen) + { + if(highlightedCell > -1) + { + selectedIndex = selectedIndex; + } + close(); + } + return; + case Keyboard.UP: + _loc5_ = Math.max(0,_loc4_ - 1); + break; + case Keyboard.DOWN: + _loc5_ = Math.min(length - 1,_loc4_ + 1); + break; + case Keyboard.PAGE_UP: + _loc5_ = Math.max(_loc4_ - _loc2_,0); + break; + case Keyboard.PAGE_DOWN: + _loc5_ = Math.min(_loc4_ + _loc2_,length - 1); + break; + case Keyboard.HOME: + _loc5_ = 0; + break; + case Keyboard.END: + _loc5_ = length - 1; + break; + case Keyboard.ENTER: + if(_editable && highlightedCell == -1) + { + editableValue = inputField.text; + selectedIndex = -1; + } + else if(isOpen && highlightedCell > -1) + { + editableValue = null; + selectedIndex = highlightedCell; + dispatchEvent(new Event(Event.CHANGE)); + } + dispatchEvent(new ComponentEvent(ComponentEvent.ENTER)); + close(); + return; + default: + if(editable) + { + break; + } + _loc5_ = list.getNextIndexAtLetter(String.fromCharCode(param1.keyCode),_loc4_); + } + if(_loc5_ > -1) + { + if(isOpen) + { + highlightCell(_loc5_); + inputField.text = list.itemToLabel(getItemAt(_loc5_)); + } + else + { + highlightCell(); + selectedIndex = _loc5_; + dispatchEvent(new Event(Event.CHANGE)); + } + } + } + + public function set dropdownWidth(param1:Number) : void + { + _dropdownWidth = param1; + invalidate(InvalidationType.SIZE); + } + + public function get editable() : Boolean + { + return _editable; + } + + override protected function focusInHandler(param1:FocusEvent) : void + { + super.focusInHandler(param1); + if(editable) + { + stage.focus = inputField.textField; + } + } + + protected function onStageClick(param1:MouseEvent) : void + { + if(!isOpen) + { + return; + } + if(!contains(param1.target as DisplayObject) && !list.contains(param1.target as DisplayObject)) + { + if(highlightedCell != -1) + { + selectedIndex = highlightedCell; + dispatchEvent(new Event(Event.CHANGE)); + } + close(); + } + } + + protected function handleDataChange(param1:DataChangeEvent) : void + { + invalidate(InvalidationType.DATA); + } + + override protected function keyUpHandler(param1:KeyboardEvent) : void + { + isKeyDown = false; + } + + protected function onListItemUp(param1:MouseEvent) : void + { + var _loc2_:* = undefined; + stage.removeEventListener(MouseEvent.MOUSE_UP,onListItemUp); + if(!(param1.target is ICellRenderer) || !list.contains(param1.target as DisplayObject)) + { + return; + } + editableValue = null; + _loc2_ = selectedIndex; + selectedIndex = param1.target.listData.index; + if(_loc2_ != selectedIndex) + { + dispatchEvent(new Event(Event.CHANGE)); + } + close(); + } + + public function removeAll() : void + { + list.removeAll(); + inputField.text = ""; + invalidate(InvalidationType.DATA); + } + + public function set selectedItem(param1:Object) : void + { + list.selectedItem = param1; + invalidate(InvalidationType.SELECTED); + } + + protected function highlightCell(param1:int = -1) : void + { + var _loc2_:ICellRenderer = null; + if(highlightedCell > -1) + { + _loc2_ = list.itemToCellRenderer(getItemAt(highlightedCell)); + if(_loc2_ != null) + { + _loc2_.setMouseState("up"); + } + } + if(param1 == -1) + { + return; + } + list.scrollToIndex(param1); + list.drawNow(); + _loc2_ = list.itemToCellRenderer(getItemAt(param1)); + if(_loc2_ != null) + { + _loc2_.setMouseState("over"); + highlightedCell = param1; + } + } + + public function itemToLabel(param1:Object) : String + { + if(param1 == null) + { + return ""; + } + return list.itemToLabel(param1); + } + + public function addItemAt(param1:Object, param2:uint) : void + { + list.addItemAt(param1,param2); + invalidate(InvalidationType.DATA); + } + + public function replaceItemAt(param1:Object, param2:uint) : Object + { + return list.replaceItemAt(param1,param2); + } + + protected function showPrompt() : void + { + inputField.text = _prompt; + } + + public function set rowCount(param1:uint) : void + { + _rowCount = param1; + invalidate(InvalidationType.SIZE); + } + + public function get restrict() : String + { + return inputField.restrict; + } + + protected function setEmbedFonts() : void + { + var _loc1_:Object = null; + _loc1_ = getStyleValue("embedFonts"); + if(_loc1_ != null) + { + inputField.textField.embedFonts = _loc1_; + } + } + + public function sortItems(... rest) : * + { + return list.sortItems.apply(list,rest); + } + + public function set labelField(param1:String) : void + { + list.labelField = param1; + invalidate(InvalidationType.DATA); + } + + public function set editable(param1:Boolean) : void + { + _editable = param1; + drawTextField(); + } + + public function set prompt(param1:String) : void + { + if(param1 == "") + { + _prompt = null; + } + else + { + _prompt = param1; + } + invalidate(InvalidationType.STATE); + } + + public function get length() : int + { + return list.length; + } + + protected function drawTextField() : void + { + inputField.setStyle("upSkin",""); + inputField.setStyle("disabledSkin",""); + inputField.enabled = enabled; + inputField.editable = _editable; + inputField.textField.selectable = enabled && _editable; + inputField.mouseEnabled = inputField.mouseChildren = enabled && _editable; + inputField.focusEnabled = false; + if(_editable) + { + inputField.addEventListener(FocusEvent.FOCUS_IN,onInputFieldFocus,false,0,true); + inputField.addEventListener(FocusEvent.FOCUS_OUT,onInputFieldFocusOut,false,0,true); + } + else + { + inputField.removeEventListener(FocusEvent.FOCUS_IN,onInputFieldFocus); + inputField.removeEventListener(FocusEvent.FOCUS_OUT,onInputFieldFocusOut); + } + } + + protected function onInputFieldFocusOut(param1:FocusEvent) : void + { + inputField.removeEventListener(ComponentEvent.ENTER,onEnter); + selectedIndex = selectedIndex; + } + + protected function passEvent(param1:Event) : void + { + dispatchEvent(param1); + } + + public function get imeMode() : String + { + return inputField.imeMode; + } + + public function get labelFunction() : Function + { + return list.labelFunction; + } + + protected function calculateAvailableHeight() : Number + { + var _loc1_:Number = NaN; + _loc1_ = Number(getStyleValue("contentPadding")); + return list.height - _loc1_ * 2; + } + + public function get selectedIndex() : int + { + return list.selectedIndex; + } + + override protected function focusOutHandler(param1:FocusEvent) : void + { + isKeyDown = false; + if(isOpen) + { + if(!param1.relatedObject || !list.contains(param1.relatedObject)) + { + if(highlightedCell != -1 && highlightedCell != selectedIndex) + { + selectedIndex = highlightedCell; + dispatchEvent(new Event(Event.CHANGE)); + } + close(); + } + } + super.focusOutHandler(param1); + } + + public function get selectedLabel() : String + { + if(editableValue != null) + { + return editableValue; + } + if(selectedIndex == -1) + { + return null; + } + return itemToLabel(selectedItem); + } + + public function get text() : String + { + return inputField.text; + } + + protected function onListChange(param1:Event) : void + { + editableValue = null; + dispatchEvent(param1); + invalidate(InvalidationType.SELECTED); + if(isKeyDown) + { + return; + } + close(); + } + + protected function onToggleListVisibility(param1:MouseEvent) : void + { + param1.stopPropagation(); + dispatchEvent(param1); + if(isOpen) + { + close(); + } + else + { + open(); + stage.addEventListener(MouseEvent.MOUSE_UP,onListItemUp,false,0,true); + } + } + + override protected function draw() : void + { + var _loc1_:* = undefined; + _loc1_ = selectedIndex; + if(_loc1_ == -1 && (prompt != null || editable || length == 0)) + { + _loc1_ = Math.max(-1,Math.min(_loc1_,length - 1)); + } + else + { + editableValue = null; + _loc1_ = Math.max(0,Math.min(_loc1_,length - 1)); + } + if(list.selectedIndex != _loc1_) + { + list.selectedIndex = _loc1_; + invalidate(InvalidationType.SELECTED,false); + } + if(isInvalid(InvalidationType.STYLES)) + { + setStyles(); + setEmbedFonts(); + invalidate(InvalidationType.SIZE,false); + } + if(isInvalid(InvalidationType.SIZE,InvalidationType.DATA,InvalidationType.STATE)) + { + drawTextFormat(); + drawLayout(); + invalidate(InvalidationType.DATA); + } + if(isInvalid(InvalidationType.DATA)) + { + drawList(); + invalidate(InvalidationType.SELECTED,true); + } + if(isInvalid(InvalidationType.SELECTED)) + { + if(_loc1_ == -1 && editableValue != null) + { + inputField.text = editableValue; + } + else if(_loc1_ > -1) + { + if(length > 0) + { + inputField.horizontalScrollPosition = 0; + inputField.text = itemToLabel(list.selectedItem); + } + } + else if(_loc1_ == -1 && _prompt != null) + { + showPrompt(); + } + else + { + inputField.text = ""; + } + if(editable && selectedIndex > -1 && stage.focus == inputField.textField) + { + inputField.setSelection(0,inputField.length); + } + } + drawTextField(); + super.draw(); + } + + public function addItem(param1:Object) : void + { + list.addItem(param1); + invalidate(InvalidationType.DATA); + } + + public function get rowCount() : uint + { + return _rowCount; + } + + override protected function configUI() : void + { + super.configUI(); + background = new BaseButton(); + background.focusEnabled = false; + copyStylesToChild(background,BACKGROUND_STYLES); + background.addEventListener(MouseEvent.MOUSE_DOWN,onToggleListVisibility,false,0,true); + addChild(background); + inputField = new TextInput(); + inputField.focusTarget = this as IFocusManagerComponent; + inputField.focusEnabled = false; + inputField.addEventListener(Event.CHANGE,onTextInput,false,0,true); + addChild(inputField); + list = new List(); + list.focusEnabled = false; + copyStylesToChild(list,LIST_STYLES); + list.addEventListener(Event.CHANGE,onListChange,false,0,true); + list.addEventListener(ListEvent.ITEM_CLICK,onListChange,false,0,true); + list.addEventListener(ListEvent.ITEM_ROLL_OUT,passEvent,false,0,true); + list.addEventListener(ListEvent.ITEM_ROLL_OVER,passEvent,false,0,true); + list.verticalScrollBar.addEventListener(Event.SCROLL,passEvent,false,0,true); + } + + protected function positionList() : void + { + var _loc1_:Point = null; + _loc1_ = localToGlobal(new Point(0,0)); + list.x = _loc1_.x; + if(_loc1_.y + height + list.height > stage.stageHeight) + { + list.y = _loc1_.y - list.height; + } + else + { + list.y = _loc1_.y + height; + } + } + + public function get value() : String + { + var _loc1_:Object = null; + if(editableValue != null) + { + return editableValue; + } + _loc1_ = selectedItem; + if(!_editable && _loc1_.data != null) + { + return _loc1_.data; + } + return itemToLabel(_loc1_); + } + + public function get prompt() : String + { + return _prompt; + } + + public function set dataProvider(param1:DataProvider) : void + { + param1.addEventListener(DataChangeEvent.DATA_CHANGE,handleDataChange,false,0,true); + list.dataProvider = param1; + invalidate(InvalidationType.DATA); + } + + public function set restrict(param1:String) : void + { + if(componentInspectorSetting && param1 == "") + { + param1 = null; + } + if(!_editable) + { + return; + } + inputField.restrict = param1; + } + + protected function onTextInput(param1:Event) : void + { + param1.stopPropagation(); + if(!_editable) + { + return; + } + editableValue = inputField.text; + selectedIndex = -1; + dispatchEvent(new Event(Event.CHANGE)); + } + + protected function onInputFieldFocus(param1:FocusEvent) : void + { + inputField.addEventListener(ComponentEvent.ENTER,onEnter,false,0,true); + close(); + } + + public function getItemAt(param1:uint) : Object + { + return list.getItemAt(param1); + } + + override protected function initializeAccessibility() : void + { + if(ComboBox.createAccessibilityImplementation != null) + { + ComboBox.createAccessibilityImplementation(this); + } + } + + protected function drawLayout() : void + { + var _loc1_:Number = NaN; + var _loc2_:Number = NaN; + _loc1_ = getStyleValue("buttonWidth") as Number; + _loc2_ = getStyleValue("textPadding") as Number; + background.setSize(width,height); + inputField.x = inputField.y = _loc2_; + inputField.setSize(width - _loc1_ - _loc2_,height - _loc2_); + list.width = isNaN(_dropdownWidth) ? width : _dropdownWidth; + background.enabled = enabled; + background.drawNow(); + } + + public function removeItem(param1:Object) : Object + { + return list.removeItem(param1); + } + + private function addCloseListener(param1:Event) : * + { + removeEventListener(Event.ENTER_FRAME,addCloseListener); + if(!isOpen) + { + return; + } + stage.addEventListener(MouseEvent.MOUSE_DOWN,onStageClick,false,0,true); + } + + public function get dataProvider() : DataProvider + { + return list.dataProvider; + } + + public function get textField() : TextInput + { + return inputField; + } + + protected function setStyles() : void + { + copyStylesToChild(background,BACKGROUND_STYLES); + copyStylesToChild(list,LIST_STYLES); + } + + public function set labelFunction(param1:Function) : void + { + list.labelFunction = param1; + invalidate(InvalidationType.DATA); + } + + protected function drawTextFormat() : void + { + var _loc1_:TextFormat = null; + _loc1_ = getStyleValue(_enabled ? "textFormat" : "disabledTextFormat") as TextFormat; + if(_loc1_ == null) + { + _loc1_ = new TextFormat(); + } + inputField.textField.defaultTextFormat = _loc1_; + inputField.textField.setTextFormat(_loc1_); + setEmbedFonts(); + } + + public function set selectedIndex(param1:int) : void + { + list.selectedIndex = param1; + highlightCell(); + invalidate(InvalidationType.SELECTED); + } + + public function close() : void + { + highlightCell(); + highlightedCell = -1; + if(!isOpen) + { + return; + } + dispatchEvent(new Event(Event.CLOSE)); + stage.removeEventListener(MouseEvent.MOUSE_DOWN,onStageClick); + isOpen = false; + stage.removeChild(list); + } + } +} + diff --git a/flash_decompiled/fl/controls/LabelButton.as b/flash_decompiled/fl/controls/LabelButton.as new file mode 100644 index 0000000..e465e72 --- /dev/null +++ b/flash_decompiled/fl/controls/LabelButton.as @@ -0,0 +1,333 @@ +package fl.controls +{ + import fl.core.InvalidationType; + import fl.core.UIComponent; + import fl.events.ComponentEvent; + import fl.managers.IFocusManagerComponent; + import flash.display.DisplayObject; + import flash.events.Event; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFieldType; + import flash.text.TextFormat; + import flash.ui.Keyboard; + + public class LabelButton extends BaseButton implements IFocusManagerComponent + { + + public static var createAccessibilityImplementation:Function; + + private static var defaultStyles:Object = { + "icon":null, + "upIcon":null, + "downIcon":null, + "overIcon":null, + "disabledIcon":null, + "selectedDisabledIcon":null, + "selectedUpIcon":null, + "selectedDownIcon":null, + "selectedOverIcon":null, + "textFormat":null, + "disabledTextFormat":null, + "textPadding":5, + "embedFonts":false + }; + + protected var _labelPlacement:String = ButtonLabelPlacement.RIGHT; + + protected var _toggle:Boolean = false; + + protected var icon:DisplayObject; + + protected var oldMouseState:String; + + protected var mode:String = "center"; + + public var textField:TextField; + + protected var _label:String = "Label"; + + public function LabelButton() + { + super(); + } + + public static function getStyleDefinition() : Object + { + return mergeStyles(defaultStyles,BaseButton.getStyleDefinition()); + } + + protected function toggleSelected(param1:MouseEvent) : void + { + selected = !selected; + dispatchEvent(new Event(Event.CHANGE,true)); + } + + public function get labelPlacement() : String + { + return _labelPlacement; + } + + override protected function keyDownHandler(param1:KeyboardEvent) : void + { + if(!enabled) + { + return; + } + if(param1.keyCode == Keyboard.SPACE) + { + if(oldMouseState == null) + { + oldMouseState = mouseState; + } + setMouseState("down"); + startPress(); + } + } + + protected function setEmbedFont() : * + { + var _loc1_:Object = null; + _loc1_ = getStyleValue("embedFonts"); + if(_loc1_ != null) + { + textField.embedFonts = _loc1_; + } + } + + override protected function keyUpHandler(param1:KeyboardEvent) : void + { + if(!enabled) + { + return; + } + if(param1.keyCode == Keyboard.SPACE) + { + setMouseState(oldMouseState); + oldMouseState = null; + endPress(); + dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + } + + override public function get selected() : Boolean + { + return _toggle ? _selected : false; + } + + public function set labelPlacement(param1:String) : void + { + _labelPlacement = param1; + invalidate(InvalidationType.SIZE); + } + + public function set toggle(param1:Boolean) : void + { + if(!param1 && super.selected) + { + selected = false; + } + _toggle = param1; + if(_toggle) + { + addEventListener(MouseEvent.CLICK,toggleSelected,false,0,true); + } + else + { + removeEventListener(MouseEvent.CLICK,toggleSelected); + } + invalidate(InvalidationType.STATE); + } + + public function get label() : String + { + return _label; + } + + override public function set selected(param1:Boolean) : void + { + _selected = param1; + if(_toggle) + { + invalidate(InvalidationType.STATE); + } + } + + override protected function draw() : void + { + if(textField.text != _label) + { + label = _label; + } + if(isInvalid(InvalidationType.STYLES,InvalidationType.STATE)) + { + drawBackground(); + drawIcon(); + drawTextFormat(); + invalidate(InvalidationType.SIZE,false); + } + if(isInvalid(InvalidationType.SIZE)) + { + drawLayout(); + } + if(isInvalid(InvalidationType.SIZE,InvalidationType.STYLES)) + { + if(isFocused && focusManager.showFocusIndicator) + { + drawFocus(true); + } + } + validate(); + } + + public function get toggle() : Boolean + { + return _toggle; + } + + override protected function configUI() : void + { + super.configUI(); + textField = new TextField(); + textField.type = TextFieldType.DYNAMIC; + textField.selectable = false; + addChild(textField); + } + + override protected function drawLayout() : void + { + var _loc1_:Number = NaN; + var _loc2_:String = null; + var _loc3_:Number = NaN; + var _loc4_:Number = NaN; + var _loc5_:Number = NaN; + var _loc6_:Number = NaN; + var _loc7_:Number = NaN; + var _loc8_:Number = NaN; + _loc1_ = Number(getStyleValue("textPadding")); + _loc2_ = icon == null && mode == "center" ? ButtonLabelPlacement.TOP : _labelPlacement; + textField.height = textField.textHeight + 4; + _loc3_ = textField.textWidth + 4; + _loc4_ = textField.textHeight + 4; + _loc5_ = icon == null ? 0 : icon.width + _loc1_; + _loc6_ = icon == null ? 0 : icon.height + _loc1_; + textField.visible = label.length > 0; + if(icon != null) + { + icon.x = Math.round((width - icon.width) / 2); + icon.y = Math.round((height - icon.height) / 2); + } + if(textField.visible == false) + { + textField.width = 0; + textField.height = 0; + } + else if(_loc2_ == ButtonLabelPlacement.BOTTOM || _loc2_ == ButtonLabelPlacement.TOP) + { + _loc7_ = Math.max(0,Math.min(_loc3_,width - 2 * _loc1_)); + if(height - 2 > _loc4_) + { + _loc8_ = _loc4_; + } + else + { + _loc8_ = height - 2; + } + textField.width = _loc3_ = _loc7_; + textField.height = _loc4_ = _loc8_; + textField.x = Math.round((width - _loc3_) / 2); + textField.y = Math.round((height - textField.height - _loc6_) / 2 + (_loc2_ == ButtonLabelPlacement.BOTTOM ? _loc6_ : 0)); + if(icon != null) + { + icon.y = Math.round(_loc2_ == ButtonLabelPlacement.BOTTOM ? textField.y - _loc6_ : textField.y + textField.height + _loc1_); + } + } + else + { + _loc7_ = Math.max(0,Math.min(_loc3_,width - _loc5_ - 2 * _loc1_)); + textField.width = _loc3_ = _loc7_; + textField.x = Math.round((width - _loc3_ - _loc5_) / 2 + (_loc2_ != ButtonLabelPlacement.LEFT ? _loc5_ : 0)); + textField.y = Math.round((height - textField.height) / 2); + if(icon != null) + { + icon.x = Math.round(_loc2_ != ButtonLabelPlacement.LEFT ? textField.x - _loc5_ : textField.x + _loc3_ + _loc1_); + } + } + super.drawLayout(); + } + + override protected function initializeAccessibility() : void + { + if(LabelButton.createAccessibilityImplementation != null) + { + LabelButton.createAccessibilityImplementation(this); + } + } + + protected function drawIcon() : void + { + var _loc1_:DisplayObject = null; + var _loc2_:String = null; + var _loc3_:Object = null; + _loc1_ = icon; + _loc2_ = enabled ? mouseState : "disabled"; + if(selected) + { + _loc2_ = "selected" + _loc2_.substr(0,1).toUpperCase() + _loc2_.substr(1); + } + _loc2_ += "Icon"; + _loc3_ = getStyleValue(_loc2_); + if(_loc3_ == null) + { + _loc3_ = getStyleValue("icon"); + } + if(_loc3_ != null) + { + icon = getDisplayObjectInstance(_loc3_); + } + if(icon != null) + { + addChildAt(icon,1); + } + if(_loc1_ != null && _loc1_ != icon) + { + removeChild(_loc1_); + } + } + + public function set label(param1:String) : void + { + _label = param1; + if(textField.text != _label) + { + textField.text = _label; + dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE)); + } + invalidate(InvalidationType.SIZE); + invalidate(InvalidationType.STYLES); + } + + protected function drawTextFormat() : void + { + var _loc1_:Object = null; + var _loc2_:TextFormat = null; + var _loc3_:TextFormat = null; + _loc1_ = UIComponent.getStyleDefinition(); + _loc2_ = enabled ? _loc1_.defaultTextFormat as TextFormat : _loc1_.defaultDisabledTextFormat as TextFormat; + textField.setTextFormat(_loc2_); + _loc3_ = getStyleValue(enabled ? "textFormat" : "disabledTextFormat") as TextFormat; + if(_loc3_ != null) + { + textField.setTextFormat(_loc3_); + } + else + { + _loc3_ = _loc2_; + } + textField.defaultTextFormat = _loc3_; + setEmbedFont(); + } + } +} + diff --git a/flash_decompiled/fl/controls/List.as b/flash_decompiled/fl/controls/List.as new file mode 100644 index 0000000..14eb1f9 --- /dev/null +++ b/flash_decompiled/fl/controls/List.as @@ -0,0 +1,485 @@ +package fl.controls +{ + import fl.controls.listClasses.ICellRenderer; + import fl.controls.listClasses.ListData; + import fl.core.InvalidationType; + import fl.core.UIComponent; + import fl.managers.IFocusManagerComponent; + import flash.display.DisplayObject; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.geom.Rectangle; + import flash.ui.Keyboard; + import flash.utils.Dictionary; + + [Embed(source="/_assets/assets.swf", symbol="symbol77")] + public class List extends SelectableList implements IFocusManagerComponent + { + + public static var createAccessibilityImplementation:Function; + + private static var defaultStyles:Object = { + "focusRectSkin":null, + "focusRectPadding":null + }; + + protected var _labelField:String = "label"; + + protected var _rowHeight:Number = 20; + + protected var _cellRenderer:Object; + + protected var _iconField:String = "icon"; + + protected var _labelFunction:Function; + + protected var _iconFunction:Function; + + public function List() + { + super(); + } + + public static function getStyleDefinition() : Object + { + return mergeStyles(defaultStyles,SelectableList.getStyleDefinition()); + } + + public function get iconField() : String + { + return _iconField; + } + + protected function doKeySelection(param1:int, param2:Boolean, param3:Boolean) : void + { + var _loc4_:Boolean = false; + var _loc5_:int = 0; + var _loc6_:Array = null; + var _loc7_:int = 0; + var _loc8_:int = 0; + _loc4_ = false; + if(param2) + { + _loc6_ = []; + _loc7_ = lastCaretIndex; + _loc8_ = param1; + if(_loc7_ == -1) + { + _loc7_ = caretIndex != -1 ? caretIndex : param1; + } + if(_loc7_ > _loc8_) + { + _loc8_ = _loc7_; + _loc7_ = param1; + } + _loc5_ = _loc7_; + while(_loc5_ <= _loc8_) + { + _loc6_.push(_loc5_); + _loc5_++; + } + selectedIndices = _loc6_; + caretIndex = param1; + _loc4_ = true; + } + else + { + selectedIndex = param1; + caretIndex = lastCaretIndex = param1; + _loc4_ = true; + } + if(_loc4_) + { + dispatchEvent(new Event(Event.CHANGE)); + } + invalidate(InvalidationType.DATA); + } + + override protected function drawList() : void + { + var _loc1_:Rectangle = null; + var _loc2_:uint = 0; + var _loc3_:uint = 0; + var _loc4_:uint = 0; + var _loc5_:Object = null; + var _loc6_:ICellRenderer = null; + var _loc7_:Dictionary = null; + var _loc8_:Dictionary = null; + var _loc9_:Boolean = false; + var _loc10_:String = null; + var _loc11_:Object = null; + var _loc12_:Sprite = null; + var _loc13_:String = null; + listHolder.x = listHolder.y = contentPadding; + _loc1_ = listHolder.scrollRect; + _loc1_.x = _horizontalScrollPosition; + _loc1_.y = Math.floor(_verticalScrollPosition) % rowHeight; + listHolder.scrollRect = _loc1_; + listHolder.cacheAsBitmap = useBitmapScrolling; + _loc2_ = Math.floor(_verticalScrollPosition / rowHeight); + _loc3_ = Math.min(length,_loc2_ + rowCount + 1); + _loc7_ = renderedItems = new Dictionary(true); + _loc4_ = _loc2_; + while(_loc4_ < _loc3_) + { + _loc7_[_dataProvider.getItemAt(_loc4_)] = true; + _loc4_++; + } + _loc8_ = new Dictionary(true); + while(activeCellRenderers.length > 0) + { + _loc6_ = activeCellRenderers.pop() as ICellRenderer; + _loc5_ = _loc6_.data; + if(_loc7_[_loc5_] == null || invalidItems[_loc5_] == true) + { + availableCellRenderers.push(_loc6_); + } + else + { + _loc8_[_loc5_] = _loc6_; + invalidItems[_loc5_] = true; + } + list.removeChild(_loc6_ as DisplayObject); + } + invalidItems = new Dictionary(true); + _loc4_ = _loc2_; + while(_loc4_ < _loc3_) + { + _loc9_ = false; + _loc5_ = _dataProvider.getItemAt(_loc4_); + if(_loc8_[_loc5_] != null) + { + _loc9_ = true; + _loc6_ = _loc8_[_loc5_]; + delete _loc8_[_loc5_]; + } + else if(availableCellRenderers.length > 0) + { + _loc6_ = availableCellRenderers.pop() as ICellRenderer; + } + else + { + _loc6_ = getDisplayObjectInstance(getStyleValue("cellRenderer")) as ICellRenderer; + _loc12_ = _loc6_ as Sprite; + if(_loc12_ != null) + { + _loc12_.addEventListener(MouseEvent.CLICK,handleCellRendererClick,false,0,true); + _loc12_.addEventListener(MouseEvent.ROLL_OVER,handleCellRendererMouseEvent,false,0,true); + _loc12_.addEventListener(MouseEvent.ROLL_OUT,handleCellRendererMouseEvent,false,0,true); + _loc12_.addEventListener(Event.CHANGE,handleCellRendererChange,false,0,true); + _loc12_.doubleClickEnabled = true; + _loc12_.addEventListener(MouseEvent.DOUBLE_CLICK,handleCellRendererDoubleClick,false,0,true); + if(_loc12_["setStyle"] != null) + { + for(_loc13_ in rendererStyles) + { + _loc12_["setStyle"](_loc13_,rendererStyles[_loc13_]); + } + } + } + } + list.addChild(_loc6_ as Sprite); + activeCellRenderers.push(_loc6_); + _loc6_.y = rowHeight * (_loc4_ - _loc2_); + _loc6_.setSize(availableWidth + _maxHorizontalScrollPosition,rowHeight); + _loc10_ = itemToLabel(_loc5_); + _loc11_ = null; + if(_iconFunction != null) + { + _loc11_ = _iconFunction(_loc5_); + } + else if(_iconField != null) + { + _loc11_ = _loc5_[_iconField]; + } + if(!_loc9_) + { + _loc6_.data = _loc5_; + } + _loc6_.listData = new ListData(_loc10_,_loc11_,this,_loc4_,_loc4_,0); + _loc6_.selected = _selectedIndices.indexOf(_loc4_) != -1; + if(_loc6_ is UIComponent) + { + (_loc6_ as UIComponent).drawNow(); + } + _loc4_++; + } + } + + public function get iconFunction() : Function + { + return _iconFunction; + } + + public function set iconField(param1:String) : void + { + if(param1 == _iconField) + { + return; + } + _iconField = param1; + invalidate(InvalidationType.DATA); + } + + override protected function keyDownHandler(param1:KeyboardEvent) : void + { + var _loc2_:int = 0; + if(!selectable) + { + return; + } + switch(param1.keyCode) + { + case Keyboard.UP: + case Keyboard.DOWN: + case Keyboard.END: + case Keyboard.HOME: + case Keyboard.PAGE_UP: + case Keyboard.PAGE_DOWN: + moveSelectionVertically(param1.keyCode,param1.shiftKey && _allowMultipleSelection,param1.ctrlKey && _allowMultipleSelection); + break; + case Keyboard.LEFT: + case Keyboard.RIGHT: + moveSelectionHorizontally(param1.keyCode,param1.shiftKey && _allowMultipleSelection,param1.ctrlKey && _allowMultipleSelection); + break; + case Keyboard.SPACE: + if(caretIndex == -1) + { + caretIndex = 0; + } + doKeySelection(caretIndex,param1.shiftKey,param1.ctrlKey); + scrollToSelected(); + break; + default: + _loc2_ = getNextIndexAtLetter(String.fromCharCode(param1.keyCode),selectedIndex); + if(_loc2_ > -1) + { + selectedIndex = _loc2_; + scrollToSelected(); + } + } + param1.stopPropagation(); + } + + override public function itemToLabel(param1:Object) : String + { + if(_labelFunction != null) + { + return String(_labelFunction(param1)); + } + return param1[_labelField] != null ? String(param1[_labelField]) : ""; + } + + public function get labelField() : String + { + return _labelField; + } + + override protected function moveSelectionVertically(param1:uint, param2:Boolean, param3:Boolean) : void + { + var _loc4_:int = 0; + var _loc5_:int = 0; + var _loc6_:int = 0; + _loc4_ = Math.max(Math.floor(calculateAvailableHeight() / rowHeight),1); + _loc5_ = -1; + _loc6_ = 0; + switch(param1) + { + case Keyboard.UP: + if(caretIndex > 0) + { + _loc5_ = caretIndex - 1; + } + break; + case Keyboard.DOWN: + if(caretIndex < length - 1) + { + _loc5_ = caretIndex + 1; + } + break; + case Keyboard.PAGE_UP: + if(caretIndex > 0) + { + _loc5_ = Math.max(caretIndex - _loc4_,0); + } + break; + case Keyboard.PAGE_DOWN: + if(caretIndex < length - 1) + { + _loc5_ = Math.min(caretIndex + _loc4_,length - 1); + } + break; + case Keyboard.HOME: + if(caretIndex > 0) + { + _loc5_ = 0; + } + break; + case Keyboard.END: + if(caretIndex < length - 1) + { + _loc5_ = length - 1; + } + } + if(_loc5_ >= 0) + { + doKeySelection(_loc5_,param2,param3); + scrollToSelected(); + } + } + + public function set labelField(param1:String) : void + { + if(param1 == _labelField) + { + return; + } + _labelField = param1; + invalidate(InvalidationType.DATA); + } + + public function set rowCount(param1:uint) : void + { + var _loc2_:Number = NaN; + var _loc3_:Number = NaN; + _loc2_ = Number(getStyleValue("contentPadding")); + _loc3_ = _horizontalScrollPolicy == ScrollPolicy.ON || _horizontalScrollPolicy == ScrollPolicy.AUTO && _maxHorizontalScrollPosition > 0 ? 15 : 0; + height = rowHeight * param1 + 2 * _loc2_ + _loc3_; + } + + override protected function setHorizontalScrollPosition(param1:Number, param2:Boolean = false) : void + { + list.x = -param1; + super.setHorizontalScrollPosition(param1,true); + } + + public function set iconFunction(param1:Function) : void + { + if(_iconFunction == param1) + { + return; + } + _iconFunction = param1; + invalidate(InvalidationType.DATA); + } + + public function get labelFunction() : Function + { + return _labelFunction; + } + + override protected function moveSelectionHorizontally(param1:uint, param2:Boolean, param3:Boolean) : void + { + } + + override protected function setVerticalScrollPosition(param1:Number, param2:Boolean = false) : void + { + invalidate(InvalidationType.SCROLL); + super.setVerticalScrollPosition(param1,true); + } + + protected function calculateAvailableHeight() : Number + { + var _loc1_:Number = NaN; + _loc1_ = Number(getStyleValue("contentPadding")); + return height - _loc1_ * 2 - (_horizontalScrollPolicy == ScrollPolicy.ON || _horizontalScrollPolicy == ScrollPolicy.AUTO && _maxHorizontalScrollPosition > 0 ? 15 : 0); + } + + override protected function draw() : void + { + var _loc1_:Boolean = false; + _loc1_ = contentHeight != rowHeight * length; + contentHeight = rowHeight * length; + if(isInvalid(InvalidationType.STYLES)) + { + setStyles(); + drawBackground(); + if(contentPadding != getStyleValue("contentPadding")) + { + invalidate(InvalidationType.SIZE,false); + } + if(_cellRenderer != getStyleValue("cellRenderer")) + { + _invalidateList(); + _cellRenderer = getStyleValue("cellRenderer"); + } + } + if(isInvalid(InvalidationType.SIZE,InvalidationType.STATE) || _loc1_) + { + drawLayout(); + } + if(isInvalid(InvalidationType.RENDERER_STYLES)) + { + updateRendererStyles(); + } + if(isInvalid(InvalidationType.STYLES,InvalidationType.SIZE,InvalidationType.DATA,InvalidationType.SCROLL,InvalidationType.SELECTED)) + { + drawList(); + } + updateChildren(); + validate(); + } + + override protected function configUI() : void + { + useFixedHorizontalScrolling = true; + _horizontalScrollPolicy = ScrollPolicy.AUTO; + _verticalScrollPolicy = ScrollPolicy.AUTO; + super.configUI(); + } + + override public function get rowCount() : uint + { + return Math.ceil(calculateAvailableHeight() / rowHeight); + } + + override protected function initializeAccessibility() : void + { + if(List.createAccessibilityImplementation != null) + { + List.createAccessibilityImplementation(this); + } + } + + override public function scrollToIndex(param1:int) : void + { + var _loc2_:uint = 0; + var _loc3_:uint = 0; + drawNow(); + _loc2_ = Math.floor((_verticalScrollPosition + availableHeight) / rowHeight) - 1; + _loc3_ = Math.ceil(_verticalScrollPosition / rowHeight); + if(param1 < _loc3_) + { + verticalScrollPosition = param1 * rowHeight; + } + else if(param1 > _loc2_) + { + verticalScrollPosition = (param1 + 1) * rowHeight - availableHeight; + } + } + + public function get rowHeight() : Number + { + return _rowHeight; + } + + public function set labelFunction(param1:Function) : void + { + if(_labelFunction == param1) + { + return; + } + _labelFunction = param1; + invalidate(InvalidationType.DATA); + } + + public function set rowHeight(param1:Number) : void + { + _rowHeight = param1; + invalidate(InvalidationType.SIZE); + } + } +} + diff --git a/flash_decompiled/fl/controls/ScrollBar.as b/flash_decompiled/fl/controls/ScrollBar.as new file mode 100644 index 0000000..248f306 --- /dev/null +++ b/flash_decompiled/fl/controls/ScrollBar.as @@ -0,0 +1,422 @@ +package fl.controls +{ + import fl.core.InvalidationType; + import fl.core.UIComponent; + import fl.events.ComponentEvent; + import fl.events.ScrollEvent; + import flash.events.MouseEvent; + + [Embed(source="/_assets/assets.swf", symbol="symbol33")] + public class ScrollBar extends UIComponent + { + + public static const WIDTH:Number = 15; + + private static var defaultStyles:Object = { + "downArrowDisabledSkin":"ScrollArrowDown_disabledSkin", + "downArrowDownSkin":"ScrollArrowDown_downSkin", + "downArrowOverSkin":"ScrollArrowDown_overSkin", + "downArrowUpSkin":"ScrollArrowDown_upSkin", + "thumbDisabledSkin":"ScrollThumb_upSkin", + "thumbDownSkin":"ScrollThumb_downSkin", + "thumbOverSkin":"ScrollThumb_overSkin", + "thumbUpSkin":"ScrollThumb_upSkin", + "trackDisabledSkin":"ScrollTrack_skin", + "trackDownSkin":"ScrollTrack_skin", + "trackOverSkin":"ScrollTrack_skin", + "trackUpSkin":"ScrollTrack_skin", + "upArrowDisabledSkin":"ScrollArrowUp_disabledSkin", + "upArrowDownSkin":"ScrollArrowUp_downSkin", + "upArrowOverSkin":"ScrollArrowUp_overSkin", + "upArrowUpSkin":"ScrollArrowUp_upSkin", + "thumbIcon":"ScrollBar_thumbIcon", + "repeatDelay":500, + "repeatInterval":35 + }; + + protected static const DOWN_ARROW_STYLES:Object = { + "disabledSkin":"downArrowDisabledSkin", + "downSkin":"downArrowDownSkin", + "overSkin":"downArrowOverSkin", + "upSkin":"downArrowUpSkin", + "repeatDelay":"repeatDelay", + "repeatInterval":"repeatInterval" + }; + + protected static const THUMB_STYLES:Object = { + "disabledSkin":"thumbDisabledSkin", + "downSkin":"thumbDownSkin", + "overSkin":"thumbOverSkin", + "upSkin":"thumbUpSkin", + "icon":"thumbIcon", + "textPadding":0 + }; + + protected static const TRACK_STYLES:Object = { + "disabledSkin":"trackDisabledSkin", + "downSkin":"trackDownSkin", + "overSkin":"trackOverSkin", + "upSkin":"trackUpSkin", + "repeatDelay":"repeatDelay", + "repeatInterval":"repeatInterval" + }; + + protected static const UP_ARROW_STYLES:Object = { + "disabledSkin":"upArrowDisabledSkin", + "downSkin":"upArrowDownSkin", + "overSkin":"upArrowOverSkin", + "upSkin":"upArrowUpSkin", + "repeatDelay":"repeatDelay", + "repeatInterval":"repeatInterval" + }; + + private var _direction:String = ScrollBarDirection.VERTICAL; + + protected var inDrag:Boolean = false; + + protected var upArrow:BaseButton; + + private var _pageScrollSize:Number = 0; + + protected var downArrow:BaseButton; + + private var _pageSize:Number = 10; + + private var thumbScrollOffset:Number; + + private var _maxScrollPosition:Number = 0; + + private var _scrollPosition:Number = 0; + + protected var track:BaseButton; + + private var _minScrollPosition:Number = 0; + + private var _lineScrollSize:Number = 1; + + protected var thumb:LabelButton; + + public function ScrollBar() + { + super(); + setStyles(); + focusEnabled = false; + } + + public static function getStyleDefinition() : Object + { + return defaultStyles; + } + + public function get minScrollPosition() : Number + { + return _minScrollPosition; + } + + public function set minScrollPosition(param1:Number) : void + { + setScrollProperties(_pageSize,param1,_maxScrollPosition); + } + + public function setScrollPosition(param1:Number, param2:Boolean = true) : void + { + var _loc3_:Number = NaN; + _loc3_ = scrollPosition; + _scrollPosition = Math.max(_minScrollPosition,Math.min(_maxScrollPosition,param1)); + if(_loc3_ == _scrollPosition) + { + return; + } + if(param2) + { + dispatchEvent(new ScrollEvent(_direction,scrollPosition - _loc3_,scrollPosition)); + } + updateThumb(); + } + + public function set scrollPosition(param1:Number) : void + { + setScrollPosition(param1,true); + } + + public function get pageScrollSize() : Number + { + return _pageScrollSize == 0 ? _pageSize : _pageScrollSize; + } + + public function set pageSize(param1:Number) : void + { + if(param1 > 0) + { + _pageSize = param1; + } + } + + public function setScrollProperties(param1:Number, param2:Number, param3:Number, param4:Number = 0) : void + { + this.pageSize = param1; + _minScrollPosition = param2; + _maxScrollPosition = param3; + if(param4 >= 0) + { + _pageScrollSize = param4; + } + enabled = _maxScrollPosition > _minScrollPosition; + setScrollPosition(_scrollPosition,false); + updateThumb(); + } + + override public function set enabled(param1:Boolean) : void + { + super.enabled = param1; + downArrow.enabled = track.enabled = thumb.enabled = upArrow.enabled = enabled && _maxScrollPosition > _minScrollPosition; + updateThumb(); + } + + protected function updateThumb() : void + { + var _loc1_:Number = NaN; + _loc1_ = _maxScrollPosition - _minScrollPosition + _pageSize; + if(track.height <= 12 || _maxScrollPosition <= _minScrollPosition || (_loc1_ == 0 || isNaN(_loc1_))) + { + thumb.height = 12; + thumb.visible = false; + } + else + { + thumb.height = Math.max(13,_pageSize / _loc1_ * track.height); + thumb.y = track.y + (track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition)); + thumb.visible = enabled; + } + } + + protected function thumbPressHandler(param1:MouseEvent) : void + { + inDrag = true; + thumbScrollOffset = mouseY - thumb.y; + thumb.mouseStateLocked = true; + mouseChildren = false; + stage.addEventListener(MouseEvent.MOUSE_MOVE,handleThumbDrag,false,0,true); + stage.addEventListener(MouseEvent.MOUSE_UP,thumbReleaseHandler,false,0,true); + } + + protected function thumbReleaseHandler(param1:MouseEvent) : void + { + inDrag = false; + mouseChildren = true; + thumb.mouseStateLocked = false; + stage.removeEventListener(MouseEvent.MOUSE_MOVE,handleThumbDrag); + stage.removeEventListener(MouseEvent.MOUSE_UP,thumbReleaseHandler); + } + + public function set pageScrollSize(param1:Number) : void + { + if(param1 >= 0) + { + _pageScrollSize = param1; + } + } + + protected function handleThumbDrag(param1:MouseEvent) : void + { + var _loc2_:Number = NaN; + _loc2_ = Math.max(0,Math.min(track.height - thumb.height,mouseY - track.y - thumbScrollOffset)); + setScrollPosition(_loc2_ / (track.height - thumb.height) * (_maxScrollPosition - _minScrollPosition) + _minScrollPosition); + } + + public function set direction(param1:String) : void + { + var _loc2_:Boolean = false; + if(_direction == param1) + { + return; + } + _direction = param1; + if(isLivePreview) + { + return; + } + setScaleY(1); + _loc2_ = _direction == ScrollBarDirection.HORIZONTAL; + if(_loc2_ && componentInspectorSetting) + { + if(rotation == 90) + { + return; + } + setScaleX(-1); + rotation = -90; + } + if(!componentInspectorSetting) + { + if(_loc2_ && rotation == 0) + { + rotation = -90; + setScaleX(-1); + } + else if(!_loc2_ && rotation == -90) + { + rotation = 0; + setScaleX(1); + } + } + invalidate(InvalidationType.SIZE); + } + + public function set lineScrollSize(param1:Number) : void + { + if(param1 > 0) + { + _lineScrollSize = param1; + } + } + + override public function get height() : Number + { + return _direction == ScrollBarDirection.HORIZONTAL ? super.width : super.height; + } + + protected function scrollPressHandler(param1:ComponentEvent) : void + { + var _loc2_:Number = NaN; + var _loc3_:Number = NaN; + param1.stopImmediatePropagation(); + if(param1.currentTarget == upArrow) + { + setScrollPosition(_scrollPosition - _lineScrollSize); + } + else if(param1.currentTarget == downArrow) + { + setScrollPosition(_scrollPosition + _lineScrollSize); + } + else + { + _loc2_ = track.mouseY / track.height * (_maxScrollPosition - _minScrollPosition) + _minScrollPosition; + _loc3_ = pageScrollSize == 0 ? pageSize : pageScrollSize; + if(_scrollPosition < _loc2_) + { + setScrollPosition(Math.min(_loc2_,_scrollPosition + _loc3_)); + } + else if(_scrollPosition > _loc2_) + { + setScrollPosition(Math.max(_loc2_,_scrollPosition - _loc3_)); + } + } + } + + public function get pageSize() : Number + { + return _pageSize; + } + + public function set maxScrollPosition(param1:Number) : void + { + setScrollProperties(_pageSize,_minScrollPosition,param1); + } + + public function get scrollPosition() : Number + { + return _scrollPosition; + } + + override public function get enabled() : Boolean + { + return super.enabled; + } + + override protected function draw() : void + { + var _loc1_:Number = NaN; + if(isInvalid(InvalidationType.SIZE)) + { + _loc1_ = super.height; + downArrow.move(0,Math.max(upArrow.height,_loc1_ - downArrow.height)); + track.setSize(WIDTH,Math.max(0,_loc1_ - (downArrow.height + upArrow.height))); + updateThumb(); + } + if(isInvalid(InvalidationType.STYLES,InvalidationType.STATE)) + { + setStyles(); + } + downArrow.drawNow(); + upArrow.drawNow(); + track.drawNow(); + thumb.drawNow(); + validate(); + } + + override protected function configUI() : void + { + super.configUI(); + track = new BaseButton(); + track.move(0,14); + track.useHandCursor = false; + track.autoRepeat = true; + track.focusEnabled = false; + addChild(track); + thumb = new LabelButton(); + thumb.label = ""; + thumb.setSize(WIDTH,15); + thumb.move(0,15); + thumb.focusEnabled = false; + addChild(thumb); + downArrow = new BaseButton(); + downArrow.setSize(WIDTH,14); + downArrow.autoRepeat = true; + downArrow.focusEnabled = false; + addChild(downArrow); + upArrow = new BaseButton(); + upArrow.setSize(WIDTH,14); + upArrow.move(0,0); + upArrow.autoRepeat = true; + upArrow.focusEnabled = false; + addChild(upArrow); + upArrow.addEventListener(ComponentEvent.BUTTON_DOWN,scrollPressHandler,false,0,true); + downArrow.addEventListener(ComponentEvent.BUTTON_DOWN,scrollPressHandler,false,0,true); + track.addEventListener(ComponentEvent.BUTTON_DOWN,scrollPressHandler,false,0,true); + thumb.addEventListener(MouseEvent.MOUSE_DOWN,thumbPressHandler,false,0,true); + enabled = false; + } + + public function get direction() : String + { + return _direction; + } + + public function get lineScrollSize() : Number + { + return _lineScrollSize; + } + + override public function setSize(param1:Number, param2:Number) : void + { + if(_direction == ScrollBarDirection.HORIZONTAL) + { + super.setSize(param2,param1); + } + else + { + super.setSize(param1,param2); + } + } + + public function get maxScrollPosition() : Number + { + return _maxScrollPosition; + } + + override public function get width() : Number + { + return _direction == ScrollBarDirection.HORIZONTAL ? super.height : super.width; + } + + protected function setStyles() : void + { + copyStylesToChild(downArrow,DOWN_ARROW_STYLES); + copyStylesToChild(thumb,THUMB_STYLES); + copyStylesToChild(track,TRACK_STYLES); + copyStylesToChild(upArrow,UP_ARROW_STYLES); + } + } +} + diff --git a/flash_decompiled/fl/controls/ScrollBarDirection.as b/flash_decompiled/fl/controls/ScrollBarDirection.as new file mode 100644 index 0000000..5711348 --- /dev/null +++ b/flash_decompiled/fl/controls/ScrollBarDirection.as @@ -0,0 +1,16 @@ +package fl.controls +{ + public class ScrollBarDirection + { + + public static const VERTICAL:String = "vertical"; + + public static const HORIZONTAL:String = "horizontal"; + + public function ScrollBarDirection() + { + super(); + } + } +} + diff --git a/flash_decompiled/fl/controls/ScrollPolicy.as b/flash_decompiled/fl/controls/ScrollPolicy.as new file mode 100644 index 0000000..bfda039 --- /dev/null +++ b/flash_decompiled/fl/controls/ScrollPolicy.as @@ -0,0 +1,18 @@ +package fl.controls +{ + public class ScrollPolicy + { + + public static const ON:String = "on"; + + public static const AUTO:String = "auto"; + + public static const OFF:String = "off"; + + public function ScrollPolicy() + { + super(); + } + } +} + diff --git a/flash_decompiled/fl/controls/SelectableList.as b/flash_decompiled/fl/controls/SelectableList.as new file mode 100644 index 0000000..462f92b --- /dev/null +++ b/flash_decompiled/fl/controls/SelectableList.as @@ -0,0 +1,747 @@ +package fl.controls +{ + import fl.containers.BaseScrollPane; + import fl.controls.listClasses.CellRenderer; + import fl.controls.listClasses.ICellRenderer; + import fl.core.InvalidationType; + import fl.data.DataProvider; + import fl.data.SimpleCollectionItem; + import fl.events.DataChangeEvent; + import fl.events.DataChangeType; + import fl.events.ListEvent; + import fl.events.ScrollEvent; + import fl.managers.IFocusManagerComponent; + import flash.display.DisplayObject; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.ui.Keyboard; + import flash.utils.Dictionary; + + public class SelectableList extends BaseScrollPane implements IFocusManagerComponent + { + + public static var createAccessibilityImplementation:Function; + + private static var defaultStyles:Object = { + "skin":"List_skin", + "cellRenderer":CellRenderer, + "contentPadding":null, + "disabledAlpha":null + }; + + protected var invalidItems:Dictionary; + + protected var renderedItems:Dictionary; + + protected var listHolder:Sprite; + + protected var _allowMultipleSelection:Boolean = false; + + protected var lastCaretIndex:int = -1; + + protected var _selectedIndices:Array; + + protected var availableCellRenderers:Array; + + protected var list:Sprite; + + protected var caretIndex:int = -1; + + protected var updatedRendererStyles:Object; + + protected var preChangeItems:Array; + + protected var activeCellRenderers:Array; + + protected var rendererStyles:Object; + + protected var _verticalScrollPosition:Number; + + protected var _dataProvider:DataProvider; + + protected var _horizontalScrollPosition:Number; + + private var collectionItemImport:SimpleCollectionItem; + + protected var _selectable:Boolean = true; + + public function SelectableList() + { + super(); + activeCellRenderers = []; + availableCellRenderers = []; + invalidItems = new Dictionary(true); + renderedItems = new Dictionary(true); + _selectedIndices = []; + if(dataProvider == null) + { + dataProvider = new DataProvider(); + } + verticalScrollPolicy = ScrollPolicy.AUTO; + rendererStyles = {}; + updatedRendererStyles = {}; + } + + public static function getStyleDefinition() : Object + { + return mergeStyles(defaultStyles,BaseScrollPane.getStyleDefinition()); + } + + protected function drawList() : void + { + } + + public function set allowMultipleSelection(param1:Boolean) : void + { + if(param1 == _allowMultipleSelection) + { + return; + } + _allowMultipleSelection = param1; + if(!param1 && _selectedIndices.length > 1) + { + _selectedIndices = [_selectedIndices.pop()]; + invalidate(InvalidationType.DATA); + } + } + + public function sortItemsOn(param1:String, param2:Object = null) : * + { + return _dataProvider.sortOn(param1,param2); + } + + public function removeItemAt(param1:uint) : Object + { + return _dataProvider.removeItemAt(param1); + } + + public function get selectedItem() : Object + { + return _selectedIndices.length == 0 ? null : _dataProvider.getItemAt(selectedIndex); + } + + override protected function keyDownHandler(param1:KeyboardEvent) : void + { + if(!selectable) + { + return; + } + switch(param1.keyCode) + { + case Keyboard.UP: + case Keyboard.DOWN: + case Keyboard.END: + case Keyboard.HOME: + case Keyboard.PAGE_UP: + case Keyboard.PAGE_DOWN: + moveSelectionVertically(param1.keyCode,param1.shiftKey && _allowMultipleSelection,param1.ctrlKey && _allowMultipleSelection); + param1.stopPropagation(); + break; + case Keyboard.LEFT: + case Keyboard.RIGHT: + moveSelectionHorizontally(param1.keyCode,param1.shiftKey && _allowMultipleSelection,param1.ctrlKey && _allowMultipleSelection); + param1.stopPropagation(); + } + } + + public function get selectable() : Boolean + { + return _selectable; + } + + public function itemToCellRenderer(param1:Object) : ICellRenderer + { + var _loc2_:* = undefined; + var _loc3_:ICellRenderer = null; + if(param1 != null) + { + for(_loc2_ in activeCellRenderers) + { + _loc3_ = activeCellRenderers[_loc2_] as ICellRenderer; + if(_loc3_.data == param1) + { + return _loc3_; + } + } + } + return null; + } + + public function getNextIndexAtLetter(param1:String, param2:int = -1) : int + { + var _loc3_:int = 0; + var _loc4_:Number = NaN; + var _loc5_:Number = NaN; + var _loc6_:Object = null; + var _loc7_:String = null; + if(length == 0) + { + return -1; + } + param1 = param1.toUpperCase(); + _loc3_ = length - 1; + _loc4_ = 0; + while(_loc4_ < _loc3_) + { + _loc5_ = param2 + 1 + _loc4_; + if(_loc5_ > length - 1) + { + _loc5_ -= length; + } + _loc6_ = getItemAt(_loc5_); + if(_loc6_ == null) + { + break; + } + _loc7_ = itemToLabel(_loc6_); + if(_loc7_ != null) + { + if(_loc7_.charAt(0).toUpperCase() == param1) + { + return _loc5_; + } + } + _loc4_++; + } + return -1; + } + + public function invalidateList() : void + { + _invalidateList(); + invalidate(InvalidationType.DATA); + } + + override public function set enabled(param1:Boolean) : void + { + super.enabled = param1; + list.mouseChildren = _enabled; + } + + public function get selectedIndices() : Array + { + return _selectedIndices.concat(); + } + + public function set selectable(param1:Boolean) : void + { + if(param1 == _selectable) + { + return; + } + if(!param1) + { + selectedIndices = []; + } + _selectable = param1; + } + + public function itemToLabel(param1:Object) : String + { + return param1["label"]; + } + + public function addItemAt(param1:Object, param2:uint) : void + { + _dataProvider.addItemAt(param1,param2); + invalidateList(); + } + + public function replaceItemAt(param1:Object, param2:uint) : Object + { + return _dataProvider.replaceItemAt(param1,param2); + } + + protected function handleDataChange(param1:DataChangeEvent) : void + { + var _loc2_:int = 0; + var _loc3_:int = 0; + var _loc4_:String = null; + var _loc5_:uint = 0; + _loc2_ = int(param1.startIndex); + _loc3_ = int(param1.endIndex); + _loc4_ = param1.changeType; + if(_loc4_ == DataChangeType.INVALIDATE_ALL) + { + clearSelection(); + invalidateList(); + } + else if(_loc4_ == DataChangeType.INVALIDATE) + { + _loc5_ = 0; + while(_loc5_ < param1.items.length) + { + invalidateItem(param1.items[_loc5_]); + _loc5_++; + } + } + else if(_loc4_ == DataChangeType.ADD) + { + _loc5_ = 0; + while(_loc5_ < _selectedIndices.length) + { + if(_selectedIndices[_loc5_] >= _loc2_) + { + _selectedIndices[_loc5_] += _loc2_ - _loc3_; + } + _loc5_++; + } + } + else if(_loc4_ == DataChangeType.REMOVE) + { + _loc5_ = 0; + while(_loc5_ < _selectedIndices.length) + { + if(_selectedIndices[_loc5_] >= _loc2_) + { + if(_selectedIndices[_loc5_] <= _loc3_) + { + delete _selectedIndices[_loc5_]; + } + else + { + _selectedIndices[_loc5_] -= _loc2_ - _loc3_ + 1; + } + } + _loc5_++; + } + } + else if(_loc4_ == DataChangeType.REMOVE_ALL) + { + clearSelection(); + } + else if(_loc4_ != DataChangeType.REPLACE) + { + selectedItems = preChangeItems; + preChangeItems = null; + } + invalidate(InvalidationType.DATA); + } + + protected function _invalidateList() : void + { + availableCellRenderers = []; + while(activeCellRenderers.length > 0) + { + list.removeChild(activeCellRenderers.pop() as DisplayObject); + } + } + + protected function updateRendererStyles() : void + { + var _loc1_:Array = null; + var _loc2_:uint = 0; + var _loc3_:uint = 0; + var _loc4_:String = null; + _loc1_ = availableCellRenderers.concat(activeCellRenderers); + _loc2_ = _loc1_.length; + _loc3_ = 0; + while(_loc3_ < _loc2_) + { + if(_loc1_[_loc3_].setStyle != null) + { + for(_loc4_ in updatedRendererStyles) + { + _loc1_[_loc3_].setStyle(_loc4_,updatedRendererStyles[_loc4_]); + } + _loc1_[_loc3_].drawNow(); + } + _loc3_++; + } + updatedRendererStyles = {}; + } + + public function set selectedItem(param1:Object) : void + { + var _loc2_:int = 0; + _loc2_ = _dataProvider.getItemIndex(param1); + selectedIndex = _loc2_; + } + + public function sortItems(... rest) : * + { + return _dataProvider.sort.apply(_dataProvider,rest); + } + + public function removeAll() : void + { + _dataProvider.removeAll(); + } + + protected function handleCellRendererChange(param1:Event) : void + { + var _loc2_:ICellRenderer = null; + var _loc3_:uint = 0; + _loc2_ = param1.currentTarget as ICellRenderer; + _loc3_ = _loc2_.listData.index; + _dataProvider.invalidateItemAt(_loc3_); + } + + protected function moveSelectionVertically(param1:uint, param2:Boolean, param3:Boolean) : void + { + } + + override protected function setHorizontalScrollPosition(param1:Number, param2:Boolean = false) : void + { + var _loc3_:Number = NaN; + if(param1 == _horizontalScrollPosition) + { + return; + } + _loc3_ = param1 - _horizontalScrollPosition; + _horizontalScrollPosition = param1; + if(param2) + { + dispatchEvent(new ScrollEvent(ScrollBarDirection.HORIZONTAL,_loc3_,param1)); + } + } + + public function scrollToSelected() : void + { + scrollToIndex(selectedIndex); + } + + public function invalidateItem(param1:Object) : void + { + if(renderedItems[param1] == null) + { + return; + } + invalidItems[param1] = true; + invalidate(InvalidationType.DATA); + } + + protected function handleCellRendererClick(param1:MouseEvent) : void + { + var _loc2_:ICellRenderer = null; + var _loc3_:uint = 0; + var _loc4_:int = 0; + var _loc5_:* = 0; + var _loc6_:uint = 0; + if(!_enabled) + { + return; + } + _loc2_ = param1.currentTarget as ICellRenderer; + _loc3_ = _loc2_.listData.index; + if(!dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK,false,true,_loc2_.listData.column,_loc2_.listData.row,_loc3_,_loc2_.data)) || !_selectable) + { + return; + } + _loc4_ = selectedIndices.indexOf(_loc3_); + if(!_allowMultipleSelection) + { + if(_loc4_ != -1) + { + return; + } + _loc2_.selected = true; + _selectedIndices = [_loc3_]; + lastCaretIndex = caretIndex = _loc3_; + } + else if(param1.shiftKey) + { + _loc6_ = _selectedIndices.length > 0 ? uint(_selectedIndices[0]) : _loc3_; + _selectedIndices = []; + if(_loc6_ > _loc3_) + { + _loc5_ = int(_loc6_); + while(_loc5_ >= _loc3_) + { + _selectedIndices.push(_loc5_); + _loc5_--; + } + } + else + { + _loc5_ = int(_loc6_); + while(_loc5_ <= _loc3_) + { + _selectedIndices.push(_loc5_); + _loc5_++; + } + } + caretIndex = _loc3_; + } + else if(param1.ctrlKey) + { + if(_loc4_ != -1) + { + _loc2_.selected = false; + _selectedIndices.splice(_loc4_,1); + } + else + { + _loc2_.selected = true; + _selectedIndices.push(_loc3_); + } + caretIndex = _loc3_; + } + else + { + _selectedIndices = [_loc3_]; + lastCaretIndex = caretIndex = _loc3_; + } + dispatchEvent(new Event(Event.CHANGE)); + invalidate(InvalidationType.DATA); + } + + public function get length() : uint + { + return _dataProvider.length; + } + + public function get allowMultipleSelection() : Boolean + { + return _allowMultipleSelection; + } + + protected function onPreChange(param1:DataChangeEvent) : void + { + switch(param1.changeType) + { + case DataChangeType.REMOVE: + case DataChangeType.ADD: + case DataChangeType.INVALIDATE: + case DataChangeType.REMOVE_ALL: + case DataChangeType.REPLACE: + case DataChangeType.INVALIDATE_ALL: + break; + default: + preChangeItems = selectedItems; + } + } + + public function getRendererStyle(param1:String, param2:int = -1) : Object + { + return rendererStyles[param1]; + } + + override protected function setVerticalScrollPosition(param1:Number, param2:Boolean = false) : void + { + var _loc3_:Number = NaN; + if(param1 == _verticalScrollPosition) + { + return; + } + _loc3_ = param1 - _verticalScrollPosition; + _verticalScrollPosition = param1; + if(param2) + { + dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL,_loc3_,param1)); + } + } + + protected function moveSelectionHorizontally(param1:uint, param2:Boolean, param3:Boolean) : void + { + } + + public function set selectedIndices(param1:Array) : void + { + if(!_selectable) + { + return; + } + _selectedIndices = param1 == null ? [] : param1.concat(); + invalidate(InvalidationType.SELECTED); + } + + public function get selectedIndex() : int + { + return _selectedIndices.length == 0 ? -1 : int(_selectedIndices[_selectedIndices.length - 1]); + } + + override protected function draw() : void + { + super.draw(); + } + + override protected function configUI() : void + { + super.configUI(); + listHolder = new Sprite(); + addChild(listHolder); + listHolder.scrollRect = contentScrollRect; + list = new Sprite(); + listHolder.addChild(list); + } + + public function addItem(param1:Object) : void + { + _dataProvider.addItem(param1); + invalidateList(); + } + + protected function handleCellRendererMouseEvent(param1:MouseEvent) : void + { + var _loc2_:ICellRenderer = null; + var _loc3_:String = null; + _loc2_ = param1.target as ICellRenderer; + _loc3_ = param1.type == MouseEvent.ROLL_OVER ? ListEvent.ITEM_ROLL_OVER : ListEvent.ITEM_ROLL_OUT; + dispatchEvent(new ListEvent(_loc3_,false,false,_loc2_.listData.column,_loc2_.listData.row,_loc2_.listData.index,_loc2_.data)); + } + + public function clearRendererStyle(param1:String, param2:int = -1) : void + { + delete rendererStyles[param1]; + updatedRendererStyles[param1] = null; + invalidate(InvalidationType.RENDERER_STYLES); + } + + protected function handleCellRendererDoubleClick(param1:MouseEvent) : void + { + var _loc2_:ICellRenderer = null; + var _loc3_:uint = 0; + if(!_enabled) + { + return; + } + _loc2_ = param1.currentTarget as ICellRenderer; + _loc3_ = _loc2_.listData.index; + dispatchEvent(new ListEvent(ListEvent.ITEM_DOUBLE_CLICK,false,true,_loc2_.listData.column,_loc2_.listData.row,_loc3_,_loc2_.data)); + } + + public function get rowCount() : uint + { + return 0; + } + + public function isItemSelected(param1:Object) : Boolean + { + return selectedItems.indexOf(param1) > -1; + } + + public function set dataProvider(param1:DataProvider) : void + { + if(_dataProvider != null) + { + _dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE,handleDataChange); + _dataProvider.removeEventListener(DataChangeEvent.PRE_DATA_CHANGE,onPreChange); + } + _dataProvider = param1; + _dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE,handleDataChange,false,0,true); + _dataProvider.addEventListener(DataChangeEvent.PRE_DATA_CHANGE,onPreChange,false,0,true); + clearSelection(); + invalidateList(); + } + + override protected function drawLayout() : void + { + super.drawLayout(); + contentScrollRect = listHolder.scrollRect; + contentScrollRect.width = availableWidth; + contentScrollRect.height = availableHeight; + listHolder.scrollRect = contentScrollRect; + } + + public function getItemAt(param1:uint) : Object + { + return _dataProvider.getItemAt(param1); + } + + override protected function initializeAccessibility() : void + { + if(SelectableList.createAccessibilityImplementation != null) + { + SelectableList.createAccessibilityImplementation(this); + } + } + + public function scrollToIndex(param1:int) : void + { + } + + public function removeItem(param1:Object) : Object + { + return _dataProvider.removeItem(param1); + } + + public function get dataProvider() : DataProvider + { + return _dataProvider; + } + + public function set maxHorizontalScrollPosition(param1:Number) : void + { + _maxHorizontalScrollPosition = param1; + invalidate(InvalidationType.SIZE); + } + + public function setRendererStyle(param1:String, param2:Object, param3:uint = 0) : void + { + if(rendererStyles[param1] == param2) + { + return; + } + updatedRendererStyles[param1] = param2; + rendererStyles[param1] = param2; + invalidate(InvalidationType.RENDERER_STYLES); + } + + public function invalidateItemAt(param1:uint) : void + { + var _loc2_:Object = null; + _loc2_ = _dataProvider.getItemAt(param1); + if(_loc2_ != null) + { + invalidateItem(_loc2_); + } + } + + public function set selectedItems(param1:Array) : void + { + var _loc2_:Array = null; + var _loc3_:uint = 0; + var _loc4_:int = 0; + if(param1 == null) + { + selectedIndices = null; + return; + } + _loc2_ = []; + _loc3_ = 0; + while(_loc3_ < param1.length) + { + _loc4_ = _dataProvider.getItemIndex(param1[_loc3_]); + if(_loc4_ != -1) + { + _loc2_.push(_loc4_); + } + _loc3_++; + } + selectedIndices = _loc2_; + } + + public function clearSelection() : void + { + selectedIndex = -1; + } + + override public function get maxHorizontalScrollPosition() : Number + { + return _maxHorizontalScrollPosition; + } + + public function get selectedItems() : Array + { + var _loc1_:Array = null; + var _loc2_:uint = 0; + _loc1_ = []; + _loc2_ = 0; + while(_loc2_ < _selectedIndices.length) + { + _loc1_.push(_dataProvider.getItemAt(_selectedIndices[_loc2_])); + _loc2_++; + } + return _loc1_; + } + + public function set selectedIndex(param1:int) : void + { + selectedIndices = param1 == -1 ? null : [param1]; + } + } +} + diff --git a/flash_decompiled/fl/controls/TextInput.as b/flash_decompiled/fl/controls/TextInput.as new file mode 100644 index 0000000..0b55525 --- /dev/null +++ b/flash_decompiled/fl/controls/TextInput.as @@ -0,0 +1,408 @@ +package fl.controls +{ + import fl.core.InvalidationType; + import fl.core.UIComponent; + import fl.events.ComponentEvent; + import fl.managers.IFocusManager; + import fl.managers.IFocusManagerComponent; + import flash.display.DisplayObject; + import flash.events.Event; + import flash.events.FocusEvent; + import flash.events.KeyboardEvent; + import flash.events.TextEvent; + import flash.text.TextField; + import flash.text.TextFieldType; + import flash.text.TextFormat; + import flash.text.TextLineMetrics; + import flash.ui.Keyboard; + + [Embed(source="/_assets/assets.swf", symbol="symbol60")] + public class TextInput extends UIComponent implements IFocusManagerComponent + { + + public static var createAccessibilityImplementation:Function; + + private static var defaultStyles:Object = { + "upSkin":"TextInput_upSkin", + "disabledSkin":"TextInput_disabledSkin", + "focusRectSkin":null, + "focusRectPadding":null, + "textFormat":null, + "disabledTextFormat":null, + "textPadding":0, + "embedFonts":false + }; + + protected var _html:Boolean = false; + + protected var _savedHTML:String; + + protected var background:DisplayObject; + + protected var _editable:Boolean = true; + + public var textField:TextField; + + public function TextInput() + { + super(); + } + + public static function getStyleDefinition() : Object + { + return defaultStyles; + } + + override public function drawFocus(param1:Boolean) : void + { + if(focusTarget != null) + { + focusTarget.drawFocus(param1); + return; + } + super.drawFocus(param1); + } + + public function set imeMode(param1:String) : void + { + _imeMode = param1; + } + + override protected function isOurFocus(param1:DisplayObject) : Boolean + { + return param1 == textField || Boolean(super.isOurFocus(param1)); + } + + protected function handleKeyDown(param1:KeyboardEvent) : void + { + if(param1.keyCode == Keyboard.ENTER) + { + dispatchEvent(new ComponentEvent(ComponentEvent.ENTER,true)); + } + } + + public function set text(param1:String) : void + { + textField.text = param1; + _html = false; + invalidate(InvalidationType.DATA); + invalidate(InvalidationType.STYLES); + } + + protected function updateTextFieldType() : void + { + textField.type = enabled && editable ? TextFieldType.INPUT : TextFieldType.DYNAMIC; + textField.selectable = enabled; + } + + public function get selectionEndIndex() : int + { + return textField.selectionEndIndex; + } + + public function get editable() : Boolean + { + return _editable; + } + + override protected function focusInHandler(param1:FocusEvent) : void + { + var _loc2_:IFocusManager = null; + if(param1.target == this) + { + stage.focus = textField; + } + _loc2_ = focusManager; + if(editable && Boolean(_loc2_)) + { + _loc2_.showFocusIndicator = true; + if(textField.selectable && textField.selectionBeginIndex == textField.selectionBeginIndex) + { + setSelection(0,textField.length); + } + } + super.focusInHandler(param1); + if(editable) + { + setIMEMode(true); + } + } + + public function get selectionBeginIndex() : int + { + return textField.selectionBeginIndex; + } + + public function set alwaysShowSelection(param1:Boolean) : void + { + textField.alwaysShowSelection = param1; + } + + override public function set enabled(param1:Boolean) : void + { + super.enabled = param1; + updateTextFieldType(); + } + + protected function setEmbedFont() : * + { + var _loc1_:Object = null; + _loc1_ = getStyleValue("embedFonts"); + if(_loc1_ != null) + { + textField.embedFonts = _loc1_; + } + } + + public function get horizontalScrollPosition() : int + { + return textField.scrollH; + } + + public function set condenseWhite(param1:Boolean) : void + { + textField.condenseWhite = param1; + } + + public function set displayAsPassword(param1:Boolean) : void + { + textField.displayAsPassword = param1; + } + + public function set horizontalScrollPosition(param1:int) : void + { + textField.scrollH = param1; + } + + public function get restrict() : String + { + return textField.restrict; + } + + public function get textWidth() : Number + { + return textField.textWidth; + } + + public function get textHeight() : Number + { + return textField.textHeight; + } + + public function set editable(param1:Boolean) : void + { + _editable = param1; + updateTextFieldType(); + } + + public function get maxChars() : int + { + return textField.maxChars; + } + + public function get length() : int + { + return textField.length; + } + + public function getLineMetrics(param1:int) : TextLineMetrics + { + return textField.getLineMetrics(param1); + } + + public function get imeMode() : String + { + return _imeMode; + } + + override protected function focusOutHandler(param1:FocusEvent) : void + { + super.focusOutHandler(param1); + if(editable) + { + setIMEMode(false); + } + } + + public function set htmlText(param1:String) : void + { + if(param1 == "") + { + text = ""; + return; + } + _html = true; + _savedHTML = param1; + textField.htmlText = param1; + invalidate(InvalidationType.DATA); + invalidate(InvalidationType.STYLES); + } + + public function get text() : String + { + return textField.text; + } + + override public function get enabled() : Boolean + { + return super.enabled; + } + + public function get condenseWhite() : Boolean + { + return textField.condenseWhite; + } + + public function get alwaysShowSelection() : Boolean + { + return textField.alwaysShowSelection; + } + + override protected function draw() : void + { + var _loc1_:Object = null; + if(isInvalid(InvalidationType.STYLES,InvalidationType.STATE)) + { + drawTextFormat(); + drawBackground(); + _loc1_ = getStyleValue("embedFonts"); + if(_loc1_ != null) + { + textField.embedFonts = _loc1_; + } + invalidate(InvalidationType.SIZE,false); + } + if(isInvalid(InvalidationType.SIZE)) + { + drawLayout(); + } + super.draw(); + } + + protected function handleTextInput(param1:TextEvent) : void + { + param1.stopPropagation(); + dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT,true,false,param1.text)); + } + + override protected function configUI() : void + { + super.configUI(); + tabChildren = true; + textField = new TextField(); + addChild(textField); + updateTextFieldType(); + textField.addEventListener(TextEvent.TEXT_INPUT,handleTextInput,false,0,true); + textField.addEventListener(Event.CHANGE,handleChange,false,0,true); + textField.addEventListener(KeyboardEvent.KEY_DOWN,handleKeyDown,false,0,true); + } + + public function setSelection(param1:int, param2:int) : void + { + textField.setSelection(param1,param2); + } + + public function get displayAsPassword() : Boolean + { + return textField.displayAsPassword; + } + + public function appendText(param1:String) : void + { + textField.appendText(param1); + } + + public function set restrict(param1:String) : void + { + if(componentInspectorSetting && param1 == "") + { + param1 = null; + } + textField.restrict = param1; + } + + public function get htmlText() : String + { + return textField.htmlText; + } + + protected function drawBackground() : void + { + var _loc1_:DisplayObject = null; + var _loc2_:String = null; + _loc1_ = background; + _loc2_ = enabled ? "upSkin" : "disabledSkin"; + background = getDisplayObjectInstance(getStyleValue(_loc2_)); + if(background == null) + { + return; + } + addChildAt(background,0); + if(_loc1_ != null && _loc1_ != background && contains(_loc1_)) + { + removeChild(_loc1_); + } + } + + override public function setFocus() : void + { + stage.focus = textField; + } + + protected function drawLayout() : void + { + var _loc1_:Number = NaN; + _loc1_ = Number(getStyleValue("textPadding")); + if(background != null) + { + background.width = width; + background.height = height; + } + textField.width = width - 2 * _loc1_; + textField.height = height - 2 * _loc1_; + textField.x = textField.y = _loc1_; + } + + public function set maxChars(param1:int) : void + { + textField.maxChars = param1; + } + + public function get maxHorizontalScrollPosition() : int + { + return textField.maxScrollH; + } + + protected function drawTextFormat() : void + { + var _loc1_:Object = null; + var _loc2_:TextFormat = null; + var _loc3_:TextFormat = null; + _loc1_ = UIComponent.getStyleDefinition(); + _loc2_ = enabled ? _loc1_.defaultTextFormat as TextFormat : _loc1_.defaultDisabledTextFormat as TextFormat; + textField.setTextFormat(_loc2_); + _loc3_ = getStyleValue(enabled ? "textFormat" : "disabledTextFormat") as TextFormat; + if(_loc3_ != null) + { + textField.setTextFormat(_loc3_); + } + else + { + _loc3_ = _loc2_; + } + textField.defaultTextFormat = _loc3_; + setEmbedFont(); + if(_html) + { + textField.htmlText = _savedHTML; + } + } + + protected function handleChange(param1:Event) : void + { + param1.stopPropagation(); + dispatchEvent(new Event(Event.CHANGE,true)); + } + } +} + diff --git a/flash_decompiled/fl/controls/UIScrollBar.as b/flash_decompiled/fl/controls/UIScrollBar.as new file mode 100644 index 0000000..67f2486 --- /dev/null +++ b/flash_decompiled/fl/controls/UIScrollBar.as @@ -0,0 +1,219 @@ +package fl.controls +{ + import fl.core.InvalidationType; + import fl.core.UIComponent; + import fl.events.ScrollEvent; + import flash.events.Event; + import flash.events.TextEvent; + import flash.text.TextField; + + [Embed(source="/_assets/assets.swf", symbol="symbol36")] + public class UIScrollBar extends ScrollBar + { + + private static var defaultStyles:Object = {}; + + protected var inScroll:Boolean = false; + + protected var _scrollTarget:TextField; + + protected var inEdit:Boolean = false; + + public function UIScrollBar() + { + super(); + } + + public static function getStyleDefinition() : Object + { + return UIComponent.mergeStyles(defaultStyles,ScrollBar.getStyleDefinition()); + } + + protected function handleTargetScroll(param1:Event) : void + { + if(inDrag) + { + return; + } + if(!enabled) + { + return; + } + inEdit = true; + updateScrollTargetProperties(); + scrollPosition = direction == ScrollBarDirection.HORIZONTAL ? _scrollTarget.scrollH : _scrollTarget.scrollV; + inEdit = false; + } + + override public function set minScrollPosition(param1:Number) : void + { + super.minScrollPosition = param1 < 0 ? 0 : param1; + } + + override public function setScrollPosition(param1:Number, param2:Boolean = true) : void + { + super.setScrollPosition(param1,param2); + if(!_scrollTarget) + { + inScroll = false; + return; + } + updateTargetScroll(); + } + + override public function setScrollProperties(param1:Number, param2:Number, param3:Number, param4:Number = 0) : void + { + var _loc5_:Number = NaN; + var _loc6_:Number = NaN; + _loc5_ = param3; + _loc6_ = param2 < 0 ? 0 : param2; + if(_scrollTarget != null) + { + if(direction == ScrollBarDirection.HORIZONTAL) + { + _loc5_ = param3 > _scrollTarget.maxScrollH ? _scrollTarget.maxScrollH : _loc5_; + } + else + { + _loc5_ = param3 > _scrollTarget.maxScrollV ? _scrollTarget.maxScrollV : _loc5_; + } + } + super.setScrollProperties(param1,_loc6_,_loc5_,param4); + } + + public function get scrollTargetName() : String + { + return _scrollTarget.name; + } + + public function get scrollTarget() : TextField + { + return _scrollTarget; + } + + protected function updateScrollTargetProperties() : void + { + var _loc1_:Boolean = false; + var _loc2_:Number = NaN; + if(_scrollTarget == null) + { + setScrollProperties(pageSize,minScrollPosition,maxScrollPosition,pageScrollSize); + scrollPosition = 0; + } + else + { + _loc1_ = direction == ScrollBarDirection.HORIZONTAL; + _loc2_ = _loc1_ ? _scrollTarget.width : 10; + setScrollProperties(_loc2_,_loc1_ ? 0 : 1,_loc1_ ? _scrollTarget.maxScrollH : _scrollTarget.maxScrollV,pageScrollSize); + scrollPosition = _loc1_ ? _scrollTarget.scrollH : _scrollTarget.scrollV; + } + } + + public function update() : void + { + inEdit = true; + updateScrollTargetProperties(); + inEdit = false; + } + + public function set scrollTargetName(param1:String) : void + { + var target:String = param1; + try + { + scrollTarget = parent.getChildByName(target) as TextField; + } + catch(error:Error) + { + throw new Error("ScrollTarget not found, or is not a TextField"); + } + } + + override public function set direction(param1:String) : void + { + if(isLivePreview) + { + return; + } + super.direction = param1; + updateScrollTargetProperties(); + } + + protected function handleTargetChange(param1:Event) : void + { + inEdit = true; + setScrollPosition(direction == ScrollBarDirection.HORIZONTAL ? _scrollTarget.scrollH : _scrollTarget.scrollV,true); + updateScrollTargetProperties(); + inEdit = false; + } + + override public function set maxScrollPosition(param1:Number) : void + { + var _loc2_:Number = NaN; + _loc2_ = param1; + if(_scrollTarget != null) + { + if(direction == ScrollBarDirection.HORIZONTAL) + { + _loc2_ = _loc2_ > _scrollTarget.maxScrollH ? _scrollTarget.maxScrollH : _loc2_; + } + else + { + _loc2_ = _loc2_ > _scrollTarget.maxScrollV ? _scrollTarget.maxScrollV : _loc2_; + } + } + super.maxScrollPosition = _loc2_; + } + + protected function updateTargetScroll(param1:ScrollEvent = null) : void + { + if(inEdit) + { + return; + } + if(direction == ScrollBarDirection.HORIZONTAL) + { + _scrollTarget.scrollH = scrollPosition; + } + else + { + _scrollTarget.scrollV = scrollPosition; + } + } + + override protected function draw() : void + { + if(isInvalid(InvalidationType.DATA)) + { + updateScrollTargetProperties(); + } + super.draw(); + } + + public function set scrollTarget(param1:TextField) : void + { + if(_scrollTarget != null) + { + _scrollTarget.removeEventListener(Event.CHANGE,handleTargetChange,false); + _scrollTarget.removeEventListener(TextEvent.TEXT_INPUT,handleTargetChange,false); + _scrollTarget.removeEventListener(Event.SCROLL,handleTargetScroll,false); + removeEventListener(ScrollEvent.SCROLL,updateTargetScroll,false); + } + _scrollTarget = param1; + if(_scrollTarget != null) + { + _scrollTarget.addEventListener(Event.CHANGE,handleTargetChange,false,0,true); + _scrollTarget.addEventListener(TextEvent.TEXT_INPUT,handleTargetChange,false,0,true); + _scrollTarget.addEventListener(Event.SCROLL,handleTargetScroll,false,0,true); + addEventListener(ScrollEvent.SCROLL,updateTargetScroll,false,0,true); + } + invalidate(InvalidationType.DATA); + } + + override public function get direction() : String + { + return super.direction; + } + } +} + diff --git a/flash_decompiled/fl/controls/listClasses/CellRenderer.as b/flash_decompiled/fl/controls/listClasses/CellRenderer.as new file mode 100644 index 0000000..31a1d74 --- /dev/null +++ b/flash_decompiled/fl/controls/listClasses/CellRenderer.as @@ -0,0 +1,113 @@ +package fl.controls.listClasses +{ + import fl.controls.LabelButton; + import flash.events.MouseEvent; + + [Embed(source="/_assets/assets.swf", symbol="symbol76")] + public class CellRenderer extends LabelButton implements ICellRenderer + { + + private static var defaultStyles:Object = { + "upSkin":"CellRenderer_upSkin", + "downSkin":"CellRenderer_downSkin", + "overSkin":"CellRenderer_overSkin", + "disabledSkin":"CellRenderer_disabledSkin", + "selectedDisabledSkin":"CellRenderer_selectedDisabledSkin", + "selectedUpSkin":"CellRenderer_selectedUpSkin", + "selectedDownSkin":"CellRenderer_selectedDownSkin", + "selectedOverSkin":"CellRenderer_selectedOverSkin", + "textFormat":null, + "disabledTextFormat":null, + "embedFonts":null, + "textPadding":5 + }; + + protected var _data:Object; + + protected var _listData:ListData; + + public function CellRenderer() + { + super(); + toggle = true; + focusEnabled = false; + } + + public static function getStyleDefinition() : Object + { + return defaultStyles; + } + + override protected function toggleSelected(param1:MouseEvent) : void + { + } + + override public function get selected() : Boolean + { + return super.selected; + } + + public function set listData(param1:ListData) : void + { + _listData = param1; + label = _listData.label; + setStyle("icon",_listData.icon); + } + + override public function set selected(param1:Boolean) : void + { + super.selected = param1; + } + + public function set data(param1:Object) : void + { + _data = param1; + } + + public function get listData() : ListData + { + return _listData; + } + + override public function setSize(param1:Number, param2:Number) : void + { + super.setSize(param1,param2); + } + + override protected function drawLayout() : void + { + var _loc1_:Number = NaN; + var _loc2_:Number = NaN; + var _loc3_:Number = NaN; + _loc1_ = Number(getStyleValue("textPadding")); + _loc2_ = 0; + if(icon != null) + { + icon.x = _loc1_; + icon.y = Math.round(height - icon.height >> 1); + _loc2_ = icon.width + _loc1_; + } + if(label.length > 0) + { + textField.visible = true; + _loc3_ = Math.max(0,width - _loc2_ - _loc1_ * 2); + textField.width = _loc3_; + textField.height = textField.textHeight + 4; + textField.x = _loc2_ + _loc1_; + textField.y = Math.round(height - textField.height >> 1); + } + else + { + textField.visible = false; + } + background.width = width; + background.height = height; + } + + public function get data() : Object + { + return _data; + } + } +} + diff --git a/flash_decompiled/fl/controls/listClasses/ICellRenderer.as b/flash_decompiled/fl/controls/listClasses/ICellRenderer.as new file mode 100644 index 0000000..a9b0110 --- /dev/null +++ b/flash_decompiled/fl/controls/listClasses/ICellRenderer.as @@ -0,0 +1,27 @@ +package fl.controls.listClasses +{ + public interface ICellRenderer + { + + function setSize(param1:Number, param2:Number) : void; + + function get listData() : ListData; + + function get data() : Object; + + function setMouseState(param1:String) : void; + + function set x(param1:Number) : void; + + function set y(param1:Number) : void; + + function set data(param1:Object) : void; + + function set selected(param1:Boolean) : void; + + function set listData(param1:ListData) : void; + + function get selected() : Boolean; + } +} + diff --git a/flash_decompiled/fl/controls/listClasses/ListData.as b/flash_decompiled/fl/controls/listClasses/ListData.as new file mode 100644 index 0000000..eecb460 --- /dev/null +++ b/flash_decompiled/fl/controls/listClasses/ListData.as @@ -0,0 +1,62 @@ +package fl.controls.listClasses +{ + import fl.core.UIComponent; + + public class ListData + { + + protected var _index:uint; + + protected var _owner:UIComponent; + + protected var _label:String; + + protected var _icon:Object = null; + + protected var _row:uint; + + protected var _column:uint; + + public function ListData(param1:String, param2:Object, param3:UIComponent, param4:uint, param5:uint, param6:uint = 0) + { + super(); + _label = param1; + _icon = param2; + _owner = param3; + _index = param4; + _row = param5; + _column = param6; + } + + public function get owner() : UIComponent + { + return _owner; + } + + public function get label() : String + { + return _label; + } + + public function get row() : uint + { + return _row; + } + + public function get index() : uint + { + return _index; + } + + public function get icon() : Object + { + return _icon; + } + + public function get column() : uint + { + return _column; + } + } +} + diff --git a/flash_decompiled/fl/core/ComponentShim.as b/flash_decompiled/fl/core/ComponentShim.as new file mode 100644 index 0000000..a65aabd --- /dev/null +++ b/flash_decompiled/fl/core/ComponentShim.as @@ -0,0 +1,15 @@ +package fl.core +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol3")] + public dynamic class ComponentShim extends MovieClip + { + + public function ComponentShim() + { + super(); + } + } +} + diff --git a/flash_decompiled/fl/core/InvalidationType.as b/flash_decompiled/fl/core/InvalidationType.as new file mode 100644 index 0000000..5bc0c68 --- /dev/null +++ b/flash_decompiled/fl/core/InvalidationType.as @@ -0,0 +1,28 @@ +package fl.core +{ + public class InvalidationType + { + + public static const ALL:String = "all"; + + public static const SIZE:String = "size"; + + public static const STYLES:String = "styles"; + + public static const RENDERER_STYLES:String = "rendererStyles"; + + public static const STATE:String = "state"; + + public static const DATA:String = "data"; + + public static const SCROLL:String = "scroll"; + + public static const SELECTED:String = "selected"; + + public function InvalidationType() + { + super(); + } + } +} + diff --git a/flash_decompiled/fl/core/UIComponent.as b/flash_decompiled/fl/core/UIComponent.as new file mode 100644 index 0000000..e5665c9 --- /dev/null +++ b/flash_decompiled/fl/core/UIComponent.as @@ -0,0 +1,719 @@ +package fl.core +{ + import fl.events.ComponentEvent; + import fl.managers.FocusManager; + import fl.managers.IFocusManager; + import fl.managers.IFocusManagerComponent; + import fl.managers.StyleManager; + import flash.display.DisplayObject; + import flash.display.InteractiveObject; + import flash.display.Sprite; + import flash.events.Event; + import flash.events.FocusEvent; + import flash.events.KeyboardEvent; + import flash.system.IME; + import flash.system.IMEConversionMode; + import flash.text.TextField; + import flash.text.TextFormat; + import flash.text.TextFormatAlign; + import flash.utils.Dictionary; + import flash.utils.getDefinitionByName; + import flash.utils.getQualifiedClassName; + + public class UIComponent extends Sprite + { + + public static var createAccessibilityImplementation:Function; + + public static var inCallLaterPhase:Boolean = false; + + private static var defaultStyles:Object = { + "focusRectSkin":"focusRectSkin", + "focusRectPadding":2, + "textFormat":new TextFormat("_sans",11,0,false,false,false,"","",TextFormatAlign.LEFT,0,0,0,0), + "disabledTextFormat":new TextFormat("_sans",11,10066329,false,false,false,"","",TextFormatAlign.LEFT,0,0,0,0), + "defaultTextFormat":new TextFormat("_sans",11,0,false,false,false,"","",TextFormatAlign.LEFT,0,0,0,0), + "defaultDisabledTextFormat":new TextFormat("_sans",11,10066329,false,false,false,"","",TextFormatAlign.LEFT,0,0,0,0) + }; + + private static var focusManagers:Dictionary = new Dictionary(false); + + protected var _enabled:Boolean = true; + + private var _mouseFocusEnabled:Boolean = true; + + protected var startHeight:Number; + + protected var _height:Number; + + protected var _oldIMEMode:String = null; + + protected var startWidth:Number; + + public var focusTarget:IFocusManagerComponent; + + protected var errorCaught:Boolean = false; + + protected var uiFocusRect:DisplayObject; + + protected var _width:Number; + + public var version:String = "3.0.0.15"; + + protected var isFocused:Boolean = false; + + protected var callLaterMethods:Dictionary; + + private var _focusEnabled:Boolean = true; + + private var tempText:TextField; + + protected var invalidateFlag:Boolean = false; + + protected var _inspector:Boolean = false; + + protected var sharedStyles:Object; + + protected var invalidHash:Object; + + protected var isLivePreview:Boolean = false; + + protected var _imeMode:String = null; + + protected var instanceStyles:Object; + + protected var _x:Number; + + protected var _y:Number; + + public function UIComponent() + { + super(); + instanceStyles = {}; + sharedStyles = {}; + invalidHash = {}; + callLaterMethods = new Dictionary(); + StyleManager.registerInstance(this); + configUI(); + invalidate(InvalidationType.ALL); + tabEnabled = this is IFocusManagerComponent; + focusRect = false; + if(tabEnabled) + { + addEventListener(FocusEvent.FOCUS_IN,focusInHandler); + addEventListener(FocusEvent.FOCUS_OUT,focusOutHandler); + addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler); + addEventListener(KeyboardEvent.KEY_UP,keyUpHandler); + } + initializeFocusManager(); + addEventListener(Event.ENTER_FRAME,hookAccessibility,false,0,true); + } + + public static function getStyleDefinition() : Object + { + return defaultStyles; + } + + public static function mergeStyles(... rest) : Object + { + var _loc2_:Object = null; + var _loc3_:uint = 0; + var _loc4_:uint = 0; + var _loc5_:Object = null; + var _loc6_:String = null; + _loc2_ = {}; + _loc3_ = uint(rest.length); + _loc4_ = 0; + while(_loc4_ < _loc3_) + { + _loc5_ = rest[_loc4_]; + for(_loc6_ in _loc5_) + { + if(_loc2_[_loc6_] != null) + { + continue; + } + _loc2_[_loc6_] = rest[_loc4_][_loc6_]; + } + _loc4_++; + } + return _loc2_; + } + + public function drawFocus(param1:Boolean) : void + { + var _loc2_:Number = NaN; + isFocused = param1; + if(uiFocusRect != null && contains(uiFocusRect)) + { + removeChild(uiFocusRect); + uiFocusRect = null; + } + if(param1) + { + uiFocusRect = getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite; + if(uiFocusRect == null) + { + return; + } + _loc2_ = Number(getStyleValue("focusRectPadding")); + uiFocusRect.x = -_loc2_; + uiFocusRect.y = -_loc2_; + uiFocusRect.width = width + _loc2_ * 2; + uiFocusRect.height = height + _loc2_ * 2; + addChildAt(uiFocusRect,0); + } + } + + private function callLaterDispatcher(param1:Event) : void + { + var _loc2_:Dictionary = null; + var _loc3_:Object = null; + if(param1.type == Event.ADDED_TO_STAGE) + { + removeEventListener(Event.ADDED_TO_STAGE,callLaterDispatcher); + stage.addEventListener(Event.RENDER,callLaterDispatcher,false,0,true); + stage.invalidate(); + return; + } + param1.target.removeEventListener(Event.RENDER,callLaterDispatcher); + if(stage == null) + { + addEventListener(Event.ADDED_TO_STAGE,callLaterDispatcher,false,0,true); + return; + } + inCallLaterPhase = true; + _loc2_ = callLaterMethods; + for(_loc3_ in _loc2_) + { + _loc3_(); + delete _loc2_[_loc3_]; + } + inCallLaterPhase = false; + } + + private function addedHandler(param1:Event) : void + { + removeEventListener("addedToStage",addedHandler); + initializeFocusManager(); + } + + protected function getStyleValue(param1:String) : Object + { + return instanceStyles[param1] == null ? sharedStyles[param1] : instanceStyles[param1]; + } + + protected function isOurFocus(param1:DisplayObject) : Boolean + { + return param1 == this; + } + + override public function get scaleX() : Number + { + return width / startWidth; + } + + override public function get scaleY() : Number + { + return height / startHeight; + } + + override public function set height(param1:Number) : void + { + if(_height == param1) + { + return; + } + setSize(width,param1); + } + + protected function keyDownHandler(param1:KeyboardEvent) : void + { + } + + protected function focusInHandler(param1:FocusEvent) : void + { + var _loc2_:IFocusManager = null; + if(isOurFocus(param1.target as DisplayObject)) + { + _loc2_ = focusManager; + if(Boolean(_loc2_) && _loc2_.showFocusIndicator) + { + drawFocus(true); + isFocused = true; + } + } + } + + public function setStyle(param1:String, param2:Object) : void + { + if(instanceStyles[param1] === param2 && !(param2 is TextFormat)) + { + return; + } + instanceStyles[param1] = param2; + invalidate(InvalidationType.STYLES); + } + + override public function get visible() : Boolean + { + return super.visible; + } + + public function get componentInspectorSetting() : Boolean + { + return _inspector; + } + + override public function get x() : Number + { + return isNaN(_x) ? super.x : _x; + } + + override public function get y() : Number + { + return isNaN(_y) ? super.y : _y; + } + + protected function setIMEMode(param1:Boolean) : * + { + var enabled:Boolean = param1; + if(_imeMode != null) + { + if(enabled) + { + IME.enabled = true; + _oldIMEMode = IME.conversionMode; + try + { + if(!errorCaught && IME.conversionMode != IMEConversionMode.UNKNOWN) + { + IME.conversionMode = _imeMode; + } + errorCaught = false; + } + catch(e:Error) + { + errorCaught = true; + throw new Error("IME mode not supported: " + _imeMode); + } + } + else + { + if(IME.conversionMode != IMEConversionMode.UNKNOWN && _oldIMEMode != IMEConversionMode.UNKNOWN) + { + IME.conversionMode = _oldIMEMode; + } + IME.enabled = false; + } + } + } + + public function set enabled(param1:Boolean) : void + { + if(param1 == _enabled) + { + return; + } + _enabled = param1; + invalidate(InvalidationType.STATE); + } + + public function setSharedStyle(param1:String, param2:Object) : void + { + if(sharedStyles[param1] === param2 && !(param2 is TextFormat)) + { + return; + } + sharedStyles[param1] = param2; + if(instanceStyles[param1] == null) + { + invalidate(InvalidationType.STYLES); + } + } + + protected function keyUpHandler(param1:KeyboardEvent) : void + { + } + + public function set focusEnabled(param1:Boolean) : void + { + _focusEnabled = param1; + } + + override public function set scaleX(param1:Number) : void + { + setSize(startWidth * param1,height); + } + + public function get mouseFocusEnabled() : Boolean + { + return _mouseFocusEnabled; + } + + override public function set scaleY(param1:Number) : void + { + setSize(width,startHeight * param1); + } + + protected function getDisplayObjectInstance(param1:Object) : DisplayObject + { + var classDef:Object = null; + var skin:Object = param1; + classDef = null; + if(skin is Class) + { + return new skin() as DisplayObject; + } + if(skin is DisplayObject) + { + (skin as DisplayObject).x = 0; + (skin as DisplayObject).y = 0; + return skin as DisplayObject; + } + try + { + classDef = getDefinitionByName(skin.toString()); + } + catch(e:Error) + { + try + { + classDef = loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object; + } + catch(e:Error) + { + } + } + if(classDef == null) + { + return null; + } + return new classDef() as DisplayObject; + } + + protected function copyStylesToChild(param1:UIComponent, param2:Object) : void + { + var _loc3_:String = null; + for(_loc3_ in param2) + { + param1.setStyle(_loc3_,getStyleValue(param2[_loc3_])); + } + } + + protected function beforeComponentParameters() : void + { + } + + protected function callLater(param1:Function) : void + { + if(inCallLaterPhase) + { + return; + } + callLaterMethods[param1] = true; + if(stage != null) + { + stage.addEventListener(Event.RENDER,callLaterDispatcher,false,0,true); + stage.invalidate(); + } + else + { + addEventListener(Event.ADDED_TO_STAGE,callLaterDispatcher,false,0,true); + } + } + + protected function createFocusManager() : void + { + if(focusManagers[stage] == null) + { + focusManagers[stage] = new FocusManager(stage); + } + } + + override public function set visible(param1:Boolean) : void + { + var _loc2_:String = null; + if(super.visible == param1) + { + return; + } + super.visible = param1; + _loc2_ = param1 ? ComponentEvent.SHOW : ComponentEvent.HIDE; + dispatchEvent(new ComponentEvent(_loc2_,true)); + } + + protected function hookAccessibility(param1:Event) : void + { + removeEventListener(Event.ENTER_FRAME,hookAccessibility); + initializeAccessibility(); + } + + public function set componentInspectorSetting(param1:Boolean) : void + { + _inspector = param1; + if(_inspector) + { + beforeComponentParameters(); + } + else + { + afterComponentParameters(); + } + } + + override public function set x(param1:Number) : void + { + move(param1,_y); + } + + public function drawNow() : void + { + draw(); + } + + override public function set y(param1:Number) : void + { + move(_x,param1); + } + + protected function checkLivePreview() : Boolean + { + var className:String = null; + if(parent == null) + { + return false; + } + try + { + className = getQualifiedClassName(parent); + } + catch(e:Error) + { + } + return className == "fl.livepreview::LivePreviewParent"; + } + + protected function focusOutHandler(param1:FocusEvent) : void + { + if(isOurFocus(param1.target as DisplayObject)) + { + drawFocus(false); + isFocused = false; + } + } + + public function set mouseFocusEnabled(param1:Boolean) : void + { + _mouseFocusEnabled = param1; + } + + public function getFocus() : InteractiveObject + { + if(stage) + { + return stage.focus; + } + return null; + } + + protected function validate() : void + { + invalidHash = {}; + } + + override public function get height() : Number + { + return _height; + } + + public function invalidate(param1:String = "all", param2:Boolean = true) : void + { + invalidHash[param1] = true; + if(param2) + { + this.callLater(draw); + } + } + + public function get enabled() : Boolean + { + return _enabled; + } + + protected function getScaleX() : Number + { + return super.scaleX; + } + + protected function getScaleY() : Number + { + return super.scaleY; + } + + public function get focusEnabled() : Boolean + { + return _focusEnabled; + } + + protected function afterComponentParameters() : void + { + } + + protected function draw() : void + { + if(isInvalid(InvalidationType.SIZE,InvalidationType.STYLES)) + { + if(isFocused && focusManager.showFocusIndicator) + { + drawFocus(true); + } + } + validate(); + } + + protected function configUI() : void + { + var _loc1_:Number = NaN; + var _loc2_:Number = NaN; + var _loc3_:Number = NaN; + isLivePreview = checkLivePreview(); + _loc1_ = rotation; + rotation = 0; + _loc2_ = super.width; + _loc3_ = super.height; + super.scaleX = super.scaleY = 1; + setSize(_loc2_,_loc3_); + move(super.x,super.y); + rotation = _loc1_; + startWidth = _loc2_; + startHeight = _loc3_; + if(numChildren > 0) + { + removeChildAt(0); + } + } + + protected function setScaleX(param1:Number) : void + { + super.scaleX = param1; + } + + protected function setScaleY(param1:Number) : void + { + super.scaleY = param1; + } + + private function initializeFocusManager() : void + { + if(stage == null) + { + addEventListener(Event.ADDED_TO_STAGE,addedHandler,false,0,true); + } + else + { + createFocusManager(); + } + } + + public function set focusManager(param1:IFocusManager) : void + { + UIComponent.focusManagers[this] = param1; + } + + public function clearStyle(param1:String) : void + { + setStyle(param1,null); + } + + protected function isInvalid(param1:String, ... rest) : Boolean + { + if(Boolean(invalidHash[param1]) || Boolean(invalidHash[InvalidationType.ALL])) + { + return true; + } + while(rest.length > 0) + { + if(invalidHash[rest.pop()]) + { + return true; + } + } + return false; + } + + public function setSize(param1:Number, param2:Number) : void + { + _width = param1; + _height = param2; + invalidate(InvalidationType.SIZE); + dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE,false)); + } + + override public function set width(param1:Number) : void + { + if(_width == param1) + { + return; + } + setSize(param1,height); + } + + public function setFocus() : void + { + if(stage) + { + stage.focus = this; + } + } + + protected function initializeAccessibility() : void + { + if(UIComponent.createAccessibilityImplementation != null) + { + UIComponent.createAccessibilityImplementation(this); + } + } + + public function get focusManager() : IFocusManager + { + var _loc1_:DisplayObject = null; + _loc1_ = this; + while(_loc1_) + { + if(UIComponent.focusManagers[_loc1_] != null) + { + return IFocusManager(UIComponent.focusManagers[_loc1_]); + } + _loc1_ = _loc1_.parent; + } + return null; + } + + override public function get width() : Number + { + return _width; + } + + public function move(param1:Number, param2:Number) : void + { + _x = param1; + _y = param2; + super.x = Math.round(param1); + super.y = Math.round(param2); + dispatchEvent(new ComponentEvent(ComponentEvent.MOVE)); + } + + public function validateNow() : void + { + invalidate(InvalidationType.ALL,false); + draw(); + } + + public function getStyle(param1:String) : Object + { + return instanceStyles[param1]; + } + } +} + diff --git a/flash_decompiled/fl/data/DataProvider.as b/flash_decompiled/fl/data/DataProvider.as new file mode 100644 index 0000000..07fef7a --- /dev/null +++ b/flash_decompiled/fl/data/DataProvider.as @@ -0,0 +1,301 @@ +package fl.data +{ + import fl.events.DataChangeEvent; + import fl.events.DataChangeType; + import flash.events.EventDispatcher; + + public class DataProvider extends EventDispatcher + { + + protected var data:Array; + + public function DataProvider(param1:Object = null) + { + super(); + if(param1 == null) + { + data = []; + } + else + { + data = getDataFromObject(param1); + } + } + + protected function dispatchPreChangeEvent(param1:String, param2:Array, param3:int, param4:int) : void + { + dispatchEvent(new DataChangeEvent(DataChangeEvent.PRE_DATA_CHANGE,param1,param2,param3,param4)); + } + + public function invalidateItemAt(param1:int) : void + { + checkIndex(param1,data.length - 1); + dispatchChangeEvent(DataChangeType.INVALIDATE,[data[param1]],param1,param1); + } + + public function getItemIndex(param1:Object) : int + { + return data.indexOf(param1); + } + + protected function getDataFromObject(param1:Object) : Array + { + var _loc2_:Array = null; + var _loc3_:Array = null; + var _loc4_:uint = 0; + var _loc5_:Object = null; + var _loc6_:XML = null; + var _loc7_:XMLList = null; + var _loc8_:XML = null; + var _loc9_:XMLList = null; + var _loc10_:XML = null; + var _loc11_:XMLList = null; + var _loc12_:XML = null; + if(param1 is Array) + { + _loc3_ = param1 as Array; + if(_loc3_.length > 0) + { + if(_loc3_[0] is String || _loc3_[0] is Number) + { + _loc2_ = []; + _loc4_ = 0; + while(_loc4_ < _loc3_.length) + { + _loc5_ = { + "label":String(_loc3_[_loc4_]), + "data":_loc3_[_loc4_] + }; + _loc2_.push(_loc5_); + _loc4_++; + } + return _loc2_; + } + } + return param1.concat(); + } + if(param1 is DataProvider) + { + return param1.toArray(); + } + if(param1 is XML) + { + _loc6_ = param1 as XML; + _loc2_ = []; + _loc7_ = _loc6_.*; + for each(_loc8_ in _loc7_) + { + param1 = {}; + _loc9_ = _loc8_.attributes(); + for each(_loc10_ in _loc9_) + { + param1[_loc10_.localName()] = _loc10_.toString(); + } + _loc11_ = _loc8_.*; + for each(_loc12_ in _loc11_) + { + if(_loc12_.hasSimpleContent()) + { + param1[_loc12_.localName()] = _loc12_.toString(); + } + } + _loc2_.push(param1); + } + return _loc2_; + } + throw new TypeError("Error: Type Coercion failed: cannot convert " + param1 + " to Array or DataProvider."); + } + + public function removeItemAt(param1:uint) : Object + { + var _loc2_:Array = null; + checkIndex(param1,data.length - 1); + dispatchPreChangeEvent(DataChangeType.REMOVE,data.slice(param1,param1 + 1),param1,param1); + _loc2_ = data.splice(param1,1); + dispatchChangeEvent(DataChangeType.REMOVE,_loc2_,param1,param1); + return _loc2_[0]; + } + + public function addItem(param1:Object) : void + { + dispatchPreChangeEvent(DataChangeType.ADD,[param1],data.length - 1,data.length - 1); + data.push(param1); + dispatchChangeEvent(DataChangeType.ADD,[param1],data.length - 1,data.length - 1); + } + + public function sortOn(param1:Object, param2:Object = null) : * + { + var _loc3_:Array = null; + dispatchPreChangeEvent(DataChangeType.SORT,data.concat(),0,data.length - 1); + _loc3_ = data.sortOn(param1,param2); + dispatchChangeEvent(DataChangeType.SORT,data.concat(),0,data.length - 1); + return _loc3_; + } + + public function sort(... rest) : * + { + var _loc2_:Array = null; + dispatchPreChangeEvent(DataChangeType.SORT,data.concat(),0,data.length - 1); + _loc2_ = data.sort.apply(data,rest); + dispatchChangeEvent(DataChangeType.SORT,data.concat(),0,data.length - 1); + return _loc2_; + } + + public function addItems(param1:Object) : void + { + addItemsAt(param1,data.length); + } + + public function concat(param1:Object) : void + { + addItems(param1); + } + + public function clone() : DataProvider + { + return new DataProvider(data); + } + + public function toArray() : Array + { + return data.concat(); + } + + public function get length() : uint + { + return data.length; + } + + public function addItemAt(param1:Object, param2:uint) : void + { + checkIndex(param2,data.length); + dispatchPreChangeEvent(DataChangeType.ADD,[param1],param2,param2); + data.splice(param2,0,param1); + dispatchChangeEvent(DataChangeType.ADD,[param1],param2,param2); + } + + public function getItemAt(param1:uint) : Object + { + checkIndex(param1,data.length - 1); + return data[param1]; + } + + override public function toString() : String + { + return "DataProvider [" + data.join(" , ") + "]"; + } + + public function invalidateItem(param1:Object) : void + { + var _loc2_:uint = 0; + _loc2_ = uint(getItemIndex(param1)); + if(_loc2_ == -1) + { + return; + } + invalidateItemAt(_loc2_); + } + + protected function dispatchChangeEvent(param1:String, param2:Array, param3:int, param4:int) : void + { + dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE,param1,param2,param3,param4)); + } + + protected function checkIndex(param1:int, param2:int) : void + { + if(param1 > param2 || param1 < 0) + { + throw new RangeError("DataProvider index (" + param1 + ") is not in acceptable range (0 - " + param2 + ")"); + } + } + + public function addItemsAt(param1:Object, param2:uint) : void + { + var _loc3_:Array = null; + checkIndex(param2,data.length); + _loc3_ = getDataFromObject(param1); + dispatchPreChangeEvent(DataChangeType.ADD,_loc3_,param2,param2 + _loc3_.length - 1); + data.splice.apply(data,[param2,0].concat(_loc3_)); + dispatchChangeEvent(DataChangeType.ADD,_loc3_,param2,param2 + _loc3_.length - 1); + } + + public function replaceItem(param1:Object, param2:Object) : Object + { + var _loc3_:int = 0; + _loc3_ = getItemIndex(param2); + if(_loc3_ != -1) + { + return replaceItemAt(param1,_loc3_); + } + return null; + } + + public function removeItem(param1:Object) : Object + { + var _loc2_:int = 0; + _loc2_ = getItemIndex(param1); + if(_loc2_ != -1) + { + return removeItemAt(_loc2_); + } + return null; + } + + public function merge(param1:Object) : void + { + var _loc2_:Array = null; + var _loc3_:uint = 0; + var _loc4_:uint = 0; + var _loc5_:uint = 0; + var _loc6_:Object = null; + _loc2_ = getDataFromObject(param1); + _loc3_ = _loc2_.length; + _loc4_ = data.length; + dispatchPreChangeEvent(DataChangeType.ADD,data.slice(_loc4_,data.length),_loc4_,this.data.length - 1); + _loc5_ = 0; + while(_loc5_ < _loc3_) + { + _loc6_ = _loc2_[_loc5_]; + if(getItemIndex(_loc6_) == -1) + { + data.push(_loc6_); + } + _loc5_++; + } + if(data.length > _loc4_) + { + dispatchChangeEvent(DataChangeType.ADD,data.slice(_loc4_,data.length),_loc4_,this.data.length - 1); + } + else + { + dispatchChangeEvent(DataChangeType.ADD,[],-1,-1); + } + } + + public function replaceItemAt(param1:Object, param2:uint) : Object + { + var _loc3_:Array = null; + checkIndex(param2,data.length - 1); + _loc3_ = [data[param2]]; + dispatchPreChangeEvent(DataChangeType.REPLACE,_loc3_,param2,param2); + data[param2] = param1; + dispatchChangeEvent(DataChangeType.REPLACE,_loc3_,param2,param2); + return _loc3_[0]; + } + + public function invalidate() : void + { + dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE,DataChangeType.INVALIDATE_ALL,data.concat(),0,data.length)); + } + + public function removeAll() : void + { + var _loc1_:Array = null; + _loc1_ = data.concat(); + dispatchPreChangeEvent(DataChangeType.REMOVE_ALL,_loc1_,0,_loc1_.length); + data = []; + dispatchChangeEvent(DataChangeType.REMOVE_ALL,_loc1_,0,_loc1_.length); + } + } +} + diff --git a/flash_decompiled/fl/data/SimpleCollectionItem.as b/flash_decompiled/fl/data/SimpleCollectionItem.as new file mode 100644 index 0000000..cabbbeb --- /dev/null +++ b/flash_decompiled/fl/data/SimpleCollectionItem.as @@ -0,0 +1,21 @@ +package fl.data +{ + public dynamic class SimpleCollectionItem + { + + public var label:String; + + public var data:String; + + public function SimpleCollectionItem() + { + super(); + } + + public function toString() : String + { + return "[SimpleCollectionItem: " + label + "," + data + "]"; + } + } +} + diff --git a/flash_decompiled/fl/events/ComponentEvent.as b/flash_decompiled/fl/events/ComponentEvent.as new file mode 100644 index 0000000..60429d3 --- /dev/null +++ b/flash_decompiled/fl/events/ComponentEvent.as @@ -0,0 +1,38 @@ +package fl.events +{ + import flash.events.Event; + + public class ComponentEvent extends Event + { + + public static const BUTTON_DOWN:String = "buttonDown"; + + public static const LABEL_CHANGE:String = "labelChange"; + + public static const HIDE:String = "hide"; + + public static const SHOW:String = "show"; + + public static const RESIZE:String = "resize"; + + public static const MOVE:String = "move"; + + public static const ENTER:String = "enter"; + + public function ComponentEvent(param1:String, param2:Boolean = false, param3:Boolean = false) + { + super(param1,param2,param3); + } + + override public function toString() : String + { + return formatToString("ComponentEvent","type","bubbles","cancelable"); + } + + override public function clone() : Event + { + return new ComponentEvent(type,bubbles,cancelable); + } + } +} + diff --git a/flash_decompiled/fl/events/DataChangeEvent.as b/flash_decompiled/fl/events/DataChangeEvent.as new file mode 100644 index 0000000..efabffa --- /dev/null +++ b/flash_decompiled/fl/events/DataChangeEvent.as @@ -0,0 +1,60 @@ +package fl.events +{ + import flash.events.Event; + + public class DataChangeEvent extends Event + { + + public static const DATA_CHANGE:String = "dataChange"; + + public static const PRE_DATA_CHANGE:String = "preDataChange"; + + protected var _items:Array; + + protected var _endIndex:uint; + + protected var _changeType:String; + + protected var _startIndex:uint; + + public function DataChangeEvent(param1:String, param2:String, param3:Array, param4:int = -1, param5:int = -1) + { + super(param1); + _changeType = param2; + _startIndex = param4; + _items = param3; + _endIndex = param5 == -1 ? _startIndex : uint(param5); + } + + public function get changeType() : String + { + return _changeType; + } + + public function get startIndex() : uint + { + return _startIndex; + } + + public function get items() : Array + { + return _items; + } + + override public function clone() : Event + { + return new DataChangeEvent(type,_changeType,_items,_startIndex,_endIndex); + } + + override public function toString() : String + { + return formatToString("DataChangeEvent","type","changeType","startIndex","endIndex","bubbles","cancelable"); + } + + public function get endIndex() : uint + { + return _endIndex; + } + } +} + diff --git a/flash_decompiled/fl/events/DataChangeType.as b/flash_decompiled/fl/events/DataChangeType.as new file mode 100644 index 0000000..ac5895e --- /dev/null +++ b/flash_decompiled/fl/events/DataChangeType.as @@ -0,0 +1,28 @@ +package fl.events +{ + public class DataChangeType + { + + public static const CHANGE:String = "change"; + + public static const INVALIDATE:String = "invalidate"; + + public static const INVALIDATE_ALL:String = "invalidateAll"; + + public static const ADD:String = "add"; + + public static const REMOVE:String = "remove"; + + public static const REMOVE_ALL:String = "removeAll"; + + public static const REPLACE:String = "replace"; + + public static const SORT:String = "sort"; + + public function DataChangeType() + { + super(); + } + } +} + diff --git a/flash_decompiled/fl/events/ListEvent.as b/flash_decompiled/fl/events/ListEvent.as new file mode 100644 index 0000000..ae375f5 --- /dev/null +++ b/flash_decompiled/fl/events/ListEvent.as @@ -0,0 +1,64 @@ +package fl.events +{ + import flash.events.Event; + + public class ListEvent extends Event + { + + public static const ITEM_ROLL_OUT:String = "itemRollOut"; + + public static const ITEM_ROLL_OVER:String = "itemRollOver"; + + public static const ITEM_CLICK:String = "itemClick"; + + public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick"; + + protected var _index:int; + + protected var _item:Object; + + protected var _columnIndex:int; + + protected var _rowIndex:int; + + public function ListEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:int = -1, param5:int = -1, param6:int = -1, param7:Object = null) + { + super(param1,param2,param3); + _rowIndex = param5; + _columnIndex = param4; + _index = param6; + _item = param7; + } + + public function get rowIndex() : Object + { + return _rowIndex; + } + + public function get index() : int + { + return _index; + } + + public function get item() : Object + { + return _item; + } + + public function get columnIndex() : int + { + return _columnIndex; + } + + override public function clone() : Event + { + return new ListEvent(type,bubbles,cancelable,_columnIndex,_rowIndex); + } + + override public function toString() : String + { + return formatToString("ListEvent","type","bubbles","cancelable","columnIndex","rowIndex","index","item"); + } + } +} + diff --git a/flash_decompiled/fl/events/ScrollEvent.as b/flash_decompiled/fl/events/ScrollEvent.as new file mode 100644 index 0000000..aacb537 --- /dev/null +++ b/flash_decompiled/fl/events/ScrollEvent.as @@ -0,0 +1,50 @@ +package fl.events +{ + import flash.events.Event; + + public class ScrollEvent extends Event + { + + public static const SCROLL:String = "scroll"; + + private var _position:Number; + + private var _direction:String; + + private var _delta:Number; + + public function ScrollEvent(param1:String, param2:Number, param3:Number) + { + super(ScrollEvent.SCROLL,false,false); + _direction = param1; + _delta = param2; + _position = param3; + } + + override public function clone() : Event + { + return new ScrollEvent(_direction,_delta,_position); + } + + public function get position() : Number + { + return _position; + } + + override public function toString() : String + { + return formatToString("ScrollEvent","type","bubbles","cancelable","direction","delta","position"); + } + + public function get delta() : Number + { + return _delta; + } + + public function get direction() : String + { + return _direction; + } + } +} + diff --git a/flash_decompiled/fl/managers/FocusManager.as b/flash_decompiled/fl/managers/FocusManager.as new file mode 100644 index 0000000..999375b --- /dev/null +++ b/flash_decompiled/fl/managers/FocusManager.as @@ -0,0 +1,823 @@ +package fl.managers +{ + import fl.controls.Button; + import fl.core.UIComponent; + import flash.display.DisplayObject; + import flash.display.DisplayObjectContainer; + import flash.display.InteractiveObject; + import flash.display.SimpleButton; + import flash.display.Stage; + import flash.events.Event; + import flash.events.FocusEvent; + import flash.events.KeyboardEvent; + import flash.events.MouseEvent; + import flash.text.TextField; + import flash.text.TextFieldType; + import flash.ui.Keyboard; + import flash.utils.Dictionary; + + public class FocusManager implements IFocusManager + { + + private var focusableObjects:Dictionary; + + private var _showFocusIndicator:Boolean = true; + + private var defButton:Button; + + private var focusableCandidates:Array; + + private var _form:DisplayObjectContainer; + + private var _defaultButtonEnabled:Boolean = true; + + private var activated:Boolean = false; + + private var _defaultButton:Button; + + private var calculateCandidates:Boolean = true; + + private var lastFocus:InteractiveObject; + + private var lastAction:String; + + public function FocusManager(param1:DisplayObjectContainer) + { + super(); + focusableObjects = new Dictionary(true); + if(param1 != null) + { + _form = param1; + addFocusables(DisplayObject(param1)); + param1.addEventListener(Event.ADDED,addedHandler); + param1.addEventListener(Event.REMOVED,removedHandler); + activate(); + } + } + + public function get showFocusIndicator() : Boolean + { + return _showFocusIndicator; + } + + private function getIndexOfNextObject(param1:int, param2:Boolean, param3:Boolean, param4:String) : int + { + var _loc5_:int = 0; + var _loc6_:int = 0; + var _loc7_:DisplayObject = null; + var _loc8_:IFocusManagerGroup = null; + var _loc9_:int = 0; + var _loc10_:DisplayObject = null; + var _loc11_:IFocusManagerGroup = null; + _loc5_ = int(focusableCandidates.length); + _loc6_ = param1; + while(true) + { + if(param2) + { + param1--; + } + else + { + param1++; + } + if(param3) + { + if(param2 && param1 < 0) + { + break; + } + if(!param2 && param1 == _loc5_) + { + break; + } + } + else + { + param1 = int((param1 + _loc5_) % _loc5_); + if(_loc6_ == param1) + { + break; + } + } + if(isValidFocusCandidate(focusableCandidates[param1],param4)) + { + _loc7_ = DisplayObject(findFocusManagerComponent(focusableCandidates[param1])); + if(_loc7_ is IFocusManagerGroup) + { + _loc8_ = IFocusManagerGroup(_loc7_); + _loc9_ = 0; + while(_loc9_ < focusableCandidates.length) + { + _loc10_ = focusableCandidates[_loc9_]; + if(_loc10_ is IFocusManagerGroup) + { + _loc11_ = IFocusManagerGroup(_loc10_); + if(_loc11_.groupName == _loc8_.groupName && _loc11_.selected) + { + param1 = _loc9_; + break; + } + } + _loc9_++; + } + } + return param1; + } + } + return param1; + } + + public function set form(param1:DisplayObjectContainer) : void + { + _form = param1; + } + + private function addFocusables(param1:DisplayObject, param2:Boolean = false) : void + { + var focusable:IFocusManagerComponent = null; + var io:InteractiveObject = null; + var doc:DisplayObjectContainer = null; + var i:int = 0; + var child:DisplayObject = null; + var o:DisplayObject = param1; + var skipTopLevel:Boolean = param2; + if(!skipTopLevel) + { + if(o is IFocusManagerComponent) + { + focusable = IFocusManagerComponent(o); + if(focusable.focusEnabled) + { + if(focusable.tabEnabled && isTabVisible(o)) + { + focusableObjects[o] = true; + calculateCandidates = true; + } + o.addEventListener(Event.TAB_ENABLED_CHANGE,tabEnabledChangeHandler); + o.addEventListener(Event.TAB_INDEX_CHANGE,tabIndexChangeHandler); + } + } + else if(o is InteractiveObject) + { + io = o as InteractiveObject; + if(Boolean(io) && Boolean(io.tabEnabled) && findFocusManagerComponent(io) == io) + { + focusableObjects[io] = true; + calculateCandidates = true; + } + io.addEventListener(Event.TAB_ENABLED_CHANGE,tabEnabledChangeHandler); + io.addEventListener(Event.TAB_INDEX_CHANGE,tabIndexChangeHandler); + } + } + if(o is DisplayObjectContainer) + { + doc = DisplayObjectContainer(o); + o.addEventListener(Event.TAB_CHILDREN_CHANGE,tabChildrenChangeHandler); + if(doc is Stage || doc.parent is Stage || doc.tabChildren) + { + i = 0; + while(i < doc.numChildren) + { + try + { + child = doc.getChildAt(i); + if(child != null) + { + addFocusables(doc.getChildAt(i)); + } + } + catch(error:SecurityError) + { + } + i++; + } + } + } + } + + private function getChildIndex(param1:DisplayObjectContainer, param2:DisplayObject) : int + { + return param1.getChildIndex(param2); + } + + private function mouseFocusChangeHandler(param1:FocusEvent) : void + { + if(param1.relatedObject is TextField) + { + return; + } + param1.preventDefault(); + } + + private function focusOutHandler(param1:FocusEvent) : void + { + var _loc2_:InteractiveObject = null; + _loc2_ = param1.target as InteractiveObject; + } + + private function isValidFocusCandidate(param1:DisplayObject, param2:String) : Boolean + { + var _loc3_:IFocusManagerGroup = null; + if(!isEnabledAndVisible(param1)) + { + return false; + } + if(param1 is IFocusManagerGroup) + { + _loc3_ = IFocusManagerGroup(param1); + if(param2 == _loc3_.groupName) + { + return false; + } + } + return true; + } + + public function findFocusManagerComponent(param1:InteractiveObject) : InteractiveObject + { + var _loc2_:InteractiveObject = null; + _loc2_ = param1; + while(param1) + { + if(param1 is IFocusManagerComponent && IFocusManagerComponent(param1).focusEnabled) + { + return param1; + } + param1 = param1.parent; + } + return _loc2_; + } + + private function sortFocusableObjectsTabIndex() : void + { + var _loc1_:Object = null; + var _loc2_:InteractiveObject = null; + focusableCandidates = []; + for(_loc1_ in focusableObjects) + { + _loc2_ = InteractiveObject(_loc1_); + if(Boolean(_loc2_.tabIndex) && !isNaN(Number(_loc2_.tabIndex))) + { + focusableCandidates.push(_loc2_); + } + } + focusableCandidates.sort(sortByTabIndex); + } + + private function removeFocusables(param1:DisplayObject) : void + { + var _loc2_:Object = null; + var _loc3_:DisplayObject = null; + if(param1 is DisplayObjectContainer) + { + param1.removeEventListener(Event.TAB_CHILDREN_CHANGE,tabChildrenChangeHandler); + param1.removeEventListener(Event.TAB_INDEX_CHANGE,tabIndexChangeHandler); + for(_loc2_ in focusableObjects) + { + _loc3_ = DisplayObject(_loc2_); + if(DisplayObjectContainer(param1).contains(_loc3_)) + { + if(_loc3_ == lastFocus) + { + lastFocus = null; + } + _loc3_.removeEventListener(Event.TAB_ENABLED_CHANGE,tabEnabledChangeHandler); + delete focusableObjects[_loc2_]; + calculateCandidates = true; + } + } + } + } + + private function addedHandler(param1:Event) : void + { + var _loc2_:DisplayObject = null; + _loc2_ = DisplayObject(param1.target); + if(_loc2_.stage) + { + addFocusables(DisplayObject(param1.target)); + } + } + + private function getTopLevelFocusTarget(param1:InteractiveObject) : InteractiveObject + { + while(param1 != InteractiveObject(form)) + { + if(param1 is IFocusManagerComponent && IFocusManagerComponent(param1).focusEnabled && IFocusManagerComponent(param1).mouseFocusEnabled && UIComponent(param1).enabled) + { + return param1; + } + param1 = param1.parent; + if(param1 == null) + { + break; + } + } + return null; + } + + private function tabChildrenChangeHandler(param1:Event) : void + { + var _loc2_:DisplayObjectContainer = null; + if(param1.target != param1.currentTarget) + { + return; + } + calculateCandidates = true; + _loc2_ = DisplayObjectContainer(param1.target); + if(_loc2_.tabChildren) + { + addFocusables(_loc2_,true); + } + else + { + removeFocusables(_loc2_); + } + } + + public function sendDefaultButtonEvent() : void + { + defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); + } + + public function getFocus() : InteractiveObject + { + var _loc1_:InteractiveObject = null; + _loc1_ = form.stage.focus; + return findFocusManagerComponent(_loc1_); + } + + private function isEnabledAndVisible(param1:DisplayObject) : Boolean + { + var _loc2_:DisplayObjectContainer = null; + var _loc3_:TextField = null; + var _loc4_:SimpleButton = null; + _loc2_ = DisplayObject(form).parent; + while(param1 != _loc2_) + { + if(param1 is UIComponent) + { + if(!UIComponent(param1).enabled) + { + return false; + } + } + else if(param1 is TextField) + { + _loc3_ = TextField(param1); + if(_loc3_.type == TextFieldType.DYNAMIC || !_loc3_.selectable) + { + return false; + } + } + else if(param1 is SimpleButton) + { + _loc4_ = SimpleButton(param1); + if(!_loc4_.enabled) + { + return false; + } + } + if(!param1.visible) + { + return false; + } + param1 = param1.parent; + } + return true; + } + + public function set defaultButton(param1:Button) : void + { + var _loc2_:Button = null; + _loc2_ = param1 ? Button(param1) : null; + if(_loc2_ != _defaultButton) + { + if(_defaultButton) + { + _defaultButton.emphasized = false; + } + if(defButton) + { + defButton.emphasized = false; + } + _defaultButton = _loc2_; + defButton = _loc2_; + if(_loc2_) + { + _loc2_.emphasized = true; + } + } + } + + private function deactivateHandler(param1:Event) : void + { + var _loc2_:InteractiveObject = null; + _loc2_ = InteractiveObject(param1.target); + } + + public function setFocus(param1:InteractiveObject) : void + { + if(param1 is IFocusManagerComponent) + { + IFocusManagerComponent(param1).setFocus(); + } + else + { + form.stage.focus = param1; + } + } + + private function setFocusToNextObject(param1:FocusEvent) : void + { + var _loc2_:InteractiveObject = null; + if(!hasFocusableObjects()) + { + return; + } + _loc2_ = getNextFocusManagerComponent(param1.shiftKey); + if(_loc2_) + { + setFocus(_loc2_); + } + } + + private function hasFocusableObjects() : Boolean + { + var _loc1_:Object = null; + var _loc2_:int = 0; + var _loc3_:* = focusableObjects; + for(_loc1_ in _loc3_) + { + return true; + } + return false; + } + + private function tabIndexChangeHandler(param1:Event) : void + { + calculateCandidates = true; + } + + private function sortFocusableObjects() : void + { + var _loc1_:Object = null; + var _loc2_:InteractiveObject = null; + focusableCandidates = []; + for(_loc1_ in focusableObjects) + { + _loc2_ = InteractiveObject(_loc1_); + if(Boolean(_loc2_.tabIndex) && Boolean(!isNaN(Number(_loc2_.tabIndex))) && _loc2_.tabIndex > 0) + { + sortFocusableObjectsTabIndex(); + return; + } + focusableCandidates.push(_loc2_); + } + focusableCandidates.sort(sortByDepth); + } + + private function keyFocusChangeHandler(param1:FocusEvent) : void + { + showFocusIndicator = true; + if((param1.keyCode == Keyboard.TAB || param1.keyCode == 0) && !param1.isDefaultPrevented()) + { + setFocusToNextObject(param1); + param1.preventDefault(); + } + } + + private function getIndexOfFocusedObject(param1:DisplayObject) : int + { + var _loc2_:int = 0; + var _loc3_:int = 0; + _loc2_ = int(focusableCandidates.length); + _loc3_ = 0; + _loc3_ = 0; + while(_loc3_ < _loc2_) + { + if(focusableCandidates[_loc3_] == param1) + { + return _loc3_; + } + _loc3_++; + } + return -1; + } + + public function hideFocus() : void + { + } + + private function removedHandler(param1:Event) : void + { + var _loc2_:int = 0; + var _loc3_:DisplayObject = null; + var _loc4_:InteractiveObject = null; + _loc3_ = DisplayObject(param1.target); + if(_loc3_ is IFocusManagerComponent && focusableObjects[_loc3_] == true) + { + if(_loc3_ == lastFocus) + { + IFocusManagerComponent(lastFocus).drawFocus(false); + lastFocus = null; + } + _loc3_.removeEventListener(Event.TAB_ENABLED_CHANGE,tabEnabledChangeHandler); + delete focusableObjects[_loc3_]; + calculateCandidates = true; + } + else if(_loc3_ is InteractiveObject && focusableObjects[_loc3_] == true) + { + _loc4_ = _loc3_ as InteractiveObject; + if(_loc4_) + { + if(_loc4_ == lastFocus) + { + lastFocus = null; + } + delete focusableObjects[_loc4_]; + calculateCandidates = true; + } + _loc3_.addEventListener(Event.TAB_ENABLED_CHANGE,tabEnabledChangeHandler); + } + removeFocusables(_loc3_); + } + + private function sortByDepth(param1:InteractiveObject, param2:InteractiveObject) : Number + { + var _loc3_:String = null; + var _loc4_:String = null; + var _loc5_:int = 0; + var _loc6_:String = null; + var _loc7_:String = null; + var _loc8_:String = null; + var _loc9_:DisplayObject = null; + var _loc10_:DisplayObject = null; + _loc3_ = ""; + _loc4_ = ""; + _loc8_ = "0000"; + _loc9_ = DisplayObject(param1); + _loc10_ = DisplayObject(param2); + while(_loc9_ != DisplayObject(form) && Boolean(_loc9_.parent)) + { + _loc5_ = getChildIndex(_loc9_.parent,_loc9_); + _loc6_ = _loc5_.toString(16); + if(_loc6_.length < 4) + { + _loc7_ = _loc8_.substring(0,4 - _loc6_.length) + _loc6_; + } + _loc3_ = _loc7_ + _loc3_; + _loc9_ = _loc9_.parent; + } + while(_loc10_ != DisplayObject(form) && Boolean(_loc10_.parent)) + { + _loc5_ = getChildIndex(_loc10_.parent,_loc10_); + _loc6_ = _loc5_.toString(16); + if(_loc6_.length < 4) + { + _loc7_ = _loc8_.substring(0,4 - _loc6_.length) + _loc6_; + } + _loc4_ = _loc7_ + _loc4_; + _loc10_ = _loc10_.parent; + } + return _loc3_ > _loc4_ ? 1 : (_loc3_ < _loc4_ ? -1 : 0); + } + + public function get defaultButton() : Button + { + return _defaultButton; + } + + private function activateHandler(param1:Event) : void + { + var _loc2_:InteractiveObject = null; + _loc2_ = InteractiveObject(param1.target); + if(lastFocus) + { + if(lastFocus is IFocusManagerComponent) + { + IFocusManagerComponent(lastFocus).setFocus(); + } + else + { + form.stage.focus = lastFocus; + } + } + lastAction = "ACTIVATE"; + } + + public function showFocus() : void + { + } + + public function set defaultButtonEnabled(param1:Boolean) : void + { + _defaultButtonEnabled = param1; + } + + public function getNextFocusManagerComponent(param1:Boolean = false) : InteractiveObject + { + var _loc2_:DisplayObject = null; + var _loc3_:String = null; + var _loc4_:int = 0; + var _loc5_:Boolean = false; + var _loc6_:int = 0; + var _loc7_:int = 0; + var _loc8_:IFocusManagerGroup = null; + if(!hasFocusableObjects()) + { + return null; + } + if(calculateCandidates) + { + sortFocusableObjects(); + calculateCandidates = false; + } + _loc2_ = form.stage.focus; + _loc2_ = DisplayObject(findFocusManagerComponent(InteractiveObject(_loc2_))); + _loc3_ = ""; + if(_loc2_ is IFocusManagerGroup) + { + _loc8_ = IFocusManagerGroup(_loc2_); + _loc3_ = _loc8_.groupName; + } + _loc4_ = getIndexOfFocusedObject(_loc2_); + _loc5_ = false; + _loc6_ = _loc4_; + if(_loc4_ == -1) + { + if(param1) + { + _loc4_ = int(focusableCandidates.length); + } + _loc5_ = true; + } + _loc7_ = getIndexOfNextObject(_loc4_,param1,_loc5_,_loc3_); + return findFocusManagerComponent(focusableCandidates[_loc7_]); + } + + private function mouseDownHandler(param1:MouseEvent) : void + { + var _loc2_:InteractiveObject = null; + if(param1.isDefaultPrevented()) + { + return; + } + _loc2_ = getTopLevelFocusTarget(InteractiveObject(param1.target)); + if(!_loc2_) + { + return; + } + showFocusIndicator = false; + if((_loc2_ != lastFocus || lastAction == "ACTIVATE") && !(_loc2_ is TextField)) + { + setFocus(_loc2_); + } + lastAction = "MOUSEDOWN"; + } + + private function isTabVisible(param1:DisplayObject) : Boolean + { + var _loc2_:DisplayObjectContainer = null; + _loc2_ = param1.parent; + while(Boolean(_loc2_) && Boolean(!(_loc2_ is Stage)) && !(_loc2_.parent && _loc2_.parent is Stage)) + { + if(!_loc2_.tabChildren) + { + return false; + } + _loc2_ = _loc2_.parent; + } + return true; + } + + public function get nextTabIndex() : int + { + return 0; + } + + private function keyDownHandler(param1:KeyboardEvent) : void + { + if(param1.keyCode == Keyboard.TAB) + { + lastAction = "KEY"; + if(calculateCandidates) + { + sortFocusableObjects(); + calculateCandidates = false; + } + } + if(Boolean(defaultButtonEnabled && param1.keyCode == Keyboard.ENTER) && Boolean(defaultButton) && defButton.enabled) + { + sendDefaultButtonEvent(); + } + } + + private function focusInHandler(param1:FocusEvent) : void + { + var _loc2_:InteractiveObject = null; + var _loc3_:Button = null; + _loc2_ = InteractiveObject(param1.target); + if(form.contains(_loc2_)) + { + lastFocus = findFocusManagerComponent(InteractiveObject(_loc2_)); + if(lastFocus is Button) + { + _loc3_ = Button(lastFocus); + if(defButton) + { + defButton.emphasized = false; + defButton = _loc3_; + _loc3_.emphasized = true; + } + } + else if(Boolean(defButton) && defButton != _defaultButton) + { + defButton.emphasized = false; + defButton = _defaultButton; + _defaultButton.emphasized = true; + } + } + } + + private function tabEnabledChangeHandler(param1:Event) : void + { + var _loc2_:InteractiveObject = null; + var _loc3_:Boolean = false; + calculateCandidates = true; + _loc2_ = InteractiveObject(param1.target); + _loc3_ = focusableObjects[_loc2_] == true; + if(_loc2_.tabEnabled) + { + if(!_loc3_ && isTabVisible(_loc2_)) + { + if(!(_loc2_ is IFocusManagerComponent)) + { + _loc2_.focusRect = false; + } + focusableObjects[_loc2_] = true; + } + } + else if(_loc3_) + { + delete focusableObjects[_loc2_]; + } + } + + public function set showFocusIndicator(param1:Boolean) : void + { + _showFocusIndicator = param1; + } + + public function get form() : DisplayObjectContainer + { + return _form; + } + + private function sortByTabIndex(param1:InteractiveObject, param2:InteractiveObject) : int + { + return param1.tabIndex > param2.tabIndex ? 1 : (param1.tabIndex < param2.tabIndex ? -1 : int(sortByDepth(param1,param2))); + } + + public function activate() : void + { + if(activated) + { + return; + } + form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE,mouseFocusChangeHandler,false,0,true); + form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE,keyFocusChangeHandler,false,0,true); + form.addEventListener(FocusEvent.FOCUS_IN,focusInHandler,true); + form.addEventListener(FocusEvent.FOCUS_OUT,focusOutHandler,true); + form.stage.addEventListener(Event.ACTIVATE,activateHandler,false,0,true); + form.stage.addEventListener(Event.DEACTIVATE,deactivateHandler,false,0,true); + form.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler); + form.addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler,true); + activated = true; + if(lastFocus) + { + setFocus(lastFocus); + } + } + + public function deactivate() : void + { + form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE,mouseFocusChangeHandler); + form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE,keyFocusChangeHandler); + form.removeEventListener(FocusEvent.FOCUS_IN,focusInHandler,true); + form.removeEventListener(FocusEvent.FOCUS_OUT,focusOutHandler,true); + form.stage.removeEventListener(Event.ACTIVATE,activateHandler); + form.stage.removeEventListener(Event.DEACTIVATE,deactivateHandler); + form.removeEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler); + form.removeEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler,true); + activated = false; + } + + public function get defaultButtonEnabled() : Boolean + { + return _defaultButtonEnabled; + } + } +} + diff --git a/flash_decompiled/fl/managers/IFocusManager.as b/flash_decompiled/fl/managers/IFocusManager.as new file mode 100644 index 0000000..58a1e5e --- /dev/null +++ b/flash_decompiled/fl/managers/IFocusManager.as @@ -0,0 +1,40 @@ +package fl.managers +{ + import fl.controls.Button; + import flash.display.InteractiveObject; + + public interface IFocusManager + { + + function getFocus() : InteractiveObject; + + function deactivate() : void; + + function set defaultButton(param1:Button) : void; + + function set showFocusIndicator(param1:Boolean) : void; + + function get defaultButtonEnabled() : Boolean; + + function get nextTabIndex() : int; + + function get defaultButton() : Button; + + function get showFocusIndicator() : Boolean; + + function setFocus(param1:InteractiveObject) : void; + + function activate() : void; + + function showFocus() : void; + + function set defaultButtonEnabled(param1:Boolean) : void; + + function hideFocus() : void; + + function findFocusManagerComponent(param1:InteractiveObject) : InteractiveObject; + + function getNextFocusManagerComponent(param1:Boolean = false) : InteractiveObject; + } +} + diff --git a/flash_decompiled/fl/managers/IFocusManagerComponent.as b/flash_decompiled/fl/managers/IFocusManagerComponent.as new file mode 100644 index 0000000..df321cb --- /dev/null +++ b/flash_decompiled/fl/managers/IFocusManagerComponent.as @@ -0,0 +1,21 @@ +package fl.managers +{ + public interface IFocusManagerComponent + { + + function set focusEnabled(param1:Boolean) : void; + + function drawFocus(param1:Boolean) : void; + + function setFocus() : void; + + function get focusEnabled() : Boolean; + + function get tabEnabled() : Boolean; + + function get tabIndex() : int; + + function get mouseFocusEnabled() : Boolean; + } +} + diff --git a/flash_decompiled/fl/managers/IFocusManagerGroup.as b/flash_decompiled/fl/managers/IFocusManagerGroup.as new file mode 100644 index 0000000..b99c908 --- /dev/null +++ b/flash_decompiled/fl/managers/IFocusManagerGroup.as @@ -0,0 +1,15 @@ +package fl.managers +{ + public interface IFocusManagerGroup + { + + function set groupName(param1:String) : void; + + function set selected(param1:Boolean) : void; + + function get groupName() : String; + + function get selected() : Boolean; + } +} + diff --git a/flash_decompiled/fl/managers/StyleManager.as b/flash_decompiled/fl/managers/StyleManager.as new file mode 100644 index 0000000..0cb2348 --- /dev/null +++ b/flash_decompiled/fl/managers/StyleManager.as @@ -0,0 +1,264 @@ +package fl.managers +{ + import fl.core.UIComponent; + import flash.text.TextFormat; + import flash.utils.Dictionary; + import flash.utils.getDefinitionByName; + import flash.utils.getQualifiedClassName; + import flash.utils.getQualifiedSuperclassName; + + public class StyleManager + { + + private static var _instance:StyleManager; + + private var globalStyles:Object; + + private var classToDefaultStylesDict:Dictionary; + + private var styleToClassesHash:Object; + + private var classToStylesDict:Dictionary; + + private var classToInstancesDict:Dictionary; + + public function StyleManager() + { + super(); + styleToClassesHash = {}; + classToInstancesDict = new Dictionary(true); + classToStylesDict = new Dictionary(true); + classToDefaultStylesDict = new Dictionary(true); + globalStyles = UIComponent.getStyleDefinition(); + } + + public static function clearComponentStyle(param1:Object, param2:String) : void + { + var _loc3_:Class = null; + var _loc4_:Object = null; + _loc3_ = getClassDef(param1); + _loc4_ = getInstance().classToStylesDict[_loc3_]; + if(_loc4_ != null && _loc4_[param2] != null) + { + delete _loc4_[param2]; + invalidateComponentStyle(_loc3_,param2); + } + } + + private static function getClassDef(param1:Object) : Class + { + var component:Object = param1; + if(component is Class) + { + return component as Class; + } + try + { + return getDefinitionByName(getQualifiedClassName(component)) as Class; + } + catch(e:Error) + { + if(component is UIComponent) + { + try + { + return component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class; + } + catch(e:Error) + { + } + } + } + return null; + } + + public static function clearStyle(param1:String) : void + { + setStyle(param1,null); + } + + public static function setComponentStyle(param1:Object, param2:String, param3:Object) : void + { + var _loc4_:Class = null; + var _loc5_:Object = null; + _loc4_ = getClassDef(param1); + _loc5_ = getInstance().classToStylesDict[_loc4_]; + if(_loc5_ == null) + { + _loc5_ = getInstance().classToStylesDict[_loc4_] = {}; + } + if(_loc5_ == param3) + { + return; + } + _loc5_[param2] = param3; + invalidateComponentStyle(_loc4_,param2); + } + + private static function setSharedStyles(param1:UIComponent) : void + { + var _loc2_:StyleManager = null; + var _loc3_:Class = null; + var _loc4_:Object = null; + var _loc5_:String = null; + _loc2_ = getInstance(); + _loc3_ = getClassDef(param1); + _loc4_ = _loc2_.classToDefaultStylesDict[_loc3_]; + for(_loc5_ in _loc4_) + { + param1.setSharedStyle(_loc5_,getSharedStyle(param1,_loc5_)); + } + } + + public static function getComponentStyle(param1:Object, param2:String) : Object + { + var _loc3_:Class = null; + var _loc4_:Object = null; + _loc3_ = getClassDef(param1); + _loc4_ = getInstance().classToStylesDict[_loc3_]; + return _loc4_ == null ? null : _loc4_[param2]; + } + + private static function getInstance() : * + { + if(_instance == null) + { + _instance = new StyleManager(); + } + return _instance; + } + + private static function invalidateComponentStyle(param1:Class, param2:String) : void + { + var _loc3_:Dictionary = null; + var _loc4_:Object = null; + var _loc5_:UIComponent = null; + _loc3_ = getInstance().classToInstancesDict[param1]; + if(_loc3_ == null) + { + return; + } + for(_loc4_ in _loc3_) + { + _loc5_ = _loc4_ as UIComponent; + if(_loc5_ == null) + { + continue; + } + _loc5_.setSharedStyle(param2,getSharedStyle(_loc5_,param2)); + } + } + + private static function invalidateStyle(param1:String) : void + { + var _loc2_:Dictionary = null; + var _loc3_:Object = null; + _loc2_ = getInstance().styleToClassesHash[param1]; + if(_loc2_ == null) + { + return; + } + for(_loc3_ in _loc2_) + { + invalidateComponentStyle(Class(_loc3_),param1); + } + } + + public static function registerInstance(param1:UIComponent) : void + { + var inst:StyleManager = null; + var classDef:Class = null; + var target:Class = null; + var defaultStyles:Object = null; + var styleToClasses:Object = null; + var n:String = null; + var instance:UIComponent = param1; + inst = getInstance(); + classDef = getClassDef(instance); + if(classDef == null) + { + return; + } + if(inst.classToInstancesDict[classDef] == null) + { + inst.classToInstancesDict[classDef] = new Dictionary(true); + target = classDef; + while(defaultStyles == null) + { + if(target["getStyleDefinition"] != null) + { + defaultStyles = target["getStyleDefinition"](); + break; + } + try + { + target = instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class; + } + catch(err:Error) + { + try + { + target = getDefinitionByName(getQualifiedSuperclassName(target)) as Class; + } + catch(e:Error) + { + defaultStyles = UIComponent.getStyleDefinition(); + break; + } + } + } + styleToClasses = inst.styleToClassesHash; + for(n in defaultStyles) + { + if(styleToClasses[n] == null) + { + styleToClasses[n] = new Dictionary(true); + } + styleToClasses[n][classDef] = true; + } + inst.classToDefaultStylesDict[classDef] = defaultStyles; + inst.classToStylesDict[classDef] = {}; + } + inst.classToInstancesDict[classDef][instance] = true; + setSharedStyles(instance); + } + + public static function getStyle(param1:String) : Object + { + return getInstance().globalStyles[param1]; + } + + private static function getSharedStyle(param1:UIComponent, param2:String) : Object + { + var _loc3_:Class = null; + var _loc4_:StyleManager = null; + var _loc5_:Object = null; + _loc3_ = getClassDef(param1); + _loc4_ = getInstance(); + _loc5_ = _loc4_.classToStylesDict[_loc3_][param2]; + if(_loc5_ != null) + { + return _loc5_; + } + _loc5_ = _loc4_.globalStyles[param2]; + if(_loc5_ != null) + { + return _loc5_; + } + return _loc4_.classToDefaultStylesDict[_loc3_][param2]; + } + + public static function setStyle(param1:String, param2:Object) : void + { + var _loc3_:Object = null; + _loc3_ = getInstance().globalStyles; + if(_loc3_[param1] === param2 && !(param2 is TextFormat)) + { + return; + } + _loc3_[param1] = param2; + invalidateStyle(param1); + } + } +} + diff --git a/flash_decompiled/focusRectSkin.as b/flash_decompiled/focusRectSkin.as new file mode 100644 index 0000000..475028f --- /dev/null +++ b/flash_decompiled/focusRectSkin.as @@ -0,0 +1,15 @@ +package +{ + import flash.display.MovieClip; + + [Embed(source="/_assets/assets.swf", symbol="symbol5")] + public dynamic class focusRectSkin extends MovieClip + { + + public function focusRectSkin() + { + super(); + } + } +} + diff --git a/script/qxzb/auto_login.py b/script/auto_login.py similarity index 100% rename from script/qxzb/auto_login.py rename to script/auto_login.py diff --git a/script/decrypt_swf.py b/script/decrypt_swf.py new file mode 100644 index 0000000..5152c2d --- /dev/null +++ b/script/decrypt_swf.py @@ -0,0 +1,147 @@ +#!/usr/bin/env python3 +""" +解密游戏的 Main.swf 文件 +基于反编译得到的 BinaryEncrypt 类逻辑 +""" + +import sys + +def conversion_key(key_str): + """转换密钥字符串为数组""" + key_str = key_str.strip('-') + return [int(x) for x in key_str.split('-')] + + +def recover_swf_header(data): + """恢复 SWF 文件头""" + data[0] = 67 # 'C' + data[1] = 87 # 'W' + data[2] = 83 # 'S' + return data + + +def remove_random_bytes(data, key_length): + """移除随机字节""" + data_length = len(data) + result_length = data_length - key_length * 2 + + # 从 key_length 位置开始读取 result_length 字节 + result = bytearray(data[key_length:key_length + result_length]) + return result + + +def un_split_join_swf(data, key_array): + """反分割合并 SWF""" + key_length = len(key_array) + data_length = len(data) + + remainder = data_length % key_length + chunk_size = data_length // key_length + + # 分割数据 + chunks = [None] * key_length + for i in range(key_length): + start = i * chunk_size + end = start + chunk_size + chunks[key_array[i]] = bytearray(data[start:end]) + + # 获取余数部分 + remainder_data = bytearray(data[data_length - remainder:]) + + # 重新组合 + result = bytearray(data_length) + for i in range(key_length): + chunk = chunks[i] + start = i * chunk_size + result[start:start + chunk_size] = chunk + + # 添加余数部分 + result[data_length - remainder:] = remainder_data + + return result + + +def decrypt_swf(encrypted_data, key_str): + """解密 SWF 文件""" + print(f"🔐 开始解密...") + print(f" 密钥: {key_str}") + print(f" 加密文件大小: {len(encrypted_data)} 字节") + + # 转换密钥 + key_array = conversion_key(key_str) + print(f" 密钥数组: {key_array}") + + # 反分割合并 + print(f" 步骤1: 反分割合并...") + data = un_split_join_swf(encrypted_data, key_array) + + # 移除随机字节 + print(f" 步骤2: 移除随机字节...") + data = remove_random_bytes(data, len(key_array)) + + # 恢复 SWF 文件头 + print(f" 步骤3: 恢复 SWF 文件头...") + data = recover_swf_header(data) + + print(f"✅ 解密完成!") + print(f" 解密文件大小: {len(data)} 字节") + + return bytes(data) + + +def main(): + print("🎮 游戏 SWF 解密工具") + print("="*60) + + if len(sys.argv) < 2: + print("用法: python3 decrypt_swf.py <加密的SWF文件>") + print("\n步骤:") + print("1. 下载加密的 Main.swf:") + print(" curl http://47.121.191.22:8012/swf13/Main.swf?verson=jz -o Main_encrypted.swf") + print("\n2. 解密:") + print(" python3 decrypt_swf.py Main_encrypted.swf") + print("\n3. 用 JPEXS 打开解密后的文件:") + print(" Main_decrypted.swf") + sys.exit(1) + + input_file = sys.argv[1] + output_file = input_file.replace('.swf', '_decrypted.swf') + + # 从反编译得到的密钥 + key = "0-1-2-3-4-5-9-8-7-6" + + print(f"📂 输入文件: {input_file}") + print(f"📂 输出文件: {output_file}") + + try: + # 读取加密文件 + with open(input_file, 'rb') as f: + encrypted_data = f.read() + + # 解密 + decrypted_data = decrypt_swf(encrypted_data, key) + + # 保存解密文件 + with open(output_file, 'wb') as f: + f.write(decrypted_data) + + print(f"\n{'='*60}") + print(f"✅ 解密成功!") + print(f"📁 解密文件已保存: {output_file}") + print(f"\n💡 下一步:") + print(f" 用 JPEXS 打开 {output_file}") + print(f" 查找所有的 API 调用和 GM 命令") + print(f"{'='*60}") + + except FileNotFoundError: + print(f"❌ 文件不存在: {input_file}") + sys.exit(1) + except Exception as e: + print(f"❌ 解密失败: {e}") + import traceback + traceback.print_exc() + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/script/extract_cookie.py b/script/extract_cookie.py new file mode 100755 index 0000000..cd4c8b6 --- /dev/null +++ b/script/extract_cookie.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python3 +""" +从抓包文件中提取 Cookie 并保存 +""" + +import re +import sys +import os + +def extract_cookie_from_capture(capture_file): + """从抓包文件中提取 JSESSIONID Cookie""" + + print(f"📄 读取抓包文件: {capture_file}") + + try: + with open(capture_file, 'r', encoding='utf-8', errors='ignore') as f: + content = f.read() + + # 查找 JSESSIONID + # 格式1: Cookie: JSESSIONID=xxxxx + pattern1 = r'Cookie:\s*JSESSIONID=([A-Z0-9]+)' + matches1 = re.findall(pattern1, content) + + # 格式2: Set-Cookie: JSESSIONID=xxxxx + pattern2 = r'Set-Cookie:\s*JSESSIONID=([A-Z0-9]+)' + matches2 = re.findall(pattern2, content) + + # 合并所有匹配 + all_cookies = matches1 + matches2 + + if all_cookies: + # 使用最后一个(最新的)Cookie + cookie = all_cookies[-1] + print(f"✅ 找到 {len(all_cookies)} 个 Cookie") + print(f"🔑 最新 Cookie: JSESSIONID={cookie}") + return f"JSESSIONID={cookie}" + else: + print("❌ 未找到 Cookie") + return None + + except FileNotFoundError: + print(f"❌ 文件不存在: {capture_file}") + return None + except Exception as e: + print(f"❌ 读取失败: {e}") + return None + + +def save_cookie(cookie, output_file): + """保存 Cookie 到文件""" + + try: + # 确保目录存在 + os.makedirs(os.path.dirname(output_file), exist_ok=True) + + with open(output_file, 'w') as f: + f.write(cookie) + + print(f"💾 Cookie 已保存到: {output_file}") + return True + except Exception as e: + print(f"❌ 保存失败: {e}") + return False + + +def extract_apis(capture_file): + """提取所有 API 调用""" + + print(f"\n📋 提取 API 调用...") + + try: + with open(capture_file, 'r', encoding='utf-8', errors='ignore') as f: + content = f.read() + + # 查找 Target URI + pattern = r'Target URI:\s*([^\s]+)' + apis = re.findall(pattern, content) + + if apis: + print(f"✅ 找到 {len(apis)} 个 API 调用:") + + # 去重并排序 + unique_apis = sorted(set(apis)) + for api in unique_apis: + count = apis.count(api) + print(f" - {api} (调用 {count} 次)") + + return unique_apis + else: + print("❌ 未找到 API 调用") + return [] + + except Exception as e: + print(f"❌ 提取失败: {e}") + return [] + + +def main(): + print("🔍 Cookie 提取工具") + print("="*60) + + # 获取抓包文件路径 + if len(sys.argv) >= 2: + capture_file = sys.argv[1] + else: + capture_file = "/Users/amos/Downloads/game/7q/capture_20260301_100105.txt" + print(f"⚠️ 使用默认文件: {capture_file}") + + # 输出文件 + if len(sys.argv) >= 3: + output_file = sys.argv[2] + else: + output_file = "/Users/amos/Downloads/game/7q/latest_cookie.txt" + + print(f"📁 输出文件: {output_file}") + print("="*60) + print() + + # 提取 Cookie + cookie = extract_cookie_from_capture(capture_file) + + if cookie: + # 保存 Cookie + if save_cookie(cookie, output_file): + print() + print("="*60) + print("✅ 完成") + print("="*60) + print() + print("💡 使用方法:") + print(f" python3 exchange_item.py 9 10") + print() + else: + sys.exit(1) + else: + sys.exit(1) + + # 提取 API 列表 + extract_apis(capture_file) + + print() + print("="*60) + + +if __name__ == "__main__": + main() diff --git a/script/qxzb/test_bypass.py b/script/qxzb/test_bypass.py deleted file mode 100644 index 9ee60e7..0000000 --- a/script/qxzb/test_bypass.py +++ /dev/null @@ -1,187 +0,0 @@ -#!/usr/bin/env python3 -""" -测试绕过兑换条件的脚本 -警告:这些方法可能不起作用,仅用于学习研究 -""" - -import struct -import requests -import sys -import time - -SERVER_URL = "http://47.121.191.22:8012/gateway" -COOKIE_FILE = "/Users/amos/Downloads/game/7q/latest_cookie.txt" - -class AMF0: - """AMF0 协议编码器""" - - NUMBER = 0x00 - STRING = 0x02 - NULL = 0x05 - STRICT_ARRAY = 0x0A - - @staticmethod - def encode_amf_request(target_uri, response_uri, params): - """编码 AMF 请求""" - data = b'' - data += struct.pack('!H', 0x0000) - data += struct.pack('!H', 0x0000) - data += struct.pack('!H', 0x0001) - - target_bytes = target_uri.encode('utf-8') - data += struct.pack('!H', len(target_bytes)) + target_bytes - - response_bytes = response_uri.encode('utf-8') - data += struct.pack('!H', len(response_bytes)) + response_bytes - - data += struct.pack('!I', 0xFFFFFFFF) - - data += struct.pack('!BI', AMF0.STRICT_ARRAY, len(params)) - for item in params: - if isinstance(item, (int, float)): - data += struct.pack('!Bd', AMF0.NUMBER, float(item)) - elif isinstance(item, str): - s_bytes = item.encode('utf-8') - data += struct.pack('!BH', AMF0.STRING, len(s_bytes)) + s_bytes - - return data - - -def read_cookie(): - """从文件读取 Cookie""" - try: - with open(COOKIE_FILE, 'r') as f: - return f.read().strip() - except: - return None - - -def test_exchange(session, cookie, item_id, quantity, test_name): - """测试兑换""" - print(f"\n{'='*60}") - print(f"🧪 测试: {test_name}") - print(f"{'='*60}") - print(f"物品ID: {item_id}, 数量: {quantity}") - - amf_data = AMF0.encode_amf_request( - target_uri="com.huzi.play.action.ExchangeAction.exchangeItem", - response_uri="/1", - params=[item_id, quantity] - ) - - headers = { - 'Host': '47.121.191.22:8012', - 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14.0; rv:102.0) Gecko/20100101 Firefox/102.0', - 'Accept': '*/*', - 'Accept-Language': 'en-US,en;q=0.5', - 'Accept-Encoding': 'gzip, deflate', - 'Cookie': cookie, - 'Origin': 'http://47.121.191.22:8012', - 'Connection': 'keep-alive', - 'Referer': 'http://47.121.191.22:8012/swf13/Load.swf', - 'Content-Type': 'application/x-amf' - } - - try: - response = session.post(SERVER_URL, data=amf_data, headers=headers, timeout=10) - - if response.status_code == 200: - data = response.content - - # 查找 result - result_pos = data.find(b'result') - if result_pos > 0: - value_pos = result_pos + 6 - if value_pos < len(data) and data[value_pos] == 0x00: - if value_pos + 9 <= len(data): - result_value = struct.unpack('!d', data[value_pos+1:value_pos+9])[0] - result = int(result_value) - - # 查找 msg - msg = None - msg_pos = data.find(b'msg') - if msg_pos > 0: - msg_value_pos = msg_pos + 3 - if msg_value_pos < len(data) and data[msg_value_pos] == 0x02: - try: - msg_len = struct.unpack('!H', data[msg_value_pos+1:msg_value_pos+3])[0] - if msg_len > 0 and msg_value_pos + 3 + msg_len <= len(data): - msg = data[msg_value_pos+3:msg_value_pos+3+msg_len].decode('utf-8', errors='ignore') - except: - pass - - if result == 0: - print(f"✅ 成功!") - return True - else: - print(f"❌ 失败: result={result}, msg={msg}") - return False - - print(f"❌ 无法解析响应") - return False - else: - print(f"❌ HTTP {response.status_code}") - return False - except Exception as e: - print(f"❌ 异常: {e}") - return False - - -def main(): - print("🎮 Flash 游戏兑换绕过测试") - print("="*60) - print("⚠️ 警告:这些测试可能触发服务端安全机制") - print("="*60) - - cookie = read_cookie() - if not cookie: - print("❌ 无法读取 Cookie") - sys.exit(1) - - print(f"🔑 Cookie: {cookie}") - - session = requests.Session() - - item_id = int(sys.argv[1]) if len(sys.argv) > 1 else 9 - - # 测试1: 正常请求(基准) - test_exchange(session, cookie, item_id, 1, "正常请求 (数量=1)") - time.sleep(1) - - # 测试2: 零数量 - test_exchange(session, cookie, item_id, 0, "零数量 (数量=0)") - time.sleep(1) - - # 测试3: 负数数量(整数溢出) - test_exchange(session, cookie, item_id, -1, "负数数量 (数量=-1)") - time.sleep(1) - - # 测试4: 小数数量 - test_exchange(session, cookie, item_id, 0.1, "小数数量 (数量=0.1)") - time.sleep(1) - - # 测试5: 超大数量 - test_exchange(session, cookie, item_id, 999999, "超大数量 (数量=999999)") - time.sleep(1) - - # 测试6: 尝试其他物品ID - print(f"\n{'='*60}") - print("🔍 尝试其他物品ID") - print(f"{'='*60}") - - for test_id in range(1, 20): - if test_id == item_id: - continue - print(f"\n测试物品ID: {test_id}") - if test_exchange(session, cookie, test_id, 1, f"物品ID={test_id}"): - print(f"🎉 物品ID {test_id} 可以兑换!") - break - time.sleep(0.5) - - print(f"\n{'='*60}") - print("测试完成") - print(f"{'='*60}") - - -if __name__ == "__main__": - main() diff --git a/script/qxzb/start_capture.sh b/script/start_capture.sh similarity index 100% rename from script/qxzb/start_capture.sh rename to script/start_capture.sh diff --git a/script/qxzb/exchange_item.py b/script/use_item.py similarity index 50% rename from script/qxzb/exchange_item.py rename to script/use_item.py index f52a7a2..83ad36e 100644 --- a/script/qxzb/exchange_item.py +++ b/script/use_item.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """ -Flash 游戏兑换脚本 -基于抓包分析:登录后需要先调用 getExchangeItemList,然后才能兑换 +Flash 游戏批量使用物品脚本 +基于抓包分析:ItemAction.useBatchItem """ import struct @@ -10,8 +10,6 @@ import sys import time # ==================== 配置 ==================== -USERNAME = "amos" -PASSWORD = "xiaobiao." SERVER_URL = "http://47.121.191.22:8012/gateway" COOKIE_FILE = "/Users/amos/Downloads/game/7q/latest_cookie.txt" # ============================================== @@ -55,51 +53,33 @@ class AMF0: return data -def login(session): - """登录获取 Cookie""" - print("🔐 正在登录...") - - amf_data = AMF0.encode_amf_request( - target_uri="com.huzi.base.action.AccountAction.loginInner", - response_uri="/1", - params=[USERNAME, PASSWORD] - ) - - headers = { - 'Host': '47.121.191.22:8012', - 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14.0; rv:102.0) Gecko/20100101 Firefox/102.0', - 'Accept': '*/*', - 'Accept-Language': 'en-US,en;q=0.5', - 'Accept-Encoding': 'gzip, deflate', - 'Origin': 'http://47.121.191.22:8012', - 'Connection': 'keep-alive', - 'Referer': 'http://47.121.191.22:8012/swf13/Load.swf', - 'Content-Type': 'application/x-amf' - } - - response = session.post(SERVER_URL, data=amf_data, headers=headers, timeout=10) - - if response.status_code == 200: - # 提取 Cookie - if 'Set-Cookie' in response.headers: - set_cookie = response.headers['Set-Cookie'] - if 'JSESSIONID=' in set_cookie: - jsessionid = set_cookie.split(';')[0] - print(f"✅ 登录成功: {jsessionid}") - return jsessionid - - print("❌ 登录失败") +def read_cookie(): + """从文件读取 Cookie""" + try: + with open(COOKIE_FILE, 'r') as f: + cookie = f.read().strip() + if cookie: + return cookie + except FileNotFoundError: + print(f"⚠️ Cookie 文件不存在: {COOKIE_FILE}") + except Exception as e: + print(f"⚠️ 读取 Cookie 失败: {e}") return None -def init_exchange(session, cookie, item_id, request_id): - """初始化兑换(调用 getShowExchange)""" - print(f"📋 初始化物品 {item_id} 的兑换信息...") +def use_batch_item(session, cookie, item_instance_id, item_type_id, quantity, request_id): + """批量使用物品 + + Args: + item_instance_id: 物品实例ID(背包中的物品ID) + item_type_id: 物品类型ID + quantity: 使用数量 + """ amf_data = AMF0.encode_amf_request( - target_uri="com.huzi.play.action.ExchangeAction.getShowExchange", + target_uri="com.huzi.item.action.ItemAction.useBatchItem", response_uri=f"/{request_id}", - params=[item_id] + params=[item_instance_id, item_type_id, quantity] ) headers = { @@ -115,59 +95,7 @@ def init_exchange(session, cookie, item_id, request_id): 'Content-Type': 'application/x-amf' } - try: - response = session.post(SERVER_URL, data=amf_data, headers=headers, timeout=10) - if response.status_code == 200: - data = response.content - print(f"✅ 初始化成功 (响应大小: {len(data)} 字节)") - - # 打印响应内容用于分析 - print(f"🔍 响应内容 (十六进制前200字节):") - hex_data = data[:200].hex() - for i in range(0, len(hex_data), 64): - print(f" {hex_data[i:i+64]}") - - print(f"🔍 响应内容 (可读文本):") - try: - readable = data.decode('utf-8', errors='ignore') - lines = [line for line in readable.split('\n') if line.strip()] - for line in lines[:20]: # 只显示前20行 - print(f" {line}") - except: - pass - - return True - else: - print(f"❌ 初始化失败: HTTP {response.status_code}") - return False - except Exception as e: - print(f"❌ 初始化异常: {e}") - return False - - -def exchange_item(session, cookie, item_id, quantity, request_id): - """兑换物品""" - - amf_data = AMF0.encode_amf_request( - target_uri="com.huzi.play.action.ExchangeAction.exchangeItem", - response_uri=f"/{request_id}", - params=[item_id, quantity] - ) - - headers = { - 'Host': '47.121.191.22:8012', - 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 14.0; rv:102.0) Gecko/20100101 Firefox/102.0', - 'Accept': '*/*', - 'Accept-Language': 'en-US,en;q=0.5', - 'Accept-Encoding': 'gzip, deflate', - 'Cookie': cookie, - 'Origin': 'http://47.121.191.22:8012', - 'Connection': 'keep-alive', - 'Referer': 'http://47.121.191.22:8012/swf13/Load.swf', - 'Content-Type': 'application/x-amf' - } - - print(f"\n 📤 请求: ExchangeAction.exchangeItem({item_id}, {quantity})") + print(f"\n 📤 请求: ItemAction.useBatchItem({item_instance_id}, {item_type_id}, {quantity})") print(f" 📍 Response URI: /{request_id}") try: @@ -182,21 +110,10 @@ def exchange_item(session, cookie, item_id, quantity, request_id): # 检查是否是错误响应 if b'onStatus' in data: print(f" ⚠️ 检测到 onStatus (错误响应)") - print(f" 🔧 完整响应 (十六进制):") - hex_data = data.hex() - for i in range(0, len(hex_data), 64): - print(f" {hex_data[i:i+64]}") - print(f" 🔧 完整响应 (ASCII):") - try: - readable = data.decode('utf-8', errors='ignore') - for line in readable.split('\n'): - if line.strip(): - print(f" {line}") - except: - pass - + if b'error' in data: + print(f" ⚠️ 检测到 error 字段") if b'NullPointerException' in data: - print(f" ⚠️ NullPointerException - 需要先初始化") + print(f" ⚠️ NullPointerException") return False, "服务器错误" # 查找 result 字段 @@ -235,7 +152,9 @@ def exchange_item(session, cookie, item_id, quantity, request_id): pass return False, msg if msg else f"失败(result={result})" - return False, "无法解析响应" + # 如果没有 result 字段,可能是成功的(某些接口不返回 result) + print(f" ℹ️ 未找到 result 字段,可能已成功") + return True, "可能成功" else: return False, f"HTTP {response.status_code}" except Exception as e: @@ -244,24 +163,9 @@ def exchange_item(session, cookie, item_id, quantity, request_id): return False, f"异常: {e}" -def read_cookie(): - """从文件读取 Cookie""" - try: - with open(COOKIE_FILE, 'r') as f: - cookie = f.read().strip() - if cookie: - return cookie - except FileNotFoundError: - print(f"⚠️ Cookie 文件不存在: {COOKIE_FILE}") - except Exception as e: - print(f"⚠️ 读取 Cookie 失败: {e}") - return None - - def main(): - print("🎮 Flash 游戏兑换脚本") + print("🎮 Flash 游戏批量使用物品脚本") print("="*60) - print(f"👤 账号: {USERNAME}") # 从文件读取 Cookie cookie = read_cookie() @@ -272,83 +176,67 @@ def main(): print(f"🔑 Cookie: {cookie}") print("⚠️ 需要在游戏中保持登录状态") - # 物品ID + # 物品实例ID(从命令行参数获取) if len(sys.argv) >= 2: - item_id = int(sys.argv[1]) + item_instance_id = int(sys.argv[1]) else: - item_id = 9 - print(f"\n⚠️ 使用默认物品 ID: {item_id}") + print("\n❌ 缺少参数") + print("用法: python3 use_item.py <物品实例ID> <物品类型ID> <使用数量>") + print("示例: python3 use_item.py 1951 61 10") + print("\n说明:") + print(" 物品实例ID: 背包中物品的唯一ID(需要从游戏中获取)") + print(" 物品类型ID: 物品的类型ID") + print(" 使用数量: 一次性使用的数量(不能超过背包中的数量)") + sys.exit(1) - # 兑换次数 + # 物品类型ID if len(sys.argv) >= 3: - total_count = int(sys.argv[2]) + item_type_id = int(sys.argv[2]) else: - print("\n💡 请输入兑换次数") + print("\n❌ 缺少物品类型ID") + print("用法: python3 use_item.py <物品实例ID> <物品类型ID> <使用数量>") + sys.exit(1) + + # 使用数量 + if len(sys.argv) >= 4: + quantity = int(sys.argv[3]) + else: + print("\n💡 请输入使用数量") while True: try: - count_input = input("兑换次数 (默认1次): ").strip() - total_count = int(count_input) if count_input else 1 - if total_count > 0: + count_input = input("使用数量: ").strip() + quantity = int(count_input) if count_input else 1 + if quantity > 0: break print("❌ 请输入大于0的数字") except ValueError: print("❌ 请输入有效的数字") print("\n" + "="*60) - print(f"🎁 物品ID: {item_id}") - print(f"🔢 兑换次数: {total_count}") + print(f"🎁 物品实例ID: {item_instance_id}") + print(f"🏷️ 物品类型ID: {item_type_id}") + print(f"🔢 使用数量: {quantity}") print("="*60) + print("\n⚠️ 注意:这是批量使用,会一次性使用指定数量的物品") + print("⚠️ 如果背包中物品数量不足,服务端会返回错误") # 创建 Session session = requests.Session() - request_id = 2 - - # 初始化兑换(调用 getShowExchange,关键步骤!) - if not init_exchange(session, cookie, item_id, request_id): - print("\n❌ 初始化失败,无法继续") - sys.exit(1) - - request_id += 1 + request_id = 1 print("\n" + "="*60) - print("🚀 开始批量兑换") + print("🚀 开始使用物品") print("="*60) - success_count = 0 - fail_count = 0 + success, message = use_batch_item(session, cookie, item_instance_id, item_type_id, quantity, request_id) - for i in range(total_count): - print(f"\n[{i+1}/{total_count}] 兑换中...", end=" ") - - success, message = exchange_item(session, cookie, item_id, 1, request_id) - request_id += 1 - - if success: - success_count += 1 - print(f"✅ {message}") - else: - fail_count += 1 - print(f"❌ {message}") - - if fail_count >= 3: - print("\n⚠️ 连续失败3次") - choice = input("是否继续? (y/n): ").strip().lower() - if choice != 'y': - break - fail_count = 0 - - if i < total_count - 1: - time.sleep(0.5) + if success: + print(f"\n✅ 使用成功!已使用 {quantity} 个物品") + else: + print(f"\n❌ 使用失败:{message}") print("\n" + "="*60) - print("📊 兑换统计") - print("="*60) - print(f"✅ 成功: {success_count} 次") - print(f"❌ 失败: {fail_count} 次") - if success_count + fail_count > 0: - print(f"📈 成功率: {success_count/(success_count+fail_count)*100:.1f}%") - print("="*60) if __name__ == "__main__": diff --git a/start_capture.sh b/start_capture.sh new file mode 100755 index 0000000..0bb6f80 --- /dev/null +++ b/start_capture.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "$(dirname "$0")" +./script/start_capture.sh "$@" diff --git a/use_item.sh b/use_item.sh new file mode 100755 index 0000000..504e75a --- /dev/null +++ b/use_item.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "$(dirname "$0")" +python3 ./script/use_item.py "$@"