Builds / 1.13.46
Update 1.13.46
Compared with 1.13.23 · published Fri, 07 Aug 2026 08:27:18 GMT · live channel
No summary yet.
Text changes 29
| Key | Text | |
|---|---|---|
| PRODUCT_NAME_257 | + | Hire a Professional Secretary (3 Days) (One-time Only) |
| PRODUCT_DESC_62 | + | A free product that allows you to hire a professional secretary for 3 days. (One-time Only) |
| PRODUCT_DESC_63 | + | The secretary becomes available after reincarnating at WAVE 100 or higher. |
| GWT_19 | + | Sub |
| GWT_20 | + | Sub Match |
| GWT_21 | + | Matching will take place after the Round of # ends. |
| GWT_22 | + | Guilds defeated in the Round of 16 will battle in [Sub Match 1]. |
| GWT_23 | + | Guilds defeated in the Quarterfinals will battle in [Sub Match 2]. |
| GWT_24 | + | Sub Matches are played as a single match, and the winners do not advance to the next round. |
| GAME_1533 | + | 30-Day Gift |
| GAME_1534 | + | Stamp it every time you log in! |
| GAME_1535 | + | Stamp ## |
| GAME_1536 | + | See you again tomorrow |
| GAME_1537 | + | You've received all the gifts |
| GAME_1538 | + | Today's Gift |
| GAME_1539 | + | Tomorrow's Gift |
| GAME_1540 | + | Gift Code |
| GAME_1541 | + | Enter Gift Code |
| GAME_1542 | + | Please enter a gift code. |
| GAME_1543 | + | Please check the gift code. |
| GAME_1544 | + | This gift code has already been used. |
| GAME_1545 | + | Gift received! |
| GAME_1546 | + | Rebirth Relic Setup |
| GAME_1547 | + | The medals of these relics will be used upon Rebirth. |
| GAME_1548 | + | Select Relic |
| GAME_1549 | + | You can select up to ##. |
| GAME_1550 | + | Day ## |
| GAME_1551 | + | ## days remaining |
| GAME_1552 | + | Setup |
Translations touched: de (29), es (29), fr (29), id (29), it (29), ja (29), ko (29), pl (30), pt (29), ru (29), th (29), tr (29), vi (29), zh-CN (29), zh-TW (29)
Assets 2
| File | Change | Size | Preview |
|---|---|---|---|
assets/ekkorr/UI_Ekkorr.json |
changed | 190.2 KB → 190.5 KB | |
|
New sprites: stamp30 | |||
assets/ekkorr/UI_Ekkorr.ktx2 |
changed | 2,103.0 KB → 2,043.6 KB | |
Code 272 changes in 119 classes
Minified client code with short names blanked for diffing. Class names are real.
- ClickHand 1128
- HeroRosterItemRenderer 782
- CardEventRankingItemRenderer 625
- SecretaryPopup 571
- HeroItemRenderer 469
- ClickAniEffect 386
- BaseSubMenu 385
- ViewMain 355
- HeroHireGuidePopup 333
- AttendanceDayCell 333
- StampMark 214
- ReviveTreasureSetRowRenderer 213
- SettingEtcInfo 203
- GuildWarTournamentMainView 174
- HeroSubView 173
- TutorialController 166
- MissionGuideDataManager 146
- InventoryMenuIcon 146
- ClickAniLayer 144
- HeroRosterSubMenu 142
- HelpDataManager 137
- ShopProductPopupWithTimer 132
- CardEventDataManager 127
- InvitationCodeRewardPopup 122
- MissionGuideController 117
- ShopView 114
- HeroRosterView 85
- HeroView 79
- DailyQuestDataManager 72
- DialogueVO 71
- DialogueDataManager 69
- DialogueLayer 68
- ShopPayItemRendererStage 62
- GuildWarTeamSlot2 62
- ShopProductTrigger 54
- CardEventService 35
- ProgressBar 35
- ReviveTreasureBanner 35
- URLManager 31
- MessageInfo 29
- GameOverPopup 25
- StampCalendarStatusVO 25
- TreasureSetDataManager 24
- TopMenu 24
- ReviveTreasureDataManager 23
- Mo 20
- GuildWarTournament2Popup 18
- AttendanceAutoTrigger 18
- RightBottomMenus 16
- StampCalendarService 13
- ShopGuideSecretary 13
- BaseSubView 11
- QuestAutoController 9
- UserService 8
- ConfigManager 7
- ShopPayItemRenderer 7
- GuildWarBattlePopupV3 7
- RebirthMedalManager 6
- TournamentRewardItemRenderer 6
- TransConfirmPopup 6
- FavoritePetSelectItemRenderer 6
- AchievementVO 5
- LocalDataManager 4
- Archery2GameScene 4
- ServerParkingPopup 3
- Bo 3
- SHA256 3
- SuiProvider 3
- WalletPopup 3
- GuildWarTournamentRewardGuidePopup 3
- GuildManager 2
- Client 2
- Oo 2
- Ko 2
- TreasureIcon 2
- GuildBarrackRowItemRenderer 2
- GuildWarBattleReadyPopup 2
- GuildWarSquadsPopup 2
- GuildWarTierAssignPopup 2
- CacheClass 1
- ApplicationInitHook 1
- GlUboSystem 1
- WebGLRenderer 1
- VersionManager 1
- DataManager 1
- MembershipVO 1
- AutoTogglePill 1
- ShopDataManager 1
- Err 1
- Sr 1
- Ma 1
- Yp 1
- SuiStandardProvider 1
- AppReadyEvent 1
- SolProvider 1
- OkxwalletInjectConnector 1
- TcRootElement 1
- WalletSelectPopup 1
- BaseShopProductPopup 1
- SecretaryGuidePopup 1
- TreasureBookPopup 1
- FavoritePetSubView 1
- TreasureTransDetailView 1
- TreasureTransSubView 1
- GuildBarracksRaceView 1
- GuildMainSubView 1
- GuildRaidBattleReadyPopup 1
- GuildWarHistoryItemRenderer 1
- GuildWarTournamentGuidePopup 1
- PromotionCodePopup 1
- CitadelSubView 1
- BattleController 1
- GuildWarCombatLogItemRenderer 1
- GuildWarMemberStatusItemRenderer 1
- GuildWarTargetMarkerItemRenderer 1
- Delay 1
- NetworkTimeout 1
- RecaptchaVerifier 1
- BrowserPopupRedirectResolver 1
ClickHand 5 hunks, 1128 statements
- for(; - n+1<i.length&&i[n+1].startLevel<=h; - )n++; - const t=i[n],s=Math.round(Math.pow(t.exp,h/5)+3*h)+t.offset; - e[h]=e[h-1]+s} - this.acc=e} - init(){ + const s=t.getDataByKindNum(e); + if(s){ + if(!s.isOpen)return!!(s.canOpen&&TL.gold>=s.effectiveOpenGold)&&(this.showOnItem(0,t=>{ + var i; + return(null==(i=t.vo)?void 0:i.kindNum)===e} + ,"btnOpen"),!0); + if(!i&&s.getLevelUpGold()<=s.effectiveIncGold)return TL.gold>=s.getLevelUpGold()&&(this.showOnItem(0,t=>{ + var i; + return(null==(i=t.vo)?void 0:i.kindNum)===e} + ,"btnOpen"),!0)}
- getCost(t){ - return t<1||t>=this.acc.length?0:this.acc[t]-this.acc[t-1]} - getTotalCost(t,i){ - return t>=i?0:(i>=this.acc.length&&(i=this.acc.length-1),t<0&&(t=0),this.acc[i]-this.acc[t])} - getMaxAffordableLevel(t,i){ - let s=t,e=this.acc.length-1; - for(; - s<e; - ){ - const n=Math.floor((s+e+1)/2); - this.acc[n]-this.acc[t]<=i?s=n:e=n-1} - return s} - getMaxLevel(){ - return this.acc.length-1} + if(i){ + let i=!0; + for(let s=1; + s<=3; + s++){ + const e=t.getDataByKindNum(s); + if(!e||!e.isOpen){ + i=!1; + break} + } + if(i&&this.bottomMenuGetter){ + const t=wx.getInstance(),i=t.getTeamIds(); + for(const n of i){ + const i=t.getVOWithId(n); + if(i&&i.enhance>=1)return!1} + const{ + parent:s,btn:e} + =this.bottomMenuGetter(); + return this.showOnTarget(s,e),!0} + } + return!1} + checkHero(){ + if(!this.itemsGetters.has(1))return!1; + const t=this.itemsGetters.get(1)(); + if(!t||0===t.length)return!1; + const i=t[0]; + if(!i||!i.vo||i.vo.level<=0)return!1; + if(1===TL.numRevive){ + if(this.heroDetailPopupGetter){ + const t=this.heroDetailPopupGetter(); + if(t&&t.parent){ + const i=t.getEnhanceGuideInfo(); + if(i)return this.showOnTarget(i.parent,i.btn),!0} + return!1} + return!(i.vo.enhance>=1||(this.showOnTarget(i,{ + x:80,y:40,width:0,height:0} + ),0))} + if(i.vo.level>=10)return!1; + const s=VR.getInstance().getGameplayMultiplier(kR.UnitUpgradeGold),e=Math.floor(p5.getInstance().getTotalGold(i.vo.level,i.vo.level+1)/s); + return TL.gold>=e&&(this.showOnTarget(i,i.btnUpgrade),!0)} + checkCastle(){ + if(0!==TL.numRevive)return!1; + if(!this.itemsGetters.has(2))return!1; + const t=this.itemsGetters.get(2)(); + if(!t||0===t.length)return!1; + const i=mR.getInstance(),s=i.castleVO.level; + if(s<5){ + const t=p5.getInstance().getTotalGold(s,s+1); + return TL.gold>=t&&(this.showOnItem(2,t=>{ + var i; + return 1===(null==(i=t.vo)?void 0:i.kindNum)} + ,"btnUpgrade"),!0)} + if(s>=5){ + const t=i.getBookDataByKindNum(2); + if(t&&t.level<2)return TL.gold>=t.cost&&(this.showOnItem(2,t=>{ + var i; + return 2===(null==(i=t.vo)?void 0:i.kindNum)} + ,"btnUpgrade"),!0); + const s=i.getBookDataByKindNum(3); + if(s&&s.level<2)return TL.gold>=s.cost&&(this.showOnItem(2,t=>{ + var i; + return 3===(null==(i=t.vo)?void 0:i.kindNum)} + ,"btnUpgrade"),!0); + const e=i.getBookDataByKindNum(4); + if(e&&e.level<1)return TL.gold>=e.cost&&(this.showOnItem(2,t=>{ + var i; + return 4===(null==(i=t.vo)?void 0:i.kindNum)} + ,"btnUpgrade"),!0)} + return!1} + showOnItem(t,i,s){ + const e=this.itemsGetters.get(t); + if(!e)return; + const n=e(); + for(let h=0; + h<n.length; + h++){ + const t=n[h]; + if(i(t)){ + const i=t[s]; + return void(i&&this.showOnTarget(t,i))} + } + } + showOnTarget(t,i){ + if(this.currentTarget===t)return this.x=i.x+.55*i.width,this.y=i.y+.45*i.height,void t.addChild(this); + this.hideFromTarget(),this.currentTarget=t,this.x=i.x+.55*i.width,this.y=i.y+.45*i.height,t.addChild(this),this.show()} + hideFromTarget(){ + this.currentTarget&&(this.currentTarget=null,this.hide(),this.removeFromParent())} + show(){ + t.textures||t.load(),t.textures&&0!==t.textures.length&&(this.frame=0,this.frameCount=0,this.sp.texture=t.textures[0],this.visible=!0,this.playing||(this.playing=!0,LM.getInstance().add(this.onEnter,this)))} + hide(){ + this.visible=!1,this.playing&&(this.playing=!1,LM.getInstance().remove(this.onEnter,this))} + onEnter(){ + t.textures&&(this.frameCount++,this.frame+=.6,this.frame>=t.textures.length&&(this.frame=0),this.sp.texture=t.textures[Math.floor(this.frame)])} + destroy(){ + this.itemsGetters.clear(),this.checking&&(this.checking=!1,LM.getInstance().remove(this.onCheck,this)),this.hide(),super.destroy(),this.setBattleSwitch(!1)} + setBattleSwitch(t){ + cS.getInstance().removeEventListener("BattleSwitch",this.onBattleSwitchBind),t&&(this.onBattleSwitchBind=this.onBattleSwitch.bind(this),cS.getInstance().addEventListener("BattleSwitch",this.onBattleSwitchBind))} + async onBattleSwitch(t){ + if(!t||!t.detail)return; + if(this.retired&&0==Bzt.getInstance().isActive())return void this.setBattleSwitch(!1); + const i=t.detail.fromType,s=t.detail.toType; + i&&s&&(i==LU.IDLE&&s!=LU.IDLE?this.hide():i!=LU.IDLE&&s==LU.IDLE&&this.show())}
- Vt(Nzt,"HeroMedalEnhanceManager"),Kt(Nzt,"instance"); + Vt(Ezt,"ClickHand"),Kt(Ezt,"_instance"),Kt(Ezt,"textures",null); + let Azt=Ezt; + const Szt=class t{ + constructor(){ + Kt(this,"battlePoolMap",{ + } + ),Kt(this,"seasonSetMap",{ + } + ),Kt(this,"rewardMap",{ + } + ),Kt(this,"seasonSetKindNum",0),Kt(this,"seasonNumber",0),Kt(this,"seasonEndTime",0),Kt(this,"currentFloor",0),Kt(this,"floorStars",[]),Kt(this,"ticket",0),Kt(this,"maxTicket",5),Kt(this,"ticketTime",0),Kt(this,"currentBattleFloor",0),Kt(this,"bookLoaded",!1),Kt(this,"seasonRotation",1e6)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + setBattlePoolData(t){ + if(this.battlePoolMap={ + } + ,t)for(const i of t){ + const t=new Izt; + t.kindNum=i.kindNum,t.difficulty=i.difficulty,t.enemyKindNums=i.enemyKindNums||"",t.enemyTrans=i.enemyTrans||"",t.enemyShields=i.enemyShields||"",t.enemyLevels=i.enemyLevels||"",t.tribes=i.tribes,t.gradeMax=i.gradeMax,t.femaleExclude=i.femaleExclude,t.maleExclude=i.maleExclude,t.rangeExclude=i.rangeExclude,t.meleeExclude=i.meleeExclude,t.airExclude=i.airExclude,t.star1=i.star1,t.star2=i.star2,t.star3=i.star3,this.battlePoolMap[t.kindNum]=t} + } + setSeasonSetData(t){ + if(this.seasonSetMap={ + } + ,t)for(const i of t){ + const t=new kzt; + t.kindNum=i.kindNum,t.battleIDs=i.battleIDs,this.seasonSetMap[t.kindNum]=t} + } + setRewardData(t){ + if(this.rewardMap={ + } + ,t)for(const i of t){ + const t=new Rzt; + t.floor=i.floor,t.gem1=i.gem1,t.gem2=i.gem2,t.gem3=i.gem3,t.honor1=i.honor1,t.honor2=i.honor2,t.honor3=i.honor3,this.rewardMap[t.floor]=t} + } + get seasonIndex(){ + return(this.seasonNumber-1)%this.seasonRotation+1} + setData(t){ + for(this.seasonSetKindNum=t.seasonSetKindNum,this.seasonNumber=t.seasonNumber||0,this.seasonEndTime=t.seasonEndTime?new Date(t.seasonEndTime).getTime():0,this.currentFloor=t.currentFloor,this.floorStars=t.floorStars||[]; + this.floorStars.length<30; + )this.floorStars.push(0); + this.ticket=t.ticket,this.maxTicket=t.maxTicket,this.ticketTime=new Date(t.ticketTime).getTime()+1e3,this.currentBattleFloor=t.currentBattleFloor} + getFloorList(){ + const t=this.seasonSetMap[this.seasonSetKindNum]; + if(!t)return[]; + const i=t.battleIDs.split("|").map(Number),s=[],e=Math.min(this.currentFloor+1,30); + for(let n=0; + n<e; + n++){ + const t=this.battlePoolMap[i[n]]; + if(!t)continue; + const e=new Pzt; + e.floor=n+1,e.stars=this.floorStars[n]||0,e.battleVO=t,e.reward=this.rewardMap[n+1],e.isCleared=this.floorStars[n]>0,e.isNext=n+1===this.currentFloor+1,s.push(e)} + return s} + getFloorListReversed(){ + return this.getFloorList().reverse()} + getBattlePool(t){ + return this.battlePoolMap[t]} + buildFloorVO(t){ + if(t<1||t>30)return null; + const i=this.seasonSetMap[this.seasonSetKindNum]; + if(!i)return null; + const s=i.battleIDs.split("|").map(Number),e=t-1; + if(e>=s.length)return null; + const n=this.battlePoolMap[s[e]]; + if(!n)return null; + const h=new Pzt; + return h.floor=t,h.stars=this.floorStars[e]||0,h.battleVO=n,h.reward=this.rewardMap[t],h.isCleared=this.floorStars[e]>0,h.isNext=t===this.currentFloor+1,h} + getReward(t){ + return this.rewardMap[t]} + } + ; + Vt(Szt,"TowerDataManager"),Kt(Szt,"instance"); + let Tzt=Szt; + const Czt=class{ + constructor(){ + Kt(this,"kindNum",0),Kt(this,"difficulty",0),Kt(this,"enemyKindNums",""),Kt(this,"enemyTrans",""),Kt(this,"enemyShields",""),Kt(this,"enemyLevels",""),Kt(this,"tribes","0"),Kt(this,"gradeMax",0),Kt(this,"femaleExclude","N"),Kt(this,"maleExclude","N"),Kt(this,"rangeExclude","N"),Kt(this,"meleeExclude","N"),Kt(this,"airExclude","N"),Kt(this,"star1",0),Kt(this,"star2",0),Kt(this,"star3",0)} + static parseEnemies(t){ + const i=new Array(20).fill(null); + if(!t||!t.enemyKindNums)return i; + const s=String(t.enemyKindNums).split("|"),e=Math.min(s.length,20); + for(let n=0; + n<e; + n++){ + const t=s[n].trim(); + if(!t||"0"===t)continue; + const e=t.indexOf("-"),h=e>=0?t.substring(0,e):t,r=e>=0?t.substring(e+1):"0",o=Number(h); + o>0&&(i[n]={ + kindNum:o,trans:Number(r)||0} + )} + return i} + static stringifyEnemies(t,i){ + let s=-1; + for(let n=19; + n>=0; + n--)if((t[n]??-1)>0){ + s=n; + break} + if(s<0)return""; + const e=[]; + for(let n=0; + n<=s; + n++){ + const s=t[n]??-1; + s<=0?e.push("0"):e.push(`${ + s} + -${ + i[n]??0} + `)} + return e.join("|")} + } + ; + Vt(Czt,"TowerBattlePoolVO"); + let Izt=Czt; + const Ozt=class{ + constructor(){ + Kt(this,"kindNum",0),Kt(this,"battleIDs","")} + } + ; + Vt(Ozt,"TowerSeasonSetVO"); + let kzt=Ozt; + const xzt=class{ + constructor(){ + Kt(this,"floor",0),Kt(this,"gem1",0),Kt(this,"gem2",0),Kt(this,"gem3",0),Kt(this,"honor1",0),Kt(this,"honor2",0),Kt(this,"honor3",0)} + } + ; + Vt(xzt,"TowerRewardVO"); + let Rzt=xzt; + const Nzt=class{ + constructor(){ + Kt(this,"floor",0),Kt(this,"stars",0),Kt(this,"battleVO"),Kt(this,"reward"),Kt(this,"isCleared",!1),Kt(this,"isNext",!1)} + } + ; + Vt(Nzt,"TowerFloorVO"); + let Pzt=Nzt; + const Dzt=class t{ + constructor(){ + Kt(this,"lastFetchTime",0),Kt(this,"hasData",!1),Kt(this,"dungeonRechargeMs",0),Kt(this,"towerRechargeMs",0),Kt(this,"towerSnapshot",null),Kt(this,"pvpSnapshot",null),Kt(this,"dailyRankingSnapshot",null)} + static getInstance(){ + return this.instance||(this.instance=new t),this.instance} + setSummary(t){ + if(t){ + if(this.hasData=!0,this.lastFetchTime=tx.time,t.dungeon){ + this.dungeonRechargeMs=t.dungeon.ticketRechargeMs??0; + const i=Nx.getInstance(); + i.ticket=t.dungeon.ticket??i.ticket,i.maxTicket=t.dungeon.maxTicket??i.maxTicket,t.dungeon.ticketTime&&(i.ticketTime=new Date(t.dungeon.ticketTime).getTime()+1e3)} + if(t.tower){ + this.towerRechargeMs=t.tower.ticketRechargeMs??0; + const i=Tzt.getInstance(); + i.seasonNumber>0&&(i.ticket=t.tower.ticket??i.ticket,i.maxTicket=t.tower.maxTicket??i.maxTicket,t.tower.ticketTime&&(i.ticketTime=new Date(t.tower.ticketTime).getTime()+1e3),void 0!==t.tower.currentFloor&&(i.currentFloor=t.tower.currentFloor),void 0!==t.tower.seasonNumber&&(i.seasonNumber=t.tower.seasonNumber),t.tower.seasonEndTime&&(i.seasonEndTime=new Date(t.tower.seasonEndTime).getTime())),this.towerSnapshot={ + seasonNumber:t.tower.seasonNumber??0,seasonEndTime:t.tower.seasonEndTime?new Date(t.tower.seasonEndTime).getTime():0,currentFloor:t.tower.currentFloor??0,ticket:t.tower.ticket??0,maxTicket:t.tower.maxTicket??0,ticketTime:t.tower.ticketTime?new Date(t.tower.ticketTime).getTime():0} + } + this.pvpSnapshot=t.pvp??null,this.dailyRankingSnapshot=t.dailyRanking??null} + } + has(){ + return this.hasData} + isStale(t){ + return!this.hasData||tx.time-this.lastFetchTime>=t} + getDungeon(){ + if(!this.hasData)return null; + const t=Nx.getInstance(); + return{ + ticket:t.ticket,maxTicket:t.maxTicket,ticketTime:t.ticketTime,ticketRechargeMs:this.dungeonRechargeMs} + } + getTower(){ + if(!this.hasData)return null; + const t=Tzt.getInstance(); + return t.seasonNumber>0?{ + seasonNumber:t.seasonNumber,seasonEndTime:t.seasonEndTime,currentFloor:t.currentFloor,ticket:t.ticket,maxTicket:t.maxTicket,ticketTime:t.ticketTime,ticketRechargeMs:this.towerRechargeMs} + :this.towerSnapshot?{ + ...this.towerSnapshot,ticketRechargeMs:this.towerRechargeMs} + :null} + getPvp(){ + return this.pvpSnapshot} + updatePvpTicket(t,i){ + this.pvpSnapshot&&(this.pvpSnapshot.ticket=t,void 0!==i&&(this.pvpSnapshot.ticketTime=i))} + getDailyRanking(){ + return this.dailyRankingSnapshot} + updateDailyRanking(t,i){ + this.dailyRankingSnapshot?(this.dailyRankingSnapshot.joined=t,this.dailyRankingSnapshot.score=i):this.dailyRankingSnapshot={ + joined:t,score:i,date:""} + } + invalidate(){ + this.lastFetchTime=0} + } + ; + Vt(Dzt,"BattleSummaryManager"),Kt(Dzt,"instance"); + let Lzt=Dzt; + const Gzt=class t{ + constructor(){ + Kt(this,"active",!1),Kt(this,"checking",!1),Kt(this,"frameSkip",0),Kt(this,"currentSteps",[]),Kt(this,"cachedCondition",null),Kt(this,"pointingDelayTimer",null),Kt(this,"pointingDelayed",!1),Kt(this,"listItemsGetter",null),Kt(this,"bottomMenuGetter",null),Kt(this,"popupButtonGetter",null),Kt(this,"subMenuButtonGetter",null),Kt(this,"currentSubViewName",""),Kt(this,"reviveButtonGetter",null),Kt(this,"rightMenuIndicatorButtonGetter",null),Kt(this,"dailyQuestButtonGetter",null),Kt(this,"petButtonGetter",null),Kt(this,"mineButtonGetter",null),Kt(this,"guildButtonGetter",null),Kt(this,"pendingParent",null),Kt(this,"pendingBtn",null)} + static getInstance(){ + return this.instance||(this.instance=new t),this.instance} + async init(){ + if(0==TL.numRevive&&TL.wave<3)return; + const t=pzt.getInstance(); + if(0!==t.missionList.length){ + if(await t.loadInfo(),t.isAllCompleted())return this.active=!1,void(Mzt.getInstance().visible=!1); + Azt.getInstance().retire(),Mzt.getInstance().onClaim=()=>{ + this.onRewardClaimed()} + ,this.active=!0,this.refreshMission(),this.onConditionChanged()} + else this.active=!1} + refreshMission(){ + const t=pzt.getInstance(),i=t.getCurrentMission(); + if(!i)return this.active=!1,this.stopFrameCheck(),void(Mzt.getInstance().visible=!1); + Mzt.getInstance().visible=!0,Mzt.getInstance().setData(i),Mzt.getInstance().activated=t.rewardPending,this.currentSteps=t.getCurrentSteps(),this.cachedCondition=Uzt(i.condition),this.startFrameCheck(),this.updatePointing()} + startFrameCheck(){ + this.checking||(this.checking=!0,this.frameSkip=0,LM.getInstance().add(this.onFrameCheck,this))} + stopFrameCheck(){ + this.checking&&(this.checking=!1,LM.getInstance().remove(this.onFrameCheck,this))} + onFrameCheck(){ + if(++this.frameSkip<t.CHECK_INTERVAL)return; + this.frameSkip=0; + const i=pzt.getInstance(); + if(!i.rewardPending)return this.cachedCondition&&Fzt(this.cachedCondition)?(i.rewardPending=!0,Mzt.getInstance().activated=!0,void this.updatePointing()):void this.updatePointing(); + this.updatePointing()} + onMenuChanged(){ + this.active&&this.updatePointing()} + onConditionChanged(){ + this.active&&(this.frameSkip=t.CHECK_INTERVAL)} + async onRewardClaimed(){ + if(!this.active)return; + const t=pzt.getInstance(); + if(!t.rewardPending)return; + Azt.getInstance().hideFromTarget(),this.stopFrameCheck(); + const i=t.currentMissionId; + if(await t.claimReward(i)>0&&qF.getInstance().updateGem(),t.isAllCompleted())return this.active=!1,this.stopFrameCheck(),void(Mzt.getInstance().visible=!1); + this.refreshMission(),this.onConditionChanged()} + registerBottomMenuGetter(t){ + this.bottomMenuGetter=t} + registerSubMenuButtonGetter(t){ + this.subMenuButtonGetter=t} + registerListItemsGetter(t,i=""){ + this.listItemsGetter=t,this.currentSubViewName=i,this.updatePointing()} + registerPopupButtonGetter(t){ + this.popupButtonGetter=t,this.updatePointing()} + unregisterPopupButtonGetter(){ + this.popupButtonGetter=null} + unregisterListItemsGetter(t=""){ + t&&this.currentSubViewName!==t||(this.listItemsGetter=null,this.currentSubViewName="")} + registerReviveButtonGetter(t){ + this.reviveButtonGetter=t,this.updatePointing()} + unregisterReviveButtonGetter(){ + this.reviveButtonGetter=null} + registerRightMenuIndicatorButtonGetter(t){ + this.rightMenuIndicatorButtonGetter=t,this.updatePointing()} + registerDailyQuestButtonGetter(t){ + this.dailyQuestButtonGetter=t,this.updatePointing()} + unregisterDailyQuestButtonGetter(){ + this.reviveButtonGetter=null} + registerPetButtonGetter(t){ + this.petButtonGetter=t,this.updatePointing()} + unregisterPetButtonGetter(){ + this.petButtonGetter=null} + registerMineButtonGetter(t){ + this.mineButtonGetter=t,this.updatePointing()} + unregisterMineButtonGetter(){ + this.mineButtonGetter=null} + registerGuildButtonGetter(t){ + this.guildButtonGetter=t,this.updatePointing()} + unregisterGuildButtonGetter(){ + this.guildButtonGetter=null} + showWithDelay(i,s){ + const e=Azt.getInstance(); + if(e.currentTarget!==i){ + if(this.pointingDelayed)return this.pendingParent=i,void(this.pendingBtn=s); + e.hideFromTarget(),this.pendingParent=i,this.pendingBtn=s,this.pointingDelayed=!0,this.pointingDelayTimer&&clearTimeout(this.pointingDelayTimer),this.pointingDelayTimer=setTimeout(()=>{ + this.pointingDelayed=!1,this.pointingDelayTimer=null,this.pendingParent&&this.pendingBtn&&e.showOnTarget(this.pendingParent,this.pendingBtn),this.pendingParent=null,this.pendingBtn=null} + ,t.POINTING_DELAY)} + else e.showOnTarget(i,s)} + cancelPointingDelay(){ + this.pointingDelayTimer&&(clearTimeout(this.pointingDelayTimer),this.pointingDelayTimer=null),this.pointingDelayed=!1} + updatePointing(){ + if(!this.active)return; + if(0===this.currentSteps.length)return Azt.getInstance().hideFromTarget(),void this.cancelPointingDelay(); + const t=pzt.getInstance(); + if(t.rewardPending){ + const t=Mzt.getInstance(); + return void this.showWithDelay(t,{ + x:0,y:-20,width:t.width,height:t.height} + )} + const i=Azt.getInstance(); + for(const s of this.currentSteps){ + if("-1"===s.action||"none"===s.action)return i.hideFromTarget(),void this.cancelPointingDelay(); + if("bottomMenu"===s.action){ + const t=s.target; + if(dzt.currentIndex===t)continue; + if(this.bottomMenuGetter){ + const i=this.bottomMenuGetter(t); + i&&this.showWithDelay(i.parent,i.btn)} + return} + if("list"===s.action){ + if("Tower"==this.currentSubViewName&&1==s.step)continue; + if(this.popupButtonGetter)continue; + if(!this.listItemsGetter)return; + const t=this.listItemsGetter(),i=s.target; + if(i<0||i>=t.length)return; + const e=t[i]; + if(!e)return; + const n=s.param; + if(n&&n.includes("|")){ + let t=!1; + for(let e=this.currentSteps.indexOf(s)+1; + e<this.currentSteps.length; + e++){ + const i=this.currentSteps[e]; + if("list"===i.action&&i.param&&!i.param.includes("|")){ + const s=this.listItemsGetter()[i.target]; + if(s&&s[i.param]){ + t=!0; + break} + } + } + if(t)continue; + const i=n.split("|"),h=Number(i[0])||0,r=Number(i[1])||0; + this.showWithDelay(e,{ + x:h,y:r,width:0,height:0} + )} + else if(n&&"-1"!==n){ + const t=e[n]; + if(!t)continue; + if("activated"in t&&!1===t.activated)return Azt.getInstance().hideFromTarget(),void this.cancelPointingDelay(); + this.showWithDelay(e,t)} + return} + if("subMenu"===s.action){ + const t=s.param; + if(t&&this.currentSubViewName.toLowerCase().includes(t.replace("btn","").toLowerCase()))continue; + if(this.subMenuButtonGetter&&t&&"-1"!==t){ + const i=this.subMenuButtonGetter(t); + i&&this.showWithDelay(i.parent,i.btn)} + return} + if("popup"===s.action){ + if(!this.popupButtonGetter)return; + const t=s.param; + if(t&&"-1"!==t){ + const i=this.popupButtonGetter(t); + i&&this.showWithDelay(i.parent,i.btn)} + return} + if("revive"===s.action){ + if(!this.reviveButtonGetter)return; + const t=s.param; + if(t&&"-1"!==t){ + const i=this.reviveButtonGetter(t); + i&&this.showWithDelay(i.parent,i.btn)} + return} + if("dailyQuest"===s.action){ + if(!Ini.getInstance().opened){ + if(!this.rightMenuIndicatorButtonGetter)return; + const t=this.rightMenuIndicatorButtonGetter("indicatorArea"); + return void(t&&this.showWithDelay(t.parent,t.btn))} + if(!this.dailyQuestButtonGetter)return; + const t=s.param; + if(t&&"-1"!==t){ + const i=this.dailyQuestButtonGetter(t); + i&&this.showWithDelay(i.parent,i.btn)} + return} + if("spiritBattle"===s.action){ + if(!Ini.getInstance().opened){ + if(!this.rightMenuIndicatorButtonGetter)return; + const t=this.rightMenuIndicatorButtonGetter("indicatorArea"); + return void(t&&this.showWithDelay(t.parent,t.btn))} + if(3==t.petStep)return i.hideFromTarget(),void this.cancelPointingDelay(); + if(0==t.petStep){ + if(!this.petButtonGetter)return; + const t=s.param; + if(t&&"-1"!==t){ + const i=this.petButtonGetter(t); + i&&this.showWithDelay(i.parent,i.btn)} + } + else if(1==t.petStep){ + const t="tabPlateau"; + if(this.subMenuButtonGetter){ + const i=this.subMenuButtonGetter(t); + i&&this.showWithDelay(i.parent,i.btn)} + } + else if(2==t.petStep){ + if(!this.listItemsGetter)return; + const t=this.listItemsGetter()[0]; + if(!t)return; + const i=t.children[0],s=i.x+.5*i.width,e=i.y+.5*i.height; + this.showWithDelay(t,{ + x:s,y:e,width:0,height:0} + )} + return} + if("mineClear"===s.action){ + if(!Ini.getInstance().opened){ + if(!this.rightMenuIndicatorButtonGetter)return; + const t=this.rightMenuIndicatorButtonGetter("indicatorArea"); + return void(t&&this.showWithDelay(t.parent,t.btn))} + if(!this.mineButtonGetter)return; + const t=s.param; + if(t&&"-1"!==t){ + const i=this.mineButtonGetter(t); + i&&this.showWithDelay(i.parent,i.btn)} + return} + if("guildJoin"===s.action){ + if(!Ini.getInstance().opened){ + if(!this.rightMenuIndicatorButtonGetter)return; + const t=this.rightMenuIndicatorButtonGetter("indicatorArea"); + return void(t&&this.showWithDelay(t.parent,t.btn))} + if(!this.guildButtonGetter)return; + const t=s.param; + if(t&&"-1"!==t){ + const i=this.guildButtonGetter(t); + i&&this.showWithDelay(i.parent,i.btn)} + return} + } + i.hideFromTarget(),this.cancelPointingDelay()} + isActive(){ + return this.active} + } + ; + Vt(Gzt,"MissionGuideController"),Kt(Gzt,"instance"),Kt(Gzt,"CHECK_INTERVAL",10),Kt(Gzt,"POINTING_DELAY",1e3); + let Bzt=Gzt; + function Uzt(t){ + if(!t)return null; + const i=t.split("#"),s=i[0].split("|"),e=s[0],n=Number(s[1])||0; + if(i.length<2)return{ + type:e,targetNum:n,condType:"",condValue:0} + ; + const h=i[1].split("|"); + return{ + type:e,targetNum:n,condType:h[0],condValue:Number(h[1])||0} + } + function Fzt(t){ + switch(t.type){ + case"quest":{ + const i=lL.getInstance().getDataByKindNum(t.targetNum); + return!!i&&"level"===t.condType&&i.level>=t.condValue} + case"hero":{ + const i=wx.getInstance().list; + let s=0; + for(const e of i)e&&("level"===t.condType&&e.level>=t.condValue&&s++,"enhance"===t.condType&&e.enhance>=t.condValue&&s++); + return s>=t.targetNum} + case"castle":{ + const i=mR.getInstance().bookList,s=t.targetNum-1; + if(s<0||s>=i.length)return!1; + const e=i[s]; + return!!e&&("level"===t.condType?e.level>=t.condValue:"enhance"===t.condType&&mR.getInstance().castleEnhance>=t.condValue)} + case"numRevive":return TL.numRevive>=t.targetNum; + case"maxRevive":return TL.maxWave>=t.targetNum; + case"heart":{ + const i=mR.getInstance().specialBookList; + return 0!==i.length&&i[0].level>=t.targetNum} + case"core1":return Nx.getInstance().userCores[0]>=t.targetNum; + case"treasure":return Hx.getInstance().equipedKindNums.length>=t.targetNum; + case"maxTeam":return TL.maxTeamSlots>=t.targetNum; + case"speed2":return TL.speed15EndTime-tx.time>0; + case"pvpBattle":{ + const t=Lzt.getInstance().getPvp(); + return!!t&&t.ticket<t.maxTicket} + case"towerBattle":{ + const t=Lzt.getInstance().getTower(); + return!!t&&t.currentFloor>0} + case"dailyQuest":return SVt.getInstance().totalScore>0; + case"spiritBattle":return cx.getInstance().list.length>0; + case"mineClear":return XG.getInstance().status.mineExp>0; + case"guildJoin":return ID.hasGuild; + default:return!1} + } + Vt(Uzt,"parseCondition"),Vt(Fzt,"checkCondition"); + const Hzt=class t extends azt{ + constructor(){ + super(),Kt(this,"list"),this.list=new Kk(lzt,635,VA.listHeight),this.list.x=0,this.list.y=0,this.addChild(this.list),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} + static getInstance(){ + return null==t.instance&&(t.instance=new t),t.instance} + onAdded(){ + LM.getInstance().add(this.onFrame,this)} + onRemoved(){ + Bzt.getInstance().unregisterListItemsGetter("Shop"),LM.getInstance().remove(this.onFrame,this)} + onFrame(){ + var t; + if(null==(null==(t=this.parent)?void 0:t.parent))return; + const i=this.list.getItemList(); + for(let s=0; + s<i.length; + s++)!1!==i[s].visible&&i[s].updateCooldown()} + getListItems(){ + return this.list.getItemList()} + setData(){ + Bzt.getInstance().registerListItemsGetter(()=>this.getListItems(),"Shop"); + let t=[]; + t.push({ + kindNum:1,icon:"UI_SHOP_SPEED2",name:xG.getValueReplaceMulti("GAME_57",["@@","##"],[20,2],"20분간 게임속도 2배 증가"),gem:100,desc:xG.getValueReplaceMulti("GAME_57",["@@","##"],[20,2],"20분간 게임속도 2배 증가")} + ),t.push({ + isAd:!0,adsType:2,dailyMax:20,icon:"UI_SHOP_SPEED2",name:xG.getValueReplaceMulti("GAME_228",["##","@@"],[20,2],"{ + 광고보고 20분간 2배속 } + "),rewardDesc:xG.getValueReplaceMulti("GAME_232",["##","@@","$$"],[10,2,20],"{ + 20분간 2배속, 하루 최대 3회 } + ")} + ),t.push({ + isAd:!0,adsType:3,dailyMax:5,icon:"UI_COIN_Big",name:xG.getValueReplace("GAME_229","##",100,"{ + 광고보고 명예코인 100개 } + "),rewardDesc:xG.getValueReplaceMulti("GAME_233",["##","@@"],[100,5],"{ + 명예코인 100개, 하루 최대 5회 } + ")} + ),t.push({ + isAd:!0,adsType:5,dailyMax:10,icon:"UI_SHOP_GEM",name:xG.getValueReplace("GAME_231","##",100,"{ + 광고보고 보석 100개 } + "),rewardDesc:xG.getValueReplaceMulti("GAME_235",["##","@@"],[100,10],"{ + 보석 100개, 하루 최대 10회 } + ")} + ),this.list.dataProvider=t,this.onAdded()} + get className(){ + return"ShopGemSubView"} + } + ; + Vt(Hzt,"ShopGemSubView"),Kt(Hzt,"instance"); + let Wzt=Hzt; + const $zt=class extends T$t{ + constructor(t="Icon_Web_Market",i="UI_Ekkorr"){ + super(t,i),Kt(this,"lbl"); + const s=fD.DEFAULT_OUTLINE_FONT_OPTION_16; + s.fill=fD.COLOR_BRIGHT_ORANGE,this.lbl=new iL("WEB",s.fill,s),this.lbl.eventMode="none",this.addChild(this.lbl),this.update()} + update(){ + super.update(),this.lbl&&(this.lbl.x=this.icon.x-.5*this.lbl.width,this.lbl.y=this.icon.y+10),this.pivot.set(.5*this.width,.5*this.height)} + onDown(){ + this.scale=.95} + onUp(){ + this.scale=1} + get width(){ + return this.icon.width} + get height(){ + return this.icon.height} + } + ; + Vt($zt,"WebMarketButton"); + let jzt=$zt; + const Vzt=class t extends fG{ + constructor(){ + super(),Kt(this,"lblMessage",new iL("",16777215,fD.ERROR_POPUP_LABEL_OPTION)),Kt(this,"btnConfirm",new oG("이동")),Kt(this,"btnCancel",new qWt("취소")),Kt(this,"iconNote"),Kt(this,"lblNote",new iL("",fD.COLOR_LIGHT_BROWN,fD.ERROR_POPUP_LABEL_OPTION)),Kt(this,"onConfirm",null),Kt(this,"onCancel",null),this.title="알림",this.lblMessage.y=90; + let t=this.lblMessage.getStyle(); + t.align="center",this.lblMessage.setStyle(t),this.iconNote=new He(QA.getTexture("UI_Ekkorr","UI_Alarm")),this.iconNote.anchor.set(.5),this.iconNote.scale.set(.8),this.iconNote.x=35,t=this.lblNote.getStyle(),t.fontSize=17,t.lineHeight=25,this.lblNote.setStyle(t),this.lblNote.x=this.iconNote.x+.5*this.iconNote.width+5,this.contentContainer.addChild(this.lblMessage,this.btnConfirm,this.btnCancel,this.lblNote,this.iconNote),this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.btnCancel.onClick=this.onCancelClick.bind(this)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + onConfirmClick(){ + this.hide(); + let t=this.onConfirm; + this.onConfirm=null,null!==t&&t()} + onCancelClick(){ + this.hide(); + let t=this.onCancel; + this.onCancel=null,null!==t&&t()} + showError(t,i=null,s=null,e=null){ + let n=t.errorMessage,h=xG.getErrorMessage(t.error); + h&&(n=h),i&&(n+="\n"+i),this.show(n,s,e)} + show(t,i=null,s=null){ + this.onConfirm=i,this.onCancel=s; + let e=xG.getText("GAME_939","웹 마켓에서 특별한 상품들을 만나보실 수 있습니다."),n=xG.getText("GAME_940","웹 마켓으로 이동하시겠습니까?"),h="("+xG.getText("GAME_941","구매하신 상품은 인게임 우편으로 전송됩니다.")+")",r=xG.getText("GAME_942","상품 결제 및 구매 문제 발생 시, NEXT MARKET 고객센터로 문의해 주세요."); + this.lblMessage.text=e+"\n"+n+"\n"+h,this.lblNote.text=r,this.title=xG.getText("COMMON_4","알림"),this.btnConfirm.text=xG.getText("COMMON_65","이동"),this.btnCancel.text=xG.getText("COMMON_2","취소"),this.updateLayout(),super.show(t,i,s)} + updateLayout(){ + this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.btnConfirm.x=.5*(this.width-this.btnConfirm.width-this.btnCancel.width-20),this.btnCancel.x=this.btnConfirm.x+this.btnConfirm.width+20,this.btnConfirm.y=this.lblMessage.y+this.lblMessage.height+30,this.btnCancel.y=this.btnConfirm.y,this.iconNote.y=this.btnConfirm.y+this.btnConfirm.height+40,this.lblNote.y=this.iconNote.y+.5*(this.iconNote.height-this.lblNote.height),this.height=this.lblNote.y+this.lblNote.height+30} + getDefaultPositionY(){ + return.3*VA.stageHeight} + onBackButton(){ + return this.onConfirmClick(),!0} + } + ; + Vt(Vzt,"LineMarketConfirimPopup"),Kt(Vzt,"_instance"); + let Kzt=Vzt; + const zzt=class t extends azt{ + constructor(){ + super(),Kt(this,"btnPackage",new YKt(xG.getText("GAME_237","패키지"),150,80)),Kt(this,"btnPeriod",new YKt(xG.getText("GAME_238","기간상품"),150,80)),Kt(this,"btnNormal",new YKt(xG.getText("GAME_239","일반상품"),150,80)),Kt(this,"tabs"),Kt(this,"activeIndex",0),Kt(this,"btnLineMarket",new jzt),Kt(this,"lblRedGem"),Kt(this,"list"),Kt(this,"productList",null),Kt(this,"setDataCallback",null),Kt(this,"onPaymentSuccessBind"),this.tabs=[this.btnPackage,this.btnPeriod,this.btnNormal]; + for(let t=0; + t<this.tabs.length; + t++){ + const i=this.tabs[t]; + this.addChild(i); + const s=t; + i.onClick=()=>this.switchTab(s)} + this.layoutTabs(); + const i=this.tabs[0]; + this.addChild(this.btnLineMarket),this.btnLineMarket.x=.5*this.btnLineMarket.width+5,this.btnLineMarket.y=i.y+.5*i.height,this.btnLineMarket.onClick=this.onLineMarketBtnClick.bind(this),this.lblRedGem=new qB("UI_RED_GEM_ICON","0",fD.COLOR_RED_GEM,fD.DEFAULT_FONT_OPTION_18),this.lblRedGem.text="0",this.lblRedGem.x=this.btnLineMarket.x+.5*this.btnLineMarket.width+10,this.lblRedGem.y=this.btnLineMarket.y-.5*this.lblRedGem.height+1,this.addChild(this.lblRedGem),"N"==M5.getInstance().nextMarketYn&&(this.btnLineMarket.visible=!1,this.lblRedGem.visible=!1); + const s=VA.listHeight-t.TAB_HEIGHT; + this.list=new P5(zjt,635,s),this.list.x=0,this.list.y=t.TAB_HEIGHT,this.addChild(this.list),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} + static getInstance(){ + return null==t.instance&&(t.instance=new t),t.instance} + onAdded(){ + this.setPaymentSuccess(!0)} + onRemoved(){ + this.setPaymentSuccess(!1)} + async onLineMarketBtnClick(){ + const t="1.5.31"; + "capacitor"==IL.getInstance().envPlatform&&zA.isAppBundleVersionLessThan(t)?yG.getInstance().show(xG.getText("COMMON_497","최신 버전으로 업데이트 후에 이용해 주세요.")+`\n${ + xG.getText("COMMON_500","최신 버전")} + : ${ + t} + `,()=>{ + const t=IL.getInstance().getStoreLink(); + t&&window.open(t,"_blank")} + ):Kzt.getInstance().show("",this.goLineMarket.bind(this))} + async goLineMarket(){ + var t; + const i=navigator.userAgent||"",s=/apps-in-toss|supertoss/i.test(i),e=IL.getInstance().isGoogleClient()||IL.getInstance().isGoogleClientKr()||IL.getInstance().isAppleClient()||IL.getInstance().isAppleClientKr(); + let n=null; + e||s||(n=window.open("about:blank","_blank")); + let h="",r=""; + if("capacitor"==IL.getInstance().envPlatform){ + const{ + appsFlyer:t} + =await Xt(async()=>{ + const{ + appsFlyer:t} + =await Promise.resolve().then(()=>lfi); + return{ + appsFlyer:t} + } + ,void 0); + try{ + h=await t.getAppsFlyerId()} + catch(o){ + } + const i=await IL.getInstance().getConversionData(); + i&&"afStatus"in i&&(r=i.afStatus)} + try{ + const i=await lD.getInstance().lineNext.getStoreUrl(h,r); + if(!i.success||!(null==(t=i.body)?void 0:t.url)){ + let t=xG.getText("COMMON_83","잠시 후에 이용해 주세요."); + return yG.getInstance().show(t),void(n&&n.close())} + const o=i.body.url; + if(e){ + const{ + Browser:t} + =await Xt(async()=>{ + const{ + Browser:t} + =await Promise.resolve().then(()=>vfi); + return{ + Browser:t} + } + ,void 0); + return void t.open({ + url:o} + )} + if(s)return void(window.location.href=o); + n?n.location.href=o:window.location.href=o} + catch(_et){ + n&&n.close()} + } + switchTab(t,i=!0){ + this.activeIndex=t; + for(let e=0; + e<this.tabs.length; + e++)this.tabs[e].selected=e===t; + this.productList=null; + const s=M5.getInstance(); + switch(t){ + case 0:this.productList=s.packageList.filter(t=>t.active&&s.isAvailableForPurchase(t)); + break; + case 1:this.productList=s.periodList.filter(t=>t.active&&s.isAvailableForPurchase(t)); + break; + case 2:this.productList=s.normalList.filter(t=>t.active&&s.isAvailableForPurchase(t))} + this.productList&&(this.list.dataProvider=this.productList),i&&this.list.scrollTo(0)} + async setData(){ + this.updateRedGem(),await M5.getInstance().getAvailProducts(1),this.switchTab(this.activeIndex),this.updateLanguage(),this.setDataCallback&&(this.setDataCallback(),this.setDataCallback=null)} + refreshList(){ + this.switchTab(this.activeIndex,!1)} + layoutTabs(){ + for(const i of this.tabs)i.fitWithinWidth(150,50); + let t=634; + for(let i=this.tabs.length-1; + i>=0; + i--){ + const s=this.tabs[i]; + t-=152,s.x=t,s.y=3} + } + updateLanguage(){ + this.btnPackage.text=xG.getText("GAME_237","패키지"),this.btnPeriod.text=xG.getText("GAME_238","기간상품"),this.btnNormal.text=xG.getText("GAME_239","일반상품"),this.layoutTabs()} + get className(){ + return"ShopPaySubView"} + updateRedGem(){ + this.lblRedGem.text=TL.redGem.toFixed(0)} + getActiveIndex(){ + return this.activeIndex} + getCurrentProductList(){ + return this.productList} + clickTab(t){ + t!==this.activeIndex&&(t<0||t>=this.tabs.length||this.switchTab(t))} + scrollWithProductIds(t){ + if(!this.productList)return; + if(!t||0==t.length)return; + const i=this.productList.findIndex(i=>t.includes(i.productId)); + -1!==i&&this.list.scrollTo(i)} + setPaymentSuccess(t){ + cS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),cS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))} + onPaymentSuccess(t){ + this.refreshList(),this.updateRedGem()} + } + ; + Vt(zzt,"ShopPaySubView"),Kt(zzt,"instance"),Kt(zzt,"TAB_HEIGHT",60); + let Yzt=zzt; + const qzt=class extends Yk{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","UI_SHOP_GEM"))),Kt(this,"lblName"),Kt(this,"lblDesc"),Kt(this,"rewardContainer",new Ge),Kt(this,"rewardItems",[]),Kt(this,"btnBuy",new g$t("구매",120)),Kt(this,"purchasing",!1),this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30} + ),this.bg.x=5,this.bg.width=630,this.bg.height=100,this.addChild(this.bg),this.icon.scale.set(1),this.icon.x=25,this.icon.y=.5*(this.bg.height-this.icon.height),this.addChild(this.icon); + const t=fD.DEFAULT_OUTLINE_FONT_OPTION_16; + t.fill=fD.DEFAULT_COLOR,this.lblName=new iL("",t.fill,t),this.lblName.x=140,this.lblName.y=10,this.addChild(this.lblName); + const i=fD.DEFAULT_DESC_FONT_OPTION_16; + i.fill=13421772,this.lblDesc=new iL("",i.fill,i),this.lblDesc.x=140,this.lblDesc.y=45,this.addChild(this.lblDesc),this.rewardContainer.x=140,this.rewardContainer.y=42,this.addChild(this.rewardContainer); + for(let s=0; + s<5; + s++){ + const t=new I5; + t.scale.set(.7),this.rewardItems.push(t),this.rewardContainer.addChild(t)} + this.btnBuy.color=eG.BROWN,this.btnBuy.height=55,this.btnBuy.width=120,this.btnBuy.x=this.bg.width-this.btnBuy.width-10,this.btnBuy.y=.5*(this.bg.height-this.btnBuy.height),this.addChild(this.btnBuy),this.btnBuy.onClick=this.onBuy.bind(this),fD.setLabelWrapWidth(this.lblName,this.btnBuy.x-this.lblName.x),fD.setLabelWrapWidth(this.lblDesc,this.btnBuy.x-this.lblDesc.x)} + async onBuy(){ + try{ + if(!this.data)return; + if(this.purchasing)return; + this.purchasing=!0,this.isSubscriptionRow(this.data)?await this.buySubscription():await Ijt.getInstance().buyProduct(this.data.productId),this.purchasing=!1} + catch(_et){ + this.purchasing=!1} + } + isSubscriptionRow(t){ + const i=null==t?void 0:t.rewards; + return!!Array.isArray(i)&&i.some(t=>"yes"===(null==t?void 0:t.subscribe))} + async buySubscription(){ + const t=this.data,i=M5.getInstance().getStoreProductIdByProductId(this.data.productId); + if(!i)return; + const s="1.5.29"; + if("capacitor"==IL.getInstance().envPlatform&&zA.isAppBundleVersionLessThan(s))return void yG.getInstance().show(xG.getText("COMMON_497","최신 버전으로 업데이트 후에 이용해 주세요.")+`\n${ + xG.getText("COMMON_500","최신 버전")} + : ${ + s} + `,()=>{ + const t=IL.getInstance().getStoreLink(); + t&&window.open(t,"_blank")} + ); + let e; + try{ + e=structuredClone(t)} + catch(o){ + e=JSON.parse(JSON.stringify(t))} + const n=Vt(async()=>{ + cS.getInstance().dispatchCustomEvent("PaymentSuccess",{ + productId:e.productId,productVo:e} + )} + ,"onSubscriptionSuccess"),{ + Capacitor:h} + =await Xt(async()=>{ + const{ + Capacitor:t} + =await Promise.resolve().then(()=>mjt); + return{ + Capacitor:t} + } + ,void 0),r=$jt.getInstance(); + "ios"===h.getPlatform()?await r.buyAppleSubscription(this.data.productId,i,n):await r.buyGoogleSubscription(this.data.productId,i,n)} + setData(t){ + this.data=t; + const i=t; + this.lblName.text=xG.getText(`PRODUCT_NAME_${ + i.id} + `,t.name??""); + const s=i.descriptionLangIds.split("|").map(t=>xG.getText(t.trim(),"")); + this.lblDesc.text=s.filter(t=>t).join("\n")||i.descriptions||"",i.productId==b5.Secretary?this.showDescMode(i):this.showRewardMode(i.rewards); + let e=i.iconNames; + e||(e="Package_1"),this.icon.texture=QA.getTexture("UI_Ekkorr",e),this.btnBuy.text=M5.getInstance().getPriceStr(i.productId),this.btnBuy.x=this.bg.width-this.btnBuy.width-10} + showRewardMode(t){ + this.lblDesc.visible=!1,this.rewardContainer.visible=!0; + const i=Math.min(t.length,5); + let s=0; + for(let e=0; + e<5; + e++){ + const n=this.rewardItems[e]; + e<i?(n.setDataFrom(t[e]),n.visible=!0,n.x=s,s+=n.width*n.scale.x+5):n.visible=!1} + } + showDescMode(t){ + if(this.lblDesc.visible=!0,this.rewardContainer.visible=!1,t.descriptionLangIds){ + const i=t.descriptionLangIds.split("|").map(t=>xG.getText(t.trim(),"")); + this.lblDesc.text=i.filter(t=>t).join("\n")||t.descriptions||""} + else this.lblDesc.text=(t.descriptions??"").replace(/\\n/g,"\n"); + let i=45; + i+this.lblDesc.height>this.bg.y+this.bg.height-3&&(i=this.bg.y+this.bg.height-3-this.lblDesc.height),this.lblDesc.y=i} + onClick(t,i){ + this.data&&(t>=this.btnBuy.x||Djt.getInstance().showProduct(this.data))} + get height(){ + return this.bg.height+2} + } + ; + Vt(qzt,"ShopPayItemRendererStage"); + let Xzt=qzt; + const Jzt=class t extends azt{ + constructor(){ + super(),Kt(this,"list"),Kt(this,"subscribeLabel"),Kt(this,"onPaymentSuccessBind"); + const t=VA.listHeight-0; + this.list=new P5(Xzt,635,t),this.list.x=0,this.list.y=0,this.addChild(this.list),this.subscribeLabel=new qB("UI_Alarm","0",fD.COLOR_WHITE,fD.DEFAULT_FONT_OPTION_16),this.subscribeLabel.visible=!1,this.subscribeLabel.textOffsetX=-1,this.subscribeLabel.textOffsetY=-2,this.subscribeLabel.text=xG.getText("COMMON_504","구독"),this.subscribeLabel.x=10,this.subscribeLabel.y=10,this.addChild(this.subscribeLabel),this.subscribeLabel.eventMode="dynamic",this.subscribeLabel.on("pointertap",this.onSubscribeLabelTap,this),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} + static getInstance(){ + return null==t.instance&&(t.instance=new t),t.instance} + onAdded(){ + this.setPaymentSuccess(!0)} + onRemoved(){ + this.setPaymentSuccess(!1)} + get className(){ + return"ShopPaySubViewStage"} + async setData(){ + this.updateSubscribeLabel(); + let t=0,i=VA.listHeight-t; + this.subscribeLabel.visible&&(t=this.subscribeLabel.y+this.subscribeLabel.height+5,i=VA.listHeight-t),this.list.y=t,this.list.setListHeight(i); + const s=M5.getInstance(); + this.list.dataProvider=s.reviewShopList} + refreshList(){ + this.setData()} + updateSubscribeLabel(){ + let t=!1; + TL.isAssistantPremium?t=!0:"capacitor"==IL.getInstance().envPlatform&&(M5.getInstance().getByProductId(b5.Secretary)||(t=!0)),this.subscribeLabel.visible=t} + onSubscribeLabelTap(t){ + const i=IL.getInstance(); + let s=xG.getText("COMMON_502","구독은 현재 기간이 종료되기 최소 24시간 전에 취소하지 않으면 자동으로 갱신됩니다."); + i.isGoogleClient()||i.isGoogleClientKr()?s+="\n\n"+xG.getText("COMMON_505","Google Play 구독 설정에서 구독을 관리하거나 취소할 수 있습니다."):s+="\n\n"+xG.getText("COMMON_503","앱 스토어 계정 설정에서 구독을 관리하거나 취소할 수 있습니다."); + const e=S5.getInstance(); + e.title=xG.getText("COMMON_4","알림"),e.show(s)} + setPaymentSuccess(t){ + cS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),cS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))} + onPaymentSuccess(t){ + this.refreshList()} + } + ; + Vt(Jzt,"ShopPaySubViewStage"),Kt(Jzt,"instance"); + let Qzt=Jzt; + const Zzt=class t extends KKt{ + constructor(){ + super(),Kt(this,"subViews",[]),Kt(this,"shopSubMenu",rzt.getInstance()),Kt(this,"currentIndex",-1),this.shopSubMenu.setTabs([{ + labelKey:"GAME_197",defaultText:"보석상점"} + ,{ + labelKey:"GAME_198",defaultText:"결제상점"} + ]),this.subViews=[Wzt.getInstance(),Yzt.getInstance()]; + const t=this.shopSubMenu.height; + for(const i of this.subViews)i.y=t,i.visible=!1,this.addChild(i); + if(M5.getInstance().isReviewShop()){ + const i=Qzt.getInstance(); + i.y=t,i.visible=!1,this.addChild(i)} + this.addChild(this.shopSubMenu),this.shopSubMenu.onTabChange=t=>this.switchTab(t),this.switchTab(0)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + switchTab(t){ + this.currentIndex=t; + for(let i=0; + i<this.subViews.length; + i++)this.subViews[i].visible=i===t; + this.checkShopForReview()} + checkShopForReview(){ + if(M5.getInstance().isReviewShop()){ + const t=Qzt.getInstance(); + 1==this.currentIndex?(this.subViews[this.currentIndex].visible=!1,t.setData(),t.visible=!0):t.visible=!1} + } + setData(){ + this.shopSubMenu.updateLanguage(),this.subViews[0].setData(),this.subViews[1].setData(),this.checkShopForReview()} + get className(){ + return"ShopView"} + getCurrentViewClassName(){ + for(let t=0; + t<this.subViews.length; + t++)if(this.subViews[t].visible)return this.subViews[t].className; + return""} + getCurrentIndex(){ + return this.currentIndex} + clickTab(t){ + t!==this.currentIndex&&(t<0||t>=this.subViews.length||(this.switchTab(t),this.shopSubMenu.setActiveTab(t)))} + updateLanguage(){ + this.setData(),this.shopSubMenu.updateLanguage()} + } + ; + Vt(Zzt,"ShopView"),Kt(Zzt,"instance"); + let tYt=Zzt; + const iYt=class t{ + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + constructor(){ + } + isQuestView(){ + var t; + return null!=jKt.getInstance().currentView&&"QuestView"==(null==(t=jKt.getInstance().currentView)?void 0:t.className)} + isHeroView(){ + var t; + return null!=jKt.getInstance().currentView&&"HeroView"==(null==(t=jKt.getInstance().currentView)?void 0:t.className)} + isHeroSubView(){ + var t,i; + return 0!=this.isHeroView()&&"HeroSubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isHeroRosterView(){ + var t,i; + return 0!=this.isHeroView()&&"HeroRosterView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isHeroHireSubView(){ + var t,i; + return 0!=this.isHeroView()&&"HeroHireSubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isCastleView(){ + var t; + return null!=jKt.getInstance().currentView&&"CastleView"==(null==(t=jKt.getInstance().currentView)?void 0:t.className)} + isCastleSubView(){ + var t,i; + return 0!=this.isCastleView()&&"CastleSubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isCastleUpgradeSubView(){ + var t,i; + return 0!=this.isCastleView()&&"CastleUpgradeSubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isTreasureView(){ + var t; + return null!=jKt.getInstance().currentView&&"TreasureView"==(null==(t=jKt.getInstance().currentView)?void 0:t.className)} + isTreasureSubView(){ + var t,i; + return 0!=this.isTreasureView()&&"TreasureSubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isTreasureInventorySubView(){ + var t,i; + return 0!=this.isTreasureView()&&"TreasureInventorySubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isTreasureShopSubView(){ + var t,i; + return 0!=this.isTreasureView()&&"TreasureShopSubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isBattleView(){ + var t; + return null!=jKt.getInstance().currentView&&"BattleView"==(null==(t=jKt.getInstance().currentView)?void 0:t.className)} + isHonorShopSubView(){ + var t,i; + return 0!=this.isBattleView()&&"HonorShopSubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isDungeonSubView(){ + var t,i; + if(0==this.isBattleView())return!1; + const s=null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className; + return"DungeonSubView"==s||"DungeonDetailSubView"==s} + isPVPBattlePopup(){ + return this.isDetailPopupView("PVPBattlePopup")} + isDailyBattleSubView(){ + var t,i; + return 0!=this.isBattleView()&&"DailyBattleSubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isTowerSubView(){ + var t,i; + return 0!=this.isBattleView()&&"TowerSubView"==(null==(i=null==(t=jKt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} + isShopView(){ + var t; + return null!=jKt.getInstance().currentView&&"ShopView"==(null==(t=jKt.getInstance().currentView)?void 0:t.className)} + isShopGemSubView(){ + return 0!=this.isShopView()&&"ShopGemSubView"==tYt.getInstance().getCurrentViewClassName()} + isShopPaySubView(){ + return 0!=this.isShopView()&&"ShopPaySubView"==tYt.getInstance().getCurrentViewClassName()} + isDetailPopupView(t){ + const i=UU.getInstance(),s=i.children.length; + let e; + for(let n=0; + n<s; + ++n)if(e=i.getChildAt(n),"string"==typeof e.className&&e.className==t)return!0; + return!1} + isPetPopup(){ + return this.isDetailPopupView("PetPopup")} + isGuildPopup(){ + return this.isDetailPopupView("Guild2Popup")} + isInventoryPopup(){ + return this.isDetailPopupView("InventoryPopup")} + } + ; + Vt(iYt,"ViewUtil"),Kt(iYt,"instance");
- function vni(t){ - if(!t)return null; - const i=t.split("#"),s=i[0].split("|"),e=s[0],n=Number(s[1])||0; - if(i.length<2)return{ - type:e,targetNum:n,condType:"",condValue:0} - ; - const h=i[1].split("|"); - return{ - type:e,targetNum:n,condType:h[0],condValue:Number(h[1])||0} - } - function bni(t){ - switch(t.type){ - case"quest":{ - const i=rL.getInstance().getDataByKindNum(t.targetNum); - return!!i&&"level"===t.condType&&i.level>=t.condValue} - case"hero":{ - const i=wx.getInstance().list; - let s=0; - for(const e of i)e&&("level"===t.condType&&e.level>=t.condValue&&s++,"enhance"===t.condType&&e.enhance>=t.condValue&&s++); - return s>=t.targetNum} - case"castle":{ - const i=mR.getInstance().bookList,s=t.targetNum-1; - if(s<0||s>=i.length)return!1; - const e=i[s]; - return!!e&&("level"===t.condType?e.level>=t.condValue:"enhance"===t.condType&&mR.getInstance().castleEnhance>=t.condValue)} - case"numRevive":return ML.numRevive>=t.targetNum; - case"maxRevive":return ML.maxWave>=t.targetNum; - case"heart":{ - const i=mR.getInstance().specialBookList; - return 0!==i.length&&i[0].level>=t.targetNum} - case"core1":return Nx.getInstance().userCores[0]>=t.targetNum; - case"treasure":return Hx.getInstance().equipedKindNums.length>=t.targetNum; - case"maxTeam":return ML.maxTeamSlots>=t.targetNum; - case"speed2":return ML.speed15EndTime-tx.time>0; - case"pvpBattle":{ - const t=AVt.getInstance().getPvp(); - return!!t&&t.ticket<t.maxTicket} - case"towerBattle":{ - const t=AVt.getInstance().getTower(); - return!!t&&t.currentFloor>0} - case"dailyQuest":return CVt.getInstance().totalScore>0; - case"spiritBattle":return cx.getInstance().list.length>0; - case"mineClear":return KG.getInstance().status.mineExp>0; - case"guildJoin":return AD.hasGuild; - default:return!1} - } - Vt(vni,"parseCondition"),Vt(bni,"checkCondition");
- showOnTarget(t,i){ - if(this.currentTarget===t)return this.x=i.x+.55*i.width,this.y=i.y+.45*i.height,void t.addChild(this); - this.hideFromTarget(),this.currentTarget=t,this.x=i.x+.55*i.width,this.y=i.y+.45*i.height,t.addChild(this),this.show()} - hideFromTarget(){ - this.currentTarget&&(this.currentTarget=null,this.hide(),this.removeFromParent())} - show(){ - t.textures||t.load(),t.textures&&0!==t.textures.length&&(this.frame=0,this.frameCount=0,this.sp.texture=t.textures[0],this.visible=!0,this.playing||(this.playing=!0,LM.getInstance().add(this.onEnter,this)))} - hide(){ - this.visible=!1,this.playing&&(this.playing=!1,LM.getInstance().remove(this.onEnter,this))} - onEnter(){ - t.textures&&(this.frameCount++,this.frame+=.6,this.frame>=t.textures.length&&(this.frame=0),this.sp.texture=t.textures[Math.floor(this.frame)])} - destroy(){ - this.itemsGetters.clear(),this.checking&&(this.checking=!1,LM.getInstance().remove(this.onCheck,this)),this.hide(),super.destroy(),this.setBattleSwitch(!1)} - setBattleSwitch(t){ - cS.getInstance().removeEventListener("BattleSwitch",this.onBattleSwitchBind),t&&(this.onBattleSwitchBind=this.onBattleSwitch.bind(this),cS.getInstance().addEventListener("BattleSwitch",this.onBattleSwitchBind))} - async onBattleSwitch(t){ - if(!t||!t.detail)return; - if(this.retired&&0==wni.getInstance().isActive())return void this.setBattleSwitch(!1); - const i=t.detail.fromType,s=t.detail.toType; - i&&s&&(i==RU.IDLE&&s!=RU.IDLE?this.hide():i!=RU.IDLE&&s==RU.IDLE&&this.show())}
HeroRosterItemRenderer 7 hunks, 782 statements
- super(),Kt(this,"bg"),Kt(this,"lblName",new JD("늑대전사 ",16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_16)),Kt(this,"lblKnightBuff",new JD("",4495871,cD.WHITE_OUTLINE_FONT_OPTION_16)),Kt(this,"lblPlusLv",new JD("",4513092,cD.WHITE_OUTLINE_FONT_OPTION_16)),Kt(this,"lblHp",new VB("UI_HEART","100",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblAtk",new VB("UI_MAGIC_WAND","20",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblDef",new VB("UI_PHY_DEFENSE","20",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblBlock",new VB("ICON_UNIT","0",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"btnUpgrade",new xU("UI_GOLD","10000","+1")),Kt(this,"btn10",new xU("UI_GOLD","100","+10")),Kt(this,"btn100",new xU("UI_GOLD","1000","+100")),Kt(this,"btn1000",new xU("UI_GOLD","10000","+1000")),Kt(this,"starIcon",new He(QA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[0])),Kt(this,"icon",new u5),Kt(this,"heroContainer",new Ge),Kt(this,"multiLevelContainer",new Ge),Kt(this,"isMultiLevel",!1),Kt(this,"rapidClickCount",0),Kt(this,"lastRapidClickTime",0),Kt(this,"cost1",-1),Kt(this,"cost10",-1),Kt(this,"cost100",-1),Kt(this,"cost1000",-1),this.bg=new TM({ + super(),Kt(this,"bg"),Kt(this,"btnHire",new g$t("고용",120)),Kt(this,"icons",[]),Kt(this,"vos",[]),Kt(this,"mainContainer",new Ge),Kt(this,"costList",[300,600,900,1200,1500]),Kt(this,"posList",[0,1,2,3,4]),Kt(this,"selectedIndex",-1),this.bg=new TM({
- ),this.bg.width=630,this.bg.height=80,this.addChild(this.bg),this.addChild(this.heroContainer),this.addChild(this.multiLevelContainer),this.icon.x=-1,this.icon.y=.5*(this.bg.height-this.icon.height),this.heroContainer.addChild(this.icon),this.lblName.x=135,this.lblName.y=10,this.heroContainer.addChild(this.lblName),this.starIcon.x=this.lblName.x+this.lblName.width+5,this.starIcon.y=this.lblName.y+.5*(this.lblName.height-this.starIcon.height),this.heroContainer.addChild(this.starIcon),this.lblKnightBuff.visible=!1,this.heroContainer.addChild(this.lblKnightBuff),this.lblPlusLv.visible=!1,this.heroContainer.addChild(this.lblPlusLv),this.lblHp.x=this.lblName.x,this.lblHp.y=this.lblName.y+this.lblName.height+10,this.heroContainer.addChild(this.lblHp),this.lblAtk.x=this.lblHp.x+100,this.lblAtk.y=this.lblHp.y,this.heroContainer.addChild(this.lblAtk),this.lblDef.x=this.lblAtk.x+100,this.lblDef.y=this.lblHp.y,this.heroContainer.addChild(this.lblDef),this.lblBlock.iconScale=1.05,this.lblBlock.x=this.lblDef.x+95,this.lblBlock.y=this.lblHp.y,this.heroContainer.addChild(this.lblBlock),this.btnUpgrade.labelOrder=xU.TEXT_FIRST,this.btnUpgrade.textLabel.textSize=15,this.btnUpgrade.textAlign="left",this.btnUpgrade.iconScale=.7,this.btnUpgrade.color=xU.BROWN,this.btnUpgrade.height=60,this.btnUpgrade.width=110,this.btnUpgrade.x=this.bg.width-this.btnUpgrade.width-10,this.btnUpgrade.y=.5*(this.bg.height-this.btnUpgrade.height)-2,this.heroContainer.addChild(this.btnUpgrade),this.btnUpgrade.on("pointertap",t=>this.onUpgrade(t,1),this),this.btn10.labelOrder=xU.TEXT_FIRST,this.btn10.textLabel.textSize=15,this.btn10.textAlign="left",this.btn10.iconScale=.7,this.btn10.color=xU.BROWN,this.btn10.height=60,this.btn10.width=115,this.btn10.x=this.btnUpgrade.x-this.btn10.width-5,this.btn10.y=.5*(this.bg.height-this.btn10.height)-2,this.btn10.on("pointertap",()=>{ - const i=this.getNextIncrement(this.data.level,10); - this.onUpgrade(null,i),t.autoCloseCounter=0} - ,this),this.multiLevelContainer.addChild(this.btn10),this.btn100.labelOrder=xU.TEXT_FIRST,this.btn100.textLabel.textSize=15,this.btn100.textAlign="left",this.btn100.iconScale=.7,this.btn100.color=xU.BROWN,this.btn100.height=60,this.btn100.width=115,this.btn100.x=this.btn10.x-this.btn100.width-5,this.btn100.y=.5*(this.bg.height-this.btn100.height)-2,this.btn100.on("pointertap",()=>{ - const i=this.getNextIncrement(this.data.level,100); - this.onUpgrade(null,i),t.autoCloseCounter=0} - ,this),this.multiLevelContainer.addChild(this.btn100),this.btn1000.labelOrder=xU.TEXT_FIRST,this.btn1000.textLabel.textSize=15,this.btn1000.textAlign="left",this.btn1000.iconScale=.7,this.btn1000.color=xU.BROWN,this.btn1000.height=60,this.btn1000.width=115,this.btn1000.x=this.btn100.x-this.btn1000.width-5,this.btn1000.y=.5*(this.bg.height-this.btn1000.height)-2,this.btn1000.on("pointertap",()=>{ - const i=this.getNextIncrement(this.data.level,1e3); - this.onUpgrade(null,i),t.autoCloseCounter=0} - ,this),this.multiLevelContainer.visible=!1} - get vo(){ - return this.data} - onMultiLevel(){ - rYt.getInstance().isMultiLevel=!rYt.getInstance().isMultiLevel,rYt.getInstance().setMultiLevel(rYt.getInstance().isMultiLevel)} - getNextIncrement(t,i){ - const s=t%i; - return 0===s?i:i-s} - onUpgrade(i,s=1){ - if(!this.data||this.data.id<=0||this.data.kindNum<=0)return; - if(1===s){ - const t=Date.now(); - t-this.lastRapidClickTime<500?this.rapidClickCount++:this.rapidClickCount=1,this.lastRapidClickTime=t,this.rapidClickCount>=3&&!this.multiLevelContainer.visible&&(this.rapidClickCount=0,this.onMultiLevel())} - const e=this.data.level,n=this.data,h=a5.getInstance().getMaxLevel(n.grade,n.trans); - if(e>=h)return void RF.getInstance().showMessage(CG.getText("COMMON_369","최대 레벨입니다.")); - const r=Math.min(e+s,h),o=a5.getInstance().getTotalGold(e,r),a=VR.getInstance().getGameplayMultiplier(kR.UnitUpgradeGold),c=Math.floor(o/a); - if(ML.gold<c)return void RF.getInstance().showMessage(CG.getText("COMMON_359","골드가 부족합니다.")); - ML.gold-=c,$F.getInstance().updateGold(); - const l=this.data; - l.level=r,uR.some(t=>e<t&&r>=t)&&VR.getInstance().recalculate(),this.setData(l),Nri.getInstance().udpateHero(l); - const u=this.data.id; - t.heroTargetLevels.set(u,this.data.level),t.markDirtyAndSchedule(),lVt.get().play(this,8,.5*(this.bg.height-104)),wni.getInstance().onConditionChanged()} - static registerTargetLevel(i,s){ - t.heroTargetLevels.set(i,s)} - static markDirtyAndSchedule(){ - t.isDirty=!0,-1===t.numReviveSnapshot&&(t.numReviveSnapshot=ML.numRevive),null!==t.updateTimer&&clearTimeout(t.updateTimer),t.updateTimer=setTimeout(()=>{ - t.sendToServer(),t.updateTimer=null,t.isDirty=!1,rYt.getInstance().isMultiLevel=!1,rYt.getInstance().setMultiLevel(!1)} - ,t.DEBOUNCE_DELAY)} - static async sendToServer(){ - if(0===t.heroTargetLevels.size)return void(t.numReviveSnapshot=-1); - if(-1!==t.numReviveSnapshot&&t.numReviveSnapshot!==ML.numRevive)return t.heroTargetLevels.clear(),void(t.numReviveSnapshot=-1); - t.numReviveSnapshot=-1; - const i=new Map(t.heroTargetLevels); - t.heroTargetLevels.clear(); - const s=[],e=[]; - i.forEach((t,i)=>{ - s.push(i),e.push(t)} - ); - const n=s.join("|"),h=e.join("|"); - let r=await rD.getInstance().hero.levelUp(n,h,ML.gold); - if(!1===r.success){ - const t=await rD.getInstance().hero.getHeroInfo(); - return t.success&&(ML.setUserInfo(t.body),$F.getInstance().updateAll(),rYt.getInstance().setData()),void wG.getInstance().showError(r)} - ML.setUserInfo(r.body),$F.getInstance().updateGold(),rYt.getInstance().isMultiLevel=!1,rYt.getInstance().setMultiLevel(!1)} - static cleanup(){ - null!==t.updateTimer&&(clearTimeout(t.updateTimer),t.updateTimer=null),t.isDirty&&(t.sendToServer(),t.isDirty=!1)} - static async cleanupAsync(){ - null!==t.updateTimer&&(clearTimeout(t.updateTimer),t.updateTimer=null),t.isDirty&&(t.isDirty=!1,await t.sendToServer())} - static cancel(){ - null!==t.updateTimer&&(clearTimeout(t.updateTimer),t.updateTimer=null),t.heroTargetLevels.clear(),t.isDirty=!1,t.numReviveSnapshot=-1} - recalculateCosts(t){ - if(!this.data||this.data.id<0||this.data.level<=0)return void(this.cost1=this.cost10=this.cost100=this.cost1000=-1); - const i=this.data,s=a5.getInstance(),e=s.getMaxLevel(i.grade,i.trans)-i.level; - if(e<=0)return void(this.cost1=this.cost10=this.cost100=this.cost1000=-1); - this.cost1=Math.floor(s.getTotalGold(i.level,i.level+1)/t); - const n=Math.min(this.getNextIncrement(i.level,10),e); - this.cost10=n>0?Math.floor(s.getTotalGold(i.level,i.level+n)/t):-1; - const h=Math.min(this.getNextIncrement(i.level,100),e); - this.cost100=h>0?Math.floor(s.getTotalGold(i.level,i.level+h)/t):-1; - const r=Math.min(this.getNextIncrement(i.level,1e3),e); - this.cost1000=r>0?Math.floor(s.getTotalGold(i.level,i.level+r)/t):-1} - refreshActivation(t){ - const i=this.cost1>=0&&t>=this.cost1; - if(this.btnUpgrade.activated!==i&&(this.btnUpgrade.activated=i),!this.multiLevelContainer.visible)return; - const s=this.cost10>=0&&t>=this.cost10; - this.btn10.activated!==s&&(this.btn10.activated=s); - const e=this.cost100>=0&&t>=this.cost100; - this.btn100.activated!==e&&(this.btn100.activated=e); - const n=this.cost1000>=0&&t>=this.cost1000; - this.btn1000.activated!==n&&(this.btn1000.activated=n)} - static checkAutoClose(i){ - const s=Date.now(); - s-t.lastCounterUpdateTime>=900&&(t.lastCounterUpdateTime=s,t.autoCloseCounter++,t.autoCloseCounter>=t.AUTO_CLOSE_SECONDS&&(t.autoCloseCounter=0,i.isMultiLevel=!1,i.setMultiLevel(!1)))} - showMultiLevel(){ - null==this.data||this.data.id<0||(this.multiLevelContainer.visible=!0,t.autoCloseCounter=0,t.lastCounterUpdateTime=Date.now(),this.refreshActivation(ML.gold))} - hideMultiLevel(){ - this.multiLevelContainer.visible=!1,t.autoCloseCounter=0,t.lastCounterUpdateTime=0} + ),this.bg.width=630,this.bg.height=74,this.mainContainer.addChild(this.bg); + let t=2; + for(let i=0; + i<5; + i++){ + const s=new w5; + s.setMode(g5.ROSTER),s.scale=.85,s.x=t,s.y=.5*(this.bg.height-s.height),this.mainContainer.addChildAt(s,1),this.icons.push(s),this.vos.push(_x.getVO()),t+=s.width-10,this.posList[i]=t} + this.btnHire.text=xG.getText("GAME_64","배치"),this.btnHire.height=60,this.btnHire.x=this.bg.width-this.btnHire.width-5,this.btnHire.y=.5*(this.bg.height-this.btnHire.height)-3,this.mainContainer.addChild(this.btnHire),this.btnHire.on("pointertap",this.onHire,this),this.addChild(this.mainContainer)} + setHireEnabled(t){ + this.btnHire.activated=t} + static refreshAllHireButtons(){ + const i=jqt.getInstance().getItems(),s=!t.isHiring; + for(const t of i)t.setHireEnabled(s)} + async onHire(i){ + if(t.isHiring)return; + let s=-1; + for(let t=this.icons.length-1; + t>=0; + t--)if(this.icons[t].active){ + s=t; + break} + if(-1===s)return void LF.getInstance().showMessage(xG.getText("GAME_49","보유한 영웅이 없습니다.")); + this.selectedIndex=s; + const e=this.getHireKindnumAndTrans(this.selectedIndex),n=e.hireKindNum,h=e.hireTrans; + e.baseKindNum; + const r=wx.getInstance(); + if(0!==n)if(r.list.length>=TL.maxTeamSlots)TL.maxTeamSlots<10?LF.getInstance().showMessage(xG.getText("GAME_50","영웅을 배치할 슬롯이 없습니다.")+"\n"+xG.getText("GAME_51","슬롯을 추가로 확장해주세요.")):LF.getInstance().showMessage(xG.getText("GAME_50","영웅을 배치할 슬롯이 없습니다.")+"\n"+xG.getValueReplace("GAME_52","##",10,"최대 10명까지 배치할 수 있습니다.")); + else{ + t.isHiring=!0,t.refreshAllHireButtons(); + try{ + const t=await lD.getInstance().hero.addToTeam(n,h,!0); + if(0==t.success)return void yG.getInstance().showError(t); + TL.setUserInfo(t.body),qF.getInstance().updateAll(),jqt.getInstance().setData(),bqt.getInstance().update(); + const i=t.body.addedHeroId,s=r.getVOWithId(i); + s&&loi.getInstance().hireHero(s),Mqt.getInstance().setData()} + finally{ + t.isHiring=!1,t.refreshAllHireButtons()} + Dni.getInstance().isRunning&&Dni.getInstance().tutorialIndex==Dni.TUTORIAL_INDEX_WAVE0&&Dni.getInstance().highlightHeroHireButton()} + else LF.getInstance().showMessage(xG.getText("GAME_49","보유한 영웅이 없습니다."))} + getHireKindnumAndTrans(t){ + var i; + const s=this.data,e=wx.getInstance(),n=e.getBookVO(s),h=(null==n?void 0:n.evolKindNum)??0,r=(null==(i=e.getOwnedUnitVO(s))?void 0:i.count)??0,o=e.getOwnedUnitVO(h),a=(null==o?void 0:o.count)??0; + let c=0,l=0; + if(0===t)r>0&&(c=s,l=0); + else if(1===t)a>0&&(c=h,l=0); + else{ + const i=t-2; + ((null==o?void 0:o.trans[i])??0)>0&&(c=h,l=i+1)} + return 0===c&&r>0&&(c=s,l=0),{ + hireKindNum:c,hireTrans:l,baseKindNum:s} + }
- let i=t; - const s=i.getBookVo(); - if(!s)return void(this.visible=!1); - this.visible=!0; - const e=CG.getText(s.getNameKey(),i.name),n=a5.getInstance().getMaxLevel(i.grade,i.trans),h=i.level>=n?" (max)":""; - null!=this.index?this.lblName.text=this.index+1+". "+e+h:this.lblName.text=e+h,this.lblHp.text=`${ - VD.displayLargeNumberAsAlphabet(i.buffedMaxHp)} - `,this.lblAtk.text=`${ - VD.displayLargeNumberAsAlphabet(i.buffedAtkDmg)} - `,this.lblDef.text=`${ - VD.displayLargeNumberAsAlphabet(i.buffedPhyDef)} - `,this.lblBlock.text=`${ - i.numBlock} - `,this.starIcon.x=this.lblName.x+this.lblName.width+5,this.starIcon.texture=QA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[i.grade-1]; - let r=this.starIcon.x+50; - const o=ML.getKnightLevel(i.tribe); - o>0?(this.lblKnightBuff.text=`(+${ - o} - )`,this.lblKnightBuff.textColor=4495871,this.lblKnightBuff.x=r,this.lblKnightBuff.y=this.lblName.y,this.lblKnightBuff.visible=!0,r+=this.lblKnightBuff.width+2):this.lblKnightBuff.visible=!1; - const a=VR.getInstance().getGameplayTotal(kR.PlusLv); - a>0?(this.lblPlusLv.text=`(+${ - a} - )`,this.lblPlusLv.textColor=4513092,this.lblPlusLv.x=r,this.lblPlusLv.y=this.lblName.y,this.lblPlusLv.visible=!0):this.lblPlusLv.visible=!1,i.dmgType==ex.MAGICAL?this.lblAtk.texture=QA.getTexture("UI_Ekkorr","ICON_ATTACK2"):this.lblAtk.texture=QA.getTexture("UI_Ekkorr","UI_SWORD"),i.phyDef>i.magDef?this.lblDef.texture=QA.getTexture("UI_Ekkorr","UI_PHY_DEFENSE"):this.lblDef.texture=QA.getTexture("UI_Ekkorr","UI_MAGIC_DEFENSE"),this.icon.setData(i); - const c=VR.getInstance().getGameplayMultiplier(kR.UnitUpgradeGold); - this.recalculateCosts(c); - const l=i.level>=n; - if(this.btnUpgrade.text=l?"max":"+1",this.btnUpgrade.iconText=l?"":VD.displayLargeNumberAsAlphabet(this.cost1),this.btnUpgrade.iconLabel.texture=QA.getTexture("UI_Ekkorr",l?"UI_GRAY_GOLD":"UI_GOLD"),t.level>0){ - const i=n-t.level,s=Math.min(this.getNextIncrement(t.level,10),i); - this.btn10.text=s>0?`+${ - s} - `:"max",this.btn10.iconText=s>0?VD.displayLargeNumberAsAlphabet(this.cost10):"",this.btn10.iconLabel.texture=QA.getTexture("UI_Ekkorr",s>0?"UI_GOLD":"UI_GRAY_GOLD"); - const e=Math.min(this.getNextIncrement(t.level,100),i); - this.btn100.text=e>0?`+${ - e} - `:"max",this.btn100.iconText=e>0?VD.displayLargeNumberAsAlphabet(this.cost100):"",this.btn100.iconLabel.texture=QA.getTexture("UI_Ekkorr",e>0?"UI_GOLD":"UI_GRAY_GOLD"); - const h=Math.min(this.getNextIncrement(t.level,1e3),i); - this.btn1000.text=h>0?`+${ - h} - `:"max",this.btn1000.iconText=h>0?VD.displayLargeNumberAsAlphabet(this.cost1000):"",this.btn1000.iconLabel.texture=QA.getTexture("UI_Ekkorr",h>0?"UI_GOLD":"UI_GRAY_GOLD"),this.btn10.visible=!0,this.btn100.visible=!0,this.btn1000.visible=h>0} - this.refreshActivation(ML.gold)} + const s=i,e=wx.getInstance(),n=e.getBookVO(s),h=(null==n?void 0:n.evolKindNum)??0,r=e.getOwnedUnitVO(s),o=h>0?e.getOwnedUnitVO(h):void 0,a=(null==r?void 0:r.count)??0,c=(null==o?void 0:o.count)??0; + if(this.vos[0].kindNum=s,this.icons[0].setData(this.vos[0]),this.icons[0].setNumber(a),this.icons[0].active=a>0,h>0){ + this.vos[1].kindNum=h,this.vos[1].trans=0,this.icons[1].setData(this.vos[1]),this.icons[1].setNumber(c),this.icons[1].active=c>0; + for(let t=0; + t<3; + t++){ + this.vos[2+t].kindNum=h,this.vos[2+t].trans=t+1,this.icons[2+t].setData(this.vos[2+t]); + const i=(null==o?void 0:o.trans[t])??0; + this.icons[2+t].setNumber(i),this.icons[2+t].active=i>0} + } + else for(let t=1; + t<5; + t++)this.icons[t].active=!1; + if(0===this.selectedIndex&&0===a)this.selectedIndex=-1; + else if(1===this.selectedIndex&&0===c)this.selectedIndex=-1; + else if(this.selectedIndex>=2&&this.selectedIndex<=4){ + const t=this.selectedIndex-2; + 0===((null==o?void 0:o.trans[t])??0)&&(this.selectedIndex=-1)} + -1==this.selectedIndex&&dYt.getInstance().parent&&this.removeChild(dYt.getInstance()),this.btnHire.text=xG.getText("GAME_64","배치"),this.btnHire.x=this.bg.width-this.btnHire.width-5,this.btnHire.activated=!t.isHiring,this.updateCache()} + updateCache(){ + }
- return t.H} - setData(i){ - const s=i.index+1; - this.lblIndex.text=`${ - s} - `,this.lblIndex.x=.5*(t.INDEX_AREA_W-this.lblIndex.width),this.lblIndex.y=.5*(this.height-this.lblIndex.height),this.icon.x=.5*(t.INDEX_AREA_W-this.icon.width),this.icon.y=.5*(this.height-this.icon.height); - const e=CG.getText("GAME_946","총 결제 금액"),n=NG.isUsdCurrency()?`$${ - bU.setComma(i.amount)} - `:`₩${ - bU.setComma(i.amount)} - `; - this.lblName.text=`${ - e} - (${ - n} - )`,this.lblName.height,t.BAR_H,this.lblName.x=140,this.lblName.y=5; - const h=this.lblName.y+this.lblName.height+5; - this.barBg.x=140,this.barBg.y=h,this.barFill.x=140,this.barFill.y=h; - const r=Number(i.amount)>0?Math.min(1,Math.max(0,Number(i.userAmount)/Number(i.amount))):0; - this.barFill.width=t.BAR_W*r,this.lblProgress.text=`${ - Math.floor(100*r)} - %`,this.lblProgress.x=140+this.barBg.width-this.lblProgress.width,this.lblProgress.y=this.lblName.y,this.showRewards(i.rewards,1==r),this.rewardContainer.x=140,this.rewardContainer.y=this.barBg.y+this.barBg.height+7} - showRewards(t,i){ - const s=Math.min(t.length,7); - let e=0,n=!1; - for(let h=0; - h<7; - h++){ - const r=this.rewardItems[h]; - n=!1,h<s?(r.setDataFrom(t[h]),r.visible=!0,r.x=e,e+=r.width*r.scale.x+5,r.received=i,r.activated=!i,r.type!=_5.ticket||r.subType!=_5.heroGacha&&r.subType!=_5.heroSelect&&r.subType!=_5.treasureGacha&&r.subType!=_5.petSelect||(n=!0)):r.visible=!1,this.setItemEvent(r,n)} - } - setItemEvent(t,i){ - t.eventMode="none",t.off("pointertap",this.onItemTap,this),i&&(t.eventMode="dynamic",t.on("pointertap",this.onItemTap,this))} - onItemTap(t){ - const i=t.target; - if(!i)return; - let s=""; - if(i.type==_5.ticket&&i.subType==_5.heroGacha?s=CG.getText("GAME_765","5성 영웅을 랜덤하게 획득할 수 있습니다."):i.type==_5.ticket&&i.subType==_5.heroSelect?s=CG.getText("GAME_943","제공되는 목록에서 원하는 5성 영웅을 선택할 수 있습니다."):i.type==_5.ticket&&i.subType==_5.treasureGacha?s=CG.getValueReplace("GAME_776","##",6,"6등급 유물을 랜덤하게 획득할 수 있습니다."):i.type==_5.ticket&&i.subType==_5.petSelect?s=CG.getText("GAME_944","제공되는 목록에서 원하는 펫 조각을 선택할 수 있습니다."):i.type!=_5.trans||i.subType!=_5.hero&&i.subType!=_5.treasure?i.type==_5.runeTicket&&(s=CG.getText("GAME_1502","레이드 상점에서 크리스탈을 랜덤하게 획득할 수 있습니다.")):s=CG.getText("GAME_1225","초월권을 사용하여 초월재료와 비용없이 초월시킬 수 있습니다."),s){ - const t=T5.getInstance(); - t.text=s; - let e=this.rewardContainer.x+i.x-20; - e+t.width+7>this.bg.x+this.bg.width&&(e=this.bg.x+this.bg.width-t.width-7); - let n=i.y-i.height; - n<7&&(n=7),t.show(this,e,n)} - } - } - ; - Vt(bYt,"PaymentEventItemRenderer"),Kt(bYt,"W",534),Kt(bYt,"H",102),Kt(bYt,"BAR_W",380),Kt(bYt,"BAR_H",10),Kt(bYt,"INDEX_AREA_W",124); - let _Yt=bYt; - const yYt=class t extends RB{ - constructor(){ - super(),Kt(this,"lblGuide"),this.lblGuide=new TB("@",this.width-90,16,cD.DEFAULT_COLOR,8,10,16763904),this.contentContainer.addChild(this.lblGuide),this.outSideClickHide=!0} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - async showGuide(){ - this.title=CG.getText("GAME_945","결제 이벤트"); - const t=[CG.getText("GAME_947","목표 금액에 도달하면 보상이 우편으로 발송됩니다."),CG.getText("GAME_948","총 결제 금액은 이벤트 기간 내 결제분만 반영됩니다."),CG.getText("GAME_986","붉은 보석으로 상품 구매 시, 결제 이벤트에 반영됩니다."),CG.getText("GAME_987","웹 마켓에서 진행된 결제는 결제 이벤트에 반영되지 않습니다.")]; - this.lblGuide.text=t.map(t=>`@ ${ - t} - `).join("\n"),this.lblGuide.x=30,this.lblGuide.y=80,this.height=this.lblGuide.y+this.lblGuide.height+40,await this.loadImage(),super.show()} - getDefaultPositionY(){ - return.4*VA.stageHeight} - onBackButton(){ - return this.hide(),!0} - } - ; - Vt(yYt,"PaymentEventGuidePopup"),Kt(yYt,"_instance"); - let MYt=yYt; - const EYt=class t extends cG{ - constructor(){ - super(),Kt(this,"bntMonth",new Rzt(CG.getText("COMMON_482","월간"),215)),Kt(this,"btnSpecial",new Rzt(CG.getText("GAME_1158","스페셜"),215)),Kt(this,"tabs"),Kt(this,"activeIndex",0),Kt(this,"infoBg"),Kt(this,"lblPeriod"),Kt(this,"lblRemainTitle"),Kt(this,"lblRemainTime"),Kt(this,"lblTotal"),Kt(this,"lblAmount"),Kt(this,"btnGuide"),Kt(this,"list"),Kt(this,"endTime",0),Kt(this,"count",0),this.title="결제 이벤트",this.width=580,this.outSideClickHide=!0,this.tabs=[this.btnSpecial,this.bntMonth]; - for(let i=0; - i<this.tabs.length; - i++){ - const t=this.tabs[i]; - this.addChild(t); - const s=i; - t.onClick=()=>this.switchTab(s)} - this.layoutTabs(),this.infoBg=new IB,this.infoBg.setIndex(2),this.infoBg.width=this.width-46,this.infoBg.x=23,this.contentContainer.addChild(this.infoBg),this.lblPeriod=new JD("",cD.DEFAULT_COLOR,cD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblPeriod),this.lblRemainTitle=new JD("",cD.DEFAULT_COLOR,cD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblRemainTitle),this.lblRemainTime=new JD("",cD.DEFAULT_COLOR,cD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblRemainTime),this.lblTotal=new JD("",cD.DEFAULT_COLOR,cD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblTotal),this.lblAmount=new JD("",cD.COLOR_BRIGHT_GREEN,cD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblAmount),this.btnGuide=new AB("UI_Ekkorr","UI_Alarm"),this.btnGuide.x=this.infoBg.x+this.infoBg.width-this.btnGuide.width-10,this.btnGuide.y=this.infoBg.y+10,this.contentContainer.addChild(this.btnGuide),this.btnGuide.on("pointertap",()=>{ - MYt.getInstance().showGuide()} - ); - const t=this.width-46; - this.list=new I5(_Yt,t,300),this.list.x=23,this.contentContainer.addChild(this.list),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - onAdded(){ - LM.getInstance().add(this.onEnter,this)} - onRemoved(){ - LM.getInstance().remove(this.onEnter,this)} - async update(){ - await NG.getEventList()} - show(){ - null==NG.currentPaymentMonthEvent?this.activeIndex=0:null==NG.currentPaymentSpecialEvent&&(this.activeIndex=1),this.switchTab(this.activeIndex),super.show()} - updateLayout(){ - this.title=CG.getText("GAME_945","결제 이벤트"); - const t=0==this.activeIndex?NG.currentPaymentSpecialEvent:NG.currentPaymentMonthEvent; - let i=[]; - if(t){ - const s=t.userAmount,e=t.endTime.replace("T"," ").replace(".000Z",""); - this.endTime=new Date(t.endTime).getTime(),this.endTime,tx.time,this.lblPeriod.text=CG.getText("GAME_545","이벤트 기간")+` : ~ ${ - e} - (UTC)`,this.lblRemainTitle.text=CG.getText("COMMON_29","남은 시간")+" : ",this.onEnterUpdate(),this.lblTotal.text=CG.getText("GAME_946","총 결제 금액")+" : ",this.lblAmount.text=NG.isUsdCurrency()?`$${ - bU.setComma(s)} - `:`₩${ - bU.setComma(s)} - `,this.lblAmount.textColor=cD.COLOR_BRIGHT_GREEN; - let n=0; - for(let h=0; - h<t.rewards.length; - h++){ - const e={ - index:h,userAmount:s,rewards:t.rewards[h],amount:NG.isUsdCurrency()?t.amounts[h].usdAmount:t.amounts[h].amount} - ; - i.push(e),s>=Number(e.amount)&&(n=h)} - this.list.dataProvider=i,t.rewards.length<4?this.list.scrollTo(0):this.list.scrollTo(n)} - this.lblPeriod.x=this.lblRemainTitle.x=this.lblTotal.x=50,this.lblRemainTime.x=this.lblRemainTitle.x+this.lblRemainTitle.width,this.lblAmount.x=this.lblTotal.x+this.lblTotal.width; - const s=null!=NG.currentPaymentMonthEvent&&null!=NG.currentPaymentSpecialEvent; - this.tabs.forEach(t=>t.visible=s); - const e=s?125:70; - this.infoBg.y=e,this.btnGuide.y=this.infoBg.y+10,this.lblPeriod.y=this.infoBg.y+20,this.lblRemainTitle.y=this.lblRemainTime.y=this.lblPeriod.y+this.lblPeriod.height+10,this.lblTotal.y=this.lblAmount.y=this.lblRemainTitle.y+this.lblRemainTitle.height+10,this.infoBg.height=this.lblTotal.y+this.lblTotal.height-this.infoBg.y+17; - const n=this.infoBg.y+this.infoBg.height+14; - this.list.y=n; - const h=Math.min(352,103*i.length); - this.list.setListHeight(h),this.height=this.list.y+this.list.height+30} - onEnter(){ - ++this.count>60&&(this.count=0,this.onEnterUpdate())} - onEnterUpdate(){ - const t=.001*(this.endTime-tx.time); - this.lblRemainTime.textColor=t<43200?cD.COLOR_RED:cD.DEFAULT_COLOR,this.lblRemainTime.text=t>0?`${ - bU.displayTimeAsTwoOfDDHHMMSS(t)} - `:CG.getText("GAME_949","이벤트 종료")} - switchTab(t){ - this.activeIndex=t; - for(let i=0; - i<this.tabs.length; - i++)this.tabs[i].selected=i===t; - this.updateLayout()} - layoutTabs(){ - let t=.5*(this.width-46-2); - for(const s of this.tabs)s.fitWithinWidth(t,50); - let i=23; - for(let s=0; - s<this.tabs.length; - s++){ - const e=this.tabs[s]; - i=23+(t+2)*s,e.x=i,e.y=65} - } - } - ; - Vt(EYt,"PaymentEventPopup"),Kt(EYt,"_instance"),Kt(EYt,"TAB_HEIGHT",60); - let AYt=EYt; - const SYt=class t extends Azt{ - constructor(){ - super(),Kt(this,"tabs",[]),Kt(this,"buttons",[]),Kt(this,"activeIndex",0),Kt(this,"onTabChange",null),Kt(this,"btnPaymentEvent",new AB("UI_Ekkorr","Package_2",.7)),Kt(this,"clickedEventInfo",[]),Kt(this,"cnt",0),this.btnPaymentEvent.onClick=this.onPaymentEventClick.bind(this),this.addChild(this.btnPaymentEvent),this.btnPaymentEvent.visible=!1,this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} - static getInstance(){ - return null==t.instance&&(t.instance=new t),t.instance} - async onAdded(){ - this.btnPaymentEvent.hideRedDot(); - const t=await $A.getPaymentEventInfo(); - if(t)for(this.clickedEventInfo=t.split("#").map(t=>""===t?[0]:t.split("|").map(Number)); - this.clickedEventInfo.length<2; - )this.clickedEventInfo.push([0]); - else this.clickedEventInfo=Array.from({ - length:2} - ,()=>[0]); - LM.getInstance().add(this.onFrame,this)} - onRemoved(){ - LM.getInstance().remove(this.onFrame,this)} - async onPaymentEventClick(){ - await AYt.getInstance().update(),AYt.getInstance().show(); - const t=[NG.currentPaymentSpecialEvent,NG.currentPaymentMonthEvent]; - this.clickedEventInfo=[]; - for(const i of t){ - if(!i){ - this.clickedEventInfo.push([]); - continue} - const t=[]; - t.push(i.id); - for(let s=0; - s<i.rewards.length; - s++){ - let e=i.amounts[s].amount; - NG.isUsdCurrency()&&(e=i.amounts[s].usdAmount),i.userAmount>=e?t.push(1):t.push(0)} - this.clickedEventInfo.push(t)} - $A.savePaymentEventInfo(this.clickedEventInfo.map(t=>t.join("|")).join("#"))} - onFrame(){ - this.cnt-- >0||(this.cnt=30,this.updatePaymentEvent())} - updatePaymentEvent(){ - if(this.buttons.length<2)return; - const t=this.buttons[1]; - if(this.buttons[1]&&(NG.isValidEvent(PG.PAYMENT_EVENT)?(this.btnPaymentEvent.visible=!0,NG.currentPaymentSpecialEvent?t.showEventTag(-3,2):t.hideEventTag()):(this.btnPaymentEvent.visible=!1,t.hideEventTag()),this.btnPaymentEvent.visible&&(NG.currentPaymentSpecialEvent||NG.currentPaymentMonthEvent))){ - const t=!!NG.currentPaymentSpecialEvent&&this.clickedEventInfo[0][0]<NG.currentPaymentSpecialEvent.id,i=!!NG.currentPaymentMonthEvent&&this.clickedEventInfo[1][0]<NG.currentPaymentMonthEvent.id; - t||this.checkNewReach(0)||i||this.checkNewReach(1)?this.btnPaymentEvent.showRedDot():this.btnPaymentEvent.hideRedDot()} - } - checkNewReach(t){ - const i=0==t?NG.currentPaymentSpecialEvent:NG.currentPaymentMonthEvent; - if(!i)return!1; - for(let s=0; - s<i.rewards.length; - s++){ - let e=i.amounts[s].amount; - if(NG.isUsdCurrency()&&(e=i.amounts[s].usdAmount),0==this.clickedEventInfo[t][s+1]&&i.userAmount>=e)return!0} - return!1} - setTabs(t){ - for(const i of this.buttons)this.removeChild(i); - this.buttons=[],this.tabs=t; - for(let i=0; - i<t.length; - i++){ - const s=t[i],e=new Rzt(CG.getText(s.labelKey,s.defaultText)); - e.height=50,this.addChild(e),this.buttons[i]=e; - const n=i; - e.onClick=()=>this.setActiveTab(n)} - this.layoutTabs(),this.setActiveTab(0),this.updateLayout()} - layoutTabs(){ - if(this.buttons.reduce((t,i)=>t+i.width,0)+2*Math.max(0,this.buttons.length-1)<=628){ - let t=634; - for(let i=this.buttons.length-1; - i>=0; - i--){ - const s=this.buttons[i]; - s.height=50,t-=s.width+2,s.x=t,s.y=5} - } - else{ - const t=this.buttons.length,i=Math.floor((628-2*(t-1))/t),s=56; - let e=634; - for(let n=t-1; - n>=0; - n--){ - const t=this.buttons[n]; - t.setMultilineMode(i,s,15),e-=i+2,t.x=e,t.y=.5*(60-s)} - } - } - setActiveTab(t){ - this.activeIndex=t; - for(let i=0; - i<this.buttons.length; - i++)this.buttons[i].selected=i===t; - this.onTabChange&&this.onTabChange(t)} - updateLayout(){ - const t=this.buttons[0]; - this.btnPaymentEvent.x=this.lblTitle.x+this.lblTitle.width+10,this.btnPaymentEvent.y=t.y+.5*(t.height-this.btnPaymentEvent.height)} - updateLanguage(){ - this.setTitle(CG.getText("COMMON_356","상점")),this.setTabs(this.tabs)} - } - ; - Vt(SYt,"ShopSubMenu"),Kt(SYt,"instance"); - let TYt=SYt; - const CYt=class extends qk{ - constructor(){ - super(),Kt(this,"bg"),Kt(this,"lblName",new JD("2배속 ",16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_18)),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","Shop_Icon_07"))),Kt(this,"btnBuy",new zB("UI_GEM","100")),Kt(this,"btnAd",new zB("UI_MOVIE_SMALL",CG.getText("GAME_236","광고"))),Kt(this,"lblRemaining",new JD("",11184810,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblCooldown",new JD("",16737894,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"requesting",!1),this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30} - ),this.bg.x=5,this.bg.width=630,this.bg.height=80,this.addChild(this.bg),this.addChild(this.icon),this.lblName.x=135,this.lblName.y=.5*(this.bg.height-this.lblName.height),this.addChild(this.lblName),this.btnBuy.lbl.iconScale=.8,this.btnBuy.color=zB.BROWN,this.btnBuy.height=55,this.btnBuy.width=140,this.btnBuy.x=this.bg.width-this.btnBuy.width-6,this.btnBuy.y=.5*(this.bg.height-this.btnBuy.height),this.addChild(this.btnBuy),this.btnBuy.on("pointerdown",this.onBuy,this),this.btnAd.lbl.iconScale=.6,this.btnAd.color=ZL.BROWN,this.btnAd.height=55,this.btnAd.width=140,this.btnAd.x=this.bg.width-this.btnAd.width-6,this.btnAd.y=.5*(this.bg.height-this.btnAd.height),this.addChild(this.btnAd),this.btnAd.onClick=this.onAdWatch.bind(this),this.lblRemaining.y=.5*(this.bg.height-this.lblRemaining.height),this.addChild(this.lblRemaining),this.lblCooldown.visible=!1,this.addChild(this.lblCooldown)} - async onBuy(t){ - if(1==this.data.kindNum){ - let t=await rD.getInstance().user.buySpeed15(); - if(0==t.success)return void wG.getInstance().showError(t); - ML.setUser(t.body),$F.getInstance().updateAll(),XG.getInstance().setSpeed(2)} - } - async onAdWatch(){ - var t; - try{ - const t=vjt.getInstance().checkApproved(); - if(0==t.approved)return void wG.getInstance().show(t.errorMessage)} - catch(s){ - const t=CG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다."); - return void wG.getInstance().show(t)} - if(this.requesting)return; - if(!(null==(t=this.data)?void 0:t.isAd))return; - const i=this.data.adsType; - if(0!==hU.getInstance().getDailyRemaining(i)){ - if(hU.getInstance().isCooldownReady(i)){ - this.requesting=!0; - try{ - ML.canSkipAds?(OU.trackAd("ad_skip",String(i)),await this.onAdComplete()):(OU.trackAd("ad_try",String(i)),await jL(async()=>{ - OU.trackAd("ad_success",String(i)),await this.onAdComplete()} - ,i,()=>{ - OU.trackAd("ad_fail",String(i))} - ))} - finally{ - this.requesting=!1} - } - } - else wG.getInstance().show(CG.getText("GAME_244","오늘 최대 횟수를 초과했습니다."))} - async onAdComplete(){ - const t=this.data.adsType,i=await rD.getInstance().ads.watch(t,!0); - if(!1!==i.success){ - if(CVt.getInstance().markDirty(),i.body.user&&(ML.setUserData(i.body.user),$F.getInstance().updateAll()),i.body.ads&&hU.getInstance().setData(i.body.ads),i.body.dungeon&&Nx.getInstance().setData(i.body.dungeon),"speed"===i.body.rewardType&&XG.getInstance().setSpeed(2),5===t){ - const t=hU.getInstance().getDailyRemaining(5),i=hU.getInstance().isCooldownReady(5); - 0!==t&&i||Nri.getInstance().removeAdsGoblins()} - this.updateRemaining()} - else wG.getInstance().showError(i)} - setData(t){ - this.data=t,t.isAd?(this.btnBuy.visible=!1,this.btnAd.visible=!0,this.lblName.text=t.name,this.icon.scale.set(1),this.icon.texture=QA.getTexture("UI_Ekkorr",t.icon),this.icon.y=.5*(this.bg.height-this.icon.height),this.updateRemaining()):(this.btnBuy.visible=!0,this.btnAd.visible=!1,this.lblRemaining.visible=!1,this.lblName.text=t.name,(1==t.kindNum||2==t.kindNum)&&(this.icon.texture=QA.getTexture("UI_Ekkorr",t.icon)),this.icon.y=.5*(this.bg.height-this.icon.height),this.btnBuy.text=t.gem.toString()),this.icon.x=60-.5*this.icon.width,this.lblRemaining.visible?cD.setLabelWrapWidth(this.lblName,this.lblRemaining.x-this.lblName.x-5):cD.setLabelWrapWidth(this.lblName,this.btnBuy.x-this.lblName.x-5),this.lblName.y=.5*(this.bg.height-this.lblName.height)} - updateRemaining(){ - var t; - (null==(t=this.data)?void 0:t.isAd)&&this.updateCooldown()} - updateCooldown(){ - var t; - if(!(null==(t=this.data)?void 0:t.isAd))return; - const i=this.data.adsType,s=hU.getInstance().getCooldownRemaining(i),e=hU.getInstance().getDailyRemaining(i),n=0===e,h=e>=0&&this.data.dailyMax,r=this.btnAd.x-8,o=.5*this.bg.height; - if(s>0&&!n){ - const t=Math.ceil(s/1e3),i=Math.floor(t/60),n=t%60,a=`${ - String(i).padStart(2,"0")} - :${ - String(n).padStart(2,"0")} - `; - this.lblCooldown.visible=!0,this.lblCooldown.text=a,this.btnAd.activated=!1,h?(this.lblRemaining.visible=!0,this.lblRemaining.text=`${ - e} - /${ - this.data.dailyMax} - `,this.lblCooldown.x=r-this.lblCooldown.width,this.lblCooldown.y=o-this.lblCooldown.height-1,this.lblRemaining.x=r-this.lblRemaining.width,this.lblRemaining.y=o+1):(this.lblRemaining.visible=!1,this.lblCooldown.x=r-this.lblCooldown.width,this.lblCooldown.y=o-.5*this.lblCooldown.height)} - else this.lblCooldown.visible=!1,this.btnAd.activated=!n,h?(this.lblRemaining.visible=!0,this.lblRemaining.text=`${ - e} - /${ - this.data.dailyMax} - `,this.lblRemaining.x=r-this.lblRemaining.width,this.lblRemaining.y=o-.5*this.lblRemaining.height):this.lblRemaining.visible=!1} - get height(){ - return this.bg.height+2} - } - ; - Vt(CYt,"ShopItemRenderer"); - let IYt=CYt; - const OYt=class t extends kzt{ - constructor(){ - super(),Kt(this,"list"),this.list=new Kk(IYt,635,VA.listHeight),this.list.x=0,this.list.y=0,this.addChild(this.list),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} - static getInstance(){ - return null==t.instance&&(t.instance=new t),t.instance} - onAdded(){ - LM.getInstance().add(this.onFrame,this)} - onRemoved(){ - wni.getInstance().unregisterListItemsGetter("Shop"),LM.getInstance().remove(this.onFrame,this)} - onFrame(){ - var t; - if(null==(null==(t=this.parent)?void 0:t.parent))return; - const i=this.list.getItemList(); - for(let s=0; - s<i.length; - s++)!1!==i[s].visible&&i[s].updateCooldown()} - getListItems(){ - return this.list.getItemList()} - setData(){ - wni.getInstance().registerListItemsGetter(()=>this.getListItems(),"Shop"); - let t=[]; - t.push({ - kindNum:1,icon:"UI_SHOP_SPEED2",name:CG.getValueReplaceMulti("GAME_57",["@@","##"],[20,2],"20분간 게임속도 2배 증가"),gem:100,desc:CG.getValueReplaceMulti("GAME_57",["@@","##"],[20,2],"20분간 게임속도 2배 증가")} - ),t.push({ - isAd:!0,adsType:2,dailyMax:20,icon:"UI_SHOP_SPEED2",name:CG.getValueReplaceMulti("GAME_228",["##","@@"],[20,2],"{ - 광고보고 20분간 2배속 } - "),rewardDesc:CG.getValueReplaceMulti("GAME_232",["##","@@","$$"],[10,2,20],"{ - 20분간 2배속, 하루 최대 3회 } - ")} - ),t.push({ - isAd:!0,adsType:3,dailyMax:5,icon:"UI_COIN_Big",name:CG.getValueReplace("GAME_229","##",100,"{ - 광고보고 명예코인 100개 } - "),rewardDesc:CG.getValueReplaceMulti("GAME_233",["##","@@"],[100,5],"{ - 명예코인 100개, 하루 최대 5회 } - ")} - ),t.push({ - isAd:!0,adsType:5,dailyMax:10,icon:"UI_SHOP_GEM",name:CG.getValueReplace("GAME_231","##",100,"{ - 광고보고 보석 100개 } - "),rewardDesc:CG.getValueReplaceMulti("GAME_235",["##","@@"],[100,10],"{ - 보석 100개, 하루 최대 10회 } - ")} - ),this.list.dataProvider=t,this.onAdded()} - get className(){ - return"ShopGemSubView"} - } - ; - Vt(OYt,"ShopGemSubView"),Kt(OYt,"instance"); - let kYt=OYt; - const xYt=class extends _$t{ - constructor(t="Icon_Web_Market",i="UI_Ekkorr"){ - super(t,i),Kt(this,"lbl"); - const s=cD.DEFAULT_OUTLINE_FONT_OPTION_16; - s.fill=cD.COLOR_BRIGHT_ORANGE,this.lbl=new JD("WEB",s.fill,s),this.lbl.eventMode="none",this.addChild(this.lbl),this.update()} - update(){ - super.update(),this.lbl&&(this.lbl.x=this.icon.x-.5*this.lbl.width,this.lbl.y=this.icon.y+10),this.pivot.set(.5*this.width,.5*this.height)} - onDown(){ - this.scale=.95} - onUp(){ - this.scale=1} - get width(){ - return this.icon.width} - get height(){ - return this.icon.height} - } - ; - Vt(xYt,"WebMarketButton"); - let RYt=xYt; - const NYt=class t extends cG{ - constructor(){ - super(),Kt(this,"lblMessage",new JD("",16777215,cD.ERROR_POPUP_LABEL_OPTION)),Kt(this,"btnConfirm",new eG("이동")),Kt(this,"btnCancel",new $Wt("취소")),Kt(this,"iconNote"),Kt(this,"lblNote",new JD("",cD.COLOR_LIGHT_BROWN,cD.ERROR_POPUP_LABEL_OPTION)),Kt(this,"onConfirm",null),Kt(this,"onCancel",null),this.title="알림",this.lblMessage.y=90; - let t=this.lblMessage.getStyle(); - t.align="center",this.lblMessage.setStyle(t),this.iconNote=new He(QA.getTexture("UI_Ekkorr","UI_Alarm")),this.iconNote.anchor.set(.5),this.iconNote.scale.set(.8),this.iconNote.x=35,t=this.lblNote.getStyle(),t.fontSize=17,t.lineHeight=25,this.lblNote.setStyle(t),this.lblNote.x=this.iconNote.x+.5*this.iconNote.width+5,this.contentContainer.addChild(this.lblMessage,this.btnConfirm,this.btnCancel,this.lblNote,this.iconNote),this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.btnCancel.onClick=this.onCancelClick.bind(this)} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - onConfirmClick(){ - this.hide(); - let t=this.onConfirm; - this.onConfirm=null,null!==t&&t()} - onCancelClick(){ - this.hide(); - let t=this.onCancel; - this.onCancel=null,null!==t&&t()} - showError(t,i=null,s=null,e=null){ - let n=t.errorMessage,h=CG.getErrorMessage(t.error); - h&&(n=h),i&&(n+="\n"+i),this.show(n,s,e)} - show(t,i=null,s=null){ - this.onConfirm=i,this.onCancel=s; - let e=CG.getText("GAME_939","웹 마켓에서 특별한 상품들을 만나보실 수 있습니다."),n=CG.getText("GAME_940","웹 마켓으로 이동하시겠습니까?"),h="("+CG.getText("GAME_941","구매하신 상품은 인게임 우편으로 전송됩니다.")+")",r=CG.getText("GAME_942","상품 결제 및 구매 문제 발생 시, NEXT MARKET 고객센터로 문의해 주세요."); - this.lblMessage.text=e+"\n"+n+"\n"+h,this.lblNote.text=r,this.title=CG.getText("COMMON_4","알림"),this.btnConfirm.text=CG.getText("COMMON_65","이동"),this.btnCancel.text=CG.getText("COMMON_2","취소"),this.updateLayout(),super.show(t,i,s)} - updateLayout(){ - this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.btnConfirm.x=.5*(this.width-this.btnConfirm.width-this.btnCancel.width-20),this.btnCancel.x=this.btnConfirm.x+this.btnConfirm.width+20,this.btnConfirm.y=this.lblMessage.y+this.lblMessage.height+30,this.btnCancel.y=this.btnConfirm.y,this.iconNote.y=this.btnConfirm.y+this.btnConfirm.height+40,this.lblNote.y=this.iconNote.y+.5*(this.iconNote.height-this.lblNote.height),this.height=this.lblNote.y+this.lblNote.height+30} - getDefaultPositionY(){ - return.3*VA.stageHeight} - onBackButton(){ - return this.onConfirmClick(),!0} - } - ; - Vt(NYt,"LineMarketConfirimPopup"),Kt(NYt,"_instance"); - let PYt=NYt; - const DYt=class t extends kzt{ - constructor(){ - super(),Kt(this,"btnPackage",new Rzt(CG.getText("GAME_237","패키지"),150,80)),Kt(this,"btnPeriod",new Rzt(CG.getText("GAME_238","기간상품"),150,80)),Kt(this,"btnNormal",new Rzt(CG.getText("GAME_239","일반상품"),150,80)),Kt(this,"tabs"),Kt(this,"activeIndex",0),Kt(this,"btnLineMarket",new RYt),Kt(this,"lblRedGem"),Kt(this,"list"),Kt(this,"productList",null),Kt(this,"setDataCallback",null),Kt(this,"onPaymentSuccessBind"),this.tabs=[this.btnPackage,this.btnPeriod,this.btnNormal]; - for(let t=0; - t<this.tabs.length; - t++){ - const i=this.tabs[t]; - this.addChild(i); - const s=t; - i.onClick=()=>this.switchTab(s)} - this.layoutTabs(); - const i=this.tabs[0]; - this.addChild(this.btnLineMarket),this.btnLineMarket.x=.5*this.btnLineMarket.width+5,this.btnLineMarket.y=i.y+.5*i.height,this.btnLineMarket.onClick=this.onLineMarketBtnClick.bind(this),this.lblRedGem=new VB("UI_RED_GEM_ICON","0",cD.COLOR_RED_GEM,cD.DEFAULT_FONT_OPTION_18),this.lblRedGem.text="0",this.lblRedGem.x=this.btnLineMarket.x+.5*this.btnLineMarket.width+10,this.lblRedGem.y=this.btnLineMarket.y-.5*this.lblRedGem.height+1,this.addChild(this.lblRedGem),"N"==m5.getInstance().nextMarketYn&&(this.btnLineMarket.visible=!1,this.lblRedGem.visible=!1); - const s=VA.listHeight-t.TAB_HEIGHT; - this.list=new I5(Hjt,635,s),this.list.x=0,this.list.y=t.TAB_HEIGHT,this.addChild(this.list),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} - static getInstance(){ - return null==t.instance&&(t.instance=new t),t.instance} - onAdded(){ - this.setPaymentSuccess(!0)} - onRemoved(){ - this.setPaymentSuccess(!1)} - async onLineMarketBtnClick(){ - const t="1.5.31"; - "capacitor"==AL.getInstance().envPlatform&&zA.isAppBundleVersionLessThan(t)?wG.getInstance().show(CG.getText("COMMON_497","최신 버전으로 업데이트 후에 이용해 주세요.")+`\n${ - CG.getText("COMMON_500","최신 버전")} - : ${ - t} - `,()=>{ - const t=AL.getInstance().getStoreLink(); - t&&window.open(t,"_blank")} - ):PYt.getInstance().show("",this.goLineMarket.bind(this))} - async goLineMarket(){ - var t; - const i=navigator.userAgent||"",s=/apps-in-toss|supertoss/i.test(i),e=AL.getInstance().isGoogleClient()||AL.getInstance().isGoogleClientKr()||AL.getInstance().isAppleClient()||AL.getInstance().isAppleClientKr(); - let n=null; - e||s||(n=window.open("about:blank","_blank")); - let h="",r=""; - if("capacitor"==AL.getInstance().envPlatform){ - const{ - appsFlyer:t} - =await Xt(async()=>{ - const{ - appsFlyer:t} - =await Promise.resolve().then(()=>Rdi); - return{ - appsFlyer:t} - } - ,void 0); - try{ - h=await t.getAppsFlyerId()} - catch(o){ - } - const i=await AL.getInstance().getConversionData(); - i&&"afStatus"in i&&(r=i.afStatus)} - try{ - const i=await rD.getInstance().lineNext.getStoreUrl(h,r); - if(!i.success||!(null==(t=i.body)?void 0:t.url)){ - let t=CG.getText("COMMON_83","잠시 후에 이용해 주세요."); - return wG.getInstance().show(t),void(n&&n.close())} - const o=i.body.url; - if(e){ - const{ - Browser:t} - =await Xt(async()=>{ - const{ - Browser:t} - =await Promise.resolve().then(()=>$di); - return{ - Browser:t} - } - ,void 0); - return void t.open({ - url:o} - )} - if(s)return void(window.location.href=o); - n?n.location.href=o:window.location.href=o} - catch(fet){ - n&&n.close()} - } - switchTab(t,i=!0){ - this.activeIndex=t; - for(let e=0; - e<this.tabs.length; - e++)this.tabs[e].selected=e===t; - this.productList=null; - const s=m5.getInstance(); - switch(t){ - case 0:this.productList=s.packageList.filter(t=>t.active&&s.isAvailableForPurchase(t)); - break; - case 1:this.productList=s.periodList.filter(t=>t.active&&s.isAvailableForPurchase(t)); - break; - case 2:this.productList=s.normalList.filter(t=>t.active&&s.isAvailableForPurchase(t))} - this.productList&&(this.list.dataProvider=this.productList),i&&this.list.scrollTo(0)} - async setData(){ - this.updateRedGem(),await m5.getInstance().getAvailProducts(1),this.switchTab(this.activeIndex),this.updateLanguage(),this.setDataCallback&&(this.setDataCallback(),this.setDataCallback=null)} - refreshList(){ - this.switchTab(this.activeIndex,!1)} - layoutTabs(){ - for(const i of this.tabs)i.fitWithinWidth(150,50); - let t=634; - for(let i=this.tabs.length-1; - i>=0; - i--){ - const s=this.tabs[i]; - t-=152,s.x=t,s.y=3} - } - updateLanguage(){ - this.btnPackage.text=CG.getText("GAME_237","패키지"),this.btnPeriod.text=CG.getText("GAME_238","기간상품"),this.btnNormal.text=CG.getText("GAME_239","일반상품"),this.layoutTabs()} - get className(){ - return"ShopPaySubView"} - updateRedGem(){ - this.lblRedGem.text=ML.redGem.toFixed(0)} - getActiveIndex(){ - return this.activeIndex} - getCurrentProductList(){ - return this.productList} - clickTab(t){ - t!==this.activeIndex&&(t<0||t>=this.tabs.length||this.switchTab(t))} - scrollWithProductIds(t){ - if(!this.productList)return; - if(!t||0==t.length)return; - const i=this.productList.findIndex(i=>t.includes(i.productId)); - -1!==i&&this.list.scrollTo(i)} - setPaymentSuccess(t){ - cS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),cS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))} - onPaymentSuccess(t){ - this.refreshList(),this.updateRedGem()} - } - ; - Vt(DYt,"ShopPaySubView"),Kt(DYt,"instance"),Kt(DYt,"TAB_HEIGHT",60); - let LYt=DYt; - const GYt=class extends qk{ - constructor(){ - super(),Kt(this,"bg"),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","UI_SHOP_GEM"))),Kt(this,"lblName"),Kt(this,"lblDesc"),Kt(this,"rewardContainer",new Ge),Kt(this,"rewardItems",[]),Kt(this,"btnBuy",new c$t("구매",120)),Kt(this,"purchasing",!1),this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30} - ),this.bg.x=5,this.bg.width=630,this.bg.height=100,this.addChild(this.bg),this.icon.scale.set(1),this.icon.x=25,this.icon.y=.5*(this.bg.height-this.icon.height),this.addChild(this.icon); - const t=cD.DEFAULT_OUTLINE_FONT_OPTION_16; - t.fill=cD.DEFAULT_COLOR,this.lblName=new JD("",t.fill,t),this.lblName.x=140,this.lblName.y=10,this.addChild(this.lblName); - const i=cD.DEFAULT_DESC_FONT_OPTION_16; - i.fill=13421772,this.lblDesc=new JD("",i.fill,i),this.lblDesc.x=140,this.lblDesc.y=45,this.addChild(this.lblDesc),this.rewardContainer.x=140,this.rewardContainer.y=42,this.addChild(this.rewardContainer); - for(let s=0; - s<5; - s++){ - const t=new M5; - t.scale.set(.7),this.rewardItems.push(t),this.rewardContainer.addChild(t)} - this.btnBuy.color=ZL.BROWN,this.btnBuy.height=55,this.btnBuy.width=120,this.btnBuy.x=this.bg.width-this.btnBuy.width-10,this.btnBuy.y=.5*(this.bg.height-this.btnBuy.height),this.addChild(this.btnBuy),this.btnBuy.onClick=this.onBuy.bind(this),cD.setLabelWrapWidth(this.lblName,this.btnBuy.x-this.lblName.x),cD.setLabelWrapWidth(this.lblDesc,this.btnBuy.x-this.lblDesc.x)} - async onBuy(){ - try{ - if(!this.data)return; - if(this.purchasing)return; - this.purchasing=!0,this.isSubscriptionRow(this.data)?await this.buySubscription():await Mjt.getInstance().buyProduct(this.data.productId),this.purchasing=!1} - catch(fet){ - this.purchasing=!1} - } - isSubscriptionRow(t){ - const i=null==t?void 0:t.rewards; - return!!Array.isArray(i)&&i.some(t=>"yes"===(null==t?void 0:t.subscribe))} - async buySubscription(){ - const t=this.data,i=m5.getInstance().getStoreProductIdByProductId(this.data.productId); - if(!i)return; - const s="1.5.29"; - if("capacitor"==AL.getInstance().envPlatform&&zA.isAppBundleVersionLessThan(s))return void wG.getInstance().show(CG.getText("COMMON_497","최신 버전으로 업데이트 후에 이용해 주세요.")+`\n${ - CG.getText("COMMON_500","최신 버전")} - : ${ - s} - `,()=>{ - const t=AL.getInstance().getStoreLink(); - t&&window.open(t,"_blank")} - ); - let e; - try{ - e=structuredClone(t)} - catch(o){ - e=JSON.parse(JSON.stringify(t))} - const n=Vt(async()=>{ - cS.getInstance().dispatchCustomEvent("PaymentSuccess",{ - productId:e.productId,productVo:e} - )} - ,"onSubscriptionSuccess"),{ - Capacitor:h} - =await Xt(async()=>{ - const{ - Capacitor:t} - =await Promise.resolve().then(()=>ljt); - return{ - Capacitor:t} - } - ,void 0),r=Gjt.getInstance(); - "ios"===h.getPlatform()?await r.buyAppleSubscription(this.data.productId,i,n):await r.buyGoogleSubscription(this.data.productId,i,n)} - setData(t){ - this.data=t; - const i=t; - this.lblName.text=CG.getText(`PRODUCT_NAME_${ - i.id} - `,t.name??""); - const s=i.descriptionLangIds.split("|").map(t=>CG.getText(t.trim(),"")); - this.lblDesc.text=s.filter(t=>t).join("\n")||i.descriptions||"",i.productId==p5.Secretary?this.showDescMode(i):this.showRewardMode(i.rewards); - let e=i.iconNames; - e||(e="Package_1"),this.icon.texture=QA.getTexture("UI_Ekkorr",e),this.btnBuy.text=m5.getInstance().getPriceStr(i.productId),this.btnBuy.x=this.bg.width-this.btnBuy.width-10} - showRewardMode(t){ - this.lblDesc.visible=!1,this.rewardContainer.visible=!0; - const i=Math.min(t.length,5); - let s=0; - for(let e=0; - e<5; - e++){ - const n=this.rewardItems[e]; - e<i?(n.setDataFrom(t[e]),n.visible=!0,n.x=s,s+=n.width*n.scale.x+5):n.visible=!1} - } - showDescMode(t){ - if(this.lblDesc.visible=!0,this.rewardContainer.visible=!1,t.descriptionLangIds){ - const i=t.descriptionLangIds.split("|").map(t=>CG.getText(t.trim(),"")); - this.lblDesc.text=i.filter(t=>t).join("\n")||t.descriptions||""} - else this.lblDesc.text=(t.descriptions??"").replace(/\\n/g,"\n"); - let i=45; - i+this.lblDesc.height>this.bg.y+this.bg.height-3&&(i=this.bg.y+this.bg.height-3-this.lblDesc.height),this.lblDesc.y=i} + return this.bg.height+3}
- i<this.subViews.length; - i++)this.subViews[i].visible=i===t; - this.checkShopForReview()} - checkShopForReview(){ - if(m5.getInstance().isReviewShop()){ - const t=FYt.getInstance(); - 1==this.currentIndex?(this.subViews[this.currentIndex].visible=!1,t.setData(),t.visible=!0):t.visible=!1} + s<this.posList.length; + s++)if(this.posList[s]>t&&this.icons[s].active){ + const t=this.getHireKindnumAndTrans(s); + return void Uqt.getInstance().showInRoster(t.hireKindNum,t.hireTrans)}
- this._selected=!1,this.bg.visible=!this._selected,this.bgOn.visible=this._selected} - onDown(t){ - this.container.scale=.9} - onUp(t){ - this.container.scale=1} - onTap(t){ - zL.getInstance().playSFX(zL.SFX_NORMAL_CLICK),this.selected=!this._selected,this.onClick&&this.onClick(this.index)} + this.selectedIndex=-1} + onLongClick(t,i){ + for(let s=0; + s<this.posList.length; + s++)if(this.posList[s]>t&&this.icons[s].active){ + const t=this.getHireKindnumAndTrans(s); + Uqt.getInstance().showInRoster(t.hireKindNum,t.hireTrans); + break} + }
- Vt(VYt,"InventoryMenuIcon"); + Vt(Hqt,"HeroRosterItemRenderer"),Kt(Hqt,"isHiring",!1);
CardEventRankingItemRenderer 1 hunks, 625 statements
+ )),Ofi=class t extends Yk{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"highlightBg"),Kt(this,"lblRank"),Kt(this,"lblName"),Kt(this,"lblScore"),Kt(this,"lblRound"); + const i=t.ITEM_WIDTH,s=t.ITEM_HEIGHT; + this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Base_bg01"),leftWidth:25,topHeight:20,rightWidth:25,bottomHeight:23} + ),this.bg.alpha=.6,this.bg.width=i,this.bg.height=s,this.addChild(this.bg),this.highlightBg=new Lf,this.highlightBg.rect(0,0,i,s).fill({ + color:16766720,alpha:.18} + ),this.highlightBg.visible=!1,this.addChild(this.highlightBg); + const e=fD.DEFAULT_OUTLINE_FONT_OPTION_18; + e.fill=fD.COLOR_WHITE,this.lblRank=new iL("1",e.fill,e),this.addChild(this.lblRank),this.lblName=new iL("",e.fill,e),this.addChild(this.lblName),this.lblScore=new iL("0",e.fill,e),this.addChild(this.lblScore),this.lblRound=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_15),this.lblRound.textSize=13,this.addChild(this.lblRound)} + get height(){ + return t.ITEM_HEIGHT} + setData(i){ + if(this.data=i,!i)return; + this.lblRank.text=`${ + i.rank} + `,this.lblName.text=i.name,this.lblScore.text=qD.displayLargeNumberAsAlphabet(i.bestScore),this.lblRound.text=`${ + xG.getText("","관문")} + ${ + i.bestRound} + `; + const s=t.RANK_COLORS[i.rank]??16777215; + this.lblRank.textColor=s; + const e=i.userId===TL.userId; + this.highlightBg.visible=e,this.lblName.textColor=e?6750054:16777215,this.layout()} + layout(){ + const i=t.ITEM_WIDTH,s=.5*(t.ITEM_HEIGHT-this.lblRank.height); + this.lblRank.x=20,this.lblRank.y=s,this.lblName.x=80,this.lblName.y=s,this.lblScore.x=i-20-this.lblScore.width,this.lblScore.y=5,this.lblRound.x=i-20-this.lblRound.width,this.lblRound.y=28} + } + ; + Vt(Ofi,"CardEventRankingItemRenderer"),Kt(Ofi,"ITEM_WIDTH",520),Kt(Ofi,"ITEM_HEIGHT",50),Kt(Ofi,"RANK_COLORS",{ + 1:16766720,2:12632256,3:13467442} + ); + let kfi=Ofi; + const xfi=class t extends fG{ + constructor(){ + super(),Kt(this,"lblMyRank"),Kt(this,"list"),this.title=xG.getText("COMMON_20","랭킹"),this.height=t.POPUP_HEIGHT,this.lblMyRank=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16),this.contentContainer.addChild(this.lblMyRank),this.list=new Kk(kfi,kfi.ITEM_WIDTH,t.LIST_HEIGHT,4),this.list.x=.5*(this.width-kfi.ITEM_WIDTH),this.list.y=t.LIST_TOP,this.contentContainer.addChild(this.list)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + setData(t,i){ + this.lblMyRank.text=null!=i?`${ + xG.getText("","내 순위")} + : ${ + i} + ${ + xG.getText("","위")} + `:xG.getText("","아직 기록이 없습니다"),this.lblMyRank.x=.5*(this.width-this.lblMyRank.width),this.lblMyRank.y=80,this.list.dataProvider=t,this.list.scrollTo(0)} + } + ; + Vt(xfi,"CardEventRankingPopup"),Kt(xfi,"_instance"),Kt(xfi,"POPUP_HEIGHT",700),Kt(xfi,"LIST_TOP",120),Kt(xfi,"LIST_HEIGHT",540); + let Rfi=xfi; + const Nfi=class t extends fG{ + constructor(){ + super(),Kt(this,"lblHeader"),Kt(this,"lblRound"),Kt(this,"lblScore"),Kt(this,"lblNewBest"),Kt(this,"lblReward"),Kt(this,"btnExit"),Kt(this,"onExit",null),this.title=xG.getText("","도전 결과"),this.lblHeader=new iL(xG.getText("","패배..."),14708828,fD.DEFAULT_OUTLINE_FONT_OPTION_24),this.lblHeader.textColor=14708828,this.contentContainer.addChild(this.lblHeader),this.lblRound=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16),this.contentContainer.addChild(this.lblRound),this.lblScore=new iL("",16767332,fD.DEFAULT_OUTLINE_FONT_OPTION_32),this.lblScore.textColor=16767332,this.contentContainer.addChild(this.lblScore),this.lblNewBest=new iL(xG.getText("","★ 최고 기록 갱신!"),16771488,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblNewBest.textColor=16771488,this.contentContainer.addChild(this.lblNewBest),this.lblReward=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16),this.contentContainer.addChild(this.lblReward),this.btnExit=new eG(xG.getText("COMMON_1","확인")),this.btnExit.onClick=this.onExitClick.bind(this),this.contentContainer.addChild(this.btnExit)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + setData(t){ + this.lblRound.text=`${ + xG.getText("","관문")} + ${ + t.finalRound} + ${ + xG.getText("","도달")} + `,this.lblScore.text=qD.displayLargeNumberAsAlphabet(t.finalScore),this.lblNewBest.visible=t.isNewBest,this.lblReward.visible=t.rewardEventCoin>0,this.lblReward.text=`${ + xG.getText("","획득")} + : ${ + xG.getText("","이벤트 재화")} + ×${ + t.rewardEventCoin} + `,this.updateLayout()} + updateLayout(){ + const t=this.width; + let i=80; + this.lblHeader.x=.5*(t-this.lblHeader.width),this.lblHeader.y=i,i+=50,this.lblRound.x=.5*(t-this.lblRound.width),this.lblRound.y=i,i+=36,this.lblScore.x=.5*(t-this.lblScore.width),this.lblScore.y=i,i+=56,this.lblNewBest.visible&&(this.lblNewBest.x=.5*(t-this.lblNewBest.width),this.lblNewBest.y=i,i+=40),this.lblReward.visible&&(this.lblReward.x=.5*(t-this.lblReward.width),this.lblReward.y=i,i+=36),i+=14,this.btnExit.width=240,this.btnExit.x=.5*(t-this.btnExit.width),this.btnExit.y=i,i+=this.btnExit.height+30,this.height=i} + onExitClick(){ + const t=this.onExit; + this.hide(),t&&t()} + onBackButton(){ + return this.onExitClick(),!0} + } + ; + Vt(Nfi,"CardEventResultPopup"),Kt(Nfi,"_instance"); + let Pfi=Nfi; + const Dfi=class t extends Ge{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"lblRank"),Kt(this,"lblSuit"),Kt(this,"lblCenter"),Kt(this,"_card",null),Kt(this,"_selected",!1),Kt(this,"_baseY",0),Kt(this,"onTap",null),Kt(this,"handIndex",-1),this.bg=new Lf,this.drawBg(!1),this.addChild(this.bg),this.lblRank=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_24),this.lblRank.x=10,this.lblRank.y=6,this.addChild(this.lblRank),this.lblSuit=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblSuit.x=12,this.lblSuit.y=40,this.addChild(this.lblSuit),this.lblCenter=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_32),this.addChild(this.lblCenter),this.eventMode="static",this.cursor="pointer",this.on("pointertap",()=>{ + this.onTap&&this.onTap(this)} + )} + static rankLabel(t){ + return t<=10?String(t):["J","Q","K","A"][t-11]} + setCard(i){ + this._card=i; + const s=t.SUIT_COLORS[i.suit]??16777215,e=t.SUIT_GLYPHS[i.suit]??"?"; + this.lblRank.text=t.rankLabel(i.rank),this.lblRank.textColor=s,this.lblSuit.text=e,this.lblSuit.textColor=s,this.lblCenter.text=e,this.lblCenter.textColor=s,this.lblCenter.alpha=.75,this.lblCenter.x=.5*(t.CARD_WIDTH-this.lblCenter.width),this.lblCenter.y=.5*(t.CARD_HEIGHT-this.lblCenter.height)+14} + get card(){ + return this._card} + setBaseY(t){ + this._baseY=t,this.applySelectedY()} + get selected(){ + return this._selected} + set selected(t){ + this._selected!==t&&(this._selected=t,this.applySelectedY(),this.drawBg(t))} + drawBg(i){ + this.bg.clear(),this.bg.roundRect(0,0,t.CARD_WIDTH,t.CARD_HEIGHT,10).fill({ + color:16644332} + ).stroke({ + color:i?16762940:10127986,width:i?6:3} + )} + applySelectedY(){ + this.y=this._selected?this._baseY-t.SELECT_POP_Y:this._baseY} + setDisplayScale(t){ + this.scale.set(t)} + } + ; + Vt(Dfi,"PlayingCardRenderer"),Kt(Dfi,"CARD_WIDTH",135),Kt(Dfi,"CARD_HEIGHT",185),Kt(Dfi,"SELECT_POP_Y",40),Kt(Dfi,"SUIT_GLYPHS",["▲","●","◆","★"]),Kt(Dfi,"SUIT_COLORS",[12731695,3042982,5012794,11040298]); + let Lfi=Dfi; + const Gfi=class t extends Ge{ + constructor(){ + super(),Kt(this,"renderers",[]),Kt(this,"selectedIdx",new Set),Kt(this,"onSelectionChange",null),Kt(this,"locked",!1); + for(let t=0; + t<8; + t++){ + const t=new Lfi; + t.onTap=this.onCardTap.bind(this),this.renderers.push(t),this.addChild(t)} + } + setHand(i){ + this.selectedIdx.clear(); + const s=i.length,e=t.SPACING*(s-1)+Lfi.CARD_WIDTH,n=.5*(t.AREA_WIDTH-e); + for(let h=0; + h<this.renderers.length; + h++){ + const e=this.renderers[h]; + h<s?(e.visible=!0,e.handIndex=h,e.setCard(i[h]),e.x=n+h*t.SPACING,e.setBaseY(Lfi.SELECT_POP_Y),e.selected=!1,e.zIndex=h):e.visible=!1} + this.sortChildren(),this.emitChange()} + getSelected(){ + return[...this.selectedIdx].sort((t,i)=>t-i)} + clearSelection(){ + this.selectedIdx.clear(); + for(const t of this.renderers)t.selected=!1; + this.emitChange()} + get areaHeight(){ + return Lfi.CARD_HEIGHT+Lfi.SELECT_POP_Y} + onCardTap(t){ + if(this.locked||!t.visible)return; + const i=t.handIndex; + if(this.selectedIdx.has(i))this.selectedIdx.delete(i),t.selected=!1; + else{ + if(this.selectedIdx.size>=5)return; + this.selectedIdx.add(i),t.selected=!0} + this.emitChange()} + emitChange(){ + this.onSelectionChange&&this.onSelectionChange(this.getSelected())} + } + ; + Vt(Gfi,"HandFan"),Kt(Gfi,"SPACING",65),Kt(Gfi,"AREA_WIDTH",640); + let Bfi=Gfi; + const Ufi=["불","물","숲","빛"]; + function Ffi(t){ + const i=t.value; + switch(t.effect){ + case"suitMoraleAdd":return`출격한 ${ + Ufi[t.suit??0]} + 1장당 사기 +${ + i} + `; + case"fewCardsMoraleAdd":return`3장 이하 출격 시 사기 +${ + i} + `; + case"fiveCardsPowerAdd":return`5장 출격 시 전투력 +${ + i} + `; + case"pairFamilyMoraleAdd":return`페어 계열 사기 +${ + i} + `; + case"straightFamilyMoraleAdd":return`스트레이트 계열 사기 +${ + i} + `; + case"flushFamilyMoraleAdd":return`같은 문양 계열 사기 +${ + i} + `; + case"discardLeftMoraleAdd":return`남은 버리기 1회당 사기 +${ + i} + `; + case"numberCardPowerAdd":return`숫자 카드 1장당 전투력 +${ + i} + `; + case"faceCardMoraleAdd":return`그림 카드 1장당 사기 +${ + i} + `; + case"moraleMult":return`사기 ×${ + i} + `; + case"lastSubmitMoraleMult":return`마지막 출격 사기 ×${ + i} + `; + case"firstSubmitMoraleMult":return`첫 출격 사기 ×${ + i} + `; + case"acePerMoraleMult":return`A 1장당 사기 ×${ + i} + `; + case"tripleFamilyMoraleMult":return`트리플 계열 사기 ×${ + i} + `; + case"highCardMoraleMult":return`하이카드 사기 ×${ + i} + `; + case"permanentMoraleStack":return`출격마다 사기 +${ + i} + 누적`; + default:return""} + } + Vt(Ffi,"describeJoker"); + const Hfi=["일반","희귀","전설"],Wfi=[13421772,8308963,16767332],$fi=class t extends Ge{ + constructor(i=!1){ + super(),Kt(this,"bg"),Kt(this,"lblRarity"),Kt(this,"lblName"),Kt(this,"lblDesc"),Kt(this,"_def",null),Kt(this,"_selected",!1),Kt(this,"compact"),Kt(this,"onTap",null),Kt(this,"slotIndex",-1),this.compact=i; + const s=i?t.COMPACT_WIDTH:t.FULL_WIDTH,e=i?t.COMPACT_HEIGHT:t.FULL_HEIGHT; + this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","UI_Toast_Bg"),leftWidth:8,topHeight:8,rightWidth:8,bottomHeight:8} + ),this.bg.width=s,this.bg.height=e,this.addChild(this.bg),this.lblRarity=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_15),this.lblRarity.textSize=i?11:14,this.addChild(this.lblRarity),this.lblName=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_16),i&&(this.lblName.textSize=13),this.addChild(this.lblName),this.lblDesc=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_15),this.lblDesc.textSize=i?11:14,fD.setLabelWrapWidth(this.lblDesc,s-16),this.addChild(this.lblDesc),this.eventMode="static",this.cursor="pointer",this.on("pointertap",()=>{ + this.onTap&&this.onTap(this)} + )} + setEmpty(){ + this._def=null,this.lblRarity.text="",this.lblName.text="빈 슬롯",this.lblName.textColor=9075296,this.lblDesc.text="",this.bg.tint=10127986,this.layout()} + setJoker(t){ + this._def=t,this.lblRarity.text=Hfi[t.rarity]??"",this.lblRarity.textColor=Wfi[t.rarity]??16777215,this.lblName.text=t.name,this.lblName.textColor=16777215,this.lblDesc.text=Ffi(t),this.bg.tint=16777215,this.layout()} + get def(){ + return this._def} + get selected(){ + return this._selected} + set selected(t){ + this._selected=t,this.bg.tint=t?16771488:this._def?16777215:10127986} + layout(){ + const t=this.bg.width,i=this.bg.height; + this.lblRarity.x=.5*(t-this.lblRarity.width),this.lblRarity.y=this.compact?8:14,this.lblName.x=.5*(t-this.lblName.width),this.lblName.y=this.lblRarity.y+(this.compact?18:26),this.lblDesc.x=.5*(t-this.lblDesc.width),this.lblDesc.y=this.compact?this.lblName.y+26:Math.max(this.lblName.y+36,.55*(i-this.lblDesc.height))} + } + ; + Vt($fi,"JokerCardRenderer"),Kt($fi,"FULL_WIDTH",150),Kt($fi,"FULL_HEIGHT",210),Kt($fi,"COMPACT_WIDTH",118),Kt($fi,"COMPACT_HEIGHT",170); + let jfi=$fi; + const Vfi=class extends Ge{ + constructor(t=16767332){ + super(),Kt(this,"lbl"),Kt(this,"tickerFn",null),Kt(this,"prefix",""),Kt(this,"suffix",""),this.lbl=new iL("",t,fD.DEFAULT_OUTLINE_FONT_OPTION_24),this.lbl.textColor=t,this.addChild(this.lbl)} + setStatic(t){ + this.stop(),this.lbl.text=t,this.scale.set(1),this.centerLabel()} + countUp(t,i=700,s=0,e){ + this.stop(); + const n=performance.now(),h=Vt(()=>{ + const h=Math.min(1,(performance.now()-n)/i),r=t*h,o=s>0?(Math.round(r*10**s)/10**s).toLocaleString():Math.floor(r).toLocaleString(); + this.lbl.text=`${ + this.prefix} + ${ + o} + ${ + this.suffix} + `,this.scale.set(1+.4*Math.sin(h*Math.PI)),this.centerLabel(),h>=1&&(this.stop(),this.scale.set(1),e&&e())} + ,"fn"); + this.tickerFn=h,un.shared.add(h),h()} + setAffix(t,i=""){ + this.prefix=t,this.suffix=i} + stop(){ + this.tickerFn&&(un.shared.remove(this.tickerFn),this.tickerFn=null)} + centerLabel(){ + this.lbl.x=.5*-this.lbl.width,this.lbl.y=.5*-this.lbl.height} + } + ; + Vt(Vfi,"ScoreCountUpLabel"); + let Kfi=Vfi; + const zfi=class t extends fG{ + constructor(){ + super(),Kt(this,"lblHeader"),Kt(this,"choiceCards",[]),Kt(this,"lblReplaceGuide"),Kt(this,"ownedCards",[]),Kt(this,"btnConfirm"),Kt(this,"btnSkip"),Kt(this,"selectedChoice",-1),Kt(this,"selectedReplace",-1),Kt(this,"needReplace",!1),Kt(this,"onPick",null),this.bg.visible=!1,this.btnClose.visible=!1,this.width=640,this.lblHeader=new iL(xG.getText("","함께할 동료를 선택하세요"),fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_24),this.contentContainer.addChild(this.lblHeader); + for(let t=0; + t<3; + t++){ + const i=new jfi(!1); + i.slotIndex=t,i.onTap=this.onChoiceTap.bind(this),this.choiceCards.push(i),this.contentContainer.addChild(i)} + this.lblReplaceGuide=new iL(xG.getText("","슬롯이 가득! 교체할 동료를 선택하세요"),16747883,fD.DEFAULT_FONT_OPTION_16),this.lblReplaceGuide.textColor=16747883,this.contentContainer.addChild(this.lblReplaceGuide); + for(let t=0; + t<5; + t++){ + const i=new jfi(!0); + i.slotIndex=t,i.onTap=this.onOwnedTap.bind(this),this.ownedCards.push(i),this.contentContainer.addChild(i)} + this.btnConfirm=new eG(xG.getText("","선택")),this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.contentContainer.addChild(this.btnConfirm),this.btnSkip=new eG(xG.getText("","스킵")),this.btnSkip.onClick=this.onSkipClick.bind(this),this.contentContainer.addChild(this.btnSkip)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + setData(t,i){ + this.selectedChoice=-1,this.selectedReplace=-1,this.needReplace=i.length>=5; + for(let s=0; + s<this.choiceCards.length; + s++){ + const i=this.choiceCards[s]; + s<t.length?(i.visible=!0,i.setJoker(t[s])):i.visible=!1,i.selected=!1} + this.lblReplaceGuide.visible=this.needReplace; + for(let s=0; + s<this.ownedCards.length; + s++){ + const t=this.ownedCards[s]; + t.visible=this.needReplace&&s<i.length,t.visible&&t.setJoker(i[s]),t.selected=!1} + this.updateLayout()} + updateLayout(){ + const t=this.width; + let i=0; + this.lblHeader.x=.5*(t-this.lblHeader.width),this.lblHeader.y=i,i+=56; + const s=jfi.FULL_WIDTH,e=.5*(t-(3*s+40)); + for(let n=0; + n<this.choiceCards.length; + n++)this.choiceCards[n].x=e+n*(s+20),this.choiceCards[n].y=i; + if(i+=jfi.FULL_HEIGHT+20,this.needReplace){ + this.lblReplaceGuide.x=.5*(t-this.lblReplaceGuide.width),this.lblReplaceGuide.y=i,i+=34; + const s=jfi.COMPACT_WIDTH,e=6,n=.5*(t-(5*s+4*e)); + for(let t=0; + t<this.ownedCards.length; + t++)this.ownedCards[t].x=n+t*(s+e),this.ownedCards[t].y=i; + i+=jfi.COMPACT_HEIGHT+20} + this.btnConfirm.width=200,this.btnSkip.width=200,this.btnConfirm.x=.5*t-200-10,this.btnSkip.x=.5*t+10,this.btnConfirm.y=i,this.btnSkip.y=i,i+=this.btnConfirm.height+30,this.height=i} + onChoiceTap(t){ + this.selectedChoice=t.slotIndex; + for(const i of this.choiceCards)i.selected=i===t} + onOwnedTap(t){ + this.selectedReplace=t.slotIndex; + for(const i of this.ownedCards)i.selected=i===t} + onConfirmClick(){ + if(this.selectedChoice<0)return void LF.getInstance().showMessage(xG.getText("","동료를 선택하세요")); + if(this.needReplace&&this.selectedReplace<0)return void LF.getInstance().showMessage(xG.getText("","교체할 동료를 선택하세요")); + const t=this.onPick; + this.hide(),t&&t(this.selectedChoice,this.needReplace?this.selectedReplace:void 0)} + onSkipClick(){ + const t=this.onPick; + this.hide(),t&&t(-1)} + onBackButton(){ + return!0} + } + ; + Vt(zfi,"JokerPickPopup"),Kt(zfi,"_instance"); + let Yfi=zfi; + const qfi={ + [AZt.HIGH_CARD]:"하이카드",[AZt.PAIR]:"페어",[AZt.TWO_PAIR]:"투페어",[AZt.TRIPLE]:"트리플",[AZt.STRAIGHT]:"스트레이트",[AZt.FLUSH]:"플러시",[AZt.FULL_HOUSE]:"풀하우스",[AZt.FOUR_KIND]:"포카드",[AZt.STRAIGHT_FLUSH]:"스트레이트 플러시"} + ,Xfi=class t extends nYt{ + constructor(){ + super(),Kt(this,"lblGate"),Kt(this,"lblTarget"),Kt(this,"gaugeBg"),Kt(this,"gaugeFill"),Kt(this,"lblGauge"),Kt(this,"lblCounts"),Kt(this,"jokerSlots",[]),Kt(this,"playZoneBg"),Kt(this,"playedCards",[]),Kt(this,"lblHandName"),Kt(this,"lblPowerLine"),Kt(this,"moraleCount"),Kt(this,"totalCount"),Kt(this,"lblPreview"),Kt(this,"handFan"),Kt(this,"btnDiscard"),Kt(this,"btnSubmit"),Kt(this,"requestPending",!1); + const i=t.getMinHeight(); + this.bg.height<i&&(this.y=Math.max(0,VA.safeHeight-i),this.bg.height=VA.safeHeight-this.y),this.lblGate=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_24),this.lblGate.x=25,this.lblGate.y=t.TOP_Y,this.addChild(this.lblGate),this.lblTarget=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16),this.lblTarget.y=t.TOP_Y+8,this.addChild(this.lblTarget),this.gaugeBg=new Lf,this.addChild(this.gaugeBg),this.gaugeFill=new Lf,this.addChild(this.gaugeFill),this.lblGauge=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_15),this.addChild(this.lblGauge),this.lblCounts=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_15),this.lblCounts.x=25,this.lblCounts.y=t.TOP_Y+92,this.addChild(this.lblCounts); + const s=jfi.COMPACT_WIDTH,e=.5*(640-(5*s+24)); + for(let n=0; + n<5; + n++){ + const i=new jfi(!0); + i.slotIndex=n,i.x=e+n*(s+6),i.y=t.JOKER_Y,this.jokerSlots.push(i),this.addChild(i)} + this.playZoneBg=new Lf,this.addChild(this.playZoneBg); + for(let n=0; + n<5; + n++){ + const i=new Lfi; + i.setDisplayScale(t.PLAYED_SCALE),i.eventMode="none",i.visible=!1,this.playedCards.push(i),this.addChild(i)} + this.lblHandName=new iL("",16771488,fD.DEFAULT_OUTLINE_FONT_OPTION_24),this.lblHandName.textColor=16771488,this.lblHandName.visible=!1,this.addChild(this.lblHandName),this.lblPowerLine=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblPowerLine.visible=!1,this.addChild(this.lblPowerLine),this.moraleCount=new Kfi(16747883),this.moraleCount.visible=!1,this.addChild(this.moraleCount),this.totalCount=new Kfi(16767332),this.totalCount.visible=!1,this.addChild(this.totalCount),this.lblPreview=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16),this.addChild(this.lblPreview),this.handFan=new Bfi,this.handFan.onSelectionChange=this.onSelectionChange.bind(this),this.addChild(this.handFan),this.btnDiscard=new eG(xG.getText("","버리기")),this.btnDiscard.width=285,this.btnDiscard.onClick=this.onDiscardClick.bind(this),this.addChild(this.btnDiscard),this.btnSubmit=new eG(xG.getText("","출격")),this.btnSubmit.width=285,this.btnSubmit.onClick=this.onSubmitClick.bind(this),this.addChild(this.btnSubmit),this.updateLayout()} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + static getMinHeight(){ + return Math.max(900,Math.floor(.8*VA.safeHeight))} + updateLayout(){ + const i=t.TOP_Y+52; + this.gaugeBg.clear(),this.gaugeBg.roundRect(25,i,590,30,15).fill({ + color:1511434} + ).stroke({ + color:6836030,width:2} + ),this.lblGauge.y=i+6,this.lblTarget.x=615-this.lblTarget.width; + const s=this.bg.height-this.btnDiscard.height-25; + this.btnDiscard.x=25,this.btnDiscard.y=s,this.btnSubmit.x=615-this.btnSubmit.width,this.btnSubmit.y=s; + const e=s-this.handFan.areaHeight-8; + this.handFan.x=0,this.handFan.y=e; + const n=e-36; + this.lblPreview.y=n; + const h=n-8,r=Math.max(120,h-t.PLAY_TOP); + this.playZoneBg.clear(),this.playZoneBg.roundRect(15,t.PLAY_TOP,610,r,12).fill({ + color:2568991} + ).stroke({ + color:4610106,width:2} + ); + const o=t.PLAY_TOP+.5*r; + this.layoutPlayedFx(o,r)} + layoutPlayedFx(i,s){ + const e=Lfi.CARD_HEIGHT*t.PLAYED_SCALE,n=i-.32*s,h=this.playedCards.filter(t=>t.visible),r=Lfi.CARD_WIDTH*t.PLAYED_SCALE; + let o=.5*(640-(h.length*r+8*Math.max(0,h.length-1))); + for(const t of h)t.x=o,t.y=n,o+=r+8; + this.lblHandName.x=.5*(640-this.lblHandName.width),this.lblHandName.y=n+e+12,this.lblPowerLine.x=.5*(640-this.lblPowerLine.width),this.lblPowerLine.y=this.lblHandName.y+40,this.moraleCount.x=320+.5*this.lblPowerLine.width+46,this.moraleCount.y=this.lblPowerLine.y+14,this.totalCount.x=320,this.totalCount.y=this.lblPowerLine.y+64} + show(){ + super.show2(),this.requestPending=!1,this.clearPlayFx(),this.refreshFromRun()} + refreshFromRun(){ + const i=PZt.getInstance().run; + if(!i)return void this.hide(); + this.lblGate.text=`${ + xG.getText("","관문")} + ${ + i.round} + `,this.lblTarget.text=`${ + xG.getText("","목표")} + ${ + qD.displayLargeNumberAsAlphabet(i.targetScore)} + `,this.lblCounts.text=`${ + xG.getText("","출격")} + ${ + i.submitsLeft} + /4 · ${ + xG.getText("","버리기")} + ${ + i.discardsLeft} + /3 · ${ + xG.getText("","누적")} + ${ + qD.displayLargeNumberAsAlphabet(i.totalScore)} + `; + const s=t.TOP_Y+52,e=Math.min(1,i.roundScore/Math.max(1,i.targetScore)); + this.gaugeFill.clear(),e>0&&this.gaugeFill.roundRect(27,s+2,586*e,26,13).fill({ + color:6134857} + ),this.lblGauge.text=`${ + qD.displayLargeNumberAsAlphabet(i.roundScore)} + / ${ + qD.displayLargeNumberAsAlphabet(i.targetScore)} + `,this.lblGauge.x=.5*(640-this.lblGauge.width); + for(let t=0; + t<this.jokerSlots.length; + t++)t<i.jokers.length?this.jokerSlots[t].setJoker(i.jokers[t]):this.jokerSlots[t].setEmpty(); + this.handFan.locked=!1,this.handFan.setHand(i.hand),this.btnDiscard.text=`${ + xG.getText("","버리기")} + ${ + i.discardsLeft} + /3`,this.btnSubmit.text=`${ + xG.getText("","출격")} + ${ + i.submitsLeft} + /4`,this.updateButtonStates(),this.updateLayout(),"PICKING_JOKER"===i.status&&i.jokerChoices&&this.openJokerPick()} + updateButtonStates(){ + const t=PZt.getInstance().run,i=this.handFan.getSelected(),s=!!t&&"PLAYING"===t.status&&!this.requestPending; + this.btnSubmit.activated=s&&i.length>0,this.btnDiscard.activated=s&&i.length>0&&((null==t?void 0:t.discardsLeft)??0)>0} + onSelectionChange(t){ + const i=PZt.getInstance(); + if(0===t.length)this.lblPreview.text=xG.getText("","카드를 선택하세요 (최대 5장)"); + else{ + const s=i.previewScore(t); + if(s){ + const t=s.moraleAdd*s.moraleMultTotal; + this.lblPreview.text=`${ + qfi[s.hand]} + — ${ + xG.getText("","전투력")} + ${ + qD.displayLargeNumberAsAlphabet(s.power)} + × ${ + xG.getText("","사기")} + ${ + Math.round(10*t)/10} + = ${ + qD.displayLargeNumberAsAlphabet(s.total)} + `} + else this.lblPreview.text=""} + this.lblPreview.x=.5*(640-this.lblPreview.width),this.updateButtonStates()} + async onSubmitClick(){ + const t=this.handFan.getSelected(); + if(0===t.length||this.requestPending)return; + const i=PZt.getInstance(),s=i.run; + if(!s||"PLAYING"!==s.status)return; + const e=t.map(t=>s.hand[t]); + this.requestPending=!0,this.handFan.locked=!0,this.updateButtonStates(); + let n=null,h=""; + try{ + n=await i.submit(t)} + catch(_et){ + h=_et.message} + if(this.requestPending=!1,!n)return LF.getInstance().showMessage(h||xG.getText("","출격 실패 — 다시 시도해주세요")),this.handFan.locked=!1,void this.updateButtonStates(); + this.playSubmitFx(e,n)} + playSubmitFx(t,i){ + for(let e=0; + e<this.playedCards.length; + e++){ + const i=this.playedCards[e]; + e<t.length?(i.visible=!0,i.setCard(t[e])):i.visible=!1} + this.lblHandName.text=qfi[i.score.hand]??"",this.lblHandName.visible=!0; + const s=i.score.moraleAdd*i.score.moraleMultTotal; + this.lblPowerLine.text=`${ + xG.getText("","전투력")} + ${ + qD.displayLargeNumberAsAlphabet(i.score.power)} + × ${ + xG.getText("","사기")} + `,this.lblPowerLine.visible=!0,this.updateLayout(),this.moraleCount.visible=!0,this.moraleCount.setAffix("",""),this.moraleCount.countUp(s,700,s<100?1:0,()=>{ + this.totalCount.visible=!0,this.totalCount.setAffix("= ",""),this.totalCount.countUp(i.score.total,500,0,()=>{ + this.afterSubmitFx(i)} + )} + )} + afterSubmitFx(t){ + if(this.refreshFromRun(),t.dead&&t.result){ + this.clearPlayFx(); + const i=Pfi.getInstance(); + return i.setData(t.result),i.onExit=()=>this.hide(),void i.show()} + t.cleared&&(t.bonus>0&&LF.getInstance().showMessage(`${ + xG.getText("","조기 클리어 보너스")} + +${ + qD.displayLargeNumberAsAlphabet(t.bonus)} + `),this.openJokerPick())} + openJokerPick(){ + const t=PZt.getInstance().run; + if(!t||!t.jokerChoices)return; + const i=Yfi.getInstance(); + i.setData(t.jokerChoices,t.jokers),i.onPick=async(t,i)=>{ + const s=PZt.getInstance(); + let e=null,n=""; + try{ + e=await s.pickJoker(t,i)} + catch(_et){ + n=_et.message} + if(!e)return LF.getInstance().showMessage(n||xG.getText("","동료 선택 실패 — 다시 시도해주세요")),void this.openJokerPick(); + this.clearPlayFx(),this.refreshFromRun()} + ,i.show()} + async onDiscardClick(){ + const t=this.handFan.getSelected(); + if(0===t.length||this.requestPending)return; + const i=PZt.getInstance(),s=i.run; + if(!s||"PLAYING"!==s.status||s.discardsLeft<=0)return; + this.requestPending=!0,this.handFan.locked=!0; + let e=null,n=""; + try{ + e=await i.discard(t)} + catch(_et){ + n=_et.message} + if(this.requestPending=!1,!e)return LF.getInstance().showMessage(n||xG.getText("","버리기 실패 — 다시 시도해주세요")),this.handFan.locked=!1,void this.updateButtonStates(); + this.refreshFromRun()} + clearPlayFx(){ + for(const t of this.playedCards)t.visible=!1; + this.lblHandName.visible=!1,this.lblPowerLine.visible=!1,this.moraleCount.stop(),this.moraleCount.visible=!1,this.totalCount.stop(),this.totalCount.visible=!1} + hide(){ + this.moraleCount.stop(),this.totalCount.stop(),super.hide()} + } + ; + Vt(Xfi,"CardGamePopup"),Kt(Xfi,"_instance"),Kt(Xfi,"TOP_Y",50),Kt(Xfi,"JOKER_Y",175),Kt(Xfi,"PLAY_TOP",360),Kt(Xfi,"PLAYED_SCALE",.55); + let Jfi=Xfi; + const Qfi=class t extends nYt{ + constructor(){ + super(),Kt(this,"lblTitle"),Kt(this,"lblRecord"),Kt(this,"btnStart"),Kt(this,"btnResume"),Kt(this,"btnAd"),Kt(this,"btnRanking"),Kt(this,"lblNote"),Kt(this,"requestPending",!1); + const t=Math.max(900,Math.floor(.8*VA.safeHeight)); + this.bg.height<t&&(this.y=Math.max(0,VA.safeHeight-t),this.bg.height=VA.safeHeight-this.y),this.lblTitle=new iL(xG.getText("","영웅의 패"),16767332,fD.DEFAULT_OUTLINE_FONT_OPTION_32),this.lblTitle.textColor=16767332,this.addChild(this.lblTitle),this.lblRecord=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16),this.addChild(this.lblRecord),this.btnResume=new eG(xG.getText("","이어하기")),this.btnResume.width=420,this.btnResume.onClick=this.onResumeClick.bind(this),this.addChild(this.btnResume),this.btnStart=new eG(xG.getText("","도전하기")),this.btnStart.width=420,this.btnStart.onClick=this.onStartClick.bind(this),this.addChild(this.btnStart),this.btnAd=new eG(xG.getText("","광고 보고 도전")),this.btnAd.width=420,this.btnAd.onClick=this.onAdClick.bind(this),this.addChild(this.btnAd),this.btnRanking=new eG(xG.getText("COMMON_20","랭킹")),this.btnRanking.width=420,this.btnRanking.onClick=this.onRankingClick.bind(this),this.addChild(this.btnRanking),this.lblNote=new iL(xG.getText("","입장 횟수는 매일 자정(UTC) 초기화됩니다"),fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_15),this.addChild(this.lblNote),this.updateLayout()} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + updateLayout(){ + const t=640; + this.lblTitle.x=.5*(t-this.lblTitle.width),this.lblTitle.y=90,this.lblRecord.x=.5*(t-this.lblRecord.width),this.lblRecord.y=170; + let i=260; + for(const s of[this.btnResume,this.btnStart,this.btnAd,this.btnRanking])s.x=.5*(t-s.width),s.y=i,s.visible&&(i+=s.height+18); + this.lblNote.x=.5*(t-this.lblNote.width),this.lblNote.y=i+10} + show(){ + super.show2(),this.refresh()} + async refresh(){ + const t=PZt.getInstance(); + try{ + await t.fetchState()} + catch(_et){ + LF.getInstance().showMessage(`${ + xG.getText("","이벤트 정보 조회 실패")} + : ${ + _et.message} + `)} + const i=!!t.run; + this.btnResume.visible=i,this.btnStart.visible=!i,this.btnAd.visible=!i,this.lblRecord.text=`${ + xG.getText("","내 최고 기록")} + : ${ + qD.displayLargeNumberAsAlphabet(t.myRecord.bestScore)} + (${ + xG.getText("","관문")} + ${ + t.myRecord.bestRound} + )`,this.btnStart.text=`${ + xG.getText("","도전하기")} + (${ + t.entries.freeLeft} + /3)`,this.btnStart.activated=t.entries.freeLeft>0,this.btnAd.text=`${ + xG.getText("","광고 보고 도전")} + (${ + t.entries.adLeft} + /2)`,this.btnAd.activated=t.entries.adLeft>0,this.updateLayout()} + async onStartClick(){ + if(this.requestPending)return; + const t=PZt.getInstance(); + if(t.entries.freeLeft<=0)return void LF.getInstance().showMessage(xG.getText("","오늘 무료 입장을 모두 사용했습니다")); + this.requestPending=!0; + let i=null,s=""; + try{ + i=await t.start(!1)} + catch(_et){ + s=_et.message} + if(this.requestPending=!1,!i)return LF.getInstance().showMessage(s||xG.getText("","입장 실패 — 다시 시도해주세요")),void this.refresh(); + Jfi.getInstance().show(),this.refresh()} + onResumeClick(){ + PZt.getInstance().run?Jfi.getInstance().show():this.refresh()} + async onAdClick(){ + this.requestPending||(PZt.getInstance().entries.adLeft<=0?LF.getInstance().showMessage(xG.getText("","오늘 광고 입장을 모두 사용했습니다")):(this.requestPending=!0,TL.canSkipAds?(NU.trackAd("ad_skip","cardEvent"),await this.startWithAd()):(NU.trackAd("ad_try","cardEvent"),await YL(async()=>{ + NU.trackAd("ad_success","cardEvent"),await this.startWithAd()} + ,void 0,()=>{ + NU.trackAd("ad_fail","cardEvent")} + )),this.requestPending=!1))} + async startWithAd(){ + const t=PZt.getInstance(); + let i=null,s=""; + try{ + i=await t.start(!0)} + catch(_et){ + s=_et.message} + if(!i)return LF.getInstance().showMessage(s||xG.getText("","입장 실패 — 다시 시도해주세요")),void this.refresh(); + Jfi.getInstance().show(),this.refresh()} + async onRankingClick(){ + const t=PZt.getInstance(); + let i=null,s=""; + try{ + i=await t.getRanking(30)} + catch(_et){ + s=_et.message} + if(!i)return void LF.getInstance().showMessage(s||xG.getText("","랭킹 조회 실패")); + const e=Rfi.getInstance(); + e.setData(i.list??[],i.myRank??null),e.show()} + } + ; + Vt(Qfi,"CardEventLobbyPopup"),Kt(Qfi,"_instance"); + let Zfi=Qfi; + const tpi=Object.freeze(Object.defineProperty({ + __proto__:null,CardEventLobbyPopup:Zfi} + ,Symbol.toStringTag,{ + value:"Module"}
SecretaryPopup 8 hunks, 571 statements
- super(),Kt(this,"sp",new He),Kt(this,"frame",0),Kt(this,"frameCount",0),Kt(this,"playing",!1),Kt(this,"currentTarget",null),Kt(this,"itemsGetters",new Map),Kt(this,"heroDetailPopupGetter",null),Kt(this,"bottomMenuGetter",null),Kt(this,"checking",!1),Kt(this,"retired",!1),Kt(this,"onBattleSwitchBind"),this.eventMode="none",this.addChild(this.sp),this.sp.x=-24,this.sp.y=-34,this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} + super(),Kt(this,"lblHeader",new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_18)),Kt(this,"lblFooter",new iL("",fD.COLOR_GRAY,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"btnConfirm",new DU("","","확인",.8,180,60)),Kt(this,"secretaryImg",(()=>{ + const t=new He(QA.getTexture("UI_Ekkorr","UNIT_NPC_1")); + return t.scale.set(.7/.6),t} + )()),Kt(this,"btnGuide",new IB("UI_Ekkorr","UI_Alarm")),Kt(this,"list"),Kt(this,"petPieceContainer",new Ge),Kt(this,"petPieceContainerWidth",0),Kt(this,"rewardContainer",new Ge),Kt(this,"gemIcon",new He(QA.getTexture("UI_Ekkorr","UI_SHOP_GEM"))),Kt(this,"gemLabel",new iL("",fD.COLOR_DEEP_SKYBLUE,fD.DEFAULT_FONT_OPTION_18)),Kt(this,"honorIcon",new He(QA.getTexture("UI_Ekkorr","UI_COIN_Big"))),Kt(this,"honorLabel",new iL("",fD.COLOR_PURPLE_PINK,fD.DEFAULT_FONT_OPTION_18)),Kt(this,"hammerIcon",new He(QA.getTexture("UI_Ekkorr","Icon_Hammer_01"))),Kt(this,"hammerLabel",new iL("",fD.COLOR_WHITE,fD.DEFAULT_FONT_OPTION_18)),Kt(this,"runeTicketIcon",new He(QA.getTexture("UI_Ekkorr","RuneTicket"))),Kt(this,"runeTicketLabel",new iL("",fD.COLOR_WHITE,fD.DEFAULT_FONT_OPTION_18)),Kt(this,"grantedGem",0),Kt(this,"grantedHonor",0),Kt(this,"grantedHammer",0),Kt(this,"grantedRuneTicket",0),Kt(this,"grantedPetPieces",{ + } + ),Kt(this,"onConfirm",null),Kt(this,"state","INTRO"),Kt(this,"revealAfterHide",!1),Kt(this,"revealQueue",[]),Kt(this,"kindGrade",new Map),Kt(this,"grantedTotal",0),Kt(this,"rowCount",0),this.width=t.POPUP_WIDTH,this.title=xG.getText("GAME_857","비서"),this.lblHeader.align="left",this.lblFooter.align="left",fD.setLabelWrapWidth(this.lblHeader,this.width-60),fD.setLabelWrapWidth(this.lblFooter,this.width-60),Uni.LIST_WIDTH=t.LIST_WIDTH,this.list=new Kk(Uni,t.LIST_WIDTH,t.LIST_MAX_HEIGHT,4),this.btnConfirm.showIconLabel=!1,this.btnConfirm.showTextLabel=!0,this.btnConfirm.text=xG.getText("COMMON_1","확인"),this.btnConfirm.color=DU.GREEN,this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.gemIcon.scale.set(.5),this.honorIcon.scale.set(.5),this.hammerIcon.height>0&&this.hammerIcon.scale.set(this.gemIcon.height/this.hammerIcon.height*.6),this.runeTicketIcon.height>0&&this.runeTicketIcon.scale.set(this.gemIcon.height/this.runeTicketIcon.height*.8),this.rewardContainer.addChild(this.gemIcon,this.gemLabel,this.honorIcon,this.honorLabel,this.hammerIcon,this.hammerLabel,this.runeTicketIcon,this.runeTicketLabel),this.rewardContainer.visible=!1,this.btnGuide.x=t.POPUP_WIDTH-this.btnGuide.width-23,this.btnGuide.y=63,this.btnGuide.on("pointertap",()=>{ + qjt.getInstance().showGuide()} + ),this.petPieceContainer.visible=!1,this.contentContainer.addChild(this.btnGuide,this.lblHeader,this.secretaryImg,this.list,this.rewardContainer,this.petPieceContainer,this.lblFooter,this.btnConfirm)}
- return t._instance||(t._instance=new t),t._instance} - static load(){ - this.textures||QA.hasSheet("ClickHand")&&(this.textures=QA.getTextures("ClickHand","ClickHand"))} - registerHeroDetailPopupGetter(t){ - this.heroDetailPopupGetter=t} - registerBottomMenuGetter(t){ - this.bottomMenuGetter=t} - onAdded(){ - this.setBattleSwitch(!0)} - onRemoved(){ - this.setBattleSwitch(!1)} - checkEnable(){ - this.retired||ML.numRevive>=2&&this.retire()} - startCheck(t,i){ - this.retired||(this.itemsGetters.set(t,i),this.checking||(this.checking=!0,LM.getInstance().add(this.onCheck,this)))} - stopCheck(t){ - this.itemsGetters.delete(t),0===this.itemsGetters.size&&this.checking&&(this.checking=!1,LM.getInstance().remove(this.onCheck,this)),this.hideFromTarget()} - retire(){ - this.retired||(this.retired=!0,this.hideFromTarget(),this.itemsGetters.clear(),this.checking&&(this.checking=!1,LM.getInstance().remove(this.onCheck,this)))} - onCheck(){ - const t=sVt.currentIndex; - 0===t&&this.checkQuest()||1===t&&this.checkHero()||2===t&&this.checkCastle()||this.hideFromTarget()} - checkQuest(){ - if(!this.itemsGetters.has(0))return!1; - const t=rL.getInstance(),i=1===ML.numRevive,s=i?3:4; - for(let e=1; - e<=s; - e++){ - const s=t.getDataByKindNum(e); - if(s){ - if(!s.isOpen)return!!(s.canOpen&&ML.gold>=s.effectiveOpenGold)&&(this.showOnItem(0,t=>{ - var i; - return(null==(i=t.vo)?void 0:i.kindNum)===e} - ,"btnOpen"),!0); - if(!i&&s.getLevelUpGold()<=s.effectiveIncGold)return ML.gold>=s.getLevelUpGold()&&(this.showOnItem(0,t=>{ - var i; - return(null==(i=t.vo)?void 0:i.kindNum)===e} - ,"btnOpen"),!0)} + return this._instance||(this._instance=new t),this._instance} + showResult(t,i=0,s=0,e="basic",n={
- if(i){ - let i=!0; - for(let s=1; - s<=3; - s++){ - const e=t.getDataByKindNum(s); - if(!e||!e.isOpen){ - i=!1; - break} + ,h=0,r=0,o=null,a=!1){ + var c; + this.onConfirm=o,this.grantedGem=i,this.grantedHonor=s,this.grantedHammer=h,this.grantedRuneTicket=r,this.grantedPetPieces=n||{
- if(i&&this.bottomMenuGetter){ - const t=wx.getInstance(),i=t.getTeamIds(); - for(const n of i){ - const i=t.getVOWithId(n); - if(i&&i.enhance>=1)return!1} - const{ - parent:s,btn:e} - =this.bottomMenuGetter(); - return this.showOnTarget(s,e),!0} + ,this.applyTierTexture(e); + const l=wx.getInstance(),u=[]; + let d=0; + this.kindGrade.clear(); + for(const g of Object.keys(t)){ + const i=Number(g),s=Number(t[i]??0); + s>0&&(u.push({ + kindNum:i,count:s} + ),d+=s,this.kindGrade.set(i,(null==(c=l.getBookVO(i))?void 0:c.grade)??1))} + u.sort((t,i)=>{ + const s=l.getBookVO(t.kindNum),e=l.getBookVO(i.kindNum),n=(null==s?void 0:s.grade)??-1,h=(null==e?void 0:e.grade)??-1; + if(n!==h)return h-n; + const r=(null==s?void 0:s.tribe)??99,o=(null==e?void 0:e.tribe)??99; + return r!==o?r-o:t.kindNum-i.kindNum} + ),this.grantedTotal=d,this.revealQueue=[]; + for(const g of u)for(let t=0; + t<g.count; + t++)this.revealQueue.push(g.kindNum); + this.shuffleInPlace(this.revealQueue); + const f=Uni.COLS,p=[]; + for(let g=0; + g<u.length; + g+=f)p.push(u.slice(g,g+f)); + this.rowCount=p.length,this.list.dataProvider=p,this.list.showTopItem(),this.btnClose.visible=!1,this.outSideClickHide=!1,a?(this.enterIntroState(),super.show()):(this.state="TRANSITIONING",this.startRevealOverlay()),TL.numRevive<=3&&TL.maxWave>=100&&Dni.getInstance().showSecretaryHelpPopup()} + applyTierTexture(t){ + const i="premium"===t?"UNIT_NPC_2":"UNIT_NPC_1"; + this.secretaryImg.texture=QA.getTexture("UI_Ekkorr",i)} + buildPetPieceContainer(){ + var t; + const i=this.petPieceContainer; + for(const h of[...i.children])i.removeChild(h),null==(t=h.destroy)||t.call(h,{ + children:!0} + ); + const s=Object.entries(this.grantedPetPieces||{
- return!1} - checkHero(){ - if(!this.itemsGetters.has(1))return!1; - const t=this.itemsGetters.get(1)(); - if(!t||0===t.length)return!1; - const i=t[0]; - if(!i||!i.vo||i.vo.level<=0)return!1; - if(1===ML.numRevive){ - if(this.heroDetailPopupGetter){ - const t=this.heroDetailPopupGetter(); - if(t&&t.parent){ - const i=t.getEnhanceGuideInfo(); - if(i)return this.showOnTarget(i.parent,i.btn),!0} - return!1} - return!(i.vo.enhance>=1||(this.showOnTarget(i,{ - x:80,y:40,width:0,height:0} - ),0))} - if(i.vo.level>=10)return!1; - const s=VR.getInstance().getGameplayMultiplier(kR.UnitUpgradeGold),e=Math.floor(a5.getInstance().getTotalGold(i.vo.level,i.vo.level+1)/s); - return ML.gold>=e&&(this.showOnTarget(i,i.btnUpgrade),!0)} - checkCastle(){ - if(0!==ML.numRevive)return!1; - if(!this.itemsGetters.has(2))return!1; - const t=this.itemsGetters.get(2)(); - if(!t||0===t.length)return!1; - const i=mR.getInstance(),s=i.castleVO.level; - if(s<5){ - const t=a5.getInstance().getTotalGold(s,s+1); - return ML.gold>=t&&(this.showOnItem(2,t=>{ - var i; - return 1===(null==(i=t.vo)?void 0:i.kindNum)} - ,"btnUpgrade"),!0)} - if(s>=5){ - const t=i.getBookDataByKindNum(2); - if(t&&t.level<2)return ML.gold>=t.cost&&(this.showOnItem(2,t=>{ - var i; - return 2===(null==(i=t.vo)?void 0:i.kindNum)} - ,"btnUpgrade"),!0); - const s=i.getBookDataByKindNum(3); - if(s&&s.level<2)return ML.gold>=s.cost&&(this.showOnItem(2,t=>{ - var i; - return 3===(null==(i=t.vo)?void 0:i.kindNum)} - ,"btnUpgrade"),!0); - const e=i.getBookDataByKindNum(4); - if(e&&e.level<1)return ML.gold>=e.cost&&(this.showOnItem(2,t=>{ - var i; - return 4===(null==(i=t.vo)?void 0:i.kindNum)} - ,"btnUpgrade"),!0)} - return!1} - showOnItem(t,i,s){ - const e=this.itemsGetters.get(t); - if(!e)return; - const n=e(); + ).map(([t,i])=>({ + kindNum:Number(t),count:Number(i)} + )).filter(t=>t.count>0).sort((t,i)=>t.kindNum-i.kindNum); + if(0===s.length)return this.petPieceContainerWidth=0,void(i.visible=!1); + let e=0,n=0;
- const t=n[h]; - if(i(t)){ - const i=t[s]; - return void(i&&this.showOnTarget(t,i))} + const t=s[h],r=new _5; + r.setInactive(t.kindNum); + const o=new iL(`×${ + t.count} + `,fD.COLOR_WHITE,fD.DEFAULT_OUTLINE_FONT_OPTION_18); + o.textColor=fD.COLOR_WHITE,r.x=e,r.y=0,o.x=r.x+r.width-o.width-2,o.y=r.y+r.height-o.height-2,e+=r.width,n=Math.max(n,r.height),h<s.length-1&&(e+=18),i.addChild(r,o)} + this.petPieceContainerWidth=e,i.visible=!0} + enterIntroState(){ + this.state="INTRO",this.lblHeader.text=xG.getValueReplace("GAME_855","##",String(this.grantedTotal),`성주님,\n${ + this.grantedTotal} + 명의 영웅을 모집했습니다.\n어떤 영웅이 왔는지 확인해볼까요?`),this.lblFooter.visible=!1,this.list.visible=!1,this.rewardContainer.visible=!1,this.petPieceContainer.visible=!1,this.btnConfirm.text=xG.getText("COMMON_1","확인"),this.btnClose.visible=!1,this.updateLayout()} + enterDoneState(){ + this.state="DONE",this.lblHeader.text=xG.getValueReplace("GAME_856","##",String(this.grantedTotal),`비서가 ${ + this.grantedTotal} + 명의 영웅을 모집했습니다.`); + const t=`- ${ + xG.getText("GAME_862","비서는 1시간마다 2명씩 영웅을 모아옵니다. (최대 24명)")} + `,i=`- ${ + xG.getText("GAME_863","환생 또는 재접속 시 4시간이 지났다면, 비서가 자동으로 찾아옵니다.")} + `,s=`- ${ + xG.getText("GAME_766","획득한 영웅은 병영에 추가됩니다.")} + `; + this.lblFooter.text=`${ + t} + \n${ + i} + \n${ + s} + `,this.lblFooter.visible=!0,this.list.visible=!0,this.btnConfirm.text=xG.getText("COMMON_1","확인"),this.btnClose.visible=!1; + const e=this.grantedGem>0||this.grantedHonor>0||this.grantedHammer>0||this.grantedRuneTicket>0; + this.rewardContainer.visible=e,e&&(this.gemIcon.visible=this.grantedGem>0,this.gemLabel.visible=this.grantedGem>0,this.honorIcon.visible=this.grantedHonor>0,this.honorLabel.visible=this.grantedHonor>0,this.hammerIcon.visible=this.grantedHammer>0,this.hammerLabel.visible=this.grantedHammer>0,this.runeTicketIcon.visible=this.grantedRuneTicket>0,this.runeTicketLabel.visible=this.grantedRuneTicket>0,this.gemLabel.text=`${ + this.grantedGem} + `,this.honorLabel.text=`${ + this.grantedHonor} + `,this.hammerLabel.text=`${ + this.grantedHammer} + `,this.runeTicketLabel.text=`${ + this.grantedRuneTicket} + `),this.buildPetPieceContainer(),this.updateLayout()} + startRevealOverlay(){ + const t=new Hni(this.revealQueue,this.kindGrade,this.grantedGem,this.grantedHonor,this.grantedPetPieces,this.grantedHammer,this.grantedRuneTicket,()=>{ + this.enterDoneState(),super.show()} + ); + VA.stage.addChild(t)} + updateLayout(){ + let i=70; + this.secretaryImg.x=.5*(this.width-this.secretaryImg.width)+25,this.secretaryImg.y=i,i+=this.secretaryImg.height+12,this.lblHeader.x=.5*(this.width-this.lblHeader.width),this.lblHeader.y=i,i+=this.lblHeader.height+12; + const s=Uni.ROW_HEIGHT,e=this.list.getYSpace(),n=Math.min(t.LIST_MAX_HEIGHT,Math.max(s,this.rowCount*(s+e))); + if(this.list.setListHeight(n,!1),this.list.x=t.LIST_X,this.list.y=i,this.list.visible&&(i+=n+12),this.rewardContainer.visible){ + const t=36,s=6,e=[{ + icon:this.gemIcon,label:this.gemLabel} + ,{ + icon:this.honorIcon,label:this.honorLabel} + ,{ + icon:this.hammerIcon,label:this.hammerLabel} + ,{ + icon:this.runeTicketIcon,label:this.runeTicketLabel} + ].filter(t=>t.icon.visible),n=Vt(t=>t.icon.width+s+t.label.width,"groupW"),h=e.reduce((t,i)=>t+n(i),0)+Math.max(0,e.length-1)*t,r=i,o=Math.max(28,...e.map(t=>t.icon.height)); + let a=.5*(this.width-h); + for(const i of e)i.icon.x=a,i.icon.y=r+.5*(o-i.icon.height),a+=i.icon.width+s,i.label.x=a,i.label.y=r+.5*(o-i.label.height),a+=i.label.width+t; + this.rewardContainer.x=0,this.rewardContainer.y=0,i+=o+12} + if(this.petPieceContainer.visible){ + this.petPieceContainer.x=.5*(this.width-this.petPieceContainerWidth),this.petPieceContainer.y=i; + let t=0; + for(const i of this.petPieceContainer.children)t=Math.max(t,i.height||0); + i+=(t||60)+12} + this.lblFooter.visible?(this.lblFooter.x=.5*(this.width-this.lblFooter.width),this.lblFooter.y=i,i+=this.lblFooter.height+18):i+=6,this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=i,i+=this.btnConfirm.height+25,this.height=i+18} + onConfirmClick(){ + if("INTRO"===this.state)this.state="TRANSITIONING",this.revealAfterHide=!0,super.hide(); + else{ + this.hide(); + const t=this.onConfirm; + this.onConfirm=null,t&&t()}
+ onHideMotionComplete(){ + super.onHideMotionComplete(),this.revealAfterHide&&(this.revealAfterHide=!1,this.startRevealOverlay())} + getDefaultPositionY(){ + return.5*VA.stageHeight} + shuffleInPlace(t){ + for(let i=t.length-1; + i>0; + i--){ + const s=Math.floor(Math.random()*(i+1)),e=t[i]; + t[i]=t[s],t[s]=e}
- Vt(_ni,"ClickHand"),Kt(_ni,"_instance"),Kt(_ni,"textures",null); + Vt(Lni,"SecretaryPopup"),Kt(Lni,"_instance"),Kt(Lni,"POPUP_WIDTH",580),Kt(Lni,"LIST_X",20),Kt(Lni,"LIST_WIDTH",Lni.POPUP_WIDTH-2*Lni.LIST_X),Kt(Lni,"LIST_MAX_HEIGHT",460); + let Gni=Lni; + const Bni=class t extends Yk{ + constructor(){ + super(),Kt(this,"icons",[]); + const i=new jk(t.LIST_WIDTH,t.ROW_HEIGHT,0); + i.alpha=0,this.addChild(i); + for(let s=0; + s<t.COLS; + s++){ + const i=new w5; + i.setMode(g5.BOOK),i.scale.set(t.ICON_SCALE),i.visible=!1,this.icons.push(i),this.addChild(i)} + } + setData(i){ + const s=i.length,e=this.icons[0].width,n=this.icons[0].height,h=t.COLS*e+(t.COLS-1)*t.H_GAP; + let r=.5*(t.LIST_WIDTH-h); + const o=.5*(t.ROW_HEIGHT-n); + for(let a=0; + a<t.COLS; + a++){ + const n=this.icons[a]; + if(a<s){ + const s=i[a]; + n.setDataWithKindNum(s.kindNum),n.setCountText(`x${ + s.count} + `),n.x=r,n.y=o,n.visible=!0,r+=e+t.H_GAP} + else n.visible=!1} + } + } + ; + Vt(Bni,"SecretaryHeroRow"),Kt(Bni,"LIST_WIDTH",540),Kt(Bni,"COLS",5),Kt(Bni,"ICON_SCALE",.64),Kt(Bni,"H_GAP",10),Kt(Bni,"ROW_HEIGHT",64); + let Uni=Bni; + const Fni=class t extends Ge{ + constructor(i,s,e,n,h,r,o,a){ + super(),Kt(this,"cols",t.BASE_COLS),Kt(this,"bg"),Kt(this,"gridContainer"),Kt(this,"queue"),Kt(this,"kindGrade"),Kt(this,"grantedGem"),Kt(this,"grantedHonor"),Kt(this,"grantedPetPieces"),Kt(this,"grantedHammer"),Kt(this,"grantedRuneTicket"),Kt(this,"onCompleteCb"),Kt(this,"queueIdx",0),Kt(this,"timer",0),Kt(this,"done",!1),Kt(this,"placedIcons",[]),Kt(this,"activePlaceholders",new Set),Kt(this,"cellW",0),Kt(this,"cellH",0),Kt(this,"startX",0),Kt(this,"startY",0),Kt(this,"iconScale",.7),Kt(this,"iconNativeW",0),Kt(this,"iconNativeH",0),Kt(this,"rewardContainer",null),Kt(this,"rewardsRevealed",!1),Kt(this,"allRevealed",!1),this.queue=i.slice(),this.kindGrade=s,this.grantedGem=e,this.grantedHonor=n,this.grantedPetPieces=h||{ + } + ,this.grantedHammer=r,this.grantedRuneTicket=o,this.onCompleteCb=a; + const c=VA.stageWidth||640,l=VA.stageHeight||1200; + this.bg=new jk(c,l,0),this.bg.alpha=0,this.addChild(this.bg),this.gridContainer=new Ge,this.addChild(this.gridContainer),this.eventMode="static",this.bg.eventMode="static",this.bg.on("pointertap",()=>this.onTap()),this.computeLayout(c,l),Fk.to(this.bg,{ + alpha:.75,duration:.18,ease:"power2.out",onComplete:Vt(()=>this.processNext(),"onComplete")} + )} + computeLayout(i,s){ + const e=new w5; + e.setMode(g5.BOOK),this.queue.length>0&&e.setDataWithKindNum(this.queue[0]),this.iconNativeW=e.width,this.iconNativeH=e.height,e.destroy({ + children:!0} + ); + const n=this.queue.length; + this.cols=Math.min(t.MAX_COLS,Math.max(t.BASE_COLS,Math.ceil(n/t.MAX_ROWS))); + const h=this.cols,r=Math.max(1,Math.ceil(n/h)),o=t.GAP,a=i-2*t.PAD_X,c=s-t.PAD_TOP-t.PAD_BOTTOM-t.RESERVED_REWARD_H,l=(a-o*(h-1))/(h*this.iconNativeW),u=(c-o*(r-1))/(r*this.iconNativeH); + let d=Math.min(l,u,.9); + d=Math.max(d,.32),d*=.9,this.iconScale=d; + const f=this.iconNativeW*d,p=this.iconNativeH*d; + this.cellW=f+o,this.cellH=p+o; + const g=h*f+(h-1)*o,m=r*p+(r-1)*o; + this.startX=.5*(i-g),this.startY=t.PAD_TOP+Math.max(0,.5*(c-m))} + gridPositionAt(t){ + const i=t%this.cols,s=Math.floor(t/this.cols); + return{ + x:this.startX+i*this.cellW,y:this.startY+s*this.cellH} + } + spawnIcon(t,i){ + const s=new w5; + s.setMode(g5.BOOK),s.setDataWithKindNum(i),s.pivot.set(.5*this.iconNativeW,.5*this.iconNativeH),s.scale.set(this.iconScale); + const e=this.gridPositionAt(t),n=this.iconNativeW*this.iconScale,h=this.iconNativeH*this.iconScale; + return s.x=e.x+.5*n,s.y=e.y+.5*h,s.alpha=0,s.visible=!1,this.gridContainer.addChild(s),this.placedIcons.push(s),s} + spawnPlaceholder(t){ + const i=this.iconNativeW*this.iconScale,s=this.iconNativeH*this.iconScale,e=.16*i,n=new Lf; + return n.poly([0,0,i-e,0,i,.5*s,i-e,s,0,s]),n.fill(16777215),n.pivot.set(.5*i,.5*s),n.x=t.x,n.y=t.y,this.gridContainer.addChild(n),this.activePlaceholders.add(n),n} + removePlaceholder(t){ + this.activePlaceholders.delete(t),Fk.killTweensOf(t),t.parent&&t.parent.removeChild(t)} + onTap(){ + this.done||(this.allRevealed?this.finish():this.skip())} + processNext(){ + if(this.done)return; + if(this.queueIdx>=this.queue.length)return void(this.rewardsRevealed?this.allRevealed=!0:this.startRevealRewards()); + const t=this.queue[this.queueIdx],i=this.kindGrade.get(t)??1,s=this.spawnIcon(this.queueIdx,t); + let e; + this.queueIdx++,i>=5?(this.revealHigh(s),e=620):(this.revealLow(s),e=55),this.timer=window.setTimeout(()=>{ + this.timer=0,this.processNext()} + ,e)} + revealLow(t){ + this.popIcon(t,!1)} + revealHigh(t){ + const i=this.spawnPlaceholder(t),s=i.x,e=Fk.timeline({ + onComplete:Vt(()=>{ + this.removePlaceholder(i),this.flashAtIcon(t),this.popIcon(t,!0)} + ,"onComplete")} + ); + e.to(i,{ + x:s+6,duration:.05,ease:"none",repeat:9,yoyo:!0} + ),e.set(i,{ + x:s} + )} + popIcon(t,i){ + const s=this.iconScale; + t.visible=!0,t.alpha=0; + const e=i?1.55:1.3,n=i?.12:.09,h=Fk.timeline(); + h.to(t,{ + alpha:1,duration:.05,ease:"power2.out"} + ),h.fromTo(t.scale,{ + x:s*e,y:s*e} + ,{ + x:s,y:s,duration:n,ease:i?"back.out(2.2)":"back.out(1.7)"} + ,"<")} + flashAtIcon(t){ + const i=this.iconNativeW*this.iconScale*1.15,s=this.iconNativeH*this.iconScale*1.15,e=.16*i,n=new Lf; + n.poly([0,0,i-e,0,i,.5*s,i-e,s,0,s]),n.fill(16777215),n.pivot.set(.5*i,.5*s),n.x=t.x,n.y=t.y,n.alpha=0,this.gridContainer.addChild(n); + const h=Fk.timeline({ + onComplete:Vt(()=>{ + n.parent&&n.parent.removeChild(n)} + ,"onComplete")} + ); + h.to(n,{ + alpha:.9,duration:.05,ease:"power2.out"} + ),h.to(n,{ + alpha:0,duration:.22,ease:"power2.out"} + )} + startRevealRewards(){ + if(this.rewardsRevealed=!0,!(this.grantedGem>0||this.grantedHonor>0||this.grantedHammer>0||this.grantedRuneTicket>0||Object.values(this.grantedPetPieces||{ + } + ).some(t=>Number(t)>0)))return void(this.allRevealed=!0); + this.rewardContainer=this.buildRewardContainer(),this.gridContainer.addChild(this.rewardContainer); + const t=this.rewardContainer; + t.alpha=0,t.scale.set(.6); + const i=Fk.timeline({ + onComplete:Vt(()=>{ + this.allRevealed=!0} + ,"onComplete")} + ); + i.to(t,{ + alpha:1,duration:.18,ease:"power2.out"} + ),i.to(t.scale,{ + x:1,y:1,duration:.28,ease:"back.out(1.8)"} + ,"<")} + buildRewardContainer(){ + var i,s; + const e=new Ge,n=[]; + if(this.grantedGem>0){ + const t=new He(QA.getTexture("UI_Ekkorr","UI_SHOP_GEM")); + t.scale.set(.7),n.push({ + icon:t,label:new iL(String(this.grantedGem),fD.COLOR_DEEP_SKYBLUE,fD.DEFAULT_FONT_OPTION_18)} + )} + if(this.grantedHonor>0){ + const t=new He(QA.getTexture("UI_Ekkorr","UI_COIN_Big")); + t.scale.set(.7),n.push({ + icon:t,label:new iL(String(this.grantedHonor),fD.COLOR_PURPLE_PINK,fD.DEFAULT_FONT_OPTION_18)} + )} + if(this.grantedHammer>0){ + const t=new He(QA.getTexture("UI_Ekkorr","Icon_Hammer_01")),s=null==(i=n[0])?void 0:i.icon.height; + s&&t.height>0?t.scale.set(s/t.height*.6):t.scale.set(.42),n.push({ + icon:t,label:new iL(String(this.grantedHammer),fD.COLOR_WHITE,fD.DEFAULT_FONT_OPTION_18)} + )} + if(this.grantedRuneTicket>0){ + const t=new He(QA.getTexture("UI_Ekkorr","RuneTicket")),i=null==(s=n[0])?void 0:s.icon.height; + i&&t.height>0?t.scale.set(i/t.height*.8):t.scale.set(.8*.7),n.push({ + icon:t,label:new iL(String(this.grantedRuneTicket),fD.COLOR_WHITE,fD.DEFAULT_FONT_OPTION_18)} + )} + const h=Vt(t=>t.icon.width+8+t.label.width,"groupW"),r=n.reduce((t,i)=>t+h(i),0)+36*Math.max(0,n.length-1),o=Math.max(28,...n.map(t=>Math.max(t.icon.height,t.label.height))); + let a=.5*-r; + for(const t of n)t.icon.x=a,t.icon.y=.5*(o-t.icon.height),a+=t.icon.width+8,t.label.x=a,t.label.y=.5*(o-t.label.height),a+=t.label.width+36,e.addChild(t.icon,t.label); + const c=Object.entries(this.grantedPetPieces||{ + } + ).map(([t,i])=>({ + kindNum:Number(t),count:Number(i)} + )).filter(t=>t.count>0).sort((t,i)=>t.kindNum-i.kindNum); + let l=0; + if(c.length>0){ + const t=22,i=[]; + let s=0; + for(let e=0; + e<c.length; + e++){ + const n=c[e],h=new _5; + h.setInactive(n.kindNum); + const r=new iL(`×${ + n.count} + `,fD.COLOR_BRIGHT_GREEN,fD.DEFAULT_FONT_OPTION_18); + i.push({ + icon:h,label:r} + ),s+=h.width,e<c.length-1&&(s+=t),l=Math.max(l,h.height)} + const n=o+12; + let h=.5*-s; + for(let r=0; + r<i.length; + r++){ + const{ + icon:s,label:o} + =i[r]; + s.x=h,s.y=n+.5*(l-s.height),o.x=s.x+s.width-o.width-2,o.y=s.y+s.height-o.height-2,h+=s.width,r<i.length-1&&(h+=t),e.addChild(s,o)} + } + const u=VA.stageWidth||640,d=Math.max(1,Math.ceil(this.queue.length/this.cols)),f=this.startY+d*this.iconNativeH*this.iconScale+(d-1)*t.GAP; + return e.x=.5*u,e.y=f+24,e} + forceShowRewards(){ + if(!this.rewardsRevealed||this.rewardContainer){ + if(!this.rewardsRevealed){ + if(this.rewardsRevealed=!0,!(this.grantedGem>0||this.grantedHonor>0||this.grantedHammer>0||this.grantedRuneTicket>0||Object.values(this.grantedPetPieces||{ + } + ).some(t=>Number(t)>0)))return; + this.rewardContainer=this.buildRewardContainer(),this.gridContainer.addChild(this.rewardContainer)} + this.rewardContainer&&(Fk.killTweensOf(this.rewardContainer),Fk.killTweensOf(this.rewardContainer.scale),this.rewardContainer.alpha=1,this.rewardContainer.scale.set(1))} + } + skip(){ + if(!this.done){ + this.timer&&(clearTimeout(this.timer),this.timer=0); + for(const t of Array.from(this.activePlaceholders))this.removePlaceholder(t); + for(const t of this.placedIcons)Fk.killTweensOf(t),Fk.killTweensOf(t.scale),t.visible=!0,t.alpha=1,t.scale.set(this.iconScale); + for(; + this.queueIdx<this.queue.length; + ){ + const t=this.queue[this.queueIdx],i=this.spawnIcon(this.queueIdx,t); + i.visible=!0,i.alpha=1,i.scale.set(this.iconScale),this.queueIdx++} + this.forceShowRewards(),this.allRevealed=!0} + } + finish(){ + this.done||(this.done=!0,this.timer&&(clearTimeout(this.timer),this.timer=0),window.setTimeout(()=>{ + Fk.to(this,{ + alpha:0,duration:.25,ease:"power2.out",onComplete:Vt(()=>{ + this.cleanup(),this.onCompleteCb()} + ,"onComplete")} + )} + ,400))} + cleanup(){ + Fk.killTweensOf(this),Fk.killTweensOf(this.bg); + for(const t of Array.from(this.activePlaceholders))this.removePlaceholder(t); + for(const t of this.placedIcons)Fk.killTweensOf(t),Fk.killTweensOf(t.scale); + this.rewardContainer&&(Fk.killTweensOf(this.rewardContainer),Fk.killTweensOf(this.rewardContainer.scale)),this.parent&&this.parent.removeChild(this)} + } + ; + Vt(Fni,"SecretaryRevealOverlay"),Kt(Fni,"BASE_COLS",6),Kt(Fni,"MAX_COLS",9),Kt(Fni,"MAX_ROWS",16),Kt(Fni,"GAP",6),Kt(Fni,"PAD_X",24),Kt(Fni,"PAD_TOP",80),Kt(Fni,"PAD_BOTTOM",80),Kt(Fni,"RESERVED_REWARD_H",200); + let Hni=Fni; + const Wni=class t{ + constructor(){ + Kt(this,"timerId",0),Kt(this,"busy",!1)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + static loadFromStorage(){ + return t._loadPromise||(t._loadPromise=(async()=>{ + try{ + const i=await $A.getSecretaryAutoEnabled(); + t._cachedAutoEnabled=!1!==i} + catch{ + t._cachedAutoEnabled=!0} + } + )()),t._loadPromise} + static isAutoEnabled(){ + return t._cachedAutoEnabled} + static setAutoEnabled(i){ + t._cachedAutoEnabled=i,$A.setSecretaryAutoEnabled(i).catch(()=>{ + } + ),i||t.getInstance().cancel()} + async armOnLogin(){ + await t.loadFromStorage(),t.isAutoEnabled()&&this.schedule(t.DELAY_LOGIN_MS)} + async armOnRebirth(){ + await t.loadFromStorage(),t.isAutoEnabled()&&this.schedule(t.DELAY_REBIRTH_MS)} + cancel(){ + this.timerId&&(clearTimeout(this.timerId),this.timerId=0)} + schedule(t){ + this.cancel(),this.timerId=window.setTimeout(()=>{ + this.timerId=0,this.tryShow()} + ,t)} + isBlockedByContext(){ + return!rri.getInstance().isIdleBattleActive()||!!DL.getInstance().hasPopup||UU.getInstance().children.length>0} + async tryShow(){ + var i,s,e,n,h,r,o,a,c,l,u,d,f,p,g,m,w,v,_,b; + if(!this.busy)if(this.isBlockedByContext())this.schedule(t.RETRY_BLOCKED_MS); + else if(!(TL.maxWave<t.UNLOCK_MAX_WAVE)){ + this.busy=!0; + try{ + const t=await lD.getInstance().assistant.getState(!1); + if(!t.success)return; + const y=null==(s=null==(i=t.body)?void 0:i.assistant)?void 0:s.nextClaimAt; + if("number"!=typeof y)return; + if(tx.time<y)return; + if(DL.getInstance().hasPopup)return; + const M=await lD.getInstance().assistant.claim(); + if(!M.success)return; + (null==(e=M.body)?void 0:e.user)&&(TL.setUserData(M.body.user),qF.getInstance().updateAll()),(null==(n=M.body)?void 0:n.hero)&&wx.getInstance().setData(M.body.hero),(null==(h=M.body)?void 0:h.pet)&&cx.getInstance().setData(M.body.pet),Kni.getInstance().updateFromAssistantBody(null==(r=M.body)?void 0:r.assistant); + const E=(null==(a=null==(o=M.body)?void 0:o.claim)?void 0:a.granted)??{ + } + ; + if(0===Object.keys(E).length)return; + if(DL.getInstance().hasPopup)return; + const A=(null==(l=null==(c=M.body)?void 0:c.claim)?void 0:l.gem)??0,S=(null==(d=null==(u=M.body)?void 0:u.claim)?void 0:d.honorCoin)??0,T=(null==(p=null==(f=M.body)?void 0:f.claim)?void 0:p.petPieces)??{ + } + ,C=(null==(m=null==(g=M.body)?void 0:g.claim)?void 0:m.hammer)??0; + C>0&&XG.getInstance().isStatusLoaded&&(XG.getInstance().status.hammerCount+=C); + const I=(null==(v=null==(w=M.body)?void 0:w.claim)?void 0:v.runeTicket)??0,O="premium"===(null==(b=null==(_=M.body)?void 0:_.assistant)?void 0:b.tier)?"premium":"basic"; + Gni.getInstance().showResult(E,A,S,O,T,C,I,null,!0),cS.getInstance().dispatchCustomEvent("AssistantClaim")} + finally{ + this.busy=!1} + } + } + } + ; + Vt(Wni,"SecretaryAutoTrigger"),Kt(Wni,"_instance"),Kt(Wni,"DELAY_LOGIN_MS",6e4),Kt(Wni,"DELAY_REBIRTH_MS",3e4),Kt(Wni,"UNLOCK_MAX_WAVE",100),Kt(Wni,"RETRY_BLOCKED_MS",5e3),Kt(Wni,"_cachedAutoEnabled",!0),Kt(Wni,"_loadPromise",null); + let $ni=Wni; + const jni=Object.freeze(Object.defineProperty({ + __proto__:null,SecretaryAutoTrigger:$ni} + ,Symbol.toStringTag,{ + value:"Module"} + )),Vni=class t{ + constructor(){ + Kt(this,"cached",null),Kt(this,"inflight",null)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + peek(){ + return this.cached} + async getState(t=!1){ + return!t&&this.cached?this.cached:(this.inflight||(this.inflight=(async()=>{ + var t; + try{ + const i=await lD.getInstance().assistant.getState(!1); + return(null==i?void 0:i.success)?(this.applyAssistantBody(null==(t=i.body)?void 0:t.assistant),this.cached):this.cached} + finally{ + this.inflight=null} + } + )()),this.inflight)} + updateFromAssistantBody(t){ + this.applyAssistantBody(t)} + invalidate(){ + this.cached=null} + applyAssistantBody(t){ + if(!t||"object"!=typeof t)return; + const i=t,s=this.cached,e="premium"===i.tier?"premium":"basic"; + let n=(null==s?void 0:s.petEvent)??null; + if("petEvent"in i){ + const t=i.petEvent; + if(null===t)n=null; + else if(t&&"object"==typeof t){ + const i=t; + n={ + kindNums:Array.isArray(i.kindNums)?i.kindNums.map(t=>"number"==typeof t?t:0).filter(t=>t>0):[],basicDailyCount:"number"==typeof i.basicDailyCount?i.basicDailyCount:0,premiumDailyCount:"number"==typeof i.premiumDailyCount?i.premiumDailyCount:0} + } + } + this.cached={ + nextClaimAt:"number"==typeof i.nextClaimAt?i.nextClaimAt:(null==s?void 0:s.nextClaimAt)??0,petEvent:n,tier:e} + } + async checkClaimable(){ + if(TL.maxWave<$ni.UNLOCK_MAX_WAVE)return!1; + let t=this.peek(); + if(t||await this.getState(!1),t=this.peek(),!t)return!1; + const i=tx.time; + return!(t.nextClaimAt-i>0)} + } + ; + Vt(Vni,"SecretaryDataManager"),Kt(Vni,"_instance");
HeroItemRenderer 1 hunks, 469 statements
- async onClick(i,s){ - !this.data||this.data.id<=0||this.data.kindNum<=0||this.multiLevelContainer.visible||i<this.btnUpgrade.x&&(await t.cleanupAsync(),Jqt.getInstance().show(this.data))} - } - ; - Vt(Zqt,"HeroItemRenderer"),Kt(Zqt,"updateTimer",null),Kt(Zqt,"DEBOUNCE_DELAY",3e3),Kt(Zqt,"isDirty",!1),Kt(Zqt,"heroTargetLevels",new Map),Kt(Zqt,"numReviveSnapshot",-1),Kt(Zqt,"autoCloseCounter",0),Kt(Zqt,"AUTO_CLOSE_SECONDS",5),Kt(Zqt,"lastCounterUpdateTime",0); - let tYt=Zqt; - const iYt=class t extends cG{ - constructor(){ - super(),Kt(this,"lblMessage"),Kt(this,"bgInput"),Kt(this,"inputEl"),Kt(this,"lblHint"),Kt(this,"btnCancel"),Kt(this,"btnConfirm"),Kt(this,"slotId",-1),Kt(this,"requestPending",!1),Kt(this,"onSuccess",null),this.title=CG.getText("GAME_1097","프리셋 이름 변경"); - const t=cD.LABEL_OPTION_NO_DROP_SHADOW; - t.fill=cD.COLOR_WHITE,t.lineHeight=30,t.fontWeight="normal",this.lblMessage=new JD(CG.getText("GAME_1098","프리셋 이름을 작성해주세요."),cD.DEFAULT_COLOR,t),this.addChild(this.lblMessage),cD.setLabelWrapWidth(this.lblMessage,this.width-40),this.bgInput=new TM({ - texture:QA.getTexture("UI_Ekkorr","UI_Slot2"),leftWidth:4,topHeight:4,rightWidth:4,bottomHeight:4} - ),this.bgInput.visible=!1,this.bgInput.x=40,this.bgInput.width=this.width-2*this.bgInput.x,this.bgInput.height=70,this.addChild(this.bgInput),this.inputEl=this.createHTMLInput(),this.lblHint=new JD("",11184810,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.addChild(this.lblHint),this.btnCancel=new cqt(CG.getText("COMMON_2","취소")),this.btnCancel.outlineText=!0,this.btnCancel.width=240,this.btnCancel.height=65,this.btnCancel.onClick=this.onCancelClick.bind(this),this.addChild(this.btnCancel),this.btnConfirm=new cqt(CG.getText("COMMON_1","확인")),this.btnConfirm.color=cqt.COLOR_ORANGE,this.btnConfirm.outlineText=!0,this.btnConfirm.width=this.btnCancel.width,this.btnConfirm.height=this.btnCancel.height,this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.addChild(this.btnConfirm),this.updateLayout(),this.on("removed",this.onRemoved)} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - createHTMLInput(){ - const i=document.createElement("input"); - return i.type="text",i.maxLength=t.MAX_INPUT_LEN,i.style.position="absolute",i.style.fontFamily="Arial",i.style.fontSize="18px",i.style.textAlign="center",i.style.display="none",i.style.color="white",i.style.background="transparent",i.style.border="2px solid #684f3e",i.style.borderRadius="6px",i.style.boxSizing="border-box",i.addEventListener("input",()=>this.updateHint()),document.body.appendChild(i),i} - updateLayout(){ - this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.lblMessage.y=80,this.bgInput.x=40,this.bgInput.y=this.lblMessage.y+this.lblMessage.height+20,this.lblHint.x=this.bgInput.x,this.lblHint.y=this.bgInput.y+this.bgInput.height+5,this.btnCancel.x=this.bgInput.x,this.btnCancel.y=this.lblHint.y+this.lblHint.height+20,this.btnConfirm.x=this.bgInput.x+this.bgInput.width-this.btnConfirm.width,this.btnConfirm.y=this.btnCancel.y,this.height=this.btnCancel.y+this.btnCancel.height+50} - showForSlot(t,i,s=null){ - this.btnConfirm.text=CG.getText("COMMON_1","확인"),this.btnCancel.text=CG.getText("COMMON_2","취소"),this.slotId=t,this.inputEl.value=i??"",this.onSuccess=s,this.updateHint(),super.show()} - onShowMotionComplete(){ - super.onShowMotionComplete(),this.showInputOverlay()} - hide(){ - this.hideInputOverlay(),super.hide()} - onRemoved(){ - this.hideInputOverlay()} - showInputOverlay(){ - const t=this.toGlobal(this.bgInput.position),i=VA.stage.scale; - this.inputEl.style.display="block",this.inputEl.style.left=t.x+"px",this.inputEl.style.top=t.y+"px",this.inputEl.style.width=`${ - Math.floor(this.bgInput.width*i.x)} - px`,this.inputEl.style.height=`${ - Math.floor(this.bgInput.height*i.y)} - px`,this.inputEl.placeholder=CG.getText("GAME_1097","프리셋 이름 입력"),setTimeout(()=>this.inputEl.focus(),50)} - hideInputOverlay(){ - this.inputEl.style.display="none",this.inputEl.blur()} - updateHint(){ - const i=this.inputEl.value.length; - this.lblHint.text=`${ - i} - / ${ - t.MAX_INPUT_LEN} - `} - onCancelClick(){ - this.hide()} - async onConfirmClick(){ - if(this.requestPending)return; - if(this.slotId<0)return; - const t=(this.inputEl.value??"").trim(); - this.requestPending=!0; - const i=await rD.getInstance().hero.renameHeroPreset(this.slotId,t); - if(this.requestPending=!1,!1!==i.success){ - if(ML.setUserInfo(i.body),$F.getInstance().updateAll(),RF.getInstance().showMessage(CG.getText("GAME_1099","프리셋 이름이 변경되었습니다.")),this.onSuccess)try{ - this.onSuccess()} - catch(fet){ - } - this.hide()} - else wG.getInstance().showError(i)} - } - ; - Vt(iYt,"HeroPresetRenamePopup"),Kt(iYt,"_instance"),Kt(iYt,"MAX_INPUT_LEN",8); - let sYt=iYt; - const eYt=class t extends Ge{ - constructor(){ - super(),Kt(this,"bg"),Kt(this,"slotButtons",[]),Kt(this,"btnSave"),Kt(this,"lblSaveHint"),Kt(this,"saveMode",!1),Kt(this,"requestPending",!1),Kt(this,"onApplied",null),Kt(this,"longPressTimers",[null,null,null,null,null]),Kt(this,"longPressFired",[!1,!1,!1,!1,!1]),this.bg=new Lf,this.bg.roundRect(0,0,t.WIDTH,t.HEIGHT,6),this.bg.fill({ - color:2825487,alpha:.6} - ),this.addChild(this.bg); - for(let n=0; - n<5; - n++){ - const i=new Rzt(this.getSlotName(n),t.SLOT_BUTTON_WIDTH,16); - i.autoResize=!1,i.lbl.textSize=16,i.width=t.SLOT_BUTTON_WIDTH,i.height=t.SLOT_BUTTON_HEIGHT,i.x=8+n*(t.SLOT_BUTTON_WIDTH+t.SLOT_GAP),i.y=4+.5*(t.ROW_HEIGHT-i.height),i.on("pointertap",()=>{ - this.longPressFired[n]?this.longPressFired[n]=!1:this.onSlotClick(n)} - ,this),i.on("pointerdown",()=>this.startLongPress(n),this),i.on("pointerup",()=>this.cancelLongPress(n),this),i.on("pointerupoutside",()=>this.cancelLongPress(n),this),i.on("pointercancel",()=>this.cancelLongPress(n),this),i.selected=!1,this.slotButtons.push(i),this.addChild(i)} - const i=t.ROW_HEIGHT+8,s=t.ACTION_BUTTON_WIDTH,e=t.SLOT_BUTTON_HEIGHT; - this.btnSave=new eG("저장",s,8),this.btnSave.width=s,this.btnSave.height=e,this.btnSave.x=640-s-t.ACTION_BUTTON_RIGHT_MARGIN,this.btnSave.y=i+.5*(t.ROW_HEIGHT-e),this.btnSave.on("pointertap",this.onSaveClick,this),this.addChild(this.btnSave),this.lblSaveHint=new JD("프리셋 길게 누르면 이름 변경",16767354,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblSaveHint.setWrapWidth(400),this.lblSaveHint.x=12,this.lblSaveHint.visible=!0,this.addChild(this.lblSaveHint),this.recenterHint()} - recenterHint(){ - const i=t.ROW_HEIGHT+8; - this.lblSaveHint.y=i+.5*(t.ROW_HEIGHT-this.lblSaveHint.height)} - get barHeight(){ - return t.HEIGHT} - getSlotName(t){ - const i=t+1; - return CG.getValueReplace("GAME_744","##",String(i),`${ - i} - 번`)} - getSlotDisplayLabel(t){ - const i=wx.getInstance().heroPresets[t]; - return i&&i.label&&i.label.length>0?i.label:this.getSlotName(t)} - startLongPress(i){ - this.cancelLongPress(i),this.saveMode||this.requestPending||(this.longPressFired[i]=!1,this.longPressTimers[i]=setTimeout(()=>{ - this.longPressFired[i]=!0,this.longPressTimers[i]=null,this.openRenamePopup(i)} - ,t.LONG_PRESS_MS))} - cancelLongPress(t){ - null!==this.longPressTimers[t]&&(clearTimeout(this.longPressTimers[t]),this.longPressTimers[t]=null)} - openRenamePopup(t){ - const i=wx.getInstance().heroPresets[t]; - sYt.getInstance().showForSlot(t,(null==i?void 0:i.label)??"",()=>this.update())} - update(){ - const t=wx.getInstance(),i=t.heroPresets,s=this.saveMode?-1:t.getActiveHeroPresetSlot(); - for(let e=0; - e<this.slotButtons.length; - e++){ - const t=this.slotButtons[e],n=i[e],h=n&&n.team.length>0,r=this.getSlotName(e); - let o=this.getSlotDisplayLabel(e); - this.saveMode&&(o=h?CG.getValueReplace("GAME_746","##",r,`${ - r} - 덮어쓰기`):CG.getValueReplace("GAME_745","##",r,`${ - r} - 저장`)),t.text=o,t.selected=s===e,t.alpha=this.saveMode||h?1:.65} - this.saveMode?this.btnSave.text=CG.getText("COMMON_2","취소"):this.btnSave.text=CG.getText("GAME_527","저장"),this.lblSaveHint.visible=!0,this.lblSaveHint.text=this.saveMode?CG.getText("GAME_747","저장할 슬롯을 선택하세요"):CG.getText("GAME_1100","프리셋 길게 누르면 이름 변경"),this.recenterHint()} - setSaveMode(t){ - this.saveMode=t,this.update()} - updateLanguage(){ - this.update()} - async onSlotClick(t){ - if(this.requestPending)return; - const i=wx.getInstance(),s=i.heroPresets[t]; - if(this.saveMode){ - if(0===i.list.length)return RF.getInstance().showMessage(CG.getText("GAME_305","팀에 최소 1명의 영웅이 배치되어 있어야 합니다.")),void this.setSaveMode(!1); - const e=this.getSlotName(t),n=s&&s.team.length>0?CG.getValueReplace("GAME_749","##",e,`${ - e} - 프리셋을 덮어쓰시겠습니까?`):CG.getValueReplace("GAME_748","##",e,`${ - e} - 프리셋에 현재 상태를 저장하시겠습니까?`); - return void D$t.getInstance().show(n,async()=>{ - await this.doSave(t,(null==s?void 0:s.label)??""),this.setSaveMode(!1)} - )} - s&&0!==s.team.length?D$t.getInstance().show(CG.getText("GAME_750","선택한 프리셋으로 교체하시겠습니까?"),async()=>{ - await this.doApply(t)} - ):RF.getInstance().showMessage(CG.getText("GAME_753","비어있는 슬롯입니다. 저장 버튼으로 저장하세요."))} - onSaveClick(){ - this.requestPending||(this.saveMode?this.setSaveMode(!1):0!==wx.getInstance().list.length?this.setSaveMode(!0):RF.getInstance().showMessage(CG.getText("GAME_305","팀에 최소 1명의 영웅이 배치되어 있어야 합니다.")))} - async doSave(t,i){ - if(this.requestPending)return; - this.requestPending=!0; - const s=wx.getInstance().list.map(t=>({ - kindNum:t.kindNum,trans:t.trans,enhance:t.enhance} - )),e=await rD.getInstance().hero.saveHeroPreset(t,i,s,!0); - this.requestPending=!1,!1!==e.success?(ML.setUserInfo(e.body),$F.getInstance().updateAll(),this.update(),RF.getInstance().showMessage(CG.getText("GAME_756","프리셋이 저장되었습니다."))):wG.getInstance().showError(e)} - async doApply(t){ - if(this.requestPending)return; - this.requestPending=!0; - const i=wx.getInstance(),s=i.list.map(t=>t.id),e=i.list.map(t=>t.level); - tYt.cancel(); - const n=await rD.getInstance().hero.applyHeroPreset(t,!0,e); - if(this.requestPending=!1,!1===n.success)return void wG.getInstance().showError(n); - ML.setUserInfo(n.body),i.setLastAppliedHeroPresetSlot(t),$F.getInstance().updateAll(),this.update(); - const h=Nri.getInstance(),r=bx.getVO(); - for(const o of s)r.id=o,h.fireHero(r); - r.remove(); - for(const o of i.list)await h.hireHero(o); - RF.getInstance().showMessage(CG.getText("GAME_757","프리셋이 적용되었습니다.")),this.onApplied&&this.onApplied()} - } - ; - Vt(eYt,"HeroPresetBar"),Kt(eYt,"WIDTH",630),Kt(eYt,"ROW_HEIGHT",42),Kt(eYt,"HEIGHT",2*eYt.ROW_HEIGHT+8),Kt(eYt,"SLOT_BUTTON_WIDTH",118),Kt(eYt,"SLOT_BUTTON_HEIGHT",38),Kt(eYt,"SLOT_GAP",4),Kt(eYt,"ACTION_BUTTON_WIDTH",120),Kt(eYt,"ACTION_BUTTON_RIGHT_MARGIN",10),Kt(eYt,"LONG_PRESS_MS",500); - let nYt=eYt; - const hYt=class t extends kzt{ - constructor(){ - super(),Kt(this,"list"),Kt(this,"presetBar"),Kt(this,"lblMessage",new JD("",16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_17)),Kt(this,"cnt",0),Kt(this,"lastGold",-1),Kt(this,"lastUgMult",-1),Kt(this,"isMultiLevel",!1),this.presetBar=new nYt,this.presetBar.x=5,this.presetBar.y=Pqt.getInstance().height,this.presetBar.visible=!1,this.presetBar.onApplied=()=>this.setData(),this.list=new I5(tYt,630,VA.listHeight),this.list.x=5,this.list.y=Pqt.getInstance().height,this.lblMessage.y=189; - const t=this.lblMessage.getStyle(); - t.fontSize=18,this.lblMessage.setStyle(t),this.addChild(this.list),this.addChild(this.lblMessage),this.addChild(this.presetBar),this.addChild(Pqt.getInstance()),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - togglePresetBar(){ - this.setPresetBarVisible(!this.presetBar.visible)} - setPresetBarVisible(t){ - this.presetBar.visible=t; - const i=Pqt.getInstance().height; - if(t){ - this.presetBar.update(); - const t=this.presetBar.barHeight+4; - this.list.y=i+t,this.list.setListHeight(VA.listHeight-t)} - else this.list.y=i,this.list.setListHeight(VA.listHeight)} - get isPresetBarVisible(){ - return this.presetBar.visible} - setMultiLevel(t){ - let i=this.list.getItemList(); - if(t)for(let s=0; - s<i.length; - s++)i[s].showMultiLevel(); - else for(let s=0; - s<i.length; - s++)i[s].hideMultiLevel()} - onAdded(){ - LM.getInstance().add(this.onFrame,this)} - onRemoved(){ - LM.getInstance().remove(this.onFrame,this),wni.getInstance().unregisterListItemsGetter("Hero"),tYt.cleanup()} - getListItems(){ - return this.list.getItemList()} - onFrame(){ - var t; - if(null==(null==(t=this.parent)?void 0:t.parent))return LM.getInstance().remove(this.onFrame,this),void tYt.cleanup(); - this.isMultiLevel&&tYt.checkAutoClose(this); - const i=ML.gold,s=VR.getInstance().getGameplayMultiplier(kR.UnitUpgradeGold),e=s!==this.lastUgMult; - if(i===this.lastGold&&!e)return; - this.lastGold=i,this.lastUgMult=s; - const n=this.list.getItemList(); - for(let h=0; - h<n.length; - h++)e&&n[h].recalculateCosts(s),n[h].refreshActivation(i); - ++this.cnt>60&&(this.cnt=0,this.updateRobsterBtnRedDot())} - updateRobsterBtnRedDot(){ - const t=wx.getInstance().lastBuyRefreshTime; - let i=3600-.001*(tx.time-t); - i<=0&&(i=0),i>0?Pqt.getInstance().hideHireBtnRedDot():Pqt.getInstance().showHireBtnRedDot()} - setData(){ - LM.getInstance().add(this.onFrame,this),this.lastGold=-1,this.lastUgMult=-1,wni.getInstance().registerListItemsGetter(()=>this.getListItems(),"Hero"),Pqt.getInstance().update(),Pqt.getInstance().updateLanguage(); - let t=[]; - for(let i=0; - i<wx.getInstance().list.length; - i++){ - const s=wx.getInstance().list[i]; - !s||s.kindNum<=0||t.push(s)} - t.sort((t,i)=>t.enhance!==i.enhance?i.enhance-t.enhance:t.level!==i.level?i.level-t.level:t.grade!==i.grade?i.grade-t.grade:t.tribe-i.tribe),0===t.length?(this.lblMessage.text=CG.getText("GAME_1200","배치된 영웅이 없습니다."),this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.lblMessage.visible=!0,this.list.visible=!1):(this.lblMessage.visible=!1,this.list.visible=!0,this.list.dataProvider=t),this.setMultiLevel(!1),this.isMultiLevel=!1,this.presetBar.visible&&this.presetBar.update(),this.updateRobsterBtnRedDot()} - get className(){ - return"HeroSubView"} - updateLanguage(){ - this.setData()} - } - ; - Vt(hYt,"HeroSubView"),Kt(hYt,"instance"); - let rYt=hYt; - const oYt=class t extends Izt{ - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - constructor(){ - super(),this.currentSubView=rYt.getInstance()} - setData(){ - rYt.getInstance().setData(),this.currentSubView=rYt.getInstance()} - get className(){ - return"HeroView"} - } - ; - Vt(oYt,"HeroView"),Kt(oYt,"instance"); - let aYt=oYt; - const cYt=class t extends Azt{ - constructor(){ - let t; - super(),Kt(this,"btnBook",new c$t("Book",110)),Kt(this,"btnClose",new KKt),Kt(this,"btnGuide"),Kt(this,"lblMaxCapacity",new VB("menu_icon_03_on","0/10",16711680,cD.DEFAULT_OUTLINE_FONT_OPTION_18)),Kt(this,"filterIcons"),Kt(this,"_selectedTribes",[1,2,3,4]),Kt(this,"btnClosePoint",new gi),Kt(this,"btnClosePointInitialized",!1),this.lblTitle.y=2,this.lblMaxCapacity.iconScale=.5,this.lblMaxCapacity.x=this.lblTitle.x,this.lblMaxCapacity.y=this.lblTitle.y+this.lblTitle.height+1,this.addChild(this.lblMaxCapacity),this.btnClose.x=640-this.btnClose.width-10,this.btnClose.y=.5*(this.bg.height-this.btnClose.height),this.addChild(this.btnClose),this.btnBook.width=110,this.btnBook.height=45,this.btnBook.y=.5*(this.bg.height-this.btnBook.height),this.addChild(this.btnBook),this.btnBook.on("pointertap",this.onBook,this),this.btnClose.onClick=()=>{ - rYt.getInstance().updateLanguage(),aYt.getInstance().currentSubView=rYt.getInstance(),dYt.getInstance().isRunning&&dYt.getInstance().tutorialIndex==dYt.TUTORIAL_INDEX_WAVE0&&dYt.getInstance().clearTutorialWave0()} - ,this.filterIcons=[]; - for(let i=0; - i<4; - ++i)t=new Tzt(i),t.scale=.8,t.y=.5*this.bg.height,this.addChild(t),this.filterIcons.push(t),t.onClick=this.onFilterIconClick.bind(this); - this.btnGuide=new AB("UI_Ekkorr","UI_Alarm"),this.addChild(this.btnGuide),this.btnGuide.on("pointertap",()=>{ - Mzt.getInstance().showGuide()} - ),this.updateLanguage()} - static getInstance(){ - return null==t.instance&&(t.instance=new t),t.instance} - updateLayout(){ - this.btnGuide.x=this.lblTitle.x+this.lblTitle.width+3,this.btnGuide.y=this.lblTitle.y+.5*(this.lblTitle.height-this.btnGuide.height)+2,this.btnBook.x=this.btnClose.x-this.btnBook.width-5; - const t=this.filterIcons.length; - let i=this.btnBook.x+.5*this.filterIcons[t-1].width-5; - for(let s=t-1; - s>-1; - --s)this.filterIcons[s].x=i-this.filterIcons[s].width-1,i=this.filterIcons[s].x} - update(){ - const t=ML.maxTeamSlots,i=wx.getInstance().list.length; - this.lblMaxCapacity.text=`${ - i} - /${ - t} - `} - setData(){ - this.update(),this.updateLanguage()} - resetFilter(){ - this._selectedTribes=[1,2,3,4]; - const t=this.filterIcons.length; - for(let i=0; - i<t; - ++i)this.filterIcons[i].reset()} - onBook(){ - Vqt.getInstance().setData(),Vqt.getInstance().show2()} - get selectedTribes(){ - return this._selectedTribes} - onFilterIconClick(t,i){ - this._selectedTribes.length=0; - const s=this.filterIcons.length; - for(let e=0; - e<s; - ++e)this.filterIcons[e].selected&&this._selectedTribes.push(e+1); - Bqt.getInstance().onFilterChanged()} - updateLanguage(){ - this.setTitle(CG.getText("GAME_13","영웅목록")),this.btnBook.text=CG.getText("GAME_220","도감"),this.updateLayout()} - getBtnClosePoint(){ - if(0==this.btnClosePointInitialized){ - this.btnClosePointInitialized=!0; - const t=this.btnClose; - this.btnClosePoint.x=mYt.getInstance().x+t.x,this.btnClosePoint.y=mYt.getInstance().y+40+t.y} - return this.btnClosePoint} - } - ; - Vt(cYt,"HeroRosterSubMenu"),Kt(cYt,"instance"); - let lYt=cYt; - const uYt=class t{ - constructor(){ - Kt(this,"isOpened",!0),Kt(this,"savedIndex",0),Kt(this,"tutorialIndex",0),Kt(this,"enableMissionGuide",!0),Kt(this,"bottomMenuUnlockList",[0,1,2,3,4,5]),Kt(this,"isHelpHeroPopupped",!1),Kt(this,"isHelpQuestPopupped",!1),Kt(this,"isHelpRevivePopupped",!1)} - static getInstance(){ - return this.instance||(this.instance=new t),this.instance} - async init(){ - } - get isRunning(){ - return 0!=this.isOpened&&this.tutorialIndex>0} - async startTutorial(){ - 0!=this.isOpened&&(ML.numRevive>0||(this.savedIndex=Number(await $A.getTutorialID()??0),ML.wave>this.savedIndex?1==ML.wave?(this.enableMissionGuide=!1,this.tutorialIndex!=t.TUTORIAL_INDEX_WAVE0&&(this.tutorialIndex=t.TUTORIAL_INDEX_WAVE0,await this.startTutorialWave0())):2==ML.wave?(this.enableMissionGuide=!1,this.tutorialIndex=ML.wave,await this.startTutorialWave2()):3==ML.wave?(this.enableMissionGuide=!1,this.tutorialIndex=t.TUTORIAL_INDEX_WAVE3,await this.startTutorialWave3()):(this.enableMissionGuide=!0,this.tutorialIndex=ML.wave,this.startTutorialWaveEtc()):1==ML.wave?(this.bottomMenuUnlockList=[2],Chi.getInstance().onMenuClickByIndex(2),Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),gni.getInstance().opened=!1,this.enableMissionGuide=!1):2==ML.wave?(this.bottomMenuUnlockList=[1,2],Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList)):3==ML.wave?(this.bottomMenuUnlockList=[0,1,2],Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),this.enableMissionGuide=!0,wni.getInstance().init()):(this.bottomMenuUnlockList=[0,1,2],Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList))))} - async startTutorialWave0(){ - this.bottomMenuUnlockList=[2],Chi.getInstance().onMenuClickByIndex(2),Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),gni.getInstance().opened=!1,XG.getInstance().stop(),rL.getInstance().stopUpdate(),_zt.getInstance().onCompleteHandler=this.onTurotial0Toast1Complete.bind(this); - const t=CG.getText("DIALOGUE_TEXT_75","윽.. 머리야.. 여긴 어디지? 뭔가 익숙한데..."); - _zt.getInstance().show("L_FRO",t)} - onTurotial0Toast1Complete(){ - const t=FKt.getInstance().getMainList(); - t&&(qKt.getInstance().onHideHandler=this.onHelpCastlePopupHide.bind(this),qKt.getInstance().showWith(t[0].main,2,!0,!1))} - onHelpCastlePopupHide(){ - Nri.getInstance().startTutorial0Wave(),_zt.getInstance().onCompleteHandler=this.onTurotial0Toast2Complete.bind(this); - const t=CG.getText("DIALOGUE_TEXT_76","저 슬라임 녀석들.. 성을 공격하러 오는 것 같은데?"); - _zt.getInstance().show("L_SUR",t)} - onTurotial0Toast2Complete(){ - XG.getInstance().stop(),this.bottomMenuUnlockList.push(1),Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList); - const t=Chi.getInstance().getMenu(1),i=Chi.getInstance().getHeroPoint(); - szt.getInstance().show(i.x,i.y,t.width,t.height)} - showHeroHelpPopup(){ - this.isHelpHeroPopupped||this.tutorialIndex==t.TUTORIAL_INDEX_WAVE0&&(szt.getInstance().hide(),setTimeout(()=>{ - const t=FKt.getInstance().getMainList(); - t&&(qKt.getInstance().onHideHandler=this.highlightHeroRosterButton.bind(this),qKt.getInstance().showWith(t[1].main,0,!0,!1),this.isHelpHeroPopupped=!0)} - ,100))} - highlightHeroRosterButton(){ - const t=Pqt.getInstance().btnRoaster,i=Pqt.getInstance().getBtnRosterPoint(); - szt.getInstance().show(i.x+.5*t.width,i.y+.5*t.height,t.width,t.height)} - highlightHeroHireButton(){ - const t=Bqt.getInstance().getItems(); - if(t.length<1)return void this.highlightHeroHireCloseButton(); - const i=t[0].btnHire,s=Bqt.getInstance().getBtnHirePoint(); - szt.getInstance().show(s.x+.5*i.width,s.y+.5*i.height,i.width,i.height)} - highlightHeroHireCloseButton(){ - const t=lYt.getInstance().btnClose,i=lYt.getInstance().getBtnClosePoint(); - szt.getInstance().show(i.x+.5*t.width,i.y+.5*t.height,t.width,t.height)} - clearTutorialWave0(){ - szt.getInstance().hide(),XG.getInstance().start()} - async endTutorialWave0(){ - await $A.saveTutorialID(String(t.TUTORIAL_INDEX_WAVE0)),this.savedIndex=1} - async startTutorialWave2(){ - this.bottomMenuUnlockList=[1,2],Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),Chi.getInstance().onMenuClickByIndex(1),gni.getInstance().opened=!1} - async startTutorialWave3(){ - if(this.bottomMenuUnlockList=[1,2],Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),gni.getInstance().opened=!1,zD.getInstance().npcDialogue){ - const t=[],i=new nzt; - i.code="L_SAD",i.text=CG.getText("DIALOGUE_TEXT_5","영웅들을 무장시키고 성벽을 보강하려니... 생각보다 자금이 턱없이 부족하군."),i.position=1,t.push(i); - const s=new nzt; - s.code="S_SMI",s.text=CG.getText("DIALOGUE_TEXT_6","이해합니다, 성주임. 마침 성주님의 명성을 듣고 도움을 청하는 이들이 줄을 섰답니다. [퀘스트]를 해결해 주시면 그들은 기꺼이 금화를 내놓을 거예요."),s.position=2,t.push(s),_zt.getInstance().onCompleteHandler=this.onTurotial3ToastComplete.bind(this),t.length>0&&_zt.getInstance().showDialogues(t)} - else this.onTurotial3ToastComplete()} - onTurotial3ToastComplete(){ - this.bottomMenuUnlockList=[0,1,2],Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),rL.getInstance().startUpdate(); - const t=Chi.getInstance().getMenu(0),i={ - x:t.x,y:t.y,width:t.width,height:t.height} - ; - yni.getInstance().showOnTarget(Chi.getInstance(),i)} - showQuestHelpPopup(){ - this.isHelpQuestPopupped||setTimeout(()=>{ - const t=FKt.getInstance().getMainList(); - t&&(qKt.getInstance().onHideHandler=this.endTutorialWave3.bind(this),qKt.getInstance().showWith(t[2].main,0,!0,!1),this.isHelpQuestPopupped=!0)} - ,100)} - async endTutorialWave3(){ - await $A.saveTutorialID(String(t.TUTORIAL_INDEX_WAVE3)),this.savedIndex=t.TUTORIAL_INDEX_WAVE3,this.enableMissionGuide=!0,wni.getInstance().init(),gzt.getInstance().doAccountCreate()} - async startTutorialWaveEtc(){ - gni.getInstance().opened=!1,ML.wave>=10?this.bottomMenuUnlockList=[0,1,2,5]:this.bottomMenuUnlockList=[0,1,2],Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList)} - async startTutorialRevive(){ - if(0!=this.isOpened&&0==this.isHelpRevivePopupped){ - const t=FKt.getInstance().getMainList(); - t&&(qKt.getInstance().onHideHandler=this.endTutorialRevive.bind(this),qKt.getInstance().showWith(t[3].main,0,!0,!1),this.isHelpRevivePopupped=!0)} - } - async endTutorialRevive(){ - this.bottomMenuUnlockList=[0,1,2,3,4,5],Chi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),await $A.saveTutorialID(String(t.TUTORIAL_INDEX_REVIVE))} - async showHeroHelpPopupByPresent(t){ - if(t<5||t>7)return; - const i=FKt.getInstance().getMainList(); - i&&(qKt.getInstance().onHideHandler=this.endTutorialWave3.bind(this),qKt.getInstance().showWith(i[t].main,0,!0,!1),this.isHelpQuestPopupped=!0)} - } - ; - Vt(uYt,"TutorialController"),Kt(uYt,"instance"),Kt(uYt,"TUTORIAL_INDEX_WAVE0",1),Kt(uYt,"TUTORIAL_INDEX_WAVE3",3),Kt(uYt,"TUTORIAL_INDEX_REVIVE",100); - let dYt=uYt; - const fYt=class t extends Ge{ - constructor(){ - super(),Kt(this,"bg",new ZD),Kt(this,"lblText",new JD("",cD.COLOR_WHITE,cD.DEFAULT_DESC_FONT_OPTION_16)),Kt(this,"btnChat",new _$t("Btn_Guild_Chatting","UI_Ekkorr")),Kt(this,"btnHelp"),Kt(this,"messages",[]),Kt(this,"currentIndex",0),Kt(this,"BG_WIDTH",640),Kt(this,"BG_HEIGHT",20),Kt(this,"SCROLL_SPEED",.8),Kt(this,"VISIBLE_WIDTH",640),Kt(this,"chatUnlockTick",0),Kt(this,"onLanguageChangeBind"),Kt(this,"textY",-1),Kt(this,"update",Vt(()=>{ - !this.btnChat.visible&&++this.chatUnlockTick>=60&&(this.chatUnlockTick=0,ML.maxWave>=t.CHAT_UNLOCK_WAVE&&(this.btnChat.visible=!0),dYt.getInstance().isOpened?(this.btnHelp.visible=!0,this.btnHelp.x=this.BG_WIDTH-this.btnHelp.width+6,this.btnChat.x=this.btnHelp.x-this.btnChat.width+10):(this.btnHelp.visible=!1,this.btnChat.x=this.BG_WIDTH-this.btnChat.width+6)),0!==this.messages.length&&(this.lblText.x-=this.SCROLL_SPEED,this.lblText.x+this.lblText.width<0&&(this.currentIndex=(this.currentIndex+1)%this.messages.length,this.showCurrentMessage()))} - ,"update")),this.bg.width=this.BG_WIDTH,this.bg.height=this.BG_HEIGHT,this.bg.alpha=.4,this.bg.setIndex(7),this.addChild(this.bg),this.lblText.textColor=cD.COLOR_WHITE,this.lblText.wordWrap=!1,this.addChild(this.lblText),this.btnHelp=new AB("UI_Ekkorr","Btn_help_p"),this.btnHelp.x=this.BG_WIDTH-this.btnHelp.width+6,this.btnHelp.y=.5*(this.BG_HEIGHT-this.btnHelp.height)+4,this.btnHelp.onClick=this.onHelpBtnClick.bind(this),this.addChild(this.btnHelp),this.btnChat.scale=1,this.btnChat.x=this.btnHelp.x-this.btnChat.width+10,this.btnChat.y=this.btnHelp.y,this.btnChat.onClick=this.onChatBtn.bind(this),this.btnChat.visible=ML.maxWave>=t.CHAT_UNLOCK_WAVE,this.addChild(this.btnChat),un.shared.add(this.update,this),this.setLanguageChange(!0)} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - async onChatBtn(){ - if(aKt())return xKt.getInstance().show(),void TKt.getInstance().start(); - const t=await rD.getInstance().guild.getMyMembership(!0); - AD.setMembershipData(t.body),xKt.getInstance().show(),TKt.getInstance().start()} - onHelpBtnClick(){ - QKt.getInstance().show()} - setLanguageChange(t){ - cS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),cS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))} - onLanguageChange(t=null){ - this.refreshMessages()} - refreshMessages(){ - this.messages=DKt.getInstance().getFilteredMessages(),this.currentIndex=0,this.showCurrentMessage()} - showCurrentMessage(){ - 0!==this.messages.length&&(this.lblText.text=this.messages[this.currentIndex],this.lblText.x=this.VISIBLE_WIDTH+15,this.textY<0&&(this.textY=.5*(this.BG_HEIGHT-this.lblText.height)),this.lblText.y=this.textY)} - setMessages(t){ - this.messages=t,this.currentIndex=0,this.showCurrentMessage()} - addMessage(t){ - this.messages.push(t)} - clearMessages(){ - this.messages=[],this.currentIndex=0,this.lblText.text=""} - destroy(){ - un.shared.remove(this.update,this),this.setLanguageChange(!1),super.destroy()} - } - ; - Vt(fYt,"MessageInfo"),Kt(fYt,"instance"),Kt(fYt,"CHAT_UNLOCK_WAVE",50); - let pYt=fYt; - const gYt=class t extends Ge{ - constructor(){ - super(),Kt(this,"_currentView",null),Kt(this,"container",new Ge),Kt(this,"bg"),Kt(this,"onLanguageChangeBind"),this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","UI_Toast_Bg"),leftWidth:8,topHeight:8,rightWidth:8,bottomHeight:8} - ),this.addChild(this.bg),this.bg.width=640,this.bg.height=VA.viewMainHeight,this.container.y=40,this.addChild(this.container),$F.getInstance().y=-1,this.addChild($F.getInstance()),pYt.getInstance().y=-20,this.addChild(pYt.getInstance()),this.setLanguageChange(!0)} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - setExpandedMode(i){ - i?(this.y=t.EXPANDED_Y,this.bg.height=VA.safeHeight-t.EXPANDED_Y-VA.BOTTOM_MENU_H):(this.y=VA.viewMainY,this.bg.height=VA.viewMainHeight)} - static getExpandedListHeight(){ - return VA.safeHeight-t.EXPANDED_Y-VA.BOTTOM_MENU_H-VA.SUB_MENU_H-VA.RESOURCE_INFO_H} - get currentView(){ - return this._currentView} - set currentView(t){ - null!=this._currentView&&this.container.removeChild(this._currentView),this._currentView=t,null!=this._currentView&&(this.container.addChild(this._currentView),this._currentView.x=0,this._currentView.y=0,iKt.showItemsInVertical([this._currentView],20,.3))} - setLanguageChange(t){ - cS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),cS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))} - onLanguageChange(t=null){ - this._currentView&&this._currentView.updateLanguage()} - } - ; - Vt(gYt,"ViewMain"),Kt(gYt,"instance"),Kt(gYt,"EXPANDED_Y",320); - let mYt=gYt; - const wYt=class extends M5{ - constructor(){ - super(),Kt(this,"receivedIcon"),Kt(this,"activatedBg"),Kt(this,"_activated",!0),Kt(this,"_received",!1),this.activatedBg=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_01_nor")),this.activatedBg.visible=!this._activated,this.addChild(this.activatedBg),this.receivedIcon=new He(QA.getTexture("UI_Ekkorr","Base_Check01")),this.receivedIcon.visible=this._received,this.addChild(this.receivedIcon)} - updateLayout(){ - if(super.updateLayout(),!this.receivedIcon)return; - const t=this.bg.width,i=this.bg.height; - this.receivedIcon.x=.5*(t-this.receivedIcon.width),this.receivedIcon.y=.5*(i-this.receivedIcon.height)} - get activated(){ - return this._activated} - set activated(t){ - t!=this._activated&&(this._activated=t,this.activatedBg.visible=!this._activated)} - get received(){ - return this._received} - set received(t){ - t!=this._received&&(this._received=t,this.receivedIcon.visible=this._received)} - } - ; - Vt(wYt,"AchievementRewardItem"); - let vYt=wYt; - const bYt=class t extends qk{ - constructor(){ - super(),Kt(this,"bg"),Kt(this,"lblIndex"),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","Package_2"))),Kt(this,"lblName"),Kt(this,"lblProgress"),Kt(this,"barBg"),Kt(this,"barFill"),Kt(this,"rewardContainer",new Ge),Kt(this,"rewardItems",[]),this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:135,topHeight:30,rightWidth:20,bottomHeight:30} - ),this.bg.width=t.W,this.bg.height=t.H,this.addChild(this.bg),this.lblIndex=new JD("",16764057,cD.DEFAULT_OUTLINE_FONT_OPTION_32),this.addChild(this.icon),this.lblName=new JD("",16764057,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.addChild(this.lblName),this.barBg=new ZD,this.barBg.setIndex(4),this.barBg.width=t.BAR_W,this.barBg.height=t.BAR_H,this.barBg.alpha=.5,this.addChild(this.barBg),this.barFill=new ZD,this.barFill.setIndex(3),this.barFill.width=t.BAR_W,this.barFill.height=t.BAR_H,this.addChild(this.barFill),this.lblProgress=new JD("0/0",16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.addChild(this.lblProgress),this.addChild(this.rewardContainer); - for(let t=0; - t<7; - t++){ - const t=new vYt; - t.scale.set(.7),t.visible=!1,this.rewardItems.push(t),this.rewardContainer.addChild(t)} - } - get width(){ - return t.W}
ClickAniEffect 3 hunks, 386 statements
- super(),Kt(this,"icons",[]); - const i=new jk(t.LIST_WIDTH,t.ROW_HEIGHT,0); - i.alpha=0,this.addChild(i); - for(let s=0; - s<t.COLS; - s++){ - const i=new u5; - i.setMode(c5.BOOK),i.scale.set(t.ICON_SCALE),i.visible=!1,this.icons.push(i),this.addChild(i)} - } - setData(i){ - const s=i.length,e=this.icons[0].width,n=this.icons[0].height,h=t.COLS*e+(t.COLS-1)*t.H_GAP; - let r=.5*(t.LIST_WIDTH-h); - const o=.5*(t.ROW_HEIGHT-n); - for(let a=0; - a<t.COLS; - a++){ - const n=this.icons[a]; - if(a<s){ - const s=i[a]; - n.setDataWithKindNum(s.kindNum),n.setCountText(`x${ - s.count} - `),n.x=r,n.y=o,n.visible=!0,r+=e+t.H_GAP} - else n.visible=!1} - } - } - ; - Vt(Kjt,"SecretaryHeroRow"),Kt(Kjt,"LIST_WIDTH",540),Kt(Kjt,"COLS",5),Kt(Kjt,"ICON_SCALE",.64),Kt(Kjt,"H_GAP",10),Kt(Kjt,"ROW_HEIGHT",64); - let zjt=Kjt; - const qjt=class t extends Ge{ - constructor(i,s,e,n,h,r,o,a){ - super(),Kt(this,"cols",t.BASE_COLS),Kt(this,"bg"),Kt(this,"gridContainer"),Kt(this,"queue"),Kt(this,"kindGrade"),Kt(this,"grantedGem"),Kt(this,"grantedHonor"),Kt(this,"grantedPetPieces"),Kt(this,"grantedHammer"),Kt(this,"grantedRuneTicket"),Kt(this,"onCompleteCb"),Kt(this,"queueIdx",0),Kt(this,"timer",0),Kt(this,"done",!1),Kt(this,"placedIcons",[]),Kt(this,"activePlaceholders",new Set),Kt(this,"cellW",0),Kt(this,"cellH",0),Kt(this,"startX",0),Kt(this,"startY",0),Kt(this,"iconScale",.7),Kt(this,"iconNativeW",0),Kt(this,"iconNativeH",0),Kt(this,"rewardContainer",null),Kt(this,"rewardsRevealed",!1),Kt(this,"allRevealed",!1),this.queue=i.slice(),this.kindGrade=s,this.grantedGem=e,this.grantedHonor=n,this.grantedPetPieces=h||{ - } - ,this.grantedHammer=r,this.grantedRuneTicket=o,this.onCompleteCb=a; - const c=VA.stageWidth||640,l=VA.stageHeight||1200; - this.bg=new jk(c,l,0),this.bg.alpha=0,this.addChild(this.bg),this.gridContainer=new Ge,this.addChild(this.gridContainer),this.eventMode="static",this.bg.eventMode="static",this.bg.on("pointertap",()=>this.onTap()),this.computeLayout(c,l),Fk.to(this.bg,{ - alpha:.75,duration:.18,ease:"power2.out",onComplete:Vt(()=>this.processNext(),"onComplete")} - )} - computeLayout(i,s){ - const e=new u5; - e.setMode(c5.BOOK),this.queue.length>0&&e.setDataWithKindNum(this.queue[0]),this.iconNativeW=e.width,this.iconNativeH=e.height,e.destroy({ - children:!0} - ); - const n=this.queue.length; - this.cols=Math.min(t.MAX_COLS,Math.max(t.BASE_COLS,Math.ceil(n/t.MAX_ROWS))); - const h=this.cols,r=Math.max(1,Math.ceil(n/h)),o=t.GAP,a=i-2*t.PAD_X,c=s-t.PAD_TOP-t.PAD_BOTTOM-t.RESERVED_REWARD_H,l=(a-o*(h-1))/(h*this.iconNativeW),u=(c-o*(r-1))/(r*this.iconNativeH); - let d=Math.min(l,u,.9); - d=Math.max(d,.32),d*=.9,this.iconScale=d; - const f=this.iconNativeW*d,p=this.iconNativeH*d; - this.cellW=f+o,this.cellH=p+o; - const g=h*f+(h-1)*o,m=r*p+(r-1)*o; - this.startX=.5*(i-g),this.startY=t.PAD_TOP+Math.max(0,.5*(c-m))} - gridPositionAt(t){ - const i=t%this.cols,s=Math.floor(t/this.cols); - return{ - x:this.startX+i*this.cellW,y:this.startY+s*this.cellH} - } - spawnIcon(t,i){ - const s=new u5; - s.setMode(c5.BOOK),s.setDataWithKindNum(i),s.pivot.set(.5*this.iconNativeW,.5*this.iconNativeH),s.scale.set(this.iconScale); - const e=this.gridPositionAt(t),n=this.iconNativeW*this.iconScale,h=this.iconNativeH*this.iconScale; - return s.x=e.x+.5*n,s.y=e.y+.5*h,s.alpha=0,s.visible=!1,this.gridContainer.addChild(s),this.placedIcons.push(s),s} - spawnPlaceholder(t){ - const i=this.iconNativeW*this.iconScale,s=this.iconNativeH*this.iconScale,e=.16*i,n=new Lf; - return n.poly([0,0,i-e,0,i,.5*s,i-e,s,0,s]),n.fill(16777215),n.pivot.set(.5*i,.5*s),n.x=t.x,n.y=t.y,this.gridContainer.addChild(n),this.activePlaceholders.add(n),n} - removePlaceholder(t){ - this.activePlaceholders.delete(t),Fk.killTweensOf(t),t.parent&&t.parent.removeChild(t)} - onTap(){ - this.done||(this.allRevealed?this.finish():this.skip())} - processNext(){ - if(this.done)return; - if(this.queueIdx>=this.queue.length)return void(this.rewardsRevealed?this.allRevealed=!0:this.startRevealRewards()); - const t=this.queue[this.queueIdx],i=this.kindGrade.get(t)??1,s=this.spawnIcon(this.queueIdx,t); - let e; - this.queueIdx++,i>=5?(this.revealHigh(s),e=620):(this.revealLow(s),e=55),this.timer=window.setTimeout(()=>{ - this.timer=0,this.processNext()} - ,e)} - revealLow(t){ - this.popIcon(t,!1)} - revealHigh(t){ - const i=this.spawnPlaceholder(t),s=i.x,e=Fk.timeline({ - onComplete:Vt(()=>{ - this.removePlaceholder(i),this.flashAtIcon(t),this.popIcon(t,!0)} - ,"onComplete")} - ); - e.to(i,{ - x:s+6,duration:.05,ease:"none",repeat:9,yoyo:!0} - ),e.set(i,{ - x:s} - )} - popIcon(t,i){ - const s=this.iconScale; - t.visible=!0,t.alpha=0; - const e=i?1.55:1.3,n=i?.12:.09,h=Fk.timeline(); - h.to(t,{ - alpha:1,duration:.05,ease:"power2.out"} - ),h.fromTo(t.scale,{ - x:s*e,y:s*e} - ,{ - x:s,y:s,duration:n,ease:i?"back.out(2.2)":"back.out(1.7)"} - ,"<")} - flashAtIcon(t){ - const i=this.iconNativeW*this.iconScale*1.15,s=this.iconNativeH*this.iconScale*1.15,e=.16*i,n=new Lf; - n.poly([0,0,i-e,0,i,.5*s,i-e,s,0,s]),n.fill(16777215),n.pivot.set(.5*i,.5*s),n.x=t.x,n.y=t.y,n.alpha=0,this.gridContainer.addChild(n); - const h=Fk.timeline({ - onComplete:Vt(()=>{ - n.parent&&n.parent.removeChild(n)} - ,"onComplete")} - ); - h.to(n,{ - alpha:.9,duration:.05,ease:"power2.out"} - ),h.to(n,{ - alpha:0,duration:.22,ease:"power2.out"} - )} - startRevealRewards(){ - if(this.rewardsRevealed=!0,!(this.grantedGem>0||this.grantedHonor>0||this.grantedHammer>0||this.grantedRuneTicket>0||Object.values(this.grantedPetPieces||{ - } - ).some(t=>Number(t)>0)))return void(this.allRevealed=!0); - this.rewardContainer=this.buildRewardContainer(),this.gridContainer.addChild(this.rewardContainer); - const t=this.rewardContainer; - t.alpha=0,t.scale.set(.6); - const i=Fk.timeline({ - onComplete:Vt(()=>{ - this.allRevealed=!0} - ,"onComplete")} - ); - i.to(t,{ - alpha:1,duration:.18,ease:"power2.out"} - ),i.to(t.scale,{ - x:1,y:1,duration:.28,ease:"back.out(1.8)"} - ,"<")} - buildRewardContainer(){ - var i,s; - const e=new Ge,n=[]; - if(this.grantedGem>0){ - const t=new He(QA.getTexture("UI_Ekkorr","UI_SHOP_GEM")); - t.scale.set(.7),n.push({ - icon:t,label:new JD(String(this.grantedGem),cD.COLOR_DEEP_SKYBLUE,cD.DEFAULT_FONT_OPTION_18)} - )} - if(this.grantedHonor>0){ - const t=new He(QA.getTexture("UI_Ekkorr","UI_COIN_Big")); - t.scale.set(.7),n.push({ - icon:t,label:new JD(String(this.grantedHonor),cD.COLOR_PURPLE_PINK,cD.DEFAULT_FONT_OPTION_18)} - )} - if(this.grantedHammer>0){ - const t=new He(QA.getTexture("UI_Ekkorr","Icon_Hammer_01")),s=null==(i=n[0])?void 0:i.icon.height; - s&&t.height>0?t.scale.set(s/t.height*.6):t.scale.set(.42),n.push({ - icon:t,label:new JD(String(this.grantedHammer),cD.COLOR_WHITE,cD.DEFAULT_FONT_OPTION_18)} - )} - if(this.grantedRuneTicket>0){ - const t=new He(QA.getTexture("UI_Ekkorr","RuneTicket")),i=null==(s=n[0])?void 0:s.icon.height; - i&&t.height>0?t.scale.set(i/t.height*.8):t.scale.set(.8*.7),n.push({ - icon:t,label:new JD(String(this.grantedRuneTicket),cD.COLOR_WHITE,cD.DEFAULT_FONT_OPTION_18)} - )} - const h=Vt(t=>t.icon.width+8+t.label.width,"groupW"),r=n.reduce((t,i)=>t+h(i),0)+36*Math.max(0,n.length-1),o=Math.max(28,...n.map(t=>Math.max(t.icon.height,t.label.height))); - let a=.5*-r; - for(const t of n)t.icon.x=a,t.icon.y=.5*(o-t.icon.height),a+=t.icon.width+8,t.label.x=a,t.label.y=.5*(o-t.label.height),a+=t.label.width+36,e.addChild(t.icon,t.label); - const c=Object.entries(this.grantedPetPieces||{ - } - ).map(([t,i])=>({ - kindNum:Number(t),count:Number(i)} - )).filter(t=>t.count>0).sort((t,i)=>t.kindNum-i.kindNum); - let l=0; - if(c.length>0){ - const t=22,i=[]; - let s=0; - for(let e=0; - e<c.length; - e++){ - const n=c[e],h=new f5; - h.setInactive(n.kindNum); - const r=new JD(`×${ - n.count} - `,cD.COLOR_BRIGHT_GREEN,cD.DEFAULT_FONT_OPTION_18); - i.push({ - icon:h,label:r} - ),s+=h.width,e<c.length-1&&(s+=t),l=Math.max(l,h.height)} - const n=o+12; - let h=.5*-s; - for(let r=0; - r<i.length; - r++){ - const{ - icon:s,label:o} - =i[r]; - s.x=h,s.y=n+.5*(l-s.height),o.x=s.x+s.width-o.width-2,o.y=s.y+s.height-o.height-2,h+=s.width,r<i.length-1&&(h+=t),e.addChild(s,o)} - } - const u=VA.stageWidth||640,d=Math.max(1,Math.ceil(this.queue.length/this.cols)),f=this.startY+d*this.iconNativeH*this.iconScale+(d-1)*t.GAP; - return e.x=.5*u,e.y=f+24,e} - forceShowRewards(){ - if(!this.rewardsRevealed||this.rewardContainer){ - if(!this.rewardsRevealed){ - if(this.rewardsRevealed=!0,!(this.grantedGem>0||this.grantedHonor>0||this.grantedHammer>0||this.grantedRuneTicket>0||Object.values(this.grantedPetPieces||{ - } - ).some(t=>Number(t)>0)))return; - this.rewardContainer=this.buildRewardContainer(),this.gridContainer.addChild(this.rewardContainer)} - this.rewardContainer&&(Fk.killTweensOf(this.rewardContainer),Fk.killTweensOf(this.rewardContainer.scale),this.rewardContainer.alpha=1,this.rewardContainer.scale.set(1))} - } - skip(){ - if(!this.done){ - this.timer&&(clearTimeout(this.timer),this.timer=0); - for(const t of Array.from(this.activePlaceholders))this.removePlaceholder(t); - for(const t of this.placedIcons)Fk.killTweensOf(t),Fk.killTweensOf(t.scale),t.visible=!0,t.alpha=1,t.scale.set(this.iconScale); - for(; - this.queueIdx<this.queue.length; - ){ - const t=this.queue[this.queueIdx],i=this.spawnIcon(this.queueIdx,t); - i.visible=!0,i.alpha=1,i.scale.set(this.iconScale),this.queueIdx++} - this.forceShowRewards(),this.allRevealed=!0} - } - finish(){ - this.done||(this.done=!0,this.timer&&(clearTimeout(this.timer),this.timer=0),window.setTimeout(()=>{ - Fk.to(this,{ - alpha:0,duration:.25,ease:"power2.out",onComplete:Vt(()=>{ - this.cleanup(),this.onCompleteCb()} - ,"onComplete")} - )} - ,400))} - cleanup(){ - Fk.killTweensOf(this),Fk.killTweensOf(this.bg); - for(const t of Array.from(this.activePlaceholders))this.removePlaceholder(t); - for(const t of this.placedIcons)Fk.killTweensOf(t),Fk.killTweensOf(t.scale); - this.rewardContainer&&(Fk.killTweensOf(this.rewardContainer),Fk.killTweensOf(this.rewardContainer.scale)),this.parent&&this.parent.removeChild(this)} - } - ; - Vt(qjt,"SecretaryRevealOverlay"),Kt(qjt,"BASE_COLS",6),Kt(qjt,"MAX_COLS",9),Kt(qjt,"MAX_ROWS",16),Kt(qjt,"GAP",6),Kt(qjt,"PAD_X",24),Kt(qjt,"PAD_TOP",80),Kt(qjt,"PAD_BOTTOM",80),Kt(qjt,"RESERVED_REWARD_H",200); - let Yjt=qjt; - const Xjt=class t{ - constructor(){ - Kt(this,"timerId",0),Kt(this,"busy",!1)} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - static loadFromStorage(){ - return t._loadPromise||(t._loadPromise=(async()=>{ - try{ - const i=await $A.getSecretaryAutoEnabled(); - t._cachedAutoEnabled=!1!==i} - catch{ - t._cachedAutoEnabled=!0} - } - )()),t._loadPromise} - static isAutoEnabled(){ - return t._cachedAutoEnabled} - static setAutoEnabled(i){ - t._cachedAutoEnabled=i,$A.setSecretaryAutoEnabled(i).catch(()=>{ - } - ),i||t.getInstance().cancel()} - async armOnLogin(){ - await t.loadFromStorage(),t.isAutoEnabled()&&this.schedule(t.DELAY_LOGIN_MS)} - async armOnRebirth(){ - await t.loadFromStorage(),t.isAutoEnabled()&&this.schedule(t.DELAY_REBIRTH_MS)} - cancel(){ - this.timerId&&(clearTimeout(this.timerId),this.timerId=0)} - schedule(t){ - this.cancel(),this.timerId=window.setTimeout(()=>{ - this.timerId=0,this.tryShow()} - ,t)} - isBlockedByContext(){ - return!Dhi.getInstance().isIdleBattleActive()||!!xL.getInstance().hasPopup||DU.getInstance().children.length>0} - async tryShow(){ - var i,s,e,n,h,r,o,a,c,l,u,d,f,p,g,m,w,v,b,_; - if(!this.busy)if(this.isBlockedByContext())this.schedule(t.RETRY_BLOCKED_MS); - else if(!(ML.maxWave<t.UNLOCK_MAX_WAVE)){ - this.busy=!0; - try{ - const t=await rD.getInstance().assistant.getState(!1); - if(!t.success)return; - const y=null==(s=null==(i=t.body)?void 0:i.assistant)?void 0:s.nextClaimAt; - if("number"!=typeof y)return; - if(tx.time<y)return; - if(xL.getInstance().hasPopup)return; - const M=await rD.getInstance().assistant.claim(); - if(!M.success)return; - (null==(e=M.body)?void 0:e.user)&&(ML.setUserData(M.body.user),$F.getInstance().updateAll()),(null==(n=M.body)?void 0:n.hero)&&wx.getInstance().setData(M.body.hero),(null==(h=M.body)?void 0:h.pet)&&cx.getInstance().setData(M.body.pet),tVt.getInstance().updateFromAssistantBody(null==(r=M.body)?void 0:r.assistant); - const E=(null==(a=null==(o=M.body)?void 0:o.claim)?void 0:a.granted)??{ - } - ; - if(0===Object.keys(E).length)return; - if(xL.getInstance().hasPopup)return; - const A=(null==(l=null==(c=M.body)?void 0:c.claim)?void 0:l.gem)??0,S=(null==(d=null==(u=M.body)?void 0:u.claim)?void 0:d.honorCoin)??0,T=(null==(p=null==(f=M.body)?void 0:f.claim)?void 0:p.petPieces)??{ - } - ,C=(null==(m=null==(g=M.body)?void 0:g.claim)?void 0:m.hammer)??0; - C>0&&KG.getInstance().isStatusLoaded&&(KG.getInstance().status.hammerCount+=C); - const I=(null==(v=null==(w=M.body)?void 0:w.claim)?void 0:v.runeTicket)??0,O="premium"===(null==(_=null==(b=M.body)?void 0:b.assistant)?void 0:_.tier)?"premium":"basic"; - Vjt.getInstance().showResult(E,A,S,O,T,C,I,null,!0),cS.getInstance().dispatchCustomEvent("AssistantClaim")} - finally{ - this.busy=!1} - } - } - } - ; - Vt(Xjt,"SecretaryAutoTrigger"),Kt(Xjt,"_instance"),Kt(Xjt,"DELAY_LOGIN_MS",6e4),Kt(Xjt,"DELAY_REBIRTH_MS",3e4),Kt(Xjt,"UNLOCK_MAX_WAVE",100),Kt(Xjt,"RETRY_BLOCKED_MS",5e3),Kt(Xjt,"_cachedAutoEnabled",!0),Kt(Xjt,"_loadPromise",null); - let Jjt=Xjt; - const Qjt=Object.freeze(Object.defineProperty({ - __proto__:null,SecretaryAutoTrigger:Jjt} - ,Symbol.toStringTag,{ - value:"Module"} - )),Zjt=class t{ - constructor(){ - Kt(this,"cached",null),Kt(this,"inflight",null)} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - peek(){ - return this.cached} - async getState(t=!1){ - return!t&&this.cached?this.cached:(this.inflight||(this.inflight=(async()=>{ - var t; - try{ - const i=await rD.getInstance().assistant.getState(!1); - return(null==i?void 0:i.success)?(this.applyAssistantBody(null==(t=i.body)?void 0:t.assistant),this.cached):this.cached} - finally{ - this.inflight=null} - } - )()),this.inflight)} - updateFromAssistantBody(t){ - this.applyAssistantBody(t)} - invalidate(){ - this.cached=null} - applyAssistantBody(t){ - if(!t||"object"!=typeof t)return; - const i=t,s=this.cached,e="premium"===i.tier?"premium":"basic"; - let n=(null==s?void 0:s.petEvent)??null; - if("petEvent"in i){ - const t=i.petEvent; - if(null===t)n=null; - else if(t&&"object"==typeof t){ - const i=t; - n={ - kindNums:Array.isArray(i.kindNums)?i.kindNums.map(t=>"number"==typeof t?t:0).filter(t=>t>0):[],basicDailyCount:"number"==typeof i.basicDailyCount?i.basicDailyCount:0,premiumDailyCount:"number"==typeof i.premiumDailyCount?i.premiumDailyCount:0} - } - } - this.cached={ - nextClaimAt:"number"==typeof i.nextClaimAt?i.nextClaimAt:(null==s?void 0:s.nextClaimAt)??0,petEvent:n,tier:e} - } - async checkClaimable(){ - if(ML.maxWave<Jjt.UNLOCK_MAX_WAVE)return!1; - let t=this.peek(); - if(t||await this.getState(!1),t=this.peek(),!t)return!1; - const i=tx.time; - return!(t.nextClaimAt-i>0)} - } - ; - Vt(Zjt,"SecretaryDataManager"),Kt(Zjt,"_instance"); - let tVt=Zjt; - const iVt=class{ - } - ; - Vt(iVt,"MenuState"),Kt(iVt,"currentIndex",0); - let sVt=iVt; - const eVt=class t{ - constructor(){ - Kt(this,"currentMissionId",1),Kt(this,"rewardPending",!1),Kt(this,"missionList",[]),Kt(this,"stepList",[]),Kt(this,"petStep",0)} + super(),Kt(this,"sp"),Kt(this,"textures",[]),this.textures=QA.getTextures("ClickHand","ClickHand"),this.sp=new Wf(this.textures),this.addChild(this.sp),this.eventMode="none"}
- setBookData(t){ - if(this.missionList=[],t)for(let i=0; - i<t.length; - i++){ - const s=t[i],e=new rVt; - e.kindNum=Number(s.kindNum)||0,e.desc=s.desc||"",e.gem=Number(s.gem)||0,e.condition=s.condition||"",e.sortOrder=Number(s.sortOrder)||0,this.missionList.push(e)} - } - setStepBookData(t){ - if(this.stepList=[],t)for(let i=0; - i<t.length; - i++){ - const s=t[i],e=new aVt; - e.id=Number(s.id)||0,e.step=Number(s.step)||0,e.action=s.action||"",e.target=Number(s.target)??-1,e.param=s.param||"-1",this.stepList.push(e)} - } - getCurrentMission(){ - return this.missionList.find(t=>t.kindNum===this.currentMissionId)||null} - getCurrentSteps(){ - return this.stepList.filter(t=>t.id===this.currentMissionId).sort((t,i)=>t.step-i.step)} - getSteps(t){ - return this.stepList.filter(i=>i.id===t).sort((t,i)=>t.step-i.step)} - isAllCompleted(){ - if(0===this.missionList.length)return!0; - const t=Math.max(...this.missionList.map(t=>t.kindNum)); - return this.currentMissionId>t} - async loadInfo(){ - const t=await rD.getInstance().missionGuide.getInfo(); - t.success&&t.body&&(ML.setUserInfo(t.body),t.body.missionGuide&&(this.currentMissionId=t.body.missionGuide.currentMissionId,this.rewardPending=t.body.missionGuide.rewardPending))} - async completeMission(t){ - const i=await rD.getInstance().missionGuide.complete(t); - return!(!i.success||!i.body||(i.body.missionGuide&&(this.currentMissionId=i.body.missionGuide.currentMissionId,this.rewardPending=i.body.missionGuide.rewardPending),0))} - async claimReward(t){ - var i; - const s=await rD.getInstance().missionGuide.claim(t); - return s.success&&s.body?(ML.setUserInfo(s.body),s.body.missionGuide&&(this.currentMissionId=s.body.missionGuide.currentMissionId,this.rewardPending=s.body.missionGuide.rewardPending),(null==(i=s.body.reward)?void 0:i.gem)||0):0} + isPlaying(){ + return!!this.parent} + show(t,i,s,e,n=0,h=0){ + this.x=t,this.y=i,Jjt.getInstance().setClickArea(t-.5*s+n,i-.5*e+h,s,e),this.isPlaying()||(this.sp.animationSpeed=.65,this.sp.play(),Jjt.getInstance().addChild(this))} + hide(){ + Jjt.getInstance().setBlockerEnabled(!1),this.sp.stop(),this.parent&&this.removeFromParent()}
- Vt(eVt,"MissionGuideDataManager"),Kt(eVt,"instance"),Kt(eVt,"KINDNUM_DUNGEON",24),Kt(eVt,"KINDNUM_PVP",27),Kt(eVt,"KINDNUM_TOWER",28); + Vt(Qjt,"ClickAniEffect"),Kt(Qjt,"instance");
BaseSubMenu 1 hunks, 385 statements
+ const qKt=class extends Ge{ + constructor(){ + super(),Kt(this,"bg",new eL),Kt(this,"closeBtn",new He(QA.getTexture("UI_Ekkorr","UI_Close3"))),Kt(this,"lblTitle",new iL("Title",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_20)),this.bg.setIndex(6),this.bg.width=640,this.bg.height=60,this.bg.y=-1,this.addChild(this.bg),this.closeBtn.width=50,this.closeBtn.height=50,this.closeBtn.visible=!1,this.closeBtn.x=this.bg.width-this.closeBtn.width-5,this.closeBtn.y=.5*(this.bg.height-this.closeBtn.height),this.addChild(this.closeBtn),this.lblTitle.x=10,this.lblTitle.y=10,this.addChild(this.lblTitle)} + setTitle(t){ + this.lblTitle.text=t} + get height(){ + return this.bg.height} + updateLanguage(){ + } + } + ; + Vt(qKt,"BaseSubMenu"); + let XKt=qKt; + const JKt=class extends I5{ + constructor(){ + super(),Kt(this,"receivedIcon"),Kt(this,"activatedBg"),Kt(this,"_activated",!0),Kt(this,"_received",!1),this.activatedBg=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_01_nor")),this.activatedBg.visible=!this._activated,this.addChild(this.activatedBg),this.receivedIcon=new He(QA.getTexture("UI_Ekkorr","Base_Check01")),this.receivedIcon.visible=this._received,this.addChild(this.receivedIcon)} + updateLayout(){ + if(super.updateLayout(),!this.receivedIcon)return; + const t=this.bg.width,i=this.bg.height; + this.receivedIcon.x=.5*(t-this.receivedIcon.width),this.receivedIcon.y=.5*(i-this.receivedIcon.height)} + get activated(){ + return this._activated} + set activated(t){ + t!=this._activated&&(this._activated=t,this.activatedBg.visible=!this._activated)} + get received(){ + return this._received} + set received(t){ + t!=this._received&&(this._received=t,this.receivedIcon.visible=this._received)} + } + ; + Vt(JKt,"AchievementRewardItem"); + let QKt=JKt; + const ZKt=class t extends Yk{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"lblIndex"),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","Package_2"))),Kt(this,"lblName"),Kt(this,"lblProgress"),Kt(this,"barBg"),Kt(this,"barFill"),Kt(this,"rewardContainer",new Ge),Kt(this,"rewardItems",[]),this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:135,topHeight:30,rightWidth:20,bottomHeight:30} + ),this.bg.width=t.W,this.bg.height=t.H,this.addChild(this.bg),this.lblIndex=new iL("",16764057,fD.DEFAULT_OUTLINE_FONT_OPTION_32),this.addChild(this.icon),this.lblName=new iL("",16764057,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.addChild(this.lblName),this.barBg=new eL,this.barBg.setIndex(4),this.barBg.width=t.BAR_W,this.barBg.height=t.BAR_H,this.barBg.alpha=.5,this.addChild(this.barBg),this.barFill=new eL,this.barFill.setIndex(3),this.barFill.width=t.BAR_W,this.barFill.height=t.BAR_H,this.addChild(this.barFill),this.lblProgress=new iL("0/0",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.addChild(this.lblProgress),this.addChild(this.rewardContainer); + for(let t=0; + t<7; + t++){ + const t=new QKt; + t.scale.set(.7),t.visible=!1,this.rewardItems.push(t),this.rewardContainer.addChild(t)} + } + get width(){ + return t.W} + get height(){ + return t.H} + setData(i){ + const s=i.index+1; + this.lblIndex.text=`${ + s} + `,this.lblIndex.x=.5*(t.INDEX_AREA_W-this.lblIndex.width),this.lblIndex.y=.5*(this.height-this.lblIndex.height),this.icon.x=.5*(t.INDEX_AREA_W-this.icon.width),this.icon.y=.5*(this.height-this.icon.height); + const e=xG.getText("GAME_946","총 결제 금액"),n=GG.isUsdCurrency()?`$${ + EU.setComma(i.amount)} + `:`₩${ + EU.setComma(i.amount)} + `; + this.lblName.text=`${ + e} + (${ + n} + )`,this.lblName.height,t.BAR_H,this.lblName.x=140,this.lblName.y=5; + const h=this.lblName.y+this.lblName.height+5; + this.barBg.x=140,this.barBg.y=h,this.barFill.x=140,this.barFill.y=h; + const r=Number(i.amount)>0?Math.min(1,Math.max(0,Number(i.userAmount)/Number(i.amount))):0; + this.barFill.width=t.BAR_W*r,this.lblProgress.text=`${ + Math.floor(100*r)} + %`,this.lblProgress.x=140+this.barBg.width-this.lblProgress.width,this.lblProgress.y=this.lblName.y,this.showRewards(i.rewards,1==r),this.rewardContainer.x=140,this.rewardContainer.y=this.barBg.y+this.barBg.height+7} + showRewards(t,i){ + const s=Math.min(t.length,7); + let e=0,n=!1; + for(let h=0; + h<7; + h++){ + const r=this.rewardItems[h]; + n=!1,h<s?(r.setDataFrom(t[h]),r.visible=!0,r.x=e,e+=r.width*r.scale.x+5,r.received=i,r.activated=!i,r.type!=T5.ticket||r.subType!=T5.heroGacha&&r.subType!=T5.heroSelect&&r.subType!=T5.treasureGacha&&r.subType!=T5.petSelect||(n=!0)):r.visible=!1,this.setItemEvent(r,n)} + } + setItemEvent(t,i){ + t.eventMode="none",t.off("pointertap",this.onItemTap,this),i&&(t.eventMode="dynamic",t.on("pointertap",this.onItemTap,this))} + onItemTap(t){ + const i=t.target; + if(!i)return; + let s=""; + if(i.type==T5.ticket&&i.subType==T5.heroGacha?s=xG.getText("GAME_765","5성 영웅을 랜덤하게 획득할 수 있습니다."):i.type==T5.ticket&&i.subType==T5.heroSelect?s=xG.getText("GAME_943","제공되는 목록에서 원하는 5성 영웅을 선택할 수 있습니다."):i.type==T5.ticket&&i.subType==T5.treasureGacha?s=xG.getValueReplace("GAME_776","##",6,"6등급 유물을 랜덤하게 획득할 수 있습니다."):i.type==T5.ticket&&i.subType==T5.petSelect?s=xG.getText("GAME_944","제공되는 목록에서 원하는 펫 조각을 선택할 수 있습니다."):i.type!=T5.trans||i.subType!=T5.hero&&i.subType!=T5.treasure?i.type==T5.runeTicket&&(s=xG.getText("GAME_1502","레이드 상점에서 크리스탈을 랜덤하게 획득할 수 있습니다.")):s=xG.getText("GAME_1225","초월권을 사용하여 초월재료와 비용없이 초월시킬 수 있습니다."),s){ + const t=R5.getInstance(); + t.text=s; + let e=this.rewardContainer.x+i.x-20; + e+t.width+7>this.bg.x+this.bg.width&&(e=this.bg.x+this.bg.width-t.width-7); + let n=i.y-i.height; + n<7&&(n=7),t.show(this,e,n)} + } + } + ; + Vt(ZKt,"PaymentEventItemRenderer"),Kt(ZKt,"W",534),Kt(ZKt,"H",102),Kt(ZKt,"BAR_W",380),Kt(ZKt,"BAR_H",10),Kt(ZKt,"INDEX_AREA_W",124); + let tzt=ZKt; + const izt=class t extends LB{ + constructor(){ + super(),Kt(this,"lblGuide"),this.lblGuide=new kB("@",this.width-90,16,fD.DEFAULT_COLOR,8,10,16763904),this.contentContainer.addChild(this.lblGuide),this.outSideClickHide=!0} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + async showGuide(){ + this.title=xG.getText("GAME_945","결제 이벤트"); + const t=[xG.getText("GAME_947","목표 금액에 도달하면 보상이 우편으로 발송됩니다."),xG.getText("GAME_948","총 결제 금액은 이벤트 기간 내 결제분만 반영됩니다."),xG.getText("GAME_986","붉은 보석으로 상품 구매 시, 결제 이벤트에 반영됩니다."),xG.getText("GAME_987","웹 마켓에서 진행된 결제는 결제 이벤트에 반영되지 않습니다.")]; + this.lblGuide.text=t.map(t=>`@ ${ + t} + `).join("\n"),this.lblGuide.x=30,this.lblGuide.y=80,this.height=this.lblGuide.y+this.lblGuide.height+40,await this.loadImage(),super.show()} + getDefaultPositionY(){ + return.4*VA.stageHeight} + onBackButton(){ + return this.hide(),!0} + } + ; + Vt(izt,"PaymentEventGuidePopup"),Kt(izt,"_instance"); + let szt=izt; + const ezt=class t extends fG{ + constructor(){ + super(),Kt(this,"bntMonth",new YKt(xG.getText("COMMON_482","월간"),215)),Kt(this,"btnSpecial",new YKt(xG.getText("GAME_1158","스페셜"),215)),Kt(this,"tabs"),Kt(this,"activeIndex",0),Kt(this,"infoBg"),Kt(this,"lblPeriod"),Kt(this,"lblRemainTitle"),Kt(this,"lblRemainTime"),Kt(this,"lblTotal"),Kt(this,"lblAmount"),Kt(this,"btnGuide"),Kt(this,"list"),Kt(this,"endTime",0),Kt(this,"count",0),this.title="결제 이벤트",this.width=580,this.outSideClickHide=!0,this.tabs=[this.btnSpecial,this.bntMonth]; + for(let i=0; + i<this.tabs.length; + i++){ + const t=this.tabs[i]; + this.addChild(t); + const s=i; + t.onClick=()=>this.switchTab(s)} + this.layoutTabs(),this.infoBg=new RB,this.infoBg.setIndex(2),this.infoBg.width=this.width-46,this.infoBg.x=23,this.contentContainer.addChild(this.infoBg),this.lblPeriod=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblPeriod),this.lblRemainTitle=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblRemainTitle),this.lblRemainTime=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblRemainTime),this.lblTotal=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblTotal),this.lblAmount=new iL("",fD.COLOR_BRIGHT_GREEN,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.contentContainer.addChild(this.lblAmount),this.btnGuide=new IB("UI_Ekkorr","UI_Alarm"),this.btnGuide.x=this.infoBg.x+this.infoBg.width-this.btnGuide.width-10,this.btnGuide.y=this.infoBg.y+10,this.contentContainer.addChild(this.btnGuide),this.btnGuide.on("pointertap",()=>{ + szt.getInstance().showGuide()} + ); + const t=this.width-46; + this.list=new P5(tzt,t,300),this.list.x=23,this.contentContainer.addChild(this.list),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + onAdded(){ + LM.getInstance().add(this.onEnter,this)} + onRemoved(){ + LM.getInstance().remove(this.onEnter,this)} + async update(){ + await GG.getEventList()} + show(){ + null==GG.currentPaymentMonthEvent?this.activeIndex=0:null==GG.currentPaymentSpecialEvent&&(this.activeIndex=1),this.switchTab(this.activeIndex),super.show()} + updateLayout(){ + this.title=xG.getText("GAME_945","결제 이벤트"); + const t=0==this.activeIndex?GG.currentPaymentSpecialEvent:GG.currentPaymentMonthEvent; + let i=[]; + if(t){ + const s=t.userAmount,e=t.endTime.replace("T"," ").replace(".000Z",""); + this.endTime=new Date(t.endTime).getTime(),this.endTime,tx.time,this.lblPeriod.text=xG.getText("GAME_545","이벤트 기간")+` : ~ ${ + e} + (UTC)`,this.lblRemainTitle.text=xG.getText("COMMON_29","남은 시간")+" : ",this.onEnterUpdate(),this.lblTotal.text=xG.getText("GAME_946","총 결제 금액")+" : ",this.lblAmount.text=GG.isUsdCurrency()?`$${ + EU.setComma(s)} + `:`₩${ + EU.setComma(s)} + `,this.lblAmount.textColor=fD.COLOR_BRIGHT_GREEN; + let n=0; + for(let h=0; + h<t.rewards.length; + h++){ + const e={ + index:h,userAmount:s,rewards:t.rewards[h],amount:GG.isUsdCurrency()?t.amounts[h].usdAmount:t.amounts[h].amount} + ; + i.push(e),s>=Number(e.amount)&&(n=h)} + this.list.dataProvider=i,t.rewards.length<4?this.list.scrollTo(0):this.list.scrollTo(n)} + this.lblPeriod.x=this.lblRemainTitle.x=this.lblTotal.x=50,this.lblRemainTime.x=this.lblRemainTitle.x+this.lblRemainTitle.width,this.lblAmount.x=this.lblTotal.x+this.lblTotal.width; + const s=null!=GG.currentPaymentMonthEvent&&null!=GG.currentPaymentSpecialEvent; + this.tabs.forEach(t=>t.visible=s); + const e=s?125:70; + this.infoBg.y=e,this.btnGuide.y=this.infoBg.y+10,this.lblPeriod.y=this.infoBg.y+20,this.lblRemainTitle.y=this.lblRemainTime.y=this.lblPeriod.y+this.lblPeriod.height+10,this.lblTotal.y=this.lblAmount.y=this.lblRemainTitle.y+this.lblRemainTitle.height+10,this.infoBg.height=this.lblTotal.y+this.lblTotal.height-this.infoBg.y+17; + const n=this.infoBg.y+this.infoBg.height+14; + this.list.y=n; + const h=Math.min(352,103*i.length); + this.list.setListHeight(h),this.height=this.list.y+this.list.height+30} + onEnter(){ + ++this.count>60&&(this.count=0,this.onEnterUpdate())} + onEnterUpdate(){ + const t=.001*(this.endTime-tx.time); + this.lblRemainTime.textColor=t<43200?fD.COLOR_RED:fD.DEFAULT_COLOR,this.lblRemainTime.text=t>0?`${ + EU.displayTimeAsTwoOfDDHHMMSS(t)} + `:xG.getText("GAME_949","이벤트 종료")} + switchTab(t){ + this.activeIndex=t; + for(let i=0; + i<this.tabs.length; + i++)this.tabs[i].selected=i===t; + this.updateLayout()} + layoutTabs(){ + let t=.5*(this.width-46-2); + for(const s of this.tabs)s.fitWithinWidth(t,50); + let i=23; + for(let s=0; + s<this.tabs.length; + s++){ + const e=this.tabs[s]; + i=23+(t+2)*s,e.x=i,e.y=65} + } + } + ; + Vt(ezt,"PaymentEventPopup"),Kt(ezt,"_instance"),Kt(ezt,"TAB_HEIGHT",60); + let nzt=ezt; + const hzt=class t extends XKt{ + constructor(){ + super(),Kt(this,"tabs",[]),Kt(this,"buttons",[]),Kt(this,"activeIndex",0),Kt(this,"onTabChange",null),Kt(this,"btnPaymentEvent",new IB("UI_Ekkorr","Package_2",.7)),Kt(this,"clickedEventInfo",[]),Kt(this,"cnt",0),this.btnPaymentEvent.onClick=this.onPaymentEventClick.bind(this),this.addChild(this.btnPaymentEvent),this.btnPaymentEvent.visible=!1,this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} + static getInstance(){ + return null==t.instance&&(t.instance=new t),t.instance} + async onAdded(){ + this.btnPaymentEvent.hideRedDot(); + const t=await $A.getPaymentEventInfo(); + if(t)for(this.clickedEventInfo=t.split("#").map(t=>""===t?[0]:t.split("|").map(Number)); + this.clickedEventInfo.length<2; + )this.clickedEventInfo.push([0]); + else this.clickedEventInfo=Array.from({ + length:2} + ,()=>[0]); + LM.getInstance().add(this.onFrame,this)} + onRemoved(){ + LM.getInstance().remove(this.onFrame,this)} + async onPaymentEventClick(){ + await nzt.getInstance().update(),nzt.getInstance().show(); + const t=[GG.currentPaymentSpecialEvent,GG.currentPaymentMonthEvent]; + this.clickedEventInfo=[]; + for(const i of t){ + if(!i){ + this.clickedEventInfo.push([]); + continue} + const t=[]; + t.push(i.id); + for(let s=0; + s<i.rewards.length; + s++){ + let e=i.amounts[s].amount; + GG.isUsdCurrency()&&(e=i.amounts[s].usdAmount),i.userAmount>=e?t.push(1):t.push(0)} + this.clickedEventInfo.push(t)} + $A.savePaymentEventInfo(this.clickedEventInfo.map(t=>t.join("|")).join("#"))} + onFrame(){ + this.cnt-- >0||(this.cnt=30,this.updatePaymentEvent())} + updatePaymentEvent(){ + if(this.buttons.length<2)return; + const t=this.buttons[1]; + if(this.buttons[1]&&(GG.isValidEvent(BG.PAYMENT_EVENT)?(this.btnPaymentEvent.visible=!0,GG.currentPaymentSpecialEvent?t.showEventTag(-3,2):t.hideEventTag()):(this.btnPaymentEvent.visible=!1,t.hideEventTag()),this.btnPaymentEvent.visible&&(GG.currentPaymentSpecialEvent||GG.currentPaymentMonthEvent))){ + const t=!!GG.currentPaymentSpecialEvent&&this.clickedEventInfo[0][0]<GG.currentPaymentSpecialEvent.id,i=!!GG.currentPaymentMonthEvent&&this.clickedEventInfo[1][0]<GG.currentPaymentMonthEvent.id; + t||this.checkNewReach(0)||i||this.checkNewReach(1)?this.btnPaymentEvent.showRedDot():this.btnPaymentEvent.hideRedDot()} + } + checkNewReach(t){ + const i=0==t?GG.currentPaymentSpecialEvent:GG.currentPaymentMonthEvent; + if(!i)return!1; + for(let s=0; + s<i.rewards.length; + s++){ + let e=i.amounts[s].amount; + if(GG.isUsdCurrency()&&(e=i.amounts[s].usdAmount),0==this.clickedEventInfo[t][s+1]&&i.userAmount>=e)return!0} + return!1} + setTabs(t){ + for(const i of this.buttons)this.removeChild(i); + this.buttons=[],this.tabs=t; + for(let i=0; + i<t.length; + i++){ + const s=t[i],e=new YKt(xG.getText(s.labelKey,s.defaultText)); + e.height=50,this.addChild(e),this.buttons[i]=e; + const n=i; + e.onClick=()=>this.setActiveTab(n)} + this.layoutTabs(),this.setActiveTab(0),this.updateLayout()} + layoutTabs(){ + if(this.buttons.reduce((t,i)=>t+i.width,0)+2*Math.max(0,this.buttons.length-1)<=628){ + let t=634; + for(let i=this.buttons.length-1; + i>=0; + i--){ + const s=this.buttons[i]; + s.height=50,t-=s.width+2,s.x=t,s.y=5} + } + else{ + const t=this.buttons.length,i=Math.floor((628-2*(t-1))/t),s=56; + let e=634; + for(let n=t-1; + n>=0; + n--){ + const t=this.buttons[n]; + t.setMultilineMode(i,s,15),e-=i+2,t.x=e,t.y=.5*(60-s)} + } + } + setActiveTab(t){ + this.activeIndex=t; + for(let i=0; + i<this.buttons.length; + i++)this.buttons[i].selected=i===t; + this.onTabChange&&this.onTabChange(t)} + updateLayout(){ + const t=this.buttons[0]; + this.btnPaymentEvent.x=this.lblTitle.x+this.lblTitle.width+10,this.btnPaymentEvent.y=t.y+.5*(t.height-this.btnPaymentEvent.height)} + updateLanguage(){ + this.setTitle(xG.getText("COMMON_356","상점")),this.setTabs(this.tabs)} + } + ; + Vt(hzt,"ShopSubMenu"),Kt(hzt,"instance"); + let rzt=hzt; + const ozt=class extends Ge{ + constructor(){ + super()} + get className(){ + return""} + updateLanguage(){ + } + } + ; + Vt(ozt,"BaseSubView"); + let azt=ozt; + const czt=class extends Yk{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"lblName",new iL("2배속 ",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_18)),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","Shop_Icon_07"))),Kt(this,"btnBuy",new JB("UI_GEM","100")),Kt(this,"btnAd",new JB("UI_MOVIE_SMALL",xG.getText("GAME_236","광고"))),Kt(this,"lblRemaining",new iL("",11184810,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblCooldown",new iL("",16737894,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"requesting",!1),this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30} + ),this.bg.x=5,this.bg.width=630,this.bg.height=80,this.addChild(this.bg),this.addChild(this.icon),this.lblName.x=135,this.lblName.y=.5*(this.bg.height-this.lblName.height),this.addChild(this.lblName),this.btnBuy.lbl.iconScale=.8,this.btnBuy.color=JB.BROWN,this.btnBuy.height=55,this.btnBuy.width=140,this.btnBuy.x=this.bg.width-this.btnBuy.width-6,this.btnBuy.y=.5*(this.bg.height-this.btnBuy.height),this.addChild(this.btnBuy),this.btnBuy.on("pointerdown",this.onBuy,this),this.btnAd.lbl.iconScale=.6,this.btnAd.color=eG.BROWN,this.btnAd.height=55,this.btnAd.width=140,this.btnAd.x=this.bg.width-this.btnAd.width-6,this.btnAd.y=.5*(this.bg.height-this.btnAd.height),this.addChild(this.btnAd),this.btnAd.onClick=this.onAdWatch.bind(this),this.lblRemaining.y=.5*(this.bg.height-this.lblRemaining.height),this.addChild(this.lblRemaining),this.lblCooldown.visible=!1,this.addChild(this.lblCooldown)} + async onBuy(t){ + if(1==this.data.kindNum){ + let t=await lD.getInstance().user.buySpeed15(); + if(0==t.success)return void yG.getInstance().showError(t); + TL.setUser(t.body),qF.getInstance().updateAll(),tB.getInstance().setSpeed(2)} + } + async onAdWatch(){ + var t; + try{ + const t=Ajt.getInstance().checkApproved(); + if(0==t.approved)return void yG.getInstance().show(t.errorMessage)} + catch(s){ + const t=xG.getText("AGE_RANGE_3","현재 사용 중인 기기 또는 OS 환경에서는 연령 정보를 확인할 수 없어, 일부 기능이 ‘안전 모드’로 제한됩니다."); + return void yG.getInstance().show(t)} + if(this.requesting)return; + if(!(null==(t=this.data)?void 0:t.isAd))return; + const i=this.data.adsType; + if(0!==cU.getInstance().getDailyRemaining(i)){ + if(cU.getInstance().isCooldownReady(i)){ + this.requesting=!0; + try{ + TL.canSkipAds?(NU.trackAd("ad_skip",String(i)),await this.onAdComplete()):(NU.trackAd("ad_try",String(i)),await YL(async()=>{ + NU.trackAd("ad_success",String(i)),await this.onAdComplete()} + ,i,()=>{ + NU.trackAd("ad_fail",String(i))} + ))} + finally{ + this.requesting=!1} + } + } + else yG.getInstance().show(xG.getText("GAME_244","오늘 최대 횟수를 초과했습니다."))} + async onAdComplete(){ + const t=this.data.adsType,i=await lD.getInstance().ads.watch(t,!0); + if(!1!==i.success){ + if(SVt.getInstance().markDirty(),i.body.user&&(TL.setUserData(i.body.user),qF.getInstance().updateAll()),i.body.ads&&cU.getInstance().setData(i.body.ads),i.body.dungeon&&Nx.getInstance().setData(i.body.dungeon),"speed"===i.body.rewardType&&tB.getInstance().setSpeed(2),5===t){ + const t=cU.getInstance().getDailyRemaining(5),i=cU.getInstance().isCooldownReady(5); + 0!==t&&i||loi.getInstance().removeAdsGoblins()} + this.updateRemaining()} + else yG.getInstance().showError(i)} + setData(t){ + this.data=t,t.isAd?(this.btnBuy.visible=!1,this.btnAd.visible=!0,this.lblName.text=t.name,this.icon.scale.set(1),this.icon.texture=QA.getTexture("UI_Ekkorr",t.icon),this.icon.y=.5*(this.bg.height-this.icon.height),this.updateRemaining()):(this.btnBuy.visible=!0,this.btnAd.visible=!1,this.lblRemaining.visible=!1,this.lblName.text=t.name,(1==t.kindNum||2==t.kindNum)&&(this.icon.texture=QA.getTexture("UI_Ekkorr",t.icon)),this.icon.y=.5*(this.bg.height-this.icon.height),this.btnBuy.text=t.gem.toString()),this.icon.x=60-.5*this.icon.width,this.lblRemaining.visible?fD.setLabelWrapWidth(this.lblName,this.lblRemaining.x-this.lblName.x-5):fD.setLabelWrapWidth(this.lblName,this.btnBuy.x-this.lblName.x-5),this.lblName.y=.5*(this.bg.height-this.lblName.height)} + updateRemaining(){ + var t; + (null==(t=this.data)?void 0:t.isAd)&&this.updateCooldown()} + updateCooldown(){ + var t; + if(!(null==(t=this.data)?void 0:t.isAd))return; + const i=this.data.adsType,s=cU.getInstance().getCooldownRemaining(i),e=cU.getInstance().getDailyRemaining(i),n=0===e,h=e>=0&&this.data.dailyMax,r=this.btnAd.x-8,o=.5*this.bg.height; + if(s>0&&!n){ + const t=Math.ceil(s/1e3),i=Math.floor(t/60),n=t%60,a=`${ + String(i).padStart(2,"0")} + :${ + String(n).padStart(2,"0")} + `; + this.lblCooldown.visible=!0,this.lblCooldown.text=a,this.btnAd.activated=!1,h?(this.lblRemaining.visible=!0,this.lblRemaining.text=`${ + e} + /${ + this.data.dailyMax} + `,this.lblCooldown.x=r-this.lblCooldown.width,this.lblCooldown.y=o-this.lblCooldown.height-1,this.lblRemaining.x=r-this.lblRemaining.width,this.lblRemaining.y=o+1):(this.lblRemaining.visible=!1,this.lblCooldown.x=r-this.lblCooldown.width,this.lblCooldown.y=o-.5*this.lblCooldown.height)} + else this.lblCooldown.visible=!1,this.btnAd.activated=!n,h?(this.lblRemaining.visible=!0,this.lblRemaining.text=`${ + e} + /${ + this.data.dailyMax} + `,this.lblRemaining.x=r-this.lblRemaining.width,this.lblRemaining.y=o-.5*this.lblRemaining.height):this.lblRemaining.visible=!1} + get height(){ + return this.bg.height+2} + } + ; + Vt(czt,"ShopItemRenderer"); + let lzt=czt; + const uzt=class{ + } + ; + Vt(uzt,"MenuState"),Kt(uzt,"currentIndex",0); + let dzt=uzt;
ViewMain 3 hunks, 355 statements
- super(),Kt(this,"sp"),Kt(this,"textures",[]),this.textures=QA.getTextures("ClickHand","ClickHand"),this.sp=new Wf(this.textures),this.addChild(this.sp),this.eventMode="none"} + super(),Kt(this,"_currentView",null),Kt(this,"container",new Ge),Kt(this,"bg"),Kt(this,"onLanguageChangeBind"),this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","UI_Toast_Bg"),leftWidth:8,topHeight:8,rightWidth:8,bottomHeight:8} + ),this.addChild(this.bg),this.bg.width=640,this.bg.height=VA.viewMainHeight,this.container.y=40,this.addChild(this.container),qF.getInstance().y=-1,this.addChild(qF.getInstance()),WKt.getInstance().y=-20,this.addChild(WKt.getInstance()),this.setLanguageChange(!0)}
- isPlaying(){ - return!!this.parent} - show(t,i,s,e,n=0,h=0){ - this.x=t,this.y=i,tzt.getInstance().setClickArea(t-.5*s+n,i-.5*e+h,s,e),this.isPlaying()||(this.sp.animationSpeed=.65,this.sp.play(),tzt.getInstance().addChild(this))} - hide(){ - tzt.getInstance().setBlockerEnabled(!1),this.sp.stop(),this.parent&&this.removeFromParent()} + setExpandedMode(i){ + i?(this.y=t.EXPANDED_Y,this.bg.height=VA.safeHeight-t.EXPANDED_Y-VA.BOTTOM_MENU_H):(this.y=VA.viewMainY,this.bg.height=VA.viewMainHeight)} + static getExpandedListHeight(){ + return VA.safeHeight-t.EXPANDED_Y-VA.BOTTOM_MENU_H-VA.SUB_MENU_H-VA.RESOURCE_INFO_H} + get currentView(){ + return this._currentView} + set currentView(t){ + null!=this._currentView&&this.container.removeChild(this._currentView),this._currentView=t,null!=this._currentView&&(this.container.addChild(this._currentView),this._currentView.x=0,this._currentView.y=0,KVt.showItemsInVertical([this._currentView],20,.3))} + setLanguageChange(t){ + cS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),cS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))} + onLanguageChange(t=null){ + this._currentView&&this._currentView.updateLanguage()}
- Vt(izt,"ClickAniEffect"),Kt(izt,"instance"); - let szt=izt; - const ezt=class{ - constructor(){ - Kt(this,"kindNum",0),Kt(this,"wave",0),Kt(this,"order",0),Kt(this,"position",1),Kt(this,"text",""),Kt(this,"code",""),Kt(this,"maxWave",-1),Kt(this,"repeat",9999)} - getTextKey(){ - return`DIALOGUE_TEXT_${ - this.kindNum} - `} - } - ; - Vt(ezt,"DialogueVO"); - let nzt=ezt; - const hzt=class t{ - constructor(){ - Kt(this,"list",[]),Kt(this,"waveMap",new Map),Kt(this,"playCount",{ - } - ),Kt(this,"playCountLoaded",!1)} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - setBookData(t){ - if(this.list=[],this.waveMap.clear(),t){ - for(let i=0; - i<t.length; - i++){ - const s=t[i],e=new nzt; - e.kindNum=Number(s.kindNum),e.wave=Number(s.wave),e.order=Number(s.order),e.position=Number(s.position)||1,e.text=s.text??"",e.code=s.code??"",e.maxWave=Number(s.maxWave)||-1,e.repeat=Number(s.repeat)||9999,this.list.push(e); - let n=this.waveMap.get(e.wave); - n||(n=[],this.waveMap.set(e.wave,n)),n.push(e)} - for(const t of this.waveMap.values())t.sort((t,i)=>t.order-i.order); - this.loadPlayCount()} - } - async loadPlayCount(){ - if(this.playCountLoaded)return; - const i=await $A.getData(t.LOCAL_KEY); - this.playCount=i??{ - } - ,this.playCountLoaded=!0} - savePlayCount(){ - $A.saveData(t.LOCAL_KEY,this.playCount)} - async getByWaveAsync(t){ - return await this.loadPlayCount(),this.getByWave(t)} - getByWave(t){ - const i=this.waveMap.get(t)??[],s=ML.maxWave,e=[]; - let n=!1; - for(const h of i)if(!(h.maxWave>0&&s<h.maxWave)){ - if(h.repeat<999){ - const t=this.playCount[h.kindNum]??0; - if(t>=h.repeat)continue; - this.playCount[h.kindNum]=t+1,n=!0} - e.push(h)} - return n&&this.savePlayCount(),e} - hasDialogue(t){ - return this.waveMap.has(t)} - } - ; - Vt(hzt,"DialogueDataManager"),Kt(hzt,"instance"),Kt(hzt,"LOCAL_KEY",$A.KEY_DIALOGUE_COUNT); - let rzt=hzt; - const ozt=class t extends Cjt{ - constructor(){ - super(),Kt(this,"image"),Kt(this,"timeContainer"),Kt(this,"timeBg"),Kt(this,"timeIcon"),Kt(this,"timeLbl"),Kt(this,"endTime",-1),Kt(this,"count",0),Kt(this,"onEnterUpdate",Vt(()=>{ - ++this.count<60||(this.count=0,this.refresh())} - ,"onEnterUpdate")),Kt(this,"onPaymentSuccessBind"),this.timeContainer=new Ge,this.addChild(this.timeContainer),this.timeBg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Progress_Bar_Bg_LightGreen"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13} - ),this.timeBg.alpha=.5,this.timeBg.width=160,this.timeContainer.addChild(this.timeBg),this.timeIcon=new He(QA.getTexture("UI_Ekkorr","Icon_Time02")),this.timeIcon.x=20,this.timeContainer.addChild(this.timeIcon); - const t=cD.DEFAULT_FONT_OPTION_18; - t.fill=cD.COLOR_WHITE,t.stroke={ - color:"#000000",width:3,join:"round"} - ,this.timeLbl=new JD("00:00:00",t.fill,t),this.timeLbl.x=this.timeIcon.x+this.timeIcon.width+10,this.timeLbl.y=.5*(this.timeBg.height-this.timeLbl.height),this.timeContainer.addChild(this.timeLbl)} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - async buyProduct2(t,i){ - const s=m5.getInstance().getByProductId(t); - if(s){ - if(this.endTime=i,this.refresh(),LM.getInstance().add(this.onEnterUpdate,this),!this.image){ - this.image=new He,this.addChildAt(this.image,0); - const{ - AssetPathManager:t} - =await Xt(async()=>{ - const{ - AssetPathManager:t} - =await Promise.resolve().then(()=>XA); - return{ - AssetPathManager:t} - } - ,void 0),{ - Assets:i} - =await Xt(async()=>{ - const{ - Assets:t} - =await Promise.resolve().then(()=>kM); - return{ - Assets:t} - } - ,void 0),s=t.getAssetPath("CharShopProduct.png"),e=await i.load(s); - this.image.texture=e,this.image.x=.5*(this.width-this.image.width),this.image.y=-this.image.height} - this.buyProduct(s,.5),this.setPaymentSuccess(!0)} - } - refresh(){ - if(tx.time<this.endTime){ - this.timeLbl.text=bU.displayTime(.001*(this.endTime-tx.time)); - const t=this.timeBg.width-2*this.timeIcon.x-this.timeIcon.width; - this.timeLbl.x=this.timeIcon.x+this.timeIcon.width+.5*(t-this.timeLbl.width)} - else this.hide()} - hide(){ - super.hide(),this.setPaymentSuccess(!1),LM.getInstance().remove(this.onEnterUpdate,this)} - updateLayout(){ - super.updateLayout(); - const t=this.activeCount>0?this.rewardPool[0].height:0; - let i=this.rewardContainer.y+t+30; - this.guideSecretary&&this.guideSecretary.visible&&(this.guideSecretary.x=.5*(this.width-this.guideSecretary.width),this.guideSecretary.y=this.lblDesc.y+this.lblDesc.height+20,i+=this.guideSecretary.height),this.timeContainer&&(this.timeContainer.x=.5*(this.width-this.timeContainer.width),this.timeContainer.y=i,i+=this.timeContainer.height+45),this.btnBuy.visible&&(this.btnBuy.y=i,this.btnRedGem.y=i,i+=this.btnBuy.height+40),this.inventoryContainer&&this.inventoryContainer.visible&&(this.inventoryContainer.x=.5*(this.width-this.inventoryContainer.width),this.inventoryContainer.y=i,i+=this.inventoryContainer.height+30),this.height=i} - setPaymentSuccess(t){ - cS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),cS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))} - onPaymentSuccess(t){ - var i; - let s=-1; - t&&t.detail&&"productId"in t.detail&&(s=t.detail.productId),s===(null==(i=this.data)?void 0:i.productId)&&this.hide()} - } - ; - Vt(ozt,"ShopProductPopupWithTimer"),Kt(ozt,"_instance"); - let azt=ozt; - const czt=class t extends Ge{ - constructor(){ - super(),Kt(this,"items",[]),Kt(this,"itemPool",[]),Kt(this,"onPaymentSuccessBind")} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - add(t,i){ - if(-1!==this.items.findIndex(i=>i.productId===t))return; - let s; - this.itemPool.length>0?(s=this.itemPool.pop(),s.reset()):s=new dzt("Shop_Shortcut_01"),s.setData(t,i),s.onEndTime=()=>{ - this.onItemEndTime()} - ,s.onClick=(t,i)=>{ - azt.getInstance().buyProduct2(t,i)} - ,this.addChild(s),this.items.push(s),this.items.length>0&&this.setPaymentSuccess(!0),this.alignItems()} - alignItems(){ - let t=0; - const i=this.items.length; - for(let s=0; - s<i; - ++s)this.items[s].y=t,t+=this.items[s].height+5} - onItemEndTime(){ - this.update(-1),this.alignItems()} - setPaymentSuccess(t){ - cS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),cS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))} - onPaymentSuccess(t){ - let i=-1; - t&&t.detail&&"productId"in t.detail&&(i=t.detail.productId),-1!==i&&this.update(i)} - update(t){ - const i=this.items.findIndex(i=>i.productId===t); - if(-1===i)return; - const s=this.items[i]; - s.reset(),s.removeFromParent(),this.items.splice(i,1),this.itemPool.push(s),0==this.items.length&&this.setPaymentSuccess(!1)} - } - ; - Vt(czt,"ShopProductGroup"),Kt(czt,"instance"); - let lzt=czt; - const uzt=class extends AB{ - constructor(t,i=1){ - super("UI_Ekkorr",t,i),Kt(this,"container"),Kt(this,"timeBg"),Kt(this,"timeLbl"),Kt(this,"_productId",-1),Kt(this,"_endTime",-1),Kt(this,"count",0),Kt(this,"onEnterUpdate",Vt(()=>{ - ++this.count<60||(this.count=0,this.update())} - ,"onEnterUpdate")),Kt(this,"onEndTime",null),this.container=new Ge,this.addChild(this.container),this.container.x=this.bg.x,this.container.y=this.bg.y,this.bg.x=0,this.bg.y=0,this.container.addChild(this.bg),this.timeBg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Progress_Bar_Bg"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13} - ),this.timeBg.alpha=.7,this.timeBg.width=70,this.timeBg.x=this.bg.x-.5*this.timeBg.width,this.timeBg.y=this.bg.y+.5*this.bg.height-.75*this.timeBg.height,this.container.addChild(this.timeBg); - const s=cD.DEFAULT_FONT_OPTION_15; - s.fill=cD.COLOR_WHITE,s.stroke={ - color:"#000000",width:3,join:"round"} - ,this.timeLbl=new JD("00:00:00",s.fill,s),this.timeLbl.x=this.timeBg.x+.5*(this.timeBg.width-this.timeLbl.width),this.timeLbl.y=this.timeBg.y+.5*(this.timeBg.height-this.timeLbl.height)-1,this.container.addChild(this.timeLbl)} - get productId(){ - return this._productId} - get endTime(){ - return this._endTime} - setData(t,i){ - this._productId=t,this._endTime=i,this.update(),LM.getInstance().add(this.onEnterUpdate,this)} - update(){ - if(tx.time<this._endTime)this.timeLbl.text=bU.displayTime(.001*(this._endTime-tx.time)),this.timeLbl.x=this.timeBg.x+.5*(this.timeBg.width-this.timeLbl.width); - else{ - const t=this.onEndTime; - this.reset(),t&&t()} - } - reset(){ - this._endTime=-1,this._productId=-1,this.onEndTime=null,LM.getInstance().remove(this.onEnterUpdate,this)} - onDown(){ - this.container.scale.set(.9*this.iconScale)} - onUp(){ - this.container.scale.set(1*this.iconScale),zL.getInstance().playSFX(zL.SFX_NORMAL_CLICK),$L(),this.onClick&&this.onClick(this._productId,this._endTime)} - } - ; - Vt(uzt,"ShopProductItem"); - let dzt=uzt; - var fzt=(t=>(t.ACCOUNT_CREATE="ACCOUNT_CREATE",t))(fzt||{ - } - ); - const pzt=class t{ - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - doAccountCreate(){ - const t=m5.getInstance(),i=t.getTargetingByType(fzt.ACCOUNT_CREATE); - if(!i)return; - const s=t.getByProductId(i[0]); - if(!s||!s.active)return; - let e=new Date(ML.regTime); - const n=AL.getInstance().getClientData("PRODUCT_START_TIME_29"); - if(n){ - let t=new Date(n); - e.getTime()<t.getTime()&&(e=t)} - const h=s.targeting.durationMinutes??0; - let r=e.getTime()+60*h*1e3; - r<tx.time||t.isAvailableForPurchase(s)&&lzt.getInstance().add(s.productId,r)} - } - ; - Vt(pzt,"ShopProductTrigger"),Kt(pzt,"_instance"); - let gzt=pzt; - const mzt=class extends oS{ - constructor(){ - super()} - } - ; - Vt(mzt,"DialogueLayer"); - let wzt=mzt; - const vzt=Object.freeze(Object.defineProperty({ - __proto__:null,DialogueLayer:wzt} - ,Symbol.toStringTag,{ - value:"Module"} - )),bzt=class t extends Ge{ - constructor(){ - super(),Kt(this,"frameLeft"),Kt(this,"frameRight"),Kt(this,"npcIcon"),Kt(this,"lblName"),Kt(this,"lblMessage"),Kt(this,"bg"),Kt(this,"timeCount",0),Kt(this,"isFadingOut",!1),Kt(this,"currentPosition",1),Kt(this,"queue",[]),Kt(this,"textureLoaded",!1),Kt(this,"onCompleteHandler",null),this.eventMode="none",this.bg=new ZD,this.bg.alpha=.6,this.bg.setIndex(7),this.addChild(this.bg),this.frameLeft=new He,this.addChild(this.frameLeft),this.npcIcon=new He,this.addChild(this.npcIcon),this.lblName=new JD("",16768324,cD.DEFAULT_OUTLINE_FONT_OPTION_17),this.addChild(this.lblName),this.lblMessage=new JD("",cD.COLOR_WHITE,cD.DEFAULT_FONT_OPTION_16),this.addChild(this.lblMessage),this.frameRight=new He,this.addChild(this.frameRight)} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - static getNpcName(i){ - if(i.length>=2){ - const s=i.substring(0,2); - if(t.NPC_NAMES[s])return CG.getText(`DIALOGUE_NPC_${ - s} - `,t.NPC_NAMES[s])} - const s=i.substring(0,1); - return CG.getText(`DIALOGUE_NPC_${ - s} - `,t.NPC_NAMES[s])??""} - async showDialogues(i){ - if(0!==i.length&&zD.getInstance().npcDialogue){ - if(await this.waitForPopupsClosed(),!this.textureLoaded){ - const i="ktx2"; - await QA.generateTexture(t.SHEET,i,!1),this.textureLoaded=!0} - this.queue.push(...i),this.timeCount<=0&&this.playNext()} - } - waitForPopupsClosed(){ - return new Promise(t=>{ - if(!xL.getInstance().hasPopup)return void t(); - const i=Vt(()=>{ - xL.getInstance().hasPopup||(LM.getInstance().remove(i,this),t())} - ,"check"); - LM.getInstance().add(i,this)} - )} - async show(i,s,e=360,n=1){ - if(!this.textureLoaded){ - const i="ktx2"; - await QA.generateTexture(t.SHEET,i,!1),this.textureLoaded=!0} - this.showCurrent(i,s,e,n)} - playNext(){ - if(0===this.queue.length)return; - const i=this.queue.shift(),s=CG.getText(i.getTextKey(),i.text); - this.showCurrent(i.code,s,t.DURATION_PER_DIALOGUE,i.position)} - showCurrent(i,s,e,n=1){ - const h=t.SHEET; - this.currentPosition=n,this.frameLeft.visible=!1,this.frameRight.visible=!1,this.npcIcon.texture=QA.getTexture(h,i); - const r=125/this.npcIcon.texture.height; - this.npcIcon.scale.set(r),this.lblName.text=t.getNpcName(i),cD.setLabelWrapWidth(this.lblMessage,480),this.lblMessage.text=s,this.relayout(),this.alpha=0,this.timeCount=e,this.isFadingOut=!1,LM.getInstance().remove(this.onFrame,this),LM.getInstance().add(this.onFrame,this),wzt.getInstance().addChild(this)} - relayout(){ - const i=t.PAD,s=2===this.currentPosition,e=520,n=this.lblMessage.height+2*i+16,h=this.npcIcon.scale.x,r=this.npcIcon.texture.width*h,o=this.npcIcon.texture.height*h; - this.bg.width=e,this.bg.height=n,this.bg.x=0,this.bg.y=0; - const a=-o; - s?(this.npcIcon.scale.x=-Math.abs(h),this.npcIcon.x=e-i,this.npcIcon.y=a,this.lblName.x=this.npcIcon.x-r-this.lblName.width+6,this.lblName.y=-this.lblName.height-4,this.lblMessage.x=.5*(e-this.lblMessage.width),this.lblMessage.y=.5*(n-this.lblMessage.height)):(this.npcIcon.scale.x=Math.abs(h),this.npcIcon.x=i,this.npcIcon.y=a,this.lblName.x=this.npcIcon.x+r-6,this.lblName.y=-this.lblName.height-4,this.lblMessage.x=.5*(e-this.lblMessage.width),this.lblMessage.y=.5*(n-this.lblMessage.height)),this.x=.5*(VA.stageWidth-e),this.y=460} - onFrame(){ - xL.getInstance().hasPopup?this.visible=!1:(this.visible=!0,this.alpha<1&&!this.isFadingOut&&(this.alpha+=1/t.FADE_IN_FRAMES,this.alpha>1&&(this.alpha=1)),this.timeCount<=t.FADE_OUT_FRAMES&&!this.isFadingOut&&(this.isFadingOut=!0),this.isFadingOut&&(this.alpha-=1/t.FADE_OUT_FRAMES,this.alpha<0&&(this.alpha=0)),this.timeCount--,this.timeCount<=0&&(LM.getInstance().remove(this.onFrame,this),this.queue.length>0?this.playNext():(this.parent&&this.parent.removeChild(this),this.onCompleteHandler&&(this.onCompleteHandler(),this.onCompleteHandler=null))))} - } - ; - Vt(bzt,"NpcDialogueToast"),Kt(bzt,"instance"),Kt(bzt,"SHEET","Dialogue"),Kt(bzt,"PAD",8),Kt(bzt,"NPC_NAMES",{ - S:"정령",L:"성주",CH:"오크 부족장",SC:"오크 정찰병",CP:"휴먼 기사단장",LI:"리치 사령관",EC:"엘프 지휘관"} - ),Kt(bzt,"DURATION_PER_DIALOGUE",300),Kt(bzt,"FADE_IN_FRAMES",10),Kt(bzt,"FADE_OUT_FRAMES",30); - let _zt=bzt; - const yzt=class t extends RB{ - constructor(){ - super(),Kt(this,"lblGuide"),this.lblGuide=new JD("",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_16),cD.setLabelWrapWidth(this.lblGuide,this.width-60),this.contentContainer.addChild(this.lblGuide),this.outSideClickHide=!0} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - async showGuide(){ - this.title=CG.getText("GAME_384","영웅 영입 안내"); - const t=[`1. ${ - CG.getText("GAME_385","일반, 진화, 초월 영웅들을 모두 가지고 있을 경우에는, 배치하기 전에 영웅을 먼저 선택해주세요.")} - `,`2. ${ - CG.getText("GAME_386","영웅 아이콘을 오랫동안 꾹 누르고 있으면, 영웅 상세 팝업이 표시됩니다.")} - `]; - this.lblGuide.text=t.join("\n"),this.lblGuide.x=30,this.lblGuide.y=80,this.height=this.lblGuide.y+this.lblGuide.height+40,await this.loadImage(),super.show()} - getDefaultPositionY(){ - return.4*VA.stageHeight} - onBackButton(){ - return this.hide(),!0} - } - ; - Vt(yzt,"HeroHireGuidePopup"),Kt(yzt,"_instance"); - let Mzt=yzt; - const Ezt=class extends Ge{ - constructor(){ - super(),Kt(this,"bg",new ZD),Kt(this,"closeBtn",new He(QA.getTexture("UI_Ekkorr","UI_Close3"))),Kt(this,"lblTitle",new JD("Title",16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_20)),this.bg.setIndex(6),this.bg.width=640,this.bg.height=60,this.bg.y=-1,this.addChild(this.bg),this.closeBtn.width=50,this.closeBtn.height=50,this.closeBtn.visible=!1,this.closeBtn.x=this.bg.width-this.closeBtn.width-5,this.closeBtn.y=.5*(this.bg.height-this.closeBtn.height),this.addChild(this.closeBtn),this.lblTitle.x=10,this.lblTitle.y=10,this.addChild(this.lblTitle)} - setTitle(t){ - this.lblTitle.text=t} - get height(){ - return this.bg.height} - updateLanguage(){ - } - } - ; - Vt(Ezt,"BaseSubMenu"); - let Azt=Ezt; - const Szt=class extends Ge{ - constructor(t){ - super(),Kt(this,"bg"),Kt(this,"icon"),Kt(this,"cover"),Kt(this,"container"),Kt(this,"_tribe",0),Kt(this,"_selected",!0),Kt(this,"onClick"),this._tribe=t,this.container=new Ge,this.addChild(this.container),this.bg=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_01")),this.container.addChild(this.bg),this.icon=new He(QA.getTexture("UI_Ekkorr",`TRIBE_${ - this._tribe} - _Icon`)),this.container.addChild(this.icon),this.cover=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_01_nor")),this.cover.visible=!1,this.container.addChild(this.cover),this.eventMode="dynamic",this.on("pointerdown",this.onDown,this),this.on("pointerup",this.onUp,this),this.on("pointerupoutside",this.onUp,this),this.on("pointertap",this.onTap,this),this.container.pivot.set(.5*this.bg.width,.5*this.bg.height)} - get tribe(){ - return this._tribe} - set tribe(t){ - t!=this._tribe&&(this._tribe=t,this.icon.texture=QA.getTexture("UI_Ekkorr",`TRIBE_${ - this._tribe} - _Icon`))} - get selected(){ - return this._selected} - set selected(t){ - t!=this._selected&&(this._selected=t,this._selected?this.cover.visible=!1:this.cover.visible=!0)} - reset(){ - this._selected=!0,this.cover.visible=!1} - onDown(t){ - this.container.scale=.9} - onUp(t){ - this.container.scale=1} - onTap(t){ - zL.getInstance().playSFX(zL.SFX_NORMAL_CLICK),this.selected=!this._selected,this.onClick&&this.onClick(this._tribe,this._selected)} - } - ; - Vt(Szt,"HeroTribeFilterIcon"); + Vt($Kt,"ViewMain"),Kt($Kt,"instance"),Kt($Kt,"EXPANDED_Y",320);
HeroHireGuidePopup 3 hunks, 333 statements
- super(),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","Base_Check01"))),this.icon.x=0,this.icon.y=0,this.addChild(this.icon)} + super(),Kt(this,"lblGuide"),this.lblGuide=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16),fD.setLabelWrapWidth(this.lblGuide,this.width-60),this.contentContainer.addChild(this.lblGuide),this.outSideClickHide=!0}
+ async showGuide(){ + this.title=xG.getText("GAME_384","영웅 영입 안내"); + const t=[`1. ${ + xG.getText("GAME_385","일반, 진화, 초월 영웅들을 모두 가지고 있을 경우에는, 배치하기 전에 영웅을 먼저 선택해주세요.")} + `,`2. ${ + xG.getText("GAME_386","영웅 아이콘을 오랫동안 꾹 누르고 있으면, 영웅 상세 팝업이 표시됩니다.")} + `]; + this.lblGuide.text=t.join("\n"),this.lblGuide.x=30,this.lblGuide.y=80,this.height=this.lblGuide.y+this.lblGuide.height+40,await this.loadImage(),super.show()} + getDefaultPositionY(){ + return.4*VA.stageHeight} + onBackButton(){ + return this.hide(),!0}
- Vt(dqt,"HeroCheckIcon"),Kt(dqt,"_instance"); + Vt(jYt,"HeroHireGuidePopup"),Kt(jYt,"_instance"); + let VYt=jYt; + const KYt=class extends Ge{ + constructor(t){ + super(),Kt(this,"bg"),Kt(this,"icon"),Kt(this,"cover"),Kt(this,"container"),Kt(this,"_tribe",0),Kt(this,"_selected",!0),Kt(this,"onClick"),this._tribe=t,this.container=new Ge,this.addChild(this.container),this.bg=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_01")),this.container.addChild(this.bg),this.icon=new He(QA.getTexture("UI_Ekkorr",`TRIBE_${ + this._tribe} + _Icon`)),this.container.addChild(this.icon),this.cover=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_01_nor")),this.cover.visible=!1,this.container.addChild(this.cover),this.eventMode="dynamic",this.on("pointerdown",this.onDown,this),this.on("pointerup",this.onUp,this),this.on("pointerupoutside",this.onUp,this),this.on("pointertap",this.onTap,this),this.container.pivot.set(.5*this.bg.width,.5*this.bg.height)} + get tribe(){ + return this._tribe} + set tribe(t){ + t!=this._tribe&&(this._tribe=t,this.icon.texture=QA.getTexture("UI_Ekkorr",`TRIBE_${ + this._tribe} + _Icon`))} + get selected(){ + return this._selected} + set selected(t){ + t!=this._selected&&(this._selected=t,this._selected?this.cover.visible=!1:this.cover.visible=!0)} + reset(){ + this._selected=!0,this.cover.visible=!1} + onDown(t){ + this.container.scale=.9} + onUp(t){ + this.container.scale=1} + onTap(t){ + JL.getInstance().playSFX(JL.SFX_NORMAL_CLICK),this.selected=!this._selected,this.onClick&&this.onClick(this._tribe,this._selected)} + } + ; + Vt(KYt,"HeroTribeFilterIcon"); + let zYt=KYt; + const YYt=class t extends Yk{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"lblName",new iL("늑대전사 ",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_16)),Kt(this,"lblKnightBuff",new iL("",4495871,fD.WHITE_OUTLINE_FONT_OPTION_16)),Kt(this,"lblPlusLv",new iL("",4513092,fD.WHITE_OUTLINE_FONT_OPTION_16)),Kt(this,"lblHp",new qB("UI_HEART","100",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblAtk",new qB("UI_MAGIC_WAND","20",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblDef",new qB("UI_PHY_DEFENSE","20",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblBlock",new qB("ICON_UNIT","0",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"btnUpgrade",new DU("UI_GOLD","10000","+1")),Kt(this,"btn10",new DU("UI_GOLD","100","+10")),Kt(this,"btn100",new DU("UI_GOLD","1000","+100")),Kt(this,"btn1000",new DU("UI_GOLD","10000","+1000")),Kt(this,"starIcon",new He(QA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[0])),Kt(this,"icon",new w5),Kt(this,"heroContainer",new Ge),Kt(this,"multiLevelContainer",new Ge),Kt(this,"isMultiLevel",!1),Kt(this,"rapidClickCount",0),Kt(this,"lastRapidClickTime",0),Kt(this,"cost1",-1),Kt(this,"cost10",-1),Kt(this,"cost100",-1),Kt(this,"cost1000",-1),this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30} + ),this.bg.width=630,this.bg.height=80,this.addChild(this.bg),this.addChild(this.heroContainer),this.addChild(this.multiLevelContainer),this.icon.x=-1,this.icon.y=.5*(this.bg.height-this.icon.height),this.heroContainer.addChild(this.icon),this.lblName.x=135,this.lblName.y=10,this.heroContainer.addChild(this.lblName),this.starIcon.x=this.lblName.x+this.lblName.width+5,this.starIcon.y=this.lblName.y+.5*(this.lblName.height-this.starIcon.height),this.heroContainer.addChild(this.starIcon),this.lblKnightBuff.visible=!1,this.heroContainer.addChild(this.lblKnightBuff),this.lblPlusLv.visible=!1,this.heroContainer.addChild(this.lblPlusLv),this.lblHp.x=this.lblName.x,this.lblHp.y=this.lblName.y+this.lblName.height+10,this.heroContainer.addChild(this.lblHp),this.lblAtk.x=this.lblHp.x+100,this.lblAtk.y=this.lblHp.y,this.heroContainer.addChild(this.lblAtk),this.lblDef.x=this.lblAtk.x+100,this.lblDef.y=this.lblHp.y,this.heroContainer.addChild(this.lblDef),this.lblBlock.iconScale=1.05,this.lblBlock.x=this.lblDef.x+95,this.lblBlock.y=this.lblHp.y,this.heroContainer.addChild(this.lblBlock),this.btnUpgrade.labelOrder=DU.TEXT_FIRST,this.btnUpgrade.textLabel.textSize=15,this.btnUpgrade.textAlign="left",this.btnUpgrade.iconScale=.7,this.btnUpgrade.color=DU.BROWN,this.btnUpgrade.height=60,this.btnUpgrade.width=110,this.btnUpgrade.x=this.bg.width-this.btnUpgrade.width-10,this.btnUpgrade.y=.5*(this.bg.height-this.btnUpgrade.height)-2,this.heroContainer.addChild(this.btnUpgrade),this.btnUpgrade.on("pointertap",t=>this.onUpgrade(t,1),this),this.btn10.labelOrder=DU.TEXT_FIRST,this.btn10.textLabel.textSize=15,this.btn10.textAlign="left",this.btn10.iconScale=.7,this.btn10.color=DU.BROWN,this.btn10.height=60,this.btn10.width=115,this.btn10.x=this.btnUpgrade.x-this.btn10.width-5,this.btn10.y=.5*(this.bg.height-this.btn10.height)-2,this.btn10.on("pointertap",()=>{ + const i=this.getNextIncrement(this.data.level,10); + this.onUpgrade(null,i),t.autoCloseCounter=0} + ,this),this.multiLevelContainer.addChild(this.btn10),this.btn100.labelOrder=DU.TEXT_FIRST,this.btn100.textLabel.textSize=15,this.btn100.textAlign="left",this.btn100.iconScale=.7,this.btn100.color=DU.BROWN,this.btn100.height=60,this.btn100.width=115,this.btn100.x=this.btn10.x-this.btn100.width-5,this.btn100.y=.5*(this.bg.height-this.btn100.height)-2,this.btn100.on("pointertap",()=>{ + const i=this.getNextIncrement(this.data.level,100); + this.onUpgrade(null,i),t.autoCloseCounter=0} + ,this),this.multiLevelContainer.addChild(this.btn100),this.btn1000.labelOrder=DU.TEXT_FIRST,this.btn1000.textLabel.textSize=15,this.btn1000.textAlign="left",this.btn1000.iconScale=.7,this.btn1000.color=DU.BROWN,this.btn1000.height=60,this.btn1000.width=115,this.btn1000.x=this.btn100.x-this.btn1000.width-5,this.btn1000.y=.5*(this.bg.height-this.btn1000.height)-2,this.btn1000.on("pointertap",()=>{ + const i=this.getNextIncrement(this.data.level,1e3); + this.onUpgrade(null,i),t.autoCloseCounter=0} + ,this),this.multiLevelContainer.visible=!1} + get vo(){ + return this.data} + onMultiLevel(){ + Mqt.getInstance().isMultiLevel=!Mqt.getInstance().isMultiLevel,Mqt.getInstance().setMultiLevel(Mqt.getInstance().isMultiLevel)} + getNextIncrement(t,i){ + const s=t%i; + return 0===s?i:i-s} + onUpgrade(i,s=1){ + if(!this.data||this.data.id<=0||this.data.kindNum<=0)return; + if(1===s){ + const t=Date.now(); + t-this.lastRapidClickTime<500?this.rapidClickCount++:this.rapidClickCount=1,this.lastRapidClickTime=t,this.rapidClickCount>=3&&!this.multiLevelContainer.visible&&(this.rapidClickCount=0,this.onMultiLevel())} + const e=this.data.level,n=this.data,h=p5.getInstance().getMaxLevel(n.grade,n.trans); + if(e>=h)return void LF.getInstance().showMessage(xG.getText("COMMON_369","최대 레벨입니다.")); + const r=Math.min(e+s,h),o=p5.getInstance().getTotalGold(e,r),a=VR.getInstance().getGameplayMultiplier(kR.UnitUpgradeGold),c=Math.floor(o/a); + if(TL.gold<c)return void LF.getInstance().showMessage(xG.getText("COMMON_359","골드가 부족합니다.")); + TL.gold-=c,qF.getInstance().updateGold(); + const l=this.data; + l.level=r,uR.some(t=>e<t&&r>=t)&&VR.getInstance().recalculate(),this.setData(l),loi.getInstance().udpateHero(l); + const u=this.data.id; + t.heroTargetLevels.set(u,this.data.level),t.markDirtyAndSchedule(),bzt.get().play(this,8,.5*(this.bg.height-104)),Bzt.getInstance().onConditionChanged()} + static registerTargetLevel(i,s){ + t.heroTargetLevels.set(i,s)} + static markDirtyAndSchedule(){ + t.isDirty=!0,-1===t.numReviveSnapshot&&(t.numReviveSnapshot=TL.numRevive),null!==t.updateTimer&&clearTimeout(t.updateTimer),t.updateTimer=setTimeout(()=>{ + t.sendToServer(),t.updateTimer=null,t.isDirty=!1,Mqt.getInstance().isMultiLevel=!1,Mqt.getInstance().setMultiLevel(!1)} + ,t.DEBOUNCE_DELAY)} + static async sendToServer(){ + if(0===t.heroTargetLevels.size)return void(t.numReviveSnapshot=-1); + if(-1!==t.numReviveSnapshot&&t.numReviveSnapshot!==TL.numRevive)return t.heroTargetLevels.clear(),void(t.numReviveSnapshot=-1); + t.numReviveSnapshot=-1; + const i=new Map(t.heroTargetLevels); + t.heroTargetLevels.clear(); + const s=[],e=[]; + i.forEach((t,i)=>{ + s.push(i),e.push(t)} + ); + const n=s.join("|"),h=e.join("|"); + let r=await lD.getInstance().hero.levelUp(n,h,TL.gold); + if(!1===r.success){ + const t=await lD.getInstance().hero.getHeroInfo(); + return t.success&&(TL.setUserInfo(t.body),qF.getInstance().updateAll(),Mqt.getInstance().setData()),void yG.getInstance().showError(r)} + TL.setUserInfo(r.body),qF.getInstance().updateGold(),Mqt.getInstance().isMultiLevel=!1,Mqt.getInstance().setMultiLevel(!1)} + static cleanup(){ + null!==t.updateTimer&&(clearTimeout(t.updateTimer),t.updateTimer=null),t.isDirty&&(t.sendToServer(),t.isDirty=!1)} + static async cleanupAsync(){ + null!==t.updateTimer&&(clearTimeout(t.updateTimer),t.updateTimer=null),t.isDirty&&(t.isDirty=!1,await t.sendToServer())} + static cancel(){ + null!==t.updateTimer&&(clearTimeout(t.updateTimer),t.updateTimer=null),t.heroTargetLevels.clear(),t.isDirty=!1,t.numReviveSnapshot=-1} + recalculateCosts(t){ + if(!this.data||this.data.id<0||this.data.level<=0)return void(this.cost1=this.cost10=this.cost100=this.cost1000=-1); + const i=this.data,s=p5.getInstance(),e=s.getMaxLevel(i.grade,i.trans)-i.level; + if(e<=0)return void(this.cost1=this.cost10=this.cost100=this.cost1000=-1); + this.cost1=Math.floor(s.getTotalGold(i.level,i.level+1)/t); + const n=Math.min(this.getNextIncrement(i.level,10),e); + this.cost10=n>0?Math.floor(s.getTotalGold(i.level,i.level+n)/t):-1; + const h=Math.min(this.getNextIncrement(i.level,100),e); + this.cost100=h>0?Math.floor(s.getTotalGold(i.level,i.level+h)/t):-1; + const r=Math.min(this.getNextIncrement(i.level,1e3),e); + this.cost1000=r>0?Math.floor(s.getTotalGold(i.level,i.level+r)/t):-1} + refreshActivation(t){ + const i=this.cost1>=0&&t>=this.cost1; + if(this.btnUpgrade.activated!==i&&(this.btnUpgrade.activated=i),!this.multiLevelContainer.visible)return; + const s=this.cost10>=0&&t>=this.cost10; + this.btn10.activated!==s&&(this.btn10.activated=s); + const e=this.cost100>=0&&t>=this.cost100; + this.btn100.activated!==e&&(this.btn100.activated=e); + const n=this.cost1000>=0&&t>=this.cost1000; + this.btn1000.activated!==n&&(this.btn1000.activated=n)} + static checkAutoClose(i){ + const s=Date.now(); + s-t.lastCounterUpdateTime>=900&&(t.lastCounterUpdateTime=s,t.autoCloseCounter++,t.autoCloseCounter>=t.AUTO_CLOSE_SECONDS&&(t.autoCloseCounter=0,i.isMultiLevel=!1,i.setMultiLevel(!1)))} + showMultiLevel(){ + null==this.data||this.data.id<0||(this.multiLevelContainer.visible=!0,t.autoCloseCounter=0,t.lastCounterUpdateTime=Date.now(),this.refreshActivation(TL.gold))} + hideMultiLevel(){ + this.multiLevelContainer.visible=!1,t.autoCloseCounter=0,t.lastCounterUpdateTime=0} + setData(t){ + this.data=t; + let i=t; + const s=i.getBookVo(); + if(!s)return void(this.visible=!1); + this.visible=!0; + const e=xG.getText(s.getNameKey(),i.name),n=p5.getInstance().getMaxLevel(i.grade,i.trans),h=i.level>=n?" (max)":""; + null!=this.index?this.lblName.text=this.index+1+". "+e+h:this.lblName.text=e+h,this.lblHp.text=`${ + qD.displayLargeNumberAsAlphabet(i.buffedMaxHp)} + `,this.lblAtk.text=`${ + qD.displayLargeNumberAsAlphabet(i.buffedAtkDmg)} + `,this.lblDef.text=`${ + qD.displayLargeNumberAsAlphabet(i.buffedPhyDef)} + `,this.lblBlock.text=`${ + i.numBlock} + `,this.starIcon.x=this.lblName.x+this.lblName.width+5,this.starIcon.texture=QA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[i.grade-1]; + let r=this.starIcon.x+50; + const o=TL.getKnightLevel(i.tribe); + o>0?(this.lblKnightBuff.text=`(+${ + o} + )`,this.lblKnightBuff.textColor=4495871,this.lblKnightBuff.x=r,this.lblKnightBuff.y=this.lblName.y,this.lblKnightBuff.visible=!0,r+=this.lblKnightBuff.width+2):this.lblKnightBuff.visible=!1; + const a=VR.getInstance().getGameplayTotal(kR.PlusLv); + a>0?(this.lblPlusLv.text=`(+${ + a} + )`,this.lblPlusLv.textColor=4513092,this.lblPlusLv.x=r,this.lblPlusLv.y=this.lblName.y,this.lblPlusLv.visible=!0):this.lblPlusLv.visible=!1,i.dmgType==ex.MAGICAL?this.lblAtk.texture=QA.getTexture("UI_Ekkorr","ICON_ATTACK2"):this.lblAtk.texture=QA.getTexture("UI_Ekkorr","UI_SWORD"),i.phyDef>i.magDef?this.lblDef.texture=QA.getTexture("UI_Ekkorr","UI_PHY_DEFENSE"):this.lblDef.texture=QA.getTexture("UI_Ekkorr","UI_MAGIC_DEFENSE"),this.icon.setData(i); + const c=VR.getInstance().getGameplayMultiplier(kR.UnitUpgradeGold); + this.recalculateCosts(c); + const l=i.level>=n; + if(this.btnUpgrade.text=l?"max":"+1",this.btnUpgrade.iconText=l?"":qD.displayLargeNumberAsAlphabet(this.cost1),this.btnUpgrade.iconLabel.texture=QA.getTexture("UI_Ekkorr",l?"UI_GRAY_GOLD":"UI_GOLD"),t.level>0){ + const i=n-t.level,s=Math.min(this.getNextIncrement(t.level,10),i); + this.btn10.text=s>0?`+${ + s} + `:"max",this.btn10.iconText=s>0?qD.displayLargeNumberAsAlphabet(this.cost10):"",this.btn10.iconLabel.texture=QA.getTexture("UI_Ekkorr",s>0?"UI_GOLD":"UI_GRAY_GOLD"); + const e=Math.min(this.getNextIncrement(t.level,100),i); + this.btn100.text=e>0?`+${ + e} + `:"max",this.btn100.iconText=e>0?qD.displayLargeNumberAsAlphabet(this.cost100):"",this.btn100.iconLabel.texture=QA.getTexture("UI_Ekkorr",e>0?"UI_GOLD":"UI_GRAY_GOLD"); + const h=Math.min(this.getNextIncrement(t.level,1e3),i); + this.btn1000.text=h>0?`+${ + h} + `:"max",this.btn1000.iconText=h>0?qD.displayLargeNumberAsAlphabet(this.cost1000):"",this.btn1000.iconLabel.texture=QA.getTexture("UI_Ekkorr",h>0?"UI_GOLD":"UI_GRAY_GOLD"),this.btn10.visible=!0,this.btn100.visible=!0,this.btn1000.visible=h>0} + this.refreshActivation(TL.gold)} + clearCache(){ + } + async onClick(i,s){ + !this.data||this.data.id<=0||this.data.kindNum<=0||this.multiLevelContainer.visible||i<this.btnUpgrade.x&&(await t.cleanupAsync(),Uqt.getInstance().show(this.data))} + } + ; + Vt(YYt,"HeroItemRenderer"),Kt(YYt,"updateTimer",null),Kt(YYt,"DEBOUNCE_DELAY",3e3),Kt(YYt,"isDirty",!1),Kt(YYt,"heroTargetLevels",new Map),Kt(YYt,"numReviveSnapshot",-1),Kt(YYt,"autoCloseCounter",0),Kt(YYt,"AUTO_CLOSE_SECONDS",5),Kt(YYt,"lastCounterUpdateTime",0); + let qYt=YYt; + const XYt=class t extends fG{ + constructor(){ + super(),Kt(this,"lblMessage"),Kt(this,"bgInput"),Kt(this,"inputEl"),Kt(this,"lblHint"),Kt(this,"btnCancel"),Kt(this,"btnConfirm"),Kt(this,"slotId",-1),Kt(this,"requestPending",!1),Kt(this,"onSuccess",null),this.title=xG.getText("GAME_1097","프리셋 이름 변경"); + const t=fD.LABEL_OPTION_NO_DROP_SHADOW; + t.fill=fD.COLOR_WHITE,t.lineHeight=30,t.fontWeight="normal",this.lblMessage=new iL(xG.getText("GAME_1098","프리셋 이름을 작성해주세요."),fD.DEFAULT_COLOR,t),this.addChild(this.lblMessage),fD.setLabelWrapWidth(this.lblMessage,this.width-40),this.bgInput=new TM({ + texture:QA.getTexture("UI_Ekkorr","UI_Slot2"),leftWidth:4,topHeight:4,rightWidth:4,bottomHeight:4} + ),this.bgInput.visible=!1,this.bgInput.x=40,this.bgInput.width=this.width-2*this.bgInput.x,this.bgInput.height=70,this.addChild(this.bgInput),this.inputEl=this.createHTMLInput(),this.lblHint=new iL("",11184810,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.addChild(this.lblHint),this.btnCancel=new HYt(xG.getText("COMMON_2","취소")),this.btnCancel.outlineText=!0,this.btnCancel.width=240,this.btnCancel.height=65,this.btnCancel.onClick=this.onCancelClick.bind(this),this.addChild(this.btnCancel),this.btnConfirm=new HYt(xG.getText("COMMON_1","확인")),this.btnConfirm.color=HYt.COLOR_ORANGE,this.btnConfirm.outlineText=!0,this.btnConfirm.width=this.btnCancel.width,this.btnConfirm.height=this.btnCancel.height,this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.addChild(this.btnConfirm),this.updateLayout(),this.on("removed",this.onRemoved)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + createHTMLInput(){ + const i=document.createElement("input"); + return i.type="text",i.maxLength=t.MAX_INPUT_LEN,i.style.position="absolute",i.style.fontFamily="Arial",i.style.fontSize="18px",i.style.textAlign="center",i.style.display="none",i.style.color="white",i.style.background="transparent",i.style.border="2px solid #684f3e",i.style.borderRadius="6px",i.style.boxSizing="border-box",i.addEventListener("input",()=>this.updateHint()),document.body.appendChild(i),i} + updateLayout(){ + this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.lblMessage.y=80,this.bgInput.x=40,this.bgInput.y=this.lblMessage.y+this.lblMessage.height+20,this.lblHint.x=this.bgInput.x,this.lblHint.y=this.bgInput.y+this.bgInput.height+5,this.btnCancel.x=this.bgInput.x,this.btnCancel.y=this.lblHint.y+this.lblHint.height+20,this.btnConfirm.x=this.bgInput.x+this.bgInput.width-this.btnConfirm.width,this.btnConfirm.y=this.btnCancel.y,this.height=this.btnCancel.y+this.btnCancel.height+50} + showForSlot(t,i,s=null){ + this.btnConfirm.text=xG.getText("COMMON_1","확인"),this.btnCancel.text=xG.getText("COMMON_2","취소"),this.slotId=t,this.inputEl.value=i??"",this.onSuccess=s,this.updateHint(),super.show()} + onShowMotionComplete(){ + super.onShowMotionComplete(),this.showInputOverlay()} + hide(){ + this.hideInputOverlay(),super.hide()} + onRemoved(){ + this.hideInputOverlay()} + showInputOverlay(){ + const t=this.toGlobal(this.bgInput.position),i=VA.stage.scale; + this.inputEl.style.display="block",this.inputEl.style.left=t.x+"px",this.inputEl.style.top=t.y+"px",this.inputEl.style.width=`${ + Math.floor(this.bgInput.width*i.x)} + px`,this.inputEl.style.height=`${ + Math.floor(this.bgInput.height*i.y)} + px`,this.inputEl.placeholder=xG.getText("GAME_1097","프리셋 이름 입력"),setTimeout(()=>this.inputEl.focus(),50)} + hideInputOverlay(){ + this.inputEl.style.display="none",this.inputEl.blur()} + updateHint(){ + const i=this.inputEl.value.length; + this.lblHint.text=`${ + i} + / ${ + t.MAX_INPUT_LEN} + `} + onCancelClick(){ + this.hide()} + async onConfirmClick(){ + if(this.requestPending)return; + if(this.slotId<0)return; + const t=(this.inputEl.value??"").trim(); + this.requestPending=!0; + const i=await lD.getInstance().hero.renameHeroPreset(this.slotId,t); + if(this.requestPending=!1,!1!==i.success){ + if(TL.setUserInfo(i.body),qF.getInstance().updateAll(),LF.getInstance().showMessage(xG.getText("GAME_1099","프리셋 이름이 변경되었습니다.")),this.onSuccess)try{ + this.onSuccess()} + catch(_et){ + } + this.hide()} + else yG.getInstance().showError(i)} + } + ; + Vt(XYt,"HeroPresetRenamePopup"),Kt(XYt,"_instance"),Kt(XYt,"MAX_INPUT_LEN",8); + let JYt=XYt; + const QYt=class t extends Ge{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"slotButtons",[]),Kt(this,"btnSave"),Kt(this,"lblSaveHint"),Kt(this,"saveMode",!1),Kt(this,"requestPending",!1),Kt(this,"onApplied",null),Kt(this,"longPressTimers",[null,null,null,null,null]),Kt(this,"longPressFired",[!1,!1,!1,!1,!1]),this.bg=new Lf,this.bg.roundRect(0,0,t.WIDTH,t.HEIGHT,6),this.bg.fill({ + color:2825487,alpha:.6} + ),this.addChild(this.bg); + for(let n=0; + n<5; + n++){ + const i=new YKt(this.getSlotName(n),t.SLOT_BUTTON_WIDTH,16); + i.autoResize=!1,i.lbl.textSize=16,i.width=t.SLOT_BUTTON_WIDTH,i.height=t.SLOT_BUTTON_HEIGHT,i.x=8+n*(t.SLOT_BUTTON_WIDTH+t.SLOT_GAP),i.y=4+.5*(t.ROW_HEIGHT-i.height),i.on("pointertap",()=>{ + this.longPressFired[n]?this.longPressFired[n]=!1:this.onSlotClick(n)} + ,this),i.on("pointerdown",()=>this.startLongPress(n),this),i.on("pointerup",()=>this.cancelLongPress(n),this),i.on("pointerupoutside",()=>this.cancelLongPress(n),this),i.on("pointercancel",()=>this.cancelLongPress(n),this),i.selected=!1,this.slotButtons.push(i),this.addChild(i)} + const i=t.ROW_HEIGHT+8,s=t.ACTION_BUTTON_WIDTH,e=t.SLOT_BUTTON_HEIGHT; + this.btnSave=new oG("저장",s,8),this.btnSave.width=s,this.btnSave.height=e,this.btnSave.x=640-s-t.ACTION_BUTTON_RIGHT_MARGIN,this.btnSave.y=i+.5*(t.ROW_HEIGHT-e),this.btnSave.on("pointertap",this.onSaveClick,this),this.addChild(this.btnSave),this.lblSaveHint=new iL("프리셋 길게 누르면 이름 변경",16767354,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblSaveHint.setWrapWidth(400),this.lblSaveHint.x=12,this.lblSaveHint.visible=!0,this.addChild(this.lblSaveHint),this.recenterHint()} + recenterHint(){ + const i=t.ROW_HEIGHT+8; + this.lblSaveHint.y=i+.5*(t.ROW_HEIGHT-this.lblSaveHint.height)} + get barHeight(){ + return t.HEIGHT} + getSlotName(t){ + const i=t+1; + return xG.getValueReplace("GAME_744","##",String(i),`${ + i} + 번`)} + getSlotDisplayLabel(t){ + const i=wx.getInstance().heroPresets[t]; + return i&&i.label&&i.label.length>0?i.label:this.getSlotName(t)} + startLongPress(i){ + this.cancelLongPress(i),this.saveMode||this.requestPending||(this.longPressFired[i]=!1,this.longPressTimers[i]=setTimeout(()=>{ + this.longPressFired[i]=!0,this.longPressTimers[i]=null,this.openRenamePopup(i)} + ,t.LONG_PRESS_MS))} + cancelLongPress(t){ + null!==this.longPressTimers[t]&&(clearTimeout(this.longPressTimers[t]),this.longPressTimers[t]=null)} + openRenamePopup(t){ + const i=wx.getInstance().heroPresets[t]; + JYt.getInstance().showForSlot(t,(null==i?void 0:i.label)??"",()=>this.update())} + update(){ + const t=wx.getInstance(),i=t.heroPresets,s=this.saveMode?-1:t.getActiveHeroPresetSlot(); + for(let e=0; + e<this.slotButtons.length; + e++){ + const t=this.slotButtons[e],n=i[e],h=n&&n.team.length>0,r=this.getSlotName(e); + let o=this.getSlotDisplayLabel(e); + this.saveMode&&(o=h?xG.getValueReplace("GAME_746","##",r,`${ + r} + 덮어쓰기`):xG.getValueReplace("GAME_745","##",r,`${ + r} + 저장`)),t.text=o,t.selected=s===e,t.alpha=this.saveMode||h?1:.65} + this.saveMode?this.btnSave.text=xG.getText("COMMON_2","취소"):this.btnSave.text=xG.getText("GAME_527","저장"),this.lblSaveHint.visible=!0,this.lblSaveHint.text=this.saveMode?xG.getText("GAME_747","저장할 슬롯을 선택하세요"):xG.getText("GAME_1100","프리셋 길게 누르면 이름 변경"),this.recenterHint()} + setSaveMode(t){ + this.saveMode=t,this.update()} + updateLanguage(){ + this.update()} + async onSlotClick(t){ + if(this.requestPending)return; + const i=wx.getInstance(),s=i.heroPresets[t]; + if(this.saveMode){ + if(0===i.list.length)return LF.getInstance().showMessage(xG.getText("GAME_305","팀에 최소 1명의 영웅이 배치되어 있어야 합니다.")),void this.setSaveMode(!1); + const e=this.getSlotName(t),n=s&&s.team.length>0?xG.getValueReplace("GAME_749","##",e,`${ + e} + 프리셋을 덮어쓰시겠습니까?`):xG.getValueReplace("GAME_748","##",e,`${ + e} + 프리셋에 현재 상태를 저장하시겠습니까?`); + return void H$t.getInstance().show(n,async()=>{ + await this.doSave(t,(null==s?void 0:s.label)??""),this.setSaveMode(!1)} + )} + s&&0!==s.team.length?H$t.getInstance().show(xG.getText("GAME_750","선택한 프리셋으로 교체하시겠습니까?"),async()=>{ + await this.doApply(t)} + ):LF.getInstance().showMessage(xG.getText("GAME_753","비어있는 슬롯입니다. 저장 버튼으로 저장하세요."))} + onSaveClick(){ + this.requestPending||(this.saveMode?this.setSaveMode(!1):0!==wx.getInstance().list.length?this.setSaveMode(!0):LF.getInstance().showMessage(xG.getText("GAME_305","팀에 최소 1명의 영웅이 배치되어 있어야 합니다.")))} + async doSave(t,i){ + if(this.requestPending)return; + this.requestPending=!0; + const s=wx.getInstance().list.map(t=>({ + kindNum:t.kindNum,trans:t.trans,enhance:t.enhance} + )),e=await lD.getInstance().hero.saveHeroPreset(t,i,s,!0); + this.requestPending=!1,!1!==e.success?(TL.setUserInfo(e.body),qF.getInstance().updateAll(),this.update(),LF.getInstance().showMessage(xG.getText("GAME_756","프리셋이 저장되었습니다."))):yG.getInstance().showError(e)} + async doApply(t){ + if(this.requestPending)return; + this.requestPending=!0; + const i=wx.getInstance(),s=i.list.map(t=>t.id),e=i.list.map(t=>t.level); + qYt.cancel(); + const n=await lD.getInstance().hero.applyHeroPreset(t,!0,e); + if(this.requestPending=!1,!1===n.success)return void yG.getInstance().showError(n); + TL.setUserInfo(n.body),i.setLastAppliedHeroPresetSlot(t),qF.getInstance().updateAll(),this.update(); + const h=loi.getInstance(),r=_x.getVO(); + for(const o of s)r.id=o,h.fireHero(r); + r.remove(); + for(const o of i.list)await h.hireHero(o); + LF.getInstance().showMessage(xG.getText("GAME_757","프리셋이 적용되었습니다.")),this.onApplied&&this.onApplied()} + } + ; + Vt(QYt,"HeroPresetBar"),Kt(QYt,"WIDTH",630),Kt(QYt,"ROW_HEIGHT",42),Kt(QYt,"HEIGHT",2*QYt.ROW_HEIGHT+8),Kt(QYt,"SLOT_BUTTON_WIDTH",118),Kt(QYt,"SLOT_BUTTON_HEIGHT",38),Kt(QYt,"SLOT_GAP",4),Kt(QYt,"ACTION_BUTTON_WIDTH",120),Kt(QYt,"ACTION_BUTTON_RIGHT_MARGIN",10),Kt(QYt,"LONG_PRESS_MS",500);
AttendanceDayCell 2 hunks, 333 statements
+ super(),Kt(this,"bg"),Kt(this,"lblDay"),Kt(this,"reward"),Kt(this,"lblGem"),Kt(this,"checkIcon"),Kt(this,"redDot"); + const i=t.WIDTH,s=t.HEIGHT; + this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_Bg_13"),leftWidth:20,topHeight:20,rightWidth:20,bottomHeight:20} + ),this.bg.width=i,this.bg.height=s,this.bg.eventMode="none",this.addChild(this.bg),this.lblDay=new iL("",16777215,fD.DEFAULT_FONT_OPTION_16),this.lblDay.textColor=t.COLOR_DAY,this.lblDay.textSize=13,this.lblDay.eventMode="none",this.addChild(this.lblDay),this.reward=new I5,this.reward.scale=.62,this.reward.hideAmount(),this.reward.eventMode="none",this.addChild(this.reward),this.lblGem=new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblGem.textColor=t.COLOR_GEM,this.lblGem.textSize=15,this.lblGem.eventMode="none",this.addChild(this.lblGem),this.checkIcon=new He(QA.getTexture("UI_Ekkorr","Base_Check01")),this.checkIcon.scale=.6,this.checkIcon.visible=!1,this.checkIcon.eventMode="none",this.addChild(this.checkIcon),this.redDot=new He(QA.getTexture("UI_Ekkorr","Icon_RedDot_Red")),this.redDot.visible=!1,this.redDot.eventMode="none",this.addChild(this.redDot)} + get width(){ + return t.WIDTH} + get height(){ + return t.HEIGHT} + update(i){ + const s=t.WIDTH,e=t.HEIGHT,n="claimed"===i.state,h="claimable"===i.state; + this.bg.tint=n?t.CLAIMED_TINT:16777215,this.lblDay.text=String(i.day),this.lblDay.textColor=h?t.COLOR_GOLD:t.COLOR_DAY,this.lblDay.x=9,this.lblDay.y=5,this.reward.setData(T5.gem,i.gem),this.reward.hideAmount(),this.reward.x=.5*(s-.62*this.reward.width),this.reward.y=this.lblDay.y+this.lblDay.height+1,this.lblGem.text=String(i.gem),this.lblGem.textColor=t.COLOR_GEM,this.lblGem.x=.5*(s-this.lblGem.width),this.lblGem.y=e-this.lblGem.height-4,this.checkIcon.visible=n,this.checkIcon.x=s-this.checkIcon.width-5,this.checkIcon.y=4,this.redDot.visible=h,this.redDot.x=s-this.redDot.width-2,this.redDot.y=-2,this.reward.alpha=n?.55:1,this.lblGem.alpha=n?.55:1} + } + ; + Vt(mei,"AttendanceDayCell"),Kt(mei,"WIDTH",90),Kt(mei,"HEIGHT",94),Kt(mei,"COLOR_DAY",10325880),Kt(mei,"COLOR_GOLD",16767354),Kt(mei,"COLOR_GEM",8377599),Kt(mei,"CLAIMED_TINT",9211020); + let wei=mei; + const vei=class t extends Ge{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"lblTitle"),Kt(this,"cells",[]),Kt(this,"_height",0); + const i=t.PANEL_WIDTH; + this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_Bg_03"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30} + ),this.bg.width=i,this.bg.eventMode="none",this.addChild(this.bg),this.lblTitle=new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblTitle.textColor=16763904,this.lblTitle.x=t.PAD_X,this.lblTitle.y=t.PAD_TOP,this.lblTitle.eventMode="none",this.addChild(this.lblTitle); + const s=this.lblTitle.y+this.lblTitle.height+t.GAP,e=wei.WIDTH,n=wei.HEIGHT,h=t.GAP,r=t.COLUMNS,o=.5*(i-(r*e+(r-1)*h)); + for(let c=0; + c<t.CELL_COUNT; + c++){ + const t=new wei; + t.x=o+c%r*(e+h),t.y=s+Math.floor(c/r)*(n+h),this.cells.push(t),this.addChild(t)} + const a=Math.ceil(t.CELL_COUNT/r); + this._height=s+a*n+(a-1)*h+t.PAD_BOTTOM,this.bg.height=this._height} + get width(){ + return t.PANEL_WIDTH} + get height(){ + return this._height} + update(t){ + this.lblTitle.text=xG.getText("GAME_249","10일 보상"); + for(let i=0; + i<this.cells.length; + i++){ + const s=t[i]; + s?(this.cells[i].visible=!0,this.cells[i].update(s)):this.cells[i].visible=!1} + } + } + ; + Vt(vei,"AttendanceRotationGrid"),Kt(vei,"PANEL_WIDTH",530),Kt(vei,"CELL_COUNT",10),Kt(vei,"COLUMNS",5),Kt(vei,"GAP",8),Kt(vei,"PAD_X",24),Kt(vei,"PAD_TOP",9),Kt(vei,"PAD_BOTTOM",14); + let _ei=vei; + const bei=class extends Ge{ + constructor(t=300,i=28){ + super(),Kt(this,"bg"),Kt(this,"bar"),Kt(this,"barOffset",6),Kt(this,"lbl"),Kt(this,"_width",200),Kt(this,"_height",28),this._width=t,this._height=i,this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Progress_Bar_Bg"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13} + ),this.bg.width=this._width,this.bg.height=this._height,this.addChild(this.bg),this.bar=new TM({ + texture:QA.getTexture("UI_Ekkorr","Progress_Bar"),leftWidth:15,topHeight:7,rightWidth:15,bottomHeight:7} + ),this.bar.x=this.barOffset,this.bar.y=this.barOffset,this.bar.width=this._width-2*this.barOffset,this.bar.height=this._height-2*this.barOffset,this.addChild(this.bar); + const s=fD.DEFAULT_OUTLINE_FONT_OPTION_17; + s.fill=fD.COLOR_WHITE,this.lbl=new iL("0 / 0",s.fill,s),this.lbl.x=.5*(this._width-this.lbl.width),this.lbl.y=.5*(this._height-this.lbl.height),this.addChild(this.lbl)} + get width(){ + return this._width} + set width(t){ + t!=this._width&&(this._width=t,this.bg.width=this._width,this.lbl.x=.5*(this._width-this.lbl.width))} + get height(){ + return this._height} + update(t,i){ + const s=this._width-2*this.barOffset; + let e=s*(t/i); + e>s&&(e=s),this.bar.width=e,this.lbl.text=`${ + t} + / ${ + i} + `,this.lbl.x=.5*(this._width-this.lbl.width)} + showBar(){ + this.bar.visible||(this.bar.visible=!0)} + hideBar(){ + this.bar.visible&&(this.bar.visible=!1)} + showText(){ + this.lbl.visible||(this.lbl.visible=!0)} + hideText(){ + this.lbl.visible&&(this.lbl.visible=!1)} + } + ; + Vt(bei,"ProgressBar"); + let yei=bei; + const Mei=class t extends Ge{ + constructor(){ + super(),Kt(this,"onToggle",null),Kt(this,"bg"),Kt(this,"lblTitle"),Kt(this,"lblCurDay"),Kt(this,"bar"),Kt(this,"lblNextDay"),Kt(this,"icoNextGem"),Kt(this,"lblNextGem"),Kt(this,"upcomingDays",[]),Kt(this,"upcomingIcons",[]),Kt(this,"upcomingGems",[]),Kt(this,"_expanded",!1),Kt(this,"_height",t.ROW_HEIGHT),Kt(this,"_upcomingCount",0); + const i=t.PANEL_WIDTH; + this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_Bg_03"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30} + ),this.bg.width=i,this.bg.height=t.ROW_HEIGHT,this.bg.eventMode="none",this.addChild(this.bg),this.lblTitle=new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblTitle.textColor=t.COLOR_TITLE,this.lblTitle.eventMode="none",this.addChild(this.lblTitle),this.lblCurDay=new iL("",16777215,fD.DEFAULT_FONT_OPTION_16),this.lblCurDay.textColor=t.COLOR_MUTED,this.lblCurDay.textSize=15,this.lblCurDay.eventMode="none",this.addChild(this.lblCurDay),this.bar=new yei(210,t.BAR_HEIGHT),this.bar.eventMode="none",this.addChild(this.bar),this.lblNextDay=new iL("",16777215,fD.DEFAULT_FONT_OPTION_16),this.lblNextDay.textColor=t.COLOR_MUTED,this.lblNextDay.textSize=15,this.lblNextDay.eventMode="none",this.addChild(this.lblNextDay),this.icoNextGem=new He(QA.getTexture("UI_Ekkorr","UI_GEM_ICON")),this.icoNextGem.scale=.8,this.icoNextGem.eventMode="none",this.addChild(this.icoNextGem),this.lblNextGem=new iL("",16777215,fD.DEFAULT_FONT_OPTION_16),this.lblNextGem.textColor=t.COLOR_GEM,this.lblNextGem.textSize=15,this.lblNextGem.eventMode="none",this.addChild(this.lblNextGem); + for(let s=0; + s<t.UPCOMING_MAX; + s++){ + const i=new iL("",16777215,fD.DEFAULT_FONT_OPTION_16); + i.textColor=t.COLOR_MUTED,i.textSize=15,i.visible=!1,i.eventMode="none",this.upcomingDays.push(i),this.addChild(i); + const s=new He(QA.getTexture("UI_Ekkorr","UI_GEM_ICON")); + s.scale=.8,s.visible=!1,s.eventMode="none",this.upcomingIcons.push(s),this.addChild(s); + const e=new iL("",16777215,fD.DEFAULT_FONT_OPTION_16); + e.textColor=t.COLOR_GEM,e.textSize=15,e.visible=!1,e.eventMode="none",this.upcomingGems.push(e),this.addChild(e)} + this.eventMode="static",this.hitArea=new Ri(0,0,t.PANEL_WIDTH,t.ROW_HEIGHT),this.cursor="pointer",this.on("pointertap",this.onTap,this)} + get width(){ + return t.PANEL_WIDTH} + get height(){ + return this._height} + get expanded(){ + return this._expanded} + onTap(){ + 0!==this._upcomingCount&&this.onToggle&&this.onToggle(this)} + setExpanded(t){ + this._expanded=t&&this._upcomingCount>0,this.applyExpansion()} + applyExpansion(){ + const i=t.ROW_HEIGHT,s=t.UPCOMING_HEIGHT; + for(let e=0; + e<t.UPCOMING_MAX; + e++){ + const n=this._expanded&&e<this._upcomingCount; + if(this.upcomingDays[e].visible=n,this.upcomingIcons[e].visible=n,this.upcomingGems[e].visible=n,n){ + const n=i+e*s; + this.upcomingDays[e].x=t.DAY_COL_RIGHT-this.upcomingDays[e].width,this.upcomingDays[e].y=n+.5*(s-this.upcomingDays[e].height),this.upcomingIcons[e].x=t.ICON_X,this.upcomingIcons[e].y=n+.5*(s-this.upcomingIcons[e].height),this.upcomingGems[e].x=this.upcomingIcons[e].x+this.upcomingIcons[e].width+t.ICON_GAP,this.upcomingGems[e].y=n+.5*(s-this.upcomingGems[e].height)} + } + this._height=this._expanded?i+this._upcomingCount*s+8:i,this.bg.height=this._height} + dayText(t){ + return xG.getValueReplace("GAME_250","##",t,`${ + t} + 일`)} + update(i,s,e,n,h,r){ + const o=t.PANEL_WIDTH,a=t.PAD_X; + this.lblTitle.textSize=18,this.lblTitle.text=i,a+this.lblTitle.width>o-a&&(this.lblTitle.textSize=16),this.lblTitle.x=a,this.lblTitle.y=t.PAD_TOP; + const c=this.lblTitle.y+this.lblTitle.height+t.LINE_GAP,l=t.ROW_HEIGHT-c,u=Vt(t=>c+.5*(l-t),"centerY"); + this.lblCurDay.text=this.dayText(s),this.lblCurDay.x=a,this.lblCurDay.y=u(this.lblCurDay.height); + const d=n.length>0?n[0]:r,f=h??d; + f?(this.icoNextGem.visible=!0,this.icoNextGem.x=t.ICON_X,this.icoNextGem.y=u(this.icoNextGem.height),this.lblNextGem.visible=!0,this.lblNextGem.text=String(f.gem),this.lblNextGem.x=this.icoNextGem.x+this.icoNextGem.width+t.ICON_GAP,this.lblNextGem.y=u(this.lblNextGem.height),this.lblNextDay.visible=!0,this.lblNextDay.text=this.dayText(f.day),this.lblNextDay.x=t.DAY_COL_RIGHT-this.lblNextDay.width,this.lblNextDay.y=u(this.lblNextDay.height)):(this.lblNextGem.visible=!1,this.icoNextGem.visible=!1,this.lblNextDay.visible=!0,this.lblNextDay.text=xG.getText("GAME_257","모든 보상을 수령했습니다."),this.lblNextDay.x=o-a-this.lblNextDay.width,this.lblNextDay.y=u(this.lblNextDay.height)),this.bar.width=t.BAR_WIDTH,this.bar.x=t.BAR_X,this.bar.y=u(this.bar.height); + const p=e?e.nextDay-e.prevDay:0; + if(e&&p>0){ + const t=Math.max(0,Math.min(p,s-e.prevDay)); + this.bar.update(t,p),this.bar.showText()} + else this.bar.update(1,1),this.bar.hideText(); + this.bar.visible=!0; + const g=f?n.filter(t=>t.day!==f.day):n; + this._upcomingCount=Math.min(g.length,t.UPCOMING_MAX); + for(let t=0; + t<this._upcomingCount; + t++){ + const i=g[t]; + this.upcomingDays[t].text=this.dayText(i.day),this.upcomingGems[t].text=String(i.gem)} + 0===this._upcomingCount&&(this._expanded=!1),this.applyExpansion()} + } + ; + Vt(Mei,"AttendanceTrackRow"),Kt(Mei,"PANEL_WIDTH",530),Kt(Mei,"COLOR_TITLE",16763904),Kt(Mei,"COLOR_MUTED",10325880),Kt(Mei,"COLOR_GEM",8377599),Kt(Mei,"ROW_HEIGHT",74),Kt(Mei,"UPCOMING_HEIGHT",28),Kt(Mei,"UPCOMING_MAX",3),Kt(Mei,"PAD_X",24),Kt(Mei,"PAD_TOP",9),Kt(Mei,"LINE_GAP",7),Kt(Mei,"BAR_HEIGHT",26),Kt(Mei,"BAR_X",112),Kt(Mei,"BAR_WIDTH",230),Kt(Mei,"DAY_COL_RIGHT",420),Kt(Mei,"ICON_X",430),Kt(Mei,"ICON_GAP",6); + let Eei=Mei; + const Aei=class t extends fG{ + constructor(){ + super(),Kt(this,"lblMsg"),Kt(this,"rowA"),Kt(this,"rowB"),Kt(this,"grid"),Kt(this,"btnClaimAll"),Kt(this,"image"),Kt(this,"preferredY",0),Kt(this,"requestPending",!1),Kt(this,"onAttendanceUpdateBind"),this.width=580,this.height=500,this.title=xG.getText("GAME_245","출석 보상"); + const t=fD.LABEL_OPTION_NO_DROP_SHADOW; + t.fill=16638906,t.lineHeight=30,t.fontSize=21,t.stroke={ + color:"#000000",width:4,join:"round"} + ,this.lblMsg=new iL("",t.fill,t),this.addChild(this.lblMsg),this.rowA=new Eei,this.rowA.onToggle=t=>this.onRowToggle(t),this.contentContainer.addChild(this.rowA),this.rowB=new Eei,this.rowB.onToggle=t=>this.onRowToggle(t),this.contentContainer.addChild(this.rowB),this.grid=new _ei,this.contentContainer.addChild(this.grid),this.btnClaimAll=new Cei("받기"),this.btnClaimAll.onClick=()=>{ + this.claimAll()} + ,this.contentContainer.addChild(this.btnClaimAll),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + onAdded(){ + this.setAttendanceEvent(!0)} + onRemoved(){ + this.setAttendanceEvent(!1)} + updateLayout(){ + this.image?this.lblMsg.x=this.image.x+this.image.width+.5*(this.width-this.image.x-this.image.width-30-this.lblMsg.width)-5:this.lblMsg.x=.5*(this.width-220-30-this.lblMsg.width)-5,this.lblMsg.y=55+.5*(135-this.lblMsg.height),this.rowA.x=.5*(this.width-this.rowA.width),this.rowA.y=190,this.rowB.x=this.rowA.x,this.rowB.y=this.rowA.y+this.rowA.height+14,this.grid.x=this.rowA.x,this.grid.y=this.rowB.y+this.rowB.height+14; + const t=this.grid.visible?this.grid.y+this.grid.height:this.rowB.y+this.rowB.height; + this.btnClaimAll.x=.5*(this.width-this.btnClaimAll.width),this.btnClaimAll.y=t+18,this.height=this.btnClaimAll.y+this.btnClaimAll.height+30,this.applyVerticalPlacement()} + placeVertically(t){ + this.preferredY=t,this.applyVerticalPlacement()} + applyVerticalPlacement(){ + if(0===this.preferredY)return; + const t=.5*this.height,i=t+10,s=VA.bottomAnchorY-t-10; + this.y=s<i?i:Math.max(i,Math.min(this.preferredY,s))} + async setData(){ + this.title=xG.getText("GAME_245","출석 보상"),this.lblMsg.text=xG.getText("GAME_1219","매일 접속하고\n보상을 받아가세요!"); + let t=21; + if(TL.language===Xk.GERMAN&&(t=19),this.lblMsg.textSize=t,this.rowA.setExpanded(!1),this.rowB.setExpanded(!1),this.updateSections(),!this.image){ + this.image=new He,this.addChildAt(this.image,1); + const{ + AssetPathManager:t} + =await Xt(async()=>{ + const{ + AssetPathManager:t} + =await Promise.resolve().then(()=>XA); + return{ + AssetPathManager:t} + } + ,void 0),{ + Assets:i} + =await Xt(async()=>{ + const{ + Assets:t} + =await Promise.resolve().then(()=>kM); + return{ + Assets:t} + } + ,void 0),s=t.getAssetPath("CharAttendance.png"),e=await i.load(s); + this.image.texture=e,this.image.x=220-this.image.width,this.image.y=190-this.image.height,this.updateLayout()} + } + onRowToggle(t){ + const i=!t.expanded; + this.rowA.setExpanded(!1),this.rowB.setExpanded(!1),t.setExpanded(i),this.updateLayout()} + updateSections(){ + const t=dN.getInstance().status; + this.rowA.update(xG.getText("GAME_247","연속 접속"),t.consecutiveDays,t.progressA,t.upcomingA,t.claimableA,t.nextA),this.rowB.update(xG.getText("GAME_248","누적 접속"),t.cumulativeDays,t.progressB,t.upcomingB,t.claimableB,t.nextB); + const i=t.scheduleS.length>0; + this.grid.visible=i,i&&this.grid.update(t.scheduleS); + const s=t.claimableTotalGem,e=s>0||dN.getInstance().hasReward(); + this.btnClaimAll.setClaimEnabled(e),this.btnClaimAll.text=s>0?`${ + xG.getText("COMMON_8","받기")} + ${ + s} + `:xG.getText("COMMON_8","받기"),this.updateLayout()} + async claimAll(){ + if(this.requestPending)return; + this.setRequestPending(!0); + const t=await lD.getInstance().attendance.claimAll(!0); + if(0==t.success)return this.setRequestPending(!1),void yG.getInstance().showError(t); + t.body.user&&(TL.setUserData(t.body.user),qF.getInstance().updateGem()),t.body.attendance&&dN.getInstance().setStatusData(t.body.attendance); + const i=t.body.gem??0; + i>0&&this.displayGemGathering(this.contentContainer,i),this.setRequestPending(!1),this.updateSections(),dN.getInstance().hasReward()||queueMicrotask(()=>this.hide())} + displayGemGathering(t,i){ + let s=t.getGlobalPosition(),e=VA.stage.toLocal(s); + U4t.getInstance().getGem(e.x+.5*t.width-15,e.y+.5*t.height-20,i,Math.min(30,i),jVt.getInstance())} + setRequestPending(t){ + this.requestPending=t} + setAttendanceEvent(t){ + cS.getInstance().removeEventListener("AttendanceUpdate",this.onAttendanceUpdateBind),t&&(this.onAttendanceUpdateBind=this.onAttendanceUpdate.bind(this),cS.getInstance().addEventListener("AttendanceUpdate",this.onAttendanceUpdateBind))} + onAttendanceUpdate(t){ + this.updateSections()} + test(){ + dN.getInstance().setStatusData({ + consecutiveDays:9,cumulativeDays:18,rotationDay:3,claimedA:0,claimedB:17,claimedS:2,claimableA:null,claimableB:{ + day:18,gem:100} + ,claimableS:{ + day:3,gem:50} + ,claimableTotalGem:150,claimedRewardA:null,claimedRewardB:null,claimedRewardS:null,nextA:{ + day:10,gem:3e3} + ,nextB:{ + day:19,gem:100} + ,scheduleS:[50,100,50,100,200,50,100,50,100,500].map((t,i)=>({ + day:i+1,gem:t,state:i+1<=2?"claimed":i+1===3?"claimable":"locked",highlight:t>100} + )),upcomingA:[{ + day:10,gem:3e3,highlight:!1} + ,{ + day:20,gem:5e3,highlight:!1} + ,{ + day:30,gem:1e4,highlight:!0} + ],upcomingB:[{ + day:19,gem:100,highlight:!1} + ,{ + day:20,gem:300,highlight:!0} + ,{ + day:21,gem:100,highlight:!1} + ],progressA:{ + prevDay:0,nextDay:10} + ,progressB:{ + prevDay:17,nextDay:18} + } + )} + } + ; + Vt(Aei,"AttendancePopup"),Kt(Aei,"instance"); + let Sei=Aei; + const Tei=class extends HYt{ + constructor(t){ + super(t),this.setTexture({ + texture:QA.getTexture("UI_Ekkorr","Btn_Bg_01"),leftWidth:80,topHeight:35,rightWidth:90,bottomHeight:27} + ),this.width=256,this.height=67,this.outlineText=!0} + setClaimEnabled(t){ + this.activated=t,this.bg.tint=t?16777215:9079434} + updateLayout(){ + super.updateLayout(),this.lbl.y=.5*(this._height-11-this.lbl.height)} + } + ; + Vt(Tei,"AttendanceReceiveButton"); + let Cei=Tei; + const Iei=Object.freeze(Object.defineProperty({ + __proto__:null,AttendancePopup:Sei,AttendanceReceiveButton:Cei} + ,Symbol.toStringTag,{ + value:"Module"} + )),Oei=class t extends fG{ + constructor(){
- const Uei=class t extends Ge{ - constructor(){ - super(),Kt(this,"bg"),Kt(this,"lblDay"),Kt(this,"reward"),Kt(this,"lblGem"),Kt(this,"checkIcon"),Kt(this,"redDot"); - const i=t.WIDTH,s=t.HEIGHT; - this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Popup_Bg_13"),leftWidth:20,topHeight:20,rightWidth:20,bottomHeight:20} - ),this.bg.width=i,this.bg.height=s,this.bg.eventMode="none",this.addChild(this.bg),this.lblDay=new JD("",16777215,cD.DEFAULT_FONT_OPTION_16),this.lblDay.textColor=t.COLOR_DAY,this.lblDay.textSize=13,this.lblDay.eventMode="none",this.addChild(this.lblDay),this.reward=new M5,this.reward.scale=.62,this.reward.hideAmount(),this.reward.eventMode="none",this.addChild(this.reward),this.lblGem=new JD("",16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblGem.textColor=t.COLOR_GEM,this.lblGem.textSize=15,this.lblGem.eventMode="none",this.addChild(this.lblGem),this.checkIcon=new He(QA.getTexture("UI_Ekkorr","Base_Check01")),this.checkIcon.scale=.6,this.checkIcon.visible=!1,this.checkIcon.eventMode="none",this.addChild(this.checkIcon),this.redDot=new He(QA.getTexture("UI_Ekkorr","Icon_RedDot_Red")),this.redDot.visible=!1,this.redDot.eventMode="none",this.addChild(this.redDot)} - get width(){ - return t.WIDTH} - get height(){ - return t.HEIGHT} - update(i){ - const s=t.WIDTH,e=t.HEIGHT,n="claimed"===i.state,h="claimable"===i.state; - this.bg.tint=n?t.CLAIMED_TINT:16777215,this.lblDay.text=String(i.day),this.lblDay.textColor=h?t.COLOR_GOLD:t.COLOR_DAY,this.lblDay.x=9,this.lblDay.y=5,this.reward.setData(_5.gem,i.gem),this.reward.hideAmount(),this.reward.x=.5*(s-.62*this.reward.width),this.reward.y=this.lblDay.y+this.lblDay.height+1,this.lblGem.text=String(i.gem),this.lblGem.textColor=t.COLOR_GEM,this.lblGem.x=.5*(s-this.lblGem.width),this.lblGem.y=e-this.lblGem.height-4,this.checkIcon.visible=n,this.checkIcon.x=s-this.checkIcon.width-5,this.checkIcon.y=4,this.redDot.visible=h,this.redDot.x=s-this.redDot.width-2,this.redDot.y=-2,this.reward.alpha=n?.55:1,this.lblGem.alpha=n?.55:1} - } - ; - Vt(Uei,"AttendanceDayCell"),Kt(Uei,"WIDTH",90),Kt(Uei,"HEIGHT",94),Kt(Uei,"COLOR_DAY",10325880),Kt(Uei,"COLOR_GOLD",16767354),Kt(Uei,"COLOR_GEM",8377599),Kt(Uei,"CLAIMED_TINT",9211020); - let Fei=Uei; - const Hei=class t extends Ge{ - constructor(){ - super(),Kt(this,"bg"),Kt(this,"lblTitle"),Kt(this,"cells",[]),Kt(this,"_height",0); - const i=t.PANEL_WIDTH; - this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Popup_Bg_03"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30} - ),this.bg.width=i,this.bg.eventMode="none",this.addChild(this.bg),this.lblTitle=new JD("",16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblTitle.textColor=16763904,this.lblTitle.x=t.PAD_X,this.lblTitle.y=t.PAD_TOP,this.lblTitle.eventMode="none",this.addChild(this.lblTitle); - const s=this.lblTitle.y+this.lblTitle.height+t.GAP,e=Fei.WIDTH,n=Fei.HEIGHT,h=t.GAP,r=t.COLUMNS,o=.5*(i-(r*e+(r-1)*h)); - for(let c=0; - c<t.CELL_COUNT; - c++){ - const t=new Fei; - t.x=o+c%r*(e+h),t.y=s+Math.floor(c/r)*(n+h),this.cells.push(t),this.addChild(t)} - const a=Math.ceil(t.CELL_COUNT/r); - this._height=s+a*n+(a-1)*h+t.PAD_BOTTOM,this.bg.height=this._height} - get width(){ - return t.PANEL_WIDTH} - get height(){ - return this._height} - update(t){ - this.lblTitle.text=CG.getText("GAME_249","10일 보상"); - for(let i=0; - i<this.cells.length; - i++){ - const s=t[i]; - s?(this.cells[i].visible=!0,this.cells[i].update(s)):this.cells[i].visible=!1} - } - } - ; - Vt(Hei,"AttendanceRotationGrid"),Kt(Hei,"PANEL_WIDTH",530),Kt(Hei,"CELL_COUNT",10),Kt(Hei,"COLUMNS",5),Kt(Hei,"GAP",8),Kt(Hei,"PAD_X",24),Kt(Hei,"PAD_TOP",9),Kt(Hei,"PAD_BOTTOM",14); - let Wei=Hei;
StampMark 1 hunks, 214 statements
+ constructor(i=24){ + super(); + const s=new Lf; + s.circle(0,0,i).stroke({ + width:3,color:t.COLOR_INK,alpha:.92} + ),s.circle(0,0,i-4).stroke({ + width:1.5,color:t.COLOR_INK,alpha:.6} + ),s.eventMode="none",this.addChild(s); + const e=new Lf; + e.moveTo(.42*-i,.05*i).lineTo(.1*-i,.36*i).lineTo(.46*i,.32*-i).stroke({ + width:Math.max(3,.16*i),color:t.COLOR_INK,alpha:.92,cap:"round",join:"round"} + ),e.eventMode="none",this.addChild(e),this.eventMode="none"} + setDayRotation(t){ + this.rotation=(37*t%13-6)*(Math.PI/180)} + playPop(){ + Fk.killTweensOf(this.scale),Fk.fromTo(this.scale,{ + x:2.4,y:2.4} + ,{ + x:1,y:1,duration:.38,ease:"back.out(1.8)"} + ),Fk.fromTo(this,{ + alpha:0} + ,{ + alpha:1,duration:.16} + )} + } + ; + Vt(zpi,"StampMark"),Kt(zpi,"COLOR_INK",12597547); + let Ypi=zpi; + const qpi=class t extends Ge{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"lblDay"),Kt(this,"reward"),Kt(this,"lblAmount"),Kt(this,"redDot"),Kt(this,"stamp"),Kt(this,"onTap",null),Kt(this,"data",null); + const i=t.WIDTH,s=t.HEIGHT; + this.bg=new Lf,this.bg.roundRect(0,0,i,s,t.BG_RADIUS).fill({ + color:t.BG_COLOR} + ),this.bg.tint=16777215,this.bg.eventMode="none",this.addChild(this.bg),this.lblDay=new iL("",16777215,fD.DEFAULT_FONT_OPTION_16),this.lblDay.textColor=t.COLOR_DAY,this.lblDay.textSize=12,this.lblDay.x=8,this.lblDay.y=4,this.lblDay.eventMode="none",this.addChild(this.lblDay),this.reward=new I5,this.reward.scale=.5,this.reward.hideAmount(),this.reward.eventMode="none",this.addChild(this.reward),this.lblAmount=new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblAmount.textColor=t.COLOR_AMOUNT,this.lblAmount.textSize=13,this.lblAmount.eventMode="none",this.addChild(this.lblAmount),this.redDot=new He(QA.getTexture("UI_Ekkorr","Icon_RedDot_Red")),this.redDot.visible=!1,this.redDot.eventMode="none",this.addChild(this.redDot),this.stamp=new Ypi(24),this.stamp.x=.5*i,this.stamp.y=.5*s,this.stamp.visible=!1,this.addChild(this.stamp),this.eventMode="static",this.cursor="pointer",this.hitArea=new Ri(0,0,i,s),this.on("pointerup",()=>{ + this.data&&this.onTap&&this.onTap(this.data)} + )} + get width(){ + return t.WIDTH} + get height(){ + return t.HEIGHT} + update(i){ + this.data=i; + const s=t.WIDTH,e=t.HEIGHT,n="claimed"===i.state,h="claimable"===i.state,r=1===i.milestone; + this.bg.tint=n?t.CLAIMED_TINT:h?t.CLAIMABLE_TINT:r?t.MILESTONE_TINT:16777215,this.lblDay.text=String(i.day),this.lblDay.textColor=h||r?t.COLOR_GOLD:t.COLOR_DAY,t.applyReward(this.reward,i.rewardType,i.num),this.reward.hideAmount(),this.reward.x=.5*(s-.5*this.reward.width),this.reward.y=12,this.lblAmount.text="gem"===i.rewardType?String(i.num):`x${ + i.num} + `,this.lblAmount.x=.5*(s-this.lblAmount.width),this.lblAmount.y=e-this.lblAmount.height-3,this.redDot.visible=h,this.redDot.x=s-this.redDot.width-2,this.redDot.y=-2,this.reward.alpha=n?.45:1,this.lblAmount.alpha=n?.45:1,this.stamp.visible=n,n&&this.stamp.setDayRotation(i.day)} + playStampPop(){ + this.stamp.playPop()} + static getRewardName(t){ + switch(t){ + case"gem":return xG.getText("COMMON_350","보석"); + case"heroGacha":return xG.getText("GAME_217","영웅 뽑기권"); + case"heroSelect":return xG.getText("GAME_769","영웅 선택권"); + case"petGacha":return xG.getText("GAME_772","정령의 고원 입장권"); + case"treasureGacha":return xG.getText("GAME_218","유물 뽑기권"); + case"runeTicket":return xG.getText("GAME_1500","크리스탈 뽑기권"); + case"honorCoin":return xG.getText("GAME_88","명예코인"); + case"heroTrans":return xG.getText("GAME_1223","영웅 초월권"); + default:return t} + } + static applyReward(t,i,s){ + switch(i){ + case"gem":default:t.setData(T5.gem,s); + break; + case"heroGacha":t.setData(T5.ticket,s,5,-1,T5.heroGacha); + break; + case"heroSelect":t.setData(T5.ticket,s,-1,1,T5.heroSelect); + break; + case"petGacha":t.setData(T5.ticket,s,1,-1,T5.pet); + break; + case"treasureGacha":t.setData(T5.ticket,s,-1,-1,T5.treasureGacha); + break; + case"runeTicket":t.setData(T5.runeTicket,s); + break; + case"honorCoin":t.setData(T5.honorCoin,s); + break; + case"heroTrans":t.setData(T5.trans,s,5,-1,T5.hero)} + } + } + ; + Vt(qpi,"StampDayCell"),Kt(qpi,"WIDTH",90),Kt(qpi,"HEIGHT",72),Kt(qpi,"COLOR_DAY",10325880),Kt(qpi,"COLOR_GOLD",16767354),Kt(qpi,"COLOR_AMOUNT",16777215),Kt(qpi,"CLAIMED_TINT",9211020),Kt(qpi,"MILESTONE_TINT",16771512),Kt(qpi,"CLAIMABLE_TINT",16774095),Kt(qpi,"BG_COLOR",6904901),Kt(qpi,"BG_RADIUS",10); + let Xpi=qpi; + const Jpi=class t extends fG{ + constructor(){ + super(),Kt(this,"lblMsg"),Kt(this,"lblProgress"),Kt(this,"panel"),Kt(this,"cells",[]),Kt(this,"nextBanner"),Kt(this,"btnClaim"),Kt(this,"preferredY",0),Kt(this,"requestPending",!1),this.width=580,this.title=xG.getText("GAME_1533","30일 선물"); + const i=fD.LABEL_OPTION_NO_DROP_SHADOW; + i.fill=16638906,i.lineHeight=24,i.fontSize=16,i.stroke={ + color:"#000000",width:4,join:"round"} + ,i.align="center",this.lblMsg=new iL("",i.fill,i),this.lblMsg.eventMode="none",this.contentContainer.addChild(this.lblMsg),this.lblProgress=new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblProgress.textColor=16767354,this.lblProgress.eventMode="none",this.contentContainer.addChild(this.lblProgress),this.panel=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_Bg_03"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30} + ),this.panel.width=t.PANEL_WIDTH,this.panel.x=t.PANEL_X,this.panel.eventMode="none",this.panel.visible=!1,this.contentContainer.addChild(this.panel); + for(let t=0; + t<30; + t++){ + const t=new Xpi; + t.onTap=t=>this.showRewardToast(t),this.cells.push(t),this.contentContainer.addChild(t)} + this.nextBanner=new tgi,this.nextBanner.onTap=t=>this.showRewardToast(t),this.contentContainer.addChild(this.nextBanner),this.btnClaim=new YKt(""),this.btnClaim.autoResize=!1,this.btnClaim.width=300,this.btnClaim.height=60,this.btnClaim.onClick=()=>{ + this.claim()} + ,this.contentContainer.addChild(this.btnClaim)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + updateLayout(){ + const i=Xpi.WIDTH,s=Xpi.HEIGHT,e=t.GAP_X,n=t.GAP_Y,h=t.COLUMNS; + this.lblMsg.x=.5*(this.width-this.lblMsg.width),this.lblMsg.y=64,this.panel.y=this.lblMsg.y+this.lblMsg.height+12; + const r=h*i+(h-1)*e,o=this.panel.x+.5*(t.PANEL_WIDTH-r),a=this.panel.y+t.PAD_TOP; + for(let t=0; + t<30; + t++){ + const r=this.cells[t]; + r.x=o+t%h*(i+e),r.y=a+Math.floor(t/h)*(s+n)} + this.nextBanner.x=o,this.nextBanner.y=a+6*(s+n),this.panel.height=this.nextBanner.y+(this.nextBanner.visible?this.nextBanner.height:0)+t.PAD_BOTTOM-this.panel.y,this.btnClaim.x=.5*(this.width-this.btnClaim.width),this.btnClaim.y=this.panel.y+this.panel.height+14,this.height=this.btnClaim.y+this.btnClaim.height+26,this.applyVerticalPlacement()} + placeVertically(t){ + this.preferredY=t,this.applyVerticalPlacement()} + applyVerticalPlacement(){ + if(0===this.preferredY)return; + const t=.5*this.height,i=t+10,s=VA.bottomAnchorY-t-10; + this.y=s<i?i:Math.max(i,Math.min(this.preferredY,s))} + setData(){ + this.title=xG.getText("GAME_1533","30일 선물"),this.lblMsg.text=xG.getText("GAME_1534","접속할 때마다 도장 쾅!"),this.updateSections()} + updateSections(){ + const t=kri.getInstance(),i=t.status; + this.lblProgress.visible=!1; + for(let e=0; + e<this.cells.length; + e++){ + const t=i.schedule[e]; + t?(this.cells[e].visible=!0,this.cells[e].update(t)):this.cells[e].visible=!1} + const s=i.schedule[i.claimedCount]; + if(s?(this.nextBanner.visible=!0,this.nextBanner.update(s,t.hasReward()?xG.getText("GAME_1538","오늘의 선물"):xG.getText("GAME_1539","내일의 선물"))):this.nextBanner.visible=!1,t.hasReward()){ + const t=i.claimedCount+1; + this.btnClaim.text=xG.getValueReplace("GAME_1535","##",t,`${ + t} + 번째 도장 찍기`),this.btnClaim.activated=!0} + else this.btnClaim.text=t.isCompleted()?xG.getText("GAME_1537","모든 선물을 받았어요"):xG.getText("GAME_1536","내일 다시 만나요"),this.btnClaim.activated=!1; + this.updateLayout()} + showRewardToast(t){ + const i=Xpi.getRewardName(t.rewardType),s="gem"===t.rewardType?`${ + i} + ${ + t.num} + `:`${ + i} + x${ + t.num} + `; + LF.getInstance().showMessage(s)} + async claim(){ + var t,i; + const s=kri.getInstance(); + if(this.requestPending||!s.hasReward())return; + this.requestPending=!0; + const e=await lD.getInstance().stampCalendar.claim(!0); + if(0==e.success)return this.requestPending=!1,void yG.getInstance().showError(e); + const n=e.body; + if(!1===(null==n?void 0:n.success))return this.requestPending=!1,await s.init(),void this.updateSections(); + n.user&&(TL.setUserData(n.user),qF.getInstance().updateGem()),n.inventory&&YVt.getInstance().setData(n),n.transTicket&&JVt.getInstance().setData(n.transTicket),n.status&&s.setStatusData(n.status),this.updateSections(); + const h=Number((null==(t=n.reward)?void 0:t.day)??0); + h>=1&&h<=30&&this.cells[h-1].playStampPop(),"gem"===(null==(i=n.reward)?void 0:i.rewardType)&&this.displayGemGathering(this.contentContainer,Number(n.reward.num)),this.requestPending=!1} + displayGemGathering(t,i){ + const s=t.getGlobalPosition(),e=VA.stage.toLocal(s); + U4t.getInstance().getGem(e.x+.5*this.width-15,e.y+.5*this.height-20,i,Math.min(30,i),jVt.getInstance())} + } + ; + Vt(Jpi,"StampCalendarPopup"),Kt(Jpi,"instance"),Kt(Jpi,"PANEL_X",25),Kt(Jpi,"PANEL_WIDTH",530),Kt(Jpi,"PAD_X",24),Kt(Jpi,"PAD_TOP",10),Kt(Jpi,"PAD_BOTTOM",12),Kt(Jpi,"GAP_X",8),Kt(Jpi,"GAP_Y",7),Kt(Jpi,"COLUMNS",5); + let Qpi=Jpi; + const Zpi=class t extends Ge{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"reward"),Kt(this,"lblDay"),Kt(this,"lblReward"),Kt(this,"redDot"),Kt(this,"onTap",null),Kt(this,"data",null); + const i=t.WIDTH,s=t.HEIGHT; + this.bg=new Lf,this.bg.roundRect(0,0,i,s,Xpi.BG_RADIUS).fill({ + color:Xpi.BG_COLOR} + ),this.bg.eventMode="none",this.addChild(this.bg),this.reward=new I5,this.reward.scale=.62,this.reward.hideAmount(),this.reward.eventMode="none",this.addChild(this.reward),this.lblDay=new iL("",16777215,fD.DEFAULT_FONT_OPTION_16),this.lblDay.textColor=16767354,this.lblDay.textSize=13,this.lblDay.eventMode="none",this.addChild(this.lblDay),this.lblReward=new iL("",16777215,fD.DEFAULT_FONT_OPTION_16),this.lblReward.textColor=16777215,this.lblReward.textSize=13,this.lblReward.eventMode="none",this.addChild(this.lblReward),this.redDot=new He(QA.getTexture("UI_Ekkorr","Icon_RedDot_Red")),this.redDot.visible=!1,this.redDot.eventMode="none",this.addChild(this.redDot),this.eventMode="static",this.cursor="pointer",this.hitArea=new Ri(0,0,i,s),this.on("pointerup",()=>{ + this.data&&this.onTap&&this.onTap(this.data)} + )} + get width(){ + return t.WIDTH} + get height(){ + return t.HEIGHT} + update(i,s){ + this.data=i; + const e=t.WIDTH,n=t.HEIGHT,h="claimable"===i.state; + this.bg.tint=h?t.CLAIMABLE_TINT:t.MILESTONE_TINT,Xpi.applyReward(this.reward,i.rewardType,i.num),this.reward.hideAmount(); + const r=xG.getValueReplace("GAME_1550","##",i.day,`${ + i.day} + 일차`); + this.lblDay.text=`${ + s} + · ${ + r} + `; + const o=Xpi.getRewardName(i.rewardType); + this.lblReward.text="gem"===i.rewardType?`${ + o} + ${ + i.num} + `:`${ + o} + x${ + i.num} + `; + const a=.62*this.reward.width,c=.62*this.reward.height,l=Math.max(this.lblDay.width,this.lblReward.width),u=.5*(e-(a+14+l)); + this.reward.x=u,this.reward.y=.5*(n-c)+1; + const d=u+a+14; + this.lblDay.x=d+.5*(l-this.lblDay.width),this.lblDay.y=11,this.lblReward.x=d+.5*(l-this.lblReward.width),this.lblReward.y=34,this.redDot.visible=h,this.redDot.x=e-this.redDot.width-2,this.redDot.y=-2} + } + ; + Vt(Zpi,"StampNextRewardBanner"),Kt(Zpi,"WIDTH",482),Kt(Zpi,"HEIGHT",62),Kt(Zpi,"MILESTONE_TINT",16771512),Kt(Zpi,"CLAIMABLE_TINT",16774095); + let tgi=Zpi; + const igi=Object.freeze(Object.defineProperty({ + __proto__:null,StampCalendarPopup:Qpi} + ,Symbol.toStringTag,{ + value:"Module"} + )),sgi=class t extends fG{
ReviveTreasureSetRowRenderer 1 hunks, 213 statements
+ )),xpi=class t extends Yk{ + constructor(){ + super(),Kt(this,"cells",[]),Kt(this,"fxUnits",[]),Kt(this,"setVO",null); + for(let t=0; + t<6; + t++){ + const i=new Ppi; + i.x=12+t*(i.width+10),i.y=.5*(80-i.height),this.addChild(i),this.cells.push(i)} + for(let t=0; + t<3; + t++){ + const t=new Lpi; + this.addChild(t),this.fxUnits.push(t)} + } + get width(){ + return 630} + get height(){ + return 80} + setData(i){ + var s; + const e=i; + if(!e)return; + this.setVO=e; + const n=Hx.getInstance(),h=new Map; + for(const t of[...n.equipedList,...n.ownedList])t&&h.set(t.kindNum,t.trans||0); + const r=e.itemList.slice(0,6); + for(let d=0; + d<6; + d++){ + const i=this.cells[d]; + if(d<r.length){ + const e=r[d]; + i.visible=!0,i.setData(e,h.has(e),(null==(s=t.isSelected)?void 0:s.call(t,e))??!1)} + else i.visible=!1} + const o=e.itemList.filter(i=>{ + var s; + return(null==(s=t.isSelected)?void 0:s.call(t,i))??!1} + ).map(t=>h.get(t)??0).sort((t,i)=>i-t),a=o.length,c=e.itemList.filter(t=>h.has(t)).map(t=>h.get(t)??0).sort((t,i)=>i-t),l=[]; + for(let t=0; + t<e.numSetList.length; + t++){ + const i=(e.skillList[t]||[]).indexOf("medal"); + if(i<0)continue; + if(e.getValueAt(3,t,i)<=0)continue; + const s=e.numSetList[t],n=a>=s,h=e.getValueAt(c[s-1]??0,t,i),r=n?e.getValueAt(o[s-1]??0,t,i):h,u=n&&r<h; + l.push({ + required:s,value:r,active:n,suboptimal:u} + )} + let u=576; + for(let t=this.fxUnits.length-1; + t>=0; + t--){ + const i=this.fxUnits[t]; + if(t<l.length){ + const s=l[t],e=i.setData(s.required,s.value,s.active,s.suboptimal); + i.visible=!0,i.x=u-e,i.y=0,u=i.x-12} + else i.visible=!1} + } + onClick(i,s){ + var e; + if(!this.setVO)return; + const n=this.setVO.itemList.slice(0,6); + for(let h=0; + h<n.length; + h++){ + const s=this.cells[h]; + if(i>=s.x&&i<=s.x+s.width)return void(s.visible&&s.owned&&(null==(e=t.onToggle)||e.call(t,n[h])))} + } + } + ; + Vt(xpi,"ReviveTreasureSetRowRenderer"),Kt(xpi,"onToggle",null),Kt(xpi,"isSelected",null); + let Rpi=xpi; + const Npi=class extends Ge{ + constructor(){ + super(),Kt(this,"icon"),Kt(this,"checkIcon"),Kt(this,"owned",!1),this.icon=new mXt,this.icon.scale=.9,this.icon.hideEnhance(),this.addChild(this.icon),this.checkIcon=new He(QA.getTexture("UI_Ekkorr","Base_Check01")),this.checkIcon.scale=.8,this.checkIcon.x=.5*(this.width-this.checkIcon.width),this.checkIcon.y=.5*(this.height-this.checkIcon.height),this.checkIcon.visible=!1,this.addChild(this.checkIcon)} + get width(){ + return.9*this.icon.width} + get height(){ + return.9*this.icon.height} + setData(t,i,s){ + this.owned=i; + const e=Hx.getInstance().getBookDataByKindNum(t); + e&&this.icon.setVO(e),this.icon.alpha=i?1:.32,this.checkIcon.visible=s} + } + ; + Vt(Npi,"SetMemberCell"); + let Ppi=Npi; + const Dpi=class t extends Ge{ + constructor(){ + super(),Kt(this,"chipContainer"),Kt(this,"lblValue"),this.chipContainer=new Ge,this.chipContainer.eventMode="none",this.addChild(this.chipContainer),this.lblValue=new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_17),this.lblValue.textSize=15,this.lblValue.eventMode="none",this.addChild(this.lblValue)} + setData(i,s,e,n=!1){ + const h=x9t(this.chipContainer,[{ + label:`${ + i} + set`,color:e?t.COLOR_ON:t.COLOR_OFF} + ]); + this.lblValue.text=`${ + s} + %`,this.lblValue.textColor=e?n?t.COLOR_VALUE_SUBOPTIMAL:t.COLOR_VALUE_ON:t.COLOR_OFF,this.lblValue.alpha=e?1:.8; + const r=Math.max(h,this.lblValue.width),o=.5*(80-(t.CHIP_H+t.CHIP_VALUE_GAP+this.lblValue.height)); + return this.chipContainer.x=.5*(r-h),this.chipContainer.y=o,this.lblValue.x=.5*(r-this.lblValue.width),this.lblValue.y=o+t.CHIP_H+t.CHIP_VALUE_GAP,r} + } + ; + Vt(Dpi,"SetEffectInline"),Kt(Dpi,"COLOR_ON",16767354),Kt(Dpi,"COLOR_VALUE_ON",16777215),Kt(Dpi,"COLOR_OFF",9079434),Kt(Dpi,"COLOR_VALUE_SUBOPTIMAL",16739162),Kt(Dpi,"CHIP_H",14),Kt(Dpi,"CHIP_VALUE_GAP",3); + let Lpi=Dpi; + const Gpi=.9,Bpi=class t extends fG{ + constructor(){ + super(),Kt(this,"onSaved",null),Kt(this,"lblDesc"),Kt(this,"lblBuff"),Kt(this,"lblSelect"),Kt(this,"slotContainer"),Kt(this,"slotIcons",[]),Kt(this,"list"),Kt(this,"btnConfirm"),Kt(this,"selected",[]),Kt(this,"slotCount",5),this.width=640,this.title=xG.getText("GAME_1546","환생유물 편성"),this.lblDesc=new iL("",13421772,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblDesc.x=24,this.lblDesc.y=68,this.lblDesc.text=xG.getText("GAME_1547","환생 시 이 유물들의 훈장이 사용됩니다."),this.addChild(this.lblDesc),fD.setLabelWrapWidth(this.lblDesc,this.width-2*this.lblDesc.x),this.slotContainer=new Ge,this.slotContainer.x=24,this.slotContainer.y=this.lblDesc.y+this.lblDesc.height+10,this.addChild(this.slotContainer),this.slotContainer.eventMode="static",this.slotContainer.on("pointertap",this.onSlotTap,this),this.lblBuff=new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblBuff.textColor=16767354,this.addChild(this.lblBuff),this.lblSelect=new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_17),this.lblSelect.x=24,this.lblSelect.text="+ "+xG.getText("GAME_1548","유물 선택"),this.addChild(this.lblSelect),this.list=new P5(Rpi,630,500),this.list.x=5,this.addChild(this.list),this.btnConfirm=new eG(xG.getText("COMMON_1","확인")),this.btnConfirm.color=eG.GREEN,this.btnConfirm.width=200,this.btnConfirm.height=55,this.btnConfirm.x=.5*(640-this.btnConfirm.width),this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.addChild(this.btnConfirm)} + static getInstance(){ + return t._instance||(t._instance=new t),t._instance} + async setData(){ + var t; + const i=Hx.getInstance(); + this.slotCount=Math.max(1,i.maxSlots); + let s=[]; + try{ + const i=await lD.getInstance().user.getReviveTreasure(); + !1!==(null==i?void 0:i.success)&&Array.isArray(null==(t=null==i?void 0:i.body)?void 0:t.treasures)&&(s=i.body.treasures.map(Number).filter(t=>t>0))} + catch(_et){ + } + const e=new Set(this.getOwnedTreasures().map(t=>t.kindNum)); + this.selected=s.filter(t=>e.has(t)).slice(0,this.slotCount),this.buildSlots(),this.refreshList(),this.layout()} + getOwnedTreasures(){ + const t=Hx.getInstance(); + return[...t.equipedList,...t.ownedList].filter(t=>!!t)} + buildSlots(){ + this.slotContainer.removeChildren(),this.slotIcons.length=0; + const t=new mXt,i=t.width*Gpi+10; + for(let s=0; + s<this.slotCount; + s++){ + const e=0===s?t:new mXt; + e.scale=Gpi,e.hideEnhance(),e.x=s%8*i,e.y=Math.floor(s/8)*i,this.slotContainer.addChild(e),this.slotIcons.push(e)} + this.updateSlots()} + updateSlots(){ + this.lblSelect.text="+ "+xG.getText("GAME_1548","유물 선택")+` (${ + this.selected.length} + /${ + this.slotCount} + )`; + const t=Hx.getInstance(); + for(let i=0; + i<this.slotIcons.length; + i++){ + const s=this.slotIcons[i]; + if(i<this.selected.length){ + const e=t.getBookDataByKindNum(this.selected[i]); + if(e){ + s.setVO(e),s.visible=!0; + continue} + } + s.visible=i<this.selected.length} + this.updateBuffLabel()} + updateBuffLabel(){ + const i=qx.getInstance().getMedalSummaryForKindNums(this.selected); + this.lblBuff.text=xG.getValueReplace("GAME_825","##",String(i.total),`훈장버프 : ${ + i.total} + %`),this.lblBuff.textColor=i.suboptimal?t.COLOR_BUFF_SUBOPTIMAL:t.COLOR_BUFF_NORMAL,this.lblBuff.x=this.width-24-this.lblBuff.width} + refreshList(){ + Rpi.onToggle=t=>this.toggle(t),Rpi.isSelected=t=>-1!==this.selected.indexOf(t); + const t=Hx.getInstance(),i=new Set(this.getOwnedTreasures().map(t=>t.kindNum)),s=Vt(t=>t.itemList.filter(t=>i.has(t)).length,"ownedCountOf"),e=Vt(i=>{ + var s; + return(null==(s=t.getBookDataByKindNum(i.itemList[0]))?void 0:s.grade)??0} + ,"gradeOf"),n=Vt(t=>{ + let i=0; + for(let s=0; + s<t.numSetList.length; + s++){ + const e=(t.skillList[s]||[]).indexOf("medal"); + e>=0&&(i=Math.max(i,t.getValueAt(0,s,e)))} + return i} + ,"maxMedalOf"),h=qx.getInstance().bookList.slice().sort((t,i)=>e(i)-e(t)||n(i)-n(t)||s(i)-s(t)||t.kindNum-i.kindNum); + this.list.dataProvider=h,this.list.showTopItem()} + toggle(t){ + const i=this.selected.indexOf(t); + if(-1!==i)this.selected.splice(i,1); + else{ + if(this.selected.length>=this.slotCount)return void LF.getInstance().showMessage(xG.getValueReplace("GAME_1549","##",this.slotCount,`최대 ${ + this.slotCount} + 개까지 선택할 수 있습니다.`)); + this.selected.push(t)} + this.updateSlots(),this.refreshListSelection()} + refreshListSelection(){ + const t=this.list.itemList; + if(t)for(const i of t)i.setData(i.data)} + onSlotTap(t){ + const i=this.slotContainer.toLocal(t.global); + for(let s=0; + s<this.selected.length; + s++){ + const t=this.slotIcons[s]; + if(i.x>=t.x&&i.x<=t.x+t.width*Gpi&&i.y>=t.y&&i.y<=t.y+t.height*Gpi)return void this.toggle(this.selected[s])} + } + layout(){ + var t; + const i=Math.ceil(this.slotCount/8),s=((null==(t=this.slotIcons[0])?void 0:t.height)??80)*Gpi+10; + this.lblBuff.y=this.slotContainer.y+i*s+8,this.lblBuff.x=this.width-24-this.lblBuff.width,this.lblSelect.y=this.lblBuff.y+this.lblBuff.height+8,this.list.y=this.lblSelect.y+30,this.btnConfirm.y=this.list.y+500+16,this.bg.height=this.btnConfirm.y+this.btnConfirm.height+24} + async onConfirmClick(){ + var t; + try{ + const t=await lD.getInstance().user.setReviveTreasure(this.selected); + if(!1===(null==t?void 0:t.success))return void LF.getInstance().showMessage(xG.getText("COMMON_167","저장에 실패하였습니다."))} + catch(_et){ + return} + FF.getInstance().setKindNums(this.selected),LF.getInstance().showMessage(xG.getText("GAME_1179","저장되었습니다")),this.hide(),null==(t=this.onSaved)||t.call(this)} + } + ; + Vt(Bpi,"ReviveTreasurePopup"),Kt(Bpi,"_instance"),Kt(Bpi,"COLOR_BUFF_SUBOPTIMAL",16739162),Kt(Bpi,"COLOR_BUFF_NORMAL",16767354); + let Upi=Bpi; + const Fpi=Object.freeze(Object.defineProperty({ + __proto__:null,ReviveTreasurePopup:Upi} + ,Symbol.toStringTag,{ + value:"Module"}
SettingEtcInfo 2 hunks, 203 statements
- super(),Kt(this,"onToggle",null),Kt(this,"bg"),Kt(this,"lblTitle"),Kt(this,"lblCurDay"),Kt(this,"bar"),Kt(this,"lblNextDay"),Kt(this,"icoNextGem"),Kt(this,"lblNextGem"),Kt(this,"upcomingDays",[]),Kt(this,"upcomingIcons",[]),Kt(this,"upcomingGems",[]),Kt(this,"_expanded",!1),Kt(this,"_height",t.ROW_HEIGHT),Kt(this,"_upcomingCount",0); - const i=t.PANEL_WIDTH; - this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Popup_Bg_03"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30} - ),this.bg.width=i,this.bg.height=t.ROW_HEIGHT,this.bg.eventMode="none",this.addChild(this.bg),this.lblTitle=new JD("",16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_18),this.lblTitle.textColor=t.COLOR_TITLE,this.lblTitle.eventMode="none",this.addChild(this.lblTitle),this.lblCurDay=new JD("",16777215,cD.DEFAULT_FONT_OPTION_16),this.lblCurDay.textColor=t.COLOR_MUTED,this.lblCurDay.textSize=15,this.lblCurDay.eventMode="none",this.addChild(this.lblCurDay),this.bar=new jei(210,t.BAR_HEIGHT),this.bar.eventMode="none",this.addChild(this.bar),this.lblNextDay=new JD("",16777215,cD.DEFAULT_FONT_OPTION_16),this.lblNextDay.textColor=t.COLOR_MUTED,this.lblNextDay.textSize=15,this.lblNextDay.eventMode="none",this.addChild(this.lblNextDay),this.icoNextGem=new He(QA.getTexture("UI_Ekkorr","UI_GEM_ICON")),this.icoNextGem.scale=.8,this.icoNextGem.eventMode="none",this.addChild(this.icoNextGem),this.lblNextGem=new JD("",16777215,cD.DEFAULT_FONT_OPTION_16),this.lblNextGem.textColor=t.COLOR_GEM,this.lblNextGem.textSize=15,this.lblNextGem.eventMode="none",this.addChild(this.lblNextGem); - for(let s=0; - s<t.UPCOMING_MAX; - s++){ - const i=new JD("",16777215,cD.DEFAULT_FONT_OPTION_16); - i.textColor=t.COLOR_MUTED,i.textSize=15,i.visible=!1,i.eventMode="none",this.upcomingDays.push(i),this.addChild(i); - const s=new He(QA.getTexture("UI_Ekkorr","UI_GEM_ICON")); - s.scale=.8,s.visible=!1,s.eventMode="none",this.upcomingIcons.push(s),this.addChild(s); - const e=new JD("",16777215,cD.DEFAULT_FONT_OPTION_16); - e.textColor=t.COLOR_GEM,e.textSize=15,e.visible=!1,e.eventMode="none",this.upcomingGems.push(e),this.addChild(e)} - this.eventMode="static",this.hitArea=new Ri(0,0,t.PANEL_WIDTH,t.ROW_HEIGHT),this.cursor="pointer",this.on("pointertap",this.onTap,this)} - get width(){ - return t.PANEL_WIDTH} - get height(){ - return this._height} - get expanded(){ - return this._expanded} - onTap(){ - 0!==this._upcomingCount&&this.onToggle&&this.onToggle(this)} - setExpanded(t){ - this._expanded=t&&this._upcomingCount>0,this.applyExpansion()} - applyExpansion(){ - const i=t.ROW_HEIGHT,s=t.UPCOMING_HEIGHT; - for(let e=0; - e<t.UPCOMING_MAX; - e++){ - const n=this._expanded&&e<this._upcomingCount; - if(this.upcomingDays[e].visible=n,this.upcomingIcons[e].visible=n,this.upcomingGems[e].visible=n,n){ - const n=i+e*s; - this.upcomingDays[e].x=t.DAY_COL_RIGHT-this.upcomingDays[e].width,this.upcomingDays[e].y=n+.5*(s-this.upcomingDays[e].height),this.upcomingIcons[e].x=t.ICON_X,this.upcomingIcons[e].y=n+.5*(s-this.upcomingIcons[e].height),this.upcomingGems[e].x=this.upcomingIcons[e].x+this.upcomingIcons[e].width+t.ICON_GAP,this.upcomingGems[e].y=n+.5*(s-this.upcomingGems[e].height)} - } - this._height=this._expanded?i+this._upcomingCount*s+8:i,this.bg.height=this._height} - dayText(t){ - return CG.getValueReplace("GAME_250","##",t,`${ - t} - 일`)} - update(i,s,e,n,h,r){ - const o=t.PANEL_WIDTH,a=t.PAD_X; - this.lblTitle.textSize=18,this.lblTitle.text=i,a+this.lblTitle.width>o-a&&(this.lblTitle.textSize=16),this.lblTitle.x=a,this.lblTitle.y=t.PAD_TOP; - const c=this.lblTitle.y+this.lblTitle.height+t.LINE_GAP,l=t.ROW_HEIGHT-c,u=Vt(t=>c+.5*(l-t),"centerY"); - this.lblCurDay.text=this.dayText(s),this.lblCurDay.x=a,this.lblCurDay.y=u(this.lblCurDay.height); - const d=n.length>0?n[0]:r,f=h??d; - f?(this.icoNextGem.visible=!0,this.icoNextGem.x=t.ICON_X,this.icoNextGem.y=u(this.icoNextGem.height),this.lblNextGem.visible=!0,this.lblNextGem.text=String(f.gem),this.lblNextGem.x=this.icoNextGem.x+this.icoNextGem.width+t.ICON_GAP,this.lblNextGem.y=u(this.lblNextGem.height),this.lblNextDay.visible=!0,this.lblNextDay.text=this.dayText(f.day),this.lblNextDay.x=t.DAY_COL_RIGHT-this.lblNextDay.width,this.lblNextDay.y=u(this.lblNextDay.height)):(this.lblNextGem.visible=!1,this.icoNextGem.visible=!1,this.lblNextDay.visible=!0,this.lblNextDay.text=CG.getText("GAME_257","모든 보상을 수령했습니다."),this.lblNextDay.x=o-a-this.lblNextDay.width,this.lblNextDay.y=u(this.lblNextDay.height)),this.bar.width=t.BAR_WIDTH,this.bar.x=t.BAR_X,this.bar.y=u(this.bar.height); - const p=e?e.nextDay-e.prevDay:0; - if(e&&p>0){ - const t=Math.max(0,Math.min(p,s-e.prevDay)); - this.bar.update(t,p),this.bar.showText()} - else this.bar.update(1,1),this.bar.hideText(); - this.bar.visible=!0; - const g=f?n.filter(t=>t.day!==f.day):n; - this._upcomingCount=Math.min(g.length,t.UPCOMING_MAX); - for(let t=0; - t<this._upcomingCount; - t++){ - const i=g[t]; - this.upcomingDays[t].text=this.dayText(i.day),this.upcomingGems[t].text=String(i.gem)} - 0===this._upcomingCount&&(this._expanded=!1),this.applyExpansion()} - } - ; - Vt(Vei,"AttendanceTrackRow"),Kt(Vei,"PANEL_WIDTH",530),Kt(Vei,"COLOR_TITLE",16763904),Kt(Vei,"COLOR_MUTED",10325880),Kt(Vei,"COLOR_GEM",8377599),Kt(Vei,"ROW_HEIGHT",74),Kt(Vei,"UPCOMING_HEIGHT",28),Kt(Vei,"UPCOMING_MAX",3),Kt(Vei,"PAD_X",24),Kt(Vei,"PAD_TOP",9),Kt(Vei,"LINE_GAP",7),Kt(Vei,"BAR_HEIGHT",26),Kt(Vei,"BAR_X",112),Kt(Vei,"BAR_WIDTH",230),Kt(Vei,"DAY_COL_RIGHT",420),Kt(Vei,"ICON_X",430),Kt(Vei,"ICON_GAP",6); - let Kei=Vei; - const zei=class t extends cG{ - constructor(){ - super(),Kt(this,"lblMsg"),Kt(this,"rowA"),Kt(this,"rowB"),Kt(this,"grid"),Kt(this,"btnClaimAll"),Kt(this,"image"),Kt(this,"preferredY",0),Kt(this,"requestPending",!1),Kt(this,"onAttendanceUpdateBind"),this.width=580,this.height=500,this.title=CG.getText("GAME_245","출석 보상"); - const t=cD.LABEL_OPTION_NO_DROP_SHADOW; - t.fill=16638906,t.lineHeight=30,t.fontSize=21,t.stroke={ - color:"#000000",width:4,join:"round"} - ,this.lblMsg=new JD("",t.fill,t),this.addChild(this.lblMsg),this.rowA=new Kei,this.rowA.onToggle=t=>this.onRowToggle(t),this.contentContainer.addChild(this.rowA),this.rowB=new Kei,this.rowB.onToggle=t=>this.onRowToggle(t),this.contentContainer.addChild(this.rowB),this.grid=new Wei,this.contentContainer.addChild(this.grid),this.btnClaimAll=new Xei("받기"),this.btnClaimAll.onClick=()=>{ - this.claimAll()} - ,this.contentContainer.addChild(this.btnClaimAll),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - onAdded(){ - this.setAttendanceEvent(!0)} - onRemoved(){ - this.setAttendanceEvent(!1)} - updateLayout(){ - this.image?this.lblMsg.x=this.image.x+this.image.width+.5*(this.width-this.image.x-this.image.width-30-this.lblMsg.width)-5:this.lblMsg.x=.5*(this.width-220-30-this.lblMsg.width)-5,this.lblMsg.y=55+.5*(135-this.lblMsg.height),this.rowA.x=.5*(this.width-this.rowA.width),this.rowA.y=190,this.rowB.x=this.rowA.x,this.rowB.y=this.rowA.y+this.rowA.height+14,this.grid.x=this.rowA.x,this.grid.y=this.rowB.y+this.rowB.height+14; - const t=this.grid.visible?this.grid.y+this.grid.height:this.rowB.y+this.rowB.height; - this.btnClaimAll.x=.5*(this.width-this.btnClaimAll.width),this.btnClaimAll.y=t+18,this.height=this.btnClaimAll.y+this.btnClaimAll.height+30,this.applyVerticalPlacement()} - placeVertically(t){ - this.preferredY=t,this.applyVerticalPlacement()} - applyVerticalPlacement(){ - if(0===this.preferredY)return; - const t=.5*this.height,i=t+10,s=VA.bottomAnchorY-t-10; - this.y=s<i?i:Math.max(i,Math.min(this.preferredY,s))} - async setData(){ - this.title=CG.getText("GAME_245","출석 보상"),this.lblMsg.text=CG.getText("GAME_1219","매일 접속하고\n보상을 받아가세요!"); - let t=21; - if(ML.language===Xk.GERMAN&&(t=19),this.lblMsg.textSize=t,this.rowA.setExpanded(!1),this.rowB.setExpanded(!1),this.updateSections(),!this.image){ - this.image=new He,this.addChildAt(this.image,1); - const{ - AssetPathManager:t} - =await Xt(async()=>{ - const{ - AssetPathManager:t} - =await Promise.resolve().then(()=>XA); - return{ - AssetPathManager:t} - } - ,void 0),{ - Assets:i} - =await Xt(async()=>{ - const{ - Assets:t} - =await Promise.resolve().then(()=>kM); - return{ - Assets:t} - } - ,void 0),s=t.getAssetPath("CharAttendance.png"),e=await i.load(s); - this.image.texture=e,this.image.x=220-this.image.width,this.image.y=190-this.image.height,this.updateLayout()} - } - onRowToggle(t){ - const i=!t.expanded; - this.rowA.setExpanded(!1),this.rowB.setExpanded(!1),t.setExpanded(i),this.updateLayout()} - updateSections(){ - const t=dN.getInstance().status; - this.rowA.update(CG.getText("GAME_247","연속 접속"),t.consecutiveDays,t.progressA,t.upcomingA,t.claimableA,t.nextA),this.rowB.update(CG.getText("GAME_248","누적 접속"),t.cumulativeDays,t.progressB,t.upcomingB,t.claimableB,t.nextB); - const i=t.scheduleS.length>0; - this.grid.visible=i,i&&this.grid.update(t.scheduleS); - const s=t.claimableTotalGem,e=s>0||dN.getInstance().hasReward(); - this.btnClaimAll.setClaimEnabled(e),this.btnClaimAll.text=s>0?`${ - CG.getText("COMMON_8","받기")} - ${ - s} - `:CG.getText("COMMON_8","받기"),this.updateLayout()} - async claimAll(){ - if(this.requestPending)return; - this.setRequestPending(!0); - const t=await rD.getInstance().attendance.claimAll(!0); - if(0==t.success)return this.setRequestPending(!1),void wG.getInstance().showError(t); - t.body.user&&(ML.setUserData(t.body.user),$F.getInstance().updateGem()),t.body.attendance&&dN.getInstance().setStatusData(t.body.attendance); - const i=t.body.gem??0; - i>0&&this.displayGemGathering(this.contentContainer,i),this.setRequestPending(!1),this.updateSections(),dN.getInstance().hasReward()||queueMicrotask(()=>this.hide())} - displayGemGathering(t,i){ - let s=t.getGlobalPosition(),e=VA.stage.toLocal(s); - P4t.getInstance().getGem(e.x+.5*t.width-15,e.y+.5*t.height-20,i,Math.min(30,i),ZVt.getInstance())} - setRequestPending(t){ - this.requestPending=t} - setAttendanceEvent(t){ - cS.getInstance().removeEventListener("AttendanceUpdate",this.onAttendanceUpdateBind),t&&(this.onAttendanceUpdateBind=this.onAttendanceUpdate.bind(this),cS.getInstance().addEventListener("AttendanceUpdate",this.onAttendanceUpdateBind))} - onAttendanceUpdate(t){ - this.updateSections()} - test(){ - dN.getInstance().setStatusData({ - consecutiveDays:9,cumulativeDays:18,rotationDay:3,claimedA:0,claimedB:17,claimedS:2,claimableA:null,claimableB:{ - day:18,gem:100} - ,claimableS:{ - day:3,gem:50} - ,claimableTotalGem:150,claimedRewardA:null,claimedRewardB:null,claimedRewardS:null,nextA:{ - day:10,gem:3e3} - ,nextB:{ - day:19,gem:100} - ,scheduleS:[50,100,50,100,200,50,100,50,100,500].map((t,i)=>({ - day:i+1,gem:t,state:i+1<=2?"claimed":i+1===3?"claimable":"locked",highlight:t>100} - )),upcomingA:[{ - day:10,gem:3e3,highlight:!1} - ,{ - day:20,gem:5e3,highlight:!1} - ,{ - day:30,gem:1e4,highlight:!0} - ],upcomingB:[{ - day:19,gem:100,highlight:!1} - ,{ - day:20,gem:300,highlight:!0} - ,{ - day:21,gem:100,highlight:!1} - ],progressA:{ - prevDay:0,nextDay:10} - ,progressB:{ - prevDay:17,nextDay:18} - } - )} - } - ; - Vt(zei,"AttendancePopup"),Kt(zei,"instance"); - let qei=zei; - const Yei=class extends cqt{ - constructor(t){ - super(t),this.setTexture({ - texture:QA.getTexture("UI_Ekkorr","Btn_Bg_01"),leftWidth:80,topHeight:35,rightWidth:90,bottomHeight:27} - ),this.width=256,this.height=67,this.outlineText=!0} - setClaimEnabled(t){ - this.activated=t,this.bg.tint=t?16777215:9079434} - updateLayout(){ - super.updateLayout(),this.lbl.y=.5*(this._height-11-this.lbl.height)} - } - ; - Vt(Yei,"AttendanceReceiveButton"); - let Xei=Yei; - const Jei=Object.freeze(Object.defineProperty({ - __proto__:null,AttendancePopup:qei,AttendanceReceiveButton:Xei} - ,Symbol.toStringTag,{ - value:"Module"} - )),Qei=class extends Ge{ - constructor(){ - super(),Kt(this,"titleBar"),Kt(this,"btnNotice"),Kt(this,"btnPromotion"),Kt(this,"btnWithdraw"),Kt(this,"btnOptout"),Kt(this,"btnLangChange"),Kt(this,"btnLineMarketLink"),Kt(this,"btnGoogleLogin"),Kt(this,"btnAppleLogin"),Kt(this,"btnEmail"),Kt(this,"btnAttendReward"),Kt(this,"btnContainer"),Kt(this,"requestPending",!1),this.titleBar=new Usi(CG.getText("COMMON_408","서비스")),this.addChild(this.titleBar),this.btnNotice=new cqt(CG.getText("COMMON_18","공지")),this.btnNotice.onClick=this.onNoticeBtnClick.bind(this),this.btnPromotion=new cqt(CG.getText("GAME_400","프로모션 코드")),this.btnPromotion.onClick=this.onPromotionBtnClick.bind(this),this.btnWithdraw=new cqt(CG.getText("COMMON_56","게임탈퇴")),this.btnWithdraw.onClick=this.onWithdrawBtnClick.bind(this),this.btnOptout=new cqt(CG.getText("COMMON_403","OPT-OUT")),this.btnOptout.deactivatedTextColor=16777215,this.btnOptout.onClick=this.onOptoutBtnClick.bind(this),this.btnLangChange=new cqt(CG.getText("COMMON_54","언어변경")),this.btnLangChange.onClick=this.onLangChangeBtnClick.bind(this),this.btnLineMarketLink=new cqt("웹마켓 점검 우회"),this.btnLineMarketLink.onClick=this.onLineMarketLinkBtnClick.bind(this),this.btnGoogleLogin=new cqt(CG.getText("GAME_407","Google 로그인")),this.btnGoogleLogin.deactivatedTextColor=16777215,this.btnGoogleLogin.onClick=this.onGoogleLoginBtnClick.bind(this),this.btnAppleLogin=new cqt(CG.getText("GAME_408","Apple 로그인")),this.btnAppleLogin.deactivatedTextColor=16777215,this.btnAppleLogin.onClick=this.onAppleLoginBtnClick.bind(this),this.btnEmail=new cqt(CG.getText("COMMON_510","이메일 ID")),this.btnEmail.deactivatedTextColor=16777215,this.btnEmail.onClick=this.onEmailBtnClick.bind(this),this.btnAttendReward=new cqt(CG.getText("GAME_245","출석 보상 ")); + super(),Kt(this,"titleBar"),Kt(this,"btnEmail"),Kt(this,"btnNotice"),Kt(this,"btnGoogleLogin"),Kt(this,"btnAppleLogin"),Kt(this,"btnOptout"),Kt(this,"btnPromotion"),Kt(this,"btnWithdraw"),Kt(this,"btnLangChange"),Kt(this,"btnLineMarketLink"),Kt(this,"btnAttendReward"),Kt(this,"btnContainer"),Kt(this,"requestPending",!1),this.titleBar=new Ysi(xG.getText("COMMON_408","서비스")),this.addChild(this.titleBar),this.btnEmail=new HYt(xG.getText("COMMON_510","이메일 ID")),this.btnEmail.deactivatedTextColor=16777215,this.btnEmail.onClick=this.onEmailBtnClick.bind(this),this.btnNotice=new HYt(xG.getText("COMMON_18","공지")),this.btnNotice.onClick=this.onNoticeBtnClick.bind(this),this.btnGoogleLogin=new HYt(xG.getText("GAME_407","Google 로그인")),this.btnGoogleLogin.deactivatedTextColor=16777215,this.btnGoogleLogin.onClick=this.onGoogleLoginBtnClick.bind(this),this.btnAppleLogin=new HYt(xG.getText("GAME_408","Apple 로그인")),this.btnAppleLogin.deactivatedTextColor=16777215,this.btnAppleLogin.onClick=this.onAppleLoginBtnClick.bind(this),this.btnOptout=new HYt(xG.getText("COMMON_403","OPT-OUT")),this.btnOptout.deactivatedTextColor=16777215,this.btnOptout.onClick=this.onOptoutBtnClick.bind(this),this.btnPromotion=new HYt(xG.getText("GAME_400","프로모션 코드")),this.btnPromotion.onClick=this.onPromotionBtnClick.bind(this),this.btnWithdraw=new HYt(xG.getText("COMMON_56","게임탈퇴")),this.btnWithdraw.onClick=this.onWithdrawBtnClick.bind(this),this.btnLangChange=new HYt(xG.getText("COMMON_54","언어변경")),this.btnLangChange.onClick=this.onLangChangeBtnClick.bind(this),this.btnLineMarketLink=new HYt("웹마켓 점검 우회"),this.btnLineMarketLink.onClick=this.onLineMarketLinkBtnClick.bind(this),this.btnAttendReward=new HYt(xG.getText("GAME_245","출석 보상 "));
+ async onInviteBtnClick(){ + Kei.getInstance().setData(),Kei.getInstance().show()}
GuildWarTournamentMainView 13 hunks, 174 statements
- super(),Kt(this,"btnGuide"),Kt(this,"topBg"),Kt(this,"lblRound",new JD("진행중 라운드",cD.DEFAULT_COLOR)),Kt(this,"lblRoundCurrent",new JD("16강",cD.COLOR_BRIGHT_ORANGE)),Kt(this,"lblRemain",new JD("남은 시간",cD.DEFAULT_COLOR)),Kt(this,"lblRemainTime",new JD("00:00:00",cD.COLOR_BRIGHT_GREEN)),Kt(this,"btnReward",new AB("UI_Guild","Btn_TreasureBox_Information",.9)),Kt(this,"btnRound16",new Rzt(CG.getText("GWT_3","16강"),105)),Kt(this,"btnRound8",new Rzt(CG.getText("GWT_4","8강"),105)),Kt(this,"btnRound4",new Rzt(CG.getText("GWT_5","4강"),105)),Kt(this,"btnRound2",new Rzt(CG.getText("GWT_7","결승전"),105)),Kt(this,"tabs"),Kt(this,"activeIndex",0),Kt(this,"lblRound16",new JD(CG.getText("GWT_3","16강"),cD.DEFAULT_COLOR)),Kt(this,"lblRound8",new JD(CG.getText("GWT_4","8강"),cD.DEFAULT_COLOR)),Kt(this,"lblRound4",new JD(CG.getText("GWT_5","4강"),cD.DEFAULT_COLOR)),Kt(this,"lblRound2",new JD(CG.getText("GWT_7","결승전"),cD.DEFAULT_COLOR)),Kt(this,"lblRound3",new JD(CG.getText("GWT_6","3/4위전"),cD.DEFAULT_COLOR)),Kt(this,"viewport",new Ge),Kt(this,"content",new Ge),Kt(this,"maskDrag",new Lf),Kt(this,"container16",new Ge),Kt(this,"container8",new Ge),Kt(this,"container4",new Ge),Kt(this,"container2",new Ge),Kt(this,"container1",new Ge),Kt(this,"containers",[this.container16,this.container8,this.container4,this.container2,this.container1]),Kt(this,"team16s",[]),Kt(this,"team8s",[]),Kt(this,"team4s",[]),Kt(this,"team3s",[]),Kt(this,"team2s",[]),Kt(this,"team1",new Aii),Kt(this,"team3",new Aii),Kt(this,"dragging",!1),Kt(this,"lastX",0),Kt(this,"viewportWidth",640),Kt(this,"lastScrollX",0),Kt(this,"endTime",0),Kt(this,"count",0),this.height=VA.safeHeight-C$t.getInstance().height-.3*Chi.getInstance().height,this.initialize(),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} + super(),Kt(this,"btnRound16",new YKt(xG.getText("GWT_3","16강"),105)),Kt(this,"btnRound8",new YKt(xG.getText("GWT_4","8강"),105)),Kt(this,"btnRound4",new YKt(xG.getText("GWT_5","4강"),105)),Kt(this,"btnRound2",new YKt(xG.getText("GWT_7","결승전"),105)),Kt(this,"tabs"),Kt(this,"activeIndex",0),Kt(this,"lblRound16",new iL(xG.getText("GWT_3","16강"),fD.DEFAULT_COLOR)),Kt(this,"lblRound8",new iL(xG.getText("GWT_4","8강"),fD.DEFAULT_COLOR)),Kt(this,"lblRound4",new iL(xG.getText("GWT_5","4강"),fD.DEFAULT_COLOR)),Kt(this,"lblRound2",new iL(xG.getText("GWT_7","결승전"),fD.DEFAULT_COLOR)),Kt(this,"lblRound3",new iL(xG.getText("GWT_6","3/4위전"),fD.DEFAULT_COLOR)),Kt(this,"viewport",new Ge),Kt(this,"content",new Ge),Kt(this,"maskDrag",new Lf),Kt(this,"container16",new Ge),Kt(this,"container8",new Ge),Kt(this,"container4",new Ge),Kt(this,"container2",new Ge),Kt(this,"container1",new Ge),Kt(this,"containers",[this.container16,this.container8,this.container4,this.container2,this.container1]),Kt(this,"team16s",[]),Kt(this,"team8s",[]),Kt(this,"team4s",[]),Kt(this,"team3s",[]),Kt(this,"team2s",[]),Kt(this,"team1",new Dii),Kt(this,"team3",new Dii),Kt(this,"dragging",!1),Kt(this,"lastX",0),Kt(this,"viewportWidth",640),Kt(this,"lastScrollX",0),this.initialize()}
- this.outSideClickHide=!0,this.setTitle(CG.getText("GWT_1","서버 대항전")),this.btnGuide=new AB("UI_Ekkorr","UI_Alarm"),this.btnGuide.x=40,this.btnGuide.y=this.txtTitle.y+.5*(this.txtTitle.height-this.btnGuide.height)+2,this.addChild(this.btnGuide),this.btnGuide.on("pointertap",()=>{ - _ii.getInstance().showGuide()} - ),this.topBg=new He(QA.getTexture("UI","Popup_Bg_01")),this.topBg.width=535,this.topBg.x=20,this.topBg.y=70,this.addChild(this.topBg),this.lblRound.align="center",this.lblRound.x=this.topBg.x+.5*(.33*this.topBg.width-this.lblRound.width),this.lblRound.y=this.topBg.y+.5*(this.topBg.height-this.lblRound.height),this.addChild(this.lblRound),this.lblRoundCurrent.y=this.lblRound.y,this.lblRoundCurrent.textColor=cD.COLOR_BRIGHT_ORANGE,this.addChild(this.lblRoundCurrent),this.lblRemain.align="center",this.lblRemain.x=320+.5*(.5*this.topBg.width-this.lblRemain.width),this.lblRemain.y=this.topBg.y+.5*(this.topBg.height-this.lblRemain.height),this.addChild(this.lblRemain),this.lblRemainTime.y=this.lblRemain.y,this.lblRemainTime.textColor=cD.COLOR_BRIGHT_GREEN,this.addChild(this.lblRemainTime),this.btnReward.x=this.topBg.x+this.topBg.width+2,this.btnReward.y=this.topBg.y+.5*(this.topBg.height-this.btnReward.height)+2,this.addChild(this.btnReward),this.btnReward.on("pointerup",this.onRewardBtn,this),this.tabs=[this.btnRound16,this.btnRound8,this.btnRound4,this.btnRound2]; + this.tabs=[this.btnRound16,this.btnRound8,this.btnRound4,this.btnRound2];
- const t=this.tabs[i]; - this.addChild(t); - const s=i; + const i=this.tabs[t],s=t;
- this.container16.x=0,this.container8.x=t,this.container4.x=2*t,this.container2.x=3*t,this.container1.x=4*t,this.content.addChild(this.container16),this.content.addChild(this.container8),this.content.addChild(this.container4),this.content.addChild(this.container2),this.content.addChild(this.container1),this.maskDrag.rect(20,0,this.width-40,this.height).fill(16777215),this.viewport.addChild(this.maskDrag),this.viewport.mask=this.maskDrag,this.drawTournament(),this.setViewportEvent()} - async onRewardBtn(){ - await AD.loadRewardBook(),0!=AD.rewardBattleList.length&&kii.getInstance().showGuide()} + this.container16.x=0,this.container8.x=i,this.container4.x=2*i,this.container2.x=3*i,this.container1.x=4*i,this.content.addChild(this.container16),this.content.addChild(this.container8),this.content.addChild(this.container4),this.content.addChild(this.container2),this.content.addChild(this.container1),this.maskDrag.rect(20,0,t.WIDTH-40,t.HEIGHT).fill(16777215),this.viewport.addChild(this.maskDrag),this.viewport.mask=this.maskDrag,this.drawTournament(),this.setViewportEvent()}
- this.lblRound16.x=i+.5*(t-this.lblRound16.width),this.lblRound16.y=this.tabs[0].y+this.tabs[0].height+15,this.container16.addChild(this.lblRound16); + this.lblRound16.x=i+.5*(t-this.lblRound16.width),this.lblRound16.y=5,this.container16.addChild(this.lblRound16);
- const t=this.tabs[0].y+this.tabs[0].height; - this.viewport.hitArea=new Ri(0,t,this.width,this.height-t),this.viewport.eventMode="static",this.viewport.on("pointerdown",t=>{ + this.viewport.hitArea=new Ri(0,0,t.WIDTH,t.HEIGHT-0),this.viewport.eventMode="static",this.viewport.on("pointerdown",t=>{
- this.lastX=t.global.x,this.viewportWidth=this.width; + this.lastX=i.global.x,this.viewportWidth=t.WIDTH;
- const t=this.width,i=this.topBg.y+this.topBg.height+5; + const i=t.WIDTH;
- e=23+(s+2)*n-2,t.x=e,t.y=i} + e=23+(s+2)*t-2,i.x=e,i.y=5}
- this.updateLayout()} + }
- await AD.loadRewardBook(); - const t=AD.getTournamentSchedule(); - if(null==t)return; - let i=CG.getText("GWT_1","서버 대항전"),s=1==t.split?"Mid":"Final"; - i+=` (Season ${ - t.season} - - ${ - s} - )`,this.setTitle(i),this.txtTitle.x=this.topBg.x+.5*(this.topBg.width-this.txtTitle.width); - const e=await rD.getInstance().guildWar.getTournamentInfo(!0); - if(e&&!1===e.success&&"INVALID_GUILDWAR_TOURNAMENT_TIME"===e.error){ - this.hide(); - let t=CG.getText("COMMON_83","잠시 후에 이용해 주세요."); - return void wG.getInstance().show(t)} - AD.roundSchedule=null==e?void 0:e.body.schedule,AD.tournamentList=null==e?void 0:e.body.tournaments; - let n,h=CG.getText("GWT_3","16강"); - AD.roundSchedule&&(this.endTime=new Date(AD.roundSchedule.endAt).getTime(),2==AD.roundSchedule.round?h=CG.getText("GWT_4","8강"):3==AD.roundSchedule.round?h=CG.getText("GWT_5","4강"):4==AD.roundSchedule.round&&(h=CG.getText("GWT_7","결승전"))),this.lblRoundCurrent.text=`${ - h} - `,this.lblRound.text="⚔️ "+CG.getText("GWT_2","진행중 라운드")+" : ",this.lblRound.y=this.topBg.y+.5*(this.topBg.height-this.lblRound.height),this.lblRoundCurrent.y=this.topBg.y+.5*(this.topBg.height-this.lblRoundCurrent.height),this.lblRound.x=this.topBg.x+.5*(.5*this.topBg.width-(this.lblRound.width+this.lblRoundCurrent.width)),this.lblRoundCurrent.x=this.lblRound.x+this.lblRound.width,this.lblRemain.text="⏰ "+CG.getText("COMMON_29","남은 시간")+" : ",this.onEnterUpdate(),this.lblRemain.y=this.topBg.y+.5*(this.topBg.height-this.lblRemain.height),this.lblRemainTime.y=this.topBg.y+.5*(this.topBg.height-this.lblRemainTime.height),this.lblRemain.x=this.topBg.x+.5*this.topBg.width+.5*(.5*this.topBg.width-(this.lblRemain.width+this.lblRemainTime.width)),this.lblRemainTime.x=this.lblRemain.x+this.lblRemain.width; - let r=AD.tournamentList.length; - const o=[],a=[],c=[],l=[]; - for(let u=0; - u<r; - u++)n=AD.tournamentList[u],1==n.round?o.push(n):2==n.round?a.push(n):3==n.round?c.push(n):l.push(n); + let t; + const i=Hii.getInstance(),s=i.dataRound1,e=i.dataRound2,n=i.dataRound3,h=i.dataRound4;
- ...n} + ...t}
+ } + ; + Vt(Lii,"GuildWarTournamentMainView"),Kt(Lii,"WIDTH",620),Kt(Lii,"HEIGHT",846); + let Gii=Lii; + const Bii=class extends Ge{ + constructor(){ + super(),Kt(this,"lblRound8",new iL(`[ ${ + xG.getText("GWT_20","서브 매치")} + 1 ]`,fD.DEFAULT_COLOR)),Kt(this,"lblRound4",new iL(`[ ${ + xG.getText("GWT_20","서브 매치")} + 2 ]`,fD.DEFAULT_COLOR)),Kt(this,"teamSub8",[]),Kt(this,"teamSub4",[]),Kt(this,"coverSub8",new Lf),Kt(this,"coverSub4",new Lf),Kt(this,"lblRound8Note",new iL(xG.getValueReplace("GWT_21","#",8,"8강전 종료 후 매칭 예정"),fD.COLOR_WHITE)),Kt(this,"lblRound4Note",new iL(xG.getValueReplace("GWT_21","#",4,"4강전 종료 후 매칭 예정"),fD.COLOR_WHITE)),this.initialize()} + initialize(){ + this.drawTournament()} + drawTournament(){ + const t=(new Dii).width-Dii.LINE_W,i=35,s=[]; + for(let l=0; + l<6; + l++){ + const t=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_List_01"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30} + ); + t.width=Dii.BG_W+10,t.height=2*Dii.BG_H+5+10,this.addChild(t),s.push(t)} + this.lblRound8.x=i+.5*(2*t+20-this.lblRound8.width),this.lblRound8.y=35,this.addChild(this.lblRound8); + let e=this.lblRound8.y+this.lblRound8.height+10,n=e,h=0,r=0,o=!1; + for(let l=0; + l<8; + l++){ + h=Math.floor(l/2),r=l%2,o=0==h||2==h; + const s=new Dii; + n=0==h||1==h?e:e+2*(s.height+5)+30,s.x=o?i:i+t+20,s.y=n+(s.height+5)*r,s.hideLine("right"),this.addChild(s),this.teamSub8.push(s)} + for(let l=0; + l<4; + l++)s[l].x=this.teamSub8[2*l].x-5,s[l].y=this.teamSub8[2*l].y-5; + this.lblRound4.x=i+.5*(2*t+20-this.lblRound8.width),this.lblRound4.y=350,this.addChild(this.lblRound4),e=this.lblRound4.y+this.lblRound4.height+10,n=e; + for(let l=0; + l<4; + l++){ + h=Math.floor(l/2),r=l%2,o=0==h||2==h; + const s=new Dii; + n=0==h||1==h?e:e+2*(s.height+5)+30,s.x=o?i:i+t+20,s.y=n+(s.height+5)*r,s.hideLine("right"),this.addChild(s),this.teamSub4.push(s)} + for(let l=4; + l<6; + l++)s[l].x=this.teamSub4[2*(l-4)].x-5,s[l].y=this.teamSub4[2*(l-4)].y-5; + let a=s[1].x+s[1].width-s[0].x,c=s[2].y+s[2].height-s[0].y; + this.coverSub8.rect(s[0].x,s[0].y,a,c).fill({ + color:0,alpha:.7} + ),this.addChild(this.coverSub8),this.coverSub8.visible=!1,this.lblRound8Note.x=s[0].x+.5*(a-this.lblRound8Note.width),this.lblRound8Note.y=s[0].y+.5*(c-this.lblRound8Note.height),this.addChild(this.lblRound8Note),this.lblRound8Note.visible=!1,c=s[4].height,this.coverSub4.rect(s[4].x,s[4].y,a,c).fill({ + color:0,alpha:.7} + ),this.addChild(this.coverSub4),this.coverSub4.visible=!1,this.lblRound4Note.x=s[4].x+.5*(a-this.lblRound4Note.width),this.lblRound4Note.y=s[4].y+.5*(c-this.lblRound4Note.height),this.addChild(this.lblRound4Note),this.lblRound4Note.visible=!1} + updateLayout(){ + } + async setData(){ + let t; + const i=Hii.getInstance(),s=i.dataRound2Loser,e=i.dataRound3Loser; + for(let n=0; + n<4; + n++)t=s[n],t?(this.teamSub8[2*n].setData(t,"A"),this.teamSub8[2*n+1].setData(t,"B"),this.coverSub8.visible=!1,this.lblRound8Note.visible=!1):(this.teamSub8[2*n].setData(null),this.teamSub8[2*n+1].setData(null),this.coverSub8.visible=!0,this.lblRound8Note.visible=!0); + for(let n=0; + n<2; + n++)t=e[n],t?(this.teamSub4[2*n].setData(t,"A"),this.teamSub4[2*n+1].setData(t,"B"),this.coverSub4.visible=!1,this.lblRound4Note.visible=!1):(this.teamSub4[2*n].setData(null),this.teamSub4[2*n+1].setData(null),this.coverSub4.visible=!0,this.lblRound4Note.visible=!0)} + } + ; + Vt(Bii,"GuildWarTournamentSubView"); + let Uii=Bii; + const Fii=class t extends RKt{ + constructor(){ + super(),Kt(this,"btnGuide"),Kt(this,"topBg"),Kt(this,"lblRound",new iL("진행중 라운드",fD.DEFAULT_COLOR)),Kt(this,"lblRoundCurrent",new iL("16강",fD.COLOR_BRIGHT_ORANGE)),Kt(this,"lblRemain",new iL("남은 시간",fD.DEFAULT_COLOR)),Kt(this,"lblRemainTime",new iL("00:00:00",fD.COLOR_BRIGHT_GREEN)),Kt(this,"btnReward",new IB("UI_Guild","Btn_TreasureBox_Information",.9)),Kt(this,"btnMain",new YKt(xG.getText("GAME_412","메인"),105)),Kt(this,"btnSub",new YKt(xG.getText("GWT_19","서브"),105)),Kt(this,"tabs"),Kt(this,"activeIndex",0),Kt(this,"container",new Ge),Kt(this,"mainView",new Gii),Kt(this,"subView",new Uii),Kt(this,"dataRound1",[]),Kt(this,"dataRound2",[]),Kt(this,"dataRound3",[]),Kt(this,"dataRound4",[]),Kt(this,"dataRound2Loser",[]),Kt(this,"dataRound3Loser",[]),Kt(this,"endTime",0),Kt(this,"count",0),Kt(this,"_currentView",null),this.height=VA.safeHeight-N$t.getInstance().height-.3*Qhi.getInstance().height,this.initialize(),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + initialize(){ + this.outSideClickHide=!0,this.setTitle(xG.getText("GWT_1","서버 대항전")),this.btnGuide=new IB("UI_Ekkorr","UI_Alarm"),this.btnGuide.x=40,this.btnGuide.y=this.txtTitle.y+.5*(this.txtTitle.height-this.btnGuide.height)+2,this.addChild(this.btnGuide),this.btnGuide.on("pointertap",()=>{ + Sii.getInstance().showGuide()} + ),this.topBg=new He(QA.getTexture("UI","Popup_Bg_01")),this.topBg.width=535,this.topBg.x=20,this.topBg.y=70,this.addChild(this.topBg),this.lblRound.align="center",this.lblRound.x=this.topBg.x+.5*(.33*this.topBg.width-this.lblRound.width),this.lblRound.y=this.topBg.y+.5*(this.topBg.height-this.lblRound.height),this.addChild(this.lblRound),this.lblRoundCurrent.y=this.lblRound.y,this.lblRoundCurrent.textColor=fD.COLOR_BRIGHT_ORANGE,this.addChild(this.lblRoundCurrent),this.lblRemain.align="center",this.lblRemain.x=320+.5*(.5*this.topBg.width-this.lblRemain.width),this.lblRemain.y=this.topBg.y+.5*(this.topBg.height-this.lblRemain.height),this.addChild(this.lblRemain),this.lblRemainTime.y=this.lblRemain.y,this.lblRemainTime.textColor=fD.COLOR_BRIGHT_GREEN,this.addChild(this.lblRemainTime),this.btnReward.x=this.topBg.x+this.topBg.width+2,this.btnReward.y=this.topBg.y+.5*(this.topBg.height-this.btnReward.height)+2,this.addChild(this.btnReward),this.btnReward.on("pointerup",this.onRewardBtn,this),this.tabs=[this.btnMain,this.btnSub]; + for(let t=0; + t<this.tabs.length; + t++){ + const i=this.tabs[t]; + this.addChild(i); + const s=t; + i.onClick=()=>this.switchTab(s)} + this.layoutTabs(),this.addChild(this.container)} + switchTab(t){ + this.activeIndex=t; + for(let i=0; + i<this.tabs.length; + i++)this.tabs[i].selected=i===t; + switch(t){ + case 0:this.mainView.setData(),this.currentView=this.mainView; + break; + case 1:this.subView.setData(),this.currentView=this.subView} + this.updateLayout()} + async onRewardBtn(){ + await ID.loadRewardBook(),0!=ID.rewardBattleList.length&&Nii.getInstance().showGuide()} + layoutTabs(){ + const t=this.width,i=this.topBg.y+this.topBg.height+5; + let s=this.tabs.length>0?(t-46-2)/this.tabs.length:200; + for(const n of this.tabs)n.fitWithinWidth(s,50); + let e=23; + for(let n=0; + n<this.tabs.length; + n++){ + const t=this.tabs[n]; + e=23+(s+2)*n,t.x=e,t.y=i} + } + async setData(){ + const t=ID.getTournamentSchedule(); + if(null==t)return; + await ID.loadRewardBook(); + let i=xG.getText("GWT_1","서버 대항전"),s=1==t.split?"Mid":"Final"; + i+=` (Season ${ + t.season} + - ${ + s} + )`,this.setTitle(i),this.txtTitle.x=this.topBg.x+.5*(this.topBg.width-this.txtTitle.width); + const e=await lD.getInstance().guildWar.getTournamentInfo(!0); + if(e&&!1===e.success&&"INVALID_GUILDWAR_TOURNAMENT_TIME"===e.error){ + this.hide(); + let t=xG.getText("COMMON_83","잠시 후에 이용해 주세요."); + return void yG.getInstance().show(t)} + ID.roundSchedule=null==e?void 0:e.body.schedule,ID.tournamentList=null==e?void 0:e.body.tournaments; + let n,h=ID.tournamentList.length; + for(let o=0; + o<h; + o++)n=ID.tournamentList[o],1==n.round?this.dataRound1.push(n):2==n.round?n.matchId<5?this.dataRound2.push(n):this.dataRound2Loser.push(n):3==n.round?n.matchId<3?this.dataRound3.push(n):this.dataRound3Loser.push(n):this.dataRound4.push(n); + let r=xG.getText("GWT_3","16강"); + ID.roundSchedule&&(this.endTime=new Date(ID.roundSchedule.endAt).getTime(),2==ID.roundSchedule.round?r=xG.getText("GWT_4","8강"):3==ID.roundSchedule.round?r=xG.getText("GWT_5","4강"):4==ID.roundSchedule.round&&(r=xG.getText("GWT_7","결승전"))),this.lblRoundCurrent.text=`${ + r} + `,this.lblRound.text="⚔️ "+xG.getText("GWT_2","진행중 라운드")+" : ",this.lblRound.y=this.topBg.y+.5*(this.topBg.height-this.lblRound.height),this.lblRoundCurrent.y=this.topBg.y+.5*(this.topBg.height-this.lblRoundCurrent.height),this.lblRound.x=this.topBg.x+.5*(.5*this.topBg.width-(this.lblRound.width+this.lblRoundCurrent.width)),this.lblRoundCurrent.x=this.lblRound.x+this.lblRound.width,this.lblRemain.text="⏰ "+xG.getText("COMMON_29","남은 시간")+" : ",this.onEnterUpdate(),this.lblRemain.y=this.topBg.y+.5*(this.topBg.height-this.lblRemain.height),this.lblRemainTime.y=this.topBg.y+.5*(this.topBg.height-this.lblRemainTime.height),this.lblRemain.x=this.topBg.x+.5*this.topBg.width+.5*(.5*this.topBg.width-(this.lblRemain.width+this.lblRemainTime.width)),this.lblRemainTime.x=this.lblRemain.x+this.lblRemain.width,this.updateLayout(),this.switchTab(this.activeIndex)} + updateLayout(){ + this.container.y=this.tabs[0].y+this.tabs[0].height+10}
HeroSubView 7 hunks, 173 statements
- super(),Kt(this,"bg"),Kt(this,"btnHire",new c$t("고용",120)),Kt(this,"icons",[]),Kt(this,"vos",[]),Kt(this,"mainContainer",new Ge),Kt(this,"costList",[300,600,900,1200,1500]),Kt(this,"posList",[0,1,2,3,4]),Kt(this,"selectedIndex",-1),this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30} - ),this.bg.width=630,this.bg.height=74,this.mainContainer.addChild(this.bg); - let t=2; - for(let i=0; - i<5; - i++){ - const s=new u5; - s.setMode(c5.ROSTER),s.scale=.85,s.x=t,s.y=.5*(this.bg.height-s.height),this.mainContainer.addChildAt(s,1),this.icons.push(s),this.vos.push(bx.getVO()),t+=s.width-10,this.posList[i]=t} - this.btnHire.text=CG.getText("GAME_64","배치"),this.btnHire.height=60,this.btnHire.x=this.bg.width-this.btnHire.width-5,this.btnHire.y=.5*(this.bg.height-this.btnHire.height)-3,this.mainContainer.addChild(this.btnHire),this.btnHire.on("pointertap",this.onHire,this),this.addChild(this.mainContainer)} - setHireEnabled(t){ - this.btnHire.activated=t} - static refreshAllHireButtons(){ - const i=Bqt.getInstance().getItems(),s=!t.isHiring; - for(const t of i)t.setHireEnabled(s)} - async onHire(i){ - if(t.isHiring)return; - let s=-1; - for(let t=this.icons.length-1; - t>=0; - t--)if(this.icons[t].active){ - s=t; - break} - if(-1===s)return void RF.getInstance().showMessage(CG.getText("GAME_49","보유한 영웅이 없습니다.")); - this.selectedIndex=s; - const e=this.getHireKindnumAndTrans(this.selectedIndex),n=e.hireKindNum,h=e.hireTrans; - e.baseKindNum; - const r=wx.getInstance(); - if(0!==n)if(r.list.length>=ML.maxTeamSlots)ML.maxTeamSlots<10?RF.getInstance().showMessage(CG.getText("GAME_50","영웅을 배치할 슬롯이 없습니다.")+"\n"+CG.getText("GAME_51","슬롯을 추가로 확장해주세요.")):RF.getInstance().showMessage(CG.getText("GAME_50","영웅을 배치할 슬롯이 없습니다.")+"\n"+CG.getValueReplace("GAME_52","##",10,"최대 10명까지 배치할 수 있습니다.")); - else{ - t.isHiring=!0,t.refreshAllHireButtons(); - try{ - const t=await rD.getInstance().hero.addToTeam(n,h,!0); - if(0==t.success)return void wG.getInstance().showError(t); - ML.setUserInfo(t.body),$F.getInstance().updateAll(),Bqt.getInstance().setData(),Pqt.getInstance().update(); - const i=t.body.addedHeroId,s=r.getVOWithId(i); - s&&Nri.getInstance().hireHero(s),rYt.getInstance().setData()} - finally{ - t.isHiring=!1,t.refreshAllHireButtons()} - dYt.getInstance().isRunning&&dYt.getInstance().tutorialIndex==dYt.TUTORIAL_INDEX_WAVE0&&dYt.getInstance().highlightHeroHireButton()} - else RF.getInstance().showMessage(CG.getText("GAME_49","보유한 영웅이 없습니다."))} - getHireKindnumAndTrans(t){ - var i; - const s=this.data,e=wx.getInstance(),n=e.getBookVO(s),h=(null==n?void 0:n.evolKindNum)??0,r=(null==(i=e.getOwnedUnitVO(s))?void 0:i.count)??0,o=e.getOwnedUnitVO(h),a=(null==o?void 0:o.count)??0; - let c=0,l=0; - if(0===t)r>0&&(c=s,l=0); - else if(1===t)a>0&&(c=h,l=0); - else{ - const i=t-2; - ((null==o?void 0:o.trans[i])??0)>0&&(c=h,l=i+1)} - return 0===c&&r>0&&(c=s,l=0),{ - hireKindNum:c,hireTrans:l,baseKindNum:s} - } - setData(i){ - this.data=i; - const s=i,e=wx.getInstance(),n=e.getBookVO(s),h=(null==n?void 0:n.evolKindNum)??0,r=e.getOwnedUnitVO(s),o=h>0?e.getOwnedUnitVO(h):void 0,a=(null==r?void 0:r.count)??0,c=(null==o?void 0:o.count)??0; - if(this.vos[0].kindNum=s,this.icons[0].setData(this.vos[0]),this.icons[0].setNumber(a),this.icons[0].active=a>0,h>0){ - this.vos[1].kindNum=h,this.vos[1].trans=0,this.icons[1].setData(this.vos[1]),this.icons[1].setNumber(c),this.icons[1].active=c>0; - for(let t=0; - t<3; - t++){ - this.vos[2+t].kindNum=h,this.vos[2+t].trans=t+1,this.icons[2+t].setData(this.vos[2+t]); - const i=(null==o?void 0:o.trans[t])??0; - this.icons[2+t].setNumber(i),this.icons[2+t].active=i>0} - } - else for(let t=1; - t<5; - t++)this.icons[t].active=!1; - if(0===this.selectedIndex&&0===a)this.selectedIndex=-1; - else if(1===this.selectedIndex&&0===c)this.selectedIndex=-1; - else if(this.selectedIndex>=2&&this.selectedIndex<=4){ - const t=this.selectedIndex-2; - 0===((null==o?void 0:o.trans[t])??0)&&(this.selectedIndex=-1)} - -1==this.selectedIndex&&fqt.getInstance().parent&&this.removeChild(fqt.getInstance()),this.btnHire.text=CG.getText("GAME_64","배치"),this.btnHire.x=this.bg.width-this.btnHire.width-5,this.btnHire.activated=!t.isHiring,this.updateCache()} - updateCache(){ - } - clearCache(){ - } - get height(){ - return this.bg.height+3} - onClick(t,i){ - for(let s=0; - s<this.posList.length; - s++)if(this.posList[s]>t&&this.icons[s].active){ - const t=this.getHireKindnumAndTrans(s); - return void Jqt.getInstance().showInRoster(t.hireKindNum,t.hireTrans)} - } - reset(){ - this.selectedIndex=-1} - onLongClick(t,i){ - for(let s=0; - s<this.posList.length; - s++)if(this.posList[s]>t&&this.icons[s].active){ - const t=this.getHireKindnumAndTrans(s); - Jqt.getInstance().showInRoster(t.hireKindNum,t.hireTrans); - break} - } - } - ; - Vt(Dqt,"HeroRosterItemRenderer"),Kt(Dqt,"isHiring",!1); - let Lqt=Dqt; - const Gqt=class t extends kzt{ - constructor(){ - super(),Kt(this,"list"),Kt(this,"emptyLabel"),Kt(this,"btnHirePoint",new gi),Kt(this,"btnHirelPointInitialized",!1),this.list=new I5(Lqt,630,VA.listHeight),this.list.x=5,this.list.y=lYt.getInstance().height,this.emptyLabel=new JD(CG.getText("GAME_337","병영에 대기중인 영웅이 없습니다."),10066329,cD.MENU_LABEL_OPTION),this.emptyLabel.x=320-this.emptyLabel.width/2,this.emptyLabel.y=this.list.y+80,this.emptyLabel.visible=!1,this.addChild(this.list),this.addChild(this.emptyLabel),this.addChild(lYt.getInstance()),this.on("removed",this.onRemoved,this)} + super(),Kt(this,"list"),Kt(this,"presetBar"),Kt(this,"lblMessage",new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_17)),Kt(this,"cnt",0),Kt(this,"lastGold",-1),Kt(this,"lastUgMult",-1),Kt(this,"isMultiLevel",!1),this.presetBar=new ZYt,this.presetBar.x=5,this.presetBar.y=bqt.getInstance().height,this.presetBar.visible=!1,this.presetBar.onApplied=()=>this.setData(),this.list=new P5(qYt,630,VA.listHeight),this.list.x=5,this.list.y=bqt.getInstance().height,this.lblMessage.y=189; + const t=this.lblMessage.getStyle(); + t.fontSize=18,this.lblMessage.setStyle(t),this.addChild(this.list),this.addChild(this.lblMessage),this.addChild(this.presetBar),this.addChild(bqt.getInstance()),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)}
+ togglePresetBar(){ + this.setPresetBarVisible(!this.presetBar.visible)} + setPresetBarVisible(t){ + this.presetBar.visible=t; + const i=bqt.getInstance().height; + if(t){ + this.presetBar.update(); + const t=this.presetBar.barHeight+4; + this.list.y=i+t,this.list.setListHeight(VA.listHeight-t)} + else this.list.y=i,this.list.setListHeight(VA.listHeight)} + get isPresetBarVisible(){ + return this.presetBar.visible} + setMultiLevel(t){ + let i=this.list.getItemList(); + if(t)for(let s=0; + s<i.length; + s++)i[s].showMultiLevel(); + else for(let s=0; + s<i.length; + s++)i[s].hideMultiLevel()} + onAdded(){ + LM.getInstance().add(this.onFrame,this)}
- lYt.getInstance().resetFilter()} - get className(){ - return"HeroRosterView"} - getItems(){ + LM.getInstance().remove(this.onFrame,this),Bzt.getInstance().unregisterListItemsGetter("Hero"),qYt.cleanup()} + getListItems(){
- setData(){ - lYt.getInstance().setData(),this.updateList()} - updateList(){ - const t=lYt.getInstance().selectedTribes,i=wx.getInstance(),s=new Set; - for(const r of i.ownedUnitList){ - const e=i.getBookVO(r.kindNum); - e&&0!=t.includes(e.tribe)&&e.base>0&&s.add(e.base)} - const e=wx.getInstance(),n=Array.from(s).sort((t,i)=>{ - const s=e.getBookVO(t),n=e.getBookVO(i); - return s&&n?s.tribe!=n.tribe?s.tribe-n.tribe:n.grade-s.grade:1} - ),h=this.list.getDataLen(); - if(this.list.dataProvider=n,this.emptyLabel.visible=0===n.length,h>this.list.getDataLen()){ - const t=Math.floor(Math.abs(this.list.getContainerY())/74); - this.list.scrollTo(t)} - } - onFilterChanged(){ - const t=this.list.getItemList(),i=t.length; + onFrame(){ + var t; + if(null==(null==(t=this.parent)?void 0:t.parent))return LM.getInstance().remove(this.onFrame,this),void qYt.cleanup(); + this.isMultiLevel&&qYt.checkAutoClose(this); + const i=TL.gold,s=VR.getInstance().getGameplayMultiplier(kR.UnitUpgradeGold),e=s!==this.lastUgMult; + if(i===this.lastGold&&!e)return; + this.lastGold=i,this.lastUgMult=s; + const n=this.list.getItemList();
- s<i; - ++s)t[s].reset(); - this.updateList()} + h<n.length; + h++)e&&n[h].recalculateCosts(s),n[h].refreshActivation(i); + ++this.cnt>60&&(this.cnt=0,this.updateRobsterBtnRedDot())} + updateRobsterBtnRedDot(){ + const t=wx.getInstance().lastBuyRefreshTime; + let i=3600-.001*(tx.time-t); + i<=0&&(i=0),i>0?bqt.getInstance().hideHireBtnRedDot():bqt.getInstance().showHireBtnRedDot()} + setData(){ + LM.getInstance().add(this.onFrame,this),this.lastGold=-1,this.lastUgMult=-1,Bzt.getInstance().registerListItemsGetter(()=>this.getListItems(),"Hero"),bqt.getInstance().update(),bqt.getInstance().updateLanguage(); + let t=[]; + for(let i=0; + i<wx.getInstance().list.length; + i++){ + const s=wx.getInstance().list[i]; + !s||s.kindNum<=0||t.push(s)} + t.sort((t,i)=>t.enhance!==i.enhance?i.enhance-t.enhance:t.level!==i.level?i.level-t.level:t.grade!==i.grade?i.grade-t.grade:t.tribe-i.tribe),0===t.length?(this.lblMessage.text=xG.getText("GAME_1200","배치된 영웅이 없습니다."),this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.lblMessage.visible=!0,this.list.visible=!1):(this.lblMessage.visible=!1,this.list.visible=!0,this.list.dataProvider=t),this.setMultiLevel(!1),this.isMultiLevel=!1,this.presetBar.visible&&this.presetBar.update(),this.updateRobsterBtnRedDot()} + get className(){ + return"HeroSubView"}
- this.emptyLabel.text=CG.getText("GAME_337","병영에 대기중인 영웅이 없습니다."),this.emptyLabel.x=320-this.emptyLabel.width/2,this.setData()} - getBtnHirePoint(){ - if(0==this.btnHirelPointInitialized){ - this.btnHirelPointInitialized=!0; - const t=this.getItems()[0].btnHire; - this.btnHirePoint.x=mYt.getInstance().x+this.list.x+t.x,this.btnHirePoint.y=mYt.getInstance().y+40+this.list.y+t.y} - return this.btnHirePoint} + this.setData()}
- Vt(Gqt,"HeroRosterView"),Kt(Gqt,"instance"); + Vt(yqt,"HeroSubView"),Kt(yqt,"instance");
TutorialController 4 hunks, 166 statements
- Kt(this,"active",!1),Kt(this,"checking",!1),Kt(this,"frameSkip",0),Kt(this,"currentSteps",[]),Kt(this,"cachedCondition",null),Kt(this,"pointingDelayTimer",null),Kt(this,"pointingDelayed",!1),Kt(this,"listItemsGetter",null),Kt(this,"bottomMenuGetter",null),Kt(this,"popupButtonGetter",null),Kt(this,"subMenuButtonGetter",null),Kt(this,"currentSubViewName",""),Kt(this,"reviveButtonGetter",null),Kt(this,"rightMenuIndicatorButtonGetter",null),Kt(this,"dailyQuestButtonGetter",null),Kt(this,"petButtonGetter",null),Kt(this,"mineButtonGetter",null),Kt(this,"guildButtonGetter",null),Kt(this,"pendingParent",null),Kt(this,"pendingBtn",null)} + Kt(this,"isOpened",!0),Kt(this,"savedIndex",0),Kt(this,"tutorialIndex",0),Kt(this,"enableMissionGuide",!0),Kt(this,"bottomMenuUnlockList",[0,1,2,3,4,5]),Kt(this,"isHelpHeroPopupped",!1),Kt(this,"isHelpQuestPopupped",!1),Kt(this,"isHelpRevivePopupped",!1)}
+ get isRunning(){ + return 0!=this.isOpened&&this.tutorialIndex>0} + async startTutorial(){ + 0!=this.isOpened&&(TL.numRevive>0||(this.savedIndex=Number(await $A.getTutorialID()??0),TL.wave>this.savedIndex?1==TL.wave?(this.enableMissionGuide=!1,this.tutorialIndex!=t.TUTORIAL_INDEX_WAVE0&&(this.tutorialIndex=t.TUTORIAL_INDEX_WAVE0,await this.startTutorialWave0())):2==TL.wave?(this.enableMissionGuide=!1,this.tutorialIndex=TL.wave,await this.startTutorialWave2()):3==TL.wave?(this.enableMissionGuide=!1,this.tutorialIndex=t.TUTORIAL_INDEX_WAVE3,await this.startTutorialWave3()):(this.enableMissionGuide=!0,this.tutorialIndex=TL.wave,this.startTutorialWaveEtc()):1==TL.wave?(this.bottomMenuUnlockList=[2],Qhi.getInstance().onMenuClickByIndex(2),Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),Ini.getInstance().opened=!1,this.enableMissionGuide=!1):2==TL.wave?(this.bottomMenuUnlockList=[1,2],Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList)):3==TL.wave?(this.bottomMenuUnlockList=[0,1,2],Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),this.enableMissionGuide=!0,Bzt.getInstance().init()):(this.bottomMenuUnlockList=[0,1,2],Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList))))} + async startTutorialWave0(){ + this.bottomMenuUnlockList=[2],Qhi.getInstance().onMenuClickByIndex(2),Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),Ini.getInstance().opened=!1,tB.getInstance().stop(),lL.getInstance().stopUpdate(),Nni.getInstance().onCompleteHandler=this.onTurotial0Toast1Complete.bind(this); + const t=xG.getText("DIALOGUE_TEXT_75","윽.. 머리야.. 여긴 어디지? 뭔가 익숙한데..."); + Nni.getInstance().show("L_FRO",t)} + onTurotial0Toast1Complete(){ + const t=rVt.getInstance().getMainList(); + t&&(LKt.getInstance().onHideHandler=this.onHelpCastlePopupHide.bind(this),LKt.getInstance().showWith(t[0].main,2,!0,!1))} + onHelpCastlePopupHide(){ + loi.getInstance().startTutorial0Wave(),Nni.getInstance().onCompleteHandler=this.onTurotial0Toast2Complete.bind(this); + const t=xG.getText("DIALOGUE_TEXT_76","저 슬라임 녀석들.. 성을 공격하러 오는 것 같은데?"); + Nni.getInstance().show("L_SUR",t)} + onTurotial0Toast2Complete(){ + tB.getInstance().stop(),this.bottomMenuUnlockList.push(1),Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList); + const t=Qhi.getInstance().getMenu(1),i=Qhi.getInstance().getHeroPoint(); + Zjt.getInstance().show(i.x,i.y,t.width,t.height)} + showHeroHelpPopup(){ + this.isHelpHeroPopupped||this.tutorialIndex==t.TUTORIAL_INDEX_WAVE0&&(Zjt.getInstance().hide(),setTimeout(()=>{ + const t=rVt.getInstance().getMainList(); + t&&(LKt.getInstance().onHideHandler=this.highlightHeroRosterButton.bind(this),LKt.getInstance().showWith(t[1].main,0,!0,!1),this.isHelpHeroPopupped=!0)} + ,100))} + highlightHeroRosterButton(){ + const t=bqt.getInstance().btnRoaster,i=bqt.getInstance().getBtnRosterPoint(); + Zjt.getInstance().show(i.x+.5*t.width,i.y+.5*t.height,t.width,t.height)} + highlightHeroHireButton(){ + const t=jqt.getInstance().getItems(); + if(t.length<1)return void this.highlightHeroHireCloseButton(); + const i=t[0].btnHire,s=jqt.getInstance().getBtnHirePoint(); + Zjt.getInstance().show(s.x+.5*i.width,s.y+.5*i.height,i.width,i.height)} + highlightHeroHireCloseButton(){ + const t=kqt.getInstance().btnClose,i=kqt.getInstance().getBtnClosePoint(); + Zjt.getInstance().show(i.x+.5*t.width,i.y+.5*t.height,t.width,t.height)} + clearTutorialWave0(){ + Zjt.getInstance().hide(),tB.getInstance().start()} + async endTutorialWave0(){ + await $A.saveTutorialID(String(t.TUTORIAL_INDEX_WAVE0)),this.savedIndex=1} + async startTutorialWave2(){ + this.bottomMenuUnlockList=[1,2],Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),Qhi.getInstance().onMenuClickByIndex(1),Ini.getInstance().opened=!1} + async startTutorialWave3(){ + if(this.bottomMenuUnlockList=[1,2],Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),Ini.getInstance().opened=!1,JD.getInstance().npcDialogue){ + const t=[],i=new iVt; + i.code="L_SAD",i.text=xG.getText("DIALOGUE_TEXT_5","영웅들을 무장시키고 성벽을 보강하려니... 생각보다 자금이 턱없이 부족하군."),i.position=1,t.push(i); + const s=new iVt; + s.code="S_SMI",s.text=xG.getText("DIALOGUE_TEXT_6","이해합니다, 성주임. 마침 성주님의 명성을 듣고 도움을 청하는 이들이 줄을 섰답니다. [퀘스트]를 해결해 주시면 그들은 기꺼이 금화를 내놓을 거예요."),s.position=2,t.push(s),Nni.getInstance().onCompleteHandler=this.onTurotial3ToastComplete.bind(this),t.length>0&&Nni.getInstance().showDialogues(t)} + else this.onTurotial3ToastComplete()} + onTurotial3ToastComplete(){ + this.bottomMenuUnlockList=[0,1,2],Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),lL.getInstance().startUpdate(); + const t=Qhi.getInstance().getMenu(0),i={ + x:t.x,y:t.y,width:t.width,height:t.height} + ; + Azt.getInstance().showOnTarget(Qhi.getInstance(),i)} + showQuestHelpPopup(){ + this.isHelpQuestPopupped||setTimeout(()=>{ + const t=rVt.getInstance().getMainList(); + t&&(LKt.getInstance().onHideHandler=this.endTutorialWave3.bind(this),LKt.getInstance().showWith(t[2].main,0,!0,!1),this.isHelpQuestPopupped=!0)} + ,100)} + async endTutorialWave3(){ + await $A.saveTutorialID(String(t.TUTORIAL_INDEX_WAVE3)),this.savedIndex=t.TUTORIAL_INDEX_WAVE3,this.enableMissionGuide=!0,Bzt.getInstance().init(),gVt.getInstance().doAccountCreate()} + async startTutorialWaveEtc(){ + Ini.getInstance().opened=!1,TL.wave>=10?this.bottomMenuUnlockList=[0,1,2,5]:this.bottomMenuUnlockList=[0,1,2],Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList)} + async startTutorialRevive(){ + if(0!=this.isOpened&&0==this.isHelpRevivePopupped){ + const t=rVt.getInstance().getMainList(); + t&&(LKt.getInstance().onHideHandler=this.endTutorialRevive.bind(this),LKt.getInstance().showWith(t[3].main,0,!0,!1),this.isHelpRevivePopupped=!0)}
- if(t)continue; - const i=n.split("|"),h=Number(i[0])||0,r=Number(i[1])||0; - this.showWithDelay(e,{ - x:h,y:r,width:0,height:0} - )} - else if(n&&"-1"!==n){ - const t=e[n]; - if(!t)continue; - if("activated"in t&&!1===t.activated)return yni.getInstance().hideFromTarget(),void this.cancelPointingDelay(); - this.showWithDelay(e,t)} - return} - if("subMenu"===s.action){ - const t=s.param; - if(t&&this.currentSubViewName.toLowerCase().includes(t.replace("btn","").toLowerCase()))continue; - if(this.subMenuButtonGetter&&t&&"-1"!==t){ - const i=this.subMenuButtonGetter(t); - i&&this.showWithDelay(i.parent,i.btn)} - return} - if("popup"===s.action){ - if(!this.popupButtonGetter)return; - const t=s.param; - if(t&&"-1"!==t){ - const i=this.popupButtonGetter(t); - i&&this.showWithDelay(i.parent,i.btn)} - return} - if("revive"===s.action){ - if(!this.reviveButtonGetter)return; - const t=s.param; - if(t&&"-1"!==t){ - const i=this.reviveButtonGetter(t); - i&&this.showWithDelay(i.parent,i.btn)} - return} - if("dailyQuest"===s.action){ - if(!gni.getInstance().opened){ - if(!this.rightMenuIndicatorButtonGetter)return; - const t=this.rightMenuIndicatorButtonGetter("indicatorArea"); - return void(t&&this.showWithDelay(t.parent,t.btn))} - if(!this.dailyQuestButtonGetter)return; - const t=s.param; - if(t&&"-1"!==t){ - const i=this.dailyQuestButtonGetter(t); - i&&this.showWithDelay(i.parent,i.btn)} - return} - if("spiritBattle"===s.action){ - if(!gni.getInstance().opened){ - if(!this.rightMenuIndicatorButtonGetter)return; - const t=this.rightMenuIndicatorButtonGetter("indicatorArea"); - return void(t&&this.showWithDelay(t.parent,t.btn))} - if(3==t.petStep)return i.hideFromTarget(),void this.cancelPointingDelay(); - if(0==t.petStep){ - if(!this.petButtonGetter)return; - const t=s.param; - if(t&&"-1"!==t){ - const i=this.petButtonGetter(t); - i&&this.showWithDelay(i.parent,i.btn)} - } - else if(1==t.petStep){ - const t="tabPlateau"; - if(this.subMenuButtonGetter){ - const i=this.subMenuButtonGetter(t); - i&&this.showWithDelay(i.parent,i.btn)} - } - else if(2==t.petStep){ - if(!this.listItemsGetter)return; - const t=this.listItemsGetter()[0]; - if(!t)return; - const i=t.children[0],s=i.x+.5*i.width,e=i.y+.5*i.height; - this.showWithDelay(t,{ - x:s,y:e,width:0,height:0} - )} - return} - if("mineClear"===s.action){ - if(!gni.getInstance().opened){ - if(!this.rightMenuIndicatorButtonGetter)return; - const t=this.rightMenuIndicatorButtonGetter("indicatorArea"); - return void(t&&this.showWithDelay(t.parent,t.btn))} - if(!this.mineButtonGetter)return; - const t=s.param; - if(t&&"-1"!==t){ - const i=this.mineButtonGetter(t); - i&&this.showWithDelay(i.parent,i.btn)} - return} - if("guildJoin"===s.action){ - if(!gni.getInstance().opened){ - if(!this.rightMenuIndicatorButtonGetter)return; - const t=this.rightMenuIndicatorButtonGetter("indicatorArea"); - return void(t&&this.showWithDelay(t.parent,t.btn))} - if(!this.guildButtonGetter)return; - const t=s.param; - if(t&&"-1"!==t){ - const i=this.guildButtonGetter(t); - i&&this.showWithDelay(i.parent,i.btn)} - return} - } - i.hideFromTarget(),this.cancelPointingDelay()} - isActive(){ - return this.active} + async endTutorialRevive(){ + this.bottomMenuUnlockList=[0,1,2,3,4,5],Qhi.getInstance().hideLockIconsTo(this.bottomMenuUnlockList),await $A.saveTutorialID(String(t.TUTORIAL_INDEX_REVIVE))} + async showHeroHelpPopupByPresent(t){ + if(t<5||t>7)return; + const i=rVt.getInstance().getMainList(); + i&&(LKt.getInstance().onHideHandler=this.endTutorialWave3.bind(this),LKt.getInstance().showWith(i[t].main,0,!0,!1))} + async showSecretaryHelpPopup(){ + if("Y"===await $A.getSecretaryHelpPopupped())return; + const t=rVt.getInstance().getMainList(); + t&&t[8]&&(LKt.getInstance().showWith(t[8].main,0,!0,!1),await $A.saveSecretaryHelpPopupped("Y"))}
- Vt(mni,"MissionGuideController"),Kt(mni,"instance"),Kt(mni,"CHECK_INTERVAL",10),Kt(mni,"POINTING_DELAY",1e3); + Vt(Pni,"TutorialController"),Kt(Pni,"instance"),Kt(Pni,"TUTORIAL_INDEX_WAVE0",1),Kt(Pni,"TUTORIAL_INDEX_WAVE3",3),Kt(Pni,"TUTORIAL_INDEX_REVIVE",100);
MissionGuideDataManager 2 hunks, 146 statements
- Kt(this,"acc",[0])} + Kt(this,"currentMissionId",1),Kt(this,"rewardPending",!1),Kt(this,"missionList",[]),Kt(this,"stepList",[]),Kt(this,"petStep",0)}
- setBookData(t,i){ - "1"===AL.getInstance().getClientData("MEDAL_ENHANCE_USE_FORMULA")&&i&&i.length>0?this.buildFromSegments(i):this.acc=[0,...String(t[0].medal).split("|").map(Number)]} - buildFromSegments(t){ - const i=[...t].map(t=>({ - startLevel:Number(t.startLevel??1),exp:Number(t.exp??1),offset:Number(t.offset??0)} - )).sort((t,i)=>t.startLevel-i.startLevel),s=Math.max(wx.HERO_MAX_ENHANCE,wx.CASTLE_MAX_ENHANCE),e=new Array(s+1); - e[0]=0; - let n=0; + setBookData(t){ + if(this.missionList=[],t)for(let i=0; + i<t.length; + i++){ + const s=t[i],e=new mzt; + e.kindNum=Number(s.kindNum)||0,e.desc=s.desc||"",e.gem=Number(s.gem)||0,e.condition=s.condition||"",e.sortOrder=Number(s.sortOrder)||0,this.missionList.push(e)} + } + setStepBookData(t){ + if(this.stepList=[],t)for(let i=0; + i<t.length; + i++){ + const s=t[i],e=new vzt; + e.id=Number(s.id)||0,e.step=Number(s.step)||0,e.action=s.action||"",e.target=Number(s.target)??-1,e.param=s.param||"-1",this.stepList.push(e)} + } + getCurrentMission(){ + return this.missionList.find(t=>t.kindNum===this.currentMissionId)||null} + getCurrentSteps(){ + return this.stepList.filter(t=>t.id===this.currentMissionId).sort((t,i)=>t.step-i.step)} + getSteps(t){ + return this.stepList.filter(i=>i.id===t).sort((t,i)=>t.step-i.step)} + isAllCompleted(){ + if(0===this.missionList.length)return!0; + const t=Math.max(...this.missionList.map(t=>t.kindNum)); + return this.currentMissionId>t} + async loadInfo(){ + const t=await lD.getInstance().missionGuide.getInfo(); + t.success&&t.body&&(TL.setUserInfo(t.body),t.body.missionGuide&&(this.currentMissionId=t.body.missionGuide.currentMissionId,this.rewardPending=t.body.missionGuide.rewardPending))} + async completeMission(t){ + const i=await lD.getInstance().missionGuide.complete(t); + return!(!i.success||!i.body||(i.body.missionGuide&&(this.currentMissionId=i.body.missionGuide.currentMissionId,this.rewardPending=i.body.missionGuide.rewardPending),0))} + async claimReward(t){ + var i; + const s=await lD.getInstance().missionGuide.claim(t); + return s.success&&s.body?(TL.setUserInfo(s.body),s.body.missionGuide&&(this.currentMissionId=s.body.missionGuide.currentMissionId,this.rewardPending=s.body.missionGuide.rewardPending),(null==(i=s.body.reward)?void 0:i.gem)||0):0} + } + ; + Vt(fzt,"MissionGuideDataManager"),Kt(fzt,"instance"),Kt(fzt,"KINDNUM_DUNGEON",24),Kt(fzt,"KINDNUM_PVP",27),Kt(fzt,"KINDNUM_TOWER",28); + let pzt=fzt; + const gzt=class{ + constructor(){ + Kt(this,"kindNum",0),Kt(this,"desc",""),Kt(this,"gem",0),Kt(this,"condition",""),Kt(this,"sortOrder",0)} + getDescKey(){ + return`MISSION_GUIDE_DESC_${ + this.kindNum} + `} + } + ; + Vt(gzt,"MissionGuideVO"); + let mzt=gzt; + const wzt=class{ + constructor(){ + Kt(this,"id",0),Kt(this,"step",0),Kt(this,"action",""),Kt(this,"target",-1),Kt(this,"param","-1")} + } + ; + Vt(wzt,"MissionGuideStepVO"); + let vzt=wzt; + const _zt=class t extends Ge{ + constructor(){ + super(),Kt(this,"sp",new He),Kt(this,"count",0),Kt(this,"_height",82*1.2),this.addChild(this.sp)} + static async load(){ + this.ready||(await QA.generateTexture("LevelUp","ktx2",!1),this.textures=QA.getTextures("LevelUp","LevelUp"),this.ready=!0)} + static get(){ + const i=this.pool.length>0?this.pool.pop():new t; + return i.visible=!0,i} + static release(t){ + t.visible=!1,t.removeFromParent(),this.pool.push(t)} + play(i,s,e){ + this.x=s,this.y=e,this.scale.set(1.2),this.count=0,this.sp.texture=t.textures[0],LM.getInstance().add(this.onEnter,this),i.addChild(this),JL.getInstance().playSFX(JL.SFX_LEVEL_UP)} + onEnter(){ + this.count++,this.count<t.textures.length?this.sp.texture=t.textures[this.count]:(LM.getInstance().remove(this.onEnter,this),t.release(this))} + get height(){ + return this._height} + } + ; + Vt(_zt,"ClickEffect"),Kt(_zt,"pool",[]),Kt(_zt,"textures"),Kt(_zt,"ready",!1); + let bzt=_zt; + const yzt=class t extends Ge{ + constructor(){ + super(),Kt(this,"onVisibilityChanged",null),Kt(this,"bg"),Kt(this,"icon"),Kt(this,"lblGem"),Kt(this,"lblDesc"),Kt(this,"lblTitle"),Kt(this,"gem"),Kt(this,"onClaim",null),this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30} + ),this.bg.x=20,this.bg.width=380,this.bg.height=60,this.bg.alpha=.3,this.addChild(this.bg),this.icon=new He(QA.getTexture("UI_Ekkorr","UI_SKILL_BASE")),this.icon.x=0,this.icon.y=0,this.addChild(this.icon),this.gem=new He(QA.getTexture("UI_Ekkorr","UI_GEM")),this.gem.x=this.icon.x+.5*(this.icon.width-this.gem.width),this.gem.y=this.icon.y+.28*(this.icon.height-this.gem.height),this.addChild(this.gem),this.lblGem=new iL("10",52377,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblGem.textColor=fD.COLOR_DEEP_SKYBLUE,this.lblGem.x=.5*(this.icon.width-this.lblGem.width),this.lblGem.y=this.icon.height-this.lblGem.height-12,this.addChild(this.lblGem),this.lblTitle=new iL("[ 미션 - 1 ]",52377,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblTitle.textColor=fD.DEFAULT_COLOR,this.lblTitle.x=this.icon.x+this.icon.width,this.lblTitle.y=9,this.addChild(this.lblTitle),this.lblDesc=new iL("1번 퀘스트 레벨 5 달성",52377,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblDesc.textColor=fD.DEFAULT_COLOR,this.lblDesc.x=this.lblTitle.x,this.lblDesc.y=this.lblTitle.y+this.lblTitle.height+1,this.addChild(this.lblDesc),this.activated=!1,super.visible=!1,this.eventMode="static",this.cursor="pointer",this.on("pointertap",this.onClick,this)} + static getInstance(){ + return t.instance||(t.instance=new t),t.instance} + set visible(t){ + super.visible!==t&&(super.visible=t,this.onVisibilityChanged&&this.onVisibilityChanged(t))} + get visible(){ + return super.visible} + onClick(){ + pzt.getInstance().rewardPending&&this.onClaim&&(this.playClaimEffect(),this.onClaim())} + playClaimEffect(){ + bzt.get().play(this,this.icon.x+.5*this.icon.width-50,this.icon.y+.5*this.icon.height-60); + const t=this.gem.getGlobalPosition(),i=VA.stage.toLocal(t),s=i.x+.5*this.gem.width-14,e=i.y+.5*this.gem.height-20; + Xt(async()=>{ + const{ + RewardController:t} + =await Promise.resolve().then(()=>F4t); + return{ + RewardController:t} + } + ,void 0).then(({ + RewardController:t} + )=>{ + t.getInstance().getGem(s,e,10,4)} + )} + setData(t){ + this.lblGem.text=t.gem.toString(),this.lblGem.x=this.icon.x+.5*(this.icon.width-this.lblGem.width),this.lblTitle.text=`[ ${ + xG.getText("GAME_409","미션")} + ${ + t.sortOrder} + ]`,this.lblDesc.text=xG.getText(t.getDescKey(),t.desc)} + set activated(t){ + 1==t?(this.bg.tint=16777215,this.icon.tint=16777215,this.gem.tint=16777215,this.lblGem.textColor=fD.COLOR_DEEP_SKYBLUE):(this.bg.tint=10066329,this.icon.tint=10066329,this.gem.tint=10066329,this.lblGem.textColor=10066329)} + } + ; + Vt(yzt,"MissionGuide"),Kt(yzt,"instance"); + let Mzt=yzt; + const Ezt=class t extends Ge{ + constructor(){ + super(),Kt(this,"sp",new He),Kt(this,"frame",0),Kt(this,"frameCount",0),Kt(this,"playing",!1),Kt(this,"currentTarget",null),Kt(this,"itemsGetters",new Map),Kt(this,"heroDetailPopupGetter",null),Kt(this,"bottomMenuGetter",null),Kt(this,"checking",!1),Kt(this,"retired",!1),Kt(this,"onBattleSwitchBind"),this.eventMode="none",this.addChild(this.sp),this.sp.x=-24,this.sp.y=-34,this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} + static getInstance(){ + return t._instance||(t._instance=new t),t._instance} + static load(){ + this.textures||QA.hasSheet("ClickHand")&&(this.textures=QA.getTextures("ClickHand","ClickHand"))} + registerHeroDetailPopupGetter(t){ + this.heroDetailPopupGetter=t} + registerBottomMenuGetter(t){ + this.bottomMenuGetter=t} + onAdded(){ + this.setBattleSwitch(!0)} + onRemoved(){ + this.setBattleSwitch(!1)} + checkEnable(){ + this.retired||TL.numRevive>=2&&this.retire()} + startCheck(t,i){ + this.retired||(this.itemsGetters.set(t,i),this.checking||(this.checking=!0,LM.getInstance().add(this.onCheck,this)))} + stopCheck(t){ + this.itemsGetters.delete(t),0===this.itemsGetters.size&&this.checking&&(this.checking=!1,LM.getInstance().remove(this.onCheck,this)),this.hideFromTarget()} + retire(){ + this.retired||(this.retired=!0,this.hideFromTarget(),this.itemsGetters.clear(),this.checking&&(this.checking=!1,LM.getInstance().remove(this.onCheck,this)))} + onCheck(){ + const t=dzt.currentIndex; + 0===t&&this.checkQuest()||1===t&&this.checkHero()||2===t&&this.checkCastle()||this.hideFromTarget()} + checkQuest(){ + if(!this.itemsGetters.has(0))return!1; + const t=lL.getInstance(),i=1===TL.numRevive,s=i?3:4;
InventoryMenuIcon 1 hunks, 146 statements
+ const hYt=class extends Ge{ + constructor(t){ + super(),Kt(this,"index",-1),Kt(this,"bg"),Kt(this,"bgOn"),Kt(this,"icon"),Kt(this,"container"),Kt(this,"_selected",!0),Kt(this,"onClick"),this.container=new Ge,this.addChild(this.container),this.bg=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_01")),this.bg.width=52,this.bg.height=52,this.container.addChild(this.bg),this.bgOn=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_02")),this.bgOn.width=this.bg.width,this.bgOn.height=this.bg.height,this.container.addChild(this.bgOn),this.icon=new He(QA.getTexture("UI_Ekkorr",t)),this.icon.x=.5*(this.bg.width-this.icon.width),this.icon.y=.5*(this.bg.height-this.icon.height),this.container.addChild(this.icon),this.eventMode="dynamic",this.on("pointerdown",this.onDown,this),this.on("pointerup",this.onUp,this),this.on("pointerupoutside",this.onUp,this),this.on("pointertap",this.onTap,this),this.selected=!1,this.container.pivot.set(.5*this.bg.width,.5*this.bg.height)} + get width(){ + return this.bg.width} + get height(){ + return this.bg.height} + get selected(){ + return this._selected} + set selected(t){ + t!=this._selected&&(this._selected=t,this._selected?(this.bg.visible=!1,this.bgOn.visible=!0):(this.bg.visible=!0,this.bgOn.visible=!1))} + reset(){ + this._selected=!1,this.bg.visible=!this._selected,this.bgOn.visible=this._selected} + onDown(t){ + this.container.scale=.9} + onUp(t){ + this.container.scale=1} + onTap(t){ + JL.getInstance().playSFX(JL.SFX_NORMAL_CLICK),this.selected=!this._selected,this.onClick&&this.onClick(this.index)} + } + ; + Vt(hYt,"InventoryMenuIcon"); + let rYt=hYt; + const oYt=class t extends Ge{ + constructor(){ + super(),Kt(this,"bg"),Kt(this,"lblTitle"),Kt(this,"menus"),Kt(this,"_selectedIndex",-1),Kt(this,"onMenuClick"),this.bg=new eL,this.bg.setIndex(6),this.bg.width=640,this.bg.height=70,this.addChild(this.bg),this.lblTitle=new iL(xG.getText("GAME_219","인벤토리"),16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_20),this.lblTitle.x=10,this.lblTitle.y=10,this.addChild(this.lblTitle),this.menus=[]; + const t=["Inventory_Icon_Bag","Inventory_Icon_Hero","Inventory_Icon_Pet","Inventory_Icon_Relic"]; + let i,s=-1; + for(let e=t.length-1; + e>-1; + --e)i=new rYt(t[e]),i.index=e,-1==s&&(s=640-.5*i.width-15),i.x=s,i.y=.5*this.bg.height,this.addChild(i),this.menus.push(i),i.onClick=this.onMenuClickFunc.bind(this),s-=i.width+10; + this.menus.reverse()} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + get height(){ + return this.bg.height} + get selectedIndex(){ + return this._selectedIndex} + setData(){ + this.lblTitle.text=xG.getText("GAME_219","인벤토리"),-1==this._selectedIndex&&this.onMenuClickFunc(0)} + onMenuClickFunc(t){ + this._selectedIndex=t,this.updateMenu(this._selectedIndex),this.onMenuClick&&this.onMenuClick(this._selectedIndex)} + updateMenu(t){ + const i=this.menus.length; + for(let s=0; + s<i; + ++s)this.menus[s].selected=s==t} + } + ; + Vt(oYt,"InventoryTop"),Kt(oYt,"_instance"); + let aYt=oYt; + const cYt=class t extends LB{ + constructor(){ + super(),Kt(this,"lblDesc"),Kt(this,"btnConfirm"),Kt(this,"icons",[]),this.outSideClickHide=!0,this.title=xG.getValueReplace("GAME_181","##",5,"5성 병사 뽑기"),this.lblDesc=new iL("",13421772,fD.DEFAULT_FONT_OPTION_16),this.lblDesc.align="center",this.contentContainer.addChild(this.lblDesc),this.btnConfirm=new eG(xG.getText("COMMON_1","확인")),this.btnConfirm.color=eG.GREEN,this.btnConfirm.width=160,this.btnConfirm.height=50,this.btnConfirm.onClick=()=>this.hide(),this.contentContainer.addChild(this.btnConfirm)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + async showGuide(){ + this.title=xG.getValueReplace("GAME_181","##",5,"5성 병사 뽑기"),this.btnConfirm.text=xG.getText("COMMON_1","확인"); + const t=wx.getInstance(),i=Number(IL.getInstance().getClientData("BUYABLE_HONOR_HERO_NUMBER")||1),s=t.bookList.filter(t=>5===t.grade&&0===t.evolStage&&t.canPurchase&&t.honor>=i+1&&t.kindNum<1e3); + this.update(s,this.title),await this.loadImage(),super.show()} + showGuideOfHeroGacha(){ + this.title=xG.getText("GAME_764","5성 영웅 확정권"),this.btnConfirm.text=xG.getText("COMMON_1","확인"); + const t=wx.getInstance(),i=t.honorNumberMax,s=t.bookList.filter(t=>5===t.grade&&0===t.evolStage&&t.canPurchase&&(t.honor>=1&&t.honor<i||t.honor<1)&&t.kindNum<1e3); + this.update(s,this.title),super.show()} + update(t,i){ + var s,e; + for(const p of this.icons)this.contentContainer.removeChild(p); + this.icons=[]; + const n=t.length,h=n>0?(100/n).toFixed(2):"0",r=xG.getText("GAME_602","아래 병사 중 랜덤한 병사를 획득합니다.")+" "+xG.getText("COMMON_475","획득 확률은 모두 동일합니다.")+`\n(${ + xG.getText("COMMON_476","개별 획득 확률")} + : ${ + h} + %(=1/${ + n} + ))`; + this.lblDesc.text=r; + for(let p=0; + p<t.length; + p++){ + const i=new w5; + i.scale=.7,i.setDataWithKindNum(t[p].kindNum),this.contentContainer.addChild(i),this.icons.push(i)} + const o=(null==(s=this.icons[0])?void 0:s.width)??70,a=(null==(e=this.icons[0])?void 0:e.height)??70,c=Math.ceil(t.length/4),l=4*o+15; + this.width=520,this.title=i,fD.setLabelWrapWidth(this.lblDesc,this.width-55),this.lblDesc.x=.5*(this.width-this.lblDesc.width),this.lblDesc.y=65; + const u=this.lblDesc.y+this.lblDesc.height+15,d=.5*(this.width-l)+5; + for(let p=0; + p<this.icons.length; + p++){ + const t=p%4,i=Math.floor(p/4); + this.icons[p].x=d+t*(o+5),this.icons[p].y=u+i*(a+2)} + const f=u+c*(a+2)+35; + this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=f,this.height=f+this.btnConfirm.height+30,this.btnClose.x=this.width-this.btnClose.width-12} + } + ; + Vt(cYt,"HeroDrawGuidePopup"),Kt(cYt,"_instance"); + let lYt=cYt; + const uYt=class t extends Ge{ + constructor(){ + super(),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","Base_Check01"))),this.icon.x=0,this.icon.y=0,this.addChild(this.icon)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + } + ; + Vt(uYt,"HeroCheckIcon"),Kt(uYt,"_instance"); + let dYt=uYt; + const fYt=class t{ + constructor(){ + Kt(this,"acc",[0])} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + setBookData(t,i){ + "1"===IL.getInstance().getClientData("MEDAL_ENHANCE_USE_FORMULA")&&i&&i.length>0?this.buildFromSegments(i):this.acc=[0,...String(t[0].medal).split("|").map(Number)]} + buildFromSegments(t){ + const i=[...t].map(t=>({ + startLevel:Number(t.startLevel??1),exp:Number(t.exp??1),offset:Number(t.offset??0)} + )).sort((t,i)=>t.startLevel-i.startLevel),s=Math.max(wx.HERO_MAX_ENHANCE,wx.CASTLE_MAX_ENHANCE),e=new Array(s+1); + e[0]=0; + let n=0; + for(let h=1; + h<=s; + h++){ + for(; + n+1<i.length&&i[n+1].startLevel<=h; + )n++; + const t=i[n],s=Math.round(Math.pow(t.exp,h/5)+3*h)+t.offset; + e[h]=e[h-1]+s} + this.acc=e} + init(){ + } + getCost(t){ + return t<1||t>=this.acc.length?0:this.acc[t]-this.acc[t-1]} + getTotalCost(t,i){ + return t>=i?0:(i>=this.acc.length&&(i=this.acc.length-1),t<0&&(t=0),this.acc[i]-this.acc[t])} + getMaxAffordableLevel(t,i){ + let s=t,e=this.acc.length-1; + for(; + s<e; + ){ + const n=Math.floor((s+e+1)/2); + this.acc[n]-this.acc[t]<=i?s=n:e=n-1} + return s} + getMaxLevel(){ + return this.acc.length-1} + } + ; + Vt(fYt,"HeroMedalEnhanceManager"),Kt(fYt,"instance"); + let pYt=fYt;
ClickAniLayer 5 hunks, 144 statements
- const jjt=class t extends cG{ + const Xjt=class extends oS{
- super(),Kt(this,"lblHeader",new JD("",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_18)),Kt(this,"lblFooter",new JD("",cD.COLOR_GRAY,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"btnConfirm",new xU("","","확인",.8,180,60)),Kt(this,"secretaryImg",(()=>{ - const t=new He(QA.getTexture("UI_Ekkorr","UNIT_NPC_1")); - return t.scale.set(.7/.6),t} - )()),Kt(this,"btnGuide",new AB("UI_Ekkorr","UI_Alarm")),Kt(this,"list"),Kt(this,"petPieceContainer",new Ge),Kt(this,"petPieceContainerWidth",0),Kt(this,"rewardContainer",new Ge),Kt(this,"gemIcon",new He(QA.getTexture("UI_Ekkorr","UI_SHOP_GEM"))),Kt(this,"gemLabel",new JD("",cD.COLOR_DEEP_SKYBLUE,cD.DEFAULT_FONT_OPTION_18)),Kt(this,"honorIcon",new He(QA.getTexture("UI_Ekkorr","UI_COIN_Big"))),Kt(this,"honorLabel",new JD("",cD.COLOR_PURPLE_PINK,cD.DEFAULT_FONT_OPTION_18)),Kt(this,"hammerIcon",new He(QA.getTexture("UI_Ekkorr","Icon_Hammer_01"))),Kt(this,"hammerLabel",new JD("",cD.COLOR_WHITE,cD.DEFAULT_FONT_OPTION_18)),Kt(this,"runeTicketIcon",new He(QA.getTexture("UI_Ekkorr","RuneTicket"))),Kt(this,"runeTicketLabel",new JD("",cD.COLOR_WHITE,cD.DEFAULT_FONT_OPTION_18)),Kt(this,"grantedGem",0),Kt(this,"grantedHonor",0),Kt(this,"grantedHammer",0),Kt(this,"grantedRuneTicket",0),Kt(this,"grantedPetPieces",{ - } - ),Kt(this,"onConfirm",null),Kt(this,"state","INTRO"),Kt(this,"revealAfterHide",!1),Kt(this,"revealQueue",[]),Kt(this,"kindGrade",new Map),Kt(this,"grantedTotal",0),Kt(this,"rowCount",0),this.width=t.POPUP_WIDTH,this.title=CG.getText("GAME_857","비서"),this.lblHeader.align="left",this.lblFooter.align="left",cD.setLabelWrapWidth(this.lblHeader,this.width-60),cD.setLabelWrapWidth(this.lblFooter,this.width-60),zjt.LIST_WIDTH=t.LIST_WIDTH,this.list=new Kk(zjt,t.LIST_WIDTH,t.LIST_MAX_HEIGHT,4),this.btnConfirm.showIconLabel=!1,this.btnConfirm.showTextLabel=!0,this.btnConfirm.text=CG.getText("COMMON_1","확인"),this.btnConfirm.color=xU.GREEN,this.btnConfirm.onClick=this.onConfirmClick.bind(this),this.gemIcon.scale.set(.5),this.honorIcon.scale.set(.5),this.hammerIcon.height>0&&this.hammerIcon.scale.set(this.gemIcon.height/this.hammerIcon.height*.6),this.runeTicketIcon.height>0&&this.runeTicketIcon.scale.set(this.gemIcon.height/this.runeTicketIcon.height*.8),this.rewardContainer.addChild(this.gemIcon,this.gemLabel,this.honorIcon,this.honorLabel,this.hammerIcon,this.hammerLabel,this.runeTicketIcon,this.runeTicketLabel),this.rewardContainer.visible=!1,this.btnGuide.x=t.POPUP_WIDTH-this.btnGuide.width-23,this.btnGuide.y=63,this.btnGuide.on("pointertap",()=>{ - $jt.getInstance().showGuide()} - ),this.petPieceContainer.visible=!1,this.contentContainer.addChild(this.btnGuide,this.lblHeader,this.secretaryImg,this.list,this.rewardContainer,this.petPieceContainer,this.lblFooter,this.btnConfirm)} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - showResult(t,i=0,s=0,e="basic",n={ - } - ,h=0,r=0,o=null,a=!1){ - var c; - this.onConfirm=o,this.grantedGem=i,this.grantedHonor=s,this.grantedHammer=h,this.grantedRuneTicket=r,this.grantedPetPieces=n||{ - } - ,this.applyTierTexture(e); - const l=wx.getInstance(),u=[]; - let d=0; - this.kindGrade.clear(); - for(const g of Object.keys(t)){ - const i=Number(g),s=Number(t[i]??0); - s>0&&(u.push({ - kindNum:i,count:s} - ),d+=s,this.kindGrade.set(i,(null==(c=l.getBookVO(i))?void 0:c.grade)??1))} - u.sort((t,i)=>{ - const s=l.getBookVO(t.kindNum),e=l.getBookVO(i.kindNum),n=(null==s?void 0:s.grade)??-1,h=(null==e?void 0:e.grade)??-1; - if(n!==h)return h-n; - const r=(null==s?void 0:s.tribe)??99,o=(null==e?void 0:e.tribe)??99; - return r!==o?r-o:t.kindNum-i.kindNum} - ),this.grantedTotal=d,this.revealQueue=[]; - for(const g of u)for(let t=0; - t<g.count; - t++)this.revealQueue.push(g.kindNum); - this.shuffleInPlace(this.revealQueue); - const f=zjt.COLS,p=[]; + super(),Kt(this,"blocker"),Kt(this,"allowRect"),Kt(this,"highlightBorder"),Kt(this,"dimParts",[]),this.createUI()} + createUI(){
- g<u.length; - g+=f)p.push(u.slice(g,g+f)); - this.rowCount=p.length,this.list.dataProvider=p,this.list.showTopItem(),this.btnClose.visible=!1,this.outSideClickHide=!1,a?(this.enterIntroState(),super.show()):(this.state="TRANSITIONING",this.startRevealOverlay())} - applyTierTexture(t){ - const i="premium"===t?"UNIT_NPC_2":"UNIT_NPC_1"; - this.secretaryImg.texture=QA.getTexture("UI_Ekkorr",i)} - buildPetPieceContainer(){ - var t; - const i=this.petPieceContainer; - for(const h of[...i.children])i.removeChild(h),null==(t=h.destroy)||t.call(h,{ - children:!0} - ); - const s=Object.entries(this.grantedPetPieces||{ - } - ).map(([t,i])=>({ - kindNum:Number(t),count:Number(i)} - )).filter(t=>t.count>0).sort((t,i)=>t.kindNum-i.kindNum); - if(0===s.length)return this.petPieceContainerWidth=0,void(i.visible=!1); - let e=0,n=0; - for(let h=0; - h<s.length; + t<4;
- const t=s[h],r=new f5; - r.setInactive(t.kindNum); - const o=new JD(`×${ - t.count} - `,cD.COLOR_WHITE,cD.DEFAULT_OUTLINE_FONT_OPTION_18); - o.textColor=cD.COLOR_WHITE,r.x=e,r.y=0,o.x=r.x+r.width-o.width-2,o.y=r.y+r.height-o.height-2,e+=r.width,n=Math.max(n,r.height),h<s.length-1&&(e+=18),i.addChild(r,o)} - this.petPieceContainerWidth=e,i.visible=!0} - enterIntroState(){ - this.state="INTRO",this.lblHeader.text=CG.getValueReplace("GAME_855","##",String(this.grantedTotal),`성주님,\n${ - this.grantedTotal} - 명의 영웅을 모집했습니다.\n어떤 영웅이 왔는지 확인해볼까요?`),this.lblFooter.visible=!1,this.list.visible=!1,this.rewardContainer.visible=!1,this.petPieceContainer.visible=!1,this.btnConfirm.text=CG.getText("COMMON_1","확인"),this.btnClose.visible=!1,this.updateLayout()} - enterDoneState(){ - this.state="DONE",this.lblHeader.text=CG.getValueReplace("GAME_856","##",String(this.grantedTotal),`비서가 ${ - this.grantedTotal} - 명의 영웅을 모집했습니다.`); - const t=`- ${ - CG.getText("GAME_862","비서는 1시간마다 2명씩 영웅을 모아옵니다. (최대 24명)")} - `,i=`- ${ - CG.getText("GAME_863","환생 또는 재접속 시 4시간이 지났다면, 비서가 자동으로 찾아옵니다.")} - `,s=`- ${ - CG.getText("GAME_766","획득한 영웅은 병영에 추가됩니다.")} - `; - this.lblFooter.text=`${ - t} - \n${ - i} - \n${ - s} - `,this.lblFooter.visible=!0,this.list.visible=!0,this.btnConfirm.text=CG.getText("COMMON_1","확인"),this.btnClose.visible=!1; - const e=this.grantedGem>0||this.grantedHonor>0||this.grantedHammer>0||this.grantedRuneTicket>0; - this.rewardContainer.visible=e,e&&(this.gemIcon.visible=this.grantedGem>0,this.gemLabel.visible=this.grantedGem>0,this.honorIcon.visible=this.grantedHonor>0,this.honorLabel.visible=this.grantedHonor>0,this.hammerIcon.visible=this.grantedHammer>0,this.hammerLabel.visible=this.grantedHammer>0,this.runeTicketIcon.visible=this.grantedRuneTicket>0,this.runeTicketLabel.visible=this.grantedRuneTicket>0,this.gemLabel.text=`${ - this.grantedGem} - `,this.honorLabel.text=`${ - this.grantedHonor} - `,this.hammerLabel.text=`${ - this.grantedHammer} - `,this.runeTicketLabel.text=`${ - this.grantedRuneTicket} - `),this.buildPetPieceContainer(),this.updateLayout()} - startRevealOverlay(){ - const t=new Yjt(this.revealQueue,this.kindGrade,this.grantedGem,this.grantedHonor,this.grantedPetPieces,this.grantedHammer,this.grantedRuneTicket,()=>{ - this.enterDoneState(),super.show()} - ); - VA.stage.addChild(t)} - updateLayout(){ - let i=70; - this.secretaryImg.x=.5*(this.width-this.secretaryImg.width)+25,this.secretaryImg.y=i,i+=this.secretaryImg.height+12,this.lblHeader.x=.5*(this.width-this.lblHeader.width),this.lblHeader.y=i,i+=this.lblHeader.height+12; - const s=zjt.ROW_HEIGHT,e=this.list.getYSpace(),n=Math.min(t.LIST_MAX_HEIGHT,Math.max(s,this.rowCount*(s+e))); - if(this.list.setListHeight(n,!1),this.list.x=t.LIST_X,this.list.y=i,this.list.visible&&(i+=n+12),this.rewardContainer.visible){ - const t=36,s=6,e=[{ - icon:this.gemIcon,label:this.gemLabel} - ,{ - icon:this.honorIcon,label:this.honorLabel} - ,{ - icon:this.hammerIcon,label:this.hammerLabel} - ,{ - icon:this.runeTicketIcon,label:this.runeTicketLabel} - ].filter(t=>t.icon.visible),n=Vt(t=>t.icon.width+s+t.label.width,"groupW"),h=e.reduce((t,i)=>t+n(i),0)+Math.max(0,e.length-1)*t,r=i,o=Math.max(28,...e.map(t=>t.icon.height)); - let a=.5*(this.width-h); - for(const i of e)i.icon.x=a,i.icon.y=r+.5*(o-i.icon.height),a+=i.icon.width+s,i.label.x=a,i.label.y=r+.5*(o-i.label.height),a+=i.label.width+t; - this.rewardContainer.x=0,this.rewardContainer.y=0,i+=o+12} - if(this.petPieceContainer.visible){ - this.petPieceContainer.x=.5*(this.width-this.petPieceContainerWidth),this.petPieceContainer.y=i; - let t=0; - for(const i of this.petPieceContainer.children)t=Math.max(t,i.height||0); - i+=(t||60)+12} - this.lblFooter.visible?(this.lblFooter.x=.5*(this.width-this.lblFooter.width),this.lblFooter.y=i,i+=this.lblFooter.height+18):i+=6,this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=i,i+=this.btnConfirm.height+25,this.height=i+18} - onConfirmClick(){ - if("INTRO"===this.state)this.state="TRANSITIONING",this.revealAfterHide=!0,super.hide(); - else{ - this.hide(); - const t=this.onConfirm; - this.onConfirm=null,t&&t()} - } - onHideMotionComplete(){ - super.onHideMotionComplete(),this.revealAfterHide&&(this.revealAfterHide=!1,this.startRevealOverlay())} - getDefaultPositionY(){ - return.5*VA.stageHeight} - shuffleInPlace(t){ - for(let i=t.length-1; - i>0; - i--){ - const s=Math.floor(Math.random()*(i+1)),e=t[i]; - t[i]=t[s],t[s]=e} - } + const t=new Lf; + t.alpha=.5,t.rect(0,0,1,1).fill(0),this.dimParts.push(t),this.addChild(t)} + this.blocker=new Lf,this.blocker.rect(0,0,640,VA.stageHeight).fill(0),this.blocker.alpha=0,this.blocker.eventMode="static",this.addChild(this.blocker),this.highlightBorder=new Lf,this.addChild(this.highlightBorder),this.allowRect=new Ri(0,0,0,0),this.setBlockerEnabled(!1)} + setClickArea(t,i,s,e){ + this.allowRect=new Ri(t,i,s,e),this.updateDim(),this.blocker.hitArea={ + contains:Vt((t,i)=>!this.allowRect.contains(t,i),"contains")} + ,this.setBlockerEnabled(!0)} + setBlockerEnabled(t){ + this.blocker.eventMode=t?"static":"none"; + for(const i of this.dimParts)i.visible=t; + this.highlightBorder.visible=t} + updateDim(){ + const t=VA.stageHeight,{ + x:i,y:s,width:e,height:n} + =this.allowRect; + this.dimParts[0].clear().rect(0,0,640,s).fill(0),this.dimParts[1].clear().rect(0,s,i,n).fill(0),this.dimParts[2].clear().rect(i+e,s,640-(i+e),n).fill(0),this.dimParts[3].clear().rect(0,s+n,640,t-(s+n)).fill(0),this.highlightBorder.clear().rect(i,s,e,n).stroke({ + color:16776960,width:3} + )}
- Vt(jjt,"SecretaryPopup"),Kt(jjt,"_instance"),Kt(jjt,"POPUP_WIDTH",580),Kt(jjt,"LIST_X",20),Kt(jjt,"LIST_WIDTH",jjt.POPUP_WIDTH-2*jjt.LIST_X),Kt(jjt,"LIST_MAX_HEIGHT",460); + Vt(Xjt,"ClickAniLayer");
HeroRosterSubMenu 1 hunks, 142 statements
+ let t; + super(),Kt(this,"btnBook",new g$t("Book",110)),Kt(this,"btnClose",new PKt),Kt(this,"btnGuide"),Kt(this,"lblMaxCapacity",new qB("menu_icon_03_on","0/10",16711680,fD.DEFAULT_OUTLINE_FONT_OPTION_18)),Kt(this,"filterIcons"),Kt(this,"_selectedTribes",[1,2,3,4]),Kt(this,"btnClosePoint",new gi),Kt(this,"btnClosePointInitialized",!1),this.lblTitle.y=2,this.lblMaxCapacity.iconScale=.5,this.lblMaxCapacity.x=this.lblTitle.x,this.lblMaxCapacity.y=this.lblTitle.y+this.lblTitle.height+1,this.addChild(this.lblMaxCapacity),this.btnClose.x=640-this.btnClose.width-10,this.btnClose.y=.5*(this.bg.height-this.btnClose.height),this.addChild(this.btnClose),this.btnBook.width=110,this.btnBook.height=45,this.btnBook.y=.5*(this.bg.height-this.btnBook.height),this.addChild(this.btnBook),this.btnBook.on("pointertap",this.onBook,this),this.btnClose.onClick=()=>{ + Mqt.getInstance().updateLanguage(),Aqt.getInstance().currentSubView=Mqt.getInstance(),Dni.getInstance().isRunning&&Dni.getInstance().tutorialIndex==Dni.TUTORIAL_INDEX_WAVE0&&Dni.getInstance().clearTutorialWave0()} + ,this.filterIcons=[]; + for(let i=0; + i<4; + ++i)t=new zYt(i),t.scale=.8,t.y=.5*this.bg.height,this.addChild(t),this.filterIcons.push(t),t.onClick=this.onFilterIconClick.bind(this); + this.btnGuide=new IB("UI_Ekkorr","UI_Alarm"),this.addChild(this.btnGuide),this.btnGuide.on("pointertap",()=>{ + VYt.getInstance().showGuide()} + ),this.updateLanguage()} + static getInstance(){ + return null==t.instance&&(t.instance=new t),t.instance} + updateLayout(){ + this.btnGuide.x=this.lblTitle.x+this.lblTitle.width+3,this.btnGuide.y=this.lblTitle.y+.5*(this.lblTitle.height-this.btnGuide.height)+2,this.btnBook.x=this.btnClose.x-this.btnBook.width-5; + const t=this.filterIcons.length; + let i=this.btnBook.x+.5*this.filterIcons[t-1].width-5; + for(let s=t-1; + s>-1; + --s)this.filterIcons[s].x=i-this.filterIcons[s].width-1,i=this.filterIcons[s].x} + update(){ + const t=TL.maxTeamSlots,i=wx.getInstance().list.length; + this.lblMaxCapacity.text=`${ + i} + /${ + t} + `} + setData(){ + this.update(),this.updateLanguage()} + resetFilter(){ + this._selectedTribes=[1,2,3,4]; + const t=this.filterIcons.length; + for(let i=0; + i<t; + ++i)this.filterIcons[i].reset()} + onBook(){ + Iqt.getInstance().setData(),Iqt.getInstance().show2()} + get selectedTribes(){ + return this._selectedTribes} + onFilterIconClick(t,i){ + this._selectedTribes.length=0; + const s=this.filterIcons.length; + for(let e=0; + e<s; + ++e)this.filterIcons[e].selected&&this._selectedTribes.push(e+1); + jqt.getInstance().onFilterChanged()} + updateLanguage(){ + this.setTitle(xG.getText("GAME_13","영웅목록")),this.btnBook.text=xG.getText("GAME_220","도감"),this.updateLayout()} + getBtnClosePoint(){ + if(0==this.btnClosePointInitialized){ + this.btnClosePointInitialized=!0; + const t=this.btnClose; + this.btnClosePoint.x=jKt.getInstance().x+t.x,this.btnClosePoint.y=jKt.getInstance().y+40+t.y} + return this.btnClosePoint} + } + ; + Vt(Oqt,"HeroRosterSubMenu"),Kt(Oqt,"instance"); + let kqt=Oqt; + const xqt={ + 1:200,2:300,3:500,4:1e3,5:2e3} + ,Rqt=class t extends fG{ + constructor(){ + super(),Kt(this,"onEvolved",null),Kt(this,"lblQuestion",new iL("보석을 사용하여 진화하시겠습니까?",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_18)),Kt(this,"lblHeaderCurrent",new iL("현재",11184810,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHeaderArrow",new iL("→",16777215,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHeaderEvolved",new iL("진화 후",16768324,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHpCurrent",new qB("UI_HEART","0",11184810,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHpArrow",new iL("→",16777215,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHpEvolved",new qB("UI_HEART","0",8978312,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblAtkCurrent",new qB("UI_SWORD","0",11184810,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblAtkArrow",new iL("→",16777215,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblAtkEvolved",new qB("UI_SWORD","0",8978312,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblDefCurrent",new qB("UI_PHY_DEFENSE","0",11184810,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblDefArrow",new iL("→",16777215,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblDefEvolved",new qB("UI_PHY_DEFENSE","0",8978312,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblTribeTitle",new iL("# 종족 특성",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblTribeDesc",new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblUniqueTitle",new iL("# 고유스킬",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblUniqueDesc",new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"btnCancel",new DU("UI_CLOSE_BTN","","취소",.7,160,70)),Kt(this,"btnConfirm",new DU("UI_GEM","200","진화",.8,200,70)),Kt(this,"vo"),Kt(this,"isBusy",!1),Kt(this,"isRosterMode",!1),Kt(this,"count",1),Kt(this,"particleContainer",new Ge),Kt(this,"particleList",[]),Kt(this,"particleFrame",0),Kt(this,"PARTICLE_DURATION",55),this.title=xG.getText("GAME_145","진화 확인"),this.lblQuestion.text=xG.getText("GAME_142","보석을 사용하여 진화하시겠습니까?"),this.lblQuestion.y=95,this.contentContainer.addChild(this.lblQuestion),this.lblHeaderCurrent.text=xG.getText("GAME_152","현재"),this.lblHeaderEvolved.text=xG.getText("GAME_153","진화 후"),this.contentContainer.addChild(this.lblHeaderCurrent,this.lblHeaderArrow,this.lblHeaderEvolved),this.contentContainer.addChild(this.lblHpCurrent,this.lblHpArrow,this.lblHpEvolved),this.contentContainer.addChild(this.lblAtkCurrent,this.lblAtkArrow,this.lblAtkEvolved),this.contentContainer.addChild(this.lblDefCurrent,this.lblDefArrow,this.lblDefEvolved),fD.setLabelWrapWidth(this.lblTribeDesc,430),fD.setLabelWrapWidth(this.lblUniqueDesc,430),this.contentContainer.addChild(this.lblTribeTitle,this.lblTribeDesc,this.lblUniqueTitle,this.lblUniqueDesc),this.btnCancel.text=xG.getText("COMMON_2","취소"),this.btnCancel.color=DU.RED,this.btnCancel.showIconLabel=!1,this.btnCancel.showTextLabel=!0,this.btnCancel.onClick=()=>this.hide(),this.btnConfirm.text=xG.getText("GAME_67","진화"),this.btnConfirm.color=DU.GREEN,this.btnConfirm.showIconLabel=!0,this.btnConfirm.showTextLabel=!0,this.btnConfirm.onClick=()=>this.onConfirmClick(),this.contentContainer.addChild(this.btnCancel,this.btnConfirm),this.addChild(this.particleContainer),this.updateLayout()} + static getInstance(){ + return this.instance||(this.instance=new t),this.instance} + updateLayout(){ + const t=.5*this.width,i=120,s=250,e=340; + this.lblQuestion.x=t-.5*this.lblQuestion.width; + let n=this.lblQuestion.y+this.lblQuestion.height+20; + this.lblHeaderCurrent.x=i,this.lblHeaderArrow.x=s,this.lblHeaderEvolved.x=e,this.lblHeaderCurrent.y=this.lblHeaderArrow.y=this.lblHeaderEvolved.y=n,n+=32,this.lblHpCurrent.x=i,this.lblHpArrow.x=s,this.lblHpEvolved.x=e,this.lblHpCurrent.y=this.lblHpArrow.y=this.lblHpEvolved.y=n,n+=32,this.lblAtkCurrent.x=i,this.lblAtkArrow.x=s,this.lblAtkEvolved.x=e,this.lblAtkCurrent.y=this.lblAtkArrow.y=this.lblAtkEvolved.y=n,n+=32,this.lblDefCurrent.x=i,this.lblDefArrow.x=s,this.lblDefEvolved.x=e,this.lblDefCurrent.y=this.lblDefArrow.y=this.lblDefEvolved.y=n,n+=57,this.lblTribeTitle.x=65,this.lblTribeTitle.y=n,n+=this.lblTribeTitle.height+2,this.lblTribeDesc.x=65,this.lblTribeDesc.y=n,n+=this.lblTribeDesc.height+15,this.lblUniqueTitle.x=65,this.lblUniqueTitle.y=n,n+=this.lblUniqueTitle.height+2,this.lblUniqueDesc.x=65,this.lblUniqueDesc.y=n,n+=this.lblUniqueDesc.height+25; + const h=this.btnCancel.width+16+this.btnConfirm.width; + this.btnCancel.x=t-.5*h,this.btnCancel.y=n,this.btnConfirm.x=this.btnCancel.x+this.btnCancel.width+16,this.btnConfirm.y=n,this.height=n+this.btnConfirm.height+50} + setData(t,i=!1,s=1){ + this.vo=t,this.isBusy=!1,this.isRosterMode=i,this.isRosterMode?this.count=s:this.count=1,this.title=xG.getText("GAME_145","진화 확인"),this.lblQuestion.text=xG.getText("GAME_142","보석을 사용하여 진화하시겠습니까?"),this.lblHeaderCurrent.text=xG.getText("GAME_152","현재"),this.lblHeaderEvolved.text=xG.getText("GAME_153","진화 후"),this.lblTribeTitle.text=`# ${ + xG.getText("GAME_28","종족 특성")} + `,this.lblTribeDesc.text=this.getTribeTraitText(this.vo.tribe),this.lblUniqueTitle.text=`# ${ + xG.getText("GAME_72","고유스킬")} + `; + const e=wx.getInstance().getBookVO(this.vo.evolKindNum),n=e?Ox.getInstance().getByKindNum(e.uniqueSkill):null; + this.lblUniqueDesc.text=n?xG.getText(n.getDescKey(),n.desc):xG.getText("COMMON_367","없음"),this.btnCancel.text=xG.getText("COMMON_2","취소"),this.count>1?(this.btnConfirm.activatedTextLabelColor=13434624,this.btnConfirm.text=`${ + xG.getText("GAME_67","진화")} + (x${ + this.count} + )`):(this.btnConfirm.activatedTextLabelColor=-1,this.btnConfirm.text=xG.getText("GAME_67","진화")),this.updateStats(),this.updateCost(),this.updateLayout(),super.show()} + updateStats(){ + const t=wx.getInstance().getBookVO(this.vo.kindNum),i=wx.getInstance().getBookVO(this.vo.evolKindNum); + if(!t||!i)return; + const s=QA.getTexture("UI_Ekkorr",this.vo.dmgType===ex.MAGICAL?"ICON_ATTACK2":"UI_SWORD"),e=QA.getTexture("UI_Ekkorr",this.vo.phyDef>this.vo.magDef?"UI_PHY_DEFENSE":"UI_MAGIC_DEFENSE"); + this.lblAtkCurrent.texture=s,this.lblAtkEvolved.texture=s,this.lblDefCurrent.texture=e,this.lblDefEvolved.texture=e; + const n=Vt(t=>qD.displayLargeNumberAsAlphabet(t),"fmt"),h=Vt((t,i)=>t>0?` (+${ + Math.round((i-t)/t*100)} + %)`:"","pct"); + this.lblHpCurrent.text=n(t.hp),this.lblHpEvolved.text=`${ + n(i.hp)} + ${ + h(t.hp,i.hp)} + `,this.lblAtkCurrent.text=n(t.atkDmg),this.lblAtkEvolved.text=`${ + n(i.atkDmg)} + ${ + h(t.atkDmg,i.atkDmg)} + `,this.lblDefCurrent.text=n(t.def),this.lblDefEvolved.text=`${ + n(i.def)} + ${ + h(t.def,i.def)} + `} + getTribeTraitText(t){ + switch(t){ + case 1:return xG.getText("GAME_286","넉백 면역 (뒤로 밀리지 않습니다.)"); + case 2:return xG.getText("GAME_287","블로우 면역 (날려보내는 공격을 받아도 날아가지 않습니다.)"); + case 3:return xG.getText("GAME_288","냉기 면역 (얼려지지 않습니다.)"); + case 4:return xG.getText("GAME_289","기절 면역 (기절하지 않습니다.)"); + default:return""} + } + updateCost(){ + this.btnConfirm.iconText=String(this.getCost())} + getCost(){ + const t=xqt[this.vo.grade]??0; + return this.count*t} + async onConfirmClick(){ + if(this.isBusy)return; + const t=this.getCost(); + if(TL.gem<t)return void LF.getInstance().showMessage(xG.getText("COMMON_352","보석이 부족합니다.")); + if(!this.vo.evolKindNum)return void LF.getInstance().showMessage(xG.getText("GAME_141","이미 최대 진화 단계입니다.")); + this.isBusy=!0; + const i=this.vo.kindNum,s=this.vo.evolKindNum; + let e; + if(e=this.isRosterMode?await lD.getInstance().hero.evolveOwned(`${ + this.vo.kindNum} + -${ + this.count} + `,!0):await lD.getInstance().hero.evolve(this.vo.id),!e||!1===e.success)return LF.getInstance().showMessage(xG.getText("COMMON_77","네트워크 오류가 발생하였습니다.")),void(this.isBusy=!1); + if(TL.setUserInfo(e.body),qF.getInstance().updateAll(),Mqt.getInstance().setData(),!this.isRosterMode){ + const t=wx.getInstance().getVOWithId(this.vo.id); + t&&loi.getInstance().udpateHero(t)} + LF.getInstance().showMessage(xG.getText("GAME_144","진화 성공!")),this.hide(),this.onEvolved&&(this.onEvolved(),this.onEvolved=null),cS.getInstance().dispatchCustomEvent("HeroEvolve",{ + id:this.isRosterMode?0:this.vo.id,kindNum:i,evolKindNum:s} + )} + } + ; + Vt(Rqt,"EvolveConfirmPopup"),Kt(Rqt,"instance"); + let Nqt=Rqt; + const Pqt=class t extends fG{ + constructor(){
HelpDataManager 6 hunks, 137 statements
- const gVt=class{ + const nVt=[[1,1,1,"성","성은 우리가 지켜야하는 기지입니다","HELP_TITLE_1","HELP_1"],[2,1,2,"성","성이 파괴되면, 환생하여 다시 진행해야 합니다.","HELP_TITLE_1","HELP_2"],[3,1,3,"성","신전에서 생명의 비술을 연구하면, 성이 파괴되어도 이어할 수 있습니다.","HELP_TITLE_1","HELP_4"],[4,1,4,"성","성은 훈장을 사용하여 영구히 유지되는 강화를 진행할 수 있습니다.","HELP_TITLE_1","HELP_3"],[5,2,1,"영웅","영웅은 최전방에서 성을 보호하고 적을 물리치는 아군입니다.","HELP_TITLE_2","HELP_5"],[6,2,2,"영웅","병영에서 배치를 통해 출전시킨 영웅만 전투에 나서게 됩니다. 대기중인 영웅들을 지금 출전시켜 보세요!","HELP_TITLE_2","HELP_6"],[7,2,3,"영웅","배치한 영웅은 드래그를 통해 이동시킬 수 있습니다.","HELP_TITLE_2","HELP_27"],[8,3,1,"퀘스트","퀘스트를 통해 골드를 획득할 수 있습니다.","HELP_TITLE_3","HELP_7"],[9,3,2,"퀘스트","게이지가 찰때마다 골드를 획득합니다.","HELP_TITLE_3","HELP_8"],[10,3,3,"퀘스트","레벨업을 하면, 획득하는 골드가 늘어납니다.","HELP_TITLE_3","HELP_9"],[11,3,4,"퀘스트","다음 단계 퀘스트를 오픈하면, 더 많은 골드를 획득할 수 있습니다.","HELP_TITLE_3","HELP_10"],[12,4,1,"환생","성이 파괴되면, 환생을 해야합니다.","GAME_5","HELP_11"],[13,4,2,"환생","10 wave 이상에서는 언제든 환생을 할 수 있습니다.","HELP_TITLE_4","HELP_12"],[14,4,3,"환생","환생을 하면, ( 훈장 )을 얻게 됩니다.","HELP_TITLE_4","HELP_13"],[15,4,4,"환생","( 훈장 )은 게임에서 가장 중요한 재화로, 영웅과 성을 강화하는데 사용됩니다.","HELP_TITLE_4","HELP_14"],[16,4,5,"환생","높은 웨이브에서 환생할수록 (훈장)을 더 많이 획득할 수 있습니다.","HELP_TITLE_4","HELP_15"],[17,5,1,"기사단","기사단 레벨은 최고 도달 웨이브를 기준으로 산정됩니다. (100 웨이브당 1 레벨)","HELP_TITLE_5","HELP_16"],[18,5,2,"기사단","무한랭킹전/던전 등에서 영웅의 레벨은 기사단 레벨을 기준으로 결정됩니다.","HELP_TITLE_5","HELP_17"],[19,6,1,"영웅 - 사제","사제에게는 ( 신의 은총 )이라는 스킬이 있습니다.","HELP_TITLE_6","HELP_18"],[20,6,2,"영웅 - 사제","( 신의 은총 )은 확률적으로 발동하는데, 2분 동안 게임 속도를 300% 올려줍니다.","HELP_TITLE_6","HELP_19"],[21,6,3,"영웅 - 사제","사제를 여러명 가질수록, (신의 은총) 스킬이 발동할 확률이 높아집니다.","HELP_TITLE_6","HELP_20"],[22,7,1,"영웅 - 페어리","엘프의 비술은 확률적으로 웨이브를 1씩 건너뛰는 스킬을 가지고 있습니다.","HELP_TITLE_7","HELP_21"],[23,7,2,"영웅 - 페어리","페어리는 엘프의 비술 스킬을 가지고 있습니다.","HELP_TITLE_7","HELP_22"],[24,7,3,"영웅 - 페어리","페어리를 많이 보유할수록, 웨이브를 1씩 건너뛰어 빠르게 전진할 수 있습니다.","HELP_TITLE_7","HELP_23"],[25,8,1,"영웅 - 암흑 궁병","암흑 궁병은 환생시, 시작 웨이브를 올려주는 스킬을 가지고 있습니다.","HELP_TITLE_8","HELP_24"],[26,8,2,"영웅 - 암흑 궁병","암흑 궁병을 많이 보유할수록, 환생후 높은 웨이브에서 시작할 수 있습니다.","HELP_TITLE_8","HELP_25"],[27,8,3,"영웅 - 암흑 궁병","( 암흑궁병을 10명 배치하고, 1000층에서 환생하면, 500층에서 시작합니다. )","HELP_TITLE_8","HELP_26"],[28,9,1,"비서","성 - 성채에 위치한 비서는 성장에 도움을 주는 유용한 동료입니다.","GAME_857","HELP_28"],[29,9,2,"비서","비서는 일정 시간마다 영웅과 펫 조각 등 유용한 자원을 수집해옵니다.","GAME_857","HELP_29"],[30,9,3,"비서","고급 비서를 고용하면 수집 효율이 크게 상승합니다","GAME_857","HELP_30"]],hVt=class t{
- Kt(this,"kindNum",0),Kt(this,"difficulty",0),Kt(this,"enemyKindNums",""),Kt(this,"enemyTrans",""),Kt(this,"enemyShields",""),Kt(this,"enemyLevels",""),Kt(this,"tribes","0"),Kt(this,"gradeMax",0),Kt(this,"femaleExclude","N"),Kt(this,"maleExclude","N"),Kt(this,"rangeExclude","N"),Kt(this,"meleeExclude","N"),Kt(this,"airExclude","N"),Kt(this,"star1",0),Kt(this,"star2",0),Kt(this,"star3",0)} - static parseEnemies(t){ - const i=new Array(20).fill(null); - if(!t||!t.enemyKindNums)return i; - const s=String(t.enemyKindNums).split("|"),e=Math.min(s.length,20); - for(let n=0; - n<e; - n++){ - const t=s[n].trim(); - if(!t||"0"===t)continue; - const e=t.indexOf("-"),h=e>=0?t.substring(0,e):t,r=e>=0?t.substring(e+1):"0",o=Number(h); - o>0&&(i[n]={ - kindNum:o,trans:Number(r)||0} - )} - return i} - static stringifyEnemies(t,i){ - let s=-1; - for(let n=19; - n>=0; - n--)if((t[n]??-1)>0){ - s=n; - break} - if(s<0)return""; - const e=[]; - for(let n=0; - n<=s; - n++){ - const s=t[n]??-1; - s<=0?e.push("0"):e.push(`${ - s} - -${ - i[n]??0} - `)} - return e.join("|")} - } - ; - Vt(gVt,"TowerBattlePoolVO"); - let mVt=gVt; - const wVt=class{ - constructor(){ - Kt(this,"kindNum",0),Kt(this,"battleIDs","")} - } - ; - Vt(wVt,"TowerSeasonSetVO"); - let vVt=wVt; - const bVt=class{ - constructor(){ - Kt(this,"floor",0),Kt(this,"gem1",0),Kt(this,"gem2",0),Kt(this,"gem3",0),Kt(this,"honor1",0),Kt(this,"honor2",0),Kt(this,"honor3",0)} - } - ; - Vt(bVt,"TowerRewardVO"); - let _Vt=bVt; - const yVt=class{ - constructor(){ - Kt(this,"floor",0),Kt(this,"stars",0),Kt(this,"battleVO"),Kt(this,"reward"),Kt(this,"isCleared",!1),Kt(this,"isNext",!1)} - } - ; - Vt(yVt,"TowerFloorVO"); - let MVt=yVt; - const EVt=class t{ - constructor(){ - Kt(this,"lastFetchTime",0),Kt(this,"hasData",!1),Kt(this,"dungeonRechargeMs",0),Kt(this,"towerRechargeMs",0),Kt(this,"towerSnapshot",null),Kt(this,"pvpSnapshot",null),Kt(this,"dailyRankingSnapshot",null)} + Kt(this,"items"),this.items=nVt.map(([t,i,s,e,n,h,r])=>({ + kindNum:t,main:i,sub:s,title:xG.getText(h,e),desc:xG.getText(r,n)} + ))}
- return this.instance||(this.instance=new t),this.instance} - setSummary(t){ - if(t){ - if(this.hasData=!0,this.lastFetchTime=tx.time,t.dungeon){ - this.dungeonRechargeMs=t.dungeon.ticketRechargeMs??0; - const i=Nx.getInstance(); - i.ticket=t.dungeon.ticket??i.ticket,i.maxTicket=t.dungeon.maxTicket??i.maxTicket,t.dungeon.ticketTime&&(i.ticketTime=new Date(t.dungeon.ticketTime).getTime()+1e3)} - if(t.tower){ - this.towerRechargeMs=t.tower.ticketRechargeMs??0; - const i=pVt.getInstance(); - i.seasonNumber>0&&(i.ticket=t.tower.ticket??i.ticket,i.maxTicket=t.tower.maxTicket??i.maxTicket,t.tower.ticketTime&&(i.ticketTime=new Date(t.tower.ticketTime).getTime()+1e3),void 0!==t.tower.currentFloor&&(i.currentFloor=t.tower.currentFloor),void 0!==t.tower.seasonNumber&&(i.seasonNumber=t.tower.seasonNumber),t.tower.seasonEndTime&&(i.seasonEndTime=new Date(t.tower.seasonEndTime).getTime())),this.towerSnapshot={ - seasonNumber:t.tower.seasonNumber??0,seasonEndTime:t.tower.seasonEndTime?new Date(t.tower.seasonEndTime).getTime():0,currentFloor:t.tower.currentFloor??0,ticket:t.tower.ticket??0,maxTicket:t.tower.maxTicket??0,ticketTime:t.tower.ticketTime?new Date(t.tower.ticketTime).getTime():0} - } - this.pvpSnapshot=t.pvp??null,this.dailyRankingSnapshot=t.dailyRanking??null} - } - has(){ - return this.hasData} - isStale(t){ - return!this.hasData||tx.time-this.lastFetchTime>=t} - getDungeon(){ - if(!this.hasData)return null; - const t=Nx.getInstance(); + return null==this.instance&&(this.instance=new t),this.instance} + getMainList(){ + const t=new Set,i=[]; + for(const s of this.items)t.has(s.main)||(t.add(s.main),i.push(s)); + return i} + getSubsByMain(t){ + return this.items.filter(i=>i.main===t).sort((t,i)=>t.sub-i.sub)} + getIconName(t){
- ticket:t.ticket,maxTicket:t.maxTicket,ticketTime:t.ticketTime,ticketRechargeMs:this.dungeonRechargeMs} - } - getTower(){ - if(!this.hasData)return null; - const t=pVt.getInstance(); - return t.seasonNumber>0?{ - seasonNumber:t.seasonNumber,seasonEndTime:t.seasonEndTime,currentFloor:t.currentFloor,ticket:t.ticket,maxTicket:t.maxTicket,ticketTime:t.ticketTime,ticketRechargeMs:this.towerRechargeMs} - :this.towerSnapshot?{ - ...this.towerSnapshot,ticketRechargeMs:this.towerRechargeMs} - :null} - getPvp(){ - return this.pvpSnapshot} - updatePvpTicket(t,i){ - this.pvpSnapshot&&(this.pvpSnapshot.ticket=t,void 0!==i&&(this.pvpSnapshot.ticketTime=i))} - getDailyRanking(){ - return this.dailyRankingSnapshot} - updateDailyRanking(t,i){ - this.dailyRankingSnapshot?(this.dailyRankingSnapshot.joined=t,this.dailyRankingSnapshot.score=i):this.dailyRankingSnapshot={ - joined:t,score:i,date:""} - } - invalidate(){ - this.lastFetchTime=0} + 1:"Icon_Help_Castle",2:"Icon_Help_Hero",3:"Icon_Help_Quest",4:"Icon_Help_Revive",5:"Icon_Help_Knight",6:"Icon_Help_Prist",7:"Icon_Help_Pairy",8:"Icon_Help_DarkArche",9:"Icon_Help_Secretary"} + [t]??`Help_${ + t} + _1`} + getImageName(t,i){ + return`Help_${ + t} + _${ + i} + `}
- Vt(EVt,"BattleSummaryManager"),Kt(EVt,"instance"); + Vt(hVt,"HelpDataManager"),Kt(hVt,"instance",null);
- const BKt=[[1,1,1,"성","성은 우리가 지켜야하는 기지입니다","HELP_TITLE_1","HELP_1"],[2,1,2,"성","성이 파괴되면, 환생하여 다시 진행해야 합니다.","HELP_TITLE_1","HELP_2"],[3,1,3,"성","신전에서 생명의 비술을 연구하면, 성이 파괴되어도 이어할 수 있습니다.","HELP_TITLE_1","HELP_4"],[4,1,4,"성","성은 훈장을 사용하여 영구히 유지되는 강화를 진행할 수 있습니다.","HELP_TITLE_1","HELP_3"],[5,2,1,"영웅","영웅은 최전방에서 성을 보호하고 적을 물리치는 아군입니다.","HELP_TITLE_2","HELP_5"],[6,2,2,"영웅","병영에서 배치를 통해 출전시킨 영웅만 전투에 나서게 됩니다. 대기중인 영웅들을 지금 출전시켜 보세요!","HELP_TITLE_2","HELP_6"],[7,2,3,"영웅","배치한 영웅은 드래그를 통해 이동시킬 수 있습니다.","HELP_TITLE_2","HELP_27"],[8,3,1,"퀘스트","퀘스트를 통해 골드를 획득할 수 있습니다.","HELP_TITLE_3","HELP_7"],[9,3,2,"퀘스트","게이지가 찰때마다 골드를 획득합니다.","HELP_TITLE_3","HELP_8"],[10,3,3,"퀘스트","레벨업을 하면, 획득하는 골드가 늘어납니다.","HELP_TITLE_3","HELP_9"],[11,3,4,"퀘스트","다음 단계 퀘스트를 오픈하면, 더 많은 골드를 획득할 수 있습니다.","HELP_TITLE_3","HELP_10"],[12,4,1,"환생","성이 파괴되면, 환생을 해야합니다.","GAME_5","HELP_11"],[13,4,2,"환생","10 wave 이상에서는 언제든 환생을 할 수 있습니다.","HELP_TITLE_4","HELP_12"],[14,4,3,"환생","환생을 하면, ( 훈장 )을 얻게 됩니다.","HELP_TITLE_4","HELP_13"],[15,4,4,"환생","( 훈장 )은 게임에서 가장 중요한 재화로, 영웅과 성을 강화하는데 사용됩니다.","HELP_TITLE_4","HELP_14"],[16,4,5,"환생","높은 웨이브에서 환생할수록 (훈장)을 더 많이 획득할 수 있습니다.","HELP_TITLE_4","HELP_15"],[17,5,1,"기사단","기사단 레벨은 최고 도달 웨이브를 기준으로 산정됩니다. (100 웨이브당 1 레벨)","HELP_TITLE_5","HELP_16"],[18,5,2,"기사단","무한랭킹전/던전 등에서 영웅의 레벨은 기사단 레벨을 기준으로 결정됩니다.","HELP_TITLE_5","HELP_17"],[19,6,1,"영웅 - 사제","사제에게는 ( 신의 은총 )이라는 스킬이 있습니다.","HELP_TITLE_6","HELP_18"],[20,6,2,"영웅 - 사제","( 신의 은총 )은 확률적으로 발동하는데, 2분 동안 게임 속도를 300% 올려줍니다.","HELP_TITLE_6","HELP_19"],[21,6,3,"영웅 - 사제","사제를 여러명 가질수록, (신의 은총) 스킬이 발동할 확률이 높아집니다.","HELP_TITLE_6","HELP_20"],[22,7,1,"영웅 - 페어리","엘프의 비술은 확률적으로 웨이브를 1씩 건너뛰는 스킬을 가지고 있습니다.","HELP_TITLE_7","HELP_21"],[23,7,2,"영웅 - 페어리","페어리는 엘프의 비술 스킬을 가지고 있습니다.","HELP_TITLE_7","HELP_22"],[24,7,3,"영웅 - 페어리","페어리를 많이 보유할수록, 웨이브를 1씩 건너뛰어 빠르게 전진할 수 있습니다.","HELP_TITLE_7","HELP_23"],[25,8,1,"영웅 - 암흑 궁병","암흑 궁병은 환생시, 시작 웨이브를 올려주는 스킬을 가지고 있습니다.","HELP_TITLE_8","HELP_24"],[26,8,2,"영웅 - 암흑 궁병","암흑 궁병을 많이 보유할수록, 환생후 높은 웨이브에서 시작할 수 있습니다.","HELP_TITLE_8","HELP_25"],[27,8,3,"영웅 - 암흑 궁병","( 암흑궁병을 10명 배치하고, 1000층에서 환생하면, 500층에서 시작합니다. )","HELP_TITLE_8","HELP_26"],[28,9,1,"비서","성 - 성채에 위치한 비서는 성장에 도움을 주는 유용한 동료입니다.","GAME_857","HELP_28"],[29,9,2,"비서","비서는 일정 시간마다 영웅과 펫 조각 등 유용한 자원을 수집해옵니다.","GAME_857","HELP_29"],[30,9,3,"비서","고급 비서를 고용하면 수집 효율이 크게 상승합니다","GAME_857","HELP_30"]],UKt=class t{ - constructor(){ - Kt(this,"items"),this.items=BKt.map(([t,i,s,e,n,h,r])=>({ - kindNum:t,main:i,sub:s,title:CG.getText(h,e),desc:CG.getText(r,n)} - ))} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - getMainList(){ - const t=new Set,i=[]; - for(const s of this.items)t.has(s.main)||(t.add(s.main),i.push(s)); - return i} - getSubsByMain(t){ - return this.items.filter(i=>i.main===t).sort((t,i)=>t.sub-i.sub)} - getIconName(t){ - return{ - 1:"Icon_Help_Castle",2:"Icon_Help_Hero",3:"Icon_Help_Quest",4:"Icon_Help_Revive",5:"Icon_Help_Knight",6:"Icon_Help_Prist",7:"Icon_Help_Pairy",8:"Icon_Help_DarkArche",9:"Icon_Help_Secretary"} - [t]??`Help_${ - t} - _1`} - getImageName(t,i){ - return`Help_${ - t} - _${ - i} - `} - } - ; - Vt(UKt,"HelpDataManager"),Kt(UKt,"instance",null); - let FKt=UKt;
ShopProductPopupWithTimer 1 hunks, 132 statements
- var SVt=(t=>(t.REBIRTH="REBIRTH",t.INFINITE_RANK="INFINITE_RANK",t.DUNGEON="DUNGEON",t.SPIRIT_LAND="SPIRIT_LAND",t.DAILY_RANK="DAILY_RANK",t.TOWER="TOWER",t.AD_VIEW="AD_VIEW",t))(SVt||{ + const oVt=class t extends Njt{ + constructor(){ + super(),Kt(this,"image"),Kt(this,"timeContainer"),Kt(this,"timeBg"),Kt(this,"timeIcon"),Kt(this,"timeLbl"),Kt(this,"endTime",-1),Kt(this,"count",0),Kt(this,"onEnterUpdate",Vt(()=>{ + ++this.count<60||(this.count=0,this.refresh())} + ,"onEnterUpdate")),Kt(this,"onPaymentSuccessBind"),this.timeContainer=new Ge,this.addChild(this.timeContainer),this.timeBg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Progress_Bar_Bg_LightGreen"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13} + ),this.timeBg.alpha=.5,this.timeBg.width=160,this.timeContainer.addChild(this.timeBg),this.timeIcon=new He(QA.getTexture("UI_Ekkorr","Icon_Time02")),this.timeIcon.x=20,this.timeContainer.addChild(this.timeIcon); + const t=fD.DEFAULT_FONT_OPTION_18; + t.fill=fD.COLOR_WHITE,t.stroke={ + color:"#000000",width:3,join:"round"} + ,this.timeLbl=new iL("00:00:00",t.fill,t),this.timeLbl.x=this.timeIcon.x+this.timeIcon.width+10,this.timeLbl.y=.5*(this.timeBg.height-this.timeLbl.height),this.timeContainer.addChild(this.timeLbl)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + async buyProduct2(t,i){ + const s=M5.getInstance().getByProductId(t); + if(s){ + if(this.endTime=i,this.refresh(),LM.getInstance().add(this.onEnterUpdate,this),!this.image){ + this.image=new He,this.addChildAt(this.image,0); + const{ + AssetPathManager:t} + =await Xt(async()=>{ + const{ + AssetPathManager:t} + =await Promise.resolve().then(()=>XA); + return{ + AssetPathManager:t} + } + ,void 0),{ + Assets:i} + =await Xt(async()=>{ + const{ + Assets:t} + =await Promise.resolve().then(()=>kM); + return{ + Assets:t} + } + ,void 0),s=t.getAssetPath("CharShopProduct.png"),e=await i.load(s); + this.image.texture=e,this.image.x=.5*(this.width-this.image.width),this.image.y=-this.image.height} + this.buyProduct(s,.5),this.setPaymentSuccess(!0)} + } + refresh(){ + if(tx.time<this.endTime){ + this.timeLbl.text=EU.displayTime(.001*(this.endTime-tx.time)); + const t=this.timeBg.width-2*this.timeIcon.x-this.timeIcon.width; + this.timeLbl.x=this.timeIcon.x+this.timeIcon.width+.5*(t-this.timeLbl.width)} + else this.hide()} + hide(){ + super.hide(),this.setPaymentSuccess(!1),LM.getInstance().remove(this.onEnterUpdate,this)} + updateLayout(){ + super.updateLayout(); + const t=this.activeCount>0?this.rewardPool[0].height:0; + let i=this.rewardContainer.y+t+30; + this.guideSecretary&&this.guideSecretary.visible&&(this.guideSecretary.x=.5*(this.width-this.guideSecretary.width),this.guideSecretary.y=this.lblDesc.y+this.lblDesc.height+20,i+=this.guideSecretary.height),this.timeContainer&&(this.timeContainer.x=.5*(this.width-this.timeContainer.width),this.timeContainer.y=i,i+=this.timeContainer.height+45),this.btnBuy.visible&&(this.btnBuy.y=i,this.btnRedGem.y=i,i+=this.btnBuy.height+40),this.inventoryContainer&&this.inventoryContainer.visible&&(this.inventoryContainer.x=.5*(this.width-this.inventoryContainer.width),this.inventoryContainer.y=i,i+=this.inventoryContainer.height+30),this.height=i} + setPaymentSuccess(t){ + cS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),cS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))} + onPaymentSuccess(t){ + var i; + let s=-1; + t&&t.detail&&"productId"in t.detail&&(s=t.detail.productId),s===(null==(i=this.data)?void 0:i.productId)&&this.hide()} + } + ; + Vt(oVt,"ShopProductPopupWithTimer"),Kt(oVt,"_instance"); + let aVt=oVt; + const cVt=class t extends Ge{ + constructor(){ + super(),Kt(this,"items",[]),Kt(this,"itemPool",[]),Kt(this,"onPaymentSuccessBind")} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + add(t,i){ + if(-1!==this.items.findIndex(i=>i.productId===t))return; + let s; + this.itemPool.length>0?(s=this.itemPool.pop(),s.reset()):s=new dVt("Shop_Shortcut_01"),s.setData(t,i),s.onEndTime=()=>{ + this.onItemEndTime()} + ,s.onClick=(t,i)=>{ + aVt.getInstance().buyProduct2(t,i)} + ,this.addChild(s),this.items.push(s),this.items.length>0&&this.setPaymentSuccess(!0),this.alignItems()} + alignItems(){ + let t=0; + const i=this.items.length; + for(let s=0; + s<i; + ++s)this.items[s].y=t,t+=this.items[s].height+5} + onItemEndTime(){ + this.update(-1),this.alignItems()} + setPaymentSuccess(t){ + cS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),cS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))} + onPaymentSuccess(t){ + let i=-1; + t&&t.detail&&"productId"in t.detail&&(i=t.detail.productId),-1!==i&&this.update(i)} + update(t){ + const i=this.items.findIndex(i=>i.productId===t); + if(-1===i)return; + const s=this.items[i]; + s.reset(),s.removeFromParent(),this.items.splice(i,1),this.itemPool.push(s),0==this.items.length&&this.setPaymentSuccess(!1)} + } + ; + Vt(cVt,"ShopProductGroup"),Kt(cVt,"instance"); + let lVt=cVt; + const uVt=class extends IB{ + constructor(t,i=1){ + super("UI_Ekkorr",t,i),Kt(this,"container"),Kt(this,"timeBg"),Kt(this,"timeLbl"),Kt(this,"_productId",-1),Kt(this,"_endTime",-1),Kt(this,"count",0),Kt(this,"onEnterUpdate",Vt(()=>{ + ++this.count<60||(this.count=0,this.update())} + ,"onEnterUpdate")),Kt(this,"onEndTime",null),this.container=new Ge,this.addChild(this.container),this.container.x=this.bg.x,this.container.y=this.bg.y,this.bg.x=0,this.bg.y=0,this.container.addChild(this.bg),this.timeBg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Progress_Bar_Bg"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13} + ),this.timeBg.alpha=.7,this.timeBg.width=70,this.timeBg.x=this.bg.x-.5*this.timeBg.width,this.timeBg.y=this.bg.y+.5*this.bg.height-.75*this.timeBg.height,this.container.addChild(this.timeBg); + const s=fD.DEFAULT_FONT_OPTION_15; + s.fill=fD.COLOR_WHITE,s.stroke={ + color:"#000000",width:3,join:"round"} + ,this.timeLbl=new iL("00:00:00",s.fill,s),this.timeLbl.x=this.timeBg.x+.5*(this.timeBg.width-this.timeLbl.width),this.timeLbl.y=this.timeBg.y+.5*(this.timeBg.height-this.timeLbl.height)-1,this.container.addChild(this.timeLbl)} + get productId(){ + return this._productId} + get endTime(){ + return this._endTime} + setData(t,i){ + this._productId=t,this._endTime=i,this.update(),LM.getInstance().add(this.onEnterUpdate,this)} + update(){ + if(tx.time<this._endTime)this.timeLbl.text=EU.displayTime(.001*(this._endTime-tx.time)),this.timeLbl.x=this.timeBg.x+.5*(this.timeBg.width-this.timeLbl.width); + else{ + const t=this.onEndTime; + this.reset(),t&&t()} + } + reset(){ + this._endTime=-1,this._productId=-1,this.onEndTime=null,LM.getInstance().remove(this.onEnterUpdate,this)} + onDown(){ + this.container.scale.set(.9*this.iconScale)} + onUp(){ + this.container.scale.set(1*this.iconScale),JL.getInstance().playSFX(JL.SFX_NORMAL_CLICK),zL(),this.onClick&&this.onClick(this._productId,this._endTime)} + } + ; + Vt(uVt,"ShopProductItem"); + let dVt=uVt; + var fVt=(t=>(t.ACCOUNT_CREATE="ACCOUNT_CREATE",t))(fVt||{
CardEventDataManager 1 hunks, 127 statements
+ var AZt=(t=>(t[t.HIGH_CARD=0]="HIGH_CARD",t[t.PAIR=1]="PAIR",t[t.TWO_PAIR=2]="TWO_PAIR",t[t.TRIPLE=3]="TRIPLE",t[t.STRAIGHT=4]="STRAIGHT",t[t.FLUSH=5]="FLUSH",t[t.FULL_HOUSE=6]="FULL_HOUSE",t[t.FOUR_KIND=7]="FOUR_KIND",t[t.STRAIGHT_FLUSH=8]="STRAIGHT_FLUSH",t))(AZt||{ + } + ); + const SZt=[1,2,3,6,7],TZt=[4,8],CZt=[5,8],IZt=[3,6,7],OZt={ + [AZt.HIGH_CARD]:{ + power:5,morale:1} + ,[AZt.PAIR]:{ + power:10,morale:2} + ,[AZt.TWO_PAIR]:{ + power:20,morale:2} + ,[AZt.TRIPLE]:{ + power:30,morale:3} + ,[AZt.STRAIGHT]:{ + power:30,morale:4} + ,[AZt.FLUSH]:{ + power:35,morale:4} + ,[AZt.FULL_HOUSE]:{ + power:40,morale:4} + ,[AZt.FOUR_KIND]:{ + power:60,morale:7} + ,[AZt.STRAIGHT_FLUSH]:{ + power:100,morale:8} + } + ; + function kZt(t){ + return t<=10?t:14===t?11:10} + function xZt(t){ + if(!t||t.length<1||t.length>5)throw new Error(`evaluateHand: 카드는 1~5장이어야 합니다 (${ + t?t.length:0} + )`); + const i=new Map; + for(const h of t)i.set(h.rank,(i.get(h.rank)||0)+1); + const s=[...i.values()].sort((t,i)=>i-t); + let e=!1,n=!1; + if(5===t.length&&(n=t.every(i=>i.suit===t[0].suit),5===i.size)){ + const t=[...i.keys()].sort((t,i)=>t-i); + e=t[4]-t[0]===4||14===t[4]&&5===t[3]&&2===t[0]} + return e&&n?AZt.STRAIGHT_FLUSH:4===s[0]?AZt.FOUR_KIND:3===s[0]&&2===s[1]?AZt.FULL_HOUSE:n?AZt.FLUSH:e?AZt.STRAIGHT:3===s[0]?AZt.TRIPLE:2===s[0]&&2===s[1]?AZt.TWO_PAIR:2===s[0]?AZt.PAIR:AZt.HIGH_CARD} + function RZt(t,i,s){ + const e=xZt(t),n=OZt[e]; + let h=n.power+t.reduce((t,i)=>t+kZt(i.rank),0),r=n.morale+s.permMoraleStacks,o=1; + for(const a of i)switch(a.effect){ + case"suitMoraleAdd":r+=a.value*t.filter(t=>t.suit===a.suit).length; + break; + case"fewCardsMoraleAdd":t.length<=3&&(r+=a.value); + break; + case"fiveCardsPowerAdd":5===t.length&&(h+=a.value); + break; + case"pairFamilyMoraleAdd":SZt.includes(e)&&(r+=a.value); + break; + case"straightFamilyMoraleAdd":TZt.includes(e)&&(r+=a.value); + break; + case"flushFamilyMoraleAdd":CZt.includes(e)&&(r+=a.value); + break; + case"discardLeftMoraleAdd":r+=a.value*s.discardsLeft; + break; + case"numberCardPowerAdd":h+=a.value*t.filter(t=>t.rank<=10).length; + break; + case"faceCardMoraleAdd":r+=a.value*t.filter(t=>t.rank>=11&&t.rank<=13).length; + break; + case"moraleMult":o*=a.value; + break; + case"lastSubmitMoraleMult":4===s.submitIndexInRound&&(o*=a.value); + break; + case"firstSubmitMoraleMult":1===s.submitIndexInRound&&(o*=a.value); + break; + case"acePerMoraleMult":for(const i of t)14===i.rank&&(o*=a.value); + break; + case"tripleFamilyMoraleMult":IZt.includes(e)&&(o*=a.value); + break; + case"highCardMoraleMult":e===AZt.HIGH_CARD&&(o*=a.value)} + return{ + hand:e,power:h,moraleAdd:r,moraleMultTotal:o,total:Math.floor(h*r*o)} + } + Vt(kZt,"getRankPower"),Vt(xZt,"evaluateHand"),Vt(RZt,"calcScore"); + const NZt=class t{ + constructor(){ + Kt(this,"run",null),Kt(this,"entries",{ + freeLeft:0,adLeft:0} + ),Kt(this,"myRecord",{ + bestScore:0,bestRound:0,achievedAt:""} + )} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + unwrap(t){ + var i,s; + if(!t)throw new Error("네트워크 오류"); + if(!1===t.success)throw new Error(t.errorMessage??(null==(s=null==(i=t.header)?void 0:i.errorInfo)?void 0:s.message)??"요청 실패"); + return t.body??t} + applyCommon(t){ + t&&(void 0!==t.run&&(this.run=t.run),t.entries&&(this.entries=t.entries),t.myRecord&&(this.myRecord=t.myRecord))} + async fetchState(){ + const t=this.unwrap(await lD.getInstance().cardEvent.getState()); + this.applyCommon(t)} + async start(t){ + const i=this.unwrap(await lD.getInstance().cardEvent.start(t)); + return this.applyCommon(i),this.run} + async submit(t){ + const i=this.unwrap(await lD.getInstance().cardEvent.submit(t)); + return this.applyCommon(i),i.dead&&(this.run=null),i} + async discard(t){ + const i=this.unwrap(await lD.getInstance().cardEvent.discard(t)); + return this.applyCommon(i),this.run} + async pickJoker(t,i){ + const s=this.unwrap(await lD.getInstance().cardEvent.pickJoker(t,i)); + return this.applyCommon(s),this.run} + async giveUp(){ + const t=this.unwrap(await lD.getInstance().cardEvent.giveUp()); + return this.run=null,t.myRecord&&(this.myRecord=t.myRecord),t} + async getRanking(t=10){ + return this.unwrap(await lD.getInstance().cardEvent.getRanking(t))} + previewScore(t){ + const i=this.run; + if(!i||t.length<1||t.length>5)return null; + const s=t.map(t=>i.hand[t]).filter(Boolean); + if(s.length!==t.length)return null; + try{ + return RZt(s,i.jokers,{ + submitIndexInRound:4-i.submitsLeft+1,discardsLeft:i.discardsLeft,permMoraleStacks:i.permMoraleStacks} + )} + catch{ + return null} + } + } + ; + Vt(NZt,"CardEventDataManager"),Kt(NZt,"EVENT_OPEN",!0),Kt(NZt,"_instance"); + let PZt=NZt;
InvitationCodeRewardPopup 1 hunks, 122 statements
+ super(),Kt(this,"lblMessage"),Kt(this,"container"),Kt(this,"containerBg"),Kt(this,"rewardItems"),Kt(this,"btnConfirm"),this.title=xG.getText("GAME_1540","선물 코드"); + const t=fD.LABEL_OPTION_NO_DROP_SHADOW; + t.fill=fD.COLOR_WHITE,this.lblMessage=new iL(xG.getText("GAME_63","오늘도 환생 2에 오신 것을 환영합니다!"),t.fill,t),this.addChild(this.lblMessage),fD.setLabelWrapWidth(this.lblMessage,this.width-60); + const i=fD.LABEL_OPTION_NO_DROP_SHADOW; + i.fill=fD.DEFAULT_COLOR,i.fontWeight="normal",i.fontSize=20,this.containerBg=new He(QA.getTexture("UI_Ekkorr","Pass_Bg_0")),this.containerBg.alpha=.7,this.containerBg.width=this.width-24,this.addChild(this.containerBg),this.container=new Ge,this.addChild(this.container),this.rewardItems=[],this.btnConfirm=new oG(xG.getText("COMMON_1","확인")),this.addChild(this.btnConfirm),this.btnConfirm.onClick=this.onConfirmBtnClick.bind(this),this.updateLayout()} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + updateLayout(){ + this.lblMessage.x=.5*(this.width-this.lblMessage.width),this.lblMessage.y=90,this.containerBg.x=.5*(this.width-this.containerBg.width),this.containerBg.y=this.lblMessage.y+this.lblMessage.height+30,this.containerBg.height=this.container.height+40,this.container.x=.5*(this.width-this.container.width),this.container.y=this.containerBg.y+20,this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=this.containerBg.y+this.containerBg.height+30,this.height=this.btnConfirm.y+this.btnConfirm.height+50} + setData(t){ + this.title=xG.getText("GAME_1540","선물 코드"),this.lblMessage.text=xG.getText("GAME_1545","선물을 받았습니다!"),this.btnConfirm.text=xG.getText("COMMON_1","확인"),this.setRewards(t),this.setPositonRatioY(.35),this.updateLayout()} + onConfirmBtnClick(){ + this.hide()} + setRewards(t){ + let i; + this.container.removeChildren(); + let s=0,e=0; + const n=t.body.rewards,h=n.length; + for(let r=0; + r<h; + ++r)r<this.rewardItems.length?i=this.rewardItems[r]:(i=new I5,this.rewardItems.push(i)),i.x=s,i.y=e,i.setDataFrom(n[r]),this.container.addChild(i),(r+1)%5==0?(s=0,e+=i.height+15):s+=i.width+15} + test(){ + this.setData({ + header:{ + sts:1774932569265} + ,body:{ + rewards:[{ + type:"gem",amount:1e3} + ,{ + type:"honorCoin",amount:500} + ,{ + type:"hero",amount:1,kindNum:2} + ],user:{ + userId:"mmub4gj001ymar",name:"OMEGA LIGHT #634604",uid:"zMD6iGdxOfFZ",accountId:"mmub4ghx01w9e3",server:1,userType:0,regTime:"2026-03-17T07:44:50.000Z",gold:53407,gem:531580,honorCoin:96950,guildId:null,language:"ko",lastLoginTime:"2026-03-31T04:49:10.000Z",medal:4798,accuMedal:4798,maxTeamSlots:5,maxWave:55,accuWave:1788,wave:36,medalBuyCount:0,lastReviveTime:"2026-03-31T02:45:31.000Z",goldPerSec:1,lastGoldUpdateTime:"2026-03-17T07:56:18.000Z",numRevive:59,numRevive30:44,speed15EndTime:"2026-03-30T01:13:00.000Z",speed20EndTime:null,activeSkills:"1|-1|-1",heart:0,tribe:4,adsEndTime:null,needRevive:!1} + } + } + ),this.show()} + } + ; + Vt($ei,"InvitationCodeRewardPopup"),Kt($ei,"instance"); + let jei=$ei; + const Vei=class t extends fG{ + constructor(){ + super(),Kt(this,"inputBg"),Kt(this,"input"),Kt(this,"btnCancel"),Kt(this,"btnConfirm"),Kt(this,"lblNote"),Kt(this,"requestPending",!1),this.title=xG.getText("GAME_1541","선물 코드 입력"),this.inputBg=new TM({ + texture:QA.getTexture("UI_Ekkorr","UI_Slot2"),leftWidth:4,topHeight:4,rightWidth:4,bottomHeight:4} + ),this.inputBg.visible=!1,this.inputBg.x=40,this.inputBg.width=this.width-2*this.inputBg.x,this.inputBg.height=70,this.addChild(this.inputBg),this.btnCancel=new HYt(xG.getText("COMMON_2","취소")),this.btnCancel.outlineText=!0,this.btnCancel.width=240,this.btnCancel.height=65,this.addChild(this.btnCancel),this.btnCancel.onClick=this.onCancealBtnClick.bind(this),this.btnConfirm=new HYt(xG.getText("COMMON_1","확인")),this.btnConfirm.color=HYt.COLOR_ORANGE,this.btnConfirm.outlineText=!0,this.btnConfirm.width=this.btnCancel.width,this.btnConfirm.height=this.btnCancel.height,this.addChild(this.btnConfirm),this.btnConfirm.onClick=this.onConfirmBtnClick.bind(this); + const t=fD.LABEL_OPTION_NO_DROP_SHADOW; + t.fill=fD.COLOR_WHITE,t.fontSize=19,this.lblNote=new iL("",t.fill,t),this.addChild(this.lblNote),fD.setLabelWrapWidth(this.lblNote,this.inputBg.width),this.input=document.createElement("input"),this.input.type="text",this.input.style.position="absolute",this.input.style.fontFamily="Arial",this.input.style.fontSize="14px",this.input.style.textAlign="center",this.input.style.display="none",this.input.placeholder=xG.getText("GAME_1542","선물 코드를 입력해 주세요."),this.input.style.color="white",this.input.style.background="transparent",this.input.style.border="2px solid #684f3e",this.input.style.borderRadius="6px",this.input.style.boxSizing="border-box",document.body.appendChild(this.input),this.updateLayout(),this.on("removed",this.onRemoved)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + onRemoved(){ + this.lblNote.text="",this.hideInput(!0)} + updateLayout(){ + this.inputBg.x=40,this.inputBg.y=90,this.btnCancel.x=this.inputBg.x,this.btnCancel.y=this.inputBg.y+this.inputBg.height+20,this.btnConfirm.x=this.inputBg.x+this.inputBg.width-this.btnConfirm.width,this.btnConfirm.y=this.btnCancel.y,this.lblNote.x=this.inputBg.x+.5*(this.inputBg.width-this.lblNote.width),this.lblNote.y=this.btnConfirm.y+this.btnConfirm.height+20,this.height=this.lblNote.y+this.lblNote.height+50} + setData(){ + this.title=xG.getText("GAME_1541","선물 코드 입력"),this.btnCancel.text=xG.getText("COMMON_2","취소"),this.btnConfirm.text=xG.getText("COMMON_1","확인"),this.updateLayout(),this.setPositonRatioY(.25); + const t=[this.inputBg,this.btnCancel,this.btnConfirm]; + KVt.showItemsInVertical(t)} + onShowMotionComplete(){ + super.onShowMotionComplete(),this.showInput()} + showInput(){ + const t=this.toGlobal(this.inputBg.position),i=VA.stage.scale; + this.input.style.display="block",this.input.style.left=t.x+"px",this.input.style.top=t.y+"px",this.input.style.width=`${ + Math.floor(this.inputBg.width*i.x)} + px`,this.input.style.height=`${ + Math.floor(this.inputBg.height*i.y)} + px`,this.input.placeholder=xG.getText("GAME_1542","선물 코드를 입력해 주세요.")} + hideInput(t=!1){ + this.input.style.display="none",1==t&&(this.input.value="")} + showMessage(t,i=fD.COLOR_WHITE){ + this.lblNote.text=t,this.lblNote.textColor=i,this.lblNote.x=this.inputBg.x+.5*(this.inputBg.width-this.lblNote.width)} + showErrorMessage(t){ + this.showMessage(t,fD.COLOR_ORANGE)} + async onCancealBtnClick(){ + this.hide()} + async onConfirmBtnClick(){ + const t=this.input.value.trim(); + if(""==t)return void this.showErrorMessage(xG.getText("GAME_1542","선물 코드를 입력해 주세요.")); + if(1==this.requestPending)return; + this.setRequestPending(!0); + const i=await lD.getInstance().promotion.apply(t,!0); + if(0==i.success){ + this.setRequestPending(!1); + let t=i.errorMessage; + return"INVITATION_ALREADY_USED"==i.error?t=xG.getText("GAME_1544","이미 사용한 선물 코드입니다."):"INVALID_INVITATION_CODE"==i.error&&(t=xG.getText("GAME_1543","선물 코드를 확인해 주세요.")),void this.showErrorMessage(t)} + TL.setUserData(i.body.user); + const s=new Set; + if(i.body.rewards){ + const t=i.body.rewards.length; + for(let e=0; + e<t; + ++e)s.add(i.body.rewards[e].type)} + else s.add("gem"); + s.has("gem")&&qF.getInstance().updateGem(),s.has("honorCoin")&&this.updateHonorCoin(),s.has("hero")&&("hero"in i.body?this.updateHero(i.body.hero):this.getHeroInfo()),this.setRequestPending(!1),this.hide(),setTimeout(()=>{ + jei.getInstance().setData(i),jei.getInstance().show()} + ,300)} + updateHonorCoin(){ + sYt.getInstance().isHonorShopSubView()?B3t.getInstance().updateHonorCoin():sYt.getInstance().isBattleView()&&W3t.getInstance().updateHonorCoin()} + async getHeroInfo(){ + const t=await lD.getInstance().hero.getHeroInfo(); + t.success&&this.updateHero(t.body.hero)} + updateHero(t){ + const i=wx.getInstance().getTeamIds(); + wx.getInstance().setData(t); + const s=wx.getInstance().getTeamIds(); + if(s.length>i.length){ + LF.getInstance().showMessage(xG.getText("GAME_274","병사가 슬롯에 추가되었습니다.")),sYt.getInstance().isHeroSubView()&&Mqt.getInstance().setData(); + for(let t=i.length; + t<s.length; + ++t){ + const i=wx.getInstance().getVOWithId(s[t]); + i&&loi.getInstance().hireHero(i)} + } + else LF.getInstance().showMessage(xG.getText("GAME_209","병사가 [병영]으로 이동했습니다.")),sYt.getInstance().isHeroRosterView()&&jqt.getInstance().setData()} + setRequestPending(t){ + this.requestPending=t} + } + ; + Vt(Vei,"InvitationCodePopup"),Kt(Vei,"instance"); + let Kei=Vei; + const zei=class t extends fG{ + constructor(){
MissionGuideController 1 hunks, 117 statements
- if(0==ML.numRevive&&ML.wave<3)return; - const t=nVt.getInstance(); - if(0!==t.missionList.length){ - if(await t.loadInfo(),t.isAllCompleted())return this.active=!1,void(dVt.getInstance().visible=!1); - yni.getInstance().retire(),dVt.getInstance().onClaim=()=>{ - this.onRewardClaimed()} - ,this.active=!0,this.refreshMission(),this.onConditionChanged()} - else this.active=!1} - refreshMission(){ - const t=nVt.getInstance(),i=t.getCurrentMission(); - if(!i)return this.active=!1,this.stopFrameCheck(),void(dVt.getInstance().visible=!1); - dVt.getInstance().visible=!0,dVt.getInstance().setData(i),dVt.getInstance().activated=t.rewardPending,this.currentSteps=t.getCurrentSteps(),this.cachedCondition=vni(i.condition),this.startFrameCheck(),this.updatePointing()} - startFrameCheck(){ - this.checking||(this.checking=!0,this.frameSkip=0,LM.getInstance().add(this.onFrameCheck,this))} - stopFrameCheck(){ - this.checking&&(this.checking=!1,LM.getInstance().remove(this.onFrameCheck,this))} - onFrameCheck(){ - if(++this.frameSkip<t.CHECK_INTERVAL)return; - this.frameSkip=0; - const i=nVt.getInstance(); - if(!i.rewardPending)return this.cachedCondition&&bni(this.cachedCondition)?(i.rewardPending=!0,dVt.getInstance().activated=!0,void this.updatePointing()):void this.updatePointing(); - this.updatePointing()} - onMenuChanged(){ - this.active&&this.updatePointing()} - onConditionChanged(){ - this.active&&(this.frameSkip=t.CHECK_INTERVAL)} - async onRewardClaimed(){ - if(!this.active)return; - const t=nVt.getInstance(); - if(!t.rewardPending)return; - yni.getInstance().hideFromTarget(),this.stopFrameCheck(); - const i=t.currentMissionId; - if(await t.claimReward(i)>0&&$F.getInstance().updateGem(),t.isAllCompleted())return this.active=!1,this.stopFrameCheck(),void(dVt.getInstance().visible=!1); - this.refreshMission(),this.onConditionChanged()} - registerBottomMenuGetter(t){ - this.bottomMenuGetter=t} - registerSubMenuButtonGetter(t){ - this.subMenuButtonGetter=t} - registerListItemsGetter(t,i=""){ - this.listItemsGetter=t,this.currentSubViewName=i,this.updatePointing()} - registerPopupButtonGetter(t){ - this.popupButtonGetter=t,this.updatePointing()} - unregisterPopupButtonGetter(){ - this.popupButtonGetter=null} - unregisterListItemsGetter(t=""){ - t&&this.currentSubViewName!==t||(this.listItemsGetter=null,this.currentSubViewName="")} - registerReviveButtonGetter(t){ - this.reviveButtonGetter=t,this.updatePointing()} - unregisterReviveButtonGetter(){ - this.reviveButtonGetter=null} - registerRightMenuIndicatorButtonGetter(t){ - this.rightMenuIndicatorButtonGetter=t,this.updatePointing()} - registerDailyQuestButtonGetter(t){ - this.dailyQuestButtonGetter=t,this.updatePointing()} - unregisterDailyQuestButtonGetter(){ - this.reviveButtonGetter=null} - registerPetButtonGetter(t){ - this.petButtonGetter=t,this.updatePointing()} - unregisterPetButtonGetter(){ - this.petButtonGetter=null} - registerMineButtonGetter(t){ - this.mineButtonGetter=t,this.updatePointing()} - unregisterMineButtonGetter(){ - this.mineButtonGetter=null} - registerGuildButtonGetter(t){ - this.guildButtonGetter=t,this.updatePointing()} - unregisterGuildButtonGetter(){ - this.guildButtonGetter=null} - showWithDelay(i,s){ - const e=yni.getInstance(); - if(e.currentTarget!==i){ - if(this.pointingDelayed)return this.pendingParent=i,void(this.pendingBtn=s); - e.hideFromTarget(),this.pendingParent=i,this.pendingBtn=s,this.pointingDelayed=!0,this.pointingDelayTimer&&clearTimeout(this.pointingDelayTimer),this.pointingDelayTimer=setTimeout(()=>{ - this.pointingDelayed=!1,this.pointingDelayTimer=null,this.pendingParent&&this.pendingBtn&&e.showOnTarget(this.pendingParent,this.pendingBtn),this.pendingParent=null,this.pendingBtn=null} - ,t.POINTING_DELAY)} - else e.showOnTarget(i,s)} - cancelPointingDelay(){ - this.pointingDelayTimer&&(clearTimeout(this.pointingDelayTimer),this.pointingDelayTimer=null),this.pointingDelayed=!1} - updatePointing(){ - if(!this.active)return; - if(0===this.currentSteps.length)return yni.getInstance().hideFromTarget(),void this.cancelPointingDelay(); - const t=nVt.getInstance(); - if(t.rewardPending){ - const t=dVt.getInstance(); - return void this.showWithDelay(t,{ - x:0,y:-20,width:t.width,height:t.height} - )} - const i=yni.getInstance(); - for(const s of this.currentSteps){ - if("-1"===s.action||"none"===s.action)return i.hideFromTarget(),void this.cancelPointingDelay(); - if("bottomMenu"===s.action){ - const t=s.target; - if(sVt.currentIndex===t)continue; - if(this.bottomMenuGetter){ - const i=this.bottomMenuGetter(t); - i&&this.showWithDelay(i.parent,i.btn)} - return} - if("list"===s.action){ - if("Tower"==this.currentSubViewName&&1==s.step)continue; - if(this.popupButtonGetter)continue; - if(!this.listItemsGetter)return; - const t=this.listItemsGetter(),i=s.target; - if(i<0||i>=t.length)return; - const e=t[i]; - if(!e)return; - const n=s.param; - if(n&&n.includes("|")){ - let t=!1; - for(let e=this.currentSteps.indexOf(s)+1; - e<this.currentSteps.length; - e++){ - const i=this.currentSteps[e]; - if("list"===i.action&&i.param&&!i.param.includes("|")){ - const s=this.listItemsGetter()[i.target]; - if(s&&s[i.param]){ - t=!0; - break}
ShopView 1 hunks, 114 statements
- setData(){ - this.shopSubMenu.updateLanguage(),this.subViews[0].setData(),this.subViews[1].setData(),this.checkShopForReview()} - get className(){ - return"ShopView"} - getCurrentViewClassName(){ - for(let t=0; - t<this.subViews.length; - t++)if(this.subViews[t].visible)return this.subViews[t].className; - return""} - getCurrentIndex(){ - return this.currentIndex} - clickTab(t){ - t!==this.currentIndex&&(t<0||t>=this.subViews.length||(this.switchTab(t),this.shopSubMenu.setActiveTab(t)))} - updateLanguage(){ - this.setData(),this.shopSubMenu.updateLanguage()} - } - ; - Vt(HYt,"ShopView"),Kt(HYt,"instance"); - let WYt=HYt; - const $Yt=class t{ - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - constructor(){ - } - isQuestView(){ - var t; - return null!=mYt.getInstance().currentView&&"QuestView"==(null==(t=mYt.getInstance().currentView)?void 0:t.className)} - isHeroView(){ - var t; - return null!=mYt.getInstance().currentView&&"HeroView"==(null==(t=mYt.getInstance().currentView)?void 0:t.className)} - isHeroSubView(){ - var t,i; - return 0!=this.isHeroView()&&"HeroSubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isHeroRosterView(){ - var t,i; - return 0!=this.isHeroView()&&"HeroRosterView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isHeroHireSubView(){ - var t,i; - return 0!=this.isHeroView()&&"HeroHireSubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isCastleView(){ - var t; - return null!=mYt.getInstance().currentView&&"CastleView"==(null==(t=mYt.getInstance().currentView)?void 0:t.className)} - isCastleSubView(){ - var t,i; - return 0!=this.isCastleView()&&"CastleSubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isCastleUpgradeSubView(){ - var t,i; - return 0!=this.isCastleView()&&"CastleUpgradeSubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isTreasureView(){ - var t; - return null!=mYt.getInstance().currentView&&"TreasureView"==(null==(t=mYt.getInstance().currentView)?void 0:t.className)} - isTreasureSubView(){ - var t,i; - return 0!=this.isTreasureView()&&"TreasureSubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isTreasureInventorySubView(){ - var t,i; - return 0!=this.isTreasureView()&&"TreasureInventorySubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isTreasureShopSubView(){ - var t,i; - return 0!=this.isTreasureView()&&"TreasureShopSubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isBattleView(){ - var t; - return null!=mYt.getInstance().currentView&&"BattleView"==(null==(t=mYt.getInstance().currentView)?void 0:t.className)} - isHonorShopSubView(){ - var t,i; - return 0!=this.isBattleView()&&"HonorShopSubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isDungeonSubView(){ - var t,i; - if(0==this.isBattleView())return!1; - const s=null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className; - return"DungeonSubView"==s||"DungeonDetailSubView"==s} - isPVPBattlePopup(){ - return this.isDetailPopupView("PVPBattlePopup")} - isDailyBattleSubView(){ - var t,i; - return 0!=this.isBattleView()&&"DailyBattleSubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isTowerSubView(){ - var t,i; - return 0!=this.isBattleView()&&"TowerSubView"==(null==(i=null==(t=mYt.getInstance().currentView)?void 0:t.currentSubView)?void 0:i.className)} - isShopView(){ - var t; - return null!=mYt.getInstance().currentView&&"ShopView"==(null==(t=mYt.getInstance().currentView)?void 0:t.className)} - isShopGemSubView(){ - return 0!=this.isShopView()&&"ShopGemSubView"==WYt.getInstance().getCurrentViewClassName()} - isShopPaySubView(){ - return 0!=this.isShopView()&&"ShopPaySubView"==WYt.getInstance().getCurrentViewClassName()} - isDetailPopupView(t){ - const i=DU.getInstance(),s=i.children.length; - let e; - for(let n=0; - n<s; - ++n)if(e=i.getChildAt(n),"string"==typeof e.className&&e.className==t)return!0; - return!1} - isPetPopup(){ - return this.isDetailPopupView("PetPopup")} - isGuildPopup(){ - return this.isDetailPopupView("Guild2Popup")} - isInventoryPopup(){ - return this.isDetailPopupView("InventoryPopup")} - } - ; - Vt($Yt,"ViewUtil"),Kt($Yt,"instance"); - let jYt=$Yt; - const VYt=class extends Ge{ - constructor(t){ - super(),Kt(this,"index",-1),Kt(this,"bg"),Kt(this,"bgOn"),Kt(this,"icon"),Kt(this,"container"),Kt(this,"_selected",!0),Kt(this,"onClick"),this.container=new Ge,this.addChild(this.container),this.bg=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_01")),this.bg.width=52,this.bg.height=52,this.container.addChild(this.bg),this.bgOn=new He(QA.getTexture("UI_Ekkorr","Frame_Reward_02")),this.bgOn.width=this.bg.width,this.bgOn.height=this.bg.height,this.container.addChild(this.bgOn),this.icon=new He(QA.getTexture("UI_Ekkorr",t)),this.icon.x=.5*(this.bg.width-this.icon.width),this.icon.y=.5*(this.bg.height-this.icon.height),this.container.addChild(this.icon),this.eventMode="dynamic",this.on("pointerdown",this.onDown,this),this.on("pointerup",this.onUp,this),this.on("pointerupoutside",this.onUp,this),this.on("pointertap",this.onTap,this),this.selected=!1,this.container.pivot.set(.5*this.bg.width,.5*this.bg.height)} - get width(){ - return this.bg.width} - get height(){ - return this.bg.height} - get selected(){ - return this._selected} - set selected(t){ - t!=this._selected&&(this._selected=t,this._selected?(this.bg.visible=!1,this.bgOn.visible=!0):(this.bg.visible=!0,this.bgOn.visible=!1))}
HeroRosterView 5 hunks, 85 statements
- super(),Kt(this,"bg"),Kt(this,"lblTitle"),Kt(this,"menus"),Kt(this,"_selectedIndex",-1),Kt(this,"onMenuClick"),this.bg=new ZD,this.bg.setIndex(6),this.bg.width=640,this.bg.height=70,this.addChild(this.bg),this.lblTitle=new JD(CG.getText("GAME_219","인벤토리"),16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_20),this.lblTitle.x=10,this.lblTitle.y=10,this.addChild(this.lblTitle),this.menus=[]; - const t=["Inventory_Icon_Bag","Inventory_Icon_Hero","Inventory_Icon_Pet","Inventory_Icon_Relic"]; - let i,s=-1; - for(let e=t.length-1; - e>-1; - --e)i=new KYt(t[e]),i.index=e,-1==s&&(s=640-.5*i.width-15),i.x=s,i.y=.5*this.bg.height,this.addChild(i),this.menus.push(i),i.onClick=this.onMenuClickFunc.bind(this),s-=i.width+10; - this.menus.reverse()} + super(),Kt(this,"list"),Kt(this,"emptyLabel"),Kt(this,"btnHirePoint",new gi),Kt(this,"btnHirelPointInitialized",!1),this.list=new P5(Wqt,630,VA.listHeight),this.list.x=5,this.list.y=kqt.getInstance().height,this.emptyLabel=new iL(xG.getText("GAME_337","병영에 대기중인 영웅이 없습니다."),10066329,fD.MENU_LABEL_OPTION),this.emptyLabel.x=320-this.emptyLabel.width/2,this.emptyLabel.y=this.list.y+80,this.emptyLabel.visible=!1,this.addChild(this.list),this.addChild(this.emptyLabel),this.addChild(kqt.getInstance()),this.on("removed",this.onRemoved,this)}
- return this._instance||(this._instance=new t),this._instance} - get height(){ - return this.bg.height} - get selectedIndex(){ - return this._selectedIndex} + return null==this.instance&&(this.instance=new t),this.instance} + onRemoved(){ + kqt.getInstance().resetFilter()} + get className(){ + return"HeroRosterView"} + getItems(){ + return this.list.getItemList()}
- this.lblTitle.text=CG.getText("GAME_219","인벤토리"),-1==this._selectedIndex&&this.onMenuClickFunc(0)} - onMenuClickFunc(t){ - this._selectedIndex=t,this.updateMenu(this._selectedIndex),this.onMenuClick&&this.onMenuClick(this._selectedIndex)} - updateMenu(t){ - const i=this.menus.length; + kqt.getInstance().setData(),this.updateList()} + updateList(){ + const t=kqt.getInstance().selectedTribes,i=wx.getInstance(),s=new Set; + for(const r of i.ownedUnitList){ + const e=i.getBookVO(r.kindNum); + e&&0!=t.includes(e.tribe)&&e.base>0&&s.add(e.base)} + const e=wx.getInstance(),n=Array.from(s).sort((t,i)=>{ + const s=e.getBookVO(t),n=e.getBookVO(i); + return s&&n?s.tribe!=n.tribe?s.tribe-n.tribe:n.grade-s.grade:1} + ),h=this.list.getDataLen(); + if(this.list.dataProvider=n,this.emptyLabel.visible=0===n.length,h>this.list.getDataLen()){ + const t=Math.floor(Math.abs(this.list.getContainerY())/74); + this.list.scrollTo(t)} + } + onFilterChanged(){ + const t=this.list.getItemList(),i=t.length;
- ++s)this.menus[s].selected=s==t} + ++s)t[s].reset(); + this.updateList()} + updateLanguage(){ + this.emptyLabel.text=xG.getText("GAME_337","병영에 대기중인 영웅이 없습니다."),this.emptyLabel.x=320-this.emptyLabel.width/2,this.setData()} + getBtnHirePoint(){ + if(0==this.btnHirelPointInitialized){ + this.btnHirelPointInitialized=!0; + const t=this.getItems()[0].btnHire; + this.btnHirePoint.x=jKt.getInstance().x+this.list.x+t.x,this.btnHirePoint.y=jKt.getInstance().y+40+this.list.y+t.y} + return this.btnHirePoint}
- Vt(zYt,"InventoryTop"),Kt(zYt,"_instance"); - let qYt=zYt; - const YYt=class t extends RB{ - constructor(){ - super(),Kt(this,"lblDesc"),Kt(this,"btnConfirm"),Kt(this,"icons",[]),this.outSideClickHide=!0,this.title=CG.getValueReplace("GAME_181","##",5,"5성 병사 뽑기"),this.lblDesc=new JD("",13421772,cD.DEFAULT_FONT_OPTION_16),this.lblDesc.align="center",this.contentContainer.addChild(this.lblDesc),this.btnConfirm=new ZL(CG.getText("COMMON_1","확인")),this.btnConfirm.color=ZL.GREEN,this.btnConfirm.width=160,this.btnConfirm.height=50,this.btnConfirm.onClick=()=>this.hide(),this.contentContainer.addChild(this.btnConfirm)} - static getInstance(){ - return this._instance||(this._instance=new t),this._instance} - async showGuide(){ - this.title=CG.getValueReplace("GAME_181","##",5,"5성 병사 뽑기"),this.btnConfirm.text=CG.getText("COMMON_1","확인"); - const t=wx.getInstance(),i=Number(AL.getInstance().getClientData("BUYABLE_HONOR_HERO_NUMBER")||1),s=t.bookList.filter(t=>5===t.grade&&0===t.evolStage&&t.canPurchase&&t.honor>=i+1&&t.kindNum<1e3); - this.update(s,this.title),await this.loadImage(),super.show()} - showGuideOfHeroGacha(){ - this.title=CG.getText("GAME_764","5성 영웅 확정권"),this.btnConfirm.text=CG.getText("COMMON_1","확인"); - const t=wx.getInstance(),i=t.honorNumberMax,s=t.bookList.filter(t=>5===t.grade&&0===t.evolStage&&t.canPurchase&&(t.honor>=1&&t.honor<i||t.honor<1)&&t.kindNum<1e3); - this.update(s,this.title),super.show()} - update(t,i){ - var s,e; - for(const p of this.icons)this.contentContainer.removeChild(p); - this.icons=[]; - const n=t.length,h=n>0?(100/n).toFixed(2):"0",r=CG.getText("GAME_602","아래 병사 중 랜덤한 병사를 획득합니다.")+" "+CG.getText("COMMON_475","획득 확률은 모두 동일합니다.")+`\n(${ - CG.getText("COMMON_476","개별 획득 확률")} - : ${ - h} - %(=1/${ - n} - ))`; - this.lblDesc.text=r; - for(let p=0; - p<t.length; - p++){ - const i=new u5; - i.scale=.7,i.setDataWithKindNum(t[p].kindNum),this.contentContainer.addChild(i),this.icons.push(i)} - const o=(null==(s=this.icons[0])?void 0:s.width)??70,a=(null==(e=this.icons[0])?void 0:e.height)??70,c=Math.ceil(t.length/4),l=4*o+15; - this.width=520,this.title=i,cD.setLabelWrapWidth(this.lblDesc,this.width-55),this.lblDesc.x=.5*(this.width-this.lblDesc.width),this.lblDesc.y=65; - const u=this.lblDesc.y+this.lblDesc.height+15,d=.5*(this.width-l)+5; - for(let p=0; - p<this.icons.length; - p++){ - const t=p%4,i=Math.floor(p/4); - this.icons[p].x=d+t*(o+5),this.icons[p].y=u+i*(a+2)} - const f=u+c*(a+2)+35; - this.btnConfirm.x=.5*(this.width-this.btnConfirm.width),this.btnConfirm.y=f,this.height=f+this.btnConfirm.height+30,this.btnClose.x=this.width-this.btnClose.width-12} - } - ; - Vt(YYt,"HeroDrawGuidePopup"),Kt(YYt,"_instance"); + Vt($qt,"HeroRosterView"),Kt($qt,"instance");
HeroView 3 hunks, 79 statements
- const Uqt={ - 1:200,2:300,3:500,4:1e3,5:2e3} - ,Fqt=class t extends cG{ - constructor(){ - super(),Kt(this,"onEvolved",null),Kt(this,"lblQuestion",new JD("보석을 사용하여 진화하시겠습니까?",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_18)),Kt(this,"lblHeaderCurrent",new JD("현재",11184810,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHeaderArrow",new JD("→",16777215,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHeaderEvolved",new JD("진화 후",16768324,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHpCurrent",new VB("UI_HEART","0",11184810,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHpArrow",new JD("→",16777215,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblHpEvolved",new VB("UI_HEART","0",8978312,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblAtkCurrent",new VB("UI_SWORD","0",11184810,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblAtkArrow",new JD("→",16777215,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblAtkEvolved",new VB("UI_SWORD","0",8978312,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblDefCurrent",new VB("UI_PHY_DEFENSE","0",11184810,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblDefArrow",new JD("→",16777215,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblDefEvolved",new VB("UI_PHY_DEFENSE","0",8978312,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblTribeTitle",new JD("# 종족 특성",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblTribeDesc",new JD("",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblUniqueTitle",new JD("# 고유스킬",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblUniqueDesc",new JD("",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"btnCancel",new xU("UI_CLOSE_BTN","","취소",.7,160,70)),Kt(this,"btnConfirm",new xU("UI_GEM","200","진화",.8,200,70)),Kt(this,"vo"),Kt(this,"isBusy",!1),Kt(this,"isRosterMode",!1),Kt(this,"count",1),Kt(this,"particleContainer",new Ge),Kt(this,"particleList",[]),Kt(this,"particleFrame",0),Kt(this,"PARTICLE_DURATION",55),this.title=CG.getText("GAME_145","진화 확인"),this.lblQuestion.text=CG.getText("GAME_142","보석을 사용하여 진화하시겠습니까?"),this.lblQuestion.y=95,this.contentContainer.addChild(this.lblQuestion),this.lblHeaderCurrent.text=CG.getText("GAME_152","현재"),this.lblHeaderEvolved.text=CG.getText("GAME_153","진화 후"),this.contentContainer.addChild(this.lblHeaderCurrent,this.lblHeaderArrow,this.lblHeaderEvolved),this.contentContainer.addChild(this.lblHpCurrent,this.lblHpArrow,this.lblHpEvolved),this.contentContainer.addChild(this.lblAtkCurrent,this.lblAtkArrow,this.lblAtkEvolved),this.contentContainer.addChild(this.lblDefCurrent,this.lblDefArrow,this.lblDefEvolved),cD.setLabelWrapWidth(this.lblTribeDesc,430),cD.setLabelWrapWidth(this.lblUniqueDesc,430),this.contentContainer.addChild(this.lblTribeTitle,this.lblTribeDesc,this.lblUniqueTitle,this.lblUniqueDesc),this.btnCancel.text=CG.getText("COMMON_2","취소"),this.btnCancel.color=xU.RED,this.btnCancel.showIconLabel=!1,this.btnCancel.showTextLabel=!0,this.btnCancel.onClick=()=>this.hide(),this.btnConfirm.text=CG.getText("GAME_67","진화"),this.btnConfirm.color=xU.GREEN,this.btnConfirm.showIconLabel=!0,this.btnConfirm.showTextLabel=!0,this.btnConfirm.onClick=()=>this.onConfirmClick(),this.contentContainer.addChild(this.btnCancel,this.btnConfirm),this.addChild(this.particleContainer),this.updateLayout()} + const Eqt=class t extends KKt{
- return this.instance||(this.instance=new t),this.instance} - updateLayout(){ - const t=.5*this.width,i=120,s=250,e=340; - this.lblQuestion.x=t-.5*this.lblQuestion.width; - let n=this.lblQuestion.y+this.lblQuestion.height+20; - this.lblHeaderCurrent.x=i,this.lblHeaderArrow.x=s,this.lblHeaderEvolved.x=e,this.lblHeaderCurrent.y=this.lblHeaderArrow.y=this.lblHeaderEvolved.y=n,n+=32,this.lblHpCurrent.x=i,this.lblHpArrow.x=s,this.lblHpEvolved.x=e,this.lblHpCurrent.y=this.lblHpArrow.y=this.lblHpEvolved.y=n,n+=32,this.lblAtkCurrent.x=i,this.lblAtkArrow.x=s,this.lblAtkEvolved.x=e,this.lblAtkCurrent.y=this.lblAtkArrow.y=this.lblAtkEvolved.y=n,n+=32,this.lblDefCurrent.x=i,this.lblDefArrow.x=s,this.lblDefEvolved.x=e,this.lblDefCurrent.y=this.lblDefArrow.y=this.lblDefEvolved.y=n,n+=57,this.lblTribeTitle.x=65,this.lblTribeTitle.y=n,n+=this.lblTribeTitle.height+2,this.lblTribeDesc.x=65,this.lblTribeDesc.y=n,n+=this.lblTribeDesc.height+15,this.lblUniqueTitle.x=65,this.lblUniqueTitle.y=n,n+=this.lblUniqueTitle.height+2,this.lblUniqueDesc.x=65,this.lblUniqueDesc.y=n,n+=this.lblUniqueDesc.height+25; - const h=this.btnCancel.width+16+this.btnConfirm.width; - this.btnCancel.x=t-.5*h,this.btnCancel.y=n,this.btnConfirm.x=this.btnCancel.x+this.btnCancel.width+16,this.btnConfirm.y=n,this.height=n+this.btnConfirm.height+50} - setData(t,i=!1,s=1){ - this.vo=t,this.isBusy=!1,this.isRosterMode=i,this.isRosterMode?this.count=s:this.count=1,this.title=CG.getText("GAME_145","진화 확인"),this.lblQuestion.text=CG.getText("GAME_142","보석을 사용하여 진화하시겠습니까?"),this.lblHeaderCurrent.text=CG.getText("GAME_152","현재"),this.lblHeaderEvolved.text=CG.getText("GAME_153","진화 후"),this.lblTribeTitle.text=`# ${ - CG.getText("GAME_28","종족 특성")} - `,this.lblTribeDesc.text=this.getTribeTraitText(this.vo.tribe),this.lblUniqueTitle.text=`# ${ - CG.getText("GAME_72","고유스킬")} - `; - const e=wx.getInstance().getBookVO(this.vo.evolKindNum),n=e?Ox.getInstance().getByKindNum(e.uniqueSkill):null; - this.lblUniqueDesc.text=n?CG.getText(n.getDescKey(),n.desc):CG.getText("COMMON_367","없음"),this.btnCancel.text=CG.getText("COMMON_2","취소"),this.count>1?(this.btnConfirm.activatedTextLabelColor=13434624,this.btnConfirm.text=`${ - CG.getText("GAME_67","진화")} - (x${ - this.count} - )`):(this.btnConfirm.activatedTextLabelColor=-1,this.btnConfirm.text=CG.getText("GAME_67","진화")),this.updateStats(),this.updateCost(),this.updateLayout(),super.show()} - updateStats(){ - const t=wx.getInstance().getBookVO(this.vo.kindNum),i=wx.getInstance().getBookVO(this.vo.evolKindNum); - if(!t||!i)return; - const s=QA.getTexture("UI_Ekkorr",this.vo.dmgType===ex.MAGICAL?"ICON_ATTACK2":"UI_SWORD"),e=QA.getTexture("UI_Ekkorr",this.vo.phyDef>this.vo.magDef?"UI_PHY_DEFENSE":"UI_MAGIC_DEFENSE"); - this.lblAtkCurrent.texture=s,this.lblAtkEvolved.texture=s,this.lblDefCurrent.texture=e,this.lblDefEvolved.texture=e; - const n=Vt(t=>VD.displayLargeNumberAsAlphabet(t),"fmt"),h=Vt((t,i)=>t>0?` (+${ - Math.round((i-t)/t*100)} - %)`:"","pct"); - this.lblHpCurrent.text=n(t.hp),this.lblHpEvolved.text=`${ - n(i.hp)} - ${ - h(t.hp,i.hp)} - `,this.lblAtkCurrent.text=n(t.atkDmg),this.lblAtkEvolved.text=`${ - n(i.atkDmg)} - ${ - h(t.atkDmg,i.atkDmg)} - `,this.lblDefCurrent.text=n(t.def),this.lblDefEvolved.text=`${ - n(i.def)} - ${ - h(t.def,i.def)} - `} - getTribeTraitText(t){ - switch(t){ - case 1:return CG.getText("GAME_286","넉백 면역 (뒤로 밀리지 않습니다.)"); - case 2:return CG.getText("GAME_287","블로우 면역 (날려보내는 공격을 받아도 날아가지 않습니다.)"); - case 3:return CG.getText("GAME_288","냉기 면역 (얼려지지 않습니다.)"); - case 4:return CG.getText("GAME_289","기절 면역 (기절하지 않습니다.)"); - default:return""} - } - updateCost(){ - this.btnConfirm.iconText=String(this.getCost())} - getCost(){ - const t=Uqt[this.vo.grade]??0; - return this.count*t} - async onConfirmClick(){ - if(this.isBusy)return; - const t=this.getCost(); - if(ML.gem<t)return void RF.getInstance().showMessage(CG.getText("COMMON_352","보석이 부족합니다.")); - if(!this.vo.evolKindNum)return void RF.getInstance().showMessage(CG.getText("GAME_141","이미 최대 진화 단계입니다.")); - this.isBusy=!0; - const i=this.vo.kindNum,s=this.vo.evolKindNum; - let e; - if(e=this.isRosterMode?await rD.getInstance().hero.evolveOwned(`${ - this.vo.kindNum} - -${ - this.count} - `,!0):await rD.getInstance().hero.evolve(this.vo.id),!e||!1===e.success)return RF.getInstance().showMessage(CG.getText("COMMON_77","네트워크 오류가 발생하였습니다.")),void(this.isBusy=!1); - if(ML.setUserInfo(e.body),$F.getInstance().updateAll(),rYt.getInstance().setData(),!this.isRosterMode){ - const t=wx.getInstance().getVOWithId(this.vo.id); - t&&Nri.getInstance().udpateHero(t)} - RF.getInstance().showMessage(CG.getText("GAME_144","진화 성공!")),this.hide(),this.onEvolved&&(this.onEvolved(),this.onEvolved=null),cS.getInstance().dispatchCustomEvent("HeroEvolve",{ - id:this.isRosterMode?0:this.vo.id,kindNum:i,evolKindNum:s} - )} + return null==this.instance&&(this.instance=new t),this.instance} + constructor(){ + super(),this.currentSubView=Mqt.getInstance()} + setData(){ + Mqt.getInstance().setData(),this.currentSubView=Mqt.getInstance()} + get className(){ + return"HeroView"}
- Vt(Fqt,"EvolveConfirmPopup"),Kt(Fqt,"instance"); + Vt(Eqt,"HeroView"),Kt(Eqt,"instance");
DailyQuestDataManager 2 hunks, 72 statements
- constructor(){ - Kt(this,"baseDate",""),Kt(this,"quests",[]),Kt(this,"milestones",[]),Kt(this,"totalScore",0),Kt(this,"_dirty",!0),Kt(this,"_refreshing",!1)}
+ )); + var EVt=(t=>(t.REBIRTH="REBIRTH",t.INFINITE_RANK="INFINITE_RANK",t.DUNGEON="DUNGEON",t.SPIRIT_LAND="SPIRIT_LAND",t.DAILY_RANK="DAILY_RANK",t.TOWER="TOWER",t.AD_VIEW="AD_VIEW",t))(EVt||{ + } + ); + const AVt=class t{ + constructor(){ + Kt(this,"baseDate",""),Kt(this,"quests",[]),Kt(this,"milestones",[]),Kt(this,"totalScore",0),Kt(this,"_dirty",!0),Kt(this,"_refreshing",!1)} + static getInstance(){ + return this._instance||(this._instance=new t),this._instance} + setData(t){ + t&&(this.baseDate=String(t.baseDate??""),this.quests=Array.isArray(t.quests)?t.quests.map(t=>this.toQuestVO(t)):[],this.milestones=Array.isArray(t.milestones)?t.milestones.map(t=>this.toMilestoneVO(t)):[],this.totalScore=Number(t.totalScore??0),this._dirty=!1)} + markDirty(){ + this._dirty=!0,this.refreshInBackground()} + async refreshInBackground(){ + var t; + if(!this._refreshing){ + this._refreshing=!0; + try{ + const i=await lD.getInstance().dailyQuest.getInfo(!1); + if(!(null==i?void 0:i.success))return; + (null==(t=i.body)?void 0:t.dailyQuest)&&this.setData(i.body.dailyQuest)} + catch{ + } + finally{ + this._refreshing=!1} + } + } + needsRefresh(){ + return!!this._dirty||!this.baseDate||this.baseDate!==this.getUtc0DateKey()} + getUtc0DateKey(){ + const t=new Date(tx.time); + return`${ + t.getUTCFullYear()} + -${ + (t.getUTCMonth()+1).toString().padStart(2,"0")} + -${ + t.getUTCDate().toString().padStart(2,"0")} + `} + toQuestVO(t){ + return{ + type:t.type,progress:Number(t.progress??0),target:Number(t.target??0),score:Number(t.score??0),reward:t.reward??{ + } + ,claimed:!!t.claimed} + } + toMilestoneVO(t){ + return{ + score:Number(t.score??0),reward:t.reward??{ + } + ,claimed:!!t.claimed,claimable:!!t.claimable} + } + getQuest(t){ + return this.quests.find(i=>i.type===t)} + getClaimableQuestCount(){ + let t=0; + for(const i of this.quests)!i.claimed&&i.progress>=i.target&&t++; + return t} + getClaimableMilestoneCount(){ + let t=0; + for(const i of this.milestones)i.claimable&&t++; + return t} + hasClaimable(){ + return this.getClaimableQuestCount()+this.getClaimableMilestoneCount()>0} + } + ; + Vt(AVt,"DailyQuestDataManager"),Kt(AVt,"_instance"); + let SVt=AVt; + const TVt=Object.freeze(Object.defineProperty({ + __proto__:null,DailyQuestDataManager:SVt,DailyQuestType:EVt} + ,Symbol.toStringTag,{ + value:"Module"}
DialogueVO 2 hunks, 71 statements
- Kt(this,"kindNum",0),Kt(this,"desc",""),Kt(this,"gem",0),Kt(this,"condition",""),Kt(this,"sortOrder",0)} - getDescKey(){ - return`MISSION_GUIDE_DESC_${ + Kt(this,"kindNum",0),Kt(this,"wave",0),Kt(this,"order",0),Kt(this,"position",1),Kt(this,"text",""),Kt(this,"code",""),Kt(this,"maxWave",-1),Kt(this,"repeat",9999)} + getTextKey(){ + return`DIALOGUE_TEXT_${
- Vt(hVt,"MissionGuideVO"); - let rVt=hVt; - const oVt=class{ - constructor(){ - Kt(this,"id",0),Kt(this,"step",0),Kt(this,"action",""),Kt(this,"target",-1),Kt(this,"param","-1")} - } - ; - Vt(oVt,"MissionGuideStepVO"); - let aVt=oVt; - const cVt=class t extends Ge{ - constructor(){ - super(),Kt(this,"sp",new He),Kt(this,"count",0),Kt(this,"_height",82*1.2),this.addChild(this.sp)} - static async load(){ - this.ready||(await QA.generateTexture("LevelUp","ktx2",!1),this.textures=QA.getTextures("LevelUp","LevelUp"),this.ready=!0)} - static get(){ - const i=this.pool.length>0?this.pool.pop():new t; - return i.visible=!0,i} - static release(t){ - t.visible=!1,t.removeFromParent(),this.pool.push(t)} - play(i,s,e){ - this.x=s,this.y=e,this.scale.set(1.2),this.count=0,this.sp.texture=t.textures[0],LM.getInstance().add(this.onEnter,this),i.addChild(this),zL.getInstance().playSFX(zL.SFX_LEVEL_UP)} - onEnter(){ - this.count++,this.count<t.textures.length?this.sp.texture=t.textures[this.count]:(LM.getInstance().remove(this.onEnter,this),t.release(this))} - get height(){ - return this._height} - } - ; - Vt(cVt,"ClickEffect"),Kt(cVt,"pool",[]),Kt(cVt,"textures"),Kt(cVt,"ready",!1); - let lVt=cVt; - const uVt=class t extends Ge{ - constructor(){ - super(),Kt(this,"onVisibilityChanged",null),Kt(this,"bg"),Kt(this,"icon"),Kt(this,"lblGem"),Kt(this,"lblDesc"),Kt(this,"lblTitle"),Kt(this,"gem"),Kt(this,"onClaim",null),this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30} - ),this.bg.x=20,this.bg.width=380,this.bg.height=60,this.bg.alpha=.3,this.addChild(this.bg),this.icon=new He(QA.getTexture("UI_Ekkorr","UI_SKILL_BASE")),this.icon.x=0,this.icon.y=0,this.addChild(this.icon),this.gem=new He(QA.getTexture("UI_Ekkorr","UI_GEM")),this.gem.x=this.icon.x+.5*(this.icon.width-this.gem.width),this.gem.y=this.icon.y+.28*(this.icon.height-this.gem.height),this.addChild(this.gem),this.lblGem=new JD("10",52377,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblGem.textColor=cD.COLOR_DEEP_SKYBLUE,this.lblGem.x=.5*(this.icon.width-this.lblGem.width),this.lblGem.y=this.icon.height-this.lblGem.height-12,this.addChild(this.lblGem),this.lblTitle=new JD("[ 미션 - 1 ]",52377,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblTitle.textColor=cD.DEFAULT_COLOR,this.lblTitle.x=this.icon.x+this.icon.width,this.lblTitle.y=9,this.addChild(this.lblTitle),this.lblDesc=new JD("1번 퀘스트 레벨 5 달성",52377,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblDesc.textColor=cD.DEFAULT_COLOR,this.lblDesc.x=this.lblTitle.x,this.lblDesc.y=this.lblTitle.y+this.lblTitle.height+1,this.addChild(this.lblDesc),this.activated=!1,super.visible=!1,this.eventMode="static",this.cursor="pointer",this.on("pointertap",this.onClick,this)} - static getInstance(){ - return t.instance||(t.instance=new t),t.instance} - set visible(t){ - super.visible!==t&&(super.visible=t,this.onVisibilityChanged&&this.onVisibilityChanged(t))} - get visible(){ - return super.visible} - onClick(){ - nVt.getInstance().rewardPending&&this.onClaim&&(this.playClaimEffect(),this.onClaim())} - playClaimEffect(){ - lVt.get().play(this,this.icon.x+.5*this.icon.width-50,this.icon.y+.5*this.icon.height-60); - const t=this.gem.getGlobalPosition(),i=VA.stage.toLocal(t),s=i.x+.5*this.gem.width-14,e=i.y+.5*this.gem.height-20; - Xt(async()=>{ - const{ - RewardController:t} - =await Promise.resolve().then(()=>D4t); - return{ - RewardController:t} - } - ,void 0).then(({ - RewardController:t} - )=>{ - t.getInstance().getGem(s,e,10,4)} - )} - setData(t){ - this.lblGem.text=t.gem.toString(),this.lblGem.x=this.icon.x+.5*(this.icon.width-this.lblGem.width),this.lblTitle.text=`[ ${ - CG.getText("GAME_409","미션")} - ${ - t.sortOrder} - ]`,this.lblDesc.text=CG.getText(t.getDescKey(),t.desc)} - set activated(t){ - 1==t?(this.bg.tint=16777215,this.icon.tint=16777215,this.gem.tint=16777215,this.lblGem.textColor=cD.COLOR_DEEP_SKYBLUE):(this.bg.tint=10066329,this.icon.tint=10066329,this.gem.tint=10066329,this.lblGem.textColor=10066329)} - } - ; - Vt(uVt,"MissionGuide"),Kt(uVt,"instance"); + Vt(tVt,"DialogueVO");
DialogueDataManager 6 hunks, 69 statements
- Kt(this,"battlePoolMap",{ + Kt(this,"list",[]),Kt(this,"waveMap",new Map),Kt(this,"playCount",{
- ),Kt(this,"seasonSetMap",{ - } - ),Kt(this,"rewardMap",{ - } - ),Kt(this,"seasonSetKindNum",0),Kt(this,"seasonNumber",0),Kt(this,"seasonEndTime",0),Kt(this,"currentFloor",0),Kt(this,"floorStars",[]),Kt(this,"ticket",0),Kt(this,"maxTicket",5),Kt(this,"ticketTime",0),Kt(this,"currentBattleFloor",0),Kt(this,"bookLoaded",!1),Kt(this,"seasonRotation",1e6)} + ),Kt(this,"playCountLoaded",!1)}
- setBattlePoolData(t){ - if(this.battlePoolMap={ - } - ,t)for(const i of t){ - const t=new mVt; - t.kindNum=i.kindNum,t.difficulty=i.difficulty,t.enemyKindNums=i.enemyKindNums||"",t.enemyTrans=i.enemyTrans||"",t.enemyShields=i.enemyShields||"",t.enemyLevels=i.enemyLevels||"",t.tribes=i.tribes,t.gradeMax=i.gradeMax,t.femaleExclude=i.femaleExclude,t.maleExclude=i.maleExclude,t.rangeExclude=i.rangeExclude,t.meleeExclude=i.meleeExclude,t.airExclude=i.airExclude,t.star1=i.star1,t.star2=i.star2,t.star3=i.star3,this.battlePoolMap[t.kindNum]=t} - } - setSeasonSetData(t){ - if(this.seasonSetMap={ - } - ,t)for(const i of t){ - const t=new vVt; - t.kindNum=i.kindNum,t.battleIDs=i.battleIDs,this.seasonSetMap[t.kindNum]=t} - } - setRewardData(t){ - if(this.rewardMap={ - } - ,t)for(const i of t){ - const t=new _Vt; - t.floor=i.floor,t.gem1=i.gem1,t.gem2=i.gem2,t.gem3=i.gem3,t.honor1=i.honor1,t.honor2=i.honor2,t.honor3=i.honor3,this.rewardMap[t.floor]=t} - } - get seasonIndex(){ - return(this.seasonNumber-1)%this.seasonRotation+1} - setData(t){ - for(this.seasonSetKindNum=t.seasonSetKindNum,this.seasonNumber=t.seasonNumber||0,this.seasonEndTime=t.seasonEndTime?new Date(t.seasonEndTime).getTime():0,this.currentFloor=t.currentFloor,this.floorStars=t.floorStars||[]; - this.floorStars.length<30; - )this.floorStars.push(0); - this.ticket=t.ticket,this.maxTicket=t.maxTicket,this.ticketTime=new Date(t.ticketTime).getTime()+1e3,this.currentBattleFloor=t.currentBattleFloor} - getFloorList(){ - const t=this.seasonSetMap[this.seasonSetKindNum]; - if(!t)return[]; - const i=t.battleIDs.split("|").map(Number),s=[],e=Math.min(this.currentFloor+1,30); + setBookData(t){ + if(this.list=[],this.waveMap.clear(),t){
- n<e; + i<t.length;
- const t=this.battlePoolMap[i[n]]; - if(!t)continue; - const e=new MVt; - e.floor=n+1,e.stars=this.floorStars[n]||0,e.battleVO=t,e.reward=this.rewardMap[n+1],e.isCleared=this.floorStars[n]>0,e.isNext=n+1===this.currentFloor+1,s.push(e)} - return s} - getFloorListReversed(){ - return this.getFloorList().reverse()} - getBattlePool(t){ - return this.battlePoolMap[t]} - buildFloorVO(t){ - if(t<1||t>30)return null; - const i=this.seasonSetMap[this.seasonSetKindNum]; - if(!i)return null; - const s=i.battleIDs.split("|").map(Number),e=t-1; - if(e>=s.length)return null; - const n=this.battlePoolMap[s[e]]; - if(!n)return null; - const h=new MVt; - return h.floor=t,h.stars=this.floorStars[e]||0,h.battleVO=n,h.reward=this.rewardMap[t],h.isCleared=this.floorStars[e]>0,h.isNext=t===this.currentFloor+1,h} - getReward(t){ - return this.rewardMap[t]} + const s=t[i],e=new iVt; + e.kindNum=Number(s.kindNum),e.wave=Number(s.wave),e.order=Number(s.order),e.position=Number(s.position)||1,e.text=s.text??"",e.code=s.code??"",e.maxWave=Number(s.maxWave)||-1,e.repeat=Number(s.repeat)||9999,this.list.push(e); + let n=this.waveMap.get(e.wave); + n||(n=[],this.waveMap.set(e.wave,n)),n.push(e)} + for(const t of this.waveMap.values())t.sort((t,i)=>t.order-i.order); + this.loadPlayCount()} + } + async loadPlayCount(){ + if(this.playCountLoaded)return; + const i=await $A.getData(t.LOCAL_KEY); + this.playCount=i??{ + } + ,this.playCountLoaded=!0} + savePlayCount(){ + $A.saveData(t.LOCAL_KEY,this.playCount)} + async getByWaveAsync(t){ + return await this.loadPlayCount(),this.getByWave(t)} + getByWave(t){ + const i=this.waveMap.get(t)??[],s=TL.maxWave,e=[]; + let n=!1; + for(const h of i)if(!(h.maxWave>0&&s<h.maxWave)){ + if(h.repeat<999){ + const t=this.playCount[h.kindNum]??0; + if(t>=h.repeat)continue; + this.playCount[h.kindNum]=t+1,n=!0} + e.push(h)} + return n&&this.savePlayCount(),e} + hasDialogue(t){ + return this.waveMap.has(t)}
- Vt(fVt,"TowerDataManager"),Kt(fVt,"instance"); + Vt(sVt,"DialogueDataManager"),Kt(sVt,"instance"),Kt(sVt,"LOCAL_KEY",$A.KEY_DIALOGUE_COUNT);
DialogueLayer 1 hunks, 68 statements
+ const Oni=class extends oS{ + constructor(){ + super()} + } + ; + Vt(Oni,"DialogueLayer"); + let kni=Oni; + const xni=Object.freeze(Object.defineProperty({ + __proto__:null,DialogueLayer:kni} + ,Symbol.toStringTag,{ + value:"Module"} + )),Rni=class t extends Ge{ + constructor(){ + super(),Kt(this,"frameLeft"),Kt(this,"frameRight"),Kt(this,"npcIcon"),Kt(this,"lblName"),Kt(this,"lblMessage"),Kt(this,"bg"),Kt(this,"timeCount",0),Kt(this,"isFadingOut",!1),Kt(this,"currentPosition",1),Kt(this,"queue",[]),Kt(this,"textureLoaded",!1),Kt(this,"onCompleteHandler",null),this.eventMode="none",this.bg=new eL,this.bg.alpha=.6,this.bg.setIndex(7),this.addChild(this.bg),this.frameLeft=new He,this.addChild(this.frameLeft),this.npcIcon=new He,this.addChild(this.npcIcon),this.lblName=new iL("",16768324,fD.DEFAULT_OUTLINE_FONT_OPTION_17),this.addChild(this.lblName),this.lblMessage=new iL("",fD.COLOR_WHITE,fD.DEFAULT_FONT_OPTION_16),this.addChild(this.lblMessage),this.frameRight=new He,this.addChild(this.frameRight)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + static getNpcName(i){ + if(i.length>=2){ + const s=i.substring(0,2); + if(t.NPC_NAMES[s])return xG.getText(`DIALOGUE_NPC_${ + s} + `,t.NPC_NAMES[s])} + const s=i.substring(0,1); + return xG.getText(`DIALOGUE_NPC_${ + s} + `,t.NPC_NAMES[s])??""} + async showDialogues(i){ + if(0!==i.length&&JD.getInstance().npcDialogue){ + if(await this.waitForPopupsClosed(),!this.textureLoaded){ + const i="ktx2"; + await QA.generateTexture(t.SHEET,i,!1),this.textureLoaded=!0} + this.queue.push(...i),this.timeCount<=0&&this.playNext()} + } + waitForPopupsClosed(){ + return new Promise(t=>{ + if(!DL.getInstance().hasPopup)return void t(); + const i=Vt(()=>{ + DL.getInstance().hasPopup||(LM.getInstance().remove(i,this),t())} + ,"check"); + LM.getInstance().add(i,this)} + )} + async show(i,s,e=360,n=1){ + if(!this.textureLoaded){ + const i="ktx2"; + await QA.generateTexture(t.SHEET,i,!1),this.textureLoaded=!0} + this.showCurrent(i,s,e,n)} + playNext(){ + if(0===this.queue.length)return; + const i=this.queue.shift(),s=xG.getText(i.getTextKey(),i.text); + this.showCurrent(i.code,s,t.DURATION_PER_DIALOGUE,i.position)} + showCurrent(i,s,e,n=1){ + const h=t.SHEET; + this.currentPosition=n,this.frameLeft.visible=!1,this.frameRight.visible=!1,this.npcIcon.texture=QA.getTexture(h,i); + const r=125/this.npcIcon.texture.height; + this.npcIcon.scale.set(r),this.lblName.text=t.getNpcName(i),fD.setLabelWrapWidth(this.lblMessage,480),this.lblMessage.text=s,this.relayout(),this.alpha=0,this.timeCount=e,this.isFadingOut=!1,LM.getInstance().remove(this.onFrame,this),LM.getInstance().add(this.onFrame,this),kni.getInstance().addChild(this)} + relayout(){ + const i=t.PAD,s=2===this.currentPosition,e=520,n=this.lblMessage.height+2*i+16,h=this.npcIcon.scale.x,r=this.npcIcon.texture.width*h,o=this.npcIcon.texture.height*h; + this.bg.width=e,this.bg.height=n,this.bg.x=0,this.bg.y=0; + const a=-o; + s?(this.npcIcon.scale.x=-Math.abs(h),this.npcIcon.x=e-i,this.npcIcon.y=a,this.lblName.x=this.npcIcon.x-r-this.lblName.width+6,this.lblName.y=-this.lblName.height-4,this.lblMessage.x=.5*(e-this.lblMessage.width),this.lblMessage.y=.5*(n-this.lblMessage.height)):(this.npcIcon.scale.x=Math.abs(h),this.npcIcon.x=i,this.npcIcon.y=a,this.lblName.x=this.npcIcon.x+r-6,this.lblName.y=-this.lblName.height-4,this.lblMessage.x=.5*(e-this.lblMessage.width),this.lblMessage.y=.5*(n-this.lblMessage.height)),this.x=.5*(VA.stageWidth-e),this.y=460} + onFrame(){ + DL.getInstance().hasPopup?this.visible=!1:(this.visible=!0,this.alpha<1&&!this.isFadingOut&&(this.alpha+=1/t.FADE_IN_FRAMES,this.alpha>1&&(this.alpha=1)),this.timeCount<=t.FADE_OUT_FRAMES&&!this.isFadingOut&&(this.isFadingOut=!0),this.isFadingOut&&(this.alpha-=1/t.FADE_OUT_FRAMES,this.alpha<0&&(this.alpha=0)),this.timeCount--,this.timeCount<=0&&(LM.getInstance().remove(this.onFrame,this),this.queue.length>0?this.playNext():(this.parent&&this.parent.removeChild(this),this.onCompleteHandler&&(this.onCompleteHandler(),this.onCompleteHandler=null))))} + } + ; + Vt(Rni,"NpcDialogueToast"),Kt(Rni,"instance"),Kt(Rni,"SHEET","Dialogue"),Kt(Rni,"PAD",8),Kt(Rni,"NPC_NAMES",{ + S:"정령",L:"성주",CH:"오크 부족장",SC:"오크 정찰병",CP:"휴먼 기사단장",LI:"리치 사령관",EC:"엘프 지휘관"} + ),Kt(Rni,"DURATION_PER_DIALOGUE",300),Kt(Rni,"FADE_IN_FRAMES",10),Kt(Rni,"FADE_OUT_FRAMES",30); + let Nni=Rni;
ShopPayItemRendererStage 1 hunks, 62 statements
- this.data&&(t>=this.btnBuy.x||Ojt.getInstance().showProduct(this.data))} - get height(){ - return this.bg.height+2} - } - ; - Vt(GYt,"ShopPayItemRendererStage"); - let BYt=GYt; - const UYt=class t extends kzt{ - constructor(){ - super(),Kt(this,"list"),Kt(this,"subscribeLabel"),Kt(this,"onPaymentSuccessBind"); - const t=VA.listHeight-0; - this.list=new I5(BYt,635,t),this.list.x=0,this.list.y=0,this.addChild(this.list),this.subscribeLabel=new VB("UI_Alarm","0",cD.COLOR_WHITE,cD.DEFAULT_FONT_OPTION_16),this.subscribeLabel.visible=!1,this.subscribeLabel.textOffsetX=-1,this.subscribeLabel.textOffsetY=-2,this.subscribeLabel.text=CG.getText("COMMON_504","구독"),this.subscribeLabel.x=10,this.subscribeLabel.y=10,this.addChild(this.subscribeLabel),this.subscribeLabel.eventMode="dynamic",this.subscribeLabel.on("pointertap",this.onSubscribeLabelTap,this),this.on("added",this.onAdded,this),this.on("removed",this.onRemoved,this)} - static getInstance(){ - return null==t.instance&&(t.instance=new t),t.instance} - onAdded(){ - this.setPaymentSuccess(!0)} - onRemoved(){ - this.setPaymentSuccess(!1)} - get className(){ - return"ShopPaySubViewStage"} - async setData(){ - this.updateSubscribeLabel(); - let t=0,i=VA.listHeight-t; - this.subscribeLabel.visible&&(t=this.subscribeLabel.y+this.subscribeLabel.height+5,i=VA.listHeight-t),this.list.y=t,this.list.setListHeight(i); - const s=m5.getInstance(); - this.list.dataProvider=s.reviewShopList} - refreshList(){ - this.setData()} - updateSubscribeLabel(){ - let t=!1; - ML.isAssistantPremium?t=!0:"capacitor"==AL.getInstance().envPlatform&&(m5.getInstance().getByProductId(p5.Secretary)||(t=!0)),this.subscribeLabel.visible=t} - onSubscribeLabelTap(t){ - const i=AL.getInstance(); - let s=CG.getText("COMMON_502","구독은 현재 기간이 종료되기 최소 24시간 전에 취소하지 않으면 자동으로 갱신됩니다."); - i.isGoogleClient()||i.isGoogleClientKr()?s+="\n\n"+CG.getText("COMMON_505","Google Play 구독 설정에서 구독을 관리하거나 취소할 수 있습니다."):s+="\n\n"+CG.getText("COMMON_503","앱 스토어 계정 설정에서 구독을 관리하거나 취소할 수 있습니다."); - const e=b5.getInstance(); - e.title=CG.getText("COMMON_4","알림"),e.show(s)} - setPaymentSuccess(t){ - cS.getInstance().removeEventListener("PaymentSuccess",this.onPaymentSuccessBind),t&&(this.onPaymentSuccessBind=this.onPaymentSuccess.bind(this),cS.getInstance().addEventListener("PaymentSuccess",this.onPaymentSuccessBind))} - onPaymentSuccess(t){ - this.refreshList()} - } - ; - Vt(UYt,"ShopPaySubViewStage"),Kt(UYt,"instance"); - let FYt=UYt; - const HYt=class t extends Izt{ - constructor(){ - super(),Kt(this,"subViews",[]),Kt(this,"shopSubMenu",TYt.getInstance()),Kt(this,"currentIndex",-1),this.shopSubMenu.setTabs([{ - labelKey:"GAME_197",defaultText:"보석상점"} - ,{ - labelKey:"GAME_198",defaultText:"결제상점"} - ]),this.subViews=[kYt.getInstance(),LYt.getInstance()]; - const t=this.shopSubMenu.height; - for(const i of this.subViews)i.y=t,i.visible=!1,this.addChild(i); - if(m5.getInstance().isReviewShop()){ - const i=FYt.getInstance(); - i.y=t,i.visible=!1,this.addChild(i)} - this.addChild(this.shopSubMenu),this.shopSubMenu.onTabChange=t=>this.switchTab(t),this.switchTab(0)} - static getInstance(){ - return null==this.instance&&(this.instance=new t),this.instance} - switchTab(t){ - this.currentIndex=t;
GuildWarTeamSlot2 2 hunks, 62 statements
- constructor(i=300,s=28){ - super(),Kt(this,"lineRight",new Lf),Kt(this,"bg"),Kt(this,"emblem"),Kt(this,"lblName"),Kt(this,"lblServer"),Kt(this,"lblScore"),Kt(this,"cover",new Lf),Kt(this,"guildAorB",""),Kt(this,"tournamentInfo"),this.lineRight.moveTo(t.BG_W,.5*t.BG_H).lineTo(t.BG_W+t.LINE_W,.5*t.BG_H).stroke({ - width:2,color:cD.COLOR_WHITE,alpha:1} - ),this.lineRight.tint=t.COLOR_DEFAULT,this.addChild(this.lineRight),this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Popup_List_00"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30} - ),this.bg.width=t.BG_W,this.bg.height=t.BG_H,this.bg.x=0,this.addChild(this.bg),this.emblem=new X8t,this.emblem.scale.set(.5),this.emblem.x=5,this.emblem.y=(this.bg.height-this.emblem.height)/2,this.addChild(this.emblem),this.lblName=new JD("AAA",cD.DEFAULT_COLOR,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblName.textColor=cD.DEFAULT_COLOR,this.lblName.x=this.emblem.x+this.emblem.width,this.lblName.y=3,this.addChild(this.lblName),this.lblServer=new JD("KR : Rank. 1",cD.DEFAULT_COLOR,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblServer.textSize=14,this.lblServer.x=this.bg.width-this.lblServer.width,this.lblServer.y=this.bg.y+this.bg.height-this.lblServer.height-3,this.addChild(this.lblServer),this.lblScore=new JD("1234",16750899,cD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblScore.textSize=14,this.lblScore.textColor=16750899,this.lblScore.x=this.bg.width-this.lblScore.width,this.lblScore.y=(t.BG_H-this.lblScore.height)/2,this.addChild(this.lblScore),this.cover.rect(this.bg.x,this.bg.y,this.bg.width,this.bg.height).fill({ - color:0,alpha:.3} - ),this.addChild(this.cover),this.cover.visible=!1,this.eventMode="static",this.on("pointerup",t=>this.onClick())} - onClick(){ - this.tournamentInfo&&null!=this.tournamentInfo.warId&&-1!=this.tournamentInfo.warId&&Rii.getInstance().showBattlePopup(this.tournamentInfo,this.guildAorB)} - setData(i,s="A"){ - if(this.tournamentInfo=i,this.guildAorB=s,!i)return this.lblName.text=CG.getText("TBD","TBD"),this.emblem.visible=!1,this.lblServer.visible=!1,this.lblScore.visible=!1,this.lblName.x=this.bg.x+.5*(this.bg.width-this.lblName.width),void(this.lblName.y=(t.BG_H-this.lblName.height)/2); - const e="A"==s?i.guildA:i.guildB; - this.emblem.visible=!0,this.lblServer.visible=!0,this.lblScore.visible=!0,this.lblName.x=this.emblem.x+this.emblem.width,this.lblName.y=3,this.emblem.setData(e.emblem||"101|0"),this.lblName.text=e.name,this.lblName.textColor=e.id===AD.myGuildId?cD.COLOR_BRIGHT_GREEN:cD.DEFAULT_COLOR,i.winner&&i.winner!==e.id?this.cover.visible=!0:(this.cover.visible=!1,i.winner==e.id&&this.updateRightColor(!0)); - const n=3==e.serverId?"Server (G)":"Server (K)",h=e.rank; - this.lblServer.text=n+` Rank. ${ - h} - `,this.lblServer.x=this.lblName.x,this.lblScore.visible=this.tournamentInfo.warId>0,this.lblScore.text=e.score,this.lblScore.x=this.bg.x+this.bg.width-this.lblScore.width-10} - drawlineRight(i){ - this.lineRight.clear(),this.lineRight.moveTo(t.BG_W,.5*t.BG_H).lineTo(t.BG_W+t.LINE_W,.5*t.BG_H+i).stroke({ - width:2,color:cD.COLOR_WHITE,alpha:1} - ),this.lineRight.tint=t.COLOR_DEFAULT} - updateRightColor(i){ - this.lineRight.tint=i?t.COLOR_WIN:t.COLOR_DEFAULT} - hideLine(t){ - "right"==t&&(this.lineRight.visible=!1)} - } - ; - Vt(Eii,"GuildWarTeamSlot2"),Kt(Eii,"BG_W",265),Kt(Eii,"BG_H",45),Kt(Eii,"LINE_W",50),Kt(Eii,"COLOR_DEFAULT",5855577),Kt(Eii,"COLOR_WIN",cD.DEFAULT_COLOR),Kt(Eii,"LINE_WEIGHT",3); - let Aii=Eii; - const Sii=class t extends qk{
+ constructor(i=300,s=28){ + super(),Kt(this,"lineRight",new Lf),Kt(this,"bg"),Kt(this,"emblem"),Kt(this,"lblName"),Kt(this,"lblServer"),Kt(this,"lblScore"),Kt(this,"cover",new Lf),Kt(this,"guildAorB",""),Kt(this,"tournamentInfo"),this.lineRight.moveTo(t.BG_W,.5*t.BG_H).lineTo(t.BG_W+t.LINE_W,.5*t.BG_H).stroke({ + width:2,color:fD.COLOR_WHITE,alpha:1} + ),this.lineRight.tint=t.COLOR_DEFAULT,this.addChild(this.lineRight),this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_List_00"),leftWidth:30,topHeight:30,rightWidth:30,bottomHeight:30} + ),this.bg.width=t.BG_W,this.bg.height=t.BG_H,this.bg.x=0,this.addChild(this.bg),this.emblem=new i7t,this.emblem.scale.set(.5),this.emblem.x=5,this.emblem.y=(this.bg.height-this.emblem.height)/2,this.addChild(this.emblem),this.lblName=new iL("AAA",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblName.textColor=fD.DEFAULT_COLOR,this.lblName.x=this.emblem.x+this.emblem.width,this.lblName.y=3,this.addChild(this.lblName),this.lblServer=new iL("KR : Rank. 1",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblServer.textSize=14,this.lblServer.x=this.bg.width-this.lblServer.width,this.lblServer.y=this.bg.y+this.bg.height-this.lblServer.height-3,this.addChild(this.lblServer),this.lblScore=new iL("1234",16750899,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblScore.textSize=14,this.lblScore.textColor=16750899,this.lblScore.x=this.bg.width-this.lblScore.width,this.lblScore.y=(t.BG_H-this.lblScore.height)/2,this.addChild(this.lblScore),this.cover.rect(this.bg.x,this.bg.y,this.bg.width,this.bg.height).fill({ + color:0,alpha:.3} + ),this.addChild(this.cover),this.cover.visible=!1,this.eventMode="static",this.on("pointerup",t=>this.onClick())} + onClick(){ + this.tournamentInfo&&null!=this.tournamentInfo.warId&&-1!=this.tournamentInfo.warId&&Hii.getInstance().showBattlePopup(this.tournamentInfo,this.guildAorB)} + setData(i,s="A"){ + if(this.tournamentInfo=i,this.guildAorB=s,!i)return this.lblName.text=xG.getText("TBD","TBD"),this.emblem.visible=!1,this.lblServer.visible=!1,this.lblScore.visible=!1,this.lblName.x=this.bg.x+.5*(this.bg.width-this.lblName.width),void(this.lblName.y=(t.BG_H-this.lblName.height)/2); + const e="A"==s?i.guildA:i.guildB; + this.emblem.visible=!0,this.lblServer.visible=!0,this.lblScore.visible=!0,this.lblName.x=this.emblem.x+this.emblem.width,this.lblName.y=3,this.emblem.setData(e.emblem||"101|0"),this.lblName.text=e.name,this.lblName.textColor=e.id===ID.myGuildId?fD.COLOR_BRIGHT_GREEN:fD.DEFAULT_COLOR,i.winner&&i.winner!==e.id?this.cover.visible=!0:(this.cover.visible=!1,i.winner==e.id&&this.updateRightColor(!0)); + const n=3==e.serverId?"Server (G)":"Server (K)",h=e.rank; + this.lblServer.text=n+` Rank. ${ + h} + `,this.lblServer.x=this.lblName.x,this.lblScore.visible=this.tournamentInfo.warId>0,this.lblScore.text=e.score,this.lblScore.x=this.bg.x+this.bg.width-this.lblScore.width-10} + drawlineRight(i){ + this.lineRight.clear(),this.lineRight.moveTo(t.BG_W,.5*t.BG_H).lineTo(t.BG_W+t.LINE_W,.5*t.BG_H+i).stroke({ + width:2,color:fD.COLOR_WHITE,alpha:1} + ),this.lineRight.tint=t.COLOR_DEFAULT} + updateRightColor(i){ + this.lineRight.tint=i?t.COLOR_WIN:t.COLOR_DEFAULT} + hideLine(t){ + "right"==t&&(this.lineRight.visible=!1)} + } + ; + Vt(Pii,"GuildWarTeamSlot2"),Kt(Pii,"BG_W",265),Kt(Pii,"BG_H",45),Kt(Pii,"LINE_W",50),Kt(Pii,"COLOR_DEFAULT",5855577),Kt(Pii,"COLOR_WIN",fD.DEFAULT_COLOR),Kt(Pii,"LINE_WEIGHT",3); + let Dii=Pii; + const Lii=class t extends Ge{
ShopProductTrigger 2 hunks, 54 statements
- setData(t){ - t&&(this.baseDate=String(t.baseDate??""),this.quests=Array.isArray(t.quests)?t.quests.map(t=>this.toQuestVO(t)):[],this.milestones=Array.isArray(t.milestones)?t.milestones.map(t=>this.toMilestoneVO(t)):[],this.totalScore=Number(t.totalScore??0),this._dirty=!1)} - markDirty(){ - this._dirty=!0,this.refreshInBackground()} - async refreshInBackground(){ - var t; - if(!this._refreshing){ - this._refreshing=!0; - try{ - const i=await rD.getInstance().dailyQuest.getInfo(!1); - if(!(null==i?void 0:i.success))return; - (null==(t=i.body)?void 0:t.dailyQuest)&&this.setData(i.body.dailyQuest)} - catch{ - } - finally{ - this._refreshing=!1} - } - } - needsRefresh(){ - return!!this._dirty||!this.baseDate||this.baseDate!==this.getUtc0DateKey()} - getUtc0DateKey(){ - const t=new Date(tx.time); - return`${ - t.getUTCFullYear()} - -${ - (t.getUTCMonth()+1).toString().padStart(2,"0")} - -${ - t.getUTCDate().toString().padStart(2,"0")} - `} - toQuestVO(t){ - return{ - type:t.type,progress:Number(t.progress??0),target:Number(t.target??0),score:Number(t.score??0),reward:t.reward??{ - } - ,claimed:!!t.claimed} - } - toMilestoneVO(t){ - return{ - score:Number(t.score??0),reward:t.reward??{ - } - ,claimed:!!t.claimed,claimable:!!t.claimable} - } - getQuest(t){ - return this.quests.find(i=>i.type===t)} - getClaimableQuestCount(){ - let t=0; - for(const i of this.quests)!i.claimed&&i.progress>=i.target&&t++; - return t} - getClaimableMilestoneCount(){ - let t=0; - for(const i of this.milestones)i.claimable&&t++; - return t} - hasClaimable(){ - return this.getClaimableQuestCount()+this.getClaimableMilestoneCount()>0} + doAccountCreate(){ + const t=M5.getInstance(),i=t.getTargetingByType(fVt.ACCOUNT_CREATE); + if(!i)return; + const s=t.getByProductId(i[0]); + if(!s||!s.active)return; + let e=new Date(TL.regTime); + const n=IL.getInstance().getClientData("PRODUCT_START_TIME_29"); + if(n){ + let t=new Date(n); + e.getTime()<t.getTime()&&(e=t)} + const h=s.targeting.durationMinutes??0; + let r=e.getTime()+60*h*1e3; + r<tx.time||t.isAvailableForPurchase(s)&&lVt.getInstance().add(s.productId,r)}
- Vt(TVt,"DailyQuestDataManager"),Kt(TVt,"_instance"); + Vt(pVt,"ShopProductTrigger"),Kt(pVt,"_instance");
CardEventService 1 hunks, 35 statements
+ const oD=class extends vN{ + async start(t,i=!0){ + return this.post(XR.CARD_EVENT.START,{ + useAd:t} + ,i)} + async submit(t,i=!1){ + return this.post(XR.CARD_EVENT.SUBMIT,{ + cardIdx:t} + ,i)} + async discard(t,i=!1){ + return this.post(XR.CARD_EVENT.DISCARD,{ + cardIdx:t} + ,i)} + async pickJoker(t,i,s=!1){ + return this.post(XR.CARD_EVENT.PICK_JOKER,null==i?{ + choice:t} + :{ + choice:t,replaceSlot:i} + ,s)} + async getState(t=!1){ + return this.post(XR.CARD_EVENT.STATE,{ + } + ,t)} + async giveUp(t=!0){ + return this.post(XR.CARD_EVENT.GIVE_UP,{ + } + ,t)} + async getRanking(t=10,i=!1){ + return this.post(XR.CARD_EVENT.GET_RANKING,{ + topLimit:t} + ,i)} + } + ; + Vt(oD,"CardEventService"); + let aD=oD;
ProgressBar 1 hunks, 35 statements
- constructor(t=300,i=28){ - super(),Kt(this,"bg"),Kt(this,"bar"),Kt(this,"barOffset",6),Kt(this,"lbl"),Kt(this,"_width",200),Kt(this,"_height",28),this._width=t,this._height=i,this.bg=new TM({ - texture:QA.getTexture("UI_Ekkorr","Progress_Bar_Bg"),leftWidth:20,topHeight:13,rightWidth:20,bottomHeight:13} - ),this.bg.width=this._width,this.bg.height=this._height,this.addChild(this.bg),this.bar=new TM({ - texture:QA.getTexture("UI_Ekkorr","Progress_Bar"),leftWidth:15,topHeight:7,rightWidth:15,bottomHeight:7} - ),this.bar.x=this.barOffset,this.bar.y=this.barOffset,this.bar.width=this._width-2*this.barOffset,this.bar.height=this._height-2*this.barOffset,this.addChild(this.bar); - const s=cD.DEFAULT_OUTLINE_FONT_OPTION_17; - s.fill=cD.COLOR_WHITE,this.lbl=new JD("0 / 0",s.fill,s),this.lbl.x=.5*(this._width-this.lbl.width),this.lbl.y=.5*(this._height-this.lbl.height),this.addChild(this.lbl)} - get width(){ - return this._width} - set width(t){ - t!=this._width&&(this._width=t,this.bg.width=this._width,this.lbl.x=.5*(this._width-this.lbl.width))} - get height(){ - return this._height} - update(t,i){ - const s=this._width-2*this.barOffset; - let e=s*(t/i); - e>s&&(e=s),this.bar.width=e,this.lbl.text=`${ - t} - / ${ - i} - `,this.lbl.x=.5*(this._width-this.lbl.width)} - showBar(){ - this.bar.visible||(this.bar.visible=!0)} - hideBar(){ - this.bar.visible&&(this.bar.visible=!1)} - showText(){ - this.lbl.visible||(this.lbl.visible=!0)} - hideText(){ - this.lbl.visible&&(this.lbl.visible=!1)} - } - ; - Vt($ei,"ProgressBar"); - let jei=$ei; - const Vei=class t extends Ge{
ReviveTreasureBanner 1 hunks, 35 statements
+ const gri=class extends Ge{ + constructor(t){ + super(),Kt(this,"bg"),Kt(this,"icon"),Kt(this,"lblName"),Kt(this,"btnSetup"),Kt(this,"onChanged",null),this.bg=new TM({ + texture:QA.getTexture("UI_Ekkorr","Popup_List_02"),leftWidth:140,topHeight:30,rightWidth:20,bottomHeight:30} + ),this.bg.width=t,this.bg.height=80,this.addChild(this.bg),this.icon=new He(QA.getTexture("UI_Ekkorr","Inventory_Icon_Relic")),this.icon.x=41,this.icon.y=.5*(this.bg.height-this.icon.height),this.addChild(this.icon),this.lblName=new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_OUTLINE_FONT_OPTION_16),this.lblName.x=130,this.addChild(this.lblName),this.btnSetup=new eG(xG.getText("GAME_1552","편성")),this.btnSetup.width=120,this.btnSetup.height=55,this.btnSetup.x=this.bg.width-this.btnSetup.width-10,this.btnSetup.y=.5*(this.bg.height-this.btnSetup.height),this.btnSetup.color=eG.BROWN,this.btnSetup.onClick=()=>{ + Xt(async()=>{ + const{ + ReviveTreasurePopup:t} + =await Promise.resolve().then(()=>Fpi); + return{ + ReviveTreasurePopup:t} + } + ,void 0).then(({ + ReviveTreasurePopup:t} + )=>{ + t.getInstance().onSaved=()=>{ + this.onChanged&&this.onChanged()} + ,t.getInstance().setData().then(()=>{ + t.getInstance().show()} + )} + )} + ,this.addChild(this.btnSetup),fD.setLabelWrapWidth(this.lblName,this.btnSetup.x-this.lblName.x-5)} + canShow(){ + const t=this.getReviveVO(); + return!!t&&t.level>=1} + setData(){ + this.canShow()?(this.visible=!0,this.lblName.text=xG.getText("GAME_1546","환생유물 편성"),this.lblName.textColor=fD.DEFAULT_COLOR,this.btnSetup.text=xG.getText("GAME_1552","편성"),this.lblName.y=.5*(this.bg.height-this.lblName.height)):this.visible=!1} + getReviveVO(){ + return mR.getInstance().specialBookList.find(t=>7===t.kindNum)} + get height(){ + return this.bg.height} + } + ; + Vt(gri,"ReviveTreasureBanner"); + let mri=gri;
URLManager 3 hunks, 31 statements
- /user/getReviveTeam`,BUY_SPEED15:`${ + /user/getReviveTeam`,SET_REVIVE_TREASURE:`${ + t.baseURL} + /user/setReviveTreasure`,GET_REVIVE_TREASURE:`${ + t.baseURL} + /user/getReviveTreasure`,BUY_SPEED15:`${
+ static get STAMP_CALENDAR(){ + return{ + GET_STATUS:`${ + t.baseURL} + /stampCalendar/getStatus`,CLAIM:`${ + t.baseURL} + /stampCalendar/claim`} + }
+ static get CARD_EVENT(){ + return{ + START:`${ + t.baseURL} + /cardEvent/start`,SUBMIT:`${ + t.baseURL} + /cardEvent/submit`,DISCARD:`${ + t.baseURL} + /cardEvent/discard`,PICK_JOKER:`${ + t.baseURL} + /cardEvent/pickJoker`,STATE:`${ + t.baseURL} + /cardEvent/state`,GIVE_UP:`${ + t.baseURL} + /cardEvent/giveUp`,GET_RANKING:`${ + t.baseURL} + /cardEvent/getRanking`} + }
MessageInfo 3 hunks, 29 statements
- const ZKt=class extends oS{ + const HKt=class t extends Ge{
- super(),Kt(this,"blocker"),Kt(this,"allowRect"),Kt(this,"highlightBorder"),Kt(this,"dimParts",[]),this.createUI()} - createUI(){ - for(let t=0; - t<4; - t++){ - const t=new Lf; - t.alpha=.5,t.rect(0,0,1,1).fill(0),this.dimParts.push(t),this.addChild(t)} - this.blocker=new Lf,this.blocker.rect(0,0,640,VA.stageHeight).fill(0),this.blocker.alpha=0,this.blocker.eventMode="static",this.addChild(this.blocker),this.highlightBorder=new Lf,this.addChild(this.highlightBorder),this.allowRect=new Ri(0,0,0,0),this.setBlockerEnabled(!1)} - setClickArea(t,i,s,e){ - this.allowRect=new Ri(t,i,s,e),this.updateDim(),this.blocker.hitArea={ - contains:Vt((t,i)=>!this.allowRect.contains(t,i),"contains")} - ,this.setBlockerEnabled(!0)} - setBlockerEnabled(t){ - this.blocker.eventMode=t?"static":"none"; - for(const i of this.dimParts)i.visible=t; - this.highlightBorder.visible=t} - updateDim(){ - const t=VA.stageHeight,{ - x:i,y:s,width:e,height:n} - =this.allowRect; - this.dimParts[0].clear().rect(0,0,640,s).fill(0),this.dimParts[1].clear().rect(0,s,i,n).fill(0),this.dimParts[2].clear().rect(i+e,s,640-(i+e),n).fill(0),this.dimParts[3].clear().rect(0,s+n,640,t-(s+n)).fill(0),this.highlightBorder.clear().rect(i,s,e,n).stroke({ - color:16776960,width:3} - )} + super(),Kt(this,"bg",new eL),Kt(this,"lblText",new iL("",fD.COLOR_WHITE,fD.DEFAULT_DESC_FONT_OPTION_16)),Kt(this,"btnChat",new T$t("Btn_Guild_Chatting","UI_Ekkorr")),Kt(this,"btnHelp"),Kt(this,"messages",[]),Kt(this,"currentIndex",0),Kt(this,"BG_WIDTH",640),Kt(this,"BG_HEIGHT",20),Kt(this,"SCROLL_SPEED",.8),Kt(this,"VISIBLE_WIDTH",640),Kt(this,"chatUnlockTick",0),Kt(this,"onLanguageChangeBind"),Kt(this,"textY",-1),Kt(this,"update",Vt(()=>{ + !this.btnChat.visible&&++this.chatUnlockTick>=60&&(this.chatUnlockTick=0,TL.maxWave>=t.CHAT_UNLOCK_WAVE&&(this.btnChat.visible=!0),Dni.getInstance().isOpened?(this.btnHelp.visible=!0,this.btnHelp.x=this.BG_WIDTH-this.btnHelp.width+6,this.btnChat.x=this.btnHelp.x-this.btnChat.width+10):(this.btnHelp.visible=!1,this.btnChat.x=this.BG_WIDTH-this.btnChat.width+6)),0!==this.messages.length&&(this.lblText.x-=this.SCROLL_SPEED,this.lblText.x+this.lblText.width<0&&(this.currentIndex=(this.currentIndex+1)%this.messages.length,this.showCurrentMessage()))} + ,"update")),this.bg.width=this.BG_WIDTH,this.bg.height=this.BG_HEIGHT,this.bg.alpha=.4,this.bg.setIndex(7),this.addChild(this.bg),this.lblText.textColor=fD.COLOR_WHITE,this.lblText.wordWrap=!1,this.addChild(this.lblText),this.btnHelp=new IB("UI_Ekkorr","Btn_help_p"),this.btnHelp.x=this.BG_WIDTH-this.btnHelp.width+6,this.btnHelp.y=.5*(this.BG_HEIGHT-this.btnHelp.height)+4,this.btnHelp.onClick=this.onHelpBtnClick.bind(this),this.addChild(this.btnHelp),this.btnChat.scale=1,this.btnChat.x=this.btnHelp.x-this.btnChat.width+10,this.btnChat.y=this.btnHelp.y,this.btnChat.onClick=this.onChatBtn.bind(this),this.btnChat.visible=TL.maxWave>=t.CHAT_UNLOCK_WAVE,this.addChild(this.btnChat),un.shared.add(this.update,this),this.setLanguageChange(!0)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + async onChatBtn(){ + if(ZVt())return MKt.getInstance().show(),void wKt.getInstance().start(); + const t=await lD.getInstance().guild.getMyMembership(!0); + ID.setMembershipData(t.body),MKt.getInstance().show(),wKt.getInstance().start()} + onHelpBtnClick(){ + FKt.getInstance().show()} + setLanguageChange(t){ + cS.getInstance().removeEventListener("LanguageChange",this.onLanguageChangeBind),t&&(this.onLanguageChangeBind=this.onLanguageChange.bind(this),cS.getInstance().addEventListener("LanguageChange",this.onLanguageChangeBind))} + onLanguageChange(t=null){ + this.refreshMessages()} + refreshMessages(){ + this.messages=TKt.getInstance().getFilteredMessages(),this.currentIndex=0,this.showCurrentMessage()} + showCurrentMessage(){ + 0!==this.messages.length&&(this.lblText.text=this.messages[this.currentIndex],this.lblText.x=this.VISIBLE_WIDTH+15,this.textY<0&&(this.textY=.5*(this.BG_HEIGHT-this.lblText.height)),this.lblText.y=this.textY)} + setMessages(t){ + this.messages=t,this.currentIndex=0,this.showCurrentMessage()} + addMessage(t){ + this.messages.push(t)} + clearMessages(){ + this.messages=[],this.currentIndex=0,this.lblText.text=""} + destroy(){ + un.shared.remove(this.update,this),this.setLanguageChange(!1),super.destroy()}
- Vt(ZKt,"ClickAniLayer"); + Vt(HKt,"MessageInfo"),Kt(HKt,"instance"),Kt(HKt,"CHAT_UNLOCK_WAVE",50);
GameOverPopup 10 hunks, 25 statements
- super(),Kt(this,"lblMessage1",new JD("",cD.DEFAULT_COLOR,cD.DEFAULT_FONT_OPTION_18)),Kt(this,"lblMessage2",new JD("",cD.COLOR_GRAY,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblMedalReward",new VB("UI_STAR_ICON","0",16750848,cD.DEFAULT_OUTLINE_FONT_OPTION_18)),Kt(this,"lblEventBonus",new JD("",4500223,cD.DEFAULT_OUTLINE_FONT_OPTION_18)),Kt(this,"rewardCardBg"),Kt(this,"lblTabCurrentArrow"),Kt(this,"lblTabCurrent",new JD("",16777215,cD.DEFAULT_OUTLINE_FONT_OPTION_17)),Kt(this,"lblTabCenter",new JD("",8947848,cD.DEFAULT_OUTLINE_FONT_OPTION_16)),Kt(this,"lblTabReviveArrow"),Kt(this,"lblTabRevive",new JD("",8947848,cD.DEFAULT_OUTLINE_FONT_OPTION_17)),Kt(this,"lblStartWave",new JD("",13421772,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblLastRevive",new JD("",10066329,cD.DEFAULT_FONT_OPTION_16)),Kt(this,"btnMedalBuffGuide",new AB("UI_Ekkorr","UI_Alarm",.85)),Kt(this,"btnRebirth",new xU("","","환생",.8,135,70)),Kt(this,"btnRebirthBonus",new xU("UI_GEM","500","환생 (훈장 x 2)",.8,240,70)),Kt(this,"btnContinue",new xU("Icon_Heart2","1","이어하기",.8,140,70)),Kt(this,"reviveTeamBanner"),Kt(this,"bannerSeparator"),Kt(this,"useReviveTeam",!1),Kt(this,"hasReviveTeam",!1),Kt(this,"reviveTeamKindNums",[]),Kt(this,"reviveTeamTrans",[]),Kt(this,"currentWave",1),Kt(this,"baseMedalCache",0),Kt(this,"normalMedalCache",0),Kt(this,"reviveTeamMedalCache",0),Kt(this,"eventMultiCache",1),Kt(this,"currentBuffMultiplier",1),Kt(this,"reviveBuffMultiplier",1),Kt(this,"onContinue",null),Kt(this,"onRebirth",null),Kt(this,"onRebirthBonus",null),Kt(this,"requestPending",!1),Kt(this,"isGameOverMode",!1),Kt(this,"pendingGameOver",null),Kt(this,"gameOverWave",0),cS.getInstance().addEventListener("BattleSwitch",this.onBattleSwitchEvent.bind(this)),this.title=CG.getText("GAME_6","환생하기"),this.lblMessage1.y=85,this.lblMessage2.align="center",this.btnRebirth.showIconLabel=!1,this.btnRebirth.showTextLabel=!0,this.btnRebirth.text=CG.getText("GAME_5","환생"),this.btnRebirth.color=xU.GREEN,this.btnRebirthBonus.showIconLabel=!0,this.btnRebirthBonus.showTextLabel=!0,this.btnRebirthBonus.iconText="500",this.btnRebirthBonus.text=`${ + super(),Kt(this,"lblMessage1",new iL("",fD.DEFAULT_COLOR,fD.DEFAULT_FONT_OPTION_18)),Kt(this,"lblMessage2",new iL("",fD.COLOR_GRAY,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblMedalReward",new qB("UI_STAR_ICON","0",16750848,fD.DEFAULT_OUTLINE_FONT_OPTION_18)),Kt(this,"lblEventBonus",new iL("",4500223,fD.DEFAULT_OUTLINE_FONT_OPTION_18)),Kt(this,"rewardCardBg"),Kt(this,"lblTabCurrentArrow"),Kt(this,"lblTabCurrent",new iL("",16777215,fD.DEFAULT_OUTLINE_FONT_OPTION_17)),Kt(this,"lblTabCenter",new iL("",8947848,fD.DEFAULT_OUTLINE_FONT_OPTION_16)),Kt(this,"lblTabReviveArrow"),Kt(this,"lblTabRevive",new iL("",8947848,fD.DEFAULT_OUTLINE_FONT_OPTION_17)),Kt(this,"lblStartWave",new iL("",13421772,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"lblLastRevive",new iL("",10066329,fD.DEFAULT_FONT_OPTION_16)),Kt(this,"btnMedalBuffGuide",new IB("UI_Ekkorr","UI_Alarm",.85)),Kt(this,"btnRebirth",new DU("","","환생",.8,135,70)),Kt(this,"btnRebirthBonus",new DU("UI_GEM","500","환생 (훈장 x 2)",.8,240,70)),Kt(this,"btnContinue",new DU("Icon_Heart2","1","이어하기",.8,140,70)),Kt(this,"reviveTeamBanner"),Kt(this,"reviveTreasureBanner"),Kt(this,"bannerSeparator"),Kt(this,"useReviveTeam",!1),Kt(this,"hasReviveTeam",!1),Kt(this,"reviveTeamKindNums",[]),Kt(this,"reviveTeamTrans",[]),Kt(this,"currentWave",1),Kt(this,"baseMedalCache",0),Kt(this,"normalMedalCache",0),Kt(this,"reviveTeamMedalCache",0),Kt(this,"eventMultiCache",1),Kt(this,"currentBuffMultiplier",1),Kt(this,"reviveBuffMultiplier",1),Kt(this,"onContinue",null),Kt(this,"onRebirth",null),Kt(this,"onRebirthBonus",null),Kt(this,"requestPending",!1),Kt(this,"isGameOverMode",!1),Kt(this,"pendingGameOver",null),Kt(this,"gameOverWave",0),cS.getInstance().addEventListener("BattleSwitch",this.onBattleSwitchEvent.bind(this)),this.title=xG.getText("GAME_6","환생하기"),this.lblMessage1.y=85,this.lblMessage2.align="center",this.btnRebirth.showIconLabel=!1,this.btnRebirth.showTextLabel=!0,this.btnRebirth.text=xG.getText("GAME_5","환생"),this.btnRebirth.color=DU.GREEN,this.btnRebirthBonus.showIconLabel=!0,this.btnRebirthBonus.showTextLabel=!0,this.btnRebirthBonus.iconText="500",this.btnRebirthBonus.text=`${
+ ,this.reviveTreasureBanner=new mri(this.width-40),this.reviveTreasureBanner.onChanged=()=>{ + this.refreshAfterChange()}
- ),this.bannerSeparator.visible=!1,this.contentContainer.addChild(this.lblMessage1,this.lblMessage2,this.lblTabCurrentArrow,this.lblTabCurrent,this.lblTabCenter,this.lblTabReviveArrow,this.lblTabRevive,this.btnMedalBuffGuide,this.rewardCardBg,this.lblMedalReward,this.lblEventBonus,this.lblStartWave,this.lblLastRevive,this.btnRebirth,this.btnRebirthBonus,this.btnContinue,this.bannerSeparator,this.reviveTeamBanner),cD.setLabelWrapWidth(this.lblMessage1,this.width-60),cD.setLabelWrapWidth(this.lblMessage2,this.width-60)} + ),this.bannerSeparator.visible=!1,this.contentContainer.addChild(this.lblMessage1,this.lblMessage2,this.lblTabCurrentArrow,this.lblTabCurrent,this.lblTabCenter,this.lblTabReviveArrow,this.lblTabRevive,this.btnMedalBuffGuide,this.rewardCardBg,this.lblMedalReward,this.lblEventBonus,this.lblStartWave,this.lblLastRevive,this.btnRebirth,this.btnRebirthBonus,this.btnContinue,this.bannerSeparator,this.reviveTeamBanner,this.reviveTreasureBanner),fD.setLabelWrapWidth(this.lblMessage1,this.width-60),fD.setLabelWrapWidth(this.lblMessage2,this.width-60)}
- await this.loadReviveTeam(),this.hasReviveTeam&&(this.reviveTeamMedalCache=this.calcReviveTeamMedal(t,i),this.useReviveTeam=!0),this.setRewardView(),this.updateLayout()} + await this.loadReviveTeam(),await FF.getInstance().init(),this.hasReviveTeam&&(this.reviveTeamMedalCache=this.calcReviveTeamMedal(t,i),this.useReviveTeam=!0),this.setRewardView(),this.updateLayout()}
- const t=Ox.getInstance(),i=wx.getInstance(),s=Cx.MedalBuff,e=this.getGameplaySourceBuff("treasure",s),n=this.getGameplaySourceBuff("guildWar",s),h=this.getGameplaySourceBuff("pet",s),r=cx.getInstance().getRebirthMedalPetDelta(),o=i.getGlobalTransMedalBonusPct(IR.getWaterDragonOwnedMedalCapBonus()); + const t=Ox.getInstance(),i=wx.getInstance(),s=Cx.MedalBuff; + let e=this.getGameplaySourceBuff("treasure",s); + const n=this.getGameplaySourceBuff("guildWar",s),h=this.getGameplaySourceBuff("pet",s),r=cx.getInstance().getRebirthMedalPetDelta(),o=i.getGlobalTransMedalBonusPct(IR.getWaterDragonOwnedMedalCapBonus());
- this.useReviveTeam?(a=t.calcTotalForKindNums(this.reviveTeamKindNums,s),c=i.calcTeamTransMedalBonusPct(this.reviveTeamKindNums,this.reviveTeamTrans),l=IR.getWaterDragonTeamMedalBonus(this.reviveTeamKindNums),u=this.reviveBuffMultiplier,d=CG.getText("GAME_1211","환생팀 기준")):(a=t.getTotal(s),c=i.getCurrentTeamTransMedalBonusPct(),l=IR.getWaterDragonTeamMedalBonus(i.getTeamIds())); + if(this.useReviveTeam){ + a=t.calcTotalForKindNums(this.reviveTeamKindNums,s),c=i.calcTeamTransMedalBonusPct(this.reviveTeamKindNums,this.reviveTeamTrans),l=IR.getWaterDragonTeamMedalBonus(this.reviveTeamKindNums); + const n=FF.getInstance().getEffectiveKindNums(); + if(n){ + const t=qx.getInstance(); + e+=t.getMedalTotalForKindNums(n)-t.getMedalTotalForKindNums(Hx.getInstance().equipedKindNums)} + u=this.reviveBuffMultiplier,d=xG.getText("GAME_1211","환생팀 기준")} + else a=t.getTotal(s),c=i.getCurrentTeamTransMedalBonusPct(),l=IR.getWaterDragonTeamMedalBonus(i.getTeamIds());
- const s=Ox.getInstance(),e=VR.getInstance().getGameplayMultiplier(Cx.MedalBuff),n=s.getTotal(Cx.MedalBuff),h=s.calcTotalForKindNums(this.reviveTeamKindNums,Cx.MedalBuff),r=cx.getInstance().getRebirthMedalPetDelta(),o=wx.getInstance(),a=o.getGlobalTransMedalBonusPct(IR.getWaterDragonOwnedMedalCapBonus()),c=o.calcTeamTransMedalBonusPct(this.reviveTeamKindNums,this.reviveTeamTrans),l=IR.getWaterDragonTeamMedalBonus(this.reviveTeamKindNums); - return this.reviveBuffMultiplier=e-.01*n+.01*h+.01*r+.01*(a+c+l),Math.floor(t*this.reviveBuffMultiplier*i)} + const s=Ox.getInstance(),e=VR.getInstance().getGameplayMultiplier(Cx.MedalBuff),n=s.getTotal(Cx.MedalBuff),h=s.calcTotalForKindNums(this.reviveTeamKindNums,Cx.MedalBuff),r=cx.getInstance().getRebirthMedalPetDelta(),o=wx.getInstance(),a=o.getGlobalTransMedalBonusPct(IR.getWaterDragonOwnedMedalCapBonus()),c=o.calcTeamTransMedalBonusPct(this.reviveTeamKindNums,this.reviveTeamTrans),l=IR.getWaterDragonTeamMedalBonus(this.reviveTeamKindNums),u=FF.getInstance().getEffectiveKindNums(); + let d=0; + if(u){ + const t=qx.getInstance(); + d=t.getMedalTotalForKindNums(u)-t.getMedalTotalForKindNums(Hx.getInstance().equipedKindNums)} + return this.reviveBuffMultiplier=e-.01*n+.01*h+.01*r+.01*(a+c+l)+.01*d,Math.floor(t*this.reviveBuffMultiplier*i)}
- i+=this.btnRebirth.height+18,this.reviveTeamBanner.canShow()?(this.bannerSeparator.visible=!0,this.bannerSeparator.x=20,this.bannerSeparator.y=i,i+=this.bannerSeparator.height+17,this.reviveTeamBanner.setData(),this.reviveTeamBanner.visible=!0,this.reviveTeamBanner.x=20,this.reviveTeamBanner.y=i,i+=85):(this.bannerSeparator.visible=!1,this.reviveTeamBanner.visible=!1),this.height=i+20} + i+=this.btnRebirth.height+18,this.reviveTeamBanner.canShow()?(this.bannerSeparator.visible=!0,this.bannerSeparator.x=20,this.bannerSeparator.y=i,i+=this.bannerSeparator.height+17,this.reviveTeamBanner.setData(),this.reviveTeamBanner.visible=!0,this.reviveTeamBanner.x=20,this.reviveTeamBanner.y=i,i+=85,this.reviveTreasureBanner.setData(),this.reviveTreasureBanner.canShow()?(this.reviveTreasureBanner.visible=!0,this.reviveTreasureBanner.x=20,this.reviveTreasureBanner.y=i,i+=this.reviveTreasureBanner.height+5):this.reviveTreasureBanner.visible=!1):(this.bannerSeparator.visible=!1,this.reviveTeamBanner.visible=!1,this.reviveTreasureBanner.visible=!1),this.height=i+20}
- ML.wave>=50&&dYt.getInstance().endTutorialRevive(),CVt.getInstance().markDirty(),this.processRebirthResult(n,t,i,s,e,1)} + TL.wave>=50&&Dni.getInstance().endTutorialRevive(),0==TL.numRevive&&TL.wave>=100&&Dni.getInstance().showSecretaryHelpPopup(),SVt.getInstance().markDirty(),this.processRebirthResult(n,t,i,s,e,1)}
- ML.wave>=50&&dYt.getInstance().endTutorialRevive(),CVt.getInstance().markDirty(),this.processRebirthResult(n,t,i,s,e,2)} + TL.wave>=50&&Dni.getInstance().endTutorialRevive(),0==TL.numRevive&&TL.wave>=100&&Dni.getInstance().showSecretaryHelpPopup(),SVt.getInstance().markDirty(),this.processRebirthResult(n,t,i,s,e,2)}
StampCalendarStatusVO 1 hunks, 25 statements
+ const Cri=class{ + constructor(){ + Kt(this,"claimedCount",0),Kt(this,"claimable",!1),Kt(this,"schedule",[])} + } + ; + Vt(Cri,"StampCalendarStatusVO"); + let Iri=Cri; + const Ori=class t{ + constructor(){ + Kt(this,"status",new Iri),Kt(this,"loaded",!1)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + async init(){ + const t=await lD.getInstance().stampCalendar.getStatus(); + 0!=t.success&&this.setStatusData(t.body)} + setStatusData(t){ + t&&(this.status.claimedCount=Number(t.claimedCount??0),this.status.claimable=!0===t.claimable,this.status.schedule=Array.isArray(t.schedule)?t.schedule:[],this.loaded=!0,cS.getInstance().dispatchCustomEvent("StampCalendarUpdate"))} + hasReward(){ + return this.loaded&&this.status.claimable} + isCompleted(){ + return this.status.claimedCount>=t.TOTAL_DAYS} + } + ; + Vt(Ori,"StampCalendarDataManager"),Kt(Ori,"TOTAL_DAYS",30),Kt(Ori,"instance"); + let kri=Ori;
TreasureSetDataManager 1 hunks, 24 statements
+ getMedalTotalForKindNums(t){ + return this.getMedalSummaryForKindNums(t).total} + getMedalSummaryForKindNums(t){ + if(!t||0===t.length)return{ + total:0,suboptimal:!1} + ; + const i=Hx.getInstance(),s=new Map; + for(const h of[...i.equipedList,...i.ownedList])h&&s.set(h.kindNum,h.trans||0); + let e=0,n=!1; + for(const h of this.bookList){ + const i=h.itemList.filter(i=>-1!==t.indexOf(i)).map(t=>s.get(t)??0).sort((t,i)=>i-t),r=h.itemList.filter(t=>s.has(t)).map(t=>s.get(t)??0).sort((t,i)=>i-t); + for(let t=0; + t<h.numSetList.length; + t++){ + const s=h.numSetList[t]; + if(i.length<s)continue; + const o=(h.skillList[t]||[]).indexOf("medal"); + if(o<0)continue; + const a=h.getValueAt(i[s-1]??0,t,o); + e+=a,a<h.getValueAt(r[s-1]??0,t,o)&&(n=!0)} + } + return{ + total:e,suboptimal:n} + }
TopMenu 7 hunks, 24 statements
- super(),Kt(this,"bg",new ZD),Kt(this,"lblDay",new JD("Wave 1",65433,cD.DEFAULT_OUTLINE_FONT_OPTION_20)),Kt(this,"waveBar",new nri),Kt(this,"lblWaveSkip",null),Kt(this,"btnRevive",new AB("UI_Ekkorr","UI_REVIVE_ICON")),Kt(this,"lblMedalEvent",new JD("+00%\n3/3",65433,cD.DEFAULT_OUTLINE_FONT_OPTION_16)),Kt(this,"btnMedalEvent",new AB("UI_Ekkorr","UI_Question",1)),Kt(this,"lblSpeed",new VB("UI_SPEED_ICON2")),Kt(this,"heartInfo",Cni.getInstance()),Kt(this,"profile",SU.getInstance()),Kt(this,"btnHeroPresent",new AB("UI_Ekkorr","Hero55",.9)),Kt(this,"count",0),Kt(this,"speedActive",!1),Kt(this,"userSpeedMode",null),Kt(this,"_height",40),this.bg.setIndex(6),this.bg.width=640,this.bg.height=40,this.bg.alpha=.1,this.lblDay.textColor=43622,this.lblDay.x=.5*(this.bg.width-this.lblDay.width),this.lblDay.y=.5*(this.bg.height-this.lblDay.height),this.addChild(this.lblDay),this.lblDay.text="Wave 1",this.waveBar.x=.5*(640-this.waveBar.width),this.waveBar.y=35,this.addChild(this.waveBar),this.waveBar.x=.5*(640-this.waveBar.width),this.waveBar.y=35,this.addChild(this.waveBar),this.profile.x=4,this.profile.y=4,this.addChild(this.profile),this.btnRevive.x=1,this.btnRevive.y=this.profile.y+this.profile.height-10,this.addChild(this.btnRevive),this.btnRevive.on("pointerdown",()=>{ + super(),Kt(this,"bg",new eL),Kt(this,"lblDay",new iL("Wave 1",65433,fD.DEFAULT_OUTLINE_FONT_OPTION_20)),Kt(this,"waveBar",new Dri),Kt(this,"lblWaveSkip",null),Kt(this,"btnRevive",new IB("UI_Ekkorr","UI_REVIVE_ICON")),Kt(this,"lblMedalEvent",new iL("+00%\n3/3",65433,fD.DEFAULT_OUTLINE_FONT_OPTION_16)),Kt(this,"btnMedalEvent",new IB("UI_Ekkorr","UI_Question",1)),Kt(this,"lblSpeed",new qB("UI_SPEED_ICON2")),Kt(this,"heartInfo",Qni.getInstance()),Kt(this,"profile",OU.getInstance()),Kt(this,"btnHeroPresent",new IB("UI_Ekkorr","Hero55",.9)),Kt(this,"btnStampCalendar",new IB("UI_Ekkorr","stamp30",.54)),Kt(this,"heroPresentBaseH",0),Kt(this,"stampBaseH",0),Kt(this,"count",0),Kt(this,"speedActive",!1),Kt(this,"userSpeedMode",null),Kt(this,"_height",40),this.bg.setIndex(6),this.bg.width=640,this.bg.height=40,this.bg.alpha=.1,this.lblDay.textColor=43622,this.lblDay.x=.5*(this.bg.width-this.lblDay.width),this.lblDay.y=.5*(this.bg.height-this.lblDay.height),this.addChild(this.lblDay),this.lblDay.text="Wave 1",this.waveBar.x=.5*(640-this.waveBar.width),this.waveBar.y=35,this.addChild(this.waveBar),this.waveBar.x=.5*(640-this.waveBar.width),this.waveBar.y=35,this.addChild(this.waveBar),this.profile.x=4,this.profile.y=4,this.addChild(this.profile),this.btnRevive.x=1,this.btnRevive.y=this.profile.y+this.profile.height-10,this.addChild(this.btnRevive),this.btnRevive.on("pointerdown",()=>{
- ),this.lblMedalEvent.text="+00%\n3/3",this.lblMedalEvent.textColor=6801914,this.lblMedalEvent.align="center",this.lblMedalEvent.lineHeight=17,this.lblMedalEvent.x=this.btnRevive.x+.5*(this.btnRevive.width-this.lblMedalEvent.width),this.lblMedalEvent.y=this.btnRevive.y+this.btnRevive.height-.5*this.lblMedalEvent.height,this.addChild(this.lblMedalEvent),this.btnMedalEvent.x=this.lblMedalEvent.x+this.lblMedalEvent.width,this.btnMedalEvent.y=this.lblMedalEvent.y+.5*(this.lblMedalEvent.height-this.btnMedalEvent.height),this.btnMedalEvent.onClick=this.onMedalEventClick.bind(this),this.addChild(this.btnMedalEvent),this.lblSpeed.textOffsetY=2,this.lblSpeed.textOffsetX=2,this.lblSpeed.iconScale=.7,this.lblSpeed.textSize=13,this.lblSpeed.x=6,this.lblSpeed.y=this.btnRevive.y+this.btnRevive.height+8,this.lblSpeed.eventMode="static",this.lblSpeed.cursor="pointer",this.lblSpeed.hitArea=new Ri(0,0,120,30),this.lblSpeed.on("pointerdown",this.onSpeedClick,this),this.addChild(this.lblSpeed),this.btnHeroPresent.visible=!1,this.btnHeroPresent.x=100,this.btnHeroPresent.y=this.lblSpeed.y+this.lblSpeed.height+12,this.btnHeroPresent.onClick=this.onHeroPresentClick.bind(this),this.addChild(this.btnHeroPresent),this.heartInfo.x=this.btnRevive.x+this.btnRevive.width+5,this.heartInfo.y=5,this.addChild(this.heartInfo),this.addChild(SU.getInstance()),this.addChild(lzt.getInstance()),this._height=Math.max(this.bg.height,this.waveBar.y+this.waveBar.height),this.profile.on("pointerdown",this.onProfileClick,this),wni.getInstance().registerReviveButtonGetter(t=>"btnRevive"===t&&this.btnRevive.visible?{ + ),this.lblMedalEvent.text="+00%\n3/3",this.lblMedalEvent.textColor=6801914,this.lblMedalEvent.align="center",this.lblMedalEvent.lineHeight=17,this.lblMedalEvent.x=this.btnRevive.x+.5*(this.btnRevive.width-this.lblMedalEvent.width),this.lblMedalEvent.y=this.btnRevive.y+this.btnRevive.height-.5*this.lblMedalEvent.height,this.addChild(this.lblMedalEvent),this.btnMedalEvent.x=this.lblMedalEvent.x+this.lblMedalEvent.width,this.btnMedalEvent.y=this.lblMedalEvent.y+.5*(this.lblMedalEvent.height-this.btnMedalEvent.height),this.btnMedalEvent.onClick=this.onMedalEventClick.bind(this),this.addChild(this.btnMedalEvent),this.lblSpeed.textOffsetY=2,this.lblSpeed.textOffsetX=2,this.lblSpeed.iconScale=.7,this.lblSpeed.textSize=13,this.lblSpeed.x=6,this.lblSpeed.y=this.btnRevive.y+this.btnRevive.height+8,this.lblSpeed.eventMode="static",this.lblSpeed.cursor="pointer",this.lblSpeed.hitArea=new Ri(0,0,120,30),this.lblSpeed.on("pointerdown",this.onSpeedClick,this),this.addChild(this.lblSpeed),this.btnHeroPresent.visible=!1,this.btnHeroPresent.x=100,this.btnHeroPresent.y=this.lblSpeed.y+this.lblSpeed.height+12,this.btnHeroPresent.onClick=this.onHeroPresentClick.bind(this),this.addChild(this.btnHeroPresent),this.btnStampCalendar.visible=!1,this.btnStampCalendar.onClick=this.onStampCalendarClick.bind(this),this.stampBaseH=this.btnStampCalendar.height,this.addChild(this.btnStampCalendar),this.heartInfo.x=this.btnRevive.x+this.btnRevive.width+5,this.heartInfo.y=5,this.addChild(this.heartInfo),this.addChild(OU.getInstance()),this.addChild(lVt.getInstance()),this._height=Math.max(this.bg.height,this.waveBar.y+this.waveBar.height),this.profile.on("pointerdown",this.onProfileClick,this),Bzt.getInstance().registerReviveButtonGetter(t=>"btnRevive"===t&&this.btnRevive.visible?{
- this.lblSpeed.x=7,this.lblMedalEvent.visible?this.lblSpeed.y=this.lblMedalEvent.y+this.lblMedalEvent.height+8:this.lblSpeed.y=this.btnRevive.y+86+8,this.btnHeroPresent.x=7,this.btnHeroPresent.y=this.lblSpeed.y+this.lblSpeed.height+12; + this.lblSpeed.x=7,this.lblMedalEvent.visible?this.lblSpeed.y=this.lblMedalEvent.y+this.lblMedalEvent.height+8:this.lblSpeed.y=this.btnRevive.y+86+8; + const t=this.heroPresentBaseH||this.btnHeroPresent.height,i=this.stampBaseH||this.btnStampCalendar.height; + this.btnHeroPresent.x=7,this.btnHeroPresent.y=this.lblSpeed.y+this.lblSpeed.height+8,this.btnStampCalendar.x=-4,this.btnStampCalendar.y=(this.btnHeroPresent.visible?this.btnHeroPresent.y+t+6:this.btnHeroPresent.y)-15;
- t.x=3,this.btnHeroPresent.visible?t.y=this.btnHeroPresent.y+this.btnHeroPresent.height-7:t.y=this.lblSpeed.y+this.lblSpeed.height+10} + s.x=3,this.btnStampCalendar.visible?s.y=this.btnStampCalendar.y+i-3:this.btnHeroPresent.visible?s.y=this.btnHeroPresent.y+t-3:s.y=this.lblSpeed.y+this.lblSpeed.height+10}
- this.count-- >0||(this.count=20,this.updateGameSpeed(),this.updateMedalEvent(),this.updateHeroPresent())} + this.count-- >0||(this.count=20,this.updateGameSpeed(),this.updateMedalEvent(),this.updateHeroPresent(),this.updateStampCalendar())}
- `),t.hasClaimable?this.btnHeroPresent.showRedDot():this.btnHeroPresent.hideRedDot()} + `),this.heroPresentBaseH=this.btnHeroPresent.height,t.hasClaimable?this.btnHeroPresent.showRedDot():this.btnHeroPresent.hideRedDot()}
+ updateStampCalendar(){ + const t=kri.getInstance(),i=t.status.schedule.length>0&&!t.isCompleted(); + this.btnStampCalendar.visible!==i&&(this.btnStampCalendar.visible=i,this.applySpeedLabelPosition()),i&&t.hasReward()?this.btnStampCalendar.showRedDot():this.btnStampCalendar.hideRedDot()} + async onStampCalendarClick(){ + await kri.getInstance().init(); + const{ + StampCalendarPopup:t} + =await Xt(async()=>{ + const{ + StampCalendarPopup:t} + =await Promise.resolve().then(()=>igi); + return{ + StampCalendarPopup:t} + } + ,void 0); + t.getInstance().setData(),t.getInstance().show(),t.getInstance().placeVertically(450)}
ReviveTreasureDataManager 1 hunks, 23 statements
+ Kt(this,"kindNums",[]),Kt(this,"loaded",!1)} + static getInstance(){ + return null==this.instance&&(this.instance=new t),this.instance} + async init(){ + var t; + try{ + const i=await lD.getInstance().user.getReviveTreasure(); + !1!==(null==i?void 0:i.success)&&Array.isArray(null==(t=null==i?void 0:i.body)?void 0:t.treasures)&&(this.kindNums=i.body.treasures.map(Number).filter(t=>t>0),this.loaded=!0)} + catch(_et){ + } + } + setKindNums(t){ + this.kindNums=(t||[]).filter(t=>t>0),this.loaded=!0} + getEffectiveKindNums(){ + if(!this.loaded||0===this.kindNums.length)return null; + const t=Hx.getInstance(),i=new Set([...t.equipedList,...t.ownedList].filter(t=>!!t).map(t=>t.kindNum)),s=this.kindNums.filter(t=>i.has(t)); + return s.length>0?s:null} + } + ; + Vt(UF,"ReviveTreasureDataManager"),Kt(UF,"instance"); + let FF=UF; + const HF=class t{ + constructor(){
Mo 17 hunks, 20 statements
- let Xst=Yst; + let set=iet;
- const Qst="https://metamask-sdk.api.cx.metamask.io/",Zst=["websocket"],tet=6048e5,iet=3e3,set=["metamask_connectSign","metamask_connectWith","metamask_open","metamask_batch","personal_sign","wallet_requestPermissions","wallet_revokePermissions","wallet_watchAsset","eth_sendTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_signTransaction","eth_sign","personal_ecRecover"]; + const net="https://metamask-sdk.api.cx.metamask.io/",het=["websocket"],ret=6048e5,oet=3e3,aet=["metamask_connectSign","metamask_connectWith","metamask_open","metamask_batch","personal_sign","wallet_requestPermissions","wallet_revokePermissions","wallet_watchAsset","eth_sendTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_signTransaction","eth_sign","personal_ecRecover"];
- return set.includes(t)} + return aet.includes(t)}
- var het,ret,oet,aet,cet,uet,det,fet; + var det,fet,pet,get,met,wet,vet,_et;
- (aet||(aet={ + (get||(get={
- super(),this.keysExchanged=!1,this.step=aet.KEY_HANDSHAKE_NONE,this.debug=!1,this.context=s,this.communicationLayer=t,(null==e?void 0:e.privateKey)&&i&&(jst.KeyExchange(`[KeyExchange: constructor()] otherPubKey=${ + super(),this.keysExchanged=!1,this.step=get.KEY_HANDSHAKE_NONE,this.debug=!1,this.context=s,this.communicationLayer=t,(null==e?void 0:e.privateKey)&&i&&(Xst.KeyExchange(`[KeyExchange: constructor()] otherPubKey=${
- set keysExchanged to true!`,e),this.keysExchanged=!0),this.myECIES=new Xst(Object.assign(Object.assign({ + set keysExchanged to true!`,e),this.keysExchanged=!0),this.myECIES=new set(Object.assign(Object.assign({
- `),this.emit(ret.KEY_INFO,s.type),s.type===aet.KEY_HANDSHAKE_SYN?(this.checkStep([aet.KEY_HANDSHAKE_NONE,aet.KEY_HANDSHAKE_ACK]),jst.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_SYN",s),s.pubkey&&this.setOtherPublicKey(s.pubkey),this.communicationLayer.sendMessage({ - type:aet.KEY_HANDSHAKE_SYNACK,pubkey:this.myPublicKey} + `),this.emit(fet.KEY_INFO,s.type),s.type===get.KEY_HANDSHAKE_SYN?(this.checkStep([get.KEY_HANDSHAKE_NONE,get.KEY_HANDSHAKE_ACK]),Xst.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_SYN",s),s.pubkey&&this.setOtherPublicKey(s.pubkey),this.communicationLayer.sendMessage({ + type:get.KEY_HANDSHAKE_SYNACK,pubkey:this.myPublicKey}
- ),this.setStep(aet.KEY_HANDSHAKE_ACK)):s.type===aet.KEY_HANDSHAKE_SYNACK?(this.checkStep([aet.KEY_HANDSHAKE_SYNACK,aet.KEY_HANDSHAKE_ACK,aet.KEY_HANDSHAKE_NONE]),jst.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_SYNACK"),s.pubkey&&this.setOtherPublicKey(s.pubkey),this.communicationLayer.sendMessage({ - type:aet.KEY_HANDSHAKE_ACK} + ),this.setStep(get.KEY_HANDSHAKE_ACK)):s.type===get.KEY_HANDSHAKE_SYNACK?(this.checkStep([get.KEY_HANDSHAKE_SYNACK,get.KEY_HANDSHAKE_ACK,get.KEY_HANDSHAKE_NONE]),Xst.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_SYNACK"),s.pubkey&&this.setOtherPublicKey(s.pubkey),this.communicationLayer.sendMessage({ + type:get.KEY_HANDSHAKE_ACK}
- ),this.keysExchanged=!0,this.setStep(aet.KEY_HANDSHAKE_ACK),this.emit(ret.KEYS_EXCHANGED)):s.type===aet.KEY_HANDSHAKE_ACK&&(jst.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_ACK set keysExchanged to true!"),this.checkStep([aet.KEY_HANDSHAKE_ACK,aet.KEY_HANDSHAKE_NONE]),this.keysExchanged=!0,this.setStep(aet.KEY_HANDSHAKE_ACK),this.emit(ret.KEYS_EXCHANGED))} + ),this.keysExchanged=!0,this.setStep(get.KEY_HANDSHAKE_ACK),this.emit(fet.KEYS_EXCHANGED)):s.type===get.KEY_HANDSHAKE_ACK&&(Xst.KeyExchange("[KeyExchange: onKeyExchangeMessage()] KEY_HANDSHAKE_ACK set keysExchanged to true!"),this.checkStep([get.KEY_HANDSHAKE_ACK,get.KEY_HANDSHAKE_NONE]),this.keysExchanged=!0,this.setStep(get.KEY_HANDSHAKE_ACK),this.emit(fet.KEYS_EXCHANGED))}
- this.clean(),this.myECIES=new Xst(t)} + this.clean(),this.myECIES=new set(t)}
- reset handshake state`),this.setStep(aet.KEY_HANDSHAKE_NONE),this.emit(ret.KEY_INFO,this.step),this.keysExchanged=!1} + reset handshake state`),this.setStep(get.KEY_HANDSHAKE_NONE),this.emit(fet.KEY_INFO,this.step),this.keysExchanged=!1}
- `),t?!(this.keysExchanged||this.step!==aet.KEY_HANDSHAKE_NONE&&this.step!==aet.KEY_HANDSHAKE_SYNACK)||i?(jst.KeyExchange(`[KeyExchange: start()] context=${ + `),t?!(this.keysExchanged||this.step!==get.KEY_HANDSHAKE_NONE&&this.step!==get.KEY_HANDSHAKE_SYNACK)||i?(Xst.KeyExchange(`[KeyExchange: start()] context=${
- `,this.step),this.clean(),this.setStep(aet.KEY_HANDSHAKE_SYNACK),this.communicationLayer.sendMessage({ - type:aet.KEY_HANDSHAKE_SYN,pubkey:this.myPublicKey,v:2} + `,this.step),this.clean(),this.setStep(get.KEY_HANDSHAKE_SYNACK),this.communicationLayer.sendMessage({ + type:get.KEY_HANDSHAKE_SYN,pubkey:this.myPublicKey,v:2}
- type:aet.KEY_HANDSHAKE_SYNACK,pubkey:this.myPublicKey,v:2} + type:get.KEY_HANDSHAKE_SYNACK,pubkey:this.myPublicKey,v:2}
- type:aet.KEY_HANDSHAKE_START} + type:get.KEY_HANDSHAKE_START}
- this.otherPublicKey=i,this.myECIES=new Xst({ + this.otherPublicKey=i,this.myECIES=new set({
GuildWarTournament2Popup 3 hunks, 18 statements
+ onEnter(){ + ++this.count>60&&(this.count=0,this.onEnterUpdate())} + onEnterUpdate(){ + if(!ID.roundSchedule)return void(this.lblRemainTime.text=xG.getText("COMMON_28","대기중")); + const t=.001*(this.endTime-tx.time); + this.lblRemainTime.textColor=t<3600?fD.COLOR_RED:fD.COLOR_BRIGHT_GREEN,this.lblRemainTime.text=t>0?`${ + EU.displayTimeAsTwoOfDDHHMMSS(t)} + `:xG.getText("GAME_1228","종료")}
- ),this.hide()} + ),t.getInstance().hide()}
- this.show()} - onEnter(){ - ++this.count>60&&(this.count=0,this.onEnterUpdate())} - onEnterUpdate(){ - if(!AD.roundSchedule)return void(this.lblRemainTime.text=CG.getText("COMMON_28","대기중")); - const t=.001*(this.endTime-tx.time); - this.lblRemainTime.textColor=t<3600?cD.COLOR_RED:cD.COLOR_BRIGHT_GREEN,this.lblRemainTime.text=t>0?`${ - bU.displayTimeAsTwoOfDDHHMMSS(t)} - `:CG.getText("GAME_1228","종료")} + t.getInstance().show()} + set currentView(t){ + null!=this._currentView&&this.container.removeChild(this._currentView),this._currentView=t,null!=this._currentView&&this.container.addChild(this._currentView)} + get currentView(){ + return this._currentView}
AttendanceAutoTrigger 2 hunks, 18 statements
- if(Foi=(null==(t=e.body)?void 0:t.offlineMarch)??null,Voi(9.5),a5.getInstance().init(),Voi(9.6),LF.getInstance().init(),Voi(9.7),Pzt.getInstance().init(),Voi(9.8),dN.getInstance().init(),Voi(9.9),zoi(),Voi(10),WVt.getMailList(),Voi(10.1),PVt.getInstance().getStatus().then(()=>{ + if(vai=(null==(t=e.body)?void 0:t.offlineMarch)??null,Eai(9.5),p5.getInstance().init(),Eai(9.6),WF.getInstance().init(),Eai(9.7),pYt.getInstance().init(),Eai(9.8),dN.getInstance().init(),kri.getInstance().init().catch(t=>{ + } + ),FF.getInstance().init(),Eai(9.9),Sai(),Eai(10),NVt.getMailList(),Eai(10.1),yVt.getInstance().getStatus().then(()=>{
- Vt(yoi,"applySafeArea"),Vt(Moi,"handleCapacitorLogin"),Vt(Eoi,"startApp"),Vt(Aoi,"checkAppTracking"),Vt(Soi,"checkServiceAgree"),Vt(Toi,"onServiceAgree"),Vt(Coi,"getServerStatus"),Vt(Ioi,"connect"),Vt(Ooi,"checkAccountId"),Vt(koi,"checkServiceAgreeRenew"),Vt(xoi,"onServiceAgreeRenew"),Vt(Roi,"createAccount"),Vt(Noi,"loginAccount"),Vt(Poi,"loadBookData"),Vt(Doi,"updateAgeRangeConfig"),Vt(Loi,"onRequestAgeRange"),Vt(Goi,"getData"),Vt(Boi,"checkNotice"),Vt(Uoi,"checkAttendanceReward"); + async function wai(){ + if(kri.getInstance().hasReward()){ + const{ + StampCalendarPopup:t} + =await Xt(async()=>{ + const{ + StampCalendarPopup:t} + =await Promise.resolve().then(()=>igi); + return{ + StampCalendarPopup:t} + } + ,void 0); + t.getInstance().setData(),t.getInstance().show(),t.getInstance().placeVertically(450),t.getInstance().hideHandler=_ai} + else _ai()} + Vt(Qoi,"applySafeArea"),Vt(Zoi,"handleCapacitorLogin"),Vt(tai,"startApp"),Vt(iai,"checkAppTracking"),Vt(sai,"checkServiceAgree"),Vt(eai,"onServiceAgree"),Vt(nai,"getServerStatus"),Vt(hai,"connect"),Vt(rai,"checkAccountId"),Vt(oai,"checkServiceAgreeRenew"),Vt(aai,"onServiceAgreeRenew"),Vt(cai,"createAccount"),Vt(lai,"loginAccount"),Vt(uai,"loadBookData"),Vt(dai,"updateAgeRangeConfig"),Vt(fai,"onRequestAgeRange"),Vt(pai,"getData"),Vt(gai,"checkNotice"),Vt(mai,"checkAttendanceReward"),Vt(wai,"checkStampCalendarReward");
RightBottomMenus 4 hunks, 16 statements
- super(),Kt(this,"btnDungeon",new AB("UI_Ekkorr","HeroGrade6")),Kt(this,"btnIdle",new AB("UI_Ekkorr","HeroGrade4")),Kt(this,"btnMap3",new AB("UI_Ekkorr","HeroGrade2")),Kt(this,"btnMap4",new AB("UI_Ekkorr","HeroGrade16")),Kt(this,"btnRaidBosses",[]),Kt(this,"btnBuff",new AB("UI_Ekkorr","HeroGrade10")),Kt(this,"btnMine",new AB("UI_Ekkorr","HeroGrade12")),Kt(this,"healthOrb",PZt.getInstance()),Kt(this,"waveCallInfo",LZt.getInstance()),this.healthOrb.x=640-.5*this.healthOrb.width-3,this.healthOrb.y=13,this.addChild(this.healthOrb),this.waveCallInfo.x=10,this.waveCallInfo.y=t.WAVE_CALL_BASE_Y,this.addChild(this.waveCallInfo),this.waveCallInfo.eventMode="static",this.waveCallInfo.on("pointerup",this.getNextWave,this),this.waveCallInfo.start(),dVt.getInstance().x=0,dVt.getInstance().y=-13,this.addChild(dVt.getInstance()),dVt.getInstance().onVisibilityChanged=()=>this.layoutWaveCall(),this.waveCallInfo.onAutoChipVisibilityChanged=()=>this.layoutWaveCall(),this.btnDungeon.x=500,this.btnDungeon.y=0; + super(),Kt(this,"btnDungeon",new IB("UI_Ekkorr","HeroGrade6")),Kt(this,"btnIdle",new IB("UI_Ekkorr","HeroGrade4")),Kt(this,"btnMap3",new IB("UI_Ekkorr","HeroGrade2")),Kt(this,"btnMap4",new IB("UI_Ekkorr","HeroGrade16")),Kt(this,"btnRaidBosses",[]),Kt(this,"btnBuff",new IB("UI_Ekkorr","HeroGrade10")),Kt(this,"btnMine",new IB("UI_Ekkorr","HeroGrade12")),Kt(this,"btnCardEvent",new IB("UI_Ekkorr","HeroGrade14")),Kt(this,"healthOrb",UZt.getInstance()),Kt(this,"waveCallInfo",HZt.getInstance()),this.healthOrb.x=640-.5*this.healthOrb.width-3,this.healthOrb.y=13,this.addChild(this.healthOrb),this.waveCallInfo.x=10,this.waveCallInfo.y=t.WAVE_CALL_BASE_Y,this.addChild(this.waveCallInfo),this.waveCallInfo.eventMode="static",this.waveCallInfo.on("pointerup",this.getNextWave,this),this.waveCallInfo.start(),Mzt.getInstance().x=0,Mzt.getInstance().y=-13,this.addChild(Mzt.getInstance()),Mzt.getInstance().onVisibilityChanged=()=>this.layoutWaveCall(),this.waveCallInfo.onAutoChipVisibilityChanged=()=>this.layoutWaveCall(),this.btnDungeon.x=500,this.btnDungeon.y=0;
- ),this.btnBuff.x=s.x-this.btnBuff.width-i,this.btnBuff.y=s.y,this.addChild(this.btnBuff),this.btnBuff.on("pointerup",this.onBuff,this),this.btnMine.x=this.btnBuff.x-this.btnMine.width-i,this.btnMine.y=this.btnBuff.y,this.addChild(this.btnMine),this.btnMine.on("pointerup",this.onMine,this); + ),this.btnBuff.x=s.x-this.btnBuff.width-i,this.btnBuff.y=s.y,this.addChild(this.btnBuff),this.btnBuff.on("pointerup",this.onBuff,this),this.btnMine.x=this.btnBuff.x-this.btnMine.width-i,this.btnMine.y=this.btnBuff.y,this.addChild(this.btnMine),this.btnMine.on("pointerup",this.onMine,this),this.btnCardEvent.x=this.btnMine.x-this.btnCardEvent.width-i,this.btnCardEvent.y=this.btnMine.y,this.addChild(this.btnCardEvent),this.btnCardEvent.on("pointerup",this.onCardEvent,this);
- this.btnBuff.visible=e,this.btnMine.visible=e} + this.btnBuff.visible=e,this.btnMine.visible=e,this.btnCardEvent.visible=e&&PZt.EVENT_OPEN}
+ async onCardEvent(){ + zL(); + const{ + CardEventLobbyPopup:t} + =await Xt(async()=>{ + const{ + CardEventLobbyPopup:t} + =await Promise.resolve().then(()=>tpi); + return{ + CardEventLobbyPopup:t} + } + ,void 0); + t.getInstance().show()}
StampCalendarService 1 hunks, 13 statements
+ async getStatus(t=!1){ + return this.post(XR.STAMP_CALENDAR.GET_STATUS,{ + } + ,t)} + async claim(t=!1){ + return this.post(XR.STAMP_CALENDAR.CLAIM,{ + } + ,t)} + } + ; + Vt(GN,"StampCalendarService"); + let BN=GN; + const UN=class extends vN{
ShopGuideSecretary 5 hunks, 13 statements
- const t=Vt((t,i)=>CG.getText(t,i),"_t"),i=Vt((t,i,s)=>CG.getValueReplace(t,"##",i,s),"_tv"),s=[`# ${ + const t=IL.getInstance(),i=Vt((t,i)=>xG.getText(t,i),"_t"),s=Vt((t,i,s)=>xG.getValueReplace(t,"##",i,s),"_tv"),e=t.getClientData("ASSISTANT_CAP_BASIC")??"24",n=t.getClientData("ASSISTANT_CAP_PREMIUM")??"96",h=t.getClientData("ASSISTANT_RATE_BASIC")??"2",r=t.getClientData("ASSISTANT_RATE_PREMIUM")??"4",o=`영웅 모집 : 1시간마다 ${ + h} + 명`,a=`영웅 모집 : 1시간마다 ${ + r} + 명`,c=[`# ${
- i("GAME_917",4,"영웅 모집 : 1시간마다 4명")} + s("GAME_917",r,a)}
- 96`,` - ${ + ${ + n} + `,` - ${
- i("GAME_917",2,"영웅 모집 : 1시간마다 2명")} + s("GAME_917",h,o)}
- 24`,` - ${ + ${ + e} + `,` - ${
BaseSubView 1 hunks, 11 statements
- const Ozt=class extends Ge{ - constructor(){ - super()} - get className(){ - return""} - updateLanguage(){ - } - } - ; - Vt(Ozt,"BaseSubView"); - let kzt=Ozt;
QuestAutoController 2 hunks, 9 statements
- type:"levelup",vo:n,targetLevel:n.level+1} + type:"levelup",vo:n,targetLevel:this.maxAffordableLevel(n,s)}
+ maxAffordableLevel(t,i){ + let s=t.level+1,e=t.effectiveMaxLv; + for(; + s<e; + ){ + const n=s+Math.ceil((e-s)/2); + t.getTotalLevelUpGold(n)<=i?s=n:e=n-1} + return s}
UserService 1 hunks, 8 statements
+ async setReviveTreasure(t,i=!1){ + return this.post(XR.USER.SET_REVIVE_TREASURE,{ + treasures:t} + ,i)} + async getReviveTreasure(t=!1){ + return this.post(XR.USER.GET_REVIVE_TREASURE,{ + } + ,t)}
ConfigManager 6 hunks, 7 statements
- (s||e>this.wave)&&dL.setTrusted(e),this.wave<=0&&dL.setTrusted(1),this.maxWave=t.safeNum(i.maxWave,this.maxWave),this.maxTeamSlots=t.safeNum(i.maxTeamSlots,this.maxTeamSlots),this.numRevive=t.safeNum(i.numRevive,this.numRevive),this.numRevive30=Number(i.numRevive30)||0,this.heart=Number(i.heart)||0,this.lastReviveTime=i.lastReviveTime?new Date(i.lastReviveTime).getTime():0,this.updateReviveBuffs(),this.tribe=Number(i.tribe)||0,this.adsEndTime=i.adsEndTime?new Date(i.adsEndTime).getTime():0,this.assistantEndTime=i.assistantEndTime?new Date(i.assistantEndTime).getTime():0,this.soulRestStartAt=i.soulRestStartAt?new Date(i.soulRestStartAt).getTime():0,this.soulRestEndAt=i.soulRestEndAt?new Date(i.soulRestEndAt).getTime():0,this.bestMedalPerMin=Number(i.bestMedalPerMin)||0,this.bestMedalPerMinAt=i.bestMedalPerMinAt?new Date(i.bestMedalPerMinAt).getTime():0,this.soulRestNextStartAt=i.soulRestNextStartAt?new Date(i.soulRestNextStartAt).getTime():0,this.soulRestSkipCount=Number(i.soulRestSkipCount)||0,void 0!==i.speed15EndTime&&null!==i.speed15EndTime&&(this.speed15EndTime=new Date(i.speed15EndTime).getTime()),void 0!==i.speed20EndTime&&null!==i.speed20EndTime&&(this.speed20EndTime=new Date(i.speed20EndTime).getTime()),this.medalBuffLevel=i.medalBuffLevel,this.goldBuffLevel=i.goldBuffLevel,this.daySkipLevel=i.daySkipLevel,i.activeSkills&&(this.activeSkills=i.activeSkills.split("|").map(Number)),AD.myGuildId=i.guildId} + (s||e>this.wave)&&mL.setTrusted(e),this.wave<=0&&mL.setTrusted(1),this.maxWave=t.safeNum(i.maxWave,this.maxWave),this.maxTeamSlots=t.safeNum(i.maxTeamSlots,this.maxTeamSlots),this.numRevive=t.safeNum(i.numRevive,this.numRevive),this.numRevive30=Number(i.numRevive30)||0,this.heart=Number(i.heart)||0,this.lastReviveTime=i.lastReviveTime?new Date(i.lastReviveTime).getTime():0,this.updateReviveBuffs(),this.tribe=Number(i.tribe)||0,this.adsEndTime=i.adsEndTime?new Date(i.adsEndTime).getTime():0,this.assistantEndTime=i.assistantEndTime?new Date(i.assistantEndTime).getTime():0,this.assistantPassEndTime=i.assistantPassEndTime?new Date(i.assistantPassEndTime).getTime():0,this.soulRestStartAt=i.soulRestStartAt?new Date(i.soulRestStartAt).getTime():0,this.soulRestEndAt=i.soulRestEndAt?new Date(i.soulRestEndAt).getTime():0,this.bestMedalPerMin=Number(i.bestMedalPerMin)||0,this.bestMedalPerMinAt=i.bestMedalPerMinAt?new Date(i.bestMedalPerMinAt).getTime():0,this.soulRestNextStartAt=i.soulRestNextStartAt?new Date(i.soulRestNextStartAt).getTime():0,this.soulRestSkipCount=Number(i.soulRestSkipCount)||0,void 0!==i.speed15EndTime&&null!==i.speed15EndTime&&(this.speed15EndTime=new Date(i.speed15EndTime).getTime()),void 0!==i.speed20EndTime&&null!==i.speed20EndTime&&(this.speed20EndTime=new Date(i.speed20EndTime).getTime()),this.medalBuffLevel=i.medalBuffLevel,this.goldBuffLevel=i.goldBuffLevel,this.daySkipLevel=i.daySkipLevel,i.activeSkills&&(this.activeSkills=i.activeSkills.split("|").map(Number)),ID.myGuildId=i.guildId}
+ static get assistantEffectiveEndTime(){ + return Math.max(this.assistantEndTime,this.assistantPassEndTime)}
- return this.assistantEndTime>tx.time} + return this.assistantEffectiveEndTime>tx.time}
- const t=this.assistantEndTime-tx.time; + const t=this.assistantEffectiveEndTime-tx.time;
- (s||n>this.wave)&&dL.setTrusted(n),this.wave<=0&&dL.setTrusted(1),this.maxWave=t.safeNum(e.maxWave,this.maxWave),this.accuMedal=t.safeNum(e.accuMedal,this.accuMedal),this.accuWave=t.safeNum(e.accuWave,this.accuWave),this.medalBuyCount=t.safeNum(e.medalBuyCount,this.medalBuyCount),this.needRevive=Boolean(e.needRevive),this.speed15EndTime=new Date(e.speed15EndTime).getTime(),this.speed20EndTime=new Date(e.speed20EndTime).getTime(),this.medalBuffLevel=t.safeNum(e.medalBuffLevel,this.medalBuffLevel),this.goldBuffLevel=t.safeNum(e.goldBuffLevel,this.goldBuffLevel),this.daySkipLevel=t.safeNum(e.daySkipLevel,this.daySkipLevel),this.lastReviveTime=e.lastReviveTime?new Date(e.lastReviveTime).getTime():0,this.numRevive=t.safeNum(e.numRevive,this.numRevive),this.numRevive30=t.safeNum(e.numRevive30,this.numRevive30),this.heart=t.safeNum(e.heart,this.heart),this.tribe=t.safeNum(e.tribe,this.tribe),this.adsEndTime=e.adsEndTime?new Date(e.adsEndTime).getTime():0,this.assistantEndTime=e.assistantEndTime?new Date(e.assistantEndTime).getTime():0,this.soulRestStartAt=e.soulRestStartAt?new Date(e.soulRestStartAt).getTime():0,this.soulRestEndAt=e.soulRestEndAt?new Date(e.soulRestEndAt).getTime():0,this.bestMedalPerMin=Number(e.bestMedalPerMin)||0,this.bestMedalPerMinAt=e.bestMedalPerMinAt?new Date(e.bestMedalPerMinAt).getTime():0,this.soulRestNextStartAt=e.soulRestNextStartAt?new Date(e.soulRestNextStartAt).getTime():0,this.soulRestSkipCount=Number(e.soulRestSkipCount)||0,this.maxTeamSlots=t.safeNum(e.maxTeamSlots,this.maxTeamSlots),this.updateReviveBuffs(),e.activeSkills&&(this.activeSkills=e.activeSkills.split("|").map(Number)),"honorCoin"in e&&(this.honorCoin=Number(e.honorCoin))} + (s||n>this.wave)&&mL.setTrusted(n),this.wave<=0&&mL.setTrusted(1),this.maxWave=t.safeNum(e.maxWave,this.maxWave),this.accuMedal=t.safeNum(e.accuMedal,this.accuMedal),this.accuWave=t.safeNum(e.accuWave,this.accuWave),this.medalBuyCount=t.safeNum(e.medalBuyCount,this.medalBuyCount),this.needRevive=Boolean(e.needRevive),this.speed15EndTime=new Date(e.speed15EndTime).getTime(),this.speed20EndTime=new Date(e.speed20EndTime).getTime(),this.medalBuffLevel=t.safeNum(e.medalBuffLevel,this.medalBuffLevel),this.goldBuffLevel=t.safeNum(e.goldBuffLevel,this.goldBuffLevel),this.daySkipLevel=t.safeNum(e.daySkipLevel,this.daySkipLevel),this.lastReviveTime=e.lastReviveTime?new Date(e.lastReviveTime).getTime():0,this.numRevive=t.safeNum(e.numRevive,this.numRevive),this.numRevive30=t.safeNum(e.numRevive30,this.numRevive30),this.heart=t.safeNum(e.heart,this.heart),this.tribe=t.safeNum(e.tribe,this.tribe),this.adsEndTime=e.adsEndTime?new Date(e.adsEndTime).getTime():0,this.assistantEndTime=e.assistantEndTime?new Date(e.assistantEndTime).getTime():0,this.assistantPassEndTime=e.assistantPassEndTime?new Date(e.assistantPassEndTime).getTime():0,this.soulRestStartAt=e.soulRestStartAt?new Date(e.soulRestStartAt).getTime():0,this.soulRestEndAt=e.soulRestEndAt?new Date(e.soulRestEndAt).getTime():0,this.bestMedalPerMin=Number(e.bestMedalPerMin)||0,this.bestMedalPerMinAt=e.bestMedalPerMinAt?new Date(e.bestMedalPerMinAt).getTime():0,this.soulRestNextStartAt=e.soulRestNextStartAt?new Date(e.soulRestNextStartAt).getTime():0,this.soulRestSkipCount=Number(e.soulRestSkipCount)||0,this.maxTeamSlots=t.safeNum(e.maxTeamSlots,this.maxTeamSlots),this.updateReviveBuffs(),e.activeSkills&&(this.activeSkills=e.activeSkills.split("|").map(Number)),"honorCoin"in e&&(this.honorCoin=Number(e.honorCoin))}
- Kt(yL,"accountId",""),Kt(yL,"currentServer",0),Kt(yL,"platform",""),Kt(yL,"platformId",""),Kt(yL,"regTime",""),Kt(yL,"agreeTime",""),Kt(yL,"optOut",!1),Kt(yL,"withdrawYn",""),Kt(yL,"withdrawTime",""),Kt(yL,"email",""),Kt(yL,"userId",""),Kt(yL,"name",""),Kt(yL,"uid",""),Kt(yL,"userType",0),Kt(yL,"language","en"),Kt(yL,"timezone",0),Kt(yL,"lastLoginTime",""),Kt(yL,"lastGoldUpdateTime",""),Kt(yL,"goldPerSec",100),Kt(yL,"walletType",""),Kt(yL,"walletAddress",""),Kt(yL,"createdJustNow",!1),Kt(yL,"tribe",0),Kt(yL,"reviveQuestGoldBuff",0),Kt(yL,"reviveQuestDurationBuff",0),Kt(yL,"reviveQuestOpenCostBuff",0),Kt(yL,"maxWave",1),Kt(yL,"gem",0),Kt(yL,"redGem",0),Kt(yL,"accuMedal",0),Kt(yL,"accuWave",0),Kt(yL,"medalBuyCount",0),Kt(yL,"needRevive",!1),Kt(yL,"medal",0),Kt(yL,"honorCoin",0),Kt(yL,"_speed15",HD(eN.SP15_SENTINEL)),Kt(yL,"_speed20",HD(eN.SP20_SENTINEL)),Kt(yL,"medalBuffLevel",0),Kt(yL,"goldBuffLevel",0),Kt(yL,"daySkipLevel",0),Kt(yL,"lastReviveTime",0),Kt(yL,"numRevive",0),Kt(yL,"numRevive30",0),Kt(yL,"heart",0),Kt(yL,"adsEndTime",0),Kt(yL,"assistantEndTime",0),Kt(yL,"soulRestStartAt",0),Kt(yL,"soulRestEndAt",0),Kt(yL,"bestMedalPerMin",0),Kt(yL,"bestMedalPerMinAt",0),Kt(yL,"soulRestNextStartAt",0),Kt(yL,"soulRestSkipCount",0),Kt(yL,"castleKindNum",10001),Kt(yL,"castleLevel",0),Kt(yL,"castleEnhance",0),Kt(yL,"castleGoldLevels",[0,0,0,0,0,0,0,0,0,0]),Kt(yL,"castleMedalLevels",[0,0,0,0,0,0,0,0,0,0]),Kt(yL,"questsLevels",[0,0,0,0,0,0,0,0,0,0]),Kt(yL,"maxTeamSlots",5),Kt(yL,"unitsSlotIds",[]),Kt(yL,"unitsSlotKindNums",[]),Kt(yL,"unitsSlotLevels",[]),Kt(yL,"unitsSlotEnhances",[]),Kt(yL,"ownedUnitKindNums",[]),Kt(yL,"ownedUnitCounts",[]),Kt(yL,"treasuresMaxSlots",5),Kt(yL,"treasuresKindNums",[]),Kt(yL,"treasuresLevels",[]),Kt(yL,"treasuresOwned",[]),Kt(yL,"skillsKindNums",[]),Kt(yL,"activeSkills",[1,-1,-1]),Kt(yL,"_godBless",HD(eN.GODBLESS_SENTINEL)); + Kt(SL,"accountId",""),Kt(SL,"currentServer",0),Kt(SL,"platform",""),Kt(SL,"platformId",""),Kt(SL,"regTime",""),Kt(SL,"agreeTime",""),Kt(SL,"optOut",!1),Kt(SL,"withdrawYn",""),Kt(SL,"withdrawTime",""),Kt(SL,"email",""),Kt(SL,"userId",""),Kt(SL,"name",""),Kt(SL,"uid",""),Kt(SL,"userType",0),Kt(SL,"language","en"),Kt(SL,"timezone",0),Kt(SL,"lastLoginTime",""),Kt(SL,"lastGoldUpdateTime",""),Kt(SL,"goldPerSec",100),Kt(SL,"walletType",""),Kt(SL,"walletAddress",""),Kt(SL,"createdJustNow",!1),Kt(SL,"tribe",0),Kt(SL,"reviveQuestGoldBuff",0),Kt(SL,"reviveQuestDurationBuff",0),Kt(SL,"reviveQuestOpenCostBuff",0),Kt(SL,"maxWave",1),Kt(SL,"gem",0),Kt(SL,"redGem",0),Kt(SL,"accuMedal",0),Kt(SL,"accuWave",0),Kt(SL,"medalBuyCount",0),Kt(SL,"needRevive",!1),Kt(SL,"medal",0),Kt(SL,"honorCoin",0),Kt(SL,"_speed15",VD(eN.SP15_SENTINEL)),Kt(SL,"_speed20",VD(eN.SP20_SENTINEL)),Kt(SL,"medalBuffLevel",0),Kt(SL,"goldBuffLevel",0),Kt(SL,"daySkipLevel",0),Kt(SL,"lastReviveTime",0),Kt(SL,"numRevive",0),Kt(SL,"numRevive30",0),Kt(SL,"heart",0),Kt(SL,"adsEndTime",0),Kt(SL,"assistantEndTime",0),Kt(SL,"assistantPassEndTime",0),Kt(SL,"soulRestStartAt",0),Kt(SL,"soulRestEndAt",0),Kt(SL,"bestMedalPerMin",0),Kt(SL,"bestMedalPerMinAt",0),Kt(SL,"soulRestNextStartAt",0),Kt(SL,"soulRestSkipCount",0),Kt(SL,"castleKindNum",10001),Kt(SL,"castleLevel",0),Kt(SL,"castleEnhance",0),Kt(SL,"castleGoldLevels",[0,0,0,0,0,0,0,0,0,0]),Kt(SL,"castleMedalLevels",[0,0,0,0,0,0,0,0,0,0]),Kt(SL,"questsLevels",[0,0,0,0,0,0,0,0,0,0]),Kt(SL,"maxTeamSlots",5),Kt(SL,"unitsSlotIds",[]),Kt(SL,"unitsSlotKindNums",[]),Kt(SL,"unitsSlotLevels",[]),Kt(SL,"unitsSlotEnhances",[]),Kt(SL,"ownedUnitKindNums",[]),Kt(SL,"ownedUnitCounts",[]),Kt(SL,"treasuresMaxSlots",5),Kt(SL,"treasuresKindNums",[]),Kt(SL,"treasuresLevels",[]),Kt(SL,"treasuresOwned",[]),Kt(SL,"skillsKindNums",[]),Kt(SL,"activeSkills",[1,-1,-1]),Kt(SL,"_godBless",VD(eN.GODBLESS_SENTINEL));
ShopPayItemRenderer 3 hunks, 7 statements
- if(this.data.productId==p5.Secretary_Day30&&ML.isAssistantPremium){ + if((this.data.productId==b5.Secretary_Day30||this.data.productId==b5.Secretary_Day3)&&TL.assistantEndTime>tx.time){
- this.isSubscriptionRow(t)?(o=55,c="",ML.isAssistantPremium&&(a=CG.getText("COMMON_547","구독중"))):t.productId==p5.Secretary_Day30&&ML.isAssistantPremium&&(o=55,c="",a=CG.getText("GAME_1239","고용중")),this.btnBuy.height=o,this.btnBuy.setData(a,c),this.btnBuy.x=this.bg.width-this.btnBuy.width-6,this.btnBuy.y=.5*(this.bg.height-this.btnBuy.height)} + this.isSubscriptionRow(t)?(o=55,c="",TL.isAssistantPremium&&(a=xG.getText("COMMON_547","구독중"))):t.productId!=b5.Secretary_Day30&&t.productId!=b5.Secretary_Day3||TL.assistantEndTime>tx.time&&(o=55,c="",a=xG.getText("GAME_1239","고용중")),this.btnBuy.height=o,this.btnBuy.setData(a,c),this.btnBuy.x=this.bg.width-this.btnBuy.width-6,this.btnBuy.y=.5*(this.bg.height-this.btnBuy.height)}
+ if(t.productId==b5.Secretary_Day30&&TL.isAssistantPremium){ + const t=Math.ceil(TL.assistantPremiumRemainMs/864e5); + this.lblDesc.text+=" ( "+xG.getValueReplace("GAME_1551","##",t,`잔여 ${ + t} + 일`)+" )"}
GuildWarBattlePopupV3 7 hunks, 7 statements
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:9} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:9}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:11} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:11}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:9} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:9}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i}
RebirthMedalManager 1 hunks, 6 statements
- const s=cx.getInstance().getRebirthMedalPetDelta(),e=wx.getInstance(),n=e.getGlobalTransMedalBonusPct(IR.getWaterDragonOwnedMedalCapBonus()),h=e.getCurrentTeamTransMedalBonusPct(),r=IR.getWaterDragonTeamMedalBonus(e.getTeamIds()),o=VR.getInstance().getGameplayMultiplier(Cx.MedalBuff)+.01*s+.01*(n+h+r); + const s=cx.getInstance().getRebirthMedalPetDelta(),e=wx.getInstance(),n=e.getGlobalTransMedalBonusPct(IR.getWaterDragonOwnedMedalCapBonus()),h=e.getCurrentTeamTransMedalBonusPct(),r=IR.getWaterDragonTeamMedalBonus(e.getTeamIds()),o=FF.getInstance().getEffectiveKindNums(); + let a=0; + if(o){ + const t=qx.getInstance(); + a=t.getMedalTotalForKindNums(o)-t.getMedalTotalForKindNums(Hx.getInstance().equipedKindNums)} + const c=VR.getInstance().getGameplayMultiplier(Cx.MedalBuff)+.01*s+.01*(n+h+r)+.01*a;
TournamentRewardItemRenderer 3 hunks, 6 statements
- this.lblRound.text=this.getRoundLabel(i.round),this.lblRound.x=.5*(120-this.lblRound.width),this.lblRound.y=.5*(t.ITEM_HEIGHT-this.lblRound.height); + 3==i.kindNum||5==i.kindNum?(this.bg.texture=QA.getTexture("UI_Ekkorr","Popup_List_02_gray"),this.lblRound.textColor=fD.COLOR_DEEP_SKYBLUE):(this.bg.texture=QA.getTexture("UI_Ekkorr","Popup_List_02"),this.lblRound.textColor=fD.COLOR_BRIGHT_ORANGE),this.lblRound.text=this.getRoundLabel(i.round,i.kindNum),this.lblRound.x=.5*(120-this.lblRound.width),this.lblRound.y=.5*(t.ITEM_HEIGHT-this.lblRound.height);
- getRoundLabel(t){ + getRoundLabel(t,i){
- case 2:return CG.getText("GWT_4","8강"); - case 3:return CG.getText("GWT_5","4강"); - case 4:return CG.getText("GWT_6","3/4위전"); - default:return CG.getText("GWT_7","결승전")} + case 2:return 3==i?xG.getText("서브 매치 1","서브 매치 1"):xG.getText("GWT_4","8강"); + case 3:return 5==i?xG.getText("서브 매치 2","서브 매치 2"):xG.getText("GWT_5","4강"); + case 4:return 7==i?xG.getText("GWT_7","결승전"):xG.getText("GWT_6","3/4위전"); + default:return""}
TransConfirmPopup 1 hunks, 6 statements
+ )),wfi=J$t("Browser",{ + web:Vt(()=>Xt(()=>Promise.resolve().then(()=>LCi),void 0).then(t=>new t.BrowserWeb),"web")} + ),vfi=Object.freeze(Object.defineProperty({ + __proto__:null,Browser:wfi} + ,Symbol.toStringTag,{ + value:"Module"}
FavoritePetSelectItemRenderer 1 hunks, 6 statements
- )),Wdi=V$t("Browser",{ - web:Vt(()=>Xt(()=>Promise.resolve().then(()=>fTi),void 0).then(t=>new t.BrowserWeb),"web")} - ),$di=Object.freeze(Object.defineProperty({ - __proto__:null,Browser:Wdi} - ,Symbol.toStringTag,{ - value:"Module"}
AchievementVO 1 hunks, 5 statements
- const IVt=Object.freeze(Object.defineProperty({ - __proto__:null,DailyQuestDataManager:CVt,DailyQuestType:SVt} - ,Symbol.toStringTag,{ - value:"Module"} - )),OVt=class{ + const mVt=class{
LocalDataManager 1 hunks, 4 statements
+ static async getSecretaryHelpPopupped(){ + return await this.getData(this.getKey("sHp"))} + static async saveSecretaryHelpPopupped(t){ + await this.saveData(this.getKey("sHp"),t)}
Archery2GameScene 4 hunks, 4 statements
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fill:16777215} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fill:16777215}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_20,fill:16766720} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_20,fill:16766720}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fill:16737792} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fill:16737792}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_20,fill:16777215} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_20,fill:16777215}
ServerParkingPopup 2 hunks, 3 statements
- if("GameMain"==this.from)return this.count=0,this.setCheckBtnEvent(!1),this.hideImmediately(),sN.getInstance().show(),void Coi(); - if(await this.reload(),this.hideImmediately(),this.onDelayCallback(),1!=CL.getInstance().parking)try{ + try{
- else super.show()} + }
Bo 3 hunks, 3 statements
- type:aet.KEY_HANDSHAKE_ACK} + type:get.KEY_HANDSHAKE_ACK}
- if(!S&&(null==M?void 0:M.type)===aet.KEY_HANDSHAKE_START){ + if(!S&&(null==M?void 0:M.type)===get.KEY_HANDSHAKE_START){
- type:aet.KEY_HANDSHAKE_START} + type:get.KEY_HANDSHAKE_START}
SHA256 3 hunks, 3 statements
- ...ept,...hpt,...opt,...cpt,...dpt,...Mpt,...Spt,...Ipt,...Npt} + ...cpt,...upt,...fpt,...gpt,...vpt,...Ipt,...xpt,...Ppt,...Upt}
- ...mgt,...vgt} + ...Mgt,...Agt}
- utf8:Ygt,"utf-8":Ygt,hex:$gt.base16,latin1:Xgt,ascii:Xgt,binary:Xgt,...$gt} + utf8:imt,"utf-8":imt,hex:qgt.base16,latin1:smt,ascii:smt,binary:smt,...qgt}
SuiProvider 3 hunks, 3 statements
- namespace:FAt.NameSpaceKeyAptos,addresses:s,methods:[...WAt.AptosMethods],extra:h} + namespace:KAt.NameSpaceKeyAptos,addresses:s,methods:[...YAt.AptosMethods],extra:h}
- namespace:YAt.NameSpaceKeyTON,addresses:o,methods:[...QAt.TONMethods],extra:a,data:{ + namespace:iSt.NameSpaceKeyTON,addresses:o,methods:[...nSt.TONMethods],extra:a,data:{
- namespace:sSt.NameSpaceKeySui,addresses:i,methods:[...hSt.SuiMethods],extra:s} + namespace:aSt.NameSpaceKeySui,addresses:i,methods:[...uSt.SuiMethods],extra:s}
WalletPopup 3 hunks, 3 statements
- ...cD.ERROR_POPUP_LABEL_OPTION,fontSize:24,fontWeight:"bold"} + ...fD.ERROR_POPUP_LABEL_OPTION,fontSize:24,fontWeight:"bold"}
- ...cD.ERROR_POPUP_LABEL_OPTION,fontSize:16} + ...fD.ERROR_POPUP_LABEL_OPTION,fontSize:16}
- ...cD.ERROR_POPUP_LABEL_OPTION,fontSize:16} + ...fD.ERROR_POPUP_LABEL_OPTION,fontSize:16}
GuildWarTournamentRewardGuidePopup 1 hunks, 3 statements
- )`,this.title=i,this.tapDesc.text=CG.getText("GWT_9","라운드별 전투 보상"),this.tapReward.text=CG.getText("GWT_11","서버 보상"),this.refreshRewardHeaders(),this.rewardBattleList.dataProvider=AD.rewardBattleList.sort((t,i)=>i.kindNum-t.kindNum),this.rewardBattleList.scrollTo(0),this.rewardServerList.dataProvider=AD.rewardServerList,this.rewardServerList.scrollTo(0),this.tapDesc.selected=!0,this.tapReward.selected=!1,this.battleContainer.visible=!0,this.serverContainer.visible=!1,await this.loadImage(),super.show()} + )`,this.title=i,this.tapDesc.text=xG.getText("GWT_9","라운드별 전투 보상"),this.tapReward.text=xG.getText("GWT_11","서버 보상"),this.refreshRewardHeaders(); + let e=[...ID.rewardBattleList.sort((t,i)=>i.kindNum-t.kindNum)].concat([...ID.rewardBattleLostList.sort((t,i)=>i.kindNum-t.kindNum)]); + this.rewardBattleList.dataProvider=e,this.rewardBattleList.scrollTo(0),this.rewardServerList.dataProvider=ID.rewardServerList,this.rewardServerList.scrollTo(0),this.tapDesc.selected=!0,this.tapReward.selected=!1,this.battleContainer.visible=!0,this.serverContainer.visible=!1,await this.loadImage(),super.show()}
GuildManager 2 hunks, 2 statements
- this.rewardBattleList.length=0,this.rewardServerList.length=0; + this.rewardBattleList.length=0,this.rewardBattleLostList.length=0,this.rewardServerList.length=0;
- e++)if(i=t[e],i.kindNum<100)this.rewardBattleList.push(i); + e++)if(i=t[e],i.kindNum<100)3==i.kindNum||5==i.kindNum?this.rewardBattleLostList.push(i):this.rewardBattleList.push(i);
Client 2 hunks, 2 statements
- ,parseAs:m="json",querySerializer:w,bodySerializer:v=h??o3,body:b,..._} + ,parseAs:m="json",querySerializer:w,bodySerializer:v=h??f3,body:_,...b}
- redirect:"follow",...a,..._,body:E,headers:A} + redirect:"follow",...a,...b,body:E,headers:A}
Oo 2 hunks, 2 statements
- let get=pet; + let yet=bet;
- type:aet.KEY_HANDSHAKE_ACK} + type:get.KEY_HANDSHAKE_ACK}
Ko 2 hunks, 2 statements
- this.state.keyExchange=new get(r)} + this.state.keyExchange=new yet(r)}
- type:aet.KEY_HANDSHAKE_CHECK,pubkey:t.getKeyInfo().ecies.otherPubKey} + type:get.KEY_HANDSHAKE_CHECK,pubkey:t.getKeyInfo().ecies.otherPubKey}
TreasureIcon 2 hunks, 2 statements
- super(),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","UI_T001"))),Kt(this,"bg",new He(QA.getTexture("UI_Ekkorr","HeroFrame_1_Bg"))),Kt(this,"cover",new He(QA.getTexture("UI_Ekkorr","HeroFrame_1"))),Kt(this,"lblEnhance",new JD("+0",16776960,cD.DEFAULT_OUTLINE_FONT_OPTION_16)),Kt(this,"posList",[30,26,24,19,16,13,9]),Kt(this,"star",new He(QA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[3])),Kt(this,"trans",new He(QA.getTexture("UI_Ekkorr","Trans0001"))),this.icon.x=3,this.icon.y=3,this.bg.x=3,this.bg.y=3,this.addChild(this.bg),this.addChild(this.icon),this.cover.x=0,this.cover.y=0,this.addChild(this.cover),this.star.x=this.posList[3],this.star.y=this.bg.height-this.star.height,this.addChild(this.star),this.icon.x=.5*(this.bg.height-this.icon.height),this.icon.y=.5*(this.bg.height-this.icon.height),this.lblEnhance.x=this.bg.width-this.lblEnhance.width-1,this.lblEnhance.y=3,this.addChild(this.lblEnhance),this.trans.scale=1.2,this.trans.x=5,this.trans.y=7,this.trans.visible=!1,this.addChild(this.trans)} + super(),Kt(this,"icon",new He(QA.getTexture("UI_Ekkorr","UI_T001"))),Kt(this,"bg",new He(QA.getTexture("UI_Ekkorr","HeroFrame_1_Bg"))),Kt(this,"cover",new He(QA.getTexture("UI_Ekkorr","HeroFrame_1"))),Kt(this,"lblEnhance",new iL("+0",16776960,fD.DEFAULT_OUTLINE_FONT_OPTION_16)),Kt(this,"posList",[30,26,24,19,16,13,9]),Kt(this,"star",new He(QA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[3])),Kt(this,"trans",new He(QA.getTexture("UI_Ekkorr","Trans0001"))),this.icon.x=3,this.icon.y=3,this.bg.x=3,this.bg.y=3,this.addChild(this.bg),this.addChild(this.icon),this.cover.x=0,this.cover.y=0,this.addChild(this.cover),this.star.x=this.posList[3],this.star.y=this.bg.height-this.star.height,this.addChild(this.star),this.icon.x=.5*(this.bg.height-this.icon.height),this.icon.y=.5*(this.bg.height-this.icon.height),this.lblEnhance.x=this.bg.width-this.lblEnhance.width-3,this.lblEnhance.y=3,this.addChild(this.lblEnhance),this.trans.scale=1.2,this.trans.x=5,this.trans.y=7,this.trans.visible=!1,this.addChild(this.trans)}
- `,this.star.texture=QA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[t.grade-1],this.star.x=this.posList[t.grade-1],this.bg.texture=QA.getTexture("UI_Ekkorr",`HeroFrame_${ + `,this.lblEnhance.x=this.bg.width-this.lblEnhance.width-3,this.star.texture=QA.getTextures("UI_Ekkorr","UI_UNIT_RARE")[t.grade-1],this.star.x=this.posList[t.grade-1],this.bg.texture=QA.getTexture("UI_Ekkorr",`HeroFrame_${
GuildBarrackRowItemRenderer 2 hunks, 2 statements
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:14} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:14}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13}
GuildWarBattleReadyPopup 2 hunks, 2 statements
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i}
GuildWarSquadsPopup 2 hunks, 2 statements
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:14} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:14}
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i}
GuildWarTierAssignPopup 2 hunks, 2 statements
- const i=[...AD.memberList??[]].sort((t,i)=>i.roleLevel!==t.roleLevel?i.roleLevel-t.roleLevel:(i.wave??0)-(t.wave??0)); + const i=[...ID.memberList??[]].sort((t,i)=>i.roleLevel!==t.roleLevel?i.roleLevel-t.roleLevel:(i.wave??0)-(t.wave??0));
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i}
CacheClass 1 hunks, 1 statements
- ...Yi.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1} + ...qi.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1}
ApplicationInitHook 1 hunks, 1 statements
- const i=[...qr,...this.config.runners??[]]; + const i=[...Yr,...this.config.runners??[]];
GlUboSystem 1 hunks, 1 statements
- ...xb,"mat2x2<f32>":"\n data[offset] = v[0]; + ...x_,"mat2x2<f32>":"\n data[offset] = v[0];
WebGLRenderer 1 hunks, 1 statements
- ti.handleByNamedList(Jt.WebGLSystem,z_),ti.handleByNamedList(Jt.WebGLPipes,q_),ti.handleByNamedList(Jt.WebGLPipesAdaptor,Y_),ti.add(...j_,...V_,...K_); + ti.handleByNamedList(Jt.WebGLSystem,zb),ti.handleByNamedList(Jt.WebGLPipes,Yb),ti.handleByNamedList(Jt.WebGLPipesAdaptor,qb),ti.add(...jb,...Vb,...Kb);
VersionManager 1 hunks, 1 statements
- Vt(KA,"VersionManager"),Kt(KA,"gameId","ef2"),Kt(KA,"appVersion","1.13.23"); + Vt(KA,"VersionManager"),Kt(KA,"gameId","ef2"),Kt(KA,"appVersion","1.13.46");
DataManager 1 hunks, 1 statements
- Kt(this,"system"),Kt(this,"account"),Kt(this,"user"),Kt(this,"mail"),Kt(this,"book"),Kt(this,"castle"),Kt(this,"hero"),Kt(this,"quest"),Kt(this,"waveCall"),Kt(this,"referral"),Kt(this,"dailyRanking"),Kt(this,"payback"),Kt(this,"pvp"),Kt(this,"dungeon"),Kt(this,"treasure"),Kt(this,"achievement"),Kt(this,"shop"),Kt(this,"ads"),Kt(this,"notice"),Kt(this,"notice2"),Kt(this,"attendance"),Kt(this,"pass"),Kt(this,"tower"),Kt(this,"missionGuide"),Kt(this,"promotion"),Kt(this,"guild"),Kt(this,"guildWar"),Kt(this,"guildRaid"),Kt(this,"rune"),Kt(this,"guildDefense"),Kt(this,"guildBarracks"),Kt(this,"battle"),Kt(this,"pet"),Kt(this,"petShop"),Kt(this,"spirit"),Kt(this,"heroPresent"),Kt(this,"vip"),Kt(this,"miniGame"),Kt(this,"assistant"),Kt(this,"subscription"),Kt(this,"soulRest"),Kt(this,"translate"),Kt(this,"dailyQuest"),Kt(this,"lineNext"),Kt(this,"mine"),this.system=new PP,this.account=new _N,this.user=new FP,this.mail=new dP,this.book=new FN,this.castle=new WN,this.hero=new lP,this.quest=new IP,this.waveCall=new tD,this.dailyRanking=new jN,this.referral=new kP,this.payback=new MP,this.pvp=new TP,this.dungeon=new KN,this.treasure=new BP,this.achievement=new MN,this.shop=new RP,this.ads=new AN,this.notice=new mP,this.notice2=new vP,this.attendance=new LN,this.pass=new _P,this.tower=new LP,this.missionGuide=new pP,this.promotion=new AP,this.guild=new qN,this.guildWar=new tP,this.guildRaid=new sP,this.rune=new nP,this.guildDefense=new rP,this.guildBarracks=new aP,this.battle=new BN,this.pet=new jP,this.petShop=new KP,this.spirit=new XP,this.heroPresent=new WP,this.vip=new QP,this.miniGame=new qP,this.assistant=new TN,this.subscription=new PN,this.soulRest=new IN,this.translate=new kN,this.dailyQuest=new RN,this.lineNext=new sD,this.mine=new nD} + Kt(this,"system"),Kt(this,"account"),Kt(this,"user"),Kt(this,"mail"),Kt(this,"book"),Kt(this,"castle"),Kt(this,"hero"),Kt(this,"quest"),Kt(this,"waveCall"),Kt(this,"referral"),Kt(this,"dailyRanking"),Kt(this,"payback"),Kt(this,"pvp"),Kt(this,"dungeon"),Kt(this,"treasure"),Kt(this,"achievement"),Kt(this,"shop"),Kt(this,"ads"),Kt(this,"notice"),Kt(this,"notice2"),Kt(this,"attendance"),Kt(this,"stampCalendar"),Kt(this,"pass"),Kt(this,"tower"),Kt(this,"missionGuide"),Kt(this,"promotion"),Kt(this,"guild"),Kt(this,"guildWar"),Kt(this,"guildRaid"),Kt(this,"rune"),Kt(this,"guildDefense"),Kt(this,"guildBarracks"),Kt(this,"battle"),Kt(this,"pet"),Kt(this,"petShop"),Kt(this,"spirit"),Kt(this,"heroPresent"),Kt(this,"vip"),Kt(this,"miniGame"),Kt(this,"assistant"),Kt(this,"subscription"),Kt(this,"soulRest"),Kt(this,"translate"),Kt(this,"dailyQuest"),Kt(this,"lineNext"),Kt(this,"mine"),Kt(this,"cardEvent"),this.system=new LP,this.account=new bN,this.user=new WP,this.mail=new pP,this.book=new WN,this.castle=new jN,this.hero=new dP,this.quest=new kP,this.waveCall=new sD,this.dailyRanking=new KN,this.referral=new RP,this.payback=new AP,this.pvp=new IP,this.dungeon=new YN,this.treasure=new FP,this.achievement=new MN,this.shop=new PP,this.ads=new AN,this.notice=new vP,this.notice2=new bP,this.attendance=new LN,this.stampCalendar=new BN,this.pass=new MP,this.tower=new BP,this.missionGuide=new mP,this.promotion=new TP,this.guild=new XN,this.guildWar=new sP,this.guildRaid=new nP,this.rune=new rP,this.guildDefense=new aP,this.guildBarracks=new lP,this.battle=new FN,this.pet=new KP,this.petShop=new YP,this.spirit=new QP,this.heroPresent=new jP,this.vip=new tD,this.miniGame=new XP,this.assistant=new TN,this.subscription=new PN,this.soulRest=new IN,this.translate=new kN,this.dailyQuest=new RN,this.lineNext=new nD,this.mine=new rD,this.cardEvent=new aD}
MembershipVO 1 hunks, 1 statements
- ),Kt(ED,"currentPage",0),Kt(ED,"currentSearch",""),Kt(ED,"totalGuilds",0),Kt(ED,"noticeList",[]),Kt(ED,"logList",[]),Kt(ED,"lastLogFetchTime",0),Kt(ED,"LOG_CACHE_MS",6e4),Kt(ED,"loadedMessageTimes",[0,0,0]),Kt(ED,"_chatListenersInitialized",!1),Kt(ED,"onMessageHandler"),Kt(ED,"onConnectHandler"),Kt(ED,"isTournamenEntered",!1),Kt(ED,"roundSchedule"),Kt(ED,"tournamentList",[]),Kt(ED,"bookRewardLoaded",!1),Kt(ED,"rewardBattleList",[]),Kt(ED,"rewardServerList",[]); + ),Kt(CD,"currentPage",0),Kt(CD,"currentSearch",""),Kt(CD,"totalGuilds",0),Kt(CD,"noticeList",[]),Kt(CD,"logList",[]),Kt(CD,"lastLogFetchTime",0),Kt(CD,"LOG_CACHE_MS",6e4),Kt(CD,"loadedMessageTimes",[0,0,0]),Kt(CD,"_chatListenersInitialized",!1),Kt(CD,"onMessageHandler"),Kt(CD,"onConnectHandler"),Kt(CD,"isTournamenEntered",!1),Kt(CD,"roundSchedule"),Kt(CD,"tournamentList",[]),Kt(CD,"bookRewardLoaded",!1),Kt(CD,"rewardBattleList",[]),Kt(CD,"rewardBattleLostList",[]),Kt(CD,"rewardServerList",[]);
AutoTogglePill 1 hunks, 1 statements
- ...cD.DEFAULT_FONT_OPTION_15,fontSize:t.FONT_SIZE,lineHeight:t.PILL_H} + ...fD.DEFAULT_FONT_OPTION_15,fontSize:t.FONT_SIZE,lineHeight:t.PILL_H}
ShopDataManager 1 hunks, 1 statements
- var p5=(t=>(t[t.Secretary=7001]="Secretary",t[t.Secretary_Day30=7002]="Secretary_Day30",t))(p5||{ + var b5=(t=>(t[t.Secretary=7001]="Secretary",t[t.Secretary_Day30=7002]="Secretary_Day30",t[t.Secretary_Day3=7003]="Secretary_Day3",t))(b5||{
Err 1 hunks, 1 statements
- ..._,domain:y} + ...b,domain:y}
Sr 1 hunks, 1 statements
- ...t,...Ytt(i)} + ...t,...iit(i)}
Ma 1 hunks, 1 statements
- ...aht,coercer:Vt((t,i)=>_nt(t,cht)?aht.coercer(lht(t,i),i):aht.coercer(t,i),"coercer")} + ...pht,coercer:Vt((t,i)=>Tnt(t,ght)?pht.coercer(mht(t,i),i):pht.coercer(t,i),"coercer")}
Yp 1 hunks, 1 statements
- const e=126,n=[71,73,70,56,55,97,...i,246,0,0,255,255,255,...jdt(381,0),44,0,0,0,0,...i,0,7],h=Math.floor(s.length/e); + const e=126,n=[71,73,70,56,55,97,...i,246,0,0,255,255,255,...Xdt(381,0),44,0,0,0,0,...i,0,7],h=Math.floor(s.length/e);
SuiStandardProvider 1 hunks, 1 statements
- namespace:iyt.NameSpaceKeyEip155,addresses:i,methods:[...nyt.Eip55Methods],extra:s} + namespace:oyt.NameSpaceKeyEip155,addresses:i,methods:[...lyt.Eip55Methods],extra:s}
AppReadyEvent 1 hunks, 1 statements
- return TMt||(TMt=[..._Mt]),TMt} + return RMt||(RMt=[...TMt]),RMt}
SolProvider 1 hunks, 1 statements
- namespace:xAt.NameSpaceKeySOL,addresses:i,methods:[...DAt.SOLANAMethods],extra:s} + namespace:GAt.NameSpaceKeySOL,addresses:i,methods:[...HAt.SOLANAMethods],extra:s}
OkxwalletInjectConnector 1 hunks, 1 statements
- namespace:cSt.NameSpaceKeyBtc,addresses:i,methods:[...uSt.BtcMethods],extra:s} + namespace:gSt.NameSpaceKeyBtc,addresses:i,methods:[...wSt.BtcMethods],extra:s}
TcRootElement 1 hunks, 1 statements
- return hLt()||(t.push(new yft.OKXAppConnector),t.push(new yft.OKXWalletAppConnector)),eLt()&&t.push(new yft.OkxwalletInjectConnector),t.push(...oLt()),t} + return uLt()||(t.push(new Cft.OKXAppConnector),t.push(new Cft.OKXWalletAppConnector)),cLt()&&t.push(new Cft.OkxwalletInjectConnector),t.push(...fLt()),t}
WalletSelectPopup 1 hunks, 1 statements
- ...cD.ERROR_POPUP_LABEL_OPTION,fontSize:18} + ...fD.ERROR_POPUP_LABEL_OPTION,fontSize:18}
BaseShopProductPopup 1 hunks, 1 statements
- this.lblRewardsTitle.visible=!1,this.rewardContainer.visible=n,t.productId==p5.Secretary||t.productId==p5.Secretary_Day30?(this.guideSecretary||(this.guideSecretary=new Sjt,this.addChild(this.guideSecretary)),this.guideSecretary.setData(),this.guideSecretary.visible=!0):this.guideSecretary&&(this.guideSecretary.visible=!1),this.updateInventoryContainer(t)} + this.lblRewardsTitle.visible=!1,this.rewardContainer.visible=n,t.productId==b5.Secretary||t.productId==b5.Secretary_Day30||t.productId==b5.Secretary_Day3?(this.guideSecretary||(this.guideSecretary=new xjt,this.addChild(this.guideSecretary)),this.guideSecretary.setData(),this.guideSecretary.visible=!0):this.guideSecretary&&(this.guideSecretary.visible=!1),this.updateInventoryContainer(t)}
SecretaryGuidePopup 1 hunks, 1 statements
- t&&t.detail&&"productId"in t.detail&&(i=t.detail.productId),i!==p5.Secretary&&i!==p5.Secretary_Day30||this.secretaryContainer.visible&&this.updateShopItem()} + t&&t.detail&&"productId"in t.detail&&(i=t.detail.productId),i!==b5.Secretary&&i!==b5.Secretary_Day30&&i!==b5.Secretary_Day3||this.secretaryContainer.visible&&this.updateShopItem()}
TreasureBookPopup 1 hunks, 1 statements
- ++h)i=t.bookList[h],s.push(i.kindNum); + ++h)i=t.bookList[h],i.grade>=7||s.push(i.kindNum);
FavoritePetSubView 1 hunks, 1 statements
- const t=[...gL.getInstance().favoritePets].sort((t,i)=>{ + const t=[..._L.getInstance().favoritePets].sort((t,i)=>{
TreasureTransDetailView 1 hunks, 1 statements
- return t?5===this.grade?!!t.grade5Available:!!t.grade6Available:this.dailyAvailable} + return t?5===this.grade?!!t.grade5Available:this.trans>=2?!!(t.grade6Trans2Available??t.grade6Available):!!t.grade6Available:this.dailyAvailable}
TreasureTransSubView 1 hunks, 1 statements
- grade:6,targetTrans:2,owned:(Number(h.grade6TransCount)||0)-r,trans:r,threshold:t.TRANS_OWN_THRESHOLD,dailyAvailable:h.grade6Available} + grade:6,targetTrans:2,owned:(Number(h.grade6TransCount)||0)-r,trans:r,threshold:t.TRANS_OWN_THRESHOLD,dailyAvailable:h.grade6Trans2Available??h.grade6Available}
GuildBarracksRaceView 1 hunks, 1 statements
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i}
GuildMainSubView 1 hunks, 1 statements
- const i=[...AD.guildList].sort((t,i)=>{ + const i=[...ID.guildList].sort((t,i)=>{
GuildRaidBattleReadyPopup 1 hunks, 1 statements
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:13}
GuildWarHistoryItemRenderer 1 hunks, 1 statements
- ...cD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i} + ...fD.DEFAULT_OUTLINE_FONT_OPTION_16,fontSize:i}
GuildWarTournamentGuidePopup 1 hunks, 1 statements
- const t=[CG.getText("GWT_14","서버 대항전은 각 서버의 1~8위 길드가 참가합니다."),CG.getText("GWT_15","토너먼트 방식으로 진행되며, 승리하면 다음 라운드로 진출합니다."),CG.getText("GWT_16","라운드 결과에 따라 참가한 길드에게 보상이 지급됩니다."),CG.getText("GWT_17","서버 대항전이 종료되면 각 서버의 전체 유저에게 보상이 지급됩니다."),CG.getText("GWT_18","서버 보상 중 훈장 버프는 다음날 UTC 00시부터 적용됩니다.")]; + const t=[xG.getText("GWT_14","서버 대항전은 각 서버의 1~8위 길드가 참가합니다."),xG.getText("GWT_15","토너먼트 방식으로 진행되며, 승리하면 다음 라운드로 진출합니다."),xG.getText("GWT_22","16강전에서 패배한 길드는 [서브 매치 1]에서 전투를 진행합니다."),xG.getText("GWT_23","8강전에서 패배한 길드는 [서브 매치 2]에서 전투를 진행합니다."),xG.getText("GWT_24","서브 매치는 단판제로 진행되며, 다음 라운드로 진출하지 않습니다."),xG.getText("GWT_16","라운드 결과에 따라 참가한 길드에게 보상이 지급됩니다."),xG.getText("GWT_17","서버 대항전이 종료되면 각 서버의 전체 유저에게 보상이 지급됩니다."),xG.getText("GWT_18","서버 보상 중 훈장 버프는 다음날 UTC 00시부터 적용됩니다.")];
PromotionCodePopup 1 hunks, 1 statements
- ),this.inputBg.visible=!1,this.inputBg.x=40,this.inputBg.width=this.width-2*this.inputBg.x,this.inputBg.height=70,this.addChild(this.inputBg),this.btnCancel=new cqt(CG.getText("COMMON_135","중복 확인")),this.btnCancel.outlineText=!0,this.btnCancel.width=240,this.btnCancel.height=65,this.addChild(this.btnCancel),this.btnCancel.onClick=this.onCancealBtnClick.bind(this),this.btnConfirm=new cqt(CG.getText("COMMON_134","닉네임 변경")),this.btnConfirm.color=cqt.COLOR_ORANGE,this.btnConfirm.outlineText=!0,this.btnConfirm.width=this.btnCancel.width,this.btnConfirm.height=this.btnCancel.height,this.addChild(this.btnConfirm),this.btnConfirm.onClick=this.onConfirmBtnClick.bind(this); + ),this.inputBg.visible=!1,this.inputBg.x=40,this.inputBg.width=this.width-2*this.inputBg.x,this.inputBg.height=70,this.addChild(this.inputBg),this.btnCancel=new HYt(xG.getText("COMMON_2","취소")),this.btnCancel.outlineText=!0,this.btnCancel.width=240,this.btnCancel.height=65,this.addChild(this.btnCancel),this.btnCancel.onClick=this.onCancealBtnClick.bind(this),this.btnConfirm=new HYt(xG.getText("COMMON_1","확인")),this.btnConfirm.color=HYt.COLOR_ORANGE,this.btnConfirm.outlineText=!0,this.btnConfirm.width=this.btnCancel.width,this.btnConfirm.height=this.btnCancel.height,this.addChild(this.btnConfirm),this.btnConfirm.onClick=this.onConfirmBtnClick.bind(this);
CitadelSubView 1 hunks, 1 statements
- t&&t.detail&&"productId"in t.detail&&(i=t.detail.productId),i!==p5.Secretary&&i!==p5.Secretary_Day30||this.setData()} + t&&t.detail&&"productId"in t.detail&&(i=t.detail.productId),i!==b5.Secretary&&i!==b5.Secretary_Day30&&i!==b5.Secretary_Day3||this.setData()}
BattleController 1 hunks, 1 statements
- this.skippedWave>0&&!this.shownDialogueWaves.has(this.skippedWave)&&(t.push(...rzt.getInstance().getByWave(this.skippedWave)),this.shownDialogueWaves.add(this.skippedWave)),this.shownDialogueWaves.has(ML.wave)||(t.push(...rzt.getInstance().getByWave(ML.wave)),this.shownDialogueWaves.add(ML.wave)),t.length>0&&_zt.getInstance().showDialogues(t)} + this.skippedWave>0&&!this.shownDialogueWaves.has(this.skippedWave)&&(t.push(...eVt.getInstance().getByWave(this.skippedWave)),this.shownDialogueWaves.add(this.skippedWave)),this.shownDialogueWaves.has(TL.wave)||(t.push(...eVt.getInstance().getByWave(TL.wave)),this.shownDialogueWaves.add(TL.wave)),t.length>0&&Nni.getInstance().showDialogues(t)}
GuildWarCombatLogItemRenderer 1 hunks, 1 statements
- ...cD.DEFAULT_FONT_OPTION_15,fontSize:14} + ...fD.DEFAULT_FONT_OPTION_15,fontSize:14}
GuildWarMemberStatusItemRenderer 1 hunks, 1 statements
- ...cD.DEFAULT_FONT_OPTION_15,fontSize:14} + ...fD.DEFAULT_FONT_OPTION_15,fontSize:14}
GuildWarTargetMarkerItemRenderer 1 hunks, 1 statements
- ...cD.DEFAULT_FONT_OPTION_15,fontSize:14} + ...fD.DEFAULT_FONT_OPTION_15,fontSize:14}
Delay 1 hunks, 1 statements
- ...nwi(),[i]:s} + ...Cvi(),[i]:s}
NetworkTimeout 1 hunks, 1 statements
- ...Iwi,...i} + ...Jvi,...i}
RecaptchaVerifier 1 hunks, 1 statements
- ...cMi} + ...REi}
BrowserPopupRedirectResolver 1 hunks, 1 statements
- ...fEi,width:e.toString(),height:n.toString(),top:h,left:r} + ...LAi,width:e.toString(),height:n.toString(),top:h,left:r}