遇到问题,初步分析
最近遇到一个很老的 cocos2djs 游戏,用的引擎是 SpiderMonkey ,需要对这个游戏做一下修改。
先分析一下这个游戏的 js 文件,打开 assets 一看,加密了。每个加密文件都是 统一的 header
icegame 开头的,初步判定是 cocos2d 自己的 xxtea 加密
把 libcocos2djs.so 丢进 ida 分析一下。
确认函数符号没有被 strip 掉,那就 frida hook 试试,确认一下是不是走的 xxtea。
Java.perform(function() {
var Cocos2dxActivity = Java.use('org.cocos2dx.lib.Cocos2dxActivity'); //要hook的类名完整路径
Cocos2dxActivity.onLoadNativeLibraries.implementation = function() { // 重写要hook的方法getSign,当有多个重名函数时需要重载,function括号为函数的参数个数
var onLoadNativeLibraries = this.onLoadNativeLibraries(); //调用原始的函数实现并且获得返回值,如果不写的话我们下面的代码会全部替换原函数
console.log("File loaded hooking");
// send("arg1:" + arg1); //打印参数值
// send("arg2:" + arg2);
// send("arg3:" + arg3);
// send("result:" + Sign); //打印返回值
// return Sign; //函数有返回值时需要返回
hookXXTea();
};
})
function hookXXTea() {
// body...
var str_name_so = "libcocos2djs.so"; //需要hook的so名
var n_addr_func_offset = 0x116f44c; //需要hook的函数的偏移 unityengin.Time settimescale的代理函数的偏移
// 0x16a8a0
var n_addr_so = Module.findBaseAddress(str_name_so);
var tfd = n_addr_so.add(n_addr_func_offset)
console.log(n_addr_so)
console.log(tfd)
var tfdx = new NativeFunction(ptr(tfd),'int',['pointer'])
Interceptor.attach(ptr(tfd),{
onEnter:function(args){
// console.log("sss")
console.log(args[0])
console.log(args[1])
console.log(Memory.readCString(ptr(args[0])))
console.log(Memory.readCString(ptr(args[1])))
},
onLeave:function(retval){
// var t = new Date().getTime() *6000
// console.log(retval)
// retval.replace(t)
}
})
}
frida hook 之后 发现走了 xxtea,并且脚本打印出了密钥是
iloveuxuegaogame
尝试解密
知道算法且有密钥,那可以尝试解密一下,上网随便找了一个解密库,尝试了一下不行,简单看了一下 应该是修改了 XXTEA 算法的常量,导致标准库无法解密。不过我的需求是看 js 文件,不是提取游戏素材,那就没必要自己解密,直接从内存dump 解密后的数据就行。
xxtea 解密有时间再看咯
内存 dump 解密后的数据
xxtea_decrypt 函数返回值是一个指针,指针里面是解密后的数据,那只需要知道数据大小就可以 dump 下来了。直接上 frida
var size = 0
var i = 0;
Interceptor.attach(ptr(tfd1),{
onEnter:function(args){
console.log("+++++++++++++++++++1")
// console.log( Memory.readByteArray (args[0] ,100) )
// console.log( Memory.readByteArray (args[1] ,100) )
// console.log(args[1])
size = args[1]
},
onLeave:function(retval){
// console.log(retval)
if(size!=0){
// console.log(hexdump(retval))
console.log("start dump")
//判断文件格式
var buf = Memory.readByteArray (retval ,10)
var header = ab2hex(buf)
if( header.search("89504e47") != -1 ){
console.log("png")
dump_memory(retval,parseInt(size),"lshj_png_"+i+".png")
i=i+1
}
// let int32 = new Int32Array(x1,10)
// let dataView = new DataView(buf)
// let x1x = dataView.getUnt8(1)
// console.log(x1x)
if( header.search("2cc073b9") != -1){
console.log("jsc")
var jsc_name = Memory.readCString(retval.add(69))//publish/native/jsc/src/view/crossWar/CrossFightWar.js
var jsc_array = jsc_name.split("/")
var real_name = jsc_array[jsc_array.length-1].replace(".js",".jsc")
// console.log(hexdump(retval.add(69)))
// dump_memory(retval,parseInt(size),"lshj_jsc_"+real_name)
}
}
}
})
从内存 dump 出来了 jsc 文件 和一些 png
可以看到 图片 dump 出来是正常的,jsc 是 字节码。还需要反编译才能看到伪代码
jsc 反编译之前没接触过,查了一下资料感觉有点麻烦
反编译 jsc
看了一个原理,可以直接用 spidermonkey 自带的接口 反编译 jsc,用 JS_DecodeScript 可以解析。不过不同的 spidermonkey 版本要自己编译。
那就自己编译一个 v33 版本的 jsc 反编译工具吧。
先下载 spidermonkey 源码
https://github.com/cocos2d/Spidermonkey
默认版本就是 v33
然后进入 下载目录的 js/src ,打开 jsapi.h
添加一个函数
extern JS_PUBLIC_API(bool)
JS_DumpHeap(JSRuntime *rt, FILE *fp, void* startThing, JSGCTraceKind kind,
void *thingToFind, size_t maxDepth, void *thingToIgnore);
#endif
打开 jsapi.cpp
添加 JS_DumpHeap 的实现
JS_PUBLIC_API(bool)
js_DumpJSC(JSContext *cx, JSScript *scriptArg,char *filename)
{
js::gc::AutoSuppressGC suppressGC(cx);
Sprinter sprinter(cx);
if (!sprinter.init())
return false;
RootedScript script(cx, scriptArg);
bool ok = js_Disassemble(cx, script, true, &sprinter);
fprintf(stdout, "%s", sprinter.string());
FILE* f = fopen(filename, "wb");
if(f==NULL)
return false;
fwrite(sprinter.string(), 1, sprinter.getOffset(), f);
fclose(f);
return ok;
}
添加位置 就放在 JS_DecodeScript 下面就行。
然后下载一个写好的模块
https://share.weiyun.com/Hgi8tkd4
放在 src 目录下,再打开 src 目录下的 moz.build
TEST_DIRS += ['jsapi-tests', 'tests', 'gdb','decjsc']
测试目录添加刚刚下载的模块。
到这里就算把反编译逻辑弄好了,开始编译 SpiderMonkey,以及我们需要的 decjsc
根据自己的系统进入build 目录,我这里是 mac,进入 build-osx。
执行
../configure --enable-debug --disable-optimize
自动配置执行环境
然后
make
我这里遇到一个大坑,执行配置环境的时候报了异常
configure:9147:10: fatal error: 'new' file not found
#include <new>
^~~~~
1 warning and 1 error generated.
configure: failed program was:
#line 9146 "configure"
#include "confdefs.h"
#include <new>
int main() {
int *foo = new int;
; return 0; }
configure: error: /usr/bin/clang++
因为我的 os 版本是 10.15.7 ,已经算是稳定版了,没想到还有坑,找了很久找到了解决方案
https://diverse.space/2018/10/%E5%9C%A8-Mojave-%E4%B8%8B%E7%BC%96%E8%AF%91-SpiderMonkey
就是在环境变量配置一下Flags 就行
export CXXFLAGS="-stdlib=libc++ -mmacosx-version-min=10.7"
执行完这个再 配置环境然后make 就可以了。
make 完成后,反编译工具在 build 目录的 dist/bin/decjsc
直接用就可以了
./decjsc -d xxx.jsc
反编译出来的不是很好看,类似下面这样。
loc line op
----- ---- --
00000: 1 defvar "CityBattleLayer"
main:
00005: 1 bindname "CityBattleLayer"
00010: 1 name "cc"
00015: 1 getprop "Layer"
00020: 1 dup
00021: 1 callprop "extend"
00026: 1 swap
00027: 1 newinit 1
00032: 1 newarray 3
00036: 1 int8 6
00038: 1 initelem_array 0
00042: 1 int8 10
00044: 1 initelem_array 1
00048: 1 int8 8
00050: 1 initelem_array 2
00054: 1 endinit
00055: 1 initprop "partTimes"
00060: 1 newarray 3
00064: 1 string "first"
00069: 1 initelem_array 0
00073: 1 string "second"
00078: 1 initelem_array 1
00082: 1 string "third"
00087: 1 initelem_array 2
00091: 1 endinit
00092: 1 initprop "partTitle"
00097: 1 lambda (function () {
[sourceless code]
})
00102: 1 initprop "init"
00107: 1 lambda (function () {
[sourceless code]
})
00112: 1 initprop "initData"
00117: 1 lambda (function () {
[sourceless code]
})
00122: 1 initprop "initIcon"
00127: 2 lambda (function () {
[sourceless code]
})
00132: 2 initprop "battleStart"
00137: 3 lambda (function () {
[sourceless code]
})
00142: 3 initprop "partTilte"
00147: 3 lambda (function () {
[sourceless code]
})
00152: 3 initprop "partShow"
00157: 3 lambda (function () {
[sourceless code]
})
00162: 3 initprop "_gameOver"
00167: 3 lambda (function () {
[sourceless code]
})
00172: 3 initprop "_dropBloodAct"
00177: 3 lambda (function () {
[sourceless code]
})
00182: 3 initprop "_showDrop"
00187: 4 lambda (function () {
[sourceless code]
})
00192: 4 initprop "_doEnd"
00197: 4 lambda (function () {
[sourceless code]
})
00202: 4 initprop "close"
00207: 5 lambda (function () {
[sourceless code]
})
00212: 5 initprop "replay"
00217: 6 lambda (function () {
[sourceless code]
})
00222: 6 initprop "onSkip"
00227: 6 lambda (function () {
[sourceless code]
})
00232: 6 initprop "_normalDrop"
00237: 6 lambda (function () {
[sourceless code]
})
00242: 6 initprop "_stopAll"
00247: 7 lambda (function () {
[sourceless code]
})
00252: 7 initprop "onEnter"
00257: 7 lambda (function () {
[sourceless code]
})
00262: 7 initprop "onExit"
00267: 7 endinit
00268: 1 call 1
00271: 1 setname "CityBattleLayer"
00276: 1 pop
00277: 1 retrval
勉强看一下函数名,感觉作用不大啊,蛋疼。
感觉进入误区了
继续反编译jsc
找到一个看起来比较靠谱的反编译工具,不过和我的 spidermonkey 版本对不上,先用着吧,看看能反编译出来多少。
https://github.com/irelance/jsc-decompile-mozjs-34
我是 mac 流程就比较简单
brew install php@7.4
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
cd /project/path
composer install
这样这个工具就弄好了,反编译试试
php run.php xx.jsc > result.js
看看结果:
==================================0==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
var DX_Guide;
var HangBattleLayer;
DX_Guide = 0;
HangBattleLayer = cc.Layer.extend({hangType:0,init:function () { __FUNC_1__ },onEnterBattleFiled:function () { __FUNC_7__ },_updateLongStringForInit:function () { __FUNC_8__ },_updateLongStringForLogic:function () { __FUNC_9__ },startRescueTimer:function () { __FUNC_10__ },onDrawDataOK:function () { __FUNC_11__ },cleanup:function () { __FUNC_12__ },onAttackBoss:function () { __FUNC_13__ },onLHJ:function () { __FUNC_14__ },showLeftRescueTimer:function () { __FUNC_16__ },setData:function () { __FUNC_17__ },upDateView:function () { __FUNC_18__ },initHungBattle:function () { __FUNC_19__ },onGetConcubine:function () { __FUNC_20__ },onGodCardGet:function () { __FUNC_22__ },onMap:function () { __FUNC_23__ },onLhjWorShip:function () { __FUNC_25__ },onReview:function () { __FUNC_27__ },onMake:function () { __FUNC_29__ },onEnterBossFight:function () { __FUNC_31__ },onBoss:function () { __FUNC_39__ },onBattle:function () { __FUNC_40__ },_needEffect:function () { __FUNC_44__ },_makeBattleChangeArmature:function () { __FUNC_45__ },onSpeed:function () { __FUNC_48__ },onBattleResult:function () { __FUNC_56__ },onBattleFinish:function () { __FUNC_57__ },showBattleAward:function () { __FUNC_58__ },onSweepLevel:function () { __FUNC_61__ },onGetLevelRecords:function () { __FUNC_62__ },onEncounterInfo:function () { __FUNC_63__ },showRescueConcubine:function () { __FUNC_65__ },showFeiZiAdventureChat:function () { __FUNC_70__ },onFeiziAdventureChatOver:function () { __FUNC_72__ },showFeiziAdventureIcon:function () { __FUNC_73__ },onFeiZiAdventure:function () { __FUNC_77__ },onShowNewFeiZi:function () { __FUNC_79__ }});
HangBattleLayer.prototype._roleInfoStr=function () { __FUNC_80__ };
HangBattleLayer.prototype._loadLastBattleLevelId=function () { __FUNC_81__ };
HangBattleLayer.prototype.saveLastBattleLevelId=function () { __FUNC_82__ };
---------------------------------------
==========================================================================E
==================================1==================================S
------------------Argv------------------
cbk2,cfg,touchPanel,Bottom,key,self,adventureVisible,pos,concubineVisible,moduleType
---------------------------------------
----------------Content----------------
mH5Effect.removeLoadedEffects();
this.loopNode=getUI(this,"loopNode");
_local0=Config.Xconst[661];
if(_local0){
this.hangType=parseInt(_local0.value);
}
(this.hangType === 1)?this.HungBattleMovie=new HangBattleMovie1Gen():this.HungBattleMovie=new HangBattleMovie();
this.loopNode.addChild(this.HungBattleMovie);
this.redpointList=[];
this.top=getUI(this,"Top");
this.top.setPositionY(SH);
this.top.setBlangs(true);
_local1=getUI(this.top,"touchPanel");
_local1.setTouchEnabled(true);
_local1.addTouchEventListener(function () { __FUNC_2__ },this);
_local2=getUI(this,"Bottom");
_local2.setBlangs();
this.loopNode.setPositionY(((this.loopNode.getPositionY() - (((this.top.getPositionY() - _local2.getPositionY()) - 1036) / 2)) - 47));
this.countNode=getUI(this,"countNode");
this.sprCount=getUI(this,"sprCount");
this.btnGodCardGet=getUI(this,"btnGodCardGet");
this.btnMap=getUI(this,"btnMap");
this.btnReview=getUI(this,"btnReview");
this.btnMake=getUI(this,"btnMake");
this.btnBoss=getUI(this,"btnBoss");
this.btnSpeed=getUI(this,"btnSpeed");
this.txtDesc=getUI(this,"txtDesc");
this.reWardNode=getUI(this,"reWardNode");
this.Sprite_line1=getUI(this,"Sprite_line1");
this.Sprite_line2=getUI(this,"Sprite_line2");
if((SH < 960)){
this.txtDesc.setFontSize(18);
this.btnMake.setScale(0.7);
this.btnBoss.setScale(0.7);
this.btnSpeed.setScale(0.7);
this.btnMake.setPositionY((this.btnMake.getPositionY() - 15));
this.btnBoss.setPositionY((this.btnBoss.getPositionY() - 15));
this.btnSpeed.setPositionY((this.btnSpeed.getPositionY() - 15));
this.Sprite_line1.setPositionY((this.Sprite_line1.getPositionY() - 20));
this.Sprite_line2.setPositionY((this.Sprite_line2.getPositionY() - 30));
}
this.btnNode=getUI(this,"btnNode");
this.txtMapName=getUI(this,"txtMapName");
UIUtil.setOutline(this.txtMapName,ColorDefine.OUTLINE_COLOR_HANGBATTLELAYER_TXTMAPNAME,ColorDefine.OUTLINE_SIZE_TWO_PIXEL);
this.txtExp=getUI(this,"txtExp");
UIUtil.setOutline(this.txtExp,ColorDefine.OUTLINE_COLOR_HANGBATTLELAYER_TXTEXP,ColorDefine.OUTLINE_SIZE_TWO_PIXEL);
this.txtCoin=getUI(this,"txtCoin");
UIUtil.setOutline(this.txtCoin,ColorDefine.OUTLINE_COLOR_HANGBATTLELAYER_TXTCOIN,ColorDefine.OUTLINE_SIZE_TWO_PIXEL);
this.txtBeliever=getUI(this,"txtBeliever");
UIUtil.setOutline(this.txtBeliever,ColorDefine.OUTLINE_COLOR_HANGBATTLELAYER_TXTBELIEVER,ColorDefine.OUTLINE_SIZE_TWO_PIXEL);
this.txtBossExp=getUI(this,"txtBossExp");
this.txtBossCoin=getUI(this,"txtBossCoin");
this.txtLimitLevel=getUI(this,"txtLimitLevel");
this.Panel_bottom_bg=getUI(this,"Panel_bottom_bg");
this.Panel_top_bg=getUI(this,"Panel_top_bg");
this.maxResetIdInConfig=0;
while(Config.XResetPrice has _iternext){
_local3=_iternext;
if(Config.XResetPrice.hasOwnProperty(_local3)){
if((parseInt(Config.XResetPrice[_local3].id) > this.maxResetIdInConfig)){
this.maxResetIdInConfig=Config.XResetPrice[_local3].id;
}}
}
_aliased6139=this;
this.btWorShip=getUI(this,"btWorShip");
this.worShipRed=getUI(this.btWorShip,"worShipRed");
this.worShipRed.setVisible(mRedPoint.isWorShipRedPoint());
this.btWorShip.addTouchEventListener(function () { __FUNC_3__ },this);
this.btAdventure=getUI(this,"btAdventure");
this.txtAdventureCount=getUI(this.btAdventure,"txtAdventureCount");
this.txtAdventureCount.ignoreContentAdaptWithSize(true);
UIUtil.setOutline(this.txtAdventureCount,ColorDefine.OUTLINE_COLOR_HANGBATTLELAYER_TXTADVENTURE,ColorDefine.OUTLINE_SIZE_ONE_PIXEL);
this.bgCount=getUI(this.btAdventure,"bgCount");
this.btAdventure.addTouchEventListener(function () { __FUNC_4__ },this);
this.btConcubine=getUI(this,"btConcubine");
this.btConcubine.addTouchEventListener(this.onGetConcubine,this);
mRedPoint.registerFunction(this.btConcubine,mRedPoint.FuncId.RP_HangBattle_SaveFeiZi,65,75,this.redpointList);
this.concubineRescueTimer=getUI(this.btConcubine,"txtTimer",EXT.TXT_OUTLINE);
this.btFeiziAdventure=getUI(this,"btFeiziAdventure");
this.btFeiziAdventure.addTouchEventListener(this.onFeiZiAdventure,this);
this.btFeiziAdventure.setVisible(false);
_local5=mRole.getFeatureOpenStatus("fruit_jackpot");
this.btAdventure.setVisible(_local5);
this.onlineReward=OnlineRewardLayer.getCom(this,"onlineReward");
this.taskLayer=TaskLayer.getCom(this,"taskLayer");
this.taskLayer.setInBattleLayer(true);
this.btnGodCardGet.addZoomClickEventListener(this.onGodCardGet.bind(this));
this.btnMap.addZoomClickEventListener(this.onMap.bind(this));
this.btnReview.addZoomClickEventListener(this.onReview.bind(this));
this.btnMake.addTouchEventListener(this.onMake,this);
this.btnBoss.addTouchEventListener(this.onBoss,this);
this.btnSpeed.addTouchEventListener(this.onSpeed,this);
this.addCustomListener(P.TypeGetStatueInfo,this.upDateView.bind(this));
this.addCustomListener(P.TypeSweepLevel,this.onSweepLevel.bind(this));
this.addCustomListener(P.TypeTopUp,this.upDateView.bind(this));
this.addCustomListener(P.TypeGetLevelRecords,this.onGetLevelRecords.bind(this));
this.addCustomListener(P.TypeAttackLevel,this.onBattleResult.bind(this));
this.addCustomListener(P.TypeEncounterInfo,this.onEncounterInfo.bind(this));
this.addCustomListener(P.TypeEncounterAward,this.onEncounterInfo.bind(this));
this.addCustomListener(P.TypeSysBuffNotifyMsg,this.onGetLevelRecords.bind(this));
this.addCustomListener("ON_BATTLE",this.onBattle.bind(this));
this.addCustomListener(P.TypeGetFriut,this.onLHJ.bind(this));
this.addCustomListener(P.TypeFeiziInfo,this.onShowNewFeiZi.bind(this));
this.addCustomListener("AttackBoss",this.onAttackBoss.bind(this));
this.addCustomListener(P.TypeDrawFriut,this.onDrawDataOK.bind(this));
this.addCustomListener("ON_HANG_BATTLE_SET_DATA",this.setData.bind(this));
this.addCustomListener(P.TypeFruitPrizeMobaiInfo,this.onLhjWorShip.bind(this));
this.addCustomListener("SHOW_FEIZI_ADVENTURE",this.onFeiziAdventureChatOver.bind(this));
this.addCustomListener(P.TypeSaveFeiziKarmaStageResult,this.showFeiziAdventureIcon.bind(this));
this.addCustomListener("ENTER_BATTLE_FIELD",this.onEnterBattleFiled.bind(this));
if(mRole.isInGuide()&&(mRole.GuideStep === mGuide.guideEnum.hangBattle_2)){
mGuide.nextGuideStep();
mGuide.setupGuidePointer(null,true,"dogBattleParpare",((SH * 0.5) + 200),null,mRole.GuideStep);
this.scheduleOnce(function () { __FUNC_5__ },2);
}
if(mRole.isInGuide()&&(mRole.GuideStep === mGuide.guideEnum.hangBattle_4)){
mGuide.nextGuideStep();
_local6=this.btnMake.getPosition();
_local6.y=(this.btnBoss.getParent().getPositionY() + 100);
mGuide.setupGuidePointer(this.btnMake,true,"clickShop",((SH * 0.5) + 200),_local6,mRole.GuideStep);
}
if(mRole.isInGuide()&&(mRole.GuideStep === mGuide.guideEnum.hangBattle_5)){
mGuide.nextGuideStep();
}
if(mRole.isInGuide()&&(mRole.GuideStep === mGuide.guideEnum.hangBattle_6)){
mGuide.nextGuideStep();
mGuide.setupGuidePointer(null,true,"finishGuide",((SH * 0.5) + 100),null,mRole.GuideStep);
mGuide.clearGuideDDCData();
this.scheduleOnce(function () { __FUNC_6__ },2);
}
_local7=!((DD[T.KingInfo].saveFeiziStatus === 0) || (DD[T.KingInfo].saveFeiziStatus === 2));
_local8=mModuleControl.ModuleType.Nation;
if(mModuleControl.isCloseModule(_local8)){
_local7=false;
}
this.btConcubine.setVisible(_local7);
this.isCanLookConcubine=false;
if(_local7){
if(!(_local5)){
this.btConcubine.setPositionY(-150);
}
this.startRescueTimer();
}
this.showFeiZiAdventureChat();
HUD.hangBattle=this;
if(cbk2){
cbk2(this);
}
TextureUtil.isVisitHangleBattle=true;
this._updateLongStringForInit();
---------------------------------------
==========================================================================E
==================================2==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
HUD.showLayer(HUD_LIST.Tip_SysBuff,HUD.getTipLayer(),null,true);
}
---------------------------------------
==========================================================================E
==================================3==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
_aliased6139.clickWorShip=true;
DC.wsData("GetFruitMobaiInfo");
}
---------------------------------------
==========================================================================E
==================================4==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
if(mRole.getFeatureOpenStatus("fruit_jackpot",true)){
DC.wsData("GetFruit");
}}
---------------------------------------
==========================================================================E
==================================5==================================S
------------------Argv------------------
pos
---------------------------------------
----------------Content----------------
_local0=this.btnBoss.getPosition();
_local0.y=(this.btnBoss.getParent().getPositionY() + 100);
mGuide.setupGuidePointer(this.btnBoss,true,"clickFightBoss",((SH * 0.5) + 200),_local0,mRole.GuideStep);
---------------------------------------
==========================================================================E
==================================6==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
DD[T.CharacterInfo].battlePower=4455;
DD[T.ItemList]=[];
mGuide.isLevelUp=true;
DD[T.LevelUpAward]=null;
DC.wsData("FinishUserGuide/11");
mGuide.clearGuidePointer();
DC.wsData("godTitleDraw");
mGuide.inGuide=false;
cc.eventManager.dispatchCustomEvent("SDK_TRACK_EVENT",{eventType:SDK_TRACK_EVENT.EVENT_LEARNING_COMPLETE});
---------------------------------------
==========================================================================E
==================================7==================================S
------------------Argv------------------
event,flag
---------------------------------------
----------------Content----------------
_local0=event.getUserData();
!(_local0)this.setVisible();
this.removeFromParent();
---------------------------------------
==========================================================================E
==================================8==================================S
------------------Argv------------------
Text_1_BtMake,txtFight_btBoss,Text_1_btSpeed
---------------------------------------
----------------Content----------------
if(LangDefine.LANGUAGE_LONG_STRING){
_local0=getUI(this.btnMake,"Text_1");
_local1=getUI(this.btnBoss,"txtFight");
_local2=getUI(this.btnSpeed,"Text_1");
autoLabelFontSize(_local0);
autoLabelFontSize(_local1);
autoLabelFontSize(_local2);
}
---------------------------------------
==========================================================================E
==================================9==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
if(LangDefine.LANGUAGE_LONG_STRING){
autoExtendLabelByWidth(this.txtLimitLevel,{anchor:cc.p(0.5,1)});
}
---------------------------------------
==========================================================================E
==================================10==================================S
------------------Argv------------------
timeOffset
---------------------------------------
----------------Content----------------
_local0=parseInt(((Date.now() - DD[T.KingInfo].msgTime) / 1000));
this.leftRescueTimer=((DD[T.KingInfo].saveFeiziLeftTime - _local0) + 2);
if((this.leftRescueTimer > 0)){
this.isCanLookConcubine=true;
}
this.unschedule(this.showLeftRescueTimer);
this.schedule(this.showLeftRescueTimer,1);
this.showLeftRescueTimer();
---------------------------------------
==========================================================================E
==================================11==================================S
------------------Argv------------------
itemCount
---------------------------------------
----------------Content----------------
if(checkNoRunning(this)){
return undefined;
}
_local0=mItem.getCountByItemId(ID_BET);
this.txtAdventureCount.setString(_local0);
---------------------------------------
==========================================================================E
==================================12==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
this._super();
mRedPoint.unregisterFunction(this.redpointList);
this.redpointList=null;
HUD.hangBattle=null;
this.HungBattleMovie=null;
TextureUtil.removeHangBattleBG();
---------------------------------------
==========================================================================E
==================================13==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
this.onEnterBossFight();
---------------------------------------
==========================================================================E
==================================14==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
if(checkNoRunning(this)){
return undefined;
}
HUD.showLayer(HUD_LIST.LhjMain,HUD.getTopContent(),null,null,function () { __FUNC_15__ },null,true);
---------------------------------------
==========================================================================E
==================================15==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setData();
HUD.hideHang();
---------------------------------------
==========================================================================E
==================================16==================================S
------------------Argv------------------
timeStr
---------------------------------------
----------------Content----------------
if((this.leftRescueTimer > 0)){
this.leftRescueTimer=(this.leftRescueTimer - 1);
} else {
}
this.isCanLookConcubine=false;
this.concubineRescueTimer.setVisible(false);
mRedPoint.updateRedPoint([mRedPoint.FuncId.RP_HangBattle_SaveFeiZi,mRedPoint.FuncId.RP_HangBattle]);
this.unschedule(this.showLeftRescueTimer);
_local0=getTimeString(this.leftRescueTimer);
this.concubineRescueTimer.setString(_local0);
---------------------------------------
==========================================================================E
==================================17==================================S
------------------Argv------------------
character
---------------------------------------
----------------Content----------------
this.onDrawDataOK();
_local0=DD[T.CharacterInfo];
this.levelId=50001;
if(_local0 && _local0.hasOwnProperty("towerLevel") && (_local0.towerLevel != null)){
this.levelId=parseInt(_local0.towerLevel);
}
if((DD[T.LevelInfo] == null)){
DC.wsData("GetLevelRecords");
} else {
}
this.upDateView();
this.HungBattleMovie.init(this.levelId,this.countNode,this.sprCount);
this.justShow=true;
---------------------------------------
==========================================================================E
==================================18==================================S
------------------Argv------------------
levelInfo,bottomHeight,levelData,bossReward,reward,length,gap,i,Cards,info,isFragment,rewardData,spr,needCount,countLbl,soulInfo,count,txtFight,sprite,levelName,obj
---------------------------------------
----------------Content----------------
_local0=Config.XLevel[this.levelId];
_local1=(((SH - 456) - BOTTOM_H) - TOP_H);
_local2=DD[T.LevelList][this.levelId.toString()];
if(this.reWardNode){
this.reWardNode.removeAllChildren();
}
_local3=_iternext;
if(DX_Guide || mRole.isInGuide() && (mRole.GuideStep === mGuide.guideEnum.hangBattle_2)){
_local4="4:40002:20";
_local3=_local4.split("|");
} else if(_local2&&_local2.star){
_local3=_local0.spAwardString.split("|");
} else {
}
_local3=_local0.clearanceAwardString.split("|");
_local5=_local3.length;
_local6=((640 - (101 * _local5)) / (_local5 + 1));
_local7=0;
while((_local7 < _local5)){
_local8=load_ccs(HUD_LIST.Icon2.ccs,HUD_LIST.Icon2.cls);
_local8.init();
if(LangDefine.LANGUAGE_LONG_STRING){
_local8.setAutoExtendLabelExtraWidth(110);
}
_local8.enableTouchInfo();
_local8.setAnchorPoint(0,0);
_local8.setPosition(((_local6 * (_local7 + 1)) + (_local7 * 101)),-100);
this.reWardNode.addChild(_local8);
_local8.setPositionY(-100);
_local8.setScale(0.8);
if((SH < 960)){
_local8.setScale(0.7);
}
_local9=_local3[_local7].split(":");
_local10=(_local9[0] === "2");
_local11={};
_local11.typeId=_local9[1];
_local11.count=_local9[2];
_local12=null;
_local13=0;
_local14=null;
if(_local10){
_local12=new cc.Sprite((C_RES_UI + "hangBattle/bg_guaji_006.png"));
_local15=mNpc.getSoulByTypeId(_local11.typeId);
_local16=0;
if((_local15 !== null)){
_local16=_local15.count;
}
_local13=parseInt(Config.XNpc[_local11.typeId].spiritToRecruit);
_local14=createLabel(((_local16 + "/") + _local13),UIUtil.getFontName(),20,ColorDefine.HANGBATTLELAYER_ICON_COUNT_COLOR);
_local12.setPosition(50.5,-45);
_local8.addChild(_local12);
_local14.setAnchorPoint(0.5,0.5);
_local14.setPosition(50.5,-45);
_local8.addChild(_local14);
} else if((_local11.typeId >= 40018)&&(_local11.typeId <= 40020)){
_local12=new cc.Sprite((C_RES_UI + "hangBattle/bg_guaji_007.png"));
_local13=mItem.getCountByItemId(_local11.typeId);
_local14=createLabel((_local13 + ""),UIUtil.getFontName(),20,ColorDefine.HANGBATTLELAYER_ICON_COUNT_COLOR);
_local12.setPosition(50.5,-45);
_local8.addChild(_local12);
_local14.setAnchorPoint(0.5,0.5);
_local14.setPosition(50.5,-45);
_local8.addChild(_local14);
}
_local8.setData(_local11);
_local8.setFragment(_local10);
_local8.setNameVisible(true);
_local7=(_local7 + 1);
_local7=0;
}
this.txtBossExp.setString(("+" + _local0.expAwardBoss));
this.txtBossCoin.setString(("+" + _local0.coinAwardBoss));
this.txtLimitLevel.setVisible(true);
!(_local2 && _local2.star)this.txtBossExp.setVisible();
!(_local2 && _local2.star)this.txtBossCoin.setVisible();
!(_local2 && _local2.star)getUI(this,"sprCoin").setVisible();
!(_local2 && _local2.star)getUI(this,"sprExp").setVisible();
_local17=getUI(this.btnBoss,"txtFight");
_local18=getUI(this.btnBoss,"Sprite_1");
if(_local2&&_local2.star){
this.txtLimitLevel.setString(G_S.HANGBATTLELAYER_JS_884);
this.txtLimitLevel.setVisible(false);
this.bossButtonType=1;
_local18.setTexture((C_RES_COM + "ic_088.png"));
_local17.setString(G_S.HANGBATTLELAYER_JS_885);
getUI(this,"sprBossReward").setTexture((C_RES_UI + "hangBattle/ft_guaji_004.png"));
} else if((DD[T.CharacterInfo].level >= _local0.dailyLimit)){
this.txtLimitLevel.setVisible(false);
} else {
}
this.txtLimitLevel.setString(formatString(G_S.HANGBATTLELAYER_JS_886,[_local0.dailyLimit]));
this.bossButtonType=2;
_local18.setTexture((C_RES_COM + "ic_082.png"));
_local17.setString(G_S.HANGBATTLELAYER_JS_887);
getUI(this,"sprBossReward").setTexture((C_RES_UI + "hangBattle/ft_guaji_002.png"));
_local19=_local0.name.replace("|"," ");
this.txtDesc.setString(_local0.description);
this.txtMapName.setString(_local19);
_local20=mRole.getSysBuff();
this.txtExp.setString((_local20.exp + G_S.HANGBATTLELAYER_JS_888));
this.txtCoin.setString((_local20.coin + G_S.HANGBATTLELAYER_JS_888));
this.txtBeliever.setString((_local20.believer + G_S.HANGBATTLELAYER_JS_888));
this._updateLongStringForLogic();
---------------------------------------
==========================================================================E
==================================19==================================S
------------------Argv------------------
character
---------------------------------------
----------------Content----------------
_local0=DD[T.CharacterInfo];
if(parseInt(_local0.towerLevel)){
this.levelId=parseInt(_local0.towerLevel);
} else {
}
this.levelId=50001;
this.HungBattleMovie.reset(this.levelId);
---------------------------------------
==========================================================================E
==================================20==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
if(this.isCanLookConcubine){
HUD.showLayer(HUD_LIST.Harem_LiHui,HUD.getTipLayer(),null,true,function () { __FUNC_21__ },this);
return undefined;
}
if((DD[T.KingInfo].saveFeiziStatus === 1)){
DC.wsData("TakeSaveFeizi");
}}
---------------------------------------
==========================================================================E
==================================21==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.onDrawLiHui(getConstValue(CONST_ENUM.SaveFeiZiId),true,this.leftRescueTimer);
if((LD.getLocalData(LD.K_SAVE_FEIZI_CLICK) == "")){
LD.setLocalData(LD.K_SAVE_FEIZI_CLICK,1);
mRedPoint.updateRedPoint([mRedPoint.FuncId.RP_HangBattle_SaveFeiZi,mRedPoint.FuncId.RP_HangBattle]);
}
---------------------------------------
==========================================================================E
==================================22==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
HUD.showMainContent(HUD_LIST.GodCardPreview,null,null,this);
}
---------------------------------------
==========================================================================E
==================================23==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
HUD.showMainContent(HUD_LIST.InstanceZone,null,function () { __FUNC_24__ },this);
HUD.getMainPage().setTop(1);
}
---------------------------------------
==========================================================================E
==================================24==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setJumpLevelId(this.levelId);
tip.setData();
---------------------------------------
==========================================================================E
==================================25==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
if(checkNoRunning(this)){
return undefined;
}
if(this.clickWorShip){
this.clickWorShip=false;
HUD.showMainContent(HUD_LIST.LhjWorShip,null,function () { __FUNC_26__ },this);
HUD.getMainPage().setTop(1);
} else {
}
this.worShipRed.setVisible(mRedPoint.isWorShipRedPoint());
---------------------------------------
==========================================================================E
==================================26==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setData();
---------------------------------------
==========================================================================E
==================================27==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
HUD.showLayer(HUD_LIST.Tip_HangReward,HUD.getTipLayer(),null,true,function () { __FUNC_28__ },this);
}
---------------------------------------
==========================================================================E
==================================28==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setData(this.levelId);
---------------------------------------
==========================================================================E
==================================29==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
HUD.showMainContent(HUD_LIST.Adventure,null,function () { __FUNC_30__ },this);
}
---------------------------------------
==========================================================================E
==================================30==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setData(2);
---------------------------------------
==========================================================================E
==================================31==================================S
------------------Argv------------------
levelId,autoLevel,nextLevelInfo,levelName,str,levelInfo,self,levelData,attackCountToday,buyTimesToday,totalChallengeTime,resetCfg
---------------------------------------
----------------Content----------------
if(DX_Guide){
HUD.showPve();
return undefined;
}
if(mRole.isInGuide()&&(mRole.GuideStep === mGuide.guideEnum.hangBattle_3)){
mGuide.nextGuideStep();
HUD.showLoading(true,true);
if(mGuide.isTFPlay()){
mGuide.init(function () { __FUNC_32__ });
} else {
}
mGuide.setGuideFightData(function () { __FUNC_33__ });
mGuide.clearGuidePointer();
return undefined;
}
if((this.bossButtonType === 1)){
if(mBattle.locked()){
return undefined;
}
_local0=mLevel.MaxBossDieLevel;
_aliased3202=0;
_local2=Config.XLevel[(parseInt(_local0) + 1)];
_local3=_local0.clearanceAwardString.split("|");
if(_local2){
_local3=_local2.name.replace("|"," ");
_aliased8730=(parseInt(_local0) + 1);
} else {
}
_local2=Config.XLevel[_local0];
_local3=_local2.name.replace("|"," ");
_aliased7286=_local0;
_aliased6395=(G_S.HANGBATTLELAYER_JS_892 + _local3);
HUD.showLayer(HUD_LIST.Tip_System,HUD.getTipLayer(),null,true,function () { __FUNC_34__ },this);
_local5=Config.XLevel[this.levelId];
} else if((_local5.dailyLimit > DD[T.CharacterInfo].level)){
HUD.showMessage(G_S.HANGBATTLELAYER_JS_894);
mBattle.mapCellName=this.txtMapName.getString();
mTalkingData.onBegin(this.txtMapName.getString());
_aliased1391=this;
_local7=DD[T.LevelList][this.levelId.toString()];
_local8=0;
_local9=0;
} else if(_local7&&(_local7.buyTimesToday != null)){
_local9=_local7.buyTimesToday;
}
if(_local7&&(_local7.attackCountToday != null)){
_local8=_local7.attackCountToday;
}
_local10=((_local9 * 30) + 30);
if((_local8 >= _local10)){
_aliased1789=Config.XResetPrice[(_local7.buyTimesToday + 1)];
if((_aliased1789 == null)){
_aliased2092=Config.XResetPrice[this.maxResetIdInConfig];
}
HUD.showLayer(HUD_LIST.Tip_System,HUD.getTipLayer(),null,true,function () { __FUNC_36__ },this);
return undefined;
}
if(!(mBattle.locked())){
HUD.showLayer(HUD_LIST.BattleChat,HUD.getTipLayer(),null,null,function () { __FUNC_38__ });
}
---------------------------------------
==========================================================================E
==================================32==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
HUD.showPve();
---------------------------------------
==========================================================================E
==================================33==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
HUD.showBattle();
---------------------------------------
==========================================================================E
==================================34==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setMessageConfirm2(_aliased6395,function () { __FUNC_35__ },G_S.HANGBATTLELAYER_JS_893);
---------------------------------------
==========================================================================E
==================================35==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
DC.wsData(("SetAutoAttackLevel/" + _aliased7286));
---------------------------------------
==========================================================================E
==================================36==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setMessageConfirm2(formatString(G_S.HANGBATTLELAYER_JS_895,[_aliased2092.price]),function () { __FUNC_37__ });
---------------------------------------
==========================================================================E
==================================37==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
DC.wsData(("ResetAttackLevelTimes/" + _aliased1391.levelId));
---------------------------------------
==========================================================================E
==================================38==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setData(_aliased1391.levelId,0);
---------------------------------------
==========================================================================E
==================================39==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
this.onEnterBossFight();
}
---------------------------------------
==========================================================================E
==================================40==================================S
------------------Argv------------------
levelInfo,self
---------------------------------------
----------------Content----------------
if(mBattle.locked()){
return undefined;
}
mBattle.isDelayShowAward=true;
mBattle.cbkFunc=this.onBattleFinish.bind(this);
mBattle.setLevelId(this.levelId);
_local0=Config.XLevel[this.levelId];
if(mGuide.isTFPlay() && (_local0.stageId != null) && (_local0.stageId != "1")){
HUD.showPve(null,null,true);
} else if(mGuide.isTFPlay()&&this._needEffect()){
_aliased8195=this;
mGuide.init(function () { __FUNC_41__ });
} else {
}
mBattle.sendMsg(mBattle.CMD.ATTACK_LEVEL,this.levelId);
if(!(DC.isSocketOpen())){
mBattle.unlock();
}
mBattle.mapCellName=this.txtMapName.getString();
mTalkingData.onBegin(this.txtMapName.getString());
---------------------------------------
==========================================================================E
==================================41==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
mGuide.doGuide(2,function () { __FUNC_42__ },true);
---------------------------------------
==========================================================================E
==================================42==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
mGuide.clearGuidePointer();
_aliased8195._makeBattleChangeArmature(function () { __FUNC_43__ });
---------------------------------------
==========================================================================E
==================================43==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
mBattle.sendMsg(mBattle.CMD.ATTACK_LEVEL,_aliased8195.levelId);
---------------------------------------
==========================================================================E
==================================44==================================S
------------------Argv------------------
lastLevel,level,lastId
---------------------------------------
----------------Content----------------
_local0=Config.XLevel[(this.levelId - 1)];
if(!(_local0)||(_local0.stageId == "1")){
return false;
}
_local1=Config.XLevel[this.levelId];
if(!(_local1)||(_local1.stageId != "1")){
return false;
}
_local2=this._loadLastBattleLevelId(1);
if((_local2 != -1)){
return false;
}
this.saveLastBattleLevelId(this.levelId,1);
return true;
---------------------------------------
==========================================================================E
==================================45==================================S
------------------Argv------------------
cbk,name,path1,path2,imgList,node
---------------------------------------
----------------Content----------------
_aliased3460="res/image/guide/eft_jiemian_chucheng/eft_jiemian_chucheng.ExportJson";
_local1=getCardInfoPath(DD[T.CharacterInfo]);
_local2="res/image/element/character/renwu/friend";
_aliased2998=[_local1,(_local2 + "002_a.png"),(_local2 + "062_a.png"),(_local2 + "122_a.png"),_aliased3460];
_aliased3290=new ccui.Layout();
_aliased3290.retain();
_aliased3290.setTouchEnabled(true);
_aliased3290.setContentSize(SW,SH);
HUD.getTipLayer().addChild(_aliased3290);
loadRes(_aliased2998,function () { __FUNC_46__ });
---------------------------------------
==========================================================================E
==================================46==================================S
------------------Argv------------------
armature,skinNameList,i,len,boneName,bone
---------------------------------------
----------------Content----------------
_local0=makeArmature(_aliased3460,"start",0,function () { __FUNC_47__ });
_local1=["eft_jiemian_chucheng6","eft_jiemian_chucheng12","eft_jiemian_chucheng14","eft_jiemian_chucheng13"];
_local2=0;
_local3=_local1.length;
while((_local2 < _local3)){
_local4=_local1[_local2];
_local5=_local0.getBone(_local4);
_local5.addDisplay(new ccs.Skin(_aliased2998[_local2]),0);
_local5.changeDisplayWithName(_local4,true);
_local2=(_local2 + 1);
_local2=0;
}
_aliased3290.addChild(_local0);
_local0.x=(SW / 2);
_local0.y=(SH / 2);
---------------------------------------
==========================================================================E
==================================47==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
_aliased3290.removeFromParent();
_aliased8195();
---------------------------------------
==========================================================================E
==================================48==================================S
------------------Argv------------------
sender,type,ok,self,character,CurVipConfig,NextVipConfig,buyCount,price,hangToken,msg2,msg3,dollar,msg4
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
_aliased5990=this;
_local2=DD[T.CharacterInfo];
_local3=Config.XVip[(_local2.vip + 1).toString()];
_local4=Config.XVip[(_local2.vip + 2).toString()];
_local5=_local2.buyStaminaTime||0;
_aliased6852=Config.XSpiritPrice[(_local5 + 1)].spiritPrice;
_local7=mItem.getCountByItemId(ID_HANG_TOKEN);
_aliased9468="";
if((_local4 != null)){
_aliased9100=formatString(G_S.HANGBATTLELAYER_JS_899,[_local5,_local3.buyStaminaLimit,(_local2.vip + 1),_local4.buyStaminaLimit]);
} else {
}
_aliased3806=formatString(G_S.HANGBATTLELAYER_JS_903,[_local5,_local3.buyStaminaLimit]);
_aliased9878=formatString(G_S.HANGBATTLELAYER_JS_905,[_local7]);
if((_local7 > 0)){
HUD.showLayer(HUD_LIST.Tip_System,HUD.getTipLayer(),null,true,function () { __FUNC_49__ });
_local10=mItem.getCountByItemId(ID_DOLLAR);
} else if((_local10 < parseInt(_aliased6852))||(_local5 >= _local3.buyStaminaLimit)){
_aliased1179="";
if((_local5 >= _local3.buyStaminaLimit)){
_aliased9471=G_S.HANGBATTLELAYER_JS_908;
HUD.showLayer(HUD_LIST.Tip_System,HUD.getTipLayer(),null,true,function () { __FUNC_51__ });
return undefined;
}
if((_local10 < parseInt(_aliased6852))){
_aliased7362=G_S.HANGBATTLELAYER_JS_909;
HUD.showLayer(HUD_LIST.Tip_System,HUD.getTipLayer(),null,true,function () { __FUNC_52__ });
return undefined;
}
if((_local4 == null)){
HUD.showLayer(HUD_LIST.Tip_System,HUD.getTipLayer(),null,true,function () { __FUNC_53__ });
} else {
}
}
HUD.showLayer(HUD_LIST.Tip_System,HUD.getTipLayer(),null,true,function () { __FUNC_54__ });
}
---------------------------------------
==========================================================================E
==================================49==================================S
------------------Argv------------------
tip,actName
---------------------------------------
----------------Content----------------
tip.setSpeedHangInfo(_aliased9878,null,function () { __FUNC_50__ });
_local0=G_S.HANGBATTLELAYER_JS_907;
mTalkingData.onPurchase(_local0,1,1);
---------------------------------------
==========================================================================E
==================================50==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
DC.wsData("SpeedUpAutoAttack");
_aliased5990.HungBattleMovie.startFast();
---------------------------------------
==========================================================================E
==================================51==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setMessage(_aliased7362,null,tip.SystemJumpType.Recharge,_aliased3806);
---------------------------------------
==========================================================================E
==================================52==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setMessage(_aliased7362,null,tip.SystemJumpType.Recharge);
---------------------------------------
==========================================================================E
==================================53==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setMessage(G_S.HANGBATTLELAYER_JS_910,null,null);
---------------------------------------
==========================================================================E
==================================54==================================S
------------------Argv------------------
tip,actName
---------------------------------------
----------------Content----------------
tip.setSpeedHangInfo(formatString(G_S.HANGBATTLELAYER_JS_897,[_aliased6852]),_aliased3806,function () { __FUNC_55__ });
_local0=G_S.HANGBATTLELAYER_JS_911;
mTalkingData.onPurchase(_local0,1,_aliased6852);
---------------------------------------
==========================================================================E
==================================55==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
if(mRole.isInGuide()&&(mRole.GuideStep === mGuide.guideEnum.hangBattle_5)){
mGuide.nextGuideStep();
DD[T.CharacterInfo].dollar=0;
HUD.getMainPage().setTop();
mGuide.setSweepAward();
_aliased5990.HungBattleMovie.startFast();
} else {
}
DC.wsData("SpeedUpAutoAttack");
_aliased5990.HungBattleMovie.startFast();
---------------------------------------
==========================================================================E
==================================56==================================S
------------------Argv------------------
obj
---------------------------------------
----------------Content----------------
if(checkNoRunning(this)){
return undefined;
}
this.scheduleOnce(this.initHungBattle,1);
if((DD[T.BattleResult] != null)&&DD[T.BattleResult].win){
mLevel.updateMaxOpenMap();
_local0=mRole.getSysBuff();
this.txtExp.setString((_local0.exp + G_S.HANGBATTLELAYER_JS_888));
this.txtCoin.setString((_local0.coin + G_S.HANGBATTLELAYER_JS_888));
this.txtBeliever.setString((_local0.believer + G_S.HANGBATTLELAYER_JS_888));
mRedPoint.updateRedPointById(mRedPoint.FuncId.RP_HangBattle,mRedPoint.FuncId.RP_OccupyCity);
}
---------------------------------------
==========================================================================E
==================================57==================================S
------------------Argv------------------
chatNpcPos
---------------------------------------
----------------Content----------------
if((this.levelId === 50003)&&chatNpcPos){
this.showRescueConcubine(chatNpcPos,this.showBattleAward.bind(this));
return undefined;
}
this.showBattleAward();
---------------------------------------
==========================================================================E
==================================58==================================S
------------------Argv------------------
BattleResult,otherAward,levelInfo,nextLevelInfo
---------------------------------------
----------------Content----------------
_local0=DD[T.BattleResult]||{};
_local1=_local0.otherAward;
if(_local1&&(_local1.length > 0)){
_local2=Config.XLevel[(this.levelId - 1)];
_local3=Config.XLevel[this.levelId];
if((_local3 != null)&&(_local3.groupID !== _local2.groupID)){
HUD.showLayer(HUD_LIST.BossAwardLayer,HUD.getTipLayer(),null,true,function () { __FUNC_59__ },this);
} else {
}
mBattle.isDelayShowAward=false;
HUD.showAwards(_local1,function () { __FUNC_60__ });
} else {
}
mBattle.isDelayShowAward=false;
HUD.showLevelUpAct();
---------------------------------------
==========================================================================E
==================================59==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setData(1,DD[T.BattleResult].otherAward);
---------------------------------------
==========================================================================E
==================================60==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
HUD.showLevelUpAct();
---------------------------------------
==========================================================================E
==================================61==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
if(checkNoRunning(this)){
return undefined;
}
this.upDateView();
this.onDrawDataOK();
---------------------------------------
==========================================================================E
==================================62==================================S
------------------Argv------------------
---------------------------------------
----------------Content----------------
if(checkNoRunning(this)){
return undefined;
}
this.upDateView();
this.onDrawDataOK();
---------------------------------------
==========================================================================E
==================================63==================================S
------------------Argv------------------
event,data,encounterInfo
---------------------------------------
----------------Content----------------
if(checkNoRunning(this)){
return undefined;
}
_local0=event.getUserData();
_local1=DD[T.EncounterInfo];
if((_local1 == null) || (_local1.id === 0) || (_local1.id == null)){
if((_local0 != null)){
HUD.showAwards(_local0.awardList);
}
return undefined;
}
if(!(this.justShow)){
HUD.showLayer(HUD_LIST.Tip_AdventureEvent,HUD.getTipLayer(),null,true,function () { __FUNC_64__ },this,true);
if((_local0 != null)){
HUD.showAwards(_local0.awardList);
}}
---------------------------------------
==========================================================================E
==================================64==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setData();
---------------------------------------
==========================================================================E
==================================65==================================S
------------------Argv------------------
chatNpcPos,callBack,self,eftPath,eftLayer
---------------------------------------
----------------Content----------------
_aliased2856=this;
_aliased6626="res/image/effects/eft_hougong_iconjihuo/eft_hougong_iconjihuo.ExportJson";
_aliased2218=new ccui.Layout();
_aliased2218.setContentSize(cc.winSize.width,cc.winSize.height);
_aliased2218.setTouchEnabled(true);
_aliased2218.setSwallowTouches(true);
HUD.getTipLayer().addChild(_aliased2218);
preLoadEffect(_aliased6626,null,function () { __FUNC_66__ });
---------------------------------------
==========================================================================E
==================================66==================================S
------------------Argv------------------
armature1
---------------------------------------
----------------Content----------------
_aliased9899=showEffect(HUD.getTipLayer(),undefined,"start",0);
_aliased9899.setPosition(undefined);
_aliased9899.getAnimation().setFrameEventCallFunc(function () { __FUNC_67__ },undefined);
---------------------------------------
==========================================================================E
==================================67==================================S
------------------Argv------------------
bone,frameEventName,armature2,endPos,act1,act2,seq
---------------------------------------
----------------Content----------------
if((frameEventName === "guangqiu")){
_aliased7741=showEffect(HUD.getTipLayer(),undefined,"start2",1);
_aliased9496=undefined.btConcubine.getParent().convertToWorldSpace(undefined.btConcubine.getPosition());
_aliased7741.setPosition(undefined);
_local2=cc.moveTo(1,_aliased9496);
_local3=cc.callFunc(function () { __FUNC_68__ });
_local4=cc.sequence(_local2,_local3);
_aliased7741.runAction(_local4);
}
---------------------------------------
==========================================================================E
==================================68==================================S
------------------Argv------------------
armature3
---------------------------------------
----------------Content----------------
undefined.removeFromParent();
_aliased7741.removeFromParent();
_local0=showEffect(HUD.getTipLayer(),undefined,"start1",0);
_local0.getAnimation().setMovementEventCallFunc(function () { __FUNC_69__ },undefined);
_local0.setPosition(_aliased9496);
---------------------------------------
==========================================================================E
==================================69==================================S
------------------Argv------------------
armature,movementType
---------------------------------------
----------------Content----------------
if((movementType === ccs.MovementEventType.complete)){
armature.removeFromParent();
undefined.removeFromParent();
undefined.btConcubine.setVisible(true);
undefined.startRescueTimer();
if(undefined){
(undefined)();
}}
---------------------------------------
==========================================================================E
==================================70==================================S
------------------Argv------------------
feiziKarmaCfg,story,storyIdList,talkList,key
---------------------------------------
----------------Content----------------
if(!(DD[T.KingInfo]) || !(DD[T.KingInfo].feiziKarma)){
this.btFeiziAdventure.setVisible(false);
return undefined;
}
if((DD[T.KingInfo].feiziKarma.stage == 0)||(DD[T.KingInfo].feiziKarma.stage == 3)){
this.btFeiziAdventure.setVisible(false);
_local0=Config.X3FeiziKarma[DD[T.KingInfo].feiziKarma.karmaId];
(DD[T.KingInfo].feiziKarma.stage == 0)?_local1=_local0.story1:_local1=_local0.story2;
_local2=_local1.split(";");
_aliased9639=[];
while(_local2 has _iternext){
_local4=_iternext;
_aliased9639.push(Config.XPlotDialog[_local2[_local4]]);
}
if((_aliased9639.length > 0)){
HUD.showLayer(HUD_LIST.BattleChat,HUD.getTipLayer(),null,true,function () { __FUNC_71__ });
} else {
}
}
this.btFeiziAdventure.setVisible(true);
mRedPoint.registerFunction(this.btFeiziAdventure,mRedPoint.FuncId.RP_HangBattle_FeiZiAdventure,65,75,this.redpointList);
---------------------------------------
==========================================================================E
==================================71==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setDataExt(_aliased9639,6);
---------------------------------------
==========================================================================E
==================================72==================================S
------------------Argv------------------
event,chatNpcPos
---------------------------------------
----------------Content----------------
if((DD[T.KingInfo].feiziKarma.stage == 0)){
DC.wsData("SaveFeiziKarmaStage/1");
}
if((DD[T.KingInfo].feiziKarma.stage == 3)){
DC.wsData("SaveFeiziKarmaStage/4");
}
_local0=null;
if(event){
_local0=event.getUserData();
this.chatNpcPos=_local0;
} else {
}
return undefined;
---------------------------------------
==========================================================================E
==================================73==================================S
------------------Argv------------------
self,eftPath,eftLayer
---------------------------------------
----------------Content----------------
if((DD[T.KingInfo].feiziKarma.stage == 1)){
_aliased2778=this;
_aliased4997="res/image/effects/eft_hougong_iconjihuo/eft_hougong_iconjihuo.ExportJson";
_aliased7506=new ccui.Layout();
_aliased7506.setContentSize(cc.winSize.width,cc.winSize.height);
_aliased7506.setTouchEnabled(true);
_aliased7506.setSwallowTouches(true);
HUD.getTipLayer().addChild(_aliased7506);
preLoadEffect(_aliased4997,null,function () { __FUNC_74__ });
}
if((DD[T.KingInfo].feiziKarma.stage == 4)){
if(!(this.btFeiziAdventure.isVisible())){
this.btFeiziAdventure.setVisible(true);
}
mRedPoint.registerFunction(this.btFeiziAdventure,mRedPoint.FuncId.RP_HangBattle_FeiZiAdventure,65,75,this.redpointList);
mRedPoint.updateRedPoint([mRedPoint.FuncId.RP_HangBattle]);
}
---------------------------------------
==========================================================================E
==================================74==================================S
------------------Argv------------------
armature2,endPos,act1,act2,seq
---------------------------------------
----------------Content----------------
_aliased8330=showEffect(HUD.getTipLayer(),undefined,"start2",1);
_aliased2086=undefined.btFeiziAdventure.getParent().convertToWorldSpace(undefined.btFeiziAdventure.getPosition());
_aliased8330.setPosition(undefined.chatNpcPos);
_local2=cc.moveTo(1,_aliased2086);
_local3=cc.callFunc(function () { __FUNC_75__ });
_local4=cc.sequence(_local2,_local3);
_aliased8330.runAction(_local4);
---------------------------------------
==========================================================================E
==================================75==================================S
------------------Argv------------------
armature3
---------------------------------------
----------------Content----------------
_aliased8330.removeFromParent();
_local0=showEffect(HUD.getTipLayer(),undefined,"start1",0);
_local0.getAnimation().setMovementEventCallFunc(function () { __FUNC_76__ },undefined);
_local0.setPosition(_aliased2086);
---------------------------------------
==========================================================================E
==================================76==================================S
------------------Argv------------------
armature,movementType
---------------------------------------
----------------Content----------------
if((movementType === ccs.MovementEventType.complete)){
armature.removeFromParent();
undefined.removeFromParent();
undefined.btFeiziAdventure.setVisible(true);
mRedPoint.registerFunction(undefined.btFeiziAdventure,mRedPoint.FuncId.RP_HangBattle_FeiZiAdventure,65,75,undefined.redpointList);
mRedPoint.updateRedPoint([mRedPoint.FuncId.RP_HangBattle]);
}
---------------------------------------
==========================================================================E
==================================77==================================S
------------------Argv------------------
sender,type,ok
---------------------------------------
----------------Content----------------
_local0=touch_process_bt(sender,type);
if(_local0){
if(DD[T.KingInfo]&&DD[T.KingInfo].feiziKarma){
if((DD[T.KingInfo].feiziKarma.stage == 1)){
DC.wsData("SaveFeiziKarmaStage/2");
if((DD[T.KingInfo].feiziKarma.stage != 2)){
DD[T.KingInfo].feiziKarma.stage=2;
mRedPoint.updateRedPoint([mRedPoint.FuncId.RP_HangBattle]);
}}
if((DD[T.KingInfo].feiziKarma.stage == 4)){
DC.wsData("SaveFeiziKarmaStage/5");
}
HUD.showLayer(HUD_LIST.Harem_Adventure,HUD.mainContent.nContent,null,null,function () { __FUNC_78__ },this,true);
}}
---------------------------------------
==========================================================================E
==================================78==================================S
------------------Argv------------------
tip
---------------------------------------
----------------Content----------------
tip.setData();
---------------------------------------
==========================================================================E
==================================79==================================S
------------------Argv------------------
moduleType
---------------------------------------
----------------Content----------------
this.btConcubine.setVisible(false);
_local0=mModuleControl.ModuleType.Nation;
if(mModuleControl.isCloseModule(_local0)){
return undefined;
}
HUD.showNewFeiZiInfo();
HUD.getTipLayer().removeAllChildren();
mRedPoint.updateRedPoint([mRedPoint.FuncId.RP_HangBattle]);
---------------------------------------
==========================================================================E
==================================80==================================S
------------------Argv------------------
character,roleId,zoneId
---------------------------------------
----------------Content----------------
_local0=DD[T.CharacterInfo];
_local1=_local0.id.toString();
_local2=C_ServerSid;
return ((("roleID&" + _local1) + "&serviceID&") + _local2);
---------------------------------------
==========================================================================E
==================================81==================================S
------------------Argv------------------
idx,infoStr,key,info
---------------------------------------
----------------Content----------------
_local0=LD.get(LD.K_LAST_BATTLE_LEVEL);
if((_local0 == "")){
return -1;
}
_local1=this._roleInfoStr();
_local2=JSON.parse(_local0)[(_local1 + idx)];
return _local2?_local2=JSON.parse(_local0)[(_local1 + idx)]:-1;
---------------------------------------
==========================================================================E
==================================82==================================S
------------------Argv------------------
levelId,idx,allInfo,teamStr
---------------------------------------
----------------Content----------------
if(!(levelId)){
return undefined;
}
_local0={};
_local0[(this._roleInfoStr() + idx)]=levelId;
_local1=JSON.stringify(_local0);
LD.set(LD.K_LAST_BATTLE_LEVEL,_local1);
---------------------------------------
==========================================================================E
勉强能看,凑合用吧